:root {
  --bg: #f8fafc;
  --bg-center: #ffffff;
  --panel: #ffffff;
  --panel-alt: #f1f5f9;
  --line: #e2e8f0;
  --line-strong: #cbd5e1;
  --ink: #0f172a;
  --ink-soft: #334155;
  --muted: #64748b;

  --ghost: #cbd5e1;
  --route: #0284c7;
  --route-dark: #0369a1;
  --route-hi: #f59e0b;

  --badge: #10b981;
  --badge-ink: #ffffff;
  --badge-done: #059669;

  --rp: #f59e0b;
  --rp-edge: #78350f;
  --loc: #dc2626;
  --loc-map: #b91c1c;

  --red: #dc2626;
  --cyan: #0284c7;
  --blue: #1d4ed8;

  --paper: #fffef7;
  --paper-ink: #0f172a;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-tap-highlight-color: transparent;
}

body {
  display: flex;
  flex-direction: column;
  height: 100dvh;
  overflow: hidden;
}

/* ---------- HEADER ---------- */
header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.03);
  z-index: 10;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 9px;
}

.brand-badge {
  background: var(--route);
  color: #fff;
  font-weight: 800;
  font-size: 11px;
  letter-spacing: 0.6px;
  padding: 4px 7px;
  border-radius: 6px;
}

header h1 {
  font-size: 15px;
  margin: 0;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.2px;
  white-space: nowrap;
}

header h1 small {
  color: var(--muted);
  font-weight: 500;
  font-size: 12px;
  margin-left: 6px;
}

.tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  flex: 1;
  min-width: 0;
}
.tabs::-webkit-scrollbar {
  display: none;
}

.tab {
  border: 1px solid var(--line-strong);
  background: var(--panel-alt);
  color: var(--ink-soft);
  padding: 7px 14px;
  border-radius: 999px;
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.tab:hover {
  color: var(--ink);
  border-color: #94a3b8;
  background: #e2e8f0;
}

.tab[aria-selected="true"] {
  background: var(--route);
  color: #ffffff;
  border-color: var(--route);
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.25);
}

.header-tools {
  display: flex;
  align-items: center;
  gap: 8px;
}

.quiz-btn[aria-pressed="true"] {
  background: #7c3aed !important;
  border-color: #7c3aed !important;
  color: #ffffff !important;
  box-shadow: 0 2px 10px rgba(124, 58, 237, 0.28);
}

.lang-btn {
  font-weight: 700;
  min-width: 44px;
  justify-content: center;
  padding: 6px 10px !important;
}

/* ---------- STAGE & SVG MAP ---------- */
#stage {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  touch-action: none;
  background: radial-gradient(ellipse at 50% 45%, var(--bg-center) 0%, var(--bg) 75%);
}

#map {
  width: 100%;
  height: 100%;
  display: block;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
}

#map.panning {
  cursor: grabbing;
}

.grid line {
  stroke: #e2e8f0;
  stroke-width: 0.35;
}

.decor path {
  fill: none;
  stroke: #475569;
  stroke-width: 1.2;
  vector-effect: non-scaling-stroke;
  stroke-linejoin: round;
}
.decor path.f {
  fill: #475569;
}
.decor path.d {
  stroke-dasharray: 4 3;
}

.ghost path.hid,
.flown path.hid {
  stroke: transparent !important;
  filter: none;
}

.decor path.ext,
#map.withmap .decor path.ext {
  stroke: var(--route);
  stroke-width: 2.2px;
  stroke-dasharray: 7 5;
  filter: drop-shadow(0 0 1px #ffffff) drop-shadow(0 0 1px #ffffff);
}

.ghost path {
  fill: none;
  stroke: var(--ghost);
  stroke-width: 2.4;
  vector-effect: non-scaling-stroke;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.flown path {
  fill: none;
  stroke: var(--route);
  stroke-width: calc(3px * var(--k, 1));
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 1px rgba(255, 255, 255, 0.9));
  transition: stroke-dasharray 0.7s ease, stroke-dashoffset 0.7s ease, stroke 0.2s;
}

.flown path.hi {
  stroke: var(--route-hi);
  stroke-width: calc(4.6px * var(--k, 1));
}

.hit path {
  fill: none;
  stroke: transparent;
  stroke-width: 22;
  vector-effect: non-scaling-stroke;
  pointer-events: stroke;
  cursor: pointer;
  stroke-linecap: round;
}

.lbl rect {
  fill: #ffffff;
  stroke: #94a3b8;
  stroke-width: 0.4;
}

.lbl text {
  fill: #0f172a;
  font-size: 5.6px;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.lbl.dist rect {
  fill: none;
  stroke: none;
}

.lbl.dist text {
  fill: #475569;
  font-weight: 600;
  font-style: italic;
}

/* Step Markers on Route */
.mk {
  cursor: pointer;
}

.mk circle {
  fill: var(--badge);
  stroke: #ffffff;
  stroke-width: 0.65;
  filter: drop-shadow(0 1px 2px rgba(15, 23, 42, 0.25));
  transition: r 0.15s, fill 0.15s;
}

.mk text {
  fill: var(--badge-ink);
  font-size: 4.2px;
  font-weight: 800;
  text-anchor: middle;
  dominant-baseline: central;
  pointer-events: none;
}

.mk.done circle {
  fill: #059669;
  stroke: #d1fae5;
}

.mk.done text {
  fill: #ffffff;
}

.mk.on circle {
  fill: var(--route-hi);
  stroke: #ffffff;
  stroke-width: 0.8;
}

.mk.on text {
  fill: #451a03;
}

.mk.dim {
  opacity: 0.4;
}

.pulse {
  fill: none;
  stroke: var(--route-hi);
  stroke-width: 1;
  opacity: 0;
  pointer-events: none;
}

.pulse.go {
  animation: pulse 1.4s ease-out infinite;
}

@keyframes pulse {
  0% { r: 3; opacity: 0.95; }
  100% { r: 13; opacity: 0; }
}

/* Cessna 172 Plane */
#plane {
  pointer-events: none;
  transition: opacity 0.3s;
  filter: drop-shadow(0 1.2px 2.2px rgba(15, 23, 42, 0.45));
}

#plane path {
  fill: #ffffff;
  stroke: #0f172a;
  stroke-width: 0.45;
  stroke-linejoin: round;
}

#plane .prop {
  fill: none;
  stroke: #0284c7;
  stroke-width: 0.4;
  stroke-linecap: round;
}

.basemap {
  pointer-events: none;
}

.decor path.loc {
  stroke: var(--loc);
  stroke-width: 2.2px;
  stroke-dasharray: 8 5;
}

#map.withmap .decor path.loc {
  stroke: var(--loc-map);
  stroke-width: 2.5px;
}

.decor path.rp,
#map.withmap .decor path.rp {
  fill: var(--rp);
  stroke: var(--rp-edge);
  stroke-width: 1.3px;
}

.decor path.hold,
#map.withmap .decor path.hold {
  stroke: var(--route-dark);
  stroke-width: 2.1px;
  filter: drop-shadow(0 0 1px #ffffff) drop-shadow(0 0 1px #ffffff);
}

/* Geo Fixes (VOR, DME, Waypoints) */
.fixes {
  pointer-events: none;
}

.fixes path {
  fill: none;
  stroke: #0369a1;
  stroke-width: 0.5;
  stroke-linejoin: round;
}

.fixes .fix path,
#map.withmap .fixes .fix path {
  fill: var(--rp);
  stroke: var(--rp-edge);
}

.fixes text {
  fill: #0f172a;
  font-size: max(3.4px, calc(10px * var(--k, 1)));
  font-weight: 700;
  stroke: #ffffff;
  stroke-width: calc(2.4px * var(--k, 1));
  paint-order: stroke;
  letter-spacing: 0.15px;
}

.fixes .rd text {
  font-size: max(2.8px, calc(9px * var(--k, 1)));
  font-weight: 600;
  fill: #334155;
}

/* With 1/250K Basemap Active */
#map.withmap .grid {
  display: none;
}

#map.withmap .ghost path {
  stroke: #1e293b;
  stroke-width: 2.4;
  stroke-dasharray: 6 3;
  opacity: 0.85;
}

#map.withmap .flown {
  filter: drop-shadow(0 0 1.2px #ffffff) drop-shadow(0 0 1.2px #ffffff);
}

#map.withmap .decor path {
  stroke: #0f172a;
}

#map.withmap .decor path.f {
  fill: #0f172a;
}

.basemap image {
  image-rendering: auto;
}

/* Map Controls, Scale Bar & Live DME HUD */
.mapctl {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.mapctl[hidden] {
  display: none;
}
.mapctl input {
  width: 96px;
  accent-color: var(--route);
  cursor: pointer;
}
#mapv {
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  min-width: 34px;
}

#dmeHud {
  position: absolute;
  left: 14px;
  bottom: 58px;
  z-index: 4;
  pointer-events: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(8px);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  padding: 6px 10px;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.09);
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
}
#dmeHud[hidden] {
  display: none;
}
#dmeHud .hud-tag {
  font-weight: 800;
  font-size: 10.5px;
  letter-spacing: 0.3px;
  color: #fff;
  background: var(--ink);
  padding: 2px 6px;
  border-radius: 5px;
}
#dmeHud .hud-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: 6px;
  background: var(--panel-alt);
  border: 1px solid var(--line);
  color: var(--ink-soft);
}
#dmeHud .hud-pill.pri {
  background: #e0f2fe;
  border-color: #7dd3fc;
  color: #0369a1;
}
#dmeHud .hud-pill.fix-pri {
  background: #fef3c7;
  border-color: #fcd34d;
  color: #92400e;
}
#dmeHud .hud-pill b {
  font-weight: 800;
  color: var(--ink);
}
#dmeHud .hud-pill small {
  font-size: 10.5px;
  color: var(--muted);
  font-weight: 600;
}

#scale {
  position: absolute;
  left: 14px;
  bottom: 14px;
  z-index: 3;
  pointer-events: none;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(6px);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 5px 10px 7px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
}
#scale[hidden] {
  display: none;
}
#scale .bar {
  height: 6px;
  border: 1.5px solid var(--ink);
  margin-top: 3px;
  background: linear-gradient(90deg, var(--ink) 0 25%, transparent 25% 50%, var(--ink) 50% 75%, transparent 75%);
}

/* All Slide Callout Boxes Mode */
.allboxes {
  display: none;
}
.showall .allboxes {
  display: inline;
}
.showall .mk,
.showall .pulse {
  display: none;
}
.allboxes .ldr {
  stroke: #64748b;
  stroke-width: 0.4;
  stroke-dasharray: 2 1.4;
  fill: none;
}
.allboxes .box {
  background: var(--paper);
  color: var(--paper-ink);
  border: 0.35px solid #475569;
  border-radius: 1.5px;
  padding: 1.2px 2.4px;
  font-family: Calibri, "Segoe UI", Arial, sans-serif;
  line-height: 1.16;
  height: 100%;
  overflow: hidden;
  position: relative;
  cursor: pointer;
  box-shadow: 0 0.5px 2px rgba(15, 23, 42, 0.12);
}
.allboxes .box.on {
  outline: 1.4px solid var(--route-hi);
  background: #fef3c7;
}
.allboxes .box.quiz-mask .p {
  filter: blur(2.2px);
  opacity: 0.55;
  transition: filter 0.2s, opacity 0.2s;
}
.allboxes .box .box-dme {
  background: #e0f2fe;
  color: #0369a1;
  font-weight: 700;
  padding: 0.4px 1.6px;
  margin-bottom: 0.8px;
  border-radius: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.allboxes .box .bd {
  position: absolute;
  right: 0;
  bottom: 0;
  background: #10b981;
  color: #fff;
  font-weight: 800;
  padding: 0 1.4px;
  line-height: 1.1;
  border-top-left-radius: 1.5px;
}
.allboxes .box .c-red { color: #dc2626; }
.allboxes .box .c-cyan { color: #0284c7; }
.allboxes .box .c-blue { color: #1d4ed8; }

/* ---------- FLOATING STEP POPUP (#pop) ---------- */
#pop {
  position: absolute;
  max-width: min(410px, calc(100% - 24px));
  min-width: 270px;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(10px);
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  box-shadow: 0 18px 42px -10px rgba(15, 23, 42, 0.18), 0 4px 14px -2px rgba(15, 23, 42, 0.08);
  padding: 13px 15px;
  font-size: 13.5px;
  line-height: 1.42;
  color: var(--ink);
  pointer-events: auto;
  opacity: 0;
  transform: translateY(5px);
  transition: opacity 0.16s ease, transform 0.16s ease;
  z-index: 6;
}

#pop.show {
  opacity: 1;
  transform: none;
}

#pop[hidden] {
  display: block;
  visibility: hidden;
  pointer-events: none;
}

#pop .hd {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  padding-bottom: 7px;
  border-bottom: 1px solid var(--line);
}

#pop .num {
  background: var(--route-hi);
  color: #451a03;
  font-weight: 800;
  border-radius: 7px;
  min-width: 28px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  padding: 0 7px;
}

#pop .ttl {
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  flex: 1;
}

#pop .prog-pill {
  font-size: 11px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--panel-alt);
  color: var(--ink-soft);
  border: 1px solid var(--line-strong);
}

#pop .prog-pill.all-done {
  background: #dcfce7;
  color: #15803d;
  border-color: #86efac;
}

#pop .x {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  padding: 2px 5px;
  border-radius: 6px;
}
#pop .x:hover {
  color: var(--ink);
  background: var(--panel-alt);
}

/* Geo-Calibrated VOR/DME & Fix Distance Strip inside #pop */
.dme-strip {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 5px;
  margin-bottom: 9px;
  padding: 6px;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 9px;
  font-variant-numeric: tabular-nums;
}

.dme-cell {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 5px;
  padding: 4px 7px;
  border-radius: 6px;
  background: #ffffff;
  border: 1px solid var(--line);
  font-size: 11.5px;
}

.dme-cell.pri-vor {
  background: #f0f9ff;
  border-color: #7dd3fc;
}

.dme-cell.pri-fix {
  background: #fffbeb;
  border-color: #fcd34d;
}

.dme-cell .dme-k {
  font-weight: 800;
  font-size: 10.5px;
  letter-spacing: 0.3px;
  color: var(--ink-soft);
}

.dme-cell.pri-vor .dme-k {
  color: #0369a1;
}

.dme-cell.pri-fix .dme-k {
  color: #b45309;
}

.dme-cell .dme-v {
  font-weight: 800;
  color: var(--ink);
  font-size: 12px;
}

.dme-cell .dme-rad {
  font-weight: 600;
  font-size: 10.5px;
  color: var(--muted);
  margin-left: 2px;
}

/* Interactive Checklist Items inside #pop */
.pop-items {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 42dvh;
  overflow-y: auto;
  padding-right: 2px;
}

.pop-sec {
  font-size: 11.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--route-dark);
  margin-top: 6px;
  margin-bottom: 2px;
  padding: 2px 4px;
}
.pop-sec:first-child {
  margin-top: 0;
}

.item-row {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.14s, border-color 0.14s;
}

.item-row:hover {
  background: var(--panel-alt);
}

.item-row.active-item {
  background: #f0f9ff;
  border-color: #bae6fd;
}

.item-row .chk {
  width: 17px;
  height: 17px;
  border-radius: 50%;
  border: 1.6px solid #94a3b8;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1.5px;
  font-size: 10px;
  font-weight: 900;
  color: transparent;
  background: #fff;
  transition: all 0.15s ease;
}

.item-row.active-item .chk {
  border-color: var(--route);
  box-shadow: 0 0 0 2.5px rgba(2, 132, 199, 0.15);
}

.item-row.checked {
  background: #f8fafc;
}

.item-row.checked .chk {
  background: var(--badge);
  border-color: var(--badge);
  color: #ffffff;
}

.item-row .item-tx {
  flex: 1;
  min-width: 0;
  word-break: break-word;
  transition: filter 0.18s ease, opacity 0.18s ease;
}

.item-row.checked .item-tx {
  color: #475569;
}

/* Ezber Modu Blur Effect */
.item-row.blurred .item-tx {
  filter: blur(5.5px);
  opacity: 0.65;
  user-select: none;
}

.item-row.blurred.active-item {
  background: #f5f3ff;
  border-color: #ddd6fe;
}

.item-row.blurred.active-item .chk {
  border-color: #7c3aed;
  box-shadow: 0 0 0 2.5px rgba(124, 58, 237, 0.16);
}

#pop .c-red { color: var(--red); font-weight: 600; }
#pop .c-cyan { color: var(--cyan); font-weight: 600; }
#pop .c-blue { color: var(--blue); font-weight: 600; }

#pop .nav {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

#pop .nav .btn-prev {
  flex: 0 0 auto;
  padding: 7px 11px;
}

#pop .nav .btn-enter {
  flex: 1;
  justify-content: center;
  background: var(--route);
  color: #fff;
  border-color: var(--route);
  font-weight: 600;
}

#pop .nav .btn-enter:hover {
  background: var(--route-dark);
}

#pop .nav .btn-enter.quiz-act {
  background: #7c3aed;
  border-color: #7c3aed;
}

#pop .nav .btn-enter.next-step-act {
  background: var(--badge-done);
  border-color: #059669;
}

/* ---------- FOOTER & BUTTONS ---------- */
footer {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px calc(8px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: var(--panel);
  z-index: 10;
  flex-wrap: wrap;
}

.btn {
  border: 1px solid var(--line-strong);
  background: var(--panel);
  color: var(--ink-soft);
  border-radius: 8px;
  padding: 7px 12px;
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  transition: all 0.14s ease;
}

.btn:hover {
  border-color: #94a3b8;
  background: var(--panel-alt);
  color: var(--ink);
}

.btn.icon-btn {
  width: 36px;
  padding: 0;
  justify-content: center;
}

.btn.enter-btn {
  background: var(--route);
  color: #ffffff;
  border-color: var(--route);
  font-weight: 600;
  box-shadow: 0 2px 6px rgba(2, 132, 199, 0.22);
}

.btn.enter-btn:hover {
  background: var(--route-dark);
  border-color: var(--route-dark);
  color: #ffffff;
}

.btn[aria-pressed="true"] {
  background: #e0f2fe;
  border-color: var(--route);
  color: var(--route-dark);
  font-weight: 600;
}

.btn svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
  flex-shrink: 0;
}

#counter {
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  font-weight: 700;
  font-size: 13px;
  min-width: 96px;
  text-align: center;
}

.spacer {
  flex: 1;
}

.hint {
  color: var(--muted);
  font-size: 12px;
}

.hint kbd {
  background: var(--panel-alt);
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  padding: 1px 5px;
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-soft);
}

.zoom {
  position: absolute;
  right: 14px;
  top: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 4;
}

.zoom .btn {
  font-size: 18px;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
}

#title {
  position: absolute;
  left: 16px;
  top: 14px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.4px;
  color: var(--muted);
  text-transform: uppercase;
  pointer-events: none;
  background: rgba(255, 255, 255, 0.85);
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid var(--line);
}

.nojs {
  position: absolute;
  left: 16px;
  top: 24px;
  width: calc(100vw - 32px);
  max-width: 520px;
  z-index: 9;
  background: var(--panel);
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink);
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.1);
}

.nojs b {
  display: block;
  margin-bottom: 4px;
  color: var(--red);
}

/* ---------- RESPONSIVE (TABLET & MOBILE) ---------- */
@media (max-width: 760px) {
  header {
    padding: 8px 12px;
    gap: 8px;
  }
  header h1 small {
    display: none;
  }
  .tabs {
    order: 3;
    flex-basis: 100%;
  }
  .hint {
    display: none;
  }
  #dmeHud {
    top: 46px;
    bottom: auto;
    left: 10px;
    right: 56px;
    padding: 4px 8px;
    font-size: 11px;
  }
  #pop {
    left: 10px !important;
    right: 10px;
    bottom: 10px;
    top: auto !important;
    max-width: none;
    max-height: 50%;
    overflow: auto;
  }
  .pop-items {
    max-height: 25dvh;
  }
  footer {
    gap: 6px;
    padding: 6px 10px calc(6px + env(safe-area-inset-bottom));
  }
  .btn .tx {
    display: none;
  }
  .mapctl input {
    width: 72px;
  }
  #scale {
    bottom: 10px;
    left: 10px;
  }
}
