:root{--bg:#f6f3ec;--surface:#fff;--ink:#1d1b16;--muted:#6b665c;--line:#ddd6c8;--accent:#e2572b;--accent-ink:#fff;--target:var(--accent);--made:#e8e1d3;--good:#1f8a4c;--bad:#b3261e;--move-green:#4f8f4a;--move-yellow:#f2c94c;--move-red:#c94a40;font-family:ui-rounded,SF Pro Rounded,system-ui,-apple-system,Segoe UI,sans-serif}@media (prefers-color-scheme:dark){:root:not([data-theme=light]){--bg:#17161a;--surface:#24222a;--ink:#f2efe8;--muted:#a19c92;--line:#3a3742;--made:#36333d;--good:#5fd08f;--bad:#ff8a80;--move-green:#538d4e;--move-yellow:#f2c94c;--move-red:#b9483f;--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark}}:root[data-theme=dark]{--bg:#17161a;--surface:#24222a;--ink:#f2efe8;--muted:#a19c92;--line:#3a3742;--made:#36333d;--good:#5fd08f;--bad:#ff8a80;--move-green:#538d4e;--move-yellow:#f2c94c;--move-red:#b9483f;--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark}*{box-sizing:border-box}body{background:var(--bg);min-height:100dvh;color:var(--ink);justify-content:center;margin:0;display:flex}#app{text-align:center;flex-direction:column;align-items:center;gap:24px;width:100%;max-width:480px;padding:24px 16px 40px;display:flex}h1{letter-spacing:-.02em;margin:0;font-size:2.1rem}.target-wrap{flex-direction:column;align-items:center;gap:4px;margin-top:-10px;display:flex}.label{text-transform:uppercase;letter-spacing:.12em;color:var(--muted);font-size:.75rem}.target{color:var(--target);font-variant-numeric:tabular-nums;font-size:4.5rem;font-weight:800;line-height:1}.timer{color:var(--muted);font-variant-numeric:tabular-nums}button{font:inherit;color:inherit;cursor:pointer;border:2px solid var(--line);background:var(--surface);border-radius:12px;transition:transform 80ms,background .15s,border-color .15s}button:active:not(:disabled){transform:scale(.95)}button:disabled{cursor:default;opacity:.45}button:focus-visible{outline:3px solid var(--accent);outline-offset:2px}.tiles{flex-wrap:wrap;justify-content:center;gap:8px;min-height:72px;display:flex}.tile{font-variant-numeric:tabular-nums;border-radius:16px;min-width:58px;height:64px;padding:0 10px;font-size:1.6rem;font-weight:700}.tile.made{background:var(--made)}.tile.selected{border-color:var(--accent);box-shadow:0 0 0 3px color-mix(in srgb, var(--accent) 30%, transparent)}.tile.win{background:var(--good);border-color:var(--good);color:#fff;opacity:1}.ops{gap:10px;display:flex}.op{border-radius:50%;width:56px;height:56px;font-size:1.6rem;font-weight:700}.op.selected{background:var(--accent);border-color:var(--accent);color:var(--accent-ink)}.status{min-height:1.5em;margin:0;font-weight:600}.status.win{color:var(--good)}.status.error{color:var(--bad)}.status.info{color:var(--muted)}.stats{color:var(--muted);justify-content:center;gap:18px;margin:0;font-size:.85rem;display:flex}.stats span{flex-direction:column;align-items:center;line-height:1.2;display:flex}.stats b{color:var(--ink);font-variant-numeric:tabular-nums;font-size:1.25rem}.retry{align-self:center;font-weight:600;color:var(--accent)!important}.reveal{font:inherit;color:var(--accent);text-underline-offset:3px;cursor:pointer;background:0 0;border:0;padding:0;text-decoration:underline}.reveal:hover{color:var(--ink)}.controls{flex-wrap:wrap;justify-content:center;gap:8px;display:flex}.controls button{padding:10px 16px;font-size:.95rem;font-weight:600}.controls .primary{background:var(--accent);border-color:var(--accent);color:var(--accent-ink)}[hidden]{display:none!important}.tile{touch-action:none;-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}.tile.dragging{opacity:.3}.tile.drop-target{border-color:var(--accent);background:color-mix(in srgb, var(--accent) 12%, var(--surface));transform:scale(1.08)}.tile.pair{border-color:var(--accent)}.tile.ghost{z-index:10;pointer-events:none;border-color:var(--accent);margin:0;transition:none;position:fixed;top:0;left:0;rotate:-3deg;box-shadow:0 10px 24px #0000002e}.picker{z-index:20;background:var(--surface);border:2px solid var(--line);border-radius:18px;flex-direction:column;align-items:center;gap:8px;padding:10px 12px 12px;animation:.12s ease-out pop;display:flex;position:absolute;box-shadow:0 12px 32px #0000002e}.picker-eq{font-variant-numeric:tabular-nums;font-size:1.1rem;font-weight:700}.picker-eq .q{color:var(--accent)}.picker-ops{gap:8px;display:flex}.picker .op{width:48px;height:48px;font-size:1.4rem}@keyframes pop{0%{opacity:0;transform:translateY(4px)scale(.96)}}@media (prefers-reduced-motion:reduce){.picker{animation:none}.tile.ghost{rotate:none}}.difficulty{gap:4px;display:inline-flex}.difficulty i{background:var(--line);border-radius:50%;width:8px;height:8px}.difficulty i.on{background:var(--accent)}.difficulty.week{gap:5px;margin-bottom:12px}.difficulty.week i{width:18px;height:18px;color:var(--muted);border:1.5px solid var(--line);background:0 0;justify-content:center;align-items:center;font-size:10px;font-style:normal;font-weight:800;display:inline-flex}.difficulty.week i.on{background:color-mix(in srgb, var(--accent) 22%, transparent);color:var(--accent);border-color:#0000}.difficulty.week i.today{background:var(--accent);border-color:var(--accent);color:var(--accent-ink)}.tries{color:var(--muted);align-items:center;gap:10px;min-height:1.4em;font-size:.9rem;font-weight:600;display:flex}.rounds{font-variant-numeric:tabular-nums;flex-direction:column;align-self:center;gap:5px;width:100%;max-width:380px;margin:-6px 0 0;padding:0;font-size:clamp(.62rem,3.3vw,.85rem);list-style:none;display:flex}.rounds>li{grid-template-columns:1.1em 1fr;align-items:center;gap:6px;display:grid}.rounds-label{color:var(--muted);text-align:right;font-weight:700}.rounds>li.current .rounds-label{color:var(--accent)}.rounds .chips{grid-template-columns:repeat(4,1fr);gap:3px;display:grid}.rounds .chip{text-align:center;text-overflow:clip;min-height:1.9em;padding:3px 1px;overflow:hidden}.rounds .mark{margin-right:2px}.chips{flex-wrap:wrap;gap:4px;margin:0;padding:0;list-style:none;display:flex}.chip,.key{white-space:nowrap;border:1px solid #0000;border-radius:6px;padding:2px 7px}.chip.green,.key.green{background:var(--move-green);color:#fff}.chip.yellow,.key.yellow{background:var(--move-yellow);color:#1d1b16}.chip.red,.key.red{background:var(--move-red);color:#fff}.chip.blank,.key.blank{border-color:var(--line);color:var(--muted)}.chip.done{background:var(--made);color:var(--ink)}.chip.pending{border-color:var(--line);color:var(--muted);border-style:dashed}.key{font-weight:600}.mark{margin-right:5px;font-weight:800}.chip.slot{border:1px dashed var(--line);min-width:4.5em;min-height:1.7em}.chip.pop{animation:.35s ease-out fresh}.chip.flip{animation:.45s both flip}@keyframes flip{0%{transform:rotateX(90deg)}to{transform:rotateX(0)}}@media (prefers-reduced-motion:reduce){.chip.pop,.chip.flip{animation:none}}.round-note{color:var(--muted);margin:-10px 0 0;font-size:.85rem}.sr-only{clip-path:inset(50%);white-space:nowrap;width:1px;height:1px;position:absolute;overflow:hidden}.tile.miss{background:var(--bad);border-color:var(--bad);color:#fff;opacity:1;animation:.4s shake}@keyframes shake{20%,60%{transform:translate(-6px)}40%,80%{transform:translate(6px)}}@media (prefers-reduced-motion:reduce){.tile.miss{animation:none}}.demo-bar{border:2px dashed var(--line);color:var(--muted);border-radius:14px;flex-wrap:wrap;justify-content:center;align-items:center;gap:8px;padding:10px 12px;font-size:.9rem;display:flex}.demo-bar button{padding:6px 12px;font-weight:600}.demo-bar .primary{background:var(--accent);border-color:var(--accent);color:var(--accent-ink)}#title{cursor:default;-webkit-user-select:none;user-select:none;-webkit-touch-callout:none;touch-action:manipulation}.tile.fresh{animation:.45s ease-out fresh}@keyframes fresh{0%{transform:scale(.8)}60%{transform:scale(1.08)}to{transform:scale(1)}}@media (prefers-reduced-motion:reduce){.tile.fresh{animation:none}}.shuffle{color:var(--muted);background:0 0;border:0;margin-top:-12px;padding:4px 10px;font-size:.9rem;font-weight:600}.shuffle:hover:not(:disabled){color:var(--ink)}.tiles.shuffled .tile{animation:.35s ease-out fresh}@media (prefers-reduced-motion:reduce){.tiles.shuffled .tile{animation:none}}button{-webkit-tap-highlight-color:transparent}#app{padding:12px 16px calc(12px + env(safe-area-inset-bottom,0px));gap:16px}.topbar{grid-template-columns:44px 1fr 44px;align-self:stretch;align-items:center;padding-bottom:5px;display:grid}.topbar h1{text-align:center}.icon-btn{width:44px;height:44px;color:var(--ink);background:0 0;border:0;border-radius:12px;justify-content:center;align-items:center;padding:0;display:inline-flex}.icon-btn.soft{background:var(--bg)}.meta{flex-wrap:wrap;justify-content:center;align-items:center;gap:6px 14px;display:flex}.meta .timer{font-weight:600}.ops{flex-wrap:wrap;justify-content:center;align-items:center;gap:8px}.op{width:52px;height:52px;font-size:1.5rem}.tools{justify-content:center;gap:16px;margin-top:-4px;display:flex}.tool{border-color:var(--ink);height:46px;color:var(--ink);white-space:nowrap;border-radius:14px;justify-content:center;align-items:center;gap:8px;padding:0 18px 0 14px;font-size:.95rem;font-weight:700;display:inline-flex;position:relative}.tool svg{flex:none;width:20px;height:20px}.tool .badge{box-sizing:border-box;background:var(--ink);min-width:20px;height:20px;color:var(--bg);font-variant-numeric:tabular-nums;border-radius:999px;padding:0 5px;font-size:12px;font-weight:700;line-height:20px;position:absolute;top:-8px;right:-8px}.controls .link,.retry{color:var(--muted);text-underline-offset:3px;background:0 0;border:0;padding:8px 12px;text-decoration:underline}.controls .link:hover:not(:disabled),.retry:hover{color:var(--ink)}.backdrop{z-index:30;background:#00000059;position:fixed;inset:0}body.paused #app .target,body.paused #app .tiles{filter:blur(14px);transition:filter .2s}.menu{z-index:31;box-sizing:border-box;width:min(300px,82vw);padding:calc(16px + env(safe-area-inset-top,0px)) 16px 16px;background:var(--surface);color:var(--ink);text-align:left;flex-direction:column;gap:22px;font-family:inherit;display:flex;position:fixed;top:0;bottom:0;left:0;box-shadow:8px 0 24px #00000026}.menu:not([hidden]){animation:.18s ease-out slide-in}.menu-head{justify-content:space-between;align-items:center;display:flex}.menu-title{letter-spacing:-.02em;font-size:1.6rem;font-weight:700}.menu-item{color:var(--ink);text-align:left;background:0 0;border:0;border-radius:12px;align-items:center;gap:12px;padding:12px 8px;font-weight:600;display:flex}.menu-item:hover{background:var(--bg)}.sheet{z-index:31;box-sizing:border-box;max-width:480px;max-height:85dvh;padding:22px 22px calc(20px + env(safe-area-inset-bottom,0px));background:var(--surface);color:var(--ink);text-align:left;border-radius:22px 22px 0 0;flex-direction:column;gap:16px;margin:0 auto;font-family:inherit;display:flex;position:fixed;bottom:0;left:0;right:0;overflow-y:auto}.sheet:not([hidden]){animation:.2s ease-out slide-up}.sheet-head{justify-content:space-between;align-items:center;display:flex}.sheet h2{margin:0;font-size:1.4rem}.steps{counter-reset:step;flex-direction:column;gap:12px;margin:0;padding:0;line-height:1.45;list-style:none;display:flex}.steps>li{counter-increment:step;gap:12px;display:flex}.legend{flex-direction:column;gap:6px;margin:8px 0;display:flex}.legend>span{grid-template-columns:5.6em 1fr;align-items:center;gap:10px;display:grid}.legend .key{text-align:center}.nowrap{white-space:nowrap}.target-ref{color:var(--target);font-weight:700}.legend .key{justify-content:center;display:inline-flex}.example{flex-direction:column;gap:6px;margin:8px 0 0;display:flex}.example-puzzle,.example-caption{color:var(--muted);font-size:.85rem}.example-caption{min-height:1.3em;font-weight:600}.example-row{font-variant-numeric:tabular-nums;perspective:400px;font-size:.85rem}.move-demo{flex-direction:column;gap:6px;margin:14px 0 0;display:flex}.demo-stage{background:var(--bg);border-radius:16px;height:214px;transition:opacity .35s;display:block;position:relative}.demo-stage.fade{opacity:0}.demo-target,.demo-tile,.demo-op,.demo-picker,.demo-finger,.demo-float,.demo-ops{position:absolute;top:0;left:50%}.demo-target{color:var(--target);font-variant-numeric:tabular-nums;font-size:3.2rem;font-weight:800;line-height:1;top:14px;translate:-50%}.demo-tile{box-sizing:border-box;border:2px solid var(--line);background:var(--surface);font-variant-numeric:tabular-nums;border-radius:12px;justify-content:center;align-items:center;width:42px;height:46px;font-size:1.2rem;font-weight:700;transition:translate .55s cubic-bezier(.4,0,.2,1),scale .2s,opacity .3s,border-color .15s,background .15s,box-shadow .15s;display:flex;top:74px}.demo-tile.made{background:var(--made)}.demo-tile.selected{border-color:var(--accent);box-shadow:0 0 0 3px color-mix(in srgb, var(--accent) 30%, transparent)}.demo-tile.pair{border-color:var(--accent)}.demo-tile.target{border-color:var(--accent);background:color-mix(in srgb, var(--accent) 12%, var(--surface));scale:1.08}.demo-tile.lifted{z-index:2;border-color:var(--accent);rotate:-3deg;scale:1.06;box-shadow:0 8px 18px #0000002e}.demo-tile.gone{opacity:0;transition-duration:.3s;scale:.5}.demo-tile.fresh{animation:.45s ease-out .15s backwards fresh}.demo-ops{gap:8px;display:flex;top:134px;translate:-50%}.demo-op{box-sizing:border-box;border:2px solid var(--line);background:var(--surface);border-radius:50%;justify-content:center;align-items:center;width:34px;height:34px;font-size:1.1rem;font-weight:700;transition:background .15s,border-color .15s,color .15s,opacity .15s;display:flex;position:static}.demo-ops.inactive .demo-op{opacity:.45}.demo-op.small{width:30px;height:30px;font-size:1rem}.demo-op.selected{background:var(--accent);border-color:var(--accent);color:var(--accent-ink)}.demo-picker{z-index:3;background:var(--surface);border:2px solid var(--line);opacity:0;border-radius:14px;flex-direction:column;align-items:center;gap:6px;padding:6px 8px 8px;transition:opacity .15s,scale .15s;display:flex;top:130px;translate:-50%;scale:.94;box-shadow:0 10px 24px #0000002e}.demo-picker.open{opacity:1;scale:1}.demo-eq{font-variant-numeric:tabular-nums;font-weight:700}.demo-eq .q{color:var(--accent)}.demo-picker-ops{gap:6px;display:flex}.demo-finger{z-index:4;transform-origin:11px 0;filter:drop-shadow(0 2px 3px #0003);margin:0 0 0 -11px;line-height:0;transition:translate .6s cubic-bezier(.4,0,.2,1),scale .12s}.demo-finger .hand{fill:var(--surface)}.demo-finger .outline{fill:var(--ink)}.demo-finger.down{scale:.86}.demo-float{z-index:3;color:var(--accent);font-size:1.3rem;font-weight:800;animation:.9s ease-out .1s both demo-float;top:74px}@keyframes demo-float{0%{opacity:0;transform:translateY(0)scale(.6)}35%{opacity:1;transform:translateY(-16px)scale(1)}to{opacity:0;transform:translateY(-30px)scale(1)}}@media (prefers-reduced-motion:reduce){.demo-stage,.demo-tile,.demo-picker,.demo-finger{transition:none}.demo-tile.fresh,.demo-float{animation:none}}.sheet-lead{margin:0;font-size:1.05rem;line-height:1.4}.sheet-foot{color:var(--muted);text-align:center;margin:-4px 0 0;font-size:.85rem}.steps>li:before{content:counter(step);background:var(--made);width:26px;height:26px;color:var(--ink);border-radius:50%;flex:none;justify-content:center;align-items:center;font-weight:700;display:flex}.sheet .play{background:var(--accent);height:48px;color:var(--accent-ink);border:0;border-radius:14px;font-size:1rem;font-weight:700}.menu-foot{flex-direction:column;gap:12px;margin-top:auto;display:flex}.menu-privacy{color:var(--muted);padding:0 8px;font-size:.85rem}.menu-account{border-top:1px solid var(--line);color:var(--muted);flex-direction:column;align-items:flex-start;gap:6px;padding:12px 8px 0;font-size:.9rem;display:flex}.menu-account b{color:var(--ink);overflow-wrap:anywhere}.menu-account .link{color:var(--accent);background:0 0;border:0;padding:0;font-weight:600}.back-today{color:var(--accent);background:0 0;border:0;padding:2px 8px;font-size:.85rem;font-weight:600}.cta{box-sizing:border-box;border:1px solid var(--line);background:var(--surface);border-radius:16px;flex-direction:column;align-items:center;gap:10px;max-width:340px;margin:0 auto;padding:14px 16px;display:flex}.cta p{color:var(--muted);margin:0;font-size:.9rem;line-height:1.4}.cta .primary{background:var(--accent);color:var(--accent-ink);border:0;border-radius:12px;padding:10px 22px;font-weight:700}.history{min-height:50dvh}.history-body{flex-direction:column;gap:14px;display:flex}.history-pitch{margin:0;font-size:1.05rem;line-height:1.45}.history-note{color:var(--muted);margin:0;font-size:.85rem;line-height:1.4}.history-body .link{color:var(--accent);background:0 0;border:0;align-self:flex-start;padding:0;font-weight:600}.days{flex-direction:column;gap:6px;margin:0;padding:0;list-style:none;display:flex}.day{border:1px solid var(--line);background:var(--surface);width:100%;color:var(--ink);text-align:left;border-radius:12px;grid-template-columns:1fr auto;align-items:center;gap:4px 12px;padding:10px 12px;font-size:.95rem;display:grid}.day:hover{background:var(--bg)}.day[aria-current=true]{border-color:var(--accent)}.day-name{white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.day .difficulty{grid-row:2}.day-result{color:var(--muted);grid-area:1/2/span 2;font-size:.85rem;font-weight:600}.day-result.won{color:var(--good)}.day-result.lost,.day-result.gave-up{color:var(--bad)}.day-result.unplayed{color:var(--accent)}@keyframes slide-in{0%{transform:translate(-100%)}}@keyframes slide-up{0%{transform:translateY(100%)}}@media (prefers-reduced-motion:reduce){.menu:not([hidden]),.sheet:not([hidden]){animation:none}}.ops{flex-wrap:nowrap;gap:6px}.op{flex:none;width:clamp(40px,12.4vw,52px);height:clamp(40px,12.4vw,52px)}.topbar h1,.menu-title{text-transform:uppercase;letter-spacing:.06em}.brand{flex-direction:column;align-items:center;gap:2px;display:flex}.tagline{color:var(--muted);letter-spacing:.01em;margin:0;font-size:.9rem;font-weight:600}.topbar{align-items:start}:root{--glow:color-mix(in srgb, var(--accent) 35%, transparent)}.merge-ghost{box-sizing:border-box;pointer-events:none;border:2px solid var(--accent);background:var(--surface);color:var(--ink);font-variant-numeric:tabular-nums;border-radius:16px;justify-content:center;align-items:center;font-size:1.6rem;font-weight:700;display:flex;position:fixed;box-shadow:0 8px 20px #0000001f}.merge-op{z-index:13;pointer-events:none;color:var(--accent);font-size:1.4rem;font-weight:800;position:fixed}.op.inactive{opacity:.45}.op.inactive:active{transform:none}@media (width>=600px){#menu-open{top:calc(12px + env(safe-area-inset-top,0px));z-index:5;position:fixed;left:16px}}.topbar .brand{grid-column:2}.badges{flex-direction:column;place-self:center end;align-items:flex-end;gap:4px;display:flex}.env-badge,.mode-badge{letter-spacing:.06em;text-transform:uppercase;white-space:nowrap;border-radius:999px;padding:3px 8px;font-size:11px;font-weight:700}.env-badge{background:var(--accent);color:var(--accent-ink)}.mode-badge{background:var(--move-green);color:#fff}.env-badge[hidden],.mode-badge[hidden],.menu-item[hidden]{display:none}.menu-item .grow{flex:1}.switch{background:var(--line);border-radius:999px;flex:none;width:40px;height:24px;transition:background .15s;position:relative}.switch:after{content:"";background:#fff;border-radius:50%;width:18px;height:18px;transition:transform .15s;position:absolute;top:3px;left:3px}[aria-checked=true] .switch{background:var(--move-green)}[aria-checked=true] .switch:after{transform:translate(16px)}.target.shimmer{animation:1.4s shimmer}@keyframes shimmer{20%{color:var(--move-green)}45%{color:var(--move-yellow)}70%{color:var(--move-red)}}@media (prefers-reduced-motion:reduce){.target.shimmer{animation:none}}
