:root {
  color-scheme: light; --bg: #f5f4f0; --key: rgba(120, 113, 98, .12); --key-press: rgba(120, 113, 98, .24); --text: #191816;
  --text-2: #6e6a63; --accent: #c25e3a; --accent-press: #a94f2f; --accent-soft: rgba(194, 94, 58, .12); --danger: #d33b2e;
  --glow: rgba(194, 94, 58, .16);
}
@media (prefers-color-scheme: dark) {
  :root { color-scheme: dark; --bg: #0e0e0f; --key: rgba(235, 235, 245, .1); --key-press: rgba(235, 235, 245, .2); --text: #f4f4f5;
    --text-2: #a1a1aa; --accent: #e27a51; --accent-press: #f08c64; --accent-soft: rgba(226, 122, 81, .16); --danger: #ff5f52;
    --glow: rgba(226, 122, 81, .14); }
}
* { box-sizing: border-box; touch-action: manipulation; }
html, body { margin: 0; min-height: 100%; }
body {
  background: radial-gradient(120% 60% at 50% -10%, var(--glow), transparent 70%) no-repeat, var(--bg); color: var(--text);
  font: 16px/1.4 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; -webkit-user-select: none; user-select: none;
  min-height: 100dvh;
}
main { max-width: 340px; margin: 0 auto; padding: calc(9vh + env(safe-area-inset-top)) 20px calc(24px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; align-items: center; }
header { text-align: center; margin-bottom: 26px; }
.logo { border-radius: 20px; box-shadow: 0 12px 34px rgba(20, 15, 5, .18); }
h1 { margin: 14px 0 2px; font: 750 1.75rem/1.1 -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", sans-serif; letter-spacing: -.025em; }
.hint { margin: 0; color: var(--text-2); font-size: .95rem; }
section { width: 100%; display: flex; flex-direction: column; align-items: center; }
button { font: inherit; color: inherit; border: 0; cursor: pointer; }
.glyph { width: 112px; height: 112px; border-radius: 30px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; margin: 8px 0 28px; }
.glyph svg { width: 64px; height: 64px; }
.glyph:active { transform: scale(.96); }
.glyph.busy { animation: breathe 1.4s ease-in-out infinite; }
@keyframes breathe { 50% { transform: scale(.94); opacity: .7; } }
.primary { width: 100%; min-height: 52px; border-radius: 16px; background: var(--accent); color: #fff; font-weight: 650; font-size: 1.02rem; }
.primary:active { background: var(--accent-press); }
.primary:disabled { opacity: .55; }
.link { background: none; color: var(--accent); font-weight: 600; font-size: .95rem; padding: 14px; margin-top: 6px; }
.dots { display: flex; gap: 18px; height: 16px; margin: 4px 0 34px; }
.dots span { width: 13px; height: 13px; border-radius: 50%; border: 1.5px solid var(--text-2); transition: background .12s, border-color .12s; }
.dots span.on { background: var(--text); border-color: var(--text); }
.dots.shake { animation: shake .38s; }
@keyframes shake { 20%, 60% { transform: translateX(-9px); } 40%, 80% { transform: translateX(9px); } }
.pad { display: grid; grid-template-columns: repeat(3, 78px); gap: 16px 24px; }
.pad button { width: 78px; height: 78px; border-radius: 50%; background: var(--key); display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; }
.pad button:active { background: var(--key-press); }
.pad .n { font-size: 2rem; font-weight: 400; letter-spacing: 0; }
.pad .l { font-size: .58rem; font-weight: 700; letter-spacing: .16em; color: var(--text-2); margin-top: 3px; min-height: .6rem; }
.pad button.blank { visibility: hidden; }
.pad button.del { background: transparent; }
.pad button.del svg { width: 28px; height: 28px; }
#err { color: var(--danger); min-height: 1.3em; margin: 20px 0 0; text-align: center; font-size: .94rem; }
[hidden] { display: none !important; }
.glyph.static { cursor: default; margin-bottom: 22px; }
.glyph.static:active { transform: none; }
h2 { margin: 0 0 8px; font: 700 1.25rem/1.25 -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", sans-serif; letter-spacing: -.02em; text-align: center; }
.offer-text { margin: 0 0 24px; color: var(--text-2); text-align: center; line-height: 1.45; }
