:root {
  color-scheme: light;
  text-autospace: normal;
  --brand-purple: #5b3df6;
  --brand-purple-deep: #4324d8;
  --brand-teal: #14c8b8;
  --brand-teal-deep: #087f75;
  --brand-orange: #ff8a3d;
  --brand-yellow: #ffc83d;
  --brand-lavender: #ede9ff;
  --brand-bg: #f6f7fb;
  --surface: #ffffff;
  --text-primary: #16152f;
  --text-secondary: #66647d;
  --line: #e3e2ef;
  --danger: #c33d50;
  --card-radius: clamp(22px, 1.8vw, 32px);
  --card-shadow: 0 22px 60px rgba(57, 39, 133, 0.11);
  --page-space: clamp(20px, 2.2vw, 42px);
  --header-height: 78px;
  --entry-footer-height: 44px;
  --timer-size: clamp(108px, 8vw, 142px);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }

code,
pre,
kbd,
samp { text-autospace: no-autospace; }

html,
body { min-width: 1024px; min-height: 100%; }

body {
  position: relative;
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  color: var(--text-primary);
  background:
    radial-gradient(circle at 8% 16%, rgba(91, 61, 246, 0.1) 0 7rem, transparent 7.1rem),
    radial-gradient(circle at 94% 13%, rgba(91, 61, 246, 0.07) 0 14rem, transparent 14.1rem),
    radial-gradient(circle at 76% 98%, rgba(20, 200, 184, 0.07) 0 12rem, transparent 12.1rem),
    linear-gradient(135deg, #fbfbff 0%, #f5f3ff 48%, #f8f9fd 100%);
}

body::before,
body::after {
  content: "";
  position: fixed;
  z-index: -1;
  pointer-events: none;
  border-radius: 50%;
  filter: blur(2px);
}

body::before {
  left: -10rem;
  bottom: -18rem;
  width: 38rem;
  height: 38rem;
  border: 1px solid rgba(91, 61, 246, 0.08);
  box-shadow: 0 0 0 7rem rgba(91, 61, 246, 0.025), 0 0 0 14rem rgba(91, 61, 246, 0.018);
}

body::after {
  right: -7rem;
  top: 34%;
  width: 18rem;
  height: 18rem;
  background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.75), rgba(91, 61, 246, 0.06));
}

button,
input { font: inherit; }

button { touch-action: manipulation; }

svg {
  width: 1em;
  height: 1em;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 8px;
  left: 8px;
  padding: 12px 16px;
  color: #fff;
  background: var(--brand-purple-deep);
  border-radius: 12px;
  transform: translateY(-150%);
}

.skip-link:focus { transform: translateY(0); }

.app-bar {
  position: relative;
  z-index: 20;
  min-height: var(--header-height);
  padding: 12px clamp(28px, 4vw, 76px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid rgba(222, 219, 234, 0.78);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(18px);
}

.brand-identity,
.app-actions,
.connection-status,
.sound-control,
.button,
.summary-card,
.question-badges,
.question-corner,
.participant-pill,
.leaderboard-heading,
.leaderboard-heading h2,
.leaderboard-row,
.text-answer-prompt { display: flex; align-items: center; }

.brand-identity { gap: clamp(18px, 1.5vw, 28px); }

.brand-logo {
  display: block;
  width: clamp(126px, 9vw, 164px);
  height: 48px;
  object-fit: contain;
  object-position: left center;
}

.brand-divider { width: 1px; height: 32px; background: var(--line); }

.product-label {
  color: #46435d;
  font-size: clamp(15px, 1vw, 18px);
  font-weight: 800;
  letter-spacing: 0.02em;
}

.app-actions { justify-content: flex-end; gap: 12px; }

.connection-status {
  min-height: 50px;
  padding: 7px 12px;
  gap: 8px;
  color: var(--brand-teal-deep);
  background: rgba(224, 250, 247, 0.92);
  border: 1px solid rgba(20, 200, 184, 0.22);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
}

.connection-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand-teal);
  box-shadow: 0 0 0 4px rgba(20, 200, 184, 0.13);
}

.connection-status[data-state="pending"] { color: #7a5d13; background: #fff6d8; border-color: rgba(255, 200, 61, 0.38); }
.connection-status[data-state="pending"] .connection-dot { background: var(--brand-yellow); box-shadow: 0 0 0 4px rgba(255, 200, 61, 0.16); }

.sound-control {
  position: relative;
  min-height: 50px;
  padding: 5px 8px 5px 12px;
  gap: 8px;
  color: #46435d;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  user-select: none;
}

.sound-control:hover { border-color: rgba(91, 61, 246, 0.34); }

.sound-control input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.sound-switch {
  position: relative;
  width: 42px;
  height: 24px;
  flex: 0 0 auto;
  background: #cbc9d8;
  border-radius: 999px;
  transition: background 160ms ease;
}

.sound-switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(22, 21, 47, 0.2);
  transition: transform 160ms ease;
}

.sound-control input:checked + .sound-switch { background: var(--brand-purple); }
.sound-control input:checked + .sound-switch::after { transform: translateX(18px); }
.sound-control input:focus-visible + .sound-switch { outline: 3px solid rgba(91, 61, 246, 0.28); outline-offset: 2px; }

main {
  position: relative;
  z-index: 1;
  width: min(1760px, 100%);
  margin: 0 auto;
  padding: var(--page-space);
}

.display-body {
  --page-available: calc(100dvh - var(--header-height) - (var(--page-space) * 2));
  display: flex;
  flex-direction: column;
}

.display-body:has(#display-screen[hidden]) {
  --page-available: calc(100dvh - var(--header-height) - (var(--page-space) * 2) - var(--entry-footer-height));
}

.display-body main { flex: 1; }
.display-body .start-screen { min-height: var(--page-available); }
.display-body .start-visual { min-height: min(740px, var(--page-available)); }
.display-body .stage { height: calc(var(--page-available) - clamp(82px, 6.7vw, 108px) - clamp(14px, 1.2vw, 22px)); }

.entry-footer {
  min-height: var(--entry-footer-height);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 4px 14px;
  padding: 6px 16px;
  font-size: 12px;
  line-height: 1.5;
}

.entry-footer a {
  color: #9997a8;
  text-decoration: none;
}

.entry-footer a:hover {
  color: #66647d;
}

body:has(#display-screen:not([hidden])) .entry-footer { display: none; }

h1,
h2,
p { overflow-wrap: anywhere; }

h1,
h2,
p { margin-top: 0; }

.panel {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(222, 219, 234, 0.84);
  border-radius: var(--card-radius);
  box-shadow: var(--card-shadow);
}

.start-screen {
  min-height: calc(100dvh - var(--header-height) - (var(--page-space) * 2));
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(440px, 0.72fr);
  align-items: center;
  gap: clamp(48px, 6vw, 116px);
}

.start-visual {
  min-width: 0;
  min-height: min(740px, calc(100dvh - var(--header-height) - (var(--page-space) * 2)));
  display: flex;
  justify-content: center;
  flex-direction: column;
}

.start-copy { max-width: 820px; }

.start-copy h1 {
  position: relative;
  display: inline-block;
  margin: 0;
  font-size: clamp(54px, 5vw, 90px);
  line-height: 1.06;
  letter-spacing: -0.055em;
}

.start-copy h1::after {
  content: "";
  position: absolute;
  right: -0.2em;
  bottom: -0.08em;
  width: 2.15em;
  height: 0.18em;
  border-top: 0.06em solid var(--brand-purple);
  border-radius: 50%;
  transform: rotate(-4deg);
}

.start-copy > p {
  max-width: 700px;
  margin: clamp(22px, 2.2vw, 34px) 0 0;
  color: var(--text-secondary);
  font-size: clamp(18px, 1.4vw, 24px);
  line-height: 1.7;
}

.audience-scene {
  position: relative;
  width: min(620px, 84%);
  height: clamp(210px, 23vh, 292px);
  margin: clamp(26px, 4vh, 54px) 0 0 clamp(10px, 4vw, 76px);
}

.scene-screen {
  position: absolute;
  left: 11%;
  top: 0;
  width: 60%;
  height: 63%;
  display: grid;
  place-items: center;
  border: clamp(8px, 0.8vw, 14px) solid rgba(118, 92, 255, 0.34);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 22px 40px rgba(74, 52, 172, 0.16), inset 0 0 0 2px rgba(91, 61, 246, 0.1);
  transform: perspective(700px) rotateY(5deg);
}

.scene-screen::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -22%;
  width: 36%;
  height: 20%;
  border-radius: 0 0 18px 18px;
  background: linear-gradient(180deg, #d8d1ff, #eeeaff);
  transform: translateX(-50%);
}

.scene-screen img { width: 53%; height: 56%; object-fit: contain; }

.screen-spark {
  position: absolute;
  width: 7px;
  height: 26px;
  border-radius: 99px;
  background: var(--brand-orange);
}

.screen-spark-one { right: -8%; top: 26%; transform: rotate(18deg); }
.screen-spark-two { right: -13%; top: 43%; height: 18px; transform: rotate(62deg); }

.speech-bubble {
  position: absolute;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 12px 30px rgba(57, 39, 133, 0.15);
}

.speech-bubble::after {
  content: "";
  position: absolute;
  bottom: -10px;
  width: 18px;
  height: 18px;
  border-radius: 3px;
  background: inherit;
  transform: rotate(45deg);
}

.speech-bubble-teal {
  left: 0;
  top: 34%;
  width: 92px;
  height: 60px;
  gap: 7px;
  border-radius: 18px;
  background: linear-gradient(145deg, #22d8ca, #08b7aa);
}

.speech-bubble-teal i {
  position: relative;
  z-index: 1;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #fff;
}

.speech-bubble-orange {
  right: 3%;
  top: 19%;
  width: 70px;
  height: 60px;
  color: #fff;
  border-radius: 20px;
  background: linear-gradient(145deg, #ff9c59, #ff7a28);
}

.speech-bubble-orange svg { position: relative; z-index: 1; width: 30px; height: 30px; stroke-width: 3; }

.audience-row {
  position: absolute;
  left: 7%;
  right: 5%;
  bottom: 0;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: clamp(14px, 2.4vw, 34px);
}

.audience-person {
  position: relative;
  display: block;
  width: clamp(66px, 6vw, 92px);
  height: clamp(70px, 6.5vw, 98px);
  border-radius: 45% 45% 16px 16px;
  box-shadow: 0 14px 28px rgba(57, 39, 133, 0.14);
}

.audience-person::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -34%;
  width: 65%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: inherit;
  transform: translateX(-50%);
  box-shadow: 0 8px 20px rgba(57, 39, 133, 0.13);
}

.audience-purple { background: linear-gradient(145deg, #8067ff, #4c2ae3); }
.audience-teal { height: clamp(78px, 7.4vw, 108px); background: linear-gradient(145deg, #38ddd0, #0ab8aa); }
.audience-orange { background: linear-gradient(145deg, #ffa45e, #ff7f2f); }
.audience-lavender { width: clamp(52px, 5vw, 76px); height: clamp(58px, 5.6vw, 84px); background: linear-gradient(145deg, #ded8ff, #afa2ff); }

.start-form {
  width: min(100%, 600px);
  justify-self: end;
  padding: clamp(32px, 3vw, 54px);
  background: rgba(255, 255, 255, 0.93);
  box-shadow: 0 28px 80px rgba(62, 41, 155, 0.14);
}

.field { display: grid; gap: 14px; }

.display-recovery {
  display: grid;
  gap: 12px;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.display-recovery h2 { margin: 0; font-size: 20px; }
.display-recovery p { margin: 0; color: var(--text-secondary); }
.display-recovery .button { justify-self: start; }

label {
  color: var(--text-primary);
  font-size: clamp(18px, 1.3vw, 22px);
  font-weight: 850;
}

.code-input-shell {
  position: relative;
  min-height: clamp(66px, 5.2vw, 82px);
  border-radius: 16px;
}

.code-slots {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: clamp(7px, 0.7vw, 12px);
}

.code-slots span {
  display: grid;
  place-items: center;
  color: #8a879b;
  border: 2px solid #d8d6e3;
  border-radius: 14px;
  background: #fff;
  box-shadow: inset 0 -3px 0 rgba(39, 28, 88, 0.025);
  font-size: clamp(27px, 2.1vw, 36px);
  font-variant-numeric: tabular-nums;
  font-weight: 900;
  transition: color 160ms ease, border-color 160ms ease, background-color 160ms ease, transform 160ms ease;
}

.code-slots span.filled { color: var(--brand-purple); border-color: rgba(91, 61, 246, 0.42); background: #fbfaff; }
.code-input-shell:focus-within .code-slots span.next { border-color: var(--brand-purple); box-shadow: 0 0 0 4px rgba(91, 61, 246, 0.1); transform: translateY(-2px); }

#room-code {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  padding: 0;
  color: transparent;
  caret-color: transparent;
  border: 0;
  border-radius: 16px;
  background: transparent;
  outline: none;
  opacity: 0.02;
  cursor: text;
}

.field-help {
  margin: 0 0 10px;
  color: var(--text-secondary);
  font-size: clamp(13px, 0.92vw, 16px);
  line-height: 1.6;
}

.button {
  justify-content: center;
  gap: 10px;
  min-height: 50px;
  padding: 12px 20px;
  border: 1px solid transparent;
  border-radius: 14px;
  font-weight: 850;
  cursor: pointer;
  transition: transform 180ms ease, background-color 180ms ease, border-color 180ms ease, box-shadow 180ms ease, opacity 180ms ease;
}

.button:hover:not(:disabled) { transform: translateY(-2px); }
.button:active:not(:disabled) { transform: translateY(0); }
.button:disabled { cursor: not-allowed; opacity: 0.55; }

.button-primary {
  width: 100%;
  min-height: clamp(58px, 4.6vw, 72px);
  color: #fff;
  background: linear-gradient(135deg, #6547ff 0%, #4b27ee 100%);
  box-shadow: 0 16px 28px rgba(91, 61, 246, 0.24);
  font-size: clamp(17px, 1.2vw, 21px);
}

.button-primary:hover:not(:disabled) { box-shadow: 0 20px 36px rgba(91, 61, 246, 0.3); }
.button-primary .button-icon { width: 24px; height: 24px; stroke-width: 2.4; }

.button-quiet {
  color: var(--brand-purple-deep);
  border-color: rgba(91, 61, 246, 0.35);
  background: rgba(255, 255, 255, 0.86);
  text-decoration: none;
}

.button-quiet:hover { background: var(--brand-lavender); }
.button-quiet .button-icon { width: 19px; height: 19px; }

input:focus-visible,
button:focus-visible {
  outline: 3px solid rgba(91, 61, 246, 0.3);
  outline-offset: 3px;
}

.field-error {
  min-height: 24px;
  margin: 10px 0 -8px;
  color: var(--danger);
  font-size: 14px;
  font-weight: 750;
  line-height: 1.5;
}

.display-screen { display: grid; gap: clamp(14px, 1.2vw, 22px); }

.session-summary {
  display: grid;
  grid-template-columns: 1.12fr repeat(3, minmax(0, 1fr));
  gap: clamp(9px, 0.9vw, 16px);
}

.summary-card {
  min-width: 0;
  min-height: clamp(82px, 6.7vw, 108px);
  justify-content: space-between;
  gap: 14px;
  padding: clamp(13px, 1.25vw, 20px) clamp(16px, 1.6vw, 26px);
  border: 1px solid rgba(225, 223, 237, 0.85);
  border-radius: clamp(16px, 1.25vw, 22px);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 12px 30px rgba(57, 39, 133, 0.07);
}

.summary-card > div { min-width: 0; }
.summary-label { margin: 0 0 4px; color: var(--text-secondary); font-size: clamp(14px, 0.9vw, 16px); font-weight: 750; }
.summary-code,
.summary-value { margin: 0; font-variant-numeric: tabular-nums; font-weight: 900; line-height: 1.05; }
.summary-code { color: var(--brand-purple); font-size: clamp(27px, 2.2vw, 38px); letter-spacing: 0.12em; white-space: nowrap; }
.summary-value { font-size: clamp(24px, 2vw, 34px); }
.summary-value small { margin-left: 5px; font-size: 0.55em; font-weight: 800; }

.summary-icon {
  flex: 0 0 auto;
  width: clamp(42px, 3.3vw, 54px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 15px;
}

.summary-icon svg { width: 55%; height: 55%; stroke-width: 2.4; }
.summary-icon-purple { color: var(--brand-purple); background: var(--brand-lavender); }
.summary-icon-orange { color: #dc6422; background: #fff0e6; }
.summary-icon-teal { color: var(--brand-teal-deep); background: #def9f5; }

.status-pill,
.response-progress,
.question-type {
  display: inline-flex;
  align-items: center;
  width: max-content;
  min-height: 30px;
  margin: 0;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: clamp(14px, 0.88vw, 16px);
  font-weight: 850;
  white-space: nowrap;
}

.status-pill { color: var(--brand-teal-deep); background: #dcf9f5; }
.status-pill::before { content: ""; width: 8px; height: 8px; margin-right: 8px; border-radius: 50%; background: var(--brand-teal); }
.status-pill[data-status="waiting"] { color: var(--brand-purple-deep); background: var(--brand-lavender); }
.status-pill[data-status="waiting"]::before { background: var(--brand-purple); }
.status-pill[data-status="closed"] { color: #a5501f; background: #fff0e6; }
.status-pill[data-status="closed"]::before { background: var(--brand-orange); }
.status-pill[data-status="ended"] { color: #72540b; background: #fff5cf; }
.status-pill[data-status="ended"]::before { background: var(--brand-yellow); }

.stage {
  height: calc(100dvh - var(--header-height) - (var(--page-space) * 2) - clamp(82px, 6.7vw, 108px) - clamp(14px, 1.2vw, 22px));
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: clamp(24px, 2.35vw, 46px);
  background:
    radial-gradient(circle at 96% 8%, rgba(91, 61, 246, 0.08) 0 9rem, transparent 9.1rem),
    radial-gradient(circle at 5% 96%, rgba(20, 200, 184, 0.05) 0 11rem, transparent 11.1rem),
    rgba(255, 255, 255, 0.96);
}

body[data-screen="waiting"] .stage {
  border-color: rgba(91, 61, 246, 0.1);
  background:
    radial-gradient(circle at -3% -8%, rgba(91, 61, 246, 0.1) 0 10rem, transparent 10.1rem),
    radial-gradient(circle at 103% 5%, rgba(91, 61, 246, 0.08) 0 12rem, transparent 12.1rem),
    radial-gradient(circle at 2% 108%, rgba(20, 200, 184, 0.08) 0 14rem, transparent 14.1rem),
    radial-gradient(circle at 94% 110%, rgba(91, 61, 246, 0.09) 0 18rem, transparent 18.1rem),
    linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(248, 247, 255, 0.96));
  box-shadow: 0 24px 70px rgba(57, 39, 133, 0.1);
}

#stage-content { flex: 1; min-height: 0; }

.lobby-stage {
  position: relative;
  height: 100%;
  min-height: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  text-align: center;
}

.lobby-glow {
  position: absolute;
  left: 50%;
  top: 48%;
  width: min(68vw, 1060px);
  aspect-ratio: 2.2;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(91, 61, 246, 0.14) 0%, rgba(91, 61, 246, 0.05) 40%, transparent 72%);
  filter: blur(18px);
  transform: translate(-50%, -50%);
  animation: lobby-breathe 4.8s ease-in-out infinite;
}

.lobby-content {
  position: relative;
  z-index: 2;
  width: min(1060px, 96%);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lobby-title {
  margin: 0 auto clamp(24px, 3vh, 42px);
  max-width: min(1080px, 94%);
  color: var(--text-primary);
  font-size: clamp(38px, 3.7vw, 66px);
  font-weight: 900;
  line-height: 1.12;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.lobby-join-options {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 2.2fr) minmax(270px, 1fr);
  align-items: stretch;
  gap: clamp(16px, 1.6vw, 26px);
}

.lobby-join-card {
  min-width: 0;
  min-height: clamp(250px, 27vh, 302px);
  padding: clamp(22px, 1.6vw, 28px);
  border: 1px solid rgba(91, 61, 246, 0.08);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.8);
  box-shadow: 0 24px 65px rgba(57, 39, 133, 0.1);
  backdrop-filter: blur(16px);
  display: flex;
  flex-direction: column;
}

.lobby-join-heading {
  display: flex;
  align-items: center;
  gap: 16px;
  text-align: left;
}

.lobby-join-heading h3 { margin: 0; color: #46435d; font-size: clamp(18px, 1.25vw, 22px); }
.lobby-join-heading p { margin: 3px 0 0; color: var(--text-secondary); font-size: clamp(13px, 0.95vw, 17px); }

.lobby-join-icon {
  width: 56px;
  height: 56px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  color: var(--brand-purple);
  border-radius: 16px;
  background: var(--brand-lavender);
}

.lobby-join-icon svg { width: 30px; height: 30px; }
.lobby-join-card-scan .lobby-join-icon { width: 48px; height: 48px; border-radius: 13px; }
.lobby-join-card-scan .lobby-join-icon svg { width: 27px; height: 27px; }

.lobby-qr-image-shell {
  flex: 1;
  min-height: 0;
  display: grid;
  place-items: center;
  padding-top: 12px;
}

.lobby-qr-image { display: block; width: min(100%, 210px); max-height: 200px; object-fit: contain; }
.lobby-qr-placeholder { max-width: 220px; margin: 0; color: var(--text-secondary); font-size: 15px; line-height: 1.5; }

.lobby-join-card-code .lobby-code-shell {
  margin: auto 0;
}

.lobby-code-shell {
  width: 100%;
}

.lobby-code-digits {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: clamp(8px, 0.8vw, 14px);
  white-space: nowrap;
}

.lobby-code-digit {
  height: clamp(78px, 11vh, 106px);
  display: grid;
  place-items: center;
  color: var(--brand-purple);
  border: 1px solid rgba(91, 61, 246, 0.09);
  border-radius: clamp(16px, 1.2vw, 22px);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(91, 61, 246, 0.075)),
    rgba(237, 233, 255, 0.52);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.92),
    0 10px 24px rgba(91, 61, 246, 0.06);
  font-size: clamp(54px, 4.4vw, 82px);
  font-variant-numeric: tabular-nums;
  font-weight: 900;
  line-height: 1;
  text-shadow: 0 8px 30px rgba(91, 61, 246, 0.13);
}

.participant-pill {
  width: max-content;
  min-height: 50px;
  margin: clamp(16px, 2vh, 26px) auto 0;
  padding: 10px 20px;
  gap: 11px;
  color: var(--brand-teal-deep);
  border: 1px solid rgba(20, 200, 184, 0.24);
  border-radius: 999px;
  background: rgba(220, 249, 245, 0.9);
  box-shadow: 0 10px 26px rgba(20, 200, 184, 0.09);
  font-size: clamp(17px, 1.25vw, 22px);
  font-weight: 750;
}

.participant-pill svg { width: 24px; height: 24px; }
.participant-pill strong { font-size: 1.25em; }

.stage-lead {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: clamp(12px, 1.7vh, 22px) 0 0;
  color: var(--text-secondary);
  font-size: clamp(16px, 1.15vw, 20px);
}

.lobby-decoration {
  position: absolute;
  z-index: 1;
  width: clamp(18px, 1.8vw, 32px);
  height: clamp(38px, 3.8vw, 66px);
  border-radius: 999px;
  pointer-events: none;
  opacity: 0.92;
  box-shadow: 0 12px 24px rgba(57, 39, 133, 0.09);
}

.lobby-decoration-purple {
  left: 12%;
  bottom: 21%;
  background: linear-gradient(160deg, #8169ff, var(--brand-purple));
  transform: rotate(-42deg);
}

.lobby-decoration-teal {
  left: 5%;
  top: 23%;
  width: clamp(64px, 6vw, 108px);
  height: clamp(24px, 2.5vw, 44px);
  background: linear-gradient(135deg, #74eadf, var(--brand-teal));
  transform: rotate(-23deg);
}

.lobby-decoration-orange {
  left: 20%;
  bottom: 12%;
  width: clamp(14px, 1.25vw, 22px);
  height: clamp(34px, 3vw, 52px);
  background: linear-gradient(160deg, #ffab6f, var(--brand-orange));
  transform: rotate(-36deg);
}

.lobby-decoration-yellow {
  right: 14%;
  bottom: 25%;
  width: clamp(16px, 1.45vw, 26px);
  height: clamp(40px, 3.3vw, 58px);
  background: linear-gradient(160deg, #ffdc69, var(--brand-yellow));
  transform: rotate(34deg);
}

.lobby-decoration-blue {
  right: 6%;
  bottom: 18%;
  width: clamp(20px, 1.9vw, 34px);
  height: clamp(42px, 4vw, 70px);
  background: linear-gradient(160deg, #765dff, #3e20d7);
  transform: rotate(-42deg);
}

.waiting-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--brand-orange);
  box-shadow: 0 0 0 5px rgba(255, 138, 61, 0.12);
  animation: waiting-pulse 2.2s ease-in-out infinite;
}

.question-stage { position: relative; height: 100%; min-height: 0; }
.question-meta { min-height: 34px; }
.question-badges { flex-wrap: wrap; gap: 10px; }
.question-type { color: var(--brand-purple-deep); background: var(--brand-lavender); }
.question-type.reveal { color: var(--brand-teal-deep); background: #def9f5; }
.response-progress { color: var(--brand-teal-deep); background: #def9f5; }

.question-corner {
  position: absolute;
  right: 0;
  top: 0;
  justify-content: flex-end;
  gap: clamp(12px, 1.4vw, 22px);
}

.question-position { color: var(--text-secondary); font-size: clamp(14px, 1vw, 17px); font-weight: 750; white-space: nowrap; }

.countdown {
  --timer-angle: 360deg;
  position: relative;
  flex: 0 0 auto;
  width: var(--timer-size);
  height: var(--timer-size);
  display: grid;
  place-items: center;
  color: #fff;
  border-radius: 50%;
  background: conic-gradient(var(--brand-teal) 0 var(--timer-angle), rgba(91, 61, 246, 0.13) var(--timer-angle) 360deg);
  box-shadow: 0 18px 38px rgba(91, 61, 246, 0.2);
  transition: background 240ms linear, transform 180ms ease;
}

.countdown::before {
  content: "";
  position: absolute;
  inset: clamp(8px, 0.75vw, 12px);
  border-radius: 50%;
  background: linear-gradient(145deg, #704fff 0%, #4a27e7 100%);
  box-shadow: inset 0 8px 20px rgba(255, 255, 255, 0.12);
}

.countdown-inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1px;
  flex-direction: column;
}

.countdown span { font-size: clamp(42px, 3.6vw, 62px); font-variant-numeric: tabular-nums; font-weight: 950; line-height: 1; }
.countdown.three-digits span { font-size: clamp(34px, 2.9vw, 50px); }
.countdown small { font-size: clamp(12px, 0.85vw, 15px); font-weight: 850; line-height: 1; }
.countdown.urgent { background: conic-gradient(var(--brand-orange) 0 var(--timer-angle), rgba(255, 138, 61, 0.14) var(--timer-angle) 360deg); transform: scale(1.025); }
.countdown.urgent::before { background: linear-gradient(145deg, #ff9650, #ef6f24); }

.question-heading {
  min-height: var(--timer-size);
  max-width: 100%;
  margin: clamp(10px, 1.2vh, 18px) 0 clamp(18px, 2.2vh, 32px);
  padding-right: calc(var(--timer-size) + clamp(118px, 9vw, 170px));
  display: flex;
  align-items: center;
  font-size: clamp(34px, 3.35vw, 62px);
  line-height: 1.18;
  letter-spacing: -0.035em;
}

.question-figure {
  margin: 0 0 clamp(12px, 1.4vh, 20px);
  display: flex;
  justify-content: center;
  overflow: hidden;
}

.question-figure img {
  display: block;
  max-width: min(100%, 64ch);
  max-height: min(30vh, 320px);
  object-fit: contain;
  background: var(--brand-bg);
  border: 2px solid #e2e0ee;
  border-radius: clamp(14px, 1.2vw, 22px);
}

.answer-breakdown .question-figure img { max-height: min(22vh, 210px); }

.answer-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(12px, 1.1vw, 20px);
}

.answer-card {
  position: relative;
  min-height: clamp(102px, 13vh, 166px);
  padding: clamp(16px, 1.55vw, 28px);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: clamp(13px, 1.25vw, 22px);
  overflow: hidden;
  border: 2px solid #e2e0ee;
  border-radius: clamp(17px, 1.35vw, 24px);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 12px 28px rgba(57, 39, 133, 0.055);
}

.answer-card::after {
  content: "";
  position: absolute;
  right: -46px;
  bottom: -58px;
  width: 112px;
  height: 112px;
  border-radius: 50%;
  background: rgba(91, 61, 246, 0.035);
  box-shadow: 0 0 0 20px rgba(91, 61, 246, 0.018);
}

.answer-letter {
  position: relative;
  z-index: 1;
  width: clamp(52px, 4.1vw, 70px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  color: #fff;
  border-radius: clamp(14px, 1vw, 18px);
  background: linear-gradient(145deg, #714fff, #4b25eb);
  box-shadow: 0 9px 20px rgba(91, 61, 246, 0.23);
  font-size: clamp(24px, 2vw, 34px);
  font-weight: 950;
}

.answer-card:nth-child(2) .answer-letter { color: #063e39; background: linear-gradient(145deg, #36ddcf, #0fbeaf); box-shadow: 0 9px 20px rgba(20, 200, 184, 0.2); }
.answer-card:nth-child(3) .answer-letter { color: #5a2605; background: linear-gradient(145deg, #ffae73, #ff8434); box-shadow: 0 9px 20px rgba(255, 138, 61, 0.2); }
.answer-card:nth-child(4) .answer-letter { color: #604600; background: linear-gradient(145deg, #ffd96d, #ffc12b); box-shadow: 0 9px 20px rgba(255, 200, 61, 0.2); }

.answer-text {
  position: relative;
  z-index: 1;
  min-width: 0;
  font-size: clamp(20px, 1.75vw, 31px);
  font-weight: 850;
  line-height: 1.35;
}

.many-options .answer-card { min-height: clamp(76px, 8.6vh, 112px); }
.many-options .answer-letter { width: clamp(44px, 3vw, 58px); font-size: clamp(20px, 1.5vw, 27px); }
.many-options .answer-text { font-size: clamp(18px, 1.35vw, 24px); }
.dense-options { gap: clamp(9px, 0.8vw, 14px); }
.dense-options .answer-card { min-height: clamp(52px, 6vh, 76px); padding-top: 9px; padding-bottom: 9px; }
.dense-options .answer-letter { width: clamp(38px, 2.6vw, 50px); }
.dense-options .answer-text { font-size: clamp(17px, 1.15vw, 21px); }

.ordering-grid { grid-template-columns: 1fr; }
.ordering-grid .answer-card { min-height: clamp(64px, 7.8vh, 96px); }

.stage.ordering-stage-active { padding-block: clamp(18px, 2vh, 28px); }

.ordering-stage-adaptive {
  --timer-size: clamp(88px, 10vh, 112px);
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
}

.ordering-stage-adaptive .question-heading {
  min-height: var(--timer-size);
  margin: clamp(6px, 1vh, 12px) 0 clamp(10px, 1.3vh, 18px);
  font-size: clamp(28px, 3vw, 52px);
}

.ordering-stage-adaptive .ordering-grid {
  min-height: 0;
  height: 100%;
  grid-template-rows: repeat(var(--option-count), minmax(0, 1fr));
  gap: clamp(6px, 0.8vh, 12px);
}

.ordering-stage-adaptive .answer-card {
  min-height: 0;
  height: 100%;
  padding: clamp(5px, 0.8vh, 12px) clamp(14px, 1.4vw, 24px);
}

.ordering-stage-adaptive .answer-letter {
  width: clamp(32px, 4.8vh, 50px);
  border-radius: clamp(10px, 1.4vh, 15px);
  font-size: clamp(18px, 2.8vh, 27px);
}

.ordering-stage-adaptive .answer-text { font-size: clamp(16px, 2.3vh, 25px); }

.ordering-stage-adaptive .dense-options .answer-card { padding-block: 2px; }
.ordering-stage-adaptive .dense-options .answer-letter { width: clamp(26px, 3.2vh, 34px); font-size: clamp(16px, 2vh, 21px); }

.text-answer-prompt,
.reference-answer-panel {
  min-height: clamp(150px, 21vh, 238px);
  padding: clamp(24px, 2.6vw, 48px);
  justify-content: center;
  gap: 16px;
  color: var(--brand-purple-deep);
  border: 2px solid rgba(91, 61, 246, 0.14);
  border-radius: clamp(18px, 1.4vw, 24px);
  background: linear-gradient(135deg, rgba(237, 233, 255, 0.95), rgba(246, 244, 255, 0.88));
  font-size: clamp(22px, 2.2vw, 36px);
  font-weight: 850;
  line-height: 1.45;
  text-align: center;
}

.prompt-mark,
.reference-answer-icon {
  flex: 0 0 auto;
  width: clamp(48px, 4vw, 66px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  color: #fff;
  border-radius: 18px;
  background: var(--brand-purple);
}

.prompt-mark svg,
.reference-answer-icon svg { width: 54%; height: 54%; stroke-width: 2.7; }

.answer-breakdown { min-width: 0; }

.result-question {
  min-height: auto;
  margin: clamp(14px, 1.5vh, 22px) 0 clamp(18px, 2vh, 28px);
  padding: 0;
  font-size: clamp(28px, 2.7vw, 50px);
}

.result-grid { grid-template-columns: 1fr; gap: clamp(9px, 0.8vw, 14px); }
.result-grid .answer-card { min-height: clamp(64px, 7.7vh, 96px); padding-top: 12px; padding-bottom: 12px; }
.result-grid .answer-letter { width: clamp(42px, 3vw, 56px); font-size: clamp(19px, 1.5vw, 26px); }
.result-grid .answer-text { font-size: clamp(18px, 1.35vw, 24px); }
.answer-card.correct { border-color: rgba(20, 200, 184, 0.6); background: #effcfa; }
.correct .answer-letter { color: #063e39; background: var(--brand-teal); box-shadow: 0 9px 20px rgba(20, 200, 184, 0.2); }
.correct-mark { position: relative; z-index: 1; display: grid; place-items: center; width: 28px; height: 28px; color: #fff; border-radius: 50%; background: var(--brand-teal); }
.correct-mark svg { width: 18px; height: 18px; stroke-width: 3; }
.answer-count { position: relative; z-index: 1; min-width: 66px; color: var(--text-primary); text-align: right; font-size: clamp(20px, 1.8vw, 30px); font-variant-numeric: tabular-nums; font-weight: 950; }
.answer-count small { margin-left: 3px; color: var(--text-secondary); font-size: 0.5em; font-weight: 800; }
.answer-bar { position: absolute; z-index: 2; inset: auto 0 0; height: 6px; background: var(--brand-purple); transform-origin: left center; transition: transform 300ms ease; }
.correct .answer-bar { background: var(--brand-teal); }

.reference-answer-panel {
  position: relative;
  display: grid;
  place-content: center;
  gap: 8px;
}

.reference-answer-panel p { margin: 0; }
.reference-answer-panel .summary-label { color: var(--brand-teal-deep); font-size: clamp(14px, 1vw, 17px); }
.reference-answer-panel > p:nth-of-type(2) { color: var(--text-primary); font-size: clamp(26px, 2.5vw, 44px); }
.reference-answer-icon { margin: 0 auto 6px; background: var(--brand-teal); }
.result-totals { margin-top: 16px; color: var(--text-secondary); font-size: clamp(16px, 1.2vw, 21px); }
.result-totals strong { color: var(--brand-teal-deep); font-variant-numeric: tabular-nums; }
.result-totals span { padding: 0 8px; }
.ordered-answer-panel { min-height: 0; place-content: center; text-align: left; }
.ordered-answer-panel .summary-label { text-align: center; }
.ordered-answer-list { display: grid; width: min(100%, 920px); gap: clamp(8px, 1vh, 14px); margin: 8px auto 0; padding: 0; list-style: none; }
.ordered-answer-list li { display: flex; align-items: center; gap: clamp(12px, 1vw, 18px); min-width: 0; padding: clamp(10px, 1vh, 16px) clamp(12px, 1.3vw, 22px); border: 1px solid rgba(91, 61, 246, 0.18); border-radius: 14px; background: rgba(255, 255, 255, 0.72); color: var(--text-primary); text-align: left; font-size: clamp(18px, 1.7vw, 30px); font-weight: 800; line-height: 1.35; }
.ordered-answer-index { display: grid; flex: 0 0 auto; place-items: center; width: clamp(34px, 2.8vw, 48px); aspect-ratio: 1; border-radius: 11px; background: var(--brand-lavender); color: var(--brand-purple-deep); font-size: 0.85em; font-weight: 900; }
.ordered-answer-text { min-width: 0; overflow-wrap: anywhere; }
.ordered-answer-empty { margin: 0; text-align: center; font-size: clamp(18px, 1.4vw, 24px); }
.answer-reveal-stage .reference-answer-panel.ordered-answer-panel { flex: 0 1 auto; min-height: 0; }

.panel-inset {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: clamp(18px, 1.5vw, 26px);
  background: rgba(249, 249, 253, 0.88);
}

.panel-inset {
  min-height: 0;
  padding: clamp(20px, 1.8vw, 30px);
  overflow: hidden;
}

.leaderboard.panel-inset { display: flex; flex-direction: column; }

.leaderboard-heading { justify-content: space-between; gap: 20px; }
.leaderboard-heading h2 { gap: 10px; margin: 0; font-size: clamp(22px, 1.65vw, 30px); }
.leaderboard-heading > span { color: var(--text-secondary); font-size: clamp(13px, 0.9vw, 16px); font-weight: 700; }
.heading-icon { width: 34px; height: 34px; display: grid; place-items: center; color: var(--brand-purple); border-radius: 10px; background: var(--brand-lavender); }
.heading-icon svg { width: 21px; height: 21px; stroke-width: 2.4; }
.leaderboard-list,
.final-ranking-list { display: grid; gap: 8px; }
.leaderboard-list { flex: 1; min-height: 0; margin-top: 18px; overflow: auto; padding-right: 3px; }

.leaderboard-row {
  min-height: 52px;
  padding: 8px 12px;
  display: grid;
  grid-template-columns: 34px 38px minmax(0, 1fr) auto;
  gap: 10px;
  border: 1px solid rgba(227, 226, 239, 0.78);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.95);
}

.leaderboard-row.compact { min-height: 50px; }
.rank { color: var(--brand-purple); font-variant-numeric: tabular-nums; font-weight: 950; text-align: center; }
.rank.first { padding: 4px 0; color: #6a4c00; background: var(--brand-yellow); border-radius: 9px; }
.participant-avatar { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; overflow: hidden; }
.participant-avatar img,
.podium-avatar img { width: 100%; height: 100%; display: block; object-fit: cover; }
.person-name { min-width: 0; overflow: hidden; font-size: clamp(15px, 1vw, 17px); font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.person-score { color: var(--brand-purple-deep); font-size: clamp(15px, 1.05vw, 18px); font-variant-numeric: tabular-nums; font-weight: 900; white-space: nowrap; }
.person-score small { margin-left: 2px; color: var(--text-secondary); font-size: 0.7em; }
.empty-state { margin: 0; padding: 48px 0; color: var(--text-secondary); text-align: center; line-height: 1.5; }



body[data-presentation="true"][data-screen="ended"]:has(.awards-stage) .stage {
  background: radial-gradient(ellipse at 50% 38%, #6542ed 0%, #4725b8 42%, #281365 100%);
  overflow: hidden;
}
body[data-presentation="true"][data-screen="ended"]:has(.awards-stage) .presentation-footer,
body[data-presentation="true"][data-screen="ended"]:has(.awards-stage) .presentation-footer strong { color: #ddd5ff; }
.awards-stage { position: relative; height: 100%; min-height: 0; width: 100%; color: #fff; isolation: isolate; overflow: clip; }
.awards-stage::before { content: ''; position: absolute; z-index: -1; inset: 12% 3% 7%; border: 1px solid #ffffff12; border-radius: 50%; transform: rotate(-12deg); pointer-events: none; }
.awards-stage::after { content: ''; position: absolute; z-index: -1; left: 3%; right: 3%; bottom: 4%; height: 22%; background: radial-gradient(ellipse, #aa88ff38, transparent 70%); pointer-events: none; }
.awards-heading { position: absolute; inset: 0; pointer-events: none; z-index: 6; }
.celebration-kicker { position: absolute; top: 0; left: 0; margin: 0; color: #ddd5ff; font-size: clamp(14px, 1.1vw, 26px); font-weight: 700; }
.awards-heading h2 { position: absolute; top: 26%; left: 50%; width: 90%; margin: 0; text-align: center; transform: translateX(-50%); font-size: clamp(48px, 6vw, 130px); line-height: 1.25; letter-spacing: -.035em; text-wrap: balance; transition: opacity var(--motion-answerEmphasis) var(--motion-easing); }
.awards-heading [data-award-status] { position: absolute; bottom: 6%; left: 50%; width: 90%; margin: 0; transform: translateX(-50%); color: #fff1b4; text-align: center; font-size: clamp(20px, 2vw, 44px); font-weight: 750; }
.awards-stage:not([data-award-phase="final-intro"]) .awards-heading h2 { opacity: 0; }
.awards-stage:is([data-award-phase="podium-focus"], [data-award-phase="podium-rank-reveal"], [data-award-phase="podium-participant-reveal"], [data-award-phase="third-place"], [data-award-phase="second-place"], [data-award-phase="first-place"]) [data-award-status] { width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.awards-stage[data-award-composition="ranking"] [data-award-status] { bottom: auto; top: 43%; font-size: clamp(18px, 1.4vw, 30px); }
.awards-stage[data-award-phase="full-ranking"] [data-award-status] { width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.award-controls { position: absolute; z-index: 8; top: 0; right: 0; }
.award-controls .button-quiet { min-height: 40px; padding: 8px 16px; color: #fff; background: #ffffff16; border-color: #ffffff40; }
.award-controls .button-quiet:hover { background: #ffffff28; }
.awards-stage .podium { position: absolute; inset: 0; width: 100%; height: 100%; }
.award-winner {
  --winner-x: 50%; --winner-y: 9%; --winner-scale: 1.1; --winner-accent: #ffc83d; --winner-light: #fff2ae;
  position: absolute; left: var(--winner-x); top: var(--winner-y); width: 46%; height: 82%;
  transform: translateX(-50%) scale(var(--winner-scale)); transform-origin: 50% 0;
  color: #fff; text-align: center; z-index: 4;
  transition: left var(--motion-awardReposition) var(--motion-easing), top var(--motion-awardComplete) var(--motion-easing), transform var(--motion-awardComplete) var(--motion-easing), opacity var(--motion-answerEmphasis) var(--motion-easing), filter var(--motion-awardReposition) var(--motion-easing);
}
.award-winner[data-place="2"] { --winner-x: 21%; --winner-y: 37%; --winner-scale: .65; --winner-accent: #73b0ff; --winner-light: #d0e6ff; z-index: 2; }
.award-winner[data-place="3"] { --winner-x: 79%; --winner-y: 43%; --winner-scale: .56; --winner-accent: #b89cff; --winner-light: #e2d5ff; z-index: 1; }
.awards-playing .award-winner { opacity: 0; visibility: hidden; }
.awards-playing .award-winner.award-rank-visible { opacity: .48; visibility: visible; filter: saturate(.7); }
.awards-playing .award-winner.award-focus { --winner-x: 50%; --winner-y: 6%; --winner-scale: 1; z-index: 5; }
.awards-playing .award-winner.award-focus[data-place="1"] { --winner-y: 9%; --winner-scale: 1.1; }
.awards-playing .award-winner.award-focus.award-rank-visible { opacity: 1; filter: none; }
.winner-halo { position: absolute; z-index: -2; inset: 3% -14% 3%; background: radial-gradient(ellipse, color-mix(in srgb, var(--winner-accent) 25%, transparent), transparent 67%); opacity: .6; transition: opacity var(--motion-awardReposition) var(--motion-easing); }
.award-focus .winner-halo { opacity: 1; }
.winner-ordinal { position: absolute; z-index: -1; inset: 6% 0 auto; color: var(--winner-accent); font-size: clamp(280px, 49vh, 720px); line-height: 1; font-weight: 950; opacity: .13; }
.winner-position { position: absolute; top: 4%; left: 0; right: 0; display: flex; align-items: center; justify-content: center; flex-direction: column; }
.awards-playing .award-rank-visible .winner-position { animation: award-person-in var(--motion-answerEmphasis) var(--motion-easing) both; }
.podium-position { color: var(--winner-light); font-size: clamp(28px, 2.4vw, 60px); line-height: 1.2; font-weight: 800; }
.podium-score { display: block; margin-top: 10px; font-size: clamp(42px, 4.3vw, 100px); line-height: 1; font-variant-numeric: tabular-nums; }
.podium-score small { margin-left: 8px; font-size: .35em; color: var(--winner-light); }
.winner-mystery { position: absolute; top: 30%; left: 50%; display: grid; place-items: center; width: clamp(150px, 23vh, 340px); aspect-ratio: 1; border: 2px solid color-mix(in srgb, var(--winner-accent) 60%, transparent); border-radius: 50%; background: #ffffff08; color: var(--winner-light); font-size: clamp(80px, 11vh, 160px); transform: translateX(-50%); }
.award-person-visible .winner-mystery, .awards-stage:not(.awards-playing) .winner-mystery { visibility: hidden; }
.podium-person { position: absolute; top: 30%; left: -5%; right: -5%; display: flex; align-items: center; flex-direction: column; }
.podium-person > * { flex-shrink: 0; }
.podium-avatar { display: grid; place-items: center; width: clamp(150px, 23vh, 340px); aspect-ratio: 1; border: clamp(5px, .65vh, 10px) solid var(--winner-accent); border-radius: 50%; box-shadow: 0 20px 65px #15063c66, 0 0 0 12px #ffffff0c; overflow: hidden; }
.award-winner strong { display: block; max-width: 100%; margin-top: clamp(24px, 3vh, 46px); color: #fff; font-size: clamp(32px, 3.2vw, 78px); line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.podium-tie { margin-top: 12px; padding: 4px 14px; color: var(--winner-light); border: 1px solid #ffffff38; border-radius: 999px; font-size: clamp(18px, 1.4vw, 32px); }
.awards-playing .podium-person { visibility: hidden; opacity: 0; }
.awards-playing .award-person-visible .podium-person { visibility: visible; opacity: 1; animation: award-person-in var(--motion-awardParticipant) var(--motion-easing) both; }
.winner-plinth { position: absolute; z-index: -1; bottom: 3%; left: 6%; right: 6%; height: 9%; border-top: 3px solid var(--winner-accent); border-radius: 50%; background: radial-gradient(ellipse at 50% 0%, color-mix(in srgb, var(--winner-accent) 28%, transparent), transparent 70%); box-shadow: 0 -15px 60px color-mix(in srgb, var(--winner-accent) 15%, transparent); }
.podium-crown { position: absolute; top: -7%; left: 50%; width: clamp(68px, 8vh, 128px); height: clamp(68px, 8vh, 128px); color: var(--brand-yellow); transform: translateX(-50%); }
.podium-crown svg { width: 100%; height: 100%; }
.awards-playing .podium-crown { visibility: hidden; }
.awards-playing .award-person-visible .podium-crown { visibility: visible; animation: award-crown-in var(--motion-awardParticipant) var(--motion-easing) both; }
.awards-stage:is([data-award-phase="celebration"], [data-award-phase="awards-complete"]) .award-winner.award-rank-visible { opacity: 1; filter: none; }
.awards-stage[data-award-phase="celebration"] .award-winner[data-place="1"] .winner-halo { animation: award-halo-in var(--motion-awardCelebration) var(--motion-easing) both; }
.awards-stage[data-award-composition="ranking"] .award-winner { --winner-y: 5%; --winner-scale: .46; opacity: 1; filter: none; }
.awards-stage[data-award-composition="ranking"] .award-winner[data-place="2"] { --winner-x: 24%; --winner-y: 8%; --winner-scale: .36; }
.awards-stage[data-award-composition="ranking"] .award-winner[data-place="3"] { --winner-x: 76%; --winner-y: 11%; --winner-scale: .33; }
.awards-stage[data-award-composition="ranking"] .podium[data-podium-count="1"] .award-winner { --winner-x: 50%; }
.awards-stage[data-award-composition="ranking"] .podium[data-podium-count="2"] .award-winner[data-place="2"] { --winner-x: 20%; }
.awards-stage[data-award-settled="true"] .award-winner { transition: none; }
.award-confetti { position: absolute; inset: 5% 2% 4%; z-index: 7; pointer-events: none; visibility: hidden; }
.award-confetti i { position: absolute; width: clamp(8px, .6vw, 15px); height: clamp(18px, 1.3vw, 30px); border-radius: 3px; background: var(--brand-purple); }
.award-confetti i:nth-child(3n) { background: var(--brand-yellow); }
.award-confetti i:nth-child(3n + 1) { background: #73b0ff; }
.award-confetti i:nth-child(1) { left: 6%; top: 12%; }
.award-confetti i:nth-child(2) { left: 17%; top: 39%; }
.award-confetti i:nth-child(3) { left: 38%; top: 7%; }
.award-confetti i:nth-child(4) { right: 7%; top: 18%; }
.award-confetti i:nth-child(5) { right: 18%; top: 42%; }
.award-confetti i:nth-child(6) { left: 8%; top: 65%; }
.award-confetti i:nth-child(7) { right: 4%; top: 69%; }
.award-confetti i:nth-child(8) { left: 30%; top: 55%; }
.award-confetti i:nth-child(9) { right: 31%; top: 58%; }
.award-confetti i:nth-child(10) { left: 47%; top: 31%; }
.award-confetti i:nth-child(11) { left: 17%; top: 79%; }
.award-confetti i:nth-child(12) { right: 16%; top: 84%; }
[data-award-phase="celebration"] .award-confetti { visibility: visible; }
[data-award-phase="celebration"] .award-confetti i { animation: award-confetti-in var(--motion-awardCelebration) var(--motion-easing) both; }
.awards-stage .ranking-table { position: absolute; top: 47%; left: 2%; right: 2%; bottom: 1%; display: flex; flex-direction: column; gap: 14px; min-height: 0; }
.awards-playing .ranking-table { visibility: hidden; opacity: 0; }
.awards-playing[data-award-phase="full-ranking"] .ranking-table { visibility: visible; opacity: 1; animation: award-ranking-in var(--motion-awardRanking) var(--motion-easing) both; }
.awards-ranking-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 0 14px; }
.awards-ranking-heading h3 { margin: 0; font-size: clamp(22px, 2vw, 48px); }
.awards-ranking-heading p { margin: 0; color: #d7caff; font-size: clamp(14px, 1.1vw, 26px); }
.final-ranking-list { margin: 0; padding: 0 14px; min-height: 0; overflow: auto; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-content: start; gap: 0 clamp(28px, 4vw, 100px); list-style: none; overscroll-behavior: contain; }
.final-rank-entry { display: grid; align-items: center; grid-template-columns: clamp(40px, 3.5vw, 76px) clamp(36px, 4vh, 58px) minmax(0, 1fr) auto; gap: clamp(10px, 1vw, 24px); min-height: clamp(64px, 8vh, 116px); padding: 10px 8px; border-bottom: 1px solid #ffffff26; }
.final-rank-entry .rank { color: #cdbfff; font-size: clamp(26px, 2.3vw, 54px); }
.final-rank-entry .participant-avatar { width: clamp(36px, 4vh, 58px); height: clamp(36px, 4vh, 58px); font-size: clamp(16px, 1.5vw, 30px); }
.final-rank-entry .person-name { color: #fff; font-size: clamp(20px, 1.7vw, 40px); }
.final-rank-entry .person-score { color: #fff; font-size: clamp(24px, 2vw, 48px); }
.final-rank-entry .person-score small { color: #d7caff; }
.final-rank-entry[data-top-place] { background: linear-gradient(90deg, #ffffff0e, transparent); }
.final-rank-entry[data-top-place] .rank { color: var(--brand-yellow); }
.final-rank-entry[data-top-place="1"] .person-name, .final-rank-entry[data-top-place="1"] .person-score { color: #fff1b4; }
.award-row-enter { animation: award-ranking-in var(--motion-awardRanking) var(--motion-easing) var(--row-delay) both; }
.awards-stage[data-has-podium="false"] .empty-state { position: absolute; top: 10%; left: 0; right: 0; color: #fff1b4; font-size: clamp(24px, 3vw, 62px); padding: 0; }
.awards-stage[data-has-podium="false"] .ranking-table { top: 35%; }
@keyframes award-person-in { from { opacity: 0; transform: translateY(26px) scale(.9); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes award-crown-in { from { opacity: 0; translate: 0 -20px; } to { opacity: 1; translate: 0 0; } }
@keyframes award-ranking-in { from { opacity: 0; translate: 0 30px; } to { opacity: 1; translate: 0 0; } }
@keyframes award-halo-in { 0% { opacity: .6; scale: .85; } 40% { opacity: 1; scale: 1.12; } 100% { opacity: 1; scale: 1; } }
@keyframes award-confetti-in { 0% { opacity: 0; transform: translateY(-40px) rotate(-20deg); } 20% { opacity: 1; } 100% { opacity: 0; transform: translateY(100px) rotate(110deg); } }
@media (max-width: 900px) {
  .awards-heading h2 { font-size: clamp(32px, 7vw, 64px); }
  .celebration-kicker { font-size: 12px; }
  .award-winner { width: 70%; }
  .podium-position { font-size: 24px; }
  .podium-score { font-size: 36px; }
  .podium-avatar, .winner-mystery { width: clamp(90px, 19vw, 150px); }
  .podium-avatar { font-size: 48px; }
  .award-winner strong { font-size: 24px; }
  .final-ranking-list { grid-template-columns: 1fr; }
  .awards-stage { min-height: 500px; }
}

[hidden] { display: none !important; }

@keyframes lobby-breathe {
  0%, 100% { opacity: 0.68; transform: translate(-50%, -50%) scale(0.94); }
  50% { opacity: 1; transform: translate(-50%, -50%) scale(1.04); }
}

@keyframes waiting-pulse {
  0%, 100% { opacity: 0.56; transform: scale(0.86); }
  50% { opacity: 1; transform: scale(1.08); }
}

@keyframes metric-pop {
  0% { opacity: 0.45; transform: scale(0.82); }
  70% { transform: scale(1.08); }
  100% { opacity: 1; transform: scale(1); }
}

.metric-pop { display: inline-block; animation: metric-pop 300ms ease-out; }

@media (max-width: 1240px) {
  :root { --timer-size: clamp(100px, 8vw, 118px); }
  .start-screen { grid-template-columns: minmax(0, 1fr) minmax(410px, 0.74fr); gap: 44px; }
  .start-copy h1 { font-size: clamp(52px, 5.2vw, 68px); }
  .audience-scene { width: 88%; margin-left: 20px; }
  .summary-card { padding-left: 16px; padding-right: 16px; }
}

@media (max-height: 820px) and (min-width: 900px) {
  :root { --header-height: 68px; --page-space: 16px; --timer-size: 104px; }
  .app-bar { padding-top: 8px; padding-bottom: 8px; }
  .brand-logo { height: 42px; }
  .start-visual { min-height: calc(100dvh - var(--header-height) - (var(--page-space) * 2)); }
  .start-copy h1 { font-size: clamp(48px, 4.6vw, 62px); }
  .start-copy > p { margin-top: 18px; font-size: clamp(17px, 1.3vw, 20px); }
  .audience-scene { height: 190px; margin-top: 22px; }
  .speech-bubble-teal { width: 74px; height: 48px; }
  .speech-bubble-orange { width: 58px; height: 49px; }
  .start-form { padding: 30px; }
  .field { gap: 10px; }
  .code-input-shell { min-height: 62px; }
  .button-primary { min-height: 56px; }
  .summary-card { min-height: 78px; padding-top: 10px; padding-bottom: 10px; }
  .stage { height: calc(100dvh - var(--header-height) - (var(--page-space) * 2) - 78px - clamp(14px, 1.2vw, 22px)); min-height: 0; padding: 24px 28px; }
  .display-body .stage { height: calc(var(--page-available) - 78px - clamp(14px, 1.2vw, 22px)); }
  .lobby-title { margin-bottom: 20px; font-size: clamp(32px, 3.2vw, 48px); }
  .lobby-join-card { min-height: 246px; padding: 20px; }
  .lobby-code-digit { height: clamp(70px, 11vh, 90px); font-size: clamp(48px, 4vw, 68px); }
  .lobby-qr-image { max-height: 164px; }
  .participant-pill { min-height: 44px; margin-top: 18px; padding-top: 7px; padding-bottom: 7px; }
  .stage-lead { margin-top: 16px; }
  .question-heading { margin-top: 8px; margin-bottom: 18px; font-size: clamp(32px, 3vw, 46px); }
  .answer-card { min-height: clamp(92px, 12vh, 112px); }
  .answer-letter { width: clamp(48px, 3.7vw, 58px); }
  .result-question { margin: 12px 0 16px; min-height: auto; padding: 0; font-size: clamp(27px, 2.5vw, 38px); }
  .result-grid .answer-card { min-height: 62px; }
  .leaderboard-list { margin-top: 12px; }
  .celebration-kicker { margin-bottom: 6px; }
}

@media (max-width: 900px) {
  html,
  body { min-width: 320px; }
  :root { --header-height: 66px; --page-space: 16px; }
  .app-bar { padding: 9px 16px; }
  .brand-logo { width: 116px; height: 40px; }
  .brand-divider,
  .product-label,
  .connection-status,
  .display-creator-link { display: none; }
  .sound-control { padding: 8px; }
  .sound-control-label { display: none; }
  .button-quiet { padding: 8px 12px; font-size: 13px; }
  .start-screen { min-height: auto; grid-template-columns: 1fr; gap: 32px; padding: 36px 0 64px; }
  .start-visual { min-height: auto; }
  .start-copy h1 { font-size: clamp(44px, 10vw, 66px); }
  .audience-scene { width: min(560px, 92%); height: 230px; margin: 36px auto 0; }
  .start-form { width: 100%; justify-self: stretch; }
  .display-screen { gap: 14px; }
  .session-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stage { height: auto; min-height: auto; padding: 24px 18px; }
  .display-body .start-screen,
  .display-body .start-visual { min-height: auto; }
  .display-body .stage { height: auto; }
  .lobby-join-options { grid-template-columns: 1fr; max-width: 650px; }
  .lobby-join-card { min-height: 220px; }
  .lobby-join-card-scan { min-height: 275px; }
  .lobby-qr-image { max-height: 190px; }
  #stage-content,
  .lobby-stage,
  .question-stage { min-height: 520px; }
  .question-corner { position: static; margin-top: 18px; justify-content: space-between; }
  .question-heading { min-height: auto; padding-right: 0; margin: 24px 0; }
  .stage.ordering-stage-active { padding-block: 24px; }
  .ordering-stage-adaptive { display: block; min-height: 0; }
  .ordering-stage-adaptive .question-heading { min-height: auto; margin: 24px 0; }
  .ordering-stage-adaptive .ordering-grid { height: auto; grid-template-rows: none; }
  .ordering-stage-adaptive .answer-card { min-height: 64px; }
  .answer-grid { grid-template-columns: 1fr; }
  .leaderboard-list { max-height: 440px; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

.audience-layout { grid-template-columns: 1fr; }
.audience-note { color: #64748b; margin: 16px 0; }
.audience-distribution { max-height: 58vh; overflow: auto; padding: 8px; }
.audience-bar-row { margin: 20px 0; }
.audience-bar-row > div:first-child { display: flex; justify-content: space-between; gap: 24px; font-size: clamp(18px, 2vw, 32px); }
.audience-track { height: 18px; border-radius: 12px; background: #ede9fe; margin-top: 10px; overflow: hidden; }
.audience-track i { display: block; height: 100%; background: #5b3df6; border-radius: inherit; }
.word-cloud { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 18px 28px; max-height: 55vh; overflow: auto; padding: 24px; }
.word-cloud span { color: #5b3df6; overflow-wrap: anywhere; }
.word-cloud span:nth-child(3n) { color: #087d75; }
.word-cloud small { font-size: 14px; padding-left: 6px; }
.scale-average { font-size: 32px; color: #64748b; }
.scale-average strong { font-size: 56px; color: #5b3df6; }
.open-responses { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; max-height: 56vh; overflow: auto; }
.open-responses article { padding: 24px; border-radius: 16px; background: #f3f0ff; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 240px; overflow: auto; font-size: 22px; }
.plain-completion { text-align: center; padding: 10vh 24px; }
.plain-completion h2 { font-size: clamp(36px, 5vw, 80px); }
.plain-completion p { font-size: 24px; color: #64748b; }

[data-live-results] .audience-track i { width: 100%; transform: scaleX(0); transform-origin: left; transition: transform var(--motion-number, 400ms) var(--motion-easing, cubic-bezier(.22,1,.36,1)); }
.live-word-cloud { display: block; position: relative; height: clamp(240px, 38vh, 650px); max-height: none; padding: 0; overflow: hidden; }
.live-word-cloud span { position: absolute; left: 0; top: 0; white-space: nowrap; line-height: 1.15; text-align: center; font-weight: 700; transition: transform 320ms ease-out, font-size 320ms ease-out; animation: word-appear var(--motion-enter, 320ms) var(--motion-easing, cubic-bezier(.22,1,.36,1)); }
[data-live-results] b, [data-live-results] strong { font-variant-numeric: tabular-nums; }
[data-type="scale"] .audience-distribution { display: flex; gap: 16px; overflow: visible; }
[data-type="scale"] .audience-bar-row { flex: 1; min-width: 0; margin: 12px 0; }
[data-type="scale"] .audience-bar-row > div:first-child { flex-direction: column; align-items: center; gap: 4px; font-size: clamp(18px, 1.6vw, 28px); }
[data-type="scale"] .audience-bar-row strong { font-size: clamp(12px, 1vw, 20px); }
[data-type="scale"] .audience-track { height: clamp(100px, 18vh, 200px); }
[data-type="scale"] .audience-track i { transform: scaleY(0); transform-origin: bottom; background: #009e8f; }
@keyframes word-appear { from { opacity: 0; } to { opacity: 1; } }
.presentation-control { margin: 20px; padding: 16px; border: 1px solid #ddd6fe; border-radius: 16px; background: #fff; }
.presentation-control article { border-top: 1px solid #ddd6fe; padding: 12px; }
.presentation-control button { margin: 6px; }
.presentation-footer { display: none; }
.presenter-controls { justify-self: center; max-width: 100%; padding: 12px 18px; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); }
.presenter-toolbar { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 12px; }
.presenter-toolbar .button-primary { width: auto; min-height: 44px; padding: 10px 24px; font-size: 16px; }
.presenter-controls .presentation-control { margin: 12px 0 0; padding: 12px; }
.presenter-controls .presentation-control summary,
.presenter-settings summary { cursor: pointer; font-weight: 750; }
.presenter-controls [data-controls] { max-height: 40vh; overflow: auto; }
.presenter-controls .field-error { margin: 10px 0 0; }
body[data-screen="waiting"] .presenter-controls { position: fixed; z-index: 10; right: var(--page-space); bottom: 16px; box-shadow: var(--card-shadow); }
.presenter-feedback { margin: 10px 0 0; color: var(--text-secondary); font-size: 14px; }
.presenter-settings { position: relative; }
.presenter-settings summary { padding: 12px; }
.presenter-settings-content { position: absolute; right: 0; bottom: calc(100% + 16px); min-width: 230px; padding: 16px; display: grid; gap: 12px; color: var(--text-primary); border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: var(--card-shadow); }
.presenter-settings-content .sound-control-label { display: inline; }
.presenter-settings-content .connection-status { display: flex; }
.presenter-settings-content .sound-control { justify-content: space-between; }
.presenter-toggle { position: fixed; z-index: 12; inset: auto 12px 16px auto; width: max-content; height: 44px; max-height: 44px; padding: 10px 14px; white-space: nowrap; font-size: 13px; color: #fff; border: 1px solid rgba(255,255,255,.25); border-radius: 12px; background: rgba(22,21,47,.24); opacity: .45; cursor: pointer; transition: opacity 180ms ease; }
.presenter-toggle:hover,
.presenter-toggle:focus-visible { opacity: 1; }

body[data-presentation="true"] {
  --timer-size: clamp(80px, 10vh, 132px);
  min-width: 320px;
  background: radial-gradient(ellipse at 10% 100%, rgba(20,200,184,.16), transparent 55%), radial-gradient(ellipse at 95% 0, rgba(147,123,255,.35), transparent 60%), #4324d8;
}
body[data-presentation="true"] .app-bar,
body[data-presentation="true"] .session-summary { display: none; }
body[data-presentation="true"]::before,
body[data-presentation="true"]::after { display: none; }
body[data-presentation="true"] main { width: 100%; max-width: none; margin: 0; padding: 0; }
body[data-presentation="true"] .display-screen { width: 100%; grid-template-columns: minmax(0, 1fr); gap: 0; }
body[data-presentation="true"] .stage {
  width: 100%;
  min-width: 0;
  height: 100dvh;
  min-height: 0;
  padding: clamp(24px, 3.5vh, 48px) clamp(28px, 4vw, 80px) 84px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow: auto;
}
body[data-presentation="true"] #stage-content { outline: none; min-height: 0; }
body[data-presentation="true"] .presentation-footer { position: fixed; z-index: 8; bottom: 28px; left: 32px; right: 128px; display: flex; align-items: center; justify-content: space-between; gap: 16px; color: rgba(255,255,255,.75); font-size: clamp(14px, 1.1vw, 22px); }
body[data-presentation="true"] .presentation-footer img { width: 96px; height: auto; object-fit: contain; }
body[data-presentation="true"] .presentation-logo-color { display: none; }
body[data-presentation="true"]:is([data-screen="revealed"], [data-screen="ended"], [data-phase="reveal"]):not([data-phase="leaderboard"]):not(:has(.audience-layout, .awards-stage)) .presentation-logo-inverse { display: none; }
body[data-presentation="true"]:is([data-screen="revealed"], [data-screen="ended"], [data-phase="reveal"]):not([data-phase="leaderboard"]):not(:has(.audience-layout, .awards-stage)) .presentation-logo-color { display: block; }
body[data-presentation="true"] .presentation-footer strong { margin-left: 8px; color: #fff; letter-spacing: .12em; font-variant-numeric: tabular-nums; }
body[data-presentation="true"] .question-stage { display: flex; flex-direction: column; gap: clamp(16px, 2.4vh, 32px); min-height: 100%; height: auto; }
body[data-presentation="true"] .question-meta { display: flex; align-items: center; justify-content: space-between; flex-shrink: 0; gap: 24px; }
body[data-presentation="true"] .question-corner { position: static; margin: 0; gap: 20px; }
body[data-presentation="true"] .question-position { color: rgba(255,255,255,.8); font-size: clamp(16px, 1.35vw, 26px); }
body[data-presentation="true"] .question-stage .question-type { color: #fff; background: rgba(255,255,255,.12); }
body[data-presentation="true"] .question-stage .response-progress { color: #a4fff0; background: transparent; font-size: clamp(18px, 1.6vw, 30px); }
body[data-presentation="true"] .question-stage .question-type { font-size: clamp(16px, 1.2vw, 24px); }
body[data-presentation="true"] .question-stage .question-heading { display: block; min-height: 0; margin: 0; padding: 0; color: #fff; text-align: center; text-wrap: balance; overflow-wrap: anywhere; font-size: clamp(32px, 4vw, 76px); line-height: 1.2; }
body[data-presentation="true"] .countdown { box-shadow: none; background: conic-gradient(var(--brand-teal) 0 var(--timer-angle), rgba(255,255,255,.2) var(--timer-angle) 360deg); }
body[data-presentation="true"] .countdown::before { background: #4324d8; box-shadow: none; inset: 6px; }
body[data-presentation="true"] .countdown.urgent::before { background: #d95013; }
body[data-presentation="true"] .countdown.urgent { background: conic-gradient(var(--brand-orange) 0 var(--timer-angle), rgba(255,255,255,.2) var(--timer-angle) 360deg); }
body[data-presentation="true"] .countdown span { font-size: clamp(36px, 3.7vw, 70px); }
body[data-presentation="true"] .countdown.three-digits span { font-size: clamp(30px, 3vw, 56px); }
body[data-presentation="true"] .question-stage .answer-grid { flex: 1; margin-top: auto; }
body[data-presentation="true"] .question-stage .answer-card { min-height: clamp(90px, 15vh, 180px); border: 0; box-shadow: none; }
body[data-presentation="true"] .question-stage .answer-text { font-size: clamp(24px, 2.4vw, 44px); overflow-wrap: anywhere; }
body[data-presentation="true"] .question-stage .many-options .answer-card { min-height: clamp(74px, 10vh, 125px); }
body[data-presentation="true"] .question-stage .dense-options .answer-card { min-height: clamp(60px, 7vh, 96px); padding-block: 10px; }
body[data-presentation="true"] .question-stage .many-options .answer-text { font-size: clamp(22px, 2vw, 36px); }
body[data-presentation="true"] .question-stage .dense-options .answer-text { font-size: clamp(20px, 1.65vw, 30px); }
body[data-presentation="true"] .question-stage .ordering-grid { height: auto; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: none; }
body[data-presentation="true"] .question-stage .ordering-grid .answer-card { min-height: clamp(64px, 9vh, 108px); }
body[data-presentation="true"] .question-figure { margin: 0; flex-shrink: 0; }
body[data-presentation="true"] .question-stage .question-figure img { max-height: 23vh; }
body[data-presentation="true"] .question-stage .text-answer-prompt { flex: 1; min-height: 120px; margin: 0; color: #fff; background: rgba(255,255,255,.08); font-size: clamp(24px, 2.3vw, 44px); }
body[data-presentation="true"] .question-stage [data-live-results] { padding: 16px 24px; border-radius: 24px; background: #fff; }
body[data-presentation="true"] .question-stage [data-live-results]:empty { display: none; }
body[data-presentation="true"][data-screen="revealed"] .stage,
body[data-presentation="true"][data-screen="ended"] .stage { background: var(--brand-bg); }
body[data-presentation="true"][data-screen="revealed"]:has(.audience-layout) .stage { background: transparent; }
body[data-presentation="true"][data-screen="revealed"] .presentation-footer,
body[data-presentation="true"][data-screen="ended"] .presentation-footer { color: var(--text-secondary); }
body[data-presentation="true"][data-screen="revealed"] .presentation-footer strong,
body[data-presentation="true"][data-screen="ended"] .presentation-footer strong { color: var(--brand-purple); }
body[data-presentation="true"][data-screen="revealed"]:has(.audience-layout) .presentation-footer,
body[data-presentation="true"][data-screen="revealed"]:has(.audience-layout) .presentation-footer strong { color: #fff; }
body[data-presentation="true"] .presenter-controls {
  position: fixed;
  z-index: 11;
  left: 50%;
  bottom: 18px;
  width: max-content;
  max-width: calc(100vw - 40px);
  max-height: calc(100dvh - 80px);
  color: var(--text-primary);
  background: rgba(255,255,255,.97);
  box-shadow: 0 12px 48px rgba(22,21,47,.3);
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, 12px);
  transition: opacity 180ms ease, transform 180ms ease, visibility 180ms;
}
body[data-presentation="true"] .presenter-controls[data-visible="true"] { opacity: 1; visibility: visible; transform: translate(-50%, 0); }

@media (max-width: 900px) {
  body[data-presentation="true"] .stage { padding: 20px 18px 84px; }
  body[data-presentation="true"] .question-meta { gap: 12px; }
  body[data-presentation="true"] .question-corner { flex-direction: column; gap: 8px; }
  body[data-presentation="true"] .question-stage .answer-grid,
  body[data-presentation="true"] .question-stage .ordering-grid { grid-template-columns: 1fr; }
  body[data-presentation="true"] #stage-content,
  body[data-presentation="true"] .question-stage { min-height: 0; }
  body[data-presentation="true"] .presenter-controls { bottom: 70px; }
}
body[data-reduced-motion="true"] [data-live-results] * { transition: none !important; animation: none !important; }
@media (prefers-reduced-motion: reduce) { [data-live-results] * { transition: none !important; animation: none !important; } }

.question-intro { min-height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: clamp(16px, 2.5vh, 28px); color: #fff; text-align: center; }
.question-intro .question-type { padding: 10px 24px; color: #fff; background: rgba(255,255,255,.14); font-size: clamp(20px, 2vw, 36px); }
.question-intro h2 { margin: 0; font-size: clamp(44px, 6vw, 100px); line-height: 1.2; }
.question-intro h2 strong { color: #fff; font-size: 1.3em; font-variant-numeric: tabular-nums; }
.question-intro p { margin: 0; color: #a4fff0; font-size: clamp(24px, 2.5vw, 44px); }
.question-intro .intro-prompt { max-width: 1200px; color: #fff; text-wrap: balance; overflow-wrap: anywhere; font-size: clamp(28px, 3.4vw, 60px); }

body[data-presentation="true"][data-phase="reveal"] .stage { background: var(--brand-bg); }
body[data-presentation="true"][data-phase="reveal"] .presentation-footer { color: var(--text-secondary); }
body[data-presentation="true"][data-phase="reveal"] .presentation-footer strong { color: var(--brand-purple); }
body[data-presentation="true"][data-phase="reveal"]:has(.audience-layout) .stage { background: transparent; }
body[data-presentation="true"][data-phase="reveal"]:has(.audience-layout) .presentation-footer,
body[data-presentation="true"][data-phase="reveal"]:has(.audience-layout) .presentation-footer strong { color: #fff; }
.answer-reveal-stage { height: 100%; min-height: 0; }
.answer-reveal-stage .answer-breakdown { display: flex; flex-direction: column; gap: clamp(16px, 2.4vh, 28px); min-height: 100%; }
.answer-reveal-stage .question-badges { justify-content: center; }
.answer-reveal-stage .question-type,
.answer-reveal-stage .response-progress { font-size: clamp(18px, 1.5vw, 28px); }
.reveal-summary { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: center; gap: 12px 48px; }
.reveal-summary p { margin: 0; color: var(--text-secondary); font-size: clamp(20px, 1.8vw, 32px); }
.reveal-summary strong { color: var(--brand-teal-deep); font-size: clamp(36px, 4vw, 72px); font-variant-numeric: tabular-nums; }
.answer-reveal-stage .question-heading { display: block; margin: 0; padding: 0; min-height: 0; text-align: center; text-wrap: balance; overflow-wrap: anywhere; font-size: clamp(28px, 2.8vw, 52px); }
.answer-reveal-stage .result-grid { flex: 1; margin: auto 0 0; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(14px, 1.5vw, 24px); }
.answer-reveal-stage .answer-card { min-height: clamp(100px, 16vh, 180px); padding: clamp(18px, 2vw, 32px); border-width: 3px; box-shadow: none; }
.answer-reveal-stage .answer-card.correct { border-color: var(--brand-teal-deep); background: #def9f5; }
.answer-reveal-stage .answer-card.correct .answer-letter { color: #fff; background: var(--brand-teal-deep); }
.answer-reveal-stage .answer-letter { width: clamp(44px, 4vw, 72px); font-size: clamp(24px, 2.2vw, 40px); }
.answer-reveal-stage .answer-text { font-size: clamp(24px, 2.1vw, 40px); overflow-wrap: anywhere; }
.answer-reveal-stage .answer-count { min-width: 0; font-size: clamp(32px, 3vw, 56px); }
.answer-reveal-stage .correct-mark { width: 36px; height: 36px; background: var(--brand-teal-deep); }
.answer-reveal-stage .correct-mark svg { width: 24px; height: 24px; }
.answer-reveal-stage .answer-bar { height: 12px; }
.answer-reveal-stage .result-grid[data-option-count="5"] .answer-card,
.answer-reveal-stage .result-grid[data-option-count="6"] .answer-card { min-height: 12vh; }
.answer-reveal-stage .dense-options { gap: clamp(8px, 1.3vh, 16px); }
.answer-reveal-stage .dense-options .answer-card { min-height: 8vh; padding-block: 12px; }
.answer-reveal-stage .dense-options .answer-letter { width: clamp(38px, 3vw, 56px); font-size: clamp(22px, 1.8vw, 32px); }
.answer-reveal-stage .dense-options .answer-text { font-size: clamp(20px, 1.7vw, 32px); }
.answer-reveal-stage .dense-options .answer-count { font-size: clamp(24px, 2.4vw, 44px); }
.answer-reveal-stage .dense-options .correct-mark { width: 28px; height: 28px; }
.answer-reveal-stage .dense-options .correct-mark svg { width: 18px; height: 18px; }
.answer-reveal-stage .reference-answer-panel { flex: 1; min-height: 240px; padding: 32px; border-radius: 24px; background: #def9f5; text-align: center; overflow-wrap: anywhere; }
.answer-reveal-stage .reference-answer-panel > p:nth-of-type(2) { font-size: clamp(30px, 3.5vw, 64px); }

body[data-presentation="true"][data-phase="leaderboard"] .stage { background: transparent; }
body[data-presentation="true"][data-phase="leaderboard"] .presentation-footer,
body[data-presentation="true"][data-phase="leaderboard"] .presentation-footer strong { color: #fff; }
.leaderboard-stage { height: 100%; min-height: 0; display: flex; flex-direction: column; align-items: center; gap: clamp(20px, 3vh, 40px); color: #fff; }
.leaderboard-stage-heading { text-align: center; }
.presentation-kicker { color: #ddd5ff; font-size: clamp(18px, 1.6vw, 30px); }
.leaderboard-stage-heading h2 { display: flex; align-items: center; justify-content: center; gap: 20px; margin: 12px 0; font-size: clamp(40px, 5vw, 88px); }
.leaderboard-stage-heading h2 svg { width: 1em; height: 1em; color: var(--brand-yellow); }
.leaderboard-stage-heading p { margin: 0; color: #ddd5ff; font-size: clamp(18px, 1.6vw, 30px); }
.leaderboard-stage .leaderboard-list { width: min(100%, 1200px); margin: 0; max-height: none; align-content: start; gap: clamp(12px, 1.6vh, 20px); }
.leaderboard-stage .leaderboard-row { min-height: clamp(80px, 11vh, 132px); padding: 16px 28px; grid-template-columns: 64px 64px minmax(0, 1fr) auto; gap: 24px; color: var(--text-primary); border: 0; border-radius: 20px; }
.leaderboard-stage .rank { font-size: clamp(28px, 2.5vw, 44px); }
.leaderboard-stage .participant-avatar { width: 60px; height: 60px; font-size: 28px; }
.leaderboard-stage .person-name { font-size: clamp(24px, 2.3vw, 40px); }
.leaderboard-stage .person-score { font-size: clamp(28px, 2.7vw, 48px); }
.leaderboard-stage .empty-state { margin: auto; color: #fff; font-size: clamp(24px, 2.5vw, 44px); }

@media (max-width: 900px) {
  .answer-reveal-stage .result-grid { grid-template-columns: 1fr; }
  .leaderboard-stage .leaderboard-row { padding: 12px; grid-template-columns: 40px 40px minmax(0, 1fr) auto; gap: 12px; }
  .leaderboard-stage .participant-avatar { width: 40px; height: 40px; font-size: 20px; }
}

#stage-content [data-submitted], #stage-content [data-participants], #stage-content [data-score], #stage-content [data-answer-count] { font-weight: inherit; font-variant-numeric: tabular-nums; }
body[data-presentation="true"] .stage { transition: background-color var(--motion-enter) var(--motion-easing); }
.question-active { position: relative; }
.time-up-cue { display: none; position: absolute; z-index: 4; bottom: 0; left: 50%; transform: translateX(-50%); margin: 0; padding: 12px 28px; border-radius: 999px; background: var(--brand-purple); color: #fff; font-size: clamp(20px, 2vw, 32px); box-shadow: 0 4px 24px #21104a33; }
#stage-content[data-time-up="true"] .time-up-cue { display: block; }
.countdown.urgent:not(.expired) .countdown-inner { animation: countdown-focus var(--motion-countdown) var(--motion-easing) infinite; }
.countdown.expired { transform: none; }
@keyframes countdown-focus { 0%, 100% { transform: scale(1); } 35% { transform: scale(1.06); } }
.answer-reveal-stage .answer-card, .answer-reveal-stage .answer-letter, .answer-reveal-stage .correct-mark { transition: opacity var(--motion-answerEmphasis) var(--motion-easing), background-color var(--motion-answerEmphasis) var(--motion-easing), border-color var(--motion-answerEmphasis) var(--motion-easing); }
.answer-reveal-stage .answer-bar { transition: none; }
#stage-content[data-motion-phase="reveal"]:not([data-results-ready="true"]) .answer-card.correct { background: #fff; border-color: var(--line); }
#stage-content[data-motion-phase="reveal"]:not([data-results-ready="true"]) .answer-card.correct .answer-letter { color: var(--brand-purple); background: #eee9ff; }
#stage-content[data-motion-phase="reveal"]:not([data-results-ready="true"]) .correct-mark { opacity: 0; }
#stage-content[data-results-ready="true"] .result-grid .answer-card:not(.correct) { opacity: .64; }
.leaderboard-stage .leaderboard-row { transition: background-color var(--motion-enter) var(--motion-easing), box-shadow var(--motion-enter) var(--motion-easing); }
#stage-content[data-ranking-ready="true"] .leaderboard-stage .leaderboard-row:has(.rank.first) { background: #fff8de; box-shadow: inset 0 0 0 3px var(--brand-yellow); }
body[data-reduced-motion="true"] #stage-content *, body[data-reduced-motion="true"][data-presentation="true"] .stage { animation: none !important; transition: none !important; }
@media (prefers-reduced-motion: reduce) { #stage-content *, body[data-presentation="true"] .stage { animation: none !important; transition: none !important; } }

.collective-form { display: flex; flex-direction: column; flex: 1; min-height: 0; gap: clamp(12px, 2vh, 24px); }
.collective-form > .answer-grid { min-height: 0; overflow: auto; }
.collective-stage.ordering-stage-adaptive { display: flex; flex-direction: column; }
.collective-option { color: var(--text-primary); font-family: inherit; text-align: left; cursor: pointer; transition: box-shadow 160ms, background 160ms; }
.collective-option:not(:disabled):hover { background: #f2eeff; }
.collective-option:not(:disabled):active { filter: brightness(.95); }
.collective-option[aria-pressed="true"], body[data-presentation="true"] .question-stage .collective-option[aria-pressed="true"] { background: #eee8ff; box-shadow: inset 0 0 0 5px var(--brand-purple); }
.collective-option:focus-visible, .collective-order-actions button:focus-visible { outline: 3px solid var(--brand-teal); outline-offset: 3px; }
.collective-option:disabled { cursor: default; opacity: .75; }
.collective-selected-mark { visibility: hidden; color: var(--brand-purple); font-size: clamp(28px, 3vw, 48px); font-weight: 900; }
.collective-option[aria-pressed="true"] .collective-selected-mark { visibility: visible; }
.collective-submit { display: flex; flex-direction: column; align-items: center; flex-shrink: 0; gap: 8px; padding-bottom: 48px; }
.collective-submit .button { width: min(100%, 320px); min-height: 64px; padding: 12px 36px; font-size: clamp(22px, 2vw, 32px); }
body[data-presentation="true"] .collective-submit .button-primary { background: var(--brand-teal); color: #083c37; }
.collective-submit [role="alert"] { margin: 0; color: var(--brand-orange); font-size: 18px; text-align: center; }
.collective-submit [role="alert"]:empty { display: none; }
.collective-text-label { display: flex; flex-direction: column; flex: 1; gap: 12px; font-size: clamp(22px, 2vw, 32px); }
.collective-text-label textarea { width: 100%; min-height: 160px; flex: 1; resize: vertical; padding: 24px; border-radius: 24px; font: inherit; }
body[data-presentation="true"] .collective-text-label, body[data-presentation="true"] .collective-order-hint { color: #fff; }
.collective-order-hint { margin: 0; font-size: 18px; text-align: center; }
.collective-order-actions { display: flex; gap: 8px; z-index: 1; }
.collective-order-actions button { width: 44px; height: 44px; border: 1px solid #d9d0fc; border-radius: 12px; background: #fff; color: var(--brand-purple); font-size: 26px; cursor: pointer; }
.collective-order-actions button:disabled { opacity: .3; cursor: default; }
.collective-option[draggable="true"] { cursor: grab; }
.collective-dragging { opacity: .5; }
.collective-stage .ordering-grid { height: auto; grid-template-rows: none; }
.collective-stage .ordering-grid .answer-card { height: auto; min-height: 64px; }
body[data-presentation="true"] .collective-stage .ordering-grid.dense-options .answer-card { min-height: 50px; padding-block: 4px; }
.collective-stage .dense-options .collective-order-actions button { width: 36px; height: 36px; font-size: 22px; }

.collective-reveal .collective-answer-text { margin: 0; text-align: center; font-size: clamp(26px, 3vw, 52px); font-weight: 700; overflow-wrap: anywhere; }
.collective-reveal .stage-lead { margin: 0; }
.collective-reveal .reference-answer-panel { flex: 0; min-height: 180px; margin-block: auto; }

.question-type { display: inline-flex; align-items: center; gap: 10px; }
.question-type-icon { display: block; width: clamp(28px, 2.5vw, 46px); height: clamp(28px, 2.5vw, 46px); flex: none; object-fit: contain; }
body[data-screen="waiting"] .stage { background: radial-gradient(circle at 50% -15%, #3a367f 0%, #192858 47%, #111a3d 100%); }
body[data-screen="waiting"] .lobby-title { color: #fff; }
body[data-screen="waiting"] .lobby-content > .stage-lead { color: #d7daed; }
body[data-screen="waiting"] .lobby-join-card { background: #fff; border-color: #ffffff30; box-shadow: 0 20px 48px #0a103780; }
body[data-screen="waiting"] .lobby-glow { animation: none; opacity: .7; }
body[data-screen="waiting"] .lobby-decoration { opacity: .55; }

body[data-presentation="true"] { background-color: #111a3d; }
body[data-presentation="true"] .stage { position: relative; isolation: isolate; }
body[data-presentation="true"] .stage::before,
body[data-presentation="true"] .stage::after { content: ''; position: fixed; z-index: -1; pointer-events: none; }
body[data-presentation="true"] .stage::before { width: min(40vw, 540px); aspect-ratio: 1; top: -26%; right: -8%; border: 1px solid #ffffff24; border-radius: 50%; box-shadow: 0 0 0 72px #ffffff06, 0 0 0 144px #ffffff04; }
body[data-presentation="true"] .stage::after { width: 112px; height: 24px; left: 7%; bottom: 18%; border-radius: 999px; background: #14c8b8; transform: rotate(-30deg); opacity: .45; box-shadow: 180px 90px 0 -2px #ff8a3d; }
body[data-presentation="true"][data-phase="intro"] .stage { background: radial-gradient(ellipse at 50% 54%, #5735d0 0%, #251b67 54%, #111a3d 100%); }
body[data-presentation="true"][data-phase="active"] .stage { background: radial-gradient(circle at 84% 3%, #433293 0%, transparent 32%), linear-gradient(145deg, #162451 0%, #111a3d 65%); }
body[data-presentation="true"] .question-stage .question-heading { max-width: 24ch; align-self: center; }
body[data-presentation="true"] .question-stage .question-type { padding: 4px 18px 4px 6px; color: #fff; border: 1px solid #ffffff30; border-radius: 999px; background: #ffffff16; }
body[data-presentation="true"] .question-stage .response-progress { color: #aaf3e9; }
body[data-presentation="true"] .question-stage .answer-card { background: #fff; border: 1px solid #ffffffa6; border-radius: 20px; }
body[data-presentation="true"] .question-stage .answer-card::after { display: none; }
body[data-presentation="true"] .countdown::before { background: #111a3d; }
body[data-presentation="true"] .countdown.urgent::before { background: #692d19; }
body[data-presentation="true"] .time-up-cue { background: #ff8a3d; color: #111a3d; font-weight: 800; }
body[data-presentation="true"][data-phase="reveal"] .stage,
body[data-presentation="true"][data-screen="revealed"]:not([data-phase="leaderboard"]) .stage { background: radial-gradient(circle at 50% 0%, #244c61 0%, #172849 38%, #111a3d 100%); }
body[data-presentation="true"] .answer-reveal-stage { color: #fff; }
body[data-presentation="true"] .answer-reveal-stage .question-type { align-self: center; padding: 4px 18px 4px 6px; color: #fff; background: #ffffff16; border: 1px solid #ffffff30; }
body[data-presentation="true"] .answer-reveal-stage .question-heading { color: #fff; }
body[data-presentation="true"] .answer-reveal-stage .response-progress,
body[data-presentation="true"] .answer-reveal-stage .reveal-summary p { color: #d7daed; }
body[data-presentation="true"] .answer-reveal-stage .reveal-summary strong { color: #61e6da; }
body[data-presentation="true"] .answer-reveal-stage .answer-card { color: #111a3d; background: #fff; border: 2px solid #ffffff80; }
body[data-presentation="true"] .answer-reveal-stage .answer-card.correct { background: #d9f8f2; border-color: #14c8b8; }
body[data-presentation="true"] .answer-reveal-stage .reference-answer-panel { color: #111a3d; background: #d9f8f2; }
body[data-presentation="true"] .answer-reveal-stage .stage-lead { color: #d7daed; }
body[data-presentation="true"][data-phase="reveal"] .presentation-footer,
body[data-presentation="true"][data-screen="revealed"] .presentation-footer,
body[data-presentation="true"][data-phase="reveal"] .presentation-footer strong,
body[data-presentation="true"][data-screen="revealed"] .presentation-footer strong { color: #d7daed; }
body[data-presentation="true"][data-phase="reveal"] .presentation-logo-inverse,
body[data-presentation="true"][data-screen="revealed"] .presentation-logo-inverse { display: block !important; }
body[data-presentation="true"][data-phase="reveal"] .presentation-logo-color,
body[data-presentation="true"][data-screen="revealed"] .presentation-logo-color { display: none !important; }
body[data-presentation="true"][data-phase="leaderboard"] .stage { background: radial-gradient(ellipse at 48% -22%, #5143aa 0%, #272365 40%, #111a3d 92%); }
.leaderboard-stage-heading h2 { color: #fff; letter-spacing: -.035em; }
.leaderboard-stage .leaderboard-row { box-shadow: inset 5px 0 0 #14c8b8; }
.leaderboard-stage .leaderboard-row:has(.rank.first) { box-shadow: inset 5px 0 0 #ffc83d; }
.leaderboard-stage .participant-avatar,
.awards-stage .participant-avatar { border-radius: 14px; overflow: hidden; }
.awards-stage .podium-avatar,
.awards-stage .winner-mystery { border-radius: 22%; }
.awards-stage .podium-avatar { border-color: var(--winner-accent); box-shadow: 0 18px 52px #111a3d99, 0 0 0 10px #ffffff0c; }
.awards-stage .winner-mystery { background: #ffffff0d; }
.awards-stage .winner-ordinal { opacity: .1; }
.awards-stage .winner-plinth { border-top-width: 5px; border-radius: 40%; }
.awards-stage .award-confetti i { height: clamp(7px, .55vw, 13px); width: clamp(24px, 2vw, 42px); border-radius: 999px; background: #14c8b8; transform: rotate(-30deg); }
.awards-stage .award-confetti i:nth-child(3n) { background: #ffc83d; }
.awards-stage .award-confetti i:nth-child(3n + 1) { background: #ff8a3d; transform: rotate(60deg); }
body[data-presentation="true"][data-screen="ended"]:has(.awards-stage) .stage { background: radial-gradient(ellipse at 50% 32%, #4934aa 0%, #211e60 48%, #111a3d 100%); }
body[data-presentation="true"][data-screen="ended"]:has(.awards-stage) .presentation-footer strong { color: #fff; }

@media (max-height: 740px) and (min-width: 901px) {
  body[data-presentation="true"] .stage { padding-top: 18px; padding-bottom: 64px; }
  body[data-presentation="true"] .question-stage { gap: 12px; }
  body[data-presentation="true"] .question-stage .question-heading { font-size: clamp(30px, 3.3vw, 58px); }
  body[data-presentation="true"] .question-stage .answer-card { min-height: clamp(58px, 10vh, 100px); }
  .awards-stage .ranking-table { top: 42%; }
  .awards-stage[data-award-composition="ranking"] .award-winner { --winner-scale: .34; }
  .awards-stage[data-award-composition="ranking"] .award-winner[data-place="2"],
  .awards-stage[data-award-composition="ranking"] .award-winner[data-place="3"] { --winner-scale: .27; }
  .awards-stage .final-rank-entry { min-height: 50px; padding-block: 4px; }
}

@media (max-width: 900px) {
  body[data-presentation="true"] .question-meta { align-items: flex-start; }
  body[data-presentation="true"] .question-stage .question-heading { max-width: 100%; }
  body[data-presentation="true"] .question-stage .answer-grid,
  .answer-reveal-stage .result-grid { overflow: auto; }
  .awards-stage { min-height: min(620px, calc(100dvh - 100px)); }
  .awards-stage .ranking-table { left: 0; right: 0; top: 40%; }
  .awards-stage .final-ranking-list { gap: 0; }
  .awards-stage .final-rank-entry { min-height: 54px; }
  .awards-stage[data-award-composition="ranking"] .award-winner { --winner-scale: .4; }
  .awards-stage[data-award-composition="ranking"] .award-winner[data-place="2"],
  .awards-stage[data-award-composition="ranking"] .award-winner[data-place="3"] { --winner-scale: .3; }
}
