/* ═══════════════════════════════════════════════════════════════
   Raatsel — styles
   Hexagonal Spelling Bee-style word game.
═══════════════════════════════════════════════════════════════ */

:root {
  --hex:        72px;
  --gap:        10px;
  --honey:      #f5b800;          /* primary accent */
  --honey-dk:   #d97706;          /* dieper honing-accent (badges) */
  --required:   #2d7dd2;          /* verplichte letter: center tile + req-markering */
  --tile-outer: #ececec;
  --tile-hover: #d6d6d6;
  --bg:         #ffffff;
  --bg2:        #f4f4f4;
  --fg:         #1a1a1a;
  --muted:      #777;
  --border:     #ddd;
  --good:       #1f9d55;
  --bad:        #e74c3c;
  --info:       #4a9eff;
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --tile-outer: #2e2e2e;
    --tile-hover: #3d3d3d;
    --bg:         #111111;
    --bg2:        #1c1c1c;
    --fg:         #f0f0f0;
    --muted:      #888;
    --border:     #333;
  }
}
@media (max-width: 380px) { :root { --hex: 62px; --gap: 8px; } }

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
html { height: 100%; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--fg);
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ── Header ────────────────────────────────────────────────── */
#header {
  width: 100%;
  max-width: 500px;
  padding: 22px 20px 8px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 8px;
}
#header h1 {
  grid-column: 2;
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  text-align: center;
}
#level-badge {
  grid-column: 2;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 4px 14px;
  border-radius: 14px;
  background: var(--bg2);
  color: var(--muted);
  border: 1px solid var(--border);
  justify-self: center;
  transition: background 0.5s, color 0.5s, border-color 0.5s;
}
/* Niveaukleuren exact zoals Spelwijze: mid/high oranje, top (Genie) paars. */
#level-badge.rank-mid  { background: color-mix(in srgb, #f39c12 18%, var(--bg2)); color:#b7770a; border-color:color-mix(in srgb, #f39c12 35%, var(--border)); }
#level-badge.rank-high { background: color-mix(in srgb, #e67e22 18%, var(--bg2)); color:#a85b0a; border-color:color-mix(in srgb, #e67e22 35%, var(--border)); }
#level-badge.rank-top  { background: color-mix(in srgb, #8e44ad 18%, var(--bg2)); color:#6c3483; border-color:color-mix(in srgb, #8e44ad 35%, var(--border)); }
@media (prefers-color-scheme: dark) {
  #level-badge.rank-mid  { color: #f0b429; }
  #level-badge.rank-high { color: #f39c12; }
  #level-badge.rank-top  { color: #c39bd3; }
}
#btn-account {
  grid-column: 3;
  justify-self: end;
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 1.15rem;
  cursor: pointer;
  padding: 4px 8px;
  -webkit-tap-highlight-color: transparent;
}
#btn-account:hover { color: var(--fg); }

/* ── Game container ───────────────────────────────────────── */
#game {
  width: 100%;
  max-width: 500px;
  padding: 0 20px 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  flex: 1;
}
#status-msg { color: var(--muted); padding: 30px 0; text-align: center; }

/* ── Progress bars ────────────────────────────────────────── */
#progress-wrap { width: 100%; display: flex; flex-direction: column; gap: 6px; }
.prog-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  color: var(--muted);
}
.prog-label {
  min-width: 110px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.prog-track {
  flex: 1;
  height: 7px;
  background: var(--bg2);
  border-radius: 4px;
  overflow: hidden;
}
.prog-fill {
  height: 100%;
  background: var(--honey);
  border-radius: 4px;
  width: 0%;
  transition: width 0.5s ease;
}

/* ── Word-row (the word being typed) ──────────────────────── */
#word-row {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 64px;
  width: 100%;
}
#word-display {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 1px;
}
#word-display .letter { color: var(--fg); }
#word-display .letter.req { color: var(--required); }
#word-placeholder {
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--muted);
  font-style: italic;
  text-transform: none;
  letter-spacing: 0;
}

/* ── Hex grid ─────────────────────────────────────────────── */
#hex-grid {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--gap);
  user-select: none;
  touch-action: manipulation;
}
.hex-row { display: flex; gap: var(--gap); }
.hex-row.offset { margin-left: calc(var(--hex) / 2 + var(--gap) / 2); }

.hex-btn {
  width: var(--hex);
  height: var(--hex);
  border-radius: 50%;
  border: none;
  background: var(--tile-outer);
  color: var(--fg);
  font-family: var(--font);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.1s, transform 0.08s;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hex-btn:hover  { background: var(--tile-hover); }
.hex-btn:active { transform: scale(0.91); }
.hex-btn.center { background: var(--required); color: #fff; }
.hex-btn.center:hover { background: color-mix(in srgb, var(--required) 85%, #000); }

.hex-btn.shuf-out {
  transform: scale(0.72) !important;
  opacity: 0 !important;
  transition: transform 0.13s ease, opacity 0.13s ease !important;
}
@keyframes shufIn {
  from { transform: scale(0.72); opacity: 0; }
  to   { transform: scale(1);    opacity: 1; }
}
.hex-btn.shuf-in { animation: shufIn 0.18s ease forwards; }

/* ── Controls ─────────────────────────────────────────────── */
#controls {
  display: flex;
  gap: 10px;
  justify-content: center;
}
.ctrl-btn {
  padding: 11px 20px;
  border-radius: 24px;
  border: 2px solid var(--border);
  background: transparent;
  color: var(--fg);
  font-family: var(--font);
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.1s, border-color 0.1s;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.ctrl-btn:hover  { background: var(--bg2); }
.ctrl-btn:active { transform: scale(0.96); }
.ctrl-btn.primary {
  background: var(--fg);
  color: var(--bg);
  border-color: var(--fg);
  padding-left: 28px;
  padding-right: 28px;
}
.ctrl-btn.primary:hover    { opacity: 0.85; }
.ctrl-btn.primary:disabled { opacity: 0.25; cursor: default; transform: none; }

/* ── Feedback ─────────────────────────────────────────────── */
#feedback {
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.fb {
  padding: 7px 18px;
  border-radius: 20px;
  font-size: 0.95rem;
  font-weight: 600;
  animation: fbAnim 2s ease forwards;
}
/* Voor wie mag beoordelen: een ✎-potloodje op de melding maakt zichtbaar
   dat je erop kunt tikken om het woord voor te dragen. */
body.can-suggest #feedback .fb::after {
  content: '\00a0\270E';
  font-size: 0.85em;
  opacity: 0.75;
}

/* Admin: het "Gemist"-vakje is aantikbaar (opent een bulk-overlay om
   gemiste woorden retroactief te beoordelen). */
body.is-admin #yesterday-list .yesterday-summary { cursor: pointer; }
body.is-admin #yesterday-list .yesterday-missed-label {
  text-decoration: underline dotted color-mix(in srgb, var(--fg) 40%, transparent);
  text-underline-offset: 2px;
}

/* ─── Gemist-bulk-overlay ─── */
#missed-review-popup {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
#missed-review-card {
  width: 100%;
  max-width: 420px;
  max-height: 82vh;
  overflow-y: auto;
  background: var(--bg);
  border-radius: 16px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.3);
}
#missed-review-card h2 { font-size: 1.15rem; font-weight: 800; text-align: center; }
.missed-help { font-size: 0.82rem; color: var(--muted); text-align: center; }
.missed-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 8px;
  padding: 7px 4px;
  border-bottom: 1px solid var(--border);
}
.missed-row:last-child { border-bottom: none; }
/* Eigen naam (niet .missed-word) want die laatste heeft globaal een
   strikethrough voor de Gisteren-chips. Kleur volgt de keuze: groen =
   akkoord (default), oranje = Bonus, rood = Fout. */
.missed-review-word {
  font-weight: 700;
  letter-spacing: 0.03em;
  color: #2ecc71;
}
.missed-review-word.mr-bonus { color: #e67e22; }
.missed-review-word.mr-fout  { color: #e74c3c; }
.missed-btn {
  padding: 6px 12px;
  border: none;
  border-radius: 8px;
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  opacity: 0.35;
  transition: opacity 0.15s;
}
.missed-btn:hover { opacity: 0.7; }
.missed-btn.selected { opacity: 1; outline: 2px solid var(--fg); }
#missed-review-submit {
  padding: 12px 20px;
  border: none;
  border-radius: 10px;
  background: var(--required);
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
}
#missed-review-submit:hover { opacity: 0.88; }
#missed-review-submit:disabled { opacity: 0.5; cursor: not-allowed; }
#missed-review-close {
  padding: 6px;
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 0.85rem;
  cursor: pointer;
}
#missed-review-close:hover { color: var(--fg); }
.fb.good    { background: var(--good); color: #fff; }
.fb.bad     { background: var(--bad);  color: #fff; }
.fb.info    { background: var(--bg2);  color: var(--fg); border: 1px solid var(--border); }
.fb.pangram { background: linear-gradient(120deg, var(--honey), var(--honey-dk)); color: #fff; }
@keyframes fbAnim {
  0%   { opacity: 0; transform: translateY(-6px) scale(0.95); }
  12%  { opacity: 1; transform: translateY(0) scale(1); }
  75%  { opacity: 1; }
  100% { opacity: 0; }
}

/* Shake on invalid */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-9px); }
  40% { transform: translateX(9px); }
  60% { transform: translateX(-5px); }
  80% { transform: translateX(5px); }
}
#word-display.shake { animation: shake 0.35s ease; }

/* Wave on valid — exact zoals Spelwijze */
@keyframes wordWave {
  0%   { transform: scale(1)    rotate(0deg);   }
  12%  { transform: scale(1.40) rotate(-5deg);  }
  28%  { transform: scale(1.55) rotate(5deg);   }
  44%  { transform: scale(1.48) rotate(-4deg);  }
  60%  { transform: scale(1.35) rotate(3.5deg); }
  74%  { transform: scale(1.18) rotate(-2deg);  }
  87%  { transform: scale(1.06) rotate(1deg);   }
  100% { transform: scale(1)    rotate(0deg);   }
}
#word-display.word-ok       { animation: wordWave 0.75s cubic-bezier(0.34, 1.2, 0.64, 1) forwards; }
#word-display.word-ok .letter { color: var(--good); }

/* Already-found state — blauw + iets kleiner, geen animatie */
#word-display.word-seen           { transform: scale(0.82); }
#word-display.word-seen .letter   { color: var(--info); }

/* Bonus / pangram-bonus wiggle (oranje) — gereserveerd voor toekomstig
 * gebruik (bv. tweede woordenlijst-laag); blijft compatibel met Spelwijze. */
@keyframes wordWiggle {
  0%   { transform: scale(1)    rotate(0deg);   }
  18%  { transform: scale(1.15) rotate(-6deg);  }
  38%  { transform: scale(1.15) rotate(6deg);   }
  56%  { transform: scale(1.08) rotate(-4deg);  }
  74%  { transform: scale(1.04) rotate(3deg);   }
  100% { transform: scale(1)    rotate(0deg);   }
}
#word-display.word-bonus           { animation: wordWiggle 0.55s cubic-bezier(0.34, 1.2, 0.64, 1) forwards; }
#word-display.word-bonus .letter   { color: #e67e22; }

/* ── Found list (in sheet) ────────────────────────────────── */
#found-list, #bonus-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px 8px; }
.found-chip {
  padding: 3px 8px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: var(--bg2);
  color: var(--fg);
}
.found-chip.is-pangram { background: var(--honey); color: #111; }

/* ── Auth screen (login / register) ───────────────────────── */
#auth-screen {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
#auth-card {
  width: 100%;
  max-width: 320px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: center;
}
#auth-card h2 {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  margin-bottom: 4px;
}
.auth-sub  { font-size: 0.9rem; color: var(--muted); margin-bottom: 8px; }
.auth-input {
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg2);
  color: var(--fg);
  font-size: 1rem;
  font-family: var(--font);
}
.auth-input:focus { outline: 2px solid var(--honey); outline-offset: -1px; }
#auth-submit {
  padding: 12px 20px;
  border: none;
  border-radius: 10px;
  background: var(--fg);
  color: var(--bg);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  margin-top: 4px;
}
#auth-submit:hover { opacity: 0.85; }
#auth-error {
  font-size: 0.85rem;
  color: var(--bad);
  min-height: 1.2em;
}
.auth-toggle { font-size: 0.85rem; color: var(--muted); margin-top: 4px; }
.auth-toggle a { color: var(--honey-dk); text-decoration: none; }
.auth-toggle a:hover { text-decoration: underline; }

/* ── Gast-waarschuwing popup ───────────────────────────────────── */
#btn-account { font-size: 1.05rem; }   /* ⚠️ iets kleiner dan tekst-iconen */
#guest-popup {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
#guest-card {
  width: 100%;
  max-width: 340px;
  background: var(--bg);
  border-radius: 16px;
  padding: 24px 22px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.3);
}
#guest-icon { font-size: 2.4rem; }
#guest-card h2 { font-size: 1.2rem; font-weight: 800; }
#guest-card p { font-size: 0.9rem; color: var(--muted); line-height: 1.5; }
#guest-login-btn {
  padding: 12px 20px;
  border: none;
  border-radius: 10px;
  background: var(--required);
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  margin-top: 4px;
}
#guest-login-btn:hover { opacity: 0.88; }
#guest-close-btn {
  padding: 8px;
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 0.85rem;
  cursor: pointer;
}
#guest-close-btn:hover { color: var(--fg); }

/* ─── Moderator-popup (geopend via de statusmelding) ─── */
#admin-popup {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
#admin-card {
  width: 100%;
  max-width: 320px;
  background: var(--bg);
  border-radius: 16px;
  padding: 24px 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.3);
}
.admin-word-big { font-size: 1.55rem; font-weight: 800; }
#admin-word { color: var(--fg); text-transform: uppercase; letter-spacing: 0.04em; }
.admin-actions { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.admin-actions button {
  padding: 14px 6px;
  border: none;
  border-radius: 10px;
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
}
.admin-actions button:hover { opacity: 0.88; }
.admin-actions button:disabled {
  opacity: 0.3;
  cursor: not-allowed;
  filter: grayscale(0.6);
}
.admin-good  { background: #2ecc71; }
.admin-bonus { background: #e67e22; }
.admin-fout  { background: #e74c3c; }
.admin-msg { font-size: 0.82rem; min-height: 1.1em; color: var(--muted); }
#admin-close-btn {
  padding: 6px;
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 0.85rem;
  cursor: pointer;
}
#admin-close-btn:hover { color: var(--fg); }

/* ─── Moderatie: tellertje + overlays ─── */
#btn-mod {
  grid-column: 1;
  justify-self: start;
  min-width: 26px;
  height: 26px;
  padding: 0 8px;
  border: none;
  border-radius: 13px;
  background: var(--required);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 800;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
#btn-mod:hover { opacity: 0.88; }
#review-popup, #results-popup {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
#review-card, #results-card {
  width: 100%;
  max-width: 420px;
  max-height: 80vh;
  overflow-y: auto;
  background: var(--bg);
  border-radius: 16px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.3);
}
#review-card h2, #results-card h2 { font-size: 1.15rem; font-weight: 800; text-align: center; }
.mod-empty { color: var(--muted); font-size: 0.9rem; text-align: center; margin: 8px 0; }
.review-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
}
.review-info { display: flex; flex-direction: column; gap: 2px; }
.review-word { font-size: 1.1rem; font-weight: 800; letter-spacing: 0.04em; }
.review-sub  { font-size: 0.8rem; color: var(--muted); }
.review-act { display: grid; grid-template-columns: 1fr 1fr 1fr auto; gap: 6px; }
.review-act button {
  padding: 9px 6px;
  border: none;
  border-radius: 9px;
  color: #fff;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  opacity: 0.7;
}
.review-act button.proposed { opacity: 1; outline: 2px solid var(--fg); }
.review-act button:hover { opacity: 1; }
.review-act .review-dismiss { background: var(--bg2); color: var(--muted); }
#results-list { display: flex; flex-direction: column; }
.results-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  padding: 7px 4px;
  border-bottom: 1px solid var(--border);
}
.results-row:last-child { border-bottom: none; }
.results-word { font-weight: 700; letter-spacing: 0.03em; }
.results-verdict { font-size: 0.85rem; }
/* Nieuwe uitslag = highlight; al geziene = grijs. */
.results-row.new .results-word,
.results-row.new .results-verdict { color: var(--fg); font-weight: 800; }
.results-row.seen { opacity: 0.5; }
.results-row.seen .results-word,
.results-row.seen .results-verdict { font-weight: 400; color: var(--muted); }
#review-close-btn, #results-close-btn {
  padding: 8px;
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 0.85rem;
  cursor: pointer;
}
#review-close-btn:hover, #results-close-btn:hover { color: var(--fg); }

/* ═══════════════════════════════════════════════════════════════
   Pull-to-refresh indicator (zichtbaar bij swipe-down vanaf top)
═══════════════════════════════════════════════════════════════ */
#ptr-indicator {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%) translateY(-56px);
  width: 36px;
  height: 36px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 50%;
  box-shadow: 0 2px 10px rgba(0,0,0,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  opacity: 0;
}
.ptr-arc {
  width: 18px;
  height: 18px;
  border: 2.5px solid var(--border);
  border-top-color: var(--fg);
  border-radius: 50%;
}
#ptr-indicator.spinning .ptr-arc { animation: ptrSpin 0.65s linear infinite; }
@keyframes ptrSpin { to { transform: rotate(360deg); } }

/* ═══════════════════════════════════════════════════════════════
   Tab-bar onderaan + sheet-overlay
   1:1 overgenomen uit Spelwijze (kleuren naar honingraat-palet).
═══════════════════════════════════════════════════════════════ */
#tab-bar {
  width: 100%;
  display: flex;
  gap: 8px;
}
.tab-btn {
  flex: 1;
  padding: 9px 4px 8px;
  border-radius: 12px;
  border: 2px solid var(--border);
  background: var(--bg2);
  color: var(--fg);
  font-family: var(--font);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition: background 0.1s, border-color 0.1s, color 0.1s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}
.tab-btn:hover  { background: var(--tile-hover); }
.tab-btn:active { transform: scale(0.95); }
.tab-btn.active {
  background: var(--honey-dk);
  color: #fff;
  border-color: var(--honey-dk);
}
.tab-icon { font-size: 1.2rem; line-height: 1; }
.cal-icon {
  display: inline-flex; flex-direction: column; align-items: center;
  width: 1.4em; height: 1.3em;
  border: 1.5px solid rgba(128,128,128,0.4); border-radius: 3px;
  overflow: hidden; vertical-align: middle; background: #fff;
}
.cal-month {
  width: 100%; flex-shrink: 0; height: 38%;
  background: #c0392b; color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.28em; font-weight: 700; letter-spacing: 0.04em;
  text-transform: uppercase; line-height: 1;
}
.cal-num {
  flex: 1; display: flex; align-items: center; justify-content: center;
  font-size: 0.52em; font-weight: 800; line-height: 1; color: #111;
}
.tab-summary {
  font-size: 0.6rem;
  font-weight: 700;
  color: var(--muted);
  line-height: 1;
  min-height: 0.7rem;
  white-space: nowrap;
}
.tab-btn.active .tab-summary { color: rgba(255,255,255,0.75); }

#sheet-overlay {
  position: fixed;
  inset: 0;
  background: transparent;
  z-index: 500;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
}
#sheet-panel {
  width: 100%;
  max-width: 500px;
  background: var(--bg);
  border-radius: 18px 18px 0 0;
  max-height: 75vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 -4px 32px rgba(0, 0, 0, 0.2);
}
@keyframes sheetGrow {
  from { transform: scale(0.05); opacity: 0; }
  to   { transform: scale(1);    opacity: 1; }
}
@keyframes sheetShrink {
  from { transform: scale(1);    opacity: 1; }
  to   { transform: scale(0.05); opacity: 0; }
}
#sheet-panel.opening { animation: sheetGrow   0.28s cubic-bezier(0.34, 1.15, 0.64, 1) forwards; }
#sheet-panel.closing { animation: sheetShrink 0.22s ease forwards; }
#sheet-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 18px 12px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
#sheet-title { font-size: 0.95rem; font-weight: 700; }
#sheet-body {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  flex: 1;
  padding: 14px 16px;
}
.sheet-pane { display: none; }
.sheet-pane.active { display: block; }

/* ═══════════════════════════════════════════════════════════════
   Genie-info, samenvattingsregel, scorebalk-tick
═══════════════════════════════════════════════════════════════ */
#genie-info {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--fg);
  text-align: center;
  padding: 2px 0 0;
  letter-spacing: 0.01em;
}
/* Samenvattingsregel onder de balken — zelfde grootte als Spelwijze. */
#calc-summary {
  font-size: 0.76rem;
  color: var(--fg);
  text-align: center;
  line-height: 1.6;
  padding: 2px 0;
}
.prog-track { position: relative; overflow: hidden; }
.genie-tick {
  position: absolute;
  top: -1px; bottom: -1px;
  width: 3px;
  background: color-mix(in srgb, var(--fg) 35%, transparent);
  pointer-events: none;
  transform: translateX(-50%);
  z-index: 2;
  border-radius: 1px;
}

/* ═══════════════════════════════════════════════════════════════
   Geschiedenis-paneel
═══════════════════════════════════════════════════════════════ */
#history-list { display: flex; flex-direction: column; gap: 4px; }
.hist-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  padding: 4px 0;
  border-bottom: 1px solid var(--border);
  color: var(--fg);
}
.hist-row:last-child { border-bottom: none; }
.hist-row .hist-date  { color: var(--muted); }
.hist-row .hist-genie { color: var(--honey-dk); font-weight: 700; }
.hist-perfect {
  background: var(--honey-dk);
  color: #fff;
  padding: 1px 7px;
  border-radius: 10px;
  font-weight: 700;
}
.hist-section { border-bottom: 1px solid var(--border); padding-bottom: 8px; margin-bottom: 4px; }
.hist-section:last-child { border-bottom: none; margin-bottom: 0; }
.hist-stats { display: flex; flex-direction: column; gap: 4px; padding: 4px 0 8px; }
.hist-stat-row { display: flex; justify-content: space-between; font-size: 0.85rem; }
.hist-stat-count { font-weight: 700; color: var(--fg); }
.hist-rank { font-size: 0.78rem; color: var(--muted); }

/* ═══════════════════════════════════════════════════════════════
   Yesterday-paneel
═══════════════════════════════════════════════════════════════ */
#yesterday-list        { display: flex; flex-direction: column; gap: 10px; }
.yesterday-summary     { font-size: 0.85rem; line-height: 1.6; }
.yesterday-missed-label  { font-weight: 700; color: var(--bad); }
.yesterday-missed-inline { font-weight: 600; color: var(--bad); }
.yesterday-all-found     { font-weight: 600; color: var(--good); }
.yesterday-hr            { border: none; border-top: 1px solid var(--border); margin: 0; }
.yesterday-chips         { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px 8px; }
.missed-word {
  background: transparent !important;
  border: 1px solid var(--border);
  color: var(--muted) !important;
  text-decoration: line-through;
  font-style: italic;
}
.missed-btn {
  margin-top: 6px;
  padding: 5px 12px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  font-family: var(--font);
  font-size: 0.78rem;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.missed-btn:hover { background: var(--bg2); color: var(--fg); }
.missed-chips     { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.hist-complete    { font-size: 0.78rem; color: var(--good); margin-top: 4px; }

/* ═══════════════════════════════════════════════════════════════
   Combs-paneel (puntanalyse) — placeholder voor latere implementatie
═══════════════════════════════════════════════════════════════ */
#combs-list { display: flex; flex-direction: column; gap: 4px; font-size: 0.85rem; color: var(--muted); }
