:root {
  --sky: #dfe6ea;
  --card: rgba(255, 255, 255, 0.92);
  --card-solid: #ffffff;
  --ink: #1c2530;
  --ink-2: #4a5663;
  --muted: #7b8794;
  --line: rgba(20, 30, 40, 0.09);
  --hover: rgba(20, 30, 40, 0.05);
  --accent: #d6453d;
  --arr: #2f7fd8;
  --dep: #e08a1e;
  --gnd: #3aa76d;
  --shadow: 0 1px 2px rgba(16, 24, 32, 0.06), 0 8px 28px rgba(16, 24, 32, 0.12);
  --radius: 14px;
  --font: "Figtree", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}

body.is-night {
  --card: rgba(22, 29, 40, 0.88);
  --card-solid: #18202c;
  --ink: #eef2f6;
  --ink-2: #c3ccd6;
  --muted: #8f9cab;
  --line: rgba(255, 255, 255, 0.09);
  --hover: rgba(255, 255, 255, 0.06);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 10px 30px rgba(0, 0, 0, 0.35);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body {
  margin: 0; height: 100%; overflow: hidden;
  background: var(--sky);
  font-family: var(--font);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;
}
#scene { position: fixed; inset: 0; width: 100%; height: 100%; display: block; outline: none; cursor: grab; }
#scene:active { cursor: grabbing; }
a { color: inherit; }
button { font: inherit; color: inherit; }

/* ------------------------------------------------------------------ card */
.card {
  position: fixed; top: 14px; left: 14px; z-index: 20;
  width: 336px; max-height: calc(100% - 28px);
  display: flex; flex-direction: column;
  background: var(--card);
  backdrop-filter: blur(16px) saturate(1.4); -webkit-backdrop-filter: blur(16px) saturate(1.4);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: background .4s, height .28s cubic-bezier(.2, .8, .2, 1), transform .35s cubic-bezier(.2, .8, .2, 1), opacity .3s;
}
.grip { display: none; }
.card-head { display: flex; align-items: center; gap: 6px; padding: 12px 10px 8px 16px; min-height: 48px; }
.title { margin: 0; flex: 1; font-size: 15px; font-weight: 700; letter-spacing: -0.01em; }
.icon-btn {
  width: 32px; height: 32px; border-radius: 9px; border: 0; background: transparent; color: var(--ink-2);
  display: grid; place-items: center; cursor: pointer; flex: none;
}
.icon-btn:hover { background: var(--hover); color: var(--ink); }
.back-btn { margin-left: -8px; }
.search-wrap { flex: 1; }
.search-wrap input {
  width: 100%; height: 34px; border-radius: 9px; border: 1px solid var(--line); background: var(--hover);
  padding: 0 10px; font: inherit; font-size: 14px; color: var(--ink); outline: none;
}
.search-wrap input:focus { border-color: var(--arr); background: transparent; }

.views { overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.view { padding: 0 16px 16px; font-size: 13.5px; line-height: 1.45; color: var(--ink-2); }
.view.in { animation: slide .26s cubic-bezier(.2, .8, .2, 1); }
@keyframes slide { from { opacity: 0; transform: translateX(10px); } to { opacity: 1; transform: none; } }
.view h2 { font-size: 17px; margin: 2px 0 10px; color: var(--ink); letter-spacing: -0.01em; }
.view h3 { font-size: 11.5px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); margin: 18px 0 8px; font-weight: 600; }
.view p { margin: 0 0 10px; }
.intro { margin-top: 0 !important; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.mono { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 12px; }
.note { border-radius: 10px; padding: 9px 11px; margin: 0 0 12px; font-size: 12.5px; background: var(--hover); }
.note.warn { background: rgba(224, 138, 30, 0.13); color: var(--ink); }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 12px 0 8px; }
.stats div { background: var(--hover); border-radius: 10px; padding: 8px 10px; }
.stats b { display: block; font-size: 18px; color: var(--ink); font-variant-numeric: tabular-nums; }
.stats span { font-size: 11.5px; color: var(--muted); }
.rwy-line { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12.5px; margin: 6px 0 4px; color: var(--ink-2); }
.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; }
.dot.arr { background: var(--arr); } .dot.dep { background: var(--dep); }

.menu { margin: 8px -8px 0; }
.mrow {
  width: 100%; display: flex; align-items: center; gap: 8px; border: 0; background: none; cursor: pointer;
  padding: 9px 8px; border-radius: 9px; font-size: 14px; color: var(--ink); text-align: left;
}
.mrow:hover { background: var(--hover); }
.mrow span { flex: 1; }
.mrow em { font-style: normal; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.mrow svg { color: var(--muted); }

.segs { display: flex; gap: 4px; background: var(--hover); border-radius: 10px; padding: 3px; margin: 0 0 10px; }
.seg { flex: 1; border: 0; background: none; border-radius: 8px; padding: 6px 4px; font-size: 12.5px; cursor: pointer; color: var(--ink-2); white-space: nowrap; }
.seg.on { background: var(--card-solid); color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .1); font-weight: 600; }

.flist { margin: 0 -8px; }
.frow {
  width: 100%; display: flex; align-items: center; gap: 10px; border: 0; background: none; cursor: pointer;
  padding: 7px 8px; border-radius: 9px; text-align: left;
}
.frow:hover { background: var(--hover); }
.frow b { color: var(--ink); font-size: 13.5px; font-weight: 600; }
.frow small { display: block; color: var(--muted); font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fmain { flex: 1; min-width: 0; }
.fside { text-align: right; flex: none; }
.fside b { font-variant-numeric: tabular-nums; font-weight: 500; font-size: 12.5px; }
.tail, .tv-tail {
  width: 22px; height: 22px; flex: none; border-radius: 6px;
  background: linear-gradient(135deg, var(--tail) 0 62%, var(--acc) 62% 76%, var(--tail) 76%);
  clip-path: polygon(30% 0, 100% 0, 100% 100%, 0 100%);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .08);
}
.frow.arr .fside small { color: var(--arr); } .frow.dep .fside small { color: var(--dep); }

/* flight detail */
.fl-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.fl-title small { color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: .02em; }
.fl-title h2 { margin: 0 0 4px; font-size: 19px; }
.pill { font-size: 11px; padding: 3px 8px; border-radius: 99px; background: var(--hover); }
.pill.warn { background: rgba(224, 138, 30, .16); color: #a35e05; }
.sil { margin: 0 -6px 4px; }
.sil svg { width: 100%; height: auto; display: block; }
.route { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; margin: 4px 0 8px; }
.route b { display: block; font-size: 22px; color: var(--ink); letter-spacing: .01em; line-height: 1.1; }
.route small { display: block; font-size: 11.5px; color: var(--muted); max-width: 110px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.route .right { text-align: right; }
.route .right small { margin-left: auto; }
.route-line { display: block; position: relative; height: 2px; background: repeating-linear-gradient(90deg, var(--muted) 0 4px, transparent 4px 8px); opacity: .6; }
.route-line i { position: absolute; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); transform: translateX(-50%); box-shadow: 0 0 0 3px var(--card-solid); }
.status { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink); background: var(--hover); padding: 8px 10px; border-radius: 10px; margin: 6px 0 10px; }
.status i { width: 8px; height: 8px; border-radius: 50%; background: var(--gnd); flex: none; }
.status.arr i { background: var(--arr); } .status.dep i { background: var(--dep); }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.grid div { background: var(--hover); border-radius: 10px; padding: 7px 10px; min-width: 0; }
.grid span { display: block; font-size: 11px; color: var(--muted); }
.grid b { color: var(--ink); font-weight: 600; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.grid b small { font-weight: 400; color: var(--muted); }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 5px 14px; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; color: var(--ink); text-align: right; }
.metar { background: var(--hover); padding: 8px 10px; border-radius: 10px; margin-top: 8px !important; word-break: break-word; }
.btns { display: flex; gap: 8px; margin-top: 14px; }
.btn {
  flex: 1; text-align: center; text-decoration: none; border: 0; border-radius: 10px; padding: 9px 12px; font-size: 13.5px; font-weight: 600;
  background: var(--ink); color: var(--card-solid); cursor: pointer;
}
.btn.on { background: var(--accent); color: #fff; }
.btn.ghost { background: var(--hover); color: var(--ink); }
.rwys { display: grid; gap: 4px; margin: 0 -8px; }
.rwy { display: flex; align-items: center; gap: 10px; border: 0; background: none; border-radius: 9px; padding: 8px; cursor: pointer; text-align: left; }
.rwy:hover { background: var(--hover); }
.rwy b { color: var(--ink); min-width: 92px; }
.rwy span { flex: 1; color: var(--muted); font-size: 12.5px; }
.rwy svg { color: var(--muted); }

.toggle { width: 100%; display: flex; align-items: center; gap: 12px; border: 0; background: none; padding: 9px 0; cursor: pointer; text-align: left; border-bottom: 1px solid var(--line); }
.toggle span { flex: 1; }
.toggle b { display: block; color: var(--ink); font-weight: 500; }
.toggle small { color: var(--muted); font-size: 12px; }
.toggle i { width: 36px; height: 21px; border-radius: 99px; background: rgba(120, 130, 140, .35); position: relative; transition: background .2s; flex: none; }
.toggle i::after { content: ""; position: absolute; top: 2px; left: 2px; width: 17px; height: 17px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .2s; }
.toggle.on i { background: var(--gnd); }
.toggle.on i::after { transform: translateX(15px); }

.achips { display: flex; flex-wrap: wrap; gap: 5px; }
.achip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; padding: 3px 8px 3px 4px; border-radius: 8px; background: var(--hover); color: var(--muted); }
.achip i { width: 14px; height: 14px; border-radius: 4px; background: linear-gradient(135deg, var(--tail) 0 60%, var(--acc) 60% 75%, var(--tail) 75%); opacity: .25; }
.achip.got { color: var(--ink); }
.achip.got i { opacity: 1; }
.tchips { display: flex; flex-wrap: wrap; gap: 5px; }
.tchip { font-size: 12px; padding: 3px 8px; border-radius: 8px; background: var(--hover); color: var(--ink); }
.tchip.rare { background: rgba(214, 69, 61, .14); }

/* ------------------------------------------------------------------ chips, controls */
.chip {
  position: fixed; top: 14px; right: 14px; z-index: 15;
  display: flex; align-items: center; gap: 12px; padding: 7px 12px; border-radius: 12px;
  background: var(--card); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: var(--shadow);
  font-size: 12.5px; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--ink);
  transition: opacity .3s;
}
.chip span { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.chip .count svg { opacity: .7; transform: rotate(45deg); }
.live { text-transform: uppercase; letter-spacing: .06em; font-size: 11px; }
.live i { width: 7px; height: 7px; border-radius: 50%; background: #9aa4ae; }
.live.live i { background: #2fbf71; box-shadow: 0 0 0 0 rgba(47, 191, 113, .6); animation: ping 2s infinite; }
.live.demo i { background: var(--dep); }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(47, 191, 113, .55); } 70% { box-shadow: 0 0 0 7px rgba(47, 191, 113, 0); } 100% { box-shadow: 0 0 0 0 rgba(47, 191, 113, 0); } }

.controls { position: fixed; right: 14px; bottom: 30px; z-index: 15; display: flex; flex-direction: column; gap: 6px; transition: opacity .3s, bottom .3s; }
.ctl {
  width: 40px; height: 40px; border-radius: 11px; border: 0; cursor: pointer; display: grid; place-items: center;
  background: var(--card); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: var(--shadow);
  font-size: 21px; line-height: 1; color: var(--ink);
}
.ctl:hover { background: var(--card-solid); }
.compass svg { transition: transform .15s linear; }
.credit { position: fixed; right: 12px; bottom: 6px; z-index: 14; font-size: 10.5px; color: rgba(30, 40, 50, .6); }
body.is-night .credit { color: rgba(220, 230, 240, .5); }
.credit a { text-decoration: none; }
.credit a:hover { text-decoration: underline; }

/* ------------------------------------------------------------------ labels */
#labels { position: fixed; inset: 0; z-index: 5; pointer-events: none; overflow: hidden; }
.tag {
  position: absolute; left: 0; top: 0; pointer-events: auto; cursor: pointer;
  padding: 2px 6px; border-radius: 6px; white-space: nowrap;
  font-size: 11.5px; font-weight: 700; letter-spacing: .02em; color: #1c2530;
  background: rgba(255, 255, 255, .9); box-shadow: 0 1px 3px rgba(0, 0, 0, .18);
  will-change: transform;
}
.tag::after { content: ""; position: absolute; left: 50%; bottom: -3px; width: 6px; height: 6px; background: inherit; transform: translateX(-50%) rotate(45deg); border-radius: 1px; }
.tag.arr { box-shadow: inset 3px 0 0 var(--arr), 0 1px 3px rgba(0, 0, 0, .18); padding-left: 8px; }
.tag.dep { box-shadow: inset 3px 0 0 var(--dep), 0 1px 3px rgba(0, 0, 0, .18); padding-left: 8px; }
.tag.parked { opacity: .72; font-weight: 600; }
.tag.sel { background: #1c2530; color: #fff; z-index: 2; opacity: 1; }
.tag.emer { background: #d6453d; color: #fff; }
.wx-menu { display: flex; flex-direction: column; gap: 4px; margin-top: 6px; }
.wx-item { display: flex; align-items: center; gap: 8px; border: 0; background: rgba(0, 0, 0, .04); border-radius: 9px; padding: 7px 9px; font: inherit; font-weight: 600; color: inherit; cursor: pointer; text-align: left; }
.wx-item i { width: 26px; height: 15px; border-radius: 8px; background: #c9ced3; position: relative; flex: none; }
.wx-item i::after { content: ""; position: absolute; top: 2px; left: 2px; width: 11px; height: 11px; border-radius: 50%; background: #fff; transition: left .15s; }
.wx-item.on i { background: #2f8f5b; }
.wx-item.on i::after { left: 13px; }
.wx-item i.w { background: #e43a3a; }
.wx-item i.w::after { display: none; }
.windy-wrap { position: relative; width: 100%; aspect-ratio: 4 / 3.4; border-radius: 12px; overflow: hidden; margin: 8px 0; background: #1b2633; }
.windy-wrap iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.tag.route { padding: 0 5px; min-width: 18px; text-align: center; font-size: 10.5px; font-weight: 800; border-radius: 5px; background: #d8262f; color: #fff; }
.tag.route.bus { background: #fff; color: #c41e26; box-shadow: inset 0 0 0 1.5px #d8262f, 0 1px 3px rgba(0, 0, 0, .18); }
.tag.route.subway, .tag.route.lrt { background: var(--c, #555); color: #fff; border-radius: 50%; min-width: 19px; height: 19px; line-height: 19px; padding: 0; }
.tag.route::after { display: none; }
.rt-chip { display: inline-block; min-width: 20px; padding: 0 5px; border-radius: 5px; background: var(--c, #d8262f); color: #fff; font-weight: 800; font-size: 11px; text-align: center; line-height: 18px; vertical-align: 1px; margin-right: 3px; }
.rt-chip.big { min-width: 30px; line-height: 30px; font-size: 15px; border-radius: 50%; padding: 0; margin: 0; }
.pop ul.arr { list-style: none; margin: 6px 0 0; padding: 0; }
.pop ul.arr li { display: flex; justify-content: space-between; gap: 10px; padding: 4px 0; border-top: 1px solid rgba(0, 0, 0, .07); }
.pop ul.arr li b { white-space: nowrap; color: var(--ink); }
.pop .muted, .muted { color: var(--muted, #6b7480); }
.small { font-size: 11px; }
.tlines { display: flex; flex-direction: column; gap: 6px; }
.tline { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; border-radius: 12px; background: var(--chip, rgba(0, 0, 0, .04)); cursor: pointer; text-align: left; font: inherit; color: inherit; }
.tline .tl-name { flex: 1; font-weight: 650; display: flex; flex-direction: column; }
.tline .tl-name small { font-weight: 500; color: var(--muted, #6b7480); font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 210px; }
.tline > b { display: flex; flex-direction: column; align-items: flex-end; font-size: 16px; }
.tline > b small { font-size: 10px; font-weight: 500; color: var(--muted, #6b7480); }
.warn-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #e0a21e; margin-right: 5px; }
ul.alerts { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; font-size: 12.5px; }
ul.alerts .chips { display: inline-flex; flex-wrap: wrap; gap: 2px; margin-right: 4px; }
.tag.ship { background: rgba(232, 244, 252, .92); color: #164a6e; font-weight: 650; padding-left: 20px; }
.tag.ship::before { content: ""; position: absolute; left: 6px; top: 50%; width: 10px; height: 10px; transform: translateY(-50%); background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 14h18l-2.6 5.2a2 2 0 0 1-1.8 1.1H7.4a2 2 0 0 1-1.8-1.1zM6 13V8h5V4h2v4h5v5z'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 14h18l-2.6 5.2a2 2 0 0 1-1.8 1.1H7.4a2 2 0 0 1-1.8-1.1zM6 13V8h5V4h2v4h5v5z'/%3E%3C/svg%3E") center / contain no-repeat; }
.tag.ship.moving { box-shadow: inset 3px 0 0 #1f8fd6, 0 1px 3px rgba(0, 0, 0, .18); }
body.is-night .tag.ship { background: rgba(14, 34, 52, .88); color: #bfe3ff; }
body.is-night .tag { background: rgba(20, 26, 36, .86); color: #eef2f6; }
body.is-night .tag.sel { background: #ffd27a; color: #1c2530; }

/* ------------------------------------------------------------------ pop, toast, tv, loader */
.pop {
  position: fixed; z-index: 30; width: 260px; padding: 12px 14px; border-radius: 12px; background: var(--card);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: var(--shadow); font-size: 13px; color: var(--ink-2);
  animation: pop .2s ease-out;
}
.pop b { color: var(--ink); display: block; margin-bottom: 3px; }
.pop p { margin: 0; }
.pop-x { position: absolute; right: 6px; top: 6px; border: 0; background: none; cursor: pointer; color: var(--muted); padding: 4px; }
@keyframes pop { from { opacity: 0; transform: translateY(6px) scale(.98); } }
.toast {
  position: fixed; left: 50%; bottom: 26px; z-index: 40; transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: #1c2530; color: #fff; padding: 9px 14px; border-radius: 10px; font-size: 13px; box-shadow: var(--shadow);
  transition: opacity .25s, transform .25s; max-width: calc(100% - 32px); text-align: center;
}
.toast.on { opacity: 1; transform: translate(-50%, 0); }
.tv { position: fixed; left: 0; right: 0; bottom: 0; z-index: 25; padding: 20px; display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; pointer-events: none; background: linear-gradient(transparent, rgba(0, 0, 0, .28)); }
.tv-cap { display: flex; align-items: center; gap: 12px; color: #fff; text-shadow: 0 1px 3px rgba(0, 0, 0, .5); }
.tv-cap b { font-size: 22px; display: block; letter-spacing: -0.01em; }
.tv-cap small { font-size: 14px; opacity: .92; }
.tv-tail { width: 38px; height: 38px; border-radius: 9px; }
.tv-exit { pointer-events: auto; border: 0; border-radius: 10px; padding: 8px 12px; background: rgba(255, 255, 255, .9); cursor: pointer; font-weight: 600; font-size: 13px; color: #1c2530; }
body.tv-on .card, body.tv-on .controls, body.tv-on .chip { opacity: 0; pointer-events: none; }
body.tv-on .card { transform: translateX(-20px); }
body.tv-on #labels .tag:not(.sel) { opacity: .0; }

.loader { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; background: var(--sky); transition: opacity .8s ease .2s, visibility 0s linear 1s; }
.loader.gone { opacity: 0; visibility: hidden; }
.loader-inner { text-align: center; color: #3a4654; }
.loader-inner b { display: block; font-size: 21px; font-weight: 700; letter-spacing: -0.01em; margin-bottom: 12px; }
.loader-plane { animation: fly 1.8s ease-in-out infinite; }
@keyframes fly { 0%, 100% { transform: translate(-6px, 2px) rotate(40deg); } 50% { transform: translate(6px, -3px) rotate(46deg); } }

/* ------------------------------------------------------------------ phones: bottom sheet */
@media (max-width: 719px) {
  .card {
    top: auto; left: 0; right: 0; bottom: 0; width: auto; max-height: none;
    border-radius: 18px 18px 0 0; padding-bottom: env(safe-area-inset-bottom);
    height: 148px;
  }
  .card[data-sheet="half"] { height: 52%; }
  .card[data-sheet="full"] { height: 88%; }
  .card.dragging { transition: none; }
  .grip { display: block; width: 38px; height: 5px; border-radius: 3px; background: rgba(120, 130, 140, .4); margin: 8px auto 0; flex: none; }
  .card-head { padding-top: 4px; cursor: grab; touch-action: none; }
  .title { font-size: 16px; }
  .card[data-sheet="peek"] .views { overflow: hidden; }
  .chip { top: calc(10px + env(safe-area-inset-top)); right: 10px; left: auto; gap: 9px; padding: 6px 10px; font-size: 12px; }
  .controls { right: 10px; bottom: 162px; }
  .card[data-sheet="half"] ~ .controls, .card[data-sheet="full"] ~ .controls { opacity: 0; pointer-events: none; }
  .ctl { width: 38px; height: 38px; }
  .ctl[data-c="rot"] { display: none; }
  .credit { left: 10px; right: auto; bottom: 152px; font-size: 9.5px; }
  .card[data-sheet="half"] ~ .credit, .card[data-sheet="full"] ~ .credit { opacity: 0; }
  .tag { font-size: 10.5px; padding: 1px 5px; }
  .tv { padding: 14px 14px calc(14px + env(safe-area-inset-bottom)); flex-direction: column; align-items: flex-start; }
  .tv-cap b { font-size: 18px; }
  .tv-cap small { font-size: 12.5px; }
  .toast { bottom: 166px; }
  body.tv-on .card { transform: translateY(30px); }
}

@media (prefers-reduced-motion: reduce) {
  .live.live i, .loader-plane { animation: none; }
  .view.in { animation: none; }
}

[hidden] { display: none !important; }

.rwy-line b { font-size: 11px; letter-spacing: .06em; color: var(--muted); margin-right: 2px; }
.segs.apt { margin: 0 0 12px; }
.segs.apt .seg { font-weight: 600; }
.live.live.delayed i { background: #e0a21e; animation: none; }

/* ------------------------------------------------------------------ near me */
.tag.you { background: #2f7df6; color: #fff; }
.tag.near { background: var(--c, #2f7df6); color: #fff; font-variant-numeric: tabular-nums; }
.ctl.on { background: #2f7df6; color: #fff; }
.nlist { display: flex; flex-direction: column; gap: 2px; }
.nrow { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: none; font: inherit; color: inherit; text-align: left; padding: 8px 8px; border-radius: 10px; cursor: pointer; }
.nrow:hover { background: var(--hover); }
.nrow.on { background: rgba(47, 125, 246, .12); }
.nrow .n-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.nrow .n-head { font-weight: 600; }
.nrow .n-head small { font-weight: 500; color: var(--muted); }
.nrow small { color: var(--muted); font-size: 12px; line-height: 1.35; }
.nrow > b { white-space: nowrap; font-variant-numeric: tabular-nums; font-size: 15px; }
html[data-city="vancouver"] .tag.route.bus { color: #0033a0; box-shadow: inset 0 0 0 1.5px #0033a0, 0 1px 3px rgba(0, 0, 0, .18); }
.btns { flex-wrap: wrap; }
.near-pin { position: absolute; left: 0; top: 0; pointer-events: none; will-change: transform; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .3)); line-height: 0; }
body.pin-pick #scene { cursor: crosshair; }
canvas { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
.links { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.links a { flex: 1 1 auto; text-align: center; text-decoration: none; font-weight: 600; font-size: 12.5px; padding: 7px 10px; border-radius: 9px; background: var(--hover, rgba(0, 0, 0, .05)); color: var(--ink); white-space: nowrap; }
.links a:hover { background: var(--accent); color: #fff; }
.pop .links { margin-top: 8px; }
.pop .links a { padding: 5px 8px; font-size: 12px; }
