/* The Quiz: pub quiz night. Dark navy, hot pink buzzer accent, big tappable options. */
#quiz { background: radial-gradient(circle at 50% 0%, #1f2a5c, #0b1030 65%); --qz-pink: #ff3d8a; --qz-pink-deep: #c91d63; }
#quiz .game-root { overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 10px var(--gutter-r, 14px) 24px var(--gutter-l, 14px); gap: 10px; }
#quiz .game-root > div { display: flex; flex-direction: column; gap: 10px; }
#quiz .pill.bid-pill { background: var(--qz-pink); color: #fff; animation: pulse 1.2s infinite; }

/* score strip */
.qz-scores { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; }
.qz-score { display: inline-flex; align-items: center; gap: 5px; background: rgba(255,255,255,.08); border-radius: 999px; padding: 3px 10px 3px 3px; font-size: 14px; }
.qz-score .avatar { width: 26px; height: 26px; font-size: 12px; }
.qz-score.me { outline: 2px solid var(--brass); }

/* setup */
.qz-pot { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: center; background: rgba(255,255,255,.07); border-radius: 16px; padding: 10px 12px; }
.qz-pot-count { text-align: center; display: grid; line-height: 1; min-width: 56px; }
.qz-pot-count b { font-family: var(--display); font-size: 40px; color: var(--brass); }
.qz-pot-count small { font-size: 11px; color: var(--ink-dim); }
.qz-pot-people { display: flex; flex-wrap: wrap; gap: 6px; }
.qz-person { display: inline-flex; align-items: center; gap: 6px; background: rgba(255,255,255,.06); border-radius: 999px; padding: 3px 10px 3px 3px; font-size: 12px; line-height: 1.1; border: 1.5px solid transparent; }
.qz-person .avatar { width: 26px; height: 26px; font-size: 12px; }
.qz-person small { display: block; color: var(--ink-dim); font-size: 11px; }
.qz-person.ready { border-color: var(--good); }
.qz-form { display: grid; gap: 8px; background: rgba(255,255,255,.06); border-radius: 16px; padding: 12px; }
.qz-f { display: grid; gap: 4px; }
.qz-f span { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-dim); font-weight: 800; }
.qz-f.good span { color: var(--good); }
.qz-f input { padding: 10px 12px; font-size: 15px; }
.qz-wrongs { display: grid; gap: 6px; }
.qz-mine-title { font-weight: 800; font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-dim); margin-bottom: 4px; }
.qz-q { display: flex; align-items: center; gap: 10px; background: rgba(255,255,255,.06); border-radius: 12px; padding: 8px 10px; margin-bottom: 6px; }
.qz-q > div { flex: 1; min-width: 0; }
.qz-q b { display: block; font-size: 14px; line-height: 1.25; overflow-wrap: anywhere; }
.qz-q small { color: var(--good); font-size: 12px; overflow-wrap: anywhere; }
.qz-setup-foot { display: grid; gap: 8px; text-align: center; }
.qz-setup-foot .btn-big { font-size: 22px; background: linear-gradient(180deg, var(--qz-pink), var(--qz-pink-deep)); color: #fff; box-shadow: 0 6px 0 #7d1140, 0 10px 20px rgba(0,0,0,.3); }
.qz-setup-foot .btn-big:disabled { filter: grayscale(.7) brightness(.6); box-shadow: none; }

/* ask */
.qz-timer { height: 10px; border-radius: 999px; background: rgba(255,255,255,.12); overflow: hidden; }
.qz-timer-fill { height: 100%; width: 100%; background: linear-gradient(90deg, var(--good), var(--brass)); transition: width .1s linear; border-radius: 999px; }
.qz-timer-fill.urgent { background: var(--bad); }
.qz-qcard { background: var(--card); color: var(--card-ink); border-radius: 18px; padding: 14px 16px; box-shadow: 0 10px 24px rgba(0,0,0,.35); transition: transform .4s ease; }
.qz-qcard.small { padding: 10px 14px; }
.qz-qmeta { display: flex; gap: 6px; margin-bottom: 6px; flex-wrap: wrap; }
.qz-qmeta .tag { background: rgba(0,0,0,.1); color: #3a3630; }
.qz-qmeta .tag.vote { background: var(--qz-pink); color: #fff; }
.qz-qmeta .tag.you { background: var(--brass); color: #2a1d05; }
.qz-qtext { font-family: var(--display); font-weight: 700; font-size: 22px; line-height: 1.2; overflow-wrap: anywhere; text-wrap: balance; }
.qz-qcard.small .qz-qtext { font-size: 17px; }
.qz-opts { display: grid; gap: 8px; transition: transform .4s ease; }
.qz-opt { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; background: rgba(255,255,255,.1); border: 2px solid rgba(255,255,255,.18); border-radius: 16px; padding: 12px 12px; color: var(--ink); font-size: 17px; font-weight: 700; min-height: 58px; transition: transform .1s, background .2s; }
.qz-opt:not(:disabled):active { transform: scale(.98); background: rgba(255,61,138,.3); }
.qz-opt:disabled { opacity: .55; }
.qz-opt.picked, .qz-opt.picked:disabled { opacity: 1; border-color: var(--qz-pink); background: rgba(255,61,138,.25); }
.qz-let { flex: 0 0 36px; width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--qz-pink); color: #fff; font-family: var(--display); font-weight: 700; font-size: 18px; }
.qz-otext { flex: 1; min-width: 0; overflow-wrap: anywhere; line-height: 1.2; }
.qz-otext small { display: block; font-size: 12px; color: var(--ink-dim); font-weight: 600; }
.qz-opts.vote .qz-opt { min-height: 50px; padding: 8px 12px; }
.qz-flipped { transform: rotate(180deg); }
.qz-flipnote { text-align: center; font-size: 13px; color: var(--qz-pink); font-weight: 800; }
.qz-wait { text-align: center; padding: 10px; background: rgba(246,196,83,.12); border: 1px solid rgba(246,196,83,.35); border-radius: 14px; }
.qz-wait-big { font-family: var(--display); font-weight: 700; font-size: 20px; color: var(--brass); }
.qz-jam { text-align: center; background: var(--bad); color: #fff; font-weight: 900; border-radius: 12px; padding: 10px; animation: pulse 1s infinite; letter-spacing: .05em; }
.qz-locked { text-align: center; font-size: 14px; color: var(--ink-dim); }
.qz-pending { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.qz-pend { display: grid; justify-items: center; gap: 2px; font-size: 11px; color: var(--ink-dim); opacity: .55; }
.qz-pend .avatar { width: 30px; height: 30px; font-size: 13px; }
.qz-pend.done { opacity: 1; color: var(--good); }
.qz-pend.author { opacity: .8; color: var(--brass); }
.qz-sabbar { display: flex; gap: 8px; justify-content: center; align-items: center; flex-wrap: wrap; margin-top: auto; padding-top: 6px; }
.qz-sabbar .note { flex-basis: 100%; text-align: center; }
.qz-chip { border-radius: 999px; padding: 10px 16px; font-weight: 800; font-size: 15px; background: linear-gradient(180deg, #ff6aa6, var(--qz-pink-deep)); color: #fff; border: 0; box-shadow: 0 4px 0 #7d1140; }
.qz-chip:active { transform: translateY(2px); box-shadow: 0 2px 0 #7d1140; }
.qz-chip:disabled { filter: grayscale(.8) brightness(.6); box-shadow: none; }
.qz-targets { display: grid; gap: 8px; margin-top: 8px; }
.qz-target { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; background: rgba(255,255,255,.08); border: 2px solid rgba(255,255,255,.15); border-radius: 14px; padding: 10px; color: var(--ink); font-size: 16px; }
.qz-target:active { background: rgba(255,61,138,.3); }

/* reveal */
.qz-headline { text-align: center; font-family: var(--display); font-weight: 700; font-size: 22px; line-height: 1.15; padding: 6px 0; }
.qz-headline.good { color: var(--good); }
.qz-headline.bad { color: var(--bad); }
.qz-opts.reveal .qz-opt { min-height: 48px; padding: 8px 10px; opacity: 1; font-size: 15px; flex-wrap: wrap; }
.qz-opts.reveal .qz-opt.right { background: rgba(74,209,124,.25); border-color: var(--good); }
.qz-opts.reveal .qz-opt.right .qz-let { background: var(--good); color: #0b2a16; }
.qz-opts.reveal .qz-opt.wrong { background: rgba(255,107,90,.14); border-color: rgba(255,107,90,.5); }
.qz-opts.reveal .qz-opt.wrong .qz-let { background: rgba(255,255,255,.15); }
.qz-opts.reveal .qz-opt.dud { opacity: .45; }
.qz-opts.reveal .qz-opt.dud .qz-let { background: rgba(255,255,255,.15); }
.qz-pickers { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.qz-picker { position: relative; }
.qz-picker .avatar { width: 30px; height: 30px; font-size: 13px; animation: qzDrop .4s cubic-bezier(.2,1.4,.4,1); }
.qz-pts { position: absolute; left: 50%; top: -6px; transform: translateX(-50%); font-style: normal; font-weight: 900; font-size: 13px; color: var(--good); text-shadow: 0 1px 3px #000; animation: qzFloat 2.2s ease-out forwards; white-space: nowrap; }
.qz-pts.nicked { color: var(--bad); }
@keyframes qzFloat { 0% { opacity: 0; transform: translate(-50%, 6px); } 20% { opacity: 1; } 100% { opacity: 1; transform: translate(-50%, -18px); } }
@keyframes qzDrop { from { transform: scale(0); } to { transform: scale(1); } }
.qz-nicks { display: grid; gap: 4px; }
.qz-nick { background: linear-gradient(135deg, #b3001b, #f08c00); border-radius: 12px; padding: 8px 12px; font-size: 14px; font-weight: 700; text-align: center; }
.qz-forfeits { background: rgba(255,107,90,.12); border: 1px solid rgba(255,107,90,.4); border-radius: 14px; padding: 8px 10px; display: grid; gap: 6px; }
.qz-ftitle { font-size: 11px; text-transform: uppercase; letter-spacing: .1em; font-weight: 800; color: var(--bad); }
.qz-forfeit { display: flex; align-items: center; gap: 8px; font-size: 14px; line-height: 1.25; }
.qz-forfeit .avatar { width: 28px; height: 28px; font-size: 12px; flex: 0 0 auto; }
.qz-forfeit.me { font-weight: 800; color: #fff; }
.qz-board { display: grid; gap: 4px; }
.qz-row { display: flex; align-items: center; gap: 8px; background: rgba(255,255,255,.06); border-radius: 12px; padding: 6px 10px; font-size: 14px; }
.qz-row .avatar { width: 28px; height: 28px; font-size: 12px; }
.qz-row b { flex: 1; }
.qz-row.me { outline: 2px solid var(--brass); }
.qz-rank { width: 20px; text-align: center; color: var(--ink-dim); font-weight: 800; }
.qz-rowpts { font-family: var(--display); font-weight: 700; font-size: 18px; color: var(--brass); font-variant-numeric: tabular-nums; }
.qz-next { text-align: center; }

/* gameover */
.qz-podium { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px; align-items: end; padding: 16px 0 4px; }
.qz-step { display: grid; gap: 6px; justify-items: center; }
.qz-step-who { display: grid; justify-items: center; gap: 2px; font-size: 13px; text-align: center; }
.qz-step-who b { overflow-wrap: anywhere; }
.qz-step-who span { color: var(--brass); font-family: var(--display); font-weight: 700; font-size: 18px; }
.qz-step-block { width: 100%; border-radius: 12px 12px 0 0; display: grid; place-items: center; font-family: var(--display); font-weight: 700; font-size: 22px; background: rgba(255,255,255,.12); }
.qz-step.p1 .qz-step-block { height: 90px; background: linear-gradient(180deg, var(--brass), var(--brass-deep)); color: #2a1d05; font-size: 36px; }
.qz-step.p1 .avatar { width: 52px; height: 52px; font-size: 22px; }
.qz-step.p2 .qz-step-block { height: 64px; }
.qz-step.p3 .qz-step-block { height: 44px; }
.qz-podium:has(.p1:only-child) { grid-template-columns: 1fr; }
.qz-podium:not(:has(.p3)) { grid-template-columns: 1fr 1fr; }

/* blast */
.qz-blast { background: rgba(201, 29, 99, .95); }
#quiz .event-pop { top: calc(env(safe-area-inset-top, 0px) + 60px); }
