:root{--A:#e21b3c;--B:#1368ce;--C:#d89e00;--D:#26890c;--bg:#46178f;--bg2:#2a0d58}
*{box-sizing:border-box;margin:0;-webkit-tap-highlight-color:transparent}
body{font-family:system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;background:linear-gradient(160deg,var(--bg),var(--bg2)) fixed;color:#fff;min-height:100dvh;transition:background .3s}
body.ok{background:var(--D)}body.ko{background:var(--A)}body.no{background:#555}
#app{min-height:100dvh;display:flex;flex-direction:column;gap:12px;padding:max(16px,env(safe-area-inset-top)) 16px max(16px,env(safe-area-inset-bottom))}
.centro{margin:auto;width:100%;max-width:420px;text-align:center;display:flex;flex-direction:column;gap:14px;align-items:center}
.logo{font-size:2.8rem;font-weight:900;letter-spacing:-1.5px}
input{width:100%;padding:16px;border-radius:12px;border:0;font-size:1.2rem;text-align:center;font-weight:700;color:#222}
.btn{background:#fff;color:#2a0d58;border:0;border-radius:12px;padding:16px 24px;font-size:1.15rem;font-weight:800;cursor:pointer;width:100%;box-shadow:0 4px 0 rgba(0,0,0,.25)}
.btn:disabled{opacity:.4}.btn:active{transform:translateY(3px);box-shadow:none}
.err{color:#ffd0d6;min-height:1.2em;font-weight:600}
.top{display:flex;justify-content:space-between;align-items:center;font-weight:700;font-size:1.1rem}
.top b{font-size:1.8rem;background:rgba(255,255,255,.18);border-radius:50%;min-width:48px;height:48px;display:grid;place-items:center}
.barra{height:8px;border-radius:4px;background:rgba(255,255,255,.2);overflow:hidden}
.barra i{display:block;height:100%;background:#fff;width:100%}
.testo{font-size:1.3rem;line-height:1.3;text-align:center;padding:6px 0}
.hint{text-align:center;background:rgba(255,255,255,.15);border-radius:8px;padding:8px;font-weight:600}
.griglia{display:grid;grid-template-columns:1fr 1fr;gap:10px;flex:1}
.opz{border:0;border-radius:12px;color:#fff;font-size:1.05rem;font-weight:700;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;padding:12px;min-height:110px;box-shadow:0 4px 0 rgba(0,0,0,.25);cursor:pointer;word-break:break-word}
.opz .sim{font-size:1.8rem}
.A{background:var(--A)}.B{background:var(--B)}.C{background:var(--C)}.D{background:var(--D)}
.opz.sel{outline:5px solid #fff;transform:scale(.96)}
.grande{font-size:5rem;line-height:1}
.punti{font-size:2.6rem;font-weight:900}
.box{background:rgba(0,0,0,.25);border-radius:14px;padding:16px;width:100%;font-size:1.2rem;line-height:1.5}
.scelte{display:flex;gap:8px}.pill{width:48px;height:48px;border-radius:10px;display:grid;place-items:center;font-size:1.4rem}
.spin{width:44px;height:44px;border:5px solid rgba(255,255,255,.25);border-top-color:#fff;border-radius:50%;animation:g 1s linear infinite}
@keyframes g{to{transform:rotate(360deg)}}
@media (prefers-reduced-motion:reduce){.spin{animation:none}}
ol.cl{list-style:none;padding:0;display:flex;flex-direction:column;gap:6px;width:100%}
ol.cl li{display:grid;grid-template-columns:44px 1fr 56px 70px 80px;align-items:center;gap:8px;background:rgba(255,255,255,.12);border-radius:10px;padding:10px 14px;text-align:left;font-weight:700}
ol.cl .pos{font-size:1.3rem;text-align:center}ol.cl .nome{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
ol.cl .su{color:#8dff8d}ol.cl .giu{color:#ffb3b3}ol.cl .gu{color:#ffe27a;text-align:right}ol.cl b{text-align:right}
ol.cl li:first-child{background:#e8b400;color:#2a0d58}

/* regia (schermo grande) */
.hostwrap{width:100%;max-width:1100px;margin:0 auto;display:flex;flex-direction:column;gap:16px;flex:1}
.join{display:flex;gap:28px;align-items:center;justify-content:center;background:rgba(0,0,0,.25);border-radius:18px;padding:24px;flex-wrap:wrap;text-align:center}
.join .url{font-size:1.6rem;font-weight:800}
.pin{font-size:5rem;font-weight:900;letter-spacing:.15em;background:#fff;color:#2a0d58;border-radius:14px;padding:6px 28px;margin-top:8px;display:inline-block}
#qr{background:#fff;padding:10px;border-radius:10px;line-height:0}
.chips{display:flex;flex-wrap:wrap;gap:8px;justify-content:center}
.chip{background:rgba(255,255,255,.18);border-radius:999px;padding:8px 16px;font-weight:700}
.big{font-size:2.2rem}
.sec{font-size:2.4rem!important;min-width:72px!important;height:72px!important}
.griglia.host .opz{flex-direction:row;font-size:1.5rem;min-height:130px;justify-content:flex-start;padding:20px 28px;cursor:default}
.grafico{display:flex;gap:16px;align-items:flex-end;height:240px;padding:0 8px}
.bar{flex:1;display:flex;flex-direction:column;justify-content:flex-end;height:100%;text-align:center;font-weight:800}
.bar .col{border-radius:10px 10px 0 0;min-height:36px;display:grid;place-items:center;font-size:1.6rem;transition:height .6s}
.bar.sbagliata{opacity:.4}.bar .lbl{padding-top:6px;font-size:1.3rem}
.podio{display:flex;gap:14px;align-items:flex-end;justify-content:center;height:260px}
.podio div{flex:1;max-width:220px;border-radius:12px 12px 0 0;background:rgba(255,255,255,.2);text-align:center;padding:12px 6px;font-weight:800;font-size:1.3rem}
.podio .p1{height:100%;background:#e8b400;color:#2a0d58}.podio .p2{height:75%}.podio .p3{height:55%}
.podio small{display:block;font-size:1rem;opacity:.85}
@media (max-width:640px){ol.cl li{grid-template-columns:32px 1fr 48px 60px}ol.cl .gu{display:none}.pin{font-size:3rem}}
