/* SEED Design 토큰 (daangn/seed-design rootage, light/dark) — Penpot 파일 "주차등록 PWA — SEED"와 같은 값 */
:root {
  color-scheme: light dark;
  --bg-layer-default: #ffffff; --bg-layer-floating: #ffffff; --bg-neutral-weak: #f3f4f5; --bg-neutral-weak-alpha: #14273b0d;
  --bg-neutral-weak-alpha-pressed: #000f2d11; --bg-neutral-solid: #2a3038; --bg-brand-solid: #ff6600; --bg-brand-solid-pressed: #e14d00;
  --bg-brand-weak: #fff2ec; --bg-disabled: #f3f4f5; --bg-positive-weak: #edfaf6; --bg-warning-weak: #fff7de; --bg-critical-weak: #fdf0f0;
  --bg-critical-solid: #fa342c; --bg-informative-weak: #eff6ff; --bg-overlay: #00000074; --bg-pressed: #0000000c;
  --fg-neutral: #1a1c20; --fg-neutral-muted: #555d6d; --fg-neutral-subtle: #868b94; --fg-placeholder: #b0b3ba; --fg-disabled: #d1d3d8;
  --fg-brand: #ff6600; --fg-brand-contrast: #e14d00; --fg-on-brand-solid: #ffffff; --fg-on-neutral-solid: #ffffff;
  --fg-positive: #079171; --fg-positive-contrast: #075445; --fg-warning: #9b7821; --fg-warning-contrast: #4f3e1f;
  --fg-critical: #fa342c; --fg-critical-contrast: #921708; --fg-informative-contrast: #0b4596;
  --stroke-neutral-weak: #000f3323; --stroke-neutral-muted: #00000010; --stroke-neutral-contrast: #1a1c20;
  --stroke-critical-solid: #fa342c; --stroke-focus-ring: #5e98fe;
  --shadow-floating: 0 1px 3px #0000001f;
  --font: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Pretendard Variable", Pretendard, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, "Noto Sans KR", "Noto Sans", sans-serif;
  --gutter: 16px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg-layer-default: #16171b; --bg-layer-floating: #1d2025; --bg-neutral-weak: #2b2e35; --bg-neutral-weak-alpha: #c8ddff25;
    --bg-neutral-weak-alpha-pressed: #c8ddff36; --bg-neutral-solid: #f3f4f5; --bg-brand-solid: #ff6600; --bg-brand-solid-pressed: #ff9e65;
    --bg-brand-weak: #31241f; --bg-disabled: #2b2e35; --bg-positive-weak: #202926; --bg-warning-weak: #302819; --bg-critical-weak: #322323;
    --bg-critical-solid: #f73526; --bg-informative-weak: #202742; --bg-pressed: #ffffff17;
    --fg-neutral: #f3f4f5; --fg-neutral-muted: #dcdee3; --fg-neutral-subtle: #b0b3ba; --fg-placeholder: #868b94; --fg-disabled: #5b606a;
    --fg-brand: #ff6600; --fg-brand-contrast: #ff6600; --fg-on-neutral-solid: #16171b;
    --fg-positive: #22b27f; --fg-positive-contrast: #93e5c0; --fg-warning: #ca901c; --fg-warning-contrast: #e5d49b;
    --fg-critical: #ff6e60; --fg-critical-contrast: #f8c5c3; --fg-informative-contrast: #b9d7fb;
    --stroke-neutral-weak: #d0deff46; --stroke-neutral-muted: #ffffff17; --stroke-neutral-contrast: #f3f4f5;
    --stroke-critical-solid: #ff6e60; --stroke-focus-ring: #1e82eb;
    --shadow-floating: 0 1px 3px #00000080;
  }
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg-layer-default); color: var(--fg-neutral); }
body { font-family: var(--font); font-size: 16px; line-height: 1.375; -webkit-text-size-adjust: 100%; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--stroke-focus-ring); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.icon { width: 24px; height: 24px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon.sm { width: 20px; height: 20px; } .icon.xs { width: 16px; height: 16px; stroke-width: 2.2; }

/* 화면 */
.screen { min-height: 100dvh; max-width: 480px; margin: 0 auto; display: flex; flex-direction: column; }
.content { flex: 1; padding: 8px var(--gutter) 24px; display: flex; flex-direction: column; gap: 24px; }
.top-nav { height: 56px; display: flex; align-items: center; gap: 4px; padding: 0 6px 0 var(--gutter); position: sticky; top: 0;
  background: var(--bg-layer-default); z-index: 2; padding-top: env(safe-area-inset-top, 0px); box-sizing: content-box; }
.top-nav.has-back { padding-left: 6px; }
.top-nav .title { flex: 1; min-width: 0; }
.top-nav h1 { font-size: 20px; line-height: 27px; font-weight: 700; margin: 0; }
.top-nav h1.sm { font-size: 18px; line-height: 24px; }
.top-nav .sub { font-size: 13px; line-height: 18px; color: var(--fg-neutral-subtle); }
.icon-btn { width: 44px; height: 44px; border: 0; background: transparent; border-radius: 22px; display: grid; place-items: center; color: var(--fg-neutral); }
.icon-btn:active { background: var(--bg-pressed); }

.hero { display: flex; flex-direction: column; gap: 10px; padding: 16px 0 8px; }
.hero h2 { font-size: 26px; line-height: 35px; font-weight: 700; margin: 0; letter-spacing: -0.2px; }
.hero p { margin: 0; color: var(--fg-neutral-muted); white-space: pre-line; }
.app-icon { width: 48px; height: 48px; border-radius: 14px; background: var(--bg-brand-weak); color: var(--fg-brand-contrast); display: grid; place-items: center; }
.app-icon .icon { width: 28px; height: 28px; }

/* 필드 */
.field { display: flex; flex-direction: column; gap: 8px; border: 0; padding: 0; margin: 0; min-width: 0; }
.field > label, .field > legend, .label { font-size: 14px; line-height: 19px; font-weight: 700; padding: 0; }
.text-input { display: flex; align-items: center; gap: 8px; min-height: 52px; padding: 0 16px; border-radius: 12px;
  border: 1px solid var(--stroke-neutral-weak); background: var(--bg-layer-default); }
.text-input:focus-within { border-color: var(--stroke-neutral-contrast); box-shadow: inset 0 0 0 0.5px var(--stroke-neutral-contrast); }
.text-input.invalid { border-color: var(--stroke-critical-solid); box-shadow: none; }
.text-input input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; padding: 14px 0; font-size: 16px; caret-color: var(--fg-brand); }
.text-input input::placeholder { color: var(--fg-placeholder); }
.text-input.big input { font-size: 24px; line-height: 32px; font-weight: 700; letter-spacing: .5px; padding: 9px 0; }
.text-input .suffix { margin-right: -10px; color: var(--fg-neutral-subtle); }
.help { font-size: 13px; line-height: 18px; color: var(--fg-neutral-subtle); margin: 0; }
.error { font-size: 13px; line-height: 18px; color: var(--fg-critical); margin: 0; display: flex; gap: 4px; align-items: flex-start; }
.error .icon { margin-top: 1px; }

/* 체크박스: 행 전체가 터치 영역 */
.checkbox { display: flex; gap: 10px; align-items: flex-start; padding: 10px 0; cursor: pointer; min-height: 44px; }
.checkbox input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.checkbox .box { width: 22px; height: 22px; flex: none; border-radius: 6px; border: 1.5px solid var(--stroke-neutral-weak);
  display: grid; place-items: center; color: transparent; background: var(--bg-layer-default); margin-top: 0; }
.checkbox input:checked + .box { background: var(--bg-brand-solid); border-color: var(--bg-brand-solid); color: var(--fg-on-brand-solid); }
.checkbox input:focus-visible + .box { outline: 2px solid var(--stroke-focus-ring); outline-offset: 2px; }
.checkbox .t { font-weight: 500; display: block; }
.checkbox .d { font-size: 13px; line-height: 18px; color: var(--fg-neutral-subtle); display: block; margin-top: 2px; }

/* 버튼 */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 0; font-weight: 700; white-space: nowrap;
  min-height: 52px; padding: 0 20px; border-radius: 12px; font-size: 18px; line-height: 24px; transition: background-color .15s; }
.btn.lg { min-height: 44px; border-radius: 8px; padding: 0 14px; font-size: 14px; }
.btn.md { min-height: 36px; border-radius: 8px; padding: 0 14px; font-size: 14px; }
.btn.brand { background: var(--bg-brand-solid); color: var(--fg-on-brand-solid); }
.btn.brand:active { background: var(--bg-brand-solid-pressed); }
.btn.weak { background: var(--bg-neutral-weak); color: var(--fg-neutral); }
.btn.weak:active { background: var(--bg-neutral-weak-alpha-pressed); }
.btn.critical { background: var(--bg-critical-solid); color: #fff; }
.btn:disabled { background: var(--bg-disabled); color: var(--fg-disabled); cursor: default; }
.btn.block { width: 100%; }
.text-btn { min-height: 44px; border: 0; background: transparent; color: var(--fg-neutral-muted); font-size: 14px; font-weight: 500;
  display: inline-flex; align-items: center; gap: 2px; padding: 0 4px; }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid currentColor; border-right-color: transparent; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.bottom-bar { position: sticky; bottom: 0; background: var(--bg-layer-default); padding: 12px var(--gutter) calc(12px + var(--safe-bottom)); z-index: 2; }
.bottom-bar .row { display: flex; gap: 8px; }
.bottom-bar .row .grow { flex: 1; }
.note { display: flex; gap: 6px; align-items: center; justify-content: center; font-size: 12px; line-height: 16px; color: var(--fg-neutral-subtle); padding-bottom: 10px; text-align: center; }

/* 섹션 · 칩 · 세그먼트 */
.section-head { display: flex; align-items: center; justify-content: space-between; min-height: 24px; }
.section-head h2 { font-size: 16px; line-height: 22px; font-weight: 700; margin: 0; }
.section-head .meta { font-size: 14px; color: var(--fg-neutral-subtle); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.chip { display: inline-flex; align-items: center; gap: 4px; height: 36px; padding: 0 14px; border-radius: 18px; border: 0;
  background: var(--bg-neutral-weak-alpha); color: var(--fg-neutral); font-size: 14px; font-weight: 500; }
.chip .sub { color: var(--fg-neutral-subtle); font-weight: 400; }
.chip[aria-pressed="true"] { background: var(--bg-neutral-solid); color: var(--fg-on-neutral-solid); }
.chip[aria-pressed="true"] .sub { color: var(--fg-on-neutral-solid); }
.chip.outline { background: transparent; border: 1px solid var(--stroke-neutral-weak); padding-left: 10px; }
.chip-wrap { display: inline-flex; align-items: center; }
.chip-wrap .remove { width: 36px; height: 36px; margin-left: -10px; border: 0; background: transparent; color: var(--fg-neutral-subtle); display: grid; place-items: center; border-radius: 18px; }
.chips.editing .chip { padding-right: 30px; }

.segmented { display: flex; height: 44px; padding: 4px; gap: 0; border-radius: 22px; background: var(--bg-neutral-weak-alpha); }
.segmented button { flex: 1; min-width: 0; border: 0; background: transparent; border-radius: 18px; font-size: 14px; font-weight: 500;
  color: var(--fg-neutral-muted); display: inline-flex; align-items: center; justify-content: center; gap: 4px; white-space: nowrap; padding: 0 6px; }
.segmented button[aria-checked="true"] { background: var(--bg-layer-floating); color: var(--fg-neutral); font-weight: 700; box-shadow: var(--shadow-floating); }
.inline-row { display: flex; gap: 8px; align-items: center; }
.date-native { position: absolute; opacity: 0; pointer-events: none; width: 1px; height: 1px; }

/* 결과 카드 (Callout) */
.callout { display: flex; gap: 12px; padding: 16px; border-radius: 12px; align-items: flex-start; }
.callout .body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.callout strong { font-size: 16px; line-height: 22px; }
.callout p { margin: 0; font-size: 14px; line-height: 19px; overflow-wrap: anywhere; }
.callout .actions { display: flex; gap: 8px; padding-top: 6px; flex-wrap: wrap; }
.callout.positive { background: var(--bg-positive-weak); color: var(--fg-positive-contrast); } .callout.positive > .icon { color: var(--fg-positive); }
.callout.warning { background: var(--bg-warning-weak); color: var(--fg-warning-contrast); } .callout.warning > .icon { color: var(--fg-warning); }
.callout.critical { background: var(--bg-critical-weak); color: var(--fg-critical-contrast); } .callout.critical > .icon { color: var(--fg-critical); }
.callout.neutral { background: var(--bg-neutral-weak); color: var(--fg-neutral-muted); }
.callout .btn.weak { background: var(--bg-layer-default); }

/* 리스트 */
.list { list-style: none; margin: 0; padding: 0; }
.list > li { display: flex; align-items: center; gap: 12px; padding: 14px 0; border-top: 1px solid var(--stroke-neutral-muted); }
.list > li:first-child { border-top: 0; }
.list .grow { flex: 1; min-width: 0; }
.list .t { font-weight: 700; }
.list .t.medium { font-weight: 500; display: flex; gap: 6px; align-items: center; }
.list .s { font-size: 13px; line-height: 18px; color: var(--fg-neutral-subtle); }
.list button.row { all: unset; display: flex; align-items: center; gap: 12px; width: 100%; cursor: pointer; }
.list button.row:focus-visible { outline: 2px solid var(--stroke-focus-ring); }
.leading { width: 40px; height: 40px; border-radius: 20px; background: var(--bg-neutral-weak); color: var(--fg-neutral-muted); display: grid; place-items: center; flex: none; }
.leading.critical { background: var(--bg-critical-weak); color: var(--fg-critical); }
.danger { color: var(--fg-critical); }
.badge { display: inline-flex; align-items: center; height: 24px; padding: 0 8px; border-radius: 6px; font-size: 12px; font-weight: 700; flex: none; }
.badge.positive { background: var(--bg-positive-weak); color: var(--fg-positive-contrast); }
.badge.critical { background: var(--bg-critical-weak); color: var(--fg-critical-contrast); }
.badge.neutral { background: var(--bg-neutral-weak); color: var(--fg-neutral-muted); }
.empty { color: var(--fg-neutral-subtle); font-size: 14px; padding: 14px 0; margin: 0; }
.card { display: flex; gap: 12px; align-items: center; padding: 16px; border-radius: 12px; background: var(--bg-neutral-weak); }
.card .leading { width: 44px; height: 44px; border-radius: 22px; background: var(--bg-brand-weak); color: var(--fg-brand-contrast); }
.card .t { font-size: 18px; line-height: 24px; font-weight: 700; }
.terms { padding: 16px; border-radius: 12px; background: var(--bg-neutral-weak); }
.terms h3 { margin: 0 0 10px; font-size: 16px; }
.terms ul { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 10px; color: var(--fg-neutral-muted); font-size: 14px; line-height: 19px; }
.footer { text-align: center; font-size: 12px; color: var(--fg-neutral-subtle); }

/* 바텀시트 · 다이얼로그 */
dialog { border: 0; padding: 0; color: var(--fg-neutral); background: var(--bg-layer-floating); }
dialog::backdrop { background: var(--bg-overlay); }
dialog.sheet { width: 100%; max-width: 480px; margin: auto auto 0; border-radius: 20px 20px 0 0; max-height: 92dvh; overflow: auto;
  padding-bottom: var(--safe-bottom); }
dialog.sheet[open] { animation: up .22s ease-out; }
@keyframes up { from { transform: translateY(40px); opacity: .4; } }
.sheet .handle { width: 36px; height: 4px; border-radius: 2px; background: var(--stroke-neutral-weak); margin: 8px auto 8px; }
.sheet header { padding: 12px var(--gutter) 20px; }
.sheet h2, .alert h2 { margin: 0 0 8px; font-size: 22px; line-height: 30px; }
.alert h2 { font-size: 20px; line-height: 27px; }
.sheet header p, .alert p { margin: 0; color: var(--fg-neutral-muted); }
.alert p { font-size: 14px; line-height: 19px; }
.sheet .body { padding: 0 var(--gutter) 8px; display: flex; flex-direction: column; gap: 12px; }
.sheet .bottom-bar { position: static; background: transparent; }
.pending-req { display: flex; gap: 10px; align-items: center; padding: 12px 14px; border-radius: 10px; background: var(--bg-neutral-weak); font-size: 14px; font-weight: 500; }
dialog.alert { width: min(326px, calc(100% - 32px)); border-radius: 20px; padding: 24px 20px 20px; }
.alert form { display: flex; flex-direction: column; gap: 20px; }
.alert .row { display: flex; gap: 8px; } .alert .row .btn { flex: 1; }
.toast { position: fixed; left: 50%; bottom: calc(96px + var(--safe-bottom)); transform: translateX(-50%); background: var(--bg-neutral-solid);
  color: var(--fg-on-neutral-solid); padding: 12px 16px; border-radius: 10px; font-size: 14px; max-width: calc(100% - 32px); z-index: 10; }

@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
.hero.tight { padding-top: 4px; }
.text-input.grow { flex: 1; }
