@font-face { font-family: "Cabin"; font-style: normal; font-weight: 400 700; font-stretch: 75% 100%; font-display: swap; src: url("fonts/cabin-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Cabin"; font-style: normal; font-weight: 400 700; font-stretch: 75% 100%; font-display: swap; src: url("fonts/cabin-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Source Serif 4"; font-style: normal; font-weight: 400 600; font-display: swap; src: url("fonts/source-serif-4-normal-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+2013-2014, U+2018-2019, U+201C-201E, U+2026, U+20AC; }
@font-face { font-family: "Source Serif 4"; font-style: normal; font-weight: 400 600; font-display: swap; src: url("fonts/source-serif-4-normal-latin-ext.woff2") format("woff2"); unicode-range: U+0100-024F, U+1E00-1EFF; }

:root {
  --page: #F3F5F6; --surface: #FFFFFF; --ink: #12161A; --muted: #3F4850; --line: #C5CCD2; --ctl: #6B747C; --accent: #0A3A7E;
  --route: #D0111B; --route-casing: #FFFFFF; --route-core: #FFD9D2; --route-text: #A80D16; --unknown: #4A535B;
  --map-ground: #E4E8EA; --map-water: #A9C4D4; --map-park: #CBDCC4; --map-wood: #B6CDAF; --map-road: #FFFFFF; --map-road-minor: #F2F4F5; --map-rail: #8A949C; --map-web: rgb(28, 40, 54);
  --cloth: #111315; --cloth-ink: #F5F1E6; --cloth-yellow: #FFD84A; --cloth-muted: #B9BDC1; --cloth-edge: transparent;
  --sans: "Cabin", system-ui, -apple-system, "Segoe UI", sans-serif; --serif: "Source Serif 4", Georgia, serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme=light]) { --page: #0C0E11; --surface: #15191E; --ink: #F1EFE9; --muted: #B4BAC0; --line: #2C333A; --ctl: #7C8790; --accent: #9EC5FF; --route: #FF4B3E; --route-casing: #0C0E11; --route-core: #FFD9D2; --route-text: #FF8F85; --unknown: #B4BAC0; --map-ground: #0F1317; --map-water: #142A38; --map-park: #13241B; --map-wood: #12281B; --map-road: rgba(255,255,255,.10); --map-road-minor: rgba(255,255,255,.05); --map-rail: rgba(255,255,255,.14); --map-web: rgb(255, 226, 180); --cloth: #050607; --cloth-edge: #2C333A; color-scheme: dark; } }
:root[data-theme=dark] { --page: #0C0E11; --surface: #15191E; --ink: #F1EFE9; --muted: #B4BAC0; --line: #2C333A; --ctl: #7C8790; --accent: #9EC5FF; --route: #FF4B3E; --route-casing: #0C0E11; --route-core: #FFD9D2; --route-text: #FF8F85; --unknown: #B4BAC0; --map-ground: #0F1317; --map-water: #142A38; --map-park: #13241B; --map-wood: #12281B; --map-road: rgba(255,255,255,.10); --map-road-minor: rgba(255,255,255,.05); --map-rail: rgba(255,255,255,.14); --map-web: rgb(255, 226, 180); --cloth: #050607; --cloth-edge: #2C333A; color-scheme: dark; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--page); color: var(--ink); font: 400 16px/1.5 var(--sans); }
a { color: var(--accent); text-underline-offset: .15em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--cloth-yellow); outline-offset: 2px; box-shadow: 0 0 0 5px var(--cloth); border-radius: 2px; }
[hidden] { display: none !important; }
svg[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 8px; top: -60px; background: var(--cloth); color: var(--cloth-ink); padding: 8px 12px; z-index: 50; }
.skip:focus { top: 8px; }

/* ---------- atlas (first screen) ---------- */
#atlas { position: relative; height: calc(var(--vh, 1vh) * 100); min-height: 560px; overflow: hidden; background: var(--map-ground); }
#stage { position: absolute; inset: 0; }
#map { display: block; touch-action: none; cursor: grab; }
#map:active { cursor: grabbing; }
#tabs { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.tab { position: absolute; transform: translate(14px, -50%); background: var(--cloth); color: var(--cloth-ink); font: 600 12px/1.2 var(--sans); font-stretch: 88%; padding: 4px 7px; border-radius: 2px; white-space: nowrap; border: 1px solid var(--cloth-edge); }
.tab-l { transform: translate(calc(-100% - 14px), -50%); }
.lbl { position: absolute; transform: translate(8px, -50%); font: 600 12px/1.2 var(--sans); font-stretch: 88%; color: var(--ink); white-space: nowrap; text-shadow: 0 0 3px var(--map-ground), 0 0 3px var(--map-ground), 0 0 3px var(--map-ground); }
.mapctl { position: absolute; right: 20px; bottom: 52px; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; z-index: 3; }
.mapctl button, .btn { font: 600 14px/1 var(--sans); color: var(--ink); background: var(--surface); border: 1px solid var(--ctl); border-radius: 4px; min-width: 40px; min-height: 40px; padding: 0 12px; cursor: pointer; }
.mapctl button:hover, .btn:hover { border-color: var(--ink); }
.mapnote { position: absolute; left: 0; right: 0; bottom: 0; padding: 6px 20px 8px; font-size: 11px; color: var(--muted); background: linear-gradient(transparent, var(--map-ground) 55%); z-index: 2; pointer-events: none; }
.mapnote a { pointer-events: auto; color: var(--muted); }
#pop { position: absolute; z-index: 4; background: var(--surface); border: 1px solid var(--line); border-radius: 4px; padding: 10px 12px; max-width: 280px; box-shadow: 0 6px 22px rgba(0,0,0,.18); }
#pop p { margin: 0 0 8px; font-size: 13px; color: var(--muted); }
#map-fail { position: absolute; inset: 0; display: grid; place-items: center; padding: 24px; text-align: center; color: var(--muted); }

#panel { position: absolute; left: 32px; top: 32px; width: 408px; max-height: calc(100% - 64px); display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 4px; z-index: 5; box-shadow: 0 10px 40px rgba(0,0,0,.12); }
.mast { display: flex; align-items: center; gap: 10px; padding: 12px 14px 10px; }
.mast .home { font: 600 12px/1 var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); text-decoration: none; }
.mast .sp { flex: 1; }
.mast .lang-switch { font: 600 12px/1 var(--sans); color: var(--ink); text-decoration: none; border: 1px solid var(--ctl); border-radius: 3px; padding: 6px 7px; }
.icon-btn { background: none; border: 1px solid var(--ctl); border-radius: 3px; color: var(--ink); width: 30px; height: 28px; display: grid; place-items: center; cursor: pointer; padding: 0; }
h1 { font: 600 15px/1.3 var(--sans); margin: 0; padding: 0 14px 10px; }
#panel .deck { margin: -4px 14px 10px; font-size: 14px; line-height: 1.4; color: var(--muted); }
.blind .dest::before, .blind .dest::after { font: 600 10px/1 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--cloth-muted); }
.blind .dest::before { content: attr(data-from); order: -1; }
.blind .dest::after { content: attr(data-to); order: 2; }
.blind .dest #blind-a { order: 0; } .blind .dest hr { order: 1; } .blind .dest #blind-b { order: 3; }
h1 .k { display: block; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--route-text); margin-bottom: 2px; }

/* the destination blind: the input */
.blind { margin: 0 14px; background: var(--cloth); border: 1px solid var(--cloth-edge); border-radius: 3px; display: grid; grid-template-columns: 148px 1fr; min-height: 132px; position: relative; overflow: hidden; }
.blind::before, .blind::after { content: ""; position: absolute; left: 0; right: 0; height: 1px; background: rgba(255,255,255,.09); pointer-events: none; }
.blind::before { top: 6px; } .blind::after { bottom: 6px; }
.blind label { position: absolute; left: 10px; top: 9px; font: 600 10px/1 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--cloth-muted); }
#blind-input { width: 100%; height: 100%; background: transparent; border: 0; border-right: 1px solid rgba(255,255,255,.18); color: var(--cloth-ink); caret-color: var(--cloth-yellow); font: 700 84px/1 var(--sans); font-variant-numeric: tabular-nums; text-align: center; padding: 14px 6px 0; text-transform: uppercase; letter-spacing: -.02em; }
#blind-input::placeholder { color: rgba(245,241,230,.28); }
#blind-input:focus { outline: none; box-shadow: inset 0 0 0 2px var(--cloth-yellow); }
.blind .dest { display: flex; flex-direction: column; justify-content: center; padding: 30px 14px 12px; gap: 5px; min-width: 0; overflow: hidden; }
.blind .dest span { font: 600 21px/1.15 var(--sans); font-stretch: 88%; color: var(--cloth-ink); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.blind .dest hr { border: 0; border-top: 1px solid rgba(255,255,255,.18); margin: 0; width: 100%; }
.roll { animation: roll .32s cubic-bezier(.2,.7,.2,1); }
@keyframes roll { from { transform: translateY(70%); opacity: 0; } to { transform: none; opacity: 1; } }
.go { position: absolute; right: 8px; top: 10px; background: var(--cloth-yellow); color: #111315; border: 0; border-radius: 2px; font: 700 12px/1 var(--sans); padding: 6px 9px; cursor: pointer; }
.hint { margin: 8px 14px 0; font-size: 13px; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chiprow { margin: 8px 14px 0; }
.chip { font: 600 13px/1 var(--sans); color: var(--ink); background: var(--surface); border: 1px solid var(--ctl); border-radius: 3px; padding: 7px 9px; cursor: pointer; text-align: left; min-height: 32px; }
.chip b { font-weight: 700; }
.chip:hover { border-color: var(--ink); }
#sugg { margin: 8px 14px 0; display: flex; flex-direction: column; gap: 5px; }
#sugg .chip { width: 100%; font-weight: 400; }
.nomatch { margin: 0; font-size: 13px; color: var(--muted); }

#card { overflow: auto; padding: 12px 14px 14px; border-top: 1px solid var(--line); margin-top: 12px; }
.lead { font: 400 20px/1.32 var(--serif); margin: 0 0 12px; }
.figs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 0 0 12px; }
.figs div { border-top: 2px solid var(--ink); padding-top: 5px; }
.figs b { display: block; font: 600 26px/1.05 var(--sans); font-variant-numeric: tabular-nums; }
.figs span { font-size: 12px; color: var(--muted); line-height: 1.25; display: block; }
.status { font-size: 14px; margin: 0 0 10px; }
.chip-unk { display: inline-block; border: 1px dashed var(--unknown); color: var(--unknown); border-radius: 3px; padding: 2px 7px; font: 600 12px/1.5 var(--sans); }
.tl { list-style: none; margin: 0 0 10px; padding: 0 0 0 14px; border-left: 2px solid var(--route); }
.tl li { position: relative; margin: 0 0 7px; font-size: 14px; line-height: 1.4; }
.tl li::before { content: ""; position: absolute; left: -19px; top: 6px; width: 8px; height: 8px; border-radius: 50%; background: var(--surface); border: 2px solid var(--route); }
.tl time { font-weight: 700; font-variant-numeric: tabular-nums; margin-right: 4px; }
.tl .src { color: var(--muted); font-size: 12px; }
.veh { font-size: 13px; color: var(--muted); margin: 0 0 10px; }
.cardlinks { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; font-size: 14px; margin: 0 0 10px; }
.reset { font: 600 13px/1 var(--sans); background: none; border: 1px solid var(--ctl); color: var(--ink); border-radius: 3px; padding: 7px 9px; cursor: pointer; }
.err { color: var(--route-text); font-size: 13px; }

.share-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.share-lbl { font-size: 12px; color: var(--muted); margin-right: 2px; }
.share-row a, .share-row button { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: transparent; color: var(--ink); display: inline-grid; place-items: center; cursor: pointer; padding: 0; }
.share-row a:hover, .share-row button:hover { border-color: var(--accent); color: var(--accent); }
.share-row [role=status] { font-size: 12px; color: var(--muted); }
@media (pointer: coarse) { .share-row a, .share-row button { width: 44px; height: 44px; } }

/* ---------- article ---------- */
main.essay { background: var(--page); }
.sec { max-width: 1120px; margin: 0 auto; padding: 64px 24px 8px; }
.sec > h2, .sec > p, .sec > .prose { max-width: 680px; }
h2 { font: 600 28px/1.2 var(--sans); margin: 0 0 14px; letter-spacing: -.01em; }
h3 { font: 600 19px/1.3 var(--sans); margin: 28px 0 8px; }
.prose p, .sec > p { font: 400 19px/1.6 var(--serif); margin: 0 0 16px; }
.kicker { font: 600 12px/1 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--route-text); margin: 0 0 10px; }
.big { font: 600 54px/1 var(--sans); font-variant-numeric: tabular-nums; color: var(--route-text); }
figure { margin: 24px 0; }
figcaption { font-size: 13px; color: var(--muted); margin-top: 8px; line-height: 1.45; max-width: 760px; }
#m1912 { position: relative; overflow: hidden; border: 1px solid var(--line); border-radius: 3px; height: min(70vh, 620px); background: #e9e1cf; touch-action: pan-y; }
#m1912 img { width: 100%; height: auto; display: block; transform-origin: 0 0; cursor: zoom-in; user-select: none; -webkit-user-drag: none; }
.mz { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; align-items: center; }
table { border-collapse: collapse; width: 100%; font-size: 15px; }
th, td { text-align: left; padding: 8px 10px 8px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font: 600 12px/1.2 var(--sans); letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.tblwrap { overflow-x: auto; max-width: 100%; }
.mini { display: inline-block; background: var(--cloth); color: var(--cloth-ink); font: 700 14px/1 var(--sans); padding: 5px 7px; border-radius: 2px; min-width: 38px; text-align: center; text-decoration: none; }
.same { color: var(--route-text); font-weight: 700; }
.bands { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 18px; margin: 20px 0; }
.bands figure { margin: 0; }
.bands canvas { width: 100%; aspect-ratio: 1.25; display: block; border-radius: 3px; border: 1px solid var(--line); }
.bands figcaption b { color: var(--ink); }
.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; }
.photos figure { margin: 0; }
.photos img { width: 100%; height: 200px; object-fit: cover; display: block; border-radius: 3px; }
.allroutes { columns: 4 170px; column-gap: 24px; padding: 0; list-style: none; font-size: 14px; }
.allroutes li { break-inside: avoid; margin: 0 0 5px; }
.allroutes a { text-decoration: none; color: var(--ink); }
.allroutes a b { display: inline-block; min-width: 46px; font-variant-numeric: tabular-nums; color: var(--route-text); }
.more { margin: 10px 0 0; }
.sources li { margin: 0 0 8px; font-size: 15px; }
.foot { max-width: 1120px; margin: 56px auto 0; padding: 24px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 8px 24px; font-size: 14px; color: var(--muted); }
.note { font-size: 14px; color: var(--muted); }

/* ---------- dossier ---------- */
.dossier { max-width: 860px; margin: 0 auto; padding: 18px 20px 0; }
.dtop { display: flex; align-items: center; gap: 12px; font-size: 13px; padding-bottom: 14px; }
.dtop .sp { flex: 1; }
.dblind { display: grid; grid-template-columns: minmax(130px, 200px) 1fr; background: var(--cloth); border: 1px solid var(--cloth-edge); border-radius: 3px; min-height: 150px; color: var(--cloth-ink); }
.dblind .n { font: 700 104px/1 var(--sans); display: grid; place-items: center; border-right: 1px solid rgba(255,255,255,.18); letter-spacing: -.02em; }
.dblind .n.long { font-size: 72px; }
.dblind .d { display: flex; flex-direction: column; justify-content: center; gap: 8px; padding: 14px 18px; font: 600 24px/1.15 var(--sans); font-stretch: 88%; }
.dblind .d hr { border: 0; border-top: 1px solid rgba(255,255,255,.18); margin: 0; }
.dossier h1 { font: 600 30px/1.2 var(--sans); padding: 0; margin: 22px 0 8px; }
.dossier .lead { font-size: 21px; }
.dmap { margin: 18px 0; border: 1px solid var(--line); border-radius: 3px; overflow: hidden; background: var(--map-ground); }
.dmap svg { display: block; width: 100%; height: auto; }
.dfigs { grid-template-columns: repeat(4, 1fr); }
.stops { columns: 2 260px; column-gap: 32px; list-style: none; padding: 0 0 0 16px; border-left: 2px solid var(--route); font-size: 15px; }
.stops li { break-inside: avoid; margin: 0 0 4px; }
.stops .bo { display: block; font: 600 11px/1.2 var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 10px 0 4px; }
.pn { display: flex; justify-content: space-between; gap: 12px; margin: 32px 0 0; }

@media (max-width: 899px) {
  #atlas { height: auto; min-height: 0; overflow: visible; display: flex; flex-direction: column; }
  #panel { position: static; width: auto; max-height: none; border: 0; border-radius: 0; box-shadow: none; display: contents; }
  #panel .mast { order: 1; background: var(--surface); }
  #panel h1 { order: 2; background: var(--surface); margin: 0; }
  .blindwrap { order: 3; position: sticky; top: 0; z-index: 6; background: var(--surface); padding: 6px 0; }
  #stage { order: 4; position: sticky; top: 76px; height: 300px; max-height: 40svh; z-index: 4; }
  .chiprow, #sugg, .hint { order: 5; }
  #panel .deck { order: 2; background: var(--surface); margin: 0; padding: 0 14px 10px; }
  .blind .dest::before, .blind .dest::after { display: none; }
  #card { order: 6; background: var(--surface); margin: 0; }
  .mapnote { position: static; order: 7; background: var(--surface); }
  .mapctl { right: 8px; bottom: 8px; flex-direction: row; align-items: center; }
  .mapctl button { min-height: 36px; min-width: 36px; font-size: 13px; padding: 0 9px; }
  .blind { grid-template-columns: 96px 1fr; min-height: 64px; }
  #blind-input { font-size: 40px; padding-top: 10px; }
  .blind .dest span { font-size: 15px; }
  .blind .dest { padding: 8px 10px; gap: 4px; }
  .blind label, .go { display: none; }
  .lead { font-size: 19px; }
  .figs b { font-size: 22px; }
  .sec { padding: 44px 18px 4px; }
  h2 { font-size: 24px; }
  .prose p, .sec > p { font-size: 18px; }
  .dblind .n { font-size: 64px; }
  .dblind .n.long { font-size: 44px; }
  .dblind .d { font-size: 17px; }
  .dfigs { grid-template-columns: repeat(2, 1fr); }
}
@media (prefers-reduced-motion: reduce) { .roll { animation: none; } * { scroll-behavior: auto !important; } }
@media print { #atlas { height: auto; } .mapctl, .share-row { display: none; } }
