:root {
  color-scheme: dark;
  --bg: #05020b;
  --bg-soft: #0d0718;
  --panel: rgba(18, 16, 28, 0.88);
  --panel-solid: #12101c;
  --panel-lift: #1a1428;
  --text: #f4effa;
  --muted: #ada4bf;
  --muted-2: #8a8297;
  --line: rgba(255, 255, 255, 0.13);
  --line-strong: rgba(255, 255, 255, 0.24);
  --purple: #7c3aed;
  --violet: #a855f7;
  --pink: #ec4899;
  --cyan: #2dd4bf;
  --orange: #f59e0b;
  --radius: 18px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.48);
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: clamp(1.5rem, 3vw, 1.9rem);
  --text-3xl: clamp(1.9rem, 4vw, 2.65rem);
  --text-4xl: clamp(2.5rem, 7vw, 3.8rem);
  --text-display: clamp(2.9rem, 14vw, 4.9rem);
  font-family:
    -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", system-ui,
    sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
}

body {
  background:
    radial-gradient(circle at 20% 4%, rgba(124, 58, 237, 0.24), transparent 28rem),
    radial-gradient(circle at 100% 24%, rgba(236, 72, 153, 0.14), transparent 28rem),
    linear-gradient(180deg, #07030f 0%, #030106 100%);
  color: var(--text);
  font-size: var(--text-base);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  display: flex;
  justify-content: center;
  min-height: 100dvh;
}

button,
input,
select,
textarea {
  font: inherit;
  touch-action: manipulation;
}

button {
  color: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  outline: none;
}

input,
select {
  min-height: 50px;
  padding: 0 14px;
}

textarea {
  min-height: 150px;
  padding: 14px;
  resize: vertical;
  line-height: 1.45;
}

input::placeholder,
textarea::placeholder {
  color: var(--muted-2);
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid rgba(168, 85, 247, 0.9);
  outline-offset: 2px;
}

.app {
  width: min(100%, 480px);
  min-height: 100dvh;
  position: relative;
  overflow-x: hidden;
  isolation: isolate;
  background:
    radial-gradient(circle at 50% 0%, rgba(124, 58, 237, 0.2), transparent 24rem),
    linear-gradient(180deg, rgba(15, 8, 31, 0.95), var(--bg) 22rem);
}

.app::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(circle at 18% 34%, rgba(168, 85, 247, 0.14), transparent 14rem),
    radial-gradient(circle at 88% 82%, rgba(45, 212, 191, 0.1), transparent 18rem);
}

.screen {
  min-height: 100dvh;
  padding: calc(14px + env(safe-area-inset-top)) 14px
    calc(98px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.center-screen {
  align-items: center;
  justify-content: center;
  text-align: center;
}

.discuss-screen {
  justify-content: flex-start;
  align-items: stretch;
  gap: 10px;
  text-align: center;
  padding-top: calc(10px + env(safe-area-inset-top));
}

.discuss-screen .topbar {
  width: 100%;
}

.discuss-screen h2 {
  margin-top: 6px;
}

.discuss-screen p {
  max-width: 21rem;
  margin: 0 auto;
  line-height: 1.38;
}

.discuss-screen .timer-ring {
  margin: 18px auto 0;
}

.discuss-screen .primary-button.wide {
  margin-top: 10px;
  align-self: center;
}

.glyph {
  width: 22px;
  height: 22px;
  display: block;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.logo-lockup {
  width: fit-content;
  display: grid;
  line-height: 0.78;
  font-size: var(--text-display);
  font-weight: 850;
  letter-spacing: 0;
  color: var(--text);
  text-transform: lowercase;
  text-shadow: 0 12px 32px rgba(124, 58, 237, 0.5);
}

.logo-lockup span:last-child {
  color: #9f63ff;
  text-shadow:
    0 0 24px rgba(168, 85, 247, 0.85),
    0 12px 32px rgba(0, 0, 0, 0.45);
}

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

.topbar > div {
  min-width: 0;
}

.topbar h1 {
  margin: 1px 0 0;
  font-size: var(--text-lg);
  line-height: 1.05;
  font-weight: 850;
  color: color-mix(in srgb, var(--text) 92%, #fff 8%);
  overflow-wrap: anywhere;
}

.eyebrow {
  margin: 0;
  color: var(--muted-2);
  font-size: var(--text-xs);
  font-weight: 850;
}

.icon-button {
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  display: grid;
  place-items: center;
}

.icon-button:active {
  transform: scale(0.98);
}

.splash-card {
  position: relative;
  min-height: 320px;
  border: 1px solid rgba(168, 85, 247, 0.45);
  border-radius: 28px;
  overflow: hidden;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
  background:
    linear-gradient(180deg, rgba(5, 2, 11, 0.18) 0%, rgba(5, 2, 11, 0.66) 46%, rgba(5, 2, 11, 0.96) 100%),
    url("assets/splash-bg.png") center 26% / cover no-repeat;
  box-shadow:
    inset 0 1px rgba(255, 255, 255, 0.18),
    0 24px 70px rgba(80, 27, 164, 0.28);
}

.splash-card::after {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(168, 85, 247, 0.22);
  border-radius: 22px;
  pointer-events: none;
}

.splash-art {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 84% 20%, rgba(236, 72, 153, 0.28), transparent 8rem),
    radial-gradient(circle at 18% 74%, rgba(45, 212, 191, 0.18), transparent 9rem);
  mix-blend-mode: screen;
}

.splash-card .logo-lockup,
.splash-card p,
.splash-points {
  position: relative;
  z-index: 1;
}

.splash-card p {
  max-width: 18rem;
  margin: 0;
  color: var(--text);
  font-size: var(--text-xl);
  line-height: 1.24;
  font-weight: 700;
}

.splash-card p::first-line {
  color: #ffffff;
}

.splash-points {
  display: grid;
  gap: 10px;
  color: var(--text);
  font-size: var(--text-sm);
  font-weight: 720;
}

.splash-points span {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.splash-points .glyph {
  color: #a855f7;
}

.draw-card {
  min-height: 80px;
  border: 1px solid rgba(168, 85, 247, 0.58);
  border-radius: 20px;
  padding: 14px 16px;
  background:
    linear-gradient(135deg, rgba(124, 58, 237, 0.98), rgba(88, 28, 135, 0.98)),
    var(--purple);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 48px;
  align-items: center;
  gap: 12px;
  text-align: left;
  box-shadow: 0 18px 48px rgba(124, 58, 237, 0.34);
}

.draw-card strong,
.deck-row strong {
  display: block;
  font-size: var(--text-base);
  line-height: 1.15;
  font-weight: 850;
}

.draw-card small,
.deck-row small {
  display: block;
  margin-top: 3px;
  color: rgba(255, 255, 255, 0.66);
  font-size: var(--text-xs);
  font-weight: 700;
}

.draw-card .glyph {
  width: 34px;
  height: 34px;
  justify-self: end;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin-top: 4px;
}

.section-head h2 {
  margin: 0;
  font-size: var(--text-base);
  line-height: 1;
  font-weight: 850;
}

.section-head span,
.section-head button {
  color: var(--muted-2);
  font-size: var(--text-xs);
  font-weight: 760;
}

.section-head button {
  border: 0;
  background: transparent;
  padding: 0;
}

.chips {
  display: flex;
  gap: 9px;
  overflow-x: auto;
  margin-inline: -14px;
  padding: 1px 14px 4px;
  scrollbar-width: none;
}

.chips::-webkit-scrollbar {
  display: none;
}

.chip,
.pool-pill {
  flex: 0 0 auto;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  padding: 0 15px;
  font-weight: 850;
}

.chip[aria-pressed="true"],
.pool-pill[aria-pressed="true"] {
  border-color: rgba(255, 255, 255, 0.9);
  background: #f7f3ff;
  color: #11081f;
}

.deck-list {
  display: grid;
  gap: 10px;
}

.deck-row {
  --deck: #7c3aed;
  min-height: 76px;
  border: 1px solid color-mix(in srgb, var(--deck) 34%, var(--line));
  border-radius: 16px;
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--deck) 16%, transparent), rgba(255, 255, 255, 0.035)),
    rgba(255, 255, 255, 0.055);
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 26px;
  align-items: center;
  gap: 12px;
  padding: 12px;
  text-align: left;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.06);
}

.deck-row:active,
.primary-button:active,
.secondary-button:active {
  transform: translateY(1px);
}

.deck-mark {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--deck, #7c3aed) 76%, #fff 24%), var(--deck, #7c3aed));
  color: #100719;
  font-size: 0.86rem;
  font-weight: 850;
  box-shadow:
    inset 0 1px rgba(255, 255, 255, 0.35),
    0 12px 28px color-mix(in srgb, var(--deck, #7c3aed) 24%, transparent);
}

.deck-row > span:nth-child(2) {
  min-width: 0;
}

.deck-row strong,
.deck-row small {
  overflow-wrap: anywhere;
}

.deck-row > .glyph {
  color: var(--muted-2);
}

.saved-row {
  --deck: #a855f7;
}

.add-row {
  --deck: #2dd4bf;
}

.reveal-screen {
  gap: 10px;
  padding-bottom: calc(94px + env(safe-area-inset-bottom));
  overflow: hidden;
}

.reveal-screen .topbar,
.reveal-screen .action-grid,
.reveal-screen > .primary-button {
  flex: 0 0 auto;
}

.reveal-card {
  --deck: #7c3aed;
  min-height: clamp(300px, calc(100dvh - 390px), 420px);
  border: 1px solid rgba(216, 180, 254, 0.74);
  border-radius: 28px;
  padding: clamp(20px, 5vw, 28px);
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  background:
    radial-gradient(circle at 82% 8%, rgba(168, 85, 247, 0.3), transparent 9rem),
    radial-gradient(circle at 28% 46%, rgba(45, 212, 191, 0.11), transparent 12rem),
    radial-gradient(circle at 78% 78%, rgba(124, 58, 237, 0.18), transparent 10rem),
    linear-gradient(135deg, #120526 0%, #070211 52%, #0c041d 100%);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.06),
    inset 0 0 50px rgba(168, 85, 247, 0.1),
    0 20px 56px rgba(0, 0, 0, 0.48),
    0 0 40px rgba(124, 58, 237, 0.24);
  isolation: isolate;
}

.party-reveal-screen .reveal-card {
  min-height: clamp(360px, calc(100dvh - 246px), 560px);
  grid-template-rows: auto minmax(0, 1fr) auto auto;
}

.reveal-screen .reveal-card {
  flex: 0 0 auto;
}

.party-reveal-screen .reveal-card {
  flex: 1 1 auto;
}

.reveal-card::before,
.reveal-card::after {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 8px;
  z-index: 0;
  height: 44px;
  border: 1px solid rgba(168, 85, 247, 0.45);
  border-top: 0;
  border-radius: 0 0 26px 26px;
  opacity: 0.52;
  transform: translateY(12px);
  pointer-events: none;
}

.reveal-card::after {
  left: 28px;
  right: 28px;
  bottom: 0;
  opacity: 0.36;
}

.card-sky {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  border-radius: inherit;
  background:
    radial-gradient(circle at 84% 12%, rgba(168, 85, 247, 0.34) 0 1.5px, transparent 2.2px),
    radial-gradient(circle at 75% 21%, rgba(255, 255, 255, 0.28) 0 1px, transparent 1.6px),
    radial-gradient(circle at 17% 78%, rgba(255, 255, 255, 0.34) 0 1.1px, transparent 1.8px),
    radial-gradient(circle at 82% 72%, rgba(168, 85, 247, 0.42) 0 1.5px, transparent 2.1px),
    radial-gradient(ellipse at 74% 18%, rgba(168, 85, 247, 0.22), transparent 13rem),
    radial-gradient(ellipse at 36% 42%, rgba(45, 212, 191, 0.12), transparent 12rem);
}

.cloud-art {
  position: absolute;
  display: block;
  overflow: visible;
  filter:
    drop-shadow(0 0 18px rgba(124, 58, 237, 0.24))
    drop-shadow(0 12px 18px rgba(0, 0, 0, 0.18));
  pointer-events: none;
}

.cloud-left {
  left: -82px;
  bottom: -28px;
  width: 260px;
  opacity: 0.52;
}

.cloud-right {
  right: -82px;
  bottom: 58px;
  width: 236px;
  opacity: 0.18;
  transform: scaleX(-1);
}

.cloud-mid {
  right: -36px;
  bottom: -18px;
  width: 252px;
  opacity: 0.34;
  transform: scaleX(-1);
}

.cloud-fill {
  fill: rgba(88, 28, 135, 0.32);
}

.cloud-line {
  fill: none;
  stroke: rgba(168, 85, 247, 0.34);
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.card-header {
  position: relative;
  z-index: 3;
  grid-row: 1;
  width: 100%;
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 16px;
}

.card-quote {
  flex: 0 0 auto;
  margin-top: 0.45em;
  color: rgba(168, 85, 247, 0.28);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3rem, 8vw, 4rem);
  line-height: 0.62;
  font-weight: 800;
  transform: translateY(10px);
}

.question-pill {
  position: absolute;
  left: 20px;
  bottom: 18px;
  z-index: 3;
  width: fit-content;
  max-width: min(100%, 16rem);
  min-height: 38px;
  border: 1px solid rgba(216, 180, 254, 0.3);
  border-radius: 999px;
  flex: 0 1 auto;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  background:
    linear-gradient(135deg, rgba(124, 58, 237, 0.42), rgba(168, 85, 247, 0.14)),
    rgba(21, 8, 44, 0.78);
  color: color-mix(in srgb, var(--text) 92%, #fff 8%);
  font-size: var(--text-sm);
  font-weight: 800;
  box-shadow:
    inset 0 1px rgba(255, 255, 255, 0.08),
    0 12px 36px rgba(0, 0, 0, 0.26);
}

.party-reveal-screen .question-pill {
  position: static;
  grid-row: 3;
  justify-self: start;
  align-self: end;
  margin: 8px 0 0;
}

.question-pill .glyph {
  width: 19px;
  height: 19px;
  stroke-width: 2.35;
}

.reveal-card h2 {
  position: relative;
  z-index: 2;
  grid-row: 2;
  align-self: start;
  margin: 0;
  max-width: 11.5ch;
  color: color-mix(in srgb, var(--text) 96%, #fff 4%);
  text-align: left;
  font-size: var(--text-3xl);
  line-height: 1.08;
  font-weight: 850;
  letter-spacing: 0;
  overflow-wrap: break-word;
  text-wrap: balance;
  transform: translateY(-2px);
  text-shadow:
    0 1px 14px rgba(0, 0, 0, 0.55),
    0 0 14px rgba(255, 255, 255, 0.08);
}

.reveal-card.is-medium h2 {
  max-width: 13.5ch;
  font-size: clamp(1.6rem, 5.8vw, 2.35rem);
  line-height: 1.1;
  transform: translateY(0);
}

.reveal-card.is-long h2 {
  max-width: 15.5ch;
  font-size: clamp(1.32rem, 4.8vw, 1.95rem);
  line-height: 1.12;
  transform: translateY(2px);
}

.speech-mark {
  position: absolute;
  right: 14px;
  bottom: 30px;
  z-index: 1;
  width: 116px;
  height: auto;
  overflow: visible;
  transform: rotate(-6deg);
  opacity: 0.5;
  filter: drop-shadow(0 0 18px rgba(168, 85, 247, 0.28));
}

.speech-shadow {
  fill: rgba(9, 3, 20, 0.28);
  stroke: rgba(168, 85, 247, 0.18);
  stroke-width: 10;
  transform: translate(4px, 4px);
}

.speech-outline {
  fill: rgba(8, 3, 20, 0.3);
  stroke: rgba(168, 85, 247, 0.48);
  stroke-width: 6;
  stroke-linejoin: round;
}

.speech-question {
  fill: rgba(216, 180, 254, 0.1);
  stroke: rgba(216, 180, 254, 0.58);
  stroke-width: 2;
  paint-order: stroke;
  font-size: 48px;
  font-weight: 800;
  dominant-baseline: middle;
}

.card-sparks {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.card-sparks i {
  position: absolute;
  display: block;
  width: 24px;
  height: 24px;
  background: #a855f7;
  clip-path: polygon(50% 0%, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0% 50%, 38% 38%);
  filter: drop-shadow(0 0 12px rgba(168, 85, 247, 0.76));
}

.card-sparks i:nth-child(1) {
  right: 20%;
  top: 20%;
}

.card-sparks i:nth-child(2) {
  left: 9%;
  bottom: 18%;
  width: 16px;
  height: 16px;
  opacity: 0.58;
}

.card-sparks i:nth-child(3) {
  right: 16%;
  bottom: 1%;
  width: 18px;
  height: 18px;
  opacity: 0.78;
}

.card-instruction {
  position: relative;
  z-index: 2;
  grid-row: 3;
  justify-self: center;
  margin: 0;
  color: rgba(255, 255, 255, 0.68);
  font-size: var(--text-sm);
  line-height: 1.35;
  font-weight: 700;
  text-align: center;
}

.party-reveal-screen .card-instruction {
  grid-row: 4;
  align-self: start;
  margin-top: 8px;
}

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

.primary-button,
.secondary-button,
.inline-actions button,
.add-player button {
  min-height: 52px;
  border-radius: 15px;
  border: 1px solid var(--line);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 14px;
  font-weight: 800;
  text-align: center;
}

.primary-button {
  border-color: rgba(168, 85, 247, 0.55);
  background: linear-gradient(135deg, #7c3aed, #db2777);
  color: #fff;
  box-shadow: 0 18px 46px rgba(124, 58, 237, 0.32);
}

.primary-button:disabled,
.secondary-button:disabled {
  cursor: wait;
  opacity: 0.58;
  transform: none;
}

.secondary-button,
.inline-actions button {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.wide {
  grid-column: 1 / -1;
}

.question-reveal-screen .action-grid {
  gap: 8px;
}

.question-reveal-screen .primary-button,
.question-reveal-screen .secondary-button {
  min-height: 46px;
  border-radius: 16px;
}

@media (max-height: 700px) {
  .reveal-screen {
    gap: 8px;
    padding-top: calc(10px + env(safe-area-inset-top));
    padding-bottom: calc(90px + env(safe-area-inset-bottom));
  }

  .question-reveal-screen .primary-button,
  .question-reveal-screen .secondary-button {
    min-height: 44px;
  }

  .reveal-card {
    border-radius: 24px;
    padding: 16px;
    gap: 10px;
  }

  .question-pill {
    left: 16px;
    bottom: 14px;
    min-height: 34px;
    padding-inline: 11px;
    font-size: 0.82rem;
  }

  .party-reveal-screen .reveal-card {
    grid-template-rows: auto minmax(0, 1fr) auto auto;
  }

  .party-reveal-screen .question-pill {
    margin-top: 6px;
  }

  .party-reveal-screen .card-instruction {
    margin-top: 6px;
  }

  .card-quote {
    font-size: 3.7rem;
  }

  .reveal-card h2 {
    font-size: clamp(1.8rem, 8vw, 3rem);
    transform: translateY(0);
  }

  .reveal-card.is-medium h2 {
    font-size: clamp(1.6rem, 7vw, 2.55rem);
    transform: translateY(2px);
  }

  .reveal-card.is-long h2 {
    font-size: clamp(1.35rem, 6vw, 2.1rem);
    transform: translateY(4px);
  }

  .speech-mark {
    right: 10px;
    bottom: 16px;
    width: 92px;
  }
}

.panel-form,
.party-hero,
.recap-card,
.saved-card {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--panel);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.05);
}

.panel-form {
  display: grid;
  gap: 14px;
  padding: 14px;
}

.panel-form label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: var(--text-xs);
  font-weight: 760;
}

.saved-card {
  --deck: #7c3aed;
  padding: 15px;
  display: grid;
  gap: 12px;
  border-color: color-mix(in srgb, var(--deck) 32%, var(--line));
  box-shadow:
    inset 4px 0 0 var(--deck),
    inset 0 1px rgba(255, 255, 255, 0.06);
}

.saved-card small {
  color: color-mix(in srgb, var(--deck) 70%, #fff);
  font-weight: 780;
}

.saved-card p {
  margin: 0;
  color: var(--text);
  line-height: 1.36;
  font-weight: 650;
}

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

.empty-state {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
  padding: 18px;
  line-height: 1.4;
  font-weight: 720;
}

.party-hero {
  padding: 18px;
  display: grid;
  gap: 6px;
  background:
    radial-gradient(circle at 88% 0%, rgba(168, 85, 247, 0.2), transparent 10rem),
    var(--panel);
}

.party-hero h2,
.center-screen h2,
.result-hero h2 {
  margin: 0;
  font-size: var(--text-4xl);
  line-height: 1.02;
  font-weight: 850;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.recap-card h2 {
  margin: 0;
  font-size: var(--text-2xl);
  line-height: 1.05;
  font-weight: 850;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.party-hero p,
.center-screen p {
  margin: 0;
  color: var(--muted);
  line-height: 1.38;
  font-weight: 650;
}

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

.add-player button {
  background: #f7f3ff;
  color: #11081f;
  min-width: 86px;
}

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

.avatar-grid.big {
  width: 100%;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-block: 8px 4px;
}

.player-chip,
.avatar {
  --player: #7c3aed;
  min-width: 0;
  border: 1px solid color-mix(in srgb, var(--player) 42%, var(--line));
  border-radius: 17px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--player) 26%, transparent), rgba(255, 255, 255, 0.04)),
    rgba(255, 255, 255, 0.045);
  display: grid;
  place-items: center;
  gap: 7px;
  padding: 14px 10px;
  text-align: center;
}

.player-chip strong,
.avatar {
  color: #fff;
  font-size: var(--text-xl);
  font-weight: 850;
}

.player-chip span,
.avatar small {
  max-width: 100%;
  color: var(--muted);
  font-size: var(--text-xs);
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
}

.range-row {
  border: 1px solid var(--line);
  border-radius: 17px;
  background: rgba(255, 255, 255, 0.045);
  padding: 12px;
  display: grid;
  grid-template-columns: 1fr 96px;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-weight: 750;
}

.pool-grid {
  display: flex;
  gap: 9px;
  overflow-x: auto;
  margin-inline: -14px;
  padding: 2px 14px 5px;
  scrollbar-width: none;
}

.pool-grid::-webkit-scrollbar {
  display: none;
}

.reader-screen {
  justify-content: flex-start;
  gap: 11px;
}

.reader-screen .topbar {
  width: 100%;
}

.reader-intro {
  display: grid;
  gap: 6px;
  margin-top: 2px;
}

.reader-intro h2 {
  margin: 0;
  font-size: var(--text-3xl);
}

.reader-intro p {
  max-width: 14rem;
  margin: 0 auto;
  color: var(--muted);
  font-size: var(--text-sm);
  line-height: 1.25;
  font-weight: 650;
}

.reader-wheel {
  --size: min(62vw, 230px);
  --spin: 0deg;
  --wheel-bg: conic-gradient(from 0deg, #7c3aed 0deg 360deg);
  width: var(--size);
  height: var(--size);
  margin: 8px auto 4px;
  border: 1px solid rgba(168, 85, 247, 0.55);
  border-radius: 999px;
  position: relative;
  display: grid;
  place-items: center;
  overflow: visible;
  background: rgba(5, 2, 11, 0.84);
  box-shadow:
    inset 0 0 0 8px rgba(5, 2, 11, 0.52),
    0 22px 70px rgba(124, 58, 237, 0.3);
}

.wheel-dial,
.wheel-slices {
  position: absolute;
  inset: 0;
  border-radius: inherit;
}

.wheel-dial {
  overflow: hidden;
  transform: rotate(var(--spin));
  transition: transform 1050ms cubic-bezier(0.12, 0.78, 0.16, 1);
  box-shadow:
    inset 0 0 0 3px rgba(139, 92, 246, 0.44),
    inset 0 0 0 10px rgba(5, 2, 11, 0.12);
}

.wheel-slices {
  background:
    radial-gradient(circle, transparent 0 27%, rgba(5, 2, 11, 0.34) 27.5% 30%, transparent 30.5%),
    var(--wheel-bg);
}

.wheel-slices::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    radial-gradient(circle at 28% 22%, rgba(255, 255, 255, 0.28), transparent 9rem),
    radial-gradient(circle at 72% 78%, rgba(5, 2, 11, 0.26), transparent 10rem);
  mix-blend-mode: soft-light;
}

.wheel-divider {
  position: absolute;
  left: 50%;
  top: 0;
  width: 1px;
  height: 50%;
  transform: rotate(var(--angle));
  transform-origin: 50% 100%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.58), rgba(255, 255, 255, 0.2) 68%, transparent 100%);
}

.wheel-pointer {
  position: absolute;
  top: -11px;
  left: 50%;
  z-index: 4;
  width: 0;
  height: 0;
  transform: translateX(-50%);
  border-left: 15px solid transparent;
  border-right: 15px solid transparent;
  border-top: 25px solid #9f63ff;
  filter:
    drop-shadow(0 5px 10px rgba(0, 0, 0, 0.42))
    drop-shadow(0 0 10px rgba(159, 99, 255, 0.48));
}

.wheel-label {
  --player: #7c3aed;
  --angle: 0deg;
  position: absolute;
  left: calc(50% - 18px);
  top: calc(50% - 18px);
  z-index: 2;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: transparent;
  color: #fff;
  font-size: var(--text-sm);
  font-weight: 850;
  transform: rotate(var(--angle)) translateY(calc(var(--size) * -0.32));
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.45);
  transition: opacity 150ms ease;
}

.wheel-hub {
  appearance: none;
  padding: 0;
  border: 5px solid rgba(255, 255, 255, 0.05);
  cursor: pointer;
  z-index: 5;
  width: 62px;
  height: 62px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 38% 28%, rgba(255, 255, 255, 0.08), transparent 2rem),
    rgba(5, 2, 11, 0.94);
  color: #9f63ff;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.12),
    0 16px 34px rgba(0, 0, 0, 0.44);
}

.wheel-hub:focus-visible {
  outline: 2px solid rgba(168, 85, 247, 0.9);
  outline-offset: 3px;
}

.wheel-hub .glyph {
  width: 29px;
  height: 29px;
  stroke-width: 2.3;
}

.reader-wheel[data-spinning="true"] .wheel-dial {
  filter: saturate(1.16);
}

.reader-wheel[data-spinning="true"] .wheel-pointer {
  animation: pointer-tick 140ms linear infinite;
}

@keyframes pointer-tick {
  50% {
    transform: translateX(-50%) translateY(2px) scaleY(0.92);
  }
}

.reader-status {
  min-height: 30px;
  margin: 0;
  color: color-mix(in srgb, var(--player) 82%, #fff);
  border: 0;
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
  font-weight: 800;
}

.discuss-icon {
  width: 82px;
  height: 82px;
  border-radius: 28px;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 30% 25%, rgba(255, 255, 255, 0.2), transparent 2.7rem),
    linear-gradient(135deg, #2dd4bf, #2563eb);
  color: #061018;
  box-shadow: 0 22px 60px rgba(45, 212, 191, 0.26);
}

.discuss-icon .glyph {
  width: 40px;
  height: 40px;
}

.timer-ring {
  --timer-progress: 1;
  width: 156px;
  height: 156px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: var(--text);
  font-size: var(--text-3xl);
  font-weight: 850;
  background:
    radial-gradient(circle, rgba(8, 4, 20, 0.96) 0 58%, transparent 58.5% 100%),
    conic-gradient(
      from -90deg,
      #5eead4 0 calc(var(--timer-progress) * 1turn),
      rgba(255, 255, 255, 0.08) 0 1turn
    );
  box-shadow:
    inset 0 0 0 12px rgba(255, 255, 255, 0.03),
    inset 0 0 32px rgba(0, 0, 0, 0.36);
}

.vote-list {
  display: grid;
  gap: 10px;
}

.vote-option {
  --player: #7c3aed;
  min-height: 70px;
  border: 1px solid color-mix(in srgb, var(--player) 42%, var(--line));
  border-radius: 17px;
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--player) 24%, transparent), rgba(255, 255, 255, 0.045)),
    rgba(255, 255, 255, 0.04);
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 12px;
  text-align: left;
}

.vote-option strong {
  width: 48px;
  height: 48px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: var(--player);
  color: #fff;
  font-weight: 850;
}

.vote-option span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 800;
}

.privacy-note {
  margin: 0;
  color: var(--muted-2);
  text-align: center;
  font-size: var(--text-xs);
  font-weight: 700;
}

.result-hero {
  min-height: 210px;
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 24px;
  display: grid;
  place-items: center;
  gap: 12px;
  padding: 22px;
  text-align: center;
  background:
    radial-gradient(circle at 50% 0%, rgba(245, 158, 11, 0.3), transparent 12rem),
    rgba(255, 255, 255, 0.045);
}

.result-hero span {
  width: 68px;
  height: 68px;
  border-radius: 22px;
  display: grid;
  place-items: center;
  background: rgba(245, 158, 11, 0.18);
  color: var(--orange);
}

.result-hero .glyph {
  width: 40px;
  height: 40px;
}

.score-list {
  display: grid;
  gap: 10px;
}

.score-row {
  --player: #7c3aed;
  min-height: 52px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.045);
  display: grid;
  grid-template-columns: minmax(86px, 1fr) minmax(86px, 1.4fr) 24px;
  align-items: center;
  gap: 10px;
  padding: 10px;
}

.score-row span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text);
  font-weight: 750;
}

.score-row div {
  height: 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.score-row i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--player);
}

.score-row strong {
  text-align: right;
}

.recap-card {
  padding: 18px;
  display: grid;
  gap: 14px;
  background:
    radial-gradient(circle at 88% 0%, rgba(236, 72, 153, 0.18), transparent 10rem),
    var(--panel);
}

.highlight-row {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.045);
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 12px;
}

.highlight-row > .glyph {
  color: var(--violet);
}

.highlight-row strong,
.highlight-row small {
  display: block;
}

.highlight-row small {
  margin-top: 2px;
  color: var(--muted);
  font-weight: 720;
  overflow-wrap: anywhere;
}

.recap-card p {
  margin: 0;
  color: var(--muted);
  text-align: center;
  font-weight: 700;
}

.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: calc(10px + env(safe-area-inset-bottom));
  z-index: 5;
  width: min(calc(100% - 24px), 432px);
  min-height: 72px;
  transform: translateX(-50%);
  border: 1px solid var(--line-strong);
  border-radius: 22px;
  background: rgba(19, 16, 29, 0.84);
  display: grid;
  grid-template-columns: 1fr 1.22fr 1fr;
  gap: 8px;
  padding: 8px;
  box-shadow:
    0 18px 60px rgba(0, 0, 0, 0.44),
    inset 0 1px rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(22px);
}

.nav-item {
  min-width: 0;
  min-height: 56px;
  border: 0;
  border-radius: 16px;
  background: transparent;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-weight: 750;
}

.nav-item span {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: var(--text-xs);
}

.nav-item[aria-current="page"] {
  background: rgba(255, 255, 255, 0.09);
  color: var(--text);
}

.nav-primary {
  background: #f7f3ff;
  color: #11081f;
  box-shadow: 0 14px 34px rgba(124, 58, 237, 0.3);
}

.nav-primary .glyph {
  width: 25px;
  height: 25px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(94px + env(safe-area-inset-bottom));
  z-index: 7;
  width: min(calc(100% - 32px), 420px);
  min-height: 44px;
  border-radius: 14px;
  background: #f7f3ff;
  color: #11081f;
  transform: translateX(-50%);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  text-align: center;
  font-size: var(--text-sm);
  font-weight: 800;
  box-shadow: var(--shadow);
}

.toast[data-show="true"] {
  display: flex;
}

@media (max-width: 359px) {
  .screen {
    padding-inline: 11px;
    gap: 13px;
  }

  .chips,
  .pool-grid {
    margin-inline: -11px;
    padding-inline: 11px;
  }

  .splash-card {
    min-height: 290px;
    padding: 16px;
  }

  .logo-lockup {
    font-size: clamp(2.7rem, 13vw, 4.1rem);
  }

  .deck-row {
    grid-template-columns: 44px minmax(0, 1fr) 24px;
    padding: 10px;
  }

  .deck-mark {
    width: 44px;
    height: 44px;
  }

  .bottom-nav {
    width: min(calc(100% - 18px), 432px);
    gap: 6px;
    padding: 7px;
  }
}

@media (min-width: 540px) {
  body {
    align-items: center;
    padding: 24px;
  }

  .app {
    min-height: min(920px, calc(100dvh - 48px));
    border: 1px solid var(--line);
    border-radius: 34px;
    overflow: hidden;
    box-shadow:
      0 34px 120px rgba(0, 0, 0, 0.55),
      inset 0 1px rgba(255, 255, 255, 0.08);
  }

  .screen {
    min-height: min(920px, calc(100dvh - 48px));
    overflow-y: auto;
  }

  .reveal-screen {
    overflow: hidden;
  }

  .bottom-nav {
    bottom: max(34px, calc((100dvh - min(920px, calc(100dvh - 48px))) / 2 + 12px));
  }

  .toast {
    bottom: max(118px, calc((100dvh - min(920px, calc(100dvh - 48px))) / 2 + 104px));
  }
}
