:root {
  color-scheme: light;
  --ink: #211d1b;
  --muted: #716a64;
  --paper: #ffffff;
  --panel: #ffffff;
  --border: #ddd2c3;
  --soft-line: #ece6dc;
  --yellow: #ffd447;
  --teal: #19a7a8;
  --coral: #f45d48;
  --green: #79b851;
  --shadow: 0 16px 44px rgba(36, 29, 20, 0.1);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--paper);
}

body.is-transitioning {
  overflow: hidden;
}

body.has-camera-open {
  overflow: hidden;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.app-shell {
  display: grid;
  min-height: 100vh;
  padding: clamp(18px, 3vw, 44px);
  place-items: center;
}

.transition-layer {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: none;
  pointer-events: none;
  overflow: hidden;
}

.transition-layer.is-active {
  display: block;
}

.meme-burst {
  position: absolute;
  display: none;
  place-items: center;
  color: var(--ink);
  font-weight: 1000;
  line-height: 0.88;
  transform-origin: center;
  white-space: nowrap;
  will-change: transform, opacity;
}

.transition-layer.intro-burst .meme-burst {
  display: grid;
}

.white-flash {
  position: absolute;
  inset: 0;
  display: none;
  background: #ffffff;
}

.transition-layer.intro-burst .white-flash {
  display: block;
  animation: white-flash 820ms ease-out forwards;
}

.swoosh-panel {
  position: absolute;
  inset: 0;
  display: none;
  background: #ffffff;
  transform: translateX(110%) skewX(-10deg);
  transform-origin: center;
}

.transition-layer.swoosh-run .swoosh-panel {
  display: block;
  animation: swoosh-right 900ms cubic-bezier(0.72, 0, 0.18, 1) forwards;
}

.liquid-splash {
  position: absolute;
  inset: 0;
  display: none;
  overflow: hidden;
}

.transition-layer.swoosh-run .liquid-splash {
  display: block;
}

.liquid-main {
  position: absolute;
  display: block;
  background: #ffffff;
}

.liquid-main {
  top: -18vh;
  right: -54vw;
  width: 76vw;
  height: 136vh;
  border-radius: 64% 0 0 42% / 28% 0 0 72%;
  animation: liquid-main 900ms cubic-bezier(0.72, 0, 0.18, 1) forwards;
}

.flip-stage {
  position: absolute;
  inset: 0;
  display: none;
  place-items: center;
  background: #ffffff;
  perspective: 1200px;
}

.transition-layer.flip-run .flip-stage {
  display: grid;
}

.flip-card {
  position: relative;
  width: min(58vw, 520px);
  aspect-ratio: 0.78;
  transform-style: preserve-3d;
  animation: card-flip 1680ms cubic-bezier(0.18, 0.75, 0.15, 1) forwards;
}

.flip-face {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  backface-visibility: hidden;
  border: 4px solid var(--ink);
  border-radius: 8px;
  box-shadow: 0 16px 0 var(--ink);
  background: #ffffff;
}

.flip-front img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.flip-back {
  background: var(--yellow);
  color: var(--ink);
  font-size: clamp(3rem, 8vw, 6.5rem);
  font-weight: 1000;
  line-height: 0.85;
  text-align: center;
  text-transform: uppercase;
  transform: rotateY(180deg);
}

.intro-screen.is-leaving > *:not(.intro-content),
.intro-screen.is-leaving .eyebrow,
.intro-screen.is-leaving .primary-action,
.intro-screen.is-leaving .intro-subtitle,
.intro-screen.is-leaving h1 {
  animation: fade-away 420ms ease forwards;
}

.intro-screen.is-leaving #intro-meme-word {
  visibility: hidden;
}

#intro-meme-word {
  display: inline-block;
}

.screen {
  display: none;
  width: min(100%, 1180px);
  min-height: min(760px, calc(100vh - 36px));
}

.screen-active {
  display: flex;
}

.intro-screen {
  position: relative;
  align-items: center;
  overflow: hidden;
  border: 1px solid var(--soft-line);
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 22px 70px rgba(33, 29, 27, 0.08);
}

.hero-accent {
  position: absolute;
  inset: 0 0 auto;
  display: grid;
  grid-template-columns: 1.2fr 0.85fr 1fr 0.7fr;
  height: 8px;
}

.accent-line {
  display: block;
  height: 100%;
}

.accent-yellow {
  background: var(--yellow);
}

.accent-teal {
  background: var(--teal);
}

.accent-coral {
  background: var(--coral);
}

.accent-green {
  background: var(--green);
}

.intro-content {
  position: relative;
  width: min(100%, 920px);
  padding: clamp(28px, 5vw, 64px);
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--coral);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  max-width: 11ch;
  font-size: clamp(4rem, 10vw, 9rem);
  font-weight: 1000;
  line-height: 0.88;
}

.intro-subtitle {
  max-width: 34rem;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: clamp(1rem, 2.2vw, 1.35rem);
  font-weight: 750;
}

.intro-content .primary-action {
  margin-top: clamp(30px, 4vw, 48px);
}

h2 {
  font-size: clamp(2.2rem, 7vw, 4.7rem);
  font-weight: 950;
  line-height: 0.9;
}

.primary-action,
.secondary-action,
.stepper-button,
.danger-action {
  min-height: 48px;
  border: 2px solid var(--ink);
  border-radius: 6px;
  box-shadow: 0 5px 0 var(--ink);
  font-weight: 900;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.primary-action {
  padding: 0 24px;
  color: var(--ink);
  background: var(--yellow);
}

.secondary-action {
  padding: 0 22px;
  color: var(--ink);
  background: #ffffff;
}

.danger-action {
  padding: 0 22px;
  color: #ffffff;
  background: #2f2b28;
}

.primary-action:active,
.secondary-action:active,
.stepper-button:active,
.danger-action:active {
  transform: translateY(4px);
  box-shadow: 0 1px 0 var(--ink);
}

.primary-action:disabled,
.secondary-action:disabled,
.stepper-button:disabled,
.danger-action:disabled {
  cursor: not-allowed;
  opacity: 0.42;
  transform: none;
  box-shadow: 0 5px 0 var(--ink);
}

.setup-screen,
.players-screen,
.summary-screen {
  flex-direction: column;
  gap: 24px;
  border: 0;
  border-radius: 0;
  padding: clamp(22px, 4vw, 42px);
  background: #ffffff;
  box-shadow: none;
}

body.is-cosmic-host .summary-screen {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  background: #050509;
  color: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1), 0 22px 70px rgba(0, 0, 0, 0.35);
}

body.is-cosmic-host .summary-screen::before,
body.is-cosmic-host .summary-screen::after {
  position: absolute;
  inset: 0;
  content: "";
  pointer-events: none;
}

body.is-cosmic-host .summary-screen::before {
  background-image:
    radial-gradient(circle at 12% 18%, #ffffff 0 1px, transparent 1.8px),
    radial-gradient(circle at 28% 72%, #ffffffcc 0 1px, transparent 1.7px),
    radial-gradient(circle at 44% 28%, #ffe44d 0 1.2px, transparent 2px),
    radial-gradient(circle at 58% 82%, #ffffff 0 1px, transparent 1.7px),
    radial-gradient(circle at 74% 20%, #18a7ff 0 1.1px, transparent 1.9px),
    radial-gradient(circle at 88% 64%, #ffffffdd 0 1px, transparent 1.8px);
  background-size: 180px 180px, 230px 230px, 260px 260px, 210px 210px, 250px 250px, 190px 190px;
  opacity: 0.9;
}

body.is-cosmic-host .summary-screen::after {
  background:
    radial-gradient(circle at 50% 8%, rgba(255, 212, 71, 0.18), transparent 34%),
    radial-gradient(circle at 18% 86%, rgba(24, 167, 255, 0.16), transparent 30%),
    radial-gradient(circle at 88% 78%, rgba(177, 68, 255, 0.16), transparent 32%);
}

body.is-cosmic-host .summary-screen > * {
  position: relative;
  z-index: 1;
}

body.is-cosmic-host .summary-screen .screen-header {
  border-bottom-color: rgba(255, 255, 255, 0.78);
}

body.is-cosmic-host .summary-screen .eyebrow,
body.is-cosmic-host .summary-screen h2,
body.is-cosmic-host .summary-screen p,
body.is-cosmic-host .summary-screen strong,
body.is-cosmic-host .summary-screen .summary-name,
body.is-cosmic-host .summary-screen .summary-color {
  color: #ffffff;
}

body.is-cosmic-host .summary-screen .judge-card,
body.is-cosmic-host .summary-screen .target-card,
body.is-cosmic-host .summary-screen .score-card,
body.is-cosmic-host .summary-screen .winner-banner {
  border-color: #ffffff;
  background: rgba(0, 0, 0, 0.82);
  color: #ffffff;
  box-shadow: 0 7px 0 rgba(255, 255, 255, 0.2), 0 0 28px rgba(255, 255, 255, 0.08);
}

body.is-cosmic-host .summary-screen .primary-action,
body.is-cosmic-host .summary-screen .secondary-action,
body.is-cosmic-host .summary-screen .danger-action,
body.is-cosmic-host .summary-screen .score-button,
body.is-cosmic-host .summary-screen .score-value {
  border-color: #ffffff;
  background: #000000;
  color: #ffffff;
  box-shadow: 0 5px 0 #ffffff;
}

body.is-cosmic-host .summary-screen .summary-photo {
  border-color: #ffffff;
  background: #000000;
}

.screen-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 2px solid var(--ink);
  padding-bottom: 22px;
}

.settings-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
  gap: 18px;
  align-items: stretch;
}

.setting-block {
  display: grid;
  gap: 16px;
  align-content: center;
  min-width: 0;
  border: 2px solid var(--ink);
  border-radius: 8px;
  padding: clamp(18px, 3vw, 32px);
  background: #ffffff;
  box-shadow: var(--shadow);
}

.setting-label {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 900;
  text-transform: uppercase;
}

.count-panel {
  display: grid;
  grid-template-columns: clamp(46px, 7vw, 74px) minmax(0, 1fr) clamp(46px, 7vw, 74px);
  gap: clamp(8px, 1.5vw, 18px);
  align-items: stretch;
  width: 100%;
  min-width: 0;
  margin: 0;
}

.stepper-button {
  min-width: 0;
  padding: 0;
  background: var(--teal);
  color: #ffffff;
  font-size: clamp(1.4rem, 4vw, 2rem);
}

.count-readout,
.score-readout {
  display: grid;
  min-height: 168px;
  place-items: center;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: #fff5d6;
}

.count-readout span,
.score-readout span {
  display: block;
  font-size: clamp(4.2rem, 14vw, 9rem);
  font-weight: 1000;
  line-height: 0.82;
}

.count-readout small,
.score-readout small {
  color: var(--muted);
  font-weight: 900;
  text-transform: uppercase;
}

.range-labels {
  display: flex;
  justify-content: space-between;
  width: 100%;
  color: var(--muted);
  font-weight: 900;
}

.screen-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: flex-end;
  margin-top: auto;
}

.player-grid,
.summary-grid,
.score-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 16px;
}

.player-card,
.summary-card,
.score-card {
  display: grid;
  gap: 13px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  padding: 14px;
  background: var(--panel);
  box-shadow: 0 7px 0 rgba(33, 29, 27, 0.12);
}

.photo-preview {
  position: relative;
  display: grid;
  width: 100%;
  aspect-ratio: 4 / 3;
  place-items: center;
  gap: 9px;
  overflow: hidden;
  border: 2px dashed var(--border);
  border-radius: 6px;
  background: #f7efe0;
  color: var(--muted);
  font-weight: 900;
  text-transform: uppercase;
}

.photo-preview-button {
  appearance: none;
  cursor: pointer;
  border: 2px dashed var(--border);
}

.photo-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-action {
  display: inline-grid;
  min-height: 38px;
  place-items: center;
  border: 2px solid var(--ink);
  border-radius: 6px;
  padding: 0 14px;
  background: var(--yellow);
  color: var(--ink);
  box-shadow: 0 4px 0 var(--ink);
}

.photo-preview.has-photo {
  border-style: solid;
}

.photo-preview.has-photo .photo-action {
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 1;
}

.player-card label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.player-card input[type="text"] {
  width: 100%;
  min-height: 44px;
  border: 2px solid var(--border);
  border-radius: 6px;
  padding: 9px 10px;
  background: #ffffff;
  color: var(--ink);
}

.color-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.color-swatch {
  position: relative;
  width: 36px;
  height: 36px;
  overflow: hidden;
  border: 2px solid var(--ink);
  border-radius: 50%;
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.55);
}

.color-swatch.is-rainbow::before {
  position: absolute;
  inset: 5px;
  content: "";
  border-radius: inherit;
  background: linear-gradient(135deg, #ffffff88, #ffffff10),
    repeating-linear-gradient(
      135deg,
      #ff2d55 0 4px,
      #ff8a00 4px 8px,
      #ffe44d 8px 12px,
      #36d66b 12px 16px,
      #18a7ff 16px 20px,
      #4f46e5 20px 24px,
      #b144ff 24px 28px
    );
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.58);
}

.color-swatch[aria-pressed="true"] {
  outline: 4px solid var(--ink);
  outline-offset: 2px;
}

.color-swatch:disabled {
  cursor: not-allowed;
  opacity: 0.28;
}

.form-note {
  min-height: 24px;
  margin: 0;
  color: var(--coral);
  font-weight: 900;
}

.camera-modal {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: none;
  padding: clamp(16px, 3vw, 40px);
  place-items: center;
  background: rgba(255, 255, 255, 0.92);
}

.camera-modal.is-open {
  display: grid;
}

.camera-panel {
  display: grid;
  width: min(100%, 880px);
  max-height: calc(100vh - 32px);
  gap: 18px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  padding: clamp(16px, 3vw, 28px);
  background: #ffffff;
  box-shadow: 0 12px 0 var(--ink);
}

.camera-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 2px solid var(--ink);
  padding-bottom: 16px;
}

.camera-header h2 {
  font-size: clamp(2rem, 6vw, 4rem);
}

.camera-video {
  width: 100%;
  max-height: min(58vh, 560px);
  aspect-ratio: 4 / 3;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: #2f2b28;
  object-fit: cover;
  transform: scaleX(-1);
}

.judge-picker {
  position: fixed;
  inset: 0;
  z-index: 35;
  display: none;
  overflow: hidden;
  place-items: center;
  background:
    radial-gradient(circle at var(--origin-x, 50%) var(--origin-y, 50%), rgba(255, 255, 255, 0.16), transparent 24%),
    #030303;
  color: #ffffff;
  clip-path: circle(0 at var(--origin-x, 50%) var(--origin-y, 50%));
}

.judge-picker.is-open {
  display: grid;
  animation: judge-picker-in 640ms cubic-bezier(0.16, 0.86, 0.24, 1) forwards;
}

.judge-picker.is-closing {
  animation: judge-picker-out 640ms cubic-bezier(0.7, 0, 0.84, 0.22) forwards;
}

.judge-picker-track {
  position: absolute;
  inset: clamp(80px, 12vh, 130px) clamp(24px, 5vw, 84px) clamp(130px, 18vh, 190px);
  display: grid;
  align-content: center;
  gap: clamp(18px, 4vh, 34px);
}

.judge-row {
  display: flex;
  justify-content: center;
  gap: clamp(12px, 2.2vw, 28px);
}

.judge-token {
  display: grid;
  width: clamp(96px, 14vw, 164px);
  aspect-ratio: 0.78;
  place-items: center;
  gap: 8px;
  border: 3px solid var(--token-color);
  border-radius: 8px;
  padding: 10px;
  background: #ffffff;
  color: var(--ink);
  box-shadow: 0 10px 0 var(--token-color), 0 20px 42px rgba(0, 0, 0, 0.38);
  opacity: 0;
  transform: translateY(26px) scale(0.18);
  transform-origin: center;
  transition: transform 180ms ease, opacity 180ms ease, filter 180ms ease;
}

.judge-token.is-rainbow {
  border-color: var(--ink);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.72)),
    repeating-linear-gradient(
      135deg,
      #ff2d55 0 12px,
      #ff8a00 12px 24px,
      #ffe44d 24px 36px,
      #36d66b 36px 48px,
      #18a7ff 48px 60px,
      #4f46e5 60px 72px,
      #b144ff 72px 84px
    );
  box-shadow: 0 10px 0 var(--ink), 0 20px 42px rgba(0, 0, 0, 0.38);
}

.judge-token.is-rainbow.is-active {
  box-shadow: 0 14px 0 var(--ink), 0 0 76px rgba(255, 228, 77, 0.55), 0 0 46px rgba(24, 167, 255, 0.45);
}

.judge-picker.is-populated .judge-token {
  opacity: 0.58;
  filter: saturate(0.72) brightness(0.76);
  transform: translateY(0) scale(0.74);
}

.judge-picker.is-populated .judge-token.is-active {
  z-index: 2;
  opacity: 1 !important;
  filter: saturate(1.24) brightness(1.04) !important;
  transform: translateY(-10px) scale(1.42) !important;
}

.judge-picker.is-populated .judge-token.is-selected {
  z-index: 3;
  opacity: 1;
  animation: judge-winner 820ms cubic-bezier(0.2, 0.95, 0.2, 1) forwards;
}

.judge-picker.is-populated .judge-token.is-decoy {
  z-index: 4;
}

.judge-picker.is-hand-prank::before {
  position: fixed;
  top: clamp(168px, 31vh, 266px);
  left: 50%;
  z-index: 8;
  content: "🫸";
  font-size: clamp(5rem, 12vw, 9rem);
  line-height: 1;
  filter: drop-shadow(0 8px 0 rgba(0, 0, 0, 0.45));
  animation: hand-push 880ms cubic-bezier(0.16, 0.9, 0.18, 1) forwards;
}

.judge-picker.is-hand-prank .judge-token.is-pushed {
  z-index: 5;
  animation: card-pushed 880ms cubic-bezier(0.16, 0.9, 0.2, 1) forwards !important;
}

.judge-picker.is-populated .judge-token.is-king {
  position: fixed;
  top: clamp(28px, 4vh, 48px);
  left: 50%;
  z-index: 10;
  animation: none;
  filter: saturate(1.18) brightness(1.08) contrast(1.05) !important;
  transform: translateX(-50%) scale(1.14) !important;
  box-shadow:
    0 16px 0 var(--token-color),
    0 0 0 8px rgba(255, 212, 71, 0.24),
    0 0 32px 10px rgba(255, 212, 71, 0.62),
    0 0 96px 30px rgba(255, 184, 0, 0.36),
    0 28px 54px rgba(0, 0, 0, 0.42);
}

.judge-picker.is-populated .judge-token.is-king::after {
  position: absolute;
  inset: -28px;
  z-index: -1;
  content: "";
  border-radius: 20px;
  background:
    radial-gradient(circle, rgba(255, 244, 173, 0.58) 0 12%, rgba(255, 212, 71, 0.42) 34%, rgba(255, 153, 0, 0.14) 58%, transparent 72%),
    conic-gradient(from 0deg, transparent 0 8%, rgba(255, 212, 71, 0.34) 10% 14%, transparent 16% 24%, rgba(255, 244, 173, 0.28) 26% 30%, transparent 32% 100%);
  filter: blur(1px);
}

.judge-picker.is-king-prank .judge-picker-track {
  inset: clamp(388px, 55vh, 520px) clamp(18px, 5vw, 84px) clamp(20px, 4vh, 46px);
  align-content: center;
  gap: clamp(8px, 1.8vh, 16px);
  transform: none;
}

.judge-picker.is-king-prank .judge-row {
  gap: clamp(8px, 1.4vw, 18px);
}

.judge-picker.is-king-prank .judge-token:not(.is-king) {
  width: clamp(78px, 10vw, 118px);
  gap: 6px;
  padding: 8px;
  opacity: 0.84 !important;
  filter: saturate(0.98) brightness(0.92) !important;
  transform: translateY(0) scale(1) !important;
}

.judge-picker.is-king-prank .judge-token.is-pushed {
  opacity: 0.84 !important;
  transform: translateY(0) scale(1) !important;
}

.judge-token.is-king::before {
  position: absolute;
  top: clamp(-38px, -4vw, -24px);
  left: 50%;
  z-index: 7;
  content: "♛";
  transform: translateX(-50%) rotate(-5deg);
  color: #ffd447;
  font-size: clamp(2.6rem, 5vw, 4.8rem);
  line-height: 1;
  text-shadow: 0 3px 0 var(--ink), 0 0 22px rgba(255, 212, 71, 0.8);
}

.judge-token-photo {
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--token-color);
}

.judge-token-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.judge-token-initial {
  position: relative;
  display: grid;
  height: 100%;
  overflow: hidden;
  place-items: center;
  color: #ffffff;
  font-size: clamp(2rem, 4vw, 4rem);
  font-weight: 1000;
}

.judge-token-initial.is-rainbow,
.summary-initials.is-rainbow {
  isolation: isolate;
  box-shadow: inset 0 0 0 8px rgba(255, 255, 255, 0.22), inset 0 0 0 18px rgba(255, 255, 255, 0.1);
  text-shadow: 0 2px 0 rgba(33, 29, 27, 0.42);
}

.judge-token-name {
  width: 100%;
  overflow: hidden;
  font-size: clamp(0.9rem, 1.5vw, 1.35rem);
  font-weight: 1000;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.judge-picker-result {
  position: absolute;
  bottom: clamp(28px, 6vh, 72px);
  left: 50%;
  z-index: 4;
  width: min(90vw, 760px);
  min-height: 70px;
  transform: translateX(-50%);
  color: #ffffff;
  font-size: clamp(1.9rem, 6vw, 5rem);
  font-weight: 1000;
  line-height: 0.95;
  text-align: center;
  text-transform: uppercase;
}

.judge-picker.is-king-prank .judge-picker-result {
  top: clamp(292px, 42vh, 374px);
  bottom: auto;
  min-height: 0;
  color: #ffd447;
  font-size: clamp(2.1rem, 5.6vw, 4.5rem);
  text-shadow: 0 4px 0 var(--ink), 0 0 28px rgba(255, 212, 71, 0.58);
}

.confetti-layer {
  position: fixed;
  inset: 0;
  z-index: 45;
  pointer-events: none;
  overflow: hidden;
}

.confetti-piece {
  position: absolute;
  top: -24px;
  width: 10px;
  height: 16px;
  border-radius: 2px;
  background: var(--confetti-color);
  animation: confetti-fall var(--fall-time) cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
}

.host-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(260px, 0.85fr);
  gap: 18px;
}

.judge-card,
.target-card {
  display: grid;
  gap: 12px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  padding: 24px;
  background: #2f2b28;
  color: #ffffff;
}

.judge-card p {
  margin: 0;
  color: var(--yellow);
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
}

.target-card {
  background: #fff5d6;
  color: var(--ink);
}

.target-card p {
  margin: 0;
  color: var(--coral);
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
}

.judge-card strong,
.target-card strong {
  font-size: clamp(2rem, 6vw, 4rem);
  line-height: 0.95;
}

.winner-banner {
  display: none;
  margin: 0;
  border: 2px solid var(--ink);
  border-radius: 8px;
  padding: 18px 22px;
  background: var(--green);
  color: #ffffff;
  font-size: clamp(1.3rem, 4vw, 2.3rem);
  font-weight: 950;
}

.winner-banner.is-visible {
  display: block;
}

.summary-card {
  grid-template-columns: 72px 1fr;
  align-items: center;
}

.score-card {
  grid-template-columns: 74px minmax(0, 1fr);
  align-items: center;
}

.summary-photo {
  width: 72px;
  aspect-ratio: 1;
  overflow: hidden;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: #f7efe0;
}

.score-info {
  min-width: 0;
}

.summary-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.summary-initials {
  position: relative;
  display: grid;
  height: 100%;
  overflow: hidden;
  place-items: center;
  color: #ffffff;
  font-weight: 1000;
}

.summary-name {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 950;
}

.score-controls {
  display: grid;
  grid-template-columns: 38px minmax(42px, 1fr) 38px;
  gap: 6px;
  align-items: center;
  margin-top: 10px;
  width: 100%;
  min-width: 0;
}

.score-button {
  width: 38px;
  height: 38px;
  border: 2px solid var(--ink);
  border-radius: 6px;
  background: #ffffff;
  color: var(--ink);
  font-size: 1.25rem;
  font-weight: 950;
}

.score-button:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

.score-value {
  display: grid;
  min-width: 0;
  min-height: 38px;
  place-items: center;
  border: 2px solid var(--ink);
  border-radius: 6px;
  background: #fff5d6;
  font-size: 1.5rem;
  font-weight: 1000;
}

.summary-color {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

@media (max-width: 680px) {
  .app-shell {
    padding: 12px;
  }

  .screen {
    min-height: calc(100vh - 24px);
  }

  .intro-content {
    padding: 28px;
  }

  .hero-accent {
    grid-template-columns: repeat(4, 1fr);
    inset: auto 18px 18px 18px;
  }

  .screen-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .count-panel {
    grid-template-columns: 58px minmax(120px, 1fr) 58px;
    gap: 10px;
  }

  .settings-grid,
  .host-grid {
    grid-template-columns: 1fr;
  }

  .screen-actions {
    justify-content: stretch;
  }

  .screen-actions button {
    flex: 1 1 160px;
  }
}

@media (max-width: 920px) {
  .score-grid {
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  }

  .score-card {
    grid-template-columns: 62px minmax(0, 1fr);
    padding: 12px;
  }

  .summary-photo {
    width: 62px;
  }

  .summary-name {
    font-size: 1rem;
  }

  .summary-color {
    font-size: 0.74rem;
  }

  .score-controls {
    grid-template-columns: 34px minmax(34px, 1fr) 34px;
  }

  .score-button {
    width: 34px;
    height: 34px;
  }
}

@keyframes fade-away {
  to {
    opacity: 0;
    transform: translateY(10px);
  }
}

@keyframes judge-picker-in {
  0% {
    clip-path: circle(0 at var(--origin-x, 50%) var(--origin-y, 50%));
  }

  100% {
    clip-path: circle(150vmax at var(--origin-x, 50%) var(--origin-y, 50%));
  }
}

@keyframes judge-picker-out {
  0% {
    clip-path: circle(150vmax at var(--origin-x, 50%) var(--origin-y, 50%));
  }

  100% {
    clip-path: circle(0 at var(--origin-x, 50%) var(--origin-y, 50%));
  }
}

@keyframes white-flash {
  0%,
  72% {
    opacity: 0;
  }

  82% {
    opacity: 1;
  }

  100% {
    opacity: 0;
  }
}

@keyframes swoosh-right {
  0% {
    transform: translateX(110%) skewX(-7deg);
  }

  44% {
    transform: translateX(0) skewX(-7deg);
  }

  100% {
    transform: translateX(-120%) skewX(-7deg);
  }
}

@keyframes liquid-main {
  0% {
    transform: translateX(0) scaleY(0.86);
  }

  48% {
    transform: translateX(-76vw) scaleY(1.08);
  }

  100% {
    transform: translateX(-158vw) scaleY(0.98);
  }
}

@keyframes card-flip {
  0% {
    opacity: 0;
    transform: translateY(34px) rotateY(0deg) rotateZ(-4deg) scale(0.84);
  }

  14% {
    opacity: 1;
    transform: translateY(0) rotateY(360deg) rotateZ(3deg) scale(1);
  }

  72% {
    opacity: 1;
    transform: translateY(0) rotateY(1260deg) rotateZ(-3deg) scale(1.04);
  }

  100% {
    opacity: 0;
    transform: translateY(-22px) rotateY(1620deg) rotateZ(0deg) scale(1.28);
  }
}

@keyframes judge-winner {
  to {
    width: clamp(190px, 24vw, 360px);
    transform: translateY(-10px) scale(1.08);
    box-shadow: 0 14px 0 var(--token-color), 0 0 70px var(--token-color);
  }
}

@keyframes hand-push {
  0% {
    opacity: 0;
    transform: translateX(-48vw) rotate(2deg) scale(0.92);
  }

  18% {
    opacity: 1;
    transform: translateX(-24vw) rotate(2deg) scale(1);
  }

  34% {
    opacity: 1;
    transform: translateX(-14vw) rotate(0deg) scale(1.04);
  }

  46% {
    opacity: 1;
    transform: translateX(-13vw) rotate(0deg) scale(1.04);
  }

  100% {
    opacity: 0;
    transform: translateX(44vw) rotate(-4deg) scale(0.98);
  }
}

@keyframes card-pushed {
  0% {
    opacity: 1;
    transform: translateY(-10px) scale(1.08);
  }

  42% {
    opacity: 1;
    transform: translateY(-10px) scale(1.08);
  }

  100% {
    opacity: 0.12;
    transform: translate(57vw, 10vh) rotate(22deg) scale(0.38);
  }
}

@keyframes confetti-fall {
  0% {
    transform: translate3d(0, -20px, 0) rotate(0deg);
    opacity: 1;
  }

  100% {
    transform: translate3d(var(--drift), 112vh, 0) rotate(var(--spin));
    opacity: 0;
  }
}

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