:root {
  --bg: #f5f5f7; --card: #fff; --text: #1d1d1f; --muted: #6e6e73; --line: #d2d2d7;
  --blue: #0071e3; --blue-press: #0062c4; --red: #d70015; --field: #fff;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #000; --card: #1c1c1e; --text: #f5f5f7; --muted: #98989d; --line: #38383a; --blue: #0a84ff; --blue-press: #409cff; --red: #ff453a; --field: #2c2c2e; }
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 17px/1.4 var(--font); -webkit-font-smoothing: antialiased; }
body { min-height: 100dvh; padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); }
#app { min-height: 100dvh; display: flex; flex-direction: column; }
.view { flex: 1; display: flex; flex-direction: column; width: 100%; max-width: 440px; margin: 0 auto; padding: 24px 20px; animation: in .35s ease both; }
@keyframes in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .view { animation: none; } }
.center { justify-content: center; text-align: center; }
.logo { width: 88px; height: 88px; border-radius: 22px; margin: 0 auto 28px; box-shadow: 0 8px 24px rgba(0,0,0,.15); }
h1 { font-size: 34px; line-height: 1.1; letter-spacing: -.02em; margin: 0 0 12px; font-weight: 700; }
h2 { font-size: 28px; letter-spacing: -.01em; margin: 0 0 8px; font-weight: 700; }
p { margin: 0 0 24px; color: var(--muted); }
.btn { display: block; width: 100%; border: 0; border-radius: 14px; padding: 15px 20px; background: var(--blue); color: #fff; font: 600 17px var(--font); cursor: pointer; transition: background .15s, transform .1s; }
.btn:active { background: var(--blue-press); transform: scale(.98); }
.btn:disabled { opacity: .5; }
.btn.plain { background: transparent; color: var(--blue); margin-top: 8px; }
.btn.danger { background: transparent; color: var(--red); }
.field { width: 100%; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; background: var(--field); color: var(--text); font: 17px var(--font); margin-bottom: 12px; outline: none; }
.field:focus { border-color: var(--blue); box-shadow: 0 0 0 3px color-mix(in srgb, var(--blue) 25%, transparent); }
.code { text-align: center; font-size: 28px; letter-spacing: .4em; padding-left: calc(16px + .4em); font-variant-numeric: tabular-nums; }
.err { color: var(--red); font-size: 15px; min-height: 22px; margin: 0 0 8px; }
form { text-align: left; }
.back { align-self: flex-start; background: none; border: 0; color: var(--blue); font: 17px var(--font); padding: 8px 0; margin-bottom: 16px; cursor: pointer; }
.card { background: var(--card); border-radius: 18px; padding: 4px 16px; margin-bottom: 20px; }
.row { display: flex; justify-content: space-between; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.row:last-child { border: 0; }
.row span:first-child { color: var(--muted); }
.row span:last-child { text-align: right; overflow-wrap: anywhere; }
.bar { position: sticky; top: 0; backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px); background: color-mix(in srgb, var(--bg) 72%, transparent); }
.empty { text-align: center; color: var(--muted); padding: 40px 0; }
.add-round { display: block; width: 52px; height: 52px; margin: 0 auto 16px; border: 0; border-radius: 50%; background: var(--blue); color: #fff; font: 300 32px/1 var(--font); cursor: pointer; transition: transform .1s; }
.add-round:active { transform: scale(.94); }
.del { border: 0; background: none; color: var(--muted); font: 22px/1 var(--font); padding: 0 0 0 12px; cursor: pointer; }
.muted-note { text-align: center; color: var(--muted); font-size: 14px; margin: 24px 0 8px; }
