/* 골목 웹 디자인 토큰 v1 — SSOT: golmok-dokkaebi docs/골목지기_디자인시스템.md §7
   라이트 단일 · 코발트 강조(골목 블로그 accent 와 동일 #2563EB) · Pretendard · 흰 바탕 + 알약 칩 + 카드 그리드 */
:root {
  --brand-50: #EFF4FF; --brand-100: #DBE6FE; --brand-200: #BFD3FE; --brand-300: #93B4FD; --brand-400: #6090FA;
  --brand-500: #2563EB; --brand-600: #1D4FD8; --brand-700: #1E40AF; --brand-800: #1E3A8A; --brand-900: #172554;
  --gray-0: #FFFFFF; --gray-50: #F7F8FA; --gray-100: #F1F3F5; --gray-200: #E5E8EC; --gray-300: #D1D6DD;
  --gray-400: #A8B0BC; --gray-500: #8A94A3; --gray-600: #5B6675; --gray-700: #3B4350; --gray-900: #14181F;
  --ink: var(--gray-900); --ink-2: var(--gray-700); --muted: var(--gray-600); --faint: var(--gray-500);
  --line: var(--gray-200); --bg: var(--gray-0); --bg-soft: var(--gray-50); --surface: var(--gray-0);
  --accent: var(--brand-500); --accent-soft: var(--brand-50);
  --st-urgent: #D92D20; --st-soon: #B54708; --urgent-soft: #FEF3F2; --soon-soft: #FFFAEB;
  --r-sm: 8px; --r: 12px; --r-lg: 16px; --r-pill: 999px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 4px 14px rgba(16, 24, 40, .06);
  --wrap: 1120px;
  --top-bg: rgba(255,255,255,.92); --tile-a: var(--brand-50); --tile-b: #FFFFFF; --hero-glow: var(--brand-100);
  --tile-ink: var(--brand-800); --tile-ink-2: var(--brand-700); --tile-line: var(--brand-200);
  color-scheme: light dark;
}
/* 어두운 모드 토큰 — 네이비·코발트 글자를 어두운 바탕에 쓰지 않는다(가독성) */
@media (prefers-color-scheme: dark) {
  :root {
    --gray-0: #0F1115; --gray-50: #161A21; --gray-100: #1D222B; --gray-200: #2A303A; --gray-300: #3A424F;
    --gray-400: #5B6675; --gray-500: #98A2B3; --gray-600: #B4BCC8; --gray-700: #D6DBE3; --gray-900: #F4F6F9;
    --ink: #F4F6F9; --ink-2: #D6DBE3; --muted: #B4BCC8; --faint: #98A2B3;
    --bg: #0F1115; --bg-soft: #13161C; --surface: #171B22; --line: #2A303A;
    --accent: #7AA5FF; --accent-soft: #1B2740; --brand-600: #93B4FD; --brand-700: #BFD3FE; --brand-800: #DBE6FE;
    --st-urgent: #FF6B5E; --st-soon: #FDB022; --urgent-soft: #3A1714; --soon-soft: #33260A;
    --shadow: 0 1px 2px rgba(0,0,0,.4);
    --top-bg: rgba(15,17,21,.9); --tile-a: #1A2236; --tile-b: #171B22; --hero-glow: #1E2A48;
    --tile-ink: #F4F6F9; --tile-ink-2: #BFD3FE; --tile-line: #34405A;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 76px; }
@media (max-width: 600px) { html { scroll-padding-top: 140px; } .tabs { top: 88px; } }
body {
  margin: 0; background: var(--bg); color: var(--ink); line-height: 1.6; font-size: 16px;
  font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", sans-serif;
  word-break: keep-all; overflow-wrap: anywhere; letter-spacing: -0.01em;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
main, .top-in, .foot-in { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { main, .top-in, .foot-in { padding: 0 24px; } }
[hidden] { display: none !important; }

/* 머리말 */
.top { position: sticky; top: 0; z-index: 20; background: var(--top-bg); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.top-in { display: flex; align-items: center; gap: 12px; min-height: 60px; }
.brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; color: var(--ink); font-size: 19px; letter-spacing: -0.04em; white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand-mark { width: 26px; height: 26px; flex: 0 0 26px; }
.brand-sub { font-size: 14px; font-weight: 700; color: var(--muted); margin-right: 1px; letter-spacing: -0.02em; }
.top nav { display: flex; gap: 2px; margin-left: auto; overflow-x: auto; scrollbar-width: none; }
.top nav::-webkit-scrollbar { display: none; }
.top nav a { color: var(--ink-2); font-size: 15px; font-weight: 600; padding: 8px 12px; border-radius: var(--r-pill); white-space: nowrap; }
.top nav a:hover { background: var(--gray-100); text-decoration: none; }
.top nav a.nav-cta { background: var(--gray-900); color: #fff; margin-left: 4px; }
.top nav a.nav-cta:hover { background: var(--gray-700); }
@media (max-width: 600px) {
  .top-in { flex-wrap: wrap; gap: 0; padding-top: 8px; }
  .top nav { margin: 0 -16px; padding: 6px 12px 8px; width: calc(100% + 32px); }
  .top nav a { font-size: 14px; padding: 6px 11px; }
}

/* 제목·본문 */
h1 { font-size: 30px; line-height: 1.3; margin: 28px 0 8px; font-weight: 800; letter-spacing: -0.035em; }
h2 { font-size: 22px; line-height: 1.35; margin: 44px 0 14px; font-weight: 800; letter-spacing: -0.03em; }
h3 { font-size: 17px; margin: 18px 0 8px; font-weight: 700; letter-spacing: -0.02em; }
@media (min-width: 720px) { h1 { font-size: 40px; } h2 { font-size: 24px; } }
.lead { color: var(--muted); font-size: 16px; margin: 0 0 20px; }
.note { font-size: 14px; color: var(--muted); }
.crumb { font-size: 14px; color: var(--muted); margin: 24px 0 0; }
.crumb a { color: var(--muted); }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 52px 0 14px; }
.sec-head h2 { margin: 0; }
.sec-head > a { font-size: 15px; font-weight: 700; white-space: nowrap; }
.sec-sub { color: var(--muted); font-size: 14px; margin: -8px 0 16px; }

/* 버튼·칩 */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 48px; padding: 0 20px; border-radius: var(--r); font-weight: 700; font-size: 16px; background: var(--accent); color: #fff; border: 0; cursor: pointer; font-family: inherit; }
.btn:hover { text-decoration: none; background: var(--brand-600); }
.btn-ghost { background: var(--gray-100); color: var(--ink); }
.btn-ghost:hover { background: var(--gray-200); }
.btn-dark { background: var(--gray-900); }
.btn-dark:hover { background: var(--gray-700); }
.btn-block { width: 100%; }
.chips { display: inline-flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 4px; min-height: 38px; padding: 0 16px; border-radius: var(--r-pill); border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-size: 15px; font-weight: 600; cursor: pointer; font-family: inherit; white-space: nowrap; }
.chip:hover { border-color: var(--gray-300); text-decoration: none; }
.chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.chip .n { font-weight: 500; opacity: .65; font-size: 13px; }
.chip-soft { background: var(--accent-soft); border-color: var(--brand-200); color: var(--brand-700); }
.filters { margin: 4px 0 18px; }
.filter-label { font-size: 13px; font-weight: 700; color: var(--faint); margin: 14px 0 6px; }
.filter-row { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.filter-row::-webkit-scrollbar { display: none; }
@media (min-width: 720px) { .filter-row { flex-wrap: wrap; overflow: visible; } }
.result-bar { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; margin: 4px 0 14px; font-size: 15px; color: var(--muted); }
.result-bar b { color: var(--ink); }

/* 상태 배지 */
.st { display: inline-flex; align-items: center; height: 26px; padding: 0 10px; border-radius: var(--r-pill); font-size: 13px; font-weight: 700; white-space: nowrap; }
.st-open { background: var(--accent); color: #fff; }
.st-urgent { background: var(--st-urgent); color: #fff; }
.st-soon { background: var(--soon-soft); color: var(--st-soon); }
.st-closed, .st-unknown { background: var(--gray-100); color: var(--muted); }

/* 카드 그리드 */
.grid, .race-grid { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .grid, .race-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .grid, .race-grid { grid-template-columns: repeat(3, 1fr); gap: 20px; } }

/* 국내 카드 — 포스터 대신 날짜 타일(주최측 이미지 미사용) */
.dcard { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; color: var(--ink); box-shadow: var(--shadow); transition: transform .12s ease, box-shadow .12s ease; }
.dcard:hover { text-decoration: none; transform: translateY(-2px); box-shadow: 0 2px 4px rgba(16,24,40,.06), 0 10px 24px rgba(16,24,40,.10); }
.dtile { position: relative; display: flex; align-items: flex-end; gap: 12px; min-height: 116px; padding: 16px 18px; background: linear-gradient(135deg, var(--tile-a), var(--tile-b) 72%); border-bottom: 1px solid var(--line); }
.dtile .st { position: absolute; top: 14px; left: 14px; }
.dtile .dday { position: absolute; top: 18px; right: 18px; }
.dtile-date { display: flex; align-items: baseline; gap: 6px; line-height: 1; }
.dtile-date b { font-size: 44px; font-weight: 800; letter-spacing: -0.05em; color: var(--tile-ink); }
.dtile-date span { font-size: 15px; font-weight: 700; color: var(--tile-ink-2); }
.dtile-region { margin-left: auto; font-size: 13px; font-weight: 700; color: var(--tile-ink-2); background: var(--surface); border: 1px solid var(--tile-line); border-radius: var(--r-pill); padding: 2px 10px; }
.dcard-body { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px 18px; flex: 1; }
.dcard-name { font-size: 18px; font-weight: 800; line-height: 1.4; letter-spacing: -0.025em; }
.dcard-meta { font-size: 14px; color: var(--muted); }
.dcard-dist { font-size: 14px; font-weight: 700; color: var(--ink-2); }
.dcard-foot { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--gray-100); font-size: 14px; color: var(--muted); display: flex; justify-content: space-between; gap: 8px; }
.dcard[data-state="closed"] .dtile { background: var(--gray-50); }
.dcard[data-state="closed"] .dtile-date b, .dcard[data-state="closed"] .dtile-date span { color: var(--gray-600); }

/* 해외 카드(사진) */
.rcard { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; color: var(--ink); box-shadow: var(--shadow); transition: transform .12s ease; }
.rcard:hover { text-decoration: none; transform: translateY(-2px); }
.rcard-tile { position: relative; aspect-ratio: 16 / 9; background: #1E3A8A; overflow: hidden; }
.tile-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.rcard-tile::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0) 45%, rgba(0,0,0,.55)); }
.rcard-tile > span { position: absolute; z-index: 1; }
.rcard-city { left: 16px; bottom: 12px; color: #fff; font-size: 22px; font-weight: 800; letter-spacing: -0.03em; }
.rcard-open { left: 14px; top: 14px; background: var(--accent); color: #fff; font-size: 13px; font-weight: 700; padding: 3px 10px; border-radius: var(--r-pill); }
.rcard-dday { right: 14px; top: 14px; background: rgba(255,255,255,.92); color: var(--ink); font-size: 13px; font-weight: 800; padding: 3px 10px; border-radius: var(--r-pill); }
.rcard-body { display: flex; flex-direction: column; gap: 2px; padding: 16px 18px 18px; }
.rcard-where { font-size: 13px; color: var(--faint); font-weight: 600; }
.rcard h3 { margin: 0; font-size: 18px; font-weight: 800; }
.rcard-date { font-size: 14px; color: var(--muted); }
.rcard-fee { font-size: 14px; font-weight: 700; color: var(--ink-2); }
.tile-jp { background: #9F1239; } .tile-th { background: #92400E; } .tile-gb { background: #1E3A8A; }

/* 홈 히어로 */
.hero { background: radial-gradient(900px 360px at 90% -20%, var(--hero-glow), transparent 60%), linear-gradient(180deg, var(--tile-a), var(--bg) 85%); border-bottom: 1px solid var(--line); }
.hero-in { max-width: var(--wrap); margin: 0 auto; padding: 36px 16px 32px; }
@media (min-width: 720px) { .hero-in { padding: 64px 24px 52px; } }
.eyebrow { display: inline-flex; gap: 6px; align-items: center; font-size: 14px; font-weight: 700; color: var(--tile-ink-2); background: var(--surface); border: 1px solid var(--tile-line); border-radius: var(--r-pill); padding: 4px 12px; margin: 0 0 16px; }
.hero h1 { margin: 0 0 12px; font-size: 34px; line-height: 1.25; }
@media (min-width: 720px) { .hero h1 { font-size: 54px; letter-spacing: -0.045em; } }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero .lead { font-size: 17px; max-width: 560px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 10px; margin: 20px 0 24px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; max-width: 560px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; }
.stat b { display: block; font-size: 24px; font-weight: 800; letter-spacing: -0.03em; }
.stat span { font-size: 13px; color: var(--muted); }

/* 곧 마감 — 가로 스크롤 */
.hscroll { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 -16px; padding: 2px 16px 10px; scrollbar-width: none; }
.hscroll::-webkit-scrollbar { display: none; }
@media (min-width: 960px) { .hscroll { display: grid; grid-template-columns: repeat(4, 1fr); overflow: visible; margin: 0; padding: 0; } }
.ccard { flex: 0 0 240px; scroll-snap-align: start; display: flex; flex-direction: column; gap: 6px; padding: 16px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.ccard:hover { text-decoration: none; border-color: var(--brand-300); }
.ccard-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.ccard-kind { font-size: 13px; font-weight: 700; color: var(--faint); }
.ccard-name { font-size: 17px; font-weight: 800; line-height: 1.4; letter-spacing: -0.02em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ccard-close { margin-top: auto; font-size: 14px; color: var(--muted); }
.ccard .dday { font-size: 22px; }
.ccard-open { border-color: var(--brand-200); background: linear-gradient(180deg, var(--accent-soft), var(--surface) 60%); }
.ccard .dday-open { color: var(--accent); }

.dday { font-size: 13px; font-weight: 800; color: var(--ink-2); white-space: nowrap; }
.dday.over { font-weight: 500; color: var(--faint); }
.dday.soon { color: var(--st-urgent); }

.banner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 22px 24px; border-radius: var(--r-lg); background: var(--gray-900); color: #fff; margin: 52px 0 0; }
.banner:hover { text-decoration: none; background: var(--gray-700); }
.banner b { display: block; font-size: 19px; letter-spacing: -0.02em; }
.banner small { color: var(--gray-300); font-size: 14px; }
.banner-arrow { font-size: 22px; }

/* 국내 상세 */
.detail { max-width: 760px; margin: 0 auto; }
.detail h1 { margin-top: 12px; }
.detail-badges { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 16px; }
.info { border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow); margin: 20px 0; overflow: hidden; }
.info-row { display: flex; gap: 14px; padding: 16px 18px; border-top: 1px solid var(--line); }
.info-row:first-child { border-top: 0; }
.info-ic { flex: 0 0 36px; height: 36px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; }
.info-ic svg, .ic svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.info-body { flex: 1; min-width: 0; }
.info-k { display: block; font-size: 13px; color: var(--faint); font-weight: 600; }
.info-v { display: block; font-size: 17px; font-weight: 700; }
.info-v small { font-weight: 500; color: var(--muted); font-size: 14px; }
.fees { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin-top: 8px; }
.fee { display: flex; justify-content: space-between; gap: 8px; background: var(--gray-50); border-radius: var(--r-sm); padding: 10px 12px; font-size: 15px; }
.fee b { font-weight: 800; }
.info-actions { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); }
.info-actions a { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 52px; font-weight: 700; font-size: 15px; color: var(--ink-2); }
.info-actions a + a { border-left: 1px solid var(--line); }
.info-actions a:hover { background: var(--gray-50); text-decoration: none; }
.evidence { background: var(--gray-50); border-radius: var(--r); padding: 14px 16px; font-size: 14px; color: var(--muted); }
.evidence q { color: var(--ink-2); }

/* 타임라인 */
.month { color: var(--ink-2); font-size: 16px; margin: 24px 0 8px; font-weight: 800; }
.timeline { list-style: none; margin: 0; padding: 0 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); }
.tl { display: flex; gap: 14px; align-items: center; padding: 14px 0; border-top: 1px solid var(--gray-100); }
.tl:first-child { border-top: 0; }
.tl-day { width: 42px; flex-shrink: 0; display: flex; flex-direction: column; align-items: center; line-height: 1.2; }
.tl-day b { font-size: 22px; font-weight: 800; }
.tl-day span { font-size: 12px; color: var(--faint); }
.tl-body { display: flex; flex-direction: column; gap: 1px; min-width: 0; flex: 1; }
.tl-name { font-size: 16px; font-weight: 700; color: var(--ink); }
.tl-label { font-size: 14px; color: var(--muted); line-height: 1.45; }
.kind { font-size: 12px; font-weight: 700; }
.k-entry_open { color: var(--accent); } .k-entry_close, .k-payment_close { color: var(--st-urgent); }
.k-lottery_result { color: #6B36C4; } .k-race { color: var(--ink); } .k-expo, .k-other { color: var(--muted); }
.more { margin-top: 12px; }
.more summary { cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: center; min-height: 48px; border-radius: var(--r); background: var(--gray-100); font-weight: 700; color: var(--ink-2); }
.more summary::-webkit-details-marker { display: none; }
.more[open] summary { display: none; }

/* 해외 상세(기존 마크업) */
.race-hero { position: relative; color: #fff; background: #1E3A8A; overflow: hidden; }
.race-hero.has-photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.15), rgba(0,0,0,.65)); }
.race-hero-in { position: relative; z-index: 1; max-width: var(--wrap); margin: 0 auto; padding: 72px 16px 28px; }
@media (min-width: 720px) { .race-hero-in { padding: 120px 24px 40px; } }
.race-hero .crumb, .race-hero .crumb a { color: rgba(255,255,255,.85); margin: 0; }
.race-hero h1 { margin: 6px 0 2px; }
.race-hero .en { color: rgba(255,255,255,.8); margin: 0; }
.race-when { font-weight: 700; margin: 10px 0 0; }
.race-hero .dday { color: #fff; }
.photo-credit { font-size: 12px; color: rgba(255,255,255,.7); margin: 10px 0 0; }
.photo-credit a { color: rgba(255,255,255,.85); }
.tabs { position: sticky; top: 60px; z-index: 10; background: var(--surface); border-bottom: 1px solid var(--line); }
.tabs-in { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; display: flex; gap: 4px; overflow-x: auto; }
.tabs a { padding: 14px 12px; font-weight: 700; color: var(--muted); white-space: nowrap; }
.tabs a:hover { color: var(--ink); text-decoration: none; }
.race { max-width: 760px; margin: 0 auto; }
.race section { padding-top: 8px; }
.summary { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; margin: 24px 0; }
@media (min-width: 640px) { .summary { grid-template-columns: repeat(4, 1fr); } }
.summary > div { background: var(--surface); padding: 14px 16px; display: flex; flex-direction: column; }
.k { font-size: 13px; color: var(--faint); font-weight: 600; }
.v { font-size: 16px; font-weight: 800; }
.callout { border-radius: var(--r); padding: 14px 16px; margin: 16px 0; font-size: 15px; }
.callout b { display: block; margin-bottom: 2px; }
.c-open { background: var(--accent-soft); color: var(--brand-800); }
.c-closed { background: var(--gray-100); color: var(--ink-2); }
.tbl { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 15px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.tbl th, .tbl td { padding: 12px 14px; border-top: 1px solid var(--line); text-align: left; vertical-align: top; }
.tbl th { background: var(--gray-50); font-size: 13px; color: var(--muted); border-top: 0; }
.tbl tr.past td { color: var(--faint); }
.tbl tr.past .badge { opacity: .55; }
.nowrap { white-space: nowrap; }
.tba { font-size: 12px; color: var(--st-soon); font-weight: 700; }
.badge { display: inline-block; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 6px; background: var(--gray-100); white-space: nowrap; }
.b-entry_open { background: var(--accent-soft); color: var(--brand-700); }
.b-entry_close, .b-payment_close { background: var(--urgent-soft); color: var(--st-urgent); }
.b-lottery_result { background: #F4F0FF; color: #6B36C4; }
.hint { background: var(--soon-soft); border-radius: var(--r); padding: 14px 16px; margin: 14px 0; font-size: 15px; }
.agents { list-style: none; padding: 0; margin: 0; border: 1px solid var(--line); border-radius: var(--r); }
.agents li { padding: 12px 14px; border-top: 1px solid var(--line); }
.agents li:first-child { border-top: 0; }
.panel { border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px; margin: 14px 0; }
.panel-title { font-weight: 800; margin: 0 0 10px; }
.plan { list-style: none; margin: 0; padding: 0; }
.plan li { display: flex; gap: 12px; padding: 8px 0; border-top: 1px solid var(--gray-100); }
.plan li:first-child { border-top: 0; }
.plan-d { flex: 0 0 64px; font-weight: 800; color: var(--muted); }
.plan-race .plan-d { color: var(--accent); }
.plan-t { display: flex; flex-direction: column; }
.plan-t small { color: var(--muted); }
.stay { font-size: 18px; font-weight: 800; margin: 0 0 10px; }
.trip-links { display: flex; flex-wrap: wrap; gap: 8px; }
.cta-bar { position: sticky; bottom: 0; z-index: 15; background: var(--top-bg); backdrop-filter: blur(8px); border-top: 1px solid var(--line); margin-top: 32px; }
.cta-in { max-width: 760px; margin: 0 auto; padding: 10px 16px; display: grid; grid-template-columns: auto 1fr; gap: 8px; }
.cta-in .btn { white-space: nowrap; padding: 0 16px; }
.sub-links { display: inline-flex; flex-wrap: wrap; gap: 8px; }
.sub-list { list-style: none; padding: 0; margin: 0; border: 1px solid var(--line); border-radius: var(--r-lg); }
.sub-list li { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--line); }
.sub-list li:first-child { border-top: 0; }
.sources ul { padding-left: 18px; }
.checked { font-size: 13px; color: var(--faint); }
.count { color: var(--accent); }
.empty { color: var(--muted); padding: 32px 0; text-align: center; }

/* 검색(해외) */
.search-card { border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px; margin: 0 0 18px; display: grid; gap: 12px; background: var(--bg-soft); }
.search-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.field { display: flex; flex-direction: column; gap: 4px; }
.field span { font-size: 13px; font-weight: 700; color: var(--faint); }
.field select { min-height: 44px; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--surface); padding: 0 10px; font: inherit; }
.seg { display: flex; flex-wrap: wrap; gap: 8px; }
.seg label { cursor: pointer; position: relative; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: inline-flex; align-items: center; min-height: 38px; padding: 0 16px; border-radius: var(--r-pill); border: 1px solid var(--line); background: var(--surface); font-weight: 600; font-size: 15px; }
.seg input:checked + span { background: var(--accent); border-color: var(--accent); color: #fff; }
.seg input:focus-visible + span { outline: 2px solid var(--brand-300); outline-offset: 2px; }
.check { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 600; }
.check input { width: 18px; height: 18px; }

/* 꼬리말 */
.foot { margin-top: 72px; border-top: 1px solid var(--line); background: var(--bg-soft); }
.foot-in { padding-top: 28px; padding-bottom: 40px; font-size: 14px; color: var(--muted); }
.foot-brand { font-weight: 800; color: var(--ink); font-size: 16px; margin: 0 0 6px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 12px 0; }
.foot-links a { color: var(--ink-2); font-weight: 600; }
.foot p { margin: 4px 0; }

/* 문서형 페이지 */
.doc { max-width: 720px; }
.doc h2 { font-size: 20px; margin: 32px 0 8px; }
.doc p, .doc li { color: var(--ink-2); }

/* 어두운 모드 컴포넌트 보정 — 파일 끝에 둬야 기본 규칙을 덮는다 */
@media (prefers-color-scheme: dark) {
  .st-open, .rcard-open { color: #0B1220; }
  .chip[aria-pressed="true"] { color: #0B1220; }
  .btn { color: #0B1220; }
  .btn-ghost, .btn-dark { color: var(--ink); }
  .top nav a.nav-cta { background: var(--ink); color: #0B1220; }
  .banner { background: #1D222B; border: 1px solid var(--line); color: var(--ink); }
  .banner:hover { background: #262C36; }
  .top nav a.nav-cta:hover { background: var(--ink-2); }
  .banner small { color: var(--muted); }
  .rcard-dday { background: rgba(23,27,34,.92); color: var(--ink); }
}
