:root {
  --stage-deep: #1e1033;
  --stage-panel: #2a1848;
  --stage-panel-light: #352058;
  --spotlight: #f0c75e;
  --spotlight-soft: #ffe9a8;
  --host-accent: #e84393;
  --host-accent-hover: #ff6bab;
  --surface-base: var(--stage-deep);
  --surface-card: var(--stage-panel);
  --surface-elevated: var(--stage-panel-light);
  --surface-inset: #140a24;
  --border-muted: #4a3568;
  --text-primary: #faf6ff;
  --text-secondary: #c4b8d9;
  --color-accent: var(--host-accent);
  --color-accent-hover: var(--host-accent-hover);
  --color-success: #5cdb95;
  --color-error: #ff6b6b;
  --color-gold: var(--spotlight);
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --radius-sm: 0.5rem;
  --radius-md: 0.75rem;
  --radius-lg: 1rem;
  --icon-sm: 3rem;
  --icon-md: 3.5rem;
  --icon-lg: 5rem;
  --screen-max-width: 56rem;
  --content-max-width: 42rem;
  --taif-hero-width: 0px;
  --taif-dock-height: 0px;
  --bg-color: var(--surface-base);
  --text-color: var(--text-primary);
  --accent-color: var(--color-accent);
  --accent-hover: var(--color-accent-hover);
  --subtitle-color: var(--text-secondary);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Tajawal", "Segoe UI", Tahoma, sans-serif;
  background-color: var(--stage-deep);
  background-image:
    radial-gradient(ellipse at 80% 0%, rgba(232, 67, 147, 0.12), transparent 50%),
    radial-gradient(ellipse at 10% 100%, rgba(240, 199, 94, 0.08), transparent 45%);
  color: var(--text-color);
  min-height: 100dvh;
  margin: 0;
  -webkit-tap-highlight-color: transparent;
}

body.has-taif-host {
  overflow-x: hidden;
  min-height: 100dvh;
}

#app-root {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: clamp(0.75rem, 2vw, 1.5rem);
  min-height: 100dvh;
  width: 100%;
  padding:
    max(var(--space-md), env(safe-area-inset-top))
    max(var(--space-md), env(safe-area-inset-right))
    max(var(--space-md), env(safe-area-inset-bottom))
    max(var(--space-md), env(safe-area-inset-left));
}

body.taif-layout-compact #app-root,
body.taif-layout-grid #app-root {
  display: block;
  flex-direction: unset;
  align-items: unset;
  justify-content: unset;
  gap: 0;
}

#app-content {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  flex: 0 1 auto;
  width: min(var(--content-max-width), 92vw);
  min-height: 100dvh;
  padding-bottom: max(var(--taif-dock-height), env(safe-area-inset-bottom));
}

body.taif-layout-compact #app-content,
body.taif-layout-grid #app-content {
  width: 100%;
}

body.taif-layout-hero #app-content {
  min-height: auto;
}

/* ——— استوديو طيف: Hero + Dock ——— */

.taif-hero-panel {
  flex: 0 0 auto;
  align-self: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: transparent;
  border: none;
  box-shadow: none;
  z-index: 2;
}

.taif-hero-panel[hidden] {
  display: none !important;
}

.taif-hero-inner,
.taif-hero-composition {
  display: flex;
  flex-direction: row;
  align-items: flex-end;
  gap: 0.5rem;
  width: auto;
  max-width: none;
}

.taif-hero-composition .taif-hero-img {
  order: 1;
  flex-shrink: 0;
}

.taif-hero-composition .taif-hero-bubble {
  order: 2;
}

.taif-hero-img {
  width: auto;
  height: clamp(180px, 42vh, 380px);
  max-width: 100%;
  object-fit: contain;
  object-position: bottom center;
  filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.35));
  transform-origin: bottom center;
}

.taif-hero-bubble {
  flex: 0 1 min(16rem, 38vw);
  width: auto;
  max-width: min(16rem, 38vw);
  align-self: center;
  margin-bottom: 2rem;
}

.taif-dock {
  position: fixed;
  left: 50%;
  right: auto;
  inset-inline: auto;
  transform: translateX(-50%);
  bottom: max(0.75rem, env(safe-area-inset-bottom));
  z-index: 400;
  width: min(96vw, 36rem);
  display: flex;
  justify-content: center;
  pointer-events: none;
}

.taif-dock[hidden] {
  display: none !important;
}

.taif-dock .taif-stage {
  position: relative;
  top: auto;
  left: auto;
  transform: none;
  width: 100%;
}

.taif-dock-bar {
  background: rgba(42, 24, 72, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(240, 199, 94, 0.2);
  border-radius: var(--radius-lg);
  padding: 0.5rem 0.75rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}

.screen {
  display: none;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-lg) var(--space-xl);
  padding-inline: max(var(--space-md), env(safe-area-inset-left)) max(var(--space-md), env(safe-area-inset-right));
  width: 100%;
  min-height: min(100dvh, 100%);
}

.screen.active {
  display: flex;
  animation: screenFadeIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.content-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-lg);
  width: 100%;
  max-width: var(--content-max-width);
  margin: 0 auto;
  padding: var(--space-lg);
  background: rgba(42, 24, 72, 0.55);
  border: 1px solid rgba(240, 199, 94, 0.12);
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.25);
}

.content-panel--wide {
  max-width: min(100%, 44rem);
}

.content-panel--center {
  justify-content: center;
  min-height: min(70vh, 32rem);
}

.content-panel--game {
  max-width: min(100%, 48rem);
  background: rgba(42, 24, 72, 0.4);
}

.taif-intro-hint {
  font-size: 1.125rem;
  color: var(--spotlight-soft);
  font-style: italic;
}

.btn-lg {
  padding: 1rem 2.75rem;
  font-size: 1.2rem;
}

@keyframes screenFadeIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.99);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ——— طيف Dock: compact + grid ——— */

.taif-stage {
  --taif-char-compact: clamp(100px, 18vh, 180px);
  --taif-char-grid: 80px;
  --taif-timer-size: 3.5rem;
  --taif-timer-font: 1.65rem;
  position: relative;
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.5rem;
  pointer-events: none;
  width: 100%;
}

.taif-host-bar {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.65rem 0.75rem;
  width: 100%;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
}

.taif-stage[data-layout="compact"],
.taif-stage[data-layout="grid"] {
  --taif-timer-size: 4.5rem;
  --taif-timer-font: 2rem;
  width: min(98vw, 42rem);
}

.taif-actor-wrap {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  flex-shrink: 0;
  order: 1;
  transition:
    left 0.36s cubic-bezier(0.4, 0, 0.2, 1),
    top 0.36s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.36s cubic-bezier(0.4, 0, 0.2, 1);
}

.taif-host-bubble {
  order: 2;
}

.taif-host-timer {
  order: 3;
  min-width: var(--taif-timer-size);
  min-height: var(--taif-timer-size);
  padding: 0.25rem 0.5rem;
  border-radius: 999px;
  background: var(--surface-card);
  border: 3px solid var(--accent-color);
  color: #fff;
  font-size: var(--taif-timer-font);
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(232, 67, 147, 0.35);
  flex-shrink: 0;
}

.taif-host-timer[hidden] {
  display: none !important;
}

.taif-character-img {
  height: var(--taif-char-compact);
  width: auto;
  object-fit: contain;
  transform-origin: bottom center;
  transition: opacity 0.25s ease;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.3));
}

.taif-stage[data-layout="grid"] .taif-actor-wrap:not(.taif-actor-wrap--grid) .taif-character-img {
  height: var(--taif-char-grid);
}

.taif-character-img.taif-img-crossfade {
  opacity: 0.55;
}

.taif-lottie {
  width: var(--taif-char-hero);
  height: var(--taif-char-hero);
  flex-shrink: 0;
}

.taif-lottie svg {
  width: 100% !important;
  height: 100% !important;
}

.taif-stage--timer-active .taif-host-timer {
  box-shadow: 0 6px 22px rgba(233, 69, 96, 0.45);
}

.taif-host-timer.timer-warning {
  border-color: #ffd32a;
  color: #ffd32a;
  animation: timerPulse 0.8s ease-in-out infinite;
}

@keyframes timerPulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.08);
  }
}

.taif-host-bubble {
  background-color: var(--surface-card);
  border: 1px solid rgba(240, 199, 94, 0.2);
  border-radius: 1rem;
  padding: 0.75rem 1rem;
  flex: 1 1 12rem;
  max-width: min(90vw, 28rem);
  width: auto;
  min-width: 8rem;
  text-align: right;
  position: relative;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.taif-host-bubble--from-character::after {
  content: "";
  position: absolute;
  top: 55%;
  inset-inline-start: -9px;
  inset-inline-end: auto;
  transform: translateY(-50%);
  border-top: 9px solid transparent;
  border-bottom: 9px solid transparent;
  border-inline-end: none;
  border-inline-start: 9px solid var(--surface-card);
}

body:has(.surprise-screen.active) .taif-host-bubble--from-character::after {
  border-inline-start-color: var(--surface-card);
}

.taif-stage[data-layout="compact"] .taif-host-label,
.taif-stage[data-layout="grid"] .taif-host-label {
  display: none;
}

.taif-stage[data-layout="compact"] .taif-host-text-wrap,
.taif-stage[data-layout="grid"] .taif-host-text-wrap {
  font-size: 0.95rem;
  line-height: 1.5;
  min-height: auto;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.taif-stage[data-layout="hero"] .taif-host-text-wrap {
  display: block;
  -webkit-line-clamp: unset;
  overflow: visible;
}

.taif-host-label {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--accent-color);
  margin-bottom: 0.25rem;
}

.taif-host-text-wrap {
  font-size: 1.05rem;
  line-height: 1.65;
  min-height: 2.25rem;
}

.taif-host-text {
  display: inline;
}

.taif-host-cursor {
  display: inline;
  color: var(--accent-color);
  font-weight: 700;
  animation: blink 0.8s step-end infinite;
}

.taif-host-cursor.hidden {
  display: none;
}

@keyframes taifIdleBob {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-5px) scale(1.02);
  }
}

@keyframes taifTalk {
  0%,
  100% {
    transform: translateY(0) rotate(0deg) scale(1);
  }
  50% {
    transform: translateY(-2px) rotate(-1deg) scale(1.03);
  }
}

@keyframes taifWalk {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }
  25% {
    transform: translateY(-4px) rotate(-2deg);
  }
  75% {
    transform: translateY(-2px) rotate(2deg);
  }
}

@keyframes taifCount {
  0%,
  100% {
    transform: translateX(0) scale(1);
  }
  50% {
    transform: translateX(-4px) scale(1.04);
  }
}

@keyframes taifReactBad {
  0%,
  100% {
    transform: rotate(0deg);
  }
  25% {
    transform: rotate(-4deg);
  }
  75% {
    transform: rotate(4deg);
  }
}

@keyframes taifReactGood {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }
  40% {
    transform: translateY(-10px) scale(1.06);
  }
}

.taif-motion-idle {
  animation: taifIdleBob 3s ease-in-out infinite;
}

.taif-motion-talk {
  animation: taifTalk 0.8s ease-in-out infinite;
}

.taif-motion-walk {
  animation: taifWalk 0.45s ease-in-out infinite;
}

.taif-motion-count {
  animation: taifCount 0.55s ease-in-out infinite;
}

.taif-motion-react-bad {
  animation: taifReactBad 0.45s ease-in-out infinite;
}

.taif-motion-react-good {
  animation: taifReactGood 0.7s ease-in-out 2;
}

body.has-taif-host .memory-grid {
  position: relative;
}

.timer-delegated-to-taif,
.trivia-timer,
.sentence-timer,
.picmerge-timer,
.spot-timer,
.memory-timer,
.creative-timer,
.password-timer {
  visibility: hidden;
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

body:has(.surprise-screen.active) .taif-host-bubble {
  border-color: var(--spotlight);
}

.taif-stage[data-layout="compact"] .taif-host-bar,
.taif-stage[data-layout="grid"] .taif-host-bar {
  flex-direction: row;
  align-items: center;
  justify-content: center;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border: none;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
}

@media (max-width: 480px) {
  body.taif-layout-hero #app-root {
    flex-direction: column;
    justify-content: center;
    gap: var(--space-md);
  }

  body.taif-layout-hero #taif-hero-panel {
    order: 2;
    width: 100%;
  }

  body.taif-layout-hero #app-content {
    order: 1;
    width: min(var(--content-max-width), 94vw);
  }

  .taif-hero-img {
    height: clamp(120px, 28vh, 200px);
  }

  .taif-hero-bubble {
    flex: 0 1 min(14rem, 52vw);
    max-width: min(14rem, 52vw);
    margin-bottom: 1.25rem;
  }

  .taif-dock {
    width: min(98vw, 100%);
  }

  .taif-stage {
    --taif-char-compact: 100px;
    --taif-char-grid: 68px;
    --taif-timer-size: 3rem;
    --taif-timer-font: 1.4rem;
  }

  .taif-host-bar {
    gap: 0.45rem;
    padding: 0;
  }

  .taif-host-bubble {
    padding: 0.6rem 0.75rem;
    min-width: 6rem;
  }

  .taif-host-text-wrap {
    font-size: 0.95rem;
  }

  .taif-stage[data-layout="compact"] .taif-host-text-wrap,
  .taif-stage[data-layout="grid"] .taif-host-text-wrap {
    font-size: 0.9rem;
  }

  .game-select-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.6rem;
  }

  .game-select-thumb {
    width: var(--icon-sm);
    height: var(--icon-sm);
  }

  .game-select-card {
    padding: 0.6rem;
    font-size: 0.85rem;
  }

  .trivia-options {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .trivia-option {
    padding: 0.85rem;
    font-size: 0.95rem;
  }

  .memory-grid {
    gap: 3px;
    max-width: min(92vw, 18rem);
  }

  .game-title {
    font-size: clamp(2rem, 8vw, 2.25rem);
  }
}

@media (min-width: 481px) and (max-width: 834px) {
  .taif-hero-img {
    height: clamp(200px, 40vh, 340px);
  }

  .taif-stage[data-layout="compact"],
  .taif-stage[data-layout="grid"] {
    --taif-char-compact: clamp(140px, 16vh, 160px);
  }

  .game-select-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 835px) and (orientation: landscape) {
  .taif-hero-img {
    height: clamp(220px, 44vh, 380px);
  }

  .taif-stage[data-layout="compact"],
  .taif-stage[data-layout="grid"] {
    --taif-char-compact: 180px;
  }

  .game-select-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (min-width: 900px) {
  .taif-host-text-wrap {
    font-size: 1.1rem;
  }
}

.taif-actor-wrap--grid {
  pointer-events: none;
}

.taif-stage--on-grid .taif-host-bar {
  position: relative;
  z-index: 200;
}

#taif-start-btn {
  pointer-events: auto;
  min-width: 10rem;
}

#taif-start-btn[hidden] {
  display: none !important;
}

.game-title {
  font-size: clamp(2.25rem, 6vw, 4rem);
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--spotlight-soft);
}

.game-subtitle {
  font-size: 1.25rem;
  color: var(--subtitle-color);
  max-width: 28rem;
  line-height: 1.6;
}

.btn:focus-visible {
  outline: 2px solid #ffd32a;
  outline-offset: 2px;
}

.btn {
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 1.125rem;
  font-weight: 600;
  padding: 0.875rem 2.5rem;
  border-radius: 0.5rem;
  transition: background-color 0.2s ease, transform 0.15s ease;
}

.btn-primary {
  background: linear-gradient(135deg, var(--host-accent), #c13584);
  color: #fff;
  box-shadow: 0 4px 16px rgba(232, 67, 147, 0.35);
  min-height: 44px;
  min-width: 44px;
}

.btn-primary:hover {
  background-color: var(--accent-hover);
}

.btn-primary:focus-visible {
  outline: 3px solid var(--accent-hover);
  outline-offset: 3px;
}

.btn-primary:active {
  transform: scale(0.97);
}

.screen:not(.active) {
  display: none;
}

.screen-title {
  font-size: 2rem;
  font-weight: 700;
}

.field-label {
  font-size: 1rem;
  color: var(--subtitle-color);
}

.team-count-select {
  font-family: inherit;
  font-size: 1rem;
  padding: 0.625rem 1rem;
  border-radius: 0.5rem;
  border: 1px solid var(--subtitle-color);
  background-color: var(--surface-card);
  color: var(--text-color);
  min-width: 8rem;
  cursor: pointer;
}

.team-inputs {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
  max-width: 24rem;
}

.team-input-row {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.375rem;
  text-align: right;
  width: 100%;
}

.team-input-row label {
  font-size: 0.9375rem;
  color: var(--subtitle-color);
}

.team-input {
  font-family: inherit;
  font-size: 1rem;
  padding: 0.625rem 0.875rem;
  border-radius: 0.5rem;
  border: 1px solid var(--subtitle-color);
  background-color: var(--surface-card);
  color: var(--text-color);
  width: 100%;
}

.team-input:focus {
  outline: 2px solid var(--accent-color);
  outline-offset: 2px;
}

.team-input.input-error {
  border-color: #ff4757;
}

.error-message {
  color: #ff4757;
  font-size: 0.9375rem;
}

.btn-group {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

.btn-secondary {
  background-color: transparent;
  color: var(--text-color);
  border: 2px solid var(--subtitle-color);
  min-height: 44px;
  min-width: 44px;
}

.btn-secondary:hover {
  border-color: var(--text-color);
  background-color: rgba(255, 255, 255, 0.05);
}

.btn-secondary:focus-visible {
  outline: 3px solid var(--subtitle-color);
  outline-offset: 3px;
}

.btn-secondary:active {
  transform: scale(0.97);
}

.surprise-screen {
  gap: 1rem;
}

.surprise-badge {
  font-size: 1.75rem;
  font-weight: 800;
  color: #ffd32a;
  animation: surprisePulse 1.2s ease-in-out infinite;
}

.surprise-multiplier-hint {
  display: inline-block;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  background-color: rgba(255, 211, 58, 0.15);
  border: 1px solid #ffd32a;
  color: #ffd32a;
  font-size: 0.95rem;
  font-weight: 700;
}

.surprise-game-name {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--accent-color);
  margin-top: 0.5rem;
}

@keyframes surprisePulse {
  50% {
    transform: scale(1.05);
    opacity: 0.85;
  }
}

body.surprise-round-active .screen.active .screen-title::after {
  content: " ×2";
  color: #ffd32a;
  font-size: 0.85em;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

.trivia-meta {
  font-size: 1rem;
  color: var(--subtitle-color);
}

.trivia-timer {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--accent-color);
  min-width: 4rem;
}

.trivia-timer.timer-warning {
  color: #ff4757;
  animation: pulse 0.8s ease-in-out infinite;
}

@keyframes pulse {
  50% {
    transform: scale(1.08);
  }
}

.trivia-question {
  font-size: 1.375rem;
  line-height: 1.7;
  max-width: 36rem;
  width: 100%;
}

.trivia-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  width: 100%;
  max-width: 36rem;
}

.trivia-option {
  font-family: inherit;
  font-size: 1rem;
  padding: 1rem;
  border-radius: 0.5rem;
  border: 2px solid var(--subtitle-color);
  background-color: var(--surface-card);
  color: var(--text-color);
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease;
  text-align: center;
}

.trivia-option:hover:not(:disabled) {
  border-color: var(--accent-color);
  background-color: rgba(233, 69, 96, 0.1);
}

.trivia-option:disabled {
  cursor: default;
  opacity: 0.85;
}

.trivia-option.correct {
  border-color: #2ed573;
  background-color: rgba(46, 213, 115, 0.15);
}

.trivia-option.incorrect {
  border-color: #ff4757;
  background-color: rgba(255, 71, 87, 0.15);
}

.trivia-feedback {
  font-size: 1.25rem;
  font-weight: 700;
}

.trivia-feedback.correct {
  color: #2ed573;
}

.trivia-feedback.incorrect {
  color: #ff4757;
}

.trivia-scores {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  justify-content: center;
  width: 100%;
  max-width: 36rem;
  padding-top: 0.5rem;
  border-top: 1px solid rgba(160, 160, 176, 0.3);
}

.trivia-score-item {
  font-size: 0.9375rem;
  color: var(--subtitle-color);
}

.trivia-score-item strong {
  color: var(--text-color);
}

.sentence-meta {
  font-size: 1rem;
  color: var(--subtitle-color);
}

.sentence-timer {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--accent-color);
  min-width: 4rem;
}

.sentence-timer.timer-warning {
  color: #ff4757;
  animation: pulse 0.8s ease-in-out infinite;
}

.sentence-hint {
  font-size: 0.9375rem;
  color: var(--subtitle-color);
  max-width: 28rem;
}

.sentence-words {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  width: 100%;
  max-width: 36rem;
}

.sentence-word {
  font-family: inherit;
  font-size: 1rem;
  padding: 0.75rem 1.25rem;
  border-radius: 0.5rem;
  border: 2px solid var(--subtitle-color);
  background-color: var(--surface-card);
  color: var(--text-color);
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.sentence-word:hover:not(:disabled) {
  border-color: var(--accent-color);
  background-color: rgba(233, 69, 96, 0.1);
}

.sentence-word.selected {
  border-color: var(--accent-color);
  background-color: rgba(233, 69, 96, 0.2);
}

.sentence-word:disabled {
  cursor: default;
  opacity: 0.85;
}

.sentence-feedback {
  font-size: 1.25rem;
  font-weight: 700;
}

.sentence-feedback.correct {
  color: #2ed573;
}

.sentence-feedback.incorrect {
  color: #ff4757;
}

.sentence-scores {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  justify-content: center;
  width: 100%;
  max-width: 36rem;
  padding-top: 0.5rem;
  border-top: 1px solid rgba(160, 160, 176, 0.3);
}

.sentence-score-item {
  font-size: 0.9375rem;
  color: var(--subtitle-color);
}

.sentence-score-item strong {
  color: var(--text-color);
}

.picmerge-meta {
  font-size: 1rem;
  color: var(--subtitle-color);
}

.picmerge-hint {
  font-size: 0.9375rem;
  color: var(--subtitle-color);
  margin: 0.25rem 0 0.75rem;
}

.picmerge-timer {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--accent-color);
  min-width: 4rem;
}

.picmerge-timer.timer-warning {
  color: #ff4757;
  animation: pulse 0.8s ease-in-out infinite;
}

.picmerge-image-wrap {
  width: 100%;
  max-width: min(100%, 640px);
  margin: 0 auto 1rem;
  border-radius: 0.75rem;
  overflow: hidden;
  border: 2px solid var(--border-muted);
  background-color: var(--surface-inset);
  min-height: min(38vh, 14rem);
  display: flex;
  align-items: center;
  justify-content: center;
}

.picmerge-image {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
}

.picmerge-image-fallback {
  padding: 2rem 1rem;
  font-size: 1.125rem;
  color: var(--subtitle-color);
  text-align: center;
}

.picmerge-input-row {
  display: flex;
  gap: 0.75rem;
  width: 100%;
  max-width: 24rem;
  flex-wrap: wrap;
  justify-content: center;
}

.picmerge-input {
  flex: 1;
  min-width: 10rem;
  font-family: inherit;
  font-size: 1rem;
  padding: 0.625rem 0.875rem;
  border-radius: 0.5rem;
  border: 1px solid var(--subtitle-color);
  background-color: var(--surface-card);
  color: var(--text-color);
}

.picmerge-input:focus {
  outline: 2px solid var(--accent-color);
  outline-offset: 2px;
}

.picmerge-input:disabled {
  opacity: 0.7;
}

.picmerge-feedback {
  font-size: 1.25rem;
  font-weight: 700;
}

.picmerge-feedback.correct {
  color: #2ed573;
}

.picmerge-feedback.incorrect {
  color: #ff4757;
}

.picmerge-scores {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  justify-content: center;
  width: 100%;
  max-width: 36rem;
  padding-top: 0.5rem;
  border-top: 1px solid rgba(160, 160, 176, 0.3);
}

.picmerge-score-item {
  font-size: 0.9375rem;
  color: var(--subtitle-color);
}

.picmerge-score-item strong {
  color: var(--text-color);
}

.spot-meta {
  font-size: 1rem;
  color: var(--subtitle-color);
}

.spot-hint {
  font-size: 0.9375rem;
  color: var(--subtitle-color);
  margin: 0;
}

.spot-timer {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--accent-color);
  min-width: 4rem;
}

.spot-timer.timer-warning {
  color: #ff4757;
  animation: pulse 0.8s ease-in-out infinite;
}

.spot-images-row {
  display: flex;
  direction: ltr;
  gap: 0.75rem;
  width: 100%;
  max-width: 52rem;
  justify-content: center;
  flex-wrap: wrap;
}

.spot-image-wrap {
  position: relative;
  flex: 1;
  min-width: 12rem;
  max-width: 24rem;
  border-radius: 0.5rem;
  border: 2px solid var(--subtitle-color);
  overflow: hidden;
  background-color: var(--surface-inset);
}

.spot-image-wrap canvas {
  display: block;
  width: 100%;
  height: auto;
  max-height: 42vh;
}

#spot-left-canvas {
  cursor: crosshair;
}

.spot-markers {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.spot-marker {
  position: absolute;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  box-sizing: border-box;
}

.spot-marker.correct {
  border: 3px solid #2ed573;
  background-color: rgba(46, 213, 115, 0.2);
}

.spot-marker.wrong {
  border: 3px solid #ff4757;
  background-color: rgba(255, 71, 87, 0.2);
  animation: spotFadeOut 0.8s ease forwards;
}

@keyframes spotFadeOut {
  0% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(1.2);
  }
}

.spot-feedback {
  font-size: 1.25rem;
  font-weight: 700;
}

.spot-feedback.correct {
  color: #2ed573;
}

.spot-feedback.incorrect {
  color: #ff4757;
}

.spot-scores {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  justify-content: center;
  width: 100%;
  max-width: 36rem;
  padding-top: 0.5rem;
  border-top: 1px solid rgba(160, 160, 176, 0.3);
}

.spot-score-item {
  font-size: 0.9375rem;
  color: var(--subtitle-color);
}

.spot-score-item strong {
  color: var(--text-color);
}

.memory-meta {
  font-size: 1rem;
  color: var(--subtitle-color);
}

.memory-hint {
  font-size: 0.9375rem;
  color: var(--subtitle-color);
  margin: 0;
}

.memory-timer {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--accent-color);
  min-width: 4rem;
}

.memory-timer.timer-warning {
  color: #ff4757;
  animation: pulse 0.8s ease-in-out infinite;
}

.memory-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
  width: 100%;
  max-width: 20rem;
  aspect-ratio: 1;
  background-color: var(--surface-inset);
  padding: 4px;
  border-radius: 0.5rem;
  border: 2px solid var(--subtitle-color);
}

.memory-cell {
  position: relative;
  background-color: #2a2a44;
  border-radius: 2px;
  overflow: hidden;
  min-height: 0;
  border: none;
  padding: 0;
  cursor: pointer;
  font-family: inherit;
}

.memory-cell.hidden::after {
  content: "?";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--subtitle-color);
  background-color: #2a2a44;
  pointer-events: none;
}

.memory-cell.selected {
  outline: 2px solid var(--accent-color);
  outline-offset: -2px;
}

.memory-cell canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.memory-feedback {
  font-size: 1.25rem;
  font-weight: 700;
}

.memory-feedback.correct {
  color: #2ed573;
}

.memory-feedback.incorrect {
  color: #ff4757;
}

.memory-scores {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  justify-content: center;
  width: 100%;
  max-width: 36rem;
  padding-top: 0.5rem;
  border-top: 1px solid rgba(160, 160, 176, 0.3);
}

.memory-score-item {
  font-size: 0.9375rem;
  color: var(--subtitle-color);
}

.memory-score-item strong {
  color: var(--text-color);
}

.creative-meta {
  font-size: 1rem;
  color: var(--subtitle-color);
}

.creative-challenge {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-color);
  text-align: center;
  max-width: 36rem;
  margin: 0;
}

.creative-hint {
  font-size: 0.9375rem;
  color: var(--subtitle-color);
  margin: 0;
}

.creative-timer {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--accent-color);
  min-width: 4rem;
}

.creative-timer.timer-warning {
  color: #ff4757;
  animation: pulse 0.8s ease-in-out infinite;
}

.creative-answer-input {
  width: 100%;
  max-width: 36rem;
  min-height: 8rem;
  font-family: inherit;
  font-size: 1rem;
  padding: 0.75rem;
  border-radius: 0.5rem;
  border: 1px solid var(--subtitle-color);
  background-color: var(--surface-card);
  color: var(--text-color);
  resize: vertical;
}

.creative-answer-input:focus {
  outline: 2px solid var(--accent-color);
  outline-offset: 2px;
}

.creative-answer-input:disabled {
  opacity: 0.7;
}

#creative-create-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  max-width: 36rem;
}

.creative-draw-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
}

#creative-draw-canvas {
  display: block;
  width: 100%;
  max-width: 25rem;
  height: auto;
  border-radius: 0.5rem;
  border: 2px solid var(--subtitle-color);
  background-color: var(--surface-card);
  cursor: crosshair;
  touch-action: none;
}

.creative-rate-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  max-width: 36rem;
}

.creative-answer-preview {
  width: 100%;
  max-width: 25rem;
  padding: 0.75rem;
  border-radius: 0.5rem;
  border: 1px solid var(--subtitle-color);
  background-color: var(--surface-card);
  color: var(--text-color);
  font-size: 1rem;
  white-space: pre-wrap;
  word-break: break-word;
}

.creative-answer-preview img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 0.25rem;
}

.creative-rating-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  width: 100%;
}

.creative-rating-btn {
  min-width: 2.75rem;
  padding: 0.5rem 0.75rem;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  border-radius: 0.5rem;
  border: 1px solid var(--subtitle-color);
  background-color: var(--surface-card);
  color: var(--text-color);
  cursor: pointer;
}

.creative-rating-btn:hover {
  border-color: var(--accent-color);
  background-color: #1a2a4a;
}

.creative-feedback {
  font-size: 1.25rem;
  font-weight: 700;
}

.creative-feedback.correct {
  color: #2ed573;
}

.creative-feedback.incorrect {
  color: #ff4757;
}

.creative-scores {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  justify-content: center;
  width: 100%;
  max-width: 36rem;
  padding-top: 0.5rem;
  border-top: 1px solid rgba(160, 160, 176, 0.3);
}

.creative-score-item {
  font-size: 0.9375rem;
  color: var(--subtitle-color);
}

.creative-score-item strong {
  color: var(--text-color);
}

.game-select-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
  width: 100%;
  max-width: 40rem;
}

.game-select-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem;
  background-color: var(--surface-card);
  border: 2px solid var(--accent-color);
  border-radius: 0.75rem;
  cursor: pointer;
  font-family: inherit;
  color: var(--text-color);
  transition: background-color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}

.game-select-card:hover:not(.disabled) {
  background-color: var(--surface-elevated);
  transform: translateY(-2px);
}

.game-select-card:active:not(.disabled) {
  transform: scale(0.97);
}

.game-select-card.disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

.game-select-thumb {
  width: var(--icon-md);
  height: var(--icon-md);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.5rem;
  overflow: hidden;
  background-color: var(--surface-inset);
}

.game-select-thumb canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.game-select-name {
  font-size: 0.875rem;
  font-weight: 600;
  text-align: center;
  line-height: 1.4;
}

.session-end-scores,
.score-board {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: 100%;
  max-width: 24rem;
  padding: 1rem;
  background-color: var(--surface-card);
  border: 2px solid var(--accent-color);
  border-radius: 0.75rem;
}

.session-end-score-item,
.score-board-item {
  font-size: 1.125rem;
  color: var(--subtitle-color);
  text-align: right;
}

.session-end-score-item strong,
.score-board-item strong {
  color: var(--text-color);
}

.partial-results-subtitle {
  font-size: 1rem;
  color: var(--subtitle-color);
  text-align: center;
  max-width: 28rem;
  line-height: 1.6;
}

.session-end-screen {
  position: relative;
  overflow: hidden;
}

.session-end-winner {
  font-size: 1.5rem;
  font-weight: 800;
  color: #ffd32a;
  text-align: center;
  animation: winnerPulse 1.4s ease-in-out infinite;
}

.score-board-item--winner {
  background-color: rgba(255, 211, 58, 0.12);
  border: 2px solid #ffd32a;
  border-radius: 0.5rem;
  padding: 0.5rem 0.75rem;
  animation: winnerGlow 1.6s ease-in-out infinite;
}

.score-board-item--winner strong {
  color: #ffd32a;
}

.session-end-confetti {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.session-end-screen .screen-title,
.session-end-screen .session-end-winner,
.session-end-screen .score-board,
.session-end-screen .btn {
  position: relative;
  z-index: 1;
}

.confetti-piece {
  position: absolute;
  top: -12px;
  width: 8px;
  height: 12px;
  opacity: 0.85;
  animation: confettiFall linear infinite;
}

body.session-celebrating {
  align-items: stretch;
}

body.session-celebrating .session-end-screen.active {
  max-width: none;
  width: 100%;
  min-height: 100dvh;
  justify-content: center;
  background: linear-gradient(
    135deg,
    var(--stage-deep) 0%,
    var(--stage-panel) 40%,
    rgba(232, 67, 147, 0.15) 70%,
    var(--stage-deep) 100%
  );
  background-size: 200% 200%;
  animation: celebratingBg 4s ease infinite;
}

@keyframes winnerPulse {
  50% {
    transform: scale(1.04);
    opacity: 0.9;
  }
}

@keyframes winnerGlow {
  50% {
    box-shadow: 0 0 12px rgba(255, 211, 58, 0.45);
  }
}

@keyframes confettiFall {
  0% {
    transform: translateY(0) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translateY(110vh) rotate(720deg);
    opacity: 0.2;
  }
}

@keyframes celebratingBg {
  0%,
  100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

.password-meta {
  font-size: 1rem;
  color: var(--subtitle-color);
}

.password-hint {
  font-size: 0.9375rem;
  color: var(--subtitle-color);
  margin: 0;
}

.password-timer {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--accent-color);
  min-width: 4rem;
}

.password-timer.timer-warning {
  color: #ff4757;
  animation: pulse 0.8s ease-in-out infinite;
}

.password-secret-word {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--accent-color);
  padding: 1.5rem 2rem;
  background-color: var(--surface-card);
  border: 2px solid var(--accent-color);
  border-radius: 0.75rem;
  min-width: 12rem;
}

.password-guess-section {
  display: flex;
  gap: 0.75rem;
  width: 100%;
  max-width: 24rem;
  flex-wrap: wrap;
  justify-content: center;
}

.password-guess-input {
  flex: 1;
  min-width: 10rem;
  font-family: inherit;
  font-size: 1rem;
  padding: 0.625rem 0.875rem;
  border-radius: 0.5rem;
  border: 1px solid var(--subtitle-color);
  background-color: var(--surface-card);
  color: var(--text-color);
}

.password-guess-input:focus {
  outline: 2px solid var(--accent-color);
  outline-offset: 2px;
}

.password-guess-input:disabled {
  opacity: 0.7;
}

.password-feedback {
  font-size: 1.25rem;
  font-weight: 700;
}

.password-feedback.correct {
  color: #2ed573;
}

.password-feedback.incorrect {
  color: #ff4757;
}

.password-scores {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  justify-content: center;
  width: 100%;
  max-width: 36rem;
  padding-top: 0.5rem;
  border-top: 1px solid rgba(160, 160, 176, 0.3);
}

.password-score-item {
  font-size: 0.9375rem;
  color: var(--subtitle-color);
}

.password-score-item strong {
  color: var(--text-color);
}

.ui-card {
  background-color: var(--surface-card);
  border: 1px solid rgba(240, 199, 94, 0.2);
  border-radius: var(--radius-md);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
}

.surprise-screen .content-panel {
  border-color: rgba(240, 199, 94, 0.35);
  box-shadow: 0 0 32px rgba(240, 199, 94, 0.12);
}

.surprise-badge {
  font-size: clamp(1.5rem, 4vw, 2rem);
}

.partial-results-screen .score-board {
  max-width: min(90vw, 32rem);
}

.game-play-layout {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-lg);
  width: 100%;
}

.game-play-layout__meta,
.game-play-layout__main,
.game-play-layout__main--wide,
.game-play-layout__side {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-md);
}

.game-meta,
.trivia-meta,
.sentence-meta,
.picmerge-meta,
.spot-meta,
.memory-meta,
.creative-meta,
.password-meta {
  font-size: 1rem;
  color: var(--subtitle-color);
}

.game-hint,
.sentence-hint,
.picmerge-hint,
.spot-hint,
.memory-hint,
.creative-hint,
.password-hint {
  font-size: 0.9375rem;
  color: var(--subtitle-color);
}

.game-timer,
.trivia-timer,
.sentence-timer,
.picmerge-timer,
.spot-timer,
.memory-timer,
.creative-timer,
.password-timer {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--accent-color);
  min-width: 4rem;
}

.game-timer.timer-warning,
.trivia-timer.timer-warning,
.sentence-timer.timer-warning,
.picmerge-timer.timer-warning,
.spot-timer.timer-warning,
.memory-timer.timer-warning,
.creative-timer.timer-warning,
.password-timer.timer-warning {
  color: var(--color-error);
  animation: pulse 0.8s ease-in-out infinite;
}

.game-feedback,
.trivia-feedback,
.sentence-feedback,
.picmerge-feedback,
.spot-feedback,
.memory-feedback,
.creative-feedback,
.password-feedback {
  font-size: 1.25rem;
  font-weight: 700;
}

.game-feedback.correct,
.trivia-feedback.correct,
.sentence-feedback.correct,
.picmerge-feedback.correct,
.spot-feedback.correct,
.memory-feedback.correct,
.creative-feedback.correct,
.password-feedback.correct {
  color: var(--color-success);
}

.game-feedback.incorrect,
.trivia-feedback.incorrect,
.sentence-feedback.incorrect,
.picmerge-feedback.incorrect,
.spot-feedback.incorrect,
.memory-feedback.incorrect,
.creative-feedback.incorrect,
.password-feedback.incorrect {
  color: var(--color-error);
}

.game-scores,
.trivia-scores,
.sentence-scores,
.picmerge-scores,
.spot-scores,
.memory-scores,
.creative-scores,
.password-scores {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  justify-content: center;
  width: 100%;
  max-width: var(--content-max-width);
  padding-top: var(--space-sm);
  border-top: 1px solid rgba(160, 160, 176, 0.3);
  margin-top: var(--space-md);
}

.ui-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
}

.ui-input {
  font-family: inherit;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-muted);
  background-color: var(--surface-inset);
  color: var(--text-color);
}

.game-screen .content-panel--game {
  min-height: auto;
}

.game-select-card {
  min-height: 7rem;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  -webkit-tap-highlight-color: transparent;
}

.game-select-card:hover:not(.disabled) {
  box-shadow: 0 4px 16px rgba(233, 69, 96, 0.2);
}

.game-select-card:focus-visible {
  outline: 2px solid var(--color-gold);
  outline-offset: 2px;
}

.game-select-thumb {
  width: var(--icon-md);
  height: var(--icon-md);
  aspect-ratio: 1;
  flex-shrink: 0;
}

.game-select-grid {
  max-width: min(100%, 44rem);
}

.trivia-question {
  font-size: clamp(1.125rem, 2.5vw, 1.5rem);
}

.trivia-option {
  min-height: 44px;
  -webkit-tap-highlight-color: transparent;
}

.sentence-word {
  min-height: 2.75rem;
  -webkit-tap-highlight-color: transparent;
}

.sentence-words {
  gap: var(--space-md);
}

.memory-grid {
  width: min(85vw, 28rem);
  max-width: none;
}

.memory-cell {
  min-height: 44px;
  -webkit-tap-highlight-color: transparent;
}

.spot-images-row {
  display: flex;
  direction: ltr;
  gap: var(--space-lg);
  width: 100%;
  max-width: min(100%, 56rem);
  justify-content: center;
  flex-wrap: wrap;
}

.spot-image-column {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
  flex: 1;
  min-width: 14rem;
  max-width: 28rem;
}

.spot-image-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
  direction: rtl;
}

.spot-image-wrap canvas {
  max-height: 45vh;
}

.spot-marker {
  width: var(--icon-sm);
  height: var(--icon-sm);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.picmerge-image:not([hidden]) {
  animation: picmergeFadeIn 0.35s ease;
}

@keyframes picmergeFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.creative-answer-input {
  min-height: 12rem;
}

.creative-rating-buttons {
  display: grid;
  grid-template-columns: repeat(5, minmax(44px, 1fr));
  gap: var(--space-sm);
  width: 100%;
  max-width: 24rem;
}

.creative-rating-btn {
  min-height: 44px;
  min-width: 44px;
}

.password-secret-word {
  font-size: clamp(2rem, 5vw, 3rem);
}

.score-board,
.session-end-scores {
  max-width: min(90vw, 32rem);
}

.taif-stage[data-layout="compact"] .taif-host-bubble {
  max-width: min(55vw, 22rem);
}

@media (min-width: 835px) and (orientation: landscape) {
  .game-play-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xl);
    width: 100%;
    max-width: var(--content-max-width);
    align-items: start;
  }

  .game-play-layout__meta {
    grid-column: 1 / -1;
  }

  .game-play-layout__main--wide {
    grid-column: 1 / -1;
  }

  .memory-grid {
    width: min(45vw, 36rem);
  }

  .creative-answer-input,
  .creative-draw-wrap canvas {
    min-height: 30vh;
  }
}

@media (min-width: 835px) {
  .memory-grid {
    width: min(60vw, 32rem);
  }

  .trivia-options {
    max-width: var(--content-max-width);
  }
}

@media (orientation: landscape) and (min-width: 835px) {
  .taif-stage[data-layout="compact"] {
    --taif-char-compact: 110px;
  }
}

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

  .screen.active {
    animation: none;
  }
}
