:root {
  --bg: #14110e;
  --bg2: #1c1814;
  --panel: rgba(22, 18, 14, 0.78);
  --panel-solid: #201b16;
  --line: rgba(243, 232, 214, 0.14);
  --ink: #f3ebde;
  --ink2: #c9bca7;
  --ink3: #93877a;
  --old: #e0a54b;
  --old-soft: rgba(224, 165, 75, 0.16);
  --new: #8fbbe3;
  --new-soft: rgba(143, 187, 227, 0.16);
  --both: #c7b6e6;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --top: 52px;
  --r: 12px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--ink); font-family: var(--sans); -webkit-font-smoothing: antialiased; }
body { overflow: hidden; }
a { color: inherit; }
button, select { font: inherit; color: inherit; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
:focus-visible { outline: 2px solid var(--new); outline-offset: 2px; }

.app { height: 100%; display: flex; flex-direction: column; }

/* ---------------------------------------------------------------- top bar */
.top {
  height: var(--top); flex: 0 0 var(--top); display: flex; align-items: center; justify-content: space-between;
  padding: 0 16px; padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right));
  border-bottom: 1px solid var(--line); background: var(--bg); position: relative; z-index: 20;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; min-width: 0; }
.mark { font-family: var(--serif); font-size: 15px; letter-spacing: 0.08em; color: var(--old); border: 1px solid rgba(224,165,75,.45); border-radius: 8px; padding: 4px 8px; white-space: nowrap; }
.mark i { color: var(--new); font-style: normal; padding: 0 2px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; min-width: 0; }
.brand-text b { font-family: var(--serif); font-size: 18px; font-weight: 600; letter-spacing: .01em; }
.brand-text small { color: var(--ink3); font-size: 11.5px; letter-spacing: .04em; white-space: nowrap; }
.tabs { display: flex; gap: 4px; }
.tabs a { text-decoration: none; color: var(--ink2); padding: 7px 12px; border-radius: 999px; font-size: 14px; }
.tabs a:hover { color: var(--ink); background: rgba(255,255,255,.05); }
.tabs a.is-on { color: var(--bg); background: var(--ink); }

main { flex: 1 1 auto; position: relative; min-height: 0; }
.view { position: absolute; inset: 0; display: none; }
.view.is-on { display: block; }

/* ---------------------------------------------------------------- stage */
.stage { position: absolute; inset: 0; overflow: hidden; background: #0d0b09; touch-action: none; user-select: none; -webkit-user-select: none; }
#gl { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: grab; }
#gl:active { cursor: grabbing; }

.pane { position: absolute; pointer-events: none; display: flex; flex-direction: column; justify-content: space-between; }
.pane[hidden] { display: none; }
.pane-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; padding: 12px 14px; }
.pane-id { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; min-width: 0; }
.tag { font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; padding: 4px 8px; border-radius: 6px; background: var(--panel); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
button.tag { border: 0; font-family: var(--sans); cursor: pointer; pointer-events: auto; white-space: nowrap; }
button.tag::after { content: "\21C4"; margin-left: 7px; letter-spacing: 0; opacity: .65; font-weight: 400; }
button.tag:hover::after { opacity: 1; }
.tag.old { color: var(--old); box-shadow: inset 0 0 0 1px rgba(224,165,75,.35); }
.tag.new { color: var(--new); box-shadow: inset 0 0 0 1px rgba(143,187,227,.35); }
/* the view the keys drive, when the two views walk separately */
.pane::before { content: ""; position: absolute; inset: 0; pointer-events: none; box-shadow: inset 0 0 0 2px transparent; transition: box-shadow .25s; }
.pane.is-active[data-side="old"]::before { box-shadow: inset 0 0 0 2px rgba(224,165,75,.75); }
.pane.is-active[data-side="new"]::before { box-shadow: inset 0 0 0 2px rgba(143,187,227,.75); }
/* radar, one in each view */
.radar-host { flex: 0 0 auto; pointer-events: auto; }
.radar { width: 148px; }
.radar canvas { display: block; width: 148px; height: 148px; border-radius: 50%; cursor: crosshair; box-shadow: 0 6px 22px rgba(0,0,0,.35), 0 0 0 1px var(--line); }
.radar.is-plan canvas { border-radius: 12px; }
.radar-bar { display: flex; justify-content: center; gap: 4px; margin-top: 5px; }
.radar-bar button { border: 0; background: var(--panel); color: var(--ink2); border-radius: 999px; min-width: 28px; height: 24px; padding: 0 6px; font-size: 13px; line-height: 1; cursor: pointer; box-shadow: inset 0 0 0 1px var(--line); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.radar-bar button:hover { color: var(--ink); }
.radar-bar button.wide { padding: 0 10px; font-size: 12px; }
.stage.no-radar .radar-host { display: none; }
/* a short dip to dark when a view jumps somewhere it cannot glide to */
.pane-fade { position: absolute; inset: 0; background: #0d0b09; opacity: 0; transition: opacity .22s ease; pointer-events: none; }
.pane-fade.on { opacity: 1; }
.pane-top, .pane-bottom { position: relative; }
/* a linked view that cannot stand on the other view's spot says why */
.pane-note { flex-basis: 100%; margin: 2px 0 0; max-width: 360px; font-size: 12.5px; line-height: 1.4; color: var(--ink); background: var(--panel); padding: 6px 10px; border-radius: 10px; box-shadow: inset 0 0 0 1px var(--line); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); pointer-events: auto; }
.pane-note[hidden] { display: none; }
.pane-note button { border: 0; background: var(--ink); color: var(--bg); border-radius: 999px; padding: 2px 9px; margin-left: 4px; font-size: 12px; cursor: pointer; }
.sm-l { display: none; }
.when { font-family: var(--serif); font-size: 22px; text-shadow: 0 1px 12px rgba(0,0,0,.8), 0 0 2px rgba(0,0,0,.9); }
.when small { font-family: var(--sans); font-size: 12.5px; color: var(--ink2); margin-left: 8px; letter-spacing: .02em; }
.pane-bottom { padding: 0 12px 12px; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.pane-bottom > * { pointer-events: auto; }

.chips { display: flex; gap: 6px; overflow-x: auto; max-width: 100%; padding: 4px 2px 6px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto; border: 0; cursor: pointer; padding: 6px 10px; border-radius: 999px; font-size: 13px; font-variant-numeric: tabular-nums;
  background: var(--panel); color: var(--ink2); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  box-shadow: inset 0 0 0 1px var(--line); white-space: nowrap;
}
.chip:hover { color: var(--ink); }
.chip b { font-weight: 650; color: var(--ink); margin-right: 5px; }
.pane[data-side="old"] .chip.is-on { background: var(--old); color: #1a1209; box-shadow: none; }
.pane[data-side="new"] .chip.is-on { background: var(--new); color: #0c1520; box-shadow: none; }
.chip.is-on b { color: inherit; }
.chip.same { box-shadow: inset 0 0 0 1px var(--both); }

.card {
  width: min(440px, 100%); background: var(--panel); border-radius: var(--r); padding: 12px 14px 12px; box-shadow: inset 0 0 0 1px var(--line), 0 8px 30px rgba(0,0,0,.35);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); max-height: 42vh; overflow: auto;
}
.card h2 { font-family: var(--serif); font-weight: 600; font-size: 19px; margin: 0 0 2px; line-height: 1.2; }
.card .date { font-size: 12px; color: var(--ink3); letter-spacing: .03em; margin-bottom: 6px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.card p { margin: 6px 0 0; font-size: 14px; line-height: 1.5; color: var(--ink2); }
.card .see { color: var(--ink); }
.card .see::before { content: "In view: "; color: var(--ink3); }
.badge { font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; padding: 2px 6px; border-radius: 5px; border: 1px solid var(--line); color: var(--ink2); }
.badge.b-doc { border-color: rgba(143,227,170,.4); color: #a9dfb7; }
.badge.b-trad { border-color: rgba(224,165,75,.45); color: var(--old); }
.badge.b-imag { border-color: rgba(199,182,230,.45); color: var(--both); }
.card .more { display: none; }
.card.open .more { display: block; }
.card .toggle { background: none; border: 0; color: var(--ink3); padding: 6px 0 0; cursor: pointer; font-size: 12.5px; }
.card .toggle:hover { color: var(--ink); }
.card.compact:not(.open) p.sum, .card.compact:not(.open) .date { display: none; }
.card.compact:not(.open) { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 12px; }
.card.compact:not(.open) h2 { font-size: 15px; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card.compact:not(.open) .toggle { padding: 0; flex: 0 0 auto; }

.toolbar {
  display: flex; gap: 6px; align-items: center; z-index: 25;
  background: var(--panel); padding: 4px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--line);
}
.top .toolbar { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); }
body:not(.walking) .top .toolbar { display: none; }
.seg { display: inline-flex; background: rgba(255,255,255,.04); border-radius: 999px; padding: 2px; }
.seg button { border: 0; background: none; padding: 6px 11px; border-radius: 999px; cursor: pointer; color: var(--ink2); font-size: 13px; white-space: nowrap; }
.seg button.is-on { background: var(--ink); color: var(--bg); }
.tbtn { border: 0; background: rgba(255,255,255,.06); padding: 6px 11px; border-radius: 999px; cursor: pointer; color: var(--ink2); font-size: 13px; }
.tbtn[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.tbtn.round { width: 30px; padding: 6px 0; }
.goto select { background: rgba(255,255,255,.06); border: 0; border-radius: 999px; padding: 6px 10px; font-size: 13px; color: var(--ink2); max-width: 150px; }
.goto select option { background: var(--panel-solid); color: var(--ink); }


.labels { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.lbl { position: absolute; left: 0; top: 0; transform: translate(-50%, -100%); pointer-events: auto; cursor: pointer; white-space: nowrap; }
.lbl span { display: inline-block; font-size: 12px; padding: 3px 8px; border-radius: 999px; background: rgba(15,12,10,.72); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.lbl.old span { box-shadow: inset 0 0 0 1px rgba(224,165,75,.55); }
.lbl.new span { box-shadow: inset 0 0 0 1px rgba(143,187,227,.55); }
.lbl::after { content: ""; display: block; width: 1px; height: 10px; margin: 0 auto; background: rgba(243,235,222,.5); }
.pop { position: absolute; z-index: 8; width: min(320px, 86vw); background: var(--panel-solid); border-radius: 12px; padding: 12px 14px; box-shadow: 0 10px 40px rgba(0,0,0,.5), inset 0 0 0 1px var(--line); font-size: 14px; line-height: 1.5; color: var(--ink2); }
.pop h3 { margin: 0 0 4px; font-family: var(--serif); color: var(--ink); font-size: 17px; }
.pop button { position: absolute; top: 6px; right: 8px; background: none; border: 0; color: var(--ink3); font-size: 18px; cursor: pointer; }

.divider { position: absolute; pointer-events: none; background: rgba(243,235,222,.35); z-index: 3; }

.hint { position: absolute; left: 50%; top: 46%; transform: translate(-50%, -50%); font-size: 12.5px; color: var(--ink2); background: var(--panel); padding: 6px 12px; border-radius: 999px; pointer-events: none; transition: opacity .8s; white-space: nowrap; z-index: 4; }
.hint.gone { opacity: 0; }
.joy { position: absolute; width: 112px; height: 112px; margin: -56px 0 0 -56px; border-radius: 50%; border: 1px solid rgba(255,255,255,.35); background: rgba(0,0,0,.18); display: none; pointer-events: none; z-index: 6; }
.joy i { position: absolute; left: 50%; top: 50%; width: 44px; height: 44px; margin: -22px 0 0 -22px; border-radius: 50%; background: rgba(243,235,222,.55); }
.joy.on { display: block; }
.loading { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; background: #0d0b09; z-index: 9; color: var(--ink2); font-family: var(--serif); font-size: 18px; transition: opacity .6s; }
.loading.gone { opacity: 0; pointer-events: none; }
.spinner { width: 36px; height: 36px; border-radius: 50%; border: 2px solid rgba(255,255,255,.12); border-top-color: var(--old); border-right-color: var(--new); animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.nogl { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 24px; text-align: center; z-index: 10; background: var(--bg); }
.nogl[hidden], .divider[hidden], .hint[hidden] { display: none; }

/* ---------------------------------------------------------------- intro */
.intro { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; padding: 16px; background: radial-gradient(ellipse at center, rgba(20,17,14,.72), rgba(10,8,6,.92)); }
.intro[hidden] { display: none; }
.intro-card { width: min(640px, 100%); max-height: 100%; overflow: auto; background: var(--panel-solid); border-radius: 18px; padding: 26px 28px; box-shadow: 0 30px 80px rgba(0,0,0,.6), inset 0 0 0 1px var(--line); }
.kicker { font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--ink3); margin: 0 0 8px; }
.intro h1, .hero h2 { font-family: var(--serif); font-weight: 600; font-size: clamp(30px, 5vw, 46px); line-height: 1.05; margin: 0 0 14px; }
.intro h1 em, .hero h2 em { font-style: italic; color: var(--old); }
.intro p { color: var(--ink2); line-height: 1.6; font-size: 15.5px; margin: 0 0 12px; }
b.old { color: var(--old); font-weight: 600; } b.new { color: var(--new); font-weight: 600; }
.keys { list-style: none; padding: 0; margin: 14px 0 18px; display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 13.5px; color: var(--ink2); }
kbd { font-family: var(--sans); font-size: 12px; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 6px; padding: 1px 6px; color: var(--ink); background: rgba(255,255,255,.04); }
.keys .touch { width: 100%; color: var(--ink3); }
.intro-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.btn { border: 0; cursor: pointer; padding: 11px 18px; border-radius: 999px; font-size: 15px; text-decoration: none; background: rgba(255,255,255,.07); color: var(--ink); }
.btn.primary { background: var(--ink); color: var(--bg); font-weight: 600; }
.fine { font-size: 12.5px !important; color: var(--ink3) !important; margin-top: 16px !important; }

/* ---------------------------------------------------------------- timeline + sources pages */
#view-timeline, #view-about { overflow-y: auto; -webkit-overflow-scrolling: touch; }
.doc { max-width: 1060px; margin: 0 auto; padding: 36px 20px 80px; }
.hero { margin-bottom: 28px; }
.hero-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 18px 0; }
.hp { border-radius: 14px; padding: 16px 18px; background: var(--bg2); box-shadow: inset 0 0 0 1px var(--line); }
.hp b { display: block; font-family: var(--serif); font-size: 40px; font-weight: 600; line-height: 1; margin-bottom: 8px; }
.hp.old b { color: var(--old); } .hp.new b { color: var(--new); }
.hp span { color: var(--ink2); font-size: 15px; line-height: 1.5; }
.lede { color: var(--ink2); font-size: 16.5px; line-height: 1.65; max-width: 760px; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; color: var(--ink2); margin: 16px 0 12px; }
.lg::before { content: ""; display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.lg.old::before { background: var(--old); } .lg.new::before { background: var(--new); } .lg.both::before { background: linear-gradient(90deg, var(--old) 50%, var(--new) 50%); }

.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: linear-gradient(var(--old) 0%, var(--old) 62%, var(--both) 66%, var(--new) 74%, var(--new) 100%); opacity: .5; }
.ev { position: relative; display: grid; grid-template-columns: 1fr 96px 1fr; align-items: start; margin: 0 0 18px; }
.ev .yr { grid-column: 2; text-align: center; font-family: var(--serif); font-size: 17px; font-weight: 600; padding-top: 10px; position: relative; z-index: 1; }
.ev .yr span { background: var(--bg); padding: 2px 6px; border-radius: 6px; }
.ev .box { background: var(--bg2); border-radius: 12px; padding: 12px 14px; box-shadow: inset 0 0 0 1px var(--line); }
.ev.old .box { grid-column: 1; grid-row: 1; border-left: 3px solid var(--old); }
.ev.new .box { grid-column: 3; grid-row: 1; border-left: 3px solid var(--new); }
.ev.both .box { grid-column: 1 / span 3; grid-row: 2; margin: 6px 6% 0; border-left: 3px solid var(--both); }
.ev.both .yr { grid-row: 1; }
.ev h3 { margin: 0 0 4px; font-family: var(--serif); font-size: 18px; font-weight: 600; line-height: 1.25; }
.ev p { margin: 4px 0 0; color: var(--ink2); line-height: 1.55; font-size: 14.5px; }
.ev .meta { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 8px; font-size: 12px; color: var(--ink3); }
.ev .go { border: 0; background: rgba(255,255,255,.07); color: var(--ink); border-radius: 999px; padding: 4px 10px; cursor: pointer; font-size: 12.5px; }
.ev .go:hover { background: rgba(255,255,255,.14); }
.ev.span .yr span { color: var(--both); }
.era-head { text-align: center; margin: 34px 0 20px; position: relative; z-index: 1; }
.era-head span { background: var(--bg); padding: 4px 12px; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink3); border-radius: 999px; box-shadow: inset 0 0 0 1px var(--line); }
.timeline .hidden { display: none; }

.prose { max-width: 780px; }
.prose h2.doc-title { font-family: var(--serif); font-size: 34px; font-weight: 600; margin: 0 0 12px; }
.prose h2 { font-family: var(--serif); font-size: 22px; font-weight: 600; margin: 30px 0 8px; }
.prose p, .prose li { color: var(--ink2); line-height: 1.65; font-size: 15.5px; }
.prose li { margin-bottom: 6px; }
.prose table { width: 100%; border-collapse: collapse; font-size: 14px; margin: 10px 0; }
.prose th, .prose td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; color: var(--ink2); }
.prose th { color: var(--ink); font-weight: 600; }
.prose a { color: var(--new); }

/* ---------------------------------------------------------------- mid widths: keep the header from crowding */

/* ---------------------------------------------------------------- bird's-eye players (one per view) */
.tour-go { pointer-events: auto; border: 0; cursor: pointer; display: inline-flex; align-items: center; gap: 5px; align-self: center;
  padding: 4px 10px 4px 8px; border-radius: 999px; font-size: 12px; color: var(--ink2); background: var(--panel);
  box-shadow: inset 0 0 0 1px var(--line); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.tour-go:hover { color: var(--ink); }
.tour-go[hidden] { display: none; }
.tour-go svg, .tour-bar svg { width: 12px; height: 12px; fill: currentColor; display: block; }
.pane[data-side="old"] .tour-go svg { fill: var(--old); }
.pane[data-side="new"] .tour-go svg { fill: var(--new); }
.tour-bar { pointer-events: auto; display: flex; align-items: center; gap: 3px; width: min(470px, 100%); box-sizing: border-box;
  background: var(--panel); border-radius: 999px; padding: 4px 6px; box-shadow: inset 0 0 0 1px var(--line), 0 8px 30px rgba(0,0,0,.35);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.tour-bar[hidden] { display: none; }
.tour-bar button { border: 0; background: none; color: var(--ink2); width: 30px; height: 30px; border-radius: 999px; padding: 0;
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer; flex: 0 0 auto; }
.tour-bar button:hover { color: var(--ink); background: rgba(255,255,255,.07); }
.tour-bar button[hidden] { display: none; }
.tour-bar .play { width: 34px; height: 34px; }
.pane[data-side="old"] .tour-bar .play { background: var(--old); color: #1a1209; }
.pane[data-side="new"] .tour-bar .play { background: var(--new); color: #0c1520; }
.tour-bar .play svg { width: 13px; height: 13px; }
.tour-bar .speed { width: auto; min-width: 34px; padding: 0 7px; font-size: 12px; font-weight: 650; font-variant-numeric: tabular-nums; color: var(--ink); }
.tour-bar .pair[aria-pressed="true"] { color: var(--ink); background: rgba(255,255,255,.12); }
.tour-bar .yr { font-family: var(--serif); font-size: 15px; color: var(--ink); min-width: 40px; text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; padding-right: 2px; }
.tour-bar .scrub { position: relative; flex: 1 1 auto; min-width: 56px; height: 30px; display: flex; align-items: center; }
.tour-bar .ticks { position: absolute; left: 7px; right: 7px; top: 50%; height: 0; pointer-events: none; }
.tour-bar .ticks i { position: absolute; top: -4px; width: 2px; height: 8px; margin-left: -1px; border-radius: 1px; background: rgba(243,235,222,.38); }
.tour-bar input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 30px; margin: 0; background: transparent; cursor: pointer; --fill: var(--ink); }
.pane[data-side="old"] .tour-bar input[type=range] { --fill: var(--old); }
.pane[data-side="new"] .tour-bar input[type=range] { --fill: var(--new); }
.tour-bar input[type=range]::-webkit-slider-runnable-track { height: 3px; border-radius: 2px; background: linear-gradient(90deg, var(--fill) var(--p, 0%), rgba(243,235,222,.2) var(--p, 0%)); }
.tour-bar input[type=range]::-moz-range-track { height: 3px; border-radius: 2px; background: rgba(243,235,222,.2); }
.tour-bar input[type=range]::-moz-range-progress { height: 3px; border-radius: 2px; background: var(--fill); }
.tour-bar input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 14px; height: 14px; margin-top: -5.5px; border-radius: 50%; background: var(--fill); box-shadow: 0 1px 4px rgba(0,0,0,.55); }
.tour-bar input[type=range]::-moz-range-thumb { width: 14px; height: 14px; border: 0; border-radius: 50%; background: var(--fill); box-shadow: 0 1px 4px rgba(0,0,0,.55); }
.tour-bar input[type=range]:focus-visible { outline: none; }
.tour-bar input[type=range]:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 3px rgba(243,235,222,.45); }

@media (max-width: 1420px) { .brand-text small { display: none; } }
@media (max-width: 1300px) { .mark { display: none; } .seg button { padding: 6px 9px; } .goto select { max-width: 118px; } .tbtn { padding: 6px 9px; } }
@media (max-width: 1180px) and (min-width: 761px) {
  .top .toolbar { position: fixed; top: calc(var(--top) + 8px); left: 50%; transform: translateX(-50%); }
  .pane.at-top .pane-top { padding-top: 56px; }
}

/* ---------------------------------------------------------------- small screens */
@media (max-width: 760px) {
  :root { --top: 48px; }
  .brand-text small { display: none; }
  .mark { display: none; }
  .tabs a { padding: 6px 10px; font-size: 13.5px; }
  .top .toolbar { position: fixed; top: calc(var(--top) + 6px); left: 8px; right: 8px; transform: none; justify-content: space-between; overflow-x: auto; border-radius: 14px; }
  .pane-top { padding: 8px 10px; }
  .pane.at-top .pane-top { padding-top: 52px; }
  .seg button { padding: 6px 8px; font-size: 12.5px; }
  .lg-l { display: none; } .sm-l { display: inline; }
  .tbtn { padding: 6px 9px; font-size: 12.5px; }
  .goto select { max-width: 92px; }
  #helpBtn { display: none; }
  .radar { width: 98px; }
  .radar canvas { width: 98px; height: 98px; }
  .radar-bar { margin-top: 3px; gap: 3px; }
  .radar-bar button { min-width: 24px; height: 22px; font-size: 12px; }
  .radar-bar button.wide { padding: 0 7px; font-size: 11px; }
  .tag { font-size: 10px; letter-spacing: .1em; padding: 4px 7px; }
  .when { font-size: 18px; }
  .card { max-height: 30vh; padding: 10px 12px; }
  .card h2 { font-size: 16.5px; }
  .card p { font-size: 13.5px; }
  .hint { display: none; }
  .tour-go span { display: none; }
  .tour-go { padding: 5px 7px; }
  .tour-bar { gap: 1px; padding: 3px 4px; }
  .tour-bar button { width: 28px; height: 28px; }
  .tour-bar .play { width: 32px; height: 32px; }
  .tour-bar [data-a="start"] { display: none; }
  .tour-bar .yr { font-size: 13px; min-width: 34px; }
  .tour-bar .speed { min-width: 30px; padding: 0 4px; font-size: 11.5px; }
  .ev { grid-template-columns: 56px 1fr; }
  .ev .yr { grid-column: 1; text-align: left; font-size: 15px; }
  .ev.old .box, .ev.new .box, .ev.both .box { grid-column: 2; grid-row: 1; margin: 0; }
  .timeline::before { left: 28px; }
  .hero-pair { grid-template-columns: 1fr; }
  .intro-card { padding: 20px; }
}
@media (prefers-reduced-motion: reduce) { .spinner { animation: none; } }
