:root{color-scheme:light;--bg: #f3f6f1;--surface: #ffffff;--ink: #14261b;--muted: #5a6d61;--line: #dce6de;--line-strong: #bccbc0;--brand: #15803d;--brand-strong: #0f5f2c;--brand-soft: #e2f3e7;--on-brand: #ffffff;--disabled-bg: #e6ebe7;--disabled-ink: #8a998f;--warn: #a8550a;--error: #b42318;--error-soft: #fdecea;--focus: #14261b;--shadow: 0 1px 2px rgba(20, 38, 27, .06), 0 4px 14px rgba(20, 38, 27, .07);--team-a: #2b6cff;--team-b: #e63946}html,body{margin:0;background:var(--bg);height:100%}#app-root{display:flex;flex-direction:column;align-items:center;min-height:100%}#game{width:100%;max-width:540px;aspect-ratio:1 / 1;overflow:hidden}#ui{width:100%;max-width:540px;min-height:220px}body.match-on #game{flex:none;width:min(100%,540px,max(240px,calc((100vh - 310px) * var(--pitch-ratio, 1))))}@supports (height: 100dvh){body.match-on #game{width:min(100%,540px,max(240px,calc((100dvh - 310px) * var(--pitch-ratio, 1))))}}@media(min-width:900px){body.match-on #app-root{flex-direction:row;align-items:flex-start;justify-content:center;justify-content:safe center;gap:16px}body.match-on #game,body.match-on #ui{flex:none}body.match-on #game{width:auto;max-width:none;height:100vh;height:min(100dvh,1056px)}body.match-on #ui{width:400px;max-width:400px;max-height:100vh;max-height:100dvh;overflow-y:auto}}#ui{color:var(--ink);font-family:system-ui,-apple-system,Segoe UI,Roboto,sans-serif;box-sizing:border-box;padding:8px}.hud{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:4px 12px;padding:6px 4px}.hud-score{font-weight:800;font-size:1.15rem;flex:1 1 100%;text-align:center;letter-spacing:-.01em}.hud-half,.hud-count,.hud-turn{font-size:.9rem;color:var(--muted)}.hud-turn{font-weight:600;color:var(--brand-strong)}.hud-hint{flex:1 1 100%;text-align:center;font-size:.85rem;color:var(--warn)}.hud-band{flex:1 1 100%;text-align:center;background:var(--brand);color:var(--on-brand);font-weight:700;padding:10px;border-radius:10px}.hud-final{font-weight:400;margin-top:4px}.menu{padding:6px 0}.menu[hidden],.btn[hidden]{display:none}.menu-title{margin:4px 0 8px;font-weight:600}.menu-title:has(+.menu-sub){margin-bottom:2px}.menu-sub{margin:0 0 8px;font-size:.8rem;color:var(--muted);overflow-wrap:anywhere}.menu-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px}.btn{min-height:48px;width:100%;padding:8px 12px;border:1px solid var(--line-strong);border-radius:12px;background:var(--surface);color:var(--ink);font:inherit;font-weight:600;cursor:pointer;box-shadow:0 1px 2px #14261b0f}.btn.active{background:var(--brand);border-color:var(--brand);color:var(--on-brand)}.btn:disabled{background:var(--disabled-bg);border-color:var(--disabled-bg);color:var(--disabled-ink);box-shadow:none;cursor:not-allowed}.btn:focus-visible{outline:3px solid var(--focus);outline-offset:2px}.card .btn,.btn.replay{background:var(--brand);border-color:var(--brand);color:var(--on-brand)}.overlay{position:fixed;top:0;right:0;bottom:0;left:0;display:flex;align-items:center;justify-content:center;background:#14261b73;z-index:100}.card{width:min(92vw,420px);background:var(--surface);color:var(--ink);font-family:system-ui,-apple-system,Segoe UI,Roboto,sans-serif;border-radius:16px;padding:16px;box-sizing:border-box;box-shadow:0 10px 40px #14261b40}.dice-row{display:flex;justify-content:center;gap:16px;margin-bottom:12px}.dice-col{flex:0 1 45%;min-width:0;display:flex;flex-direction:column;align-items:center;gap:6px}.dice-name{max-width:100%;font-size:.85rem;font-weight:600;text-align:center;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dice{width:56px;height:56px;display:flex;align-items:center;justify-content:center;background:var(--ink);color:#fff;border-radius:12px;font-size:1.8rem;font-weight:800}.dice-status{text-align:center;min-height:1.4em;margin-bottom:8px}.row{padding:6px 8px;border-radius:6px;margin-bottom:4px}.row.win{background:var(--brand-soft);color:var(--brand-strong);font-weight:700}.dice-detail{margin-bottom:12px}#game{position:relative}.banner{position:absolute;left:0;right:0;top:50%;transform:translateY(-50%);padding:16px 8px;background:#15803df2;color:var(--on-brand);font-family:system-ui,-apple-system,Segoe UI,Roboto,sans-serif;font-size:1.5rem;font-weight:800;text-align:center;z-index:50;pointer-events:none}.replay{margin-top:10px}.dice-compact{display:flex;align-items:center;gap:10px;padding:6px 4px}.dice.small{width:32px;height:32px;font-size:1rem;border-radius:6px;flex:none}.dice-line{font-size:.95rem}.dice-compact .dice-name{flex:0 1 auto;max-width:35%}.history{margin-top:4px;border-top:1px solid var(--line)}.history>summary{min-height:28px;box-sizing:border-box;padding:6px 4px;font-size:.85rem;line-height:16px;color:var(--muted);cursor:pointer}.history>summary:focus-visible{outline:3px solid var(--focus);outline-offset:-3px}.history-list{max-height:40vh;overflow-y:auto;padding:0 4px 6px}.history-item{padding:6px 0;border-top:1px solid var(--line);font-size:.85rem}.history-item:first-child{border-top:0}.history-head{display:flex;align-items:center;gap:6px}.history-seq{min-width:2.2em;color:var(--muted);font-variant-numeric:tabular-nums}.history-dot{flex:none;width:10px;height:10px;border-radius:50%}.history-dot.team-A{background:var(--team-a)}.history-dot.team-B{background:var(--team-b)}.history-title{font-weight:600;overflow-wrap:anywhere}.history-line{margin-left:calc(2.2em + 22px);font-size:.78rem;color:var(--muted)}.history-outcome{margin-left:calc(2.2em + 22px);font-weight:700}.error-panel{background:var(--error-soft);color:var(--error);border:1px solid #f3c4bf;border-radius:12px;padding:12px;margin-bottom:8px}.error-title{font-weight:700;margin-bottom:4px}.error-detail{font-family:ui-monospace,monospace;font-size:.8rem;opacity:.8;margin-top:6px;word-break:break-word}.hud-timer{font-size:.9rem;font-variant-numeric:tabular-nums}.hud-timer.warn,.counter-timer{color:var(--warn);font-weight:700}.counter-timer{text-align:center;font-size:.85rem;margin-top:.4rem;font-variant-numeric:tabular-nums}#game[hidden]{display:none}.scr{display:flex;flex-direction:column;gap:12px;padding:12px 4px}.scr-title{margin:8px 0 4px;font-size:1.5rem;font-weight:800;letter-spacing:-.02em;text-align:center}.scr-points{margin:0;text-align:center;color:var(--muted)}.scr-menu{display:flex;flex-direction:column;gap:10px}.scr-field{display:flex;flex-direction:column;gap:4px;font-size:.95rem}.scr-input{min-height:44px;padding:8px 10px;border:1px solid var(--line-strong);border-radius:10px;background:var(--surface);color:var(--ink);font:inherit;font-size:16px}.scr-input:focus-visible{outline:3px solid var(--brand);outline-offset:1px}.scr-btn{min-height:48px;width:100%;padding:8px 12px;border:1px solid var(--line-strong);border-radius:12px;background:var(--surface);color:var(--ink);font:inherit;font-weight:600;cursor:pointer;box-shadow:0 1px 2px #14261b0f}.scr-btn:disabled{background:var(--disabled-bg);border-color:var(--disabled-bg);color:var(--disabled-ink);box-shadow:none;cursor:not-allowed}.scr-btn:focus-visible{outline:3px solid var(--focus);outline-offset:2px}.scr-primary{background:var(--brand);border-color:var(--brand);color:var(--on-brand)}.scr-secondary{background:transparent;border-color:var(--line-strong);color:var(--muted);box-shadow:none}.scr-small{min-height:36px;width:auto;padding:4px 14px;font-size:.9rem}.scr-hint{margin:-4px 0 0;font-size:.85rem;color:var(--warn)}.scr-error{min-height:1.2em;color:var(--error);font-size:.9rem}.scr-error:empty{min-height:0}.scr-matchbar{display:flex;justify-content:flex-start;padding:2px 0 4px}.team-head{display:flex;align-items:center;gap:10px}.team-head .scr-title{flex:1;margin:0}.team-slots{display:flex;flex-direction:column;gap:6px}.team-slot{display:flex;align-items:center;gap:8px}.team-slot-role{flex:0 0 64px;font-size:.85rem;color:var(--muted)}.team-slot>.scr-btn,.team-slot>.card-tile{flex:1}.team-picker{display:flex;flex-direction:column;gap:8px;padding:10px;border:1px solid var(--line);border-radius:14px;background:var(--surface);box-shadow:var(--shadow)}.team-filters{display:flex;gap:6px;flex-wrap:wrap}.team-cards{display:flex;flex-direction:column;gap:6px;max-height:50vh;overflow-y:auto}.team-foot{display:flex;gap:10px}.card-tile{display:grid;grid-template-columns:40px auto 1fr;align-items:center;gap:8px;min-height:48px;padding:6px 8px;border:2px solid var(--rarity, var(--line-strong));border-radius:12px;background:var(--surface);color:var(--ink);font:inherit;text-align:left;cursor:pointer;box-shadow:0 1px 2px #14261b0f}.card-tile:disabled{opacity:.45;cursor:not-allowed}.card-tile:focus-visible{outline:3px solid var(--focus);outline-offset:2px}.card-photo{width:40px;height:40px;object-fit:cover;border-radius:50%;box-shadow:0 0 0 1px #14261b2e}.card-role{min-width:22px;padding:2px 6px;border-radius:6px;background:var(--brand-soft);color:var(--brand-strong);font-size:.8rem;font-weight:700;text-align:center}.card-body{display:flex;flex-direction:column;min-width:0}.card-name{font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.card-club,.card-stats{font-size:.75rem;color:var(--muted)}.rarity-bronze{--rarity: #b9814a}.rarity-silver{--rarity: #97a4b1}.rarity-gold{--rarity: #dcaa1e}.packs-head{display:flex;align-items:center;gap:10px}.packs-head .scr-title{flex:1;margin:0}.scr-pack,.scr-reveal{display:flex;flex-direction:column;gap:8px;padding:14px;border:1px solid var(--line);border-radius:14px;background:var(--surface);box-shadow:var(--shadow)}.scr-pack-title{margin:0;font-size:1.05rem}.scr-pack-desc{margin:0;font-size:.85rem;color:var(--muted)}.scr-confirm{display:flex;flex-direction:column;gap:8px;padding:10px;border:1px solid #e8c48a;border-radius:10px;background:#fff8ec}.scr-confirm p{margin:0}.scr-confirm-btns{display:flex;gap:10px}.scr-reveal-cards{display:flex;flex-direction:column;gap:6px}.scr-head{display:flex;align-items:center;gap:10px}.scr-head .scr-title{flex:1;margin:0}.scr-section{display:flex;flex-direction:column;gap:8px}.scr-sub{margin:8px 0 0;font-size:1.05rem}.scr-empty{margin:0;color:var(--muted)}.scr-input{min-height:44px;padding:8px 12px;border:1px solid var(--line-strong);border-radius:10px;background:var(--surface);color:var(--ink);font:inherit}.scr-input:focus-visible{outline:3px solid var(--brand);outline-offset:2px}.scr-invite{display:flex;align-items:center;gap:8px}.scr-invite-text{flex:1;min-width:0;overflow-wrap:anywhere}.scr-invite-form{display:flex;flex-direction:column;gap:8px}.scr-ok{color:var(--brand);font-size:.9rem;font-weight:600}.scr-table{width:100%;border-collapse:collapse}.scr-table th,.scr-table td{padding:8px 6px;text-align:left;border-bottom:1px solid var(--line)}.scr-table th:last-child,.scr-table td:last-child{text-align:right}.scr-table td.scr-rank{width:2.5em}.scr-table th{font-size:.8rem;font-weight:600;color:var(--muted)}.scr-table tr.me{background:var(--brand-soft);color:var(--brand-strong);font-weight:700}.scr-panel{display:flex;flex-direction:column;gap:8px;padding:14px;border:1px solid var(--line);border-radius:14px;background:var(--surface);box-shadow:var(--shadow)}.scr-panel h2{margin:0;font-size:1.05rem}.scr-lobby .scr-invite-form{flex-direction:row}.scr-online p{margin:0;text-align:center}.scr-online .scr-vs{font-size:1.1rem;font-weight:700}.scr-online .scr-score{font-size:2rem;font-weight:800;font-variant-numeric:tabular-nums}.scr-online .scr-countdown{font-variant-numeric:tabular-nums;color:var(--muted)}.scr-online .scr-note{color:var(--muted);min-height:1.2em}.scr-online .scr-points{color:var(--brand);font-weight:700}.scr-online .scr-row{display:flex;gap:10px}.scr-online .scr-row>.scr-btn{flex:1}
