:root {
  --bg: #f3f4f0;
  --panel: #ffffff;
  --ink: #15201b;
  --ink-2: #4c5852;
  --line: #dde2dc;
  --green: #00A84D;
  --green-deep: #00733a;
  --green-tint: #e3f4e9;
  --exit: #ffd400;
  --radius: 14px;
  --font: "IBM Plex Sans KR", system-ui, -apple-system, "Segoe UI", sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 17px/1.6 var(--font); }
a { color: inherit; }
img, svg { max-width: 100%; display: block; }
h1, h2, h3 { line-height: 1.15; margin: 0; letter-spacing: -.02em; }
.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 760px) { .wrap { padding: 0 32px; } }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 8px; top: 8px; background: var(--ink); color: #fff; padding: 8px 12px; z-index: 9; border-radius: 6px; }
:focus-visible { outline: 3px solid var(--exit); outline-offset: 2px; }
.dim { color: var(--ink-2); }
.small { font-size: 14px; }

/* Header */
.top { background: var(--panel); border-bottom: 1px solid var(--line); position: relative; }
.top::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 4px; background: var(--green); }
.top-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; padding-top: 14px; padding-bottom: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; text-decoration: none; letter-spacing: -.01em; }
.brand-dot { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--green); color: #fff; font-weight: 700; font-size: 16px; }
.nav { display: flex; gap: 4px 22px; flex-wrap: wrap; font-weight: 500; font-size: 15px; }
.nav a { text-decoration: none; color: var(--ink-2); padding: 4px 0; }
.nav a:hover { color: var(--green-deep); }

/* Line badges */
.lb { display: inline-grid; place-items: center; min-width: 24px; height: 24px; padding: 0 6px; border-radius: 999px; background: var(--c); color: #fff; font: 700 12px/1 var(--font); letter-spacing: 0; vertical-align: middle; }
.code { font-weight: 700; font-variant-numeric: tabular-nums; color: var(--ink-2); font-size: 14px; }

/* Buttons */
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 18px; border-radius: 999px; border: 1.5px solid var(--ink); background: var(--panel); text-decoration: none; font-weight: 500; font-size: 15px; line-height: 1.2; transition: background .15s, color .15s; }
.btn:hover { background: var(--ink); color: #fff; }
.btn-go { background: var(--green); border-color: var(--green); color: #fff; }
.btn-go:hover { background: var(--green-deep); border-color: var(--green-deep); }
.btn.wide { width: 100%; margin-top: 10px; }

/* Hero */
.hero { padding: 40px 0 16px; }
.hero-grid { display: grid; gap: 28px; align-items: center; }
@media (min-width: 980px) { .hero-grid { grid-template-columns: 1fr 1.3fr; gap: 40px; } }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; font-size: 14px; color: var(--ink-2); margin: 0 0 14px; }
.hero h1 { font-size: clamp(34px, 5.4vw, 58px); font-weight: 700; }
.lede { font-size: 19px; color: var(--ink-2); max-width: 36em; margin: 16px 0 0; }
.hero-map { background: var(--panel); border: 1px solid var(--line); border-radius: 20px; padding: 10px; }

/* SVG loop map */
.map .track { fill: none; stroke: var(--green); stroke-width: 9; stroke-linejoin: round; stroke-linecap: round; }
.map .track.branch { stroke-width: 6; stroke-dasharray: 2 12; }
.map .stn circle { fill: #fff; stroke: var(--ink); stroke-width: 3; transition: r .15s; }
.map .stn.xfer circle { stroke-width: 4; }
.map .stn.has-guide circle { fill: var(--exit); }
.map .stn.cur circle { fill: var(--green); stroke: var(--ink); stroke-width: 4; }
.map a:hover circle, .map a:focus circle { fill: var(--green); }
.map text { font: 600 26px var(--font); fill: var(--ink); paint-order: stroke; stroke: #fff; stroke-width: 6px; stroke-linejoin: round; }
.map .stn.cur text { font-weight: 700; }

/* Blocks */
.block { padding-top: 28px; padding-bottom: 8px; }
.block h2, .stay h2 { font-size: 24px; margin-bottom: 14px; }
.block h2 + p { margin-top: 0; }
.two { display: grid; gap: 0 32px; }
@media (min-width: 900px) { .two { grid-template-columns: 1.3fr 1fr; } }
.page-head { padding-top: 40px; }
.page-head h1 { font-size: clamp(32px, 5vw, 50px); }
.prose { max-width: 760px; }
.prose h2 { font-size: 22px; margin: 26px 0 8px; }
.prose p { margin: 0 0 12px; }

/* Station header and sign board */
.station-head { background: var(--panel); border-bottom: 1px solid var(--line); padding: 20px 0 26px; }
.crumbs { display: flex; gap: 8px; font-size: 14px; color: var(--ink-2); margin-bottom: 16px; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.board { display: grid; grid-template-columns: 1fr minmax(0, 1.5fr) 1fr; align-items: stretch; border-radius: 16px; overflow: hidden; border: 2px solid var(--ink); background: var(--green); }
.board-side { display: flex; flex-direction: column; justify-content: center; gap: 2px; padding: 14px 16px; color: #fff; text-decoration: none; min-width: 0; }
.board-side.right { text-align: right; align-items: flex-end; }
.board-side:hover .side-ko { text-decoration: underline; }
.board-side.end { font-size: 14px; opacity: .85; }
.arrow { font-size: 22px; line-height: 1; font-weight: 700; }
.side-ko { font-size: 20px; font-weight: 700; }
.side-en { font-size: 13px; opacity: .9; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.board-centre { background: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 16px 14px 18px; border-left: 2px solid var(--ink); border-right: 2px solid var(--ink); }
.board-code { display: inline-flex; gap: 6px; align-items: center; flex-wrap: wrap; justify-content: center; }
.board-ko { font-size: clamp(34px, 6vw, 56px); font-weight: 700; line-height: 1.1; margin-top: 6px; letter-spacing: -.02em; }
.board-en { font-size: clamp(18px, 2.4vw, 24px); font-weight: 500; margin-top: 2px; letter-spacing: -.01em; }
.board-alt { font-size: 13px; color: var(--ink-2); margin-top: 4px; }
@media (max-width: 640px) {
  .board { grid-template-columns: 1fr 1fr; }
  .board-centre { grid-column: 1 / -1; grid-row: 1; border: 0; border-bottom: 2px solid var(--ink); }
  .board-side.left { border-right: 1px solid rgba(255,255,255,.35); }
}

/* Lead */
.lead { padding-top: 28px; }
.lead > * { max-width: 780px; }
.tagline { font-size: 22px; font-weight: 500; line-height: 1.4; margin: 0 0 12px; }
.lead p:not(.tagline) { margin: 0 0 12px; color: var(--ink); }

/* Highlights with exit badges */
.hls { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
@media (min-width: 900px) { .hls { grid-template-columns: 1fr 1fr; } }
.hl { display: flex; gap: 14px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.exit { flex-shrink: 0; width: 58px; height: 58px; border-radius: 10px; background: var(--exit); color: #111; display: flex; flex-direction: column; align-items: center; justify-content: center; font-weight: 700; font-size: 24px; line-height: 1; border: 2px solid #111; }
.exit small { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 3px; }
.exit.none { background: #eef0ec; color: var(--ink-2); font-size: 13px; border-color: var(--line); }
.hl-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.hl-name { font-weight: 700; font-size: 17px; }
.hl-meta { font-size: 13.5px; color: var(--green-deep); font-weight: 500; }
.hl-note { font-size: 15px; color: var(--ink-2); line-height: 1.5; }

.tips { padding-left: 20px; margin: 0; }
.tips li { margin: 6px 0; }
.tips li::marker { color: var(--green); }

/* Stay box */
.stay { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-top: 28px; align-self: start; }
.stay p { margin: 10px 0; }
.rating { display: inline-flex; gap: 5px; }
.pip { width: 26px; height: 8px; border-radius: 4px; background: #e2e6e1; }
.pip.on { background: var(--green); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 6px; }
.chip { font-size: 13px; font-weight: 500; padding: 4px 10px; border-radius: 999px; background: var(--green-tint); color: var(--green-deep); }

/* Tables */
.scroll { overflow-x: auto; }
.times { width: 100%; border-collapse: collapse; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; font-size: 15px; }
.times th, .times td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.times th { font-size: 13px; font-weight: 500; color: var(--ink-2); background: #f8f9f6; }
.times tr:last-child td { border-bottom: 0; }
.times .num { white-space: nowrap; font-variant-numeric: tabular-nums; font-weight: 700; }
.times td.dim { font-size: 14px; }
.times a { text-decoration: none; font-weight: 500; }
.times a:hover { color: var(--green-deep); text-decoration: underline; }
.map-small { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 6px; }

/* Guide cards */
.ggrid { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 620px) { .ggrid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { .ggrid { grid-template-columns: repeat(3, 1fr); } }
.gcard { display: flex; flex-direction: column; gap: 3px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px 18px; text-decoration: none; border-top: 5px solid var(--green); transition: transform .15s, box-shadow .15s; }
.gcard:hover { transform: translateY(-2px); box-shadow: 0 10px 24px -16px rgba(0,60,30,.5); }
.gcard-top { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.gcard-ko { margin-left: auto; font-weight: 700; color: var(--ink-2); }
.gcard-title { font-size: 21px; font-weight: 700; letter-spacing: -.015em; }
.gcard-sub { font-size: 13.5px; color: var(--ink-2); }
.gcard-tag { font-size: 15px; margin-top: 6px; color: var(--ink); line-height: 1.45; }

/* All stations list */
.list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--panel); }
@media (min-width: 760px) { .list { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1100px) { .list { grid-template-columns: 1fr 1fr 1fr; } }
.list li { border-bottom: 1px solid var(--line); }
.list a { display: flex; align-items: center; gap: 10px; padding: 10px 14px; text-decoration: none; min-height: 48px; }
.list a:hover { background: var(--green-tint); }
.list .code { width: 44px; flex-shrink: 0; }
.li-en { font-weight: 500; }
.li-ko { color: var(--ink-2); font-size: 14px; }
.li-x { display: inline-flex; gap: 3px; margin-left: auto; }
.li-x .lb { min-width: 20px; height: 20px; font-size: 10.5px; padding: 0 5px; }
.li-guide { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; background: var(--exit); color: #111; padding: 3px 7px; border-radius: 5px; }
.li-x:empty + .li-guide { margin-left: auto; }

/* Areas */
.areas { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .areas { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1100px) { .areas { grid-template-columns: repeat(3, 1fr); } }
.area { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 18px 20px; display: flex; flex-direction: column; gap: 4px; }
.area p { margin: 6px 0; }
.area .btn { margin-top: auto; align-self: flex-start; }
.area-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.area h3 { font-size: 21px; }
.area h3 a { text-decoration: none; }
.area h3 a:hover { color: var(--green-deep); }

/* Footer */
.foot { margin-top: 48px; background: var(--ink); color: #dfe6e1; padding: 32px 0 28px; }
.foot .brand-dot { background: var(--green); }
.foot-row { display: flex; flex-wrap: wrap; gap: 16px 24px; justify-content: space-between; align-items: center; }
.foot-links { display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: 15px; }
.foot-links a { text-decoration: none; color: #b9c4bd; }
.foot-links a:hover { color: #fff; }
.foot .small { color: #9aa79f; margin: 18px 0 0; max-width: 60em; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
