:root {
  --bg: #edf3ff;
  --ink: #17254b;
  --muted: #58657e;
  --blue: #3157f6;
  --blue-dark: #2445ce;
  --white: #fff;
  --line: #d2dcee;
  --yellow: #ffcf54;
  --coral: #f46a57;
  --mint: #b9ead8;
  --answer-0: #f46a57;
  --answer-1: #5285e5;
  --answer-2: #ffcf54;
  --answer-3: #73c8a2;
  --radius: 24px;
  --shadow: 0 12px 40px #17254b0a;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--ink);
  background: var(--bg);
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-width: 320px;
}
body:before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image: radial-gradient(#7387b220 0.8px, transparent 0.8px);
  background-size: 20px 20px;
  pointer-events: none;
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
button,
a,
input,
select,
textarea,
summary {
  -webkit-tap-highlight-color: transparent;
}
button,
a,
summary {
  touch-action: manipulation;
}
button,
summary {
  cursor: pointer;
}
button {
  border: 0;
}
a {
  color: inherit;
}
button:disabled {
  cursor: default;
  opacity: 0.5;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 4px;
}
button,
a {
  transition:
    background 0.18s,
    box-shadow 0.18s,
    transform 0.18s;
}
button:not(:disabled):active,
.button:active {
  transform: translateY(1px);
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1,
h2,
h3,
.brand,
.giant-pin,
.hero-question {
  font-family: "Trebuchet MS", Arial, sans-serif;
}
h1 {
  font-size: clamp(2.2rem, 4.8vw, 4rem);
  line-height: 1.07;
  letter-spacing: -0.05em;
  font-weight: 900;
  text-wrap: balance;
}
h2 {
  font-size: 1.65rem;
  letter-spacing: -0.035em;
  line-height: 1.2;
}
h3 {
  font-size: 1.2rem;
}
p {
  line-height: 1.6;
  color: var(--muted);
}
img,
video {
  max-width: 100%;
  display: block;
}
label,
legend {
  font-weight: 700;
  font-size: 0.9rem;
}
input:not([type="checkbox"], [type="radio"]),
textarea,
select {
  display: block;
  width: 100%;
  background: white;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 14px 16px;
  min-height: 50px;
  font-size: 1rem;
  line-height: 1.4;
}
input::placeholder,
textarea::placeholder {
  color: #728099;
}
textarea {
  resize: vertical;
  min-height: 100px;
}
input[type="checkbox"],
input[type="radio"] {
  width: 22px;
  height: 22px;
  accent-color: var(--blue);
  flex-shrink: 0;
  cursor: pointer;
}
label + input,
label + textarea,
label + select {
  margin-top: 8px;
}
fieldset {
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0;
}
fieldset legend {
  margin-bottom: 12px;
}
details summary {
  min-height: 48px;
  padding: 12px 0;
  font-weight: 700;
  line-height: 1.5;
}
.icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  vertical-align: middle;
}
.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 13px 21px;
  border-radius: 12px;
  font-size: 0.94rem;
  font-weight: 700;
  line-height: 1.35;
  text-align: center;
  text-decoration: none;
  border: 1.5px solid transparent;
  cursor: pointer;
}
.primary {
  background: var(--blue);
  color: white;
  box-shadow: 0 3px 0 var(--blue-dark);
}
.primary:hover:not(:disabled) {
  background: var(--blue-dark);
  box-shadow: 0 4px 12px #3157f630;
}
.secondary {
  background: white;
  border-color: var(--line);
}
.secondary:hover:not(:disabled) {
  background: #e5ecff;
  border-color: #a9b9dc;
}
.text-button {
  background: transparent;
  box-shadow: none;
  padding-inline: 4px;
  justify-content: flex-start;
}
.text-button:hover {
  color: var(--blue);
}
.danger {
  color: #aa3347;
}
.wide {
  width: 100%;
}
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: white;
  border: 1px solid var(--line);
  flex-shrink: 0;
}
.icon-button:hover {
  background: var(--bg);
}
.eyebrow,
.mini-label {
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  line-height: 1.5;
  color: var(--blue);
}
.eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
}
.helper {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.5;
}
.lead {
  font-size: 1.13rem;
  line-height: 1.7;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
[hidden] {
  display: none !important;
}
.site-shell {
  max-width: 1400px;
  margin: auto;
  padding: 0 48px;
}
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 110px;
  border-bottom: 1px solid var(--line);
}
.brand {
  font-size: 3.2rem;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.09em;
  text-decoration: none;
  display: inline-block;
  padding: 0 8px 8px 0;
}
.brand span {
  color: var(--coral);
  display: inline-block;
  transform: rotate(10deg);
}
.topbar nav {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.nav-link {
  font-size: 0.9rem;
  text-decoration: none;
  padding: 15px 10px;
  font-weight: 700;
  min-height: 48px;
}
.nav-link:hover {
  color: var(--blue);
}
.profile-link {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;
  min-height: 48px;
}
.profile-link .avatar {
  width: 42px;
}
.profile-link span:not(.avatar) {
  max-width: 100px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  color: var(--muted);
  font-size: 0.75rem;
  padding: 30px 0;
  border-top: 1px solid var(--line);
  margin-top: 48px;
}
.hero {
  display: grid;
  grid-template-columns: 1.03fr 1fr;
  gap: 54px;
  align-items: center;
  padding: 80px 0 75px;
}
.hero h1 {
  font-size: clamp(3.3rem, 5.5vw, 5rem);
  line-height: 1.02;
  letter-spacing: -0.06em;
}
.hero h1 > span {
  color: var(--blue);
}
.hero .lead {
  margin: 24px 0 28px;
}
.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #369d73;
}
.join-strip {
  display: flex;
  align-items: center;
  background: white;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 7px;
  gap: 8px;
  max-width: 450px;
  box-shadow: var(--shadow);
  position: relative;
}
.join-strip input {
  min-width: 0;
  border: 0;
  background: none;
  font-size: 1.4rem;
  letter-spacing: 0.04em;
  font-weight: 700;
}
.join-strip button {
  flex-shrink: 0;
}
.join-strip .form-error {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 6px;
  background: white;
  padding: 8px;
  border-radius: 8px;
  z-index: 2;
}
.hero .helper {
  margin-top: 13px;
}
.resume-link {
  margin-top: 20px;
  border: 0;
  background: none;
  color: var(--blue);
  font-weight: 700;
  padding: 14px 0;
  text-align: left;
  min-height: 48px;
}
.hero-board {
  position: relative;
  background: #dce7ff;
  border: 1px solid #c6d4f1;
  border-radius: 32px;
  padding: 28px 26px 26px;
  transform: rotate(2deg);
  box-shadow: 10px 12px 0 #d1dcf4;
}
.board-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.07em;
}
.board-live {
  background: white;
  border-radius: 40px;
  padding: 7px 10px;
  white-space: nowrap;
}
.board-live i {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: #32996e;
  border-radius: 50%;
  margin-right: 4px;
}
.hero-question {
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  text-align: center;
  font-weight: 900;
  line-height: 1.12;
  letter-spacing: -0.04em;
  margin: 38px 0 10px;
}
.avatar-line {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 10px;
  padding: 12px 0 25px;
}
.hero-character {
  width: 31%;
  text-align: center;
}
.hero-character > .avatar {
  width: 100%;
}
.hero-character > span:not(.avatar) {
  font-size: 0.72rem;
  font-weight: 700;
  background: #ffffffa0;
  border-radius: 20px;
  padding: 6px 10px;
  display: inline-block;
}
.character-1 {
  transform: translateY(-14px);
}
.board-answer {
  background: white;
  padding: 18px;
  border-radius: 14px;
  display: flex;
  gap: 12px;
  align-items: center;
  font-weight: 700;
  font-size: 0.86rem;
}
.board-answer > span {
  color: var(--coral);
}
.board-answer > .icon {
  margin-left: auto;
  color: var(--blue);
}
.board-stamp {
  position: absolute;
  right: -18px;
  bottom: 80px;
  transform: rotate(10deg);
  background: var(--yellow);
  width: 86px;
  height: 86px;
  border-radius: 50%;
  border: 3px solid var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  font-weight: 900;
  line-height: 1.1;
}
.board-stamp small {
  font-size: 0.57rem;
}
.home-bottom {
  display: grid;
  grid-template-columns: 1fr 1.1fr auto;
  align-items: center;
  gap: 32px;
  border-top: 1px solid var(--line);
  padding: 32px 0 0;
}
.home-bottom h2 {
  margin-top: 10px;
  font-size: 1.6rem;
}
.home-bottom p {
  font-size: 0.95rem;
}
.avatar {
  display: inline-block;
  width: 80px;
  vertical-align: middle;
  color: var(--avatar-color);
  flex-shrink: 0;
}
.avatar svg {
  width: 100%;
  overflow: visible;
  display: block;
}
.avatar-body {
  transform-origin: 56px 100px;
  animation: avatar-bob 2.8s ease-in-out infinite;
  animation-delay: var(--avatar-delay);
}
.avatar-eyes {
  transform-origin: 56px 51px;
  animation: blink 4.4s infinite;
  animation-delay: var(--avatar-delay);
}
.avatar-shadow {
  animation: shadow-breathe 2.8s ease-in-out infinite;
  animation-delay: var(--avatar-delay);
  transform-origin: center;
}
.center-page {
  display: flex;
  justify-content: center;
  padding: 48px 0 20px;
}
.panel {
  width: min(100%, 520px);
  padding: 36px;
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.panel h1 {
  font-size: 2.5rem;
  margin-bottom: 14px;
}
.panel > p {
  margin-bottom: 24px;
}
.panel > label {
  display: block;
  margin-top: 20px;
}
.panel > .wide {
  margin-top: 24px;
}
.panel .checkbox-label {
  display: flex;
  font-weight: 400;
  font-size: 0.9rem;
}
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  line-height: 1.4;
  min-height: 44px;
}
.pin-input {
  text-align: center;
  letter-spacing: 0.08em !important;
  font-size: 1.8rem !important;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.auth-switch {
  font-size: 0.9rem;
  text-align: center;
  margin: 24px 0 0 !important;
}
.auth-switch a {
  font-weight: 700;
  color: var(--blue);
}
.form-error {
  color: #ac2b40;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.5;
  margin: 12px 0;
}
.avatar-preview {
  text-align: center;
  margin: 20px 0 0;
}
.avatar-preview > .avatar {
  width: 150px;
}
.avatar-options {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.avatar-option {
  background: #f5f7fc;
  border: 2px solid transparent;
  border-radius: 16px;
  min-width: 0;
  padding: 4px;
}
.avatar-option > .avatar {
  width: 100%;
  max-width: 74px;
}
.avatar-option.selected {
  border-color: var(--blue);
  background: #eaf0ff;
}
.avatar-option:hover {
  background: #e4ebfb;
}
.accessory-picker {
  margin-top: 24px;
}
.accessory-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chip {
  background: #f2f5fb;
  border: 1.5px solid var(--line);
  padding: 10px 13px;
  border-radius: 10px;
  min-height: 44px;
  font-size: 0.83rem;
}
.chip.selected {
  background: var(--blue);
  color: white;
  border-color: var(--blue);
}
.profile-panel .helper {
  margin: 16px 0 0;
}
.library-page {
  padding: 48px 0;
}
.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  margin-bottom: 32px;
}
.section-heading h1 {
  font-size: 3rem;
}
.quiz-library {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}
.quiz-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 20px;
}
.quiz-card-art {
  height: 100px;
  background: #dfe8ff;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px;
  margin-bottom: 20px;
  color: var(--blue);
}
.quiz-card-art > .icon {
  width: 38px;
  height: 38px;
}
.quiz-card-art span {
  font-size: 0.8rem;
  font-weight: 700;
}
.quiz-card h2 {
  overflow-wrap: anywhere;
}
.quiz-card p {
  font-size: 0.85rem;
  margin: 8px 0 20px;
}
.empty-state {
  grid-column: 1/-1;
  text-align: center;
  padding: 50px 24px;
  background: #ffffffa0;
  border: 1px dashed #aebedc;
  border-radius: 24px;
}
.empty-state .avatar {
  width: 120px;
}
.empty-state h2,
.empty-state h1 {
  margin-bottom: 16px;
}
.empty-state p {
  margin: 0 auto 24px;
  max-width: 440px;
}
.notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: #fff4cf;
  padding: 20px;
  border-radius: 16px;
  margin-bottom: 24px;
  font-size: 0.9rem;
}
.builder-page {
  padding: 34px 0;
}
.builder-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  margin-bottom: 26px;
}
.title-field {
  flex: 1;
  max-width: 720px;
  min-width: 0;
}
.title-field label {
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  color: var(--muted);
}
.title-field > input {
  font-size: clamp(1.25rem, 2.4vw, 1.85rem);
  font-weight: 800;
  background: transparent;
  border: 0;
  border-bottom: 2px solid var(--line);
  border-radius: 0;
  padding: 10px 0;
  margin: 0 0 8px;
}
.builder-actions {
  display: flex;
  gap: 12px;
}
.tutorial {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  background: #dfe9ff;
  border-radius: 16px;
  padding: 20px 24px;
  margin-bottom: 26px;
}
.tutorial p {
  font-size: 0.85rem;
  margin-top: 6px;
}
.tutorial .icon-button {
  margin-left: auto;
  background: transparent;
  border: 0;
}
.builder-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 32px;
  align-items: start;
}
.questions-sidebar {
  padding: 12px 0;
}
.sidebar-label {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  margin-bottom: 18px;
}
.question-tabs {
  display: grid;
  gap: 8px;
  max-height: 430px;
  overflow: auto;
  margin-bottom: 16px;
}
.question-tab {
  display: flex;
  text-align: left;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1.5px solid transparent;
  border-radius: 12px;
  background: transparent;
  min-height: 58px;
  min-width: 0;
}
.question-tab > span {
  display: flex;
  justify-content: center;
  align-items: center;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  font-size: 0.8rem;
  color: var(--muted);
}
.question-tab strong {
  font-size: 0.85rem;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-height: 1.5;
}
.question-tab.selected {
  background: white;
  border-color: var(--blue);
}
.questions-sidebar > .button {
  font-size: 0.85rem;
  margin-top: 10px;
}
.csv-tools {
  border-top: 1px solid var(--line);
  margin-top: 28px;
  padding-top: 24px;
  display: grid;
  gap: 6px;
}
.csv-tools > .button {
  font-size: 0.8rem;
  text-align: left;
}
.csv-tools > .helper {
  margin-top: 8px;
}
.question-editor {
  background: white;
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 28px;
  min-width: 0;
}
.empty-editor {
  min-height: 390px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  flex-direction: column;
  padding: 30px 14px;
  gap: 20px;
}
.empty-editor p {
  max-width: 380px;
}
.empty-pencil {
  width: 70px;
  height: 70px;
  background: var(--bg);
  border-radius: 20px;
  display: grid;
  place-items: center;
  transform: rotate(-7deg);
  color: var(--blue);
}
.empty-pencil .icon {
  width: 32px;
  height: 32px;
}
.editor-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  gap: 16px;
}
.editor-top .eyebrow {
  margin: 0;
}
.media-tools {
  display: flex;
  gap: 16px;
  align-items: center;
  margin: 20px 0 4px;
}
.media-tools > .helper {
  font-size: 0.75rem;
}
.media-link {
  font-size: 0.82rem;
}
.media-link summary {
  color: var(--muted);
  font-weight: 400;
}
.media-link input {
  font-size: 0.85rem;
}
.media-preview {
  margin: 16px 0;
  background: #f2f5fb;
  border-radius: 12px;
  padding: 12px;
}
.media-preview img,
.media-preview video {
  max-height: 200px;
  object-fit: contain;
  margin: auto;
}
.media-preview > .button {
  margin-top: 8px;
  font-size: 0.75rem;
  min-height: 44px;
}
.answers-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-top: 24px;
}
.answers-heading h2 {
  font-size: 1.25rem;
}
.answers-heading label {
  font-size: 0.8rem;
  font-weight: 400;
}
.answers-editor {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 12px;
}
.color-0 {
  --card-color: var(--answer-0);
}
.color-1 {
  --card-color: var(--answer-1);
}
.color-2 {
  --card-color: var(--answer-2);
}
.color-3 {
  --card-color: var(--answer-3);
}
.answer-edit {
  display: flex;
  align-items: center;
  gap: 8px;
  background: color-mix(in srgb, var(--card-color) 16%, white);
  border: 1.5px solid color-mix(in srgb, var(--card-color) 40%, white);
  padding: 10px;
  border-radius: 12px;
  min-width: 0;
}
.answer-edit > span {
  font-size: 1rem;
  color: var(--ink);
}
.answer-edit input[type="text"],
.answer-edit input:not([type]) {
  padding: 10px 4px;
  min-width: 0;
  border: 0;
  background: none;
  border-radius: 4px;
  font-size: 0.88rem;
}
.answer-edit input[type="checkbox"],
.answer-edit input[type="radio"] {
  margin: 0;
}
.duration-row {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  border-top: 1px solid var(--line);
  margin-top: 28px;
  padding-top: 24px;
  flex-wrap: wrap;
}
.duration-row > div {
  flex: 1;
  min-width: 150px;
}
.duration-row > .helper {
  margin-top: 28px;
  flex: 1;
  font-size: 0.75rem;
}
.duration-row label {
  font-size: 0.8rem;
}
.duration-row .helper {
  display: block;
  margin-top: 5px;
}
.toast {
  position: fixed;
  left: 50%;
  bottom: max(24px, env(safe-area-inset-bottom));
  transform: translate(-50%, 20px);
  background: var(--ink);
  color: white;
  border-radius: 14px;
  padding: 15px 22px;
  box-shadow: 0 8px 30px #17254b30;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.2s,
    transform 0.2s;
  z-index: 100;
  max-width: min(540px, calc(100vw - 32px));
  width: max-content;
  font-size: 0.9rem;
  line-height: 1.5;
}
.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}
dialog {
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 28px;
  width: min(660px, calc(100vw - 32px));
  max-height: 85dvh;
  color: var(--ink);
  box-shadow: 0 30px 120px #17254b30;
}
dialog::backdrop {
  background: #17254b75;
  backdrop-filter: blur(4px);
}
.dialog-heading {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 24px;
}
.dialog-heading .eyebrow {
  margin-bottom: 8px;
}
.dialog-heading .icon-button {
  margin-left: auto;
}
.bank-list {
  display: grid;
  gap: 10px;
  margin-top: 20px;
}
.bank-item {
  display: grid;
  text-align: left;
  gap: 6px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
}
.bank-item small {
  color: var(--muted);
}
.bank-item > span {
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--blue);
}
.bank-item:hover {
  background: #dfe9ff;
}
.game-layout {
  min-height: 100dvh;
}
.game-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  position: sticky;
  top: 0;
  background: #edf3fff5;
  border-bottom: 1px solid var(--line);
  padding: 16px max(24px, calc((100vw - 1360px) / 2));
  z-index: 20;
  backdrop-filter: blur(16px);
}
.game-top .brand {
  font-size: 2.8rem;
}
.game-meta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}
.room-pin {
  font-size: 1.25rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  font-variant-numeric: tabular-nums;
}
.connection-state {
  font-size: 0.7rem;
  color: #27694c;
  line-height: 1.4;
  text-align: center;
  max-width: 260px;
}
.connection-state:before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  margin-right: 6px;
}
.connection-state.offline {
  color: #995515;
}
.game-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}
.sound-button[aria-pressed="false"] {
  color: #7c879c;
}
.game-main {
  max-width: 1280px;
  margin: auto;
  padding: 36px 32px 56px;
}
.lobby-heading {
  text-align: center;
}
.lobby-heading .eyebrow {
  justify-content: center;
}
.lobby-heading p {
  margin-top: 16px;
}
.invite-board {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 60px;
  margin: 36px auto;
  background: white;
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 24px 40px;
  max-width: 1040px;
  box-shadow: var(--shadow);
}
.qr-wrap {
  text-align: center;
  width: 300px;
  flex-shrink: 0;
}
.qr-wrap img {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
}
.qr-wrap > span {
  font-size: 0.8rem;
  color: var(--muted);
}
.invite-code {
  text-align: center;
  min-width: 0;
}
.join-domain {
  font-size: clamp(1.3rem, 2.8vw, 2.3rem);
  overflow-wrap: anywhere;
  display: block;
  color: var(--blue);
  margin: 4px 0 14px;
}
.giant-pin {
  font-size: clamp(2.6rem, 5.8vw, 5.2rem);
  font-weight: 900;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  margin: 0 0 20px;
}
.players-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 32px 0 20px;
  gap: 16px;
}
.players-heading h2 {
  font-size: 1.25rem;
}
.players-heading > span {
  font-size: 0.8rem;
  color: var(--muted);
}
.player-cloud {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(125px, 1fr));
  gap: 12px;
}
.player-chip {
  display: flex;
  align-items: center;
  flex-direction: column;
  background: white;
  border: 1px solid var(--line);
  padding: 8px 10px 16px;
  border-radius: 18px;
  animation: appear 0.35s ease both;
  min-width: 0;
}
.player-chip > .avatar {
  width: 70px;
}
.player-chip strong {
  font-size: 0.85rem;
  max-width: 100%;
  overflow-wrap: anywhere;
  text-align: center;
}
.player-chip > span:not(.avatar) {
  font-size: 0.6rem;
  color: var(--muted);
  margin-top: 5px;
}
.player-chip.away {
  background: #f5f7fc;
}
.player-chip.away .avatar-body {
  animation-play-state: paused;
}
.waiting-players {
  grid-column: 1/-1;
  text-align: center;
  padding: 30px;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: 18px;
}
.pulse-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--blue);
  animation: pulse 1.5s infinite;
  margin-right: 10px;
}
.player-ready {
  text-align: center;
  margin: 30px auto;
  padding: 20px;
  background: #ffffff90;
  border-radius: 24px;
  max-width: 480px;
}
.player-ready > .avatar {
  width: 170px;
}
.player-ready h2 {
  margin: 0 0 18px;
}
.ready-pill {
  display: inline-flex;
  background: #d9f0e7;
  color: #235f48;
  padding: 10px 15px;
  border-radius: 30px;
  font-size: 0.83rem;
  font-weight: 700;
  line-height: 1.4;
}
.preview-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  min-height: calc(100dvh - 200px);
  text-align: center;
  max-width: 1050px;
  margin: auto;
}
.preview-stage .eyebrow {
  margin-bottom: 28px;
}
.preview-label {
  font-size: 1.2rem;
  color: var(--blue);
  font-weight: 700;
  margin-bottom: 20px;
}
.preview-stage h1 {
  font-size: clamp(2.3rem, 5vw, 4.5rem);
  animation: question-arrive 0.6s both;
}
.preview-count {
  font-size: 4rem;
  font-weight: 900;
  color: var(--blue);
  margin: 32px 0 14px;
  font-variant-numeric: tabular-nums;
}
.reading-progress {
  height: 9px;
  width: min(420px, 90%);
  border-radius: 20px;
  background: #d3ddf2;
  overflow: hidden;
  margin-bottom: 20px;
}
.reading-progress > span {
  height: 100%;
  display: block;
  background: var(--blue);
  transform-origin: left;
  transition: transform 0.1s linear;
}
.question-stage {
  max-width: 1140px;
  margin: auto;
}
.question-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}
.question-meta .eyebrow {
  margin: 0;
}
.timer-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px 16px;
}
.timer-pill > span {
  font-size: 1.5rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  min-width: 2ch;
  text-align: center;
}
.timer-pill > small {
  font-size: 0.7rem;
  color: var(--muted);
}
.question-title {
  font-size: clamp(1.9rem, 3.7vw, 3.25rem);
  text-align: center;
  margin: 12px auto 24px;
  max-width: 1000px;
  overflow-wrap: anywhere;
}
.question-media {
  display: flex;
  justify-content: center;
  height: clamp(120px, 24vh, 270px);
  margin: 16px auto 24px;
}
.question-media img,
.question-media video {
  height: 100%;
  object-fit: contain;
  border-radius: 12px;
}
.answer-hint {
  text-align: center;
  font-size: 0.85rem;
  margin-bottom: 20px;
}
.answer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.answer-card {
  position: relative;
  background: var(--card-color);
  border: 3px solid transparent;
  border-radius: 20px;
  min-height: 142px;
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 24px;
  text-align: left;
  box-shadow: 0 5px 0 color-mix(in srgb, var(--card-color) 70%, var(--ink));
  font-size: clamp(1.1rem, 2vw, 1.7rem);
  font-weight: 800;
  line-height: 1.3;
  color: #14203e;
  animation: answer-arrive 0.5s both;
  animation-delay: calc(var(--answer-index, 0) * 70ms);
}
.answer-card:nth-child(2) {
  --answer-index: 1;
}
.answer-card:nth-child(3) {
  --answer-index: 2;
}
.answer-card:nth-child(4) {
  --answer-index: 3;
}
.answer-card:disabled {
  opacity: 1;
}
.answer-card:hover:not(:disabled) {
  filter: brightness(1.06);
  transform: translateY(-3px);
}
.answer-shape {
  font-size: 1.6rem;
  opacity: 0.8;
}
.answer-text {
  overflow-wrap: anywhere;
  flex: 1;
  min-width: 0;
}
.choice-check {
  opacity: 0;
  position: absolute;
  right: 10px;
  top: 8px;
  background: var(--ink);
  color: white;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 1rem;
}
.answer-card.selected {
  border-color: var(--ink);
  box-shadow:
    0 0 0 3px white,
    0 0 0 6px var(--ink);
}
.answer-card.selected .choice-check {
  opacity: 1;
}
.answer-card.dimmed {
  opacity: 0.45;
}
.answer-card.correct {
  border-color: #1c6544;
  box-shadow: 0 5px 0 #1c6544;
}
.answer-card.incorrect {
  background: #dfe5ef;
  box-shadow: 0 5px 0 #c8d0df;
  color: #647089;
}
.answer-verdict {
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 8px;
  font-size: 0.8rem;
  flex-shrink: 0;
}
.answer-verdict .icon {
  width: 30px;
  height: 30px;
}
.answer-verdict small {
  font-size: 0.7rem;
}
.question-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-top: 30px;
  min-height: 50px;
}
.vote-count {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.vote-count strong {
  font-size: 0.9rem;
}
.vote-count small {
  font-size: 0.72rem;
  color: var(--muted);
}
#answer-status {
  font-size: 0.85rem;
  max-width: 330px;
  color: var(--muted);
}
.answer-feedback {
  text-align: center;
  background: #e0e8f9;
  padding: 15px 20px;
  border-radius: 12px;
  display: flex;
  gap: 20px;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  font-size: 0.95rem;
  line-height: 1.5;
}
.answer-feedback.success {
  background: #d1efdf;
  color: #215940;
}
.answer-feedback strong {
  white-space: nowrap;
}
.ranking-stage {
  max-width: 850px;
  margin: auto;
  text-align: center;
  padding: 10px 0;
}
.ranking-stage .eyebrow {
  justify-content: center;
}
.ranking-stage > p {
  margin: 16px 0 28px;
}
.leaderboard {
  display: grid;
  gap: 10px;
  position: relative;
  text-align: left;
}
.rank-row {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 76px;
  padding: 8px 22px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 16px;
  position: relative;
}
.rank-row:first-child {
  background: #fff3c8;
  border-color: #e8cb75;
}
.rank-number {
  width: 28px;
  font-weight: 900;
  font-size: 1.2rem;
  text-align: center;
  flex-shrink: 0;
}
.rank-row .avatar {
  width: 52px;
}
.rank-row > strong {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 1.05rem;
}
.rank-score {
  font-size: 1.2rem;
  font-weight: 900;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.rank-score small {
  font-size: 0.65rem;
  font-weight: 400;
  color: var(--muted);
}
.rank-change {
  font-size: 0.8rem;
  color: var(--muted);
  min-width: 28px;
  text-align: center;
}
.rank-change.up {
  color: #26724f;
}
.rank-change.down {
  color: #a5404e;
}
.rank-row.own-rank {
  outline: 2px solid var(--blue);
  outline-offset: 1px;
}
.waiting-note {
  font-size: 0.85rem;
}
.final-stage {
  max-width: 900px;
  margin: auto;
  text-align: center;
  padding: 10px 0 30px;
}
.final-stage > .eyebrow {
  justify-content: center;
}
.final-stage > p {
  margin: 16px 0;
}
.podium {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 18px;
  margin: 40px auto 28px;
  min-height: 350px;
  max-width: 720px;
}
.podium-winner {
  width: 31%;
  display: flex;
  align-items: center;
  flex-direction: column;
  position: relative;
  animation: podium-reveal 1s cubic-bezier(0.2, 0.8, 0.2, 1) both;
  animation-delay: var(--reveal-delay);
}
.podium-winner > .avatar {
  width: 125px;
  max-width: 100%;
}
.podium-name {
  font-family: "Trebuchet MS", Arial, sans-serif;
  font-weight: 900;
  font-size: 1.5rem;
  margin: 8px 0;
  overflow-wrap: anywhere;
  max-width: 100%;
}
.podium-score {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 16px;
}
.podium-block {
  background: #b9c9e7;
  border-radius: 16px 16px 0 0;
  width: 100%;
  height: 110px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  font-weight: 900;
  color: var(--ink);
  border-bottom: 6px solid #99b0da;
}
.place-1 .podium-block {
  height: 170px;
  background: var(--yellow);
  border-color: #e9b440;
}
.place-3 .podium-block {
  height: 75px;
  background: #efb08e;
  border-color: #d89674;
}
.place-1 > .avatar {
  width: 145px;
}
.winner-crown {
  font-size: 2.5rem;
  color: #aa7900;
  margin-bottom: -12px;
  animation: crown-bob 2s ease-in-out infinite;
}
.final-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin: 26px 0;
}
.full-ranking {
  max-width: 720px;
  margin: 30px auto 0;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}
.full-ranking > summary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  list-style: none;
}
.full-ranking .leaderboard {
  margin-top: 20px;
}
.confetti-layer {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 25;
}
.confetti {
  position: absolute;
  left: var(--x);
  top: -20px;
  width: 9px;
  height: 16px;
  background: var(--color);
  animation: confetti-fall 3.8s linear both;
  animation-delay: var(--delay);
}
.history-list {
  display: grid;
  gap: 20px;
  margin-top: 32px;
}
.history-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 24px;
}
.history-head {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
}
.history-head time {
  font-size: 0.8rem;
  color: var(--muted);
}
.history-head h2 {
  margin: 10px 0;
}
.history-head p {
  font-size: 0.85rem;
}
.history-winner {
  display: flex;
  align-items: center;
  gap: 8px;
}
.history-winner .avatar {
  width: 75px;
}
.history-winner > span {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 0.7rem;
  color: var(--muted);
}
.history-winner strong {
  font-size: 1rem;
  color: var(--ink);
}
.history-card details {
  margin-top: 16px;
  border-top: 1px solid var(--line);
}
.history-card details > .button {
  margin-top: 18px;
}
.loading-screen {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: 32px;
  text-align: center;
}
.loading-screen h1 {
  font-size: 2rem;
}
.loader {
  width: 40px;
  height: 40px;
  border: 4px solid var(--line);
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes avatar-bob {
  0%,
  100% {
    transform: translateY(0) rotate(-2deg);
  }
  50% {
    transform: translateY(-5px) rotate(2deg);
  }
}
@keyframes blink {
  0%,
  40%,
  44%,
  100% {
    transform: scaleY(1);
  }
  42% {
    transform: scaleY(0.12);
  }
}
@keyframes shadow-breathe {
  0%,
  100% {
    transform: scaleX(1);
  }
  50% {
    transform: scaleX(0.85);
  }
}
@keyframes pulse {
  50% {
    opacity: 0.3;
    transform: scale(0.8);
  }
}
@keyframes appear {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes question-arrive {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
@keyframes answer-arrive {
  from {
    opacity: 0;
    transform: translateY(22px) rotate(-1deg);
  }
  to {
    opacity: 1;
    transform: translateY(0) rotate(0);
  }
}
@keyframes podium-reveal {
  from {
    opacity: 0;
    transform: translateY(50px) scale(0.85);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
@keyframes crown-bob {
  50% {
    transform: translateY(-5px) rotate(5deg);
  }
}
@keyframes confetti-fall {
  from {
    transform: translateY(-30px) rotate(0);
  }
  to {
    transform: translateY(110vh) rotate(var(--rotate));
  }
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
@media (min-width: 1600px) {
  .game-main {
    max-width: 1500px;
  }
  .question-title {
    font-size: 3.5rem;
  }
  .answer-card {
    min-height: 180px;
    font-size: 2rem;
  }
  .game-top {
    padding-block: 22px;
  }
  .invite-board {
    max-width: 1200px;
  }
  .qr-wrap {
    width: 350px;
  }
}
@media (max-width: 1100px) {
  .site-shell {
    padding: 0 28px;
  }
  .topbar {
    gap: 12px;
  }
  .topbar nav {
    gap: 3px;
  }
  .hero {
    gap: 35px;
    padding: 60px 0;
  }
  .hero h1 {
    font-size: 3.6rem;
  }
  .hero-board {
    padding: 22px 18px;
  }
  .board-top {
    font-size: 0.55rem;
  }
  .board-live {
    display: none;
  }
  .hero-question {
    font-size: 2.1rem;
  }
  .home-bottom {
    grid-template-columns: 1fr 1fr;
  }
  .home-bottom > .button {
    grid-column: 2;
    justify-self: start;
  }
  .home-bottom > p {
    grid-column: 2;
  }
  .home-bottom > div {
    grid-row: 1/3;
  }
  .builder-layout {
    grid-template-columns: 215px minmax(0, 1fr);
    gap: 22px;
  }
  .question-editor {
    padding: 22px;
  }
  .answers-editor {
    grid-template-columns: 1fr;
  }
  .qr-wrap {
    width: 260px;
  }
  .invite-board {
    gap: 30px;
  }
  .quiz-library {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 760px) {
  .site-shell {
    padding: 0 20px;
  }
  .topbar {
    min-height: 88px;
    gap: 14px;
    align-items: flex-start;
    padding: 18px 0;
  }
  .brand {
    font-size: 2.8rem;
  }
  .topbar nav {
    gap: 4px;
    align-items: center;
  }
  .nav-link {
    font-size: 0.78rem;
    padding: 12px 8px;
    min-height: 44px;
  }
  .nav-create {
    display: none;
  }
  .profile-link > span:not(.avatar) {
    display: none;
  }
  .profile-link .avatar {
    width: 38px;
  }
  .hero {
    grid-template-columns: 1fr;
    gap: 38px;
    padding: 38px 0 44px;
  }
  .hero-copy {
    text-align: center;
  }
  .hero-copy > .eyebrow {
    justify-content: center;
  }
  .hero h1 {
    font-size: clamp(3.25rem, 10vw, 4.6rem);
  }
  .hero .lead {
    font-size: 1rem;
    margin: 22px 0;
  }
  .join-strip {
    margin: auto;
  }
  .hero-board {
    max-width: 490px;
    width: calc(100% - 16px);
    margin: 0 auto;
    padding: 24px;
  }
  .board-top {
    font-size: 0.6rem;
  }
  .board-live {
    display: block;
  }
  .hero-question {
    font-size: 2.3rem;
  }
  .board-stamp {
    right: -15px;
  }
  .home-bottom {
    grid-template-columns: 1fr;
    gap: 18px;
    padding-top: 26px;
    text-align: center;
  }
  .home-bottom > div,
  .home-bottom > p,
  .home-bottom > .button {
    grid-column: 1;
    grid-row: auto;
  }
  .home-bottom > .button {
    justify-self: center;
  }
  .home-bottom h2 {
    font-size: 1.8rem;
  }
  .site-footer {
    font-size: 0.7rem;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    text-align: center;
    margin-top: 36px;
  }
  .center-page {
    padding: 28px 0 10px;
  }
  .panel {
    padding: 26px 22px;
  }
  .panel h1 {
    font-size: 2.1rem;
  }
  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }
  .section-heading h1 {
    font-size: 2.5rem;
  }
  .library-page {
    padding: 32px 0;
  }
  .quiz-library {
    grid-template-columns: 1fr;
  }
  .builder-page {
    padding: 26px 0;
  }
  .builder-heading {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
  }
  .builder-actions {
    justify-content: flex-end;
  }
  .builder-actions .button {
    flex: 1;
  }
  .tutorial {
    padding: 16px;
    gap: 8px;
  }
  .tutorial strong {
    font-size: 0.9rem;
  }
  .tutorial p {
    font-size: 0.78rem;
  }
  .tutorial .icon-button {
    width: 44px;
    height: 44px;
  }
  .builder-layout {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .questions-sidebar {
    display: flex;
    flex-direction: column;
    padding: 0;
  }
  .sidebar-label {
    margin-bottom: 10px;
  }
  .question-tabs {
    display: flex;
    overflow-x: auto;
    max-height: none;
    margin: 0 0 8px;
    padding: 4px;
    gap: 8px;
  }
  .question-tab {
    width: 180px;
    flex-shrink: 0;
    background: #ffffff60;
    padding: 8px;
  }
  .questions-sidebar > .button {
    margin-top: 8px;
  }
  .csv-tools {
    margin-top: 16px;
    padding-top: 14px;
    grid-template-columns: 1fr 1fr;
    column-gap: 12px;
  }
  .csv-tools > .mini-label,
  .csv-tools > .helper {
    grid-column: 1/-1;
  }
  .csv-tools > .button {
    align-items: flex-start;
    line-height: 1.4;
    font-size: 0.77rem;
  }
  .question-editor {
    padding: 20px;
  }
  .empty-editor {
    min-height: 300px;
    padding: 20px 0;
  }
  .answers-heading {
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
  }
  .answers-editor {
    gap: 10px;
  }
  .media-tools {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  .duration-row {
    gap: 16px;
  }
  .duration-row > .helper {
    margin-top: 0;
    flex-basis: 100%;
  }
  .game-top {
    padding: 12px 16px;
    gap: 10px;
    flex-wrap: wrap;
  }
  .game-top .brand {
    font-size: 2.4rem;
  }
  .game-meta {
    margin-left: auto;
    align-items: flex-end;
    gap: 3px;
  }
  .game-actions {
    margin-left: auto;
    gap: 8px;
  }
  .game-actions:has(.next-button) {
    width: 100%;
    justify-content: space-between;
    border-top: 1px solid var(--line);
    padding-top: 10px;
  }
  .next-button {
    margin-left: auto;
    max-width: calc(100% - 56px);
  }
  .game-top .icon-button {
    width: 44px;
    height: 44px;
  }
  .room-pin {
    font-size: 1.1rem;
  }
  .connection-state {
    font-size: 0.63rem;
    max-width: 200px;
  }
  .game-main {
    padding: 26px 18px 40px;
  }
  .lobby-heading h1 {
    font-size: 2.2rem;
  }
  .lobby-heading p {
    font-size: 0.9rem;
  }
  .invite-board {
    flex-direction: column;
    gap: 16px;
    padding: 20px 12px;
    margin: 24px auto;
    border-radius: 20px;
  }
  .qr-wrap {
    width: min(260px, 100%);
  }
  .invite-code {
    width: 100%;
  }
  .invite-code p {
    font-size: 0.8rem;
  }
  .join-domain {
    font-size: 1.6rem;
    margin-bottom: 10px;
  }
  .giant-pin {
    font-size: clamp(2.6rem, 10vw, 4rem);
    margin-bottom: 16px;
  }
  .players-heading {
    align-items: flex-start;
    gap: 10px;
    flex-direction: column;
  }
  .player-cloud {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }
  .player-chip {
    padding: 6px 5px 12px;
  }
  .player-chip .avatar {
    width: 56px;
  }
  .player-chip strong {
    font-size: 0.75rem;
  }
  .player-chip > span:not(.avatar) {
    font-size: 0.55rem;
  }
  .player-ready {
    margin: 24px auto;
  }
  .preview-stage {
    min-height: calc(100dvh - 235px);
  }
  .preview-stage h1 {
    font-size: 2.25rem;
  }
  .preview-label {
    font-size: 1rem;
  }
  .preview-count {
    font-size: 3rem;
    margin-top: 25px;
  }
  .question-meta {
    margin-bottom: 16px;
  }
  .question-title {
    font-size: 1.85rem;
    line-height: 1.15;
    margin-top: 18px;
  }
  .timer-pill {
    padding: 8px 10px;
  }
  .timer-pill small {
    font-size: 0.6rem;
  }
  .timer-pill > span {
    font-size: 1.25rem;
  }
  .answer-grid {
    gap: 12px;
    grid-template-columns: 1fr;
  }
  .answer-card {
    min-height: 80px;
    padding: 16px;
    gap: 16px;
    font-size: 1.16rem;
    border-radius: 14px;
    box-shadow: 0 4px 0 color-mix(in srgb, var(--card-color) 70%, var(--ink));
  }
  .answer-shape {
    font-size: 1.2rem;
  }
  .question-bottom {
    flex-direction: column;
    align-items: stretch;
    margin-top: 24px;
    gap: 14px;
    text-align: center;
  }
  .vote-count strong {
    font-size: 0.8rem;
  }
  .vote-count small {
    font-size: 0.65rem;
  }
  .question-bottom > .ready-pill {
    justify-content: center;
  }
  .question-bottom > .button {
    width: 100%;
  }
  .question-media {
    height: 180px;
  }
  .answer-hint {
    font-size: 0.8rem;
    margin-bottom: 16px;
  }
  .answer-feedback {
    flex-direction: column;
    gap: 4px;
    font-size: 0.85rem;
    padding: 12px;
  }
  .ranking-stage h1 {
    font-size: 2.2rem;
  }
  .rank-row {
    padding: 8px 10px;
    gap: 10px;
    min-height: 68px;
    border-radius: 12px;
  }
  .rank-number {
    width: 20px;
    font-size: 1rem;
  }
  .rank-row .avatar {
    width: 40px;
  }
  .rank-row > strong {
    font-size: 0.85rem;
  }
  .rank-score {
    font-size: 1rem;
  }
  .rank-score small {
    display: none;
  }
  .rank-change {
    font-size: 0.7rem;
    min-width: 22px;
  }
  .podium {
    gap: 8px;
    min-height: 280px;
    margin: 25px auto 22px;
  }
  .podium-name {
    font-size: 1rem;
    margin: 4px 0 8px;
  }
  .podium-score {
    font-size: 0.65rem;
    margin-bottom: 12px;
  }
  .podium-winner > .avatar {
    width: 95px;
  }
  .place-1 > .avatar {
    width: 105px;
  }
  .podium-block {
    height: 85px;
    font-size: 3rem;
    border-radius: 12px 12px 0 0;
  }
  .place-1 .podium-block {
    height: 130px;
  }
  .place-3 .podium-block {
    height: 60px;
  }
  .final-stage h1 {
    font-size: 2.2rem;
  }
  .winner-crown {
    font-size: 1.8rem;
  }
  .final-actions {
    gap: 10px;
  }
  .final-actions .button {
    font-size: 0.85rem;
  }
  .history-card {
    padding: 18px;
  }
  .history-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }
  .history-winner .avatar {
    width: 52px;
  }
  .history-card h2 {
    font-size: 1.5rem;
  }
  .notice {
    flex-direction: column;
    align-items: flex-start;
  }
  .notice > .button {
    width: 100%;
  }
  dialog {
    padding: 22px;
  }
  .dialog-heading h2 {
    font-size: 1.5rem;
  }
}
@media (max-width: 380px) {
  .site-shell {
    padding: 0 14px;
  }
  .topbar nav {
    gap: 0;
  }
  .nav-link {
    padding-inline: 6px;
    font-size: 0.72rem;
  }
  .hero h1 {
    font-size: 3rem;
  }
  .join-strip {
    padding: 5px;
    gap: 2px;
  }
  .join-strip input {
    padding: 12px 5px;
    font-size: 1.45rem !important;
  }
  .join-strip .button {
    padding-inline: 12px;
    font-size: 0.85rem;
  }
  .hero-board {
    padding: 22px 14px;
  }
  .hero-question {
    font-size: 2rem;
  }
  .board-top {
    font-size: 0.53rem;
  }
  .board-answer {
    font-size: 0.75rem;
    padding: 14px;
  }
  .panel {
    padding: 22px 16px;
  }
  .avatar-options {
    gap: 7px;
  }
  .chip {
    padding: 10px;
    font-size: 0.78rem;
  }
  .game-main {
    padding-inline: 14px;
  }
  .rank-row {
    gap: 7px;
  }
  .rank-row .avatar {
    width: 32px;
  }
  .rank-score {
    font-size: 0.9rem;
  }
}
@media (max-height: 550px) and (orientation: landscape) {
  .game-top {
    position: relative;
  }
  .game-main {
    padding-top: 20px;
  }
  .preview-stage {
    min-height: 280px;
  }
  .answer-grid {
    grid-template-columns: 1fr 1fr;
  }
  .answer-card {
    min-height: 80px;
  }
  .question-media {
    height: 130px;
  }
  .hero {
    padding-top: 30px;
  }
  .podium {
    min-height: 240px;
  }
  .game-actions:has(.next-button) {
    width: auto;
    border: 0;
    padding: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
  .confetti-layer {
    display: none;
  }
  .podium-winner {
    opacity: 1;
    transform: none;
  }
}
.skip-link {
  position: fixed;
  top: 8px;
  left: 16px;
  z-index: 200;
  transform: translateY(-150%);
  background: white;
  padding: 14px 20px;
  border: 2px solid var(--blue);
  border-radius: 10px;
  font-weight: 700;
}
.skip-link:focus {
  transform: translateY(0);
}
.correct-choice {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  min-height: 44px;
  flex-shrink: 0;
  cursor: pointer;
}
.profile-link {
  min-width: 44px;
}
.answer-edit {
  gap: 5px;
}
h1,
h2,
h3,
p,
.eyebrow {
  overflow-wrap: anywhere;
}
.section-heading > .button {
  flex-shrink: 0;
}
