:root{color-scheme:dark;font-family:-apple-system,BlinkMacSystemFont,"Hiragino Sans",sans-serif;background:#080c15;color:#f5f5fb;-webkit-text-size-adjust:100%}*{box-sizing:border-box}body{margin:0}button{font:inherit;color:inherit;border:1px solid #77879b;background:#1c293d;border-radius:8px;touch-action:manipulation;-webkit-tap-highlight-color:transparent;min-height:44px}button:disabled{opacity:.4}[hidden]{display:none!important}.shell{max-width:450px;margin:auto;min-height:calc(100dvh - var(--nav-height,88px));padding:3px 4px max(4px,env(safe-area-inset-bottom));display:flex}.stage{position:relative;flex:1;min-width:0;padding:10px;border:1px solid #b6a079;border-radius:16px;background:radial-gradient(ellipse at top,#20374a,#0b1524 75%);overflow:hidden}.hud{display:flex;align-items:center;justify-content:space-between;gap:8px}.hud strong{color:#ffdf9c;font-size:18px}.hud span{font-size:11px;color:#c7d3e1}.hud button{padding:0 12px}.instruction{font-size:12px;color:#c7d3e1;margin:10px 0}.history-head,#history li{display:grid;grid-template-columns:1fr 1fr 1fr;text-align:center;align-items:center}.history-head{font-size:11px;color:#c7d3e1;padding-bottom:6px}#history{margin:0;padding:0;list-style:none}#history li{height:29px;border-top:1px solid #354454;font-variant-numeric:tabular-nums;font-size:14px}#history .guess{letter-spacing:6px;font-size:19px;font-weight:700}#history .exact{color:#ffdf9c}#history li:last-child{border-bottom:1px solid #354454}.input{display:flex;justify-content:center;gap:10px;margin:10px 0}.input span{width:48px;height:48px;border:1px solid #b6a079;border-radius:8px;display:grid;place-items:center;font-size:28px;font-weight:800;color:#ffe1a0;background:#101e30}.keys{display:grid;grid-template-columns:repeat(5,1fr);gap:7px}.keys button{font-size:23px;font-weight:700;min-width:0;padding:0}.actions{display:grid;grid-template-columns:1fr 2fr;gap:8px;margin-top:8px}.primary{background:#f1d398;color:#1c2330;border:0;font-weight:800}.buddy{display:flex;align-items:center;gap:8px;padding-top:5px;min-height:77px}.buddy img{object-fit:contain}.buddy p{margin:0;font-size:12px;line-height:1.6}.buddy b{display:block;color:#ffdf9c;font-size:12px}.buddy span{display:block}.overlay{position:absolute;inset:0;background:#050912e8;display:grid;place-items:center;padding:16px;z-index:2}.panel{width:min(100%,320px);max-height:100%;overflow:auto;padding:20px 16px;display:flex;flex-direction:column;align-items:center;gap:12px;background:#152337;border:1px solid #b6a079;border-radius:12px;text-align:center}.panel img{object-fit:contain;max-height:24dvh}.panel h2{font-size:20px;margin:0;color:#ffe1a0}.panel p{font-size:13px;margin:0;line-height:1.6;white-space:pre-line}.panel button{width:100%;min-height:48px}button:focus-visible{outline:3px solid #ffe4a7;outline-offset:2px}@media(prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}

/* Design review 1: keep all eight deductions easy to follow. */
#history{counter-reset:attempt}#history li{counter-increment:attempt;position:relative}#history li::before{content:counter(attempt);position:absolute;left:3px;font-size:10px;color:#99aabe}#history li.played{background:#ffffff04}#history li.latest{background:#f1d39812}

/* Design review 2: identify the next digit without extra instructions. */
.input span.current{border-width:2px;border-color:#ffe1a0;background:#26384b}.keys button:active:not(:disabled),.actions button:active:not(:disabled){transform:translateY(1px);filter:brightness(1.2)}

/* Design review 3: shorten secondary space on small portrait screens. */
@media(max-height:740px){.stage{padding:8px}.instruction{margin:6px 0}#history li{height:22px}.input{margin:5px 0}.buddy{min-height:65px}.buddy img{width:60px;height:60px}.panel{gap:9px;padding:14px}.panel img{width:96px;height:96px}}
@media(max-height:680px){#history li{height:20px}.instruction{margin:3px 0}.buddy{min-height:57px}.buddy img{width:52px;height:52px}}
