/* Fuel Sketch – map-first iPad layout: floating instrument panels over a full-screen chart. */
:root {
  --glass: rgba(250, 251, 252, 0.94);
  --glass-strong: #ffffff;
  --ink: #0f1a24;
  --ink-2: #4a5866;
  --line: rgba(15, 26, 36, 0.12);
  --accent: #0b6e8a;
  --accent-ink: #ffffff;
  --ok: #15803d;
  --vfr: #15803d;
  --ifr: #4338ca;
  --cup: #f5e6d3;
  --low: #c81e1e;
  --warn-bg: #fff4e5;
  --warn-ink: #8a4b00;
  --shadow: 0 6px 24px rgba(15, 26, 36, 0.18), 0 1px 3px rgba(15, 26, 36, 0.12);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  --r: 14px;
  --sat: env(safe-area-inset-top, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
  --sal: env(safe-area-inset-left, 0px);
  --sar: env(safe-area-inset-right, 0px);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --glass: rgba(16, 24, 32, 0.92);
    --glass-strong: #16212b;
    --ink: #e8eef3;
    --ink-2: #9aabb9;
    --line: rgba(232, 238, 243, 0.14);
    --accent: #3ab7d6;
    --accent-ink: #062029;
    --ok: #4ade80;
    --vfr: #16a34a;
    --ifr: #6366f1;
    --cup: #5b4636;
    --low: #f87171;
    --warn-bg: #3a2a12;
    --warn-ink: #ffcf8a;
    --shadow: 0 6px 24px rgba(0, 0, 0, 0.5);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; overflow: hidden; }
body {
  font: 15px/1.35 var(--font); color: var(--ink); background: #0f1a24;
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent; overscroll-behavior: none;
}
button { font: inherit; color: inherit; cursor: pointer; }
input, select { font: inherit; color: var(--ink); -webkit-user-select: text; user-select: text; }
a { color: var(--accent); }
[hidden] { display: none !important; }

#stage { position: fixed; inset: 0; }
#map { position: absolute; inset: 0; background: #dfe5ea; touch-action: none; }
.leaflet-container { font: 12px/1.4 var(--font); }
.leaflet-marker-icon, .leaflet-marker-pane * { pointer-events: none !important; }
.leaflet-control-attribution { margin-bottom: calc(var(--sab)) !important; margin-right: var(--sar) !important; font-size: 10px; }

/* overlay: dwell ring + finger HUD */
#overlay { position: absolute; inset: 0; pointer-events: none; z-index: 650; }
#ring { position: absolute; left: -32px; top: -32px; }
#ring .track { fill: rgba(255, 255, 255, 0.35); stroke: rgba(15, 26, 36, 0.35); stroke-width: 5; }
#ring .prog { fill: none; stroke: #eab308; stroke-width: 5; stroke-linecap: round; }
#fingerHud {
  position: absolute; left: 0; top: 0; white-space: nowrap;
  padding: 6px 10px; border-radius: 10px; background: rgba(15, 26, 36, 0.86); color: #fff;
  font: 600 15px/1.2 var(--mono); font-variant-numeric: tabular-nums; box-shadow: var(--shadow);
}
#fingerHud.slow { background: rgba(91, 50, 180, 0.9); }

/* markers */
.mk { border-radius: 50%; display: grid; place-items: center; font: 700 11px/1 var(--font); }
.mk-start { background: #16a34a; border: 3px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.4); }
.mk-end { background: #16a34a; border: 3px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.4); }
.mk-ldg { background: #fff; color: #0f1a24; border: 3px solid #0f1a24; }
.mk-gt { background: #eab308; color: #0f1a24; border: 3px solid #0f1a24; font-size: 10px; }
.mk-snap { border: 2px dashed rgba(15, 26, 36, 0.75); background: rgba(255, 255, 255, 0.18); box-shadow: 0 0 0 2px rgba(255,255,255,.55) inset; }

/* dwell / marker menu */
#dwellMenu {
  position: absolute; left: 0; top: 0; z-index: 850; display: flex; gap: 8px; padding: 8px;
  background: var(--glass); border-radius: 18px; box-shadow: var(--shadow); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
#dwellMenu button {
  min-width: 76px; min-height: 56px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--glass-strong); font-weight: 700; font-size: 16px;
}
#dwellMenu button[data-act="gt"] { background: #eab308; color: #0f1a24; border-color: transparent; }
#dwellMenu button[data-act="ldg"] { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
#dwellMenu button.x { color: var(--ink-2); }
#dwellMenu button.hot, #dwellMenu button:active { outline: 3px solid var(--ink); outline-offset: 2px; transform: scale(1.04); }
#dwellMenu button.sel { box-shadow: 0 0 0 3px var(--glass), 0 0 0 5px var(--ink); }

/* right toolbar */
#toolbar {
  position: fixed; z-index: 800; right: calc(12px + var(--sar)); top: 50%; transform: translateY(-50%);
  display: flex; flex-direction: column; gap: 4px; padding: 6px;
  background: var(--glass); border-radius: 18px; box-shadow: var(--shadow);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
#toolbar button { position: relative; width: 52px; height: 52px; border: 0; border-radius: 12px; background: transparent; display: grid; place-items: center; }
#toolbar button:active { background: var(--line); }
#toolbar svg { width: 26px; height: 26px; }
#toolbar .sep { height: 1px; background: var(--line); margin: 2px 8px; }
#toolbar button.armed { background: var(--low); color: #fff; }
#toolbar button.armed::after {
  content: attr(data-label); position: absolute; right: 60px; white-space: nowrap; padding: 6px 10px; border-radius: 8px;
  background: var(--low); color: #fff; font-size: 13px; font-weight: 600;
}

#layerPop {
  position: fixed; z-index: 850; right: calc(80px + var(--sar)); top: 50%; transform: translateY(-50%);
  width: 290px; padding: 12px; background: var(--glass); border-radius: var(--r); box-shadow: var(--shadow);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
#layerPop h3 { margin: 0 0 6px; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-2); }
#layerPop { max-height: calc(100dvh - 40px - var(--sat) - var(--sab)); overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
#layerPop .ly-sep { border: 0; border-top: 1px solid var(--line); margin: 10px 0 12px; }
#layerPop .opt.ly { min-height: 40px; }
.ly-lg { width: 20px; height: 20px; flex: none; }
.ly-name { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.ly-name small { color: var(--ink-2); font-size: 11.5px; }
#layerPop .ly-none { font-size: 13px; margin: 2px 0 8px; }
#layerPop .ly-import { width: 100%; justify-content: center; margin-top: 6px; }
.ly-list li { gap: 8px; }
.ly-list .ly-rename { flex: 1; min-width: 0; font: inherit; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; background: transparent; color: inherit; }
.ly-list small { color: var(--ink-2); white-space: nowrap; }
.btn.small { min-height: 34px; padding: 4px 10px; font-size: 13px; }

/* bottom panel */
#panel {
  position: fixed; z-index: 800; left: calc(12px + var(--sal)); bottom: calc(26px + var(--sab));
  width: min(680px, calc(100% - 100px - var(--sal) - var(--sar))); max-height: 55vh; overflow: auto;
  background: var(--glass); border-radius: 18px; box-shadow: var(--shadow); padding: 6px;
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
.panel-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 4px 4px 8px; }
.hud-dist { display: flex; align-items: baseline; gap: 8px; border: 0; background: none; padding: 2px 6px; margin-right: auto; }
.hud-dist .lbl { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-2); }
.hud-dist b { font: 700 26px/1.1 var(--mono); font-variant-numeric: tabular-nums; }
.hud-stops { font-size: 13px; color: var(--ink-2); white-space: nowrap; }
.seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: 12px; background: var(--line); }
.seg button { border: 0; background: transparent; border-radius: 9px; padding: 7px 12px; font-size: 14px; font-weight: 700; color: var(--ink-2); min-height: 36px; }
.seg button.on { background: var(--glass-strong); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.18); }
.seg button.seg-vfr { background: var(--vfr); color: #fff; }
.seg button.seg-ifr { background: var(--ifr); color: #fff; }
.cols { display: grid; grid-template-columns: 28px minmax(0, 1fr) 70px 96px 112px 14px; gap: 8px; padding: 0 6px 4px; font-size: 10.5px; text-transform: uppercase; letter-spacing: .07em; color: var(--ink-2); text-align: right; font-weight: 600; }
.cols .mf-vfr { color: var(--vfr); } .cols .mf-ifr { color: var(--ifr); }
.panel-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 6px 2px; border-top: 1px solid var(--line); }
/* v1.0.1: Instructions button stays visible even when the panel scrolls */
#panel .panel-foot { position: sticky; bottom: -6px; margin-bottom: -6px; padding-bottom: 8px; background: var(--glass-strong); border-radius: 0 0 14px 14px; }
.panel-foot .hint { color: var(--ink-2); font-size: 12.5px; flex: 1; min-width: 0; }
.legend { margin-left: auto; display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-2); flex-wrap: wrap; }
.legend i { width: 18px; height: 5px; border-radius: 3px; display: inline-block; margin-left: 6px; }
.legend i.dash { background: repeating-linear-gradient(90deg, var(--c) 0 6px, transparent 6px 10px); }
.row { border-top: 1px solid var(--line); }
/* v0.28.0 (#76): one soft red flash when an aircraft tips into the red */
.row.flash { animation: rowFlash 1.2s ease-in-out both; }
@keyframes rowFlash {
  0% { background-color: transparent; }
  30%, 55% { background-color: color-mix(in srgb, var(--low) 26%, transparent); }
  100% { background-color: color-mix(in srgb, var(--low) 14%, transparent); }
}
/* v1.0.3: after the flash the row stays light red as long as the fuel is not enough */
.row.low, .row.flash { background-color: color-mix(in srgb, var(--low) 14%, transparent); }
.row-main {
  width: 100%; display: grid; grid-template-columns: 28px minmax(0, 1fr) 70px 96px 112px 14px; align-items: center; gap: 8px;
  border: 0; background: none; padding: 8px 6px; text-align: left;
}
.ac-icon { width: 26px; height: 26px; display: inline-grid; place-items: center; }
.ac-icon svg { width: 24px; height: 24px; }
.ac-name { font-weight: 600; }
.v { font: 700 16px/1.15 var(--mono); font-variant-numeric: tabular-nums; text-align: right; }
.v small { display: block; font: 500 10px/1.2 var(--font); text-transform: uppercase; letter-spacing: .07em; color: var(--ink-2); }
.v.low { color: var(--low); }
.dot { width: 12px; height: 12px; border-radius: 50%; }
.dot.ok { background: var(--ok); }
.dot.low { background: var(--low); box-shadow: 0 0 0 3px color-mix(in srgb, var(--low) 25%, transparent); }
.bd { margin: 0 6px 8px 42px; display: grid; gap: 2px; font-size: 13px; }
.bd div { display: flex; justify-content: space-between; gap: 12px; }
.bd dt { color: var(--ink-2); }
.bd dd { margin: 0; font-family: var(--mono); font-variant-numeric: tabular-nums; }
.bd .sum { border-top: 1px solid var(--line); padding-top: 2px; font-weight: 700; }
.bd .sum dt { color: var(--ink); }
.bd .sum.low dd { color: var(--low); }
.bd .sum.ok dd { color: var(--ok); }

#disclaimer {
  position: fixed; z-index: 790; left: calc(14px + var(--sal)); bottom: calc(6px + var(--sab));
  font-size: 11px; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.8); pointer-events: none;
}

#toast {
  position: fixed; z-index: 1200; left: 50%; top: calc(70px + var(--sat)); transform: translateX(-50%);
  max-width: min(520px, calc(100% - 32px)); padding: 10px 16px; border-radius: 12px;
  background: rgba(15, 26, 36, 0.92); color: #fff; font-size: 14px; box-shadow: var(--shadow); text-align: center;
}
#updateBanner {
  position: fixed; z-index: 1100; left: 50%; top: calc(64px + var(--sat)); transform: translateX(-50%);
  padding: 8px 8px 8px 14px; border-radius: 12px; background: var(--accent); color: var(--accent-ink);
  display: flex; gap: 10px; align-items: center; box-shadow: var(--shadow); font-weight: 600;
}
#updateBanner button { border: 0; border-radius: 8px; padding: 6px 12px; background: var(--accent-ink); color: var(--accent); font-weight: 700; }

/* settings sheet */
#sheet { position: fixed; inset: 0; z-index: 1000; background: rgba(5, 10, 15, 0.45); display: grid; place-items: center; padding: calc(16px + var(--sat)) max(16px, var(--sar)) calc(16px + var(--sab)) max(16px, var(--sal)); }
.sheet-card {
  width: min(760px, 100%); height: min(860px, 100%); display: flex; flex-direction: column;
  background: var(--glass-strong); border-radius: 20px; box-shadow: var(--shadow); overflow: hidden;
  -webkit-user-select: text; user-select: text;
}
.sheet-card header { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 6px 20px; }
.sheet-card h2 { margin: 0; font-size: 22px; }
.sheet-card h3 { margin: 18px 0 8px; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-2); }
.icon-btn { width: 44px; height: 44px; border: 0; background: none; border-radius: 10px; display: grid; place-items: center; }
.icon-btn svg { width: 22px; height: 22px; }
.tabs { display: flex; gap: 4px; padding: 0 14px 10px; overflow-x: auto; border-bottom: 1px solid var(--line); }
.tabs button { border: 0; background: none; padding: 8px 14px; border-radius: 10px; font-weight: 600; color: var(--ink-2); white-space: nowrap; }
.tabs button.on { background: var(--accent); color: var(--accent-ink); }
.sheet-body { padding: 14px 20px 24px; overflow: auto; flex: 1; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px 16px; }
.f { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--ink-2); min-width: 0; }
.f > span:first-child { font-weight: 600; }
.f .in { display: flex; align-items: center; gap: 6px; }
.f input, .f select {
  width: 100%; min-height: 44px; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line);
  background: color-mix(in srgb, var(--glass-strong) 85%, var(--ink) 4%); font-size: 16px;
}
.f input[type="color"] { padding: 4px; }
.f .unit { font: 600 13px var(--mono); color: var(--ink-2); min-width: 44px; }
.f small { color: var(--ink-2); font-size: 11.5px; }
.note { color: var(--ink-2); font-size: 13px; }
.lead { font-size: 18px; margin-top: 0; }
.warn { background: var(--warn-bg); color: var(--warn-ink); padding: 10px 12px; border-radius: 10px; font-weight: 600; }
.err { color: var(--low); font-weight: 600; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.btn {
  min-height: 44px; padding: 0 16px; border-radius: 10px; border: 1px solid var(--line); background: var(--glass-strong);
  font-weight: 600; display: inline-flex; align-items: center; text-decoration: none; color: var(--ink);
}
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.btn.danger { color: var(--low); border-color: color-mix(in srgb, var(--low) 45%, transparent); }
.btn.file input { display: none; }
.aclist { list-style: none; margin: 0; padding: 0; }
.aclist li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.aclist .ac-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.aclist .ac-txt small { color: var(--ink-2); }
.fav { width: 40px; height: 40px; border: 0; background: none; color: var(--ink-2); display: grid; place-items: center; }
.fav.on { color: #eab308; }
.fav svg { width: 24px; height: 24px; }
.opt { display: flex; align-items: center; gap: 10px; min-height: 44px; flex: 1; }
.opt input { width: 20px; height: 20px; accent-color: var(--accent); }
.optlist { display: flex; flex-direction: column; }
.support { margin-top: 18px; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line); }
.support h3 { margin-top: 0; }
.log { padding-left: 18px; font-size: 13px; }

@media (max-width: 700px) {
  .row-main { grid-template-columns: 22px minmax(0, 1fr) 54px 72px 72px 10px; gap: 6px; }
  .v { font-size: 14px; }
  .cols { grid-template-columns: 22px minmax(0, 1fr) 54px 72px 72px 10px; gap: 6px; }
  .legend { display: none; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* start ring in the map centre (no route yet) */
#startRing {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); border-radius: 50%;
  border: 3px dashed #16a34a; background: rgba(22, 163, 74, 0.14); box-shadow: 0 0 0 3px rgba(255,255,255,.7);
  display: grid; place-items: center; animation: pulse 1.8s ease-in-out infinite;
}
#startRing .sr-label {
  position: absolute; top: calc(100% + 8px); white-space: nowrap; padding: 3px 8px; border-radius: 8px;
  background: #16a34a; color: #fff; font-weight: 700; font-size: 13px;
}
#startRing::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: #16a34a; border: 2px solid #fff; }
@keyframes pulse { 50% { box-shadow: 0 0 0 9px rgba(22, 163, 74, 0.18); } }

/* coffee pop-up */
#coffeePop {
  position: fixed; z-index: 900; top: calc(12px + var(--sat)); right: calc(12px + var(--sar));
  width: min(380px, calc(100% - 24px)); padding: 12px 12px 8px; display: grid; grid-template-columns: 52px 1fr; column-gap: 12px; align-items: center; border-radius: 18px;
  background: var(--glass); box-shadow: var(--shadow); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  animation: pop .45s cubic-bezier(.2, 1.4, .4, 1);
}
#coffeePop p { margin: 2px 30px 0 0; font-size: 15px; font-weight: 600; text-wrap: balance; }
#coffeePop small { grid-column: 1 / -1; display: block; margin-top: 6px; color: var(--ink-2); font-size: 11px; }
.cp-cup { width: 52px; height: 52px; color: #7a4b2a; animation: wobble 2.4s ease-in-out .5s 2; transform-origin: 50% 90%; }
.cp-cup svg { width: 100%; height: 100%; }
.cp-cup .steam { animation: steam 1.6s ease-in-out infinite; }
.cp-cup .s2 { animation-delay: .3s; } .cp-cup .s3 { animation-delay: .6s; }
.cp-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.cp-actions .btn { min-height: 40px; padding: 0 12px; font-size: 14px; }
.cp-x { position: absolute; top: 8px; right: 8px; width: 36px; height: 36px; border: 0; background: none; border-radius: 10px; display: grid; place-items: center; color: var(--ink-2); }
.cp-x svg { width: 18px; height: 18px; }
@keyframes pop { from { transform: translateY(-12px) scale(.6); opacity: 0; } }
@keyframes wobble { 25% { transform: rotate(-9deg); } 50% { transform: rotate(7deg); } 75% { transform: rotate(-4deg); } }
@keyframes steam { 50% { transform: translateY(-3px); opacity: .35; } }

/* aircraft icon picker & photo */
.iconpick { display: flex; flex-wrap: wrap; gap: 6px; }
.iconpick button { width: 44px; height: 44px; border-radius: 10px; border: 1px solid var(--line); background: var(--glass-strong); display: grid; place-items: center; padding: 0; }
.iconpick button svg { width: 26px; height: 26px; }
.iconpick button.on { outline: 3px solid var(--accent); outline-offset: 1px; }
.photo-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ac-icon.photo { border-radius: 50%; overflow: hidden; background: var(--line); }
.ac-icon.photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ac-icon.photo.big { width: 44px; height: 44px; }
.ac-icon.photo.big:empty { display: none; }
.aclist li .btn { min-height: 38px; padding: 0 12px; }
.row { cursor: pointer; }

/* update notice */
#updateBanner { top: calc(12px + var(--sat)); padding: 10px 10px 10px 14px; font-size: 15px; animation: pop .45s cubic-bezier(.2, 1.4, .4, 1); }
.upd-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent-ink); animation: blink 1.2s ease-in-out infinite; }
#toolbar button.badge::before { content: ""; position: absolute; top: 9px; right: 9px; width: 11px; height: 11px; border-radius: 50%; background: #e11d48; border: 2px solid var(--glass-strong); }
@keyframes blink { 50% { opacity: .25; } }

/* speeds under the aircraft name, in line colours */
.ac-name { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.ac-name b { display: flex; gap: 6px; align-items: baseline; min-width: 0; white-space: nowrap; }
.ac-name .nm { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.ac-name .ff { flex: none; }
.spd { display: flex; align-items: center; gap: 10px; font: 600 12px/1 var(--mono); font-variant-numeric: tabular-nums; color: var(--ink-2); white-space: nowrap; }
.sp { display: inline-flex; align-items: center; gap: 4px; }
.sp i { width: 16px; height: 4px; border-radius: 2px; background: var(--c); }
.sp i.dash { background: repeating-linear-gradient(90deg, var(--c) 0 5px, transparent 5px 8px); }
.sp-u { font-family: var(--font); font-weight: 500; font-size: 11px; }

#startRing .sr-btn {
  position: absolute; width: 46px; height: 46px; border-radius: 50%; border: 0; display: grid; place-items: center;
  background: var(--glass-strong); color: var(--ink); box-shadow: var(--shadow); pointer-events: auto;
}
#startRing .sr-btn svg { width: 24px; height: 24px; }
#startRing .sr-home { top: -38px; left: -38px; }
#startRing .sr-locate { top: -38px; right: -38px; }
#startRing .sr-btn:active { transform: scale(.94); }

.ac-name .ff { font: 500 12.5px var(--mono); color: var(--ink-2); }

/* aircraft list: tap = edit, swipe left = delete */
.aclist li.acrow { position: relative; padding: 0; overflow: hidden; touch-action: pan-y; }
.acrow-inner { position: relative; z-index: 1; display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 4px; background: var(--glass-strong); transition: transform .2s ease; cursor: pointer; }
.acrow.swiped .acrow-inner { transform: translateX(-110px); }
.acrow-del { position: absolute; z-index: 0; right: 0; top: 0; bottom: 0; width: 110px; border: 0; background: var(--low); color: #fff; font-weight: 700; }
.aclist.picking .acrow-inner { padding-left: 8px; }
.pick { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--ink-2); flex: none; }
.pick.on { background: var(--accent); border-color: var(--accent); box-shadow: inset 0 0 0 3px var(--glass-strong); }
.btn[disabled] { opacity: .45; }
#updateBanner button.ghost { background: transparent; color: var(--accent-ink); }

.aclist { -webkit-user-select: none; user-select: none; }

/* stop menu v0.6 */
#dwellMenu button.gt { background: #eab308; color: #0f1a24; border-color: transparent; }
#dwellMenu button.slowbtn { background: #e0129a; color: #fff; border-color: transparent; }
#dwellMenu button.slowbtn.off { background: #2563eb; color: #fff; }
#dwellMenu button.close { min-width: 56px; }
.slow-chip { padding: 4px 10px; border-radius: 999px; background: #e0129a; color: #fff; font-size: 12px; font-weight: 700; letter-spacing: .04em; }

/* fold / compact panel */
.chip.fold { width: 40px; padding: 6px 0; font-size: 16px; line-height: 1; }
.chip.cyc { min-width: 52px; font-family: var(--mono); }
.chip.res-vfr { background: var(--vfr); color: #fff; border-color: transparent; }
.chip.res-ifr { background: var(--ifr); color: #fff; border-color: transparent; }
#panel.compact { padding: 4px 6px; }
#panel.compact .panel-head { padding: 2px 2px 4px; gap: 6px; }
#panel.compact .hud-dist b { font-size: 20px; }
#panel.compact .hud-dist .lbl, #panel.compact .hud-stops, #panel.compact .panel-foot, #panel.compact .spd, #panel.compact .ff { display: none; }
#panel.compact .cols { padding-bottom: 2px; font-size: 9.5px; }
#panel.compact .row-main { padding: 5px 4px; }
#panel.compact .v { font-size: 14px; }
#panel.compact .ac-name { font-size: 13.5px; }

/* phones: map first */
@media (max-width: 600px) {
  #toolbar { top: calc(8px + var(--sat)); transform: none; right: calc(8px + var(--sar)); padding: 4px; gap: 2px; border-radius: 14px; }
  #toolbar button { width: 42px; height: 42px; }
  #toolbar svg { width: 22px; height: 22px; }
  #layerPop { top: calc(8px + var(--sat)); transform: none; right: calc(62px + var(--sar)); }
  #panel { left: calc(8px + var(--sal)); right: calc(8px + var(--sar)); width: auto; bottom: calc(18px + var(--sab)); border-radius: 14px; max-height: 42vh; }
  #panel .cols, #panel.compact .cols { grid-template-columns: 20px minmax(0, 1fr) 50px 62px 70px 10px; gap: 5px; }
  #panel .row-main { grid-template-columns: 20px minmax(0, 1fr) 50px 62px 70px 10px; gap: 5px; }
  #panel .v, #panel.compact .v { font-size: 13px; }
  .chip { border-radius: 999px; }
  #panel .ac-icon, #panel .ac-icon svg { width: 20px; height: 20px; }
  .seg button { padding: 5px 9px; min-height: 30px; font-size: 13px; }
  #disclaimer { font-size: 10px; bottom: auto; top: calc(8px + var(--sat)); left: calc(10px + var(--sal)); max-width: calc(100% - 80px); }
  #coffeePop { top: auto; bottom: calc(40vh + var(--sab)); right: 8px; left: 8px; width: auto; }
  #startRing .sr-btn { width: 40px; height: 40px; }
}

.v, .cols span { white-space: nowrap; }

.mk-target { border: 3px solid #16a34a; background: rgba(22, 163, 74, 0.18); animation: pulse 1s ease-in-out infinite; }
.chip { border: 1px solid var(--line); background: var(--glass-strong); border-radius: 999px; padding: 6px 12px; font-size: 13px; font-weight: 700; min-height: 34px; }
.chip.fold { color: var(--ink-2); }

/* ask pop-up */
#askPop { position: fixed; z-index: 1100; left: 50%; top: 40%; transform: translate(-50%, -50%); width: min(340px, calc(100% - 32px)); padding: 16px; border-radius: 18px; background: var(--glass-strong); box-shadow: var(--shadow); animation: pop .3s ease-out; }
#askPop p { margin: 0 0 4px; font-weight: 700; font-size: 16px; }
/* airport suggestions */
.suggest-wrap { position: relative; }
.suggest { position: absolute; z-index: 5; left: 0; right: 0; top: 100%; margin: 4px 0 0; padding: 4px; list-style: none; background: var(--glass-strong); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); max-height: 300px; overflow: auto; }
.suggest button { width: 100%; text-align: left; border: 0; background: none; padding: 10px; border-radius: 8px; font-size: 15px; }
.suggest button:active, .suggest button:hover { background: var(--line); }
.suggest b { font-family: var(--mono); margin-right: 6px; }
.suggest .none { padding: 10px; color: var(--ink-2); font-size: 14px; }
.preset-box { margin-top: 18px; padding: 4px 14px 12px; border: 1px solid var(--line); border-radius: 14px; }
.btn.on { outline: 2px solid var(--accent); }
.btn.supporter { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 45%, transparent); }

/* sync code + feedback */
.code-box { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--line); }
.code-box code { font: 700 20px/1.2 var(--mono); letter-spacing: .06em; -webkit-user-select: all; user-select: all; }
textarea { width: 100%; min-height: 130px; padding: 10px; border-radius: 10px; border: 1px solid var(--line); background: color-mix(in srgb, var(--glass-strong) 85%, var(--ink) 4%); font: inherit; font-size: 16px; color: var(--ink); resize: vertical; -webkit-user-select: text; user-select: text; }

.mono-small { font-family: var(--mono); font-size: 11.5px; }

.sync-hint { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; justify-content: space-between; padding: 10px 12px; margin-bottom: 8px; border-radius: 12px; background: color-mix(in srgb, var(--accent) 12%, transparent); font-size: 13.5px; }
.sync-hint.on { color: var(--ok); background: color-mix(in srgb, var(--ok) 10%, transparent); font-weight: 600; }

/* fleet */
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
fieldset.locked { opacity: .55; }
.fleet-lock { padding: 10px 12px; border-radius: 12px; background: color-mix(in srgb, var(--ifr) 12%, transparent); font-size: 13.5px; font-weight: 600; }
.acrow.locked .acrow-inner { cursor: default; }
.acrow .lock { font-size: 14px; opacity: .7; padding: 0 6px; }
.fleet-create { margin-top: 14px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; }
.fleet-create summary { cursor: pointer; font-weight: 700; }
.lbl-small { margin: 10px 0 4px; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-2); font-weight: 600; }
.warn-text { color: var(--low); font-weight: 600; }
#dwellMenu button .sub { display: block; font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; opacity: .75; margin-bottom: 2px; }

/* instant touch feedback */
button, .btn, .chip, .seg button, #toolbar button, .sr-btn { transition: transform .08s ease, filter .08s ease, background-color .08s ease; }
button:active, .btn:active, .chip:active, label.btn:active { filter: brightness(.82); transform: scale(.96); }
.btn.primary:active { filter: brightness(.85); }
.linkbtn { border: 0; background: none; padding: 0; color: var(--accent); text-decoration: underline; font-size: 13px; cursor: pointer; }
/* fleet invite */
.invite { display: flex; gap: 14px; align-items: center; margin-top: 10px; flex-wrap: wrap; }
.invite .qr { width: 150px; height: 150px; background: #fff; border-radius: 10px; padding: 4px; flex: none; }
.invite .qr svg { width: 100%; height: 100%; display: block; }
.invite .note { flex: 1; min-width: 180px; }
/* changelog */
.log details { border-bottom: 1px solid var(--line); padding: 6px 0; }
.log summary { cursor: pointer; font-size: 13.5px; }
.log ul { margin: 6px 0 4px; padding-left: 18px; font-size: 12.5px; color: var(--ink-2); }
/* translation */
.tr-list { display: flex; flex-direction: column; gap: 8px; }
.tr-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; align-items: start; }
.tr-en { font-size: 13px; color: var(--ink-2); padding-top: 8px; }
.tr-row textarea { min-height: 40px; padding: 8px; font-size: 14px; }
.sticky-actions { position: sticky; bottom: -24px; background: var(--glass-strong); padding: 10px 0 14px; }
@media (max-width: 600px) { .tr-row { grid-template-columns: 1fr; gap: 4px; } .tr-en { padding-top: 0; } }

/* v0.12.0 panel: always full view, two-line rows, choice chips */
.row-main { grid-template-rows: auto auto; row-gap: 3px; }
.row-main .nm { font-weight: 600; white-space: normal; overflow-wrap: anywhere; line-height: 1.2; min-width: 0; }
.row-main .sub { grid-column: 2 / -1; grid-row: 2; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; min-width: 0; }
.row-main .sub .ff { font: 500 12.5px var(--mono); color: var(--ink-2); white-space: nowrap; }
.chip.pickchip { display: inline-flex; align-items: center; gap: 6px; min-width: 64px; justify-content: center; }
.chip.pickchip .caret { width: 0; height: 0; border-left: 4px solid transparent; border-right: 4px solid transparent; border-top: 5px solid currentColor; opacity: .7; }
#choicePop {
  position: fixed; z-index: 950; display: flex; gap: 4px; padding: 5px; border-radius: 14px;
  background: var(--glass-strong); box-shadow: var(--shadow); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
#choicePop[hidden] { display: none; }
#choicePop button { min-width: 60px; min-height: 44px; padding: 0 14px; border: 0; border-radius: 10px; background: transparent; font: 700 15px var(--mono); color: var(--ink); }
#choicePop button.on { background: var(--line); }
#choicePop button.opt-vfr.on, #choicePop button.opt-vfr:active { background: var(--vfr); color: #fff; }
#choicePop button.opt-ifr.on, #choicePop button.opt-ifr:active { background: var(--ifr); color: #fff; }
#choicePop button.opt-vfr:not(.on) { color: var(--vfr); } #choicePop button.opt-ifr:not(.on) { color: var(--ifr); }
@media (max-width: 600px) {
  .row-main .sub { gap: 3px 10px; }
  .row-main .sub .spd { gap: 8px; font-size: 11.5px; }
  .row-main .nm { font-size: 14px; }
}
/* Min fuel = most important value */
.row-main .v.mf { font-size: 19px; font-weight: 800; }
@media (max-width: 600px) { #panel .row-main .v.mf { font-size: 15.5px; } }
/* airports overlay */
.ap-lbl { font: 700 11px/1 var(--mono); color: #4c1d95; white-space: nowrap; text-shadow: 0 0 2px #fff, 0 0 2px #fff, 0 0 3px #fff; pointer-events: none; }

/* v0.14.0 – route export */
#toolbar button[hidden] { display: none; }
#exportPop { position: fixed; z-index: 1100; left: 50%; top: 45%; transform: translate(-50%, -50%); width: min(380px, calc(100% - 32px)); max-height: calc(100% - 40px); overflow: auto; padding: 18px 16px 14px; border-radius: 18px; background: var(--glass-strong); box-shadow: var(--shadow); animation: pop .3s ease-out; }
#exportPop h3 { margin: 0 36px 2px 0; font-size: 18px; }
#exportPop .cp-x { position: absolute; top: 10px; right: 10px; }
.exp-list { display: grid; gap: 8px; margin: 12px 0 10px; }
.exp-btn { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; width: 100%; min-height: 56px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--glass); color: var(--ink); text-align: left; }
.exp-btn b { font-size: 16px; }
.exp-btn span { font-size: 13px; color: var(--ink-2); }
.exp-btn:active { background: var(--line); }
.exp-btn:disabled { opacity: .55; }
/* home base privacy hint */
.note.privacy { display: flex; align-items: center; gap: 8px; margin: 6px 0 10px; }
.note.privacy svg { flex: none; width: 18px; height: 18px; color: var(--ok, #16a34a); }
/* v0.14.1 – export button pops when it appears */
#exportFab.appear { animation: tb-appear 2.4s ease-out; }
@keyframes tb-appear {
  0% { transform: scale(.5); background: #f97316; color: #fff; box-shadow: 0 0 0 0 rgba(249,115,22,.7); }
  12% { transform: scale(1.3); background: #f97316; color: #fff; }
  25% { transform: scale(1); background: #f97316; color: #fff; box-shadow: 0 0 0 14px rgba(249,115,22,0); }
  40% { transform: scale(1.2); background: #f97316; color: #fff; box-shadow: 0 0 0 0 rgba(249,115,22,.7); }
  55% { transform: scale(1); background: #f97316; color: #fff; box-shadow: 0 0 0 14px rgba(249,115,22,0); }
  80% { background: #f97316; color: #fff; }
  100% { transform: scale(1); background: transparent; }
}
.exp-btn.ff { border-color: #2563eb; background: rgba(37, 99, 235, .08); }
.exp-btn.ff b { color: #2563eb; }
/* company export targets (v0.23.0) */
.exp-co { margin: 4px 0 6px; }
.exp-co-list { margin-bottom: 12px; }
.exp-btn.co { border-color: #7c3aed; background: rgba(124, 58, 237, .08); }
.exp-btn.co b { color: #7c3aed; }
.exp-clip { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: #7c3aed; border: 1px solid #7c3aed; border-radius: 6px; padding: 0 5px; margin-left: 6px; vertical-align: 2px; }
.exp-steps { margin: 8px 0 4px; }
.exp-paste { margin: 0 0 12px; padding: 10px 12px; border-radius: 10px; background: rgba(124, 58, 237, .08); color: #7c3aed; }
.cox-card { border: 1px solid var(--line); border-left: 4px solid #7c3aed; border-radius: 12px; padding: 8px 12px 4px; margin: 10px 0; }
.cox-card.off { opacity: .65; border-left-color: var(--line); }
.cox-head { display: flex; align-items: center; gap: 6px; }
.cox-head .opt { flex: 1; margin: 0; }
/* reorder aircraft */
.ac-grip { flex: none; display: grid; place-items: center; width: 40px; height: 44px; margin-left: 2px; color: var(--ink-2); cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; }
.ac-grip svg { width: 22px; height: 22px; }
.aclist li.acrow.dragging { z-index: 5; overflow: visible; box-shadow: var(--shadow); border-radius: 12px; transition: none; }
.aclist li.acrow.dragging .acrow-inner { border-radius: 12px; }
.aclist li.acrow.dragging .ac-grip { cursor: grabbing; color: var(--ink); }
@media (max-width: 600px) {
  .acrow .ac-grip { width: 30px; margin-left: 0; }
  .acrow-inner > .btn[data-dup] { padding: 6px 10px; min-height: 34px; font-size: 14px; }
}
/* v0.14.2 – export button top left on the map */
#exportFab { position: fixed; z-index: 800; top: calc(14px + var(--sat)); left: calc(72px + var(--sal)); display: flex; align-items: center; gap: 8px; height: 48px; padding: 0 18px 0 14px; border: 0; border-radius: 999px; background: var(--glass-strong); color: var(--ink); box-shadow: var(--shadow); font-weight: 700; font-size: 16px; }
#exportFab[hidden] { display: none; }
#exportFab svg { width: 24px; height: 24px; }
#exportFab:active { transform: scale(.95); }
@media (max-width: 600px) { #exportFab { top: calc(30px + var(--sat)); left: calc(58px + var(--sal)); height: 42px; padding: 0 14px 0 11px; font-size: 15px; } }
/* v0.14.3 – airfield in the stop menu */
#dwellMenu { flex-direction: column; max-width: calc(100vw - 16px); }
#dwellMenu .dm-row { display: flex; gap: 8px; }
#dwellMenu .dm-point { display: flex; align-items: baseline; gap: 8px; padding: 2px 6px 0; font-size: 15px; color: var(--ink); min-width: 0; }
#dwellMenu .dm-point b { font-family: var(--mono); color: #7c3aed; font-size: 17px; }
#dwellMenu .dm-point span { color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* v0.14.4 – compact stop menu with "End of route" */
#dwellMenu button { min-width: 0; padding: 0 12px; }
#dwellMenu button.endbtn { background: #0f1a24; color: #fff; border-color: transparent; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) #dwellMenu button.endbtn { background: #f8fafc; color: #0f1a24; } }
@media (max-width: 600px) {
  #dwellMenu { padding: 6px; gap: 6px; }
  #dwellMenu .dm-row { gap: 6px; }
  #dwellMenu button { min-height: 50px; padding: 0 7px; font-size: 14px; }
  #dwellMenu button .sub { font-size: 8.5px; letter-spacing: .02em; }
  /* iPhone: up to 5 buttons – wrap into two rows, stay left of the toolbar */
  #dwellMenu { max-width: calc(100vw - 84px - var(--sar)); }
  #dwellMenu .dm-row { flex-wrap: wrap; }
  #dwellMenu .dm-row button { flex: 1 1 28%; }
}
/* v0.14.6 – double-tap on Home must not zoom the page */
#toolbar button, #startRing .sr-btn, #exportFab { touch-action: manipulation; }
/* v0.14.7 – instructions */
.help-btn { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; padding: 4px 6px; border-radius: 8px; color: var(--ink-2); font-size: 13px; font-weight: 600; }
.help-btn svg { width: 18px; height: 18px; }
.help-btn:active { background: var(--line); }
/* v1.0.0: inside the safe area with ~a finger's width of map above and below (tap there = close); only the body scrolls */
#helpPop { position: fixed; z-index: 1100; left: 50%; top: calc(var(--sat) + (100% - var(--sat) - var(--sab)) / 2); transform: translate(-50%, -50%); width: min(460px, calc(100% - 32px)); max-height: min(720px, calc(100% - var(--sat) - var(--sab) - 150px)); display: flex; flex-direction: column; padding: 14px 16px 0; border-radius: 18px; background: var(--glass-strong); box-shadow: var(--shadow); animation: pop .3s ease-out; }
#helpPop[hidden] { display: none; }
#helpPop .help-hd { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex: none; margin-bottom: 6px; }
#helpPop h3 { margin: 0; font-size: 18px; }
#helpPop .cp-x { position: static; flex: none; margin-right: -8px; }
#helpPop .help-body { overflow: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; padding-bottom: 12px; }
.help-list { margin: 0 0 10px; padding-left: 20px; display: grid; gap: 8px; font-size: 14.5px; line-height: 1.4; }
.help-web { margin: 0 0 8px; font-size: 14px; opacity: .85; }
/* v0.14.8 – home long-press */
#tbHome, #startRing .sr-home { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
#homeHint { position: fixed; z-index: 900; transform: translateY(-50%); padding: 8px 12px; border-radius: 12px; background: #0f1a24; color: #fff; font-size: 14px; font-weight: 600; white-space: nowrap; box-shadow: var(--shadow); pointer-events: none; animation: pop .3s ease-out; }
#homeHint::after { content: ""; position: absolute; right: -6px; top: 50%; transform: translateY(-50%); border: 6px solid transparent; border-right: 0; border-left-color: #0f1a24; }
#homeHint[hidden] { display: none; }
/* v0.14.9 – route counter and milestone star */
.cp-star { color: #eab308; animation: star-pop 1.2s ease-out; }
@keyframes star-pop { 0% { transform: scale(.2) rotate(-40deg); } 60% { transform: scale(1.25) rotate(10deg); } 100% { transform: scale(1) rotate(0); } }
.route-count { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 15px; }
.route-count .stars { display: inline-flex; gap: 2px; color: #eab308; }
.route-count .stars svg { width: 18px; height: 18px; }
/* v0.14.11 – narrow screens: room for h:mm and 4-digit fuel */
@media (max-width: 600px) {
  #panel .cols, #panel .row-main { grid-template-columns: 20px minmax(0, 1fr) 52px 68px 78px 10px; gap: 4px; }
  #panel .v { font-size: 12.5px; letter-spacing: -0.02em; }
  #panel .row-main .v.mf { font-size: 14px; letter-spacing: -0.03em; }
}
/* v0.14.13 – icon gallery */
.grid > .f.wide { grid-column: 1 / -1; }
.iconpick.gallery button { width: 56px; height: 56px; }
.iconpick.gallery .ac-icon { width: 48px; height: 48px; }
.ac-icon.gal { background: var(--ac); -webkit-mask-size: contain; mask-size: contain; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; -webkit-mask-position: center; mask-position: center; isolation: isolate; }
.ac-icon.gal img { width: 100%; height: 100%; object-fit: contain; display: block; mix-blend-mode: multiply; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .ac-icon.gal { filter: brightness(1.45) saturate(1.1); } }
:root[data-theme="dark"] .ac-icon.gal { filter: brightness(1.45) saturate(1.1); }
/* v0.14.15 – Save at the top of the aircraft form */
.sheet-card header .save-top { margin-left: auto; margin-right: 6px; min-height: 38px; padding: 0 18px; animation: pop .25s ease-out; }
.sheet-card header .save-top[hidden] { display: none; }
/* v0.15.0 – chip labels, last changed */
.pickchip .chip-lbl { font-weight: 600; opacity: .7; margin-right: 5px; font-size: .88em; }
.f > .f-lbl { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.f-aside { font-style: normal; font-weight: 400; font-size: 12px; color: var(--ink-2); white-space: nowrap; }
.ac-txt small.upd { display: block; font-size: 11.5px; opacity: .8; }
/* v0.15.0 – icon picker and photo crop */
.icon-current { display: inline-flex; align-items: center; gap: 10px; min-height: 52px; padding: 6px 14px 6px 8px; border: 1px solid var(--line); border-radius: 12px; background: var(--glass-strong); color: var(--ink); font-weight: 600; }
.icon-current .ac-icon { width: 40px; height: 40px; }
.icon-current .ac-icon svg { width: 34px; height: 34px; }
.icon-current .caret { margin-left: 2px; }
.icon-current[aria-expanded="true"] .caret { transform: rotate(180deg); }
.icon-grid { margin-top: 10px; }
/* v0.25.0: many icons → the tiles scroll inside the picker */
.icon-tiles { display: grid; grid-template-columns: repeat(auto-fill, 60px); gap: 8px; max-height: 288px; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; padding: 4px; border: 1px solid var(--line); border-radius: 14px; }
.icon-grid .tile.upload.full { opacity: .5; }
.icon-help { margin-top: 10px; padding: 10px 12px; border: 1px dashed var(--line); border-radius: 12px; }
.icon-help p { margin: 4px 0 8px; font-size: 13px; }
.icon-help .actions { margin: 6px 0; }
.icon-help .note { margin: 6px 0 0; }
a.btn { text-decoration: none; display: inline-flex; align-items: center; }
/* v0.25.0: read-only company aircraft – readable, not greyed out */
fieldset.ro { border: 0; padding: 0; margin: 0; min-width: 0; }
fieldset.ro input, fieldset.ro select { opacity: 1; color: var(--ink); -webkit-text-fill-color: var(--ink); }
fieldset.ro .icon-current { cursor: default; }
.icon-grid[hidden] { display: none; }
.icon-grid .tile { width: 60px; height: 60px; border-radius: 12px; border: 1px solid var(--line); background: var(--glass-strong); display: grid; place-items: center; padding: 0; color: var(--ink-2); }
.icon-grid .tile.on { outline: 3px solid var(--accent); outline-offset: 1px; }
.icon-grid .tile .ac-icon { width: 44px; height: 44px; }
.icon-grid .tile .ac-icon svg { width: 36px; height: 36px; }
.icon-grid .tile.upload { cursor: pointer; gap: 0; align-content: center; }
.icon-grid .tile.upload input { display: none; }
.icon-grid .tile.upload svg { width: 24px; height: 24px; }
.icon-grid .tile.upload small { font-size: 11px; font-weight: 600; }
#cropPop { position: fixed; inset: 0; z-index: 1300; background: rgba(5, 10, 15, .55); display: grid; place-items: center; padding: 16px; }
#cropPop .crop-card { width: min(340px, 100%); background: var(--glass-strong); border-radius: 18px; box-shadow: var(--shadow); padding: 16px; }
#cropPop h3 { margin: 0 0 4px; font-size: 18px; }
.crop-view { position: relative; width: min(280px, 100%); aspect-ratio: 1; margin: 10px auto; border-radius: 12px; overflow: hidden; background: #000; touch-action: none; cursor: grab; }
.crop-view canvas { display: block; }
.crop-ring { position: absolute; inset: 0; border-radius: 50%; box-shadow: 0 0 0 999px rgba(0,0,0,.45); border: 2px solid rgba(255,255,255,.9); pointer-events: none; }
.crop-zoom { width: 100%; margin: 4px 0 10px; }
/* v0.15.0 – map search (top left) */
#mapSearch { position: fixed; z-index: 810; top: calc(14px + var(--sat)); left: calc(14px + var(--sal)); }
#mapSearch .ms-btn { width: 48px; height: 48px; border-radius: 50%; border: 0; background: var(--glass-strong); color: var(--ink); box-shadow: var(--shadow); display: grid; place-items: center; }
#mapSearch .ms-btn svg { width: 24px; height: 24px; }
#mapSearch .ms-btn[hidden] { display: none; }
#mapSearch .ms-box { display: flex; align-items: center; gap: 6px; width: min(380px, calc(100vw - 120px)); height: 48px; padding: 0 6px 0 14px; border-radius: 999px; background: var(--glass-strong); box-shadow: var(--shadow); }
#mapSearch .ms-box[hidden] { display: none; }
#mapSearch .ms-ico svg { width: 20px; height: 20px; color: var(--ink-2); display: block; }
#mapSearch input { flex: 1; min-width: 0; border: 0; background: none; font-size: 17px; color: var(--ink); outline: none; -webkit-appearance: none; }
#mapSearch .ms-x { width: 38px; height: 38px; border: 0; background: none; border-radius: 50%; display: grid; place-items: center; color: var(--ink-2); }
#mapSearch .ms-x svg { width: 20px; height: 20px; }
#mapSearch .ms-list { list-style: none; margin: 6px 0 0; padding: 4px; width: min(380px, calc(100vw - 120px)); max-height: 50vh; overflow: auto; background: var(--glass-strong); border-radius: 14px; box-shadow: var(--shadow); }
#mapSearch .ms-list[hidden] { display: none; }
#mapSearch .ms-list button { width: 100%; display: flex; gap: 10px; align-items: baseline; text-align: left; border: 0; background: none; padding: 10px; border-radius: 10px; font-size: 15px; color: var(--ink); }
#mapSearch .ms-list button:active, #mapSearch .ms-list button:hover { background: var(--line); }
#mapSearch .ms-list b { font-family: var(--mono); color: #7c3aed; min-width: 44px; }
#mapSearch .ms-list .none { padding: 10px; color: var(--ink-2); font-size: 14px; }
#mapSearch.open ~ #exportFab { display: none; }
.mk-found { border-radius: 50%; border: 3px solid #7c3aed; background: rgba(124, 58, 237, .18); animation: found-pulse 1.2s ease-out 3; display: grid !important; place-items: center; }
.mk-found span { position: absolute; top: -24px; left: 50%; transform: translateX(-50%); padding: 2px 7px; border-radius: 7px; background: #7c3aed; color: #fff; font: 700 12px var(--mono); white-space: nowrap; }
@keyframes found-pulse { 0% { box-shadow: 0 0 0 0 rgba(124, 58, 237, .6); } 100% { box-shadow: 0 0 0 22px rgba(124, 58, 237, 0); } }
@media (max-width: 600px) { #mapSearch { top: calc(30px + var(--sat)); left: calc(8px + var(--sal)); } #mapSearch .ms-btn { width: 42px; height: 42px; } #mapSearch .ms-box, #mapSearch .ms-list { width: calc(100vw - 80px); } }
/* v0.15.0 – waypoint button, start flash */
#dwellMenu button.wpbtn { background: #374151; color: #fff; border-color: transparent; }
.start-flash { position: absolute; border-radius: 50%; pointer-events: none; background: rgba(22, 163, 74, .55); border: 3px solid #16a34a; animation: start-flash .85s ease-out forwards; }
@keyframes start-flash { 0% { transform: scale(.6); opacity: 1; } 40% { transform: scale(1.1); opacity: .95; } 100% { transform: scale(1.5); opacity: 0; } }
/* v0.15.0 – share app with content, welcome */
.share-box { margin: 10px 0 14px; padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--glass); }
.share-box .opt-head { font-weight: 700; font-size: 13px; color: var(--ink-2); margin: 4px 0 2px; }
.share-box .opt.sub { padding-left: 18px; }
.share-box .opt .ac-icon { width: 22px; height: 22px; margin-right: 6px; }
.share-box .opt.dis { opacity: .5; }
.share-box .opt small { color: var(--ink-2); font-weight: 400; }
.share-out { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin: 12px 0; }
.share-qr { width: 168px; height: 168px; background: #fff; border-radius: 10px; display: grid; place-items: center; flex: none; }
.share-qr svg { width: 160px; height: 160px; }
.share-qr .note { padding: 10px; color: #334155; text-align: center; }
.share-side { flex: 1; min-width: 180px; }
.share-box h4 { margin: 14px 0 2px; font-size: 14px; }
#welcomePop { position: fixed; z-index: 1050; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(420px, calc(100% - 32px)); max-height: calc(100% - 48px); overflow: auto; padding: 18px 16px 12px; border-radius: 18px; background: var(--glass-strong); box-shadow: var(--shadow); }
#welcomePop h3 { margin: 0 36px 6px 0; }
#welcomePop .cp-x { position: absolute; top: 10px; right: 10px; }
.welcome-steps { padding-left: 20px; display: grid; gap: 6px; }
.note.tr-link { margin: 6px 0 18px; text-align: left; }
.note.tr-link .linkbtn { text-align: left; padding: 0; }
#dwellMenu .dm-hint { max-width: 300px; margin: 0 2px 8px; font-size: 13px; line-height: 1.35; color: var(--ink-2); }
/* v0.15.8 – home-screen app (full screen): since iPadOS/iOS 26 the system blurs whatever lies under the status bar.
   A solid strip in the theme colour (white status text) keeps that area calm. Height 0 in the browser. */
#topEdge { position: fixed; z-index: 950; top: 0; left: 0; right: 0; height: var(--sat); background: #0f1a24; pointer-events: none; }
/* v0.15.11 – iPad home-screen app (iPadOS 26): the system blur reaches below the reserved strip → top-left buttons a bit lower */
:root { --ovl: 0px; }
:root.ios-overlay { --ovl: 22px; }
#mapSearch { top: calc(14px + var(--sat) + var(--ovl)); }
#exportFab { top: calc(14px + var(--sat) + var(--ovl)); }
@media (max-width: 600px) { #mapSearch, #exportFab { top: calc(30px + var(--sat) + var(--ovl)); } }
/* DEV badge (only outside production): left edge, below the search button */
#devBadge { position: fixed; z-index: 805; left: calc(14px + var(--sal)); top: calc(70px + var(--sat) + var(--ovl)); background: #d00; color: #fff; font: 600 11px/1 system-ui, sans-serif; padding: 4px 7px; border-radius: 6px; pointer-events: none; box-shadow: 0 1px 4px rgba(0,0,0,.25); }
@media (max-width: 600px) { #devBadge { left: calc(8px + var(--sal)); top: calc(78px + var(--sat) + var(--ovl)); font-size: 10px; padding: 3px 5px; } }
/* v0.16.0 – share links with validity, import conflicts */
.ttl-pick { display: flex; align-items: center; gap: 10px; margin: 10px 0; flex-wrap: wrap; }
.ttl-pick span { font-weight: 600; font-size: 14px; color: var(--ink-2); }
.ttl-pick select { min-height: 40px; border-radius: 10px; padding: 0 10px; font: inherit; }
.link-out { margin-top: 12px; }
.link-field { width: 100%; font: 12px/1.3 var(--mono); padding: 8px; border-radius: 8px; border: 1px solid var(--line); background: var(--glass); color: var(--ink); }
.pre-conflict { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 2px 0 8px 32px; font-size: 13px; color: var(--ink-2); }
.pre-conflict select { min-height: 36px; border-radius: 8px; font: inherit; }
.pwa-hint { background: var(--glass); border-radius: 10px; padding: 8px 10px; }
.preset-box h3.first { margin-top: 0; }
.pre-sep { border: 0; border-top: 1px solid var(--line); margin: 16px 0; }
/* v0.16.2 – foldable «Changes» in About */
.log-wrap { margin: 14px 0; }
.log-wrap > summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 8px; }
.log-wrap > summary::-webkit-details-marker { display: none; }
.log-wrap > summary::after { content: "▾"; color: var(--ink-2); }
.log-wrap[open] > summary::after { content: "▴"; }
.log-wrap > summary h3 { margin: 0; }
/* v0.17.0 – corner points and waypoints on the route */
.mk-vtx { background: #fff; border: 2px solid #2563eb; box-shadow: 0 0 0 1px rgba(15,26,36,.35); }
.mk-wp { background: #374151; border: 2px solid #fff; box-shadow: 0 1px 3px rgba(0,0,0,.45); }
/* v0.17.1 – QR scanner, Safari link hint */
.btn .btn-ico { width: 20px; height: 20px; vertical-align: -4px; margin-right: 6px; }
#linkPop { position: fixed; z-index: 1150; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(420px, calc(100% - 32px)); max-height: calc(100% - 48px); overflow: auto; padding: 18px 16px 12px; border-radius: 18px; background: var(--glass-strong); box-shadow: var(--shadow); }
#linkPop h3 { margin: 0 0 6px; }
#scanPop { position: fixed; z-index: 1200; inset: 0; background: rgba(5, 10, 15, .92); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: calc(16px + var(--sat)) 16px calc(16px + var(--sab)); }
#scanPop[hidden] { display: none; }
.scan-view { position: relative; width: min(520px, 100%); aspect-ratio: 1; border-radius: 18px; overflow: hidden; background: #000; }
.scan-view video { width: 100%; height: 100%; object-fit: cover; }
.scan-frame { position: absolute; inset: 14%; border: 3px solid rgba(255,255,255,.9); border-radius: 16px; box-shadow: 0 0 0 999px rgba(0,0,0,.35); }
.scan-hint { color: #fff; text-align: center; margin: 0; }
#scanPop .btn { background: #fff; color: #0f1a24; }
/* v0.19.0 company layers in the layer menu, company admin */
#layerPop .ly-group { display: flex; align-items: center; gap: 2px; }
#layerPop .ly-caret { width: 28px; height: 40px; border: 0; background: none; color: var(--ink-2); font-size: 14px; flex: none; transition: transform .15s; }
#layerPop .ly-caret.open { transform: rotate(90deg); }
#layerPop .ly-sub { padding-left: 30px; }
.cly-group { margin: 8px 0 12px; }
.cly-group .cly-gname { font: 600 15px var(--font); padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; background: transparent; color: inherit; width: 100%; max-width: 320px; }
.ly-list select { max-width: 130px; font: inherit; font-size: 13px; padding: 5px; border-radius: 8px; border: 1px solid var(--line); background: transparent; color: inherit; }
.co-lock { font-size: 13px; margin-left: -4px; }
.rec-box { border: 2px solid var(--warn-ink); background: var(--warn-bg); border-radius: 12px; padding: 10px 12px; margin: 8px 0; }
.small-code { font-size: 11px; word-break: break-all; white-space: normal; }
.opt.sw small.hint { display: block; color: var(--ink-2); font-size: 12.5px; font-weight: 400; margin-top: 2px; }
.cly-ghead { display: flex; gap: 8px; align-items: center; }
.cly-ghead .cly-gname { flex: 1; }
.cly-row { gap: 6px; }
.cly-row .cly-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.cly-row .cly-main small, .cly-ghead small { color: var(--ink-2); font-size: 12px; white-space: nowrap; }
.btn.small.mv { min-width: 34px; padding: 4px 6px; justify-content: center; }
.btn.small.mv:disabled { opacity: .3; }
.cly-status { margin: 6px 0 10px; padding: 8px 10px; border-radius: 10px; font-size: 13.5px; }
.cly-status.ok { color: var(--ok); background: color-mix(in srgb, var(--ok) 10%, transparent); }
.cly-status.busy { color: var(--ink-2); background: var(--line); }
.cly-status.warn { display: flex; gap: 10px; align-items: center; justify-content: space-between; color: var(--warn-ink); background: var(--warn-bg); }
@media (max-width: 600px) { .cly-row { flex-wrap: wrap; } .cly-row .cly-main { flex-basis: calc(100% - 30px); } }
.dev-list li { gap: 8px; }
.dev-row.removed { opacity: .55; }
.dev-badge { font-size: 11px; font-weight: 700; padding: 1px 6px; border-radius: 999px; margin-left: 4px; vertical-align: 1px; }
.dev-badge.pending { background: var(--warn-bg); color: var(--warn-ink); }
.dev-badge.removed { background: var(--line); color: var(--ink-2); }
.dev-me, .dev-count { color: var(--ink-2); font-weight: 400; font-size: 12.5px; }
/* v0.19.7 Company tab layout: sections with a thin line, inline input + button */
.co-sec { padding: 14px 0 16px; border-top: 1px solid var(--line); }
.co-sec.first { border-top: 0; padding-top: 4px; }
.co-sec > h3 { margin: 0 0 8px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
/* v0.23.4: foldable sections */
details.co-sec { padding: 0; }
details.co-sec > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; padding: 14px 0; -webkit-tap-highlight-color: transparent; }
details.co-sec > summary::-webkit-details-marker { display: none; }
details.co-sec > summary h3 { margin: 0; flex: 1; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
details.co-sec > summary::after { content: ''; width: 9px; height: 9px; border-right: 2px solid var(--ink-2); border-bottom: 2px solid var(--ink-2); transform: rotate(45deg); margin: 0 6px 4px 0; transition: transform .15s; flex: none; }
details.co-sec[open] > summary::after { transform: rotate(-135deg); margin-bottom: -4px; }
details.co-sec > .co-body { padding-bottom: 16px; }
details.co-sec.first > summary { padding-top: 4px; }
.co-sec h4 { margin: 14px 0 6px; font-size: 14px; }
.co-sec h4:first-of-type { margin-top: 4px; }
.co-chip { font-size: 11px; font-weight: 700; letter-spacing: .04em; padding: 2px 8px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); text-transform: none; }
.pro-badge { font-size: 11px; font-weight: 800; letter-spacing: .04em; padding: 2px 8px; border-radius: 999px; background: #fef3c7; color: #92400e; text-transform: none; }
.co-sec.pro { opacity: .85; }
.inl { display: flex; align-items: flex-end; gap: 8px; margin: 6px 0; flex-wrap: wrap; }
.inl > .f { flex: 1 1 220px; margin: 0; }
.inl-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.inl-hint { margin-top: 2px; }
.row-line { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin: 6px 0; }
.row-line .note, .row-line .co-status { margin: 0; }
.co-qr { margin: 8px 0; }
.co-qr summary { cursor: pointer; color: var(--accent); font-weight: 600; font-size: 14px; }
.tabs button.pro:not(.on) { color: var(--ink-2); opacity: .6; }
.inl > .f { max-width: 440px; }
.inl select { min-height: 44px; font: inherit; padding: 0 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--glass-strong); color: var(--ink); }
@media (max-width: 600px) { .cly-ghead { flex-wrap: wrap; } .cly-ghead .cly-gname { flex: 1 1 100%; max-width: none; } }
/* v0.19.8: attention glow (e.g. home-base field after tapping Home without a home base) */
@keyframes attnGlow { 0%, 100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0); } 50% { box-shadow: 0 0 0 6px rgba(245, 158, 11, .55); } }
.f.attn .in input { border-color: #f59e0b !important; background: #fffbeb; animation: attnGlow 1s ease-in-out 4; }
.f.attn > span:first-child { color: #b45309; }
.btn.attn { animation: attnGlow 1s ease-in-out 4; border-color: #f59e0b; }
@media (prefers-color-scheme: dark) { .f.attn .in input { background: rgba(245, 158, 11, .15); } }
/* v0.19.8: info bubble after a short tap on a point */
#tapTip { position: fixed; z-index: 900; max-width: 260px; padding: 8px 11px; border-radius: 12px; background: var(--glass-strong); color: var(--ink); box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 2px; pointer-events: none; font-size: 13px; animation: tipIn .15s ease-out; }
#tapTip[hidden] { display: none; }
#tapTip b { font: 700 14px var(--mono); }
#tapTip span { color: var(--ink-2); }
#tapTip small { color: var(--accent); font-weight: 600; margin-top: 2px; }
@keyframes tipIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
/* v0.20.0 magnet per layer in the layer menu */
#layerPop .ly-row { display: flex; align-items: center; gap: 4px; }
#layerPop .ly-row .opt.ly { flex: 1; min-width: 0; }
.ly-mag { width: 36px; height: 36px; flex: none; border: 1px solid var(--line); border-radius: 10px; background: transparent; color: var(--ink-2); display: grid; place-items: center; opacity: .55; }
.ly-mag svg { width: 18px; height: 18px; }
.ly-mag.on { background: color-mix(in srgb, var(--accent) 14%, transparent); border-color: var(--accent); color: var(--accent); opacity: 1; }

/* v0.21.0 fleet management: company aircraft on the admin device get their own row colour */
.acrow.co-ac .acrow-inner, .co-fleet li.co-ac { background: color-mix(in srgb, var(--accent) 16%, var(--glass-strong)); box-shadow: inset 4px 0 0 var(--accent); }
.co-fleet li { display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 10px; border-radius: 10px; margin-bottom: 4px; }
.co-fleet li:not(.co-ac) { opacity: .8; }
.co-fl-pick input { width: 22px; height: 22px; accent-color: var(--accent); }
.co-fleet .ac-txt { flex: 1; min-width: 0; }
.co-legend { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-2); margin: 2px 0 6px; }
.co-swatch { width: 18px; height: 14px; border-radius: 4px; background: color-mix(in srgb, var(--accent) 16%, var(--glass-strong)); box-shadow: inset 4px 0 0 var(--accent); flex: none; }
/* v0.21.1 start menu: normal speed (blue, preselected) vs slow phase (magenta) */
#dwellMenu button.startbtn { background: #2563eb; color: #fff; border-color: transparent; }

/* v0.22.0 install guide, welcome, NEW layers */
#instPop { position: fixed; z-index: 1150; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(440px, calc(100% - 32px)); max-height: calc(100% - 140px); overflow: auto; padding: 18px 16px 12px; border-radius: 18px; background: var(--glass-strong); box-shadow: var(--shadow); }
#instPop h3 { margin: 0 36px 6px 0; }
#instPop .cp-x { position: absolute; top: 10px; right: 10px; }
.inst-copy { padding: 8px 10px; border-radius: 10px; background: var(--glass); font-size: 14px; }
.inst-copy.ok { background: color-mix(in srgb, var(--ok) 15%, var(--glass-strong)); color: var(--ok); font-weight: 600; }
.inst-copy.warn { background: var(--warn-bg); color: var(--warn-ink); }
.inst-steps li { margin: 6px 0; font-size: 15px; }
.inst-ico { display: inline-flex; vertical-align: -5px; width: 24px; height: 24px; padding: 2px; border-radius: 6px; background: var(--accent); color: var(--accent-ink); }
.inst-ico svg { width: 20px; height: 20px; }
.inst-arrow { position: fixed; z-index: 1200; width: 56px; height: 76px; color: #e0129a; pointer-events: none; filter: drop-shadow(0 0 3px #fff) drop-shadow(0 2px 6px rgba(0,0,0,.35)); }
.inst-arrow svg { width: 100%; height: 100%; }
.inst-arrow.bottom { bottom: 4px; left: calc(50% - 28px); animation: instDown 1s ease-in-out infinite; }
.inst-arrow.bottom-right { bottom: 4px; right: 14px; animation: instDown 1s ease-in-out infinite; }
.inst-arrow.top { top: 4px; right: 70px; transform: rotate(180deg); animation: instUp 1s ease-in-out infinite; }
.inst-arrow.mac { top: 4px; left: 110px; transform: rotate(180deg); animation: instUp 1s ease-in-out infinite; }
@keyframes instDown { 0%, 100% { translate: 0 0; } 50% { translate: 0 12px; } }
@keyframes instUp { 0%, 100% { translate: 0 0; } 50% { translate: 0 -12px; } }
#instHint { position: fixed; z-index: 1040; left: 50%; bottom: calc(16px + env(safe-area-inset-bottom)); transform: translateX(-50%); width: min(460px, calc(100% - 32px)); display: flex; align-items: center; gap: 10px; padding: 10px 44px 10px 14px; border-radius: 14px; background: var(--glass-strong); box-shadow: var(--shadow); font-size: 14px; }
#instHint .cp-x { position: absolute; top: 50%; right: 8px; transform: translateY(-50%); }
#instHint .btn { flex: none; }
.inst-sec { margin: 10px 0 14px; padding: 12px; border-radius: 14px; background: color-mix(in srgb, var(--accent) 10%, var(--glass-strong)); }
.inst-sec h3 { margin: 0 0 4px; }
.inst-sec .btn svg { width: 18px; height: 18px; vertical-align: -3px; margin-right: 6px; }
.wel-big { display: flex; flex-direction: column; gap: 8px; margin: 10px 0 4px; }
.wel-big .btn { min-height: 50px; font-size: 16px; }
.wel-other { margin-top: 8px; }
.wel-other summary { cursor: pointer; color: var(--ink-2); font-size: 14px; }
.ly-new { display: inline-block; font-size: 10px; font-weight: 800; letter-spacing: .04em; padding: 1px 6px; border-radius: 999px; background: #e11d48; color: #fff; vertical-align: 1px; }
#tapTip .tt-head { display: flex; align-items: center; gap: 10px; }
#tapTip .tt-center { pointer-events: auto; flex: none; width: 34px; height: 34px; margin: -4px -4px -4px auto; display: grid; place-items: center; border: 0; border-radius: 10px; background: var(--accent); color: var(--accent-ink); }
#tapTip .tt-center svg { width: 20px; height: 20px; }
#tapTip .tt-center:active { filter: brightness(.85); }

/* v0.22.1 company news dots, change box, centre in the stop menu */
.new-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: #e11d48; border: 2px solid var(--glass-strong); vertical-align: 1px; flex: none; }
.ac-wrap { position: relative; display: inline-flex; flex: none; }
.ac-wrap .ac-dot { position: absolute; top: -4px; right: -5px; width: 12px; height: 12px; }
.chg-box { margin: 0 0 12px; padding: 10px 12px; border-radius: 12px; background: color-mix(in srgb, #e11d48 9%, var(--glass-strong)); border: 1px solid color-mix(in srgb, #e11d48 35%, transparent); font-size: 14px; }
.chg-box ul { margin: 6px 0 0; padding-left: 20px; }
.chg-box li { margin: 2px 0; font-family: var(--mono); font-size: 13px; }
.acrow.chg-flash .acrow-inner { animation: chgFlash 1.2s ease-in-out 3; }
@keyframes chgFlash { 50% { background: color-mix(in srgb, #e11d48 18%, var(--glass-strong)); } }
#dwellMenu .dm-point { align-items: center; }
#dwellMenu .dm-coord { font: 600 14px var(--mono); color: var(--ink); }
#dwellMenu button.dm-center { flex: none; width: 36px; min-width: 36px; height: 36px; min-height: 36px; margin-left: auto; padding: 0; display: grid; place-items: center; border: 0; border-radius: 10px; background: var(--accent); color: var(--accent-ink); }
#dwellMenu button.dm-center svg { width: 20px; height: 20px; }
/* layer menu: dot on the name line; more compact on the iPhone */
.ly-t { display: flex; align-items: center; gap: 6px; min-width: 0; }
.ly-tx { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
@media (max-width: 520px) {
  #layerPop .ly-sub { padding-left: 16px; }
  #layerPop .opt.ly { min-height: 34px; padding-top: 3px; padding-bottom: 3px; gap: 8px; }
  #layerPop .ly-caret { width: 22px; height: 34px; }
  .ly-mag { width: 30px; height: 30px; border-radius: 8px; }
  .ly-mag svg { width: 16px; height: 16px; }
  .ly-name { font-size: 15px; }
  .ly-name small { font-size: 11px; }
}
@media (max-width: 520px) { #layerPop .opt { min-height: 36px; padding-top: 4px; padding-bottom: 4px; } }

/* v0.22.2 tap marker for the info bubble */
#tapMark { position: fixed; z-index: 899; width: 22px; height: 22px; margin: -11px 0 0 -11px; border-radius: 50%; border: 3px solid #e0129a; background: rgba(224, 18, 154, .18); box-shadow: 0 0 0 2px #fff; pointer-events: none; }
#tapMark[hidden] { display: none; }
#tapMark::after { content: ""; position: absolute; inset: -3px; border-radius: 50%; border: 3px solid #e0129a; animation: tapRipple .9s ease-out 2; }
@keyframes tapRipple { from { transform: scale(1); opacity: .9; } to { transform: scale(3.2); opacity: 0; } }

/* v0.23.5/0.23.6: «Back to route» – red round arrow at the map edge */
#backRoute { position: fixed; z-index: 790; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 3px solid #fff; border-radius: 50%; background: #dc2626; color: #fff; box-shadow: var(--shadow); touch-action: manipulation; transition: left .12s linear, top .12s linear; }
#backRoute[hidden] { display: none; }
#backRoute svg { width: 22px; height: 22px; transition: transform .12s linear; }
#backRoute:active { transform: scale(.92); }

/* v0.23.7: «Fit route» right of Export (top/left/height set from the export button) */
#fitFab { position: fixed; z-index: 800; display: flex; align-items: center; gap: 7px; height: 48px; padding: 0 16px 0 12px; border: 0; border-radius: 999px; background: var(--glass-strong); color: var(--ink); box-shadow: var(--shadow); font-weight: 700; font-size: 15px; white-space: nowrap; touch-action: manipulation; }
#fitFab[hidden] { display: none; }
#fitFab svg { width: 22px; height: 22px; color: #2563eb; }
#fitFab:active { transform: scale(.95); }
#mapSearch.open ~ #fitFab { display: none; }
@media (max-width: 600px) { #fitFab { padding: 0 11px; } #fitFab span { display: none; } }

/* ── v0.24.0: markers (turquoise), marker arrow, info-bubble buttons, «New from here» ── */
.mk-pin { border-radius: 50%; border: 3px solid #14b8a6; background: rgba(20, 184, 166, .22); box-shadow: 0 0 0 2px #fff, 0 1px 4px rgba(0,0,0,.35); display: grid !important; place-items: center; }
.mk-pin::after { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #0f766e; }
.mk-pin.fresh { animation: pin-pulse 1s ease-out 3; }
@keyframes pin-pulse { 0% { box-shadow: 0 0 0 2px #fff, 0 0 0 2px rgba(20,184,166,.7); } 100% { box-shadow: 0 0 0 2px #fff, 0 0 0 22px rgba(20,184,166,0); } }
.mk-pin span { position: absolute; top: -24px; left: 50%; transform: translateX(-50%); padding: 2px 7px; border-radius: 7px; background: #0f766e; color: #fff; font: 700 12px var(--mono); white-space: nowrap; }
.mk-ghost { background: #6b7280; border: 2px solid #fff; box-shadow: 0 1px 3px rgba(0,0,0,.35); }
#pinArrow { position: fixed; z-index: 789; display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 3px solid #fff; border-radius: 50%; background: #14b8a6; color: #fff; box-shadow: var(--shadow); touch-action: manipulation; transition: left .12s linear, top .12s linear; }
#pinArrow[hidden] { display: none; }
#pinArrow svg { width: 18px; height: 18px; transition: transform .12s linear; }
#pinArrow:active { transform: scale(.92); }
#tapTip { max-width: 290px; }
#tapTip .tt-acts { display: flex; gap: 6px; margin: 7px 0 2px; }
#tapTip .tt-btn { pointer-events: auto; flex: 1 1 auto; min-height: 38px; padding: 0 12px; border: 0; border-radius: 10px; font: 700 14px var(--font); white-space: nowrap; touch-action: manipulation; }
#tapTip .tt-btn:active { filter: brightness(.85); transform: scale(.97); }
#tapTip .tt-dct { background: #374151; color: #fff; }
#tapTip .tt-pinbtn { background: #14b8a6; color: #fff; }
#tapTip .tt-unpin { background: var(--line); color: var(--ink); }
#tapTip .tt-info { color: var(--ink); font: 600 13px var(--mono); }
#tapTip .tt-pin { flex: none; width: 14px; height: 14px; border-radius: 50%; border: 3px solid #14b8a6; background: rgba(20,184,166,.25); }
#tapTip .tt-head b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#dwellMenu button.branchbtn { background: #16a34a; color: #fff; border-color: transparent; }
#fitFab.solo { top: calc(14px + var(--sat) + var(--ovl)); left: calc(72px + var(--sal)); }
@media (max-width: 600px) { #fitFab.solo { top: calc(30px + var(--sat) + var(--ovl)); left: calc(58px + var(--sal)); height: 42px; } }
/* v0.24.1: home-base arrow (grey, white border) */
#homeArrow { position: fixed; z-index: 788; display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 3px solid #fff; border-radius: 50%; background: #4b5563; color: #fff; box-shadow: var(--shadow); touch-action: manipulation; transition: left .12s linear, top .12s linear; }
#homeArrow[hidden] { display: none; }
#homeArrow svg { width: 20px; height: 20px; transition: transform .12s linear; }
#homeArrow:active { transform: scale(.92); }

/* v0.26.0 link to the website (settings header, info tab, share tab) */
.sheet-card header .hd-l { display: flex; align-items: baseline; gap: 12px; min-width: 0; flex-wrap: nowrap; overflow: hidden; }
.sheet-card header .hd-l h2 { white-space: nowrap; }
.sheet-card header .hd-l .site-link { font-size: 13px; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.site-link { display: inline-flex; align-items: center; gap: 4px; color: var(--accent); font-weight: 600; font-size: 14px; text-decoration: none; white-space: nowrap; }
.site-link .ext { width: 13px; height: 13px; }
.site-link:active { opacity: .6; }
.lead .site-link { font-size: 16px; }
.site-card { margin: 0 0 6px; padding: 12px 14px 14px; border-radius: 12px; background: color-mix(in srgb, var(--accent) 10%, transparent); border: 1px solid color-mix(in srgb, var(--accent) 28%, transparent); }
.share-box .site-card h4 { margin: 0 0 2px; }
.site-card .actions { align-items: center; }
.site-card .btn svg { width: 17px; height: 17px; margin-right: 6px; vertical-align: -3px; }

/* v0.26.0 tab bar: permanent scroll indicator + edge fade (iOS hides its own scrollbar) */
.tabs-wrap { position: relative; }
.tabs-wrap .tabs { scrollbar-width: none; }
.tabs-wrap .tabs::-webkit-scrollbar { display: none; }
.tabs-wrap.over.more-r .tabs { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 44px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 44px), transparent); }
.tabs-wrap.over.more-l .tabs { -webkit-mask-image: linear-gradient(90deg, transparent, #000 32px); mask-image: linear-gradient(90deg, transparent, #000 32px); }
.tabs-wrap.over.more-l.more-r .tabs { -webkit-mask-image: linear-gradient(90deg, transparent, #000 32px, #000 calc(100% - 44px), transparent); mask-image: linear-gradient(90deg, transparent, #000 32px, #000 calc(100% - 44px), transparent); }
.tabs-ind { display: none; position: absolute; left: 14px; right: 14px; bottom: 3px; height: 3px; border-radius: 3px; background: var(--line); pointer-events: none; }
.tabs-wrap.over .tabs-ind { display: block; }
.tabs-ind i { position: absolute; top: 0; bottom: 0; border-radius: 3px; background: var(--ink-2); opacity: .55; }

/* v0.26.0 company tab in its own colour (amber) */
.tabs button.co-tab:not(.on) { color: #b45309; background: rgba(217, 119, 6, .12); }
.tabs button.co-tab.on { background: #d97706; color: #ffffff; }
.tabs button.co-tab.pro:not(.on) { opacity: 1; }
@media (prefers-color-scheme: dark) {
  .tabs button.co-tab:not(.on) { color: #fbbf24; background: rgba(245, 158, 11, .14); }
  .tabs button.co-tab.on { background: #f59e0b; color: #1f1300; }
}

/* v0.27.0 dialog «Example aircraft updated» */
#presetPop { position: fixed; z-index: 1060; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(440px, calc(100% - 32px)); max-height: calc(100% - 48px); overflow: auto; padding: 18px 16px 14px; border-radius: 18px; background: var(--glass-strong); box-shadow: var(--shadow); animation: pop .3s ease-out; }
#presetPop h3 { margin: 0 34px 4px 0; font-size: 18px; }
#presetPop .cp-x { position: absolute; top: 10px; right: 10px; }
.pu-list { display: grid; gap: 6px; margin: 10px 0; }
.pu-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); cursor: pointer; }
.pu-row input { width: 20px; height: 20px; flex: none; accent-color: var(--accent); }
.pu-row .ac-ic, .pu-row img, .pu-row svg { width: 34px; height: 34px; flex: none; }
.pu-row span { display: flex; flex-direction: column; min-width: 0; }
.pu-row small { color: var(--ink-2); font-size: 12.5px; line-height: 1.35; }

/* v0.28.0: Feedback tab – «Report a bug» (#43), «My wishes» with status + reply (#42) */
.fb-seg { margin: 2px 0 6px; }
.fb-dev { font: 500 12.5px var(--mono); color: var(--ink-2); background: var(--line); border-radius: 10px; padding: 8px 10px; margin: 4px 0 10px; overflow-wrap: anywhere; }
.fb-dev b { font: 600 12.5px system-ui, sans-serif; color: var(--ink); margin-right: 4px; }
.fb-mine-h { margin: 22px 0 6px; font-size: 16px; }
.fb-mine { list-style: none; margin: 0; padding: 0; }
.fb-mine li { border-top: 1px solid var(--line); padding: 9px 2px; }
.fb-mine li.unread { background: color-mix(in srgb, var(--accent) 9%, transparent); border-radius: 10px; padding: 9px 8px; }
.fb-mine-top { display: flex; gap: 8px; align-items: baseline; }
.fb-txt { flex: 1; min-width: 0; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.fb-mine-st { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin: 4px 0 0 26px; }
.fb-mine-st small { color: var(--ink-2); }
.fb-st { font-size: 12.5px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--line); color: var(--ink-2); white-space: nowrap; }
.fb-st.st-planned, .fb-st.st-progress { background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--ink); }
.fb-st.st-done { background: color-mix(in srgb, var(--ok) 20%, transparent); color: var(--ink); }
.fb-reply { margin: 6px 0 0 26px; padding: 6px 10px; border-left: 3px solid var(--accent); font-size: 13.5px; white-space: pre-wrap; overflow-wrap: anywhere; }
.tabs button.dot-new { position: relative; }
.tabs button.dot-new::after { content: ""; position: absolute; top: 5px; right: 5px; width: 8px; height: 8px; border-radius: 50%; background: #e11d48; }

/* v1.0.3: red close cross on the info bubble (#86), mark icon in the search list (#87) */
#tapTip .tt-x { pointer-events: auto; position: absolute; top: -10px; right: -10px; width: 26px; height: 26px; padding: 0; border: 2px solid #fff; border-radius: 50%; background: #dc2626; color: #fff; display: grid; place-items: center; box-shadow: 0 1px 4px rgba(0,0,0,.35); touch-action: manipulation; }
#tapTip .tt-x svg { width: 14px; height: 14px; stroke-width: 3; }
#tapTip .tt-x:active { filter: brightness(.85); }
#tapTip .tt-head { padding-right: 14px; }
#mapSearch .ms-list li { display: flex; align-items: center; }
#mapSearch .ms-list .ms-go { flex: 1; min-width: 0; }
#mapSearch .ms-list .ms-pin { flex: none; width: 44px; height: 40px; padding: 0; display: grid; place-items: center; }
#mapSearch .ms-pin i { width: 20px; height: 20px; border-radius: 50%; border: 3px solid #14b8a6; background: rgba(20,184,166,.22); box-shadow: 0 0 0 2px #fff, 0 1px 4px rgba(0,0,0,.35); box-sizing: border-box; display: grid; place-items: center; } /* same look as the map marker */
#mapSearch .ms-pin i::after { content: ""; width: 5px; height: 5px; border-radius: 50%; background: #0f766e; }
#mapSearch .ms-pin.on i { background: #14b8a6; }
#mapSearch .ms-pin.on i::after { background: #fff; }

/* v1.0.3 (#88): start point set, no line yet – blue ring pulsing faster than the green start ring, label below */
.mk-snap.mk-go { border: 3px dashed #2563eb; background: rgba(37, 99, 235, .16); box-shadow: 0 0 0 3px rgba(255,255,255,.7); animation: goPulse 1s ease-in-out infinite; overflow: visible; }
.mk-snap.mk-go span { position: absolute; top: calc(100% + 8px); left: 50%; transform: translateX(-50%); white-space: nowrap; padding: 3px 8px; border-radius: 8px; background: #2563eb; color: #fff; font: 700 13px var(--font); }
@keyframes goPulse { 50% { box-shadow: 0 0 0 3px rgba(255,255,255,.7), 0 0 0 12px rgba(37, 99, 235, .25); } }

/* v1.0.3: marker icon in the long-press menu head – tap removes the marker */
#dwellMenu button.dm-unpin { flex: none; width: 36px; min-width: 36px; height: 36px; min-height: 36px; margin-left: auto; padding: 0; display: grid; place-items: center; border: 0; border-radius: 10px; background: var(--line); position: relative; }
#dwellMenu button.dm-unpin i { width: 18px; height: 18px; border-radius: 50%; border: 3px solid #14b8a6; background: rgba(20,184,166,.22); box-sizing: border-box; }
#dwellMenu button.dm-unpin::after { content: "✕"; position: absolute; top: -5px; right: -5px; width: 16px; height: 16px; border-radius: 50%; background: #dc2626; color: #fff; font: 700 10px/16px var(--font); text-align: center; }
#dwellMenu button.dm-unpin + button.dm-center { margin-left: 0; }

/* v1.1.0 (#73): move to the new address – dialog and hint like the install guide */
#movePop { position: fixed; z-index: 1150; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(440px, calc(100% - 32px)); max-height: calc(100% - 48px); overflow: auto; padding: 18px 16px 12px; border-radius: 18px; background: var(--glass-strong); box-shadow: var(--shadow); }
#movePop h3 { margin: 0 36px 6px 0; }
#movePop .cp-x { position: absolute; top: 10px; right: 10px; }
#movePop .move-steps li { margin-bottom: 8px; }
#movePop .move-steps .actions { margin: 6px 0 4px; }
#movePop .inst-copy { margin: 4px 0 0; }
#moveHint { position: fixed; z-index: 1040; left: 50%; bottom: calc(16px + env(safe-area-inset-bottom)); transform: translateX(-50%); width: min(460px, calc(100% - 32px)); display: flex; align-items: center; gap: 10px; padding: 10px 44px 10px 14px; border-radius: 14px; background: color-mix(in srgb, var(--accent) 14%, var(--glass-strong)); box-shadow: var(--shadow); font-size: 14px; }
#moveHint .cp-x { position: absolute; top: 50%; right: 8px; transform: translateY(-50%); }
#moveHint .btn { flex: none; }
