/* ── Reset & base ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --bg:       #f8f8f8;
  --surface:  #ffffff;
  --border:   #e0e0e0;
  --text:     #1a1a1a;
  --muted:    #888;
  --accent:   #2a9d8f;
  --accent-l: #e0f5f3;
  --correct:  #52b788;
  --wrong:    #e63946;
  --dim:      #ccc;
  --font:      'Hiragino Sans', 'Meiryo', 'Yu Gothic', 'Noto Sans JP', sans-serif;
  --kana-font: 'Hiragino Sans', 'Meiryo', 'Yu Gothic', 'Noto Sans JP', sans-serif;
  --radius:   12px;
}
/* ── Dark theme ────────────────────────────────────────────────── */
[data-theme="dark"] {
  --bg:       #131f24;
  --surface:  #1e2e35;
  --border:   #2d4550;
  --text:     #f1f7fb;
  --muted:    #6b8896;
  --accent:   #49c0f8;
  --accent-l: #1a3a4a;
  --correct:  #58c77a;
  --wrong:    #ff5560;
  --dim:      #2d4550;
}
/* ── Font options (kana only — UI/romaji text stays in system sans) */
/* Each option sets --kana-font; body and UI elements are unaffected */
/* Google Fonts are loaded lazily via JS when a font is first selected */
[data-font="klee"]     { --kana-font: 'Klee One', 'Hiragino Sans', cursive; }
[data-font="zen"]      { --kana-font: 'Zen Maru Gothic', 'Hiragino Sans', sans-serif; }
[data-font="noto"]     { --kana-font: 'Noto Sans JP', 'Hiragino Sans', sans-serif; }
[data-font="bizud"]    { --kana-font: 'BIZ UDMincho', 'Yu Mincho', serif; }
[data-font="shippori"] { --kana-font: 'Shippori Mincho', 'Hiragino Mincho Pro', serif; }
[data-font="mplus"]    { --kana-font: 'M PLUS 1', 'Meiryo', sans-serif; }
[data-font="sawarabi"] { --kana-font: 'Sawarabi Gothic', 'Hiragino Sans', sans-serif; }
[data-font="zenold"]   { --kana-font: 'Zen Old Mincho', 'Yu Mincho', serif; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  height: 100dvh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* ── Screens ───────────────────────────────────────────────────── */
.screen { display: none; flex-direction: column; flex: 1; min-height: 0; overflow: hidden; }
.screen.active { display: flex; }

/* ── Tabs (Hiragana / Katakana) ────────────────────────────────── */
.tabs {
  display: flex;
  border-bottom: 2px solid var(--border);
  background: var(--surface);
  flex-shrink: 0;
}
.tab-btn {
  flex: 1;
  padding: 14px 8px;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: none;
  background: none;
  color: var(--muted);
  cursor: pointer;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  touch-action: manipulation;
  transition: color 0.15s, border-color 0.15s;
}
.tab-btn.active { color: var(--accent); border-bottom-color: var(--accent); }

/* ── Home layout ───────────────────────────────────────────────── */
#screen-home .body {
  display: flex;
  flex: 1;
  overflow: hidden;
}

/* Groups sidebar */
.groups-sidebar {
  width: 160px;
  flex-shrink: 0;
  background: var(--surface);
  border-right: 1px solid var(--border);
  overflow-y: auto;
  padding: 12px 0;
}
.groups-sidebar h3 {
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0 16px 8px;
}
/* Section divider between Hiragana / Dakuten / Small Kana */
.group-section-divider {
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 10px 16px 6px;
  border-top: 1px solid var(--border);
  margin-top: 4px;
}
.group-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 12px 16px;
  border: none;
  background: none;
  font-family: var(--font);
  font-size: 0.9rem;
  color: var(--text);
  cursor: pointer;
  touch-action: manipulation;
  text-align: left;
  transition: background 0.12s;
}
.group-btn:hover { background: var(--bg); }
.group-btn.active { background: var(--accent-l); color: var(--accent); font-weight: 700; }
.group-btn .dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--border);
  flex-shrink: 0;
}
.group-btn.active .dot { background: var(--accent); }
.group-btn.incomplete { color: #c07a00; }
.group-btn.incomplete .dot { background: #c07a00; }
.group-btn.disabled { opacity: 0.35; cursor: not-allowed; pointer-events: none; }

/* Kana grid area */
.grid-area {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.grid-section {
  max-width: 660px;
  width: 100%;
  margin: 0 auto; /* centre within the wide grid-area at large viewports */
}
.grid-section-title {
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}
.kana-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}
.kana-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.kana-grid.cols-4 { grid-template-columns: repeat(4, 1fr); }

/* Individual kana cell */
.kana-cell {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 8px 4px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  min-height: 72px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  touch-action: manipulation;
  transition: border-color 0.15s, background 0.15s;
}
.kana-cell:hover { border-color: var(--muted); }
.kana-cell.unlearned { opacity: 0.35; }
.kana-cell.in-group {
  border-color: var(--accent);
  background: var(--accent-l);
}
.kana-cell .char { font-size: 1.6rem; line-height: 1; font-family: var(--kana-font); }
.kana-cell .roma { font-size: 0.75rem; color: var(--muted); }
.kana-cell .progress-bar {
  position: absolute;
  bottom: 0; left: 0;
  height: 3px;
  background: var(--accent);
  transition: width 0.3s;
}

/* Practice button bar — stacks main + weak-drill buttons vertically */
.practice-bar {
  flex-shrink: 0;
  padding: 12px 16px;
  background: var(--surface);
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.practice-bar.hidden { display: none; }
.btn-practice {
  display: block;
  width: 100%;
  padding: 16px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  touch-action: manipulation;
  transition: opacity 0.15s;
}
.btn-practice:hover { opacity: 0.9; }

/* Mobile drawer */
.drawer-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 10;
}
.drawer-overlay.open { display: block; }
.drawer {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: 220px;
  background: var(--surface);
  z-index: 11;
  transform: translateX(-100%);
  transition: transform 0.25s;
  overflow-y: auto;
  padding: 16px 0;
}
.drawer.open { transform: translateX(0); }
.drawer h3 {
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0 16px 8px;
}
.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 12px 16px;
  font-size: 1.4rem;
  touch-action: manipulation;
  color: var(--text);
}

/* ── Session screen ────────────────────────────────────────────── */
#screen-session {
  background: var(--bg);
}
.session-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.btn-close {
  background: none;
  border: none;
  font-size: 1.4rem;
  cursor: pointer;
  color: var(--muted);
  touch-action: manipulation;
  line-height: 1;
}
.progress-track {
  flex: 1;
  height: 8px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 4px;
  transition: width 0.3s;
}
.q-counter { font-size: 0.85rem; color: var(--muted); white-space: nowrap; }

/* Question area */
.question-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 20px;
  gap: 12px;
  overflow: hidden;
}
.q-label {
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.q-prompt {
  font-size: 4rem;
  line-height: 1.1;
  text-align: center;
  font-family: var(--kana-font); /* shows kana prompt — changes with font setting */
}
.q-prompt.small { font-size: 2.4rem; } /* for combos */
.q-hint {
  font-size: 0.8rem;
  color: var(--muted);
  font-style: italic;
}

/* Multiple choice buttons */
.choices {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  width: 100%;
  max-width: 420px;
  margin-top: 12px;
}
.choice-btn {
  padding: 18px 12px;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: 1.3rem;
  color: var(--text);
  cursor: pointer;
  touch-action: manipulation;
  transition: background 0.12s, border-color 0.12s;
  text-align: center;
  min-height: 64px;
  position: relative; /* needed for .choice-num absolute positioning */
}
.choice-btn:hover:not(:disabled) { border-color: var(--accent); background: var(--accent-l); }
.choice-btn.correct { background: #d8f3e4; border-color: var(--correct); color: var(--correct); }
.choice-btn.wrong   { background: #fde8ea; border-color: var(--wrong);   color: var(--wrong); }
.choice-btn:disabled { cursor: default; }
/* Keyboard shortcut hint — bottom-right corner of each choice button */
.choice-num {
  position: absolute;
  bottom: 5px; right: 7px;
  font-size: 0.6rem;
  color: var(--muted);
  font-family: var(--font);
  line-height: 1;
  pointer-events: none;
  user-select: none;
}

/* Match-pairs layout */
.pairs-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  width: 100%;
  max-width: 420px;
}
.pair-col { display: flex; flex-direction: column; gap: 10px; }
.tile {
  padding: 16px 8px;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: 1.3rem;
  text-align: center;
  cursor: pointer;
  touch-action: manipulation;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.12s, border-color 0.12s;
  user-select: none;
}
.tile:hover:not(.matched):not(.locked) { border-color: var(--accent); }
.tile.selected { background: var(--accent-l); border-color: var(--accent); }
.tile.matched  { background: #d8f3e4; border-color: var(--correct); color: var(--correct); pointer-events: none; }
.tile.wrong    { background: #fde8ea; border-color: var(--wrong); }

@keyframes shake {
  0%,100% { transform: translateX(0); }
  20%     { transform: translateX(-6px); }
  40%     { transform: translateX(6px); }
  60%     { transform: translateX(-4px); }
  80%     { transform: translateX(4px); }
}
.tile.shake { animation: shake 0.35s ease; }

/* ── Summary screen ────────────────────────────────────────────── */
#screen-summary {
  align-items: center;
  justify-content: center;
  padding: 32px 24px;
  gap: 24px;
  text-align: center;
}
.summary-score { font-size: 3rem; font-weight: 700; color: var(--accent); }
.summary-label { font-size: 1rem; color: var(--muted); }
.summary-stats { display: flex; gap: 32px; }
.stat { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.stat-num { font-size: 2rem; font-weight: 700; }
.stat-num.c { color: var(--correct); }
.stat-num.w { color: var(--wrong); }
.stat-lbl { font-size: 0.8rem; color: var(--muted); }
.weakest { width: 100%; max-width: 340px; }
.weakest h4 { font-size: 0.75rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.weak-list { display: flex; flex-direction: column; gap: 8px; }
.weak-item {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 14px;
}
.weak-kana { font-size: 1.4rem; }
.weak-romaji { font-size: 0.85rem; color: var(--muted); }
.weak-acc { font-size: 0.85rem; color: var(--wrong); font-weight: 700; }
.summary-actions { display: flex; flex-direction: column; gap: 10px; width: 100%; max-width: 340px; }
.btn-primary {
  padding: 16px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  touch-action: manipulation;
}
.btn-secondary {
  padding: 14px;
  background: none;
  color: var(--accent);
  border: 2px solid var(--accent);
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  touch-action: manipulation;
}

/* ── Settings panel ────────────────────────────────────────────── */
.settings-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 20;
  align-items: flex-end;  /* sheet slides up from bottom */
  justify-content: center;
}
.settings-overlay.open { display: flex; }
.settings-panel {
  background: var(--surface);
  border-radius: 20px 20px 0 0;
  width: 100%;
  max-width: 480px;
  padding: 24px 24px 32px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-height: 80dvh;
  overflow-y: auto;
}
.settings-handle {
  width: 40px; height: 4px;
  background: var(--border);
  border-radius: 2px;
  margin: 0 auto -8px;
}
.settings-section h4 {
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 12px;
}
.option-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.option-chip {
  padding: 10px 18px;
  border: 2px solid var(--border);
  border-radius: 100px;
  background: none;
  font-family: var(--font);
  font-size: 0.9rem;
  color: var(--text);
  cursor: pointer;
  touch-action: manipulation;
  transition: border-color 0.12s, background 0.12s, color 0.12s;
  white-space: nowrap;
}
.option-chip.active {
  border-color: var(--accent);
  background: var(--accent-l);
  color: var(--accent);
  font-weight: 700;
}
/* Pre-generated voice chips — tinted to distinguish from runtime system voices */
.voice-chip-pregenerated { color: var(--accent); }
.voice-chip-pregenerated.active { background: var(--accent-l); color: var(--accent); }

/* Font preview classes — each chip renders in its respective font */
.font-chip-sans     { font-family: 'Hiragino Sans', 'Meiryo', 'Yu Gothic', sans-serif; }
.font-chip-klee     { font-family: 'Klee One', 'Hiragino Sans', cursive; }
.font-chip-zen      { font-family: 'Zen Maru Gothic', 'Hiragino Sans', sans-serif; }
.font-chip-noto     { font-family: 'Noto Sans JP', 'Hiragino Sans', sans-serif; }
.font-chip-bizud    { font-family: 'BIZ UDMincho', 'Yu Mincho', serif; }
.font-chip-shippori { font-family: 'Shippori Mincho', 'Hiragino Mincho Pro', serif; }
.font-chip-mplus    { font-family: 'M PLUS 1', 'Meiryo', sans-serif; }
.font-chip-sawarabi { font-family: 'Sawarabi Gothic', 'Hiragino Sans', sans-serif; }
.font-chip-zenold   { font-family: 'Zen Old Mincho', 'Yu Mincho', serif; }
/* Applied dynamically to elements that display kana characters in session */
.kana-text { font-family: var(--kana-font); }

/* Tap-to-speak button below kana prompt */
.btn-speak {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: 50%;
  width: 48px; height: 48px;
  font-size: 1.2rem;
  cursor: pointer;
  touch-action: manipulation;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.12s, background 0.12s;
  flex-shrink: 0;
}
.btn-speak:hover { border-color: var(--accent); background: var(--accent-l); }
.btn-settings {
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  padding: 8px 12px;
  color: var(--muted);
  touch-action: manipulation;
  flex-shrink: 0;
}
/* Danger-zone button — two-tap confirmation pattern */
.btn-danger {
  padding: 10px 18px;
  background: none;
  color: var(--wrong);
  border: 2px solid var(--wrong);
  border-radius: 100px;
  font-family: var(--font);
  font-size: 0.9rem;
  cursor: pointer;
  touch-action: manipulation;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}
.btn-danger:hover { background: rgba(230,57,70,0.08); }
.btn-danger.confirm-mode { background: var(--wrong); color: #fff; border-color: var(--wrong); }

/* ── Group completion badge ────────────────────────────────────── */
/* Small green checkmark shown next to a group button after 100% session */
.badge {
  font-size: 0.7rem;
  color: var(--correct);
  font-weight: 700;
  margin-left: 2px;
}

/* ── Stats screen button (same style as settings gear) ─────────── */
.btn-stats {
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  padding: 8px 12px;
  color: var(--muted);
  touch-action: manipulation;
  flex-shrink: 0;
}

/* ── Stats screen ──────────────────────────────────────────────── */
#screen-stats {
  background: var(--bg);
}
.stats-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.stats-header h2 {
  flex: 1;
  font-size: 1rem;
  font-weight: 700;
}
.stats-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
/* Overview card: two big numbers side by side */
.stats-overview {
  display: flex;
  gap: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 24px;
}
.stat-ov { display: flex; flex-direction: column; align-items: center; gap: 4px; flex: 1; }
.stat-ov-num { font-size: 2rem; font-weight: 700; color: var(--accent); }
.stat-ov-lbl { font-size: 0.75rem; color: var(--muted); text-align: center; }
/* Heatmap cell colour tiers */
.stat-cell-perfect { background: #d8f3e4; border-color: #a8dfbc; }
.stat-cell-good    { background: #eaf7ef; border-color: #b8e6cb; }
.stat-cell-ok      { background: #fff3cd; border-color: #f0d98c; }
.stat-cell-weak    { background: #fde8ea; border-color: #f7b8bc; }
/* Dark theme overrides for heatmap tiers */
[data-theme="dark"] .stat-cell-perfect { background: #1a3d2a; border-color: #2d6644; }
[data-theme="dark"] .stat-cell-good    { background: #1a3328; border-color: #255038; }
[data-theme="dark"] .stat-cell-ok      { background: #362d10; border-color: #56481a; }
[data-theme="dark"] .stat-cell-weak    { background: #3d1a1e; border-color: #6b2a30; }
/* Legend row */
.stats-legend {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}
.legend-item { display: flex; align-items: center; gap: 5px; font-size: 0.75rem; color: var(--muted); }
.legend-dot {
  width: 14px; height: 14px;
  border-radius: 4px;
  border: 1.5px solid var(--border);
  flex-shrink: 0;
}

/* ── Select mode ───────────────────────────────────────────────── */
/* Pencil icon in top bar; turns orange when active */
.btn-select-mode {
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  padding: 8px 12px;
  color: var(--muted);
  touch-action: manipulation;
  flex-shrink: 0;
  transition: color 0.15s;
}
.btn-select-mode.active { color: #e67e22; }
/* Kana cells tinted orange when tapped during select mode */
.kana-cell.sel-selected {
  border-color: #e67e22 !important;
  background: #fef3e2 !important;
  box-shadow: 0 0 0 2px rgba(230,126,34,0.35);
}
[data-theme="dark"] .kana-cell.sel-selected {
  background: #3d2a10 !important;
}
/* Orange drill button for custom sessions */
.btn-drill-custom {
  display: block;
  width: 100%;
  padding: 16px;
  background: #e67e22;
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  touch-action: manipulation;
  transition: opacity 0.15s;
}
.btn-drill-custom:hover:not(:disabled) { opacity: 0.9; }
.btn-drill-custom:disabled { opacity: 0.45; cursor: default; }

/* ── Mute button ───────────────────────────────────────────────── */
.btn-mute {
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  padding: 8px 12px;
  color: var(--muted);
  touch-action: manipulation;
  flex-shrink: 0;
}

/* ── Footer (always visible — mute + settings) ─────────────────── */
#app-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  padding: 0 8px;
  height: 52px;
  flex-shrink: 0;
  background: var(--surface);
  border-top: 1px solid var(--border);
  z-index: 8; /* below drawer (11) and settings overlay */
}
.build-version {
  flex: 1;
  padding-left: 12px;
  font-size: 0.65rem;
  color: var(--muted);
  user-select: none;
}
.footer-btn {
  background: none;
  border: none;
  font-size: 1.3rem;
  cursor: pointer;
  padding: 10px 12px;
  color: var(--muted);
  touch-action: manipulation;
  border-radius: var(--radius);
}
.footer-btn:hover { background: var(--bg); }

/* ── Drawer / sidebar action rows (Stats + Custom) ─────────────── */
.drawer-actions {
  border-top: 1px solid var(--border);
  margin-top: 8px;
  padding-top: 8px;
}
.drawer-action-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  background: none;
  border: none;
  padding: 10px 16px;
  font-size: 0.9rem;
  color: var(--text);
  cursor: pointer;
  text-align: left;
  touch-action: manipulation;
}
.drawer-action-btn:hover { background: var(--bg); }
.drawer-action-btn.active { color: #e67e22; }

/* Sidebar equivalents shown on desktop (hamburger hidden) */
.sidebar-actions {
  border-top: 1px solid var(--border);
  margin-top: 8px;
  padding-top: 8px;
}
.sidebar-action-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  background: none;
  border: none;
  padding: 8px 16px;
  font-size: 0.82rem;
  color: var(--muted);
  cursor: pointer;
  text-align: left;
  touch-action: manipulation;
}
.sidebar-action-btn:hover { color: var(--text); background: var(--bg); }
.sidebar-action-btn.active { color: #e67e22; }

/* ── Responsive ────────────────────────────────────────────────── */
@media (max-width: 600px) {
  .groups-sidebar { display: none; }
  .hamburger { display: block; }
  .session-header { padding: 10px 12px; }
  .q-prompt { font-size: 3rem; }
  .kana-cell { min-height: 60px; }
  .kana-cell .char { font-size: 1.3rem; }
}
