.screen { min-height: 100vh; padding: 18px; }
.center-col { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; text-align: center; }
.join-card { width: min(380px, 100%); display: flex; flex-direction: column; gap: 12px; }
.lbl { font-weight: 800; font-size: 18px; color: var(--ink); }
.big-input { font-size: 30px; }
.hint { opacity: .85; margin: 0; }
.quiz-name { font-size: 26px; font-weight: 800; }

.avatars { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.avatars button { font-size: 30px; border: 3px solid transparent; background: #f1eefb; border-radius: 12px; padding: 4px 0; cursor: pointer; }
.avatars button.on { border-color: var(--a3); background: #fff; transform: scale(1.12); }

.big-av { font-size: 110px; line-height: 1; }
.msg-title { margin: 0; font-size: 34px; text-shadow: 0 3px 0 rgba(0, 0, 0, .3); }
.msg-text { margin: 0; font-size: 22px; opacity: .9; max-width: 420px; white-space: pre-line; overflow-wrap: anywhere; }
.me-chip { position: fixed; top: 12px; left: 12px; background: rgba(0, 0, 0, .35); border-radius: 30px; padding: 4px 14px; font-weight: 800; }

/* question */
#qScreen { display: flex; flex-direction: column; gap: 12px; }
#qScreen:not(.hidden) { display: flex; }
.q-top { display: flex; align-items: center; justify-content: space-between; }
.q-num, .q-score { background: rgba(0, 0, 0, .35); border-radius: 20px; padding: 4px 14px; font-weight: 800; }
.small-timer { width: 70px; height: 70px; }
.small-timer .num { font-size: 26px; }
.p-question { background: #fff; color: var(--ink); border-radius: var(--radius); padding: 12px 16px; font-size: 24px; font-weight: 800; text-align: center; box-shadow: var(--shadow); }
.p-img { max-height: 22vh; max-width: 100%; align-self: center; border-radius: 14px; }
.p-answers { flex: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.p-answers.two { grid-template-columns: 1fr; }
.p-answers .ans { flex-direction: column; justify-content: center; text-align: center; font-size: 22px; min-height: 120px; }
.p-answers .ans .shape { width: 48px; height: 48px; }
.p-answers .ans:active { transform: scale(.96); }
.p-answers .ans.picked { outline: 5px solid #fff; transform: scale(1.03); }

.p-hint { text-align: center; font-weight: 800; font-size: 18px; color: var(--gold); margin: -4px 0; }
.p-action { display: flex; gap: 10px; }
.p-action:empty { display: none; }
.p-action .btn.big { flex: 1; }

/* multi-select tick boxes */
.ans .tickbox { position: absolute; top: 8px; right: 8px; width: 30px; height: 30px; border-radius: 8px; border: 3px solid #fff; display: grid; place-items: center; font-size: 20px; }
.ans.ticked { outline: 5px solid #fff; }
.ans.ticked .tickbox { background: #fff; }
.ans.ticked .tickbox::after { content: '✔'; color: var(--good); }

/* put in order */
.ans .order-pos { position: absolute; top: 8px; left: 8px; width: 34px; height: 34px; border-radius: 50%; background: rgba(0, 0, 0, .25);
  display: grid; place-items: center; font-size: 20px; }
.ans.placed { opacity: .75; }
.ans.placed .order-pos, .order-pos.on { background: #fff; color: var(--ink); }
.order-pos.on { position: static; flex: 0 0 auto; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-size: 18px; }

/* typed answers and sliders */
.p-answers.form { display: flex; flex-direction: column; justify-content: center; }
.typed-form { display: flex; flex-direction: column; gap: 14px; }
.slider-box { display: flex; flex-direction: column; gap: 14px; background: rgba(0, 0, 0, .25); border-radius: var(--radius); padding: 18px; }
.slider-value { text-align: center; font-size: 56px; font-weight: 800; color: var(--gold); line-height: 1; }
.slider-box input[type=range] { width: 100%; height: 40px; accent-color: var(--gold); }
.slider-ends { display: flex; justify-content: space-between; font-weight: 700; opacity: .85; margin-top: -10px; }
.slider-nudge { display: flex; justify-content: center; gap: 20px; }
.slider-nudge .btn { width: 70px; font-size: 26px; }
.p-answers.pin-mode { align-items: center; --maxh: 52vh; }
.p-answers.pin-mode .pin-board { cursor: crosshair; }
.res-pin { width: 100%; display: flex; justify-content: center; --maxh: 30vh; }
#qScreen { padding-bottom: 76px; }  /* keep Submit buttons clear of the sound button */
.res-guess { font-size: 20px; font-weight: 700; }
.res-answer-tile.small { font-size: 18px; padding: 6px 12px; justify-content: flex-start; gap: 10px; }
.final-sub { font-size: 18px; font-weight: 700; }

/* result */
#resultScreen.good { background: radial-gradient(circle, rgba(34, 197, 94, .55), transparent 70%); }
#resultScreen { overflow-y: auto; }
#resultScreen.bad { background: radial-gradient(circle, rgba(239, 68, 68, .5), transparent 70%); }
.result-icon { font-size: 110px; line-height: 1; }
.result-title { margin: 0; font-size: 40px; text-shadow: 0 3px 0 rgba(0, 0, 0, .3); }
.result-points { font-size: 34px; font-weight: 800; background: rgba(0, 0, 0, .35); border-radius: 16px; padding: 6px 22px; }
.res-answer { display: flex; flex-direction: column; align-items: center; gap: 8px; width: min(340px, 100%); }
.res-answer-label { font-size: 18px; font-weight: 800; opacity: .9; }
.res-answer-tile { width: 100%; cursor: default; font-size: 24px; justify-content: center; padding: 10px 16px; }
.res-answer-tile .shape { width: 34px; height: 34px; }
.result-streak { font-size: 24px; font-weight: 800; color: var(--gold); min-height: 1.2em; }
.result-rank { font-size: 22px; opacity: .95; }

/* final */
#finalScreen:not(.hidden) { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; }
.final-wrap { display: flex; gap: 30px; align-items: center; justify-content: center; flex-wrap: wrap; width: 100%; max-width: 1000px;
  background: rgba(0, 0, 0, .25); border-radius: 24px; padding: 26px; }
.final-me { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.final-me .big-av { font-size: 96px; }
.final-text { font-size: 26px; font-weight: 800; text-align: center; }
.final-board { flex: 1; min-width: 280px; }
.final-board .row { font-size: 19px; grid-template-columns: 30px 38px 1fr auto; gap: 8px; padding: 8px 12px; }
.final-board .row .av { font-size: 28px; }
.final-board .row > div:nth-child(3) { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 500px) { .final-wrap { padding: 16px; } }
.again { max-width: 320px; }
