/* Zona Quiz web — scoped #cqz-root */
#cqz-root{--cqz-blue:#0b4f9c;--cqz-ink:#13202d;--cqz-soft:#5a6b7b;--cqz-border:#d4dde7;--cqz-card:#fff;--cqz-bg:#eef3f8;max-width:680px;margin:1.5rem auto;font-family:"Titillium Web",system-ui,sans-serif;color:var(--cqz-ink)}
#cqz-root *{box-sizing:border-box}
.cqz-head{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:.6rem;margin-bottom:1rem}
.cqz-modes{display:flex;gap:.5rem;flex:1 1 auto}
.cqz-mode{flex:1;padding:.7rem .5rem;border-radius:12px;border:1.5px solid var(--cqz-border);background:var(--cqz-card);color:var(--cqz-ink);font:inherit;font-weight:700;font-size:.92rem;cursor:pointer;line-height:1.2}
.cqz-mode.is-on{background:var(--cqz-blue);border-color:var(--cqz-blue);color:#fff}
.cqz-who{font-size:.85rem;color:var(--cqz-soft);flex:0 0 auto}
.cqz-who strong{color:var(--cqz-ink)}
.cqz-link{background:none;border:none;color:var(--cqz-blue);font:inherit;text-decoration:underline;cursor:pointer;padding:.2rem}
.cqz-area{min-height:120px}
.cqz-load,.cqz-empty{color:var(--cqz-soft);text-align:center;padding:1.4rem 0}
.cqz-intro{color:var(--cqz-soft);font-size:.95rem;line-height:1.5;margin:0 0 1rem}
.cqz-h{font-family:"Lora",Georgia,serif;font-size:1.1rem;margin:1.2rem 0 .6rem;outline:none}
/* stats */
.cqz-stats{display:grid;grid-template-columns:repeat(4,1fr);gap:.5rem;margin-bottom:.6rem}
.cqz-stats>div{background:var(--cqz-bg);border-radius:10px;padding:.6rem .3rem;text-align:center}
.cqz-stats b{display:block;font-size:1.25rem;color:var(--cqz-blue);font-family:"Lora",Georgia,serif}
.cqz-stats span{font-size:.72rem;color:var(--cqz-soft)}
/* category cards */
.cqz-cats{display:flex;flex-direction:column;gap:.55rem}
.cqz-cat{display:flex;align-items:center;justify-content:space-between;gap:.7rem;text-align:left;background:var(--cqz-card);border:1.5px solid var(--cqz-border);border-radius:12px;padding:.9rem 1rem;font:inherit;cursor:pointer}
.cqz-cat:active{background:rgba(11,79,156,.06)}
.cqz-cat__t{font-weight:700;font-size:1rem}
.cqz-cat__n{flex:0 0 auto;font-size:.82rem;color:var(--cqz-soft)}
/* play */
.cqz-qbar{display:flex;justify-content:space-between;font-size:.9rem;color:var(--cqz-soft);margin-bottom:.4rem}
.cqz-time{font-weight:800;color:var(--cqz-blue)}
.cqz-progress{height:6px;background:var(--cqz-bg);border-radius:99px;overflow:hidden;margin-bottom:.9rem}
.cqz-progress i{display:block;height:100%;background:var(--cqz-blue);transition:width .3s}
.cqz-dom{font-family:"Lora",Georgia,serif;font-size:1.2rem;line-height:1.4;margin:.2rem 0 1rem;outline:none}
.cqz-opts{display:flex;flex-direction:column;gap:.5rem}
.cqz-opt{text-align:left;background:var(--cqz-card);border:1.5px solid var(--cqz-border);border-radius:12px;padding:.8rem 1rem;font:inherit;font-size:1rem;cursor:pointer}
.cqz-opt:active{background:rgba(11,79,156,.06)}
.cqz-opt:disabled{opacity:1;cursor:default}
.cqz-opt.is-right{background:#ecfdf5;border-color:#86e0b4;color:#0f7a37;font-weight:700}
.cqz-opt.is-wrong{background:#fef2f2;border-color:#fca5a5;color:#b91c1c}
.cqz-fb{margin-top:1rem}
.cqz-fb__v{font-weight:800;margin:0 0 .3rem;outline:none}
.cqz-fb.is-ok .cqz-fb__v{color:#0f7a37}.cqz-fb.is-no .cqz-fb__v{color:#b91c1c}
.cqz-fb__s{margin:0 0 .8rem;font-size:.92rem;color:var(--cqz-soft);line-height:1.5}
.cqz-next{background:var(--cqz-blue);color:#fff;border:none;border-radius:12px;padding:.8rem 1.4rem;font:inherit;font-weight:700;cursor:pointer}
.cqz-next:active{filter:brightness(.94)}
/* end */
.cqz-end{text-align:center;padding:1.4rem 0}
.cqz-end__big{font-family:"Lora",Georgia,serif;font-size:2.6rem;color:var(--cqz-blue);outline:none}
.cqz-end__msg{color:var(--cqz-soft);margin:.4rem 0 1.2rem}
.cqz-end__btns{display:flex;flex-direction:column;align-items:center;gap:.6rem}
/* auth */
.cqz-tabs{display:flex;gap:.5rem;margin-bottom:1rem}
.cqz-atab{flex:1;padding:.6rem;border-radius:10px;border:1.5px solid var(--cqz-border);background:var(--cqz-card);font:inherit;font-weight:700;cursor:pointer}
.cqz-atab.is-on{background:var(--cqz-blue);border-color:var(--cqz-blue);color:#fff}
.cqz-form{display:flex;flex-direction:column;gap:.7rem}
.cqz-form label{display:flex;flex-direction:column;gap:.3rem;font-size:.85rem;color:var(--cqz-soft);font-weight:600}
.cqz-form input{padding:.7rem;border:1px solid var(--cqz-border);border-radius:10px;font:inherit;color:var(--cqz-ink);background:var(--cqz-card)}
.cqz-msg{font-size:.88rem;margin:.6rem 0 0;min-height:1.2em}
.cqz-msg.is-err{color:#b91c1c}
/* duello hub */
.cqz-actions{margin-bottom:1.1rem}
.cqz-inv{display:flex;gap:.5rem;margin-top:.6rem}
.cqz-inv input{flex:1;padding:.7rem;border:1px solid var(--cqz-border);border-radius:10px;font:inherit;background:var(--cqz-card);color:var(--cqz-ink)}
.cqz-inv__b{flex:none;background:#13496f;color:#fff;border:none;border-radius:10px;padding:0 1.1rem;font:inherit;font-weight:700;cursor:pointer}
.cqz-row{display:flex;align-items:center;gap:.7rem;width:100%;text-align:left;background:var(--cqz-card);border:1px solid var(--cqz-border);border-radius:12px;padding:.75rem 1rem;margin-bottom:.5rem;cursor:pointer}
.cqz-row__b{flex:1;min-width:0;display:flex;flex-direction:column}
.cqz-row__b strong{color:var(--cqz-ink)}
.cqz-row__b small{color:var(--cqz-soft);font-size:.82rem}
.cqz-row__go{flex:none;color:var(--cqz-blue);font-size:1.2rem}
.cqz-score{display:flex;justify-content:space-between;background:var(--cqz-bg);border-radius:12px;padding:.7rem 1rem;margin-bottom:1rem}
.cqz-score b{color:var(--cqz-blue);font-size:1.15rem}
.cqz-dcats{display:flex;flex-direction:column;gap:.55rem}
.cqz-dcat{text-align:left;background:var(--cqz-card);border:1.5px solid var(--cqz-border);border-radius:12px;padding:.85rem 1rem;font:inherit;font-size:1rem;color:var(--cqz-ink);cursor:pointer}
.cqz-dcat:active{background:rgba(11,79,156,.06)}
.cqz-res{border-radius:10px;padding:.7rem .9rem;margin-bottom:.5rem}
.cqz-res.is-ok{background:#ecfdf5;border:1px solid #a7f3d0}
.cqz-res.is-no{background:#fef2f2;border:1px solid #fecaca}
.cqz-res__v{font-weight:700;margin:0 0 .2rem}
.cqz-res.is-ok .cqz-res__v{color:#0f7a37}.cqz-res.is-no .cqz-res__v{color:#b91c1c}
.cqz-res__s{margin:0;font-size:.9rem;color:var(--cqz-soft);line-height:1.5}
.cqz-forfeit{background:#fff7ed;border:1px solid #fcd9a8;border-radius:12px;padding:1rem;color:#7c2d12;line-height:1.5}
.cqz-forfeit .cqz-res__v{color:#b91c1c}
@media(prefers-color-scheme:dark){#cqz-root{--cqz-ink:#e8eef5;--cqz-soft:#9fb0c0;--cqz-border:#2d3b4a;--cqz-card:#16212e;--cqz-bg:#0f1822}}

/* ---- Sfida Civica web: record, classifica, scontri diretti ---- */
.cqz-record{display:flex;flex-wrap:wrap;gap:.4rem;background:var(--cqz-bg);border-radius:12px;padding:.7rem .6rem;margin-bottom:1rem;font-size:.78rem;color:var(--cqz-soft)}
.cqz-record b{color:var(--cqz-blue);font-size:1.05rem;display:block;text-align:center}
.cqz-record>span{flex:1;text-align:center;min-width:56px}
.cqz-record__rank{flex:0 0 auto;align-self:center;background:var(--cqz-blue);color:#fff;border-radius:999px;padding:.2rem .6rem;font-weight:800;font-size:.85rem}
.cqz-classifica{display:block;width:100%;margin-top:.6rem;background:transparent;border:1.5px solid var(--cqz-blue);color:var(--cqz-blue);border-radius:10px;padding:.6rem;font:inherit;font-weight:700;cursor:pointer}
.cqz-cl-head,.cqz-cl-row{display:flex;align-items:center;gap:.5rem;padding:.5rem .6rem;font-size:.88rem}
.cqz-cl-head{color:var(--cqz-soft);font-size:.72rem;text-transform:uppercase;letter-spacing:.04em;border-bottom:1px solid var(--cqz-border)}
.cqz-cl-row{border-bottom:1px solid var(--cqz-border)}
.cqz-cl-row.is-me{background:rgba(11,79,156,.08);border-radius:8px;font-weight:700}
.cqz-cl-rank{flex:0 0 1.8rem;text-align:center;font-weight:800;color:var(--cqz-blue)}
.cqz-cl-nick{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.cqz-cl-rec{flex:0 0 auto;color:var(--cqz-soft);font-size:.76rem}
.cqz-cl-pts{flex:0 0 2.6rem;text-align:right;font-weight:800}
.cqz-cl-mine{margin-top:.8rem;background:var(--cqz-bg);border-radius:10px;padding:.7rem;font-size:.85rem;text-align:center}
.cqz-h2h{font-size:.8rem;color:var(--cqz-soft);text-align:center;margin:-.4rem 0 1rem}
.cqz-h2h:empty{display:none}

/* ===== Sfida — header stile QuizDuello (avatar, punteggio, round) ===== */
.cqz-vs{display:flex;align-items:center;justify-content:space-between;gap:.5rem;background:linear-gradient(180deg,#0b4f9c,#0a3f7d);border-radius:16px;padding:1rem .9rem .85rem;margin-bottom:.6rem;color:#fff;box-shadow:0 4px 14px rgba(11,79,156,.25)}
.cqz-pl{flex:1 1 0;min-width:0;display:flex;flex-direction:column;align-items:center;gap:.4rem}
.cqz-ava{width:54px;height:54px;border-radius:50%;display:grid;place-items:center;font-weight:800;font-size:1.15rem;color:#fff;background-size:cover;background-position:center;box-shadow:0 2px 8px rgba(0,0,0,.25);border:2.5px solid rgba(255,255,255,.85)}
.cqz-ava--opp{border-color:rgba(255,255,255,.55)}
.cqz-pl__n{font-size:.82rem;font-weight:700;text-align:center;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#eaf2fb}
.cqz-sc{flex:0 0 auto;display:flex;align-items:center;gap:.3rem;font-size:1.7rem;font-weight:800;line-height:1;letter-spacing:.5px}
.cqz-sc i{font-style:normal;font-size:1.1rem;opacity:.7;font-weight:600}
.cqz-sc b{min-width:1.1ch;text-align:center}
.cqz-sc--win b:first-child{color:#7df0b0}
.cqz-sc--lose b:first-child{color:#ffb4b4}
.cqz-rounds{display:flex;flex-direction:column;gap:.3rem;margin-bottom:1rem}
.cqz-rrow{display:grid;grid-template-columns:1.9rem auto minmax(0,1fr) auto;align-items:center;gap:.5rem;padding:.4rem .55rem;border-radius:9px;background:var(--cqz-bg)}
.cqz-rn{font-weight:800;font-size:.78rem;color:var(--cqz-soft)}
.cqz-rcat{text-align:center;font-size:.72rem;color:var(--cqz-soft);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.cqz-dots{display:inline-flex;gap:4px}
.cqz-dot{width:9px;height:9px;border-radius:50%;background:#cbd5e1}
.cqz-dot.is-ok{background:#22c55e}
.cqz-dot.is-no{background:#ef4444}
.cqz-dot.is-none{background:#cdd7e2}
.cqz-srlive{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.cqz-opt.is-right,.cqz-opt.is-wrong{transition:background .15s,border-color .15s}

/* ===== Quiz "da gioco" (web): top punteggio, barra del tempo che scende, opzioni A/B/C/D ===== */
.qz-top{display:flex;align-items:center;justify-content:space-between;gap:.6rem;margin-bottom:.55rem}
.qz-count{font-size:.82rem;font-weight:800;color:var(--cqz-soft);letter-spacing:.02em;text-transform:uppercase}
.qz-count i{font-style:normal;opacity:.5;margin:0 .12rem}
.qz-score{display:inline-flex;align-items:center;gap:.32rem;background:linear-gradient(180deg,#0d6bd4,#0b4f9c);color:#fff;font-weight:800;font-size:.85rem;padding:.34rem .72rem;border-radius:999px;box-shadow:0 2px 7px rgba(11,79,156,.32)}
.qz-score b{font-size:1.02rem;font-variant-numeric:tabular-nums}
.qz-timerow{display:flex;align-items:center;gap:.6rem;margin-bottom:1.05rem}
.qz-time{position:relative;flex:1;height:13px;background:var(--cqz-border);border-radius:999px;overflow:hidden;box-shadow:inset 0 1px 2px rgba(0,0,0,.08)}
.qz-time__fill{position:absolute;left:0;top:0;bottom:0;width:100%;border-radius:999px;background:#22c55e;animation:qz-drain var(--qz-secs,30s) linear forwards;will-change:width}
.qz-time__fill.is-paused{animation-play-state:paused}
@keyframes qz-drain{0%{width:100%;background:#22c55e}45%{background:#f4b400}75%{background:#f97316}100%{width:0%;background:#ef4444}}
.qz-time__num{flex:none;min-width:2.7ch;text-align:right;font-weight:800;font-variant-numeric:tabular-nums;color:var(--cqz-ink);font-size:.98rem}
.qz-time__num.is-urgent{color:#dc2626;animation:qz-pulse .5s ease-in-out infinite alternate}
@keyframes qz-pulse{from{transform:scale(1)}to{transform:scale(1.18)}}
@media (prefers-reduced-motion:reduce){.qz-time__num.is-urgent{animation:none}}
.cqz-card{background:var(--cqz-card);border:1px solid var(--cqz-border);border-radius:16px;padding:1.05rem 1.1rem;margin-bottom:1rem}
.cqz-card .cqz-dom{margin:0}
.cqz-opt{display:flex;align-items:center;gap:.7rem}
.cqz-opt__l{flex:none;width:1.75rem;height:1.75rem;border-radius:50%;background:var(--cqz-border);color:var(--cqz-ink);display:grid;place-items:center;font-weight:800;font-size:.82rem}
.cqz-opt__t{flex:1;min-width:0}
.cqz-opt.is-right{box-shadow:0 0 0 1px #86e0b4}
.cqz-opt.is-right .cqz-opt__l{background:#22c55e;color:#fff}
.cqz-opt.is-wrong .cqz-opt__l{background:#ef4444;color:#fff}
.cqz-end__big{display:inline-grid;place-items:center;width:7.2rem;height:7.2rem;border-radius:50%;margin:.4rem auto .2rem;font-size:1.7rem;font-weight:800;color:#fff;background:linear-gradient(150deg,#0d6bd4,#0a3f7d);box-shadow:0 6px 20px rgba(11,79,156,.32);font-variant-numeric:tabular-nums}

/* dicitura scadenza turno (sconfitta a tavolino) */
.cqz-deadline{background:var(--cqz-bg);border-left:4px solid #f59e0b;border-radius:10px;padding:.6rem .8rem;margin:0 0 1rem;font-size:.85rem;color:var(--cqz-ink);line-height:1.45}
.cqz-deadline.is-urgent{border-left-color:#ef4444}
.cqz-deadline strong{font-weight:800}
