.ww-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 1rem;
}
@media (max-width: 900px) { .ww-layout { grid-template-columns: 1fr; } }

/* ---- overlay show/hide (menu screen, round-over screen) ----
   Defined locally rather than relying on sugarcoven.css, since this page
   doesn't load that stylesheet. */
.coven-overlay {
  text-align: center;
  padding: 1.5rem 1rem;
  display: none;
}
.coven-overlay.show { display: block; }

/* ---- menu ---- */
.ww-menu { text-align: center; padding: 2rem 1rem; }
.ww-menu .mode-buttons {
  display: flex; flex-direction: column; gap: 0.6rem;
  max-width: 320px; margin: 1.2rem auto 0;
}
.ww-menu .mode-btn {
  font-family: var(--font-display); font-size: 1rem;
  padding: 0.7rem 1rem; border: 1px solid var(--border-glow);
  background: var(--bg-panel-raised); color: var(--text-primary);
  border-radius: var(--radius-panel); cursor: pointer;
  transition: box-shadow 0.15s ease;
}
.ww-menu .mode-btn:hover { box-shadow: 0 0 16px rgba(176,132,255,0.35); }
.ww-menu .mode-btn small { display: block; font-family: var(--font-body); font-size: 0.8rem; color: var(--text-muted); margin-top: 0.2rem; }

/* ---- timer + score bar ---- */
.ww-statusbar {
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--font-mono); font-size: 0.95rem;
  margin-bottom: 0.8rem; padding: 0.5rem 0.75rem;
  background: var(--bg-panel-raised); border: 1px solid var(--border-glow);
  border-radius: 4px;
}
.ww-statusbar .time.low { color: var(--state-danger); }
.ww-statusbar .score { color: var(--accent-gold); }

/* ---- letter tiles ---- */
.ww-tiles {
  display: flex; justify-content: center; gap: 0.6rem;
  margin: 1.2rem 0; flex-wrap: wrap;
}
.ww-tile {
  width: 56px; height: 56px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-size: 1.5rem;
  background: var(--bg-panel-raised); border: 1px solid var(--accent-primary);
  border-radius: 8px; cursor: pointer; user-select: none;
  transition: transform 0.1s ease, box-shadow 0.15s ease;
}
.ww-tile:hover { box-shadow: 0 0 14px rgba(176,132,255,0.4); }
.ww-tile.used { opacity: 0.25; pointer-events: none; }
.ww-tile:active { transform: scale(0.94); }

/* ---- word-in-progress display ---- */
.ww-current-word {
  text-align: center; font-family: var(--font-display);
  font-size: 1.8rem; letter-spacing: 0.15em;
  min-height: 2.4em; color: var(--accent-gold);
}
.ww-current-word .placeholder { color: var(--text-muted); font-size: 1rem; font-family: var(--font-body); }

.ww-word-actions { display: flex; justify-content: center; gap: 0.5rem; margin-bottom: 1rem; }

/* ---- checklist (counts remaining per length) ---- */
.ww-checklist {
  display: flex; justify-content: center; gap: 1.2rem;
  font-family: var(--font-mono); font-size: 0.85rem;
  color: var(--text-muted); margin-bottom: 1rem;
}
.ww-checklist .done { color: var(--state-online); text-decoration: line-through; }

/* ---- found words list ---- */
.ww-found-list {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: 0.4rem;
  max-height: 160px; overflow-y: auto;
}
.ww-found-list li {
  font-family: var(--font-mono); font-size: 0.8rem;
  background: var(--bg-void); border: 1px solid var(--border-glow);
  border-radius: 4px; padding: 0.2rem 0.5rem; color: var(--state-online);
}

/* ---- toast for correct/invalid/duplicate feedback ---- */
.ww-feedback {
  text-align: center; font-family: var(--font-mono); font-size: 0.85rem;
  min-height: 1.2em; margin-bottom: 0.5rem;
}
.ww-feedback.correct { color: var(--state-online); }
.ww-feedback.invalid { color: var(--state-danger); }
.ww-feedback.duplicate { color: var(--accent-gold); }

.ww-token-toast {
  text-align: center; font-family: var(--font-mono); color: var(--accent-gold);
  font-size: 0.85rem; margin-top: 0.5rem; min-height: 1.2em;
}

/* ---- round-over reveal ---- */
.ww-missed-list { text-align: left; max-height: 200px; overflow-y: auto; font-family: var(--font-mono); font-size: 0.85rem; color: var(--text-muted); }
/* ---- high scores ---- */ 
.coven-leaderboard-tabs {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 0.6rem;
}
.coven-leaderboard-tabs button.active{
color: var(--bg-void);
background: var(--accent-primary);
border-color: var(--accent-primary);
}
.coven-leaderboard-tabs button {
  flex: 1;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 0.35rem;
  border: 1px solid var(--border-glow);
  background: var(--bg-void);
  color: var(--text-muted);
  border-radius: 4px;
  cursor: pointer;
}
