/* 全程页面 */
:root { --wall: #F1E3CB; --ink: #3A2C35; --red: #C4553F; --paper: #FBF4E6; --frame: #F7EDDC; --edge: #D9C3A0; --navy: #1F2E4A; --sea: #BFD7DC; --land: #F6EBD6; }
* { box-sizing: border-box; margin: 0; padding: 0; }
body { background: var(--wall); color: var(--ink); min-height: 100dvh; font-family: "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
button { font: inherit; color: inherit; cursor: pointer; }
[hidden] { display: none !important; }
a { color: inherit; }
.bar { display: flex; align-items: center; justify-content: space-between; max-width: 1200px; margin: 0 auto; padding: max(14px, env(safe-area-inset-top)) 16px 8px; }
.back { text-decoration: none; font-size: 14px; letter-spacing: .02em; opacity: .7; }
.lang { width: 36px; height: 36px; border-radius: 50%; background: rgba(58,44,53,.07); font-size: 12px; font-weight: 600; display: grid; place-items: center; text-decoration: none; }
main { max-width: 1200px; margin: 0 auto; padding: 0 16px 40px; }
h1 { font-size: clamp(28px, 6vw, 44px); color: var(--navy); margin-top: 8px; line-height: 1.2; }
.lede { font-size: 15px; opacity: .7; margin-top: 6px; }
.now { margin: 14px 0 12px; font-size: 15px; line-height: 1.5; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.now b { color: var(--red); font-variant-numeric: tabular-nums; }
.now .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 0 rgba(196,85,63,.5); animation: beat 2s infinite; flex: none; }
@keyframes beat { 70% { box-shadow: 0 0 0 10px rgba(196,85,63,0); } 100% { box-shadow: 0 0 0 0 rgba(196,85,63,0); } }

.mapbox { position: relative; border-radius: 22px; overflow: hidden; border: 10px solid var(--frame); box-shadow: 0 0 0 2px var(--edge), 0 16px 26px -16px rgba(58,44,53,.45); background: var(--sea); }
.mapscroll { overflow: auto; max-height: min(72vh, 760px); -webkit-overflow-scrolling: touch; scrollbar-width: thin; cursor: grab; }
.mapscroll:active { cursor: grabbing; }
.wm { display: block; width: 100%; height: auto; --u: 1; }
.wm .sea { fill: var(--sea); }
.wm .land { fill: var(--land); stroke: #E2CFAE; stroke-width: calc(var(--u) * 1px); stroke-linejoin: round; }
.wm .todo { fill: none; stroke: #8E7A70; stroke-width: calc(var(--u) * 1.6px); stroke-dasharray: calc(var(--u) * 5px) calc(var(--u) * 5px); stroke-linecap: round; opacity: .8; }
.wm .done { fill: none; stroke: var(--red); stroke-width: calc(var(--u) * 3px); stroke-linecap: round; stroke-linejoin: round; }
.wm .d { fill: #fff; stroke: var(--ink); stroke-width: calc(var(--u) * 1.2px); r: calc(var(--u) * 3.4px); cursor: pointer; }
.wm .d.m { r: calc(var(--u) * 2.4px); }
.wm .d.p { fill: var(--red); stroke: var(--red); }
.wm .d.c { stroke-opacity: .45; fill: #F3EDE4; }
.wm .d.n { r: calc(var(--u) * 5px); stroke: var(--red); stroke-width: calc(var(--u) * 2.4px); fill: #fff; }
.wm text { font-size: calc(var(--u) * 11.5px); fill: var(--ink); paint-order: stroke; stroke: rgba(246,235,214,.9); stroke-width: calc(var(--u) * 3px); stroke-linejoin: round; pointer-events: none; }
.wm text.n { font-weight: 700; fill: var(--red); font-size: calc(var(--u) * 13px); }
.wm #train .tr { fill: var(--red); stroke: #fff; stroke-width: calc(var(--u) * 2.5px); r: calc(var(--u) * 6.5px); }
.wm #train .glow { fill: var(--red); opacity: .22; r: calc(var(--u) * 16px); animation: pulse 2s infinite; transform-box: fill-box; transform-origin: center; }
@keyframes pulse { 50% { opacity: .05; transform: scale(1.5); } }
.zoom { position: absolute; right: 10px; top: 10px; display: flex; flex-direction: column; gap: 6px; }
.zoom button { width: 38px; height: 38px; border-radius: 12px; border: 0; background: rgba(251,244,230,.95); font-size: 20px; font-weight: 600; box-shadow: 0 4px 10px -6px rgba(0,0,0,.4); }
.card { position: absolute; left: 10px; bottom: 10px; width: min(320px, calc(100% - 20px)); background: var(--paper); border-radius: 16px; padding: 14px 16px; box-shadow: 0 12px 24px -10px rgba(0,0,0,.4); font-size: 14px; line-height: 1.55; }
.card h3 { font-size: 19px; margin-right: 26px; }
.card h3 small { font-size: 13px; font-weight: 400; opacity: .6; margin-left: 4px; }
.card small { opacity: .6; }
.card b { color: var(--red); }
.card .x { position: absolute; top: 6px; right: 8px; width: 30px; height: 30px; border: 0; background: none; font-size: 22px; opacity: .5; }
.card .go { display: inline-block; margin-top: 8px; background: var(--red); color: #FFF6EC; text-decoration: none; padding: 8px 14px; border-radius: 999px; font-weight: 600; }
.card .soon { margin-top: 6px; opacity: .65; font-size: 13px; }
.legend { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 12px 2px 0; font-size: 12.5px; opacity: .75; }
.legend i { display: inline-block; vertical-align: middle; margin-right: 6px; }
.l-done { width: 22px; height: 3px; background: var(--red); border-radius: 2px; }
.l-todo { width: 22px; border-top: 2px dashed #8E7A70; }
.l-open { width: 9px; height: 9px; border-radius: 50%; border: 1.5px solid var(--ink); background: #fff; }
.l-closed { width: 9px; height: 9px; border-radius: 50%; border: 1.5px solid rgba(58,44,53,.4); background: #F3EDE4; }
.ride { display: inline-block; margin-top: 18px; background: var(--red); color: #FFF6EC; text-decoration: none; padding: 12px 22px; border-radius: 999px; font-weight: 600; }

.tt { margin-top: 34px; }
.tt h2 { font-size: 22px; }
.tt .note { font-size: 13px; opacity: .6; margin: 4px 0 12px; }
.tt details { background: var(--paper); border-radius: 14px; margin-bottom: 10px; overflow: hidden; }
.tt summary { padding: 14px 16px; font-weight: 700; cursor: pointer; list-style: none; display: flex; justify-content: space-between; }
.tt summary::-webkit-details-marker { display: none; }
.tt summary::after { content: '▾'; opacity: .5; }
.tt details[open] summary::after { content: '▴'; }
.tt summary small { font-weight: 400; opacity: .5; margin-left: auto; margin-right: 10px; }
.tt ol { list-style: none; padding: 0 8px 10px; }
.tt li { display: grid; grid-template-columns: 9.5em 1fr; gap: 2px 12px; padding: 9px 8px; border-top: 1px solid rgba(58,44,53,.07); font-size: 14px; cursor: pointer; border-radius: 8px; }
.tt li:hover { background: rgba(58,44,53,.04); }
.tt li .dt { opacity: .7; font-variant-numeric: tabular-nums; }
.tt li .dt b { font-weight: 600; }
.tt li .nm a { font-weight: 600; text-decoration: none; border-bottom: 1px solid rgba(58,44,53,.25); }
.tt li.major .nm { font-weight: 600; }
.tt li .mt { grid-column: 2; font-size: 12px; opacity: .55; }
.tt li.past { opacity: .5; }
.tt li.here { background: rgba(196,85,63,.1); }
.tt li.here .nm::before { content: '🚂 '; }
.tt i.en { font-style: normal; font-size: 10px; border: 1px solid currentColor; border-radius: 3px; padding: 0 3px; opacity: .7; }
.foot { max-width: 1200px; margin: 0 auto; padding: 20px 16px max(30px, env(safe-area-inset-bottom)); font-size: 13px; opacity: .6; }
.foot a { text-decoration: none; }
@media (max-width: 640px) {
  .mapbox { border-width: 7px; border-radius: 18px; margin: 0 -4px; }
  .mapscroll { max-height: 62vh; }
  .tt li { grid-template-columns: 8.4em 1fr; font-size: 13.5px; }
}
/* 分享预览图（只在生成 og-route.png 时用）：/route?og=1 */
body.og { width: 1200px; height: 630px; overflow: hidden; }
body.og .bar, body.og .now, body.og .legend, body.og .ride, body.og .tt, body.og .foot, body.og .zoom, body.og .card { display: none !important; }
body.og main { max-width: none; padding: 34px 40px 0; }
body.og h1 { font-size: 46px; margin: 0; }
body.og .lede { font-size: 20px; margin: 4px 0 18px; }
body.og .mapbox { width: 1120px; }
body.og .mapscroll { max-height: none; }
body.og .ogbrand { position: absolute; right: 44px; top: 40px; text-align: right; font-size: 18px; letter-spacing: .25em; opacity: .65; }
body.og .ogfoot { position: absolute; left: 40px; right: 40px; bottom: 22px; font-size: 19px; color: #C4553F; font-weight: 600; }

.langmenu { position: absolute; z-index: 95; background: #FBF4E6; border-radius: 14px; padding: 6px; box-shadow: 0 12px 26px -10px rgba(0,0,0,.45); display: flex; flex-direction: column; min-width: 140px; }
.langmenu a { padding: 9px 14px; border-radius: 9px; color: #3A2C35; text-decoration: none; font-size: 14px; }
.langmenu a:hover { background: rgba(58,44,53,.07); }
.langmenu a[aria-current] { font-weight: 700; color: #C4553F; }
button.lang { border: 0; cursor: pointer; color: inherit; font: inherit; font-size: 12px; font-weight: 600; }
