/* Screen-specific styles, in the order screens appear in a game. */

/* ---------- Region picker ---------- */
.region { display: flex; flex-direction: column; align-items: center; gap: 10px; width: 100%; }
.region-label { font-size: 16px; color: var(--cyan); }
.region-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.region-chip {
  font: inherit;
  font-weight: 900;
  font-size: 16px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 6px 14px;
  border: 3px solid var(--ink);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.85);
  color: var(--ink);
  box-shadow: 0 4px 0 var(--ink);
  cursor: pointer;
  touch-action: manipulation;
  transition: transform 0.2s var(--bounce), background 0.2s, box-shadow 0.2s;
}
.region-chip .flag { font-size: 20px; line-height: 1; }
.region-chip.on { background: var(--yellow); transform: rotate(-3deg) scale(1.08); box-shadow: 0 5px 0 var(--pink); }
.region-chip:focus-visible { outline: 4px solid var(--cyan); outline-offset: 3px; }

/* ---------- Count stepper ---------- */
.stepper { display: flex; align-items: center; gap: 22px; }
.count-num {
  font-family: var(--display);
  font-size: clamp(90px, 28vw, 140px);
  line-height: 1;
  min-width: 1.4em;
  color: var(--yellow);
  -webkit-text-stroke: 4px var(--ink);
  paint-order: stroke fill;
  text-shadow: 0 8px 0 var(--ink), 0 14px 0 var(--pink);
}
.faces { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; max-width: 340px; min-height: 40px; }
.face {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 3px solid var(--ink);
  background: hsl(var(--h) 90% 62%);
  box-shadow: 0 3px 0 var(--ink);
  display: inline-block;
  animation: popIn 0.4s var(--bounce) backwards, bob 2.4s ease-in-out infinite; animation-delay: calc(var(--i) * 40ms), calc(var(--i) * 150ms); }

.bump { animation: bump 0.45s var(--bounce); }
@keyframes bump {
  0% { transform: scale(1); }
  35% { transform: scale(1.45) rotate(-8deg); }
  100% { transform: scale(1); }
}

/* ---------- Statement round ---------- */
.chips { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.chip {
  font-family: var(--display);
  font-size: 16px;
  background: var(--pink);
  color: #fff;
  border: 3px solid var(--ink);
  border-radius: 999px;
  padding: 6px 16px;
  box-shadow: 0 4px 0 var(--ink);
  transform: rotate(-3deg);
  display: inline-block;
}
.chip-alt { background: var(--cyan); color: var(--ink); transform: rotate(3deg); }
.chip-cat { background: var(--yellow); color: var(--ink); transform: rotate(-1deg); }
.spotlight {
  background: var(--yellow);
  color: var(--ink);
  border: 4px solid var(--ink);
  border-radius: 18px;
  padding: 12px 22px;
  font-size: clamp(18px, 5vw, 22px);
  box-shadow: 0 6px 0 var(--ink);
  transform: rotate(-1.5deg);
}
.spotlight b { color: var(--pink); }
.order {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}
.order-item {
  display: flex;
  align-items: center;
  gap: 6px;
  background: hsl(var(--h) 90% 66%);
  color: var(--ink);
  border: 3px solid var(--ink);
  border-radius: 999px;
  padding: 4px 14px 4px 4px;
  font-size: 16px;
  box-shadow: 0 3px 0 var(--ink);
}
.order-num {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 13px;
}

/* ---------- Voting ---------- */
/* A grid of players to pick from (two across even on a phone). The picked player turns
   pink with a yellow ring; everyone else fades back a little. */
.vote-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}
.vote-pick {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-width: 0;
  padding: 10px 8px;
  font: inherit;
  font-weight: 900;
  color: var(--ink);
  text-align: center;
  container-type: inline-size;
  background: var(--paper);
  border: 4px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: 0 6px 0 var(--ink);
  cursor: pointer;
  touch-action: manipulation;
  transition: transform 0.2s var(--bounce), background 0.2s, color 0.2s, box-shadow 0.2s, opacity 0.2s;
}
/* Long names shrink to fit on one line instead of breaking mid-word. */
.vote-pick .pname {
  max-width: 100%;
  font-size: clamp(12px, calc(150cqi / max(9, var(--len, 9))), 17px);
  line-height: 1.2;
  overflow-wrap: break-word;
}
.vote-pick .badge { width: 40px; height: 40px; font-size: 18px; }
@media (hover: hover) {
  .vote-pick:hover { transform: translateY(-2px) rotate(-1deg); }
}
.vote-pick:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--ink); }
.vote-pick:focus-visible { outline: 4px solid var(--cyan); outline-offset: 3px; }
.vote-pick.on {
  background: var(--pink);
  color: #fff;
  transform: scale(1.04) rotate(-1.5deg);
  box-shadow: 0 6px 0 var(--ink), 0 0 0 4px var(--yellow);
}
.vote-pick.on .badge { background: #fff; }
/* Bounce when picked. The selector is specific enough to override the cards' pop-in
   animation (including the mirrored one on even cards), and it ends exactly on the
   picked tilt so there's no snap afterwards. */
.vote-grid .vote-pick.on.just-picked { animation: pickPop 0.45s var(--bounce); }
@keyframes pickPop {
  0% { transform: scale(1) rotate(0); }
  45% { transform: scale(1.14) rotate(-5deg); }
  100% { transform: scale(1.04) rotate(-1.5deg); }
}
.vote-grid:has(.vote-pick.on) .vote-pick:not(.on) { opacity: 0.6; }

/* ---------- Reveal ---------- */
.big-name {
  font-family: var(--display);
  font-size: clamp(42px, 13vw, 80px);
  line-height: 1.05;
  color: hsl(var(--h) 95% 70%);
  -webkit-text-stroke: 3px var(--ink);
  paint-order: stroke fill;
  text-shadow: 0 6px 0 var(--ink);
  overflow-wrap: anywhere;
  max-width: 100%;
}
.suspense { display: flex; gap: 14px; padding: 18px 0; }
.suspense span {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--yellow);
  border: 3px solid var(--ink);
  animation: dots 0.6s ease-in-out infinite alternate;
}
.suspense span:nth-child(2) { animation-delay: 0.2s; background: var(--pink); }
.suspense span:nth-child(3) { animation-delay: 0.4s; background: var(--cyan); }
@keyframes dots { to { transform: translateY(-18px) scale(1.2); } }
.verdict-wrap { display: flex; flex-direction: column; align-items: center; gap: 18px; }
.verdict-wrap[hidden], .suspense[hidden] { display: none; }
.verdict {
  font-family: var(--display);
  font-size: clamp(30px, 9vw, 52px);
  line-height: 1.1;
  padding: 12px 24px;
  border: 5px solid var(--ink);
  border-radius: 20px;
  box-shadow: 0 8px 0 var(--ink);
  transform: rotate(-3deg);
}
.verdict.good { background: var(--green); color: var(--ink); }
.verdict.bad { background: var(--pink); color: #fff; -webkit-text-stroke: 2px var(--ink); paint-order: stroke fill; }
.slam-in .verdict { animation: slam 0.6s var(--bounce) backwards; }
.slam-in > :not(.verdict) { animation: popIn 0.5s var(--bounce) backwards; animation-delay: 0.45s; }
.slam-in > button { animation-delay: 0.7s; }
@keyframes slam {
  0% { transform: scale(4) rotate(-20deg); opacity: 0; }
  55% { transform: scale(0.85) rotate(-1deg); opacity: 1; }
  100% { transform: rotate(-3deg); }
}

/* ---------- Game over ---------- */
.gameover.imp .logo { text-shadow: 0 6px 0 var(--ink), 0 12px 0 var(--purple); }
.words-reveal { display: flex; align-items: center; gap: 10px; width: 100%; justify-content: center; }
.word-card {
  flex: 1 1 0;
  min-width: 0;
  container-type: inline-size;
  border: 4px solid var(--ink);
  border-radius: 18px;
  box-shadow: 0 6px 0 var(--ink);
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: var(--ink);
}
.crew-card { background: var(--cyan); transform: rotate(-3deg); }
.imp-card { background: var(--pink); color: #fff; transform: rotate(3deg); }
.wc-label { font-size: 13px; text-transform: uppercase; letter-spacing: 0.08em; overflow-wrap: anywhere; }
.wc-word {
  font-family: var(--display);
  /* Sized from the card's width and the longest word, so long words shrink to one line instead of breaking. */
  font-size: clamp(16px, calc(105cqi / max(7, var(--len, 7))), 40px);
  overflow-wrap: break-word;
}
.vs { font-family: var(--display); font-size: 24px; color: var(--yellow); text-shadow: 0 3px 0 var(--ink); flex: none; }

