/* ------------------------------------------------------------------
   Imposter Game
   Pass-the-phone secret word game: setup → reveal each role → discuss
   → reveal the imposter.
------------------------------------------------------------------ */

.imposter-page {
  --imp-bg: #111315;
  --imp-text: #f1f7ee;
  --imp-accent: #ff2959;
  --imp-accent-hover: #e32751;
  --imp-card-bg: #f1f7ee;
  --imp-card-text: #1b2a31;
  --imp-line: rgba(241, 247, 238, 0.14);
  --imp-chip: rgba(241, 247, 238, 0.08);
}

.imp-stage {
  width: 100%;
  min-height: calc(100vh - 64px);
  padding: 32px 16px 56px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--imp-bg);
  color: var(--imp-text);
}

.imp-screen {
  width: 100%;
  max-width: 520px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
}
.imp-screen[hidden] { display: none; }

.imp-title {
  font-family: 'Crete Round', serif;
  font-weight: 400;
  font-size: clamp(28px, 6vw, 40px);
  margin: 0;
  text-align: center;
}
.imp-sub {
  margin: -10px 0 0;
  font-size: 15px;
  opacity: 0.75;
  text-align: center;
}

/* --- Setup ------------------------------------------------------ */

.imp-field {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--imp-line);
}
.imp-field-label { font-weight: 600; }
.imp-field-label small { display: block; font-weight: 400; opacity: 0.65; font-size: 13px; }

.imp-stepper { display: flex; align-items: center; gap: 12px; }
.imp-stepper button {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid var(--imp-line);
  background: var(--imp-chip);
  color: var(--imp-text);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.imp-stepper button:disabled { opacity: 0.3; cursor: default; }
.imp-stepper output {
  min-width: 2ch;
  text-align: center;
  font-family: 'Crete Round', serif;
  font-size: 26px;
}

.imp-switch { position: relative; width: 52px; height: 30px; flex-shrink: 0; }
.imp-switch input { position: absolute; inset: 0; opacity: 0; cursor: pointer; margin: 0; }
.imp-switch span {
  position: absolute; inset: 0;
  border-radius: 999px;
  background: var(--imp-chip);
  border: 1px solid var(--imp-line);
  transition: background 0.2s ease;
  pointer-events: none;
}
.imp-switch span::after {
  content: "";
  position: absolute; top: 3px; left: 3px;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--imp-text);
  transition: transform 0.2s ease;
}
.imp-switch input:checked + span { background: var(--imp-accent); border-color: var(--imp-accent); }
.imp-switch input:checked + span::after { transform: translateX(22px); }
.imp-switch input:focus-visible + span { outline: 2px solid var(--imp-text); outline-offset: 2px; }

.imp-cats-label { width: 100%; font-weight: 600; margin-top: 4px; }
.imp-cats {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: -10px;
}
.imp-chip {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--imp-line);
  background: var(--imp-chip);
  color: var(--imp-text);
  font: 500 14px 'Inter', sans-serif;
  cursor: pointer;
}
.imp-chip[aria-pressed="true"] {
  background: var(--imp-accent);
  border-color: var(--imp-accent);
  color: #fff;
}

/* --- Reveal card ------------------------------------------------ */

.imp-card {
  width: 100%;
  min-height: 300px;
  border-radius: 24px;
  padding: 36px 28px;
  background: var(--imp-card-bg);
  color: var(--imp-card-text);
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.45);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  text-align: center;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  transition: transform 0.15s ease;
}
.imp-card:active { transform: scale(0.99); }
.imp-card.is-cover {
  background: repeating-linear-gradient(45deg, #1d2023 0 14px, #1a1c1f 14px 28px);
  color: var(--imp-text);
  border: 1px solid var(--imp-line);
}
.imp-card.is-imposter { background: var(--imp-accent); color: #fff; }

.imp-card-eyebrow {
  font: 700 12px 'Inter', sans-serif;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.7;
}
.imp-card-main {
  font-family: 'Crete Round', serif;
  font-size: clamp(30px, 8vw, 46px);
  line-height: 1.15;
  margin: 0;
  overflow-wrap: anywhere;
}
.imp-card-main, .imp-card-note { color: inherit; }
.imp-card-note { margin: 0; font-size: 15px; opacity: 0.8; max-width: 32ch; }

.imp-progress { font-size: 14px; opacity: 0.65; margin: 0; }

/* --- Buttons ---------------------------------------------------- */

.imp-btn {
  background: var(--imp-accent);
  color: #fff;
  font-family: 'Crete Round', serif;
  font-size: 22px;
  padding: 16px 40px;
  border: 0;
  border-radius: 10px;
  cursor: pointer;
  box-shadow: 0 8px 24px -10px rgba(255, 41, 89, 0.6);
  transition: background 0.2s ease, transform 0.1s ease;
}
.imp-btn:hover { background: var(--imp-accent-hover); }
.imp-btn:active { transform: translateY(1px); }
.imp-btn-ghost {
  background: transparent;
  border: 1px solid var(--imp-line);
  box-shadow: none;
  font-size: 18px;
  padding: 12px 28px;
}
.imp-btn-ghost:hover { background: var(--imp-chip); }
.imp-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }

/* --- Rules + word list ------------------------------------------ */

.imp-rules {
  background: var(--imp-bg);
  color: var(--imp-text);
  padding: 48px 0 32px;
  border-top: 1px solid var(--imp-line);
  font-family: 'Crete Round', serif;
}
.imp-rules .game-h1 {
  font-family: 'Crete Round', serif;
  font-weight: 400;
  font-size: 46px;
  text-align: center;
  margin: 0 0 4px;
}
.imp-rules h2 {
  font-family: 'Crete Round', serif;
  font-weight: 400;
  font-size: 30px;
  text-align: center;
  opacity: 0.85;
  margin: 0 0 24px;
}
.imp-rules .prose { max-width: 62ch; margin: 0 auto; opacity: 0.92; line-height: 1.6; }
.imp-rules .prose p { color: inherit; }
