*{box-sizing:border-box}body{margin:0;background:#243bbb;color:#fafaff;font-family:ui-rounded,-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif}main{height:100dvh;max-width:520px;margin:auto;padding:16px 20px 10px;display:flex;flex-direction:column;gap:8px}header{display:flex;align-items:center;justify-content:space-between;font-size:18px;font-weight:750}button,input{font:inherit}button{cursor:pointer;border:0;border-radius:14px;min-height:46px;padding:10px 16px;background:#ff725e;color:#182252;font-weight:750}button:disabled{opacity:.45;cursor:default}button:focus-visible,input:focus-visible,.cards li:focus-visible{outline:3px solid #ffcf68;outline-offset:2px}.quiet{background:#ffffff19;color:white}#screen{flex:1;min-height:0;display:flex;flex-direction:column;gap:10px}h1{font-size:clamp(32px,8vw,44px);line-height:1.06;margin:8px 0}h2{font-size:27px;line-height:1.12;margin:4px 0;overflow-wrap:anywhere}p{margin:0;line-height:1.4}.muted{color:#d8dfff;font-size:13px}.center{text-align:center}.grow{flex:1;display:flex;flex-direction:column;justify-content:center;gap:16px}.stack{display:flex;flex-direction:column;gap:8px}input{width:100%;min-height:48px;border:0;border-radius:12px;padding:12px;background:#fafaff;color:#182252}label{font-size:14px;display:flex;flex-direction:column;gap:7px}.code{font-size:44px;font-weight:800;letter-spacing:6px;text-align:center;color:#ffcf68}.meta{display:flex;justify-content:space-between;font-size:12px;color:#d8dfff;gap:10px}.cards{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:8px;flex:1;justify-content:center;min-height:0}.cards li{display:flex;align-items:center;gap:10px;border-radius:14px;background:#fafaff;color:#182252;padding:10px 12px;min-height:58px;flex-shrink:0;user-select:none;touch-action:none}.cards li[tabindex]{cursor:grab}.cards li.selected{outline:3px solid #ffcf68}.rank{font-size:23px;font-weight:850;width:24px;flex-shrink:0;color:#6571a8}.topic{flex:1;font-size:16px;font-weight:650;line-height:1.15}.grip{font-size:25px;color:#7f8ab5}.cards li.match{background:#d5f6de}.resultmark{font-size:12px;font-weight:700;color:#334777}.row{display:flex;gap:8px}.row>*{flex:1}#notice{font-size:12px;text-align:center;min-height:16px;color:#ffdc9a}footer{text-align:center;font-size:10px;color:#d8dfff}.lobby{display:flex;flex-direction:column;gap:10px;min-height:0;flex:1}.players{margin:0;padding:0;list-style:none;flex:1;min-height:0;display:flex;flex-direction:column;justify-content:center;gap:5px}.players li{display:flex;justify-content:space-between;gap:10px;padding:7px 10px;border-radius:9px;background:#ffffff16;font-size:14px}.players li span:first-child{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.round-scores{font-size:12px;line-height:1.35;max-height:50px;overflow:auto}.scoreboard{padding:0;margin:0;list-style:none;display:flex;flex-direction:column;gap:6px}.scoreboard li{display:flex;justify-content:space-between;padding:10px 14px;border-radius:10px;background:#ffffff19}.scoreboard b{color:#ffcf68}dialog{border:0;border-radius:22px;max-width:420px;width:90%;max-height:90dvh;overflow:auto;padding:24px;color:#182252;background:#fafaff}dialog p{margin:16px 0;font-size:15px}dialog button{display:block;width:100%;margin-top:20px}dialog::backdrop{background:#08113dbb}@media(max-height:700px){main{padding:10px 16px 7px;gap:5px}h1{font-size:30px;margin:4px 0}h2{font-size:23px}.cards{gap:5px}.cards li{min-height:49px;padding:7px 10px}.topic{font-size:14px}#screen{gap:7px}.grow{gap:10px}.code{font-size:35px}.lobby{gap:6px}.players li{padding:5px 9px}.stack{gap:6px}}
.lobby h1{font-size:30px}.players .small{min-height:28px;padding:3px 8px;font-size:12px}@media(min-height:701px) and (max-height:800px){#screen{gap:8px}.cards{gap:7px}.cards li{min-height:52px;padding:8px 12px}h2{font-size:25px}}

.cards li.drag-placeholder{background:#ffffff0c;border:2px dashed #aab8ff88;padding:6px 10px}.drag-placeholder>*{visibility:hidden}.drag-ghost{position:fixed;z-index:1000;display:flex;align-items:center;gap:10px;margin:0;padding:8px 12px;border-radius:14px;background:#fff;color:#182252;list-style:none;pointer-events:none;user-select:none;transform:scale(1.035) rotate(-.6deg);box-shadow:0 18px 38px #07123b66,0 4px 10px #07123b33;will-change:top,left;cursor:grabbing}.drag-ghost .grip{color:#243bbb}@media(prefers-reduced-motion:reduce){.drag-ghost{transform:none}}

.reveal-stage{flex:1;min-height:0;display:flex;flex-direction:column;justify-content:center;gap:16px}.reveal-progress{display:flex;gap:8px;justify-content:center}.reveal-progress span{display:grid;place-items:center;width:34px;height:34px;border-radius:50%;background:#ffffff12;color:#b5c1ff}.reveal-progress .revealed{background:#ffffff30;color:white}.reveal-progress .current{background:#ffcf68;color:#182252;font-weight:800}.reveal-card{background:#fafaff;color:#182252;border-radius:22px;padding:22px;text-align:center;animation:card-pop 200ms ease-out}.reveal-card h1{font-size:clamp(26px,7vw,36px);margin:12px 0;overflow-wrap:anywhere}.reveal-number{font-size:44px;font-weight:850;color:#243bbb}.reveal-label{font-size:14px;color:#6571a8}.card-results{display:flex;flex-direction:column;gap:4px;max-height:170px;overflow:auto}.card-results>div{display:flex;justify-content:space-between;gap:12px;padding:3px 10px;font-size:14px}.card-results strong{font-size:13px;color:#d8dfff}.card-results .hit{color:#bdf2c9}@keyframes card-pop{from{opacity:.3;transform:translateY(12px) scale(.97)}to{opacity:1;transform:none}}@media(prefers-reduced-motion:reduce){.reveal-card{animation:none}}
