:root {
  color-scheme: dark;
  font-family: "Alexandria", Tahoma, sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  --background: #17120e;
  --surface: #211a15;
  --surface-light: #2a211a;
  --text: #f8f1e6;
  --muted: #aa9a87;
  --gold: #e8a94b;
  --gold-light: #f4c77d;
  --border: #403329;
  --danger: #ed887b;
}

:root[data-theme="light"] {
  color-scheme: light;
  --background: #f3ede3;
  --surface: #fffaf2;
  --surface-light: #f7efe3;
  --text: #30251b;
  --muted: #756452;
  --gold: #a8661e;
  --gold-light: #925719;
  --border: #d9c7ad;
  --danger: #a33d32;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(ellipse at 9% 7%, rgb(131 72 29 / 18%), transparent 34rem),
    radial-gradient(ellipse at 92% 88%, rgb(107 57 27 / 12%), transparent 33rem),
    var(--background);
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

.app-shell {
  display: flex;
  flex-direction: column;
  width: min(1120px, calc(100% - 48px));
  min-height: 100vh;
  margin-inline: auto;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 82px;
  border-bottom: 1px solid rgb(248 241 230 / 9%);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-size: 23px;
  font-weight: 800;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--gold);
  border-radius: 50%;
  color: var(--gold-light);
  font-size: 20px;
}

.brand-dot {
  color: var(--gold);
}

.topbar-note,
.footer {
  color: var(--muted);
  font-size: 12px;
}

.hero {
  display: grid;
  flex: 1;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 440px);
  align-items: center;
  gap: clamp(36px, 8vw, 110px);
  padding-block: 64px;
}

.hero-copy {
  position: relative;
  padding-bottom: 54px;
}

.eyebrow {
  margin: 0;
  color: var(--gold);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.eyebrow-star {
  padding-inline-start: 6px;
  font-size: 15px;
}

.hero h1 {
  margin: 20px 0 16px;
  font-size: clamp(44px, 6.8vw, 78px);
  font-weight: 800;
  line-height: 1.3;
}

.hero h1 span {
  color: var(--gold);
}

.hero-description {
  margin: 0;
  color: #c6b8a7;
  font-size: 15px;
  line-height: 2.1;
}

.hero-stamp {
  position: absolute;
  bottom: -8px;
  left: 9%;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--gold);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  transform: rotate(-12deg);
}

.hero-stamp b {
  font-size: 22px;
}

.setup-card,
.game-card {
  border: 1px solid var(--border);
  border-radius: 18px;
  background: linear-gradient(145deg, rgb(42 33 26 / 96%), rgb(30 24 19 / 98%));
  box-shadow: 0 24px 80px rgb(0 0 0 / 24%);
}

.setup-card {
  padding: clamp(24px, 4vw, 36px);
}

.card-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
}

.card-heading h2 {
  margin: 7px 0 0;
  font-size: 23px;
  font-weight: 700;
}

.step-badge {
  display: grid;
  width: 37px;
  height: 37px;
  place-items: center;
  border: 1px solid rgb(232 169 75 / 50%);
  border-radius: 50%;
  color: var(--gold-light);
  font-size: 14px;
}

.field-label {
  display: block;
  margin-bottom: 10px;
  color: #e8ddcd;
  font-size: 13px;
  font-weight: 600;
}

.add-player-form {
  display: flex;
  gap: 8px;
}

.add-player-form input {
  width: 100%;
  min-width: 0;
  height: 46px;
  padding-inline: 14px;
  border: 1px solid var(--border);
  border-radius: 9px;
  outline: none;
  color: var(--text);
  background: #19140f;
  font-size: 12px;
}

.add-player-form input:focus {
  border-color: var(--gold);
}

.add-player-form input::placeholder {
  color: #827463;
}

.icon-button {
  flex: 0 0 46px;
  border: 1px solid rgb(232 169 75 / 55%);
  border-radius: 9px;
  color: var(--gold-light);
  background: rgb(232 169 75 / 9%);
  cursor: pointer;
  font-size: 24px;
  transition: background 150ms ease, transform 150ms ease;
}

.icon-button:hover {
  background: rgb(232 169 75 / 18%);
  transform: translateY(-1px);
}

.player-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 38px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.player-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 9px 7px 6px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgb(255 255 255 / 3%);
  color: #efe4d6;
  font-size: 11px;
}

.player-chip button {
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: var(--muted);
  background: rgb(255 255 255 / 7%);
  cursor: pointer;
}

.player-chip button:hover {
  color: var(--danger);
}

.helper-text {
  min-height: 18px;
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 10px;
}

.section-divider {
  height: 1px;
  margin-block: 20px;
  background: rgb(248 241 230 / 9%);
}

.category-picker {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.category-picker legend {
  padding: 0;
}

.category-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
}

.category-option {
  position: relative;
  display: flex;
  min-height: 76px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border: 1px solid var(--border);
  border-radius: 10px;
  color: #c5b6a3;
  cursor: pointer;
  font-size: 11px;
  transition: border-color 150ms ease, background 150ms ease, color 150ms ease;
}

.category-option:has(input:checked) {
  border-color: var(--gold);
  color: var(--gold-light);
  background: rgb(232 169 75 / 8%);
}

.category-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.category-option:focus-within {
  outline: 2px solid var(--gold-light);
  outline-offset: 2px;
}

.category-icon {
  font-size: 20px;
  line-height: 1.3;
}

.primary-button {
  display: flex;
  min-height: 49px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 0;
  border-radius: 10px;
  color: #24180a;
  background: linear-gradient(105deg, #f1bb68, #df963b);
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  transition: filter 150ms ease, transform 150ms ease;
}

.primary-button:not(:disabled):hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.primary-button:disabled {
  cursor: not-allowed;
  filter: grayscale(0.5);
  opacity: 0.45;
}

.start-button {
  width: 100%;
  margin-top: 22px;
}

.connection-status {
  margin: 11px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.8;
  text-align: center;
}

.connection-status[data-state="error"] {
  color: var(--danger);
}

.connection-status[data-state="success"] {
  color: #98c99e;
}

.game-status {
  min-height: 20px;
  margin: -16px 0 20px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.8;
}

.game-status[data-state="error"] {
  color: var(--danger);
}

.game-status[data-state="success"] {
  color: #98c99e;
}

.footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 58px;
  border-top: 1px solid rgb(248 241 230 / 9%);
  font-size: 10px;
}

.footer span:nth-child(2) {
  color: var(--gold);
}

.hidden {
  display: none !important;
}

.game-screen {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  padding-block: 36px 58px;
}

.back-button {
  align-self: flex-start;
  padding: 8px 0;
  border: 0;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-size: 12px;
}

.back-button:hover {
  color: var(--gold-light);
}

.game-card {
  display: flex;
  width: min(100%, 650px);
  min-height: 420px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: auto;
  padding: 42px 34px;
  text-align: center;
}

.game-card h1 {
  margin: 11px 0 24px;
  font-size: clamp(26px, 5vw, 40px);
}

.turn-indicator {
  margin-bottom: 16px;
  color: var(--gold-light);
  font-size: 14px;
  font-weight: 700;
}

.prompt-text {
  max-width: 490px;
  min-height: 88px;
  margin: 0 0 30px;
  color: #f6e8d3;
  font-size: clamp(19px, 3.6vw, 26px);
  font-weight: 500;
  line-height: 2;
}

.next-button {
  min-width: 210px;
  padding-inline: 22px;
}

.game-footnote {
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 11px;
}

@media (max-width: 760px) {
  .app-shell {
    width: min(100% - 32px, 470px);
  }

  .topbar {
    min-height: 68px;
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 22px;
    padding-block: 42px;
  }

  .hero-copy {
    padding-bottom: 0;
  }

  .hero h1 {
    margin-top: 13px;
    font-size: clamp(40px, 12vw, 58px);
  }

  .hero-description {
    font-size: 13px;
  }

  .hero-stamp {
    top: 10px;
    bottom: auto;
  }

  .setup-card {
    padding: 24px 20px;
  }

  .game-screen {
    padding-block: 22px 36px;
  }

  .game-card {
    min-height: 380px;
    padding: 34px 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

#setup-screen,
#game-screen {
  display: none !important;
}

.topbar,
.footer {
  display: none !important;
}

.app-shell {
  width: 100%;
  min-height: 100svh;
}

.screen {
  width: 100%;
  min-height: 100svh;
}

.landing-screen {
  position: relative;
  display: flex;
  width: min(100%, 440px);
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  margin-inline: auto;
  padding: max(84px, calc(env(safe-area-inset-top) + 64px)) 34px 34px;
  isolation: isolate;
  text-align: center;
  background:
    linear-gradient(180deg, rgb(15 11 8 / 38%), rgb(14 10 8 / 34%) 40%, rgb(12 9 7 / 87%)),
    radial-gradient(ellipse at 50% 35%, rgb(196 105 37 / 25%), transparent 42%),
    repeating-linear-gradient(90deg, transparent 0 45px, rgb(225 146 70 / 5%) 46px 49px, transparent 51px 86px),
    linear-gradient(145deg, #19110c, #302016 48%, #130e0a);
}

.lobby-settings-button {
  position: fixed;
  z-index: 20;
  top: max(18px, env(safe-area-inset-top));
  right: max(18px, env(safe-area-inset-right));
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid rgb(232 169 75 / 42%);
  border-radius: 50%;
  color: var(--gold-light);
  background: rgb(15 12 9 / 74%);
  cursor: pointer;
  font-size: 20px;
  transition: transform 180ms ease, background 180ms ease;
}

.lobby-settings-button:hover {
  background: rgb(232 169 75 / 15%);
  transform: rotate(24deg);
}

.landing-screen::before,
.landing-screen::after {
  position: absolute;
  z-index: -1;
  content: "";
  pointer-events: none;
}

.landing-screen::before {
  inset: 7% 7% 22%;
  border: 1px solid rgb(220 156 80 / 12%);
  border-radius: 46% 46% 6px 6px;
  background:
    linear-gradient(90deg, transparent 9%, rgb(9 7 5 / 68%) 10% 12%, transparent 13% 86%, rgb(9 7 5 / 68%) 87% 89%, transparent 90%),
    repeating-linear-gradient(0deg, rgb(9 7 5 / 58%) 0 9px, transparent 10px 46px),
    radial-gradient(ellipse at 50% 35%, rgb(214 133 61 / 24%), transparent 50%);
  filter: blur(0.2px);
}

.landing-screen::after {
  right: -25%;
  bottom: 14%;
  left: -25%;
  height: 28%;
  border-top: 1px solid rgb(229 160 77 / 27%);
  background: radial-gradient(ellipse at 50% 0, rgb(173 90 37 / 20%), transparent 67%);
  transform: perspective(140px) rotateX(7deg);
}

.landing-decoration {
  position: absolute;
  z-index: -1;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.glow {
  position: absolute;
  width: 130px;
  height: 130px;
  border-radius: 50%;
  background: #df8f35;
  filter: blur(55px);
  opacity: 0.22;
}

.glow-one {
  top: 15%;
  right: 6%;
}

.glow-two {
  bottom: 23%;
  left: 7%;
  width: 90px;
  height: 90px;
  opacity: 0.17;
}

.table-line {
  position: absolute;
  right: -12%;
  bottom: 16%;
  left: -12%;
  height: 1px;
  background: rgb(229 160 77 / 31%);
  box-shadow: 0 14px 40px 16px rgb(0 0 0 / 38%);
}

.cup {
  position: absolute;
  bottom: 12%;
  width: 43px;
  height: 25px;
  border: 1px solid rgb(230 177 111 / 38%);
  border-radius: 5px 5px 17px 17px;
  background: linear-gradient(180deg, rgb(187 114 59 / 22%), rgb(24 16 11 / 78%));
  box-shadow: 0 8px 13px rgb(0 0 0 / 40%);
  transform: perspective(50px) rotateX(-7deg);
}

.cup::before {
  position: absolute;
  top: 4px;
  right: -12px;
  width: 12px;
  height: 12px;
  border: 1px solid rgb(230 177 111 / 38%);
  border-left: 0;
  border-radius: 0 50% 50% 0;
  content: "";
}

.cup-one {
  right: 12%;
}

.cup-two {
  bottom: 13%;
  left: 10%;
  transform: scale(0.78) perspective(50px) rotateX(-7deg);
}

.spark {
  position: absolute;
  color: rgb(235 170 90 / 70%);
  text-shadow: 0 0 16px rgb(255 176 79 / 38%);
}

.spark-one {
  top: 17%;
  left: 13%;
  font-size: 19px;
}

.spark-two {
  top: 30%;
  right: 13%;
  font-size: 13px;
}

.landing-content {
  width: 100%;
  max-width: 310px;
  margin: auto;
  padding-block: 24px;
}

.landing-crown {
  margin: 0 0 -11px;
  color: var(--gold);
  font-size: 27px;
  line-height: 1;
  text-shadow: 0 0 20px rgb(232 169 75 / 40%);
}

.landing-title {
  margin: 0;
  color: #efc18a;
  font-size: clamp(68px, 20vw, 94px);
  font-weight: 800;
  line-height: 1.35;
  text-shadow: 0 5px 0 #6b371e, 0 12px 30px rgb(0 0 0 / 74%);
}

.landing-tagline {
  margin: -5px 0 26px;
  color: #f0e1cf;
  font-size: 13px;
  letter-spacing: 0.06em;
}

.landing-description {
  margin: 0 0 28px;
  color: #d3c0aa;
  font-size: 13px;
  line-height: 2;
}

.landing-actions {
  display: grid;
  gap: 10px;
}

.landing-actions .primary-button,
.landing-actions .outline-button {
  width: 100%;
  min-height: 46px;
  border-radius: 999px;
  font-size: 13px;
}

.landing-actions .primary-button {
  box-shadow: 0 7px 24px rgb(217 142 55 / 18%);
}

.outline-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid rgb(232 169 75 / 52%);
  color: #f2e3d0;
  background: rgb(16 12 9 / 68%);
  cursor: pointer;
  transition: background 150ms ease, border-color 150ms ease;
}

.outline-button:hover {
  border-color: var(--gold-light);
  background: rgb(232 169 75 / 12%);
}

.button-symbol {
  color: var(--gold-light);
  font-size: 16px;
}

.landing-footer {
  margin: 30px 0 0;
  color: var(--gold-light);
  font-size: 12px;
}

.landing-footer span {
  display: block;
  margin-bottom: 5px;
  font-size: 19px;
}

.landing-credit {
  position: absolute;
  bottom: 26px;
  left: 23px;
  margin: 0;
  color: rgb(232 169 75 / 78%);
  font-family: Georgia, serif;
  font-size: 11px;
  font-style: italic;
  line-height: 1.5;
  text-align: left;
  transform: rotate(-10deg);
}

.form-screen {
  position: relative;
  display: flex;
  width: min(100% - 32px, 460px);
  flex-direction: column;
  justify-content: center;
  margin-inline: auto;
  padding-block: 24px;
}

.form-screen > .back-button {
  position: absolute;
  top: 22px;
  right: 68px;
}

.form-card,
.members-card,
.round-card {
  border: 1px solid var(--border);
  border-radius: 18px;
  background: linear-gradient(145deg, rgb(42 33 26 / 96%), rgb(24 19 15 / 98%));
  box-shadow: 0 24px 80px rgb(0 0 0 / 24%);
}

.form-card {
  padding: clamp(24px, 7vw, 38px);
}

.form-card h1 {
  margin: 8px 0 10px;
  font-size: clamp(25px, 7vw, 34px);
}

.form-description {
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.9;
}

.text-input {
  display: block;
  width: 100%;
  height: 48px;
  margin-bottom: 20px;
  padding-inline: 14px;
  border: 1px solid var(--border);
  border-radius: 9px;
  outline: none;
  color: var(--text);
  background: #19140f;
  font-size: 13px;
}

.text-input:focus {
  border-color: var(--gold);
}

.text-input::placeholder {
  color: #827463;
}

.room-code-input {
  direction: ltr;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 0.3em;
  text-align: center;
}

.form-card .category-picker {
  margin-top: 23px;
}

.form-submit {
  width: 100%;
  margin-top: 23px;
}

.form-status {
  min-height: 18px;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.8;
  text-align: center;
}

.form-status[data-state="error"] {
  color: var(--danger);
}

.form-status[data-state="success"] {
  color: #98c99e;
}

.room-screen {
  display: flex;
  width: min(100% - 32px, 540px);
  flex-direction: column;
  margin-inline: auto;
  padding-block: 20px 34px;
}

.room-header {
  display: flex;
  min-height: 50px;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-inline-start: 68px;
}

.room-code-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px 6px 13px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--surface);
}

.room-label {
  color: var(--muted);
  font-size: 10px;
}

.room-code-card strong {
  color: var(--gold-light);
  font-size: 15px;
  letter-spacing: 0.12em;
}

.copy-button {
  padding: 5px 8px;
  border: 1px solid rgb(232 169 75 / 38%);
  border-radius: 6px;
  color: var(--gold-light);
  background: transparent;
  cursor: pointer;
  font-size: 10px;
}

.room-content {
  width: 100%;
  margin: auto;
}

.room-title-block {
  margin: 24px 0 20px;
  text-align: center;
}

.room-title-block h1 {
  margin: 7px 0;
  font-size: clamp(26px, 7vw, 36px);
}

.room-message {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.8;
}

.members-card,
.round-card {
  padding: 19px;
}

.members-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.members-heading h2 {
  margin: 0;
  font-size: 14px;
}

.member-count {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 50%;
  color: var(--gold-light);
  background: rgb(232 169 75 / 12%);
  font-size: 11px;
}

.member-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.member-item {
  display: flex;
  min-width: 0;
  min-height: 40px;
  align-items: center;
  gap: 7px;
  padding: 7px 10px;
  border: 1px solid rgb(248 241 230 / 8%);
  border-radius: 8px;
  color: #efe4d6;
  background: rgb(255 255 255 / 3%);
  font-size: 11px;
}

.member-item > span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.host-label {
  margin-inline-start: auto;
  color: var(--gold);
  font-size: 9px;
  white-space: nowrap;
}

.member-dot {
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  border-radius: 50%;
  background: #91c58f;
}

.round-card {
  margin-top: 12px;
  text-align: center;
}

.round-category {
  margin: 7px 0;
  font-size: 19px;
}

.round-turn {
  margin: 0;
  color: var(--gold-light);
  font-size: 12px;
}

.round-prompt {
  margin: 15px 0 0;
  color: #f6e8d3;
  font-size: clamp(17px, 5vw, 23px);
  line-height: 1.9;
}

.game-answer-button {
  width: 100%;
  min-height: 40px;
  margin-top: 10px;
  border-radius: 9px;
  font-size: 11px;
}

.game-answer,
.team-answer {
  margin: 12px 0 0;
  padding: 12px;
  border: 1px solid rgb(232 169 75 / 36%);
  border-radius: 10px;
  color: var(--gold-light);
  background: rgb(232 169 75 / 8%);
  font-size: 13px;
  line-height: 1.8;
}

.room-action-button {
  width: 100%;
  margin-top: 14px;
}

.room-status {
  margin: 9px 0 0;
}

.room-status[data-state="error"] {
  color: var(--danger);
}

.room-status[data-state="success"] {
  color: #98c99e;
}

.help-dialog {
  width: min(calc(100% - 32px), 410px);
  padding: 30px;
  border: 1px solid var(--border);
  border-radius: 18px;
  color: var(--text);
  background: #211a15;
  box-shadow: 0 24px 100px rgb(0 0 0 / 60%);
}

.help-dialog::backdrop {
  background: rgb(0 0 0 / 72%);
  backdrop-filter: blur(4px);
}

.help-dialog form {
  position: absolute;
  top: 12px;
  left: 12px;
}

.dialog-close {
  width: 32px;
  height: 32px;
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-size: 21px;
}

.help-dialog h2 {
  margin: 8px 0 17px;
}

.help-dialog ol {
  display: grid;
  gap: 13px;
  padding-inline-start: 23px;
  color: #ded0be;
  font-size: 12px;
  line-height: 1.9;
}

.help-dialog li::marker {
  color: var(--gold);
  font-weight: 700;
}

.dialog-note {
  margin: 16px 0 0;
  color: var(--gold-light);
  font-size: 11px;
  line-height: 1.8;
}

.settings-dialog {
  position: fixed;
  width: min(calc(100% - 32px), 410px);
  max-height: min(90svh, 650px);
  overflow-y: auto;
  padding: 29px;
  border: 1px solid var(--border);
  border-radius: 18px;
  color: var(--text);
  background: #211a15;
  box-shadow: 0 24px 100px rgb(0 0 0 / 60%);
}

.settings-dialog::backdrop {
  background: rgb(0 0 0 / 72%);
  backdrop-filter: blur(4px);
}

.settings-dialog-close-form {
  position: absolute;
  top: 12px;
  left: 12px;
}

.settings-dialog h2 {
  margin: 7px 0 22px;
  font-size: 23px;
}

.settings-section {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.settings-section + .settings-section {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid rgb(248 241 230 / 10%);
}

.settings-section legend {
  margin-bottom: 11px;
  padding: 0;
  color: #e8ddcd;
  font-size: 12px;
  font-weight: 600;
}

.theme-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.theme-option {
  position: relative;
  display: flex;
  min-height: 45px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: 9px;
  color: #c5b6a3;
  background: #19140f;
  cursor: pointer;
  font-size: 12px;
}

.theme-option:has(input:checked) {
  border-color: var(--gold);
  color: var(--gold-light);
  background: rgb(232 169 75 / 9%);
}

.theme-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.theme-option:focus-within {
  outline: 2px solid var(--gold-light);
  outline-offset: 2px;
}

.theme-option > span:first-of-type {
  font-size: 16px;
}

.music-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  cursor: pointer;
}

.music-toggle-row > span {
  display: grid;
  gap: 5px;
}

.music-toggle-row strong {
  color: #eee0cd;
  font-size: 12px;
  font-weight: 500;
}

.music-toggle-row small {
  color: var(--muted);
  font-size: 10px;
}

.music-toggle-row input {
  width: 42px;
  height: 23px;
  flex: 0 0 42px;
  appearance: none;
  border: 1px solid #655440;
  border-radius: 999px;
  background: #302820;
  cursor: pointer;
  transition: background 150ms ease, border-color 150ms ease;
}

.music-toggle-row input::before {
  display: block;
  width: 15px;
  height: 15px;
  margin: 3px;
  border-radius: 50%;
  background: #c3b7a7;
  content: "";
  transition: transform 150ms ease, background 150ms ease;
}

.music-toggle-row input:checked {
  border-color: var(--gold);
  background: rgb(232 169 75 / 35%);
}

.music-toggle-row input:checked::before {
  background: var(--gold-light);
  transform: translateX(18px);
}

.music-toggle-row input:focus-visible,
.volume-slider:focus-visible {
  outline: 2px solid var(--gold-light);
  outline-offset: 3px;
}

.music-play-button {
  width: 100%;
  min-height: 40px;
  margin-top: 14px;
  border: 1px solid rgb(232 169 75 / 40%);
  border-radius: 9px;
  color: var(--gold-light);
  background: rgb(232 169 75 / 8%);
  cursor: pointer;
  font-size: 11px;
  font-weight: 600;
  transition: background 150ms ease, border-color 150ms ease;
}

.music-play-button:hover {
  border-color: var(--gold);
  background: rgb(232 169 75 / 15%);
}

.volume-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 20px;
  color: #d9cbb8;
  font-size: 11px;
}

.volume-row output {
  color: var(--gold-light);
  font-variant-numeric: tabular-nums;
}

.volume-slider {
  width: 100%;
  height: 5px;
  margin: 14px 0 0;
  accent-color: var(--gold);
  cursor: pointer;
}

.settings-note,
.settings-status {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.8;
}

.settings-note {
  margin: 9px 0 0;
}

.settings-status {
  min-height: 18px;
  margin: 14px 0 0;
}

.settings-status[data-state="error"] {
  color: var(--danger);
}

.settings-status[data-state="success"] {
  color: #98c99e;
}

.mode-screen {
  position: relative;
  display: flex;
  width: min(100% - 32px, 440px);
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  margin-inline: auto;
  padding: 64px 20px 72px;
  isolation: isolate;
  background:
    radial-gradient(ellipse at 50% 42%, rgb(143 78 35 / 14%), transparent 48%),
    repeating-linear-gradient(90deg, transparent 0 54px, rgb(225 146 70 / 4%) 55px 57px, transparent 58px 96px);
}

.mode-screen::before {
  position: absolute;
  z-index: -1;
  inset: 6% 4% 15%;
  border: 1px solid rgb(220 156 80 / 12%);
  border-radius: 44% 44% 8px 8px;
  background:
    repeating-linear-gradient(0deg, rgb(9 7 5 / 32%) 0 8px, transparent 9px 54px),
    radial-gradient(ellipse at 50% 72%, rgb(117 69 38 / 13%), transparent 40%);
  content: "";
}

.mode-back-button {
  position: absolute;
  top: 22px;
  right: 68px;
}

.mode-content {
  width: min(100%, 345px);
  margin: auto;
}

.mode-heading {
  margin-bottom: 25px;
  text-align: center;
}

.mode-heading-symbol {
  color: var(--gold);
  font-size: 20px;
}

.mode-heading h1 {
  margin: 4px 0 0;
  font-size: 21px;
}

.mode-options {
  display: grid;
  gap: 15px;
}

.mode-option {
  display: grid;
  min-height: 84px;
  grid-template-columns: 52px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 12px;
  padding: 13px 15px;
  border: 1px solid #3d3932;
  border-radius: 13px;
  color: var(--text);
  background: linear-gradient(110deg, rgb(19 19 17 / 94%), rgb(29 28 24 / 94%));
  cursor: pointer;
  text-align: right;
  transition: border-color 150ms ease, background 150ms ease, transform 150ms ease;
}

.mode-option:hover,
.mode-option:focus-visible,
.mode-option.selected {
  border-color: var(--gold-light);
  background: linear-gradient(110deg, rgb(65 48 32 / 94%), rgb(35 30 24 / 96%));
}

.mode-option:hover {
  transform: translateY(-1px);
}

.mode-icon {
  display: grid;
  width: 47px;
  height: 47px;
  place-items: center;
  border: 1px solid rgb(232 169 75 / 32%);
  border-radius: 10px;
  color: var(--gold-light);
  font-size: 25px;
}

.mode-copy {
  display: grid;
  gap: 4px;
}

.mode-copy strong {
  color: #f3c57f;
  font-size: 13px;
  font-weight: 600;
}

.mode-copy small {
  color: #c5b9a8;
  font-size: 10px;
  line-height: 1.7;
}

.mode-arrow {
  color: var(--gold);
  font-size: 13px;
}

.mode-decoration {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 28px;
  color: rgb(190 117 67 / 50%);
  font-size: 27px;
}

.mode-decoration span:nth-child(2) {
  color: rgb(229 168 96 / 66%);
  transform: translateY(-8px);
}

.mode-caption {
  position: absolute;
  right: 0;
  bottom: 18px;
  left: 0;
  margin: 0;
  color: #c9bba9;
  font-size: 12px;
  text-align: center;
}

.online-screen,
.local-screen {
  position: relative;
  display: flex;
  width: min(100% - 32px, 460px);
  flex-direction: column;
  justify-content: center;
  margin-inline: auto;
  padding-block: 70px 24px;
}

.online-screen > .back-button,
.local-screen > .back-button,
.local-game-screen > .back-button {
  position: absolute;
  top: 22px;
  right: 68px;
}

.local-finish-actions {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.lobby-return-button {
  min-height: 54px;
  border-radius: 12px;
  box-shadow: 0 14px 34px rgb(217 142 55 / 18%);
  font-size: 15px;
}

.online-actions {
  display: grid;
  gap: 11px;
  margin-top: 21px;
}

.online-actions .primary-button,
.online-actions .outline-button {
  width: 100%;
  min-height: 48px;
  border-radius: 10px;
  font-size: 12px;
}

.local-screen .form-card h1 {
  margin-bottom: 21px;
}

.local-screen.celebrity-setup #local-category-picker {
  display: none;
}

.local-screen .add-player-form {
  align-items: flex-start;
}

.local-screen .add-player-form .text-input {
  margin-bottom: 0;
}

.local-player-list {
  display: grid;
  min-height: 0;
  gap: 7px;
  margin: 13px 0 12px;
}

.player-roster-row {
  display: flex;
  min-height: 43px;
  align-items: center;
  gap: 10px;
  padding: 5px 9px;
  border: 1px solid rgb(248 241 230 / 9%);
  border-radius: 10px;
  background: linear-gradient(100deg, rgb(10 12 12 / 94%), rgb(28 29 27 / 92%));
  color: #f0e8dc;
  font-size: 12px;
}

.player-avatar {
  display: grid;
  width: 31px;
  height: 31px;
  flex: 0 0 31px;
  place-items: center;
  border: 1px solid rgb(240 193 129 / 48%);
  border-radius: 50%;
  color: #fff0d9;
  background: linear-gradient(145deg, #a76637, #39241c);
  font-size: 12px;
  font-weight: 700;
}

.player-avatar-1 {
  background: linear-gradient(145deg, #71604d, #292522);
}

.player-avatar-2 {
  background: linear-gradient(145deg, #58736b, #222b29);
}

.player-avatar-3 {
  background: linear-gradient(145deg, #765553, #30201f);
}

.player-avatar-4 {
  background: linear-gradient(145deg, #6c6580, #282431);
}

.player-name-text {
  flex: 1;
}

.player-roster-row button {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border: 1px solid rgb(255 255 255 / 9%);
  border-radius: 50%;
  color: var(--muted);
  background: rgb(255 255 255 / 5%);
  cursor: pointer;
  font-size: 16px;
}

.player-roster-row button:hover {
  color: var(--danger);
}

.local-screen .form-card {
  padding: clamp(20px, 5vw, 30px);
}

.local-screen .form-card h1 {
  margin: 7px 0 4px;
}

.local-screen .form-description {
  margin-bottom: 12px;
}

.team-setup-card {
  width: 100%;
}

.team-setup-card .form-description {
  margin-bottom: 16px;
}

.team-setup-card .add-player-form {
  align-items: flex-start;
}

.team-setup-card .add-player-form .text-input {
  margin-bottom: 0;
}

.team-assignment-picker {
  display: flex;
  gap: 8px;
  margin: 10px 0 16px;
}

.team-assignment-picker label {
  flex: 1;
  cursor: pointer;
}

.team-assignment-picker input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.team-assignment-picker span {
  display: block;
  padding: 9px 6px;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--muted);
  font-size: 11px;
  text-align: center;
}

.team-assignment-picker input:checked + span {
  border-color: var(--gold);
  color: var(--gold-light);
  background: rgb(232 169 75 / 8%);
}

.team-assignment-picker input:focus-visible + span {
  outline: 2px solid var(--gold-light);
  outline-offset: 2px;
}

.team-rosters {
  display: grid;
  gap: 12px;
  margin: 6px 0 18px;
}

.team-roster {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgb(0 0 0 / 12%);
}

.team-roster h2 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 8px;
  color: var(--gold-light);
  font-size: 13px;
}

.team-roster ul {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.team-roster li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 25px;
  align-items: center;
  gap: 5px;
  min-height: 35px;
  color: var(--text);
  font-size: 11px;
}

.team-roster li button {
  min-height: 27px;
  padding: 3px 7px;
  border: 1px solid var(--border);
  border-radius: 7px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-size: 10px;
}

.team-roster li button:last-child {
  width: 25px;
  padding: 0;
  color: var(--danger);
  font-size: 16px;
}

.team-round-limit-label {
  display: block;
  margin: 0 0 7px;
}

.team-setup-card #team-round-limit {
  margin-bottom: 8px;
}

.team-game-screen {
  width: min(100% - 32px, 540px);
}

.team-round-card {
  width: 100%;
}

.team-scoreboard {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 14px;
  max-width: 320px;
  margin: 20px auto;
}

.team-score {
  display: grid;
  gap: 4px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgb(0 0 0 / 12%);
}

.team-score span {
  color: var(--muted);
  font-size: 10px;
}

.team-score strong {
  color: var(--gold-light);
  font-size: 24px;
}

.team-score-separator {
  color: var(--muted);
}

.team-wheel-wrap {
  position: relative;
  display: grid;
  width: min(64vw, 260px);
  aspect-ratio: 1;
  place-items: center;
  margin: 18px auto 8px;
}

.team-wheel {
  position: relative;
  width: 100%;
  height: 100%;
  border: 5px solid #d9a35f;
  border-radius: 50%;
  box-shadow: 0 0 0 5px rgb(0 0 0 / 20%), 0 12px 28px rgb(0 0 0 / 30%);
  transition: transform 4.2s cubic-bezier(0.12, 0.72, 0.12, 1);
}

.team-wheel::after {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 27px;
  height: 27px;
  border: 3px solid #f0c580;
  border-radius: 50%;
  background: #352115;
  box-shadow: 0 2px 7px rgb(0 0 0 / 45%);
  content: "";
  transform: translate(-50%, -50%);
}

.team-wheel-pointer {
  position: absolute;
  z-index: 1;
  top: -5px;
  left: 50%;
  width: 0;
  height: 0;
  border-top: 0;
  border-right: 12px solid transparent;
  border-bottom: 25px solid #f4ca83;
  border-left: 12px solid transparent;
  filter: drop-shadow(0 2px 2px rgb(0 0 0 / 55%));
  transform: translateX(-50%);
}

.team-wheel-label {
  position: absolute;
  width: 68px;
  padding: 5px 3px;
  border: 1px solid rgb(255 241 217 / 20%);
  border-radius: 999px;
  color: #fff4df;
  background: rgb(36 22 14 / 74%);
  font-size: 10px;
  font-weight: 700;
  text-align: center;
  text-shadow: 0 1px 3px rgb(0 0 0 / 65%);
  transform: translate(-50%, -50%) rotate(var(--label-counter-angle, 0deg));
  pointer-events: none;
}

.team-wheel-result {
  min-height: 22px;
  margin: 7px 0;
  color: var(--gold-light);
  font-size: 12px;
}

.team-spin-button {
  width: min(100%, 280px);
  min-height: 43px;
  margin: 0 auto 14px;
  border-radius: 9px;
  font-size: 12px;
}

.team-show-answer-button {
  width: 100%;
  min-height: 40px;
  margin-top: 10px;
  border-radius: 9px;
  font-size: 11px;
}

.team-answer {
  text-align: center;
}

.team-round-actions {
  display: grid;
  gap: 9px;
  margin-top: 17px;
}

.team-round-actions .primary-button,
.team-round-actions .outline-button,
.team-match-result .primary-button,
.team-match-result .outline-button,
.team-restart-button,
#team-retry-card-button {
  width: 100%;
  min-height: 43px;
  padding: 9px 12px;
  border-radius: 9px;
  font-size: 12px;
}

.team-match-result {
  margin-top: 18px;
  padding-top: 15px;
  border-top: 1px solid var(--border);
}

.team-match-result h2 {
  margin: 0 0 5px;
  color: var(--gold-light);
  font-size: 20px;
}

.team-match-result p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.8;
}

.team-match-result .team-penalty-prompt {
  color: var(--text);
  font-size: 14px;
}

.team-restart-button {
  margin-top: 12px;
}

.local-screen .category-picker {
  margin-top: 20px;
}

.game-category-options {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.game-category-options .category-option {
  min-height: 66px;
  gap: 2px;
  font-size: 10px;
}

.game-category-options .category-icon {
  font-size: 18px;
}

.game-category-options .category-option:last-child:nth-child(odd) {
  grid-column: 2;
}

.online-category-picker {
  margin-top: 18px;
}

.online-screen .form-card {
  padding: clamp(22px, 6vw, 32px);
}

.online-screen .form-card h1 {
  font-size: clamp(23px, 6vw, 30px);
}

.online-screen .form-description {
  margin-bottom: 14px;
}

#join-screen .form-card h1 {
  margin-bottom: 8px;
}

#join-screen .form-description {
  margin-bottom: 20px;
}

#join-screen .room-code-input {
  height: 58px;
  margin-bottom: 20px;
  border-color: rgb(232 169 75 / 30%);
  background: linear-gradient(115deg, #101312, #1b1d1c);
  font-size: 22px;
}

#join-screen .field-label {
  margin-bottom: 9px;
}

.room-share-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 15px;
  padding: 12px 14px;
  border: 1px solid rgb(232 169 75 / 24%);
  border-radius: 12px;
  background: linear-gradient(100deg, rgb(21 18 14 / 96%), rgb(38 29 21 / 94%));
}

.room-share-card > div {
  display: grid;
  gap: 6px;
}

.room-share-card strong {
  color: var(--gold-light);
  font-size: 12px;
}

.room-share-card span {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.7;
}

.room-share-card canvas {
  display: block;
  width: 82px;
  height: 82px;
  flex: 0 0 82px;
  padding: 4px;
  border-radius: 7px;
  background: #fff;
}

.room-share-card canvas[hidden] {
  display: none;
}

.qr-error {
  max-width: 130px;
  margin: 0;
  color: var(--danger);
  font-size: 10px;
  line-height: 1.7;
}

.local-game-screen {
  position: relative;
  display: flex;
  width: min(100% - 32px, 540px);
  flex-direction: column;
  justify-content: center;
  margin-inline: auto;
  padding-block: 72px 34px;
}

.local-round-card {
  width: 100%;
  padding: 28px 20px;
  text-align: center;
}

.local-round-card .round-category {
  font-size: 26px;
}

.local-round-card .round-prompt {
  min-height: 92px;
}

.local-round-card .form-status:empty {
  min-height: 0;
  margin: 0;
}

.celebrity-round-card .round-category {
  margin-bottom: 8px;
}

.celebrity-timer {
  display: inline-flex;
  min-width: 92px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin: 10px auto 2px;
  padding: 7px 13px;
  border: 1px solid #39c6dc;
  border-radius: 999px;
  color: #e8fbff;
  background: #10252b;
  box-shadow: 0 0 14px rgb(57 198 220 / 18%);
  font-size: 13px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.celebrity-timer span {
  color: #55d7ec;
  font-size: 17px;
}

.celebrity-timer.is-urgent {
  border-color: #ef665b;
  color: #fff0ed;
  background: #351a1a;
  box-shadow: 0 0 16px rgb(239 102 91 / 28%);
}

.celebrity-timer.is-urgent span {
  color: #ff8175;
}

.celebrity-portrait {
  position: relative;
  width: min(100%, 220px);
  height: 188px;
  overflow: hidden;
  margin: 14px auto 10px;
  border: 1px solid #5a493b;
  border-radius: 16px;
  background:
    radial-gradient(ellipse at 50% 14%, rgb(255 194 98 / 72%), transparent 33%),
    linear-gradient(155deg, #563a27, #171614 72%);
  box-shadow: inset 0 0 24px rgb(0 0 0 / 48%), 0 8px 22px rgb(0 0 0 / 22%);
}

.celebrity-portrait-image {
  position: absolute;
  z-index: 2;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 28%;
  transition: filter 220ms ease, opacity 220ms ease;
}

.celebrity-portrait.has-image .celebrity-portrait-hair,
.celebrity-portrait.has-image .celebrity-portrait-face,
.celebrity-portrait.has-image .celebrity-portrait-body {
  display: none;
}

.celebrity-portrait.has-image .celebrity-portrait-question {
  z-index: 3;
  background: rgb(14 18 20 / 18%);
}

.celebrity-portrait.celebrity-portrait-hidden .celebrity-portrait-image {
  filter: blur(14px);
  opacity: 0.58;
}

.celebrity-portrait:not(.celebrity-portrait-hidden) .celebrity-portrait-image {
  filter: none;
  opacity: 1;
}

.celebrity-portrait-hair,
.celebrity-portrait-face,
.celebrity-portrait-body {
  position: absolute;
  display: block;
  transition: filter 220ms ease, opacity 220ms ease;
}

.celebrity-portrait-hair {
  z-index: 1;
  top: 22px;
  left: 50%;
  width: 83px;
  height: 94px;
  border-radius: 50%;
  background: linear-gradient(145deg, #191513 15%, #37251b 75%);
  transform: translateX(-50%);
}

.celebrity-portrait-face {
  z-index: 2;
  top: 41px;
  left: 50%;
  width: 62px;
  height: 76px;
  border: 1px solid rgb(255 221 176 / 45%);
  border-radius: 46% 46% 48% 48%;
  background:
    radial-gradient(ellipse at 31% 48%, #35251c 0 3px, transparent 4px),
    radial-gradient(ellipse at 69% 48%, #35251c 0 3px, transparent 4px),
    radial-gradient(ellipse at 50% 65%, #915b42 0 5px, transparent 6px),
    linear-gradient(100deg, #aa7455, #e0b18b 48%, #946147);
  transform: translateX(-50%);
}

.celebrity-portrait-body {
  z-index: 1;
  bottom: -60px;
  left: 50%;
  width: 148px;
  height: 132px;
  border: 1px solid rgb(228 185 125 / 34%);
  border-radius: 52% 52% 0 0;
  background: linear-gradient(110deg, #172c32, #49636a 50%, #1b3037);
  transform: translateX(-50%);
}

.celebrity-portrait-question {
  position: absolute;
  z-index: 3;
  inset: 0;
  display: grid;
  place-items: center;
  color: #fff6e7;
  background: rgb(14 18 20 / 37%);
  font-size: 48px;
  font-weight: 700;
  opacity: 0;
  transition: opacity 180ms ease;
}

.celebrity-portrait.celebrity-portrait-hidden .celebrity-portrait-hair,
.celebrity-portrait.celebrity-portrait-hidden .celebrity-portrait-face,
.celebrity-portrait.celebrity-portrait-hidden .celebrity-portrait-body {
  filter: blur(14px);
  opacity: 0.58;
}

.celebrity-portrait.celebrity-portrait-hidden .celebrity-portrait-question {
  opacity: 1;
}

.celebrity-portrait:not(.celebrity-portrait-hidden).difficulty-easy .celebrity-portrait-hair,
.celebrity-portrait:not(.celebrity-portrait-hidden).difficulty-easy .celebrity-portrait-face,
.celebrity-portrait:not(.celebrity-portrait-hidden).difficulty-easy .celebrity-portrait-body {
  filter: blur(0);
}

.celebrity-portrait:not(.celebrity-portrait-hidden).difficulty-medium .celebrity-portrait-hair,
.celebrity-portrait:not(.celebrity-portrait-hidden).difficulty-medium .celebrity-portrait-face,
.celebrity-portrait:not(.celebrity-portrait-hidden).difficulty-medium .celebrity-portrait-body {
  filter: blur(3px);
}

.celebrity-portrait:not(.celebrity-portrait-hidden).difficulty-hard .celebrity-portrait-hair,
.celebrity-portrait:not(.celebrity-portrait-hidden).difficulty-hard .celebrity-portrait-face,
.celebrity-portrait:not(.celebrity-portrait-hidden).difficulty-hard .celebrity-portrait-body {
  filter: blur(7px);
}

.celebrity-hint-count {
  margin: 8px 0;
  color: var(--gold-light);
  font-size: 11px;
  font-weight: 600;
}

.celebrity-hint-card {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--surface-light);
}

.celebrity-hint-card > span {
  color: var(--gold-light);
  font-size: 10px;
  font-weight: 600;
}

.celebrity-hint-card p {
  margin: 5px 0 9px;
  font-size: 11px;
  line-height: 1.7;
}

.celebrity-hint-card .outline-button {
  min-height: 34px;
  padding: 5px 12px;
  font-size: 10px;
}

.celebrity-instruction {
  max-width: 330px;
  margin: 7px auto 11px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.8;
}

.celebrity-scoreboard {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
  gap: 7px;
  margin-top: 15px;
}

.celebrity-score {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 8px 9px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--surface);
  font-size: 10px;
}

.celebrity-score span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.celebrity-score strong {
  color: var(--gold-light);
  font-size: 12px;
}

.celebrity-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 13px;
}

.celebrity-actions #celebrity-start-turn-button,
.celebrity-actions #celebrity-next-turn-button {
  grid-column: 1 / -1;
}

.celebrity-actions .primary-button,
.celebrity-actions .outline-button {
  min-height: 43px;
  padding-inline: 9px;
  font-size: 10px;
}

.celebrity-round-card > .game-answer {
  margin-block: 12px;
}

.celebrity-round-card > .form-status:empty {
  min-height: 0;
  margin: 0;
}

.game-footnote {
  margin: 17px 0 0;
  color: var(--muted);
  font-size: 11px;
  text-align: center;
}

@media (max-width: 420px) {
  .landing-screen {
    padding-inline: 26px;
  }

  .mode-screen {
    padding: 42px 16px 40px;
  }

  .mode-heading {
    margin-bottom: 10px;
  }

  .mode-heading h1 {
    font-size: 19px;
  }

  .mode-options {
    gap: 8px;
  }

  .mode-option {
    min-height: 72px;
    grid-template-columns: 44px minmax(0, 1fr) 14px;
    gap: 9px;
    padding: 9px 11px;
  }

  .mode-icon {
    width: 41px;
    height: 41px;
    font-size: 22px;
  }

  .mode-copy strong {
    font-size: 12px;
  }

  .mode-copy small {
    font-size: 9px;
  }

  .mode-decoration {
    gap: 16px;
    margin-top: 8px;
    font-size: 23px;
  }

  .room-header {
    gap: 6px;
  }

  .room-header .back-button {
    font-size: 10px;
  }

  .room-code-card {
    gap: 7px;
  }
}

:root[data-theme="light"] body {
  background:
    radial-gradient(ellipse at 9% 7%, rgb(182 129 67 / 14%), transparent 34rem),
    radial-gradient(ellipse at 92% 88%, rgb(205 173 128 / 18%), transparent 33rem),
    var(--background);
}

:root[data-theme="light"] .landing-screen {
  background:
    linear-gradient(180deg, rgb(250 244 233 / 35%), rgb(247 239 226 / 46%) 48%, rgb(235 218 192 / 83%)),
    radial-gradient(ellipse at 50% 35%, rgb(196 132 72 / 20%), transparent 42%),
    repeating-linear-gradient(90deg, transparent 0 45px, rgb(137 91 48 / 5%) 46px 49px, transparent 51px 86px),
    #eee2ce;
}

:root[data-theme="light"] .landing-screen::before {
  border-color: rgb(128 88 50 / 18%);
  background:
    linear-gradient(90deg, transparent 9%, rgb(129 94 59 / 18%) 10% 12%, transparent 13% 86%, rgb(129 94 59 / 18%) 87% 89%, transparent 90%),
    repeating-linear-gradient(0deg, rgb(129 94 59 / 11%) 0 9px, transparent 10px 46px),
    radial-gradient(ellipse at 50% 35%, rgb(214 156 92 / 18%), transparent 50%);
}

:root[data-theme="light"] .landing-screen::after {
  border-color: rgb(155 112 65 / 35%);
  background: radial-gradient(ellipse at 50% 0, rgb(173 123 71 / 14%), transparent 67%);
}

:root[data-theme="light"] .landing-title {
  color: #8b4b21;
  text-shadow: 0 3px 0 #d8b389, 0 10px 24px rgb(69 43 22 / 18%);
}

:root[data-theme="light"] .landing-tagline,
:root[data-theme="light"] .landing-description {
  color: #4f3d2c;
}

:root[data-theme="light"] .landing-footer {
  color: #85501f;
}

:root[data-theme="light"] .lobby-settings-button {
  border-color: rgb(133 85 37 / 36%);
  color: #754614;
  background: rgb(255 251 244 / 86%);
}

:root[data-theme="light"] .outline-button {
  border-color: rgb(133 85 37 / 44%);
  color: #423324;
  background: rgb(255 251 244 / 82%);
}

:root[data-theme="light"] .outline-button:hover {
  background: rgb(232 169 75 / 19%);
}

:root[data-theme="light"] .mode-screen {
  background:
    radial-gradient(ellipse at 50% 42%, rgb(143 100 57 / 10%), transparent 48%),
    repeating-linear-gradient(90deg, transparent 0 54px, rgb(117 82 46 / 4%) 55px 57px, transparent 58px 96px);
}

:root[data-theme="light"] .mode-screen::before {
  border-color: rgb(128 88 50 / 17%);
  background:
    repeating-linear-gradient(0deg, rgb(89 70 50 / 5%) 0 8px, transparent 9px 54px),
    radial-gradient(ellipse at 50% 72%, rgb(117 89 59 / 9%), transparent 40%);
}

:root[data-theme="light"] .mode-option {
  border-color: #d7c6ac;
  color: #30251b;
  background: linear-gradient(110deg, rgb(255 251 244 / 97%), rgb(246 237 222 / 97%));
}

:root[data-theme="light"] .mode-option:hover,
:root[data-theme="light"] .mode-option:focus-visible,
:root[data-theme="light"] .mode-option.selected {
  border-color: #bd833d;
  background: linear-gradient(110deg, #f3e2c9, #fff9ee);
}

:root[data-theme="light"] .mode-copy strong {
  color: #81501e;
}

:root[data-theme="light"] .mode-copy small,
:root[data-theme="light"] .mode-caption {
  color: #665543;
}

:root[data-theme="light"] .form-card,
:root[data-theme="light"] .members-card,
:root[data-theme="light"] .round-card {
  border-color: #d9c7ad;
  background: linear-gradient(145deg, rgb(255 251 244 / 98%), rgb(247 239 227 / 99%));
  box-shadow: 0 24px 80px rgb(78 55 29 / 12%);
}

:root[data-theme="light"] .text-input {
  border-color: #d9c7ad;
  color: #30251b;
  background: #fffdf9;
}

:root[data-theme="light"] .text-input::placeholder {
  color: #887762;
}

:root[data-theme="light"] .player-roster-row,
:root[data-theme="light"] .member-item {
  border-color: #e3d5c1;
  color: #30251b;
  background: linear-gradient(100deg, #fffdf8, #f2e9db);
}

:root[data-theme="light"] .team-roster {
  border-color: #e3d5c1;
  background: rgb(255 255 255 / 42%);
}

:root[data-theme="light"] .team-roster h2,
:root[data-theme="light"] .team-match-result h2 {
  color: #80501e;
}

:root[data-theme="light"] .team-roster li,
:root[data-theme="light"] .team-match-result .team-penalty-prompt {
  color: #30251b;
}

:root[data-theme="light"] .team-roster li button,
:root[data-theme="light"] .team-assignment-picker span,
:root[data-theme="light"] .team-score {
  border-color: #d9c7ad;
  color: #514330;
  background: #fffaf2;
}

:root[data-theme="light"] .team-assignment-picker input:checked + span,
:root[data-theme="light"] .team-score strong {
  color: #80501e;
}

:root[data-theme="light"] .team-match-result p {
  color: #665744;
}

:root[data-theme="light"] .team-wheel-label {
  color: #fff8ec;
}

:root[data-theme="light"] .team-wheel-result {
  color: #80501e;
}

:root[data-theme="light"] .game-answer,
:root[data-theme="light"] .team-answer {
  border-color: #d7b985;
  color: #68451f;
  background: #f8eddc;
}

:root[data-theme="light"] .member-item {
  color: #403425;
}

:root[data-theme="light"] .host-label {
  color: #89561f;
}

:root[data-theme="light"] .room-code-card {
  border-color: #d9c7ad;
  background: #fffaf2;
}

:root[data-theme="light"] .room-code-card strong,
:root[data-theme="light"] .copy-button {
  color: #83531e;
}

:root[data-theme="light"] .room-share-card {
  border-color: #dfc9a9;
  background: linear-gradient(100deg, #fffaf1, #f3e7d5);
}

:root[data-theme="light"] .room-share-card strong {
  color: #80501e;
}

:root[data-theme="light"] .round-prompt {
  color: #35291e;
}

:root[data-theme="light"] .help-dialog,
:root[data-theme="light"] .settings-dialog {
  border-color: #d9c7ad;
  color: #30251b;
  background: #fffaf2;
  box-shadow: 0 24px 100px rgb(78 55 29 / 24%);
}

:root[data-theme="light"] .help-dialog ol {
  color: #514332;
}

:root[data-theme="light"] .dialog-close {
  border-color: #d9c7ad;
  color: #756452;
}

:root[data-theme="light"] .settings-section + .settings-section {
  border-color: #e8ddce;
}

:root[data-theme="light"] .settings-section legend {
  color: #423324;
}

:root[data-theme="light"] .theme-option {
  border-color: #d9c7ad;
  color: #665543;
  background: #f7efe3;
}

:root[data-theme="light"] .theme-option:has(input:checked) {
  border-color: #bd833d;
  color: #754614;
  background: #f7ead6;
}

:root[data-theme="light"] .music-toggle-row strong,
:root[data-theme="light"] .volume-row {
  color: #423324;
}

:root[data-theme="light"] .music-toggle-row input {
  border-color: #b9a78e;
  background: #ded2c0;
}

:root[data-theme="light"] .music-toggle-row input::before {
  background: #8d7b65;
}

:root[data-theme="light"] .music-toggle-row input:checked {
  border-color: #bd833d;
  background: #ecd2aa;
}

:root[data-theme="light"] .music-toggle-row input:checked::before {
  background: #9a601f;
}

:root[data-theme="light"] .music-play-button {
  border-color: #d7b985;
  color: #754614;
  background: #f8eddc;
}

:root[data-theme="light"] .settings-note,
:root[data-theme="light"] .settings-status {
  color: #756452;
}

:root[data-theme="light"] .settings-status[data-state="success"] {
  color: #3f7a47;
}
