/* ===== KnowUrCredit — design tokens ===== */
:root {
  --bg: #fbf6f3; --surface: #ffffff; --surface-2: #f7f0ec; --surface-3: #efe6e1;
  --text: #2a1d22; --muted: #8b7b81; --line: #f1e7e2;
  --accent: #ff4d7e; --accent-ink: #ffffff; --accent-soft: #ffe8ef; --accent-text: #e0336a;
  --grad: linear-gradient(135deg, #ff4d7e 0%, #ff6f6f 50%, #ff9b5c 100%);
  --good: #10a37a; --good-soft: #def6ee;
  --warn: #d98200; --warn-soft: #fff1d6;
  --bad: #e5394f;  --bad-soft: #ffe3e7;
  --r-lg: 24px; --r: 18px; --r-sm: 12px;
  --shadow: 0 1px 2px rgba(90, 40, 50, .04), 0 6px 20px rgba(90, 40, 50, .06);
  --shadow-accent: 0 10px 28px rgba(255, 77, 126, .32);
  --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #151013; --surface: #201a1e; --surface-2: #2a2227; --surface-3: #352b31;
    --text: #f8eff2; --muted: #a7969c; --line: #30272c;
    --accent: #ff6b93; --accent-ink: #ffffff; --accent-soft: #3b1f2a; --accent-text: #ff8fae;
    --good: #3dd6a3; --good-soft: #17332a;
    --warn: #ffc14d; --warn-soft: #3a2d14;
    --bad: #ff7088;  --bad-soft: #3d1a21;
    --shadow: 0 1px 0 rgba(255, 255, 255, .03) inset;
    --shadow-accent: 0 10px 28px rgba(255, 77, 126, .22);
    color-scheme: dark;
  }
}

/* ===== base ===== */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.5 "Sukhumvit Set", -apple-system, BlinkMacSystemFont, "Noto Sans Thai", "Leelawadee UI", system-ui, sans-serif;
  padding-bottom: calc(100px + env(safe-area-inset-bottom));
  -webkit-tap-highlight-color: transparent; -webkit-font-smoothing: antialiased;
}
body.noscroll { overflow: hidden; }
button { cursor: pointer; font: inherit; color: inherit; }
svg { display: block; }
.muted { color: var(--muted); }
.good { color: var(--good); } .warn { color: var(--warn); } .bad { color: var(--bad); }
.num, .amt, b { font-variant-numeric: tabular-nums; }

/* ===== header ===== */
.top {
  position: sticky; top: 0; z-index: 5;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
  padding: calc(14px + env(safe-area-inset-top)) 20px 12px;
}
.top-inner { max-width: 640px; margin: 0 auto; }
.top h1 { margin: 0; font-size: 26px; font-weight: 700; letter-spacing: -.01em; line-height: 1.25; }
.subtitle { margin: 0; font-size: 13px; color: var(--muted); }
.subtitle:empty { display: none; }
main { padding: 4px 16px 24px; max-width: 640px; margin: 0 auto; }

/* ===== bottom nav ===== */
.tabs {
  position: fixed; left: 12px; right: 12px; bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 10;
  max-width: 520px; margin: 0 auto; display: flex; align-items: center; padding: 6px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(16px); -webkit-backdrop-filter: saturate(1.4) blur(16px);
  border: 1px solid var(--line); border-radius: 26px; box-shadow: 0 8px 30px rgba(60, 20, 30, .12);
}
.tabs button {
  flex: 1; border: 0; background: none; color: var(--muted); padding: 6px 0 4px; font-size: 11px; font-weight: 600;
  display: flex; flex-direction: column; align-items: center; gap: 2px; border-radius: 18px; transition: color .2s;
}
.tabs svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tabs button.on { color: var(--accent-text); }
.tabs button.on svg { stroke-width: 2.2; }
.tabs .nav-add {
  flex: 0 0 56px; height: 56px; margin: -22px 6px 0; border-radius: 20px; padding: 0;
  background: var(--grad); color: #fff; box-shadow: var(--shadow-accent); justify-content: center;
  transition: transform .15s var(--ease);
}
.tabs .nav-add svg { width: 28px; height: 28px; stroke-width: 2.6; }
.tabs .nav-add:active { transform: scale(.92); }

/* ===== layout pieces ===== */
.section { display: flex; align-items: baseline; justify-content: space-between; margin: 26px 4px 10px; font-size: 15px; font-weight: 700; }
.section small { font-size: 13px; font-weight: 500; color: var(--muted); }
.panel { background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow); padding: 16px; }
.panel + .panel { margin-top: 12px; }
.panel.list { padding: 4px 16px; }
.eyebrow { display: block; font-size: 12px; font-weight: 700; letter-spacing: .02em; color: var(--accent-text); }

/* ===== hero ===== */
.hero {
  position: relative; overflow: hidden; margin-top: 4px; padding: 22px 20px 18px; border-radius: var(--r-lg);
  background: var(--grad); color: #fff; box-shadow: var(--shadow-accent);
}
.hero::before, .hero::after { content: ""; position: absolute; border-radius: 50%; background: rgba(255, 255, 255, .12); pointer-events: none; }
.hero::before { width: 220px; height: 220px; right: -70px; top: -90px; }
.hero::after { width: 140px; height: 140px; right: 40px; bottom: -90px; background: rgba(255, 255, 255, .08); }
.hero-label { font-size: 14px; opacity: .9; font-weight: 600; }
.hero-amt { font-size: 40px; font-weight: 800; letter-spacing: -.02em; line-height: 1.15; margin: 2px 0 10px; font-variant-numeric: tabular-nums; }
.hero-pill {
  display: inline-flex; align-items: center; gap: 8px; max-width: 100%;
  background: rgba(255, 255, 255, .2); border-radius: 999px; padding: 6px 12px; font-size: 13px; font-weight: 600;
}
.hero-pill span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.live { width: 8px; height: 8px; border-radius: 50%; background: #fff; flex: none; }
.live.bad { background: #ffe14d; box-shadow: 0 0 0 4px rgba(255, 225, 77, .3); animation: pulse 1.6s infinite; }
.live.warn { background: #ffe14d; }
@keyframes pulse { 50% { box-shadow: 0 0 0 7px rgba(255, 225, 77, 0); } }
.hero-stats { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 18px; }
.hero-stats div { background: rgba(255, 255, 255, .16); border-radius: 14px; padding: 10px 12px; }
.hero-stats small { display: block; font-size: 12px; opacity: .85; }
.hero-stats b { font-size: 18px; }

/* ===== recommended card ===== */
.best { display: flex; gap: 14px; align-items: center; }
.mini-card {
  width: 54px; height: 36px; border-radius: 7px; flex: none; position: relative;
  background: linear-gradient(135deg, var(--c), color-mix(in srgb, var(--c) 45%, #1b0d2a));
  box-shadow: 0 4px 10px color-mix(in srgb, var(--c) 35%, transparent);
}
.mini-card::after { content: ""; position: absolute; left: 7px; top: 11px; width: 11px; height: 8px; border-radius: 2px; background: linear-gradient(135deg, #f8e3a3, #d6ad55); }
.best .grow b { font-size: 16px; }
.best-days { text-align: center; background: var(--accent-soft); color: var(--accent-text); border-radius: 14px; padding: 6px 12px; flex: none; }
.best-days b { display: block; font-size: 22px; line-height: 1.1; }
.best-days small { font-size: 11px; font-weight: 600; }

/* ===== rows ===== */
.row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.row:last-child { border-bottom: 0; }
button.row { width: 100%; background: none; border-left: 0; border-right: 0; border-top: 0; text-align: left; }
button.row:active { opacity: .6; }
.grow { flex: 1; min-width: 0; }
.grow b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 650; }
.grow small { display: block; color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.amt { font-weight: 700; white-space: nowrap; }
.dot { width: 9px; height: 9px; border-radius: 50%; flex: none; display: inline-block; }
.chev { color: var(--muted); font-size: 20px; }

.cat-ic {
  width: 42px; height: 42px; border-radius: 14px; flex: none; display: grid; place-items: center; font-size: 20px;
  background: color-mix(in srgb, var(--k) 16%, var(--surface));
}
.date-tile {
  width: 48px; flex: none; text-align: center; border-radius: 14px; padding: 6px 0 5px;
  background: var(--surface-2); color: var(--text);
}
.date-tile b { display: block; font-size: 19px; line-height: 1.1; }
.date-tile small { font-size: 11px; font-weight: 600; color: var(--muted); }
.date-tile.bad { background: var(--bad-soft); color: var(--bad); }
.date-tile.warn { background: var(--warn-soft); color: var(--warn); }
.date-tile.bad small, .date-tile.warn small { color: inherit; }
.bill-right { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }

.day { display: flex; justify-content: space-between; margin: 20px 6px 8px; font-size: 13px; font-weight: 700; color: var(--muted); }

/* ===== buttons ===== */
.btn {
  border: 0; background: var(--surface-2); color: var(--text); font-weight: 650;
  padding: 12px 18px; border-radius: 14px; transition: transform .12s var(--ease), opacity .2s;
}
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .6; }
.btn.primary { background: var(--grad); color: #fff; box-shadow: 0 6px 16px rgba(255, 77, 126, .25); }
.btn.soft { background: var(--accent-soft); color: var(--accent-text); }
.btn.danger { color: var(--bad); background: var(--bad-soft); }
.btn.ghost { background: none; border: 1.5px solid var(--line); }
.btn.sm { padding: 8px 12px; font-size: 13px; border-radius: 11px; }
.btn.xs { padding: 5px 10px; font-size: 12px; border-radius: 9px; }
.btn.block { display: block; width: 100%; }
.btn.block + .btn.block { margin-top: 10px; }
.icon-btn { width: 40px; height: 40px; border-radius: 13px; border: 0; background: var(--surface-2); font-size: 20px; display: grid; place-items: center; }
.icon-btn:active { transform: scale(.94); }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }

.badge { display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 9px; border-radius: 999px; background: var(--surface-2); color: var(--muted); vertical-align: 1px; }
.badge.good { background: var(--good-soft); color: var(--good); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.bad { background: var(--bad-soft); color: var(--bad); }
.badge.accent { background: var(--accent-soft); color: var(--accent-text); }

.banner {
  display: flex; gap: 12px; align-items: center; margin-top: 14px; padding: 12px 14px; border-radius: var(--r);
  background: var(--warn-soft); color: var(--text);
}
.banner p { margin: 0; flex: 1; font-size: 14px; font-weight: 600; }

/* ===== credit card visual ===== */
.rail {
  display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
  margin: 0 -16px; padding: 4px 16px 12px; scroll-padding: 0 16px;
}
.rail::-webkit-scrollbar { display: none; }
.rail > .card-item { flex: 0 0 86%; scroll-snap-align: start; }
.rail > .card-item:only-child { flex-basis: 100%; }
.card-item {
  display: block; width: 100%; text-align: left; border: 0; padding: 8px 8px 14px; margin: 0 0 14px;
  background: var(--surface); border-radius: 24px; box-shadow: var(--shadow); transition: transform .15s var(--ease);
}
.rail > .card-item { margin: 0; }
.card-item:active { transform: scale(.985); }
.ccard {
  position: relative; overflow: hidden; aspect-ratio: 1.586; border-radius: 18px; padding: 16px 18px; color: #fff;
  display: flex; flex-direction: column;
  background:
    radial-gradient(120% 90% at 100% 0%, rgba(255, 255, 255, .28), transparent 50%),
    radial-gradient(80% 60% at 0% 100%, rgba(0, 0, 0, .25), transparent 60%),
    linear-gradient(135deg, var(--c), color-mix(in srgb, var(--c) 45%, #1b0d2a));
  box-shadow: 0 10px 24px color-mix(in srgb, var(--c) 30%, transparent);
}
.ccard::after {
  content: ""; position: absolute; width: 70%; aspect-ratio: 1; right: -25%; bottom: -55%; border-radius: 50%;
  border: 28px solid rgba(255, 255, 255, .07); pointer-events: none;
}
.cc-top { display: flex; justify-content: space-between; align-items: center; }
.cc-bank { font-size: 14px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; opacity: .95; }
.cc-top svg { width: 22px; height: 22px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; opacity: .8; }
.cc-chip {
  width: 40px; height: 30px; border-radius: 7px; margin: auto 0 10px;
  background:
    linear-gradient(90deg, transparent 32%, rgba(120, 80, 20, .35) 33%, transparent 34%, transparent 65%, rgba(120, 80, 20, .35) 66%, transparent 67%),
    linear-gradient(0deg, transparent 48%, rgba(120, 80, 20, .35) 49%, transparent 51%),
    linear-gradient(135deg, #fbe7a8, #d9ae54 60%, #f3d68a);
}
.cc-name { font-size: 18px; font-weight: 700; line-height: 1.2; text-shadow: 0 1px 2px rgba(0, 0, 0, .15); }
.cc-bottom { display: flex; justify-content: space-between; align-items: flex-end; margin-top: 6px; font-size: 13px; }
.cc-num { font-family: ui-monospace, Menlo, monospace; letter-spacing: .12em; opacity: .9; }
.cc-note { background: rgba(255, 255, 255, .2); padding: 2px 9px; border-radius: 999px; font-size: 11px; font-weight: 700; }
.cc-meta { padding: 12px 8px 0; }
.cc-meta-row { display: flex; justify-content: space-between; gap: 10px; }
.cc-meta-row small { display: block; font-size: 12px; color: var(--muted); }
.cc-meta-row b { font-size: 17px; }
.cc-meta-row .r { text-align: right; }
.meter { height: 8px; border-radius: 4px; background: var(--surface-2); overflow: hidden; margin: 10px 0 6px; }
.meter i { display: block; height: 100%; border-radius: 4px; background: var(--good); transition: width .6s var(--ease); }
.meter.warn i { background: var(--warn); }
.meter.bad i { background: var(--bad); }
.cc-meta > small { font-size: 12px; }

/* ===== transactions ===== */
.month-nav { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.month-nav b { font-size: 17px; }
.chip-row { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 12px -16px 0; padding: 0 16px 2px; }
.chip-row::-webkit-scrollbar { display: none; }
.fchip {
  flex: none; display: inline-flex; align-items: center; gap: 6px; border: 0; padding: 8px 14px; border-radius: 999px;
  background: var(--surface); box-shadow: var(--shadow); font-size: 14px; font-weight: 600; color: var(--muted);
}
.fchip.on { background: var(--text); color: var(--bg); }
.summary { display: flex; gap: 18px; align-items: center; margin-top: 14px; }
.donut-wrap { position: relative; width: 116px; height: 116px; flex: none; }
.donut { width: 100%; height: 100%; }
.donut circle { transition: stroke-dasharray .6s var(--ease); }
.donut-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.donut-center small { font-size: 11px; color: var(--muted); }
.donut-center b { font-size: 15px; }
.legend { flex: 1; min-width: 0; }
.lg { display: flex; align-items: center; gap: 8px; font-size: 13px; padding: 4px 0; }
.lg .grow { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lg b { font-size: 13px; }
.summary-total { margin-top: 14px; }
.summary-total small { color: var(--muted); font-size: 13px; }
.summary-total b { display: block; font-size: 26px; }

/* ===== statements ===== */
details.stmt { border-bottom: 1px solid var(--line); }
details.stmt:last-child { border-bottom: 0; }
details.stmt summary { list-style: none; display: flex; gap: 10px; align-items: center; padding: 14px 0; cursor: pointer; }
details.stmt summary::-webkit-details-marker { display: none; }
details.stmt summary::after { content: "›"; color: var(--muted); font-size: 20px; transition: transform .2s; }
details.stmt[open] summary::after { transform: rotate(90deg); }
.stmt-body { padding: 0 0 14px; font-size: 14px; }
.stmt-body .line { display: flex; justify-content: space-between; gap: 10px; padding: 5px 0; color: var(--muted); }
.stmt-body .line span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stmt-actions { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }

/* ===== sheet ===== */
.sheet { position: fixed; inset: 0; z-index: 20; display: flex; align-items: flex-end; justify-content: center; }
.sheet[hidden] { display: none; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(30, 10, 18, .45); backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px); animation: fade .2s; }
.sheet-panel {
  position: relative; width: 100%; max-width: 640px; max-height: 92vh; overflow: auto; background: var(--surface);
  border-radius: 28px 28px 0 0; padding: 26px 18px calc(22px + env(safe-area-inset-bottom)); animation: up .32s var(--ease);
}
.sheet-panel::before { content: ""; position: absolute; top: 9px; left: 50%; width: 38px; height: 5px; margin-left: -19px; border-radius: 3px; background: var(--surface-3); }
.sheet-panel h2 { margin: 0 0 16px; font-size: 21px; }
.sheet-panel .ccard { margin-bottom: 16px; }
@keyframes up { from { transform: translateY(60px); opacity: .3; } }
@keyframes fade { from { opacity: 0; } }

/* ===== forms ===== */
.form [hidden] { display: none !important; }
.form label { display: block; margin: 0 0 14px; font-size: 13px; color: var(--muted); font-weight: 650; }
.form input, .form select {
  display: block; width: 100%; margin-top: 6px; font: inherit; font-size: 16px; color: var(--text);
  background: var(--surface-2); border: 1.5px solid transparent; border-radius: 14px; padding: 12px 14px; min-height: 48px;
  transition: border-color .2s, background .2s; -webkit-appearance: none; appearance: none;
}
.form select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238b7b81' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; background-size: 18px; padding-right: 40px;
}
.form input:focus, .form select:focus { outline: none; border-color: var(--accent); background: var(--surface); }
.form .amount-field { display: flex; align-items: center; gap: 6px; background: var(--accent-soft); border-radius: 20px; padding: 8px 18px; margin-bottom: 6px; }
.amount-field span { font-size: 30px; font-weight: 700; color: var(--accent-text); }
.form .amount-field input { font-size: 38px; font-weight: 800; background: none; margin: 0; padding: 6px 0; border: 0; color: var(--text); min-height: 0; }
.form .amount-field input:focus { background: none; }
.chips { border: 0; padding: 0; margin: 0 0 14px; display: flex; flex-wrap: wrap; gap: 8px; }
.chips legend { font-size: 13px; color: var(--muted); font-weight: 650; margin-bottom: 8px; padding: 0; }
.form .chip { margin: 0; position: relative; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 13px; border-radius: 999px; background: var(--surface-2);
  color: var(--text); font-weight: 600; font-size: 14px; border: 1.5px solid transparent; transition: all .15s;
}
.chip input:checked + span { border-color: var(--k, var(--accent)); background: color-mix(in srgb, var(--k, var(--accent)) 14%, var(--surface)); }
.chip input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.swatches { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.swatches .chip span { width: 36px; height: 36px; padding: 0; border-radius: 50%; border: 3px solid var(--surface); background: var(--sw); box-shadow: 0 0 0 1.5px var(--line); }
.swatches .chip input:checked + span { box-shadow: 0 0 0 2.5px var(--text); background: var(--sw); border-color: var(--surface); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.hint { font-size: 13px; color: var(--muted); margin: 0 0 14px; }
.preview { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; font-weight: 600; color: var(--accent-text); background: var(--accent-soft); border-radius: 12px; padding: 10px 12px; margin: 0 0 14px; }
.preview:empty { display: none; }
.form-actions { display: flex; gap: 8px; margin-top: 10px; }
.form-actions .primary { flex: 1; }

/* ===== misc ===== */
.toast {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(108px + env(safe-area-inset-bottom)); z-index: 30;
  background: color-mix(in srgb, var(--text) 92%, transparent); color: var(--bg); padding: 11px 20px; border-radius: 999px;
  font-size: 14px; font-weight: 600; max-width: 90vw; text-align: center; box-shadow: 0 8px 24px rgba(0, 0, 0, .18); animation: toast .3s var(--ease);
}
.toast[hidden] { display: none; }
@keyframes toast { from { transform: translate(-50%, 16px); opacity: 0; } }
.empty { text-align: center; padding: 36px 12px; }
.empty svg { width: 180px; height: auto; margin: 0 auto 8px; }
.empty h2 { margin: 8px 0 6px; font-size: 21px; }
.empty p { color: var(--muted); margin: 0 0 20px; }
.empty-small { text-align: center; color: var(--muted); padding: 28px 12px; }
.kv { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; font-size: 14px; border-bottom: 1px solid var(--line); }
.kv:last-child { border-bottom: 0; }
.kv span:first-child { color: var(--muted); white-space: nowrap; }
.kv span:last-child { text-align: right; font-weight: 600; }
.set-head { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.set-ic { width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; font-size: 19px; background: var(--accent-soft); flex: none; }
.set-head b { display: block; font-size: 16px; }
.set-head small { color: var(--muted); font-size: 13px; }

/* ===== lock screen ===== */
body.locked > .top, body.locked > main, body.locked > .tabs { display: none; }
.lock { position: fixed; inset: 0; z-index: 40; background: var(--bg); overflow: auto; padding: calc(48px + env(safe-area-inset-top)) 18px calc(32px + env(safe-area-inset-bottom)); }
.lock::before {
  content: ""; position: fixed; left: -20%; right: -20%; top: -180px; height: 420px; z-index: -1; pointer-events: none;
  background: radial-gradient(closest-side, rgba(255, 110, 140, .35), transparent), radial-gradient(closest-side at 80% 40%, rgba(255, 160, 90, .28), transparent);
  filter: blur(10px);
}
.lock[hidden] { display: none; }
.lock-inner { position: relative; max-width: 400px; margin: 0 auto; animation: rise .5s var(--ease) both; }
.lock-logo { text-align: center; margin-bottom: 24px; }
.lock-logo img { width: 76px; height: 76px; border-radius: 22px; box-shadow: var(--shadow-accent); }
.lock-logo h1 { margin: 12px 0 2px; font-size: 26px; font-weight: 800; }
.lock-logo p { margin: 0; color: var(--muted); font-size: 14px; }
.lock h2 { margin: 0 0 6px; font-size: 21px; }
.lock .panel { padding: 22px 18px; border-radius: var(--r-lg); }
.lock-err { color: var(--bad); min-height: 1.4em; font-size: 14px; font-weight: 600; margin: 0 0 10px; }
.code {
  font: 800 26px/1.2 ui-monospace, Menlo, monospace; letter-spacing: 3px; text-align: center; padding: 20px 8px;
  background: var(--accent-soft); color: var(--accent-text); border-radius: 16px; margin: 16px 0; user-select: all; -webkit-user-select: all;
}
.linkbtn { display: block; margin: 12px auto 0; background: none; border: 0; color: var(--accent-text); font-size: 15px; font-weight: 600; padding: 10px; }

/* ===== motion ===== */
@keyframes rise { from { opacity: 0; transform: translateY(12px); } }
#view.anim > * { animation: rise .45s var(--ease) both; }
#view.anim > *:nth-child(2) { animation-delay: .04s; }
#view.anim > *:nth-child(3) { animation-delay: .08s; }
#view.anim > *:nth-child(4) { animation-delay: .12s; }
#view.anim > *:nth-child(5) { animation-delay: .16s; }
#view.anim > *:nth-child(6) { animation-delay: .2s; }
#view.anim > *:nth-child(n+7) { animation-delay: .24s; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
