@font-face{font-family:Space Grotesk;src:url(../assets/fonts/SpaceGrotesk-Medium.ttf) format('truetype');font-style:normal;font-weight:400 500;font-display:swap}
@font-face{font-family:Space Grotesk;src:url(../assets/fonts/SpaceGrotesk-SemiBold.ttf) format('truetype');font-style:normal;font-weight:600 800;font-display:swap}
@font-face{font-family:Sentient;src:url(../assets/fonts/Sentient-Regular.otf) format('opentype');font-style:normal;font-weight:400;font-display:swap}
:root{--ink:#28302f;--muted:#7a817e;--paper:#fcfcf9;--line:#e8e9e3;--orange:#d16a26;--sidebar-width:330px;--map-ground:#e1e7f5;font-family:'Space Grotesk',sans-serif;color:var(--ink);font-synthesis:none}
*{box-sizing:border-box}html,body{height:100%;margin:0}body{overflow:hidden;background:var(--map-ground)}button,input{font:inherit}button,a,input{-webkit-tap-highlight-color:transparent}button{cursor:pointer}button:disabled{cursor:wait;opacity:.5}button,dialog{color:inherit}a{color:inherit;text-underline-offset:3px}button:focus-visible,a:focus-visible,input:focus-visible,[tabindex]:focus-visible{outline:2px solid #497c96;outline-offset:3px}[hidden]{display:none!important}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}svg{fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.game{display:grid;grid-template-columns:minmax(0,1fr) var(--sidebar-width);height:100%;height:100dvh}.map-stage{position:relative;min-width:0;isolation:isolate;overflow:hidden}#map{position:absolute;inset:0;background:var(--map-ground)}.guess-dock{position:absolute;z-index:600;top:40px;left:50%;width:min(420px,calc(100% - 136px));transform:translateX(-50%);pointer-events:none}.guess-form{height:56px;display:flex;align-items:center;gap:12px;padding:6px 6px 6px 19px;border-radius:30px;background:#fff;box-shadow:0 5px 22px #26365818,0 1px 3px #2636581c;pointer-events:auto;border:1px solid #fff9}.search-icon{width:20px;height:20px;color:#8d98a7;flex:none}#station-input{width:100%;min-width:0;border:0;outline:0;background:none;color:#273442;font-size:15px;padding:9px 0}#station-input::placeholder{color:#8994a5}#guess-form:focus-within{box-shadow:0 0 0 3px #ffffff75,0 5px 24px #26365825}#guess-submit{display:grid;place-items:center;width:42px;height:42px;flex:none;border:0;border-radius:50%;background:#edf0f5;color:#53647c;transition:background .15s,color .15s}#guess-submit:hover{background:#334b62;color:#fff}#guess-submit svg{width:21px;height:21px}.input-hint{margin:10px 0 0;text-align:center;font-size:10px;letter-spacing:.025em;color:#66758a;text-shadow:0 1px 4px #fff;pointer-events:none}.input-hint span{margin:0 5px}.notification,.completion-message{width:fit-content;max-width:100%;margin:13px auto 0;padding:11px 17px;border-radius:12px;background:#fff;color:#334b43;font-size:12px;line-height:1.45;text-align:center;box-shadow:0 4px 18px #26365815;pointer-events:none}.notification[data-kind=error],.notification.error{color:#965135}.notification[data-kind=success],.notification.success{color:#327457}.completion-message{background:#eaf4e9;color:#2c6245;border:1px solid #c5dfc4}.map-message{position:absolute;z-index:500;top:50%;left:50%;transform:translate(-50%,-50%);width:max-content;max-width:calc(100% - 40px);display:flex;flex-direction:column;align-items:center;gap:10px;padding:25px 30px;background:#fffffff0;border:1px solid #fff;border-radius:16px;box-shadow:0 8px 28px #36425c10;text-align:center;font-size:12px;color:#7c8797}.map-message strong{color:#3c4d63;font-weight:500;font-size:15px}.loading-mark{width:25px;height:25px;border:2px solid #e0e6ef;border-top-color:#7d95af;border-radius:50%;animation:loading 1s linear infinite;margin-bottom:3px}.map-error{color:#934e38;line-height:1.6}.map-error button{border:1px solid #d8c9c3;background:white;border-radius:8px;padding:8px 15px}.leaflet-container{font-family:'Space Grotesk',sans-serif!important}.leaflet-control-zoom{border:1px solid #fff8!important;border-radius:12px!important;overflow:hidden;box-shadow:0 3px 12px #2e3d501c!important}.leaflet-control-zoom a{background:#fffffff5!important;color:#4d6177!important;width:34px!important;height:34px!important;line-height:34px!important;font-weight:400!important}.leaflet-control-zoom a:first-child{border-bottom-color:#e5eaf0!important}.leaflet-top.leaflet-left{top:30px;left:16px}.leaflet-control-attribution{background:#f4f7fbbf!important;color:#607286!important;font-size:9px!important;padding:2px 5px!important}.leaflet-control-attribution a{color:#607286!important}.leaflet-tooltip{font-family:'Space Grotesk',sans-serif;font-size:11px;border:0;border-radius:6px;padding:5px 8px;box-shadow:0 2px 8px #0002}.leaflet-tooltip:before{display:none}.mobile-progress{display:none}
.sidebar{background:var(--paper);z-index:700;display:flex;flex-direction:column;min-height:0;border-left:1px solid #cbd1dc;box-shadow:-5px 0 24px #36425c05}.sidebar-header{padding:29px 25px 19px}.title-row{display:flex;align-items:center;justify-content:space-between;margin-top:0;margin-bottom:22px}h1{font-family:Sentient,Georgia,serif;font-weight:400;font-size:34px;line-height:1.1;letter-spacing:-1.2px;margin:0}h1 span{display:block;color:#979b8f;font-size:27px;letter-spacing:-.5px;margin-top:3px}.rail-mark{display:block;width:40px;height:auto;flex:none;margin-left:12px}.total-progress{display:flex;align-items:center;justify-content:space-between;gap:15px}.total-number{font-size:43px;line-height:1;font-weight:400;letter-spacing:-2.5px;font-variant-numeric:tabular-nums}.percent-sign{font-size:22px;letter-spacing:-1px;padding-left:4px;color:#93988b}.total-caption{display:flex;flex-direction:column;gap:5px;text-align:right;font-size:10px;color:#8b9083;line-height:1.1}.total-caption strong{font-size:12px;font-weight:500;color:#545d4b;font-variant-numeric:tabular-nums}#overall-progress{appearance:none;display:block;border:0;width:100%;height:4px;margin:17px 0 12px;border-radius:3px;overflow:hidden;background:#e7eade;color:#8a9d70}#overall-progress::-webkit-progress-bar{background:#e7eade;border-radius:3px}#overall-progress::-webkit-progress-value{background:#8a9d70;border-radius:3px;transition:width .3s}#overall-progress::-moz-progress-bar{background:#8a9d70;border-radius:3px}.save-row{display:flex;align-items:center;gap:6px;font-size:9px;color:#979c8e;line-height:1.4}.save-dot{width:4px;height:4px;border-radius:50%;background:#8ba17b;flex:none}.progress-tools{padding:0 25px}.progress-tabs{display:flex;border-bottom:1px solid var(--line);gap:23px}.progress-tabs button{position:relative;background:none;border:0;padding:12px 0 11px;color:#94988d;font-size:12px}.progress-tabs button[aria-selected=true]{color:#384435}.progress-tabs button[aria-selected=true]:after{content:'';position:absolute;left:0;right:0;bottom:-1px;height:2px;background:#7e8d72;border-radius:2px}.filter-wrap{display:flex;align-items:center;gap:9px;margin:17px 0 12px;border:1px solid #e8eae2;border-radius:7px;padding:8px 10px;background:#f8f9f3}.filter-wrap svg{width:13px;height:13px;flex:none;color:#9aa08f}.filter-wrap input{width:100%;padding:0;background:none;border:0;outline:0;min-width:0;font-size:10px;color:#56634c}.filter-wrap input::placeholder{color:#9aa08e}.filter-wrap:focus-within{outline:2px solid #b2c0a4;outline-offset:1px}.progress-list{flex:1;min-height:0;overflow:auto;padding:0 15px 16px;scrollbar-width:thin;scrollbar-color:#dce0d2 transparent;overscroll-behavior:contain}.empty-state{font-size:11px;color:#939b87;text-align:center;line-height:1.6;margin:30px 15px}.progress-row{display:grid;grid-template-columns:11px 1fr auto;gap:7px 10px;align-items:center;width:100%;text-align:left;border:0;background:none;border-radius:7px;padding:11px 10px;cursor:pointer;color:var(--ink)}.progress-row:hover,.progress-row.is-selected{background:#f0f3e9}.line-dot,.line-swatch{height:9px;width:9px;border:2px solid var(--line-color,#8f9d7f);border-radius:50%;display:block;flex:none}.progress-name{font-size:11px;line-height:1.4}.progress-count{font-size:10px;color:#9b9f91;font-variant-numeric:tabular-nums;white-space:nowrap}.progress-row.is-complete .progress-count{color:#648650}.progress-track{grid-column:2/4;height:2px;background:#e9ecdf;border-radius:2px;overflow:hidden}.progress-fill{height:100%;background:var(--line-color,#8f9d7f);border-radius:2px;transition:width .3s}.progress-group-heading{font-size:9px;letter-spacing:.07em;text-transform:uppercase;font-weight:400;color:#9b9f92;margin:18px 10px 7px}.sidebar-footer{flex:none;padding:13px 25px 18px;border-top:1px solid var(--line);background:var(--paper)}.coverage-note{display:flex;align-items:center;gap:6px;margin:0 0 14px;font-size:9px;color:#a09d88}.coverage-note span{font-size:13px}.coverage-note a{text-decoration-color:#d6d3c4;text-underline-offset:3px}.utility-buttons{display:flex;align-items:center;justify-content:space-between;gap:8px}.utility-buttons button{display:flex;align-items:center;justify-content:center;gap:5px;min-height:30px;padding:4px 0;background:none;border:0;color:#858c7a;font-size:9px;white-space:nowrap}.utility-buttons button:hover{color:#35472b}.utility-buttons svg{width:14px;height:14px}#reset-button{width:26px}#reset-button:hover{color:#ae543a}
dialog{border:1px solid #e2e6da;border-radius:19px;padding:28px;width:min(480px,calc(100vw - 32px));max-height:calc(100dvh - 40px);background:var(--paper);box-shadow:0 20px 90px #1d293b35;font-size:12px;line-height:1.7}dialog::backdrop{background:#2734483b;backdrop-filter:blur(3px)}.dialog-heading{display:flex;justify-content:space-between;align-items:center;margin-bottom:12px}.eyebrow{font-size:9px;letter-spacing:.12em;text-transform:uppercase;color:#8e9982}.close-dialog{display:grid;place-items:center;border:0;background:#f0f2e9;width:30px;height:30px;border-radius:50%;font-size:22px;font-weight:400;line-height:1;color:#7e8971}dialog h2{font-family:Sentient,Georgia,serif;font-weight:400;font-size:27px;letter-spacing:-.6px;line-height:1.2;margin:0 0 17px}dialog p{color:#7d8575;margin:12px 0}.help-list{padding-left:18px;color:#6c7861;margin:18px 0}.help-list li{padding-left:3px;margin:8px 0}.coverage-box{background:#f0f3e9;border:1px solid #e5eada;border-radius:10px;padding:15px;margin:22px 0}.coverage-box h3{font-size:11px;font-weight:500;margin:0}.coverage-box p{font-size:10px;margin:7px 0}.coverage-box p:last-child{margin-bottom:0}.independent-note{font-size:10px}.primary-button,.secondary-button,.danger-button{border:0;border-radius:8px;padding:11px 19px;font-size:11px}.primary-button{background:#697d57;color:#fff;width:100%;margin-top:12px}.primary-button:hover{background:#526b3d}.secondary-button{background:#edf1e5;color:#5b6a4c}.danger-button{background:#a85a42;color:#fff}.dialog-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:25px}.noscript-message{position:fixed;inset:20px;z-index:2000;display:grid;place-content:center;background:#fff;padding:40px;line-height:1.7;border-radius:12px}.map-stage .leaflet-control-container{position:relative;z-index:400}
.network-canvas{position:absolute;inset:0;z-index:450;pointer-events:none}.notification{pointer-events:auto}.station-choice{display:block;border:1px solid #dce3d6;border-radius:5px;background:#fff;padding:7px 9px;margin-top:7px;text-align:left;width:100%;font-size:11px}.station-choice:hover{background:#eff5eb}.notification[data-kind=success]{color:#246d54}#map{background:#edf2fc}.map-stage .leaflet-control-container{z-index:500}
@keyframes loading{to{transform:rotate(360deg)}}
@media(min-width:1600px){:root{--sidebar-width:350px}.sidebar-header{padding:35px 29px 23px}.progress-tools{padding:0 29px}.sidebar-footer{padding:15px 29px 21px}.progress-list{padding-left:19px;padding-right:19px}.title-row{margin-top:0}.guess-dock{top:55px}}
@media(max-width:950px) and (min-width:701px){:root{--sidebar-width:290px}.sidebar-header{padding:25px 20px 17px}.progress-tools{padding:0 20px}.sidebar-footer{padding:13px 20px 16px}.progress-list{padding-left:10px;padding-right:10px}.guess-dock{width:calc(100% - 100px);left:calc(50% + 18px);top:25px}.leaflet-top.leaflet-left{left:8px;top:18px}.title-row{margin-top:0}h1{font-size:31px}}
@media(max-width:700px){.game{display:block}.map-stage{width:100%;height:100%}.guess-dock{top:max(20px,env(safe-area-inset-top));width:calc(100% - 32px);max-width:460px}.guess-form{height:52px;padding-left:16px}#guess-submit{width:38px;height:38px}#station-input{font-size:16px}.input-hint{font-size:9px;margin-top:8px}.leaflet-top.leaflet-left{top:115px;left:7px}.leaflet-control-zoom a{width:32px!important;height:32px!important;line-height:32px!important}.leaflet-control-attribution{font-size:8px!important;max-width:95%;line-height:1.3!important}.mobile-progress{position:absolute;display:flex;align-items:center;justify-content:center;gap:9px;left:50%;transform:translateX(-50%);bottom:max(33px,calc(env(safe-area-inset-bottom) + 23px));z-index:800;min-height:43px;padding:10px 18px;border:1px solid #fff;border-radius:24px;background:#fcfcf9;box-shadow:0 4px 20px #2c3b5026;font-size:11px;color:#53604b;white-space:nowrap}.mobile-progress svg{width:16px;height:16px}.mobile-progress .chevron{width:13px;height:13px;margin-left:6px;transition:transform .2s}.mobile-progress[aria-expanded=true] .chevron{transform:rotate(180deg)}.sidebar{position:fixed;left:0;right:0;bottom:0;top:auto;max-height:65dvh;height:530px;border-left:0;border-top:1px solid #d5ddce;border-radius:22px 22px 0 0;box-shadow:0 -5px 30px #33425625;transform:translateY(110%);transition:transform .25s ease;visibility:hidden;padding-bottom:env(safe-area-inset-bottom)}.sidebar.is-open{transform:translateY(0);visibility:visible}.sidebar-header{padding:20px 22px 12px}.title-row{display:none}.total-progress{padding-right:125px}.total-number{font-size:32px;letter-spacing:-1.5px}.percent-sign{font-size:18px}.total-caption{font-size:9px;gap:3px}.total-caption strong{font-size:11px}#overall-progress{margin-top:12px;margin-bottom:9px}.save-row{font-size:9px}.progress-tools{padding:0 22px}.progress-tabs button{padding:8px 0;font-size:11px}.filter-wrap{margin:11px 0 7px;padding:7px 9px}.filter-wrap input{font-size:12px}.progress-list{padding:0 12px 12px}.progress-row{padding-top:9px;padding-bottom:9px}.progress-name{font-size:12px}.sidebar-footer{padding:10px 22px 13px}.coverage-note{margin-bottom:7px}.utility-buttons button{font-size:10px}.mobile-progress[aria-expanded=true]{position:fixed;bottom:auto;top:calc(35dvh + 16px);left:auto;right:18px;transform:none;min-height:33px;padding:7px 11px;box-shadow:none;border-color:#e3e9da;background:#f0f4e9;z-index:900;font-size:9px}.mobile-progress[aria-expanded=true]>svg:first-child{display:none}.mobile-progress[aria-expanded=true] .chevron{margin-left:0}.notification,.completion-message{font-size:11px;padding:9px 14px}.map-message{padding:20px 24px}dialog{padding:23px;max-height:calc(100dvh - 32px)}dialog h2{font-size:26px}.help-list{font-size:11px}}
@media(max-width:700px) and (min-height:816px){.mobile-progress[aria-expanded=true]{top:calc(100dvh - 530px + 16px)}}
@media(max-height:650px) and (min-width:701px){.sidebar-header{padding-top:18px;padding-bottom:12px}.title-row{margin-top:0}h1{font-size:28px}h1 span{font-size:23px}.total-number{font-size:35px}.filter-wrap{margin-top:10px;margin-bottom:8px}.sidebar-footer{padding-top:9px;padding-bottom:10px}.coverage-note{margin-bottom:7px}.guess-dock{top:25px}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}
@media(max-width:700px){.map-stage{isolation:auto}}
.dataset-status{font-size:10px;line-height:1.5;padding:8px 10px;margin:0 0 17px;background:#faf2e4;border:1px solid #eadcc6;border-radius:5px;color:#8a632c}.dataset-status a{text-decoration:none}.dataset-status a:hover{text-decoration:underline}@media(max-width:700px){.dataset-status{font-size:9px;padding:5px 7px;margin:0 0 10px;max-width:calc(100% - 120px)}}

/* Railway tiles share Leaflet's tile camera. Override the general UI icon styles. */
.rail-grid { pointer-events:none }
svg.leaflet-tile { overflow:hidden;stroke:none;fill:none }
.rail-stop { --rim:#58677b;--centre:#fff }
.rail-stop .rim {stroke:var(--rim)}
.rail-stop .centre {stroke:var(--centre)}
.rail-stop.found { --centre:#34876c;--rim:#1a5e4b }
.rail-stop.dim { opacity:.2 }
.rail-halo { fill:none;stroke:#34876c99;stroke-width:2 }
.rail-label { font:500 11px 'Space Grotesk',sans-serif;fill:#245e4c;stroke:#fff;stroke-width:3;paint-order:stroke }
.region-children { margin:0 0 8px 14px;border-left:1px solid var(--line);padding-left:10px }
.region-children summary { cursor:pointer;color:var(--muted);font-size:12px;padding:8px 0 }
.theme-control {display:flex;align-items:center;justify-content:space-between;margin:0 0 8px;color:var(--muted);font-size:11px}
.theme-control select {border:1px solid var(--line);border-radius:5px;background:var(--paper);color:var(--ink);padding:3px 5px;font:inherit}
:root[data-theme=dark] {color-scheme:dark;--paper:#202625;--ink:#edf0e9;--line:#424944;--muted:#b8c0b8;--map-ground:#212833}
[data-theme=dark] #map {background:var(--map-ground)}
[data-theme=dark] .leaflet-tile-pane,[data-theme=dark] .leaflet-geography-pane {filter:invert(.92) hue-rotate(170deg) saturate(.65)}
[data-theme=dark] .rail-stop {--centre:#252d35;--rim:#b3c6d6}
[data-theme=dark] .rail-stop.found {--centre:#59c997;--rim:#bbf4d8}
[data-theme=dark] .rail-label {fill:#c1f3cf;stroke:#242a2c}
[data-theme=dark] :is(.guess-form,.notification,.mobile-progress,.map-message,.filter-wrap,.coverage-box,.secondary-button,.close-dialog) {background:#303934;color:var(--ink);border-color:var(--line)}
[data-theme=dark] :is(#station-input,.filter-wrap input,.progress-tabs button[aria-selected=true],.total-caption strong,dialog p,.help-list,.utility-buttons button,.coverage-box h3,.map-message strong) {color:var(--ink)}
[data-theme=dark] :is(.total-caption,.progress-count,.progress-tabs button,.progress-group-heading,.save-row,.coverage-note,.input-hint,h1 span) {color:var(--muted)}
[data-theme=dark] .input-hint {text-shadow:0 1px 3px #151c24}
[data-theme=dark] :is(.progress-row:hover,.progress-row.is-selected,.progress-track,#overall-progress) {background:#384339}
[data-theme=dark] :is(.dataset-status,.completion-message,.notification[data-kind=success]) {background:#334236;color:#dcf1cc;border-color:#52644e}
[data-theme=dark] .notification[data-kind=error] {color:#ffc7ae}
[data-theme=dark] .leaflet-control-zoom a {background:#303934!important;color:#dbe3dc!important}
[data-theme=dark] .leaflet-control-attribution,[data-theme=dark] .leaflet-control-attribution a {background:#202625dc!important;color:#c4d2d9!important}

#cancel-location{pointer-events:auto;display:block;margin:6px auto;border:1px solid var(--line);border-radius:5px;background:var(--paper);color:var(--ink);font-size:11px;padding:4px 8px}

/* Seriaura's charcoal, paper and orange palette. The lighter theme uses burnt orange for small text. */
:root { --paper:#f1f0ed;--ink:#201f1e;--muted:#625f5a;--line:#d0cdc8;--accent:#a34808;--surface:#faf9f7;--inset:#e6e3de;--divider:#c4c2bd;--label-halo:#fffaf1 }
:root[data-theme=dark] { --paper:#1b1b1b;--ink:#f1f0ed;--muted:#b6b2ab;--line:#494641;--accent:#ff8b19;--surface:#292826;--inset:#35332f;--divider:#676560;--label-halo:#1b1b1b;--map-ground:#222 }
.sidebar {border-color:var(--divider);box-shadow:none}
.rail-mark {width:40px;height:26px;background:var(--accent);mask:url(assets/national-rail.svg) center / contain no-repeat}
.sidebar h1 span,.sidebar .percent-sign,.sidebar .total-caption,.sidebar .progress-count,.sidebar .progress-group-heading,.sidebar .save-row,.sidebar .coverage-note,.sidebar .utility-buttons button,.sidebar .progress-tabs button {color:var(--muted)}
.sidebar .total-caption strong,.sidebar .progress-tabs button[aria-selected=true],.sidebar .filter-wrap input {color:var(--ink)}
.sidebar .progress-tabs button[aria-selected=true]:after,.sidebar .progress-fill:not([style]),.sidebar .save-dot {background:var(--accent)}
#overall-progress {color:var(--accent);background:var(--inset)}
#overall-progress::-webkit-progress-bar {background:var(--inset)}
#overall-progress::-webkit-progress-value {background:var(--accent)}
#overall-progress::-moz-progress-bar {background:var(--accent)}
.sidebar .progress-track,.sidebar .progress-row:is(:hover,.is-selected) {background:var(--inset)}
.sidebar .filter-wrap,.game .guess-form,.game .map-message,.game .notification,.game .mobile-progress,dialog .coverage-box {background:var(--surface);border-color:var(--line);color:var(--ink)}
#guess-submit,dialog .primary-button {background:var(--accent);color:var(--paper)}
.game .notification[data-kind=success],.game .completion-message {background:var(--surface);border:1px solid var(--line);border-inline-start:3px solid var(--accent);color:var(--ink)}
.line-header {display:grid;grid-template-columns:minmax(0,1fr) 28px;align-items:center}
.line-toggle {width:28px;height:30px;display:grid;place-items:center;border:0;border-radius:5px;color:var(--muted);background:transparent}
.line-toggle:hover {background:var(--inset)}
.line-toggle::after {content:'';width:6px;height:6px;border:solid currentColor;border-width:0 1.5px 1.5px 0;transform:rotate(-45deg)}
.line-toggle[aria-expanded=true]::after {transform:rotate(45deg)}
.line-section {content-visibility:auto;contain-intrinsic-block-size:auto 46px}
.line-stations {margin:0 12px 0 31px;overflow:hidden;font-size:11px;line-height:1.5;color:var(--ink);overflow-wrap:anywhere}
.line-stations::after {content:'';display:block;height:6px}
.unnamed-count {color:var(--muted)}
.rail-grid .rail-stop {--rim:#66635f;--centre:#f8f7f4}
.rail-grid .rail-stop.found {--rim:#693506;--centre:#ff922f}
[data-theme=dark] .rail-grid .rail-stop {--rim:#a39f98;--centre:#292825}
[data-theme=dark] .rail-grid .rail-stop.found {--rim:#ffd0a0;--centre:#ff8b19}
.rail-grid .rail-label {font:600 13px 'Space Grotesk',sans-serif;fill:var(--ink);stroke:var(--label-halo);stroke-width:3px;transform:scale(var(--rail-inverse,1));transform-origin:0 0;transform-box:view-box}
.arrival-marker {pointer-events:none!important;display:grid;place-items:center}
.arrival-marker i {width:100%;height:100%;border-radius:50%;border:2px solid var(--accent);box-shadow:inset 0 0 0 3px #ff8b192b;animation:rail-arrival .46s cubic-bezier(.16,.75,.3,1) both}
@keyframes rail-arrival {from{opacity:.95;transform:scale(.27)}to{opacity:0;transform:scale(1.3)}}
.input-hint:empty {display:none}

#guess-submit { background:var(--inset); color:var(--muted) }
#guess-submit:hover,#guess-submit:focus-visible {background:var(--line);color:var(--ink)}
.game .notification[data-kind=success] {border:1px solid var(--line);background:var(--surface);color:var(--ink)}
.unknown-name {color:var(--muted);font-weight:400}
.line-toggle::after {transition:transform 135ms ease-out}
.leaflet-regionShade-pane {opacity:0;transition:opacity 130ms ease;pointer-events:none}
.rail-grid .rail-label.is-muted {opacity:.28}
.sidebar-header .title-row {justify-content:flex-start;gap:15px;margin-bottom:20px}
.sidebar-header .rail-mark {order:-1;margin:0;width:37px;height:24px}
.sidebar-header h1 {font-size:clamp(26px,2.4vw,34px)}
.sidebar-header h1 span {font-size:.7em;line-height:1.1}
#overall-progress {margin-bottom:2px}
.storage-warning {font-size:11px;color:var(--muted)}
.sidebar-footer .utility-buttons {display:grid;grid-template-columns:1fr 1fr;gap:6px}
.sidebar-footer .utility-buttons > * {margin:0;width:100%;height:34px;min-width:0;justify-content:flex-start;gap:6px;padding:0 8px;border:1px solid var(--line);border-radius:6px;background:var(--surface);color:var(--ink);font-size:11px}
.sidebar-footer .theme-control select {flex:1;min-width:0;padding:0;border:0;background:transparent;font-size:10px}
.sidebar-footer .utility-buttons button:hover {background:var(--inset)}
.sources-page {background:var(--paper);color:var(--ink)}
.sources-page :is(p,li,th,.stats) {color:var(--ink)}
.sources-page :is(th,td,.notice) {border-color:var(--line)}
.sources-page .notice {background:var(--surface)}
.sources-page a {color:var(--accent)}

.sidebar-footer #reset-button {width:100%}
@supports (interpolate-size: allow-keywords) {
  .region-children {interpolate-size:allow-keywords}
  .region-children::details-content {height:0;overflow:clip;transition:height 135ms ease-out,content-visibility 135ms allow-discrete}
  .region-children[open]::details-content {height:auto}
}
.toast-enter {animation:rail-toast-in 110ms ease-out both}
.toast-leave {animation:rail-toast-out 130ms ease-in both}
@keyframes rail-toast-in {from{opacity:0}to{opacity:1}}
@keyframes rail-toast-out {from{opacity:1}to{opacity:0}}

/* Station entry stays neutral in both appearances. */
:root {--enter-bg:#eae8e5;--enter-hover:#f5f4f2;--unknown-ink:#585551}
:root[data-theme=dark] {--enter-bg:#454340;--enter-hover:#565451;--unknown-ink:#a39f99}
#guess-submit {background:var(--enter-bg);color:var(--ink);transition:background-color 140ms ease}
#guess-submit:hover,#guess-submit:focus-visible {background:var(--enter-hover)}
.guess-form .search-icon,#station-input::placeholder {color:var(--muted);opacity:1}
#station-input {color:var(--ink)}
.unknown-name {color:var(--unknown-ink)}
@media(max-width:700px){
  .sidebar {transition:transform 165ms ease-out,visibility 0s 165ms}
  .sidebar.is-open {transition-delay:0s}
}

/* Menu typography follows the site's Sentient headings and Space Grotesk controls. */
dialog {color:var(--ink);background:var(--paper);border:1px solid var(--line);border-radius:14px;padding:24px;box-shadow:0 16px 64px #0003}
dialog::backdrop {background:#14141480}
.menu-heading {display:flex;align-items:center;justify-content:space-between;gap:14px;margin-bottom:18px}
.menu-heading h2 {margin:0;font:400 clamp(25px,3vw,32px)/1.1 Sentient,Georgia,serif;letter-spacing:-.035em;color:var(--ink)}
dialog :is(p,.help-list,.independent-note,.coverage-box p) {color:var(--muted)}
dialog .coverage-box {background:var(--surface);border:1px solid var(--line)}
dialog .coverage-box h3,dialog a {color:var(--ink)}
dialog :is(.primary-button,.secondary-button,.danger-button,.close-dialog),[data-theme=dark] dialog .close-dialog {background:var(--inset);border:1px solid var(--line);color:var(--ink);font-family:'Space Grotesk',sans-serif}
dialog :is(.primary-button,.secondary-button,.danger-button,.close-dialog):hover {background:var(--line);color:var(--ink)}
dialog :focus-visible {outline:2px solid var(--muted);outline-offset:3px}
#appearance-dialog {width:min(340px,calc(100vw - 32px))}
.theme-choices {padding:0;margin:0;display:grid;gap:6px;border:0}
.theme-choices label {display:flex;align-items:center;gap:12px;min-height:40px;padding:8px 12px;border:1px solid var(--line);border-radius:6px;background:var(--surface);color:var(--ink);cursor:pointer;font:500 13px 'Space Grotesk',sans-serif}
.theme-choices label:hover,.theme-choices label:has(:checked) {background:var(--inset)}
.theme-choices input {width:15px;height:15px;margin:0;accent-color:var(--muted)}
.sidebar-footer .utility-buttons button {gap:8px;white-space:nowrap}
/* Shared treatment for the game controls, including navigation links. */
.game :is(button, .game-home), dialog button{font-family:inherit}
.game :is(button, .game-home):focus-visible, dialog button:focus-visible{
  outline:2px solid currentColor;outline-offset:2px
}
.game .sidebar-footer :is(button, .game-home){
  display:inline-flex;align-items:center;justify-content:center;gap:.4em;
  min-height:34px;padding:5px 9px;border:1px solid color-mix(in srgb,currentColor 28%,transparent);
  border-radius:6px;background:transparent;color:inherit;text-decoration:none;
  font:inherit;font-size:13px;line-height:1.2;cursor:pointer
}
.game .sidebar-footer :is(button, .game-home):hover{
  background:color-mix(in srgb,currentColor 9%,transparent)
}
.game .sidebar-footer .game-home{display:flex;width:100%;margin-bottom:6px}
.game .sidebar-footer .game-home svg{
  width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round
}
