/*
 * ===========================================================================
 * PHASE 8G -- THE REAL-DEVICE PLAYTEST CORRECTIONS
 * ===========================================================================
 *
 * LAST in the document, after phase8f.css, so every rule here extends the
 * Event sheets by cascade order rather than by !important.
 *
 * THE PALETTE IS THE PROJECT'S OWN, AND NOTHING ELSE. The Phase 8B trap was a
 * sheet reading four tokens that did not exist; every var() here names a
 * property some sheet defines, and carries a dark-theme fallback, so a future
 * typo degrades rather than vanishes. A rule that changes a background sets
 * its own `color` -- never inherit across a surface change.
 *
 * RESPONSIVE: the phone rules are written for 320 px first and never set a
 * width that can exceed their container; the television rules scale with
 * clamp() between 1280x720 and 1920x1080.
 */

/* ---- Shared: a line that counts down in place --------------------------- */
.ev-prompt__next {
  margin: 0.6rem 0 0;
  text-align: center;
  font-size: 1.15rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--accent, #4fd1a5);
}

.host__prompt-next {
  margin: 0;
  font-size: clamp(1.4rem, 3.2vw, 2.8rem);
  font-weight: 800;
  letter-spacing: 0.06em;
  font-variant-numeric: tabular-nums;
  color: var(--accent, #4fd1a5);
}

.aev-game__auto {
  margin: 0.4rem 0;
  font-size: 0.9rem;
  color: var(--text-dim, #9fb8b2);
}

/* ---- Issue 1: Buzzer Trivia's reading period ---------------------------- */
.ev-trivia__reading {
  margin: 0.4rem 0;
  text-align: center;
  font-size: 1.4rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--warn, #f2c14e);
}

.ev-buzz--reading {
  background: var(--bg-elev-2, #16302c);
  color: var(--text-dim, #9fb8b2);
}

.host__buzz--reading {
  font-size: clamp(1.6rem, 4vw, 3.2rem);
  font-variant-numeric: tabular-nums;
  color: var(--warn, #f2c14e);
}

/* ---- Issue 2: Higher / Lower, the question in words ---------------------- */
.ev-hl__question {
  margin: 0.6rem 0 0.2rem;
  text-align: center;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.35;
  overflow-wrap: anywhere;
  color: var(--text, #eaf3f0);
}

/* "HIGHER than 21" may wrap on a 320 px phone; the button grows rather than overflows. */
.ev-hl__choice {
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.2;
}

.host__hl-question {
  margin: 0;
  max-width: min(100%, 80rem);
  font-size: clamp(1.5rem, 3.4vw, 3rem);
  font-weight: 700;
  line-height: 1.25;
  overflow-wrap: anywhere;
  color: var(--text, #eaf3f0);
}

.host__hl-decide {
  display: flex;
  justify-content: center;
  gap: clamp(2rem, 8vw, 8rem);
}

.host__hl-word {
  font-size: clamp(2.2rem, 6vw, 5.5rem);
  font-weight: 800;
  letter-spacing: 0.06em;
}

.host__hl-word--higher { color: var(--accent, #4fd1a5); }
.host__hl-word--lower { color: var(--ev-score-text, #8cc8ff); }

/* ---- Issue 5: Don't Press It's explicit words and state ------------------ */
.ev-press__detail {
  margin: 0;
  text-align: center;
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text, #eaf3f0);
}

.ev-press__status {
  margin: 0;
  text-align: center;
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--accent, #4fd1a5);
}

.ev-press__verdict {
  font-size: 1.3rem;
  font-weight: 800;
  text-align: center;
}

/* The pad keeps its size whatever it says: a label change must never move the target. */
.ev-press__pad {
  white-space: normal;
  line-height: 1.1;
}

.ev-press__pad[data-phase="stop"] {
  background: var(--bg-elev, #10241f);
  color: var(--danger, #f2706b);
  border-color: var(--danger, #f2706b);
}

.host__press-detail {
  margin: 0;
  max-width: min(100%, 70rem);
  font-size: clamp(1.4rem, 3vw, 2.6rem);
  color: var(--text-dim, #9fb8b2);
}

/* ---- Issue 8: Mystery Zoom's schedule ------------------------------------ */
.ev-zoom__next {
  margin: 0.2rem 0;
  text-align: center;
  font-size: 1rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--warn, #f2c14e);
}

/* ---- Issue 9: Password's rules on the television ------------------------ */
.host__rules {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  width: min(100%, 72rem);
  text-align: center;
  color: var(--text, #eaf3f0);
}

.host__rules-title {
  margin: 0;
  font-size: clamp(2.4rem, 6vw, 5rem);
  letter-spacing: 0.08em;
}

.host__rules-line {
  margin: 0;
  font-size: clamp(1.3rem, 2.8vw, 2.4rem);
  font-weight: 700;
  line-height: 1.25;
}

.host__rules-line--dont { color: var(--danger, #f2706b); }

.host__rules-dont {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: clamp(1.2rem, 2.5vw, 2.1rem);
  line-height: 1.35;
  color: var(--text-dim, #9fb8b2);
}

.host__rules-first {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.2rem 2rem;
  margin-top: 0.8rem;
  padding: 1rem 1.5rem;
  border-radius: var(--radius, 14px);
  background: var(--bg-elev, #10241f);
  color: var(--text, #eaf3f0);
  border: 2px solid var(--accent, #4fd1a5);
}

.host__rules-first-label {
  margin: 0;
  font-size: clamp(0.9rem, 1.6vw, 1.3rem);
  letter-spacing: 0.12em;
  color: var(--text-dim, #9fb8b2);
}

.host__rules-first-name {
  margin: 0;
  font-size: clamp(1.6rem, 3.4vw, 3rem);
  font-weight: 800;
  overflow-wrap: anywhere;
}

/* ---- Issue 7: Team Stop the Clock's round scoreboard --------------------- */
.host__scoreboard {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.6rem;
  width: min(100%, 76rem);
  color: var(--text, #eaf3f0);
}

.host__scoreboard-round {
  margin: 0;
  text-align: center;
  font-size: clamp(1rem, 2vw, 1.6rem);
  letter-spacing: 0.14em;
  color: var(--text-dim, #9fb8b2);
}

.host__scoreboard-target {
  margin: 0;
  text-align: center;
  font-size: clamp(2rem, 5vw, 4.2rem);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.host__scoreboard-teams {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.host__scoreboard-team {
  padding: 0.7rem 1.2rem;
  border-radius: var(--radius, 14px);
  background: var(--bg-elev, #10241f);
  color: var(--text, #eaf3f0);
  border: 2px solid var(--line, #22413c);
  min-width: 0;
}

.host__scoreboard-team--won {
  border-color: var(--accent, #4fd1a5);
  background: var(--bg-elev-2, #16302c);
  color: var(--text, #eaf3f0);
}

.host__scoreboard-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 1rem;
  font-size: clamp(1.4rem, 3vw, 2.6rem);
}

.host__scoreboard-place { font-weight: 800; color: var(--accent, #4fd1a5); }
.host__scoreboard-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; }
.host__scoreboard-error { font-variant-numeric: tabular-nums; }

.host__scoreboard-won {
  margin: 0.1rem 0 0;
  font-size: clamp(0.9rem, 1.6vw, 1.3rem);
  font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--accent, #4fd1a5);
}

/* Compact and secondary: the team line is the headline, the members are detail. */
.host__scoreboard-members {
  margin: 0.3rem 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem 1.4rem;
  font-size: clamp(0.85rem, 1.5vw, 1.25rem);
  color: var(--text-dim, #9fb8b2);
}

.host__scoreboard-member { overflow-wrap: anywhere; }
.host__scoreboard-member--penalty { color: var(--warn, #f2c14e); }

.host__scoreboard-overall {
  margin: 0.4rem 0 0;
  text-align: center;
  font-size: clamp(0.9rem, 1.6vw, 1.3rem);
  letter-spacing: 0.14em;
  color: var(--text-dim, #9fb8b2);
}

.host__standing,
.ev-team__standings {
  margin: 0;
  padding: 0;
  list-style: none;
}

.host__standing-row,
.ev-team__standings-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: baseline;
  gap: 0.8rem;
  padding: 0.3rem 0;
  border-bottom: 1px solid var(--line-soft, #1a3330);
}

.host__standing-row { font-size: clamp(1.1rem, 2.2vw, 1.9rem); }
.ev-team__standings-row { font-size: 0.95rem; grid-template-columns: auto minmax(0, 1fr) auto; }
/* On a phone the four columns are three: the total error yields to the score. */
.ev-team__standings-total { display: none; }
.host__standing-row--lead .host__standing-name,
.ev-team__standings-row--lead .ev-team__standings-name { color: var(--accent, #4fd1a5); }
.ev-team__standings-row--yours { font-weight: 800; }
.host__standing-place, .ev-team__standings-place { font-weight: 800; }
.host__standing-name, .ev-team__standings-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.host__standing-total, .host__standing-score, .ev-team__standings-score { font-variant-numeric: tabular-nums; }

/* ---- Issue 10: the HWDYK author's three hours ---------------------------- */
.hwdyk-splash .sheet__title {
  font-size: 1.35rem;
  line-height: 1.25;
}

.hwdyk-splash__line {
  margin: 0 0 0.7rem;
  font-size: 1.05rem;
  line-height: 1.45;
  color: var(--text, #eaf3f0);
}

.hwdyk-ack {
  border: 2px solid var(--warn, #f2c14e);
}

.hwdyk-ack__title {
  margin: 0 0 0.6rem;
  font-size: 1.25rem;
  line-height: 1.25;
}

.hwdyk-ack__button {
  min-height: var(--tap, 44px);
  white-space: normal;
}

.hwdyk-banner {
  margin: 0 0 12px;
  padding: 12px 16px;
  border-radius: var(--radius, 14px);
  background: var(--bg-elev, #10241f);
  color: var(--text, #eaf3f0);
  border: 1px solid var(--line, #22413c);
}

.hwdyk-banner__text { margin: 0; font-size: 1.15rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.hwdyk-banner__sub { margin: 0.2rem 0 0; font-size: 0.9rem; color: var(--text-dim, #9fb8b2); }
.hwdyk-banner--warn { border-color: var(--warn, #f2c14e); }
.hwdyk-banner--urgent { border-color: var(--danger, #f2706b); border-width: 2px; }
.hwdyk-banner--urgent .hwdyk-banner__text { color: var(--danger, #f2706b); }
.hwdyk-banner--done { border-color: var(--accent, #4fd1a5); }

/* NEEDS YOUR ATTENTION: a deadline that is close says so, without a modal. */
.attention__row--warn { box-shadow: inset 4px 0 0 var(--warn, #f2c14e); }
.attention__row--urgent { box-shadow: inset 4px 0 0 var(--danger, #f2706b); }
.attention__row--urgent .attention__sub { color: var(--danger, #f2706b); font-weight: 700; }

.games-author__assignment {
  margin: 0.2rem 0 0.4rem;
  padding-left: 0.6rem;
  border-left: 3px solid var(--line, #22413c);
}
