@font-face {
  font-family: 'Architects Daughter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('./architects-daughter-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Architects Daughter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('./architects-daughter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
:root { --pine:#2f4a3a; --onpine:#fff; --moss:#6b8f4e; --sand:rgba(47,74,58,.08); --paper:rgba(251,248,241,.94); --ember:#d9702a; --ink:#23271f; --mute:#6f7667; --line:rgba(35,39,31,.12); --ifx:none; --safe-t:env(safe-area-inset-top,0px); --safe-b:env(safe-area-inset-bottom,0px); }
  @media (prefers-color-scheme: dark) { :root { --pine:#9cc387; --onpine:#10190f; --moss:#8fb27a; --sand:rgba(236,230,212,.09); --paper:rgba(30,36,31,.94); --ink:#ece6d4; --mute:#9aa392; --line:rgba(236,230,212,.15); --ifx:invert(.9); } }
  html, body { position: fixed; inset: 0; width: 100%; height: 100%; margin: 0; overflow: hidden; overscroll-behavior: none; -webkit-text-size-adjust: 100%; font: 14px system-ui, -apple-system, sans-serif; color: var(--ink); }
  #map { height: 100%; width: 100%; background: #f3efdc; }
  .maplibregl-canvas { outline: none; }
  .ml-bridge-marker { display: flex; align-items: center; justify-content: center; }
  .ml-bridge-tooltip { background: var(--paper); color: var(--ink); border: 1px solid var(--line); border-radius: 8px; padding: 3px 7px; font: 700 11.5px/1.25 system-ui, -apple-system, sans-serif; box-shadow: 0 2px 8px rgba(0,0,0,.22); white-space: nowrap; }
  svg.i { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
  .card { position: absolute; z-index: 1000; background: var(--paper); color: var(--ink); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 6px 24px rgba(0,0,0,.18); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
  button { border: 0; border-radius: 10px; padding: 9px 12px; font: 600 13px system-ui, -apple-system, sans-serif; background: var(--pine); color: var(--onpine); cursor: pointer; white-space: nowrap; }
  button.x { background: var(--sand); color: var(--ink); padding: 5px 9px; }
  input, select { padding: 8px; font-size: 16px; border-radius: 10px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); }
  #sb { display: none; top: calc(8px + var(--safe-t)); left: 8px; right: 8px; max-width: 560px; padding: 8px; z-index: 1150; }
  #sb .row { margin: 0; flex-wrap: nowrap; } #sb input { flex: 1; min-width: 0; }
  #sr { max-height: 50vh; overflow-y: auto; margin-top: 6px; } #sr .item { cursor: pointer; } #sr small { opacity: .75; }
  .leaflet-top.leaflet-right { margin-top: var(--safe-t); }
  .leaflet-mid { position: absolute; z-index: 1000; top: 50%; transform: translateY(-50%); pointer-events: none; } .leaflet-mid.leaflet-right { right: 0; }
  .leaflet-bar, .leaflet-touch .leaflet-bar, .leaflet-control-layers, .leaflet-touch .leaflet-control-layers { border: 1px solid var(--line) !important; border-radius: 16px; box-shadow: 0 4px 14px rgba(0,0,0,.2) !important; background: var(--paper); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
  .leaflet-bar a, .leaflet-touch .leaflet-bar a { width: 46px !important; height: 46px !important; line-height: 46px !important; font-size: 22px; background: none; color: var(--ink); border: 0; border-radius: 16px; }
  #calPill { display: none; top: calc(48px + var(--safe-t)); left: 8px; z-index: 900; padding: 6px 10px; border-radius: 12px; font-size: 11px; font-weight: 600; cursor: pointer; user-select: none; white-space: nowrap; font-variant-numeric: tabular-nums; align-items: center; gap: 6px; }
  #calPill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--moss); flex: none; }
  #calPill.warn { border-color: var(--ember); color: var(--ink); }
  #calPill.warn .dot { background: var(--ember); }
  #sheet { display: none; z-index: 1100; left: 8px; right: 8px; top: calc(60px + var(--safe-t)); max-height: 55vh; overflow: auto; padding: 12px 14px; max-width: 680px; }
  #ip { display: none; left: 8px; right: 8px; bottom: calc(78px + var(--safe-b)); max-width: 680px; padding: 12px 14px; }
  #ip button.x { float: right; margin-left: 6px; }
  #info { max-height: 24vh; overflow-y: auto; line-height: 1.5; } .big { font-size: 17px; color: var(--pine); }
  #info button { margin: 4px 4px 0 0; }
  #prof { width: 100%; height: 96px; display: none; margin-top: 6px; border-radius: 4px; }
  .row { display: flex; gap: 6px; align-items: center; margin: 4px 0; flex-wrap: wrap; }
  .item { display: flex; justify-content: space-between; gap: 6px; align-items: center; padding: 7px 0; border-bottom: 1px solid var(--line); }
  .lbl { background: none; border: 0; box-shadow: none; padding: 0; }
  .cr { display: inline-block; background: var(--paper); color: var(--ink); border: 1px solid var(--line); border-radius: 9px; padding: 2px 8px; font: 600 12px system-ui, -apple-system, sans-serif; box-shadow: 0 1px 4px rgba(0,0,0,.25); transform: rotate(var(--cr, 0deg)); transition: transform var(--crt, .15s linear); }
  .cr.alt-badge { cursor: pointer; background: #1e2428; color: #e2e8f0; border: 1.5px solid #94a3b8; font-weight: 700; min-width: 22px; text-align: center; padding: 2px 6px; transform: translate(-50%, -50%) rotate(var(--cr, 0deg)); }
  .cr.alt-badge.alt-snap { background: #0369a1; color: #fff; border-color: #38bdf8; box-shadow: 0 0 0 3px rgba(56,189,248,.38); }
  .cr.pt-badge { cursor: pointer; font-weight: 800; padding: 2px 7px; transform: translate(-50%, -145%) rotate(var(--cr, 0deg)); }
  .cr.pt-badge.pt-snap { background: #dc2626; color: #fff; border-color: #fecaca; box-shadow: 0 0 0 3px rgba(239,68,68,.42); }
  .lbl::before { display: none; }
  .radProtIcon { background: none !important; border: 0 !important; pointer-events: none !important; overflow: visible !important; }
  .radProtSvg { display: block; overflow: visible; pointer-events: none; }
  .radProtSvg .pLbl {
    transform-origin: 0 0;
    transform: rotate(var(--cr, 0deg));
    transition: transform var(--crt, .15s linear);
    font-family: ui-monospace, Menlo, system-ui, sans-serif;
    text-anchor: middle;
    dominant-baseline: central;
    paint-order: stroke;
    stroke: rgba(12, 16, 14, .92);
    stroke-linejoin: round;
    user-select: none;
  }
  .radProtSvg .pLbl.north { fill: #ff4d4f; font-size: 15px; font-weight: 800; stroke-width: 4.2px; }
  .radProtSvg .pLbl.cardinal { fill: #ffffff; font-size: 13.5px; font-weight: 800; stroke-width: 3.8px; }
  .radProtSvg .pLbl.degree { fill: #fef3c7; font-size: 12.5px; font-weight: 800; stroke-width: 3.6px; }
  .radProtSvg .pLbl.intercardinal { fill: #e2e8f0; font-size: 10.5px; font-weight: 800; stroke-width: 3px; opacity: .94; }
  .radProtSvg .pLbl.ringLbl { fill: #fde68a; font-size: 10.5px; font-weight: 700; stroke-width: 3.2px; }
  .radProtSvg .pLbl.spokeLbl { fill: #fff; font-size: 11px; font-weight: 800; stroke-width: 3.6px; }
  .radProtSvg .pLbl.hdgLbl { fill: #67e8f9; font-size: 12px; font-weight: 800; stroke-width: 4px; }
  #nav { display: none; align-items: center; gap: 12px; left: 8px; right: 8px; bottom: calc(78px + var(--safe-b)); max-width: 440px; padding: 10px 14px 12px; z-index: 1001; overflow: hidden; }
  #nav .big { font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; } #navB, #navE, #navN { font-size: 12.5px; color: var(--mute); line-height: 1.35; }
  #navProg { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--sand); }
  #navProg i { display: block; height: 100%; width: 0; background: var(--moss); transition: width .3s; }
  body.nav-on #ip { bottom: calc(172px + var(--safe-b)); }
  .tb.sos svg { color: #d93025; }
  .mono { font: 600 20px ui-monospace, Menlo, monospace; word-break: break-all; } .kv { margin: 6px 0; line-height: 1.5; } .kv small { color: var(--mute); display: block; }
  .warn { color: #d93025; font-weight: 600; } .okc { color: var(--pine); font-weight: 600; }
  #sight { display: none; position: fixed; inset: 0; z-index: 950; pointer-events: none; --scol: var(--ember); }
  #sight.ok { --scol: var(--moss); }
  #sight svg { width: 100%; height: 100%; display: block; }
  #calBar { display: none; z-index: 1120; left: 10px; right: 10px; bottom: calc(12px + var(--safe-b)); max-width: 420px; margin: 0 auto; padding: 14px 16px; border-radius: 22px; }
  #calBar .hd { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 6px; }
  #calBadge { display: inline-flex; align-items: center; gap: 7px; font-variant-numeric: tabular-nums; font-size: 13px; font-weight: 600; color: var(--ink); }
  #calBadge .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ember); flex: none; }
  #calBadge.ok .dot { background: var(--moss); }
  #calBadge.ok { color: var(--pine); }
  #calHint { font-size: 13px; color: var(--mute); margin: 0 0 12px; line-height: 1.4; }
  #calDialWrap { position: relative; height: 54px; margin: 2px 0 12px; border-radius: 14px; background: var(--sand); overflow: hidden; -webkit-mask-image: linear-gradient(to right, transparent, #000 14%, #000 86%, transparent); mask-image: linear-gradient(to right, transparent, #000 14%, #000 86%, transparent); }
  #calDialWrap::after { content: ''; position: absolute; left: 50%; top: 5px; bottom: 5px; width: 2px; margin-left: -1px; border-radius: 2px; background: var(--ember); pointer-events: none; z-index: 2; }
  #calDialWrap.ok::after { background: var(--moss); }
  #calWheel { position: absolute; inset: 0; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; -webkit-overflow-scrolling: touch; touch-action: pan-x; cursor: grab; user-select: none; }
  #calWheel::-webkit-scrollbar { display: none; }
  #calWheel:active { cursor: grabbing; }
  #calTrack { display: inline-block; height: 100%; padding: 0 50%; }
  #calInner { position: relative; height: 100%; }
  #calTrack i { position: absolute; bottom: 8px; width: 1px; height: 11px; background: var(--mute); opacity: .45; transform: translateX(-0.5px); }
  #calTrack i.m5 { height: 17px; opacity: .7; }
  #calTrack i.m15 { height: 22px; width: 1.5px; background: var(--ink); opacity: .85; }
  #calTrack b { position: absolute; top: 5px; font-size: 10px; font-weight: 600; color: var(--mute); transform: translateX(-50%); font-variant-numeric: tabular-nums; pointer-events: none; }
  .arrow { transition: none; will-change: transform; filter: drop-shadow(0 1px 2px rgba(0,0,0,.5)); }
  .mkp { width: 30px; height: 30px; border-radius: 50%; border: 2.5px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,.4); display: grid; place-items: center; color: #fff; transform: rotate(var(--cr, 0deg)); transition: transform var(--crt, .15s linear), box-shadow .14s; }
  .mkp.mk-snap { border-color: #fef08a; box-shadow: 0 0 0 4px rgba(154, 214, 127, .55), 0 2px 10px rgba(0,0,0,.6); transform: rotate(var(--cr, 0deg)) scale(1.12); }
  .mki { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; color: #fff; margin-right: 6px; vertical-align: -4px; flex: none; }
  .icg { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin: 8px 0; }
  .icb { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 2px; border-radius: 12px; background: var(--sand); color: var(--ink); font-size: 10px; font-weight: 500; white-space: normal; line-height: 1.1; text-align: center; }
  .icb .mki { margin: 0; } .icb.sel { outline: 2px solid var(--pine); }

  /* === OUTDOOR / SOS HANDHELD SHELL === */
  html, body { background: #141617 !important; overflow: hidden; }
  body { display: flex; flex-direction: column; height: 100dvh; max-width: 480px; margin: 0 auto; background: #181a1b; box-shadow: 0 0 40px rgba(0,0,0,.6); }
  #gTop { flex: none; display: flex; align-items: center; justify-content: space-between; padding: calc(6px + var(--safe-t)) 14px 6px; background: #181a1b; color: #e2e6e3; font: 600 12px/1 system-ui, -apple-system, sans-serif; letter-spacing: .02em; font-variant-numeric: tabular-nums; border-bottom: 1px solid #26292b; z-index: 1200; }
  #gTop .sig { display: inline-flex; align-items: flex-end; gap: 2px; height: 13px; }
  #gTop .sig i { display: block; width: 3px; border-radius: 1px; background: #3b4043; }
  #gTop .sig i.on { background: #7fb069; }
  #gTop .mid { display: inline-flex; align-items: center; gap: 8px; color: #f2f4f2; font-size: 12.5px; }
  #gTop .bat { display: inline-flex; align-items: center; gap: 5px; color: #b8c0bb; }
  #gScreen { position: relative; flex: 1; min-height: 0; margin: 6px 8px 0; border-radius: 14px; overflow: hidden; border: 2px solid #2a2e30; box-shadow: inset 0 0 0 1px rgba(0,0,0,.5); background: #ebe6d7; }
  #gScreen #map { position: absolute; inset: 0; width: 100%; height: 100%; }
  #gScreen #sight { position: absolute; inset: 0; }
  #gScreen #compass { position: absolute; top: 10px; left: 10px; width: 52px; padding: 6px 0 4px; border-radius: 14px; background: rgba(24,26,27,.88); color: #f2f4f2; border: 1.5px solid #393e41; box-shadow: 0 3px 10px rgba(0,0,0,.35); }
  #gScreen #compass #dial { width: 38px; height: 38px; color: #f2f4f2; }
  #gScreen #compass #hdgT { font-size: 10px; color: #d6dbd7; }
  #gScreen #compass #rotM { font-size: 9px; color: #9aa39d; }
  #gScreen #calPill { position: absolute; top: 10px; right: 10px; left: auto; transform: none; background: rgba(24,26,27,.9); color: #e2e6e3; border: 1px solid #393e41; font-size: 11px; padding: 5px 10px; }
  #gScreen .leaflet-top.leaflet-right, #gScreen .leaflet-mid.leaflet-right, #gScreen .leaflet-top.leaflet-left, #gScreen .leaflet-control-attribution { display: none !important; }
  #gScreen #sheet, #gScreen #sb, #gScreen #ip, #gScreen #nav, #gScreen #calBar { position: absolute !important; }
  #gScreen #sheet { left: 6px; right: 6px; top: 6px; bottom: auto; height: auto; max-height: calc(100% - 50px); overflow-y: auto; border-radius: 12px; background: rgba(24,26,27,.96); color: #ecefe9; border: 1px solid #393e41; z-index: 1150; }
  #gScreen #sheet input, #gScreen #sheet select { background: #26292b; color: #f2f4f2; border-color: #3d4245; }
  #gScreen #sheet button.gray, #gScreen #ip button.gray { background: #2c3033; color: #e2e6e3; }
  #gScreen #sheet button.red, #gScreen #ip button.red { background: #b91c1c !important; color: #ffffff !important; border: 1px solid #ef4444 !important; }
  #gScreen #sheet button.red.gFocus, #gScreen #ip button.red.gFocus { background: #dc2626 !important; outline: 2px solid #ffffff !important; }
  #gScreen #sb { left: 6px; right: 6px; top: 6px; background: rgba(24,26,27,.96); color: #f2f4f2; border: 1px solid #393e41; z-index: 1160; }
  #gScreen #sb input { background: #26292b; color: #f2f4f2; border-color: #3d4245; }
  #gScreen #ip { left: 6px; right: 6px; bottom: 44px; background: rgba(24,26,27,.92); color: #ecefe9; border: 1px solid #393e41; font-size: 12px; padding: 8px 10px; z-index: 1050; }
  #gScreen #nav { left: 6px; right: 6px; bottom: 44px; background: rgba(24,26,27,.94); color: #f2f4f2; border: 1px solid #393e41; z-index: 1060; padding: 8px 10px; }
  #gScreen #navB, #gScreen #navE, #gScreen #navN { color: #b8c0bb; }
  #gScreen #calBar { left: 6px; right: 6px; bottom: 6px; padding: 10px 12px; border-radius: 14px; background: rgba(24,26,27,.95); color: #f2f4f2; border: 1px solid #3c4245; z-index: 1140; }
  #gScreen #calBadge { color: #f2f4f2; }
  #gScreen #calHint { color: #b6beb8; font-size: 11.5px; margin-bottom: 8px; }
  #gScreen #calDialWrap { height: 42px; margin: 2px 0 8px; background: #25282a; }
  #gScreen #calTrack i.m15 { background: #f2f4f2; }
  #gScreen #calBar .actM button, #gScreen #bRst { background: #2b2f31; color: #ecefe9; border: 1px solid #3e4447; }
  #gStatus { position: absolute; left: 8px; right: 8px; bottom: 8px; z-index: 980; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 12px; border-radius: 10px; background: rgba(20,22,23,.92); color: #f2f4f2; border: 1px solid #34393b; font: 700 12.5px/1.2 system-ui, -apple-system, sans-serif; font-variant-numeric: tabular-nums; box-shadow: 0 3px 10px rgba(0,0,0,.35); pointer-events: auto; cursor: pointer; }
  #gStatus .tag { flex: none; white-space: nowrap; color: #8ec974; letter-spacing: .04em; text-transform: uppercase; font-size: 11px; }
  #gStatTxt { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  #gStatus.rec .tag { color: #ff6b57; }
  #gMenu { display: none; position: absolute; inset: 0; z-index: 1130; background: rgba(18,20,21,.96); color: #ecefe9; flex-direction: column; }
  #gMenu.on { display: flex; }
  #gMenuHd { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; border-bottom: 1px solid #2d3234; font: 700 13px/1 system-ui; letter-spacing: .06em; text-transform: uppercase; color: #9ea8a1; }
  #gMenuList { flex: 0 1 auto; min-height: 0; overflow-y: auto; padding: 8px; display: flex; flex-direction: column; gap: 5px; }
  .gItem { display: flex; align-items: center; justify-content: space-between; padding: 11px 12px; border-radius: 10px; background: #222628; border: 1.5px solid transparent; color: #e6eae7; font: 600 14px/1.2 system-ui; cursor: pointer; user-select: none; }
  .gItem small { font-size: 11.5px; font-weight: 500; color: #96a09a; }
  .gItem.sel { background: #2b3a2e; border-color: #7fb069; color: #fff; box-shadow: 0 0 0 1px rgba(127,176,105,.35); }
  .gItem.sel small { color: #cfe6c4; }
  #gMenuFt { padding: 7px 14px; border-top: 1px solid #2d3234; font: 500 11px/1 system-ui; color: #848f88; display: flex; justify-content: space-between; }

  /* Tactile Molded Outdoor Control Deck */
  #gDeck {
    position: relative; flex: none;
    padding: 16px 18px calc(18px + var(--safe-b));
    background-color: #1f2122;
    background-image:
      radial-gradient(rgba(255,255,255,.035) 1px, transparent 0),
      radial-gradient(rgba(0,0,0,.35) 1px, transparent 0),
      linear-gradient(180deg, #272a2c 0%, #1b1d1e 55%, #161819 100%);
    background-size: 6px 6px, 6px 6px, 100% 100%;
    background-position: 0 0, 3px 3px, 0 0;
    border-top: 1px solid #313538;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.06);
    display: grid; grid-template-columns: 82px 1fr 82px; align-items: center; gap: 10px;
    user-select: none; -webkit-user-select: none; touch-action: manipulation;
  }
  @media (max-width: 374px) {
    #gTop { padding-left: 10px; padding-right: 10px; gap: 6px; font-size: 11.5px; }
    #gTop .mid { gap: 6px; font-size: 12px; }
    #gDeck { padding-left: 10px; padding-right: 10px; gap: 6px; grid-template-columns: 76px 1fr 78px; }
  }
  /* Side grip ribs */
  #gDeck::before, #gDeck::after {
    content: ''; position: absolute; top: 10px; bottom: 14px; width: 6px; pointer-events: none; opacity: .45;
    background: repeating-linear-gradient(-35deg, #0d0e0f 0 2px, transparent 2px 6px);
  }
  #gDeck::before { left: 4px; } #gDeck::after { right: 4px; background: repeating-linear-gradient(35deg, #0d0e0f 0 2px, transparent 2px 6px); }

  /* Left side MENU / NAZAD — exact 150px outer height match with right pod */
  .gSide { display: flex; flex-direction: column; justify-content: space-between; gap: 8px; height: 150px; align-items: stretch; }
  .gNotch { flex: none; height: 4px; margin: 0 8px; border-radius: 99px; background: #101213; box-shadow: inset 0 1px 2px rgba(0,0,0,.9), 0 1px 0 rgba(255,255,255,.07); }
  .gWell { flex: 1; display: flex; padding: 3px; border-radius: 13px; background: #0f1112; box-shadow: inset 0 2px 5px rgba(0,0,0,.88), 0 1px 0 rgba(255,255,255,.06); }
  .gBtn {
    position: relative; overflow: hidden;
    width: 100%; height: 100%; appearance: none;
    border: 1px solid #3c4145; border-top-color: #4c5257; border-bottom-color: #121415;
    background: linear-gradient(180deg, #33373b 0%, #232629 56%, #1c1f21 100%);
    color: #e6ebe8; border-radius: 10px; padding: 0 4px;
    font: 700 11.5px/1 system-ui, -apple-system, sans-serif; letter-spacing: .08em; text-transform: uppercase;
    box-shadow: 0 3px 5px rgba(0,0,0,.55), inset 0 1px 0 rgba(255,255,255,.12);
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    transition: transform .07s, box-shadow .12s, border-color .14s;
  }
  .gBtn:active { transform: translateY(1.5px); background: linear-gradient(180deg, #1f2224, #282c2f); box-shadow: 0 1px 2px rgba(0,0,0,.7), inset 0 2px 4px rgba(0,0,0,.5); }
  .gMenuBtn { flex-direction: column; gap: 0; padding: 6px 4px 5px; }
  .gMenuBtn .gBtnLbl { display: block; line-height: 1; margin-top: 1px; }
  .gMenuBtn .gBtnDiv {
    width: 48px; height: 1px; margin: 5px 0 4px; flex: none;
    background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,.16) 50%, transparent 100%);
  }
  .gMenuBtn .gSubRot {
    display: inline-flex; align-items: center; justify-content: center; gap: 3.5px;
    font: 700 8.5px/1 ui-monospace, Menlo, system-ui, monospace; letter-spacing: .07em;
    color: #f39a90; transition: color .15s;
  }
  .gMenuBtn .gSubRot svg { width: 11px; height: 11px; flex: none; display: block; filter: drop-shadow(0 1px 1px rgba(0,0,0,.55)); }
  .gMenuBtn .gSubRot .icoH { display: none; }
  .gMenuBtn.rot .gSubRot { color: #9ad67f; }
  .gMenuBtn.rot .gSubRot .icoN { display: none; }
  .gMenuBtn.rot .gSubRot .icoH { display: block; }
  .gMenuBtn::after {
    content: ''; position: absolute; left: 6px; right: 6px; bottom: 2px; height: 2px; border-radius: 2px;
    background: #ff695c; transform: scaleX(0); transform-origin: left center; opacity: 0; pointer-events: none;
  }
  .gMenuBtn.rot::after { background: #8ec974; }
  .gMenuBtn.hold { border-color: #7e888d; box-shadow: 0 2px 6px rgba(0,0,0,.65), inset 0 1px 0 rgba(255,255,255,.16); }
  .gMenuBtn.hold::after { opacity: .95; transform: scaleX(1); transition: transform .5s linear, opacity .06s; }
  .gMenuBtn.flash { border-color: #d6dfda; box-shadow: 0 0 10px rgba(214,223,218,.4), inset 0 1px 0 rgba(255,255,255,.24); }
  .gBackIco { width: 24px; height: 24px; display: block; fill: none; stroke: currentColor; stroke-width: 2.25; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 1px 1px rgba(0,0,0,.5)); }
  .gBackBtn .gBackIco { width: 17px; height: 17px; margin-top: 1px; }
  .gBackBtn .gSubOled {
    display: inline-flex; align-items: center; justify-content: center; gap: 3px;
    font: 700 8.5px/1 ui-monospace, Menlo, system-ui, monospace; letter-spacing: .07em;
    color: #93c5fd; transition: color .15s;
  }
  .gBackBtn .gSubOled svg { width: 10px; height: 10px; flex: none; display: block; }
  .gBackBtn::after { background: #60a5fa; }

  /* Sculpted Continuous Cross D-Pad */
  .gPad {
    position: relative; width: 158px; height: 158px; margin: 0 auto;
    display: grid; grid-template-columns: 50px 58px 50px; grid-template-rows: 50px 58px 50px;
    align-items: center; justify-items: center;
  }
  /* Recessed cross well */
  .gPad::before, .gPad::after {
    content: ''; position: absolute; background: #0e1011; pointer-events: none;
    box-shadow: inset 0 3px 7px rgba(0,0,0,.9), 0 1px 0 rgba(255,255,255,.06);
  }
  .gPad::before { top: 0; bottom: 0; left: 46px; right: 46px; border-radius: 18px; }
  .gPad::after { left: 0; right: 0; top: 46px; bottom: 46px; border-radius: 18px; }

  .gDir {
    position: relative; z-index: 2; width: 100%; height: 100%;
    border: 1px solid #3c4145; background: linear-gradient(180deg, #33373a 0%, #232628 65%, #1d2022 100%);
    color: #d6dcd8; display: grid; place-items: center; padding: 0;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.11), 0 2px 4px rgba(0,0,0,.45);
    cursor: pointer; transition: transform .07s, background .07s;
  }
  .gDir svg { width: 20px; height: 20px; stroke: currentColor; stroke-width: 2.3; fill: none; stroke-linecap: round; stroke-linejoin: round; }
  .gDir:active { background: #1a1d1f; transform: scale(.96); box-shadow: inset 0 2px 5px rgba(0,0,0,.6); }
  .gDir.u { grid-column: 2; grid-row: 1; width: 58px; height: 50px; border-radius: 14px 14px 3px 3px; border-bottom: 0; padding-bottom: 4px; }
  .gDir.d { grid-column: 2; grid-row: 3; width: 58px; height: 50px; border-radius: 3px 3px 14px 14px; border-top: 0; padding-top: 4px; }
  .gDir.l { grid-column: 1; grid-row: 2; width: 50px; height: 58px; border-radius: 14px 3px 3px 14px; border-right: 0; padding-right: 4px; }
  .gDir.r { grid-column: 3; grid-row: 2; width: 50px; height: 58px; border-radius: 3px 14px 14px 3px; border-left: 0; padding-left: 4px; }
  .gPadCore {
    position: relative; z-index: 2; grid-column: 2; grid-row: 2; width: 58px; height: 58px;
    background: #232628; display: grid; place-items: center;
  }
  .gOk {
    position: relative; z-index: 3; width: 48px; height: 48px; border-radius: 50%;
    border: 1.5px solid #484e52; border-bottom-color: #111314;
    background:
      radial-gradient(rgba(255,255,255,.07) 1px, transparent 0),
      radial-gradient(circle at 38% 30%, #3a3f43 0%, #222527 72%, #191c1e 100%);
    background-size: 4px 4px, 100% 100%;
    color: #f4f7f5; font: 700 13px/1 system-ui; letter-spacing: .05em;
    box-shadow: 0 0 0 4px #121415, 0 3px 7px rgba(0,0,0,.6), inset 0 1px 1px rgba(255,255,255,.16);
    cursor: pointer; display: grid; place-items: center; transition: transform .07s, border-color .1s;
  }
  .gOk:active { transform: scale(.93); border-color: #7fb069; background-color: #243326; }
  .gOk.hold { border-color: #9ad67f; box-shadow: 0 0 0 4px #121415, 0 0 12px rgba(154,214,127,.45), inset 0 1px 1px rgba(255,255,255,.2); }
  .gOk.flash { border-color: #e6f4df; background-color: #2d4632; box-shadow: 0 0 0 4px #121415, 0 0 16px rgba(154,214,127,.75); }

  /* Right molded dual pod: Zoom Rocker + Chamfered Knurled SOS */
  .gRightPod {
    display: grid; grid-template-columns: 36px 34px; gap: 5px; height: 142px;
    padding: 4px; border-radius: 16px; background: #0f1112;
    box-shadow: inset 0 3px 7px rgba(0,0,0,.9), 0 1px 0 rgba(255,255,255,.06);
  }
  .gZoom {
    display: flex; flex-direction: column; border-radius: 12px; overflow: hidden;
    border: 1px solid #3c4145; border-top-color: #4a5055; border-bottom-color: #121415;
    background: linear-gradient(180deg, #323639 0%, #222527 50%, #1c1f21 100%);
    box-shadow: 0 3px 5px rgba(0,0,0,.55), inset 0 1px 0 rgba(255,255,255,.1);
  }
  .gZoom button {
    flex: 1; border: 0; background: transparent; color: #e2e7e3;
    font: 500 22px/1 system-ui; cursor: pointer; display: grid; place-items: center;
  }
  .gZoom .zDiv { height: 2px; margin: 0 6px; background: #141617; box-shadow: 0 1px 0 rgba(255,255,255,.08); }
  .gZoom button:active { background: rgba(0,0,0,.35); }

  .gSos {
    border-radius: 8px 12px 12px 8px;
    border: 1px solid #ff945e; border-bottom: 2px solid #7d2506;
    background:
      radial-gradient(rgba(0,0,0,.22) 1px, transparent 0),
      linear-gradient(180deg, #f0622b 0%, #d44714 60%, #b5360a 100%);
    background-size: 4px 4px, 100% 100%;
    color: #141617; font: 800 13px/1 system-ui; letter-spacing: .12em;
    writing-mode: vertical-rl; text-orientation: mixed; transform: rotate(180deg);
    display: grid; place-items: center;
    clip-path: polygon(0 6%, 100% 0, 100% 100%, 0 94%);
    box-shadow: 0 3px 8px rgba(235,94,40,.35), inset 0 1px 0 rgba(255,255,255,.28);
    cursor: pointer; transition: transform .07s, filter .07s;
  }
  .gSos:active { filter: brightness(.86); transform: rotate(180deg) scale(.96); }

  /* Pure Display Screen (No Touch on Map/Buttons — Controlled 100% by Bottom Deck) */
  #gScreen, #gScreen * { pointer-events: none !important; }
  #gScreen input, #gScreen select, #gScreen textarea { pointer-events: auto !important; }
  #gScreen #calBar .actM, #gScreen #calBar .act { display: none !important; }
  #gScreen #sheet > .row:first-child, #gScreen #ip button.x, #gScreen #nav button.x, #gScreen #sb button.x { display: none !important; }
  #gCalKeys { display: flex; justify-content: space-between; font: 600 11px/1 system-ui; color: #9aa69e; margin-top: 4px; letter-spacing: .02em; }
  /* Precision Center Crosshair (full when aiming/snapped, sleek mini when browsing) */
  #gCross { display: none; position: absolute; left: 50%; top: 50%; width: 44px; height: 44px; margin: -22px 0 0 -22px; z-index: 960; pointer-events: none; transition: width .12s, height .12s, margin .12s, opacity .12s; }
  #gCross.on { display: block; }
  #gCross.mini { width: 28px; height: 28px; margin: -14px 0 0 -14px; opacity: .94; }
  #gCross svg { width: 100%; height: 100%; display: block; filter: drop-shadow(0 0 2px rgba(0,0,0,.85)); }
  #gCross.aim { --cc: #f0622b; }
  #gCross:not(.aim) { --cc: #ffffff; }
  /* Arrow-focused highlight inside #sheet and #sr */
  .gFocus { outline: 2.5px solid #7fb069 !important; outline-offset: 2px; box-shadow: 0 0 0 4px rgba(127,176,105,.28) !important; background-color: #2b3a2e !important; color: #fff !important; }

  /* SOS hold-to-activate feedback & outdoor display modes */
  .gSos { position: relative; overflow: hidden; }
  .gSos::after {
    content: ''; position: absolute; inset: 0; pointer-events: none;
    background: linear-gradient(180deg, rgba(255,255,255,.42) 0%, rgba(255,255,255,.22) 100%);
    transform: scaleY(0); transform-origin: center top; opacity: 0;
  }
  .gSos.hold { box-shadow: 0 0 18px rgba(255,95,40,.9), inset 0 0 0 2px #fff; filter: brightness(1.12); }
  .gSos.hold::after { opacity: 1; transform: scaleY(1); transition: transform 1s linear, opacity .06s; }
  body.g-sun #map { filter: contrast(1.18) saturate(1.15); }
  body.g-night #map { filter: invert(1) hue-rotate(180deg) brightness(.72) contrast(1.15); }

