:root { --paper: #f3ecdf; --card: #fbf7ef; --ink: #1f3a93; --muted: #6a74a0; --pink: #f04eb0; --line: #d9d2c3; --err: #c2412d; color-scheme: light; }
@media (prefers-color-scheme: dark) { :root { --paper: #10162b; --card: #1a2240; --ink: #eef0fa; --muted: #9aa5cc; --pink: #ff6cc1; --line: #2e3860; --err: #ff8a7a; color-scheme: dark; } }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; }
body { background: var(--paper); color: var(--ink); font: 16px/1.35 system-ui, -apple-system, 'Segoe UI', sans-serif; }
#app { min-height: 100dvh; max-width: 520px; margin: 0 auto; padding: max(16px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 14px; }
h1 { font-size: 30px; margin: 0; letter-spacing: -.02em; } h1 i { color: var(--pink); font-style: normal; }
h2 { font-size: 24px; margin: 0; }
p { margin: 0; } .muted { color: var(--muted); font-size: 14px; } .err { color: var(--err); font-size: 15px; }
.center { flex: 1; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; gap: 10px; }
label { font-size: 12px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
input { width: 100%; height: 50px; padding: 0 14px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--card); color: var(--ink); font: inherit; font-size: 18px; }
input:focus { outline: none; border-color: var(--pink); }
#code { font-family: ui-monospace, Menlo, monospace; letter-spacing: .2em; text-transform: uppercase; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; touch-action: manipulation; }
.go { height: 56px; border-radius: 999px; background: var(--pink); color: #fff; font-size: 18px; font-weight: 700; width: 100%; flex: none; }
.go:disabled { opacity: .35; }
.field { display: flex; flex-direction: column; gap: 6px; }
.top { display: flex; justify-content: space-between; font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; }
.bar { height: 10px; border-radius: 99px; background: var(--line); overflow: hidden; flex: none; } .bar div { height: 100%; background: var(--pink); transform-origin: left; }
.decs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.decs button { height: 48px; border-radius: 12px; background: var(--card); font-weight: 700; font-size: 17px; }
.decs button.on, .chips button.on, .list button.on { background: var(--ink); color: var(--paper); }
.chips { display: flex; gap: 6px; overflow-x: auto; flex: none; padding-bottom: 2px; scrollbar-width: none; } .chips::-webkit-scrollbar { display: none; }
.chips button { flex: none; height: 38px; padding: 0 14px; border-radius: 99px; background: var(--card); font-size: 14px; white-space: nowrap; }
.list { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; max-height: 34dvh; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.list button { min-height: 44px; padding: 6px 9px; border-radius: 10px; background: var(--card); text-align: left; font-size: 14px; overflow-wrap: anywhere; }
.pick { font-size: 18px; font-weight: 600; }
.foot { margin-top: auto; position: sticky; bottom: max(8px, env(safe-area-inset-bottom)); }
.big { font-size: 52px; font-weight: 800; color: var(--pink); line-height: 1; font-variant-numeric: tabular-nums; }
.emoji { font-size: 60px; line-height: 1; }
.rank { list-style: none; margin: 0; padding: 0; width: 100%; display: flex; flex-direction: column; gap: 6px; }
.rank li { display: flex; justify-content: space-between; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--card); text-align: left; }
.rank li.me { outline: 2px solid var(--pink); } .rank b { font-variant-numeric: tabular-nums; }
.link { color: var(--muted); font-size: 14px; text-decoration: underline; padding: 8px; }
