  /* === AVIONICS COCKPIT SIDE-WINDOWS (SHARP EDGES, NO BLUE) === */
  @keyframes gSlideIn { from { opacity: 0; } to { opacity: 1; } }

  #gMenu {
    left: auto !important; right: 0 !important; top: 8px !important; bottom: auto !important;
    height: auto !important; max-height: calc(100% - 52px) !important;
    width: min(76%, 272px) !important; max-width: 272px !important;
    border-radius: 0 !important;
    background: rgba(16, 18, 19, .95) !important;
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    border: 1px solid #3c4245 !important; border-right: 0 !important;
    border-left: 2px solid #8a9499 !important;
    box-shadow: -8px 4px 24px rgba(0,0,0,.6) !important;
    animation: gSlideIn .14s ease-out;
  }
  #gMenuHd {
    gap: 6px;
    padding: 8px 10px !important; background: rgba(255, 255, 255, .05);
    border-bottom: 1px solid #32373a !important;
    color: #d4dad7 !important; font: 700 11px/1.15 ui-monospace, Menlo, monospace !important;
    letter-spacing: .08em !important;
  }
  #gMenuTitle { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  #gMenuHd > div { flex: none; gap: 5px !important; white-space: nowrap; }
  #gMenuList { padding: 6px !important; gap: 4px !important; }
  .gItem {
    flex-direction: column; align-items: flex-start !important; gap: 2px;
    padding: 8px 10px !important; border-radius: 0 !important;
    background: rgba(255,255,255,.04) !important;
    border: 1px solid rgba(255,255,255,.07) !important;
    font: 600 12.5px/1.2 system-ui !important;
  }
  .gItem small { font: 500 10.5px/1.1 ui-monospace, Menlo, monospace !important; color: #929c96 !important; }
  .gItem.sel {
    background: rgba(255, 255, 255, .14) !important;
    border-color: #d4dad7 !important; color: #fff !important;
    box-shadow: inset 3px 0 0 #e6eae7 !important;
  }
  .gItem.sel small { color: #d8dfdb !important; }
  #gMenuFt {
    padding: 6px 10px !important; font: 600 10px/1.1 ui-monospace, Menlo, monospace !important;
    color: #828c87 !important; border-top: 1px solid #2d3235 !important;
  }
  #gMenuFt span:first-child { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

  #gScreen #sheet {
    left: auto !important; right: 0 !important; top: 8px !important; bottom: auto !important;
    height: auto !important; max-height: calc(100% - 16px) !important; overflow-y: auto !important;
    width: 76% !important; max-width: 310px !important;
    border-radius: 0 !important; padding: 10px 11px 12px !important;
    background: rgba(16, 18, 19, .96) !important; color: #e8ece9 !important;
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    border: 1px solid #3c4245 !important; border-right: 0 !important;
    border-left: 2px solid #8a9499 !important;
    box-shadow: -8px 4px 24px rgba(0,0,0,.6) !important;
    font-size: 12.5px !important;
    animation: gSlideIn .14s ease-out;
  }
  #gScreen #sheet b { color: #f5f7f6; }
  #gScreen #sheet .item { border-color: #2c3134 !important; padding: 7px 0 !important; }
  #gScreen #sheet small { color: #96a09b !important; }
  #gScreen #sheet button { border-radius: 2px !important; }

  #gScreen #ip {
    left: auto !important; right: 0 !important; top: 42px !important; bottom: auto !important;
    width: 68% !important; max-width: 270px !important; max-height: 70% !important; overflow-y: auto;
    border-radius: 0 !important; padding: 8px 10px 9px !important;
    background: rgba(16, 18, 19, .94) !important; color: #e8ece9 !important;
    backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
    border: 1px solid #3c4245 !important; border-right: 0 !important;
    border-left: 2px solid #b5bec2 !important;
    box-shadow: -6px 4px 18px rgba(0,0,0,.55) !important;
    font: 500 11.5px/1.38 ui-monospace, Menlo, system-ui, monospace !important;
    animation: gSlideIn .14s ease-out;
  }
  #gScreen #ip #info { max-height: none !important; overflow-y: visible !important; }
  #gScreen #ip::before {
    content: 'PORUKA · INFO'; display: block; margin-bottom: 5px; padding-bottom: 4px;
    border-bottom: 1px solid #2f3437; color: #b8c2bd;
    font: 700 9.5px/1 ui-monospace, Menlo, monospace; letter-spacing: .12em;
  }
  #gScreen #ip button { margin-top: 6px; padding: 6px 8px; font-size: 11px; border-radius: 2px !important; }
  #gScreen #ip .big { color: #9ad67f; font-weight: 700; }
  .mkCardAct { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; margin-top: 8px; }
  .mkCardAct button {
    margin: 0 !important; padding: 7px 5px !important; width: 100%;
    font: 700 11px/1.15 system-ui !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
  .mkCardAct button.mkRoute { background: #26402e !important; border: 1px solid #7fb069 !important; color: #eef7ea !important; }
  .mkCardAct button.mkDir { background: #23313d !important; border: 1px solid #557a99 !important; color: #e2effa !important; }
  .mkCardAct button.gFocus { background: #e8ece9 !important; color: #111314 !important; border-color: #fff !important; }

  #gScreen #sb {
    left: auto !important; right: 0 !important; top: 8px !important;
    width: 78% !important; max-width: 304px !important;
    border-radius: 0 !important;
    background: rgba(16, 18, 19, .96) !important;
    border: 1px solid #3c4245 !important; border-right: 0 !important;
    border-left: 2px solid #8a9499 !important;
    box-shadow: -8px 4px 20px rgba(0,0,0,.6) !important;
    animation: gSlideIn .14s ease-out;
  }
  #gScreen #sb input { border-radius: 0 !important; }

  #gScreen #nav {
    left: 6px !important; right: 6px !important; top: 6px !important; bottom: auto !important;
    width: auto !important; max-width: none !important;
    flex-direction: column !important; align-items: stretch !important; gap: 4px !important;
    border-radius: 6px !important;
    background: rgba(13, 16, 17, .96) !important;
    border: 1px solid #3c4347 !important;
    border-top: 2px solid #7fb069 !important;
    box-shadow: 0 6px 20px rgba(0,0,0,.62) !important;
    padding: 6px 8px 7px !important;
    animation: gSlideIn .14s ease-out;
  }
  #gScreen #nav.off-trail {
    border-color: #ef4444 !important; border-top-color: #ff6b57 !important;
  }
  #gScreen #nav.rerouting {
    border-color: #38bdf8 !important; border-top-color: #38bdf8 !important;
  }
  #gScreen #nav .navBody {
    display: flex; align-items: stretch; gap: 8px; min-width: 0;
  }
  #gScreen #nav .navMain {
    flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: space-between; gap: 4px;
  }
  #gScreen #nav .navTop { display: flex; align-items: center; gap: 6px; min-width: 0; }
  #gScreen #navA { width: 46px !important; height: 46px !important; align-self: center; flex: none; }
  #gScreen #navA.hide { display: none !important; }
  #gScreen #nav .navTurn {
    width: 78px; align-self: stretch; flex: none; border-radius: 7px;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    padding: 4px 3px;
    background: rgba(154, 214, 127, .14); border: 1.5px solid rgba(154, 214, 127, .48);
    color: #9ad67f; transition: background .18s, border-color .18s, color .18s;
  }
  body:not(.g-touch) #gScreen #nav .navTurn { width: 74px; }
  #gScreen #nav .navTurn.hide { display: none !important; }
  #gScreen #nav .navTurn.turn-approach {
    background: rgba(251, 191, 36, .20); border-color: #fbbf24; color: #fde68a;
  }
  #gScreen #nav .navTurn.turn-imminent {
    background: rgba(249, 115, 22, .34); border-color: #fb923c; color: #ffffff;
  }
  #gScreen #nav .navTurn.turn-finish {
    background: rgba(134, 239, 172, .16); border-color: #86efac; color: #bbf7d0;
  }
  #gScreen #nav .navTurn .ntIco {
    width: 46px; height: 46px; display: flex; align-items: center; justify-content: center; flex: none;
  }
  #gScreen #nav .navTurn .ntIco svg { width: 46px; height: 46px; display: block; }
  #gScreen #nav .navTurn .ntDist {
    font: 900 17px/1.02 ui-monospace, Menlo, monospace; font-variant-numeric: tabular-nums;
    color: #ffffff; letter-spacing: -.02em; white-space: nowrap;
  }
  #gScreen #nav .navPri {
    flex: 1; min-width: 0; display: flex; align-items: baseline; justify-content: space-between; gap: 6px;
  }
  #gScreen #nav .navDistBox { min-width: 0; }
  #gScreen #nav .big {
    font: 800 18.5px/1.05 ui-monospace, Menlo, system-ui, monospace !important;
    color: #ffffff !important; letter-spacing: -.01em; font-variant-numeric: tabular-nums;
    white-space: nowrap;
  }
  #gScreen #nav .navLbl {
    font: 700 8.5px/1.1 ui-monospace, Menlo, monospace; letter-spacing: .07em;
    color: #8f9a94; text-transform: uppercase; margin-top: 2px; white-space: nowrap;
  }
  #gScreen #nav .navEtaBox { text-align: right; min-width: 0; flex-shrink: 0; }
  #gScreen #nav .etaVal {
    font: 800 15px/1.08 ui-monospace, Menlo, system-ui, monospace !important;
    color: #9ad67f !important; font-variant-numeric: tabular-nums; white-space: nowrap;
  }
  #gScreen #nav .etaSub {
    font: 700 10.5px/1.15 ui-monospace, Menlo, monospace !important;
    color: #dce4df !important; margin-top: 2px; white-space: nowrap;
  }
  #gScreen #nav .etaSub .warn { color: #fbbf24; font-weight: 800; }
  #gScreen #nav .navMid {
    display: flex; align-items: center; justify-content: space-between; gap: 5px;
    padding-top: 3px; border-top: 1px solid rgba(255,255,255,.10);
    min-width: 0;
  }
  #gScreen #nav .navSlope {
    display: inline-flex; align-items: center; gap: 2px; flex: none;
    padding: 1.5px 5px; border-radius: 3px;
    font: 800 11px/1.15 ui-monospace, Menlo, monospace; font-variant-numeric: tabular-nums;
    background: rgba(154,214,127,.14); color: #b7eab0; border: 1px solid rgba(154,214,127,.35);
    white-space: nowrap;
  }
  #gScreen #nav .navSlope.hide { display: none; }
  #gScreen #nav .navSlope.slope-up { background: rgba(245,158,11,.18); color: #fde68a; border-color: rgba(245,158,11,.48); }
  #gScreen #nav .navSlope.slope-steep-up { background: rgba(239,68,68,.22); color: #fca5a5; border-color: rgba(248,113,113,.55); }
  #gScreen #nav .navSlope.slope-down { background: rgba(56,189,248,.16); color: #7dd3fc; border-color: rgba(56,189,248,.45); }
  #gScreen #nav .navSlope.slope-steep-down { background: rgba(168,85,247,.22); color: #e9d5ff; border-color: rgba(192,132,252,.55); }
  #gScreen #nav .navElev {
    flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    font: 600 10.5px/1.15 ui-monospace, Menlo, monospace !important;
    color: #9ea8a2 !important; font-variant-numeric: tabular-nums;
  }
  #gScreen #nav .navElev .curAlt { color: #eef3f0; font-weight: 800; }
  #gScreen #nav .navPct {
    flex: none; font: 700 10.5px/1.15 ui-monospace, Menlo, monospace;
    color: #cbd5d0; font-variant-numeric: tabular-nums;
  }
  #gScreen #nav .navMute {
    flex: none; height: 22px; min-width: 24px; padding: 0 4px; border-radius: 4px;
    border: 1px solid rgba(154,214,127,.38); background: rgba(154,214,127,.10); color: #b7eab0;
    cursor: pointer; touch-action: manipulation;
    display: inline-flex; align-items: center; justify-content: center;
  }
  #gScreen #nav .navMute svg { width: 14px; height: 14px; display: block; }
  #gScreen #nav .navMute.hide { display: none !important; }
  #gScreen #nav .navMute.muted { color: #8c9690; background: rgba(255,255,255,.04); border-color: #3f464a; }
  #gScreen #nav .navMute.oledBtn { border-color: rgba(147,197,253,.38); background: rgba(96,165,250,.11); color: #93c5fd; }
  body:not(.g-touch) #gScreen #nav .navMute.oledBtn { display: none !important; }
  #gScreen #nav .navMute:active { transform: scale(.94); }
  #gScreen #nav .navFoot {
    font: 700 11.5px/1.2 system-ui, -apple-system, sans-serif !important;
    color: #cbd5d0 !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
  #gScreen #nav.off-trail .navFoot {
    background: rgba(220, 38, 38, .26); color: #fecaca !important;
    padding: 2px 6px; border-radius: 3px; font-weight: 800 !important;
    border-left: 3px solid #ff6b57;
  }
  #gScreen #nav.rerouting .navFoot {
    background: rgba(56, 189, 248, .20); color: #bae6fd !important;
    padding: 2px 6px; border-radius: 3px; font-weight: 800 !important;
    border-left: 3px solid #38bdf8;
  }
  #gScreen #nav .navLanes {
    display: flex; align-items: center; justify-content: center;
    padding: 3px 4px; margin-top: 1px; border-radius: 5px;
    background: rgba(6, 9, 11, .76); border: 1px solid rgba(255,255,255,.12);
  }
  #gScreen #nav .navLanes.hide { display: none !important; }
  #gScreen #nav .laneCell {
    flex: 0 1 38px; min-width: 24px; height: 28px;
    display: flex; align-items: center; justify-content: center;
    border-right: 1px dashed rgba(255,255,255,.20);
    color: #9ca8a2; position: relative;
  }
  #gScreen #nav .laneCell:last-child { border-right: 0; }
  #gScreen #nav .laneCell.active {
    color: #ffffff;
    background: rgba(154, 214, 127, .22);
    box-shadow: inset 0 -2px 0 #9ad67f;
    border-radius: 3px;
  }
  #gScreen #nav .navLanes.lane-imminent .laneCell.active {
    background: rgba(249, 115, 22, .30);
    box-shadow: inset 0 -2px 0 #fb923c;
  }
  #gScreen #nav .laneCell.valid:not(.active) {
    color: #d7e2dc;
    background: rgba(154, 214, 127, .09);
    border-radius: 3px;
  }
  #gScreen #nav .laneCell svg { width: 24px; height: 24px; display: block; }
  #gScreen #nav #navProg { height: 4px; background: rgba(255,255,255,.10); }
  #gScreen #nav #navProg i { background: #7fb069; }
  body.nav-on #gScreen #calPill { display: none !important; }
  body.nav-on #gScreen #gScaleBar { top: 140px !important; }
  body.nav-car #gScreen #gScaleBar { display: none !important; }
  body.nav-on #gScreen #ip:not(.route-dock) { top: 144px !important; bottom: auto !important; max-height: 44% !important; }

  /* Side travel settlement / village / region entry sign (auto-closes after 10s) */
  #gPlaceSign {
    position: absolute; left: 0; top: 50px; z-index: 985;
    max-width: min(232px, calc(100% - 62px)); min-width: 148px;
    background: rgba(16, 20, 22, .94); color: #eef3f0;
    border: 1px solid rgba(255, 255, 255, .15); border-left: 4px solid #f5b942;
    border-radius: 0 10px 10px 0; padding: 7px 10px 9px 10px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, .48);
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    transform: translateX(-115%); opacity: 0; visibility: hidden; pointer-events: none;
    transition: transform .28s cubic-bezier(.2, .8, .2, 1), opacity .22s ease, visibility 0s linear .28s;
    cursor: pointer; overflow: hidden; user-select: none;
  }
  #gPlaceSign.on { transform: translateX(0); opacity: 1; visibility: visible; pointer-events: auto; transition: transform .28s cubic-bezier(.2, .8, .2, 1), opacity .22s ease, visibility 0s linear 0s; }
  #gPlaceSign.k-selo { border-left-color: #6ee7b7; }
  #gPlaceSign.k-grad, #gPlaceSign.k-regija { border-left-color: #93c5fd; }
  body.nav-on #gScreen #gPlaceSign { top: 178px; }
  body.nav-car #gScreen #gPlaceSign { top: 140px; }
  #gPlaceSign .psHd {
    display: flex; align-items: center; justify-content: space-between; gap: 8px;
    font: 700 8.5px/1 ui-monospace, Menlo, monospace; letter-spacing: .07em;
    color: #f5b942; text-transform: uppercase; margin-bottom: 3px;
  }
  #gPlaceSign.k-selo .psHd { color: #6ee7b7; }
  #gPlaceSign.k-grad .psHd, #gPlaceSign.k-regija .psHd { color: #93c5fd; }
  #gPlaceSign .psX {
    color: #8f9b95; font: 700 11px/1 system-ui, sans-serif; padding: 0 2px;
  }
  #gPlaceSign .psMain {
    font: 800 13.5px/1.2 system-ui, -apple-system, sans-serif; color: #fff;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
  #gPlaceSign .psSub {
    font: 500 10px/1.25 system-ui, -apple-system, sans-serif; color: #b5c2bc;
    margin-top: 2px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden;
  }
  #gPlaceSign .psBar {
    position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
    background: rgba(255, 255, 255, .10); overflow: hidden;
  }
  #gPlaceSign .psBar i {
    display: block; height: 100%; width: 100%; background: #f5b942;
    transform-origin: left center; transform: scaleX(1);
  }
  #gPlaceSign.k-selo .psBar i { background: #6ee7b7; }
  #gPlaceSign.k-grad .psBar i, #gPlaceSign.k-regija .psBar i { background: #93c5fd; }
  #gPlaceSign.run .psBar i {
    transition: transform 10s linear; transform: scaleX(0);
  }
  .gFocus { outline: 2px solid #e6eae7 !important; outline-offset: 1px; box-shadow: none !important; background-color: #363c3f !important; color: #fff !important; }

  /* Built-in Hardware D-Pad Keyboard inside #sb (8 columns incl. Đ, Q, W, X, Y, -) */
  #gScreen #sb { bottom: 44px !important; display: none; flex-direction: column; padding: 7px 8px !important; max-height: none !important; overflow: hidden !important; }
  #gScreen #sb.g-open { display: flex !important; }
  #gScreen #sb input { pointer-events: none !important; font: 700 12.5px/1.2 ui-monospace, Menlo, monospace !important; letter-spacing: .03em; padding: 6px 8px !important; }
  #gScreen #sb.kbd-active input { border-color: #9ad67f !important; box-shadow: inset 0 0 0 1px rgba(154,214,127,.35); }
  #gKbd { display: grid; grid-template-columns: repeat(8, 1fr); gap: 3px; margin: 5px 0 4px; }
  #gKbd.folded { display: none !important; }
  #gKbd i {
    font-style: normal; display: grid; place-items: center; height: 23px;
    background: #232729; color: #dce2de; border: 1px solid #383e42;
    font: 700 10.5px/1 ui-monospace, Menlo, monospace; user-select: none; cursor: pointer;
  }
  #gKbd i.act { font-size: 8.5px; color: #b8c2bd; background: #1d2022; }
  #gKbd i.kSel { background: #e8ece9 !important; color: #111314 !important; border-color: #fff !important; }
  #gSbHint {
    display: flex; justify-content: space-between; align-items: center; gap: 4px;
    padding: 3px 2px; font: 600 9.5px/1.15 ui-monospace, Menlo, monospace; color: #8c9691;
    letter-spacing: .01em; flex: none;
  }
  #gScreen #sr { flex: 1; min-height: 0; overflow-y: auto; border-top: 1px solid #2e3336; margin-top: 2px; padding-top: 4px; max-height: none !important; }
  #gScreen #sr > div { padding: 6px 6px !important; font-size: 11.5px !important; border-bottom: 1px solid #23282b !important; }

  /* Horizontal left/right marker symbol strip */
  #gScreen #sheet .icg { display: flex !important; flex-wrap: nowrap !important; overflow-x: auto; gap: 4px; padding: 3px 2px; scrollbar-width: none; }
  #gScreen #sheet .icg::-webkit-scrollbar { display: none; }
  #gScreen #sheet .icb { flex: 0 0 60px; border-radius: 0 !important; background: #222628 !important; color: #c8d0cb !important; border: 1px solid #353b3e !important; padding: 5px 3px !important; font-size: 10.5px !important; line-height: 1.15 !important; }
  #gScreen #sheet .icb.sel { outline: 2px solid #e8ece9 !important; background: #343b3e !important; color: #fff !important; border-color: #e8ece9 !important; }
  #gScreen #sheet .mkFormAct {
    position: sticky; bottom: -9px; z-index: 5;
    background: rgba(16, 18, 19, .98);
    padding: 6px 0 4px; margin: 4px 0 0 !important;
    border-top: 1px solid #2b3033;
  }
  #gScreen #sheet .mkFormAct button { flex: 1; padding: 8px 6px !important; }

  /* Mobile touch & viewport hardening */
  body { height: 100vh; height: 100dvh; }
  #gDeck { z-index: 2000 !important; touch-action: manipulation; }
  #gDeck button { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
  #gDeck svg { pointer-events: none; }

  /* Crisp search results selection & dimmed keypad when picking a place */
  #gKbd.dim { opacity: .45; }
  #gScreen #sr .item { display: flex; justify-content: space-between; align-items: center; gap: 6px; padding: 7px 7px !important; border-left: 3px solid transparent; }
  #gScreen #sr .item.gFocus { background: #e8ece9 !important; color: #111314 !important; border-left-color: #7fb069 !important; outline: none !important; }
  #gScreen #sr .item.gFocus b, #gScreen #sr .item.gFocus small, #gScreen #sr .item.gFocus span { color: #111314 !important; }

  #gCross.snap { --cc: #7fb069; }

  /* Clean unobstructed map + crisp marker list & 8-col marker/rename keypad */
  #gTop .gpsR { display: inline-flex; align-items: center; gap: 5px; color: #b8c2bd; font: 600 10.5px/1 ui-monospace, Menlo, monospace; }
  #gTop .clkL { color: #9ea8a2; font: 600 11.5px/1 ui-monospace, Menlo, monospace; }
  .mkRow { padding: 8px 0; border-bottom: 1px solid #2b3033; display: flex; flex-direction: column; gap: 6px; }
  .mkRow .mkTop { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
  .mkRow .mkName { font: 700 13px/1.2 system-ui; color: #f2f5f3; display: inline-flex; align-items: center; gap: 6px; }
  .mkRow .mkMeta { font: 500 10.5px/1.2 ui-monospace, Menlo, monospace; color: #8f9a94; }
  .mkRow .mkAct { display: flex; gap: 5px; }
  .mkRow .mkAct button { flex: 1; padding: 6px 4px; font: 600 11px/1 system-ui; border-radius: 0 !important; }
  #gMkKbd, #gRenKbd { display: none; grid-template-columns: repeat(8, 1fr); gap: 2px; margin: 4px 0; }
  #gMkKbd.on, #gRenKbd.on { display: grid; }
  #gMkKbd i, #gRenKbd i { font-style: normal; display: grid; place-items: center; height: 22px; background: #232729; color: #dce2de; border: 1px solid #383e42; font: 700 10px/1 ui-monospace, Menlo, monospace; user-select: none; cursor: pointer; }
  #gMkKbd i.act, #gRenKbd i.act { font-size: 8.5px; color: #b8c2bd; background: #1d2022; }
  #gMkKbd i.kSel, #gRenKbd i.kSel { background: #e8ece9 !important; color: #111314 !important; border-color: #fff !important; }

  /* Built-in Numeric D-Pad Keypad for Radius */
  #gNumVal { font: 700 20px/1.2 ui-monospace, Menlo, monospace; color: #f4f7f5; background: #1d2123; border: 1px solid #3c4245; padding: 8px 10px; text-align: right; margin: 6px 0 8px; letter-spacing: .04em; }
  #gNumKbd { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; margin-bottom: 6px; }
  #gNumKbd i { font-style: normal; display: grid; place-items: center; height: 32px; background: #232729; color: #e2e6e3; border: 1px solid #383e42; font: 700 13px/1 ui-monospace, Menlo, monospace; user-select: none; }
  #gNumKbd i.act { font-size: 11px; color: #b8c2bd; background: #1c1f21; }
  #gNumKbd i.go { grid-column: span 3; height: 34px; background: #2b3a2e; color: #e6f4df; border-color: #7fb069; letter-spacing: .08em; }
  #gNumKbd i.kSel { background: #e8ece9 !important; color: #111314 !important; border-color: #fff !important; }

  /* True Geographic Sun / Shadow Marker on Map during Calibration */
  .sunPin { display: inline-flex; align-items: center; gap: 4px; padding: 5px 9px; background: #101214; color: #ffb703; border: 2px solid #ff9f1c; font: 800 12px/1 ui-monospace, Menlo, monospace; white-space: nowrap; box-shadow: 0 3px 12px rgba(0,0,0,.75); transform: rotate(var(--cr, 0deg)); transition: transform var(--crt, 0s); }
  .sunPin.sh { color: #e2e8f0; border-color: #94a3b8; }
  .sunPin.mn { color: #7ee8ff; border-color: #00d4ff; }
  .sunPin.pl { color: #86efac; border-color: #4ade80; }

  /* Compact bottom dock for A→B route (3 trails + visible actions + clear map) */
  #gScreen #ip.route-dock {
    left: 0 !important; right: 0 !important; top: auto !important; bottom: 0 !important;
    width: auto !important; max-width: none !important; max-height: 54% !important;
    border-left: 0 !important; border-right: 0 !important; border-bottom: 0 !important;
    border-top: 2px solid #f0622b !important;
    padding: 6px 8px 6px !important;
    background: rgba(14, 16, 17, .96) !important;
    box-shadow: 0 -6px 22px rgba(0,0,0,.68) !important;
  }
  #gScreen #ip.route-dock::before { display: none !important; }
  #gScreen #ip.route-dock .x { display: none !important; }
  #gScreen #ip.route-dock #prof { height: 68px !important; margin-top: 4px !important; border-radius: 3px; }
  .rtDock { display: flex; flex-direction: column; gap: 4px; }
  .rtHd { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
  .rtHd .rtDist { flex: none; white-space: nowrap; font: 700 14px/1.1 ui-monospace, Menlo, monospace; color: #f6f8f7; }
  .rtHd .rtMeta { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: right; font: 600 10.5px/1.1 ui-monospace, Menlo, monospace; color: #9aa49e; }
  .rtHd .rtUndo {
    flex: none; margin: 0 !important; padding: 3px 7px !important; border-radius: 2px !important;
    background: #3a1c1c !important; color: #fecaca !important; border: 1px solid #ef4444 !important;
    font: 700 10.5px/1.1 ui-monospace, Menlo, monospace !important; white-space: nowrap;
  }
  .rtHd .rtUndo.gFocus { outline: 2px solid #fff !important; outline-offset: -1px; background: #b91c1c !important; color: #fff !important; }
  .rtStats { display: flex; flex-wrap: wrap; gap: 8px; font: 600 10.5px/1.15 ui-monospace, Menlo, monospace; color: #cfd6d2; }
  .rtStats b { color: #fff; }
  .rtAlts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
  .rtAlts.c2 { grid-template-columns: repeat(2, 1fr); }
  .rtAlts button {
    margin: 0 !important; padding: 5px 4px !important;
    display: flex; flex-direction: column; align-items: center; gap: 2px;
    background: #202427 !important; color: #b7c1bc !important;
    border: 1px solid #383e42 !important; border-radius: 0 !important;
    font: 700 10.5px/1.1 ui-monospace, Menlo, monospace !important;
  }
  .rtAlts button small { font: 500 9.5px/1 ui-monospace, Menlo, monospace; color: #8c9691; }
  .rtAlts button.rtSel {
    background: #3a2319 !important; color: #fff !important;
    border-color: #f0622b !important; box-shadow: inset 0 -2px 0 #f0622b;
  }
  .rtAlts button.rtSel small { color: #f8c5ad; }
  .rtAlts button.gFocus { outline: 2px solid #e6eae7 !important; outline-offset: -1px; background: #4a3022 !important; color: #fff !important; }
  .rtActPrimary { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
  .rtActPrimary button {
    margin: 0 !important; padding: 7px 6px !important;
    border-radius: 0 !important; font: 700 11.5px/1 system-ui !important;
    border: 1px solid #3c4245 !important; white-space: nowrap;
  }
  .rtActPrimary button.rtGo { background: #2d5a3c !important; border-color: #6ca97b !important; color: #fff !important; }
  .rtActPrimary button.rtVia { background: #1f3344 !important; border-color: #4f8fc0 !important; color: #e6f2ff !important; }
  .rtActPrimary button.gFocus { outline: 2px solid #fff !important; outline-offset: -1px; filter: brightness(1.18); }
  .rtAct { display: grid; grid-template-columns: 1fr 0.78fr 1.15fr; gap: 4px; }
  .rtAct button {
    margin: 0 !important; padding: 6px 4px !important;
    border-radius: 0 !important; font: 700 11px/1 system-ui !important;
    border: 1px solid #3c4245 !important; white-space: nowrap;
  }
  .rtAct button.gray { background: #232729 !important; color: #dce2de !important; }
  .rtAct button.gFocus { outline: 2px solid #fff !important; outline-offset: -1px; filter: brightness(1.18); }
  .rtFoot { font: 500 9.5px/1.1 ui-monospace, Menlo, monospace; color: #828c87; display: flex; justify-content: space-between; gap: 6px; }
  .rtSaved { color: #86efac; font-weight: 700; }
  .gItem.recStop { border-left: 3px solid #ef4444 !important; background: rgba(220, 38, 38, .13) !important; }
  .gItem.recAct { border-left: 3px solid #f59e0b !important; }
  .recSw { display: inline-block; width: 10px; height: 10px; border-radius: 50%; border: 1.5px solid #fff; vertical-align: -1px; margin-right: 6px; box-shadow: 0 0 4px rgba(0,0,0,.6); }

  /* Visible Metric Scale Bar (top-left of screen, auto-updates with zoom) */
  #gScaleBar {
    position: absolute; top: 8px; left: 8px; z-index: 940; pointer-events: none;
    display: flex; flex-direction: column; align-items: flex-start; gap: 3px;
    padding: 4px 7px 5px; background: rgba(16, 18, 19, .82); color: #eef2ef;
    border: 1px solid rgba(255,255,255,.16); box-shadow: 0 2px 8px rgba(0,0,0,.38);
    font: 700 10.5px/1 ui-monospace, Menlo, monospace; letter-spacing: .03em;
    font-variant-numeric: tabular-nums;
  }
  #gScaleBar .scLine {
    height: 5px; width: 64px; box-sizing: border-box;
    border: 1.5px solid #e6ece8; border-top: 0;
    background: linear-gradient(90deg, rgba(255,255,255,.22) 50%, transparent 50%);
  }

  /* Full-width D-pad cycle option buttons inside #sheet (Offline maps / Offline names) */
  .optList { display: flex; flex-direction: column; gap: 5px; margin: 7px 0; }
  .optBtn {
    width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 8px;
    padding: 8px 10px !important; background: #222628 !important; color: #dce2de !important;
    border: 1px solid #393f43 !important; border-radius: 2px !important;
    font: 600 12px/1.2 system-ui !important; text-align: left;
  }
  .optBtn b { font: 700 11.5px/1 ui-monospace, Menlo, monospace; color: #9ad67f; }
  .optBtn.gFocus { background: #333a3d !important; border-color: #e6eae7 !important; color: #fff !important; }
  .optBtn.gFocus b { color: #fff !important; }
  .trkRow { padding: 8px 0; border-bottom: 1px solid #2b3033; display: flex; flex-direction: column; gap: 6px; }
  .trkRow .trkTop { display: flex; align-items: baseline; justify-content: space-between; gap: 6px; }
  .trkRow .trkAct { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
  .trkRow .trkAct button { padding: 6px 3px; font: 600 10.5px/1 system-ui; border-radius: 0 !important; }
  .trkRow .trkAct2 { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
  .trkRow .trkAct2 button { padding: 6px 4px; font: 600 10.5px/1 system-ui; border-radius: 0 !important; }

  /* Context menu highlights (Marker mode, Active Tool exit, SOS & thumb-slide) */
  .gItem.mkAct { border-left: 3px solid #7fb069 !important; background: rgba(127, 176, 105, .11) !important; }
  .gItem.toolExit { border-left: 3px solid #f0622b !important; background: rgba(240, 98, 43, .13) !important; }
  .gItem.toolExit span { color: #ffad87 !important; }
  .gItem.sosAct { border-left: 3px solid #ef4444 !important; background: rgba(220, 38, 38, .15) !important; }
  .gItem.sosAct span { color: #fecaca !important; font-weight: 700 !important; }
  .gItem.slide-hot {
    background: rgba(127, 176, 105, .26) !important;
    border-color: #9ad67f !important;
    box-shadow: inset 4px 0 0 #9ad67f !important;
    transform: translateX(-3px);
  }
  .gItem { transition: transform .08s ease, background .08s ease; }

  /* Search clear button & result metadata */
  #sb .qWrap { position: relative; flex: 1; min-width: 0; display: flex; align-items: center; }
  #sb .qWrap input { width: 100%; }
  #qClr {
    display: none; position: absolute; right: 5px; top: 50%; transform: translateY(-50%);
    width: 24px; height: 24px; padding: 0 !important; border-radius: 50% !important;
    background: #353c40 !important; color: #e2e8e4 !important; border: 1px solid #525c61 !important;
    font: 700 11px/1 system-ui !important; align-items: center; justify-content: center; cursor: pointer;
  }
  body.g-touch #sb .qWrap.has-val #qClr { display: inline-flex !important; }
  body.g-touch #sb .qWrap.has-val input { padding-right: 34px !important; }
  #sr .srMeta { display: flex; flex-direction: column; align-items: flex-end; flex: none; white-space: nowrap; font-variant-numeric: tabular-nums; line-height: 1.15; }
  #sr .srMeta .srBrg { font-size: 9.5px; opacity: .72; letter-spacing: .03em; margin-top: 1px; }

  /* Quick category chips inside #sb (visible in BOTH Glove Mode & Touch Mode) */
  #gQuickCats { display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-rows: 26px; gap: 4px; margin: 5px 0 4px; flex: none; max-height: 86px; overflow-y: auto; scrollbar-width: thin; }
  #gQuickCats.dim { opacity: .62; }
  #gQuickCats button {
    min-width: 0; min-height: 26px; padding: 0 5px; border-radius: 2px !important;
    background: #23282b !important; color: #e4ebe6 !important; border: 1px solid #3f474b !important;
    font: 600 10.5px/1 system-ui !important; cursor: pointer;
    display: flex; align-items: center; gap: 3px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: left;
  }
  #gQuickCats button[data-grp="hike"] { border-left: 2.5px solid #6fa863 !important; }
  #gQuickCats button[data-grp="road"] { border-left: 2.5px solid #5a95c9 !important; }
  #gQuickCats button[data-grp="help"] { border-left: 2.5px solid #d46a6a !important; }
  #gQuickCats button[data-grp="mine"] { border-left: 2.5px solid #d4a64a !important; }
  #gQuickCats button.catOn { background: #223326 !important; color: #cbe8be !important; border-color: #7fb069 !important; border-left-color: #9ad67f !important; }
  #gQuickCats button.gCatSel { background: #e8ece9 !important; color: #111314 !important; border-color: #fff !important; border-left-color: #fff !important; }
  #gQuickCats button:active { background: #344439 !important; color: #fff !important; }

  /* Inline exit & OLED pills inside #gStatus for Touch mode */
  #gStatus .stOled {
    display: none; margin-left: auto; flex: none;
    padding: 4px 8px; border-radius: 6px; border: 1px solid rgba(147,197,253,.48);
    background: rgba(30, 58, 95, .75); color: #dbeafe; font: 700 10.5px/1 system-ui;
    letter-spacing: .04em; cursor: pointer; touch-action: manipulation;
    align-items: center; gap: 4px;
  }
  #gStatus .stOled svg { width: 11px; height: 11px; display: block; }
  #gStatus .stOled:active { background: #1e3a5f; transform: scale(.96); }
  body.g-touch #gStatus.has-oled .stOled { display: inline-flex !important; }
  #gStatus .stExit {
    display: none; margin-left: auto; flex: none;
    padding: 4px 9px; border-radius: 6px; border: 1px solid #ef4444;
    background: #991b1b; color: #fff; font: 700 10.5px/1 system-ui;
    letter-spacing: .04em; cursor: pointer; touch-action: manipulation;
  }
  #gStatus.has-oled .stExit { margin-left: 4px; }
  #gStatus .stExit:active { background: #b91c1c; transform: scale(.96); }

  /* Fullscreen Touch Mode (Slobodan dodir — hides bottom deck, expands map 100%) */
  #gTouchBar {
    display: none; position: absolute; left: 8px; right: 8px; bottom: calc(10px + var(--safe-b));
    z-index: 1200; align-items: center; justify-content: space-between; gap: 6px; pointer-events: none;
  }
  #gTouchBar .tbGrp { display: flex; align-items: center; gap: 5px; pointer-events: auto; }
  .tFab {
    height: 44px; padding: 0 10px; border-radius: 10px;
    background: rgba(20, 22, 23, .92); color: #eef2ef;
    border: 1.5px solid #454c50; box-shadow: 0 4px 14px rgba(0,0,0,.5);
    font: 700 11.5px/1 system-ui, -apple-system, sans-serif; letter-spacing: .04em;
    display: inline-flex; align-items: center; justify-content: center; gap: 5px;
    cursor: pointer; touch-action: manipulation;
  }
  .tFab:active { transform: scale(.95); background: #2c3134; }
  .tFab.ico { width: 42px; padding: 0; }
  .tFab .icoH { display: none; }
  .tFab.rot { border-color: #7fb069; color: #9ad67f; }
  .tFab.rot .icoN { display: none; }
  .tFab.rot .icoH { display: block; }
  .tFab.pri { background: #26362b; border-color: #7fb069; color: #fff; }
  .tFab.okBtn { width: 44px; padding: 0; background: rgba(24, 32, 39, .94); border-color: #465866; color: #f2f7f4; touch-action: manipulation; }
  .tFab.okBtn .uiIco { width: 20px; height: 20px; display: none; pointer-events: none; }
  .tFab.okBtn[data-kind="ruler"] .toolRuler,
  .tFab.okBtn:not([data-kind]) .toolRuler { display: block; }
  .tFab.okBtn[data-kind="plus"] .toolPlus { display: block; width: 22px; height: 22px; stroke-width: 2.6; }
  .tFab.okBtn[data-kind="check"] .toolCheck { display: block; width: 22px; height: 22px; stroke-width: 2.6; }
  .tFab.okBtn[data-kind="plus"],
  .tFab.okBtn[data-kind="check"] {
    background: linear-gradient(180deg, #256c41 0%, #1c5432 100%);
    border-color: #4ade80; color: #ffffff;
    box-shadow: 0 6px 18px rgba(20, 83, 45, .52);
  }
  .tFab.okBtn.active { background: linear-gradient(180deg, #1f4b32 0%, #173925 100%); border-color: #4ade80; color: #86efac; box-shadow: 0 0 0 2px rgba(74, 222, 128, .22), 0 6px 18px rgba(0, 0, 0, .48); }
  .tFab.pri.active { box-shadow: 0 0 0 2px rgba(134, 239, 172, .35), 0 6px 18px rgba(20, 83, 45, .58); border-color: #86efac; }
  .tFab.backBtn { display: none; width: 44px; padding: 0; color: #fff; }
  .tFab.backBtn .actBack { display: block; width: 21px; height: 21px; stroke-width: 2.3; }
  .tFab.backBtn[data-state="back"] { display: inline-flex; background: linear-gradient(180deg, #b91c1c 0%, #991b1b 100%); border-color: #f87171; color: #fff; box-shadow: 0 6px 18px rgba(153, 27, 27, .48); }
  .tFab.backBtn[data-state="hidden"] { display: none !important; }
  @media (max-width: 390px) {
    #gTouchBar { left: 6px; right: 6px; gap: 4px; }
    #gTouchBar .tbGrp { gap: 4px; }
    .tFab { height: 42px; padding: 0 8px; font-size: 11px; gap: 3px; letter-spacing: .02em; }
    .tFab.ico, .tFab.backBtn, .tFab.okBtn { width: 40px; padding: 0; }
  }
  #tZoomStack {
    display: none; position: absolute; right: 8px; bottom: calc(114px + var(--safe-b)); z-index: 950;
    flex-direction: column; gap: 6px;
  }
  #tZoomStack button {
    width: 42px; height: 42px; padding: 0; border-radius: 10px;
    background: rgba(20, 22, 23, .9); color: #eef2ef; border: 1.5px solid #454c50;
    box-shadow: 0 4px 12px rgba(0,0,0,.45); font: 700 22px/1 system-ui;
    display: inline-flex; align-items: center; justify-content: center;
    cursor: pointer; touch-action: manipulation;
  }
  #tZoomStack button:active { transform: scale(.94); background: #2c3134; }
  .gCalTouch { display: none; gap: 5px; margin-top: 8px; align-items: center; }
  .gCalTouch button {
    flex: 1; height: 34px; padding: 0 4px; border-radius: 7px;
    background: #282e31; color: #eef2ef; border: 1px solid #464f54;
    font: 700 12px/1 ui-monospace, Menlo, monospace; cursor: pointer; touch-action: manipulation;
  }
  .gCalTouch button.ok { flex: 1.5; background: #263c2d; border-color: #7fb069; color: #fff; font-family: system-ui, sans-serif; }
  .gCalTouch button:active { transform: scale(.95); }
  .gMenuCloseBtn {
    display: none; padding: 4px 7px; border-radius: 2px; background: #2a2f32; color: #e2e6e3;
    border: 1px solid #42484c; font: 700 10.5px/1 system-ui; cursor: pointer; white-space: nowrap;
  }

  body.g-touch { max-width: none !important; }
  body.g-touch #gDeck { display: none !important; }
  body.g-touch #gScreen { margin: 0 !important; border: 0 !important; border-radius: 0 !important; }
  body.g-touch #gScreen, body.g-touch #gScreen * { pointer-events: auto !important; }
  body.g-touch #gScreen #gCross,
  body.g-touch #gScreen #gCross *,
  body.g-touch #gScreen #sight,
  body.g-touch #gScreen #sight *,
  body.g-touch #gScreen #gScaleBar,
  body.g-touch #gScreen #gScaleBar *,
  body.g-touch #gScreen #gOffFrame,
  body.g-touch #gScreen #gOffFrameBox,
  body.g-touch #gScreen #gOffFrameTag { pointer-events: none !important; }
  body.g-touch #gScreen #gOffFrameTop,
  body.g-touch #gScreen #gOffFrameTop *,
  body.g-touch #gScreen #gOffFrameDock,
  body.g-touch #gScreen #gOffFrameDock * { pointer-events: auto !important; }
  body.g-touch #gScreen #gTouchBar { display: flex !important; pointer-events: none !important; }
  body.g-touch #gScreen #gTouchBar .tbGrp { pointer-events: auto !important; }
  body.g-touch #gScreen #tZoomStack.show { display: flex !important; }
  body.g-touch #gScreen #sheet > .row:first-child { display: flex !important; }
  body.g-touch #gScreen #ip button.x, body.g-touch #gScreen #nav button.x, body.g-touch #gScreen #sb button.x {
    display: inline-flex !important; align-items: center; justify-content: center;
    background: #28302c !important; color: #eef3ef !important; border: 1px solid #48534c !important;
    border-radius: 6px !important; min-width: 34px; height: 34px; padding: 0 !important; flex: none;
  }
  body.g-touch #gScreen #ip button.x {
    position: absolute !important; top: 5px; right: 6px; float: none !important; margin: 0 !important; z-index: 5;
    min-width: 28px; height: 26px;
  }
  body.g-touch #gScreen #ip:not(.route-dock)::before {
    display: flex; align-items: center; min-height: 22px; padding-right: 0; line-height: 1.2;
  }
  body.g-touch #gScreen #ip.route-dock .rtHd { padding-right: 0; align-items: center; min-height: 24px; }
  body.g-touch #gScreen #nav {
    left: 6px !important; right: 6px !important; width: auto !important; max-width: none !important;
    top: 6px !important; border-radius: 10px !important;
  }
  body.g-touch #gScreen #nav button.x { min-width: 28px; height: 28px; align-self: flex-start; }
  body.g-touch #gScreen #calBar {
    left: 8px !important; right: 8px !important; bottom: calc(70px + var(--safe-b)) !important;
    max-width: none !important; border-radius: 14px !important;
  }
  body.g-touch #gScreen #calBar #gCalKeys { display: none !important; }
  body.g-touch #gScreen #calBar .gCalTouch { display: flex !important; }
  body.g-touch #gScreen #sb input { pointer-events: auto !important; font: 600 15px/1.25 system-ui, -apple-system, sans-serif !important; padding: 9px 10px !important; border-radius: 6px !important; }
  body.g-touch #gKbd, body.g-touch #gMkKbd, body.g-touch #gRenKbd, body.g-touch #gSbHint { display: none !important; }
  body.g-touch #gQuickCats { display: grid !important; grid-template-columns: repeat(3, 1fr); grid-auto-rows: auto; gap: 5px; margin: 7px 0 6px; max-height: none; overflow: visible; opacity: 1 !important; }
  body.g-touch #gQuickCats button { min-height: 28px; padding: 6px 6px; border-radius: 6px !important; font-size: 11px !important; }
  body.g-touch #gScreen #sb {
    left: 8px !important; right: 8px !important; width: auto !important; max-width: none !important;
    top: 42px !important; bottom: auto !important; max-height: 76% !important;
    border: 1px solid #464e52 !important; border-radius: 10px !important;
  }
  body.g-touch #gScreen #sheet {
    left: 8px !important; right: 8px !important; top: 10px !important; bottom: auto !important;
    width: auto !important; max-width: none !important;
    height: auto !important; max-height: calc(100% - 78px - var(--safe-b)) !important;
    overflow-y: auto !important;
    border: 1px solid #464e52 !important; border-radius: 10px !important;
    padding: 10px 12px 12px !important;
  }
  body.g-touch #gScreen #sheet > .row:first-child { margin: 0 0 6px !important; }
  body.g-touch #gMenu {
    width: min(84%, 300px) !important; max-width: 300px !important;
    top: auto !important; bottom: calc(64px + var(--safe-b)) !important;
    height: auto !important; max-height: calc(100% - 76px - var(--safe-b)) !important;
    border-top-left-radius: 10px !important;
  }
  body.g-touch #gMenuHd .gMenuCloseBtn { display: inline-flex !important; }
  body.g-touch #gMenuHd #gMenuBackBtn.hide { display: none !important; }
  #gMenuFt { gap: 8px; align-items: center; }
  #gMenuFt span:last-child { white-space: nowrap; flex: none; }
  body.g-touch #gMenuList { -webkit-overflow-scrolling: touch; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
  body.g-touch #gStatus { bottom: calc(62px + var(--safe-b)) !important; }
  body.g-touch #gStatus.has-exit .stExit { display: inline-flex !important; }
  body.g-touch #gScreen #ip.route-dock { bottom: calc(56px + var(--safe-b)) !important; }

