/* ------------------------------------------------------------------
   15 Words or Less
   Clue-giver gets a list of targets and a shared budget of spoken
   words. Setup → play (word counter + target list) → result.
------------------------------------------------------------------ */

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

.fw-stage {
  width: 100%;
  min-height: calc(100vh - 64px);
  padding: 28px 16px 48px;
  display: flex;
  justify-content: center;
  align-items: center;
  background: var(--fw-bg);
  color: var(--fw-text);
}
.fw-screen {
  width: 100%;
  max-width: 520px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}
.fw-screen[hidden] { display: none; }

/* While playing, the screen fills the stage so the dock rests at the bottom. */
.fw-stage.is-playing { align-items: stretch; padding-bottom: 0; }

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

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

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

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

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

/* --- Play ------------------------------------------------------- */

/* Counter + meter + buttons, stuck to the bottom edge so the +1 button
   stays under the thumb however long the list is. */
.fw-dock {
  position: sticky;
  bottom: 0;
  z-index: 2;
  width: calc(100% + 32px);
  margin: auto -16px 0;      /* pushed to the bottom of the stretched play screen */
  padding: 14px 16px calc(16px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--fw-bg);
  border-top: 1px solid var(--fw-line);
  box-shadow: 0 -16px 32px -16px rgba(0, 0, 0, 0.35);
}

.fw-counter {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.fw-left { text-align: left; }
.fw-left-num {
  display: block;
  font-family: 'Crete Round', serif;
  font-size: clamp(52px, 14vw, 72px);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.fw-left-num.is-low { color: var(--fw-gold); }
.fw-left-num.is-out { color: var(--fw-accent); }
.fw-left-label { font-size: 13px; opacity: 0.7; letter-spacing: 0.08em; text-transform: uppercase; }

.fw-count-btns { display: flex; gap: 10px; align-items: center; }
.fw-say {
  width: 108px; height: 108px;
  border-radius: 50%;
  border: 0;
  background: var(--fw-accent);
  color: #fff;
  font-family: 'Crete Round', serif;
  font-size: 22px;
  line-height: 1.1;
  cursor: pointer;
  box-shadow: 0 10px 28px -10px rgba(255, 41, 89, 0.7);
  transition: transform 0.08s ease, background 0.2s ease;
  touch-action: manipulation;
}
.fw-say:hover { background: var(--fw-accent-hover); }
.fw-say:active { transform: scale(0.95); }
.fw-say:disabled { opacity: 0.35; cursor: default; transform: none; }
.fw-undo {
  width: 48px; height: 48px;
  border-radius: 50%;
  border: 1px solid var(--fw-line);
  background: var(--fw-chip);
  color: var(--fw-text);
  font-size: 22px;
  cursor: pointer;
}
.fw-undo:disabled { opacity: 0.3; cursor: default; }

.fw-meter { width: 100%; display: flex; gap: 3px; }
.fw-meter span { flex: 1; height: 6px; border-radius: 3px; background: var(--fw-line); transition: background 0.15s ease; }
.fw-meter span.is-used { background: var(--fw-accent); }

.fw-list {
  width: 100%;
  margin: 0;
  padding: 8px;
  list-style: none;
  background: var(--fw-card-bg);
  color: var(--fw-card-text);
  border-radius: 20px;
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.45);
}
.fw-list li + li { border-top: 1px solid rgba(27, 42, 49, 0.08); }
.fw-target {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 12px;
  border: 0;
  background: none;
  color: inherit;
  text-align: left;
  font-family: 'Crete Round', serif;
  font-size: clamp(20px, 5vw, 26px);
  cursor: pointer;
  border-radius: 12px;
}
.fw-target:hover { background: rgba(27, 42, 49, 0.04); }
.fw-check {
  flex-shrink: 0;
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 2px solid rgba(27, 42, 49, 0.25);
  display: grid;
  place-items: center;
  font: 700 16px 'Inter', sans-serif;
  color: transparent;
}
.fw-target[aria-pressed="true"] { opacity: 0.55; }
.fw-target[aria-pressed="true"] .fw-word { text-decoration: line-through; }
.fw-target[aria-pressed="true"] .fw-check { background: #3a9e62; border-color: #3a9e62; color: #fff; }

.fw-hint { margin: 0; font-size: 14px; opacity: 0.7; text-align: center; color: inherit; }

/* --- Result ----------------------------------------------------- */

.fw-result {
  width: 100%;
  border-radius: 24px;
  padding: 36px 28px;
  background: var(--fw-card-bg);
  color: var(--fw-card-text);
  text-align: center;
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.45);
}
.fw-result-eyebrow { font: 700 12px 'Inter', sans-serif; letter-spacing: 0.14em; text-transform: uppercase; opacity: 0.6; }
.fw-result-score { margin: 8px 0; font-family: 'Crete Round', serif; font-size: clamp(44px, 12vw, 64px); line-height: 1; color: inherit; }
.fw-result-note { margin: 0; font-size: 15px; opacity: 0.8; color: inherit; }
.fw-result-missed { margin: 14px 0 0; font-size: 15px; color: inherit; }

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

.fw-btn {
  background: var(--fw-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;
}
.fw-btn:hover { background: var(--fw-accent-hover); }
.fw-btn:active { transform: translateY(1px); }
.fw-btn:disabled { opacity: 0.4; cursor: default; }
.fw-btn-ghost { background: transparent; border: 1px solid var(--fw-line); box-shadow: none; font-size: 18px; padding: 12px 28px; }
.fw-btn-ghost:hover { background: var(--fw-chip); }
.fw-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }

/* --- Rules ------------------------------------------------------ */

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