/* ==========================================================================
   Pokemon Codenames – design tokens
   ========================================================================== */

:root {
  --bg: #10131c;
  --bg-grid: #171b28;
  --panel: #1a2030;
  --panel-2: #222a3d;
  --panel-border: #313b52;

  --red: #e0453c;
  --red-dim: #4a2422;
  --red-glow: rgba(224, 69, 60, 0.35);

  --blue: #3e7bc4;
  --blue-dim: #1e2e42;
  --blue-glow: rgba(62, 123, 196, 0.35);

  --neutral: #c9b896;
  --neutral-dim: #3a3628;

  --assassin: #3a1a5c;
  --assassin-dim: #28103f;

  --accent: #f2c14e;
  --accent-dim: #4a3a17;

  --text: #edeae0;
  --text-dim: #9aa1ae;
  --text-faint: #5c6577;

  --font-display: "Space Grotesk", sans-serif;
  --font-mono: "IBM Plex Mono", monospace;
  --font-body: "Inter", sans-serif;

  --radius: 10px;
  --radius-sm: 6px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  background:
    radial-gradient(circle at 15% 0%, rgba(62, 123, 196, 0.08), transparent 45%),
    radial-gradient(circle at 85% 100%, rgba(224, 69, 60, 0.07), transparent 45%),
    var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  margin: 0;
  letter-spacing: -0.01em;
}

button { font-family: var(--font-body); cursor: pointer; }
input, select { font-family: var(--font-body); }
a { color: var(--accent); }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.hidden { display: none !important; }

/* ==========================================================================
   Layout shell
   ========================================================================== */

.app-shell { min-height: 100vh; display: flex; flex-direction: column; }

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid var(--panel-border);
}

.brand { display: flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; }

.brand-ball {
  width: 28px; height: 28px; flex: none;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.4));
}

.brand-name {
  font-family: var(--font-display);
  font-size: 18px;
  letter-spacing: -0.02em;
}

.header-right { display: flex; align-items: center; gap: 12px; }

.room-pill {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-dim);
  display: flex; align-items: center; gap: 8px;
}

.room-pill strong { color: var(--accent); letter-spacing: 0.08em; }

.screen { flex: 1; display: none; padding: 32px 20px 60px; }
.screen.active { display: flex; flex-direction: column; align-items: center; }

.toast-stack {
  position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; gap: 8px; z-index: 100;
  width: min(420px, 90vw);
}

.toast {
  background: var(--panel-2);
  border: 1px solid var(--panel-border);
  border-left: 3px solid var(--red);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--text);
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  animation: toast-in 0.2s ease-out;
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   Landing screen
   ========================================================================== */

.hero { text-align: center; max-width: 480px; margin: 20px 0 36px; }

.hero h1 { font-size: clamp(28px, 6vw, 40px); margin-bottom: 12px; }
.hero p { color: var(--text-dim); font-size: 15px; }

.panel-grid {
  display: grid; grid-template-columns: 1fr; gap: 16px;
  width: 100%; max-width: 420px;
}

@media (min-width: 720px) {
  .panel-grid { grid-template-columns: 1fr 1fr; max-width: 860px; }
}

.dex-card {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  padding: 22px;
  position: relative;
  overflow: hidden;
}

.dex-card::before {
  content: "";
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--red), var(--accent), var(--blue));
}

.dex-card h2 { font-size: 16px; margin-bottom: 4px; }
.dex-card .sub { font-size: 13px; color: var(--text-faint); margin-bottom: 18px; }

.field { margin-bottom: 14px; }

.field label {
  display: block; font-size: 12px; color: var(--text-dim); margin-bottom: 6px;
  font-family: var(--font-mono); letter-spacing: 0.03em;
}

.field input[type="text"],
.field input[type="number"] {
  width: 100%;
  background: var(--bg-grid);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  color: var(--text);
  font-size: 14px;
}

.field input[type="text"]:focus,
.field input[type="number"]:focus { border-color: var(--accent); }

.field input.code-input {
  font-family: var(--font-mono);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-align: center;
  font-size: 18px;
}

.radio-row { display: flex; gap: 8px; flex-wrap: wrap; }

.mode-groups { display: flex; flex-direction: column; gap: 10px; }
.mode-group-label {
  font-size: 11px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--text-dim); margin-bottom: 6px;
}
.mode-group-label .player-count {
  font-weight: 500; letter-spacing: 0.04em; color: var(--text-faint);
  background: var(--accent-dim); border-radius: 999px; padding: 2px 8px; margin-left: 6px;
}

.radio-chip {
  flex: 1 1 90px; text-align: center; padding: 9px 8px;
  border: 1px solid var(--panel-border); border-radius: var(--radius-sm);
  font-size: 13px; color: var(--text-dim); cursor: pointer; user-select: none;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.radio-chip input { display: none; }

.radio-chip.checked { border-color: var(--accent); color: var(--accent); background: var(--accent-dim); }

.gen-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }

.gen-chip {
  text-align: center; padding: 7px 4px;
  border: 1px solid var(--panel-border); border-radius: var(--radius-sm);
  font-family: var(--font-mono); font-size: 12px; color: var(--text-faint);
  cursor: pointer; user-select: none;
}

.gen-chip input { display: none; }
.gen-chip.checked { border-color: var(--blue); color: var(--blue); background: var(--blue-dim); }

.toggle-row { display: flex; align-items: center; justify-content: space-between; padding-top: 4px; }
.toggle-row .field-label { font-size: 13px; color: var(--text-dim); }

.switch { position: relative; width: 38px; height: 21px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }

.switch .track {
  position: absolute; inset: 0; background: var(--panel-border);
  border-radius: 20px; transition: background 0.15s;
}

.switch .track::before {
  content: ""; position: absolute; width: 15px; height: 15px; left: 3px; top: 3px;
  background: var(--text-dim); border-radius: 50%;
  transition: transform 0.15s, background 0.15s;
}

.switch input:checked + .track { background: var(--accent-dim); }
.switch input:checked + .track::before { transform: translateX(17px); background: var(--accent); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: none; border-radius: var(--radius-sm); padding: 11px 18px;
  font-size: 14px; font-weight: 600; font-family: var(--font-body);
  transition: transform 0.1s, filter 0.15s;
}

.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }

.btn-primary { background: var(--accent); color: #241a05; width: 100%; margin-top: 6px; }
.btn-primary:hover:not(:disabled) { filter: brightness(1.08); }

.btn-ghost { background: transparent; border: 1px solid var(--panel-border); color: var(--text-dim); }
.btn-ghost:hover { border-color: var(--text-dim); color: var(--text); }

.btn-mini { padding: 6px 10px; font-size: 12px; }
.btn-red { background: var(--red); color: #fff; }
.btn-blue { background: var(--blue); color: #fff; }

#sound-toggle { font-size: 15px; line-height: 1; padding: 6px 9px; }
#sound-toggle.sound-off { opacity: 0.5; }

.error-text { color: var(--red); font-size: 12px; margin-top: 8px; min-height: 16px; }

/* ==========================================================================
   Lobby screen
   ========================================================================== */

.lobby-wrap { width: 100%; max-width: 760px; display: flex; flex-direction: column; gap: 20px; }

.dex-ticket {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  padding: 20px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  position: relative;
}

.dex-ticket::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px;
  background-image: radial-gradient(circle, var(--bg) 2px, transparent 2px);
  background-size: 14px 100%;
}

.ticket-label {
  font-family: var(--font-mono); font-size: 11px; color: var(--text-faint);
  letter-spacing: 0.15em; text-transform: uppercase; margin-bottom: 4px;
}

.ticket-code { font-family: var(--font-mono); font-size: 30px; letter-spacing: 0.15em; color: var(--accent); }

.lobby-info {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 14px 16px;
  font-size: 13px; color: var(--text-dim); line-height: 1.55;
}

.lobby-info strong { color: var(--text); }

.mode-explainer {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 12px 16px;
  font-size: 12.5px; color: var(--text-dim); line-height: 1.55;
}
.mode-explainer strong { color: var(--text); }

/* ---- Daily puzzle ---- */
.daily-cta {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  background: var(--panel); border: 1px solid var(--panel-border);
  border-left: 3px solid var(--accent); border-radius: var(--radius);
  padding: 16px 18px; margin-bottom: 18px;
}
.daily-cta h2 { margin: 0 0 4px; font-size: 18px; }
.daily-cta .sub { font-size: 13px; color: var(--text-dim); }
.daily-badge {
  font-size: 11px; font-weight: 500; color: var(--text-faint);
  background: var(--accent-dim); border-radius: 999px; padding: 2px 8px; margin-left: 6px; vertical-align: middle;
}
.daily-cta-btns { display: flex; gap: 8px; }

/* Daily is now the hero action – give the CTA a touch more presence. */
.daily-cta { padding: 20px 22px; }
.daily-cta h2 { font-size: 20px; }
.daily-cta .sub { font-size: 13.5px; }

/* "Play with friends" entry on the homepage + its sub-screen. */
.friends-cta {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  background: var(--panel); border: 1px solid var(--panel-border); border-radius: var(--radius);
  padding: 16px 18px;
}
.friends-cta h2 { margin: 0 0 4px; font-size: 17px; }
.friends-cta .sub { font-size: 13px; color: var(--text-dim); max-width: 380px; }
.friends-cta .btn { flex: none; }
.friends-head { max-width: 860px; margin: 8px auto 20px; text-align: center; position: relative; }
.friends-head h1 { font-size: clamp(24px, 5vw, 34px); margin: 6px 0 8px; }
.friends-head .friends-sub { color: var(--text-dim); font-size: 14px; max-width: 520px; margin: 0 auto; }
.friends-head #friends-back-btn { position: absolute; left: 0; top: 0; }
@media (max-width: 560px) {
  .friends-head { text-align: left; padding-top: 40px; }
  .friends-head #friends-back-btn { top: 0; left: 0; }
  .friends-head .friends-sub { margin: 0; }
}

.daily-play-wrap { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; }
.daily-play-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.daily-header-btns { display: flex; gap: 6px; flex-shrink: 0; }
.daily-play-title { font-family: var(--font-display, inherit); font-size: 20px; font-weight: 700; }
.daily-play-sub { font-size: 13px; color: var(--text-dim); margin-top: 2px; }
.daily-statbar {
  display: flex; flex-wrap: wrap; gap: 14px; font-family: var(--font-mono); font-size: 13px;
  color: var(--text-dim); background: var(--panel); border: 1px solid var(--panel-border);
  border-radius: var(--radius-sm); padding: 10px 14px;
}
.daily-statbar strong { color: var(--text); }

.daily-clues { display: flex; flex-wrap: wrap; gap: 8px; }
.daily-clue {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--panel); border: 1px solid var(--panel-border); border-radius: 999px;
  padding: 7px 13px; font-size: 14px;
}
.daily-clue .dc-word { font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.05em; font-weight: 600; }
.daily-clue .dc-num { color: var(--text); font-family: var(--font-mono); font-weight: 600; }
.daily-clue.daily-anti { border-style: dashed; opacity: 0.9; }
.daily-clue .dc-anti-tag { font-size: 11px; color: var(--text-faint); }
/* Colour-coded, tappable clue chips (tap to grey out once you think you've
   placed it). The dot's colour matches the tile-marking palette. */
.daily-clue { cursor: pointer; user-select: none; -webkit-user-select: none; transition: opacity 0.15s, background 0.15s; }
.daily-clue:hover { border-color: var(--accent); }
.daily-clue .dc-dot { width: 12px; height: 12px; border-radius: 50%; flex: none; box-shadow: 0 0 0 1px rgba(0,0,0,0.35) inset; }
.daily-clue.is-done { opacity: 0.4; }
.daily-clue.is-done .dc-word { text-decoration: line-through; color: var(--text-dim); }
.daily-clue .dc-num s { color: var(--text-faint); opacity: 0.7; }
.daily-clue .dc-left { color: var(--accent); font-weight: 700; }

/* Press-&-hold clue popover: pick how many tiles are still to find. */
.clue-count-palette { flex-direction: column; gap: 6px; align-items: stretch; padding: 8px 10px; }
.clue-count-palette .ccp-label {
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.07em; color: var(--text-faint); text-align: center;
}
.clue-count-palette .ccp-row { display: flex; gap: 5px; }
.clue-count-palette .ccp-btn {
  min-width: 30px; height: 32px; border-radius: 7px; border: 1px solid var(--panel-border);
  background: var(--panel-2); color: var(--text); font-family: var(--font-mono); font-weight: 700;
  font-size: 14px; cursor: pointer;
}
.clue-count-palette .ccp-btn:hover { border-color: var(--accent); }
.clue-count-palette .ccp-btn.is-on { background: var(--accent); border-color: var(--accent); color: #10151f; }

/* Player pencil-marks: coloured corner triangles on a tile. */
.tile-notes { position: absolute; inset: 0; pointer-events: none; z-index: 3; }
.note-mark { position: absolute; width: 0; height: 0; filter: drop-shadow(0 0 1px rgba(0,0,0,0.5)); }
.note-mark.note-slot-0 { top: 0; right: 0; border-top: 15px solid var(--nc); border-left: 15px solid transparent; }
.note-mark.note-slot-1 { top: 0; left: 0; border-top: 15px solid var(--nc); border-right: 15px solid transparent; }
.note-mark.note-slot-2 { bottom: 0; right: 0; border-bottom: 15px solid var(--nc); border-left: 15px solid transparent; }
.note-mark.note-slot-3 { bottom: 0; left: 0; border-bottom: 15px solid var(--nc); border-right: 15px solid transparent; }
.note-mark.note-slot-4 { top: 0; left: 50%; transform: translateX(-50%); border-top: 13px solid var(--nc); border-left: 9px solid transparent; border-right: 9px solid transparent; }

/* Long-press colour palette popover. */
.note-palette {
  position: absolute; z-index: 50; display: flex; flex-direction: column; gap: 6px;
  padding: 7px; background: var(--panel); border: 1px solid var(--panel-border);
  border-radius: 12px; box-shadow: 0 8px 24px rgba(0,0,0,0.45);
}
.note-swatch {
  width: 30px; height: 30px; border-radius: 7px; border: 2px solid rgba(255,255,255,0.15);
  cursor: pointer; padding: 0; transition: transform 0.1s, border-color 0.1s;
}
.note-swatch:hover { transform: scale(1.08); }
.note-swatch.is-on { border-color: #fff; box-shadow: 0 0 0 2px var(--accent); }
.note-swatch.note-clear {
  background: var(--panel-2); position: relative;
}
.note-swatch.note-clear::before {
  content: "✕"; position: absolute; inset: 0; display: flex; align-items: center;
  justify-content: center; color: var(--text-dim); font-size: 15px;
}
.clue-lvl { font-size: 10px; color: var(--text-faint); background: var(--accent-dim); border-radius: 999px; padding: 1px 6px; }
.daily-hints-label { width: 100%; font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-faint); margin-top: 4px; }
.daily-hint-row { display: flex; justify-content: center; }

.tile.daily-unpicked { opacity: 0.55; }

/* "Play a test game" affordance + the tutorial how-to-play panel. */
.daily-tutorial-row { margin: -4px 0 2px; }
#daily-tutorial-btn { border-style: dashed; }
.daily-tutorial-panel {
  background: var(--panel); border: 1px solid var(--panel-border);
  border-radius: var(--radius); padding: 14px 16px; margin-bottom: 4px;
}
.daily-tutorial-panel .dtp-title {
  font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.06em;
  font-weight: 700; font-size: 13px; color: var(--accent); margin-bottom: 8px;
}
.daily-tutorial-panel .dtp-steps { margin: 0; padding-left: 20px; display: grid; gap: 7px; }
.daily-tutorial-panel .dtp-steps li { font-size: 13.5px; line-height: 1.45; color: var(--text-dim); }
.daily-tutorial-panel .dtp-steps strong { color: var(--text); }
.daily-tutorial-panel .dtp-foot {
  margin-top: 11px; font-size: 13px; color: var(--text-faint); font-style: italic;
}

.daily-result {
  background: var(--panel); border: 1px solid var(--panel-border); border-radius: var(--radius);
  padding: 18px; text-align: center; display: flex; flex-direction: column; gap: 10px; align-items: center;
}
.daily-result-title { font-size: 20px; font-weight: 700; }
.daily-result-line { font-family: var(--font-mono); font-size: 13px; color: var(--text-dim); }
.daily-streak { margin-top: 6px; font-size: 15px; font-weight: 600; color: var(--text); }
.daily-streak .ds-best { color: var(--text-dim); font-weight: 500; font-size: 13px; }
.daily-streak .ds-hint { color: var(--text-faint); font-weight: 400; font-size: 12px; }
.daily-streak.ds-muted { font-size: 13px; font-weight: 500; color: var(--text-dim); }
.daily-streak-line {
  margin-top: 8px; font-size: 13px; color: var(--text-dim);
  background: var(--accent-dim); border-radius: 8px; padding: 6px 10px; display: inline-block;
}
.daily-streak-line strong { color: var(--text); }
.daily-result-btns { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.daily-rate-label { font-size: 12px; color: var(--text-dim); margin-top: 4px; }
.daily-rate-row { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.daily-rate.chosen { border-color: var(--accent); color: var(--accent); background: var(--accent-dim); }
.daily-rate-follow {
  margin: 10px auto 2px; max-width: 320px; font-size: 13.5px; line-height: 1.5;
  color: var(--text-dim); background: var(--accent-dim);
  border: 1px solid var(--panel-border); border-radius: 10px; padding: 9px 12px;
}
.daily-rate-follow strong { color: var(--text); }
.btn.share-pulse { animation: sharePulse 1.3s ease-in-out 3; }
@keyframes sharePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(63, 182, 224, 0); }
  50% { box-shadow: 0 0 0 5px rgba(63, 182, 224, 0.28); }
}

/* QA overview grid (dashboard of upcoming boards) */
.qa-wrap { max-width: 640px; margin: 0 auto; padding: 18px 16px; }
.qa-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 10px; }
.qa-title { font-size: 20px; font-weight: 700; }
.qa-sub { font-size: 13px; color: var(--text-dim); margin-top: 2px; }
.qa-legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12px; color: var(--text-dim); margin-bottom: 16px; }
.qa-key { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 4px; vertical-align: -1px; }
.qa-blue { background: #3fb6e0; }
.qa-green { background: #46c26a; }
.qa-red { background: #e5484d; }
.qa-black { background: var(--panel-2); border: 1px solid var(--panel-border); }
.qa-grid { display: flex; flex-direction: column; gap: 8px; }

/* QA usage-stats panel */
.qa-stats { margin-top: 28px; border-top: 1px solid var(--panel-border); padding-top: 18px; }
.qa-stats-title { font-family: var(--font-display); font-size: 18px; font-weight: 700; }
.qa-stats-note { font-size: 12px; color: var(--text-faint); margin-top: 4px; }
.qa-stats-loading { font-size: 13px; color: var(--text-dim); margin: 8px 0; }
.qa-stats-sec { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); margin: 18px 0 8px; }
.qa-stats-n { color: var(--text-faint); }
.qa-stats-tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.qa-stats-tbl th { text-align: left; font-weight: 600; color: var(--text-dim); padding: 4px 8px; border-bottom: 1px solid var(--panel-border); }
.qa-stats-tbl td { padding: 6px 8px; border-bottom: 1px solid rgba(255,255,255,0.05); }
.qa-stats-tbl td:not(:first-child), .qa-stats-tbl th:not(:first-child) { text-align: right; font-variant-numeric: tabular-nums; }
.qa-rate-row { display: flex; align-items: center; gap: 10px; margin: 6px 0; font-size: 13px; }
.qa-rate-lbl { flex: 0 0 118px; color: var(--text-dim); }
.qa-rate-bar { flex: 1; height: 8px; background: rgba(255,255,255,0.06); border-radius: 999px; overflow: hidden; }
.qa-rate-bar i { display: block; height: 100%; background: var(--accent); border-radius: 999px; }
.qa-rate-num { flex: 0 0 74px; text-align: right; font-variant-numeric: tabular-nums; color: var(--text); }
.qa-rate-num em { color: var(--text-faint); font-style: normal; }
.qa-row { display: grid; grid-template-columns: 96px 1fr 1fr; gap: 8px; align-items: stretch; }
.qa-date { font-size: 12px; color: var(--text-dim); font-family: var(--font-mono); display: flex; align-items: center; }
.qa-cell {
  border-radius: 8px; padding: 7px 10px; min-height: 46px;
  display: flex; flex-direction: column; justify-content: center; color: #fff;
  border: 1px solid transparent;
}
.qa-cell .qa-cell-pool { font-size: 10px; text-transform: uppercase; letter-spacing: 0.05em; opacity: 0.85; }
.qa-cell .qa-cell-diff { font-size: 12.5px; font-weight: 600; }
.qa-cell.qa-blue { cursor: pointer; }
.qa-cell.qa-blue:hover { filter: brightness(1.12); }
.qa-cell.qa-black { color: var(--text-faint); background: var(--panel-2); border: 1px dashed var(--panel-border); }

/* QA / playtest feedback note (change #5) */
.qa-note {
  width: 100%; box-sizing: border-box; margin: 8px 0 2px;
  padding: 8px 10px; border-radius: 8px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  font: inherit; font-size: 13px; resize: vertical; min-height: 52px;
}
.qa-note:focus { outline: none; border-color: var(--accent); }

/* Difficulty badge (derived from the clue-category spread) */
.daily-diff {
  font-size: 12px; font-weight: 700; letter-spacing: 0.03em;
  border-radius: 999px; padding: 2px 10px; margin-left: 8px; vertical-align: middle;
  color: #fff;
}
.daily-diff.diff-easy        { background: #2e9e5b; }
.daily-diff.diff-medium      { background: #3f8fd0; }
.daily-diff.diff-challenging { background: #c58a1c; }
.daily-diff.diff-hard        { background: #d1622b; }
.daily-diff.diff-brutal      { background: #c23b3b; }
.daily-diff.diff-evil        { background: #7d2fb8; }
.daily-diff.diff-example     { background: var(--neutral-dim); color: var(--text-dim); }

/* End-of-game "what each clue meant" reveal */
.daily-answers {
  width: 100%; text-align: left; background: var(--bg, rgba(0,0,0,0.15));
  border: 1px solid var(--panel-border); border-radius: var(--radius-sm);
  padding: 12px 14px; display: flex; flex-direction: column; gap: 6px;
}
.daily-answers-label {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--text-faint); margin-bottom: 2px;
}
.daily-answer-row { display: flex; flex-direction: column; gap: 3px; font-size: 13px; }
.daily-answer-row + .daily-answer-row { border-top: 1px solid var(--panel-border); padding-top: 6px; }
.daily-answer-row .da-line { display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; }
.daily-answer-row .da-clue {
  font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.05em;
  font-weight: 600; min-width: 120px; color: var(--text);
}
.daily-answer-row .da-num { color: var(--text-faint); }
.daily-answer-row .da-names { color: var(--text-dim); }
.daily-answer-row .da-why { color: var(--text-faint); font-size: 12px; line-height: 1.4; }
.daily-answers-sublabel {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--text-faint); margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--panel-border);
}
.daily-answer-row.da-hint-row .da-clue { color: var(--text-dim); font-weight: 600; }
/* a revealed-hint row shouldn't inherit the solid divider from the clue above */
.daily-answers-sublabel + .daily-answer-row { border-top: none; padding-top: 0; }

.teams-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.team-col {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  padding: 16px;
}

.team-col.team-red { border-top: 3px solid var(--red); }
.team-col.team-blue { border-top: 3px solid var(--blue); }

.team-col h3 { font-size: 14px; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 12px; }
.team-col.team-red h3 { color: var(--red); }
.team-col.team-blue h3 { color: var(--blue); }

.role-slot {
  font-size: 11px; color: var(--text-faint); font-family: var(--font-mono);
  text-transform: uppercase; letter-spacing: 0.08em; margin: 10px 0 4px;
}

.player-chip {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 10px; background: var(--bg-grid); border-radius: var(--radius-sm);
  font-size: 13px; margin-bottom: 6px;
}

.player-chip .chip-right { display: inline-flex; align-items: center; gap: 8px; }

.player-chip .host-badge {
  font-family: var(--font-mono); font-size: 10px; color: var(--accent);
  border: 1px solid var(--accent-dim); padding: 1px 5px; border-radius: 4px;
}

.remove-seat {
  background: transparent; border: 1px solid var(--panel-border);
  color: var(--text-dim); width: 20px; height: 20px; line-height: 1;
  border-radius: 4px; font-size: 14px; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
}

.remove-seat:hover { border-color: var(--red); color: var(--red); }

.empty-slot {
  padding: 8px 10px; border: 1px dashed var(--panel-border);
  border-radius: var(--radius-sm); font-size: 12px; color: var(--text-faint); margin-bottom: 6px;
}

.seat-btns { display: flex; gap: 6px; margin-top: 10px; }
.seat-btns .btn { font-size: 12px; padding: 8px 10px; flex: 1; }

.host-panel {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  padding: 18px 20px;
}

.host-panel h3 { font-size: 14px; color: var(--text-dim); margin-bottom: 14px; text-transform: uppercase; letter-spacing: 0.05em; }

.waiting-note { text-align: center; color: var(--text-faint); font-size: 13px; padding: 16px; }

/* ==========================================================================
   Game screen
   ========================================================================== */

.game-wrap { width: 100%; max-width: 920px; display: flex; flex-direction: column; gap: 16px; }

.turn-banner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px; border-radius: var(--radius);
  background: var(--panel); border: 1px solid var(--panel-border);
  border-left: 4px solid var(--text-faint);
  transition: border-color 0.2s, background 0.2s;
}

.turn-banner.team-red { border-left-color: var(--red); background: linear-gradient(90deg, var(--red-dim), var(--panel) 40%); }
.turn-banner.team-blue { border-left-color: var(--blue); background: linear-gradient(90deg, var(--blue-dim), var(--panel) 40%); }

.turn-banner .turn-label {
  font-family: var(--font-mono); font-size: 11px; color: var(--text-faint);
  text-transform: uppercase; letter-spacing: 0.12em; margin-bottom: 3px;
}

.turn-banner .turn-value { font-family: var(--font-display); font-size: 18px; }
.turn-banner.team-red .turn-value { color: var(--red); }
.turn-banner.team-blue .turn-value { color: var(--blue); }

.turn-timer {
  font-family: var(--font-mono); font-size: 12px; color: var(--text-dim); margin-top: 4px;
}

.clue-readout { text-align: right; }

.clue-word {
  font-family: var(--font-mono); font-size: 20px; color: var(--accent);
  text-transform: uppercase; letter-spacing: 0.05em;
}

.clue-count { font-size: 12px; color: var(--text-dim); }

.clue-form {
  display: flex; flex-wrap: wrap; gap: 10px;
  background: var(--panel); border: 1px solid var(--panel-border);
  border-radius: var(--radius); padding: 14px; align-items: flex-end;
}

.clue-form .field { flex: 1 1 200px; min-width: 0; margin-bottom: 0; }
.clue-form .num-field { flex: 0 0 80px; }
.clue-form .num-field input { text-align: center; }
.clue-form button[type="submit"] { flex: 0 0 auto; white-space: nowrap; }

@media (max-width: 560px) {
  .clue-form { flex-direction: column; align-items: stretch; }
  .clue-form .field,
  .clue-form .num-field,
  .clue-form button[type="submit"] { flex: 1 1 auto; width: 100%; }
}

.board { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.lobby-board { opacity: 0.98; }

@media (max-width: 560px) {
  .board { gap: 5px; }
  .peek-badge { display: none; }
  .tile .tile-img-wrap { height: 60px; }
  .tile .tile-name {
    /* Single line at a readable base; JS (_fitBoardNames) shrinks the font just
       enough for long names to fit, so every tile stays the same size and the
       full Pokémon name is always shown (ellipsis only as a last resort). */
    font-size: 9px;
    line-height: 1.15;
    letter-spacing: 0;
    padding: 4px 2px 5px;
  }
}

.tile {
  position: relative;
  background: var(--panel-2);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: pointer;
  /* long-press opens the note palette, so suppress the iOS image-save callout
     and text selection that a press-and-hold would otherwise trigger */
  -webkit-touch-callout: none; user-select: none; -webkit-user-select: none;
  display: flex;
  flex-direction: column;
  transition: transform 0.1s, border-color 0.15s;
}

.tile:hover:not(.revealed):not(.locked) { border-color: var(--accent); transform: translateY(-2px); }
.tile.locked { cursor: default; }

.tile .tile-img-wrap {
  flex: none; height: 84px;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-grid); padding: 4px;
}

@media (min-width: 561px) {
  .tile .tile-img-wrap { height: 66px; }
}

.tile img {
  max-width: 100%;
  max-height: 100%;
  image-rendering: auto;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
}

.board.no-images .tile-img-wrap { display: none; }
.board.no-images .tile { min-height: 46px; justify-content: center; }
.board.no-images .tile-name { white-space: normal; font-size: 11px; padding: 10px 4px; }

.tile .tile-name {
  font-family: var(--font-mono); font-size: 9px; text-align: center;
  padding: 4px 2px 5px; color: var(--text-dim);
  text-transform: uppercase; letter-spacing: 0.03em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.tile[data-peek="red"] { border: 3px solid var(--red); background: linear-gradient(180deg, var(--red-dim), var(--panel-2) 70%); }
.tile[data-peek="blue"] { border: 3px solid var(--blue); background: linear-gradient(180deg, var(--blue-dim), var(--panel-2) 70%); }
.tile[data-peek="neutral"] { border: 3px solid var(--neutral); background: linear-gradient(180deg, var(--neutral-dim), var(--panel-2) 70%); }
.tile[data-peek="assassin"] { border: 3px solid var(--assassin); background: linear-gradient(180deg, var(--assassin-dim), var(--panel-2) 70%); }

.peek-badge {
  position: absolute; top: 5px; left: 5px; width: 20px; height: 20px;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-size: 11px; font-weight: 700;
  color: var(--bg); z-index: 3;
}

.tile[data-peek="red"] .peek-badge { background: var(--red); }
.tile[data-peek="blue"] .peek-badge { background: var(--blue); }
.tile[data-peek="neutral"] .peek-badge { background: var(--neutral); }
.tile[data-peek="assassin"] .peek-badge { background: var(--assassin); color: var(--text); }

.tile.revealed .tile-name { color: rgba(255,255,255,0.75); }

.tile.revealed[data-colour="red"] { background: var(--red); border-color: var(--red); }
.tile.revealed[data-colour="blue"] { background: var(--blue); border-color: var(--blue); }
.tile.revealed[data-colour="neutral"] { background: var(--neutral-dim); border-color: var(--neutral); }
.tile.revealed[data-colour="assassin"] { background: var(--assassin); border-color: var(--assassin); }

.tile.revealed .tile-img-wrap { background: rgba(0,0,0,0.25); }
.tile.revealed img { opacity: 0.55; }

.tile.scan-sweep::before {
  content: ""; position: absolute; top: 0; bottom: 0; left: -30%; width: 30%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.55), transparent);
  animation: scan-sweep 0.55s ease-out both;
  animation-delay: var(--sweep-delay, 0s); z-index: 2;
}

@keyframes scan-sweep { from { left: -30%; } to { left: 100%; } }

.tile-count-row {
  display: flex; justify-content: center; gap: 24px;
  font-family: var(--font-mono); font-size: 13px; color: var(--text-dim);
}

.tile-count-row .count-red { color: var(--red); }
.tile-count-row .count-blue { color: var(--blue); }
.tile-count-row #round-count { color: var(--accent); }

.board-legend {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 16px;
  font-family: var(--font-mono); font-size: 11px; color: var(--text-dim);
}
.board-legend span { display: inline-flex; align-items: center; gap: 6px; }
.board-legend .lk { width: 12px; height: 12px; border-radius: 3px; border: 2px solid; display: inline-block; }
.board-legend .lk-red { border-color: var(--red); }
.board-legend .lk-blue { border-color: var(--blue); }
.board-legend .lk-neutral { border-color: var(--neutral); }
.board-legend .lk-assassin { border-color: var(--assassin); }

.clue-log {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  padding: 12px 16px;
}

.clue-log-title {
  font-family: var(--font-mono); font-size: 11px; color: var(--text-faint);
  text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 8px;
}

#clue-log-list { display: flex; flex-direction: column; gap: 5px; }

.clue-log-row {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-mono); font-size: 13px; color: var(--text);
}

.clue-log-row .cl-dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.clue-log-row .cl-red { background: var(--red); }
.clue-log-row .cl-blue { background: var(--blue); }
.clue-log-row .cl-turn { font-size: 11px; color: var(--text-faint); min-width: 46px; }
.clue-log-row .cl-word { text-transform: uppercase; letter-spacing: 0.04em; }
.clue-log-row .cl-num { color: var(--text-faint); }

.clue-log-row.clue-guess { padding-left: 18px; font-size: 12px; opacity: 0.85; }
.cl-correct { color: #2cbe4e; font-weight: 700; min-width: 14px; }
.cl-wrong   { color: #e05c5c; font-weight: 700; min-width: 14px; }
.cl-ai      { min-width: 14px; }
.cl-guess-name { flex: 1; }
.cl-colour-red     { color: var(--red); font-size: 11px; }
.cl-colour-blue    { color: var(--blue); font-size: 11px; }
.cl-colour-neutral { color: var(--text-faint); font-size: 11px; }
.cl-colour-assassin{ color: #7c3aed; font-size: 11px; }

.share-row { display: flex; justify-content: center; }
.btn-share {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 22px; border-radius: var(--radius-sm);
  font-family: var(--font-mono); font-size: 12px; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.08em; cursor: pointer;
  border: 1.5px solid var(--blue); color: var(--blue); background: transparent;
  transition: background 0.15s, color 0.15s;
}
.btn-share:hover { background: var(--blue); color: #fff; }

.game-actions { display: flex; justify-content: center; gap: 10px; }

.spy-banner {
  text-align: center; font-family: var(--font-mono); font-size: 11px; color: var(--assassin);
  border: 1px solid var(--assassin-dim); background: var(--assassin-dim);
  padding: 6px 10px; border-radius: var(--radius-sm);
  text-transform: uppercase; letter-spacing: 0.1em;
}

.observer-banner {
  text-align: center; font-family: var(--font-mono); font-size: 11px; color: var(--neutral);
  border: 1px solid var(--neutral-dim); background: var(--neutral-dim);
  padding: 6px 10px; border-radius: var(--radius-sm);
  text-transform: uppercase; letter-spacing: 0.1em;
}

.game-teams {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
}

.game-teams .gt-col {
  background: var(--panel); border: 1px solid var(--panel-border);
  border-radius: var(--radius-sm); padding: 10px 12px;
}

.game-teams .gt-col.gt-red { border-top: 2px solid var(--red); }
.game-teams .gt-col.gt-blue { border-top: 2px solid var(--blue); }
.game-teams .gt-col.gt-single { grid-column: 1 / -1; border-top: 2px solid var(--blue); }

.game-teams .gt-title {
  font-family: var(--font-mono); font-size: 10px; text-transform: uppercase;
  letter-spacing: 0.08em; margin-bottom: 6px;
}

.game-teams .gt-col.gt-red .gt-title { color: var(--red); }
.game-teams .gt-col.gt-blue .gt-title, .game-teams .gt-col.gt-single .gt-title { color: var(--blue); }

.game-teams .gt-player {
  font-size: 12px; color: var(--text-dim); padding: 2px 0;
  display: flex; align-items: center; gap: 6px;
}

.game-teams .gt-player .gt-role {
  font-family: var(--font-mono); font-size: 9px; color: var(--text-faint);
  text-transform: uppercase; letter-spacing: 0.05em;
}

.quick-join-overlay {
  position: fixed; inset: 0; background: rgba(10, 12, 18, 0.92);
  display: flex; align-items: center; justify-content: center; z-index: 60;
  backdrop-filter: blur(4px); padding: 20px;
}
.quick-join-card {
  background: var(--panel); border: 1px solid var(--panel-border);
  border-radius: var(--radius); padding: 36px 40px; text-align: center;
  max-width: 360px; width: 100%;
}
.quick-join-code {
  font-family: var(--font-mono); font-size: 28px; font-weight: 700;
  letter-spacing: 0.18em; color: var(--accent); margin-bottom: 12px;
}
.quick-join-card h2 { margin: 0 0 6px; }
.quick-join-card p { color: var(--text-dim); font-size: 14px; margin: 0 0 20px; }
.quick-join-card .field { text-align: left; }
.quick-join-card .btn { width: 100%; margin-top: 12px; }

.win-overlay {
  position: fixed; inset: 0; background: rgba(10, 12, 18, 0.85);
  display: flex; align-items: center; justify-content: center; z-index: 50;
  backdrop-filter: blur(3px);
}

.win-card {
  background: var(--panel); border: 1px solid var(--panel-border);
  border-radius: var(--radius); padding: 40px 48px; text-align: center; max-width: 380px;
}

.win-card .win-label {
  font-family: var(--font-mono); font-size: 12px; color: var(--text-faint);
  text-transform: uppercase; letter-spacing: 0.15em; margin-bottom: 8px;
}

.win-card h2 { font-size: 28px; margin-bottom: 12px; }
.win-card.win-red h2 { color: var(--red); }
.win-card.win-blue h2 { color: var(--blue); }

.win-subtitle { color: var(--text-dim); font-size: 14px; line-height: 1.5; margin-bottom: 22px; }
.win-card .btn + .btn { margin-top: 10px; }

/* ---- Daily completion share pop-up ---- */
.dshare-overlay {
  position: fixed; inset: 0; background: rgba(10, 12, 18, 0.85);
  display: flex; align-items: center; justify-content: center; z-index: 60;
  backdrop-filter: blur(3px); padding: 16px; overflow-y: auto;
}
.dshare-card {
  background: var(--panel); border: 1px solid var(--panel-border);
  border-radius: var(--radius); padding: 26px 26px 20px; text-align: center;
  width: 100%; max-width: 380px; margin: auto;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.5);
}
.dshare-title {
  font-family: var(--font-display); font-size: 22px; font-weight: 700;
  color: var(--text); margin-bottom: 16px;
}
.dshare-visual {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 8px;
  max-width: 260px; margin: 0 auto 6px;
}
.dtrail-sq {
  width: 26px; height: 26px; border-radius: 6px; flex: none;
  display: inline-flex; align-items: center; justify-content: center; font-size: 16px;
}
.dtrail-sq.hit { background: #3fbf4f; }
.dtrail-sq.miss { background: var(--red); }
.dtrail-sq.assassin { background: #12151f; }
.dshare-caption {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--text-faint); margin: 12px 0 4px;
}
.dshare-headline {
  font-family: var(--font-display); font-size: 26px; font-weight: 700; color: var(--text);
}
.dshare-sub { color: var(--text-dim); font-size: 14px; margin-top: 4px; }
.dshare-rank { margin-top: 8px; font-size: 15px; font-weight: 600; }
.dshare-rank strong { color: #ffd34d; }
.dshare-streak {
  margin-top: 10px; font-size: 14px; color: var(--text-dim);
  background: rgba(255, 179, 71, 0.1); border: 1px solid rgba(255, 179, 71, 0.25);
  border-radius: 10px; padding: 7px 10px;
}
.dshare-streak strong { color: #ffb347; }
.dshare-btns { display: flex; flex-direction: column; gap: 10px; margin-top: 20px; }
.dshare-close { display: block; width: 100%; margin-top: 12px; }

/* ---- Daily welcome pop-up ---- */
.dwelcome-overlay {
  position: fixed; inset: 0; background: rgba(10, 12, 18, 0.86);
  display: flex; align-items: center; justify-content: center; z-index: 70;
  backdrop-filter: blur(3px); padding: 16px; overflow-y: auto;
}
.dwelcome-card {
  background: var(--panel); border: 1px solid var(--panel-border);
  border-radius: var(--radius); padding: 28px 26px 22px; text-align: center;
  width: 100%; max-width: 380px; margin: auto;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.5);
}
.dwelcome-logo { display: flex; justify-content: center; margin-bottom: 12px; }
.dwelcome-title { font-family: var(--font-display); font-size: 23px; font-weight: 700; line-height: 1.2; }
.dwelcome-date { font-size: 14px; color: var(--text-dim); margin-top: 8px; }
.dwelcome-diff { font-size: 15px; margin-top: 6px; }
.dwelcome-blurb { font-size: 14px; color: var(--text-dim); line-height: 1.5; margin: 16px 0 20px; }
.dwelcome-start { display: block; width: 100%; font-size: 16px; padding: 13px; }
.dwelcome-tut { display: block; width: 100%; margin-top: 10px; }

/* ---- Interactive tutorial coach ---- */
.coach {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 14px;
  width: calc(100% - 28px); max-width: 520px; z-index: 65;
}
.coach.coach-top { bottom: auto; top: 12px; }
.coach {
  background: var(--panel); border: 1px solid var(--accent);
  border-radius: 16px; padding: 16px 18px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.55);
}
.coach-progress {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--text-faint); margin-bottom: 6px;
}
.coach-title { font-family: var(--font-display); font-size: 18px; font-weight: 700; margin-bottom: 4px; }
.coach-body { font-size: 14px; color: var(--text-dim); line-height: 1.5; }
.coach-body strong { color: var(--text); }
.coach-nudge {
  margin-top: 10px; font-size: 13px; font-weight: 600; color: var(--accent);
  animation: coachPulse 1.4s ease-in-out infinite;
}
@keyframes coachPulse { 0%, 100% { opacity: 0.55; } 50% { opacity: 1; } }
.coach-btns { display: flex; gap: 8px; margin-top: 14px; align-items: center; }
.coach-btns #coach-next { margin-left: auto; }
.coach-spotlight {
  position: relative; z-index: 66;
  outline: 3px solid var(--accent); outline-offset: 3px;
  border-radius: 12px; box-shadow: 0 0 0 6px rgba(245, 165, 36, 0.18);
  transition: outline-color 0.2s;
}

.waiting-inline {
  text-align: center; color: var(--text-faint); font-size: 13px;
  font-family: var(--font-mono); padding: 10px;
}

/* ==========================================================================
   Disclaimer footer
   ========================================================================== */

.disclaimer-footer {
  text-align: center; padding: 24px 20px; font-size: 11px; color: var(--text-faint);
  line-height: 1.6; border-top: 1px solid var(--panel-border);
  max-width: 720px; margin: 0 auto;
}

.disclaimer-footer a { color: var(--text-faint); text-decoration: underline; }

/* ---- Daily comments (finish screen) ---- */
.daily-comments { margin-top: 22px; text-align: left; border-top: 1px solid var(--panel-border); padding-top: 16px; }
.dc-title { font-family: var(--font-display); font-size: 17px; font-weight: 700; margin-bottom: 10px; }
.dc-n { color: var(--text-faint); font-weight: 500; font-size: 14px; }
.dc-form { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.dc-form input, .dc-form textarea {
  width: 100%; box-sizing: border-box; background: var(--bg, #0e1119); color: var(--text);
  border: 1px solid var(--panel-border); border-radius: 10px; padding: 9px 11px;
  font: inherit; font-size: 14px; resize: vertical;
}
.dc-form-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.dc-count { font-size: 12px; color: var(--text-faint); font-variant-numeric: tabular-nums; }
.dc-err { font-size: 13px; color: var(--red); }
.dc-note { font-size: 13px; color: var(--text-dim); margin-bottom: 12px; }
.dc-list { display: flex; flex-direction: column; gap: 8px; }
.dc-item { background: var(--panel); border: 1px solid var(--panel-border); border-radius: 10px; padding: 9px 12px; }
.dc-item.dc-mine { border-color: var(--accent); }
.dc-meta { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-faint); margin-bottom: 4px; }
.dc-meta strong { color: var(--text); font-size: 13px; }
.dc-you { margin-left: auto; font-size: 11px; color: var(--accent); }
.dc-report { margin-left: auto; background: none; border: none; color: var(--text-faint); font-size: 11px; cursor: pointer; text-decoration: underline; padding: 0; }
.dc-body { font-size: 14px; color: var(--text); line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.dc-empty { font-size: 13px; color: var(--text-dim); }

/* ---- QA comment moderation ---- */
.qa-comments { margin-top: 28px; border-top: 1px solid var(--panel-border); padding-top: 18px; }
.qa-cmt { background: var(--panel); border: 1px solid var(--panel-border); border-radius: 10px; padding: 9px 12px; margin-top: 8px; }
.qa-cmt-hidden { border-color: var(--red); }
.qa-cmt-meta { font-size: 12px; color: var(--text-faint); }
.qa-cmt-meta strong { color: var(--text); }
.qa-cmt-flag { color: var(--red); font-weight: 600; margin-left: 4px; }
.qa-cmt-body { font-size: 14px; margin: 5px 0 7px; white-space: pre-wrap; overflow-wrap: anywhere; }
.qa-cmt-actions { display: flex; gap: 6px; }
.dc-form-row .btn { flex: none; width: auto; }

/* ---- QA dashboard navigation ---- */
.qa-nav {
  position: sticky; top: 0; z-index: 20; display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 8px; margin: 14px 0 22px; padding: 10px 0; background: rgba(18, 21, 31, 0.88); backdrop-filter: blur(6px);
}
.qa-nav-btn {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  background: var(--panel); border: 1px solid var(--panel-border); border-radius: 12px;
  color: var(--text); font: inherit; font-size: 13px; font-weight: 600; line-height: 1.25;
  padding: 12px 8px; cursor: pointer; text-align: center;
}
.qa-nav-btn:hover { border-color: var(--accent); }
.qa-nav-badge {
  font-size: 11px; font-weight: 600; color: #12151f; background: var(--accent);
  border-radius: 999px; padding: 1px 8px;
}
.qa-sec-title, #qa-comments, #qa-stats { scroll-margin-top: 96px; }
.qa-sec-title { font-family: var(--font-display); font-size: 18px; font-weight: 700; }
.qa-sec-sub { margin-bottom: 10px; }

/* ---- Holiday themes ---- */
.theme-banner, .dwelcome-theme {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  background: linear-gradient(90deg, rgba(245,165,36,0.16), rgba(193,80,200,0.16));
  border: 1px solid rgba(245,165,36,0.35); border-radius: 12px;
  padding: 9px 14px; font-size: 14px; font-weight: 600; color: var(--text);
  text-align: center; line-height: 1.35;
}
.theme-banner { margin-bottom: 14px; }
.dwelcome-theme { margin: 0 0 12px; font-size: 13.5px; }
.tb-emoji { font-size: 20px; line-height: 1; flex: none; }

/* Snow (Christmas Day) */
#snowfall { position: fixed; inset: 0; pointer-events: none; z-index: 40; overflow: hidden; }
#snowfall i {
  position: absolute; top: -12px; border-radius: 50%; background: rgba(255,255,255,0.85);
  box-shadow: 0 0 4px rgba(255,255,255,0.6);
  animation-name: snowfall; animation-timing-function: linear; animation-iteration-count: infinite;
}
@keyframes snowfall {
  0%   { transform: translate(0, -12px); opacity: 0; }
  10%  { opacity: 1; }
  100% { transform: translate(var(--drift, 0px), 105vh); opacity: 0.9; }
}

/* April Fools "Ditto Day": Pokémon that are really Ditto in disguise */
.tile-ditto .tile-img-wrap { position: relative; }
.tile-ditto .tile-img-wrap img {
  filter: grayscale(1) sepia(1) saturate(3.2) hue-rotate(220deg) brightness(1.08);
}
.tile-ditto .ditto-face {
  position: absolute; left: 50%; top: 42%; width: 38%; transform: translate(-50%, -50%);
  pointer-events: none;
}
.qa-cmt-older { margin-top: 10px; }
