:root{--bg:#ece6d3;--surface:#f8f4e8;--surface-2:#e1d9c2;--text:#22251a;--muted:#62654f;--accent:#56692a;--accent-2:#6d8436;--accent-contrast:#fff;--blue:#2f6fd6;--red:#d6453b;--danger:#c43d2f;--border:#22251a24;--shadow:0 6px 18px #1e201424;--toast-bg:#181c10e6;--radius:14px;--font:system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;--font-display:"Russo One", var(--font);--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light}@media (prefers-color-scheme:dark){:root:not([data-theme=light]){--bg:#141910;--surface:#1e2518;--surface-2:#2a3321;--text:#edf0e2;--muted:#a3a88e;--accent:#9bb35a;--accent-2:#b2c86f;--accent-contrast:#141910;--blue:#5b92f0;--red:#f06a5f;--danger:#ff6b5c;--border:#edf0e21f;--shadow:0 6px 22px #00000073;--toast-bg:#080a06e6;--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark}}:root[data-theme=dark]{--bg:#141910;--surface:#1e2518;--surface-2:#2a3321;--text:#edf0e2;--muted:#a3a88e;--accent:#9bb35a;--accent-2:#b2c86f;--accent-contrast:#141910;--blue:#5b92f0;--red:#f06a5f;--danger:#ff6b5c;--border:#edf0e21f;--shadow:0 6px 22px #00000073;--toast-bg:#080a06e6;--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark}*{box-sizing:border-box}html,body{background:var(--bg);height:100%;color:var(--text);font-family:var(--font);-webkit-tap-highlight-color:transparent;-webkit-user-select:none;user-select:none;overscroll-behavior:none;touch-action:manipulation;margin:0}#app{max-width:560px;height:100%;margin:0 auto;position:relative;overflow:hidden}.screen{flex-direction:column;display:flex;position:absolute;inset:0}.screen[hidden],.modal[hidden]{display:none}button{font:inherit;color:inherit;cursor:pointer}.menu{padding:calc(12px + env(safe-area-inset-top)) 16px calc(16px + env(safe-area-inset-bottom));justify-content:center;align-items:stretch;gap:6px;overflow-y:auto}.hero{height:min(30vh,190px);min-height:130px}.hero canvas{display:block}.logo{font-family:var(--font-display);text-transform:uppercase;text-align:center;letter-spacing:.03em;margin:12px 0 0;font-size:clamp(44px,16vw,68px);font-weight:400;line-height:1}.logo-sub{font-family:var(--font);letter-spacing:.34em;color:var(--accent);margin-top:10px;font-size:14px;font-weight:700;display:block}.tagline{text-align:center;color:var(--muted);margin:4px 0 10px}.card{background:var(--surface);border:1px solid var(--border);box-shadow:var(--shadow);border-radius:18px;flex-direction:column;gap:10px;padding:14px;display:flex}.label{color:var(--muted);font-size:13px}.rules-summary{color:var(--muted);text-align:center;margin:-2px 0 0;font-size:12.5px}.row{gap:10px;display:flex}.row>.btn{flex:1}.btn{border:1px solid var(--border);background:var(--surface-2);border-radius:12px;min-height:46px;padding:0 14px;font-size:15px;font-weight:600}.btn:active{transform:translateY(1px)}.btn.primary{background:var(--accent);color:var(--accent-contrast);border-color:#0000}.btn.danger{background:var(--danger);color:#fff;border-color:#0000}.btn.big{min-height:56px;font-family:var(--font-display);text-transform:uppercase;letter-spacing:.04em;font-size:20px;font-weight:400}.btn.ghost{color:var(--muted);background:0 0;border-style:dashed;font-weight:500}.btn.wide{width:100%}.btn:disabled{cursor:default}.segmented{background:var(--surface-2);border-radius:12px;gap:3px;padding:3px;display:flex}.segmented button{min-height:40px;color:var(--muted);background:0 0;border:0;border-radius:9px;flex:1;padding:0 4px;font-size:14px;font-weight:600}.segmented button.on{background:var(--surface);color:var(--text);box-shadow:0 1px 4px #00000026}.game{padding-top:env(safe-area-inset-top);padding-bottom:env(safe-area-inset-bottom)}.bar{align-items:center;gap:8px;min-height:48px;padding:6px 16px;font-size:13px;transition:background .2s;display:flex}.bar.enemy{padding-left:6px;padding-right:6px}.bar.turn{background:color-mix(in srgb, var(--surface) 70%, transparent)}.dot{width:12px;height:12px;box-shadow:0 0 0 2px var(--surface);border-radius:50%;flex:none}.dot.red{background:var(--red)}.dot.blue{background:var(--blue)}.bar.turn .dot{animation:1.1s ease-in-out infinite pulse}@keyframes pulse{50%{transform:scale(1.35)}}.who{flex-direction:column;min-width:0;line-height:1.15;display:flex}.who b{font-size:15px}.who small{color:var(--muted);font-size:12px}.side{flex-direction:column;align-items:flex-end;min-width:0;margin-left:auto;line-height:1.2;display:flex}.status{white-space:nowrap;min-height:1.2em;font-weight:700}.bar.turn .status:not(:empty){color:var(--accent)}.stats{color:var(--muted);white-space:nowrap;font-variant-numeric:tabular-nums;font-size:12px}.turn{white-space:nowrap}.icon-btn{width:40px;height:40px;color:var(--muted);background:0 0;border:0;border-radius:12px;flex:none;place-items:center;font-size:18px;font-weight:700;display:grid}.icon-btn svg{width:22px;height:22px}.icon-btn:active{background:var(--surface-2)}.board-wrap{flex:1;min-height:0;margin:0 16px;position:relative}.board-wrap canvas{touch-action:none;display:block}.toast{background:var(--toast-bg);color:#fff;text-align:center;opacity:0;pointer-events:none;border-radius:999px;width:max-content;max-width:calc(100% - 24px);padding:8px 14px;font-size:14px;font-weight:600;transition:opacity .2s,transform .2s;position:absolute;top:6px;left:50%;transform:translate(-50%,-8px)}.toast.show{opacity:1;transform:translate(-50%)}.hint{text-align:center;min-height:22px;color:var(--muted);padding:0 16px 4px;font-size:12.5px}.actions{grid-template-columns:repeat(3,1fr);gap:8px;padding:2px 16px 12px;display:grid}.act{border:1px solid var(--border);background:var(--surface);min-height:60px;box-shadow:0 1px 0 var(--border);border-radius:14px;flex-direction:column;justify-content:center;align-items:center;gap:3px;font-size:13px;font-weight:600;transition:background .15s,transform .1s,opacity .15s;display:flex;position:relative}.act:active:not(:disabled){transform:scale(.97)}.act:disabled{opacity:.45;cursor:default}.act.active{background:var(--accent);color:var(--accent-contrast);border-color:#0000}.act .ico{width:24px;height:24px}.act .ico svg{width:24px;height:24px;display:block}.act .badge{background:var(--surface-2);min-width:20px;height:20px;color:var(--text);font-variant-numeric:tabular-nums;border-radius:10px;padding:0 6px;font-size:12px;line-height:20px;position:absolute;top:6px;right:8px}.act.active .badge{color:inherit;background:#ffffff40}.modal{z-index:10;background:#0a0c0680;align-items:flex-end;animation:.15s ease-out fade;display:flex;position:absolute;inset:0}@keyframes fade{0%{opacity:0}}.sheet{background:var(--surface);width:100%;max-height:88%;padding:18px 16px calc(18px + env(safe-area-inset-bottom));box-shadow:var(--shadow);-webkit-user-select:text;user-select:text;border-radius:20px 20px 0 0;animation:.2s ease-out rise;overflow-y:auto}@keyframes rise{0%{transform:translateY(30px)}}.sheet h2{font-family:var(--font-display);margin:0 0 8px;font-size:24px;font-weight:400}.sheet p{margin:0 0 10px;font-size:15px;line-height:1.45}.muted{color:var(--muted)}.t-blue{color:var(--blue)}.t-red{color:var(--red)}.rules{flex-direction:column;gap:10px;margin:0 0 12px;padding:0;list-style:none;display:flex}.rules li{align-items:flex-start;gap:12px;font-size:15px;line-height:1.4;display:flex}.ri{background:var(--surface-2);width:34px;height:34px;color:var(--accent);border-radius:10px;flex:none;place-items:center;font-weight:700;display:grid}.ri svg{width:22px;height:22px}.field{flex-direction:column;gap:6px;margin-bottom:14px;display:flex}.field.inline{flex-direction:row;justify-content:space-between;align-items:center}.field label{font-size:14px;font-weight:600}.stepper{background:var(--surface-2);border-radius:12px;align-items:center;display:flex}.stepper button{background:0 0;border:0;width:44px;height:40px;font-size:20px;font-weight:700}.stepper output{text-align:center;font-variant-numeric:tabular-nums;min-width:28px;font-weight:700}.toggle{align-items:center;gap:10px;min-height:40px;font-size:15px;display:flex}.toggle input{width:20px;height:20px;accent-color:var(--accent)}.sheet .row{margin-top:8px}.result{text-align:center}.result .medal{margin-bottom:6px;font-size:48px;line-height:1}.result.win h2{color:var(--accent)}.result.lose h2{color:var(--danger)}.stats{font-size:13px}table.stats{border-collapse:collapse;width:100%;color:var(--text);margin:8px 0 12px;font-size:15px}table.stats th,table.stats td{border-bottom:1px solid var(--border);text-align:center;font-variant-numeric:tabular-nums;padding:7px 6px}table.stats td:first-child,table.stats th:first-child{text-align:left;color:var(--muted);font-weight:500}@media (min-width:561px){#app{border-left:1px solid var(--border);border-right:1px solid var(--border)}}button:focus-visible{outline:2px solid var(--accent);outline-offset:2px}@media (prefers-reduced-motion:reduce){.bar.turn .dot,.modal,.sheet{animation:none}.toast,.act{transition:none}}.lobby{padding-top:env(safe-area-inset-top);padding-bottom:env(safe-area-inset-bottom)}.bar-title{font-size:16px}.lobby-body{text-align:center;flex-direction:column;flex:1;justify-content:center;align-items:stretch;gap:12px;padding:0 16px 24px;display:flex}.lobby-body h2{font-family:var(--font-display);text-wrap:balance;margin:8px 0 0;font-size:26px;font-weight:400}.lobby-body p{color:var(--muted);margin:0;line-height:1.45}.invite{text-align:left;background:var(--surface);border:1px solid var(--border);border-radius:16px;flex-direction:column;gap:8px;padding:14px;display:flex}.invite input{border:1px solid var(--border);background:var(--surface-2);width:100%;min-height:44px;color:var(--text);-webkit-user-select:text;user-select:text;border-radius:10px;padding:0 10px;font:14px ui-monospace,SF Mono,Menlo,monospace}.lobby-status{min-height:1.4em;font-weight:600;color:var(--accent)!important}.lobby-toast{top:calc(56px + env(safe-area-inset-top))}.radar{background:radial-gradient(circle, color-mix(in srgb, var(--accent) 22%, transparent), transparent 70%);border-radius:50%;width:112px;height:112px;margin:0 auto;position:relative}.radar span{border:2px solid var(--accent);opacity:0;border-radius:50%;animation:2.4s ease-out infinite radar;position:absolute;inset:0}.radar span:nth-child(2){animation-delay:.8s}.radar span:nth-child(3){animation-delay:1.6s}.radar i{background:var(--accent);border-radius:50%;width:14px;height:14px;margin:-7px 0 0 -7px;position:absolute;top:50%;left:50%}@keyframes radar{0%{opacity:.9;transform:scale(.2)}to{opacity:0;transform:scale(1)}}.bar.hurry .status{color:var(--danger)!important}.note{min-height:1.2em;color:var(--accent);font-weight:600}.field input[type=text]{border:1px solid var(--border);background:var(--surface-2);min-height:44px;color:var(--text);font:inherit;-webkit-user-select:text;user-select:text;border-radius:10px;padding:0 12px}@media (prefers-reduced-motion:reduce){.radar span{opacity:.5;animation:none}}
