/* The Word Hunt Game — styles, built on the gamekit design tokens (gamekit.css,
 * loaded first). Mobile-first, fluid board, automatic dark mode via the token
 * system, motion that respects prefers-reduced-motion. A warm amber palette
 * distinguishes it from the teal Wend Game while reusing the same shell. */

:root {
  /* Reskin the gamekit accent to a warm amber so the whole UI (buttons,
   * avatars, leaderboard highlights) inherits the Word Hunt brand hue. */
  --gk-accent: #c2570a;
  --gk-accent-strong: #9a4408;
  --gk-accent-contrast: #ffffff;
  --gk-accent-soft: #fdead9;

  /* Warm neutral surfaces (light theme) so the site does not read as a clone
   * of the teal-neutral Wend palette. */
  --gk-bg: #faf6f1;
  --gk-surface: #ffffff;
  --gk-surface-2: #f3ebe1;
  --gk-ink: #241a12;
  --gk-ink-soft: #6b5c4d;
  --gk-line: #ece0d3;
  --gk-line-strong: #dccbb6;

  /* Alias gamekit tokens to the local names used throughout this sheet. */
  --accent: var(--gk-accent);
  --accent-dark: var(--gk-accent-strong);
  --accent-soft: var(--gk-accent-soft);
  --ink: var(--gk-ink);
  --ink-soft: var(--gk-ink-soft);
  --bg: var(--gk-bg);
  --card: var(--gk-surface);
  --board-bg: var(--gk-surface-2);
  --line: var(--gk-line);
  --radius: var(--gk-radius);
  --shadow: var(--gk-shadow);
  --shadow-sm: var(--gk-shadow-sm);
  --font: var(--gk-font-sans);
  --display: var(--gk-font-display);
  --maxw: var(--gk-maxw);

  /* Live trace-feedback tints, adapting to the theme. */
  --good: var(--gk-ok);
  --dup: var(--gk-warn);
  --bad: var(--gk-danger);

  /* Fluid board: as large as fits one mobile viewport (leaving room for the
   * header, stat row and thumb controls), capped for desktop. All four layouts
   * use a square bounding grid, so the board is always 1:1. */
  --board-size: min(94vw, 60dvh, 560px);
}

@media (prefers-color-scheme: dark) {
  :root {
    --gk-accent: #f6a35b;
    --gk-accent-strong: #f8b878;
    --gk-accent-contrast: #2a1706;
    --gk-accent-soft: #3a2410;

    --gk-bg: #15120c;
    --gk-surface: #1f1a12;
    --gk-surface-2: #2a2317;
    --gk-ink: #f3ece1;
    --gk-ink-soft: #b7a892;
    --gk-line: #322a1d;
    --gk-line-strong: #46392480;
  }
}

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  font-size: 17px;
}

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 max(20px, env(safe-area-inset-left)) 0 max(20px, env(safe-area-inset-right));
}

h1, h2, h3 { line-height: 1.15; color: var(--ink); font-family: var(--display); }
h1 { font-size: var(--gk-fs-2xl); margin: 0 0 0.4em; letter-spacing: -0.01em; }
h2 { font-size: var(--gk-fs-xl); margin: 1.6em 0 0.5em; }
h3 { font-size: var(--gk-fs-lg); margin: 1.2em 0 0.3em; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.muted { color: var(--ink-soft); }
.small { font-size: var(--gk-fs-sm); }
.section-lead { font-size: var(--gk-fs-lg); color: var(--ink-soft); max-width: 60ch; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: var(--gk-space-4);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: var(--gk-accent-contrast);
  padding: 8px 14px;
  border-radius: 0 0 8px 0;
  z-index: 100;
}
.skip-link:focus { left: 0; }

/* Header / nav */
.site-header {
  background: color-mix(in srgb, var(--card) 88%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(8px);
  backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 50;
  padding-top: env(safe-area-inset-top);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: var(--gk-space-3);
  min-height: 58px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 800; font-size: 1.15rem; font-family: var(--display); }
.brand:hover { text-decoration: none; }
.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 34px; height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: var(--gk-accent-contrast);
  font-weight: 800;
}
.site-nav { display: flex; gap: 2px; align-items: center; margin-left: auto; }
.site-nav a {
  color: var(--ink-soft);
  padding: 8px 12px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.96rem;
}
.site-nav a:hover { background: var(--accent-soft); color: var(--accent-dark); text-decoration: none; }
.site-nav a.active { color: var(--accent-dark); background: var(--accent-soft); }

.header-account { display: flex; align-items: center; }
.header-account[hidden] { display: none; }
.gk-auth-btn { padding: 6px 12px; min-height: var(--gk-tap); }
.gk-auth-btn .gk-avatar { width: 30px; height: 30px; }

.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; min-width: var(--gk-tap); min-height: var(--gk-tap); }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--ink); margin: 5px 0; border-radius: 2px; transition: transform .2s; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); margin-top: var(--gk-space-7); background: var(--card); }
.footer-inner { padding: 24px 20px calc(34px + env(safe-area-inset-bottom)); }
.footer-note { color: var(--ink-soft); font-size: 0.85rem; max-width: 70ch; }
.footer-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 18px 24px; margin-bottom: 18px; }
.footer-col h2 { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-soft); margin: 0 0 8px; }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.footer-col a { color: var(--ink-soft); font-size: 0.95rem; }

/* Buttons (site variants mirror gamekit's .gk-btn). */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 6px;
  min-height: var(--gk-tap);
  border: 1px solid transparent;
  border-radius: var(--gk-radius);
  padding: 10px 18px;
  font: inherit;
  font-weight: 600;
  font-size: 0.98rem;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background var(--gk-transition-fast), border-color var(--gk-transition-fast), transform var(--gk-transition-fast), box-shadow var(--gk-transition-fast);
}
.btn:active { transform: translateY(1px) scale(0.99); }
.btn:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.btn-primary { background: var(--accent); color: var(--gk-accent-contrast); border-color: var(--accent); }
.btn-primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); text-decoration: none; }
.btn-ghost { background: var(--card); color: var(--accent-dark); border-color: var(--gk-line-strong); }
.btn-ghost:hover { background: var(--accent-soft); text-decoration: none; }
.btn-lg { padding: 14px 30px; font-size: 1.1rem; }
.gk-btn--sm { min-height: 34px; padding: 6px 14px; font-size: var(--gk-fs-sm); }

/* Hero */
.hero { padding: 40px 20px 8px; text-align: center; }
.hero h1 { margin-bottom: 0.2em; }
.hero-sub { font-size: 1.15rem; color: var(--ink-soft); max-width: 55ch; margin: 0 auto; }

/* Sections */
.play-section { padding: 24px 20px calc(24px + env(safe-area-inset-bottom)); }
.play-head { text-align: center; margin-bottom: 16px; }
.play-head h1, .play-head h2 { margin: 0 0 0.15em; }
.play-links { text-align: center; color: var(--ink-soft); margin-top: 16px; }
.copy-section { padding: 20px; max-width: 760px; }
.copy-section.slim { max-width: 720px; }
.copy-section p, .copy-section li { max-width: 68ch; }
.cta-line { margin-top: 22px; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.feature-list, .how-steps { padding-left: 1.2em; }
.feature-list li, .how-steps li { margin: 0.5em 0; }
.game-controls-extra { display: flex; gap: 10px; justify-content: center; margin-top: 18px; flex-wrap: wrap; }

/* Size / shape cards */
.sizes-section { padding: 16px 20px 28px; }
.size-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin-top: 12px; }
.size-card {
  display: flex; flex-direction: column; gap: 4px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
  color: var(--ink);
  box-shadow: var(--shadow-sm);
  transition: transform var(--gk-transition-fast), box-shadow var(--gk-transition-fast), border-color var(--gk-transition-fast);
}
.size-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--accent); text-decoration: none; }
.size-card-title { font-weight: 800; font-size: 1.2rem; color: var(--accent-dark); font-family: var(--display); }
.size-card-meta { font-size: 0.85rem; color: var(--ink-soft); font-weight: 600; }
.size-card-blurb { font-size: 0.9rem; color: var(--ink-soft); }

.size-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.size-tab { min-height: var(--gk-tap); display: inline-flex; align-items: center; padding: 8px 16px; border-radius: var(--gk-radius-pill); background: var(--card); border: 1px solid var(--gk-line-strong); color: var(--accent-dark); font-weight: 600; font-size: 0.95rem; cursor: pointer; }
.size-tab:hover { background: var(--accent-soft); text-decoration: none; }
.size-tab.current { background: var(--accent); color: var(--gk-accent-contrast); border-color: var(--accent); }

/* Score table (length -> points). */
.score-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; max-width: 360px; }
.score-table th, .score-table td { text-align: left; padding: 8px 12px; border-bottom: 1px solid var(--line); }
.score-table thead th { color: var(--accent-dark); font-family: var(--display); }
.score-table tbody th { font-weight: 700; color: var(--ink); }

/* ===== Game board ===== */
.wh {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--gk-space-3);
  width: 100%;
  margin: 0 auto;
}
.wh-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--gk-space-4);
  width: var(--board-size);
  max-width: 100%;
}
.wh-stats { display: flex; gap: var(--gk-space-5); }
.wh-stat { display: flex; flex-direction: column; align-items: center; line-height: 1.1; }
.wh-stat-label { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-soft); }
.wh-stat-val { font-weight: 800; font-size: 1.3rem; font-variant-numeric: tabular-nums; }
.wh-current {
  flex: 1;
  min-width: 0;
  text-align: right;
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
  text-transform: uppercase;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-height: 1.3em;
  transition: color var(--gk-transition-fast);
}
.wh-current.is-new { color: var(--good); }
.wh-current.is-dup { color: var(--dup); }
.wh-current.is-bad { color: var(--bad); }

.wh-boardwrap {
  position: relative;
  width: var(--board-size);
  max-width: 100%;
  aspect-ratio: 1 / 1;
}
.wh-board {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(var(--cols), 1fr);
  grid-template-rows: repeat(var(--rows), 1fr);
  gap: 2.4%;
  padding: 2.4%;
  background: var(--board-bg);
  border-radius: 18px;
  box-shadow: var(--shadow);
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
.wh-tile {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: var(--card);
  border: 2px solid var(--line);
  font-weight: 800;
  color: var(--ink);
  text-transform: uppercase;
  transition: background .1s, border-color .1s, transform .06s, box-shadow .1s;
  z-index: 1;
}
.wh-letter { font-size: 1em; pointer-events: none; }
.wh-tile.trace { border-color: var(--accent); background: var(--accent-soft); transform: scale(1.06); z-index: 3; box-shadow: 0 0 0 2px var(--accent); }
.wh-tile.good { border-color: var(--good); background: color-mix(in srgb, var(--good) 22%, var(--card)); }
.wh-tile.dup { border-color: var(--dup); background: color-mix(in srgb, var(--dup) 22%, var(--card)); }
.wh-tile.bad { border-color: var(--bad); animation: wh-shake .3s ease; }

@keyframes wh-shake { 0%,100% { transform: translateX(0); } 25% { transform: translateX(-3px); } 50% { transform: translateX(3px); } 75% { transform: translateX(-2px); } }

.wh-trace {
  position: absolute;
  inset: 2.4%;
  width: 95.2%;
  height: 95.2%;
  pointer-events: none;
  z-index: 2;
}

/* Pre-round cover: fully opaque so the letters are not studyable before the
 * timer starts. */
.wh-start {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  border-radius: 18px;
  background: linear-gradient(160deg, var(--accent), var(--accent-dark));
  color: var(--gk-accent-contrast);
  text-align: center;
}
.wh-start[hidden] { display: none; }
.wh-start-card { max-width: 30ch; }
.wh-start-card h2 { color: var(--gk-accent-contrast); margin: 0 0 0.4em; }
.wh-start-card p { margin: 0 0 18px; opacity: 0.95; font-size: 0.98rem; }

.wh-actions { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }

.wh-foundlist {
  list-style: none;
  margin: 0;
  padding: 8px;
  width: var(--board-size);
  max-width: 100%;
  max-height: 180px;
  overflow-y: auto;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.wh-foundlist[hidden] { display: none; }
.wh-foundlist li,
.wh-wordcol li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 6px;
  border-bottom: 1px solid var(--line);
  font-variant-numeric: tabular-nums;
}
.wh-foundlist li:last-child,
.wh-wordcol li:last-child { border-bottom: 0; }
.wh-fw-word { font-weight: 700; letter-spacing: 0.04em; }
.wh-fw-pts { color: var(--ink-soft); font-weight: 600; }
.wh-word-none { color: var(--ink-soft); justify-content: center !important; }

/* Floating score popup over the board. */
.wh-pop {
  position: absolute;
  top: 12%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 7;
  font-weight: 800;
  font-size: 1.6rem;
  font-variant-numeric: tabular-nums;
  color: var(--accent-dark);
  text-shadow: 0 1px 2px rgba(0,0,0,0.15);
  pointer-events: none;
  animation: wh-float .8s ease-out forwards;
}
.wh-pop.good { color: var(--good); }
@keyframes wh-float {
  0% { opacity: 0; transform: translate(-50%, 6px) scale(0.8); }
  20% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -46px) scale(1.05); }
}

/* Desktop: found list becomes a persistent side rail beside the board. */
@media (min-width: 1024px) {
  .wh {
    display: grid;
    grid-template-columns: var(--board-size) 240px;
    grid-template-areas: "stats stats" "board found" "actions actions";
    justify-content: center;
    align-items: start;
    column-gap: var(--gk-space-5);
    row-gap: var(--gk-space-3);
  }
  .wh-toolbar { grid-area: stats; }
  .wh-boardwrap { grid-area: board; }
  .wh-actions { grid-area: actions; display: none; }
  .wh-foundlist {
    grid-area: found;
    display: block;
    width: 240px;
    max-height: var(--board-size);
    align-self: start;
  }
}

/* Round-end overlay */
.wh-overlay {
  position: fixed; inset: 0;
  background: rgba(20, 12, 4, 0.6);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  padding-bottom: calc(20px + env(safe-area-inset-bottom));
  z-index: 200;
}
.wh-overlay[hidden] { display: none; }
.wh-overlay-card {
  position: relative;
  overflow: hidden;
  background: var(--card);
  border-radius: var(--gk-radius-lg);
  padding: 28px 26px;
  max-width: 440px; width: 100%;
  max-height: calc(100dvh - 40px);
  overflow-y: auto;
  text-align: center;
  box-shadow: var(--gk-shadow-lg);
  animation: wh-rise .25s ease;
}
@keyframes wh-rise { from { transform: translateY(14px); opacity: 0; } to { transform: none; opacity: 1; } }
.wh-overlay-close {
  position: sticky; top: -18px; float: right;
  margin: -18px -16px 0 0;
  border: 0; background: none;
  font-size: 1.5rem; line-height: 1;
  color: var(--ink-soft); cursor: pointer;
  min-width: 44px; min-height: 44px;
  z-index: 1;
}
.wh-overlay-card h2 { margin: 0 0 0.1em; color: var(--accent-dark); font-size: var(--gk-fs-2xl); }
.wh-overlay-sub { color: var(--ink-soft); margin: 0 0 16px; }
.wh-overlay-stats { display: flex; justify-content: center; flex-wrap: wrap; gap: 18px; margin: 0 0 20px; }
.wh-overlay-stats div { display: flex; flex-direction: column; }
.wh-overlay-stats dt { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-soft); }
.wh-overlay-stats dd { margin: 2px 0 0; font-weight: 800; font-size: 1.4rem; font-variant-numeric: tabular-nums; color: var(--ink); }

.wh-summary { display: grid; grid-template-columns: 1fr; gap: 16px; text-align: left; margin: 0 0 16px; }
.wh-summary-col h3 { margin: 0 0 6px; font-size: 1rem; color: var(--accent-dark); }
.wh-missed-toggle { border: 0; background: none; color: var(--accent); font: inherit; font-weight: 600; cursor: pointer; padding: 0 4px; }
.wh-wordcol { list-style: none; margin: 0; padding: 0; max-height: 200px; overflow-y: auto; }
.wh-wordcol[hidden] { display: none; }
@media (min-width: 520px) {
  .wh-summary { grid-template-columns: 1fr 1fr; }
}

.wh-overlay-actions { display: flex; flex-direction: column; gap: 8px; }
.wh-share-status { min-height: 1.2em; font-size: 0.85rem; color: var(--accent-dark); margin: 10px 0 0; }

/* CSS-only confetti burst on round end. */
.wh-cheer { position: absolute; top: 0; left: 0; right: 0; height: 0; pointer-events: none; }
.wh-cheer span { position: absolute; top: -12px; width: 9px; height: 14px; border-radius: 2px; opacity: 0; }
.wh-cheer span:nth-child(1) { left: 24%; background: var(--gk-accent); }
.wh-cheer span:nth-child(2) { left: 50%; background: var(--gk-warn); }
.wh-cheer span:nth-child(3) { left: 74%; background: var(--gk-ok); }
.wh-overlay.show .wh-cheer span { animation: wh-confetti 1.1s ease-in forwards; }
.wh-overlay.show .wh-cheer span:nth-child(2) { animation-delay: .12s; }
.wh-overlay.show .wh-cheer span:nth-child(3) { animation-delay: .22s; }
@keyframes wh-confetti {
  0% { opacity: 0; transform: translateY(0) rotate(0); }
  15% { opacity: 1; }
  100% { opacity: 0; transform: translateY(220px) rotate(320deg); }
}

/* Post-round leaderboard panel inside the overlay, plus the standalone
 * leaderboard page — a points table (higher is better). */
.wh-lb-panel { text-align: left; margin: 4px 0 18px; border-top: 1px solid var(--line); padding-top: 14px; }
.wh-lb-panel[hidden] { display: none; }
.wh-lb-title { margin: 0 0 8px; font-size: var(--gk-fs-lg); color: var(--ink); text-align: center; }
.wh-lb-signin { text-align: center; color: var(--ink-soft); font-size: var(--gk-fs-sm); margin: 0 0 12px; }
.wh-lb-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.wh-lb-table th { text-align: left; font-size: var(--gk-fs-xs); text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-soft); padding: 6px 10px; border-bottom: 1px solid var(--line); }
.wh-lb-table td { padding: 8px 10px; border-bottom: 1px solid var(--line); font-size: var(--gk-fs-sm); }
.wh-lb-table tbody tr:last-child td { border-bottom: 0; }
.wh-lb-rank { font-weight: 700; color: var(--accent-dark); white-space: nowrap; }
.wh-lb-name { max-width: 14ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wh-lb-score { font-weight: 700; text-align: right; }
.wh-lb-table th:last-child { text-align: right; }
.wh-lb-you { background: var(--accent-soft); }
.wh-lb-own { display: flex; gap: 10px; align-items: center; margin-top: var(--gk-space-2); padding: 8px 10px; border-radius: var(--gk-radius-sm); background: var(--accent-soft); font-size: var(--gk-fs-sm); font-variant-numeric: tabular-nums; }
.wh-lb-own .wh-lb-name { flex: 1; font-weight: 600; }
.wh-lb-state { padding: var(--gk-space-5) var(--gk-space-3); text-align: center; color: var(--ink-soft); font-size: var(--gk-fs-sm); }
.wh-lb-error { color: var(--bad); }

.wh-noscript { background: color-mix(in srgb, var(--gk-warn) 18%, var(--card)); border: 1px solid var(--gk-warn); padding: 14px; border-radius: 10px; color: var(--ink); max-width: var(--board-size); }

/* Leaderboard page */
.lb-page { padding: 24px 20px calc(24px + env(safe-area-inset-bottom)); max-width: 720px; }
.lb-controls { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--gk-space-4); margin: 16px 0; }
.lb-sizes { margin: 0; }
.lb-date-field { display: flex; flex-direction: column; gap: 4px; }
.lb-date-label { font-size: var(--gk-fs-sm); font-weight: 600; color: var(--ink-soft); }
.lb-date { max-width: 200px; }
.lb-list { min-height: 120px; margin-top: 8px; padding: 6px 4px; }
.lb-disabled { color: var(--ink-soft); }

/* FAQ */
.faq-section { padding: 20px; max-width: 760px; }
.faq { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.faq-item { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); overflow: hidden; }
.faq-item summary { cursor: pointer; padding: 14px 18px; font-weight: 600; list-style: none; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; float: right; color: var(--accent); font-weight: 700; }
.faq-item[open] summary::after { content: "\2212"; }
.faq-answer { padding: 0 18px 14px; }
.faq-answer p { margin: 0; color: var(--ink-soft); max-width: none; }

/* Tips */
.tips { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin-top: 12px; }
.tip { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow-sm); }
.tip h3 { margin: 0 0 0.3em; color: var(--accent-dark); font-size: 1rem; }
.tip p { margin: 0; color: var(--ink-soft); font-size: 0.95rem; }

/* Archive */
.archive-list { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; margin-top: 16px; }
.archive-list a { display: block; text-align: center; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 12px; font-weight: 600; box-shadow: var(--shadow-sm); }
.archive-list a:hover { border-color: var(--accent); background: var(--accent-soft); text-decoration: none; }
.crumb { margin: 0 0 6px; }
.day-nav { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.archive-board { border-top: 1px solid var(--line); }

.error-section { text-align: center; padding: 50px 20px; }

/* Comparison table */
.compare-wrap { overflow-x: auto; margin: 16px 0; }
.compare-table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.compare-table th, .compare-table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.compare-table thead th { color: var(--accent-dark); font-family: var(--display); }
.compare-table tbody th { font-weight: 700; color: var(--ink); }

/* Puzzle library */
.library-section { padding: 20px; border-top: 1px solid var(--line); }
.library-section:first-of-type { border-top: 0; }
.library-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 16px; margin-bottom: 8px; }
.library-head h2 { margin: 0; }
.puzzle-num-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(56px, 1fr)); gap: 8px; margin-top: 12px; }
.puzzle-num { display: inline-flex; align-items: center; justify-content: center; min-height: var(--gk-tap); padding: 8px; border-radius: var(--gk-radius); background: var(--card); border: 1px solid var(--gk-line-strong); color: var(--accent-dark); font-weight: 700; font-variant-numeric: tabular-nums; }
.puzzle-num:hover { background: var(--accent-soft); text-decoration: none; }
.library-more { margin-top: 10px; }
.puzzle-nav { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.puzzle-nav .spacer { flex: 1; }

/* Strategy guide */
.strategy-section { margin-top: 22px; }
.strategy-section h2 { margin-bottom: 0.3em; }

/* Mobile nav */
@media (max-width: 860px) {
  body { font-size: 16px; }
  .nav-toggle { display: block; order: 3; }
  .header-account { order: 2; margin-left: auto; }
  .site-nav {
    order: 4;
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    margin-left: 0;
    background: var(--card);
    border-bottom: 1px solid var(--line);
    padding: 8px 16px 14px;
    gap: 2px;
    display: none;
    box-shadow: var(--shadow);
  }
  .site-header.nav-open .site-nav { display: flex; }
  .site-nav a { padding: 12px 10px; }
  .hero { padding: 28px 20px 4px; }

  /* ----- fullscreen: mobile-only tight sizing -----
   * gamekit-fullscreen.js adds html.gk-fs-tight when the board overflows its
   * fullscreen height; these tile sizes only make sense on phones, so they
   * stay inside the mobile media query. The tight-tier LAYOUT rules live in the
   * media-independent block below so desktop fullscreen can compact too. */
  html.gk-fullscreen.gk-fs-tight {
    --board-size: min(94vw, calc(100dvh - var(--gk-anchor-h, 0px) - 160px), 480px);
  }
  html.gk-fullscreen.gk-fs-tight .wh-letter { font-size: 0.92em; }
  html.gk-fullscreen.gk-fs-tight .wh-tile { border-radius: 10px; }
}

/* ----- fullscreen board layout (wordhunt-specific, media-independent) -----
 * The generic fullscreen shell lives in gamekit.css. These rules lay out the
 * Word Hunt board inside .play-section at every viewport. .wh and .wh-foundlist
 * both carry data-gk-fs-fit so a growing found-word list that fits inside .wh's
 * box still engages the tight tier. The square board stays centered; the found
 * list is the growable scroll region. */
html.gk-fullscreen .wh { display: flex; flex-direction: column; flex: 1; min-height: 0; }
html.gk-fullscreen .wh-boardwrap { flex-shrink: 0; }
html.gk-fullscreen .wh-foundlist {
  flex: 1;
  min-height: 0;
  max-height: none;
  overflow-y: auto;
}
html.gk-fullscreen .play-section > *:not(.wh) { display: none; }
html.gk-fullscreen .ezoicad { display: none; }
/* Tight tier LAYOUT: compact spacing so the board fits short screens. */
html.gk-fullscreen.gk-fs-tight .wh { gap: var(--gk-space-2); }
html.gk-fullscreen.gk-fs-tight .wh-toolbar { padding-bottom: 4px; }
html.gk-fullscreen.gk-fs-tight .wh-stat-val { font-size: var(--gk-fs-md); }
html.gk-fullscreen.gk-fs-tight .wh-current { font-size: 1.05rem; }
html.gk-fullscreen.gk-fs-tight .wh-actions { margin-top: 0; }
html.gk-fullscreen.gk-fs-tight .wh-actions .btn { min-height: 34px; padding: 4px 14px; font-size: var(--gk-fs-sm); }
html.gk-fullscreen.gk-fs-tight .wh-foundlist { padding: 4px 8px; }
