/* =====================================================================
   Football Trip Planner — 라이트(컨시어지) / 다크(플러드라이트)
   색은 전부 아래 변수로만 지정해요. 테마 전환: <html data-theme="dark">
   ===================================================================== */
:root, [data-theme="light"] {
  color-scheme: light;
  --bg: #f7f6f2; --card: #fff; --card-2: #fbfaf7; --ink: #121614; --muted: #6c716d; --faint: #9a9e99;
  --line: #e3e1da; --line-2: #eeece6;
  --accent: #1d3a2f; --accent-ink: #fff; --accent-soft: #eef3f0; --accent-line: #c9d8cf; --accent-text: #1d3a2f;
  --warn-bg: #fbf4e6; --warn-ink: #7a4f0e; --warn-line: #ecdbb8;
  --bad: #b3362b; --bad-bg: #fbeeec; --ok: #2f6b4f; --ok-bg: #eaf3ee;
  --header: rgba(255,255,255,.92);
  --shadow: 0 1px 2px rgba(18,22,20,.04);
  --pop: 0 8px 28px rgba(18,22,20,.16);
  /* 지도 */
  --map-sea: #d6e4ec; --map-land: #f3f1ea; --map-coast: #b8c0b4; --map-park: #d6e6cc; --map-river: #a9cbe2; --map-rail: #9a9a9a;
  --map-text: #1d231f; --map-sub: #5b625d; --map-halo: #fff; --map-city: #3c4640; --map-lm: #5a4a35; --map-park-t: #4c7a3a;
  --map-st: #fff; --map-st-line: #333; --map-mk: #121614; --map-mk-ink: #fff; --map-case: #fff;
  --map-road: #ffffff; --map-road-hi: #ece6d6;
  --glass: rgba(255,255,255,.86); --glass-shadow: 0 10px 30px rgba(18,22,20,.16);
  /* 주변 장소 카테고리 */
  --place-food: #d9480f; --place-pub: #9c6b1f; --place-watch: #1971c2; --place-attraction: #7048e8; --place-shop: #c2255c; --place-popup: #0c8599; --place-etc: #6c716d;
  --place-ph: #f1efe8;
  --credit-bg: rgba(18,22,20,.58); --credit-ink: #fff;
  /* 사진 배너 위 글씨 (라이트/다크 공통으로 어두운 그늘 + 흰 글씨) */
  --banner-shade: rgba(0,0,0,.62); --banner-ink: #fff;
}
[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0d0e10; --card: #15171a; --card-2: #1c1f23; --ink: #ece8e1; --muted: #8b8984; --faint: #5f5e5a;
  --line: #2a2e33; --line-2: #22252a;
  --accent: #c9a96e; --accent-ink: #17130b; --accent-soft: rgba(201,169,110,.10); --accent-line: rgba(201,169,110,.38); --accent-text: #d7bb85;
  --warn-bg: rgba(214,160,70,.10); --warn-ink: #e2c08a; --warn-line: rgba(214,160,70,.32);
  --bad: #e0796d; --bad-bg: rgba(224,121,109,.10); --ok: #8cc5a3; --ok-bg: rgba(140,197,163,.10);
  --header: rgba(13,14,16,.9);
  --shadow: none;
  --pop: 0 10px 32px rgba(0,0,0,.55);
  --map-sea: #0f1820; --map-land: #191b1e; --map-coast: #393e44; --map-park: #1a271e; --map-river: #22445e; --map-rail: #50545a;
  --map-text: #ece8e1; --map-sub: #a19e98; --map-halo: #0d0e10; --map-city: #bdb8b0; --map-lm: #cdb88f; --map-park-t: #7fae6a;
  --map-st: #15171a; --map-st-line: #cfcac2; --map-mk: #ece8e1; --map-mk-ink: #111; --map-case: #0d0e10;
  --map-road: #26292d; --map-road-hi: #33373c;
  --glass: rgba(21,23,26,.86); --glass-shadow: 0 10px 30px rgba(0,0,0,.5);
  --place-food: #ff8a4c; --place-pub: #d7bb85; --place-watch: #74b3f0; --place-attraction: #a99af5; --place-shop: #f07aa5; --place-popup: #5cc8d4; --place-etc: #8b8984;
  --place-ph: #1c1f23;
  --credit-bg: rgba(0,0,0,.66); --credit-ink: #ece8e1;
  --banner-shade: rgba(0,0,0,.66); --banner-ink: #fff;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: 'Pretendard', system-ui, -apple-system, 'Apple SD Gothic Neo', sans-serif; background: var(--bg); color: var(--ink); font-size: 15px; line-height: 1.55; -webkit-font-smoothing: antialiased; transition: background .2s, color .2s; }
button, input, select { font: inherit; color: inherit; }
h1 { font-size: 1.85rem; font-weight: 700; letter-spacing: -.03em; line-height: 1.2; margin: 0; }
h2 { font-size: 1.15rem; font-weight: 700; letter-spacing: -.02em; margin: 0 0 .5rem; }
h3 { font-size: .98rem; font-weight: 700; margin: .1rem 0 .7rem; letter-spacing: -.01em; }
h4 { margin: .8rem 0 .4rem; font-size: .9rem; font-weight: 700; }
.muted { color: var(--muted); } .small { font-size: .82rem; }
.ic { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; vertical-align: -4px; }
.num { font-variant-numeric: tabular-nums; }

/* ---------- 헤더 ---------- */
.top { position: sticky; top: 0; z-index: 30; background: var(--header); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.top-inner { max-width: 1240px; margin: 0 auto; padding: 0 28px; height: 64px; display: flex; align-items: center; gap: 24px; }
.brand { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; flex: none; }
.brand-mark { width: 11px; height: 11px; background: var(--accent); display: inline-block; }
.brand b { display: block; font-size: 1.02rem; font-weight: 700; letter-spacing: -.02em; line-height: 1.2; }
.brand small { display: block; font-size: .72rem; color: var(--muted); letter-spacing: .02em; }
.tabs { display: flex; gap: 2px; margin: 0 auto; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { border: 0; background: transparent; color: var(--muted); padding: 8px 14px; border-radius: 4px; cursor: pointer; white-space: nowrap; font-size: .92rem; font-weight: 500; }
.tabs button:hover { color: var(--ink); }
.tabs button.active { color: var(--ink); background: var(--line-2); font-weight: 600; }
.top-actions { display: flex; align-items: center; gap: 8px; flex: none; }
.icon-btn { width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid var(--line); background: transparent; border-radius: 4px; cursor: pointer; color: var(--muted); }
.icon-btn:hover { color: var(--ink); border-color: var(--faint); }
.plan-pill { border: 0; background: var(--accent); color: var(--accent-ink); border-radius: 4px; padding: 8px 14px; cursor: pointer; white-space: nowrap; font-size: .86rem; font-weight: 500; }
.plan-pill b { font-variant-numeric: tabular-nums; }

/* ---------- 레이아웃 ---------- */
.layout { max-width: 1240px; margin: 0 auto; padding: 28px; display: grid; grid-template-columns: 288px minmax(0, 1fr); gap: 32px; align-items: start; }
main { min-width: 0; }
.side { background: var(--card); border: 1px solid var(--line); border-radius: 6px; padding: 22px; position: sticky; top: 88px; max-height: calc(100vh - 108px); overflow-y: auto; scrollbar-width: thin; }
.side-sum { display: none; }
.side-h { margin: 0 0 12px; font-size: .72rem; letter-spacing: .14em; color: var(--muted); font-weight: 600; text-transform: uppercase; }
.side hr { border: 0; border-top: 1px solid var(--line); margin: 18px 0 20px; }
.side .chips { margin-bottom: 18px; }
.side-note { font-size: .76rem; color: var(--faint); margin: 16px 0 0; line-height: 1.5; }
.settings label, .route-form label { display: flex; flex-direction: column; gap: 6px; font-size: .78rem; color: var(--muted); margin-bottom: 12px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.two.narrow-last { grid-template-columns: minmax(0, 1fr) 76px; }
.dates { display: grid; grid-template-columns: 1fr; gap: 0; }
.side { overflow-x: hidden; }
input[type=date], input[type=number], input[type=datetime-local], select { border: 1px solid var(--line); background: var(--card); border-radius: 4px; padding: 9px 11px; font-size: .92rem; color: var(--ink); width: 100%; min-width: 0; outline: none; transition: border-color .15s; }
input:focus, select:focus { border-color: var(--accent); }
label.check { flex-direction: row !important; align-items: center; gap: 8px; color: var(--ink) !important; font-size: .88rem !important; cursor: pointer; margin: 0 !important; }
label.check input { width: 16px; height: 16px; accent-color: var(--accent); margin: 0; }

.tab { display: none; } .tab.active { display: block; animation: fade .2s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(3px); } }

.card { background: var(--card); border: 1px solid var(--line); border-radius: 6px; padding: 20px; box-shadow: var(--shadow); margin-bottom: 14px; }
.page-head, .lead { display: flex; justify-content: space-between; align-items: end; gap: 16px; flex-wrap: wrap; padding-bottom: 20px; margin-bottom: 20px; border-bottom: 1px solid var(--line); }
.eyebrow { margin: 0 0 6px; font-size: .82rem; color: var(--muted); }
.stats { display: flex; gap: 28px; }
.stats div { font-size: .76rem; color: var(--muted); }
.stats b { display: block; font-size: 1.4rem; color: var(--ink); font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.lead-note { font-size: .8rem; color: var(--faint); margin: -10px 0 8px; }

/* ---------- 버튼 · 칩 ---------- */
.btn { border: 1px solid var(--line); background: var(--card); border-radius: 4px; padding: 9px 16px; cursor: pointer; font-weight: 600; font-size: .9rem; transition: background .15s, border-color .15s, color .15s; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.btn:hover { border-color: var(--faint); }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.ghost { background: transparent; }
.btn.small { padding: 6px 11px; font-size: .82rem; }
.btn.block { width: 100%; padding: 12px; }
.btn.added { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.link { background: none; border: none; padding: 0; color: var(--accent-text); cursor: pointer; font-weight: 500; text-align: left; font-size: inherit; }
.link:hover { text-decoration: underline; text-underline-offset: 3px; }
.btns { display: flex; gap: 8px; }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.filter-row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin: 14px 0; }
.filter-title { font-size: .8rem; color: var(--muted); flex: none; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { border: 1px solid var(--line); background: var(--card); color: var(--muted); border-radius: 4px; padding: 6px 10px; cursor: pointer; font-size: .84rem; transition: .15s; }
.chip:hover { color: var(--ink); border-color: var(--faint); }
.chip.on { border-color: var(--accent); color: var(--accent-text); background: var(--accent-soft); font-weight: 600; }
.chip.fav { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 6px; }
.opts { display: flex; gap: 20px; flex-wrap: wrap; margin: 4px 0 18px; }

/* ---------- 대회 표시 · 태그 ---------- */
.comp { --c: #888; display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--muted); font-size: .8rem; white-space: nowrap; }
.comp::before { content: ''; width: 8px; height: 8px; border-radius: 2px; background: var(--c); flex: none; }
[data-theme="dark"] .comp::before { box-shadow: 0 0 0 1px rgba(255,255,255,.25); }
.round { color: var(--muted); }
.hot { font-style: normal; color: var(--accent-text); font-weight: 700; }
.tag { display: inline-block; background: var(--card-2); border: 1px solid var(--line); border-radius: 3px; padding: 0 6px; font-size: .74rem; font-weight: 600; color: var(--muted); }
.tag.bad { background: var(--bad-bg); color: var(--bad); border-color: transparent; }
.tag.ok { background: var(--ok-bg); color: var(--ok); border-color: transparent; }
.vs, .v { color: var(--faint); font-size: .8rem; font-weight: 400; }

/* ---------- 경기 목록 (날짜별 일정표) ---------- */
.day { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 24px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.day:first-of-type { padding-top: 4px; }
.date { font-size: .8rem; color: var(--muted); }
.date b { display: block; font-size: 2rem; color: var(--ink); font-weight: 600; letter-spacing: -.04em; line-height: 1; margin-bottom: 6px; font-variant-numeric: tabular-nums; }
.list { display: flex; flex-direction: column; gap: 8px; }
.match { background: var(--card); border: 1px solid var(--line); border-radius: 6px; display: grid; grid-template-columns: 74px minmax(0, 1fr) 112px 104px; align-items: center; gap: 18px; padding: 15px 18px; transition: border-color .15s; }
.match:hover { border-color: var(--faint); }
.match.big { box-shadow: inset 3px 0 0 var(--accent); }
[data-theme="dark"] .match.big { background: linear-gradient(90deg, var(--accent-soft), transparent 55%), var(--card); border-color: var(--accent-line); }
.kt { font-size: 1.25rem; font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1.15; }
.kt small { display: block; font-size: .72rem; color: var(--muted); font-weight: 400; letter-spacing: 0; margin-top: 3px; white-space: nowrap; }
.kt sup { font-size: .62rem; margin-left: 1px; color: var(--accent-text); }
.who { font-size: 1rem; font-weight: 600; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; letter-spacing: -.01em; }
.who .t { display: inline-flex; align-items: center; gap: 7px; }
.sub { font-size: .8rem; color: var(--muted); margin-top: 5px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.sub .link { color: var(--muted); font-weight: 400; }
.sub .link:hover { color: var(--accent-text); }
.eta { font-size: .78rem; color: var(--muted); text-align: right; line-height: 1.35; }
.eta b { display: block; color: var(--ink); font-weight: 600; font-size: .9rem; font-variant-numeric: tabular-nums; }
.eta .sk { display: inline-block; width: 64px; height: 26px; border-radius: 3px; background: var(--line-2); animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .5; } }
.add-btn { justify-self: end; white-space: nowrap; }

/* ---------- 내 일정 ---------- */
.plan-chips { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; }
.plan-item { display: grid; grid-template-columns: 150px minmax(0, 1fr) auto 32px; gap: 16px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: 6px; padding: 12px 14px; font-size: .9rem; }
.plan-item .when { font-weight: 600; font-variant-numeric: tabular-nums; }
.plan-item .when small { display: block; font-weight: 400; }
.mini-teams { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.plan-item .x { border: 1px solid var(--line); background: transparent; border-radius: 4px; width: 32px; height: 32px; cursor: pointer; display: grid; place-items: center; color: var(--muted); }
.plan-item .x:hover { color: var(--bad); border-color: var(--bad); }
.empty-note { color: var(--muted); padding: 28px 0; }

/* ---------- 요약 ---------- */
.summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); border: 1px solid var(--line); border-radius: 6px; background: var(--card); margin-bottom: 14px; overflow: hidden; }
.stat { padding: 16px 18px; display: flex; flex-direction: column-reverse; gap: 2px; border-right: 1px solid var(--line); }
.stat:last-child { border-right: 0; }
.stat b { font-size: 1.2rem; font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat span { font-size: .76rem; color: var(--muted); }
.warn-box { background: var(--warn-bg); border-color: var(--warn-line); color: var(--warn-ink); display: flex; flex-direction: column; gap: 4px; font-size: .9rem; }
.auto-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; border-color: var(--accent-line); background: var(--accent-soft); }

/* ---------- 지도 카드 ---------- */
.map-card { padding: 10px; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: .76rem; color: var(--muted); padding: 10px 6px 2px; }
.legend i { display: inline-block; width: 14px; height: 3px; border-radius: 2px; margin-right: 5px; vertical-align: middle; }
.legend i.dash { background: repeating-linear-gradient(90deg, var(--muted) 0 6px, transparent 6px 9px); }
.legend i.dot { background: repeating-linear-gradient(90deg, var(--muted) 0 2px, transparent 2px 5px); }
.map-jump { display: flex; gap: 4px; flex-wrap: wrap; margin: 0 0 10px; }
.map-jump button { border: 1px solid var(--line); background: var(--card); color: var(--muted); border-radius: 4px; padding: 5px 11px; font-size: .8rem; cursor: pointer; }
.map-jump button:hover { color: var(--ink); border-color: var(--faint); }

/* ---------- 타임라인 (일정 계산 결과) ---------- */
.timeline { position: relative; }
.day-sep { font-weight: 700; margin: 26px 0 10px; font-size: .95rem; letter-spacing: -.01em; display: flex; align-items: center; gap: 12px; }
.day-sep::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.leg { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 10px; }
.leg-line { --m: var(--faint); width: 2px; margin: 0 auto; background: repeating-linear-gradient(var(--m) 0 6px, transparent 6px 11px); }
.timeline.single .leg { grid-template-columns: 1fr; } .timeline.single .leg-line { display: none; }
.leg-label { display: flex; align-items: center; gap: 8px; font-size: .78rem; font-weight: 600; color: var(--muted); margin-bottom: 8px; }
.leg-head { margin-bottom: 12px; font-size: .95rem; }
.arrow { color: var(--faint); margin: 0 2px; }
.rec-box { --m: var(--accent); border: 1px solid var(--line); border-left: 3px solid var(--m); border-radius: 4px; padding: 14px 16px; background: var(--card-2); }
.rec-main { display: flex; gap: 12px; align-items: center; }
.rec-icon { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; color: var(--m); background: color-mix(in srgb, var(--m) 12%, transparent); flex: none; }
.rec-icon .ic { width: 20px; height: 20px; }
.rec-title { font-weight: 700; }
.rec-sub { font-size: .84rem; color: var(--muted); display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-top: 2px; }
.leg-times { font-size: .84rem; margin-top: 10px; font-weight: 500; font-variant-numeric: tabular-nums; }
.steps { margin: 10px 0 4px; padding-left: 20px; font-size: .9rem; } .steps li { margin: 3px 0; } .steps li::marker { color: var(--faint); }
.notes { margin: 8px 0 0; padding-left: 18px; font-size: .83rem; color: var(--muted); }
.reasons { font-size: .84rem; margin-top: 8px; color: var(--ok); }
.reasons b { font-weight: 600; margin-right: 4px; }
.warn { margin-top: 10px; background: var(--warn-bg); color: var(--warn-ink); border: 1px solid var(--warn-line); border-radius: 4px; padding: 7px 11px; font-size: .86rem; display: flex; gap: 8px; align-items: flex-start; }
.warn .ic { width: 16px; height: 16px; margin-top: 2px; }
.others { margin-top: 14px; }
.others-title { font-size: .78rem; color: var(--muted); margin-bottom: 6px; }
.opt { border: 1px solid var(--line); border-radius: 4px; padding: 8px 12px; margin-bottom: 5px; }
.opt[open] { background: var(--card-2); }
.opt summary { display: grid; grid-template-columns: minmax(160px, 2fr) 1fr 1fr 1fr auto; gap: 10px; align-items: center; cursor: pointer; font-size: .87rem; list-style: none; font-variant-numeric: tabular-nums; }
.opt summary::-webkit-details-marker { display: none; }
.opt-mode { font-weight: 600; display: inline-flex; align-items: center; gap: 7px; color: var(--ink); }
.opt-mode .ic { color: var(--m); }
.stars { color: var(--accent-text); letter-spacing: 1px; font-size: .6rem; }
.tl-match { display: flex; gap: 16px; }
.tl-num { background: var(--accent); color: var(--accent-ink); font-weight: 700; border-radius: 50%; width: 30px; height: 30px; flex: none; display: grid; place-items: center; font-size: .86rem; font-variant-numeric: tabular-nums; }
.tl-main { flex: 1; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.tl-top { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: .8rem; }
.tl-teams { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 1.1rem; font-weight: 700; letter-spacing: -.02em; }
.tl-teams .t { display: inline-flex; align-items: center; gap: 8px; }
.match-meta { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; font-size: .85rem; }
.time { font-weight: 600; font-variant-numeric: tabular-nums; } .kst { color: var(--muted); font-variant-numeric: tabular-nums; }
.tip { font-size: .84rem; background: var(--card-2); border: 1px solid var(--line-2); border-radius: 4px; padding: 6px 10px; color: var(--ink); }
.nearby summary { cursor: pointer; font-weight: 600; font-size: .86rem; color: var(--accent-text); }
.nearby[open] summary { margin-bottom: 6px; }
.place-mini { font-size: .86rem; padding: 6px 0; border-bottom: 1px solid var(--line-2); display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.cat { font-size: .72rem; color: var(--muted); border: 1px solid var(--line); border-radius: 3px; padding: 0 5px; white-space: nowrap; }
.walk { background: var(--line-2); border-radius: 3px; padding: 0 6px; font-size: .74rem; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }

/* ---------- 구장 ---------- */
.stadium-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; margin-bottom: 14px; }
.city-block { background: var(--card); border: 1px solid var(--line); border-radius: 6px; padding: 12px; display: flex; flex-direction: column; gap: 6px; }
.city-name { font-size: .72rem; letter-spacing: .12em; color: var(--muted); font-weight: 600; margin: 0 0 2px 2px; }
.stadium-btn { text-align: left; border: 1px solid transparent; background: transparent; border-radius: 4px; padding: 7px 8px; cursor: pointer; display: flex; align-items: center; gap: 10px; }
.stadium-btn:hover { background: var(--card-2); border-color: var(--line); }
.stadium-btn.on { background: var(--accent-soft); border-color: var(--accent-line); }
.sb-txt { display: flex; flex-direction: column; line-height: 1.3; } .sb-txt b { font-size: .88rem; font-weight: 600; } .sb-txt span { font-size: .76rem; color: var(--muted); }
.stadium-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.stadium-head h2 { font-size: 1.5rem; margin: 2px 0; letter-spacing: -.03em; }
.sh-left { display: flex; align-items: center; gap: 18px; }
.sh-photo { position: relative; flex: none; width: 128px; height: 88px; border-radius: 4px; overflow: hidden; display: grid; place-items: center; background: var(--card-2); border: 1px solid var(--line); }
.sh-photo img { width: 100%; height: 100%; object-fit: cover; }
.sh-photo img + .badge { position: absolute; right: 4px; bottom: 4px; }
.svc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 10px; }
.svc { background: var(--card-2); border: 1px solid var(--line-2); border-radius: 4px; padding: 12px 14px; font-size: .9rem; } .svc ul { margin: 0; padding-left: 18px; }
.svc-t { font-weight: 700; margin-bottom: 4px; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; } .two-col .card { margin-bottom: 0; } .two-col + .card { margin-top: 14px; }
.station { padding: 7px 0; border-bottom: 1px solid var(--line-2); font-size: .9rem; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.lines i { font-style: normal; background: var(--card-2); border: 1px solid var(--line); color: var(--muted); border-radius: 3px; padding: 0 5px; font-size: .72rem; margin-right: 3px; }
.place-group h4 { font-size: .72rem; letter-spacing: .12em; color: var(--muted); font-weight: 600; margin-top: 18px; }
.place { padding: 9px 0; border-bottom: 1px solid var(--line-2); font-size: .9rem; } .place-name { font-weight: 600; display: flex; gap: 8px; align-items: center; }
.pub-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.pub-col h4 { margin-top: 0; }
.pub { border: 1px solid var(--line); border-radius: 4px; padding: 10px 12px; margin-bottom: 8px; font-size: .9rem; background: var(--card-2); }
.pub-h { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 2px; }
.pub-line { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: .82rem; }
.pub-t { font-weight: 600; color: var(--muted); margin-right: 2px; } .pub-t.sub { margin-left: 8px; }
.pub-chip { background: var(--card-2); border: 1px solid var(--line); border-radius: 3px; padding: 1px 8px; }
.pub-chip i { font-style: normal; color: var(--muted); font-size: .72rem; margin-left: 5px; }
.hint-box { background: var(--card-2); padding: 12px 16px; display: flex; flex-direction: column; gap: 6px; }
.hint-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: .88rem; }

/* ---------- 경로 폼 ---------- */
.route-form { display: flex; gap: 12px; flex-wrap: wrap; align-items: end; }
.route-form label { flex: 1 1 200px; margin-bottom: 0; }
.route-form label.check { flex: 0 1 auto; padding-bottom: 10px; }
.swap { padding: 9px 11px; }

/* ---------- 상태 ---------- */
.loading { padding: 48px; text-align: center; color: var(--muted); font-size: .9rem; }
.loading span { display: inline-block; width: 14px; height: 14px; border: 2px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; margin-right: 10px; vertical-align: -2px; }
@keyframes spin { to { transform: rotate(360deg); } }
.empty, .error { text-align: center; padding: 36px; } .error { color: var(--bad); }
#toast { position: fixed; bottom: 24px; left: 50%; transform: translate(-50%, 30px); opacity: 0; background: var(--ink); color: var(--bg); padding: 10px 18px; border-radius: 4px; font-size: .88rem; transition: .25s; pointer-events: none; z-index: 50; }
#toast.show { opacity: 1; transform: translate(-50%, 0); }
.foot { max-width: 1240px; margin: 0 auto; padding: 8px 28px 40px; color: var(--faint); font-size: .74rem; }

/* ---------- 구단 배지 (SVG 방패) ---------- */
.badge { display: inline-block; flex: none; vertical-align: middle; width: 30px; height: 34px; overflow: visible; }
.badge.xs { width: 16px; height: 18px; } .badge.sm { width: 21px; height: 24px; } .badge.lg { width: 40px; height: 45px; } .badge.xl { width: 60px; height: 68px; }
.badge path { stroke-width: 2; } .badge text { font-weight: 800; font-size: 11px; text-anchor: middle; font-family: inherit; letter-spacing: -.3px; }
.badge-img { display: inline-grid; place-items: center; } .badge-img img { width: 100%; height: 100%; object-fit: contain; display: block; }

/* ---------- 확대 지도 ---------- */
.map-host { position: relative; width: 100%; aspect-ratio: 16 / 10; max-height: 560px; border-radius: 4px; overflow: hidden; background: var(--map-sea); touch-action: none; user-select: none; }
.map-host.tall { aspect-ratio: 4 / 3; max-height: 640px; }
.map-svg { width: 100%; height: auto; display: block; }
.map-host .map-svg { width: 100%; height: 100%; display: block; cursor: grab; }
.map-host .map-svg:active { cursor: grabbing; }
.map-ctrl { position: absolute; right: 10px; top: 10px; display: flex; flex-direction: column; gap: 4px; }
.map-ctrl button { width: 32px; height: 32px; border-radius: 4px; border: 1px solid var(--line); background: var(--card); color: var(--ink); font-size: 16px; cursor: pointer; box-shadow: var(--pop); }
.map-hint { position: absolute; left: 10px; top: 10px; background: var(--card); border: 1px solid var(--line); border-radius: 3px; padding: 2px 8px; font-size: .72rem; color: var(--muted); pointer-events: none; opacity: .92; }
.map-scale { position: absolute; left: 10px; bottom: 8px; font-size: .7rem; color: var(--map-text); background: var(--card); opacity: .9; padding: 1px 6px 2px; border-radius: 3px; pointer-events: none; }
.map-scale i { display: block; height: 4px; border: 2px solid var(--map-text); border-top: none; margin-bottom: 1px; }
.m-sea { fill: var(--map-sea); }
.m-land { fill: var(--map-land); stroke: var(--map-coast); stroke-width: 1px; vector-effect: non-scaling-stroke; }
.m-park { fill: var(--map-park); stroke: none; }
.m-river { fill: none; stroke: var(--map-river); stroke-linecap: round; stroke-linejoin: round; }
.m-rail { fill: none; stroke: var(--map-rail); stroke-width: 1.2px; stroke-dasharray: 5 3; vector-effect: non-scaling-stroke; }
.m-transit { fill: none; stroke-width: 3px; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; opacity: .7; }
.m-seg-case { fill: none; stroke: var(--map-case); stroke-width: 8px; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.m-seg-line { fill: none; stroke-width: 4.5px; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
svg[data-lod="1"] .l2, svg[data-lod="1"] .l3, svg[data-lod="2"] .l3 { display: none; }
svg[data-lod="1"] .m-transit { display: none; }
svg[data-lod="3"] .m-rail { opacity: .5; }
.m-city-dot { fill: var(--map-city); stroke: var(--map-halo); stroke-width: 1.5; }
.m-city { font-size: 12px; font-weight: 600; fill: var(--map-city); text-anchor: middle; paint-order: stroke; stroke: var(--map-halo); stroke-width: 3px; }
.m-city.r1 { font-size: 14px; font-weight: 800; fill: var(--map-text); }
.m-lm-i { fill: var(--map-lm); stroke: var(--map-halo); stroke-width: 1.5px; paint-order: stroke; transform-box: fill-box; transform-origin: center; transition: transform .15s; }
.m-lm-t { font-size: 10.5px; font-weight: 500; fill: var(--map-lm); text-anchor: middle; paint-order: stroke; stroke: var(--map-halo); stroke-width: 3px; }
.m-park-t { font-size: 10px; fill: var(--map-park-t); font-style: italic; text-anchor: middle; paint-order: stroke; stroke: var(--map-halo); stroke-width: 2px; }
.m-st { fill: var(--map-st); stroke: var(--map-st-line); stroke-width: 1.6; } .m-st.big { stroke-width: 2.5; }
.m-st-t { font-size: 9.5px; fill: var(--map-text); paint-order: stroke; stroke: var(--map-halo); stroke-width: 2.5px; }
.m-mk { cursor: default; } .m-mk.pick { cursor: pointer; }
.m-mk.pick:hover .m-badge { filter: brightness(1.1); stroke-width: 3; }
.m-badge { stroke-width: 2; filter: drop-shadow(0 1px 2px rgba(0,0,0,.35)); }
.m-mk.active .m-badge { stroke: var(--accent) !important; stroke-width: 3.5; }
.m-mk-code { font-size: 9px; font-weight: 800; text-anchor: middle; }
.m-base-mk { fill: var(--map-mk); stroke: var(--map-halo); stroke-width: 2; }
.m-base-t { fill: var(--map-mk-ink); }
.m-order { fill: var(--map-mk); stroke: var(--map-halo); stroke-width: 1.5; } .m-order-t { font-size: 9px; font-weight: 800; fill: var(--map-mk-ink); text-anchor: middle; }
.m-mk-t { font-size: 12px; font-weight: 700; fill: var(--map-text); text-anchor: middle; paint-order: stroke; stroke: var(--map-halo); stroke-width: 3.5px; }
.m-mk-s { font-size: 10px; font-weight: 500; fill: var(--map-sub); text-anchor: middle; paint-order: stroke; stroke: var(--map-halo); stroke-width: 3px; }
.m-pt { pointer-events: none; }
.m-more rect { fill: var(--map-mk); } .m-more text { fill: var(--map-mk-ink); font-size: 9.5px; font-weight: 700; text-anchor: middle; }
.m-logo-bg { fill: #fff; stroke: rgba(0,0,0,.25); stroke-width: 1; filter: drop-shadow(0 1px 2px rgba(0,0,0,.3)); }
.m-seg.dim { opacity: .12; }
.m-legmk { cursor: pointer; } .m-legmk.dim { opacity: .2; }
.m-legmk-bg { stroke: var(--map-halo); stroke-width: 2; filter: drop-shadow(0 1px 2px rgba(0,0,0,.35)); }
.m-legmk-n { fill: #fff; font-size: 12px; font-weight: 800; text-anchor: middle; }
.m-legmk-ic { fill: #fff; }
.m-legmk-i { fill: none; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.m-legmk:hover .m-legmk-bg { stroke: var(--map-text); }
.m-pt.has-tip { pointer-events: all; cursor: pointer; }
.m-pt.has-tip:hover .m-lm-i { transform: scale(1.6); }
.map-tip { position: absolute; z-index: 5; width: 260px; background: var(--card); color: var(--ink); border: 1px solid var(--line); border-radius: 6px; box-shadow: var(--pop); overflow: hidden; pointer-events: none; animation: fade .12s ease; }
.tip-img { height: 130px; background: var(--card-2); display: grid; place-items: center; overflow: hidden; }
.tip-img img { width: 100%; height: 100%; object-fit: cover; }
.tip-icon { display: grid; place-items: center; color: var(--muted); }
.tip-body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 2px; }
.tip-body b { font-size: .95rem; } .tip-sub { font-size: .78rem; color: var(--accent-text); font-weight: 600; }
.tip-desc { font-size: .8rem; color: var(--muted); line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.tip-desc:not(.nowiki):empty::after { content: '사진·설명은 직접 실행하면 위키백과에서 불러와요'; color: var(--faint); }

/* 일정 지도의 이동 구간 목록 */
.leg-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 6px; padding: 10px 2px 2px; }
.leg-chip { --c: #333; display: flex; align-items: center; gap: 9px; text-align: left; border: 1px solid var(--line); border-left: 3px solid var(--c); background: var(--card); border-radius: 4px; padding: 7px 10px; cursor: pointer; transition: opacity .15s; }
.leg-list.has-on .leg-chip:not(.on) { opacity: .4; }
.leg-chip.on { background: color-mix(in srgb, var(--c) 10%, var(--card)); box-shadow: 0 0 0 1px var(--c) inset; }
.leg-num { --c: #333; display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--c); color: #fff; font-weight: 700; font-size: .78rem; flex: none; font-variant-numeric: tabular-nums; }
.leg-ic { flex: none; color: var(--muted); display: inline-flex; }
.lc-txt { display: flex; flex-direction: column; min-width: 0; font-size: .8rem; line-height: 1.35; }
.lc-txt b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; } .lc-txt span { color: var(--muted); }

/* ---------- 좁은 화면 ---------- */
@media (max-width: 960px) {
  .top-inner { height: auto; padding: 10px 16px 0; flex-wrap: wrap; gap: 8px 12px; }
  .brand { order: 1; } .top-actions { order: 2; margin-left: auto; }
  .tabs { order: 3; width: calc(100% + 32px); margin: 0 -16px; padding: 4px 12px 8px; }
  .layout { grid-template-columns: 1fr; padding: 16px; gap: 20px; }
  .side { position: static; max-height: none; padding: 0; }
  .side-box { padding: 0 18px; }
  .side-box[open] { padding-bottom: 18px; }
  .side-sum { display: flex; align-items: center; gap: 10px; padding: 14px 0; cursor: pointer; list-style: none; font-size: .88rem; }
  .side-sum::-webkit-details-marker { display: none; }
  .side-sum-t { font-weight: 600; flex: none; }
  #side-sum-text { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; }
  .side-sum::after { content: '변경'; color: var(--accent-text); font-size: .8rem; font-weight: 600; flex: none; }
  .side-box[open] .side-sum::after { content: '접기'; }
  .side-box[open] .side-sum { border-bottom: 1px solid var(--line); margin-bottom: 16px; }
  .settings .side-h:first-child { display: none; }
  .foot { padding: 8px 16px 32px; }
}
@media (max-width: 700px) {
  h1 { font-size: 1.45rem; }
  .brand small { display: none; }
  .plan-pill { padding: 7px 10px; }
  .stats { gap: 18px; } .stats b { font-size: 1.15rem; }
  .day { grid-template-columns: 1fr; gap: 10px; padding: 18px 0; }
  .date { display: flex; align-items: baseline; gap: 8px; } .date b { font-size: 1.4rem; display: inline; margin: 0; }
  .match { grid-template-columns: 58px minmax(0, 1fr); gap: 8px 14px; padding: 14px; }
  .kt { font-size: 1.05rem; }
  .eta { grid-column: 2; text-align: left; display: flex; gap: 6px; align-items: baseline; }
  .eta b { display: inline; }
  .add-btn { grid-column: 2; justify-self: start; }
  .plan-item { grid-template-columns: 1fr 32px; } .plan-item .when { grid-column: 1; } .plan-item .x { grid-row: 1; grid-column: 2; }
  .two-col { grid-template-columns: 1fr; }
  .opt summary { grid-template-columns: 1fr auto auto; } .opt summary .stars { display: none; }
  .stat { border-right: 0; border-bottom: 1px solid var(--line); }
  .tl-match { gap: 12px; } .card { padding: 16px; }
  .sh-photo { width: 96px; height: 68px; }
}

/* ---------- 구글 지도 엔진 (gmap.js) ---------- */
.mapbox.gmap { touch-action: auto; user-select: auto; }
.gmap-canvas { position: absolute; inset: 0; background: var(--map-sea); }
.map-loading { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); font-size: .84rem; pointer-events: none; }
.gm-mk { position: absolute; width: 0; height: 0; }
.gm-mk svg { position: absolute; overflow: visible; display: block; }
.gm-mk .m-mk.pick, .gm-leg { cursor: pointer; }
.gm-mk:hover { z-index: 50 !important; }

/* 주변 장소 점 (지도) */
.m-place { stroke: var(--map-halo); stroke-width: 2; fill: var(--place-etc); filter: drop-shadow(0 1px 1.5px rgba(0,0,0,.3)); }
.m-place.c-food, .cat-dot.c-food { fill: var(--place-food); background: var(--place-food); }
.m-place.c-pub, .cat-dot.c-pub { fill: var(--place-pub); background: var(--place-pub); }
.m-place.c-watch, .cat-dot.c-watch { fill: var(--place-watch); background: var(--place-watch); }
.m-place.c-attraction, .cat-dot.c-attraction { fill: var(--place-attraction); background: var(--place-attraction); }
.m-place.c-shop, .cat-dot.c-shop { fill: var(--place-shop); background: var(--place-shop); }
.m-place.c-popup, .cat-dot.c-popup { fill: var(--place-popup); background: var(--place-popup); }
.m-mk.k-place { cursor: pointer; }
.m-mk.k-place:hover .m-place { stroke: var(--map-text); }
.m-mk-t.sm { font-size: 10.5px; font-weight: 600; stroke-width: 3px; }
.legend i.cat-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--place-etc); }
.tip-img.compact { height: 64px; color: var(--muted); }
.tip-img.compact .ic { width: 26px; height: 26px; }
.tip-img .tip-icon .ic { width: 40px; height: 40px; }
.tip-desc.nowiki:empty { display: none; }
.near-h { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin: 6px 6px 10px; }
.map-host.near { aspect-ratio: 16 / 9; max-height: 420px; }

/* 주변 장소 카드 (사진 · 거리 · 구글맵 링크) */
.pcard { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 12px; border: 1px solid var(--line); border-radius: 4px; padding: 10px; margin-bottom: 8px; font-size: .9rem; background: var(--card-2); }
.pcard-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 0 12px; }
.pc-photo { position: relative; width: 92px; height: 72px; border-radius: 4px; overflow: hidden; background: var(--place-ph); border: 1px solid var(--line-2); }
.pc-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* 사진 촬영자 표기 (모서리 작은 캡션) */
.pc-credit { position: absolute; right: 0; bottom: 0; max-width: 100%; padding: 1px 4px; font-size: .58rem; line-height: 1.3; color: var(--credit-ink); background: var(--credit-bg); border-top-left-radius: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: none; }
.pc-ph { position: absolute; inset: 0; display: grid; place-items: center; color: var(--place-etc); }
.pc-ph .ic { width: 26px; height: 26px; stroke-width: 1.5; }
.pc-ph.c-food { color: var(--place-food); } .pc-ph.c-pub { color: var(--place-pub); } .pc-ph.c-watch { color: var(--place-watch); }
.pc-ph.c-attraction { color: var(--place-attraction); } .pc-ph.c-shop { color: var(--place-shop); } .pc-ph.c-popup { color: var(--place-popup); }
.pc-body { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.pc-body .tip { margin-top: 3px; }
.pc-h { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pc-h .walk:empty { display: none; }
.pc-link { align-self: flex-start; display: inline-flex; align-items: center; gap: 5px; margin-top: 4px; font-size: .8rem; font-weight: 600; color: var(--accent-text); text-decoration: none; }
.pc-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.pc-link .ic { width: 14px; height: 14px; vertical-align: 0; }

/* 이동 구간 길찾기 버튼 */
.rec-actions { margin-top: 10px; display: flex; gap: 8px; flex-wrap: wrap; }
a.btn { text-decoration: none; color: var(--ink); }
.dir-btn .ic { width: 15px; height: 15px; vertical-align: 0; }

/* 일정 지도: 선택한 구간 글래스 카드 (디자인 시안 C) */
.map-stage { position: relative; }
.leg-glass { --c: var(--accent); position: absolute; left: 12px; bottom: 30px; z-index: 6; width: 320px; max-height: calc(100% - 60px); overflow-y: auto; background: var(--glass); backdrop-filter: blur(14px) saturate(1.3); -webkit-backdrop-filter: blur(14px) saturate(1.3); border: 1px solid var(--line); border-top: 3px solid var(--c); border-radius: 12px; padding: 14px 16px; box-shadow: var(--glass-shadow); animation: fade .15s ease; scrollbar-width: thin; }
.leg-glass[hidden] { display: none; }
.leg-glass .k { display: flex; align-items: center; gap: 8px; font-size: .74rem; color: var(--muted); letter-spacing: .02em; padding-right: 28px; }
.leg-glass .k .leg-num { min-width: 20px; height: 20px; font-size: .72rem; }
.leg-glass h4 { margin: 6px 0 10px; font-size: 1rem; letter-spacing: -.02em; line-height: 1.35; }
.leg-glass .big { display: flex; align-items: center; gap: 10px; }
.leg-glass .big .ico { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; flex: none; background: color-mix(in srgb, var(--c) 14%, transparent); color: var(--c); }
.leg-glass .big .ico .ic { width: 20px; height: 20px; }
.leg-glass .big b { font-size: 1.3rem; letter-spacing: -.02em; display: block; line-height: 1.2; font-variant-numeric: tabular-nums; }
.leg-glass .big span { font-size: .78rem; color: var(--muted); }
.leg-glass ol { margin: 12px 0 0; padding-left: 18px; font-size: .82rem; color: var(--ink); } .leg-glass li { margin: 2px 0; } .leg-glass li::marker { color: var(--faint); }
.lg-foot { margin-top: 12px; }
.lg-x { position: absolute; right: 8px; top: 8px; width: 28px; height: 28px; border: 1px solid var(--line); border-radius: 50%; background: var(--card); color: var(--muted); cursor: pointer; display: grid; place-items: center; }
.lg-x:hover { color: var(--ink); border-color: var(--faint); }
.lg-x .ic { width: 14px; height: 14px; }

/* 내 일정 내보내기 */
.export-bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 6px; background: var(--card); }
.export-bar .btns { flex-wrap: wrap; }
.export-bar .ic { width: 15px; height: 15px; vertical-align: 0; }

@media (max-width: 700px) {
  .leg-glass { position: static; width: auto; max-height: none; margin: 0; border-radius: 0 0 6px 6px; border-width: 3px 0 0; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; background: var(--card-2); }
  .pcard { grid-template-columns: 72px minmax(0, 1fr); }
  .pc-photo { width: 72px; height: 60px; }
  .pcard-grid { grid-template-columns: 1fr; }
}

/* ---------- 일정 타임라인: 구장 사진 배너 ---------- */
.tl-match { --pad: 20px; flex-wrap: wrap; row-gap: 14px; }
.tl-banner { --club: var(--accent); position: relative; flex: 0 0 calc(100% + 2 * var(--pad)); height: 150px; margin: calc(-1 * var(--pad)) calc(-1 * var(--pad)) 0; border-radius: 5px 5px 0 0; overflow: hidden;
  background: linear-gradient(110deg, var(--club) 0%, color-mix(in srgb, var(--club) 40%, transparent) 55%, transparent 100%), var(--card-2); }
.tl-banner::after { content: ''; position: absolute; inset: 0; z-index: 1; background: linear-gradient(to top, var(--banner-shade), transparent 62%); pointer-events: none; }
.tb-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .3s ease; }
.tl-banner.loaded .tb-img { opacity: 1; }
.tb-badge { position: absolute; right: 22px; top: 50%; transform: translateY(-50%); opacity: .95; transition: opacity .3s; }
.tb-badge .badge { width: 84px; height: 95px; }
.tl-banner.loaded .tb-badge { opacity: 0; }
.tb-cap { position: absolute; left: 16px; bottom: 12px; right: 90px; z-index: 2; color: var(--banner-ink); display: flex; flex-direction: column; line-height: 1.25; text-shadow: 0 1px 3px var(--banner-shade); }
.tb-cap b { font-size: 1.05rem; font-weight: 700; letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tb-cap span { font-size: .78rem; opacity: .9; }
.tb-src { position: absolute; right: 6px; bottom: 5px; z-index: 2; font-size: .6rem; color: var(--credit-ink); background: var(--credit-bg); padding: 0 5px; border-radius: 3px; text-decoration: none; opacity: 0; pointer-events: none; transition: opacity .3s; }
.tl-banner.loaded .tb-src { opacity: .85; pointer-events: auto; }
.tl-banner.loaded .tb-src:hover { opacity: 1; text-decoration: underline; }

/* ---------- 경기 없는 날 제안 ---------- */
.freeday { margin: 22px 0 6px; padding: 14px 0 4px; border-top: 1px dashed var(--line); min-width: 0; }
.freeday[hidden] { display: none; }
.fd-head { display: flex; gap: 10px; align-items: center; margin-bottom: 10px; }
.fd-head b { display: block; font-size: .95rem; letter-spacing: -.01em; }
.fd-head span { font-size: .82rem; color: var(--muted); }
.fd-ic { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--accent-soft); color: var(--accent-text); }
.fd-scroll { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x proximity; padding-bottom: 8px; scrollbar-width: thin; overscroll-behavior-x: contain; }
.fd-card { flex: 0 0 210px; scroll-snap-align: start; border: 1px solid var(--line); border-radius: 6px; background: var(--card); overflow: hidden; display: flex; flex-direction: column; }
.fd-card .pc-photo { width: 100%; height: 108px; border: 0; border-radius: 0; border-bottom: 1px solid var(--line-2); }
.fd-body { padding: 9px 11px 11px; display: flex; flex-direction: column; gap: 2px; min-width: 0; font-size: .86rem; }
.fd-body b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fd-cat { font-size: .72rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fd-cat.c-food { color: var(--place-food); } .fd-cat.c-attraction { color: var(--place-attraction); } .fd-cat.c-shop { color: var(--place-shop); } .fd-cat.c-popup { color: var(--place-popup); }
.fd-desc { color: var(--muted); font-size: .8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- 날씨 준비 칩 ---------- */
.wx-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin: -4px 0 14px; font-size: .82rem; }
.wx-t { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--muted); margin-right: 2px; }
.wx-t .ic { width: 16px; height: 16px; vertical-align: 0; }
.wx-chip { display: inline-flex; align-items: center; gap: 4px; flex-wrap: wrap; background: var(--card); border: 1px solid var(--line); border-radius: 4px; padding: 4px 9px; font-variant-numeric: tabular-nums; }
.wx-chip b { font-weight: 600; }
.wx-chip .tag { margin-left: 4px; }
.tag.wx-cold { background: var(--accent-soft); color: var(--accent-text); border-color: var(--accent-line); }
.tag.wx-rain { background: var(--warn-bg); color: var(--warn-ink); border-color: var(--warn-line); }
.wx-note { font-size: .72rem; color: var(--faint); }

.print-only { display: none; }

@media (max-width: 700px) {
  .tl-match { --pad: 16px; }
  .tl-banner { height: 128px; }
  .tb-badge .badge { width: 64px; height: 72px; }
  .tb-badge { right: 14px; }
  .tb-cap { right: 70px; left: 12px; }
  .fd-card { flex-basis: 172px; }
  .fd-card .pc-photo { width: 100%; height: 92px; }
}

/* ---------- 인쇄 / PDF 저장 ---------- */
@media print {
  :root, [data-theme="light"], [data-theme="dark"] {
    color-scheme: light;
    --bg: #fff; --card: #fff; --card-2: #fff; --ink: #000; --muted: #444; --faint: #666; --line: #ccc; --line-2: #ddd;
    --accent: #1d3a2f; --accent-ink: #fff; --accent-soft: #eef3f0; --accent-line: #c9d8cf; --accent-text: #1d3a2f;
    --warn-bg: #fff; --warn-ink: #5a3a0a; --warn-line: #ccc; --ok: #1f5a3f; --ok-bg: #fff; --bad: #a02a20; --bad-bg: #fff;
    --shadow: none; --place-ph: #f1efe8;
    /* 다크 모드로 인쇄해도 지도(SVG)·장소 카테고리 색은 라이트 값으로 */
    --map-sea: #d6e4ec; --map-land: #f3f1ea; --map-coast: #b8c0b4; --map-park: #d6e6cc; --map-river: #a9cbe2; --map-rail: #9a9a9a;
    --map-text: #1d231f; --map-sub: #5b625d; --map-halo: #fff; --map-city: #3c4640; --map-lm: #5a4a35; --map-park-t: #4c7a3a;
    --map-st: #fff; --map-st-line: #333; --map-mk: #121614; --map-mk-ink: #fff; --map-case: #fff;
    --map-road: #ffffff; --map-road-hi: #ece6d6;
    --place-food: #d9480f; --place-pub: #9c6b1f; --place-watch: #1971c2; --place-attraction: #7048e8; --place-shop: #c2255c; --place-popup: #0c8599; --place-etc: #6c716d;
  }
  @page { margin: 14mm 12mm; }
  body { background: #fff; color: #000; font-size: 12px; }
  .top, .side, .tabs, .foot, #toast, .btn, .btns, .export-bar, #plan-list, .map-ctrl, .map-jump, .leg-glass, .leg-list, .others, .pc-link, .tb-src, .freeday[hidden] { display: none !important; }
  .layout { display: block; padding: 0; max-width: none; }
  .page-head { padding-bottom: 8px; margin-bottom: 10px; }
  .tab.active { animation: none; }
  .print-only { display: block; }
  .print-head { border-bottom: 1px solid #000; padding: 0 0 8px; margin-bottom: 12px; }
  .print-head b { display: block; font-size: 15px; }
  .print-head span { font-size: 11px; }
  .card, .summary, .wx-chip, .fd-card { box-shadow: none; }
  .tl-match, .leg, .leg-body, .day-sep, .fd-card, .summary, .wx-bar, .map-card { break-inside: avoid; page-break-inside: avoid; }
  .day-sep { break-after: avoid; page-break-after: avoid; }
  .tl-banner, .tl-num, .leg-num, .comp::before, .badge, .tag, .pc-ph, .fd-ic { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .tl-banner { height: 84px; }
  .tb-badge .badge { width: 52px; height: 59px; }
  .fd-scroll { flex-wrap: wrap; overflow: visible; }
  .fd-card { flex: 0 0 160px; }
  .fd-card .pc-photo { height: 70px; }
  .map-host { max-height: 360px; }
  a { color: inherit; text-decoration: none; }
}

/* ===== 일정 지도: 경로 레일 (전체 보기 · 구간 집중 · 재생) ===== */
.itin-stage .map-host { aspect-ratio: auto; height: 620px; max-height: none; }
.route-rail { position: absolute; left: 12px; top: 12px; bottom: 12px; z-index: 6; width: 340px; display: flex; flex-direction: column; background: var(--glass); backdrop-filter: blur(14px) saturate(1.3); -webkit-backdrop-filter: blur(14px) saturate(1.3); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--glass-shadow); overflow: hidden; }
.rr-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; padding: 14px 14px 0; }
.rr-head h3 { margin: 0; font-size: .95rem; letter-spacing: -.02em; }
.rr-head span { display: block; font-size: .74rem; color: var(--muted); margin-top: 2px; }
.rr-play { display: inline-flex; align-items: center; gap: 6px; flex: none; border: 0; border-radius: 999px; padding: 7px 13px 7px 10px; background: var(--accent); color: var(--accent-ink); font-size: .78rem; font-weight: 700; cursor: pointer; }
.rr-play .ic { width: 14px; height: 14px; }
.rr-play[disabled] { opacity: .4; cursor: default; }
.rr-prog { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 3px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.rr-prog i { height: 4px; border-radius: 2px; background: var(--line); position: relative; overflow: hidden; }
.rr-prog i::after { content: ''; position: absolute; inset: 0; background: var(--c); transform: scaleX(0); transform-origin: left; }
.rr-prog i.all::after, .rr-prog i.done::after, .rr-prog i.sel::after { transform: scaleX(1); }
.rr-prog i.cur::after { animation: rr-fill 2.2s linear forwards; }
@keyframes rr-fill { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.rr-list { flex: 1; overflow-y: auto; padding: 12px 12px 6px; scrollbar-width: thin; }
.rr-stop { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 10px; align-items: center; }
.rr-stop .dot { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--card); border: 2px solid var(--line); font-size: .7rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.rr-stop.on .dot { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.rr-stop b { display: block; font-size: .84rem; letter-spacing: -.01em; line-height: 1.3; }
.rr-stop span { display: block; font-size: .72rem; color: var(--muted); }
.rr-leg { --c: var(--accent); display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 10px; }
.rr-leg .bar { width: 3px; margin: 0 auto; border-radius: 2px; background: var(--c); opacity: .5; min-height: 42px; transition: opacity .2s; }
.rr-leg.on .bar { opacity: 1; width: 4px; }
.rr-leg.off .bar { opacity: .18; }
.rr-leg .body { width: 100%; margin: 4px 0; padding: 7px 10px; border-radius: 8px; border: 1px solid transparent; background: none; display: flex; align-items: center; gap: 9px; font-size: .78rem; color: var(--muted); cursor: pointer; text-align: left; }
.rr-leg .body .ic { color: var(--c); }
.rr-leg .body b { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.rr-leg .body:hover { border-color: var(--line); background: var(--card); }
.rr-leg.on .body { border-color: var(--c); background: color-mix(in srgb, var(--c) 10%, var(--card)); color: var(--ink); }
.rr-detail { margin: 2px 0 10px; font-size: .78rem; }
.rr-route { font-weight: 600; font-size: .82rem; margin-bottom: 2px; }
.rr-detail ol { margin: 8px 0 0; padding-left: 16px; } .rr-detail li { margin: 2px 0; } .rr-detail li::marker { color: var(--faint); }
.rr-ok { margin-top: 8px; color: var(--ok); font-weight: 600; }
.rr-warn { margin-top: 8px; color: var(--bad); font-weight: 600; }
.rr-alt { margin-top: 4px; color: var(--muted); }
.rr-detail .dir-btn { margin-top: 10px; }
.rr-foot { display: flex; justify-content: space-between; gap: 10px; padding: 10px 14px; border-top: 1px solid var(--line); font-size: .74rem; color: var(--muted); }
.rr-foot button { border: 0; background: none; padding: 0; color: var(--accent-text); font-weight: 700; cursor: pointer; font-size: .74rem; }

/* 구글 지도 위 표시: 구간 칩 · 지나는 역 · 도착 경기 카드 · 재생 머리 */
.gm-chip { --c: #333; position: absolute; transform: translate(-50%, -50%); display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px 3px 3px; border-radius: 999px; background: var(--card); color: var(--ink); border: 2px solid var(--c); box-shadow: 0 2px 8px rgba(0,0,0,.22); font-size: 11.5px; font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.gm-chip i { width: 18px; height: 18px; border-radius: 50%; background: var(--c); color: #fff; display: grid; place-items: center; font-style: normal; font-size: 10px; }
.gm-chip .ic { width: 14px; height: 14px; color: var(--c); }
.gm-chip:hover { transform: translate(-50%, -50%) scale(1.08); }
.gm-mk.dim { opacity: .4; transition: opacity .2s; }
.gm-stop { z-index: 25; }
.gm-stop i { position: absolute; left: -5px; top: -5px; width: 10px; height: 10px; border-radius: 50%; background: var(--card); border: 2.5px solid var(--ink); box-sizing: border-box; }
.gm-stop span { position: absolute; left: 9px; top: -8px; white-space: nowrap; font-size: 11.5px; font-weight: 600; color: var(--ink); text-shadow: 0 0 3px var(--card), 0 0 3px var(--card), 0 0 3px var(--card), 0 0 3px var(--card); }
.gm-dest { z-index: 45; }
.gm-card { position: absolute; left: 0; bottom: 22px; transform: translateX(-50%); display: flex; align-items: center; gap: 8px; padding: 6px 11px 6px 7px; background: var(--card); color: var(--ink); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--glass-shadow); white-space: nowrap; }
.gm-card b { display: block; font-size: 12px; } .gm-card span { display: block; font-size: 11px; color: var(--muted); }
.gm-head { z-index: 50; }
.gm-head::after { content: ''; position: absolute; left: -8px; top: -8px; width: 16px; height: 16px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 4px color-mix(in srgb, var(--c) 25%, transparent), 0 0 0 2px var(--card) inset; }

@media (max-width: 899px) {
  .itin-stage .map-host { height: 460px; }
  .route-rail { position: static; width: auto; max-height: 460px; border-radius: 0; border-width: 1px 0 0; box-shadow: none; backdrop-filter: none; background: var(--card); }
}
@media print {
  .route-rail { position: static; width: auto; box-shadow: none; }
  .rr-play, .rr-foot { display: none; }
}
/* 지도 마커용 svg 절대 위치 규칙이 칩·카드 안 아이콘에는 적용되지 않게 */
.gm-mk .gm-chip svg, .gm-mk .gm-card svg { position: static; display: inline-block; }

/* ===== 교통수단 탭 ===== */
.tp-sec { margin-bottom: 26px; }
.tp-sec h2 { font-size: 1.05rem; margin: 0 0 12px; display: flex; align-items: baseline; gap: 8px; }
.tp-sec h2 .muted { font-size: .8rem; font-weight: 500; }
.tp-cityhead { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.tp-cityhead h2 { margin: 0; }
.tp-cities { display: inline-flex; flex-wrap: wrap; gap: 4px; background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 3px; }
.tp-cities button { border: 0; background: transparent; color: var(--muted); padding: 6px 12px; border-radius: 6px; font-size: .84rem; cursor: pointer; }
.tp-cities button.on { background: var(--line-2); color: var(--ink); font-weight: 600; }
.tp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.tp-card { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 16px; display: flex; flex-direction: column; gap: 10px; font-size: .88rem; }
.tp-card p { margin: 0; color: var(--ink); line-height: 1.55; }
.tp-h { display: flex; align-items: center; gap: 10px; }
.tp-h b { display: block; font-size: .95rem; letter-spacing: -.01em; }
.tp-h span { display: block; font-size: .74rem; color: var(--muted); }
.tp-ic { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--accent-soft); color: var(--accent-text); }
.tp-ic .ic { width: 20px; height: 20px; }
.tp-price { display: flex; gap: 8px; align-items: baseline; font-variant-numeric: tabular-nums; }
.tp-price span { font-size: .72rem; color: var(--muted); border: 1px solid var(--line); border-radius: 3px; padding: 0 5px; flex: none; }
.tp-links { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; }
.tp-links a { display: inline-flex; align-items: center; gap: 5px; font-size: .8rem; font-weight: 600; color: var(--accent-text); text-decoration: none; border: 1px solid var(--line); border-radius: 6px; padding: 5px 9px; }
.tp-links a:hover { border-color: var(--accent-line); background: var(--accent-soft); }
.tp-links .ic { width: 14px; height: 14px; }
@media print { .tp-links { display: none; } }

/* =====================================================================
   v3 · 여행사 스타일 — 색은 그대로, 상자·회색 글씨를 줄이고 여백과 서체로 정리
   ===================================================================== */
:root:not([data-theme="dark"]) { --bg: #f6f4ef; }
:root, [data-theme="light"] {
  --serif: 'Noto Serif KR', 'AppleMyungjo', serif;
  --lift: 0 1px 2px rgba(18,22,20,.05), 0 8px 24px rgba(18,22,20,.06);
  --hero-bg: #1d3a2f; --hero-ink: #f4f1ea; --hero-kick: #c9b27e;
}
[data-theme="dark"] { --lift: none; --hero-bg: #141619; --hero-ink: #ece8e1; --hero-kick: #c9a96e; }

/* 헤더 */
.top-inner { max-width: 1180px; }
.tabs button { font-size: .9rem; }
.tabs button.active { background: transparent; box-shadow: inset 0 -2px 0 var(--accent); border-radius: 0; }

/* 여행 조건 검색 바 */
.trip-wrap { position: relative; z-index: 8; max-width: 1180px; margin: -60px auto 0; padding: 0 28px; }
.trip.side-box { background: var(--card); border-radius: 14px; box-shadow: 0 14px 40px rgba(18,22,20,.14); padding: 18px 20px; position: static; max-height: none; }
[data-theme="dark"] .trip.side-box { border: 1px solid var(--line); box-shadow: 0 14px 40px rgba(0,0,0,.45); }
.trip .side-sum { display: none; align-items: center; gap: 12px; cursor: pointer; list-style: none; font-size: .92rem; padding: 2px 0; }
.trip .side-sum::-webkit-details-marker { display: none; }
.trip:not([open]) .side-sum { display: flex; }
.trip .side-sum-t { font-weight: 700; flex: none; }
.trip #side-sum-text { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; }
.trip .side-sum::after { content: '조건 변경'; flex: none; font-size: .82rem; font-weight: 700; color: var(--accent-text); border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px; }
.trip-fields { display: grid; grid-template-columns: 1fr 1fr 1.9fr 1.3fr .55fr auto; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.trip-fields .tf { display: flex; flex-direction: column; gap: 3px; margin: 0; padding: 10px 14px; border-right: 1px solid var(--line); font-size: .74rem; color: var(--muted); min-width: 0; }
.trip-fields .tf span { font-weight: 600; letter-spacing: .02em; }
.trip-fields .tf input, .trip-fields .tf select { border: 0; padding: 2px 0; background: transparent; font-size: .95rem; font-weight: 600; color: var(--ink); }
.trip-fields .tf:focus-within { background: var(--accent-soft); }
.trip-fields .tf-check { align-self: stretch; display: flex !important; align-items: center; padding: 0 16px !important; white-space: nowrap; }
.trip-filters { display: flex; align-items: center; gap: 12px 26px; flex-wrap: wrap; margin-top: 14px; }
.tfl { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.tfl-t { font-size: .78rem; font-weight: 600; color: var(--muted); }
.trip-filters .chips { margin: 0; }
.trip-go { margin-left: auto; padding: 12px 30px; font-size: .95rem; border-radius: 10px; }

/* 본문 */
.layout { display: block; max-width: 1180px; padding: 40px 28px 24px; }
h1 { font-family: var(--serif); font-size: 2rem; font-weight: 700; letter-spacing: -.025em; }
.page-head { border-bottom: 0; padding-bottom: 0; margin-bottom: 24px; }
.lead-sub { margin: 6px 0 0; color: var(--muted); font-size: .95rem; }
.lead { border-bottom: 0; padding-bottom: 6px; margin-bottom: 8px; }
.lead h1 { font-size: 2.1rem; }
.lead-note { margin: 0 0 6px; }
.card { border: 0; box-shadow: var(--lift); border-radius: 12px; }
[data-theme="dark"] .card { border: 1px solid var(--line); }
.chip { border-radius: 999px; padding: 6px 14px; }
.btn { border-radius: 8px; }

/* 경기 목록: 날짜별로 한 판 안에 줄 단위 (항공권 검색 결과처럼) */
.day { border-bottom: 0; padding: 16px 0; grid-template-columns: 96px minmax(0, 1fr); }
.date b { font-family: var(--serif); font-weight: 700; font-size: 2.2rem; }
.list { gap: 0; background: var(--card); border-radius: 12px; box-shadow: var(--lift); overflow: hidden; }
[data-theme="dark"] .list { border: 1px solid var(--line); }
.match { border: 0; border-radius: 0; border-bottom: 1px solid var(--line-2); padding: 18px 22px; background: transparent; }
.match:last-child { border-bottom: 0; }
.match:hover { background: var(--card-2); border-color: var(--line-2); }
.kt { font-size: 1.3rem; }
.who { font-size: 1.05rem; }
.add-btn { border-color: var(--accent); color: var(--accent-text); background: transparent; padding: 8px 14px; }
.add-btn.added { background: var(--accent); color: var(--accent-ink); }
.hint-box { box-shadow: none; border: 1px dashed var(--line); background: transparent; }

/* 구장 상세: 사진을 크게 */
.stadium-head { gap: 22px; }
.sh-photo { width: 260px; height: 160px; border-radius: 10px; border: 0; }
.stadium-head h2 { font-family: var(--serif); font-size: 1.9rem; }
.city-block { border: 0; box-shadow: var(--lift); border-radius: 12px; }
[data-theme="dark"] .city-block { border: 1px solid var(--line); }

/* 하단 */
.foot { max-width: 1180px; padding: 12px 28px 48px; border-top: 1px solid var(--line); margin-top: 24px; }
.foot p { margin: 4px 0; }

@media (max-width: 960px) {
  .trip-wrap { padding: 0 12px; margin-top: -52px; }
  .trip.side-box { padding: 14px; }
  .trip .side-sum { display: flex; }
  .trip[open] .side-sum { margin-bottom: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--line); border-radius: 0; }
  .trip[open] .side-sum::after { content: '접기'; }
  .trip-fields { grid-template-columns: 1fr 1fr; }
  .trip-fields .tf { border-bottom: 1px solid var(--line); }
  .trip-fields .tf:nth-child(2n) { border-right: 0; }
  .trip-fields .tf-base { grid-column: 1 / -1; border-right: 0; }
  .trip-fields .tf-check { grid-column: 1 / -1; padding: 10px 14px !important; }
  .trip-go { width: 100%; margin-left: 0; }
  .layout { padding: 24px 16px; }
  .side-box { padding: 14px; }
}
@media (max-width: 700px) {
  h1, .lead h1 { font-size: 1.55rem; }
  .day { grid-template-columns: 1fr; }
  .match { padding: 14px 16px; }
}
@media print { .hero-band, .trip-wrap { display: none; } }

/* ===== v3.1 · 헤더 통합 (헤더가 녹색, 제목 없이 바로 검색 바) + 범용 고딕 ===== */
:root, [data-theme="light"], [data-theme="dark"] { --serif: 'Pretendard', system-ui, -apple-system, 'Apple SD Gothic Neo', sans-serif; }
h1, .lead h1, .date b, .stadium-head h2 { font-family: var(--serif); font-weight: 700; letter-spacing: -.03em; }
.date b { font-weight: 600; }
.top { background: var(--hero-bg); border-bottom: 0; backdrop-filter: none; -webkit-backdrop-filter: none; }
.top .brand b { color: var(--hero-ink); }
.top .brand small { color: var(--hero-kick); }
.top .brand-mark { background: var(--hero-kick); }
.top .tabs button { color: rgba(244,241,234,.62); }
.top .tabs button:hover { color: var(--hero-ink); }
.top .tabs button.active { color: var(--hero-ink); background: transparent; box-shadow: inset 0 -2px 0 var(--hero-kick); }
.top .icon-btn { color: var(--hero-ink); border-color: rgba(255,255,255,.25); }
.top .icon-btn:hover { border-color: rgba(255,255,255,.5); }
.top .plan-pill { background: var(--hero-kick); color: #17130b; }
.hero-band { background: var(--hero-bg); height: 52px; }
.trip-wrap { margin-top: -44px; }
[data-theme="dark"] .top { border-bottom: 1px solid var(--line); }
@media (max-width: 960px) {
  .hero-band { height: 44px; }
  .trip-wrap { margin-top: -36px; }
}

/* ===== 위키백과 사진 출처 · 유니폼 스토어 강조 · 경기 없는 날 여행 코스 ===== */
.pc-src { position: absolute; right: 0; bottom: 0; padding: 1px 5px; font-size: .58rem; line-height: 1.35; color: var(--credit-ink); background: var(--credit-bg); border-top-left-radius: 3px; text-decoration: none; }
.pc-src:hover { text-decoration: underline; }
.shop-group h4 { display: inline-flex; align-items: center; gap: 6px; color: var(--place-shop); }
.shop-group .pcard { border-color: color-mix(in srgb, var(--place-shop) 35%, var(--line)); }
.fd-courses { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }
.fd-courses:empty { display: none; }
.fd-scroll[hidden] { display: none; }
.course { background: var(--card); border-radius: 12px; box-shadow: var(--lift); overflow: hidden; }
[data-theme="dark"] .course { border: 1px solid var(--line); }
.co-sum { display: grid; grid-template-columns: 132px minmax(0, 1fr) 24px; gap: 16px; align-items: center; padding: 12px 16px 12px 12px; cursor: pointer; list-style: none; }
.co-sum::-webkit-details-marker { display: none; }
.co-cover.pc-photo { width: 132px; height: 88px; border: 0; border-radius: 8px; }
.co-meta { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.co-meta b { font-size: 1rem; letter-spacing: -.02em; }
.co-tags { display: flex; gap: 6px; flex-wrap: wrap; font-size: .74rem; color: var(--muted); }
.co-tags span { border: 1px solid var(--line); border-radius: 999px; padding: 1px 8px; }
.co-tags .co-theme { border-color: var(--accent-line); color: var(--accent-text); background: var(--accent-soft); font-weight: 600; }
.co-path { font-size: .8rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.co-chev { color: var(--faint); transition: transform .2s; display: grid; place-items: center; }
.course[open] .co-chev { transform: rotate(90deg); }
.co-stops { list-style: none; margin: 0; padding: 4px 16px 6px 20px; border-top: 1px solid var(--line-2); }
.co-stop { display: grid; grid-template-columns: 26px 76px minmax(0, 1fr); gap: 12px; align-items: center; padding: 10px 0; }
.co-n { width: 26px; height: 26px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font-size: .76rem; font-weight: 700; }
.co-thumb.pc-photo { width: 76px; height: 56px; border: 0; border-radius: 6px; }
.co-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; font-size: .86rem; }
.co-txt span { color: var(--muted); font-size: .8rem; }
.co-txt em { font-style: normal; font-size: .74rem; color: var(--accent-text); font-weight: 600; }
.co-walk { display: flex; align-items: center; gap: 8px; margin-left: 12px; padding: 2px 0 2px 25px; border-left: 2px dotted var(--line); font-size: .76rem; color: var(--muted); }
.co-walk span { display: inline-flex; align-items: center; gap: 5px; }
.co-walk .ic { width: 14px; height: 14px; }
.co-go { margin: 4px 16px 14px; }
@media (max-width: 700px) {
  .co-sum { grid-template-columns: 92px minmax(0, 1fr) 18px; gap: 12px; }
  .co-cover.pc-photo { width: 92px; height: 70px; }
  .co-stops { padding-left: 12px; padding-right: 12px; }
  .co-stop { grid-template-columns: 24px 60px minmax(0, 1fr); gap: 10px; }
  .co-thumb.pc-photo { width: 60px; height: 46px; }
}
@media print { .co-go, .co-chev { display: none; } .course:not([open]) .co-stops { display: block; } }
.co-walk.far span { color: var(--accent-text); font-weight: 600; }
.co-walk em { font-style: normal; color: var(--faint); }

/* =====================================================================
   v4 · 3단계 흐름 — 1 알약 검색 바 + 경기 점 달력 / 2 체크 목록 + 내 여정 / 3 일정 확인
   ===================================================================== */
:root, [data-theme="light"] { --pill: #fff; --rowhover: rgba(18,22,20,.035); --cost-low: #2f8a5b; --cost-mid: #8c918d; --cost-high: #d9822b; }
[data-theme="dark"] { --pill: #1c1f23; --rowhover: rgba(255,255,255,.04); --cost-low: #6cc497; --cost-mid: #8b8984; --cost-high: #e59a52; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); border: 0; }

/* 1단계: 녹색 띠 안의 알약 검색 바 */
.hero-band { display: none; }
.trip-wrap { max-width: none; margin: 0; padding: 18px 28px 24px; background: var(--hero-bg); position: relative; z-index: 20; }
.trip.side-box { max-width: 1180px; margin: 0 auto; background: transparent; box-shadow: none; padding: 0; border: 0 !important; }
.trip-fields { background: var(--pill); border: 0; border-radius: 999px; box-shadow: 0 6px 24px rgba(0,0,0,.18); padding: 5px; grid-template-columns: 1.35fr 1.9fr 1.25fr .55fr auto; }
.trip-fields .tf { border-right: 1px solid var(--line); border-radius: 999px; padding: 8px 18px; }
.trip-fields .tf:last-of-type { border-right: 0; }
.trip-fields .tf:hover, .trip-fields .tf:focus-within { background: var(--rowhover); }
.tf-dates { border: 0; background: transparent; text-align: left; cursor: pointer; font: inherit; color: var(--muted); }
.tf-dates b { display: block; font-size: .95rem; font-weight: 600; color: var(--ink); white-space: nowrap; }
.tf-dates[aria-expanded="true"] { background: var(--card) !important; box-shadow: 0 2px 10px rgba(0,0,0,.12); }
.trip-fields .tf-check { padding: 0 18px !important; }
.trip-filters { margin-top: 14px; }
.trip-filters .tfl-t { color: rgba(244,241,234,.6); }
.trip-filters .chip { background: transparent; border-color: rgba(255,255,255,.28); color: var(--hero-ink); }
.trip-filters .chip:hover { border-color: rgba(255,255,255,.6); color: var(--hero-ink); }
.trip-filters .chip.on { background: var(--hero-ink); border-color: var(--hero-ink); color: var(--hero-bg); }
.trip-go { background: var(--hero-kick); border-color: var(--hero-kick); color: #17130b; border-radius: 999px; }
.trip .side-sum { color: var(--hero-ink); }
.trip #side-sum-text { color: rgba(244,241,234,.7); }
.trip .side-sum::after { color: var(--hero-ink); border-color: rgba(255,255,255,.3); }
[data-theme="dark"] .trip.side-box { box-shadow: none; }

/* 달력 */
.calpop { position: absolute; left: 50%; transform: translateX(-50%); top: calc(100% - 14px); width: min(720px, calc(100% - 32px)); background: var(--card); color: var(--ink); border-radius: 18px; box-shadow: 0 18px 50px rgba(0,0,0,.25); padding: 16px 22px 14px; z-index: 30; }
[data-theme="dark"] .calpop { border: 1px solid var(--line); }
.calpop[hidden] { display: none; }
.cal-h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.cal-hint { font-size: .8rem; color: var(--muted); }
.cal-nav { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); background: transparent; color: var(--ink); display: grid; place-items: center; cursor: pointer; }
.cal-months { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.cmon h4 { text-align: center; margin: 2px 0 8px; font-size: .95rem; }
.cgrid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px 0; }
.cgrid .wd { font-size: .7rem; color: var(--faint); text-align: center; padding-bottom: 4px; }
.cd { height: 42px; border: 0; background: transparent; border-radius: 10px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font: inherit; font-size: .84rem; color: var(--ink); cursor: pointer; font-variant-numeric: tabular-nums; }
.cd:hover { background: var(--rowhover); }
.cd.in { background: var(--accent-soft); border-radius: 0; }
.cd.edge { background: var(--accent); color: var(--accent-ink); }
.cd.out { color: var(--faint); }
.cd .dots { display: flex; gap: 2px; height: 5px; }
.cd .dots i { width: 5px; height: 5px; border-radius: 50%; }
.cd.edge .dots i { box-shadow: 0 0 0 1px var(--accent-ink); }
.cal-f { display: flex; align-items: center; gap: 14px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line-2); font-size: .8rem; color: var(--muted); flex-wrap: wrap; }
.cal-legend { display: flex; gap: 12px; flex-wrap: wrap; margin-right: auto; }
.cal-legend span { display: inline-flex; align-items: center; gap: 5px; }
.cal-legend i { width: 7px; height: 7px; border-radius: 50%; }

/* 단계 표시 */
.stepbar { display: flex; align-items: center; justify-content: center; gap: 10px; max-width: 1180px; margin: 0 auto; padding: 22px 28px 0; }
body:not([data-tab="search"]):not([data-tab="plan"]) .stepbar { display: none; }
.stepbar button { display: inline-flex; align-items: center; gap: 8px; border: 0; background: none; font: inherit; font-size: .88rem; color: var(--muted); cursor: pointer; padding: 4px 6px; }
.stepbar button i { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-weight: 700; font-size: .78rem; border: 1.5px solid var(--line); }
.stepbar button.done i { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent-text); }
.stepbar button.cur { color: var(--ink); font-weight: 700; }
.stepbar button.cur i { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.stepbar .ln { width: 56px; height: 1px; background: var(--line); }

/* 2단계: 체크 목록 + 내 여정 */
.layout { padding-top: 22px; }
.pick-grid { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 40px; align-items: start; }
.lead { align-items: end; }
.sortbar { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; font-size: .85rem; }
.sortbar b { font-weight: 600; color: var(--muted); font-size: .78rem; margin-right: 6px; }
.sortbar button { border: 0; background: transparent; color: var(--muted); padding: 7px 12px; border-radius: 999px; cursor: pointer; font: inherit; }
.sortbar button.on { background: var(--ink); color: var(--bg); font-weight: 600; }
.sortbar button:not(.on):hover { color: var(--ink); background: var(--rowhover); }
.flat { margin-top: 4px; }
.dhead { position: sticky; top: 64px; z-index: 4; background: var(--bg); display: flex; align-items: baseline; gap: 10px; padding: 16px 0 8px; border-bottom: 1px solid var(--line); }
.dhead b { font-size: 1.02rem; letter-spacing: -.02em; }
.dhead span { color: var(--muted); font-size: .8rem; }
.flat .match { grid-template-columns: 28px 74px minmax(0, 1fr) 150px; gap: 16px; padding: 14px 10px; margin: 0 -10px; border: 0; border-bottom: 1px solid var(--line-2); border-radius: 8px; background: transparent; box-shadow: none; cursor: pointer; }
.flat .match:hover { background: var(--rowhover); }
.flat .match.sel { background: var(--accent-soft); }
.flat .match.big { box-shadow: none; }
[data-theme="dark"] .flat .match.big { background: transparent; border-color: var(--line-2); }
[data-theme="dark"] .flat .match.sel { background: var(--accent-soft); }
.pick { width: 24px; height: 24px; border-radius: 50%; border: 1.5px solid var(--faint); background: transparent; display: grid; place-items: center; color: transparent; cursor: pointer; padding: 0; transition: .12s; }
.pick .ic { width: 15px; height: 15px; stroke-width: 2.4; }
.pick:hover { border-color: var(--accent); }
.pick[aria-checked="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.kt em { display: block; font-style: normal; font-size: .7rem; color: var(--accent-text); font-weight: 600; margin-bottom: 2px; }
.eta { text-align: right; }
.eta .cost-dot { display: inline-flex; align-items: center; justify-content: flex-end; gap: 6px; font-size: .92rem; }
.eta .cost-dot::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.cost-dot.c-low { --c: var(--cost-low); } .cost-dot.c-mid { --c: var(--cost-mid); } .cost-dot.c-high { --c: var(--cost-high); }

.journey-panel { position: sticky; top: 84px; padding-top: 6px; }
.jp-head { display: flex; justify-content: space-between; align-items: baseline; }
.jp-head h3 { margin: 0; font-size: 1.15rem; letter-spacing: -.02em; }
.jp-head span { font-size: .82rem; color: var(--muted); }
.jp-sub { font-size: .8rem; color: var(--muted); margin: 4px 0 16px; }
.jp-empty { font-size: .86rem; color: var(--muted); line-height: 1.6; margin: 14px 0 18px; padding: 18px; border: 1px dashed var(--line); border-radius: 12px; }
.journey { list-style: none; margin: 0; padding: 0; position: relative; max-height: 46vh; overflow-y: auto; scrollbar-width: thin; }
.journey::before { content: ''; position: absolute; left: 10px; top: 8px; bottom: 8px; width: 2px; background: var(--line); }
.journey li { position: relative; padding: 0 28px 16px 32px; font-size: .86rem; }
.journey li::before { content: ''; position: absolute; left: 4px; top: 3px; width: 14px; height: 14px; border-radius: 50%; background: var(--bg); border: 2px solid var(--accent); box-sizing: border-box; }
.journey li.base::before { background: var(--accent); border-radius: 4px; }
.journey li b { display: block; font-weight: 600; letter-spacing: -.01em; }
.journey li span { display: block; color: var(--muted); font-size: .76rem; }
.journey li .leg { margin-top: 4px; color: var(--faint); }
.jx { position: absolute; right: 0; top: 0; width: 24px; height: 24px; border: 0; background: none; color: var(--faint); cursor: pointer; display: grid; place-items: center; border-radius: 50%; }
.jx:hover { color: var(--bad); background: var(--rowhover); }
.jx .ic { width: 14px; height: 14px; }
.jp-sum { border-top: 1px solid var(--line); margin-top: 4px; padding-top: 14px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.jp-sum div { font-size: .72rem; color: var(--muted); }
.jp-sum b { display: block; font-size: 1.02rem; color: var(--ink); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.cta { width: 100%; margin-top: 16px; border: 0; border-radius: 12px; padding: 14px; background: var(--accent); color: var(--accent-ink); font: inherit; font-weight: 700; font-size: .95rem; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.cta[disabled] { opacity: .4; cursor: default; }
[data-theme="dark"] .cta { background: var(--hero-kick); color: #17130b; }
.jp-note { font-size: .74rem; color: var(--faint); text-align: center; margin: 8px 0 0; }
.jp-bar { display: none; }

@media (max-width: 960px) {
  .trip-wrap { padding: 12px 12px 16px; }
  .trip-fields { border-radius: 18px; grid-template-columns: 1fr 1fr; gap: 2px; }
  .trip-fields .tf { border-right: 0 !important; border-radius: 12px; }
  .trip-fields .tf-dates, .trip-fields .tf-base { grid-column: 1 / -1; }
  .trip .side-sum { padding: 4px 2px; }
  .cal-months { grid-template-columns: 1fr; }
  .cal-months .cmon + .cmon { display: none; }
  .calpop { top: calc(100% - 8px); padding: 14px; }
  .stepbar { padding: 16px 12px 0; gap: 4px; }
  .stepbar .ln { width: 16px; }
  .stepbar button span { display: none; } .stepbar button.cur span { display: inline; }
  .pick-grid { grid-template-columns: 1fr; }
  .journey-panel { display: none; }
  .jp-bar:not([hidden]) { display: flex; position: sticky; bottom: 0; z-index: 15; align-items: center; justify-content: space-between; gap: 12px; margin: 16px -16px 0; padding: 12px 16px; background: var(--card); box-shadow: 0 -8px 24px rgba(0,0,0,.12); }
  .jp-bar b { font-size: .95rem; } .jp-bar span { font-size: .78rem; color: var(--muted); }
  .jp-bar .cta { width: auto; margin: 0; padding: 11px 20px; }
  .dhead { top: 108px; }
  .flat .match { grid-template-columns: 26px 54px minmax(0, 1fr); gap: 8px 12px; padding: 12px 8px; margin: 0 -8px; }
  .flat .match .eta { grid-column: 3; text-align: left; }
  .eta .cost-dot { justify-content: flex-start; }
}
@media print { .stepbar, .calpop, .journey-panel, .jp-bar { display: none !important; } }
.eta .cost-dot { display: flex; }
.trip-go.btn.primary { background: var(--hero-kick); border-color: var(--hero-kick); color: #17130b; }
.trip-go.btn.primary:hover { filter: brightness(1.06); }
.trip-fields { position: relative; }
.trip-fields .sr-only { left: 0; top: 0; }

/* =====================================================================
   v5 · 전 탭 플랫 — 상자 대신 여백·구분선·제목으로.
   상자는 직접 조작하는 단위(내 여정 · 코스 카드 · 경로 레일 · 달력 · 지도 틀)에만.
   ===================================================================== */
/* 페이지 머리: 모든 탭 같은 리듬 */
.page-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; flex-wrap: wrap; margin: 6px 0 22px; padding: 0; border: 0; }
.page-head h1, .lead h1 { font-size: 1.9rem; letter-spacing: -.035em; margin: 0; }
.head-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.plan-export[hidden] { display: none; }
.plan-export .btn { border-color: transparent; color: var(--muted); }
.plan-export .btn:hover { color: var(--ink); background: var(--rowhover); }

/* 상자(.card) → 섹션: 구분선과 여백만 */
.tab .card { background: none; border: 0; border-radius: 0; box-shadow: none; padding: 22px 0; margin: 0; border-top: 1px solid var(--line); }
[data-theme="dark"] .tab .card { border: 0; border-top: 1px solid var(--line); }
.tab .page-head + .card, .tab .card:first-child { border-top: 0; padding-top: 0; }
.tab .card h3 { font-size: 1.05rem; letter-spacing: -.02em; margin: 0 0 14px; }
.tab .card.empty, .tab .card.error { border: 0; padding: 40px 0; color: var(--muted); }
.tab .card.error { color: var(--bad); }
/* 지도는 틀만 남김 */
.tab .card.map-card { padding: 0; border: 0; margin: 0 0 20px; }
.tab .map-host { border-radius: 12px; }
.tab .card.map-card .legend { padding: 10px 2px 0; }

/* ---- 내 일정 ---- */
.plan-rows { margin-bottom: 26px; }
.prow { display: grid; grid-template-columns: 90px minmax(0, 1fr) 28px; gap: 16px; align-items: center; padding: 13px 0; border-bottom: 1px solid var(--line-2); }
.prow .kt { font-size: 1.1rem; }
.prow .jx { position: static; }
.summary { display: flex; flex-wrap: wrap; gap: 8px 40px; background: none; border: 0; border-radius: 0; box-shadow: none; padding: 4px 0 20px; margin: 0 0 18px; border-bottom: 1px solid var(--line); overflow: visible; }
.summary .stat { padding: 0; border: 0 !important; }
.summary .stat b { font-size: 1.45rem; letter-spacing: -.03em; }
.export-bar { display: none; }
.wx-bar { background: none; border: 0; padding: 0 0 16px; }
.warn-box { border-radius: 10px; }
/* 타임라인: 경기는 사진 배너 + 들여쓴 본문, 이동은 색 줄 + 들여쓰기 */
.tl-match.card { border: 0; box-shadow: none; padding: 0 0 8px; border-radius: 0; background: none; }
[data-theme="dark"] .tl-match.card { border: 0; }
.tl-banner { border-radius: 12px; }
.leg-body.card { background: none; border: 0; border-left: 3px solid var(--line); border-radius: 0; box-shadow: none; padding: 4px 0 4px 18px; margin: 6px 0 18px; }
[data-theme="dark"] .leg-body.card { border-top: 0; }
.rec-box { border: 0; background: none; padding: 4px 0 0; border-radius: 0; }
.rec-main .rec-icon { width: 34px; height: 34px; }
.others { margin-top: 14px; }
.others-title { font-size: .76rem; letter-spacing: .02em; }
.opt { border: 0; border-bottom: 1px solid var(--line-2); border-radius: 0; padding: 9px 0; margin: 0; }
.opt[open] { background: none; }
.day-sep { margin-top: 30px; }

/* ---- 자동 추천 ---- */
#tab-auto .card .filter-row { margin: 10px 0 12px; }
#tab-auto .card .opts { margin: 8px 0 18px; }
.auto-head.card { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; background: none; padding: 18px 0; }
.auto-head.card b { font-size: 1.15rem; }

/* ---- 구장 ---- */
.stadium-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 6px 32px; margin: 4px 0 28px; }
.city-block { background: none; border: 0 !important; box-shadow: none; border-radius: 0; padding: 0; gap: 0; }
.city-name { font-size: .74rem; letter-spacing: .1em; padding: 0 0 6px; margin: 0; border-bottom: 1px solid var(--line); }
.stadium-btn { border: 0; border-bottom: 1px solid var(--line-2); border-radius: 0; padding: 9px 2px; background: none; }
.stadium-btn:hover { background: var(--rowhover); border-color: var(--line-2); }
.stadium-btn.on { background: var(--accent-soft); border-color: var(--line-2); }
.stadium-head.card { border-top: 0; padding: 8px 0 22px; }
.sh-photo { width: 300px; height: 180px; border-radius: 12px; }
.svc-grid { display: block; }
.svc { background: none; border: 0; border-bottom: 1px solid var(--line-2); border-radius: 0; padding: 12px 0; display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 4px 20px; }
.svc .svc-t { margin: 0; }
.svc > :not(.svc-t) { grid-column: 2; }
.two-col { gap: 0 48px; }
.two-col .card { border-top: 1px solid var(--line); }
.two-col + .card { margin-top: 0; }
.station { border-bottom: 1px solid var(--line-2); }
.place-mini { border-bottom: 1px solid var(--line-2); }
.pub-grid { gap: 0 48px; }
.pcard, .pub { background: none; border: 0 !important; border-bottom: 1px solid var(--line-2) !important; border-radius: 0; box-shadow: none; padding: 14px 0; margin: 0; }
.pcard-grid { display: block; }
.shop-group .pcard { border-bottom-color: var(--line-2) !important; }
.place-group h4 { margin-top: 22px; }
.place-group:first-child h4 { margin-top: 0; }
.pc-photo { border: 0; border-radius: 8px; }

/* ---- 경로: 출발·도착을 알약 검색 바처럼 ---- */
.route-form.card { display: grid; grid-template-columns: 1.4fr auto 1.4fr 1.3fr auto auto; align-items: center; gap: 0; background: var(--pill); border-radius: 999px; box-shadow: 0 6px 24px rgba(18,22,20,.12); padding: 5px; border: 0; margin-bottom: 26px; }
[data-theme="dark"] .route-form.card { border: 1px solid var(--line); box-shadow: none; }
.route-form label { margin: 0; padding: 8px 18px; border-right: 1px solid var(--line); border-radius: 999px; font-size: .72rem; gap: 2px; }
.route-form label:hover, .route-form label:focus-within { background: var(--rowhover); }
.route-form label select, .route-form label input { border: 0; background: transparent; padding: 2px 0; font-size: .92rem; font-weight: 600; }
.route-form label.check { border-right: 0; padding: 0 16px; font-size: .84rem !important; white-space: nowrap; }
.route-form .swap { width: 36px; height: 36px; border-radius: 50%; padding: 0; margin: 0 -6px; z-index: 1; background: var(--card); border: 1px solid var(--line); display: grid; place-items: center; }
.route-form #route-btn { border-radius: 999px; padding: 12px 22px; }

/* ---- 교통수단: 카드 그리드 → 한 줄 목록 ---- */
.tp-sec { margin-bottom: 34px; }
.tp-grid { display: block; border-top: 1px solid var(--line); }
.tp-card { display: grid; grid-template-columns: minmax(200px, 1fr) minmax(0, 2fr) 180px; grid-template-areas: "h p price" "h tip price" "h links links"; gap: 6px 28px; background: none; border: 0; border-bottom: 1px solid var(--line-2); border-radius: 0; padding: 18px 0; }
[data-theme="dark"] .tp-card { border: 0; border-bottom: 1px solid var(--line-2); }
.tp-card .tp-h { grid-area: h; align-self: start; }
.tp-card > p { grid-area: p; }
.tp-card .tp-price { grid-area: price; align-self: start; flex-direction: column; gap: 2px; }
.tp-card .tip { grid-area: tip; background: none; border: 0; padding: 0; color: var(--muted); font-size: .82rem; }
.tp-card .tp-links { grid-area: links; margin: 0; }
.tp-links a { border: 0; padding: 4px 0; margin-right: 14px; }
.tp-links a:hover { background: none; text-decoration: underline; }

@media (max-width: 700px) {
  .page-head h1, .lead h1 { font-size: 1.5rem; }
  .prow { grid-template-columns: 64px minmax(0, 1fr) 28px; gap: 10px; }
  .summary { gap: 8px 22px; }
  .summary .stat b { font-size: 1.15rem; }
  .svc { grid-template-columns: 1fr; } .svc > :not(.svc-t) { grid-column: 1; }
  .sh-photo { width: 100%; height: 180px; }
  .route-form.card { grid-template-columns: 1fr; border-radius: 18px; padding: 6px; }
  .route-form label { border-right: 0; border-bottom: 1px solid var(--line-2); border-radius: 12px; }
  .route-form .swap { margin: -6px auto; transform: rotate(90deg); }
  .route-form label.check { padding: 12px 16px; }
  .route-form #route-btn { width: 100%; border-radius: 12px; }
  .tp-card { grid-template-columns: 1fr; grid-template-areas: "h" "p" "price" "tip" "links"; gap: 6px; }
  .tp-card .tp-price { flex-direction: row; }
}
/* 상자 여백이 없어졌으니 배너도 본문 폭에 맞춤 */
.tl-match.card { --pad: 0px; }
.tl-match.card .tl-banner { margin: 0 0 14px; flex-basis: 100%; }

/* ===== v6 · 교통수단 탭 → 그 수단의 세부 경로 (경로 조회 · 일정 타임라인 공통) ===== */
.mtabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 2px 0 12px; margin: 4px 0 6px; border-bottom: 1px solid var(--line-2); }
.mtabs::-webkit-scrollbar { display: none; }
.mtab { --m: var(--accent); position: relative; flex: none; display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 8px; align-items: center; text-align: left; border: 1px solid var(--line); background: transparent; color: var(--ink); border-radius: 12px; padding: 8px 14px 8px 10px; font: inherit; cursor: pointer; transition: .12s; }
.mtab .ic { grid-row: 1 / 3; width: 20px; height: 20px; color: var(--m); }
.mtab .mt-n { font-size: .84rem; font-weight: 600; display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.mtab .mt-n em { font-style: normal; font-size: .64rem; font-weight: 700; color: var(--accent-ink); background: var(--accent); border-radius: 999px; padding: 1px 6px; }
[data-theme="dark"] .mtab .mt-n em { background: var(--hero-kick); color: #17130b; }
.mtab .mt-v { font-size: .74rem; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.mtab:hover { border-color: var(--faint); }
.mtab.on { border-color: var(--m); background: color-mix(in srgb, var(--m) 9%, transparent); box-shadow: inset 0 0 0 1px var(--m); }
.mtab .late { position: absolute; top: 6px; right: 6px; width: 7px; height: 7px; border-radius: 50%; background: var(--bad); }
.mode-detail { padding-top: 6px; animation: fade .15s ease; }
.md-head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.md-head b { font-size: 1rem; letter-spacing: -.01em; }
.md-head span { font-size: .8rem; }
.md-meta { display: flex; gap: 6px 14px; flex-wrap: wrap; align-items: center; font-size: .82rem; color: var(--muted); margin: 4px 0 12px; font-variant-numeric: tabular-nums; }
/* 단계별 세로 타임라인 */
.stl { list-style: none; margin: 0 0 10px; padding: 0; position: relative; }
.st { --m: var(--accent); position: relative; display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 12px; padding: 0 0 14px; }
.st::before { content: ''; position: absolute; left: 13px; top: 26px; bottom: -2px; width: 2px; background: color-mix(in srgb, var(--m) 55%, var(--line)); }
.st:last-child::before { display: none; }
.st.k-walk::before, .st:has(.st-ic .ic) .st-tx:empty { }
.st-ic { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; color: var(--m); background: color-mix(in srgb, var(--m) 12%, var(--bg)); position: relative; z-index: 1; }
.st-ic .ic { width: 16px; height: 16px; }
.st-ic.dot { background: var(--bg); border: 2.5px solid var(--ink); width: 16px; height: 16px; margin: 6px; }
.st.k-start::before { background: var(--line); }
.st.k-xfer .st-ic { background: var(--bg); border: 2px solid var(--m); }
.st.k-off .st-ic { background: var(--m); color: #fff; }
.st-tx { font-size: .88rem; line-height: 1.5; padding-top: 3px; overflow-wrap: anywhere; word-break: keep-all; }
.st.k-start .st-tx, .st.k-end .st-tx { padding-top: 2px; }
.ln-b { --lc: #333; display: inline-block; padding: 0 7px; border-radius: 4px; background: var(--lc); color: #fff; font-size: .78rem; font-weight: 700; line-height: 1.6; margin: 0 1px; white-space: nowrap; }
.ln-b[style*="#ffd300"], .ln-b[style*="#ffda00"], .ln-b[style*="#f3a9bb"], .ln-b[style*="#95cdba"], .ln-b[style*="#a0a5a9"] { color: #111; }
[data-theme="dark"] .ln-b[style*="#000000"] { box-shadow: 0 0 0 1px #555; }
/* 일정 타임라인용 작은 판 */
.leg-body.compact .mtab { padding: 6px 11px 6px 8px; border-radius: 10px; }
.leg-body.compact .mtab .ic { width: 17px; height: 17px; }
.leg-body.compact .stl .st { padding-bottom: 10px; }
.leg-body.compact .st-tx { font-size: .84rem; }
@media (max-width: 700px) {
  .mtab { padding: 7px 11px 7px 8px; }
  .st { grid-template-columns: 26px minmax(0, 1fr); gap: 10px; }
}
@media print { .mtabs { display: none; } }

/* ===== 경기 카드 구장 갤러리: 큰 사진 + 작은 사진 2 + 구단 엠블럼 ===== */
.tl-gal { --club: var(--accent); flex: 0 0 100%; position: relative; display: grid; grid-template-columns: 2.3fr 1fr .9fr; grid-template-rows: 1fr 1fr; gap: 4px; height: 230px; border-radius: 12px; overflow: hidden; margin: 0 0 14px; }
.tl-gal > a { position: relative; overflow: hidden; display: block; background: linear-gradient(135deg, var(--club), color-mix(in srgb, var(--club) 45%, var(--card-2))); }
.tl-gal img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .3s ease, transform .4s ease; }
.tl-gal .loaded > img, .tl-gal .g-crest img { opacity: 1; }
.tl-gal > a:hover img { transform: scale(1.03); }
.g-main { grid-row: 1 / 3; }
.g-main::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.55), transparent 55%); pointer-events: none; z-index: 1; }
.g-main .tb-badge { position: absolute; right: 18px; top: 50%; transform: translateY(-50%); transition: opacity .3s; }
.g-main.loaded .tb-badge { opacity: 0; }
.g-main .tb-cap { position: absolute; left: 18px; bottom: 14px; z-index: 2; color: #fff; }
.g-main .tb-cap b { display: block; font-size: 1.2rem; letter-spacing: -.02em; }
.g-main .tb-cap span { font-size: .8rem; opacity: .85; }
.g-a { grid-column: 2; grid-row: 1; } .g-b { grid-column: 2; grid-row: 2; }
.g-tile:not(.loaded) { background: color-mix(in srgb, var(--club) 22%, var(--card-2)); }
.tl-gal.few .g-a:not(.loaded) { grid-row: 1 / 3; }
.tl-gal.few .g-b:not(.loaded) { display: none; }
.g-crest { grid-column: 3; grid-row: 1 / 3; background: var(--card-2) !important; display: grid !important; place-items: center; }
[data-theme="dark"] .g-crest { background: #e9e6df !important; }
.g-crest img { position: static !important; width: 62%; height: auto; max-height: 70%; object-fit: contain; }
.g-crest .badge { width: 56px; height: 64px; }
.tl-gal .tb-src { position: absolute; right: 8px; bottom: 6px; z-index: 3; font-size: .6rem; color: #fff; background: rgba(0,0,0,.4); padding: 1px 6px; border-radius: 3px; pointer-events: none; }
@media (max-width: 700px) {
  .tl-gal { grid-template-columns: 1fr 1fr 1fr; grid-template-rows: 170px 78px; height: auto; }
  .g-main { grid-column: 1 / -1; grid-row: 1; }
  .g-a { grid-column: 1; grid-row: 2; } .g-b { grid-column: 2; grid-row: 2; }
  .g-crest { grid-column: 3; grid-row: 2; }
  .tl-gal.few .g-a:not(.loaded) { grid-row: 2; }
  .g-crest img { width: auto; height: 70%; }
}
@media print { .tl-gal .g-tile, .tl-gal .tb-src { display: none; } .tl-gal { height: 120px; grid-template-columns: 1fr .3fr; } }

/* 경기 카드: 왼쪽 구장 갤러리 · 오른쪽 경기 정보 (세로 스크롤 줄이기) */
.tl-match.card { display: grid; grid-template-columns: minmax(0, 1.15fr) 30px minmax(0, 1fr); column-gap: 16px; align-items: start; }
.tl-match.card > .tl-gal { grid-column: 1; grid-row: 1 / span 2; margin: 0; height: 236px; grid-template-columns: 1.9fr 1fr; grid-template-rows: 1fr 1fr 1fr; }
.tl-match.card > .tl-gal .g-main { grid-row: 1 / 4; }
.tl-match.card > .tl-gal .g-a { grid-column: 2; grid-row: 1; }
.tl-match.card > .tl-gal .g-b { grid-column: 2; grid-row: 2; }
.tl-match.card > .tl-gal .g-crest { grid-column: 2; grid-row: 3; }
.tl-match.card > .tl-gal .g-crest img { width: auto; height: 70%; }
.tl-match.card > .tl-gal .g-crest .badge { width: 36px; height: 42px; }
.tl-match.card > .tl-gal.few .g-a:not(.loaded) { grid-row: 1 / 3; }
.tl-match.card > .tl-num { grid-column: 2; grid-row: 1; }
.tl-match.card > .tl-main { grid-column: 3; grid-row: 1 / span 2; min-width: 0; }
@media (max-width: 860px) {
  .tl-match.card { grid-template-columns: 30px minmax(0, 1fr); }
  .tl-match.card > .tl-gal { grid-column: 1 / -1; grid-row: 1; margin-bottom: 12px; }
  .tl-match.card > .tl-num { grid-column: 1; grid-row: 2; }
  .tl-match.card > .tl-main { grid-column: 2; grid-row: 2; }
}
@media (max-width: 700px) {
  .tl-match.card > .tl-gal { height: auto; grid-template-columns: 1fr 1fr 1fr; grid-template-rows: 170px 78px; }
  .tl-match.card > .tl-gal .g-main { grid-column: 1 / -1; grid-row: 1; }
  .tl-match.card > .tl-gal .g-a { grid-column: 1; grid-row: 2; }
  .tl-match.card > .tl-gal .g-b { grid-column: 2; grid-row: 2; }
  .tl-match.card > .tl-gal .g-crest { grid-column: 3; grid-row: 2; }
}
.tl-gal .g-crest img { position: static !important; inset: auto; width: auto !important; height: 74% !important; max-width: 82%; object-fit: contain !important; opacity: 1; transform: none !important; }
.tl-gal { grid-template-rows: repeat(2, minmax(0, 1fr)); }
.tl-gal > * { min-height: 0; min-width: 0; }
.tl-match.card > .tl-gal { grid-template-rows: repeat(3, minmax(0, 1fr)); }
.tl-gal .g-crest { overflow: hidden; }
@media (max-width: 700px) { .tl-gal, .tl-match.card > .tl-gal { grid-template-rows: 170px 78px; } }
.tl-gal .g-crest img { position: absolute !important; inset: 12% !important; width: 76% !important; height: 76% !important; max-width: none; object-fit: contain !important; }

/* ===== 이동 카드: 세부 경로 옆에 도착 구장 사진 (넓은 화면) ===== */
.leg-grid.has-side { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .95fr); gap: 28px; align-items: start; }
.leg-side { position: sticky; top: 90px; }
.leg-side .tl-gal.g-side { height: 260px; margin: 6px 0 0; grid-template-columns: 1.9fr 1fr; grid-template-rows: repeat(3, minmax(0, 1fr)); }
.leg-side .tl-gal.g-side .g-main { grid-row: 1 / 4; }
.leg-side .tl-gal.g-side .g-a { grid-column: 2; grid-row: 1; }
.leg-side .tl-gal.g-side .g-b { grid-column: 2; grid-row: 2; }
.leg-side .tl-gal.g-side .g-crest { grid-column: 2; grid-row: 3; }
.leg-side .tl-gal.g-side.few .g-a:not(.loaded) { grid-row: 1 / 3; }
/* 넓은 화면: 바로 다음 경기 카드는 사진 없이 정보만 */
@media (min-width: 1000px) {
  .tl-match.card.has-dup { grid-template-columns: 30px minmax(0, 1fr); }
  .tl-match.card.has-dup > .tl-gal.dup { display: none; }
  .tl-match.card.has-dup > .tl-num { grid-column: 1; grid-row: 1; }
  .tl-match.card.has-dup > .tl-main { grid-column: 2; grid-row: 1; }
}
/* 좁은 화면: 일정 타임라인에선 사진을 경기 카드 쪽에만, 경로 조회 탭에선 세부 경로 아래 */
@media (max-width: 999px) {
  .leg-grid.has-side { display: block; }
  .timeline:not(.single) .leg-side { display: none; }
  .timeline.single .leg-side { position: static; margin-top: 14px; }
}
@media (max-width: 700px) {
  .leg-side .tl-gal.g-side { height: auto; grid-template-columns: 1fr 1fr 1fr; grid-template-rows: 170px 78px; }
  .leg-side .tl-gal.g-side .g-main { grid-column: 1 / -1; grid-row: 1; }
  .leg-side .tl-gal.g-side .g-a { grid-column: 1; grid-row: 2; } .leg-side .tl-gal.g-side .g-b { grid-column: 2; grid-row: 2; }
  .leg-side .tl-gal.g-side .g-crest { grid-column: 3; grid-row: 2; }
}
@media print { .leg-side { display: none; } .tl-match.card.has-dup > .tl-gal.dup { display: grid; } }
/* 구단 상징물 사진: 이름 오버레이 + 출처 */
.g-tile .g-cap { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; padding: 14px 8px 5px; font-size: .72rem; font-weight: 600; color: #fff; background: linear-gradient(to top, rgba(0,0,0,.65), transparent); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: 0; transition: opacity .3s; }
.g-tile .g-src { position: absolute; right: 4px; top: 4px; z-index: 2; font-size: .55rem; color: #fff; background: rgba(0,0,0,.4); padding: 0 4px; border-radius: 3px; opacity: 0; }
.g-tile.loaded .g-cap, .g-tile.loaded .g-src { opacity: 1; }

/* ===== 경로 위 정차점: 확대하면 원, 더 확대하면 이름 (승차·하차점은 조금 크게) ===== */
/* 구글 지도: 줌 12 이상 원, 14 이상 이름 */
.gm-stop { --m: var(--ink); display: none; z-index: 25; }
.z-stops .gm-stop { display: block; }
.gm-stop i { position: absolute; left: -5px; top: -5px; width: 10px; height: 10px; border-radius: 50%; background: #fff; border: 2.5px solid var(--m); box-sizing: border-box; }
.gm-stop.edge i { left: -7px; top: -7px; width: 14px; height: 14px; border-width: 3px; }
.gm-stop span { display: none; position: absolute; left: 10px; top: -9px; white-space: nowrap; font-size: 11.5px; font-weight: 600; color: var(--map-text); text-shadow: 0 0 3px var(--map-halo), 0 0 3px var(--map-halo), 0 0 3px var(--map-halo), 0 0 3px var(--map-halo); }
.z-labels .gm-stop span, .z-stops .gm-stop.edge span { display: block; }
.gm-stop.edge span { font-weight: 700; }
/* 벡터 지도 */
.m-stop circle { fill: #fff; stroke-width: 2.4px; }
.m-stop.edge circle { stroke-width: 3.2px; }
.m-stop text { font-size: 10.5px; fill: var(--map-text); font-weight: 600; paint-order: stroke; stroke: var(--map-halo); stroke-width: 3px; stroke-linejoin: round; }
.m-stop.edge text { font-weight: 700; }
/* 좌표가 추정치인 정차점은 점선 테두리 */
.gm-stop.approx i { border-style: dashed; }
.m-stop.approx circle { stroke-dasharray: 2 2; }
