/* ---------- quiz: shared ---------- */

:root {
	--q0: #b5382a;
	--q1: #2e5b88;
	--q2: #b88a12;
	--q3: #3f7a43;
}
.qz-opt.c0, .qz-shape.c0 { background: var(--q0); }
.qz-opt.c1, .qz-shape.c1 { background: var(--q1); }
.qz-opt.c2, .qz-shape.c2 { background: var(--q2); }
.qz-opt.c3, .qz-shape.c3 { background: var(--q3); }
.qz-opt { display: flex; align-items: center; gap: .6em; color: #fff; text-align: left; font-weight: 600; border-radius: var(--radius); box-shadow: 0 3px 0 rgb(0 0 0 / .25); }
.qz-opt i { font-style: normal; font-size: 1.3em; line-height: 1; flex: none; }
.qz-opt span { flex: 1; overflow-wrap: anywhere; }
.qz-muted { color: var(--muted); }
.qz-timer { font-family: var(--condensed); font-variant-numeric: tabular-nums; }

/* ---------- quiz: TV ---------- */

.qz-tv {
	position: fixed; inset: 0; z-index: 30; display: grid; grid-template-rows: auto 1fr; grid-template-columns: 1fr;
	gap: 1.5vw; padding: 1.5vw 2.5vw; background: var(--paper); color: var(--dark); font-size: clamp(14px, 1.6vw, 34px);
	border: 7px double var(--line);
}
.qz-tv.reveal { grid-template-columns: 1fr 24vw; }
.qz-tv header { grid-column: 1 / -1; display: flex; align-items: center; gap: 2vw; border-bottom: 3px double var(--line); padding-bottom: .6vw; }
.qz-tv .qz-title { font: 400 3vw/1 var(--display); letter-spacing: -.03em; margin-right: auto; }
.qz-tv .qz-count { font: 400 2.2vw/1 var(--condensed); letter-spacing: .06em; color: var(--muted); }
.qz-tv .qz-timer { font-size: 5vw; line-height: 1; min-width: 2ch; text-align: center; color: var(--card); background: var(--ink); padding: .1em .3em; }
.qz-tv main { min-height: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.4vw; text-align: center; }
.qz-tv h1 { font: 400 clamp(24px, 3.6vw, 80px)/1.15 var(--serif); color: var(--dark); margin: 0; max-width: 85vw; }
.qz-tv .qz-kicker { font: 400 2.4vw/1 var(--condensed); letter-spacing: .12em; color: var(--ink); text-transform: uppercase; margin: 0; }
.qz-tv .qz-lobby h1, .qz-tv .qz-final h1 { font: 400 6vw/1 var(--display); letter-spacing: -.04em; }
.qz-tv .qz-hint { font-size: 2vw; color: var(--muted); }
.qz-tv .qz-stage { flex: 1 1 auto; min-height: 0; max-height: 46vh; width: 100%; display: flex; justify-content: center; align-items: center; }
.qz-tv .qz-media { max-width: 100%; max-height: 46vh; object-fit: contain; display: block; border: 3px double var(--line); background: #000; }
.qz-tv .qz-clip { position: relative; display: flex; justify-content: center; align-items: center; max-height: 100%; }
.qz-tv .qz-yt { position: relative; width: min(80vw, 82vh); aspect-ratio: 16 / 9; max-height: 46vh; }
.qz-tv img.qz-media { height: 46vh; width: auto; background: transparent; border: 0; }
.qz-tv .qz-yt iframe { width: 100%; height: 100%; border: 3px double var(--line); }
.qz-tv .qz-cover { position: absolute; inset: 0; display: grid; place-items: center; background: var(--paper); }
.qz-tv .qz-listen { width: 22vh; height: 22vh; display: grid; place-items: center; font-size: 12vh; color: var(--card); background: var(--ink); border-radius: 50%; animation: qz-pulse 1.2s ease-in-out infinite alternate; }
.qz-tv .qz-play { position: absolute; inset: 0; margin: auto; width: max-content; height: max-content; font-size: 2.5vw; padding: .4em 1em; background: var(--dark); color: var(--card); }
@keyframes qz-pulse { to { transform: scale(1.06); } }
.qz-tv .qz-options { width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 1vw; }
.qz-tv .qz-opt { padding: 1.4vw 1.6vw; font-size: 2.4vw; min-height: 9vh; transition: opacity .3s; }
.qz-tv .qz-opt b { font: 400 3vw/1 var(--condensed); }
.qz-tv .qz-opt.wrong { opacity: .28; }
.qz-tv .qz-options.n3 .qz-opt:last-child { grid-column: 1 / -1; }
.qz-tv .qz-opt.right { outline: .4vw solid var(--dark); outline-offset: .3vw; }
.qz-tv .qz-reveal .qz-answer { font: 400 4.6vw/1.1 var(--display); color: var(--ink); margin: 0 0 .5vw; }
.qz-tv .qz-reveal p { margin: 0; font-size: 2vw; }
.qz-tv .qz-side { background: var(--card); border: 3px double var(--line); padding: 1vw 1.2vw; overflow: hidden; }
.qz-tv .qz-side h2 { font: 400 2.2vw/1.1 var(--condensed); letter-spacing: .06em; color: var(--ink); }
.qz-board { list-style: none; margin: 0; padding: 0; width: 100%; }
.qz-board li { display: flex; align-items: baseline; gap: .7em; padding: .3em 0; border-bottom: 1px dotted var(--line); text-align: left; }
.qz-board li b { color: var(--ink); font-family: var(--serif); width: 1.4em; }
.qz-board li span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qz-board li em { font-style: normal; color: var(--muted); font-size: .85em; }
.qz-tv .qz-final .qz-board { max-width: 60vw; font-size: 2.2vw; }
.qz-tv .qz-final .qz-board li:first-child { font-size: 1.3em; }

/* ---------- quiz: phone ---------- */

.qz-phone {
	position: fixed; inset: 0; z-index: 50; display: flex; flex-direction: column; background: var(--paper);
	padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom);
}
.qz-phone header { display: flex; align-items: center; gap: .8rem; padding: .7rem 1rem; border-bottom: 3px double var(--line); }
.qz-phone header span { flex: 1; font-family: var(--serif); font-size: 1.1rem; }
.qz-phone header .qz-timer { font-size: 2rem; line-height: 1; color: var(--ink); }
.qz-phone main { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: .8rem; padding: 1rem; text-align: center; min-height: 0; }
.qz-phone h2 { font-size: 1.9rem; margin: 0; }
.qz-phone.reveal h2 { color: var(--ink); }
.qz-phone .qz-mine { font: 600 1.4rem/1.2 var(--sans); background: var(--card); border: 1px solid var(--line); padding: .8rem; margin: 0; }
.qz-pad { flex: 1; display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.qz-pad.n2 { grid-template-columns: 1fr; }
.qz-pad.n3 .qz-opt:last-child { grid-column: 1 / -1; }
.qz-pad .qz-opt { flex-direction: column; justify-content: center; text-align: center; padding: .8rem; font-size: 1.15rem; min-height: 8rem; }
.qz-pad .qz-opt i { font-size: 2.4rem; }
.qz-pad .qz-opt:active:not(:disabled) { transform: translateY(2px); box-shadow: 0 1px 0 rgb(0 0 0 / .25); }
.qz-type { display: grid; gap: .7rem; }
.qz-type input { font-size: 1.3rem; padding: 1rem; text-align: center; }
.qz-reopen {
	position: fixed; z-index: 30; right: 12px; bottom: calc(var(--tabs-h) + env(safe-area-inset-bottom) + 12px);
	background: var(--ink); color: #fff; font-weight: 600; padding: .7rem 1rem; box-shadow: 0 2px 0 var(--dark);
}

/* ---------- quiz: staff ---------- */

.qz-staff h3 { margin-top: 1rem; }
.qz-live { border: 3px double var(--ink); }
.qz-live .qz-prompt { font-family: var(--serif); font-size: 1.25rem; margin: .5rem 0; }
.qz-staff .qz-preview { display: block; width: 100%; max-height: 40vh; margin: .4rem 0; object-fit: contain; }
.qz-staff a.qz-preview { color: var(--ink); font-weight: 600; }
.qz-ctl { display: flex; flex-wrap: wrap; gap: 8px; margin: .8rem 0; }
.qz-ctl > button { width: auto; flex: 1 1 auto; min-height: 52px; }
.qz-answers, .qz-live ol { padding: 0; margin: 0; list-style: none; }
.qz-answers li { align-items: center; padding: .4rem 0; }
.qz-answers button { width: auto; flex: none; }
.qz-lib .row { align-items: center; flex-wrap: wrap; }
.qz-lib .primary { width: auto; }
.qz-q { padding: 0; }
.qz-q-head { display: flex; align-items: baseline; gap: .7rem; width: 100%; padding: .8rem 1rem; text-align: left; }
.qz-q-head b { color: var(--ink); font-family: var(--serif); }
.qz-q-head span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qz-q-head small { color: var(--muted); flex: 0 1 auto; max-width: 55%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qz-q .staff-form { padding: 0 1rem 1rem; }
.qz-q.open { border-color: var(--ink); }
.qz-secs { flex: 0 0 7rem; }
.qz-optrow { align-items: center; }
.qz-optrow label.check { flex: none; }
.qz-shape { display: inline-grid; place-items: center; width: 28px; height: 28px; color: #fff; font-style: normal; }
.qz-mtype { flex: 0 0 8.5rem; }
.qz-json { min-height: 50vh; font: 13px/1.4 ui-monospace, Menlo, monospace; }
.qz-add { width: 100%; margin-bottom: 1rem; }
.qz-save { position: sticky; bottom: calc(var(--tabs-h) + env(safe-area-inset-bottom)); background: var(--paper); padding: .6rem 0; }
.qz-save .primary { width: auto; }
