:root {
  color-scheme: light;
  --bg: #f3f5ef;
  --surface: #fff;
  --soft: #edf2eb;
  --map: #eef3e9;
  --ink: #1c2721;
  --muted: #4a5d52;
  --rule: #c9d4c9;
  --accent: #bd381e;
  --accent-bg: #f8dfd3;
  --button: #20382c;
  --button-text: #fff;
  --grid: #dce5d8;
  --water: #c8dfe8;
  --water-ink: #456a7d;
  --road: #f7fbf5;
  --transfer: #4a5d52;
  --sans: "Segoe UI", "Arial", sans-serif;
  --radius: 16px;
  --page: 1320px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.53 var(--sans); }
h1,h2,h3,p { margin: 0; }
a { color: inherit; }
button,input,select { font: inherit; }
button { color: inherit; }
button:not(:disabled), select { cursor: pointer; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
[hidden] { display: none !important; }
.wrap { width: min(calc(100% - 64px), var(--page)); margin-inline: auto; }
.skip { top: 0; left: 16px; position: absolute; transform: translateY(-150%); z-index: 3; background: var(--surface); padding: 8px 12px; }
.skip:focus { transform: none; }
.site-header { border-bottom: 1px solid var(--rule); }
.bar { min-height: 76px; display: flex; align-items: center; gap: 30px; justify-content: space-between; }
.brand { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; font-size: 24px; font-weight: 780; letter-spacing: -.05em; }
.brand img { display: block; object-fit: contain; }
.bar nav { display: flex; align-items: center; gap: clamp(14px, 3vw, 40px); }
.bar nav a, .all-layouts { text-decoration: none; font-size: .94rem; font-weight: 660; }
.bar nav a:hover, .all-layouts:hover { color: var(--accent); }
.all-layouts { border: 1px solid var(--rule); padding: 8px 13px; border-radius: 100px; white-space: nowrap; }
.intro { padding-block: 34px 30px; }
.atlas .intro { display: flex; align-items: end; justify-content: space-between; gap: 30px; }
.intro h1, .collection h1 { font-size: clamp(2.6rem, 5vw, 5rem); letter-spacing: -.072em; line-height: 1; font-weight: 780; }
.intro p { margin-top: 16px; color: var(--muted); font-size: clamp(1.05rem, 2vw, 1.22rem); max-width: 57ch; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 20px; background: var(--button); color: var(--button-text); border-radius: 100px; font-weight: 670; text-decoration: none; white-space: nowrap; }
.button:hover { filter: brightness(1.13); }
.workspace { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 310px); align-items: stretch; gap: 18px; }
.map-panel,.finder { border: 1px solid var(--rule); border-radius: var(--radius); min-width: 0; background: var(--surface); }
.map-heading { min-height: 79px; padding: 12px 18px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.map-heading h2,.finder h2 { font-size: 1.27rem; letter-spacing: -.025em; line-height: 1.15; }
.map-heading p { color: var(--muted); font-size: .79rem; margin-top: 4px; }
.zoom { display: flex; align-items: center; gap: 4px; }
.zoom button { width: 40px; height: 40px; background: var(--soft); border: 1px solid var(--rule); border-radius: 10px; font-size: 1.26rem; line-height: 1; }
.zoom button:hover:not(:disabled) { background: var(--accent-bg); }
.zoom button:disabled { opacity: .48; }
.map-scroll { --map-height: clamp(360px, 40vw, 474px); overflow: auto; background-color: var(--map); background-image: linear-gradient(var(--grid) 1px, transparent 1px),linear-gradient(90deg, var(--grid) 1px, transparent 1px); background-size: 29px 29px; height: var(--map-height); scrollbar-color: var(--rule) var(--map); }
.map-scroll:focus-visible { outline-offset: -3px; }
.map-drawing { --map-zoom: 100%; --map-scale: 1; width: var(--map-zoom); min-width: calc(620px * var(--map-scale)); min-height: 100%; display: grid; place-items: center; }
.transit-map { width: 100%; max-width: max(calc(620px * var(--map-scale)), calc(var(--map-height) * 1.615 * var(--map-scale))); height: auto; display: block; }
.route-path,.route-casing,.river,.transfer-casing,.transfer-path { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.route-casing { stroke: var(--road); stroke-width: 9px; }
.route-path { stroke-width: 5px; }
.river { stroke: var(--water); stroke-width: 32px; }
.river-label { fill: var(--water-ink); font: italic 15px var(--sans); }
.transfer-casing { stroke: var(--transfer); stroke-width: 6px; }
.transfer-path { stroke: var(--road); stroke-width: 2px; }
.station-node { cursor: pointer; outline: none; }
.station-node text { fill: var(--ink); stroke: var(--map); stroke-width: 3.2px; paint-order: stroke; font: 650 14px var(--sans); stroke-linecap: round; stroke-linejoin: round; }
.station-node .target { fill: transparent; }
.station-node .node { fill: var(--surface); stroke-width: 3px; transition: r .15s ease; }
.station-node:hover .node,.station-node.selected .node,.station-node:focus-visible .node { r: 8px; }
.station-node.selected .target,.station-node:focus-visible .target { fill: var(--accent); opacity: .8; }
.station-node.dimmed:not(.selected) { opacity: .55; }
.pan-note { display: none; }
.map-legend { padding: 11px 16px; margin: 0; list-style-type: none; display: flex; flex-wrap: wrap; align-items: center; gap: 5px 13px; font-size: .75rem; color: var(--muted); }
.map-legend li { display: inline-flex; align-items: center; gap: 5px; }
.line-mark,.map-legend li > span { display: inline-grid; place-items: center; flex-shrink: 0; color: #fff; background: var(--line-color); min-width: 21px; height: 21px; font: 700 .74rem/1 var(--sans); border-radius: 6px; padding-inline: 3px; }
.finder { padding: 17px; }
.finder h2 { margin-bottom: 13px; }
.finder label { display: block; font-size: .875rem; font-weight: 660; margin-bottom: 4px; }
input,select { color: var(--ink); background: var(--soft); width: 100%; border: 1px solid var(--rule); border-radius: 10px; min-height: 43px; padding: 6px 10px; }
input { margin-bottom: 10px; }
input::placeholder { color: var(--muted); }
select { padding-right: 26px; }
.results-count { color: var(--muted); font-size: .8rem; margin-top: 13px; }
.station-list { max-height: 367px; list-style: none; margin: 4px 0 0; padding: 3px; overflow: auto; scrollbar-color: var(--rule) var(--surface); }
.station-list li + li { border-top: 1px solid var(--rule); }
.station-list button { width: 100%; min-height: 43px; display: flex; gap: 6px; align-items: center; justify-content: space-between; text-align: left; padding: 6px; border: 0; border-radius: 6px; background: none; font-size: .9rem; }
.station-list button:hover,.station-list button.selected { background: var(--accent-bg); }
.station-list button:focus-visible { outline-offset: -2px; }
.line-marks { display: flex; gap: 2px; }
.no-results { font-size: .9rem; margin-top: 7px; color: var(--muted); }
.below { display: grid; gap: 56px; padding-block: 22px 65px; }
.station-info { background: var(--soft); display: grid; grid-template-columns: minmax(220px, .7fr) 1.25fr; align-items: center; gap: 20px; padding: 22px 24px; border-radius: var(--radius); border: 1px solid var(--rule); }
.info-label,.related-type { font-size: .8rem; color: var(--muted); }
.station-info h2,.related h2,.guide h2 { font-size: clamp(1.65rem, 3vw, 2.45rem); line-height: 1.1; letter-spacing: -.05em; margin: 5px 0 10px; }
.selected-lines,.selected-lines > span { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; font-size: .86rem; }
.selected-lines { gap: 12px; }
.related-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; }
.related article { border-top: 2px solid var(--rule); padding: 16px 3px 4px; }
.related article h3 { margin: 4px 0 7px; font-size: 1.34rem; letter-spacing: -.035em; }
.related article p { color: var(--muted); }
.text-action { border: 0; padding: 8px 0; background: transparent; color: var(--accent); text-decoration: underline; font-weight: 670; text-underline-offset: 3px; margin-top: 7px; }
.guide-items { max-width: 76ch; }
.guide details { border-bottom: 1px solid var(--rule); padding: 12px 0; }
.guide summary { cursor: pointer; font-weight: 665; }
.guide details p { padding: 9px 0 0 19px; color: var(--muted); }
.site-footer { border-top: 1px solid var(--rule); }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding-block: 24px; }
.footer-inner .brand { font-size: 1.14rem; }
.footer-inner p { color: var(--muted); font-size: .9rem; }
.footer-inner > a:last-child { font-size: .9rem; text-underline-offset: 3px; }

.signal {
  color-scheme: dark;
  --bg: #101e1a;
  --surface: #162823;
  --soft: #1d342b;
  --map: #14251f;
  --ink: #f0f8eb;
  --muted: #b6c8bc;
  --rule: #3b574b;
  --accent: #bff086;
  --accent-bg: #2c4936;
  --button: #bff086;
  --button-text: #14251f;
  --grid: #223b30;
  --water: #213e4a;
  --water-ink: #a7c7d4;
  --road: #1f382c;
  --transfer: #dce9dc;
  --radius: 5px;
}
.signal .brand { letter-spacing: -.03em; }
.signal .intro { padding-block: 27px 24px; }
.signal .intro h1 { font-size: clamp(2.3rem, 4.25vw, 4rem); letter-spacing: -.045em; }
.signal .intro p { margin-top: 7px; }
.signal .workspace { grid-template-columns: minmax(250px, 295px) minmax(0, 1fr); gap: 12px; }
.signal .map-heading { min-height: 72px; }
.signal .finder { border-top: 3px solid var(--accent); }
.signal .station-list { max-height: 388px; }
.signal .zoom button,.signal input,.signal select,.signal .all-layouts { border-radius: 5px; }
.signal .route-path { filter: brightness(1.35) saturate(.9); }
.signal .node { filter: brightness(1.4); }
.signal .related article { background: var(--surface); padding: 18px; }

.journal {
  --bg: #f9f4e9;
  --surface: #fffaf1;
  --soft: #f0e5d7;
  --map: #f4eddd;
  --ink: #302523;
  --muted: #67524d;
  --rule: #d5c3b4;
  --accent: #841830;
  --accent-bg: #f5e1e4;
  --button: #841830;
  --button-text: white;
  --grid: #e8dccb;
  --water: #d4dfdc;
  --water-ink: #435d62;
  --road: #fff9ef;
  --transfer: #665454;
  --radius: 2px;
  --page: 1190px;
}
.journal h1,.journal h2,.journal h3 { font-family: Georgia, "Times New Roman", serif; font-weight: 650; letter-spacing: -.045em; }
.journal .brand { font-family: Georgia, "Times New Roman", serif; color: var(--accent); }
.journal .site-header { border-bottom: 3px double var(--rule); }
.journal .intro { padding-block: 28px 34px; }
.journal-hero { display: grid; grid-template-columns: .88fr 1.12fr; align-items: center; gap: 34px; }
.journal-hero h1 { font-size: clamp(3rem, 6.9vw, 6rem); line-height: .96; }
.journal-hero .button { margin-top: 20px; border-radius: 2px; }
.journal-hero img { width: 100%; height: clamp(220px,26vw,360px); display: block; object-fit: cover; object-position: center; border-radius: 2px; }
.journal .finder h2,.journal .map-heading h2 { font-size: 1.45rem; }
.journal .below { gap: 48px; }
.journal .related article { border-top: 3px double var(--rule); }
.journal .guide { border-top: 1px solid var(--rule); padding-top: 17px; }

.collection { --page: 1130px; }
.collection-intro { max-width: 680px; padding-block: clamp(34px, 7vw, 90px) clamp(24px, 5vw, 56px); }
.collection h1 { font-size: clamp(3.2rem, 9vw, 7rem); }
.collection-intro p { margin-top: 16px; font-size: clamp(1rem, 2.5vw, 1.3rem); color: var(--muted); }
.concept-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 18px; padding-bottom: 56px; }
.concept-card { display: flex; flex-direction: column; gap: 0; text-decoration: none; color: var(--ink); background: var(--surface); border-radius: var(--radius); border: 1px solid var(--rule); overflow: hidden; }
.concept-art { min-height: 200px; display: grid; place-items: center; position: relative; background: var(--map); background-image: linear-gradient(var(--grid) 1px, transparent 1px),linear-gradient(90deg,var(--grid) 1px, transparent 1px); background-size: 22px 22px; border-bottom: 1px solid var(--rule); }
.concept-card.signal .concept-art { background-size: 30px 30px; }
.concept-card.journal .concept-art { background-image: none; }
.concept-mark { display: block; object-fit: contain; max-width: 100%; }
.mini-tab { position: absolute; bottom: 0; left: 14px; padding: 5px 8px; border-radius: 6px 6px 0 0; border: 1px solid var(--rule); border-bottom: 0; background: var(--surface); display: flex; align-items: center; gap: 6px; font-size: .75rem; }
.concept-copy { display: flex; flex: 1; flex-direction: column; padding: 18px; }
.concept-copy h2 { font-size: clamp(1.4rem,3vw,1.9rem); line-height: 1.08; letter-spacing: -.045em; }
.concept-copy p { margin-block: 8px 14px; color: var(--muted); }
.concept-open { margin-top: auto; color: var(--accent); font-weight: 680; text-underline-offset: 4px; }
.concept-card:hover .concept-open { text-decoration: underline; }

@media (max-width: 930px) {
  .wrap { width: calc(100% - 40px); }
  .workspace,.signal .workspace { grid-template-columns: minmax(0, 1fr) minmax(230px, 260px); }
  .signal .workspace { grid-template-columns: minmax(230px, 260px) minmax(0, 1fr); }
  .map-scroll { --map-height: 380px; }
  .station-list,.signal .station-list { max-height: 274px; }
  .pan-note { display: block; padding: 5px 12px 0; color: var(--muted); font-size: .76rem; }
}
@media (max-width: 750px) {
  .wrap { width: calc(100% - 32px); }
  .bar { flex-wrap: wrap; gap: 0 10px; min-height: 62px; padding-block: 8px 4px; }
  .brand { font-size: 1.35rem; }
  .bar .brand img { width: 37px; height: 37px; }
  .bar nav { order: 1; width: 100%; gap: clamp(15px,5vw,31px); padding: 8px 0 5px; }
  .bar nav a { min-height: 28px; display: inline-flex; align-items: center; font-size: .88rem; }
  .all-layouts { font-size: .84rem; padding: 6px 8px; }
  .intro,.signal .intro { padding-block: 24px 20px; }
  .intro p { margin-top: 10px; }
  .atlas .intro { display: block; }
  .atlas .intro .button { margin-top: 13px; }
  .workspace,.signal .workspace { display: flex; flex-direction: column; gap: 10px; }
  .signal .finder { order: 0; }
  .map-scroll { --map-height: 320px; }
  .map-heading { min-height: 67px; padding: 9px 10px; gap: 6px; }
  .map-heading h2 { font-size: 1.08rem; }
  .map-heading p { font-size: .75rem; }
  .zoom { gap: 3px; }
  .zoom button { width: 34px; height: 38px; }
  .station-list,.signal .station-list { max-height: 198px; }
  .station-info { grid-template-columns: 1fr; gap: 10px; padding: 15px; }
  .below { gap: 34px; padding-block: 15px 40px; }
  .related-grid { grid-template-columns: 1fr; gap: 8px; }
  .footer-inner { flex-wrap: wrap; }
  .footer-inner p { order: 2; width: 100%; }
  .journal .intro { padding-block: 25px 22px; }
  .journal-hero { grid-template-columns: 1fr; gap: 16px; }
  .journal-hero img { height: clamp(170px,52vw,280px); }
  .concept-grid { grid-template-columns: 1fr; gap: 13px; }
  .concept-art { min-height: 140px; }
  .concept-mark { width: 82px; height: 82px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,*::before,*::after { transition-duration: 0s !important; }
}
@media (max-width: 355px) {
  .bar nav { gap: 12px; }
  .bar nav a { white-space: nowrap; font-size: .83rem; }
}
