:root{--bg: #121212;--fg: #ffffff;--muted: #a0a0a0;--line: #3a3a3c;--line-strong: #8a8a8a;--key: #3a3a3c;--key-pressed: #4d4d50;--panel: #1e1e1f;--green: #17602b;--hint: #e8c547;--cell: min(15vw, 7.4dvh, 64px);--key-height: min(6.8dvh, 56px);color-scheme:dark}*{box-sizing:border-box}html,body,#root{height:100%;margin:0}body{background:var(--bg);color:var(--fg);font-family:Helvetica Neue,Helvetica,Arial,sans-serif;-webkit-tap-highlight-color:transparent}button{font:inherit;color:inherit;background:none;border:0;padding:0;cursor:pointer;touch-action:manipulation}button:disabled{cursor:default}button:focus-visible,a:focus-visible{outline:2px solid var(--hint);outline-offset:2px}a{color:var(--fg)}.app{height:100dvh;max-width:480px;margin:0 auto;padding:env(safe-area-inset-top) 16px env(safe-area-inset-bottom);display:flex;flex-direction:column}header{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;height:52px;flex-shrink:0;border-bottom:1px solid var(--line)}header h1{margin:0;font-size:1.5rem}.header-right{justify-self:end;display:flex}.icon-button{width:44px;height:44px;display:grid;place-items:center;border-radius:8px}.icon-button:disabled{opacity:.3}.coins{height:44px;padding:0 6px;display:flex;align-items:center;gap:4px;font-weight:700;font-variant-numeric:tabular-nums;color:var(--hint)}.coins svg{width:20px;height:20px}main{flex:1;min-height:0;padding:8px 0 12px;display:flex;flex-direction:column;align-items:center;justify-content:space-between}.target{font-size:2.5rem;font-weight:700;line-height:1;padding:6px 0;font-variant-numeric:tabular-nums}.board{display:grid;gap:6px;justify-content:center}.row{display:grid;grid-template-columns:repeat(5,var(--cell));gap:6px}.cell{height:var(--cell);display:grid;place-items:center;border:2px solid var(--line);font-size:calc(var(--cell) * .36);font-weight:700;font-variant-numeric:tabular-nums}.cell.filled{border-color:var(--line-strong)}.cell.active{border-color:var(--fg)}.cell.equals{background:var(--green);border-color:var(--green)}.cell.hint{color:var(--hint);border-color:var(--hint);background:none}.cell.won{animation:win .25s ease forwards}@keyframes win{to{background:var(--green);border-color:var(--green)}}.status{height:1.5rem;margin:6px 0;color:var(--muted)}.text-button{height:1.5rem;margin:6px 0;text-decoration:underline;text-underline-offset:4px}.keypad,.numbers{width:100%;display:flex;flex-direction:column;gap:8px}.results,.ops{display:flex;justify-content:center;gap:8px}.results{min-height:var(--key-height)}.start{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}.key{height:var(--key-height);min-width:0;flex:1;display:grid;place-items:center;border-radius:6px;font-size:1.35rem;font-weight:700;font-variant-numeric:tabular-nums}.results .key{flex:0 1 calc((100% - 32px)/5)}.key.number{background:var(--fg);color:var(--bg)}.key.op{background:var(--key)}.key.op:active:not(:disabled){background:var(--key-pressed)}.key:disabled{opacity:.2}.overlay{position:fixed;inset:0;z-index:10;padding:16px;display:grid;place-items:center;background:#000000b3}.dialog{position:relative;width:100%;max-width:420px;max-height:100%;overflow-y:auto;padding:28px 24px 24px;border:1px solid var(--line);border-radius:12px;background:var(--panel);text-align:center}.dialog h2{margin:0 0 16px;font-size:1.6rem}.dialog ul{margin:0 0 16px;padding-left:1.2em;text-align:left;line-height:1.5}.dialog .board{--cell: 44px}.dialog .close{position:absolute;top:8px;right:8px}.dialog p{margin:0 0 12px}.dialog .muted{color:var(--muted)}.dialog .muted+.board{margin-bottom:16px}.dialog .stat{margin-bottom:20px;font-size:2.2rem;font-weight:700;font-variant-numeric:tabular-nums}.dialog .links{list-style:none;padding:0;text-align:center;line-height:2.2}.primary{width:100%;height:48px;margin-bottom:20px;border-radius:8px;background:var(--fg);color:var(--bg);font-size:1.1rem;font-weight:700}.primary:last-child{margin-bottom:0}.tools{flex-shrink:0;display:flex;justify-content:center;gap:24px;padding:0 0 16px}.tool{position:relative;width:56px;height:56px;display:grid;place-items:center;border-radius:50%;background:var(--key)}.tool:disabled{opacity:.4}.tool .price,.side-button .price{position:absolute;bottom:-8px;left:50%;transform:translate(-50%);padding:1px 8px;border:1px solid var(--hint);border-radius:999px;background:var(--bg);color:var(--hint);font-size:.75rem;font-weight:700}.tool .count{position:absolute;top:-4px;right:-4px;min-width:22px;height:22px;padding:0 6px;display:grid;place-items:center;border-radius:999px;background:var(--hint);color:var(--bg);font-size:.75rem;font-weight:700}.score{display:flex;align-items:center;gap:4px;color:var(--hint);font-weight:700;font-variant-numeric:tabular-nums}.score svg{width:18px;height:18px}.splash{position:fixed;inset:0;margin:auto;width:calc(100vh * 765 / 2732)}header.bare{border-bottom:0}.start-screen{justify-content:flex-start;gap:32px;padding-top:8dvh}.logo{margin:0;font-size:2.8rem;text-shadow:0 0 16px var(--bg),0 0 4px var(--bg)}.daily-card{width:100%;display:flex;align-items:center;gap:16px;padding:14px 16px;border:1px solid var(--line-strong);border-radius:14px;background:var(--panel);text-align:left}.calendar{width:56px;display:flex;flex-direction:column;overflow:hidden;border-radius:10px;background:var(--fg);color:var(--bg);text-align:center;font-weight:700}.calendar .month{padding:2px 0;background:var(--hint);font-size:.75rem;text-transform:uppercase}.calendar .day{padding:2px 0 4px;font-size:1.6rem}.daily-text{flex:1;display:flex;flex-direction:column;gap:4px}.daily-text strong{font-size:1.2rem}.streak{display:flex;align-items:center;gap:4px;color:var(--hint);font-weight:700}.streak svg{width:18px;height:18px}.badge{display:grid;place-items:center;border-radius:50%}.badge.new{width:12px;height:12px;background:#e5484d}.badge.done{width:24px;height:24px;background:var(--green)}.badge.done svg{width:16px;height:16px}.times-circle{position:fixed;inset:0;width:100%;height:100%;pointer-events:none}header.bare,.start-screen{position:relative}.stage{width:100%;flex:1;min-height:0;display:flex;align-items:flex-end;justify-content:space-between}.stage .side{width:64px;display:flex;flex-direction:column;gap:16px;padding-bottom:10px}.side-button{position:relative;width:64px;display:flex;flex-direction:column;align-items:center;gap:2px;padding:8px 0 14px;border:1px solid var(--line-strong);border-radius:14px;background:var(--panel);font-size:.8rem;font-weight:700}.side-button svg{color:var(--hint)}.side-button .price svg{width:12px;height:12px;vertical-align:-1px}.chest-progress{width:100%;display:flex;align-items:center;gap:12px;color:var(--hint);font-weight:700;font-variant-numeric:tabular-nums}.chest-progress .bar{flex:1;height:10px;overflow:hidden;border-radius:999px;background:var(--key)}.chest-progress .bar span{display:block;height:100%;background:var(--hint)}.dialog .chest{color:var(--hint);font-weight:700}.start-screen .play{margin:0 0 24px;height:60px;border-radius:14px;font-size:1.4rem}.menu{display:flex;flex-direction:column;gap:8px}.menu button{height:48px;border-radius:8px;background:var(--key);font-weight:700}.menu .switch,.menu .pack{display:flex;justify-content:space-between;align-items:center;padding:0 16px}.menu .switch .state{color:var(--muted)}.menu .switch[aria-pressed=true] .state,.menu .pack .price{color:var(--hint)}.dialog .menu{margin-bottom:12px}.menu .pack{height:auto;min-height:48px;padding:8px 16px;text-align:left}.pack-name{display:flex;flex-direction:column;gap:2px}.pack-name small{color:var(--muted);font-size:.8rem;font-weight:400}.dialog h3{margin:16px 0 8px;color:var(--muted);font-size:.9rem;text-align:left}
