@property --hue {
  syntax: "<number>";
  inherits: true;
  initial-value: 218;
}

:root {
  --hue: 218;
  --bg: hsl(var(--hue) 95% 55%);
  --bg-soft: hsl(var(--hue) 95% 68%);
  --ink: #080808;
  --paper: #fff;
  --line: color-mix(in srgb, var(--ink) 18%, transparent);
  --field-height: 72px;
  --panel-width: 560px;
  --brand-bottom: 0px;
  --weasel-height: clamp(64px, 10svh, 92px);
  --brand-word-height: clamp(18px, 3svh, 28px);
  --lobby-heavy-shadow:
    0.25px 0 currentColor,
    -0.25px 0 currentColor,
    0 0.25px currentColor,
    0 -0.25px currentColor;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  overflow-x: hidden;
  overscroll-behavior-y: none;
  touch-action: manipulation;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 50% 0%, var(--bg-soft), transparent 44rem),
    var(--bg);
  font-family: Arial Black, Arial, Helvetica, sans-serif;
  font-weight: 900;
  transition: --hue 900ms ease, background-color 900ms ease;
}

button,
input,
a {
  font: inherit;
  font-weight: 900;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

.shell {
  position: relative;
  width: 100%;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 20px 18px calc(var(--weasel-height) + 16px);
  overflow-x: clip;
}

.join-panel {
  width: min(100%, 720px);
  display: grid;
  justify-items: center;
  gap: 16px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  clip-path: inset(50%);
}

.logo {
  display: block;
  width: min(100%, 440px);
  height: auto;
  margin: 0 0 8px;
}

.join-form {
  width: min(100%, var(--panel-width));
  display: grid;
  gap: 14px;
}

.field {
  height: var(--field-height);
  display: grid;
  grid-template-columns: 78px 1px minmax(0, 1fr);
  align-items: center;
  overflow: hidden;
  background: var(--paper);
  border: 4px solid var(--ink);
  border-radius: 22px;
  box-shadow: 0 6px 0 rgb(0 0 0 / 0.12);
}

.field-icon {
  display: grid;
  place-items: center;
  height: 100%;
  line-height: 1;
}

.field-icon img {
  display: block;
  width: 44px;
  height: 44px;
  object-fit: contain;
}

.field-divider {
  height: 52%;
  background: var(--line);
}

.field input {
  width: 100%;
  min-width: 0;
  height: 100%;
  padding: 0 26px;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  font-size: 38px;
  letter-spacing: 0;
  text-transform: uppercase;
}

#host-email,
#host-password,
#host-password-repeat {
  text-transform: none;
}

.password-field {
  grid-template-columns: 78px 1px minmax(0, 1fr) 58px;
}

.password-field input {
  padding-right: 12px;
}

.password-reveal-button {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.password-reveal-button img {
  display: block;
  width: 34px;
  height: 34px;
  object-fit: contain;
  pointer-events: none;
}

.field input::placeholder {
  color: rgb(0 0 0 / 0.36);
  text-transform: uppercase;
}

.field:focus-within {
  box-shadow: 0 0 0 5px rgb(255 255 255 / 0.5), 0 6px 0 rgb(0 0 0 / 0.12);
}

.play-button,
.host-button {
  width: min(100%, var(--panel-width));
  min-height: 74px;
  border: 4px solid var(--ink);
  border-radius: 22px;
  text-transform: uppercase;
}

.play-button {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 0 34px;
  color: var(--paper);
  background: var(--ink);
  font-size: 54px;
  box-shadow: 0 7px 0 rgb(0 0 0 / 0.2);
}

.play-button span:first-child {
  justify-self: center;
}

.play-button:disabled {
  cursor: wait;
  opacity: 0.62;
  transform: none;
}

.play-button.is-disabled {
  cursor: default;
  opacity: 0.54;
  transform: none;
}

.button-icon {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
}

.button-icon img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.play-arrow {
  justify-self: end;
  filter: invert(1);
}

.plus-icon {
  width: 32px;
  height: 32px;
}

.host-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: 0 26px;
  color: var(--ink);
  background: transparent;
  font-size: 34px;
}

.landing-panel .play-button,
.landing-panel .host-button {
  border-radius: 8px;
  box-shadow: none;
}

.landing-panel .field,
.host-login-panel .field {
  border: 6px solid var(--paper);
  border-radius: 8px;
  box-shadow: none;
}

.landing-panel .field input,
.host-login-panel .field input {
  color: var(--bg);
}

.landing-panel .field:focus-within,
.host-login-panel .field:focus-within {
  box-shadow: none;
}

.landing-panel .play-button {
  border: 0;
}

.landing-panel .host-button {
  color: var(--ink);
  background: transparent;
  border-color: var(--ink);
}

.landing-panel .login-toggle-button {
  margin-top: -2px;
}

.landing-panel .how-to-play-button {
  margin-top: -2px;
  text-decoration: none;
}

.host-login-panel .create-room-button {
  border: 0;
  border-radius: 8px;
  box-shadow: none;
}

.host-login-panel .upgrade-button {
  border: 0;
  border-radius: 8px;
  box-shadow: none;
}

.logo-link {
  display: grid;
  place-items: center;
  width: 100%;
}

.host-shell {
  padding-top: 18px;
}

.host-panel {
  position: relative;
  width: min(calc(100vw - 36px), 620px);
  gap: 12px;
}

.host-panel .logo-link,
.host-panel .screen-title-graphic,
.host-panel .host-form {
  width: min(calc(100vw - 36px), 620px);
}

.host-logo {
  width: min(100%, 280px);
  margin-bottom: -2px;
}

.screen-title-graphic {
  display: block;
  height: auto;
  margin: 0;
}

.host-form {
  width: min(100%, 620px);
  display: grid;
  gap: 12px;
}

.host-form .field input {
  font-size: 30px;
}

.host-setup-panel {
  gap: 10px;
}

.host-back-button {
  margin-top: 2px;
}

.login-switch-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 14px;
  border: 0;
  background: transparent;
  color: var(--ink);
  box-shadow: none;
  font-size: clamp(24px, 7vw, 36px);
  line-height: 1;
  text-transform: uppercase;
}

.login-switch-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
}

.login-switch-icon img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.host-setup-panel .host-back-button {
  filter: none;
}

.host-cancel-button {
  display: inline-grid;
  grid-template-columns: 34px auto;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
  padding: 4px 14px 4px 10px;
  border: 3px solid var(--ink);
  border-radius: 6px;
  background: transparent;
  color: var(--ink);
  box-shadow: none;
  font-size: clamp(22px, 5.6vw, 31px);
  line-height: 1;
  text-transform: uppercase;
}

.host-cancel-button img {
  display: block;
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.lobby-cancel-button {
  margin-top: 6px;
}

.host-setup-panel .host-form {
  width: 100%;
  justify-items: center;
}

.host-name-field {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr);
  align-items: center;
  width: 100%;
  height: 72px;
  border: 6px solid var(--paper);
  border-radius: 8px;
  background: var(--paper);
}

.host-name-icon {
  display: grid;
  place-items: center;
  height: 100%;
}

.host-name-icon img {
  display: block;
  width: 38px;
  height: 38px;
  object-fit: contain;
  filter: brightness(0);
}

.host-name-field input {
  width: 100%;
  height: 100%;
  min-width: 0;
  padding: 0 18px 0 0;
  border: 0;
  outline: 0;
  color: var(--bg);
  background: transparent;
  font-family: inherit;
  font-size: 34px;
  font-weight: 900;
  line-height: 1;
  text-align: center;
  text-transform: uppercase;
}

.host-name-field input::placeholder {
  color: rgb(0 0 0 / 0.36);
}

.option-group {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.option-group legend {
  margin: 0 0 6px;
  padding: 0 4px;
  font-size: 18px;
  line-height: 1;
  text-transform: uppercase;
  text-shadow: var(--lobby-heavy-shadow);
  -webkit-text-stroke: 0.1px currentColor;
}

.host-options-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
}

.host-setup-panel .host-options-grid,
.host-setup-panel .option-group,
.host-setup-panel .create-room-button {
  width: 100%;
}

.segmented-control,
.room-size-grid {
  display: grid;
  gap: 8px;
}

.segmented-control {
  grid-template-columns: repeat(3, 1fr);
}

.room-size-grid {
  grid-template-columns: repeat(5, 1fr);
}

.segmented-control label,
.room-size-option,
.toggle-row,
.upgrade-button {
  min-height: 58px;
  border: 4px solid var(--ink);
  border-radius: 18px;
  background: var(--paper);
  box-shadow: 0 5px 0 rgb(0 0 0 / 0.12);
}

.segmented-control label,
.room-size-option {
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.segmented-control input,
.room-size-option input,
.toggle-row input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.segmented-control span,
.room-size-option span {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  padding: 0 8px;
  font-size: 28px;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
}

.host-setup-panel .segmented-control label,
.host-setup-panel .room-size-option {
  min-height: 62px;
  border: 6px solid var(--paper);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: none;
}

.host-setup-panel .segmented-control span,
.host-setup-panel .room-size-option span {
  color: var(--bg);
  font-size: 26px;
}

.host-setup-panel .segmented-control label:has(input:checked),
.host-setup-panel .room-size-option:has(input:checked) {
  border-color: #333;
  background: #333;
}

.host-setup-panel .segmented-control input:checked + span,
.host-setup-panel .room-size-option input:checked + span {
  color: var(--paper);
  background: #333;
}

.host-setup-panel .room-size-option.is-locked {
  border-color: rgb(255 255 255 / 0.58);
  background: rgb(255 255 255 / 0.58);
}

.host-setup-panel .room-size-option.is-locked span {
  color: rgb(0 0 0 / 0.32);
  background:
    repeating-linear-gradient(
      135deg,
      rgb(0 0 0 / 0.14) 0 8px,
      transparent 8px 16px
    ),
    transparent;
}

.segmented-control input:checked + span,
.room-size-option input:checked + span {
  color: var(--paper);
  background: var(--ink);
}

.room-size-option.is-locked span {
  color: rgb(0 0 0 / 0.35);
  background:
    linear-gradient(135deg, transparent 0 44%, rgb(0 0 0 / 0.16) 45% 55%, transparent 56%),
    var(--paper);
}

.toggle-row {
  position: relative;
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  padding: 0 18px;
  font-size: 28px;
  text-transform: uppercase;
}

.toggle-visual {
  width: 48px;
  height: 30px;
  border: 4px solid var(--ink);
  border-radius: 999px;
  background: var(--paper);
}

.toggle-visual::before {
  content: "";
  display: block;
  width: 16px;
  height: 16px;
  margin: 3px;
  border-radius: 50%;
  background: var(--ink);
  transition: transform 160ms ease;
}

.toggle-row input:checked + .toggle-visual {
  background: var(--ink);
}

.toggle-row input:checked + .toggle-visual::before {
  background: var(--paper);
  transform: translateX(18px);
}

.upgrade-button {
  color: var(--ink);
  background: transparent;
  font-size: 25px;
  text-transform: uppercase;
}

.create-room-button {
  width: min(calc(100vw - 36px), 620px);
  max-width: 100%;
  min-height: 68px;
  font-size: 38px;
}

.host-setup-panel .create-room-button {
  grid-template-columns: minmax(0, 1fr) 48px;
  min-height: 64px;
  padding: 0 20px;
  border-color: var(--ink);
  border-radius: 8px;
  box-shadow: none;
  font-size: 36px;
}

.host-setup-panel .create-room-button .button-icon {
  width: 48px;
  height: 48px;
}

.create-room-button span:first-child {
  white-space: nowrap;
}

.host-status {
  max-width: var(--panel-width);
}

.lobby-shell {
  padding-top: 14px;
}

.lobby-panel {
  width: min(calc(100vw - 28px), 760px);
  display: grid;
  justify-items: center;
  gap: 16px;
}

.lobby-topbar,
.lobby-name-row,
.lobby-name-field,
.avatar-section,
.activity-pop,
.lobby-status-stack,
.lobby-phrase,
.lobby-primary-button {
  width: min(100%, var(--panel-width));
}

.lobby-topbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(8px, 2.5vw, 18px);
}

.lobby-topbar .logo-link {
  justify-items: start;
}

.lobby-logo {
  width: min(100%, 348px);
  margin: 0;
}

.room-lockup {
  min-width: 114px;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: center;
  text-transform: uppercase;
  transform: translateX(-8px);
}

.room-lockup h1,
.room-lockup span {
  display: block;
  margin: 0;
  color: var(--paper);
  line-height: 0.95;
  text-shadow:
    -4px -4px 0 var(--ink),
    4px -4px 0 var(--ink),
    -4px 4px 0 var(--ink),
    4px 4px 0 var(--ink),
    0 7px 0 var(--ink);
}

.room-lockup h1 {
  font-size: 31px;
}

.room-lockup span {
  margin-top: 5px;
  font-size: 49px;
}

.lobby-name-row {
  display: grid;
  place-items: center;
  min-height: 54px;
  color: var(--ink);
  font-size: 34px;
  line-height: 1;
  text-align: center;
  text-transform: uppercase;
}

.lobby-name-field {
  justify-self: center;
  width: min(calc(100% - 18px), 540px);
  margin-inline: auto;
  height: 64px;
  border: 6px solid var(--paper);
  border-radius: 8px;
  box-shadow: none;
}

.lobby-name-field input {
  font-size: 34px;
  color: var(--bg);
  text-shadow: none;
  -webkit-text-stroke: 0;
}

.lobby-name-field:focus-within {
  box-shadow: none;
}

.avatar-section,
.activity-pop {
  min-width: 0;
}

.avatar-section-header {
  margin-bottom: 12px;
  text-align: center;
  text-transform: uppercase;
}

.avatar-section-header span {
  font-size: 30px;
  font-family: Arial, Helvetica, sans-serif;
  font-weight: 800;
  text-shadow: none;
  -webkit-text-stroke: 0;
}

.avatar-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0;
  padding: 0 10px;
}

.avatar-choice {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  background: transparent;
  filter: drop-shadow(0 4px 0 rgb(0 0 0 / 0.18));
  transform: scale(1);
  transition: filter 150ms ease, opacity 150ms ease, transform 150ms ease;
}

.avatar-choice img {
  width: 100%;
  max-width: 92px;
  aspect-ratio: 1;
  height: auto;
  object-fit: contain;
  pointer-events: none;
}

.avatar-choice.is-selected {
  z-index: 5;
  filter:
    drop-shadow(0 0 10px rgb(255 255 255 / 0.98))
    drop-shadow(0 0 3px rgb(255 255 255 / 1))
    drop-shadow(0 7px 0 rgb(0 0 0 / 0.24));
  transform: scale(1.25);
}

.avatar-choice.is-taken {
  opacity: 0.28;
  filter: grayscale(1);
}

.avatar-count {
  position: absolute;
  right: 5px;
  bottom: 6px;
  display: grid;
  place-items: center;
  min-width: 25px;
  height: 25px;
  padding: 0 6px;
  border: 3px solid var(--ink);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 15px;
  font-weight: 800;
  line-height: 1;
  pointer-events: none;
}

.avatar-choice.is-selected .avatar-count {
  right: 0;
  bottom: 1px;
}

.activity-pop {
  position: relative;
  min-height: 48px;
  margin: 0;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 220ms ease, transform 220ms ease;
  display: grid;
  grid-template-columns: 52px minmax(0, auto) 52px;
  align-items: center;
  justify-content: center;
  column-gap: 8px;
  font-size: 30px;
  font-family: Arial, Helvetica, sans-serif;
  font-weight: 800;
  line-height: 1;
  text-align: center;
  text-transform: uppercase;
  text-shadow: none;
  -webkit-text-stroke: 0;
  white-space: nowrap;
  will-change: transform, opacity;
}

.activity-avatar-slot {
  display: grid;
  place-items: center;
  width: 52px;
  height: 48px;
}

.activity-avatar-slot img {
  width: 42px;
  height: 42px;
  object-fit: contain;
  filter: drop-shadow(0 3px 0 rgb(0 0 0 / 0.16));
}

.activity-text {
  min-width: 0;
  max-width: min(100%, calc(100vw - 140px));
  overflow: hidden;
  text-overflow: ellipsis;
}

.activity-pop.is-showing {
  opacity: 1;
  transform: translateY(0);
}

.activity-pop.is-swiping {
  animation: status-swipe-in 460ms cubic-bezier(0.2, 0.72, 0.22, 1) both;
}

.lobby-status-stack {
  width: min(100%, var(--panel-width));
  display: grid;
  grid-template-rows: 48px minmax(0, auto);
  gap: 8px;
  justify-items: center;
}

.lobby-phrase {
  min-height: 72px;
  display: grid;
  place-items: center;
  margin: 0;
  padding: 0 16px;
  border: 0;
  background: transparent;
  font-size: 27px;
  font-family: Arial, Helvetica, sans-serif;
  font-weight: 800;
  line-height: 1.05;
  text-align: center;
  text-transform: uppercase;
  text-wrap: balance;
  text-shadow: none;
  -webkit-text-stroke: 0;
}

.room-exit-button {
  display: grid;
  place-items: center;
  width: 66px;
  height: 50px;
  padding: 0;
  border: 0;
  background: transparent;
  opacity: 0.82;
  filter: drop-shadow(0 3px 0 rgb(0 0 0 / 0.18));
}

.room-exit-button img {
  display: block;
  width: 42px;
  height: 42px;
  object-fit: contain;
}

.room-exit-button:active {
  transform: translateY(2px);
}

.lobby-primary-button {
  min-height: 62px;
  border: 0;
  border-radius: 6px;
  box-shadow: none;
  font-size: 31px;
  text-shadow: none;
  -webkit-text-stroke: 0;
}

.lobby-primary-button:disabled,
.lobby-primary-button.is-disabled {
  cursor: default;
  opacity: 0.54;
}

.lobby-primary-button .play-arrow {
  width: 44px;
  height: 44px;
}

.lobby-primary-button.is-ready {
  background: var(--paper);
  color: var(--ink);
}

.ready-check {
  justify-self: end;
  width: 44px;
  height: 44px;
  opacity: 0;
  border: solid currentColor;
  border-width: 0 8px 8px 0;
  transform: rotate(45deg) translate(-6px, -6px);
}

.lobby-primary-button.is-ready .ready-check {
  opacity: 1;
}

.sound-room-help {
  position: relative;
  justify-self: center;
  width: min(100%, var(--panel-width));
  margin: 0 auto;
  padding: 0;
  display: grid;
  justify-items: center;
  gap: 8px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  font-family: Arial, Helvetica, sans-serif;
  font-weight: 800;
  text-transform: uppercase;
}

.sound-room-help::after {
  content: none;
}

.sound-room-help p {
  margin: 0;
  color: var(--paper);
  font-size: clamp(16px, 4vw, 22px);
  line-height: 1;
  text-align: center;
}

.sound-room-help div {
  width: min(100%, 520px);
  max-width: min(100%, 520px);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  justify-self: center;
}

.sound-room-help button {
  min-width: 0;
  min-height: 42px;
  padding: 4px 8px;
  border: 0;
  border-radius: 4px;
  background: color-mix(in srgb, var(--paper) 62%, var(--ink) 38%);
  color: var(--bg);
  box-shadow: none;
  font-family: Arial, Helvetica, sans-serif;
  font-size: clamp(16px, 4.2vw, 24px);
  font-weight: 800;
  line-height: 1;
  text-transform: uppercase;
}

.sound-room-help button.is-selected {
  background: var(--paper);
  color: var(--bg);
}

.orientation-guard {
  display: none;
}

@media (orientation: landscape) and (max-height: 520px) and (pointer: coarse) {
  .orientation-guard {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: grid;
    place-items: center;
    padding: 24px;
    background: var(--bg);
    color: var(--paper);
    text-align: center;
    text-transform: uppercase;
  }

  .orientation-guard div {
    display: grid;
    place-items: center;
    min-height: 64px;
    width: min(100%, 360px);
    padding: 10px 18px;
    border: 0;
    border-radius: 6px;
    background: var(--paper);
    color: var(--ink);
    font-size: clamp(28px, 8vw, 52px);
    line-height: 0.95;
  }
}

.play-button:active,
.host-button:active {
  transform: translateY(3px);
}

.status {
  min-height: 24px;
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  font-weight: 800;
  font-size: 16px;
  text-align: center;
}

.dashboard-shell {
  place-items: start center;
  padding-top: max(14px, env(safe-area-inset-top));
}

.dashboard-panel {
  width: min(calc(100vw - 28px), 760px);
  display: grid;
  justify-items: center;
  gap: 8px;
}

.dashboard-logo {
  width: min(100%, 210px);
  margin: 0;
}

.dashboard-title-graphic {
  width: min(100%, 360px);
  max-height: 66px;
  object-fit: contain;
}

.dashboard-title {
  margin: -2px 0 0;
  color: var(--paper);
  font-size: clamp(34px, 8vw, 62px);
  line-height: 0.95;
  text-align: center;
  text-transform: uppercase;
  text-shadow:
    -4px -4px 0 var(--ink),
    4px -4px 0 var(--ink),
    -4px 4px 0 var(--ink),
    4px 4px 0 var(--ink),
    0 7px 0 var(--ink);
}

.dashboard-updated {
  min-height: 18px;
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.dashboard-grid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.dashboard-card {
  min-width: 0;
  display: grid;
  gap: 6px;
  align-content: center;
  min-height: 96px;
  padding: 11px 10px 9px;
  border: 4px solid var(--ink);
  border-radius: 18px;
  background: rgb(255 255 255 / 0.78);
  box-shadow: 0 7px 0 rgb(0 0 0 / 0.16);
  text-align: center;
}

.dashboard-label {
  min-height: 24px;
  display: grid;
  place-items: center;
  font-size: clamp(13px, 2.5vw, 19px);
  line-height: 1;
  text-transform: uppercase;
}

.dashboard-card strong {
  display: block;
  font-size: clamp(36px, 7vw, 62px);
  line-height: 0.9;
}

.dashboard-status {
  min-height: 0;
  text-transform: uppercase;
}

.question-shell {
  place-items: start center;
  padding-top: 16px;
}

.question-preview-panel {
  width: min(calc(100vw - 28px), 820px);
  display: grid;
  justify-items: center;
  gap: 14px;
}

.pre-game-panel,
.waiting-panel {
  width: min(calc(100vw - 28px), 720px);
  display: grid;
  justify-items: center;
  align-content: center;
  min-height: calc(100svh - var(--weasel-height) - 86px);
  gap: 14px;
  text-align: center;
  text-transform: uppercase;
}

.pre-game-panel .lobby-logo {
  justify-self: center;
}

.pre-game-sequence {
  align-content: start;
  min-height: calc(100svh - var(--weasel-height) - 34px);
  padding-top: clamp(6px, 2svh, 18px);
  gap: clamp(8px, 2svh, 16px);
}

.pre-game-logo {
  width: min(54vw, 260px);
  margin: 0;
}

.pre-game-reveal-stack {
  display: grid;
  justify-items: center;
  gap: clamp(5px, 1.1svh, 10px);
}

.pre-game-reveal-line,
.pre-game-prize-group {
  margin: 0;
  color: var(--paper);
  text-transform: uppercase;
  text-shadow: none;
  transform: scale(0);
  animation: pop-overshoot 420ms cubic-bezier(.17, .89, .28, 1.32) forwards;
}

.pre-game-reveal-line {
  font-size: clamp(27px, 7.4vw, 52px);
  line-height: 0.94;
}

.pre-game-players-line span {
  display: inline-block;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.78em;
  font-weight: 700;
  line-height: 1;
  text-transform: lowercase;
  transform: translateY(-0.03em);
}

.pre-game-reveal-line:nth-child(1) {
  animation-delay: 1s;
}

.pre-game-reveal-line:nth-child(2) {
  animation-delay: 1.5s;
}

.pre-game-reveal-line:nth-child(3) {
  animation-delay: 2s;
}

.pre-game-prize-group {
  display: grid;
  justify-items: center;
  gap: clamp(8px, 2svh, 16px);
  margin-top: clamp(5px, 1.2svh, 10px);
  animation-delay: 2.5s;
}

.pre-game-prize-group p,
.pre-game-prize-group span {
  margin: 0;
  color: var(--paper);
  line-height: 0.92;
}

.pre-game-prize-group p {
  font-size: clamp(40px, 12vw, 84px);
}

.pre-game-prize-group span {
  font-size: clamp(22px, 5.8vw, 40px);
}

.pre-game-countdown-art {
  position: relative;
  width: clamp(112px, 32vw, 210px);
  aspect-ratio: 1;
  margin-top: clamp(2px, 1svh, 10px);
}

.countdown-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  transform: scale(0.2);
}

.countdown-art-3 {
  animation: countdown-pop-hold 1000ms cubic-bezier(.17, .89, .28, 1.32) 3.5s forwards;
}

.countdown-art-2 {
  animation: countdown-pop-hold 1000ms cubic-bezier(.17, .89, .28, 1.32) 4.48s forwards;
}

.countdown-art-1 {
  animation: countdown-pop-final 720ms cubic-bezier(.17, .89, .28, 1.32) 5.48s forwards;
}

.pre-game-kicker,
.pre-game-points,
.waiting-copy {
  margin: 0;
  font-size: clamp(24px, 6vw, 42px);
  line-height: 0.98;
  text-shadow: var(--lobby-heavy-shadow);
  -webkit-text-stroke: 0.12px currentColor;
}

.pre-game-title,
.waiting-title {
  margin: 0;
  color: var(--paper);
  font-size: clamp(58px, 18vw, 138px);
  line-height: 0.88;
  text-shadow:
    -5px -5px 0 var(--ink),
    5px -5px 0 var(--ink),
    -5px 5px 0 var(--ink),
    5px 5px 0 var(--ink),
    0 8px 0 var(--ink);
}

.waiting-title {
  text-shadow: none;
}

.waiting-game-panel {
  min-height: calc(100svh - var(--weasel-height) - 52px);
  align-content: start;
}

.waiting-topbar {
  width: min(100%, 720px);
}

.waiting-logo {
  display: block;
  width: 110px;
  height: 110px;
  object-fit: contain;
  filter: drop-shadow(0 3px 0 rgb(0 0 0 / 0.16));
}

.waiting-avatar-field {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: minmax(0, 1fr);
  align-items: center;
  justify-items: center;
  column-gap: clamp(6px, 2.4vw, 18px);
  row-gap: clamp(6px, 1.4svh, 12px);
  width: min(100%, 720px);
  height: min(66svh, 540px);
  margin-top: clamp(8px, 2svh, 18px);
}

.waiting-player {
  position: relative;
  left: auto;
  top: auto;
  display: grid;
  justify-items: center;
  gap: 4px;
  width: min(100%, 170px);
  text-align: center;
  text-transform: uppercase;
  transform: scale(1);
}

.waiting-player:nth-child(3n + 2) {
  transform: translateY(clamp(10px, 2.2svh, 18px)) scale(1);
}

.waiting-player img {
  width: clamp(87px, 22.5vw, 144px);
  height: auto;
  object-fit: contain;
  filter: grayscale(1) opacity(0.34);
  transition: filter 220ms ease;
}

.waiting-player span {
  width: min(100%, 30vw, 160px);
  overflow: hidden;
  color: var(--paper);
  font-size: clamp(12px, 3vw, 19px);
  line-height: 0.9;
  text-align: center;
  text-overflow: ellipsis;
  text-shadow: none;
  white-space: nowrap;
}

@media (min-width: 700px) and (min-height: 680px) {
  .waiting-avatar-field {
    height: min(76svh, 700px);
    row-gap: clamp(10px, 2svh, 20px);
  }
}

.waiting-player.just-answered {
  animation: waiting-player-pop 520ms cubic-bezier(.17, .89, .28, 1.32) var(--wait-delay) both;
}

.waiting-player.is-answered img {
  filter: grayscale(0) opacity(1) drop-shadow(0 5px 0 rgb(0 0 0 / 0.16));
}

.waiting-player.is-local span {
  color: var(--ink);
}

.pre-game-count {
  width: clamp(104px, 28vw, 160px);
  height: clamp(104px, 28vw, 160px);
  display: grid;
  place-items: center;
  margin: 4px 0 0;
  border: 6px solid var(--ink);
  border-radius: 50%;
  color: var(--paper);
  background: var(--ink);
  font-size: clamp(58px, 18vw, 112px);
  line-height: 1;
}

.waiting-avatar {
  width: clamp(130px, 36vw, 220px);
  height: auto;
  filter: drop-shadow(0 6px 0 rgb(0 0 0 / 0.16));
}

.waiting-timer {
  margin-top: 6px;
}

.results-panel,
.solution-panel {
  width: min(100%, 720px);
  display: grid;
  justify-items: center;
  align-content: center;
  min-height: calc(100svh - var(--weasel-height) - 86px);
  gap: 16px;
  text-align: center;
  text-transform: uppercase;
}

.results-reveal-panel {
  align-content: start;
  min-height: calc(100svh - var(--weasel-height) - 34px);
  padding-top: clamp(8px, 2svh, 20px);
  gap: clamp(6px, 1.5svh, 12px);
}

.results-reveal-panel .lobby-logo {
  width: min(86vw, 520px);
  margin: 0;
}

.results-question-label {
  margin: 0;
  color: var(--ink);
  font-size: clamp(26px, 7vw, 52px);
  line-height: 0.95;
  text-transform: uppercase;
}

.results-number,
.results-got-right,
.results-points-number,
.results-points-label {
  margin: 0;
  color: var(--paper);
  line-height: 0.9;
  transform: scale(0);
}

.results-stat-stage {
  display: grid;
  grid-template-rows: minmax(88px, auto) minmax(34px, auto);
  place-items: start center;
  min-height: clamp(144px, 28svh, 230px);
  width: min(100%, 520px);
}

.results-stat-stage > * {
  grid-column: 1;
}

.results-number {
  grid-row: 1;
  align-self: end;
  font-size: clamp(88px, 28vw, 178px);
  animation: result-intro-pop 3s cubic-bezier(.17, .89, .28, 1.32) 1s forwards;
}

.results-got-right {
  grid-row: 2;
  font-size: clamp(31px, 8.5vw, 64px);
  animation: result-intro-pop 2s cubic-bezier(.17, .89, .28, 1.32) 2s forwards;
}

.results-points-number {
  grid-row: 1;
  align-self: end;
  font-size: clamp(88px, 28vw, 178px);
  animation: pop-overshoot 420ms cubic-bezier(.17, .89, .28, 1.32) 4s forwards;
}

.results-points-label {
  grid-row: 2;
  font-size: clamp(28px, 7.8vw, 58px);
  animation: pop-overshoot 420ms cubic-bezier(.17, .89, .28, 1.32) 5s forwards;
}

.results-slide-list {
  align-self: start;
  width: min(100%, 470px);
  margin-top: 0;
}

.result-slide-row {
  color: var(--ink);
  opacity: 0;
  transform: translateX(120vw);
  animation: result-slide-in 460ms cubic-bezier(.15, .91, .32, 1.12) forwards;
  animation-delay: calc(6s + (var(--result-order) * 520ms));
}

.result-row.is-local-wrong {
  color: var(--paper);
  background: #760019;
}

.results-summary-stack {
  width: min(100%, 560px);
  display: grid;
  justify-items: center;
  margin-top: clamp(10px, 2svh, 18px);
  color: var(--paper);
  text-align: center;
  text-transform: uppercase;
}

.results-stage {
  grid-area: 1 / 1;
  width: 100%;
  display: grid;
  justify-items: center;
  gap: clamp(2px, 0.55svh, 7px);
  text-align: center;
}

.results-stage-primary {
  animation: results-stage-hide 1ms linear 4.8s forwards;
}

.results-stage-speed {
  opacity: 0;
  animation: results-stage-show 1ms linear 4.85s forwards;
}

.results-summary-line {
  margin: 0;
  line-height: 0.92;
  opacity: 0;
  transform: scale(0);
  animation: result-summary-pop 420ms cubic-bezier(.17, .89, .28, 1.32) forwards;
  width: 100%;
  text-align: center;
}

.results-stage-primary .results-summary-line {
  animation-delay: calc(0.8s + (var(--summary-order, 0) * 410ms));
}

.results-stage-speed .results-summary-line {
  animation-delay: calc(5.05s + (var(--summary-order, 0) * 410ms));
}

.results-stage-primary .results-summary-line:nth-child(1) { --summary-order: 0; }
.results-stage-primary .results-summary-line:nth-child(2) { --summary-order: 1; }
.results-stage-primary .results-summary-line:nth-child(3) { --summary-order: 2; }
.results-stage-primary .results-summary-line:nth-child(4) { --summary-order: 3; }
.results-stage-primary .results-summary-line:nth-child(5) { --summary-order: 4; }
.results-stage-primary .results-summary-line:nth-child(6) { --summary-order: 5; }
.results-stage-speed .results-summary-line:nth-child(1) { --summary-order: 0; }
.results-stage-speed .results-summary-line:nth-child(2) { --summary-order: 1; }
.results-stage-speed .results-summary-line:nth-child(3) { --summary-order: 2; }
.results-stage-speed .results-summary-line:nth-child(4) { --summary-order: 3; }
.results-stage-speed .results-summary-line:nth-child(5) { --summary-order: 4; }
.results-stage-speed .results-summary-line:nth-child(6) { --summary-order: 5; }
.results-stage-speed .results-summary-line:nth-child(7) { --summary-order: 6; }
.results-stage-speed .results-summary-line:nth-child(8) { --summary-order: 7; }

.results-fastest-avatar {
  display: grid;
  justify-items: center;
}

.results-fastest-avatar img {
  display: block;
  width: clamp(87px, 22.5vw, 144px);
  aspect-ratio: 1;
  object-fit: contain;
}

.results-summary-large {
  font-size: clamp(48px, 13vw, 112px);
}

.results-summary-small {
  font-size: clamp(22px, 6.3vw, 48px);
}

.results-summary-line.is-bad {
  color: #5d0017;
}

.results-summary-huge {
  font-size: clamp(64px, 19vw, 142px);
}

.results-summary-fit {
  width: min(100%, 560px);
  white-space: nowrap;
  overflow: hidden;
  font-size: clamp(22px, min(17vw, calc((76vw / var(--fit-chars)) * 1.02)), 142px);
}

.results-summary-points {
  font-size: clamp(92px, 29vw, 196px);
}

.results-no-fastest {
  width: 100%;
  display: grid;
  justify-items: center;
  gap: clamp(3px, 0.5svh, 8px);
  margin-top: clamp(14px, 3svh, 28px);
}

.results-no-fastest .results-summary-line {
  line-height: 0.84;
}

.results-stage-speed .results-no-fastest .results-summary-line:nth-child(1) { --summary-order: 0; }
.results-stage-speed .results-no-fastest .results-summary-line:nth-child(2) { --summary-order: 1; }
.results-stage-speed .results-no-fastest .results-summary-line:nth-child(3) { --summary-order: 2; }

.result-total-row {
  grid-template-columns: 44px minmax(0, 1fr) max-content;
  width: min(100%, 470px);
  margin-top: clamp(8px, 2svh, 18px);
  padding-right: 10px;
  color: var(--ink);
  opacity: 0;
  transform: translateX(120vw);
  animation: result-slide-in 460ms cubic-bezier(.15, .91, .32, 1.12) var(--total-row-delay, 8.7s) forwards;
}

.result-total-row img {
  width: 40px;
  height: 40px;
}

.result-total-row span,
.result-total-row strong {
  font-size: clamp(19px, 4.7vw, 26px);
}

.result-total-row strong {
  white-space: nowrap;
}

.results-title,
.solution-title {
  margin: 0;
  color: var(--paper);
  font-size: clamp(48px, 15vw, 112px);
  line-height: 0.9;
  text-shadow:
    -5px -5px 0 var(--ink),
    5px -5px 0 var(--ink),
    -5px 5px 0 var(--ink),
    5px 5px 0 var(--ink),
    0 8px 0 var(--ink);
}

.results-list {
  width: min(100%, 430px);
  display: grid;
  gap: 8px;
}

.result-row {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 62px;
  padding: 6px 14px 6px 6px;
  border-radius: 8px;
  color: var(--bg);
  background: var(--paper);
  text-align: left;
}

.result-row img {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.result-row span,
.result-row strong {
  min-width: 0;
  font-size: clamp(20px, 5vw, 28px);
  line-height: 1;
}

.result-row span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.result-row.is-wrong {
  color: var(--paper);
  background: #760019;
}

.solution-game-panel,
.solution-preview-panel {
  align-self: start;
  padding-top: 4px;
}

.solution-game-panel {
  padding-top: max(28px, calc(env(safe-area-inset-top) + 12px));
}

body[data-preview-mode="solution"] .question-topbar {
  display: none;
}

.solution-card {
  --solution-width: min(calc(100vw - 28px), 430px);
  --solution-copy-size: clamp(27px, 6.8vw, 46px);
  width: var(--solution-width);
  gap: clamp(8px, 1.45svh, 13px);
  text-align: center;
}

.solution-card.has-solution-image {
  --solution-copy-size: clamp(23px, 5.6vw, 38px);
}

.solution-card.has-long-solution-copy {
  --solution-copy-size: clamp(21px, 4.9vw, 34px);
}

.solution-card.has-long-solution-copy.has-solution-image {
  --solution-copy-size: clamp(18px, 4.25vw, 28px);
}

.solution-heading {
  margin: 0;
  color: var(--ink);
  font-size: clamp(26px, 6vw, 46px);
  line-height: 1;
  text-wrap: balance;
}

.solution-answer-grid {
  grid-template-columns: minmax(0, 1fr) !important;
  justify-items: center;
  width: var(--solution-width) !important;
  padding-inline: 28px !important;
}

.solution-answer-choice,
.solution-entry-input {
  pointer-events: none;
}

.solution-answer-choice .answer-choice-text {
  text-transform: none;
}

.solution-copy {
  width: var(--solution-width);
  margin: 0;
  color: var(--paper);
  font-size: var(--solution-copy-size);
  line-height: 1.02;
  text-align: center;
  text-wrap: balance;
}

.solution-media-frame {
  width: min(100%, 430px);
  max-height: none;
  overflow: visible;
}

.solution-media-frame img {
  width: 100%;
  height: auto;
  max-height: none;
  object-fit: contain;
}

.bottom-action-button {
  position: fixed;
  left: 50%;
  bottom: max(14px, env(safe-area-inset-bottom));
  z-index: 8;
  min-width: 112px;
  min-height: 42px;
  padding: 7px 18px 6px;
  border: 0;
  border-radius: 6px;
  color: var(--bg);
  background: var(--paper);
  font: inherit;
  font-size: 24px;
  line-height: 1;
  text-transform: uppercase;
  transform: translateX(-50%);
  cursor: pointer;
}

.bottom-action-button:disabled {
  cursor: default;
  opacity: 0.42;
}

.game-over-reset-button {
  min-width: 190px;
}

#app[data-screen="game-over"] {
  place-items: start center;
  min-height: 100vh;
  min-height: 100svh;
  overflow-y: auto;
  padding-top: max(12px, env(safe-area-inset-top));
  padding-bottom: max(16px, env(safe-area-inset-bottom));
}

#app[data-screen="game-over"] .brand-lockup {
  position: relative;
  width: 100%;
  margin-top: 18px;
}

.game-over-panel {
  width: min(100%, 620px);
  display: grid;
  justify-items: center;
  gap: clamp(10px, 2svh, 16px);
  text-align: center;
  text-transform: uppercase;
}

.game-over-topbar {
  width: min(100%, 520px);
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr) 74px;
  align-items: center;
  gap: 8px;
}

.game-over-topbar h1 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(25px, 7vw, 48px);
  line-height: 0.95;
}

.game-over-avatar,
.game-over-logo {
  display: block;
  width: 74px;
  height: 74px;
  object-fit: contain;
}

.game-over-winner {
  width: min(100%, 560px);
  display: grid;
  justify-items: center;
  gap: 4px;
  color: var(--paper);
}

.game-over-winner-avatars {
  width: min(64vw, 230px);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
}

.game-over-winner-avatars img {
  display: block;
  width: 100%;
  max-width: 230px;
  aspect-ratio: 1;
  object-fit: contain;
}

.game-over-winner-avatars img:nth-child(2) {
  width: 48%;
  max-width: 150px;
}

.game-over-winner-avatars:has(img:nth-child(2)) img {
  width: 48%;
}

.game-over-winner .results-summary-line {
  animation-delay: calc(0.6s + (var(--summary-order, 0) * 410ms));
}

.game-over-winner .results-summary-fit {
  width: min(100%, 92vw, 560px);
  max-width: 100%;
  overflow: visible;
  font-size: clamp(22px, min(13vw, calc((520px / var(--fit-chars)) * 1.25)), 116px);
}

.game-over-winner .results-summary-line:nth-child(1) { --summary-order: 0; }
.game-over-winner .results-summary-line:nth-child(2) { --summary-order: 1; }
.game-over-winner .results-summary-line:nth-child(3) { --summary-order: 2; }
.game-over-winner .results-summary-line:nth-child(4) { --summary-order: 3; }

.game-over-list {
  width: min(100%, 430px);
  padding-bottom: 18px;
}

.game-over-result-row {
  width: 100%;
  opacity: 0;
  transform: translateX(120vw);
  animation: result-slide-in 460ms cubic-bezier(.15, .91, .32, 1.12) forwards;
  animation-delay: calc(2.5s + (var(--result-order) * 420ms));
}

.game-over-result-row strong {
  white-space: nowrap;
  font-size: clamp(15px, 3.8vw, 22px);
}

.game-over-result-row span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: clamp(18px, 4.5vw, 26px);
}

.game-over-start-button {
  position: static;
  width: min(100%, 300px);
  min-height: 50px;
  margin: 8px auto 0;
  transform: none;
}

.solution-next-button,
.host-game-controls {
  position: relative;
  left: auto;
  bottom: auto;
  z-index: 8;
}

.solution-next-button {
  display: grid;
  grid-template-columns: 1fr;
  place-items: center;
  width: 62px;
  min-width: 62px;
  max-width: 62px;
  min-height: 54px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  box-shadow: none;
  transform: none;
  margin: clamp(4px, 1svh, 10px) auto 0;
}

.solution-next-button:active {
  transform: none;
}

.solution-next-button:disabled {
  transform: none;
}

.solution-next-button .button-icon {
  width: 46px;
  height: 46px;
  opacity: 1;
}

.host-game-controls {
  display: grid;
  justify-items: center;
  gap: 4px;
  width: min(calc(100vw - 28px), 360px);
  margin: clamp(4px, 1svh, 10px) auto 0;
}

.host-advance-button {
  width: min(100%, 320px);
  min-height: 52px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px;
  align-items: center;
  gap: 6px;
  padding: 0 10px 0 16px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  box-shadow: none;
  color: var(--paper);
  font-size: clamp(25px, 6.7vw, 36px);
}

.host-advance-button:active,
.host-advance-button:disabled {
  transform: none;
}

.host-advance-button:disabled {
  opacity: 0.34;
}

.host-advance-button .button-icon {
  width: 40px;
  height: 40px;
}

.host-quit-button {
  justify-self: start;
  min-height: 30px;
  padding: 0 4px;
  border: 0;
  background: transparent;
  color: var(--paper);
  opacity: 0.74;
  box-shadow: none;
  font-size: clamp(16px, 4.3vw, 22px);
  line-height: 1;
  text-transform: uppercase;
}

.question-topbar,
.question-card,
.preview-toolbar {
  width: min(100%, 720px);
}

.question-topbar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.question-player-avatar {
  display: block;
  width: 110px;
  height: 110px;
  object-fit: contain;
  cursor: pointer;
  filter: drop-shadow(0 3px 0 rgb(0 0 0 / 0.16));
}

.question-timer {
  --timer-progress: 100%;
  --timer-color: var(--paper);
  display: grid;
  place-items: center;
  width: 82px;
  height: 82px;
  border-radius: 50%;
  color: var(--ink);
  background:
    conic-gradient(transparent 0 calc(100% - var(--timer-progress)), var(--timer-color) 0),
    radial-gradient(circle, rgb(255 255 255 / 0.16) 0 100%, transparent 100%);
  font-size: 36px;
  line-height: 1;
  text-align: center;
}

.question-timer.is-warning {
  animation: timer-warning-pulse 420ms ease-in-out infinite alternate;
}

.question-timer.is-reading {
  animation: timer-read-bounce 1000ms ease-in-out 4;
}

.question-timer.is-danger {
  --timer-color: #f01818;
}

.question-pot-button,
.question-number {
  margin: 0;
  text-transform: uppercase;
  text-shadow: var(--lobby-heavy-shadow);
  -webkit-text-stroke: 0.12px currentColor;
}

.question-pot-button {
  justify-self: start;
  min-width: 0;
  padding: 0;
  border: 0;
  color: var(--ink);
  background: transparent;
  font-size: clamp(26px, 6vw, 46px);
  line-height: 1;
  text-align: left;
  text-wrap: balance;
}

.question-card {
  display: grid;
  gap: 14px;
  justify-items: center;
}

.question-number {
  justify-self: start;
  font-size: 18px;
  line-height: 1;
}

.question-text {
  max-width: 100%;
  margin: 0;
  color: var(--paper);
  font-size: clamp(28px, 6vw, 48px);
  line-height: 1.02;
  text-align: center;
  text-wrap: balance;
}

.question-media-frame {
  width: min(100%, 430px);
  max-height: none;
  margin: 0;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.question-media-frame img {
  display: block;
  width: 100%;
  height: auto;
  max-height: none;
  object-fit: contain;
}

body[data-question-layout="wide-prompt-image"] .question-media-frame {
  width: min(100%, 430px);
  max-height: none;
}

body[data-question-layout="wide-prompt-image"] .question-media-frame img {
  max-height: none;
}

body[data-question-layout="medium-prompt-image"] .question-media-frame {
  width: min(100%, 430px);
  max-height: none;
}

body[data-question-layout="medium-prompt-image"] .question-media-frame img {
  max-height: none;
}

body[data-question-layout="compact-prompt-image"] .question-card {
  gap: 9px;
}

body[data-question-layout="compact-prompt-image"] .question-text {
  max-width: 680px;
  font-size: clamp(20px, 4.8vw, 34px);
  line-height: 1.04;
}

body[data-question-layout="compact-prompt-image"] .question-media-frame {
  width: min(100%, 430px);
  max-height: none;
}

body[data-question-layout="compact-prompt-image"] .question-media-frame img {
  max-height: none;
}

.answer-grid {
  width: min(100%, 430px);
  display: grid;
  gap: 11px;
  justify-items: center;
  padding: 16px 28px 16px 58px;
  border-radius: 10px;
  background:
    repeating-linear-gradient(
      135deg,
      rgb(0 0 0 / 0.14) 0 12px,
      transparent 12px 24px
    );
}

.answer-grid-images {
  grid-template-columns: minmax(0, 1fr);
}

body[data-answer-layout="square-image-grid"] .answer-grid {
  width: min(100%, 430px);
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  align-items: center;
  padding: 18px 20px 18px 38px;
}

body[data-answer-layout="square-image-grid"] .answer-choice {
  width: min(100%, 116px);
  aspect-ratio: 1;
}

body[data-answer-layout="square-image-grid"] .answer-choice img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

body[data-answer-layout="square-image-pair"] .answer-grid,
body[data-answer-layout="squareish-image-pair"] .answer-grid,
body[data-answer-layout="image-choice-2x2"] .answer-grid,
body[data-answer-layout="text-choice-pair"] .answer-grid {
  width: min(100%, 430px);
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: center;
  padding: 18px 20px 18px 42px;
}

body[data-answer-layout="square-image-pair"] .answer-choice {
  width: min(100%, 174px);
  aspect-ratio: 1;
}

body[data-answer-layout="squareish-image-pair"] .answer-choice {
  width: min(100%, 174px);
  aspect-ratio: 640 / 500;
}

body[data-answer-layout="image-choice-2x2"] .answer-choice {
  width: min(100%, 174px);
  aspect-ratio: auto;
}

body[data-answer-layout="square-image-pair"] .answer-choice img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

body[data-answer-layout="square-image-pair"] .answer-choice:last-child:nth-child(odd),
body[data-answer-layout="squareish-image-pair"] .answer-choice:last-child:nth-child(odd),
body[data-answer-layout="image-choice-2x2"] .answer-choice:last-child:nth-child(odd),
body[data-answer-layout="text-choice-pair"] .answer-choice:last-child:nth-child(odd) {
  grid-column: 1 / -1;
  justify-self: center;
}

body[data-answer-layout="text-choice-pair"] .answer-choice {
  width: min(100%, 190px);
  min-height: 64px;
}

body[data-answer-layout="number-choice-grid"] .answer-choice,
body[data-answer-layout="text-choice-pair"] .answer-choice {
  min-height: 58px;
}

body[data-answer-layout="number-choice-grid"] .answer-grid {
  width: min(100%, 430px);
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  padding: 18px 16px 18px 36px;
}

body[data-answer-layout="number-choice-grid"] .answer-choice {
  width: min(100%, 78px);
  min-height: 58px;
}

body[data-answer-layout="number-choice-grid"] .answer-choice-text {
  min-height: 46px;
  padding: 6px 8px;
  font-size: 38px;
}

body[data-answer-layout="text-entry"] .answer-grid {
  width: min(100%, 430px);
  grid-template-columns: minmax(0, 1fr);
  padding: 22px 34px;
}

.answer-entry-field {
  display: grid;
  place-items: center;
  width: min(100%, 387px);
}

.answer-entry-input {
  width: 100%;
  height: 72px;
  padding: 0 18px;
  border: 6px solid var(--paper);
  border-radius: 8px;
  outline: 0;
  color: var(--bg);
  background: var(--paper);
  font-family: inherit;
  font-size: 34px;
  font-weight: 900;
  line-height: 1;
  text-align: center;
  text-transform: uppercase;
}

.answer-entry-input::placeholder {
  color: rgb(0 0 0 / 0.36);
}

.answer-choice-text {
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 58px;
  padding: 7px 14px;
  color: var(--bg);
  font-size: 25px;
  line-height: 1;
  text-align: center;
  text-wrap: balance;
}

.answer-choice.is-short-text-answer .answer-choice-text {
  min-height: 46px;
  font-size: min(38px, 11vw);
}

.answer-grid.answer-set-short .answer-choice-text {
  min-height: 46px;
  padding-inline: 10px;
  font-size: min(30px, 8.4vw);
}

.answer-grid.answer-set-medium .answer-choice-text {
  min-height: 52px;
  font-size: min(28px, 7.8vw);
}

.question-stat-line {
  margin: -2px 0 0;
  color: var(--paper);
  font-family: Arial, Helvetica, sans-serif;
  font-size: clamp(12px, 3.1vw, 17px);
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1;
  text-align: center;
  text-transform: uppercase;
}

.game-utility-corner {
  position: absolute;
  right: max(12px, env(safe-area-inset-right));
  bottom: max(10px, env(safe-area-inset-bottom));
  z-index: 30;
  display: flex;
  align-items: end;
  gap: 8px;
}

.test-question-id {
  display: grid;
  gap: 1px;
  color: var(--paper);
  font-family: Arial, Helvetica, sans-serif;
  font-size: clamp(12px, 3.1vw, 17px);
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1;
  text-align: right;
  text-transform: uppercase;
  opacity: 0.25;
  pointer-events: none;
}

.sound-mode-button {
  display: grid;
  place-items: center;
  width: clamp(34px, 9vw, 46px);
  aspect-ratio: 1;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  cursor: pointer;
}

.sound-mode-button img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}

.answer-choice.is-selected .answer-choice-text {
  color: var(--bg);
}

.answer-choice {
  position: relative;
  display: grid;
  place-items: center;
  width: min(100%, 270px);
  min-width: 0;
  padding: 0;
  border: 6px solid var(--paper);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: none;
  transition: border-color 140ms ease, background-color 140ms ease, transform 140ms ease;
}

.answer-choice img {
  display: block;
  width: 100%;
  height: auto;
}

body[data-answer-layout="square-image-grid"] .answer-choice.answer-image-choice img,
body[data-answer-layout="square-image-pair"] .answer-choice.answer-image-choice img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

body[data-answer-layout="squareish-image-pair"] .answer-choice.answer-image-choice img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

body[data-answer-layout="image-choice-2x2"] .answer-choice.answer-image-choice img {
  width: 100%;
  height: auto;
  object-fit: unset;
}

body[data-answer-layout] .solution-answer-grid {
  grid-template-columns: minmax(0, 1fr) !important;
  justify-items: center;
  width: min(100%, 430px) !important;
  padding: 16px 28px !important;
}

body[data-answer-layout] .solution-answer-choice {
  width: min(100%, 340px);
  min-height: 0;
}

body[data-answer-layout] .solution-answer-choice.answer-image-choice {
  width: min(60%, 204px);
  aspect-ratio: auto;
}

body[data-answer-layout] .solution-answer-choice.answer-image-choice img {
  width: 100%;
  height: auto;
  object-fit: unset;
}

body[data-answer-layout] .solution-answer-choice.answer-text-choice {
  width: min(100%, 360px);
  min-height: 58px;
}

body[data-answer-layout] .solution-answer-choice .answer-choice-text {
  min-height: 52px;
  padding: 7px 22px;
  font-size: min(38px, 11vw);
}

body[data-answer-layout] .solution-entry-input {
  height: 58px;
  padding: 0 24px;
}

.answer-choice.is-selected {
  z-index: 2;
  border-color: #333;
  background: #333;
  transform: translateY(2px);
}

.answer-choice:disabled {
  cursor: default;
}

.answer-letter {
  position: absolute;
  left: 0;
  top: 50%;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  color: var(--ink);
  background: transparent;
  font-size: 23px;
  line-height: 1;
  transform: translate(-78%, -50%);
}

.answer-letter-icon {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.answer-letter-text {
  position: relative;
  z-index: 1;
}

.answer-choice .answer-letter-icon-selected,
.answer-choice.is-selected .answer-letter-icon-normal,
.answer-choice.is-selected .answer-letter-text {
  display: none;
}

.answer-choice.is-selected .answer-letter-icon-selected {
  display: block;
}

.answer-choice.is-selected .answer-letter {
  color: var(--paper);
  background: transparent;
}

.submit-answer-button {
  width: min(100%, 430px);
  min-height: 58px;
  margin-top: 2px;
  border-radius: 6px !important;
  font-size: clamp(30px, 7vw, 44px);
  box-shadow: none;
}

.submit-answer-button:active {
  transform: none;
}

@keyframes pop-overshoot {
  0% {
    opacity: 0;
    transform: scale(0);
  }

  70% {
    opacity: 1;
    transform: scale(1.16);
  }

  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes countdown-pop-hold {
  0% {
    opacity: 1;
    transform: scale(0.2);
  }

  28% {
    opacity: 1;
    transform: scale(1.18);
  }

  99.9% {
    opacity: 1;
    transform: scale(1);
  }

  100% {
    opacity: 0;
    transform: scale(1);
  }
}

@keyframes countdown-pop-final {
  0% {
    opacity: 1;
    transform: scale(0.2);
  }

  36% {
    opacity: 1;
    transform: scale(1.18);
  }

  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes result-slide-in {
  0% {
    opacity: 0;
    transform: translateX(120vw) scale(0.94);
  }

  74% {
    opacity: 1;
    transform: translateX(-12px) scale(1.04);
  }

  100% {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

@keyframes result-intro-pop {
  0% {
    opacity: 0;
    transform: scale(0);
  }

  16% {
    opacity: 1;
    transform: scale(1.16);
  }

  24%,
  82% {
    opacity: 1;
    transform: scale(1);
  }

  100% {
    opacity: 0;
    transform: scale(0.92);
  }
}

@keyframes result-summary-pop {
  0% {
    opacity: 0;
    transform: scale(0);
  }

  70% {
    opacity: 1;
    transform: scale(1.12);
  }

  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes results-stage-hide {
  to {
    opacity: 0;
    visibility: hidden;
  }
}

@keyframes results-stage-show {
  to {
    opacity: 1;
  }
}

.submit-answer-button:disabled {
  cursor: default;
  opacity: 0.48;
}

.submit-answer-button.is-locked {
  opacity: 1;
}

.preview-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 14px;
  font-weight: 900;
  text-transform: uppercase;
}

.preview-toolbar button,
.preview-toolbar span {
  min-height: 36px;
  padding: 8px 12px;
  border: 3px solid var(--ink);
  border-radius: 8px;
  color: var(--ink);
  background: rgb(255 255 255 / 0.82);
}

.preview-toolbar button:disabled {
  opacity: 0.4;
}

.game-preview-toolbar {
  position: fixed;
  top: max(8px, env(safe-area-inset-top));
  left: 50%;
  z-index: 40;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 4px;
  width: min(calc(100vw - 16px), 760px);
  padding: 6px;
  border: 2px solid rgb(0 0 0 / 0.28);
  border-radius: 8px;
  color: var(--ink);
  background: rgb(255 255 255 / 0.88);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  transform: translateX(-50%);
}

.game-preview-toolbar button,
.game-preview-toolbar select {
  min-height: 26px;
  padding: 4px 7px;
  border: 0;
  border-radius: 4px;
  color: var(--ink);
  background: rgb(0 0 0 / 0.08);
  box-shadow: none;
}

.game-preview-toolbar label {
  display: flex;
  align-items: center;
  gap: 4px;
}

.game-preview-toolbar > span {
  min-width: 112px;
  text-align: center;
}

.game-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgb(0 0 0 / 0.42);
}

.game-modal-panel {
  width: min(calc(100vw - 36px), 500px);
  display: grid;
  gap: 18px;
  justify-items: center;
  padding: 24px 18px 18px;
  border: 4px solid var(--ink);
  border-radius: 22px;
  background: var(--paper);
  box-shadow: 0 10px 0 rgb(0 0 0 / 0.2);
  text-align: center;
}

.game-modal-panel p {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  font-size: clamp(18px, 5.1vw, 27px);
  font-weight: 600;
  line-height: 1.18;
  text-transform: none;
}

.game-modal-panel h2 {
  margin: 0;
  font-size: clamp(28px, 8vw, 34px);
  line-height: 1;
  text-transform: uppercase;
}

.game-modal-actions {
  display: grid;
  gap: 8px;
  justify-items: center;
  width: 100%;
}

.game-modal-button {
  width: min(100%, 260px);
  min-height: 58px;
  font-size: 32px;
}

.brand-lockup {
  position: absolute;
  left: 0;
  right: 0;
  bottom: var(--brand-bottom);
  height: var(--weasel-height);
  pointer-events: none;
}

.brand-mascot {
  position: absolute;
  left: 0;
  bottom: 0;
  z-index: 2;
  width: auto;
  height: var(--weasel-height);
  pointer-events: auto;
  cursor: pointer;
}

.brand-words {
  position: absolute;
  left: 50%;
  top: calc((var(--weasel-height) - var(--brand-word-height)) / 2);
  z-index: 1;
  width: auto;
  height: var(--brand-word-height);
  max-width: min(70vw, 560px);
  object-fit: contain;
  transform: translateX(-50%);
}

@media (max-width: 520px) {
  :root {
    --field-height: 62px;
    --panel-width: 420px;
    --brand-bottom: 0px;
    --weasel-height: clamp(58px, 10svh, 82px);
    --brand-word-height: clamp(15px, 2.5svh, 21px);
  }

  .shell {
    place-items: start center;
    padding-top: max(20px, calc(env(safe-area-inset-top) + 10px));
    padding-bottom: calc(var(--weasel-height) + 18px);
  }

  .join-panel {
    gap: 12px;
  }

  .logo {
    width: min(100%, 320px);
    margin-bottom: 2px;
  }

  .field {
    grid-template-columns: 60px 1px minmax(0, 1fr);
    border-width: 3px;
    border-radius: 18px;
  }

  .password-field {
    grid-template-columns: 60px 1px minmax(0, 1fr) 48px;
  }

  .landing-panel .field,
  .host-login-panel .field {
    border-width: 4px;
    border-radius: 6px;
  }

  .field-icon img {
    width: 34px;
    height: 34px;
  }

  .field input {
    padding: 0 18px;
    font-size: 28px;
  }

  .play-button,
  .host-button {
    min-height: 64px;
    border-width: 3px;
    border-radius: 18px;
  }

  .landing-panel .play-button,
  .landing-panel .host-button,
  .host-login-panel .create-room-button,
  .host-login-panel .upgrade-button {
    border-radius: 6px;
  }

  .play-button {
    font-size: 40px;
  }

  .button-icon {
    width: 46px;
    height: 46px;
  }

  .host-button {
    gap: 16px;
    font-size: 25px;
  }

  .plus-icon {
    width: 26px;
    height: 26px;
  }

  .brand-words {
    max-width: 72vw;
  }

  .dashboard-shell {
    padding-top: max(12px, env(safe-area-inset-top));
  }

  .dashboard-panel {
    gap: 7px;
  }

  .dashboard-logo {
    width: min(100%, 155px);
  }

  .dashboard-title-graphic {
    width: min(100%, 280px);
    max-height: 48px;
  }

  .dashboard-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .dashboard-card {
    min-height: 86px;
    padding: 10px 8px 8px;
    border-width: 3px;
    border-radius: 15px;
  }

  .question-shell {
    padding-top: 10px;
  }

  .question-preview-panel {
    gap: 11px;
  }

  .question-timer {
    width: 64px;
    height: 64px;
    font-size: 28px;
  }

  .question-pot-button {
    font-size: 27px;
  }

  .question-card {
    gap: 10px;
  }

  .question-number {
    font-size: 14px;
  }

  .question-text {
    font-size: 27px;
  }

  .answer-choice {
    border-width: 4px;
    border-radius: 6px;
  }

  .answer-grid {
    width: min(100%, 430px);
    gap: 9px;
    padding: 14px 24px 14px 49px;
  }

  .answer-choice {
    width: min(100%, 252px);
  }

  body[data-answer-layout="square-image-grid"] .answer-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    padding: 14px 14px 14px 33px;
  }

  body[data-answer-layout="square-image-grid"] .answer-choice {
    width: min(100%, 96px);
  }

  body[data-answer-layout="square-image-pair"] .answer-grid,
  body[data-answer-layout="squareish-image-pair"] .answer-grid,
  body[data-answer-layout="image-choice-2x2"] .answer-grid,
  body[data-answer-layout="text-choice-pair"] .answer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    padding: 14px 14px 14px 33px;
  }

  body[data-answer-layout="square-image-pair"] .answer-choice,
  body[data-answer-layout="squareish-image-pair"] .answer-choice,
  body[data-answer-layout="image-choice-2x2"] .answer-choice,
  body[data-answer-layout="text-choice-pair"] .answer-choice {
    width: min(100%, 154px);
  }

  body[data-answer-layout="text-choice-pair"] .answer-choice {
    min-height: 58px;
  }

  body[data-answer-layout="number-choice-grid"] .answer-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    padding: 14px 10px 14px 28px;
  }

  body[data-answer-layout="number-choice-grid"] .answer-choice {
    width: min(100%, 64px);
    min-height: 58px;
  }

  body[data-answer-layout="number-choice-grid"] .answer-choice-text {
    min-height: 50px;
    font-size: 28px;
  }

  .answer-choice-text {
    min-height: 64px;
    padding: 7px 9px;
    font-size: 20px;
  }

  .answer-choice.is-short-text-answer .answer-choice-text {
    min-height: 46px;
    font-size: 34px;
  }

  .answer-grid.answer-set-short .answer-choice-text {
    min-height: 46px;
    padding-inline: 8px;
    font-size: 26px;
  }

  .answer-grid.answer-set-medium .answer-choice-text {
    min-height: 52px;
    font-size: 24px;
  }

  body[data-answer-layout] .solution-answer-choice.answer-image-choice {
    width: min(60%, 204px);
  }

  body[data-answer-layout] .solution-answer-choice .answer-choice-text {
    min-height: 52px;
    padding: 7px 18px;
    font-size: 34px;
  }

  body[data-answer-layout="text-entry"] .answer-grid {
    padding: 18px 28px;
  }

  .answer-entry-field {
    width: min(100%, 326px);
  }

  .answer-entry-input {
    height: 64px;
    border-width: 4px;
    border-radius: 6px;
    font-size: 29px;
  }

  .answer-letter {
    width: 31px;
    height: 31px;
    border-width: 3px;
    font-size: 18px;
  }

  .submit-answer-button {
    min-height: 54px;
  }

  .host-shell {
    padding-top: 14px;
  }

  .host-panel {
    width: min(calc(100vw - 36px), var(--panel-width));
    gap: 9px;
  }

  .host-panel .logo-link,
  .host-panel .screen-title-graphic,
  .host-panel .host-form {
    width: min(calc(100vw - 36px), var(--panel-width));
  }

  .host-logo {
    width: min(100%, 210px);
  }

  .host-form {
    gap: 9px;
  }

  .host-name-field {
    grid-template-columns: 54px minmax(0, 1fr);
    height: 64px;
    border-width: 4px;
    border-radius: 6px;
  }

  .host-name-icon img {
    width: 34px;
    height: 34px;
  }

  .host-name-field input {
    font-size: 29px;
  }

  .host-form .field input {
    font-size: 22px;
  }

  .option-group legend {
    font-size: 15px;
  }

  .host-options-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 9px;
  }

  .segmented-control,
  .room-size-grid {
    gap: 6px;
  }

  .segmented-control label,
  .room-size-option,
  .toggle-row,
  .upgrade-button {
    min-height: 50px;
    border-width: 3px;
    border-radius: 15px;
  }

  .segmented-control span,
  .room-size-option span {
    font-size: 21px;
  }

  .host-setup-panel .segmented-control label,
  .host-setup-panel .room-size-option {
    min-height: 54px;
    border-width: 4px;
    border-radius: 6px;
  }

  .host-setup-panel .segmented-control span,
  .host-setup-panel .room-size-option span {
    font-size: 21px;
  }

  .toggle-row {
    grid-template-columns: 62px minmax(0, 1fr);
    gap: 10px;
    padding: 0 15px;
    font-size: 22px;
  }

  .toggle-visual {
    width: 43px;
    height: 27px;
    border-width: 3px;
  }

  .toggle-visual::before {
    width: 15px;
    height: 15px;
  }

  .toggle-row input:checked + .toggle-visual::before {
    transform: translateX(16px);
  }

  .upgrade-button {
    font-size: 20px;
  }

  .create-room-button {
    min-height: 58px;
    font-size: 27px;
  }

  .host-setup-panel .create-room-button {
    min-height: 56px;
    grid-template-columns: minmax(0, 1fr) 42px;
    padding: 0 17px;
    border-radius: 6px;
    font-size: 27px;
  }

  .host-setup-panel .create-room-button .button-icon {
    width: 42px;
    height: 42px;
  }

  .lobby-shell {
    padding-top: 10px;
  }

  .lobby-panel {
    width: min(calc(100vw - 24px), var(--panel-width));
    gap: 6px;
    transform: translateX(-6px);
  }

  .lobby-logo {
    width: min(100%, 242px);
  }

  .lobby-topbar,
  .lobby-name-row,
  .lobby-name-field,
  .avatar-section,
  .activity-pop,
  .lobby-status-stack,
  .lobby-phrase,
  .sound-room-help,
  .lobby-primary-button {
    width: min(100%, calc(100vw - 24px));
  }

  .sound-room-help div {
    width: min(100%, calc(100vw - 24px));
  }

  .lobby-topbar {
    gap: clamp(5px, 1.6vw, 12px);
  }

  .lobby-name-field {
    border-width: 4px;
    border-radius: 6px;
  }

  .room-lockup {
    min-width: 96px;
    transform: translateX(-5px);
  }

  .room-lockup h1 {
    font-size: 24px;
    text-shadow:
      -3px -3px 0 var(--ink),
      3px -3px 0 var(--ink),
      -3px 3px 0 var(--ink),
      3px 3px 0 var(--ink),
      0 5px 0 var(--ink);
  }

  .room-lockup span {
    font-size: 37px;
    text-shadow:
      -3px -3px 0 var(--ink),
      3px -3px 0 var(--ink),
      -3px 3px 0 var(--ink),
      3px 3px 0 var(--ink),
      0 5px 0 var(--ink);
  }

  .avatar-section-header {
    margin-top: 8px;
    margin-bottom: 10px;
  }

  .avatar-section-header span {
    font-size: 27px;
  }

  .avatar-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
    padding: 0 4px;
  }

  .avatar-choice {
    border-width: 0;
    border-radius: 0;
  }

  .avatar-choice img {
    width: 100%;
    max-width: 82px;
    height: auto;
  }

  .lobby-phrase {
    min-height: 62px;
    padding: 0 8px;
    font-size: 21px;
  }

  .activity-pop {
    font-size: 27px;
  }

  .lobby-primary-button {
    min-height: 52px;
    border-radius: 6px;
    font-size: 25px;
  }
}

@media (max-width: 520px) and (max-height: 720px) {
  :root {
    --field-height: 56px;
    --weasel-height: 58px;
    --brand-word-height: 15px;
  }

  .shell {
    padding-top: 12px;
    padding-bottom: 80px;
  }

  .join-panel {
    gap: 8px;
  }

  .logo {
    width: min(100%, 280px);
  }

  .field input {
    font-size: 26px;
  }

  .play-button,
  .host-button {
    min-height: 58px;
  }

  .play-button {
    font-size: 36px;
  }

  .button-icon {
    width: 40px;
    height: 40px;
  }

  .host-button {
    font-size: 23px;
  }

  .plus-icon {
    width: 24px;
    height: 24px;
  }

  .host-logo {
    width: min(100%, 160px);
  }

  .option-group legend {
    font-size: 13px;
  }

  .segmented-control label,
  .room-size-option,
  .toggle-row,
  .upgrade-button {
    min-height: 44px;
  }

  .segmented-control span,
  .room-size-option span {
    font-size: 18px;
  }

  .toggle-row {
    font-size: 19px;
  }

  .create-room-button {
    min-height: 52px;
    font-size: 23px;
  }

  .lobby-logo {
    width: min(100%, 184px);
  }

  .room-lockup {
    min-width: 82px;
    transform: translateX(-4px);
  }

  .room-lockup h1 {
    font-size: 20px;
  }

  .room-lockup span {
    font-size: 31px;
  }

  .avatar-section-header {
    margin-bottom: 4px;
  }

  .avatar-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0;
    padding: 0;
  }

  .avatar-choice img {
    max-width: 60px;
  }

  .lobby-phrase {
    min-height: 46px;
    font-size: 16px;
  }

  .activity-pop,
  .avatar-section-header span {
    font-size: 21px;
  }

  .lobby-primary-button {
    min-height: 48px;
    border-radius: 6px;
    font-size: 23px;
  }

  .question-timer {
    width: 54px;
    height: 54px;
    font-size: 24px;
  }

  .question-player-avatar {
    width: 86px;
    height: 86px;
  }

  .question-pot-button {
    font-size: 20px;
  }

  .question-text {
    font-size: 22px;
  }

  .question-card {
    gap: 6px;
  }

  .submit-answer-button {
    min-height: 48px;
    font-size: 24px;
  }
}

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

@keyframes status-swipe-in {
  0% {
    opacity: 0;
    transform: translateX(88%) scale(0.9);
  }

  100% {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

@keyframes avatar-ticker-wiggle {
  0%,
  100% {
    transform: rotate(-5deg);
  }

  50% {
    transform: rotate(5deg);
  }
}

@keyframes waiting-player-pop {
  0% {
    transform: scale(0.68);
  }

  70% {
    transform: scale(1.18);
  }

  100% {
    transform: scale(1);
  }
}

@keyframes timer-warning-pulse {
  0% {
    transform: scale(1);
  }

  100% {
    transform: scale(1.08);
  }
}

@keyframes timer-read-bounce {
  0%,
  100% {
    transform: scale(1);
  }

  35% {
    transform: scale(1.12);
  }
}
