/* 15 Words or Less: single-screen pass-and-play word game.
 * Brand system per docs/design-guidelines.md (Canva kit palette, League
 * Spartan / Trocchi / Arimo). Standalone game, so nothing is imported from
 * another game's stylesheet. Shell (header, article, modals, footer) matches
 * apps/create-a-word/style.css. */

:root {
  --gof-green-dark: #157623;
  --gof-green: #9bca3e;
  --gof-green-hover: #88b733;
  --gof-bg: #dde5ed;
  --gof-mint: #defff0;
  --gof-yellow: #ffb920;
  --gof-rust: #de6739;
  --text-primary: #2f2c28;
  --text-secondary: #5e5c5e;
  --panel-bg: #ffffff;
  --panel-border: #e3e8ee;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
  --radius: 12px;
  --radius-sm: 8px;
}

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

body {
  font-family: 'Arimo', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--text-primary);
  background: linear-gradient(180deg, var(--gof-bg) 0%, var(--gof-mint) 100%);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

#app {
  flex: 1;
  max-width: 560px;
  width: 100%;
  margin: 0 auto;
  padding: 0.75rem 0.75rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* ===== Header bar (per HEADER_SPECS) ================================== */
.header-bar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  width: 100%;
  padding: 4px 0;
  gap: 12px;
  position: relative;
  z-index: 1100;
}
.header-left { flex: 1; min-width: 0; }
.header-right { flex-shrink: 0; min-width: 52px; }
.game-title-wrap { position: relative; display: inline-block; }
.game-title-dropdown-trigger {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  user-select: none;
}
.game-title-heading {
  margin: 0;
  font-family: 'League Spartan', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
}
.game-title-chevron { font-size: 0.7rem; color: var(--text-secondary); }
.game-title-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 4px;
  min-width: 180px;
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  z-index: 100;
}
.game-title-dropdown[aria-hidden="false"] { display: block; }
.game-nav-link {
  display: block;
  padding: 10px 14px;
  font-size: 0.9rem;
  color: var(--text-primary);
  text-decoration: none;
  border-bottom: 1px solid var(--panel-border);
}
.game-nav-link:last-child { border-bottom: none; }
.game-nav-link:hover { background: var(--gof-mint); }

/* Mode row (HEADER_SPECS slot): Pass & Play or Solo. Matches create-a-word. */
.mode-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 6px; }
.mode-btn {
  display: inline-flex;
  align-items: center;
  padding: 3px 11px;
  min-height: 28px;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  background: var(--panel-bg);
  color: var(--text-secondary);
  border: 1.5px solid #d1d5db;
  border-radius: 999px;
  cursor: pointer;
}
.mode-btn:hover { border-color: var(--gof-green); }
.mode-btn:disabled { opacity: 0.45; cursor: default; }
.mode-btn[aria-pressed="true"] {
  background: var(--gof-mint);
  color: var(--gof-green-dark);
  border-color: var(--gof-green-dark);
  border-width: 2px;
  padding: 2px 10px;
}

/* ===== Game card: the video overlay ====================================
   Budgeted to fit a 375x812 phone with only the header above it: title,
   rules line, the counter button, 8 rows, one action line. */
.wol-card {
  background: var(--panel-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 10px 12px 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.wol-title {
  font-family: 'League Spartan', sans-serif;
  font-weight: 800;
  font-size: clamp(1.7rem, 7.5vw, 2.2rem);
  line-height: 1.05;
  text-align: center;
  color: var(--text-primary);
  padding-top: 0.08em;
}
.wol-rules {
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.3;
  margin-top: -2px;
}

/* Pass & Play cover: a hook that hides the list until tapped. */
.wol-cover-hero {
  padding: 26px 16px 22px;
  border-radius: var(--radius);
  background: var(--text-primary);  /* green is kept for the next action */
  text-align: center;
}
.wol-cover-head {
  font-family: 'League Spartan', sans-serif;
  font-weight: 800;
  font-size: clamp(2.2rem, 11vw, 3rem);
  line-height: 1;
  color: #fff;
  padding-top: 0.08em;
}
.wol-cover-tiles {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 18px;
}
.wol-cover-tile {
  width: 30px;
  height: 38px;
  border-radius: 6px;
  background: var(--gof-yellow);
  color: var(--text-primary);
  font-family: 'League Spartan', sans-serif;
  font-weight: 800;
  font-size: 1.3rem;
  line-height: 40px;
}
.wol-cover-tile:nth-child(odd) { transform: rotate(-4deg); }
.wol-cover-tile:nth-child(even) { transform: rotate(3deg); }
.wol-cover-lead {
  text-align: center;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
}
.wol-cover-how {
  align-self: center;
  margin-top: -6px;
}
.wol-cover-hide {
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: -4px;
}

/* Whose turn: yellow, the brand accent, so the green stays on the button. */
.wol-turn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: #fff3d1;
  border: 1.5px solid var(--gof-yellow);
  text-align: center;
}
.wol-turn-who { font-family: 'League Spartan', sans-serif; font-weight: 800; font-size: 1.2rem; padding-top: 0.08em; }
.wol-turn-sub { font-size: 0.85rem; color: var(--text-secondary); }
.wol-players-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.wol-pcount {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1.5px solid #d1d5db;
  background: var(--panel-bg);
  font-family: inherit;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  cursor: pointer;
}
.wol-pcount:disabled { opacity: 0.35; cursor: default; }
.wol-pcount-label { font-weight: 700; font-size: 0.95rem; }
.wol-score-line { text-align: center; font-size: 0.9rem; color: var(--text-secondary); margin-top: -4px; }
.wol-score-line strong { color: var(--text-primary); }

/* End screen: scoreboard, personal best, the names / account nudge. */
.wol-standings { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.wol-standings th {
  text-align: left;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-secondary);
  padding: 4px 8px;
  border-bottom: 1px solid var(--panel-border);
}
.wol-standings td { padding: 6px 8px; border-bottom: 1px solid var(--panel-border); }
.wol-standings .num { text-align: right; }
.wol-standings tr.is-now td { font-weight: 700; }
.wol-best { text-align: center; font-weight: 700; font-size: 0.95rem; }
.wol-nudge {
  width: 100%;
  min-height: 42px;
  padding: 8px 12px;
  border: 1.5px dashed #c4ccd6;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
}
.wol-nudge:hover { background: var(--gof-bg); }

/* Settings sheet: player names. */
.name-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.name-input {
  width: 100%;
  min-height: 40px;
  padding: 8px 10px;
  border: 1.5px solid #d1d5db;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 16px;  /* 16px stops iOS zooming in on focus */
  color: var(--text-primary);
  background: var(--panel-bg);
}
.name-input:focus { outline: none; border-color: var(--text-primary); }
.panel-block .sheet-row[hidden] { display: none; }

/* The counter is the button. The clue-giver taps it for every clue word. */
.wol-count-btn {
  min-height: 64px;
  padding: 8px 14px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
}
.wol-count-main {
  font-family: 'League Spartan', sans-serif;
  font-weight: 800;
  font-size: clamp(1.6rem, 7vw, 2rem);
  line-height: 1;
}
.wol-count-sub {
  font-family: 'Arimo', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--gof-green-dark);
}
.wol-count-btn.low .wol-count { color: var(--gof-rust); }
.wol-count-btn.low .wol-count-sub { color: var(--gof-rust); }

/* The numbered list. Each row is the guess button. */
.wol-list { list-style: none; display: flex; flex-direction: column; gap: 5px; }
.wol-word {
  width: 100%;
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px;
  border: 1.5px solid var(--panel-border);
  border-radius: var(--radius-sm);
  background: var(--gof-bg);
  font-family: inherit;
  text-align: left;
  color: var(--text-primary);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
button.wol-word:hover { border-color: var(--gof-green); }
.wol-n { min-width: 1.6em; font-weight: 700; color: var(--text-secondary); }
.wol-text { flex: 1; font-size: 1.1rem; font-weight: 700; }
.wol-mark { min-width: 1.2em; text-align: right; font-weight: 800; font-size: 1.15rem; }
/* Guessed: white with a dark check. Filled green is only for the next action. */
.wol-item.guessed .wol-word { background: var(--panel-bg); border-color: var(--panel-border); }
.wol-item.guessed .wol-n,
.wol-item.guessed .wol-mark { color: var(--text-primary); }
/* The next word to clue: white, a heavy green outline, slightly larger. */
.wol-item.current .wol-word {
  background: var(--panel-bg);
  border: 2.5px solid var(--gof-green-dark);
  box-shadow: 0 2px 8px rgba(21, 118, 35, 0.18);
  padding: 5px 11px;
}
.wol-item.current .wol-text { font-size: 1.22rem; }
.wol-item.current .wol-n { color: var(--gof-green-dark); }
.wol-item.missed .wol-word { background: var(--panel-bg); border-style: dashed; }
.wol-item.missed .wol-mark { color: var(--gof-rust); }
.is-done .wol-word { cursor: default; min-height: 38px; }

/* ===== Pass & Play: one word at a time ================================= */
.wol-pstep {
  text-align: center;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-secondary);
}
.wol-pcard {
  min-height: 132px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 14px 12px;
  border-radius: var(--radius);
  background: var(--text-primary);
  text-align: center;
}
.wol-pcard-label { font-size: 0.8rem; color: #c9c4bc; }
.wol-pcard-word {
  font-family: 'League Spartan', sans-serif;
  font-weight: 800;
  font-size: clamp(2rem, 10vw, 2.6rem);
  line-height: 1.05;
  color: #fff;
  padding-top: 0.08em;
  overflow-wrap: anywhere;
}
.wol-pcard-count { margin-top: 4px; font-size: 0.85rem; font-weight: 700; color: var(--gof-yellow); }
.wol-pbtns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.wol-pbtn {
  min-height: 72px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  border-radius: var(--radius-sm);
  font-family: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.wol-pbtn:active { transform: scale(0.97); }
.wol-pbtn-main {
  font-family: 'League Spartan', sans-serif;
  font-weight: 800;
  font-size: 1.35rem;
  line-height: 1;
  padding-top: 0.1em;
}
.wol-pbtn-sub { font-size: 0.75rem; }
.wol-pbtn-clue {
  background: var(--panel-bg);
  border: 2.5px solid var(--text-primary);
  color: var(--text-primary);
}
.wol-pbtn-clue .wol-pbtn-sub { color: var(--text-secondary); }
.wol-pbtn-got {
  background: var(--gof-green);
  border: 2.5px solid var(--gof-green);
  color: var(--text-primary);
}
.wol-pbtn-got:hover { background: var(--gof-green-hover); }
.wol-pbtn-got .wol-pbtn-sub { color: var(--gof-green-dark); }
/* The whole list, quiet and read-only. */
.wol-plist {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  padding-top: 4px;
  border-top: 1px solid var(--panel-border);
}
.wol-plist li {
  margin-top: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.85rem;
  background: var(--gof-bg);
  color: var(--text-secondary);
}
.wol-pl-mark { margin-right: 4px; font-size: 0.75rem; }
.wol-plist .wol-pl-mark:empty { display: none; }
.wol-plist .wol-pl-now { background: var(--gof-yellow); color: var(--text-primary); font-weight: 700; }
.wol-plist .wol-pl-got { background: var(--panel-bg); border: 1px solid var(--panel-border); color: var(--text-primary); }
.wol-plist .wol-pl-skip { background: var(--panel-bg); text-decoration: line-through; color: #9aa4af; }
.wol-plist .wol-pl-skip .wol-pl-mark { color: var(--gof-rust); }
.wol-plist.is-done { border-top: none; padding-top: 0; }
.wol-plist.is-done li { font-size: 0.95rem; }

/* ===== Solo: the computer gives the clues ============================== */
/* Quiet header line: title and where you are. */
.wol-solo-head { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.wol-solo-how {
  text-align: center;
  font-size: 0.88rem;
  line-height: 1.3;
  color: var(--text-secondary);
}

/* Clues left, under the guess box: a countdown and one box per clue that
   gets a red X when spent (the Thakur Sisters overlay). */
.wol-clue-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px 8px; }
.wol-boxes { display: inline-flex; flex-wrap: wrap; justify-content: center; gap: 2px; }
.wol-box {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  background: var(--panel-bg);
  border: 1.5px solid #c4ccd6;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 8px;
  font-weight: 800;
  line-height: 1;
  color: #fff;
}
.wol-clue-bar .wol-left { font-size: 0.85rem; }
.wol-box.used { background: #e0413f; border-color: #c4302e; }
.wol-box.now { background: var(--gof-yellow); border-color: #d99a12; }
.wol-left { font-size: 0.9rem; color: var(--text-secondary); white-space: nowrap; }
.wol-left strong { color: var(--text-primary); font-size: 1.05rem; }
.wol-clue-bar.low .wol-left strong { color: var(--gof-rust); }
.wol-clue-bar .wol-timer { margin-right: 0; }

/* Challenge links: the score to beat, then how you did against it. */
.wol-challenge {
  margin-top: 2px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--gof-green-dark);
  background: var(--gof-mint);
  border-radius: 999px;
  padding: 3px 12px;
}
.wol-challenge-result {
  text-align: center;
  font-family: 'League Spartan', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--gof-green-dark);
  background: var(--gof-mint);
  border: 1.5px solid var(--gof-green-dark);
  border-radius: var(--radius-sm);
  padding: 8px 12px 6px;
}

/* The current clue: the biggest thing on the screen. */
.wol-hero {
  min-height: 132px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 10px 12px;
  border-radius: var(--radius);
  background: var(--gof-yellow);
  text-align: center;
}
.wol-hero-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(47, 44, 40, 0.65);
}
.wol-hero-word {
  font-family: 'League Spartan', sans-serif;
  font-weight: 800;
  font-size: clamp(2.6rem, 13vw, 3.6rem);
  line-height: 1.05;
  color: var(--text-primary);
  overflow-wrap: anywhere;
  padding-top: 0.06em;
}

/* Earlier clues for this word, each with the guess that missed it. */
.wol-trail { list-style: none; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.wol-trail li { display: flex; align-items: baseline; gap: 6px; font-size: 0.95rem; }
.wol-trail .t-clue { font-weight: 700; color: var(--text-primary); }
.wol-trail .t-arrow { color: #9aa5b1; }
.wol-trail .t-guess { color: var(--gof-rust); text-decoration: line-through; }
.wol-trail .t-mark { color: var(--gof-rust); font-weight: 800; font-size: 0.85rem; }

.wol-feedback {
  min-height: 1.3em;
  text-align: center;
  font-size: 0.88rem;
  font-weight: 600;
}
.wol-feedback .ok { color: var(--gof-green-dark); }

/* Solve flash: visible for about a second, then fades. The row keeps it. */
.wol-flash { display: inline-block; animation: wol-flash 1.9s ease-out forwards; }
@keyframes wol-flash {
  0% { opacity: 0; transform: scale(0.9); }
  10% { opacity: 1; transform: scale(1.05); }
  20% { transform: scale(1); }
  60% { opacity: 1; }
  100% { opacity: 0; }
}

/* Medal rows: "2 clues" then the medal. */
.wol-in { font-size: 0.78rem; font-weight: 600; color: var(--gof-green-dark); margin-right: 6px; }
.is-solo .wol-item.guessed .wol-mark { display: inline-flex; align-items: center; font-size: 1.05rem; }

/* Hot streak card, after Word Chain's: center of the screen, no taps. */
.wol-streak-pop {
  position: fixed;
  top: 42%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1300;
  pointer-events: none;
  text-align: center;
  background: rgba(255, 255, 255, 0.96);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 14px 22px;
  animation: wol-streak 1.6s ease-out forwards;
}
.wol-streak-fire { font-size: 3rem; line-height: 1; }
.wol-streak-text {
  margin-top: 4px;
  font-family: 'League Spartan', sans-serif;
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--gof-rust);
  text-transform: uppercase;
}
@keyframes wol-streak {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.6); }
  15% { opacity: 1; transform: translate(-50%, -50%) scale(1.1); }
  25% { transform: translate(-50%, -50%) scale(1); }
  75% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -60%) scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .wol-flash, .wol-streak-pop { animation-duration: 0.01s; animation-delay: 1.4s; }
}

/* End screen: medal tally and the per-word trail. */
.wol-tally { text-align: center; font-weight: 700; font-size: 1.05rem; }
.wol-tap-hint { text-align: center; font-size: 0.78rem; color: var(--text-secondary); margin-top: -4px; }
.is-solo.is-done .wol-word { cursor: pointer; }
.wol-trail-box { padding: 4px 10px 6px 40px; }
.wol-trail-box[hidden] { display: none; }
.wol-row-trail { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 0.85rem; color: var(--text-secondary); }
.wol-row-trail .rt-ok { color: var(--gof-green-dark); font-weight: 700; }
.wol-row-trail .rt-no { color: var(--gof-rust); text-decoration: line-through; }
.wol-feedback .no { color: var(--gof-rust); }

.wol-guess-row { display: flex; gap: 8px; }
.wol-guess {
  flex: 1;
  min-width: 0;
  min-height: 48px;
  padding: 10px 12px;
  border: 2px solid var(--gof-green-dark);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 1.1rem;
  color: var(--text-primary);
  background: var(--panel-bg);
}
.wol-guess:focus { outline: none; box-shadow: 0 0 0 3px rgba(155, 202, 62, 0.45); }
.wol-guess-row .wol-guess-btn { flex: 0 0 auto; width: auto; min-height: 48px; padding: 8px 18px; font-size: 1.05rem; }

/* The list is just progress in solo: small rows, the answers hidden. */
.wol-hidden { color: #9aa5b1; font-weight: 600; }
.is-solo { gap: 3px; }
.is-solo .wol-word { cursor: default; min-height: 30px; padding: 2px 10px; border-width: 1px; }
.is-solo .wol-text { font-size: 0.92rem; font-weight: 600; }
.is-solo .wol-n { font-size: 0.85rem; }
.is-solo .wol-mark { font-size: 0.95rem; }
.is-solo .wol-item.current .wol-word {
  border: 1.5px solid var(--gof-green-dark);
  box-shadow: none;
  padding: 2px 10px;
}
.is-solo .wol-item.current .wol-text { font-size: 0.92rem; }
.is-solo .wol-item.current .wol-hidden { color: var(--gof-green-dark); }
.panel-block[hidden] { display: none; }

/* One small line under the list: timer, Undo, End round. */
.wol-actions {
  min-height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.88rem;
  color: var(--text-secondary);
}
.wol-link {
  border: none;
  background: transparent;
  color: var(--gof-green-dark);
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
  padding: 6px 4px;
}
.wol-link:disabled { color: #b9c3cf; cursor: default; text-decoration: none; }
.wol-timer {
  font-family: 'League Spartan', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-primary);
  background: var(--gof-bg);
  border-radius: 999px;
  padding: 3px 10px;
  margin-right: 6px;
}
.wol-timer.low { background: var(--gof-yellow); }

/* ===== Settings panel, below the board ================================= */
.wol-panel {
  background: var(--panel-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  scroll-margin-top: 12px;
}
.wol-panel { padding: 10px 12px; gap: 10px; }
/* Gear + "Settings": opens the same sheet as the pills. Full row. */
.summary-gear {
  width: 100%;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 0;
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-secondary);
  cursor: pointer;
  text-align: left;
}
.summary-gear svg { width: 20px; height: 20px; fill: var(--gof-green-dark); }
.summary-gear:hover span { color: var(--gof-green-dark); text-decoration: underline; }
.summary-pill {
  text-align: left;
  line-height: 1.3;
  font-weight: 600;
  color: var(--text-primary);
}
.panel-block { display: flex; flex-direction: column; gap: 8px; }
.chip.preset[aria-pressed="true"] { background: var(--gof-mint); border-color: var(--gof-green-dark); color: var(--gof-green-dark); }
.panel-pending {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
  border-radius: var(--radius-sm);
  background: var(--gof-mint);
  font-size: 0.9rem;
  text-align: center;
}
.panel-pending[hidden] { display: none; }
.sheet-row[hidden] { display: none; }

/* End screen */
.wol-spare {
  align-self: center;
  font-family: 'League Spartan', sans-serif;
  font-weight: 700;
  font-size: 1.15rem;
  background: var(--gof-yellow);
  border-radius: 999px;
  padding: 8px 18px 6px;
}
.wol-spare-n { font-size: 1.5rem; font-weight: 800; }
.wol-spare.is-miss { background: var(--gof-bg); }
.wol-share-line {
  text-align: center;
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.5;
  padding: 10px;
  border-radius: var(--radius-sm);
  background: var(--gof-bg);
}
.wol-grid { letter-spacing: 0.1em; }

/* ===== Buttons ========================================================= */
.wol-btn {
  width: 100%;
  min-height: 56px;
  padding: 12px 16px;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--gof-green);
  color: var(--text-primary);
  font-family: 'League Spartan', sans-serif;
  font-size: 1.3rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s, transform 0.05s;
}
.wol-btn:hover { background: var(--gof-green-hover); }
.wol-btn:active { transform: translateY(1px); }

.wol-btn-outline {
  width: 100%;
  min-height: 46px;
  padding: 10px 14px;
  border: 2px solid var(--text-primary);
  border-radius: var(--radius-sm);
  background: var(--panel-bg);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
}
.wol-btn-outline:hover { background: var(--gof-mint); }

.wol-btn-ghost {
  width: 100%;
  min-height: 40px;
  padding: 8px 12px;
  border: 1.5px dashed #c4ccd6;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}
.wol-btn-ghost:hover { border-color: var(--gof-green); color: var(--text-primary); }

/* ===== Article ========================================================= */
.article {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
}
.quick-start,
.article-section {
  background: var(--panel-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.quick-start { padding: 14px 16px; line-height: 1.55; }
.quick-start[hidden] { display: none; }
.quick-start h2,
.article-section h2 {
  font-family: 'League Spartan', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0;
}
.quick-start h2 { margin-bottom: 6px; }
.quick-start p { font-size: 0.95rem; }
.article-section__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 16px;
  cursor: pointer;
  list-style: none;
}
.article-section__head::-webkit-details-marker { display: none; }
.article-chevron { color: var(--text-secondary); font-size: 0.8rem; transition: transform 0.15s; }
.article-section[open] .article-chevron { transform: rotate(180deg); }
.article-body {
  padding: 0 16px 16px;
  line-height: 1.55;
  font-size: 0.95rem;
}
.article-body h3 { font-size: 0.95rem; margin: 14px 0 6px; }
.article-body h4 { font-size: 0.95rem; margin: 12px 0 4px; }
.article-body p { margin: 0 0 10px; }
.article-body ol, .article-body ul { margin: 0 0 10px; padding-left: 20px; }
.article-body li { margin-bottom: 6px; }

/* ===== Modals (help + settings) ======================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(47, 44, 40, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 1200;
}
.modal-backdrop[hidden] { display: none; }
.modal {
  background: var(--panel-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  width: 100%;
  max-width: 440px;
  max-height: calc(100vh - 32px);
  /* iPhone Safari: 100vh counts the area behind the toolbars, which pushed
     the bottom of the sheet (and its pinned Save button) off screen.
     dvh is the visible height; app.js also shrinks it for the keyboard. */
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  padding: 18px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.modal-title {
  font-family: 'League Spartan', sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  margin: 0;
}
.modal-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
/* Imposter's pattern: Done and Save stay pinned to the bottom of a long
   sheet, so they never scroll out of reach. */
#wolSettingsBackdrop .modal-actions {
  position: sticky;
  bottom: -16px;
  margin: 4px -16px -16px;
  padding: 12px 16px 16px;
  background: var(--panel-bg);
  border-top: 1px solid var(--panel-border);
}
.help-list { padding-left: 20px; line-height: 1.5; font-size: 0.95rem; }
.help-list li { margin-bottom: 8px; }

.sheet-block { display: flex; flex-direction: column; gap: 8px; }
.sheet-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.sheet-label { font-weight: 700; font-size: 0.95rem; line-height: 1.3; }
.sheet-hint { font-weight: 400; font-size: 0.78rem; color: var(--text-secondary); }

.chip-row { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  border: 1.5px solid #d1d5db;
  border-radius: 999px;
  background: var(--panel-bg);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary);
  padding: 6px 11px;
  cursor: pointer;
}
.chip:hover { border-color: var(--gof-green); }
.chip.selected { background: var(--gof-mint); border-color: var(--gof-green-dark); color: var(--gof-green-dark); }
.chip-check { margin-right: 4px; font-weight: 800; }
.sheet-hint.is-warn { color: var(--gof-rust); font-weight: 700; }

.seg { display: flex; gap: 4px; flex-shrink: 0; }
.seg button {
  min-width: 44px;
  height: 38px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1.5px solid #d1d5db;
  background: var(--panel-bg);
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-primary);
  cursor: pointer;
}
.seg button.selected { background: var(--gof-mint); border-color: var(--gof-green-dark); color: var(--gof-green-dark); }

.stepper {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}
.stepper button {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1.5px solid #d1d5db;
  background: var(--panel-bg);
  font-family: inherit;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
  cursor: pointer;
}
.stepper button:hover { border-color: var(--gof-green); background: var(--gof-mint); }
.stepper button:disabled { opacity: 0.35; cursor: default; }
.stepper span {
  min-width: 44px;
  text-align: center;
  font-family: 'League Spartan', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
}

/* ===== Footer (Timer-style, matches apps/create-a-word/style.css) ====== */
.footer {
  text-align: center;
  padding: 1rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--gof-green-dark);
  text-decoration: none;
  font-weight: 600;
}

.footer-links a:hover { text-decoration: underline; }
