:root {
  --bg: #f3f5f9; --surface: #fff; --text: #172130; --muted: #5b6475; --border: #dde3ec;
  --primary: #2457c5; --accent: #2457c5; --on-primary: #fff; --hero: #1d3768; --on-hero: #fff; --hero-sub: #c9d6f0;
  --success: #12805c; --success-soft: #e3f5ee; --danger: #b42330; --danger-soft: #fbe9eb;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1220; --surface: #182436; --text: #e9eef7; --muted: #a5b3c9; --border: #27374e;
    --primary: #2f63d6; --accent: #8fb2f5; --hero: #1d3768; --hero-sub: #a9bde6;
    --success: #5ad6aa; --success-soft: #133328; --danger: #ff8f8f; --danger-soft: #3d1c25;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body { font: 16px/1.55 system-ui, -apple-system, "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", sans-serif; -webkit-text-size-adjust: 100%; }
main { max-width: 560px; margin: 0 auto; padding: 16px 16px calc(32px + env(safe-area-inset-bottom)); display: grid; gap: 12px; }
.hero { background: var(--hero); color: var(--on-hero); margin: -16px -16px 0; padding: 28px 20px 24px; display: grid; gap: 6px; }
.hero small { color: var(--hero-sub); font-size: 14px; }
.hero h1 { margin: 0; font-size: 22px; line-height: 1.35; overflow-wrap: anywhere; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 16px; display: grid; gap: 10px; }
.card h2 { margin: 0; font-size: 17px; }
.center { text-align: center; justify-items: center; padding: 32px 16px; }
.row { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.row span:first-child { overflow-wrap: anywhere; }
.row span:last-child { white-space: nowrap; font-variant-numeric: tabular-nums; }
.divider { height: 1px; background: var(--border); }
.total { font-size: 20px; font-weight: 800; }
.total span:last-child { color: var(--accent); }
.muted { color: var(--muted); font-size: 14px; margin: 0; }
.notice { white-space: pre-wrap; overflow-wrap: anywhere; }
button, a.button { appearance: none; border: 0; border-radius: 12px; min-height: 52px; padding: 12px 16px; font: inherit; font-weight: 700; width: 100%; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
button.primary { background: var(--primary); color: var(--on-primary); min-height: 56px; font-size: 17px; }
button.secondary, a.button { background: var(--surface); color: var(--text); border: 1px solid var(--border); }
button:disabled { opacity: .55; cursor: default; }
[tabindex="-1"]:focus { outline: none; }
button:focus-visible, a.button:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }
.actions { display: grid; gap: 10px; }
.actions.two { grid-template-columns: 1fr 1fr; }
.badge { display: inline-block; border-radius: 999px; padding: 4px 12px; font-weight: 700; font-size: 14px; }
.badge.ok { background: var(--success-soft); color: var(--success); }
.badge.no { background: var(--danger-soft); color: var(--danger); }
.error { color: var(--danger); margin: 0; }
.spinner { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--border); border-top-color: var(--primary); animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation: none; } }
