/* Apple system design: SF type scale, iOS system colors, translucent materials, inset grouped lists. Map underneath everything. */
:root {
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", system-ui, Segoe UI, Roboto, sans-serif;
  --bg: #F2F2F7; --card: #FFFFFF; --card-2: #F2F2F7;
  --label: #000000; --label-2: rgba(60,60,67,.6); --label-3: rgba(60,60,67,.3); --sep: rgba(60,60,67,.29); --fill: rgba(120,120,128,.16); --fill-2: rgba(120,120,128,.08);
  --blue: #007AFF; --green: #34C759; --orange: #FF9500; --red: #FF3B30; --gray: #8E8E93; --indigo: #5856D6;
  --material: rgba(242,242,247,.78); --material-strong: rgba(255,255,255,.86); --halo: #fff;
  --glass: rgba(255,255,255,.62); --glass-edge: rgba(255,255,255,.85); --glass-shadow: 0 1px 2px rgba(0,0,0,.08), 0 10px 30px rgba(0,0,0,.16);
  --air: var(--blue); --move: var(--orange); --ground: var(--green); --lost: var(--gray);
  --r: 12px; --sheet-h: 52vh;
}
:root[data-theme="dark"] {
  --bg: #000000; --card: #1C1C1E; --card-2: #2C2C2E;
  --label: #FFFFFF; --label-2: rgba(235,235,245,.6); --label-3: rgba(235,235,245,.3); --sep: rgba(84,84,88,.65); --fill: rgba(120,120,128,.24); --fill-2: rgba(120,120,128,.14);
  --blue: #0A84FF; --green: #30D158; --orange: #FF9F0A; --red: #FF453A; --gray: #8E8E93; --indigo: #5E5CE6;
  --material: rgba(28,28,30,.78); --material-strong: rgba(44,44,46,.86); --halo: #000;
  --glass: rgba(36,36,40,.6); --glass-edge: rgba(255,255,255,.14); --glass-shadow: 0 1px 2px rgba(0,0,0,.4), 0 10px 30px rgba(0,0,0,.45);
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--label); font: 17px/1.3 var(--font); -webkit-font-smoothing: antialiased; overflow: hidden; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
a { color: var(--blue); text-decoration: none; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--blue) 45%, transparent); outline-offset: 2px; border-radius: 8px; }
[hidden] { display: none !important; }
svg { display: block; }

/* Map fills the window; controls float on it. */
#map { position: fixed; inset: 0; background: #E8EEF3; }
:root[data-theme="dark"] #map { background: #0B0D10; }
.map-ui { position: fixed; top: calc(12px + env(safe-area-inset-top)); right: calc(12px + env(safe-area-inset-right)); z-index: 5; display: grid; gap: 8px; }
.glass { border: 0; background: var(--glass); -webkit-backdrop-filter: saturate(180%) blur(24px); backdrop-filter: saturate(180%) blur(24px); box-shadow: inset 0 0 0 .5px var(--glass-edge), inset 0 1px 0 var(--glass-edge), var(--glass-shadow); color: var(--blue); }
.glass.round { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; }
.glass.round svg { width: 20px; height: 20px; fill: currentColor; }
.maplibregl-ctrl-top-right { top: calc(60px + env(safe-area-inset-top)) !important; right: calc(12px + env(safe-area-inset-right)) !important; }
.maplibregl-ctrl-top-right .maplibregl-ctrl { margin: 0 !important; }
.maplibregl-ctrl-group { border-radius: 10px !important; background: var(--material-strong) !important; -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); box-shadow: 0 1px 2px rgba(0,0,0,.12), 0 6px 20px rgba(0,0,0,.12) !important; overflow: hidden; }
.maplibregl-ctrl-group button { width: 40px !important; height: 40px !important; border-bottom: 1px solid var(--sep) !important; }
.maplibregl-ctrl-group button:last-child { border-bottom: 0 !important; }
.maplibregl-ctrl-group button .maplibregl-ctrl-icon { filter: none; }
:root[data-theme="dark"] .maplibregl-ctrl-group button .maplibregl-ctrl-icon { filter: invert(1); }
.maplibregl-ctrl-attrib { font: 10px var(--font) !important; background: var(--material) !important; color: var(--label-2) !important; border-radius: 6px 0 0 0 !important; }
.maplibregl-ctrl-attrib a { color: var(--label-2) !important; }

/* Markers: Find My style — a white disc with the glyph; in the air it turns blue and pulses. Labels sit under with a halo. */
.mk-wrap { width: 36px; height: 36px; }
.mk { position: relative; display: block; width: 36px; height: 36px; padding: 0; border: 0; background: none; transform: translateY(calc(var(--stack, 0) * 40px)); --c: var(--lost); }
.mk.k-air { --c: var(--air); } .mk.k-move { --c: var(--move); } .mk.k-ground { --c: var(--ground); }
.mk-glyph { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--card); box-shadow: 0 0 0 2px var(--card), 0 2px 6px rgba(0,0,0,.25), 0 0 0 3px rgba(0,0,0,.06); transition: transform .8s ease; }
.mk-glyph svg { width: 20px; height: 20px; fill: var(--c); }
.mk.k-air .mk-glyph { background: var(--air); } .mk.k-air .mk-glyph svg { fill: #fff; }
.mk.k-air.live::before { content: ''; position: absolute; inset: 0; border-radius: 50%; background: var(--air); animation: pulse 2.2s ease-out infinite; }
.mk.ph-range .mk-glyph { background: var(--card); border: 2px dashed var(--air); } .mk.ph-range .mk-glyph svg { fill: var(--air); }
.mk-label { position: absolute; left: 50%; top: 39px; transform: translateX(-50%); white-space: nowrap; max-width: 150px; overflow: hidden; text-overflow: ellipsis; font: 600 12px/1.2 var(--font); letter-spacing: -.1px; color: var(--label); text-shadow: 0 0 2px var(--halo), 0 0 3px var(--halo), 0 0 6px var(--halo), 0 1px 2px var(--halo); pointer-events: none; }
.mk.nolabel .mk-label { display: none; }
.mk.sel { z-index: 5; } .mk.sel .mk-glyph { box-shadow: 0 0 0 2px var(--card), 0 0 0 5px var(--c), 0 4px 12px rgba(0,0,0,.3); }
.mk.heli.k-air .rotor, .mk.heli.k-move .rotor { transform-origin: 12px 10.1px; animation: spin .4s linear infinite; }

/* The sheet: a floating sidebar on wide screens; on phones it is the detail sheet that slides up over the deck. */
.sheet { position: fixed; z-index: 35; left: 0; right: 0; bottom: 0; top: calc(6vh + env(safe-area-inset-top)); display: flex; flex-direction: column; background: var(--material); -webkit-backdrop-filter: saturate(180%) blur(28px); backdrop-filter: saturate(180%) blur(28px); border-radius: 28px 28px 0 0; box-shadow: inset 0 1px 0 var(--glass-edge), 0 -10px 40px rgba(0,0,0,.25); transform: translateY(104%); transition: transform .38s cubic-bezier(.2,.8,.2,1); }
.sheet.open { transform: translateY(0); }
.sheet.open.peek { transform: translateY(50vh); }
.sheet.dragging { transition: none; }
.scrim { position: fixed; inset: 0; z-index: 34; background: rgba(0,0,0,.28); opacity: 0; transition: opacity .3s; pointer-events: none; }
.scrim.on { opacity: 1; pointer-events: auto; }
.grabber { flex: none; height: 24px; display: grid; place-items: center; cursor: grab; touch-action: none; }
.grabber i { width: 38px; height: 5px; border-radius: 3px; background: var(--label-3); }
.views { position: relative; flex: 1; min-height: 0; overflow: hidden; }
.view { position: absolute; inset: 0; display: flex; flex-direction: column; min-height: 0; }
.scroll { flex: 1; min-height: 0; overflow: auto; -webkit-overflow-scrolling: touch; padding: 0 16px calc(24px + env(safe-area-inset-bottom)); overscroll-behavior: contain; }
@media (max-width: 899px) {
  .list-view { display: none; }
  .view.detail-view { transform: none; }
  .back { display: none; }
}
@media (min-width: 900px) {
  .sheet { left: 12px; top: 12px; bottom: 12px; right: auto; width: 400px; height: auto; border-radius: 16px; box-shadow: 0 0 0 .5px rgba(0,0,0,.1), 0 12px 40px rgba(0,0,0,.2); transform: none; transition: none; }
  .scrim { display: none; }
  .grabber { display: none; }
  .map-ui { top: 12px; }
  .topbar, .deck { display: none; }
  .close-x { display: none; }
  .menu { top: 60px; left: 150px; right: auto; }
  .notice { left: calc(412px + (100vw - 412px) / 2); }
  .view.list-view { transition: transform .3s cubic-bezier(.2,.8,.2,1), opacity .3s; }
  .view.detail-view { transition: transform .3s cubic-bezier(.2,.8,.2,1); transform: translateX(100%); background: var(--material); }
  .views.pushed .list-view { transform: translateX(-28%); opacity: 0; pointer-events: none; }
  .views.pushed .detail-view { transform: translateX(0); }
}

@media (max-width: 899px) {
/* Phone top bar: a glass capsule with the title and the day's summary, two glass circles beside it. */
.topbar { position: fixed; z-index: 20; top: calc(12px + env(safe-area-inset-top)); left: calc(12px + env(safe-area-inset-left)); right: calc(68px + env(safe-area-inset-right)); display: flex; align-items: center; gap: 8px; }
.tb-title { flex: 1; min-width: 0; border-radius: 999px; padding: 8px 18px; color: var(--label); }
.tb-title h1 { margin: 0; font-size: 17px; font-weight: 700; letter-spacing: -.3px; line-height: 20px; white-space: nowrap; }
.tb-title .board { margin: 0; font-size: 12.5px; line-height: 16px; color: var(--label-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tb-title .board b { color: var(--label); font-weight: 600; } .tb-title .board .air { color: var(--blue); font-weight: 600; }
.topbar .circle { width: 44px; height: 44px; flex: none; }
.topbar .circle svg { width: 20px; height: 20px; }
.map-ui { top: calc(12px + env(safe-area-inset-top)); }
@media (max-width: 899px) { .maplibregl-ctrl-top-right { display: none; } .map-ui { top: auto; bottom: calc(var(--deck-h, 236px) + 14px + env(safe-area-inset-bottom)); } }

/* Phone deck: one glass card per plane, snapping horizontally. */
.deck { position: fixed; z-index: 20; left: 0; right: 0; bottom: 0; padding-bottom: calc(10px + env(safe-area-inset-bottom)); pointer-events: none; }
.cards { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 12px calc((100vw - min(86vw, 400px)) / 2); scrollbar-width: none; -webkit-overflow-scrolling: touch; pointer-events: auto; overscroll-behavior-x: contain; }
.cards::-webkit-scrollbar { display: none; }
.card { flex: 0 0 min(86vw, 400px); scroll-snap-align: center; scroll-snap-stop: always; border-radius: 28px; padding: 10px 10px 12px; text-align: left; color: var(--label); display: grid; gap: 8px; --c: var(--lost); }
.card.k-air { --c: var(--air); } .card.k-move { --c: var(--move); } .card.k-ground { --c: var(--green); }
.card .photo { position: relative; aspect-ratio: 2 / 1; border-radius: 20px; overflow: hidden; background: color-mix(in srgb, var(--c) 16%, transparent); display: grid; place-items: center; }
.card .photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card .photo svg { width: 44px; height: 44px; fill: var(--c); }
.card .chip { position: absolute; top: 10px; left: 10px; display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; color: #fff; background: var(--c); box-shadow: 0 1px 4px rgba(0,0,0,.25); }
.card .chip i { width: 7px; height: 7px; border-radius: 50%; background: #fff; }
.card.k-air .chip i { animation: ping 1.4s infinite; }
.card .chip.when { left: auto; right: 10px; background: rgba(0,0,0,.42); font-weight: 600; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.card .text { padding: 0 6px; display: grid; gap: 1px; }
.card .title { font-size: 17px; font-weight: 700; letter-spacing: -.3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card .sub { font-size: 14.5px; color: var(--label-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card .sub.strong { color: var(--label); font-weight: 500; }
.card .strip { margin: 4px 6px 0; }
.dots { display: flex; justify-content: center; gap: 6px; height: 8px; }
.dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--label-3); transition: transform .2s, background .2s; }
.dots i.on { background: var(--label); transform: scale(1.25); }

}
/* Phone detail nav: close circle instead of a back button */
.close-x { width: 32px; height: 32px; border-radius: 50%; border: 0; background: var(--fill); color: var(--label-2); display: grid; place-items: center; margin-left: 4px; }
.close-x svg { width: 12px; height: 12px; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; fill: none; }
@media (max-width: 899px) { .nav.inline { padding: 0 12px 8px 12px; } .nav-title { text-align: left; font-size: 20px; font-weight: 700; padding-left: 4px; } }

/* Navigation bars */
.nav { flex: none; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 4px 16px 8px; }
.nav.large .titles { min-width: 0; }
.nav.large .titles h1 { margin: 0; font-size: 34px; line-height: 41px; font-weight: 700; letter-spacing: -.4px; white-space: nowrap; }
.nav .subtitle { margin: 0; font-size: 15px; line-height: 20px; color: var(--label-2); font-weight: 500; }
.nav .subtitle b { color: var(--label); font-weight: 600; }
.nav .subtitle .air { color: var(--blue); font-weight: 600; }
.nav-actions { display: flex; gap: 8px; padding-top: 4px; }
.circle { width: 34px; height: 34px; border-radius: 50%; border: 0; background: var(--fill); color: var(--blue); display: grid; place-items: center; }
.circle svg { width: 18px; height: 18px; fill: currentColor; }
.circle:active { background: var(--sep); }
.nav.inline { align-items: center; padding: 6px 8px 6px 4px; }
.back { display: inline-flex; align-items: center; gap: 2px; border: 0; background: none; color: var(--blue); font-size: 17px; padding: 6px 8px 6px 4px; border-radius: 8px; }
.back svg { width: 12px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.nav-title { flex: 1; text-align: center; font-size: 17px; font-weight: 600; letter-spacing: -.2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.text-btn { border: 0; background: none; color: var(--blue); font-size: 17px; padding: 6px 8px; border-radius: 8px; }
.text-btn:active, .back:active { opacity: .5; }
.menu { position: fixed; z-index: 40; top: calc(66px + env(safe-area-inset-top)); right: calc(12px + env(safe-area-inset-right)); min-width: 250px; border-radius: 16px; padding: 4px 0; color: var(--label); overflow: hidden; }
.menu button { display: block; width: 100%; border: 0; background: none; text-align: left; padding: 11px 16px; font-size: 16px; color: var(--label); border-bottom: 1px solid var(--sep); }
.menu button:last-child { border-bottom: 0; }
.menu button:hover { background: var(--fill-2); }
.notice { position: fixed; z-index: 30; top: calc(70px + env(safe-area-inset-top)); left: 50%; transform: translateX(-50%); width: min(420px, calc(100% - 24px)); padding: 10px 14px; border-radius: 16px; font-size: 15px; color: var(--label); display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* Inset grouped lists */
.group { list-style: none; margin: 0 0 18px; padding: 0; background: var(--card); border-radius: var(--r); overflow: hidden; }
.group-title { margin: 0 0 6px 16px; font-size: 13px; line-height: 18px; color: var(--label-2); text-transform: uppercase; letter-spacing: .02em; }
.group-foot { margin: -10px 16px 18px; font-size: 13px; line-height: 18px; color: var(--label-2); }
.rows > li { position: relative; }
.rows > li + li::before { content: ''; position: absolute; left: 92px; right: 0; top: 0; height: 1px; background: var(--sep); transform: scaleY(.5); }
.row { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 64px; padding: 10px 12px 10px 16px; border: 0; background: none; text-align: left; }
.row:active, .trip-row:active { background: var(--fill-2); }
/* Picture of the aircraft (Planespotters.net) with a status dot; the glyph stands in until a photo arrives. */
.pic { position: relative; flex: none; width: 64px; height: 46px; border-radius: 10px; background: var(--fill); overflow: visible; --c: var(--lost); }
.pic.k-air { --c: var(--air); } .pic.k-move { --c: var(--move); } .pic.k-ground { --c: var(--green); }
.pic img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 10px; background: var(--fill); }
.pic .glyph { display: grid; place-items: center; width: 100%; height: 100%; border-radius: 10px; background: color-mix(in srgb, var(--c) 18%, transparent); }
.pic .glyph svg { width: 26px; height: 26px; fill: var(--c); transform: rotate(var(--trk, 0deg)); transition: transform .8s ease; }
.pic .dot { position: absolute; right: -4px; bottom: -4px; width: 14px; height: 14px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 2.5px var(--card); }
.pic.k-air .dot { animation: ping 1.4s infinite; }
.pic.k-lost .dot { display: none; }
.row .text { flex: 1; min-width: 0; display: grid; gap: 1px; }
.row .title { font-size: 17px; font-weight: 600; letter-spacing: -.2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .sub { font-size: 15px; color: var(--label-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .sub.strong { color: var(--label); }
.row .trail { flex: none; display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--label-2); max-width: 34%; }
.row .trail .when { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .trail .live { color: var(--blue); font-weight: 600; display: inline-flex; align-items: center; gap: 5px; }
.row .trail .live i { width: 8px; height: 8px; border-radius: 50%; background: var(--blue); animation: ping 1.4s infinite; }
.chev { width: 8px; height: 14px; fill: none; stroke: var(--label-3); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.empty { padding: 24px 16px; color: var(--label-2); font-size: 15px; text-align: center; }
.footnote { margin: 0 16px 12px; font-size: 13px; line-height: 18px; color: var(--label-2); }
.status { color: var(--orange); } .status:empty { display: none; }

/* Detail view */
.hero { display: grid; justify-items: center; text-align: center; padding: 4px 16px 16px; }
.hero .pic.big { width: 100%; max-width: 360px; height: auto; aspect-ratio: 3 / 2; border-radius: 14px; margin-bottom: 12px; box-shadow: 0 1px 2px rgba(0,0,0,.08), 0 6px 20px rgba(0,0,0,.12); }
.hero .pic.big img, .hero .pic.big .glyph { border-radius: 14px; }
.hero .pic.big .glyph svg { width: 56px; height: 56px; }
.hero .pic.big .dot { width: 18px; height: 18px; right: -3px; bottom: -3px; border-radius: 50%; }
.hero .credit { font-size: 12px; color: var(--label-3); margin-top: 4px; }
.hero .credit:hover { color: var(--blue); }
.hero h2 { margin: 0; font-size: 22px; line-height: 28px; font-weight: 700; letter-spacing: -.3px; }
.hero p { margin: 2px 0 0; font-size: 15px; color: var(--label-2); }
.now { padding: 12px 16px; display: grid; gap: 3px; }
.now .state { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; color: var(--c, var(--label-2)); }
.now .state i { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.now.k-air { --c: var(--air); } .now.k-move { --c: var(--move); } .now.k-ground { --c: var(--green); } .now.k-lost { --c: var(--gray); }
.now.k-air .state i, .now.k-move .state i { animation: ping 1.4s infinite; }
.now .where { font-size: 20px; font-weight: 600; letter-spacing: -.3px; line-height: 1.25; }
.now .line { font-size: 15px; color: var(--label-2); }
.now .line.stats { color: var(--label); font-variant-numeric: tabular-nums; }
.strip { display: flex; align-items: center; gap: 10px; margin-top: 8px; font-size: 13px; font-weight: 700; }
.strip .bar { position: relative; flex: 1; height: 4px; border-radius: 4px; background: var(--fill); }
.strip .done { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 4px; background: var(--air); }
.strip .dot { position: absolute; top: 50%; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; background: var(--air); box-shadow: 0 0 0 2px var(--card); }
.strip .q { color: var(--label-2); font-weight: 600; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(108px, 1fr)); gap: 10px; margin-bottom: 18px; }
.stat { background: var(--card); border-radius: var(--r); padding: 12px 14px; display: grid; gap: 2px; }
.stat small { font-size: 13px; color: var(--label-2); }
.stat b { font-size: 20px; font-weight: 700; letter-spacing: -.4px; line-height: 1.15; white-space: nowrap; }
.stat span { font-size: 13px; color: var(--label-2); }
.trip-row { display: grid; grid-template-columns: 36px 1fr auto; column-gap: 12px; align-items: center; width: 100%; padding: 9px 12px 9px 16px; border: 0; background: none; text-align: left; }
.rows.trips > li + li::before { left: 64px; }
.trips li.sel .trip-row { background: var(--fill-2); }
.thumb { width: 36px; height: 36px; }
.thumb path { fill: none; stroke: var(--label-2); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.thumb circle { fill: var(--blue); }
.trip-row .route { font-size: 16px; font-weight: 600; letter-spacing: -.2px; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.trip-row .route small { display: block; font-size: 13px; font-weight: 400; color: var(--label-2); margin-top: 1px; }
.trip-row .dur { text-align: right; font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.trip-row .dur small { display: block; font-size: 13px; font-weight: 400; color: var(--label-2); }
li.now-trip .route, li.now-trip .dur { color: var(--blue); }
.actions .row { min-height: 48px; padding: 12px 16px; font-size: 17px; color: var(--blue); justify-content: space-between; }
.actions .row.danger { color: var(--red); }
.actions .row svg.ext { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.more-btn { width: 100%; border: 0; background: var(--card); color: var(--blue); border-radius: var(--r); padding: 12px; font-size: 16px; margin: -8px 0 18px; }

/* Dialogs: iOS alert / form sheet */
dialog { border: 0; border-radius: 16px; padding: 0; width: min(380px, calc(100% - 40px)); background: var(--material-strong); -webkit-backdrop-filter: saturate(180%) blur(30px); backdrop-filter: saturate(180%) blur(30px); color: var(--label); box-shadow: 0 0 0 .5px rgba(0,0,0,.12), 0 24px 80px rgba(0,0,0,.35); }
dialog::backdrop { background: rgba(0,0,0,.35); }
dialog h2 { margin: 0; padding: 20px 20px 4px; text-align: center; font-size: 17px; font-weight: 600; }
dialog p { margin: 0; padding: 0 20px 14px; text-align: center; font-size: 13px; line-height: 18px; color: var(--label-2); }
dialog p.left { text-align: left; }
.form { display: grid; gap: 10px; padding: 8px 16px 16px; }
.form label { display: grid; gap: 4px; font-size: 13px; color: var(--label-2); }
.form label small { font-size: 12px; color: var(--label-3); }
.form input, .form textarea { padding: 10px 12px; border: 0; border-radius: 10px; background: var(--fill); color: var(--label); font-size: 17px; outline: none; }
.form input:focus, .form textarea:focus { box-shadow: 0 0 0 3px color-mix(in srgb, var(--blue) 35%, transparent); }
.form .err { color: var(--red); font-size: 13px; margin: 0; padding: 0; text-align: left; }
.form .err:empty { display: none; }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 2px; font-size: 17px; color: var(--label); }
.switch { position: relative; width: 51px; height: 31px; flex: none; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.switch i { position: absolute; inset: 0; border-radius: 999px; background: var(--fill); transition: background .2s; }
.switch i::after { content: ''; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff; box-shadow: 0 3px 8px rgba(0,0,0,.15), 0 1px 1px rgba(0,0,0,.16); transition: transform .2s; }
.switch input:checked + i { background: var(--green); } .switch input:checked + i::after { transform: translateX(20px); }
.btns { display: flex; border-top: 1px solid var(--sep); }
.btns button { flex: 1; border: 0; background: none; padding: 13px; font-size: 17px; color: var(--blue); }
.btns button + button { border-left: 1px solid var(--sep); }
.btns button.bold { font-weight: 600; } .btns button.danger { color: var(--red); }
.btns button:active { background: var(--fill-2); }
.toast { position: fixed; left: 50%; top: calc(14px + env(safe-area-inset-top)); transform: translateX(-50%); z-index: 50; background: var(--material-strong); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); color: var(--label); padding: 10px 16px; border-radius: 999px; font-size: 15px; font-weight: 500; box-shadow: 0 0 0 .5px rgba(0,0,0,.1), 0 8px 24px rgba(0,0,0,.18); max-width: calc(100% - 32px); text-align: center; }

@keyframes ping { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@keyframes pulse { 0% { transform: scale(1); opacity: .5; } 100% { transform: scale(2.6); opacity: 0; } }
@keyframes spin { to { transform: rotate(360deg); } }
@media (max-width: 480px) { .row .trail .when { display: none; } }
@media (prefers-reduced-motion: reduce) { *, *::before { animation: none !important; transition: none !important; } }

/* Phone overrides that must win over the shared rules above */
@media (max-width: 899px) {
  .back { display: none; }
  .nav.inline { padding: 0 12px 8px 12px; }
  .nav-title { text-align: left; font-size: 20px; font-weight: 700; padding-left: 4px; }
}
@media (min-width: 900px) {
  .menu { top: 60px; left: 150px; right: auto; }
  .notice { left: calc(412px + (100vw - 412px) / 2); }
}
