:root{--bg: #f5f5f4;--card: #ffffff;--text: #1c1917;--muted: #6b7280;--line: #e5e7eb;--primary: #b91c1c;--primary-text: #ffffff;--ok: #15803d;--warn: #b45309;--bad: #b91c1c;--team: #374151;font-family:system-ui,-apple-system,PingFang TC,Noto Sans TC,Microsoft JhengHei,sans-serif;color:var(--text);background:var(--bg);-webkit-text-size-adjust:100%}*{box-sizing:border-box}body{margin:0;background:var(--bg);line-height:1.5}h1,h2,h3{margin:0 0 .5em;line-height:1.25}h1{font-size:1.6rem}h2{font-size:1.3rem}h3{font-size:1.1rem}p{margin:.4em 0}a{color:var(--primary)}button,.button{display:inline-flex;align-items:center;justify-content:center;gap:.4em;min-height:48px;padding:0 18px;border-radius:10px;border:1px solid var(--line);background:#fff;color:var(--text);font:inherit;font-weight:600;cursor:pointer;text-decoration:none}button:disabled{opacity:.45;cursor:not-allowed}button.primary,.button.primary{background:var(--primary);color:var(--primary-text);border-color:var(--primary)}button.danger{background:var(--bad);color:#fff;border-color:var(--bad)}button.big{width:100%;min-height:56px;font-size:1.1rem;margin-top:8px}button.small{min-height:36px;padding:0 12px;font-size:.9rem}button.link{background:none;border:none;color:var(--primary);padding:0;min-height:40px;font-weight:500;text-decoration:underline}input,select,textarea{font:inherit;width:100%;min-height:44px;padding:8px 12px;border:1px solid #d1d5db;border-radius:8px;background:#fff;color:var(--text)}input[type=checkbox]{width:22px;height:22px;min-height:0;vertical-align:middle}label{display:block;margin:10px 0;font-weight:600}label>input,label>select,label>textarea{margin-top:4px;font-weight:400}label.check{display:flex;gap:10px;align-items:center;font-weight:500}.page{max-width:1100px;margin:0 auto;padding:16px}.page.narrow{max-width:520px}.center{text-align:center}.stack{display:flex;flex-direction:column;gap:10px}.row{display:flex;gap:10px;flex-wrap:wrap;align-items:center}.row.end{justify-content:flex-end}.spread{display:flex;justify-content:space-between;align-items:center;gap:10px;flex-wrap:wrap}.grid2{display:grid;grid-template-columns:repeat(auto-fit,minmax(300px,1fr));gap:16px}.muted{color:var(--muted)}.warn{color:var(--warn);font-weight:600}.bad{color:var(--bad);font-weight:600}.ok{color:var(--ok);font-weight:600}.mono{font-family:ui-monospace,Menlo,Consolas,monospace;letter-spacing:.08em}.num{font-variant-numeric:tabular-nums}.big-text{font-size:1.2rem}.card{background:var(--card);border-radius:14px;padding:16px;margin:12px 0;box-shadow:0 1px 2px #0000000f}details.card summary{cursor:pointer;font-weight:600;min-height:32px}.badge{display:inline-block;padding:2px 10px;border-radius:999px;color:#fff;font-weight:700;font-size:.9rem;text-shadow:0 1px 1px rgba(0,0,0,.25)}.banner{position:sticky;top:0;z-index:10;background:var(--warn);color:#fff;padding:10px 16px;text-align:center;font-weight:600}.qr{background:#fff;padding:8px;border-radius:8px;max-width:100%;height:auto}.pill{display:inline-block;padding:2px 10px;border-radius:999px;background:#e5e7eb;font-size:.85rem;font-weight:600}.pill.live,.pill.active{background:#dcfce7;color:#166534}.pill.locked,.pill.paused{background:#fef3c7;color:#92400e}.pill.revealed,.pill.closed{background:#e0e7ff;color:#3730a3}table{width:100%;border-collapse:collapse;font-size:.95rem}th,td{text-align:left;padding:8px 6px;border-bottom:1px solid var(--line);vertical-align:top}th{color:var(--muted);font-weight:600;font-size:.85rem}.table-wrap{overflow-x:auto}.tabs{display:flex;gap:6px;flex-wrap:wrap;border-bottom:1px solid var(--line);margin:12px 0}.tabs button{border:none;border-bottom:3px solid transparent;border-radius:0;background:none;min-height:44px}.tabs button.on{border-bottom-color:var(--primary);color:var(--primary)}.modal{position:fixed;top:0;right:0;bottom:0;left:0;background:#00000080;display:flex;align-items:center;justify-content:center;z-index:50;padding:16px}.modal-box{background:#fff;border-radius:14px;padding:20px;max-width:420px;width:100%}.modal-text{font-size:1.1rem;margin-bottom:16px;white-space:pre-line}.modal-box .row{justify-content:flex-end}.play{max-width:560px;margin:0 auto;padding:0 12px 40px}.play-head{display:flex;justify-content:space-between;align-items:center;padding:14px 4px;border-bottom:4px solid var(--team);margin-bottom:4px}.play-head .name{font-size:1.3rem;font-weight:800}.play-head .right{text-align:right;display:flex;flex-direction:column;gap:4px;align-items:flex-end}.play-head .table{font-weight:700}.card.win{border:3px solid #f59e0b;background:#fffbeb}.card.win.claimed{border-color:var(--line);background:#f9fafb}.waiting{padding:32px 16px}.game-head{display:flex;justify-content:space-between;align-items:center}.timer{font-size:2rem;font-weight:800;font-variant-numeric:tabular-nums;min-width:2.5ch;text-align:right}.timer.hot{color:var(--bad)}.question{font-size:1.35rem}.q-img{width:100%;border-radius:10px;margin-bottom:10px}.options{display:flex;flex-direction:column;gap:10px;margin:12px 0}.option{justify-content:flex-start;text-align:left;min-height:60px;padding:10px 14px;font-size:1.1rem;font-weight:600;border:2px solid var(--line);position:relative}.option:disabled{opacity:1;cursor:default}.option.chosen{border-color:var(--team);background:color-mix(in srgb,var(--team) 14%,white)}.option.correct{border-color:var(--ok);background:#dcfce7}.opt-key{display:inline-flex;width:32px;height:32px;border-radius:50%;background:#f3f4f6;align-items:center;justify-content:center;flex:none}.opt-text{flex:1}.opt-mark{color:var(--ok);font-size:.9rem}.opt-pct{color:var(--muted);font-variant-numeric:tabular-nums}.status-line{min-height:1.6em;font-weight:700;text-align:center;font-size:1.1rem}.groups{display:flex;flex-direction:column;gap:8px;margin-top:8px}.group-row{display:grid;grid-template-columns:minmax(70px,auto) 1fr 4ch;gap:8px;align-items:center}.group-row.mine .g-name{outline:2px solid var(--text);border-radius:999px}.bar{height:14px;background:#f3f4f6;border-radius:7px;overflow:hidden;display:block}.bar>span{display:block;height:100%;border-radius:7px;transition:width .6s ease}.scanner video{width:100%;max-height:50vh;border-radius:12px;background:#000;object-fit:cover}.result{border-radius:14px;padding:18px;margin:12px 0;color:#fff;text-align:center}.result.green{background:var(--ok)}.result.yellow{background:#ca8a04}.result.red{background:var(--bad)}.result .r-title{font-size:1.6rem;font-weight:800}.result .r-name{font-size:1.4rem;font-weight:700}.list-item{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:10px 0;border-bottom:1px solid var(--line)}.stage{min-height:100vh;background:#0b0b10;color:#fff;padding:3vh 4vw;display:flex;flex-direction:column}.stage h1{font-size:4.5vh}.stage .muted{color:#a1a1aa}.stage-top{display:flex;justify-content:space-between;align-items:baseline;font-size:2.4vh;color:#a1a1aa}.stage-main{flex:1;display:flex;flex-direction:column;justify-content:center}.stage-q{font-size:6vh;font-weight:800;margin:2vh 0;line-height:1.2}.stage-timer{font-size:12vh;font-weight:900;font-variant-numeric:tabular-nums;text-align:center}.stage-timer.hot{color:#f87171}.stage-opts{display:grid;grid-template-columns:repeat(auto-fit,minmax(38vw,1fr));gap:2vh 2vw}.stage-opt{background:#1f1f2a;border-radius:16px;padding:2.2vh 2vw;font-size:3.6vh;font-weight:700;position:relative;overflow:hidden}.stage-opt .fill{position:absolute;inset:0 auto 0 0;background:#ffffff1f;transition:width .8s ease}.stage-opt .content{position:relative;display:flex;justify-content:space-between;gap:1vw}.stage-opt.correct{outline:6px solid #22c55e}.stage-big{font-size:3vh}.stage-groups{display:flex;flex-direction:column;gap:2.5vh}.stage-group{display:grid;grid-template-columns:22vw 1fr 10vw;gap:2vw;align-items:center;font-size:4vh;font-weight:800}.stage-group .bar{height:5vh;border-radius:2.5vh;background:#1f1f2a}.stage-group .bar>span{border-radius:2.5vh}.stage-lists{display:grid;grid-template-columns:1fr 1fr;gap:4vw;margin-top:4vh;font-size:2.6vh}.stage-lists ol{margin:0;padding-left:1.4em}.stage-prize{font-size:7vh;font-weight:900;text-align:center;color:#fbbf24}.stage-winners{display:grid;grid-template-columns:repeat(auto-fit,minmax(22vw,1fr));gap:2vh 2vw;margin-top:4vh}.stage-winner{background:#1f1f2a;border-radius:16px;padding:2.5vh;text-align:center;font-size:4vh;font-weight:800;border-top:1vh solid var(--team, #fbbf24);animation:pop .5s ease both}.stage-winner .muted{font-size:2.4vh;font-weight:500}.stage-winner.forfeited{opacity:.35;text-decoration:line-through}.roll{font-size:9vh;font-weight:900;text-align:center;margin-top:6vh;color:#e5e7eb;letter-spacing:.1em}@keyframes pop{0%{transform:scale(.6);opacity:0}to{transform:scale(1);opacity:1}}.host-grid{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(0,1fr);gap:16px}@media (max-width: 900px){.host-grid{grid-template-columns:1fr}}.stat{display:inline-block;margin-right:18px}.stat b{font-size:1.4rem;display:block;font-variant-numeric:tabular-nums}.game-item{display:flex;gap:10px;align-items:center;justify-content:space-between;padding:10px;border-radius:10px;border:1px solid var(--line);margin:6px 0}.game-item.current{border:2px solid var(--primary);background:#fef2f2}.preview{width:100%;aspect-ratio:16/9;border:0;border-radius:10px;background:#000}
