/* 타고버스 text pages (city index, city routes, route detail). Same tokens as tago.css. */
:root {
  color-scheme: light dark;
  --bg: #f6f7f9; --surface: #ffffff; --surface-2: #f2f4f6; --text: #191f28; --text-2: #4e5968; --text-3: #8b95a1; --line: #e5e8eb;
  --brand: #3182f6; --brand-soft: #e8f3ff; --route: #3182f6;
  font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #14161a; --surface: #1d2025; --surface-2: #262a30; --text: #f2f4f6; --text-2: #b0b8c1; --text-3: #7e8794; --line: #2f343b; --brand: #4c9bff; --brand-soft: #1d3150; }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font-size: 16px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
svg { width: 19px; height: 19px; fill: currentColor; }

.top { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px max(16px, calc((100% - 880px) / 2)); background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 8px; color: var(--text); font-weight: 800; font-size: 17px; }
.brand:hover { text-decoration: none; }
.mark { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: var(--brand); color: #fff; }
.map-link { padding: 8px 14px; border-radius: 10px; background: var(--brand); color: #fff; font-size: 14px; font-weight: 700; }
.map-link:hover { text-decoration: none; filter: brightness(1.05); }

main { max-width: 880px; margin: 0 auto; padding: 20px 16px 48px; }
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; font-size: 13px; color: var(--text-3); }
.crumbs a { color: var(--text-3); }
h1 { margin: 12px 0 8px; font-size: clamp(26px, 5vw, 34px); line-height: 1.25; letter-spacing: -.02em; }
h2 { margin: 32px 0 12px; font-size: 19px; letter-spacing: -.01em; }
h2 small { color: var(--text-3); font-weight: 600; font-size: 14px; }
.lead { color: var(--text-2); margin: 8px 0 16px; }
.cta { display: inline-block; padding: 12px 18px; border-radius: 12px; background: var(--brand); color: #fff; font-weight: 700; }
.cta:hover { text-decoration: none; filter: brightness(1.05); }

.badge { display: inline-flex; align-items: center; justify-content: center; min-width: 52px; height: 28px; padding: 0 9px; border-radius: 8px; background: var(--route); color: #fff; font-weight: 800; font-size: 14px; white-space: nowrap; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }
.grid a { display: block; padding: 12px 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); color: var(--text); font-weight: 600; }
.grid a:hover { border-color: var(--brand); text-decoration: none; }
.routes { margin: 0; padding: 0; list-style: none; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.routes li + li { border-top: 1px solid var(--line); }
.routes a { display: flex; align-items: center; gap: 12px; padding: 12px 14px; color: var(--text); }
.routes a:hover { background: var(--surface-2); text-decoration: none; }
.routes span:last-child { display: flex; flex-direction: column; min-width: 0; }
.routes strong { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.routes small { color: var(--text-3); font-size: 13px; }

.route-head { display: flex; align-items: center; gap: 10px; margin-top: 16px; }
.route-head .badge { height: 36px; font-size: 20px; padding: 0 12px; border-radius: 10px; }
.route-head .type { color: var(--route); font-weight: 700; font-size: 14px; }
.endpoints { margin: 0; font-size: 19px; font-weight: 700; }
.facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 16px 0; }
.facts div { padding: 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.facts dt { font-size: 12px; color: var(--text-3); font-weight: 600; }
.facts dd { margin: 2px 0 0; font-size: 18px; font-weight: 800; font-variant-numeric: tabular-nums; }
@media (max-width: 520px) { .facts { grid-template-columns: repeat(2, 1fr); } }

.timeline { list-style: none; margin: 0; padding: 4px 0; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; }
.timeline li { position: relative; display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 6px 16px 6px 46px; }
.timeline li::before { content: ""; position: absolute; left: 25px; top: 0; bottom: 0; width: 4px; background: var(--route); }
.timeline li:first-child::before { top: 50%; }
.timeline li:last-child::before { bottom: 50%; }
.timeline .dot { position: absolute; left: 20px; top: 50%; width: 14px; height: 14px; margin-top: -7px; border-radius: 50%; background: var(--surface); border: 3px solid var(--route); }
.timeline .stop { flex: 1; font-weight: 600; }
.timeline small { color: var(--text-3); font-variant-numeric: tabular-nums; }
.timeline li.turn { min-height: 28px; font-size: 12px; font-weight: 700; color: var(--text-3); }
.timeline li.turn::before { background: repeating-linear-gradient(var(--route) 0 4px, transparent 4px 8px); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.chips a:hover { text-decoration: none; filter: brightness(1.08); }

main section > p { color: var(--text-2); }
main section > p strong { color: var(--text); }
main ul { padding-left: 20px; color: var(--text-2); }
main li { margin: 6px 0; }
.qa h2 { margin: 28px 0 6px; font-size: 17px; }
.qa p { margin: 0; }

/* Place pages */
.kind { margin: 16px 0 0; color: var(--brand); font-weight: 700; font-size: 14px; }
.addr { margin: 0; color: var(--text-3); }
.photo { margin: 16px 0; }
.photo img { display: block; width: 100%; max-width: 640px; height: auto; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 16px; background: var(--surface-2); }
.photo figcaption, .credit { margin-top: 6px; font-size: 12px; color: var(--text-3); }
.stops { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; }
.stops li { display: grid; grid-template-columns: 1fr auto; gap: 8px 12px; align-items: center; padding: 14px 16px; }
.stops li + li { border-top: 1px solid var(--line); }
.stop-line { display: flex; flex-direction: column; min-width: 0; }
.stop-line small { color: var(--text-3); }
.stops .chips { grid-column: 1 / -1; }
.stops .live { grid-row: 1; grid-column: 2; padding: 8px 12px; border-radius: 10px; background: var(--brand-soft); font-size: 14px; font-weight: 700; white-space: nowrap; }
.stops .live:hover { text-decoration: none; filter: brightness(1.05); }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; margin: 0; padding: 0; list-style: none; }
.cards a { display: flex; gap: 12px; align-items: center; padding: 10px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); color: var(--text); }
.cards a:hover { border-color: var(--brand); text-decoration: none; }
.cards img, .cards .noimg { width: 84px; height: 56px; flex: none; border-radius: 10px; object-fit: cover; background: var(--surface-2); }
.cards span:last-child { display: flex; flex-direction: column; min-width: 0; }
.cards strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cards small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-3); font-size: 12px; }

.foot { max-width: 880px; margin: 0 auto; padding: 24px 16px 40px; border-top: 1px solid var(--line); color: var(--text-3); font-size: 13px; }
.foot p { margin: 4px 0; }
