/* 도쿄 2026 겨울 v2 — "겨울 도쿄의 밤 + 종이 일정표" */
:root {
  --bg: #F7F4EE; --surface: #FFFFFF; --surface-2: #EFEAE1; --ink: #1D1B18; --ink-2: #6B655C; --ink-3: #9A9387;
  --line: #E2DCD1; --accent: #C8102E; --accent-ink: #fff; --warn: #9A5B00; --warn-bg: #FBEFD9; --ok: #2E7D4F; --ok-bg: #E3F1E8;
  --d1: #C2255C; --d2: #1971C2; --d3: #237032; --d4: #6741D9; --d5: #B35C00;
  --shadow: 0 1px 2px rgba(40, 30, 10, .06), 0 4px 14px rgba(40, 30, 10, .06);
  --shadow-lg: 0 -6px 30px rgba(20, 15, 5, .16);
  --r: 14px; --tab-h: 56px; --safe-b: env(safe-area-inset-bottom, 0px); --safe-t: env(safe-area-inset-top, 0px);
  --ease: cubic-bezier(.2, .8, .2, 1);
  --font: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Pretendard Variable", Pretendard, "Noto Sans KR", "Hiragino Sans", "Noto Sans JP", sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0F1420; --surface: #182033; --surface-2: #212B42; --ink: #ECEFF5; --ink-2: #9AA3B5; --ink-3: #6E7890;
    --line: #2A3550; --accent: #FF5A6E; --accent-ink: #1a0508; --warn: #F2B84B; --warn-bg: #3A2F17; --ok: #5CC98A; --ok-bg: #173226;
    --d1: #F06595; --d2: #4DABF7; --d3: #51CF66; --d4: #9775FA; --d5: #FFA94D;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 18px rgba(0, 0, 0, .25); --shadow-lg: 0 -8px 30px rgba(0, 0, 0, .5);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0F1420; --surface: #182033; --surface-2: #212B42; --ink: #ECEFF5; --ink-2: #9AA3B5; --ink-3: #6E7890;
  --line: #2A3550; --accent: #FF5A6E; --accent-ink: #1a0508; --warn: #F2B84B; --warn-bg: #3A2F17; --ok: #5CC98A; --ok-bg: #173226;
  --d1: #F06595; --d2: #4DABF7; --d3: #51CF66; --d4: #9775FA; --d5: #FFA94D;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 18px rgba(0, 0, 0, .25); --shadow-lg: 0 -8px 30px rgba(0, 0, 0, .5);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.6 var(--font);
  word-break: keep-all; overflow-wrap: anywhere; -webkit-font-smoothing: antialiased;
  padding-bottom: calc(var(--tab-h) + var(--safe-b) + 24px); min-height: 100dvh; overflow-x: hidden;
}
body.sheet-open { overflow: hidden; }
h1, h2, h3 { text-wrap: balance; margin: 0; line-height: 1.3; letter-spacing: -0.01em; }
p { margin: 0; }
a { color: inherit; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[lang="ja"] { font-family: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", var(--font); }
.ic { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; flex: none; }
:focus-visible { outline: 2px solid var(--d2); outline-offset: 2px; }

#app { display: block; max-width: 640px; margin: 0 auto; padding: calc(var(--safe-t)) 16px 0; outline: none; }
.empty { color: var(--ink-2); text-align: center; padding: 32px 8px; }

/* ---------- 하단 탭바 ---------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: flex; justify-content: space-around;
  height: calc(var(--tab-h) + var(--safe-b)); padding-bottom: var(--safe-b);
  background: color-mix(in srgb, var(--surface) 94%, transparent); border-top: 1px solid var(--line);
  backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px);
}
.tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; text-decoration: none; color: var(--ink-3); font-size: 11px; font-weight: 600; min-height: 44px; }
.tabbar a .ic { width: 24px; height: 24px; }
.tabbar a.on { color: var(--ink); }
.tabbar a.on .ic { color: var(--accent); stroke-width: 2.1; }

/* ---------- 오프라인 배지 ---------- */
.offline { position: fixed; top: calc(var(--safe-t) + 8px); left: 50%; transform: translateX(-50%); z-index: 60; display: flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 99px; background: var(--ink); color: var(--bg); font-size: 12.5px; font-weight: 600; box-shadow: var(--shadow); white-space: nowrap; }
.offline .ic { width: 16px; height: 16px; }
body.is-offline #app { padding-top: calc(var(--safe-t) + 40px); }

/* ---------- 공용 ---------- */
.eyebrow { font-size: 13px; font-weight: 600; color: var(--ink-2); letter-spacing: .01em; display: flex; align-items: center; gap: 6px; }
.eyebrow .ic { width: 16px; height: 16px; }
.cdot { width: 8px; height: 8px; border-radius: 50%; background: var(--c, var(--ink-2)); display: inline-block; flex: none; }
.card { background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow); padding: 14px 16px; }
.sec { margin: 26px 0 0; }
.sec-h { display: flex; align-items: center; gap: 8px; margin: 0 2px 10px; }
.sec-h h2 { font-size: 19px; font-weight: 700; flex: 1; display: flex; align-items: baseline; gap: 8px; }
.sec-sub { font-size: 13.5px; color: var(--ink-2); margin: -6px 2px 10px; }
.count { font-size: 13.5px; font-weight: 600; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.more { font-size: 13.5px; font-weight: 600; color: var(--ink-2); text-decoration: none; display: flex; align-items: center; gap: 2px; min-height: 32px; }
.more .ic { width: 16px; height: 16px; }
.hscroll { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: 16px; margin: 0 -16px; padding: 2px 16px 8px; scrollbar-width: none; }
.hscroll::-webkit-scrollbar { display: none; }
.hscroll > * { scroll-snap-align: start; flex: none; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 0 16px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); font-weight: 600; font-size: 15px; text-decoration: none; white-space: nowrap; }
.btn.sm { min-height: 36px; padding: 0 12px; font-size: 14px; border-radius: 10px; }
.btn.primary { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn.ghost { background: transparent; }
.btn.block { width: 100%; }
.btn .ic { width: 18px; height: 18px; }
.btn:disabled { opacity: .5; }
.icon-btn { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; border-radius: 12px; border: 0; background: transparent; color: var(--ink); text-decoration: none; flex: none; }
.icon-btn.sm { width: 36px; height: 36px; }
.icon-btn .ic { width: 22px; height: 22px; }
.hint { display: flex; gap: 6px; align-items: flex-start; font-size: 13.5px; color: var(--ink-2); margin: 8px 0; }
.hint .ic { width: 16px; height: 16px; margin-top: 3px; }
.hint.warn { color: var(--warn); }
.pbar { display: block; height: 6px; border-radius: 3px; background: var(--surface-2); overflow: hidden; flex: 1; }
.pbar i { display: block; height: 100%; background: var(--c, var(--ok)); border-radius: 3px; }
.tag { display: inline-block; font-size: 11.5px; font-weight: 700; padding: 1px 7px; border-radius: 6px; background: var(--surface-2); color: var(--ink-2); white-space: nowrap; }
.tag-main { background: var(--ink); color: var(--bg); }
.foot-link { text-align: center; margin: 24px 0 8px; font-size: 14px; color: var(--ink-2); }
.foot-link a { display: inline-flex; align-items: center; gap: 4px; text-decoration: none; min-height: 36px; }
.foot-link .ic { width: 16px; height: 16px; }
.build-info, .now-override { display: flex; justify-content: center; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink-3); margin: 20px 0 0; }
.build-info .ic, .now-override .ic { width: 14px; height: 14px; }

/* 배지 */
.bdgs { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.bdg { display: inline-flex; align-items: center; gap: 3px; height: 22px; padding: 0 7px; border-radius: 6px; font-size: 12px; font-weight: 600; white-space: nowrap; background: var(--surface-2); color: var(--ink-2); max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.bdg .ic { width: 13px; height: 13px; stroke-width: 2; }
.bdg-verify { background: var(--warn-bg); color: var(--warn); }
.bdg-cash { background: color-mix(in srgb, var(--d5) 14%, var(--surface)); color: color-mix(in srgb, var(--d5) 80%, var(--ink)); }
.bdg-resv, .bdg-ticket { background: color-mix(in srgb, var(--accent) 12%, var(--surface)); color: var(--accent); }
.bdg-free { background: var(--ok-bg); color: var(--ok); }
.bdg-pass, .bdg-ic { background: color-mix(in srgb, var(--d2) 13%, var(--surface)); color: color-mix(in srgb, var(--d2) 85%, var(--ink)); }
.bdg-price { font-variant-numeric: tabular-nums; }
.bdg-must { background: var(--accent); color: var(--accent-ink); }
.due { font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 99px; background: var(--surface-2); color: var(--ink-2); white-space: nowrap; font-variant-numeric: tabular-nums; flex: none; }
.due.due-soon { background: var(--warn-bg); color: var(--warn); }
.due.due-today { background: var(--accent); color: var(--accent-ink); }
.due.due-past { background: color-mix(in srgb, var(--accent) 14%, var(--surface)); color: var(--accent); }

/* 체크 */
.chks { padding: 4px 6px; }
.chk { display: flex; align-items: flex-start; gap: 10px; padding: 10px 8px; min-height: 44px; border-radius: 10px; cursor: pointer; position: relative; }
.chks .chk + .chk { border-top: 1px solid var(--line); border-radius: 0; }
.chk input { position: absolute; opacity: 0; pointer-events: none; }
.chk .box { width: 24px; height: 24px; border-radius: 7px; border: 2px solid var(--ink-3); display: flex; align-items: center; justify-content: center; flex: none; margin-top: 1px; transition: background .15s, border-color .15s; }
.chk .box .ic { width: 16px; height: 16px; stroke-width: 3; color: var(--bg); opacity: 0; }
.chk.on .box { background: var(--ok); border-color: var(--ok); }
.chk.on .box .ic { opacity: 1; }
.chk.on .chk-t { color: var(--ink-2); }
.chk.on .chk-t > :not(.chk-subs) { text-decoration: line-through; text-decoration-color: var(--ink-3); }
.chk input:focus-visible + .box { outline: 2px solid var(--d2); outline-offset: 2px; }
.chk-t { flex: 1; min-width: 0; font-size: 15px; line-height: 1.5; }
.chk-t a { color: inherit; text-decoration-color: var(--ink-3); }
.chk-subs { display: block; margin-top: 4px; font-size: 13px; color: var(--ink-2); }
.chk-subs span { display: block; }
.chk-subs span::before { content: "· "; }

/* ---------- 페이지 헤더 ---------- */
.phead { display: flex; align-items: flex-start; gap: 4px; padding: 18px 0 6px; }
.phead .back { margin-left: -10px; margin-top: -4px; }
.phead-t { flex: 1; min-width: 0; }
.phead h1 { font-size: 28px; font-weight: 800; letter-spacing: -0.02em; }
.phead-sub { font-size: 14px; color: var(--ink-2); margin-top: 4px; }

/* ---------- 홈 ---------- */
.home { padding-top: 12px; }
.ticket { position: relative; background: #1B2236; color: #F4F1EA; border-radius: 20px; overflow: hidden; box-shadow: var(--shadow); }
:root[data-theme="dark"] .ticket { background: #1E2840; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .ticket { background: #1E2840; } }
.ticket::before { content: ""; position: absolute; inset: 0; background: radial-gradient(120% 80% at 100% 0%, rgba(240, 192, 64, .18), transparent 55%), radial-gradient(80% 70% at 0% 100%, rgba(194, 37, 92, .22), transparent 60%); pointer-events: none; }
.ticket-top { position: relative; padding: 22px 22px 18px; }
.ticket .eyebrow { color: rgba(244, 241, 234, .66); letter-spacing: .12em; font-size: 12px; }
.dday-num { font-size: 56px; font-weight: 800; line-height: 1.05; letter-spacing: -0.03em; margin-top: 8px; font-variant-numeric: tabular-nums; }
.dday-num.sm { font-size: 40px; }
.hero-sub { font-size: 15px; color: rgba(244, 241, 234, .82); margin-top: 6px; }
.ticket-perf { position: relative; height: 0; border-top: 2px dashed rgba(244, 241, 234, .22); margin: 0 18px; }
.ticket-perf::before, .ticket-perf::after { content: ""; position: absolute; top: -11px; width: 20px; height: 20px; border-radius: 50%; background: var(--bg); }
.ticket-perf::before { left: -29px; } .ticket-perf::after { right: -29px; }
.ticket-days { position: relative; display: grid; grid-template-columns: repeat(5, 1fr); padding: 14px 14px 16px; gap: 6px; }
.ticket-days a { text-decoration: none; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 4px 0; border-radius: 10px; }
.ticket-days i { width: 100%; max-width: 44px; height: 5px; border-radius: 3px; background: var(--c); margin-bottom: 6px; }
.ticket-days b { font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.1; }
.ticket-days span { font-size: 12px; color: rgba(244, 241, 234, .6); }
.ticket.after .stats3 { position: relative; display: grid; grid-template-columns: 1fr 1fr 1.6fr; padding: 14px 18px 18px; gap: 8px; }
.stats3 div { display: flex; flex-direction: column; }
.stats3 b { font-size: 20px; font-weight: 800; }
.stats3 span { font-size: 12px; color: rgba(244, 241, 234, .65); }
.empty-ok { display: flex; gap: 8px; align-items: center; color: var(--ok); font-weight: 600; }

.musteat { padding: 14px 12px 8px; }
.me-h { display: flex; align-items: center; gap: 10px; padding: 0 4px 6px; }
.me-h b { font-size: 17px; }
.me-h .pbar { max-width: 120px; margin-left: auto; }
.me-list { display: grid; grid-template-columns: 1fr; }
.chk.me { align-items: center; padding: 8px 6px; }
.me-list .chk + .chk { border-top: 1px solid var(--line); border-radius: 0; }
.me-emoji { font-size: 24px; line-height: 1; width: 30px; text-align: center; flex: none; }
.chk.me .chk-t b { display: block; font-size: 15.5px; }
.chk.me .chk-t small { display: block; font-size: 13px; color: var(--ink-2); }
.chk.me.must .chk-t b::after { content: "필수"; font-size: 10.5px; font-weight: 700; color: var(--accent); border: 1px solid currentColor; border-radius: 5px; padding: 0 4px; margin-left: 6px; vertical-align: 2px; }

.covers { padding-bottom: 10px; }
.cover { width: 220px; min-height: 148px; background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow); padding: 0 14px 14px; text-decoration: none; display: flex; flex-direction: column; gap: 6px; position: relative; overflow: hidden; }
.cover-band { display: block; height: 5px; margin: 0 -14px 6px; background: var(--c); }
.cover-d { font-size: 13px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.cover-d b { color: var(--c); font-weight: 700; }
.cover h3 { font-size: 17px; font-weight: 700; }
.cover-hl { font-size: 13px; color: var(--ink-2); display: flex; gap: 5px; margin-top: auto; line-height: 1.45; }
.cover-hl .ic { width: 14px; height: 14px; margin-top: 2px; }
.cover.on { outline: 2px solid var(--c); }
.budget-sum, .spend { display: flex; align-items: center; gap: 12px; text-decoration: none; margin-top: 16px; }
.budget-sum > div:first-child, .spend > div:first-child { flex: 1; }
.big { font-size: 26px; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.big.sm { font-size: 18px; }
.sub { font-size: 13px; color: var(--ink-2); }
.bars { display: flex; align-items: flex-end; gap: 5px; height: 52px; }
.bars span { width: 10px; height: var(--h); background: var(--c); border-radius: 3px; min-height: 4px; }
.spend-bar { display: flex; align-items: center; gap: 6px; width: 90px; font-size: 12px; color: var(--ink-2); }
.decisions { padding: 6px 14px; }
.dec { display: flex; gap: 10px; padding: 10px 0; }
.dec + .dec { border-top: 1px solid var(--line); }
.dec > .ic { color: var(--d2); margin-top: 2px; }
.dec p { font-size: 14.5px; margin-top: 4px; }
.a2hs { display: flex; gap: 12px; margin-top: 16px; background: var(--surface-2); box-shadow: none; }
.a2hs p { font-size: 13.5px; color: var(--ink-2); margin-top: 2px; }

.home-day { padding: 8px 2px 14px; }
.home-day h1 { font-size: 26px; font-weight: 800; margin-top: 4px; }
.now-card, .next-card { margin-top: 12px; padding: 14px 16px; }
.now-card { border: 2px solid var(--accent); }
.nc-h { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.nc-h b { font-weight: 800; }
.now-card .nc-h b { color: var(--accent); }
.nc-time { margin-left: auto; color: var(--ink-2); font-weight: 600; font-variant-numeric: tabular-nums; }
.live { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 20%, transparent); }
.nc-body { display: flex; gap: 12px; text-decoration: none; margin-top: 10px; align-items: flex-start; }
.nc-body h2 { font-size: 20px; font-weight: 700; }
.nc-ic { width: 40px; height: 40px; border-radius: 12px; background: color-mix(in srgb, var(--c) 13%, var(--surface)); color: var(--c); display: flex; align-items: center; justify-content: center; flex: none; }
.nc-body > div { min-width: 0; }
.nc-prog { display: flex; align-items: center; gap: 10px; margin-top: 12px; font-size: 13px; color: var(--ink-2); font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
.nc-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 10px; }
.nc-foot .bdgs { margin: 0; }
.go-now { display: flex; align-items: center; gap: 6px; margin-top: 10px; padding: 8px 10px; border-radius: 10px; background: var(--surface-2); font-size: 14px; }
.go-now .ic { width: 16px; height: 16px; color: var(--accent); }
.calm { display: flex; gap: 12px; align-items: center; margin-top: 12px; }
.calm > .ic { width: 28px; height: 28px; color: var(--d5); }
.calm p { font-size: 14px; color: var(--ink-2); }
.alerts { padding: 4px 14px; }
.alerts p { display: flex; gap: 10px; padding: 10px 0; font-size: 14.5px; align-items: flex-start; }
.alerts p + p { border-top: 1px solid var(--line); }
.alerts .ic { color: var(--warn); margin-top: 2px; }
.mini-tl { padding: 6px 8px; }
.mt-row { display: grid; grid-template-columns: 48px 14px 1fr; align-items: center; gap: 8px; min-height: 40px; padding: 2px 6px; text-decoration: none; border-radius: 8px; font-size: 14.5px; }
.mt-time { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--ink-2); font-size: 14px; }
.mt-dot { width: 9px; height: 9px; border-radius: 50%; border: 2px solid var(--c); justify-self: center; }
.mt-t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mt-row.past { opacity: .45; }
.mt-row.past .mt-dot { background: var(--c); }
.mt-row.cur { background: color-mix(in srgb, var(--accent) 9%, transparent); }
.mt-row.cur .mt-dot { background: var(--accent); border-color: var(--accent); }
.mt-row.cur .mt-t { font-weight: 700; }

/* ---------- 일정 ---------- */
.day-top { position: sticky; top: 0; z-index: 20; margin: 0 -16px; padding: calc(var(--safe-t) + 8px) 0 8px; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
body.is-offline .day-top { top: 40px; }
.chips { display: flex; gap: 6px; overflow-x: auto; padding: 0 16px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; display: inline-flex; align-items: center; gap: 4px; min-height: 40px; padding: 0 12px; border-radius: 12px; background: var(--surface-2); text-decoration: none; font-size: 14px; color: var(--ink-2); white-space: nowrap; border: 0; position: relative; font-variant-numeric: tabular-nums; }
.chip b { color: var(--ink); font-weight: 700; }
.chip.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow), inset 0 -3px 0 var(--c); }
.chip:not(.on)::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 5px; height: 2px; border-radius: 1px; background: var(--c); opacity: .55; }
.chip-today { font-style: normal; font-size: 10.5px; font-weight: 700; background: var(--accent); color: var(--accent-ink); border-radius: 5px; padding: 0 4px; margin-left: 2px; }
.chips.sm { padding: 0; margin: 10px 0; flex-wrap: wrap; overflow: visible; }
.chips.sm .chip { min-height: 36px; font-size: 13.5px; }
.chips.sm .chip.on { background: var(--ink); color: var(--bg); box-shadow: none; }
.chips.sm .chip::after { display: none; }
.sticky-chips { position: sticky; top: 0; z-index: 10; background: var(--bg); padding: 8px 0 !important; margin: 0 !important; flex-wrap: nowrap !important; overflow-x: auto !important; }

.day-hero { padding: 18px 2px 12px; }
.day-hero h1 { font-size: 26px; font-weight: 800; margin-top: 4px; letter-spacing: -0.02em; }
.day-hero .cdot { background: var(--c); width: 10px; height: 10px; }
.day-stats { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 8px; font-size: 14px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.day-stats span { display: inline-flex; align-items: center; gap: 4px; }
.day-stats .ic { width: 16px; height: 16px; }
.day-actions { display: flex; gap: 6px; margin-top: 12px; flex-wrap: wrap; }

.mini-map { height: 30vh; min-height: 200px; max-height: 320px; border-radius: var(--r); overflow: hidden; background: var(--surface-2); position: relative; box-shadow: var(--shadow); z-index: 1; transition: height .25s var(--ease); }
.mini-map.closed { height: 0; min-height: 0; box-shadow: none; }
.after-map { height: 42vh; }
.map-loading { display: flex; align-items: center; justify-content: center; gap: 8px; height: 100%; color: var(--ink-2); font-size: 14px; }
.map-cap { position: absolute; z-index: 500; left: 8px; top: 8px; display: flex; align-items: center; gap: 4px; background: var(--surface); padding: 0 4px 0 10px; border-radius: 10px; box-shadow: var(--shadow); font-size: 13px; color: var(--ink-2); }
.map-cap b { color: var(--ink); }
.map-cap a { display: inline-flex; align-items: center; gap: 3px; text-decoration: none; color: var(--ink); font-weight: 600; min-height: 34px; padding: 0 8px; margin-left: 4px; border-left: 1px solid var(--line); }
.map-cap .ic { width: 15px; height: 15px; }

.intro { margin-top: 16px; padding: 12px 14px; border-left: 3px solid var(--line); color: var(--ink-2); font-size: 15px; line-height: 1.65; }
.note { margin-top: 10px; font-size: 14px; color: var(--ink-2); }
.note p { margin: 4px 0; }

.timeline { position: relative; margin-top: 20px; }
.tl-row { display: grid; grid-template-columns: 50px 28px minmax(0, 1fr); column-gap: 6px; position: relative; }
.tl-row::before { content: ""; position: absolute; left: 69px; top: 0; bottom: 0; width: 2px; background: color-mix(in srgb, var(--c) 30%, var(--line)); }
.timeline > .tl-row:first-child::before { top: 18px; }
.timeline > .tl-row:last-of-type::before { bottom: calc(100% - 22px); }
.tl-time { font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; padding-top: 12px; text-align: right; line-height: 1.25; white-space: nowrap; }
.tl-time small { display: block; font-size: 12.5px; color: var(--ink-2); font-weight: 500; }
.tl-rail { display: flex; justify-content: center; padding-top: 10px; position: relative; z-index: 1; }
.pin-dot { width: 26px; height: 26px; border-radius: 50%; background: var(--cb, var(--c)); color: #fff; font-size: 13px; font-weight: 700; border: 2px solid var(--bg); box-shadow: 0 0 0 1px color-mix(in srgb, var(--c) 40%, transparent); display: flex; align-items: center; justify-content: center; padding: 0; font-variant-numeric: tabular-nums; }
.act-dot { width: 26px; height: 26px; border-radius: 50%; background: var(--bg); border: 2px solid color-mix(in srgb, var(--c) 55%, var(--line)); color: var(--c); display: flex; align-items: center; justify-content: center; }
.act-dot .ic { width: 14px; height: 14px; stroke-width: 2; }
.mdot { width: 10px; height: 10px; border-radius: 50%; background: var(--bg); border: 2px solid var(--ink-3); margin-top: 6px; }
.mdot.dpa { border-color: var(--d2); background: var(--d2); }
.tl-card { position: relative; display: flex; gap: 4px; background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow); padding: 12px 4px 12px 14px; margin: 4px 0 8px; cursor: pointer; transition: transform .15s var(--ease), box-shadow .15s; -webkit-tap-highlight-color: transparent; }
.tl-card:active { transform: scale(.985); }
.tl-card-main { flex: 1; min-width: 0; }
.tl-card h3 { font-size: 17px; font-weight: 600; line-height: 1.35; }
.tl-ja { font-size: 13px; color: var(--ink-2); margin-top: 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tl-desc { font-size: 14px; color: var(--ink-2); margin-top: 4px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tl-go { width: 44px; height: 44px; flex: none; display: flex; align-items: center; justify-content: center; border-radius: 12px; color: var(--d2); align-self: flex-start; margin-top: -4px; }
.tl-go .ic { width: 20px; height: 20px; }
.noloc { display: inline-flex; align-items: center; gap: 3px; font-size: 12px; color: var(--ink-3); margin-top: 4px; }
.noloc .ic { width: 13px; height: 13px; }
.subs-tg { display: inline-flex; align-items: center; gap: 2px; margin-top: 6px; margin-left: -6px; min-height: 32px; padding: 0 8px 0 4px; border: 0; border-radius: 8px; background: transparent; color: var(--ink-2); font-size: 13px; font-weight: 600; }
.subs-tg .ic { width: 16px; height: 16px; transition: transform .2s var(--ease); }
.tl-subs { display: none; margin: 4px 0 0; padding: 8px 10px 8px 22px; background: var(--surface-2); border-radius: 10px; font-size: 14px; line-height: 1.55; }
.tl-subs li + li { margin-top: 4px; }
.tl-card.subs-open .tl-subs { display: block; }
.tl-card.subs-open .subs-tg .ic { transform: rotate(180deg); }
.tl-subs a, .md a { color: inherit; text-decoration-color: color-mix(in srgb, var(--ink) 35%, transparent); text-underline-offset: 2px; }
.tl-move { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; text-decoration: none; min-height: 44px; padding: 8px 10px; margin: 0 0 2px; border-radius: 10px; font-size: 14px; color: var(--ink-2); background: transparent; }
.tl-move:active { background: var(--surface-2); }
.tl-move > .ic { width: 18px; height: 18px; color: var(--ink-2); }
.mv-t { min-width: 0; flex: 1 1 140px; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.mv-d { font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.k-move .tl-time { font-size: 13.5px; color: var(--ink-2); font-weight: 500; padding-top: 11px; }
.tl-move .bdg { height: 20px; font-size: 11.5px; }
.tl-row.past .tl-card, .tl-row.past .tl-move, .tl-row.past .tl-time { opacity: .5; }
.tl-row.cur .tl-card { box-shadow: 0 0 0 2px var(--accent), var(--shadow); }
.tl-row.opt .tl-card { background: transparent; border: 1.5px dashed var(--line); box-shadow: none; }
.tl-row.flash .tl-card { animation: flash 1.2s var(--ease); }
@keyframes flash { 0%, 60% { box-shadow: 0 0 0 3px var(--c), var(--shadow); } }
.tl-raw { padding: 10px 12px; margin: 4px 0 8px; border: 1px dashed var(--warn); border-radius: var(--r); font-size: 14px; }
.tl-dpa { display: flex; align-items: center; gap: 6px; padding: 8px 12px; margin: 2px 0 6px; border-radius: 10px; background: color-mix(in srgb, var(--d2) 12%, var(--surface)); color: color-mix(in srgb, var(--d2) 80%, var(--ink)); font-size: 14.5px; }
.tl-dpa .ic { width: 16px; height: 16px; }
.sun-line, .now-line { position: relative; display: flex; align-items: center; height: 26px; margin: 2px 0; }
.sun-line { padding-left: 2px; color: var(--d5); font-size: 12.5px; font-weight: 700; gap: 4px; }
.sun-line .ic { width: 16px; height: 16px; }
.sun-line::after { content: ""; flex: 1; height: 0; border-top: 1.5px dashed color-mix(in srgb, var(--d5) 60%, transparent); margin-left: 8px; }
.now-line::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 2px; background: var(--accent); }
.now-line span { position: relative; z-index: 1; background: var(--accent); color: var(--accent-ink); font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 99px; font-variant-numeric: tabular-nums; }

.meals { display: grid; gap: 10px; }
.meal { background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow); padding: 12px 14px; }
.meal header { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.meal header b { font-size: 16px; }
.meal-ic { width: 30px; height: 30px; border-radius: 9px; background: var(--surface-2); display: flex; align-items: center; justify-content: center; color: var(--ink-2); }
.meal-ic .ic { width: 16px; height: 16px; }
.meal-time { margin-left: auto; font-variant-numeric: tabular-nums; color: var(--ink-2); font-weight: 600; font-size: 14px; }
.meal-cols { display: grid; grid-template-columns: 1fr; gap: 8px; font-size: 14.5px; line-height: 1.55; }
.meal-cols > div { display: flex; gap: 8px; align-items: baseline; }
.meal-cols > div > div { min-width: 0; }
.meal-bk { color: var(--ink-2); padding-top: 8px; border-top: 1px dashed var(--line); }
.meal a, .me-detail a { color: inherit; font-weight: 600; text-decoration-color: color-mix(in srgb, var(--ink) 30%, transparent); text-underline-offset: 2px; }
.planb { margin-top: 26px; padding: 0; overflow: hidden; }
.planb summary { list-style: none; display: flex; align-items: center; gap: 10px; padding: 14px 16px; min-height: 52px; cursor: pointer; }
.planb summary::-webkit-details-marker { display: none; }
.planb summary > .ic:first-child { color: var(--d2); }
.planb summary b { flex: 1; font-size: 16px; }
.planb summary .chev { transition: transform .2s var(--ease); color: var(--ink-2); }
.planb[open] summary .chev { transform: rotate(180deg); }
.planb .md { padding: 0 16px 14px; font-size: 14.5px; }
.costs { padding: 4px 16px; }
.cost { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; font-size: 14.5px; }
.cost + .cost { border-top: 1px solid var(--line); }
.cost b { font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.cost b small { color: var(--ink-2); font-weight: 500; }
.cost.total { font-weight: 800; }
.cost.total b { font-weight: 800; }
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 28px; }
.pager a { display: flex; align-items: center; gap: 6px; text-decoration: none; background: var(--surface); border-radius: var(--r); padding: 10px 10px; box-shadow: var(--shadow); font-size: 14px; font-weight: 600; min-height: 56px; }
.pager a.next { justify-content: flex-end; text-align: right; grid-column: 2; }
.pager small { display: block; color: var(--ink-2); font-weight: 500; font-size: 12px; }
.pager span { min-width: 0; }

.disney { margin-top: 16px; border: 1.5px solid color-mix(in srgb, var(--d2) 40%, var(--line)); }
.disney-h { display: flex; gap: 12px; align-items: center; }
.disney-h > .ic { width: 36px; height: 36px; padding: 7px; border-radius: 10px; background: color-mix(in srgb, var(--d2) 14%, var(--surface)); color: var(--d2); }
.disney-h p { font-size: 13px; color: var(--ink-2); }
.disney .chks { padding: 4px 0; margin-top: 6px; }
.dpa { margin-top: 6px; padding-top: 10px; border-top: 1px solid var(--line); }
.dpa-t { font-size: 13.5px; color: var(--ink-2); display: flex; gap: 6px; align-items: center; }
.dpa-t .ic { width: 16px; height: 16px; }
.dpa-form { display: grid; grid-template-columns: 1fr 96px auto; gap: 6px; margin-top: 8px; }
.dpa-form input { min-height: 40px; border: 1px solid var(--line); border-radius: 10px; padding: 0 10px; background: var(--bg); min-width: 0; }
.dpa-list { list-style: none; padding: 0; margin: 8px 0 0; }
.dpa-list li { display: flex; align-items: center; gap: 8px; font-size: 14.5px; }
.dpa-list li button { margin-left: auto; }

/* ---------- 바텀시트 ---------- */
#sheet-root .sheet-backdrop { position: fixed; inset: 0; z-index: 70; background: rgba(10, 12, 20, .42); opacity: 0; transition: opacity .22s var(--ease); }
#sheet-root .sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 71; max-width: 640px; margin: 0 auto; max-height: 88dvh; display: flex; flex-direction: column; background: var(--bg); border-radius: 20px 20px 0 0; box-shadow: var(--shadow-lg); transform: translateY(100%); transition: transform .24s var(--ease); }
#sheet-root.open .sheet-backdrop { opacity: 1; }
#sheet-root.open .sheet { transform: none; }
.sheet-grab { display: flex; justify-content: center; padding: 8px 0 2px; flex: none; }
.sheet-grab span { width: 40px; height: 5px; border-radius: 3px; background: var(--line); }
.sheet-x { position: absolute; right: 8px; top: 8px; z-index: 2; }
.sheet-body { overflow-y: auto; padding: 4px 16px calc(24px + var(--safe-b)); overscroll-behavior: contain; }
.sheet-head { padding: 4px 40px 6px 0; }
.sheet-head .cdot { background: var(--c); }
.sheet-head h2 { font-size: 22px; font-weight: 800; margin-top: 6px; }
.ja-copy { display: inline-flex; align-items: center; gap: 6px; margin-top: 4px; padding: 4px 8px 4px 0; border: 0; background: transparent; color: var(--ink-2); font-size: 15px; min-height: 36px; text-align: left; }
.ja-copy .ic { width: 15px; height: 15px; }
.en { font-size: 13.5px; color: var(--ink-3); }
.sheet-actions { display: flex; gap: 8px; margin: 12px 0 4px; flex-wrap: wrap; }
.sheet-actions .btn { flex: 1 1 auto; }
.sheet-desc { margin-top: 12px; font-size: 15.5px; }
.sheet-subs { margin: 10px 0 0; padding: 10px 12px 10px 26px; background: var(--surface); border-radius: 12px; font-size: 14.5px; }
.sheet-subs li + li { margin-top: 6px; }
.sheet-sec { margin-top: 18px; }
.sheet-sec h3 { font-size: 13px; font-weight: 700; color: var(--ink-2); margin: 0 2px 6px; }
.row-link { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 48px; padding: 8px 12px; background: var(--surface); border: 0; border-radius: 12px; text-decoration: none; font-size: 15px; text-align: left; }
.row-link + .row-link { margin-top: 6px; }
.row-link > span:not(.cdot) { flex: 1; min-width: 0; }
.row-link > .ic:first-child { color: var(--ink-2); }
.row-link > .ic:last-child { color: var(--ink-3); width: 18px; height: 18px; }
.row-link small { color: var(--ink-2); font-size: 13px; }
.row-link.two span b { display: block; font-weight: 600; }
.row-link.two span small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-link.static { cursor: default; }
.row-link.danger { color: var(--accent); }
.row-link.danger .ic { color: var(--accent) !important; }
.card.list { padding: 4px; }
.card.list .row-link { box-shadow: none; }
.card.list .row-link + .row-link { margin-top: 0; border-top: 1px solid var(--line); border-radius: 0; }
.facts dl { margin: 0; background: var(--surface); border-radius: 12px; padding: 4px 12px; }
.facts dl > div { display: grid; grid-template-columns: 76px 1fr; gap: 8px; padding: 8px 0; font-size: 14px; }
.facts dl > div + div { border-top: 1px solid var(--line); }
.facts dt { color: var(--ink-2); font-weight: 600; }
.facts dd { margin: 0; }
.src { display: inline-flex; align-items: center; gap: 4px; margin-top: 8px; font-size: 13px; color: var(--ink-2); text-decoration: none; min-height: 32px; }
.src .ic { width: 14px; height: 14px; }
.sheet-foot { margin-top: 20px; text-align: center; }
.sheet-foot a { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: var(--ink-3); text-decoration: none; min-height: 36px; }
.sheet-foot .ic { width: 14px; height: 14px; }

/* ---------- 지도 탭 ---------- */
.screen-map { padding: 0 !important; max-width: none !important; }
body[data-tab="map"] { padding-bottom: 0; overflow: hidden; }
.map-screen { position: fixed; inset: 0 0 calc(var(--tab-h) + var(--safe-b)) 0; }
.map-full { position: absolute; inset: 0; background: var(--surface-2); }
.map-top { position: absolute; z-index: 600; top: calc(var(--safe-t) + 10px); left: 12px; right: 12px; display: flex; gap: 8px; }
body.is-offline .map-top { top: calc(var(--safe-t) + 46px); }
.seg { display: flex; background: var(--surface-2); border-radius: 12px; padding: 3px; gap: 2px; }
.map-top .seg { flex: 1; background: var(--surface); box-shadow: var(--shadow); }
.seg button { flex: 1; min-height: 38px; border: 0; background: transparent; border-radius: 9px; font-weight: 700; font-size: 14px; color: var(--ink-2); position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 4px; white-space: nowrap; padding: 0 8px; }
.seg button.on { background: var(--ink); color: var(--bg); }
.map-top .seg button[data-day]:not([data-day="all"])::after { content: ""; position: absolute; bottom: 5px; left: 50%; width: 14px; margin-left: -7px; height: 2.5px; border-radius: 2px; background: var(--c); }
.map-top .seg button.on::after { background: var(--bg) !important; opacity: .0; }
.seg.wide { margin: 6px 0 4px; }
.seg .ic { width: 16px; height: 16px; }
.fab { background: var(--surface); box-shadow: var(--shadow); width: 44px; height: 44px; }
.fab.on { background: var(--ink); color: var(--bg); }
.layer-row { position: absolute; z-index: 600; top: calc(var(--safe-t) + 64px); left: 12px; right: 12px; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; }
body.is-offline .layer-row { top: calc(var(--safe-t) + 100px); }
.lchip { flex: none; display: inline-flex; align-items: center; gap: 4px; min-height: 36px; padding: 0 12px; border-radius: 99px; border: 0; background: var(--surface); box-shadow: var(--shadow); font-size: 13.5px; font-weight: 600; color: var(--ink-2); }
.lchip .ic { width: 15px; height: 15px; }
.lchip.on { background: var(--ink); color: var(--bg); }
.map-fabs { position: absolute; z-index: 600; right: 12px; bottom: 182px; display: flex; flex-direction: column; gap: 8px; }
.peek { position: absolute; z-index: 600; left: 0; right: 0; bottom: 0; background: var(--bg); border-radius: 18px 18px 0 0; box-shadow: var(--shadow-lg); padding: 10px 0 10px; }
.peek-h { display: flex; align-items: baseline; gap: 8px; padding: 0 16px 8px; }
.peek-h b { font-size: 16px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.peek-h span { font-size: 13px; color: var(--ink-2); white-space: nowrap; }
.peek-cards { margin: 0; padding: 2px 16px 6px; scroll-snap-type: x mandatory; }
.pcard { width: 240px; display: flex; gap: 10px; align-items: flex-start; background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow); padding: 12px; text-decoration: none; scroll-snap-align: center; border: 2px solid transparent; }
.pcard.on { border-color: var(--c); }
.pc-t { min-width: 0; display: flex; flex-direction: column; }
.pc-t small { font-size: 12px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.pc-t b { font-size: 15px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc-t i { font-style: normal; font-size: 12.5px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.peek-empty { padding: 16px; color: var(--ink-2); font-size: 14px; }

/* 핀 */
.pin-wrap { background: none; border: 0; }
.pin { width: 28px; height: 28px; border-radius: 50%; background: var(--c); color: #fff; border: 2px solid #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .35); display: flex; align-items: center; justify-content: center; font: 700 13px/1 var(--font); font-variant-numeric: tabular-nums; transition: transform .15s var(--ease); }
.pin.small { width: 16px; height: 16px; margin: 6px; font-size: 0; }
.pin.past { opacity: .5; }
.pin.sm { width: 26px; height: 26px; flex: none; font-size: 12px; box-shadow: none; }
.sel .pin { transform: scale(1.3); box-shadow: 0 0 0 6px color-mix(in srgb, var(--c) 30%, transparent), 0 2px 8px rgba(0, 0, 0, .4); animation: pulse 1.6s infinite; }
.sel { z-index: 900 !important; }
@keyframes pulse { 50% { box-shadow: 0 0 0 11px color-mix(in srgb, var(--c) 0%, transparent), 0 2px 8px rgba(0, 0, 0, .4); } }
.cpin { width: 26px; height: 26px; border-radius: 50%; background: #fff; color: #3d3a35; border: 2px solid #6B655C; display: flex; align-items: center; justify-content: center; box-shadow: 0 1px 4px rgba(0, 0, 0, .25); }
.cpin .ic { width: 14px; height: 14px; stroke-width: 2; }
.hpin { width: 32px; height: 32px; border-radius: 10px; background: #1B2236; color: #fff; border: 2px solid #fff; display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 6px rgba(0, 0, 0, .35); }
.hpin .ic { width: 18px; height: 18px; }
.me-dot { display: block; width: 20px; height: 20px; border-radius: 50%; background: #1971C2; border: 3px solid #fff; box-shadow: 0 0 0 8px rgba(25, 113, 194, .25); }
.leaflet-container { font-family: var(--font); background: var(--surface-2); }
.leaflet-control-attribution { font-size: 10px !important; background: color-mix(in srgb, var(--surface) 80%, transparent) !important; color: var(--ink-2) !important; }
.leaflet-control-attribution a { color: var(--ink-2) !important; }
.screen-map .leaflet-bottom { bottom: 172px; }
.schematic { background-color: var(--surface-2) !important; background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px) !important; background-size: 40px 40px !important; }
.schem-badge { position: absolute; z-index: 650; right: 8px; top: 8px; display: flex; align-items: center; gap: 4px; background: var(--ink); color: var(--bg); padding: 4px 10px; border-radius: 99px; font-size: 12px; font-weight: 600; }
.screen-map .schem-badge { top: auto; bottom: 186px; left: 12px; right: auto; }
.schem-badge .ic { width: 14px; height: 14px; }
.st-label span, .area-label span { white-space: nowrap; transform: translate(-50%, -50%); display: inline-flex; align-items: center; gap: 3px; }
.st-label span { font-size: 11px; font-weight: 600; color: var(--ink-2); background: var(--surface); padding: 1px 6px; border-radius: 6px; border: 1px solid var(--line); transform: translate(-50%, 14px); }
.st-label .ic { width: 11px; height: 11px; }
.area-label span { font-size: 13px; font-weight: 800; color: var(--ink-3); letter-spacing: .04em; }

/* ---------- 장소 ---------- */
.searchbar { display: flex; align-items: center; gap: 8px; background: var(--surface); border-radius: 12px; box-shadow: var(--shadow); padding: 0 6px 0 12px; margin: 10px 0 4px; }
.searchbar > .ic { color: var(--ink-2); }
.searchbar input { flex: 1; min-width: 0; border: 0; background: transparent; min-height: 46px; outline: none; font-size: 16px; }
.cat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; }
.cat-tile { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow); padding: 12px; text-decoration: none; min-height: 92px; }
.cat-ic { width: 34px; height: 34px; border-radius: 10px; background: var(--surface-2); display: flex; align-items: center; justify-content: center; margin-bottom: 6px; }
.cat-ic .ic { width: 18px; height: 18px; }
.cat-tile b { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.cat-tile small { font-size: 12.5px; color: var(--ink-2); }
.cards { display: grid; gap: 0; }
.pl-card { margin: 0 0 8px; padding-left: 12px; }
.pl-ic { width: 36px; height: 36px; border-radius: 10px; background: var(--surface-2); color: var(--ink-2); display: flex; align-items: center; justify-content: center; flex: none; margin-right: 8px; }
.pl-ic .ic { width: 18px; height: 18px; }
.pl-meta { font-size: 13px; color: var(--ink-2); margin-top: 3px; }
.uses { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.use { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 7px; border-radius: 6px; font-size: 12px; font-weight: 600; background: color-mix(in srgb, var(--c) 11%, var(--surface)); white-space: nowrap; }
.use i { width: 6px; height: 6px; border-radius: 50%; background: var(--c); }
.use.more { background: var(--surface-2); color: var(--ink-2); }
.guides { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.guide { background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow); padding: 12px; text-decoration: none; }
.guide b { font-size: 14.5px; display: block; line-height: 1.35; }
.guide p { font-size: 12.5px; color: var(--ink-2); margin-top: 4px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.45; }
.guide-link { display: flex; align-items: center; gap: 12px; text-decoration: none; margin: 10px 0 14px; }
.guide-link > .ic:first-child { color: var(--c, var(--ink-2)); }
.guide-link > div { flex: 1; min-width: 0; }
.guide-link p { font-size: 13px; color: var(--ink-2); }
.guide-link > .ic:last-child { color: var(--ink-3); }

/* ---------- 준비 ---------- */
.prep-hero { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 12px 0 14px; }
.ring-card { background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow); padding: 12px 6px 10px; text-decoration: none; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.ring { width: 56px; height: 56px; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 5; }
.ring-bg { stroke: var(--surface-2); }
.ring-fg { stroke-linecap: round; transition: stroke-dashoffset .4s var(--ease); }
.ring text { transform: rotate(90deg); transform-origin: 26px 26px; font: 700 12px var(--font); fill: var(--ink); }
.ring-card b { font-size: 14px; margin-top: 4px; }
.ring-card small { font-size: 12px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.cells { padding: 2px 0; margin-top: 10px; }
.cell { display: flex; align-items: center; gap: 12px; min-height: 58px; padding: 8px 12px 8px 14px; text-decoration: none; }
.cell + .cell { border-top: 1px solid var(--line); }
.cell-ic { width: 34px; height: 34px; border-radius: 10px; background: var(--surface-2); display: flex; align-items: center; justify-content: center; flex: none; }
.cell-ic .ic { width: 18px; height: 18px; }
.cell-t { flex: 1; min-width: 0; }
.cell-t b { display: block; font-size: 15.5px; font-weight: 600; }
.cell-t small { display: block; font-size: 13px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cell .chev { color: var(--ink-3); width: 18px; height: 18px; }
.daybars { padding: 10px 14px; }
.dbar { display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: 10px; min-height: 36px; text-decoration: none; font-size: 13.5px; }
.dbar-l { font-weight: 700; color: var(--ink-2); }
.dbar-track { position: relative; height: 10px; background: var(--surface-2); border-radius: 5px; overflow: visible; }
.dbar-track i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--c); border-radius: 5px; opacity: .9; }
.dbar-track em { position: absolute; left: 0; top: 3px; height: 4px; background: var(--ink); border-radius: 2px; }
.dbar-track s { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--ink); border-radius: 1px; text-decoration: none; }
.dbar-track b.over { position: absolute; top: 0; bottom: 0; background: var(--accent); border-radius: 0 5px 5px 0; }
.dbar-v { font-variant-numeric: tabular-nums; font-weight: 600; text-align: right; white-space: nowrap; }
.dbar-v small { color: var(--ink-2); font-weight: 500; }
.legend { display: flex; gap: 14px; font-size: 12px; color: var(--ink-2); margin-top: 6px; }
.legend span { display: inline-flex; align-items: center; gap: 4px; }
.lg-b { width: 14px; height: 8px; border-radius: 3px; background: var(--ink-3); display: inline-block; }
.lg-s { width: 14px; height: 4px; border-radius: 2px; background: var(--ink); display: inline-block; }
.doc-inline { margin-top: 20px; font-size: 15px; }
.pass { margin-top: 12px; }
.pass-h { display: flex; gap: 12px; align-items: center; margin-bottom: 10px; }
.pass-h > .ic { width: 36px; height: 36px; padding: 7px; border-radius: 10px; background: color-mix(in srgb, var(--d3) 14%, var(--surface)); color: var(--d3); }
.pass-range { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--ink-2); margin-top: 6px; font-variant-numeric: tabular-nums; }
.sos { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.me-detail { margin-top: 10px; }
.me-detail header { display: flex; gap: 10px; align-items: center; margin-bottom: 10px; }
.me-detail header b { display: block; font-size: 17px; }
.me-detail header small { color: var(--ink-2); font-size: 13px; }

.form { display: flex; flex-direction: column; gap: 10px; }
.form h3 { font-size: 14px; color: var(--ink-2); margin-top: 6px; }
.form h3:first-child { margin-top: 0; }
.form label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--ink-2); font-weight: 600; }
.form label.lbl { margin-bottom: -6px; }
.form input:not([type=checkbox]):not([type=file]), .form textarea, textarea#imp-text, #memo { width: 100%; min-height: 44px; border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; background: var(--bg); font-size: 16px; color: var(--ink); font-weight: 400; }
.form textarea { resize: vertical; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.btn.file { cursor: pointer; }
.tile-prog { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--ink-2); font-variant-numeric: tabular-nums; }

/* 가계부 */
.ledger-in { margin-top: 10px; display: flex; flex-direction: column; gap: 10px; }
.amt { display: flex; align-items: baseline; gap: 6px; border-bottom: 2px solid var(--line); padding-bottom: 4px; flex-wrap: wrap; }
.amt .cur { font-size: 28px; font-weight: 800; color: var(--ink-2); }
.amt input { flex: 1; min-width: 120px; border: 0; background: transparent; font-size: 36px; font-weight: 800; font-variant-numeric: tabular-nums; outline: none; padding: 0; letter-spacing: -0.02em; }
.amt .won { font-size: 15px; color: var(--ink-2); font-weight: 600; font-variant-numeric: tabular-nums; }
.seg.cats button { min-height: 44px; }
.ledger-row { display: flex; gap: 8px; align-items: center; }
.ledger-row .seg { flex: 1; }
.tog { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; min-height: 44px; padding: 0 4px; }
.tog input { width: 20px; height: 20px; accent-color: var(--ok); }
.ledger-sum { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.stat { display: flex; flex-direction: column; gap: 4px; }
.stat .pbar { flex: none; margin-top: 4px; }
.grp-h { display: flex; align-items: center; gap: 8px; font-size: 14px; margin: 14px 4px 6px; }
.grp-h small { margin-left: auto; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.lrow { display: flex; align-items: center; gap: 10px; padding: 8px 6px 8px 10px; }
.lrow + .lrow { border-top: 1px solid var(--line); }
.lrow-ic { width: 32px; height: 32px; border-radius: 9px; background: var(--surface-2); display: flex; align-items: center; justify-content: center; color: var(--ink-2); flex: none; }
.lrow-ic .ic { width: 16px; height: 16px; }
.lrow-t { flex: 1; min-width: 0; }
.lrow-t b { display: block; font-size: 15px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lrow-t small, .lrow-v small { display: block; font-size: 12.5px; color: var(--ink-2); }
.lrow-v { text-align: right; font-variant-numeric: tabular-nums; }

/* 회화 */
.phrases { display: grid; gap: 10px; margin-top: 6px; }
.phrase { text-align: left; border: 0; width: 100%; display: flex; flex-direction: column; gap: 4px; padding: 16px; }
.ph-ja { font-size: 22px; font-weight: 700; line-height: 1.45; }
.ph-kana { font-size: 13px; color: var(--ink-2); }
.ph-ko { font-size: 15px; margin-top: 4px; }
.ph-use { font-size: 12.5px; color: var(--ink-2); background: var(--surface-2); border-radius: 6px; padding: 2px 8px; align-self: flex-start; margin-top: 4px; }
.phrase-ov { position: fixed; inset: 0; z-index: 90; background: #fff; color: #111; display: none; flex-direction: column; padding: calc(var(--safe-t) + 12px) 20px calc(var(--safe-b) + 20px); }
.phrase-ov.open { display: flex; }
.po-x { align-self: flex-end; color: #111; }
.po-body { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 18px; }
.po-ja { font-size: clamp(34px, 9vw, 54px); font-weight: 800; line-height: 1.35; word-break: normal; }
.po-kana { font-size: 18px; color: #555; }
.po-ko { font-size: 20px; color: #333; border-top: 1px solid #ddd; padding-top: 16px; }
.po-warn { color: #B26A00; font-weight: 600; }
.po-nav { display: flex; justify-content: space-between; gap: 10px; }
.po-nav .btn { background: #f2f2f2; color: #111; border-color: #ddd; flex: 1; }

/* ---------- 마크다운 ---------- */
.md { font-size: 15.5px; line-height: 1.7; }
.md p { margin: 8px 0; }
.md > :first-child { margin-top: 0; }
.md > :last-child { margin-bottom: 0; }
.md ul, .md ol { padding-left: 22px; margin: 8px 0; }
.md li + li { margin-top: 4px; }
.md h2 { font-size: 20px; font-weight: 800; margin: 30px 0 10px; padding-top: 6px; }
.md h3 { font-size: 17px; font-weight: 700; margin: 22px 0 8px; }
.md blockquote { margin: 12px 0; padding: 10px 14px; border-left: 3px solid var(--line); color: var(--ink-2); background: var(--surface); border-radius: 0 10px 10px 0; }
.md code { font-size: .9em; background: var(--surface-2); padding: 1px 5px; border-radius: 5px; }
.md hr { border: 0; border-top: 1px solid var(--line); margin: 20px 0; }
.md.small { font-size: 13.5px; color: var(--ink-2); }
.table-wrap { overflow-x: auto; margin: 12px -16px; padding: 0 16px; }
.md table { border-collapse: collapse; font-size: 14px; line-height: 1.5; min-width: 100%; background: var(--surface); border-radius: 10px; overflow: hidden; }
.md th, .md td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; min-width: 80px; }
.md th { background: var(--surface-2); font-weight: 700; font-size: 13px; white-space: nowrap; }
.md li.task { list-style: none; margin-left: -22px; }
.md li.task .chk { padding: 6px 4px; }
.md .t-chip { display: inline-block; font-variant-numeric: tabular-nums; background: var(--surface-2); padding: 0 6px; border-radius: 6px; margin-right: 4px; }
.doc { margin-top: 8px; }

/* ---------- 토스트 ---------- */
.toast { position: fixed; left: 50%; bottom: calc(var(--tab-h) + var(--safe-b) + 16px); transform: translate(-50%, 20px); z-index: 95; background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 12px; font-size: 14px; font-weight: 600; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s var(--ease); max-width: calc(100vw - 32px); text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (min-width: 560px) {
  .meal-cols { grid-template-columns: 1fr 1fr; }
  .meal-bk { border-top: 0; padding-top: 0; border-left: 1px dashed var(--line); padding-left: 10px; }
  .cat-grid { grid-template-columns: repeat(5, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0s !important; animation-duration: 0s !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
}

.clamp .chk-t { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.offline[hidden] { display: none; }
