:root {
  --ink: #141414;
  --purple: #6322d6;
  --cream: #F6F1E7;
  --cream-shade: #E4DCC8;
  --correct: #18C964;
  --pass: #FF3A30;
  --correct-dk: #18A34A;
  --cat-color: #FFD400;
}

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

html,
body {
  width: 100%;
  height: 100%;
  background: var(--ink);
  color: var(--ink);
  font-family: 'Archivo', sans-serif;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: none;
}

/* ── SCREENS ── */
.screen {
  display: none;
  position: absolute;
  inset: 0;
  flex-direction: column;
}

.screen.active {
  display: flex;
}

/* ── ANIMATIONS ── */
@keyframes countPop {
  0% {
    transform: scale(1.5);
  }

  60% {
    transform: scale(1);
  }

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

@keyframes tiltIn {
  0% {
    transform: rotate(-4deg) translateY(-20px);
    opacity: 0;
  }

  100% {
    transform: rotate(-4deg);
    opacity: 1;
  }
}

/* ══════════════════════════════════════
   HOME
══════════════════════════════════════ */
#home-screen {
  background: var(--purple);
  padding: 0 26px max(26px, env(safe-area-inset-bottom));
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.wordmark-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 26px;
}

.wordmark-box {
  background: #FFD400;
  border: 6px solid var(--ink);
  padding: 6px 30px 14px;
  box-shadow: 12px 12px 0 var(--ink);
  animation: tiltIn .45s cubic-bezier(.2, .85, .25, 1) both;
}

.wordmark-text {
  font-family: 'Archivo Black', sans-serif;
  font-size: clamp(64px, 20vw, 104px);
  line-height: .92;
  letter-spacing: -3px;
}

.wordmark-chip {
  margin-top: 22px;
  background: var(--ink);
  color: #fff;
  font-weight: 900;
  font-size: 13px;
  letter-spacing: 3px;
  padding: 7px 14px;
}

.deck-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.deck-divider-line {
  flex: 1;
  height: 4px;
  background: #fff;
  opacity: .55;
}

.deck-divider-lbl {
  font-weight: 900;
  font-size: 15px;
  letter-spacing: 3px;
  color: #fff;
  white-space: nowrap;
}

.deck-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  padding-bottom: 4px;
}

.tile {
  position: relative;
  overflow: hidden;
  border: 5px solid var(--ink);
  box-shadow: 8px 8px 0 var(--ink);
  padding: 18px 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  min-height: 115px;
  transition: none;
}

.tile:active {
  transform: translate(4px, 4px);
  box-shadow: 2px 2px 0 var(--ink);
}

.tile-glyph {
  position: absolute;
  right: -14px;
  bottom: -14px;
  font-size: 150px;
  line-height: 1;
  color: var(--ink);
  opacity: .17;
  pointer-events: none;
}

.tile-name {
  position: relative;
  z-index: 1;
  font-family: 'Archivo Black', sans-serif;
  font-size: 28px;
  line-height: .95;
}

.tile-sub {
  position: relative;
  z-index: 1;
  font-weight: 800;
  font-size: 11px;
  letter-spacing: 1px;
  opacity: .7;
}

.tile[data-cat=mainstream] {
  background: #FFD400;
}

.tile[data-cat=everyday] {
  background: #22A7FF;
}

.tile[data-cat=fiji] {
  background: #FF7A1A;
}

.tile[data-cat=party] {
  background: #FF4D9D;
}

.tile[data-cat=sports] {
  background: #00C8FF;
}

.tile[data-cat=nature] {
  background: #39DB74;
}

.tile[data-cat=food] {
  background: #FF5E3A;
}

.tile[data-cat=places] {
  background: #14B8A6;
}


.tile[data-cat=history] {
  background: #D4A0FF;
  grid-column: 1 / -1;
}

/* ══════════════════════════════════════
   MENU SCREEN
══════════════════════════════════════ */
#menu-screen {
  background: var(--purple);
  padding: max(30px, env(safe-area-inset-top)) 26px max(26px, env(safe-area-inset-bottom));
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  gap: 0;
}

.menu-game-tiles {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.menu-tile {
  position: relative;
  overflow: hidden;
  border: 5px solid var(--ink);
  box-shadow: 8px 8px 0 var(--ink);
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  min-height: 140px;
  transition: none;
  background: #FFD400;
}

.menu-tile:active {
  transform: translate(4px, 4px);
  box-shadow: 2px 2px 0 var(--ink);
}

.menu-tile-imp {
  background: var(--ink);
  border-color: #fff;
  box-shadow: 8px 8px 0 rgba(255, 255, 255, .3);
}

.menu-tile-imp .tile-glyph {
  color: #fff;
}

.menu-tile-imp .tile-name {
  color: #fff;
}

.menu-tile-imp .tile-sub {
  color: rgba(255, 255, 255, .55);
}

/* ══════════════════════════════════════
   CHARADES HOME HEADER (replaces wordmark)
══════════════════════════════════════ */
.charades-home-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: max(36px, env(safe-area-inset-top)) 26px 0;
  margin-bottom: 20px;
}

.charades-home-title {
  font-weight: 900;
  font-size: 14px;
  letter-spacing: 3px;
  color: #fff;
}

/* ══════════════════════════════════════
   IMPOSTER SETUP
══════════════════════════════════════ */
#imp-setup-screen {
  background: var(--purple);
  padding: max(30px, env(safe-area-inset-top)) 26px max(26px, env(safe-area-inset-bottom));
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.imp-setup-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.player-stepper {
  background: var(--ink);
  border: 5px solid #fff;
  box-shadow: 8px 8px 0 rgba(255, 255, 255, .25);
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 16px 0;
}

.stepper-lbl {
  font-weight: 900;
  font-size: 13px;
  letter-spacing: 3px;
  color: #fff;
}

.stepper-controls {
  display: flex;
  align-items: center;
  gap: 20px;
}

.stepper-btn {
  background: #fff;
  color: var(--ink);
  border: none;
  font-family: 'Archivo Black', sans-serif;
  font-size: 28px;
  width: 52px;
  height: 52px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.stepper-btn:active {
  opacity: .7;
}

.stepper-btn:disabled {
  opacity: .3;
  cursor: default;
}

.stepper-num {
  font-family: 'Archivo Black', sans-serif;
  font-size: 52px;
  color: #fff;
  min-width: 52px;
  text-align: center;
  line-height: 1;
}

.imp-start-btn {
  background: #FFD400;
  color: var(--ink);
  font-family: 'Archivo Black', sans-serif;
  font-size: 28px;
  text-align: center;
  padding: 22px;
  border: 5px solid var(--ink);
  box-shadow: 8px 8px 0 var(--ink);
  cursor: pointer;
  width: 100%;
  transition: none;
}

.imp-start-btn:active {
  transform: translate(4px, 4px);
  box-shadow: 2px 2px 0 var(--ink);
}

/* ══════════════════════════════════════
   IMPOSTER DEAL SCREEN
══════════════════════════════════════ */
#imp-deal-screen {
  background: var(--ink);
  padding: max(30px, env(safe-area-inset-top)) 0 max(26px, env(safe-area-inset-bottom));
  align-items: stretch;
  justify-content: space-between;
}

.deal-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 0 24px;
}

.deal-player-label {
  font-weight: 900;
  font-size: 13px;
  letter-spacing: 3px;
  color: rgba(255, 255, 255, .5);
}

.deal-dots {
  display: flex;
  gap: 8px;
}

.deal-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .15);
  transition: background .2s;
}

.deal-dot.seen {
  background: rgba(255, 255, 255, .35);
}

.deal-dot.current {
  background: #FFD400;
}

.deal-card-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 24px;
}

.deal-card {
  width: 100%;
  max-width: 380px;
  min-height: 240px;
  border: 5px solid rgba(255, 255, 255, .3);
  box-shadow: 8px 8px 0 rgba(255, 255, 255, .1);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 36px 28px;
  cursor: pointer;
  overflow: hidden;
  transition: none;
  background: #1c1c1c;
}

.deal-card:active {
  transform: translate(4px, 4px);
  box-shadow: 2px 2px 0 rgba(255, 255, 255, .1);
}

.deal-card.revealed {
  background: #fff;
  border-color: var(--ink);
  box-shadow: 8px 8px 0 rgba(255, 255, 255, .25);
  cursor: default;
}

.deal-card.revealed:active {
  transform: none;
  box-shadow: 8px 8px 0 rgba(255, 255, 255, .25);
}

.deal-tap-icon {
  font-size: 56px;
  color: rgba(255, 255, 255, .2);
  margin-bottom: 14px;
}

.deal-tap-hint {
  font-weight: 900;
  font-size: 13px;
  letter-spacing: 3px;
  color: rgba(255, 255, 255, .35);
  text-align: center;
}

.deal-hidden-content,
.deal-shown-content {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.deal-shown-content {
  display: none;
}

.deal-card.revealed .deal-hidden-content {
  display: none;
}

.deal-card.revealed .deal-shown-content {
  display: flex;
}

.deal-role-badge {
  font-weight: 900;
  font-size: 11px;
  letter-spacing: 3px;
  padding: 6px 14px;
  border: 3px solid var(--ink);
  margin-bottom: 18px;
}

.badge-crew {
  background: var(--correct);
  color: var(--ink);
}

.badge-imp {
  background: var(--pass);
  color: #fff;
}

.deal-word-text {
  font-family: 'Archivo Black', sans-serif;
  font-size: clamp(34px, 9vw, 60px);
  line-height: .95;
  color: var(--ink);
  text-align: center;
  letter-spacing: -1px;
}

.deal-hint-sub {
  font-weight: 900;
  font-size: 11px;
  letter-spacing: 3px;
  color: rgba(0, 0, 0, .4);
  margin-top: 10px;
  text-align: center;
}

.deal-footer {
  padding: 0 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.deal-next-btn {
  background: #FFD400;
  color: var(--ink);
  font-family: 'Archivo Black', sans-serif;
  font-size: 24px;
  text-align: center;
  padding: 18px;
  border: 5px solid rgba(255, 255, 255, .4);
  box-shadow: 8px 8px 0 rgba(255, 255, 255, .15);
  cursor: pointer;
  transition: none;
  display: none;
}

.deal-next-btn.visible {
  display: block;
}

.deal-next-btn:active {
  transform: translate(4px, 4px);
  box-shadow: 2px 2px 0 rgba(255, 255, 255, .15);
}

/* ══════════════════════════════════════
   IMPOSTER DISCUSS SCREEN
══════════════════════════════════════ */
#imp-discuss-screen {
  background: var(--ink);
  padding: max(36px, env(safe-area-inset-top)) 26px max(26px, env(safe-area-inset-bottom));
  align-items: stretch;
  justify-content: space-between;
}

.discuss-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
}

.discuss-heading {
  font-family: 'Archivo Black', sans-serif;
  font-size: clamp(52px, 15vw, 88px);
  color: #FFD400;
  line-height: .9;
  letter-spacing: -2px;
  text-align: center;
}

.discuss-sub {
  font-weight: 900;
  font-size: 13px;
  letter-spacing: 3px;
  color: rgba(255, 255, 255, .4);
  text-align: center;
}

.discuss-reveal-box {
  width: 100%;
  max-width: 380px;
  border: 4px solid rgba(255, 255, 255, .15);
  padding: 18px 24px;
  text-align: center;
  cursor: pointer;
  transition: none;
}

.discuss-reveal-box:active {
  opacity: .7;
}

.discuss-reveal-lbl {
  font-weight: 900;
  font-size: 11px;
  letter-spacing: 3px;
  color: rgba(255, 255, 255, .35);
  margin-bottom: 8px;
}

.discuss-reveal-word {
  font-family: 'Archivo Black', sans-serif;
  font-size: 40px;
  color: #fff;
  letter-spacing: -1px;
  display: none;
}

.discuss-reveal-word.show {
  display: block;
}

.discuss-reveal-imposter {
  font-family: 'Archivo Black', sans-serif;
  font-size: 32px;
  color: var(--pass);
  letter-spacing: -1px;
  margin-top: 6px;
  display: none;
}

.discuss-reveal-imposter.show {
  display: block;
}

.discuss-reveal-sublbl {
  font-weight: 900;
  font-size: 10px;
  letter-spacing: 3px;
  color: rgba(255, 255, 255, .35);
  margin-top: 14px;
  margin-bottom: 2px;
  display: none;
}

.discuss-reveal-sublbl.imp-sublbl {
  color: rgba(255, 96, 80, .6);
}

.discuss-reveal-sublbl.show {
  display: block;
}

.discuss-reveal-placeholder {
  font-weight: 900;
  font-size: 18px;
  letter-spacing: 2px;
  color: rgba(255, 255, 255, .25);
}

.discuss-reveal-placeholder.hide {
  display: none;
}

.discuss-btns {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.discuss-play-again {
  background: #FFD400;
  color: var(--ink);
  font-family: 'Archivo Black', sans-serif;
  font-size: 26px;
  text-align: center;
  padding: 20px;
  border: 5px solid rgba(255, 255, 255, .4);
  box-shadow: 8px 8px 0 rgba(255, 255, 255, .15);
  cursor: pointer;
  transition: none;
}

.discuss-play-again:active {
  transform: translate(4px, 4px);
  box-shadow: 2px 2px 0 rgba(255, 255, 255, .15);
}

/* ══════════════════════════════════════
   GET READY
══════════════════════════════════════ */
#ready-screen {
  background: var(--cat-color);
  align-items: stretch;
}

.ready-top {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: max(36px, env(safe-area-inset-top)) 28px 0;
}

.back-btn {
  background: var(--ink);
  color: #fff;
  border: none;
  font-weight: 900;
  font-size: 13px;
  letter-spacing: 1px;
  padding: 8px 14px;
  cursor: pointer;
}

.back-btn:active {
  opacity: .7;
}

.deck-badge {
  font-weight: 900;
  font-size: 14px;
  letter-spacing: 3px;
  color: var(--ink);
  background: #fff;
  border: 4px solid var(--ink);
  padding: 7px 16px;
  white-space: nowrap;
}

.ready-center {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 34px;
  padding: 0 28px;
}

.forehead-glyph {
  position: relative;
  width: 190px;
  height: 150px;
  flex-shrink: 0;
}

.forehead-face {
  position: absolute;
  left: 36px;
  top: 34px;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: #fff;
  border: 6px solid var(--ink);
}

.forehead-phone {
  position: absolute;
  left: 18px;
  top: -6px;
  width: 150px;
  height: 46px;
  background: var(--ink);
  border-radius: 10px;
  transform: rotate(-9deg);
  display: flex;
  align-items: center;
  justify-content: center;
}

.forehead-screen {
  width: 120px;
  height: 20px;
  background: #fff;
  border-radius: 3px;
}

.ready-heading {
  font-family: 'Archivo Black', sans-serif;
  font-size: clamp(30px, 9vw, 46px);
  line-height: .95;
  color: var(--ink);
  text-align: center;
}

.motion-btn {
  background: var(--ink);
  color: #fff;
  font-family: 'Archivo Black', sans-serif;
  font-size: clamp(20px, 5.5vw, 30px);
  letter-spacing: 1px;
  padding: 22px 40px;
  border: 5px solid var(--ink);
  box-shadow: 8px 8px 0 #fff;
  cursor: pointer;
  width: 100%;
  max-width: 380px;
  transition: none;
}

.motion-btn:active {
  transform: translate(4px, 4px);
  box-shadow: 2px 2px 0 #fff;
}

.motion-btn:disabled {
  opacity: .4;
  cursor: default;
  pointer-events: none;
}

.sideways-chip {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--ink);
  padding: max(14px, env(safe-area-inset-bottom)) 18px max(14px, env(safe-area-inset-bottom));
  flex-shrink: 0;
}

.sideways-icon {
  width: 26px;
  height: 40px;
  border: 4px solid #fff;
  border-radius: 5px;
  transform: rotate(90deg);
  flex-shrink: 0;
}

.sideways-lbl {
  font-weight: 900;
  font-size: 15px;
  letter-spacing: 2px;
  color: #fff;
}

/* ══════════════════════════════════════
   COUNTDOWN
══════════════════════════════════════ */
#countdown-screen {
  background: var(--cat-color);
  align-items: center;
  justify-content: center;
}

.countdown-num {
  font-family: 'Archivo Black', sans-serif;
  font-size: clamp(140px, 38vw, 310px);
  line-height: 1;
  color: #fff;
  -webkit-text-stroke: clamp(5px, 1.4vw, 10px) var(--ink);
  animation: countPop .5s cubic-bezier(.2, .85, .25, 1) both;
}

/* ══════════════════════════════════════
   PLAY
══════════════════════════════════════ */
#play-screen {
  background: var(--cream);
  padding: 0;
}

.timer-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 16px;
  background: var(--cream-shade);
  z-index: 5;
}

.timer-fill {
  height: 100%;
  background: var(--ink);
  transition: width 1s linear;
  will-change: width;
}

.timer-num {
  position: absolute;
  top: 22px;
  right: 24px;
  font-family: 'Archivo Black', sans-serif;
  font-size: 24px;
  color: var(--ink);
  z-index: 5;
}

.play-wrap {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.word {
  font-family: 'Archivo Black', sans-serif;
  font-size: 100px;
  line-height: .88;
  color: var(--ink);
  text-align: center;
  letter-spacing: -1px;
  padding: 16px 64px 28px;
  max-width: 100%;
  word-break: keep-all;
  overflow-wrap: normal;
  hyphens: none;
  white-space: normal;
}

.hint-pass {
  position: absolute;
  bottom: max(18px, env(safe-area-inset-bottom));
  left: 24px;
  font-weight: 900;
  font-size: 18px;
  letter-spacing: 1px;
  color: var(--pass);
  z-index: 11;
  opacity: .85;
}

.hint-correct {
  position: absolute;
  bottom: max(18px, env(safe-area-inset-bottom));
  right: 24px;
  font-weight: 900;
  font-size: 18px;
  letter-spacing: 1px;
  color: var(--correct-dk);
  z-index: 11;
  opacity: .85;
}

.tap-pass,
.tap-correct {
  position: absolute;
  top: 20px;
  bottom: 0;
  width: 50%;
  z-index: 10;
  cursor: pointer;
}

.tap-pass {
  left: 0;
}

.tap-correct {
  right: 0;
}

.quit-btn {
  position: absolute;
  top: 0;
  left: 0;
  width: 44px;
  height: 44px;
  background: var(--pass);
  border: none;
  font-family: 'Archivo Black', sans-serif;
  font-size: 18px;
  color: #fff;
  cursor: pointer;
  z-index: 11;
  display: flex;
  align-items: center;
  justify-content: center;
}

#quit-modal {
  display: none;
  position: absolute;
  inset: 0;
  background: var(--ink);
  z-index: 50;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 32px;
}

#quit-modal.show {
  display: flex;
}

.quit-heading {
  font-family: 'Archivo Black', sans-serif;
  font-size: clamp(56px, 14vw, 96px);
  color: #fff;
  line-height: 1;
  letter-spacing: -2px;
}

.quit-sub {
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 2px;
  color: rgba(255, 255, 255, .45);
  margin-top: -8px;
}

.quit-keep {
  background: #FFD400;
  color: var(--ink);
  font-family: 'Archivo Black', sans-serif;
  font-size: clamp(18px, 4vw, 26px);
  padding: 18px 32px;
  border: 5px solid #fff;
  box-shadow: 8px 8px 0 #fff;
  cursor: pointer;
  width: 100%;
  max-width: 380px;
  transition: none;
}

.quit-keep:active {
  transform: translate(4px, 4px);
  box-shadow: 2px 2px 0 #fff;
}

.quit-end {
  background: var(--pass);
  color: #fff;
  font-family: 'Archivo Black', sans-serif;
  font-size: clamp(16px, 3.5vw, 22px);
  padding: 14px 32px;
  border: 5px solid rgba(255, 255, 255, .5);
  box-shadow: 8px 8px 0 rgba(255, 255, 255, .3);
  cursor: pointer;
  width: 100%;
  max-width: 380px;
  transition: none;
}

.quit-end:active {
  transform: translate(4px, 4px);
  box-shadow: 2px 2px 0 rgba(255, 255, 255, .3);
}

.flash {
  position: absolute;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .06s;
}

.flash-label {
  font-family: 'Archivo Black', sans-serif;
  font-size: clamp(70px, 16vw, 130px);
  color: #fff;
  -webkit-text-stroke: 8px var(--ink);
  letter-spacing: -2px;
  text-align: center;
}

/* ══════════════════════════════════════
   PORTRAIT OVERLAY
══════════════════════════════════════ */
#portrait-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--ink);
  z-index: 200;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  text-align: center;
  padding: 32px;
}

#portrait-overlay.show {
  display: flex;
}

.rot-phone {
  width: 58px;
  height: 88px;
  border: 6px solid #fff;
  border-radius: 8px;
  animation: rock 1.8s ease-in-out infinite;
}

@keyframes rock {

  0%,
  100% {
    transform: rotate(-20deg);
  }

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

.rot-heading {
  font-family: 'Archivo Black', sans-serif;
  font-size: 32px;
  color: #fff;
  letter-spacing: -1px;
}

.rot-sub {
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 1px;
  color: rgba(255, 255, 255, .55);
}

/* ══════════════════════════════════════
   RESULTS
══════════════════════════════════════ */
#results-screen {
  background: var(--purple);
  padding: max(28px, env(safe-area-inset-top)) 24px max(20px, env(safe-area-inset-bottom));
  overflow-y: auto;
}

.score-banners {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: 20px;
  flex-shrink: 0;
}

.score-banner {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  background: var(--correct);
  border: 5px solid var(--ink);
  box-shadow: 8px 8px 0 var(--ink);
  padding: 16px 22px;
  flex-shrink: 0;
}

.score-passed-banner {
  display: none;
  align-items: flex-end;
  justify-content: space-between;
  background: var(--pass);
  border: 5px solid var(--ink);
  box-shadow: 8px 8px 0 var(--ink);
  padding: 16px 22px;
  flex-shrink: 0;
}

.score-passed-num {
  font-family: 'Archivo Black', sans-serif;
  font-size: 94px;
  line-height: .78;
  color: #fff;
}

.score-passed-lbl {
  font-family: 'Archivo Black', sans-serif;
  font-size: 28px;
  color: #fff;
  padding-bottom: 8px;
}

.score-you-got {
  font-weight: 900;
  font-size: 14px;
  letter-spacing: 3px;
  color: var(--ink);
  margin-bottom: 10px;
}

.score-number {
  font-family: 'Archivo Black', sans-serif;
  font-size: 94px;
  line-height: .78;
  color: var(--ink);
}

.score-right {
  font-family: 'Archivo Black', sans-serif;
  font-size: 28px;
  color: var(--ink);
  padding-bottom: 8px;
}

.res-cols {
  display: flex;
  gap: 12px;
  flex: 1;
  min-height: 0;
  margin-bottom: 18px;
}

.res-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.res-col-lbl {
  font-weight: 900;
  font-size: 13px;
  letter-spacing: 2px;
  color: #fff;
  margin-bottom: 8px;
  flex-shrink: 0;
}

.res-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.chip-correct {
  background: var(--correct);
  border: 3px solid var(--ink);
  padding: 8px 10px;
  font-weight: 900;
  font-size: 13px;
  color: var(--ink);
  letter-spacing: .5px;
}

.chip-pass {
  background: var(--pass);
  border: 3px solid var(--ink);
  padding: 8px 10px;
  font-weight: 900;
  font-size: 13px;
  color: #fff;
  letter-spacing: .5px;
}

.results-btns {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex-shrink: 0;
}

.btn-play-again {
  background: #FFD400;
  color: var(--ink);
  font-family: 'Archivo Black', sans-serif;
  font-size: 32px;
  text-align: center;
  padding: 20px;
  border: 5px solid var(--ink);
  box-shadow: 8px 8px 0 var(--ink);
  cursor: pointer;
  transition: none;
}

.btn-play-again:active {
  transform: translate(4px, 4px);
  box-shadow: 2px 2px 0 var(--ink);
}

.btn-secondary {
  background: rgba(255, 255, 255, .12);
  color: #fff;
  font-family: 'Archivo Black', sans-serif;
  font-size: 20px;
  text-align: center;
  padding: 16px;
  border: 3px solid rgba(255, 255, 255, .3);
  cursor: pointer;
  transition: none;
}

.btn-secondary:active {
  opacity: .65;
}

.ready-bg-icon {
  position: absolute;
  right: -24px;
  bottom: -24px;
  font-size: 320px;
  line-height: 1;
  color: var(--ink);
  opacity: .1;
  pointer-events: none;
  z-index: 0;
}

@media (orientation: landscape) {
  .res-col-lbl {
    display: none;
  }

  .res-list {
    display: none;
  }

  .score-banners {
    flex-direction: row;
    gap: 12px;
    margin-bottom: 12px;
  }

  .score-banner,
  .score-passed-banner {
    flex: 1;
    padding: 10px 16px;
    box-shadow: 4px 4px 0 var(--ink);
  }

  .score-passed-banner {
    display: flex;
  }

  .score-number,
  .score-passed-num {
    font-size: 52px;
  }

  .score-you-got {
    font-size: 11px;
    margin-bottom: 4px;
  }

  .score-right,
  .score-passed-lbl {
    font-size: 20px;
  }

  .forehead-glyph {
    display: none;
  }

  .ready-center {
    gap: 14px;
  }

  .ready-heading {
    font-size: clamp(20px, 4vw, 28px);
  }

  .motion-btn {
    padding: 14px 40px;
    font-size: clamp(18px, 4vw, 24px);
  }

  .sideways-chip {
    display: none;
  }
}

/* ══════════════════════════════════════
   GG! WORDMARK — TANOA ACCENT
══════════════════════════════════════ */
.wordmark-bowl {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.wordmark-bowl i {
  font-size: 17px;
  line-height: 1;
}

/* ══════════════════════════════════════
   IMPOSTER SETUP — PLAYER NAME INPUT
══════════════════════════════════════ */
.imp-player-section {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
}

.imp-add-row {
  display: flex;
  gap: 10px;
  align-items: stretch;
  flex-shrink: 0;
}

.imp-name-input {
  flex: 1;
  background: #fff;
  border: 5px solid #fff;
  font-family: 'Archivo', sans-serif;
  font-weight: 900;
  font-size: 16px;
  letter-spacing: 1px;
  padding: 14px 16px;
  color: var(--ink);
  outline: none;
  -webkit-appearance: none;
  border-radius: 0;
  text-transform: uppercase;
  min-width: 0;
}

.imp-name-input::placeholder {
  color: rgba(0, 0, 0, .3);
  font-weight: 700;
  text-transform: uppercase;
}

.imp-add-btn {
  background: #FFD400;
  color: var(--ink);
  font-family: 'Archivo Black', sans-serif;
  font-size: 15px;
  letter-spacing: 1px;
  padding: 0 18px;
  border: 5px solid rgba(255, 255, 255, .4);
  box-shadow: 4px 4px 0 rgba(255, 255, 255, .2);
  cursor: pointer;
  white-space: nowrap;
  transition: none;
  flex-shrink: 0;
}

.imp-add-btn:active {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 rgba(255, 255, 255, .2);
}

.imp-player-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  flex: 1;
  min-height: 0;
}

.imp-player-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, .1);
  border: 3px solid rgba(255, 255, 255, .25);
  padding: 12px 16px;
  flex-shrink: 0;
}

.imp-player-name-text {
  font-family: 'Archivo Black', sans-serif;
  font-size: 18px;
  color: #fff;
  letter-spacing: .5px;
}

.imp-player-remove {
  background: none;
  border: none;
  color: rgba(255, 255, 255, .4);
  font-size: 18px;
  cursor: pointer;
  padding: 2px 6px;
  line-height: 1;
  font-family: 'Archivo Black', sans-serif;
  transition: color .15s;
}

.imp-player-remove:active {
  color: var(--pass);
}

.imp-player-hint {
  font-weight: 900;
  font-size: 11px;
  letter-spacing: 3px;
  color: rgba(255, 255, 255, .35);
  text-align: center;
  flex-shrink: 0;
}

.imp-start-btn:disabled {
  opacity: .35;
  cursor: default;
  pointer-events: none;
}

/* ══════════════════════════════════════
   DEAL SCREEN — PLAYER NAME HEADER
══════════════════════════════════════ */
.deal-player-name {
  font-family: 'Archivo Black', sans-serif;
  font-size: clamp(22px, 6vw, 34px);
  color: #fff;
  letter-spacing: -1px;
  line-height: 1;
}

/* ══════════════════════════════════════
   TRIVIA — MENU TILE
══════════════════════════════════════ */
.menu-tile-trivia {
  background: #1A6B3C;
  border-color: #fff;
  box-shadow: 8px 8px 0 rgba(255, 255, 255, .25);
}

.menu-tile-trivia:active {
  box-shadow: 2px 2px 0 rgba(255, 255, 255, .25);
}

.menu-tile-trivia .tile-glyph,
.menu-tile-trivia .tile-name,
.menu-tile-trivia .tile-sub {
  color: #fff;
}

.menu-tile-trivia .tile-sub {
  opacity: .6;
}

/* ══════════════════════════════════════
   TRIVIA PLAY SCREEN
══════════════════════════════════════ */
#triv-play-screen {
  background: var(--cream);
  flex-direction: column;
  align-items: stretch;
  overflow: hidden;
}

.triv-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 20px 24px 16px;
  gap: 20px;
  overflow: hidden;
}

.triv-q-label {
  font-weight: 900;
  font-size: 11px;
  letter-spacing: 3px;
  color: rgba(0, 0, 0, .4);
  margin-bottom: 8px;
}

.triv-question {
  font-family: 'Archivo Black', sans-serif;
  font-size: clamp(17px, 4.5vw, 26px);
  line-height: 1.15;
  color: var(--ink);
  letter-spacing: -.3px;
}

.triv-a-box {
  position: relative;
  background: #fff;
  border: 5px solid var(--ink);
  box-shadow: 6px 6px 0 var(--ink);
  padding: 14px 18px;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}

.triv-answer {
  font-family: 'Archivo Black', sans-serif;
  font-size: clamp(20px, 5.5vw, 32px);
  line-height: 1.05;
  color: var(--ink);
  letter-spacing: -.5px;
}

.triv-a-cover {
  position: absolute;
  inset: 0;
  background: var(--ink);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: 'Archivo Black', sans-serif;
  font-size: 14px;
  letter-spacing: 1.5px;
  opacity: 1;
  transition: opacity .1s linear;
}

.triv-a-cover i { font-size: 20px; }

.triv-a-box.revealed .triv-a-cover {
  opacity: 0;
  pointer-events: none;
}

.triv-zone-next {
  display: flex;
  height: 100px;
  flex-shrink: 0;
  border-top: 5px solid var(--ink);
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  background: var(--ink);
  color: #fff;
  font-family: 'Archivo Black', sans-serif;
  font-size: 18px;
  letter-spacing: 1px;
  -webkit-tap-highlight-color: transparent;
}

.triv-zone-next:active { opacity: .7; }

.triv-zone-next i { font-size: 26px; }

#triv-quit-modal {
  display: none;
  position: absolute;
  inset: 0;
  background: var(--ink);
  z-index: 50;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 32px;
}

#triv-quit-modal.show { display: flex; }

/* ══════════════════════════════════════
   TRIVIA SETUP  (topic picker)
══════════════════════════════════════ */
#triv-setup-screen {
  background: var(--purple);
  padding: max(30px, env(safe-area-inset-top)) 26px max(26px, env(safe-area-inset-bottom));
  overflow: hidden;
}

.triv-topic-lead {
  font-weight: 900;
  font-size: 11px;
  letter-spacing: 3px;
  color: rgba(255, 255, 255, .55);
  flex-shrink: 0;
}

.triv-topic-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  flex: 1;
  min-height: 0;
  padding: 2px 6px 6px 2px;
  /* room for the selected rows' hard shadow */
}

.triv-topic-row {
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(255, 255, 255, .1);
  border: 3px solid rgba(255, 255, 255, .25);
  padding: 12px 16px;
  flex-shrink: 0;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.triv-topic-row.selected {
  background: var(--topic-color);
  border-color: var(--ink);
  box-shadow: 4px 4px 0 var(--ink);
}

.triv-topic-row:active {
  transform: translate(2px, 2px);
}

.triv-topic-row.selected:active {
  box-shadow: 2px 2px 0 var(--ink);
}

.triv-topic-check {
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  border: 3px solid rgba(255, 255, 255, .35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--ink);
}

.triv-topic-row.selected .triv-topic-check {
  background: #fff;
  border-color: var(--ink);
}

.triv-topic-check i {
  opacity: 0;
}

.triv-topic-row.selected .triv-topic-check i {
  opacity: 1;
}

.triv-topic-text {
  min-width: 0;
}

.triv-topic-name {
  font-family: 'Archivo Black', sans-serif;
  font-size: 18px;
  color: rgba(255, 255, 255, .55);
  letter-spacing: .5px;
}

.triv-topic-count {
  font-weight: 800;
  font-size: 11px;
  letter-spacing: 2px;
  color: rgba(255, 255, 255, .35);
  margin-top: 2px;
}

.triv-topic-row.selected .triv-topic-name { color: #fff; }

.triv-topic-row.selected .triv-topic-count { color: rgba(255, 255, 255, .75); }
