/* M60 Motorway. Paper, ink and a dusk-rose road: the same quiet palette as dejones.io's reading pages. */
:root {
  color-scheme: light;
  --paper: #f5f1e8;
  --paper-deep: #eee8da;
  --card: #fbf9f4;
  --ink: #2f3b35;
  --ink-mid: #4d5952;
  --muted: #6c776f;
  --rule: #dcd9cc;
  --rule-soft: rgba(47, 59, 53, 0.08);
  --glass: rgba(251, 249, 244, 0.82);

  --land: #efe9dc;
  --water: #a9c2bd;
  --water-ink: #5d8480;
  --route: #a4606b;
  --route-halo: #f7f2e7;
  --route-deep: #7c4651;
  --spur: #cdb9a3;
  --gold: #d99a3e;
  --gold-ink: #3a2a10;
  --token: #fbf9f4;
  --token-ink: #2f3b35;
  --town: #8b8f84;

  --shadow-sm: 0 1px 2px rgba(47, 40, 30, 0.05), 0 2px 8px rgba(47, 40, 30, 0.04);
  --shadow-md: 0 2px 8px rgba(47, 40, 30, 0.07), 0 8px 24px rgba(47, 40, 30, 0.06);

  --tone-cream: #fffaf3; --tone-sage: #eff5ee; --tone-sky: #eef4fc; --tone-rose: #fdf0f4;
  --tone-lavender: #f2f0fb; --tone-amber: #fdf6e3; --tone-slate: #f0f2f6; --tone-mint: #edf8f5;

  --sc-sky-0: #f5f1e8; --sc-sky-1: #f3dcc2; --sc-sky-2: #eab99d; --sc-sun: #fff2cf;
  --sc-far: #d8b8b0; --sc-city: #c49fa2; --sc-verge: #8e9377; --sc-water-0: #e4b8a2; --sc-water-1: #8e9c9d;
  --sc-deck: #7d6b70; --sc-parapet: #f1e3d1; --sc-pier: #927f83; --sc-head: #fff4d6; --sc-tail: #d6574a;

  --display: "Lora", Georgia, "Times New Roman", serif;
  --ui: "DM Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #1a2428;
  --paper-deep: #162024;
  --card: #1f2b30;
  --ink: #ece9dd;
  --ink-mid: #cfd2c8;
  --muted: #9ba7a1;
  --rule: #33444a;
  --rule-soft: rgba(236, 233, 221, 0.08);
  --glass: rgba(31, 43, 48, 0.8);

  --land: #1e2a2f;
  --water: #36575f;
  --water-ink: #83a6aa;
  --route: #cf95a1;
  --route-halo: #1e2a2f;
  --route-deep: #e5b6bf;
  --spur: #4e5c66;
  --gold: #e8b25c;
  --gold-ink: #2a1d08;
  --token: #1a2428;
  --token-ink: #ece9dd;
  --town: #7f8c88;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3), 0 2px 8px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.35), 0 10px 28px rgba(0, 0, 0, 0.3);

  --tone-cream: #2a2722; --tone-sage: #222a23; --tone-sky: #21262e; --tone-rose: #2c2226;
  --tone-lavender: #272430; --tone-amber: #2a2720; --tone-slate: #24262b; --tone-mint: #212b28;

  --sc-sky-0: #1a2428; --sc-sky-1: #28294d; --sc-sky-2: #634a6c; --sc-sun: #efe6d6;
  --sc-far: #2c3152; --sc-city: #242845; --sc-verge: #1a2731; --sc-water-0: #393462; --sc-water-1: #10172d;
  --sc-deck: #3b384f; --sc-parapet: #77768f; --sc-pier: #312f46; --sc-head: #ffe8ad; --sc-tail: #ff5b4b;
}

* { box-sizing: border-box; }


html, body { height: 100%; }
body {
  margin: 0;
  min-width: 320px;
  overflow: hidden;
  background: var(--land);
  color: var(--ink);
  font: 400 1rem/1.6 var(--ui);
  -webkit-font-smoothing: antialiased;
}
a, button { -webkit-tap-highlight-color: transparent; }
button { font: inherit; color: inherit; }
a { color: inherit; }
:focus-visible { outline: 2px solid color-mix(in srgb, var(--ink) 45%, transparent); outline-offset: 3px; }
[hidden] { display: none !important; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }

/* ?card: just the map and the title, for the share image */
.card .panel, .card .float-tools, .card .float-foot, .card .float-scale, .card .show-panel { display: none !important; }

.eyebrow { margin: 0; color: var(--muted); font-size: 0.68rem; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; }

/* ---------- the stage: a full-window map with things floating over it ---------- */
/* --inset-r and --inset-b are the space the panel takes, so the map centres in what is left */
.stage { --gap: 16px; --panel-w: 400px; --inset-r: calc(var(--panel-w) + var(--gap) * 2); --inset-b: 0px; position: fixed; inset: 0; }
.stage.panel-hidden { --inset-r: 0px; }

.map-card {
  position: absolute;
  inset: 0;
  background-color: var(--land);
  /* a faint paper grain */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .35 0 0 0 0 .3 0 0 0 0 .22 0 0 0 .07 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}
#map { display: block; width: 100%; height: 100%; cursor: grab; user-select: none; -webkit-user-select: none; touch-action: none; }
#map.dragging { cursor: grabbing; }

.glass {
  background: var(--glass);
  backdrop-filter: blur(12px) saturate(1.3);
  -webkit-backdrop-filter: blur(12px) saturate(1.3);
}

.float-title {
  position: absolute;
  top: calc(var(--gap) + env(safe-area-inset-top, 0px));
  left: var(--gap);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 18px 8px 8px;
  border-radius: 999px;
  border: 1px solid var(--rule-soft);
  background: var(--glass);
  backdrop-filter: blur(12px) saturate(1.3);
  -webkit-backdrop-filter: blur(12px) saturate(1.3);
  box-shadow: var(--shadow-sm);
  pointer-events: none;
}
.mark { flex: none; width: 40px; height: 40px; }
.mark-ring { fill: none; stroke: var(--route); stroke-width: 3.4; }
.mark-j1 { fill: var(--gold); stroke: var(--card); stroke-width: 1.6; }
.title-copy { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.title-copy h1 { margin: 0; font: 500 1.2rem/1.15 var(--display); letter-spacing: -0.03em; }
.title-copy small { color: var(--muted); font-size: 0.64rem; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; white-space: nowrap; }

.float-tools { position: absolute; top: calc(var(--gap) + 74px + env(safe-area-inset-top, 0px)); left: var(--gap); display: flex; flex-direction: column; gap: 8px; }
.round-button {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--rule);
  border-radius: 50%;
  background: var(--glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--ink);
  cursor: pointer;
  transition: transform 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}
.round-button:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); background: var(--card); }
.round-button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.round-button.small { width: 34px; height: 34px; flex: none; }
.round-button.small svg { width: 16px; height: 16px; }
.theme-toggle .moon { display: none; }
[data-theme="dark"] .theme-toggle .sun { display: none; }
[data-theme="dark"] .theme-toggle .moon { display: block; }

.float-foot { position: absolute; left: var(--gap); bottom: calc(var(--gap) + var(--inset-b) + env(safe-area-inset-bottom, 0px)); display: flex; gap: 8px; }
.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 18px 0 14px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: var(--glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  font-size: 0.86rem;
  font-weight: 500;
  cursor: pointer;
  transition: transform 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}
.pill:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); background: var(--card); }
.pill svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
#drive .play, #drive .stop { fill: var(--gold); stroke: none; }
#drive .stop { display: none; }
#drive[aria-pressed="true"] .play { display: none; }
#drive[aria-pressed="true"] .stop { display: block; }

.float-scale {
  position: absolute;
  right: calc(var(--inset-r) + var(--gap));
  bottom: calc(var(--gap) + var(--inset-b) + env(safe-area-inset-bottom, 0px));
  display: flex;
  align-items: flex-end;
  gap: 12px;
  color: var(--ink-mid);
  pointer-events: none;
  transition: right 0.3s ease;
}
.float-scale .north { width: 13px; }
.float-scale .north path { fill: var(--route); }
.float-scale .north text { fill: var(--ink-mid); font: 500 7px var(--display); text-anchor: middle; }
.float-scale .scale { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; font: italic 400 0.74rem var(--display); }
.float-scale .bar { display: block; height: 6px; border: 1.5px solid var(--ink-mid); border-top: 0; }
.float-scale .credit { font-size: 0.64rem; color: var(--muted); }

.show-panel { position: absolute; top: calc(var(--gap) + env(safe-area-inset-top, 0px)); right: var(--gap); }

.tip {
  position: absolute;
  z-index: 3;
  pointer-events: none;
  padding: 7px 12px 6px;
  border-radius: 12px;
  background: var(--card);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--rule-soft);
  font-size: 0.8rem;
  white-space: nowrap;
  transform: translate(-50%, calc(-100% - 16px));
}
.tip b { font: 500 0.9rem var(--display); margin-right: 4px; }
.tip span { color: var(--muted); }

/* ---------- map drawing ---------- */
.water { fill: none; stroke: var(--water); stroke-linecap: round; stroke-linejoin: round; stroke-width: calc(var(--k) * 1.5px); }
.water.canal { stroke-width: calc(var(--k) * 2.6px); }
.water-label text { fill: var(--water-ink); font: italic 400 11px var(--display); letter-spacing: 0.02em; paint-order: stroke; stroke: var(--land); stroke-width: 3px; stroke-linejoin: round; }
.spur { fill: none; stroke: var(--spur); stroke-width: calc(var(--k) * 4px); stroke-linecap: round; stroke-linejoin: round; }
.ring-halo { fill: none; stroke: var(--route-halo); stroke-width: calc(var(--k) * 12px); stroke-linecap: round; stroke-linejoin: round; }
.ring { fill: none; stroke: var(--route); stroke-width: calc(var(--k) * 6.5px); stroke-linecap: round; stroke-linejoin: round; }
.arc { fill: none; stroke: var(--gold); stroke-width: calc(var(--k) * 6.5px); stroke-linecap: round; stroke-linejoin: round; }
.companion { fill: none; stroke: var(--route); stroke-width: calc(var(--k) * 1.4px); stroke-dasharray: calc(var(--k) * 1px) calc(var(--k) * 5px); stroke-linecap: round; opacity: 0.9; }
.chev { fill: none; stroke: var(--route-halo); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.leader { stroke: var(--muted); stroke-width: calc(var(--k) * 0.9px); opacity: 0.55; }
.anchor { fill: var(--route-halo); stroke: var(--route-deep); stroke-width: calc(var(--k) * 1.4px); }
.anchor.on { fill: var(--gold); stroke: var(--gold-ink); }

.place text { fill: var(--town); font: 500 10px var(--ui); letter-spacing: 0.14em; text-transform: uppercase; paint-order: stroke; stroke: var(--land); stroke-width: 3.5px; stroke-linejoin: round; }
.place.landmark text { font: italic 400 11px var(--display); letter-spacing: 0.01em; text-transform: none; }
.place.landmark circle { fill: var(--town); }
.place.city text { fill: var(--ink); font: italic 400 16px var(--display); letter-spacing: -0.01em; text-transform: none; }
.place.city circle { fill: var(--ink); }
.place.city .ring-mark { fill: none; stroke: var(--ink); stroke-width: 1; }

.road-tag rect { fill: var(--card); stroke: var(--ink-mid); stroke-width: 1; }
.road-tag .ref { fill: var(--ink); font: 600 10.5px var(--ui); letter-spacing: 0.02em; }
.road-tag .to { fill: var(--muted); font: italic 400 10.5px var(--display); paint-order: stroke; stroke: var(--land); stroke-width: 3px; stroke-linejoin: round; }
.road-tag.companion-tag rect { stroke: var(--route); }
.road-tag.companion-tag .ref { fill: var(--route-deep); }

.token { cursor: pointer; }
.token circle.face { fill: var(--token); stroke: var(--token-ink); stroke-width: 1.3; transition: fill 0.15s ease; }
.token.mw circle.face { fill: var(--ink); stroke: var(--ink); }
.token text { fill: var(--token-ink); font: 600 10.5px var(--ui); text-anchor: middle; dominant-baseline: central; font-variant-numeric: tabular-nums; pointer-events: none; }
.token.mw text { fill: var(--paper); }
.token .glow { fill: var(--gold); opacity: 0; transition: opacity 0.2s ease; }
.token:hover circle.face { fill: color-mix(in srgb, var(--gold) 28%, var(--token)); }
.token.mw:hover circle.face { fill: color-mix(in srgb, var(--gold) 30%, var(--ink)); }
.token.spot .glow { opacity: 0.35; }
.token.sel circle.face { fill: var(--gold); stroke: var(--gold-ink); }
.token.sel text { fill: var(--gold-ink); }
.token.sel .glow { opacity: 0.3; }
.car .halo { fill: var(--gold); opacity: 0.3; }
.car .dot { fill: var(--gold); stroke: var(--card); stroke-width: 2; }


/* ---------- the panel ---------- */
.panel {
  position: absolute;
  top: calc(var(--gap) + env(safe-area-inset-top, 0px));
  right: var(--gap);
  bottom: calc(var(--gap) + env(safe-area-inset-bottom, 0px));
  width: var(--panel-w);
  display: flex;
  flex-direction: column;
  border-radius: 22px;
  border: 1px solid var(--rule-soft);
  background: color-mix(in srgb, var(--card) 94%, transparent);
  backdrop-filter: blur(16px) saturate(1.3);
  -webkit-backdrop-filter: blur(16px) saturate(1.3);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.25s ease;
}
.panel-hidden .panel { transform: translateX(calc(100% + var(--gap) * 2)); opacity: 0; pointer-events: none; }
@media (prefers-reduced-motion: reduce) { .panel, .float-scale { transition: none; } }

.panel-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 12px 10px 14px; border-bottom: 1px solid var(--rule-soft); }
#hide-panel .sheet { display: none; }
.panel-top .segmented { flex: none; }
.panel-actions { display: flex; gap: 6px; }
#about-btn .dot { fill: currentColor; }
#about-btn[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }

.panes { flex: 1; min-height: 0; overflow: hidden auto; overscroll-behavior: contain; scrollbar-width: thin; }
.pane { padding: 6px 12px 22px; }
.pane.about { position: relative; padding: 18px 20px 22px; }

/* the ring, stretch by stretch */
.stretch + .stretch { margin-top: 4px; }
.stretch-head { display: flex; justify-content: space-between; gap: 12px; margin: 0; padding: 18px 8px 6px; color: var(--muted); font: 500 0.68rem/1.4 var(--ui); letter-spacing: 0.12em; text-transform: uppercase; }
.stretch-head span:last-child { letter-spacing: 0.04em; }

.jitem { border-radius: 16px; transition: background-color 0.2s ease, box-shadow 0.2s ease; }
.jitem.open { background: var(--card); box-shadow: var(--shadow-sm), 0 0 0 1px var(--rule-soft); margin: 4px 0; }
[data-theme="dark"] .jitem.open { background: var(--paper); }
.jrow {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  width: 100%;
  padding: 9px 8px;
  border: 0;
  background: transparent;
  text-align: left;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  border-radius: 14px;
}
.jitem:not(.open) .jrow:hover { background: color-mix(in srgb, var(--gold) 9%, transparent); }
.jrow .num { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; border: 1.2px solid var(--ink); font: 600 0.78rem var(--ui); font-variant-numeric: tabular-nums; }
.jrow .num.mw { background: var(--ink); color: var(--paper); }
.jitem.open .num { width: 32px; height: 32px; background: var(--gold); border-color: var(--gold-ink); color: var(--gold-ink); font-size: 0.86rem; }
.jrow .where { display: flex; flex-direction: column; min-width: 0; }
.jrow .place { font: 400 1.02rem/1.3 var(--display); letter-spacing: -0.015em; }
.jitem.open .place { font-size: 1.28rem; }
.jrow .roads { color: var(--muted); font-size: 0.72rem; white-space: nowrap; }

.jbody { padding: 0 16px 16px; }
.jrow .aka { color: var(--muted); font: italic 400 0.9rem/1.35 var(--display); }

.back { position: absolute; z-index: 2; top: 12px; left: 14px; display: inline-flex; align-items: center; gap: 4px; height: 32px; padding: 0 12px 0 8px; border: 1px solid var(--rule); border-radius: 999px; background: var(--glass); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); font-size: 0.8rem; font-weight: 500; cursor: pointer; }
.back svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

.segmented { display: inline-flex; gap: 2px; padding: 3px; border-radius: 999px; background: var(--rule-soft); }
.segmented button { display: inline-flex; align-items: center; gap: 6px; border: 0; border-radius: 999px; background: transparent; padding: 7px 14px; font-size: 0.84rem; font-weight: 500; color: var(--muted); cursor: pointer; transition: background-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease; }
.segmented button[aria-pressed="true"] { background: var(--card); color: var(--ink); box-shadow: var(--shadow-sm); }
[data-theme="dark"] .segmented button[aria-pressed="true"] { background: var(--paper); }
.segmented svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }


.signs { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--rule); }
.signs .eyebrow { margin-bottom: 12px; }
.sign-row { display: flex; align-items: baseline; gap: 12px; padding: 6px 0; }
.sign-row + .sign-row { border-top: 1px dashed var(--rule); }
.chips { display: inline-flex; gap: 5px; flex: none; }
.chip { display: inline-block; min-width: 42px; padding: 2px 9px 1px; border-radius: 999px; font: 600 0.74rem/1.6 var(--ui); text-align: center; letter-spacing: 0.02em; border: 1px solid var(--ink-mid); color: var(--ink); }
.chip.m { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.places { font: 400 1.06rem/1.35 var(--display); letter-spacing: -0.015em; }
.no-exit { margin: 0; font: italic 400 1.05rem/1.5 var(--display); color: var(--ink-mid); }
.no-exit span { display: block; margin-top: 4px; font: 400 0.88rem/1.5 var(--ui); font-style: normal; color: var(--muted); }

.facts { display: grid; grid-template-columns: repeat(3, 1fr); margin: 14px 0 0; border-top: 1px solid var(--rule); }
.facts div { padding: 14px 0 0; }
.facts div + div { padding-left: 14px; border-left: 1px solid var(--rule); }
.facts dt { color: var(--muted); font-size: 0.66rem; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; }
.facts dd { margin: 4px 0 0; font: 400 1.2rem/1.2 var(--display); letter-spacing: -0.02em; font-variant-numeric: lining-nums tabular-nums; }
.facts dd small { color: var(--muted); font: 400 0.78rem var(--ui); letter-spacing: 0; }
.exits { display: flex; gap: 10px; font: 400 0.86rem/1.5 var(--ui) !important; }
.exits span { display: inline-flex; align-items: center; gap: 4px; }
.exits .no { color: var(--muted); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--muted) 60%, transparent); }
.exits svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

.note { margin: 14px 0 0; font: italic 400 0.95rem/1.65 var(--display); color: var(--ink-mid); }







.prose p { margin: 16px 0 0; font: 400 1rem/1.8 var(--display); color: var(--ink-mid); }
.figures { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 24px 0 0; }
.figures div { padding: 14px 16px; border-radius: 16px; background: var(--card); border: 1px solid var(--rule-soft); }
.figures dt { color: var(--muted); font-size: 0.66rem; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; }
.figures dd { margin: 4px 0 0; font: 400 1.5rem/1.1 var(--display); letter-spacing: -0.03em; font-variant-numeric: lining-nums; }

.scene { position: relative; margin: -18px -20px 0; }
.scene svg { display: block; width: 100%; height: 170px; }
.scene figcaption { padding: 10px 20px 0; color: var(--muted); font: italic 400 0.84rem/1.5 var(--display); }
.scene-stars circle { fill: #fff; opacity: 0; transition: opacity 0.8s ease; }
[data-theme="dark"] .scene-stars circle { opacity: 0.8; }
.scene-sun { transition: transform 0.8s ease; }
[data-theme="dark"] .scene-sun { transform: translate(-340px, -110px) scale(0.7); transform-origin: 1085px 168px; }
.scene-far { fill: var(--sc-far); }
.scene-city { fill: var(--sc-city); }
.scene-windows rect { fill: #f2c46f; opacity: 0; transition: opacity 0.8s ease; }
.scene-beacon { fill: #e0584a; opacity: 0; }
[data-theme="dark"] .scene-windows rect { opacity: 0.85; }
[data-theme="dark"] .scene-beacon { opacity: 1; }
.scene-verge { fill: var(--sc-verge); }
.scene-shine path { stroke: var(--sc-sun); stroke-width: 2; stroke-linecap: round; opacity: 0.5; }
[data-theme="dark"] .scene-shine { transform: translateX(-340px); }
.scene-piers rect { fill: var(--sc-pier); }
.scene-deck { fill: none; stroke: var(--sc-deck); stroke-width: 9; }
.scene-parapet { fill: none; stroke: var(--sc-parapet); stroke-width: 1.4; opacity: 0.8; }
.scene-traffic .head circle { fill: var(--sc-head); }
.scene-traffic .tail circle { fill: var(--sc-tail); }
.scene-traffic { opacity: 0.75; }
[data-theme="dark"] .scene-traffic { opacity: 1; }
@media (prefers-reduced-motion: no-preference) {
  [data-theme="dark"] .scene-beacon { animation: beacon 2.6s ease-in-out infinite; }
  @keyframes beacon { 50% { opacity: 0.2; } }
}

.about .figures { margin-top: 18px; }
.about .figures div { padding: 10px 12px; }
.about .figures dd { font-size: 1.2rem; }
.about .prose p { font-size: 0.95rem; line-height: 1.75; }
.about-h { margin: 26px 0 0; font: 400 1.25rem/1.3 var(--display); letter-spacing: -0.02em; }
.quirks { list-style: none; margin: 8px 0 0; padding: 0; }
.quirks li { padding: 12px 0; border-bottom: 1px solid var(--rule-soft); }
.quirks p { margin: 0; }
.q-title { font-size: 0.88rem; font-weight: 600; }
.q-text { margin-top: 3px !important; color: var(--ink-mid); font-size: 0.84rem; line-height: 1.55; }
.q-links { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px !important; }
.jlink { display: inline-grid; place-items: center; color: inherit; text-decoration: none; height: 24px; padding: 0 9px; border: 1px solid var(--rule); border-radius: 999px; background: transparent; font: 600 0.72rem var(--ui); font-variant-numeric: tabular-nums; cursor: pointer; transition: background-color 0.15s ease, border-color 0.15s ease; }
.jlink:hover { background: color-mix(in srgb, var(--gold) 22%, transparent); border-color: var(--gold); }
.about .prose p:first-child { margin-top: 8px; }
.keys, .credits { margin: 16px 0 0; color: var(--muted); font-size: 0.78rem; line-height: 1.6; }
.credits a { text-underline-offset: 3px; }
kbd { font: 500 0.72rem var(--ui); border: 1px solid var(--rule); border-bottom-width: 2px; border-radius: 5px; padding: 0 5px; background: var(--card); }

/* ---------- phones: the panel becomes a bottom sheet ---------- */
@media (max-width: 720px) {
  .stage { --gap: 10px; --inset-r: 0px; --inset-b: 46svh; }
  .stage.panel-hidden { --inset-b: 58px; }
  .float-title { padding: 6px 14px 6px 6px; gap: 10px; }
  .mark { width: 34px; height: 34px; }
  .title-copy h1 { font-size: 1.05rem; }
  .float-tools { top: calc(var(--gap) + 1px + env(safe-area-inset-top, 0px)); left: auto; right: var(--gap); flex-direction: row; gap: 6px; }
  .round-button { width: 36px; height: 36px; }
  .float-scale { display: none; }
  .title-copy small { display: none; }
  .float-foot { top: calc(var(--gap) + 1px + env(safe-area-inset-top, 0px)); bottom: auto; left: auto; right: calc(var(--gap) + 168px); }
  #drive { width: 36px; height: 36px; padding: 0; justify-content: center; }
  #drive-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .panel {
    top: auto;
    left: 0;
    right: 0;
    bottom: 0;
    width: auto;
    height: 46svh;
    border-radius: 22px 22px 0 0;
    border-bottom: 0;
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }
  .panel-hidden .panel { transform: translateY(calc(100% - 58px - env(safe-area-inset-bottom, 0px))); opacity: 1; pointer-events: auto; }
  .panel-hidden .panes { visibility: hidden; }
  .show-panel { display: none !important; }
  #hide-panel .side { display: none; }
  #hide-panel .sheet { display: block; }
  .panel-hidden #hide-panel svg { transform: rotate(180deg); }
  .pane { padding: 4px 8px 20px; }
  .pane.about { padding: 16px 16px 20px; }
  .segmented button { padding: 6px 11px; }
  .scene { margin: -16px -16px 0; }
  .facts dd { font-size: 1.05rem; }
}
