/* ===== CSS Variables & Theme ===== */
:root {
  --primary: #5B6ABF;
  --primary-light: #7986CB;
  --primary-dark: #3F51B5;
  --accent: #FF8F00;
  --accent-light: #FFB74D;
  --success: #43A047;
  --bg: #F5F5F0;
  --bg-card: #FFFFFF;
  --bg-reader: #FFF9F0;
  --text: #2C3E50;
  --text-light: #607D8B;
  --text-muted: #90A4AE;
  --border: #E0E0E0;
  --shadow: 0 2px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.12);
  --radius: 16px;
  --radius-sm: 10px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --highlight: #FFEB3B;
  --highlight-glow: rgba(255, 235, 59, 0.4);
  --font-ui: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans JP', sans-serif;
  --font-read: Georgia, 'Noto Serif JP', serif;
  --nav-height: 64px;
  --header-height: 60px;

  /* Level colors */
  --level-1: #4CAF50;
  --level-2: #2196F3;
  --level-3: #FF9800;
  --level-4: #9C27B0;
  --level-5: #F44336;
}

[data-theme="dark"] {
  --bg: #1A1A2E;
  --bg-card: #16213E;
  --bg-reader: #1A1A2E;
  --text: #E8E8E8;
  --text-light: #B0BEC5;
  --text-muted: #78909C;
  --border: #2C3E50;
  --shadow: 0 2px 12px rgba(0,0,0,0.3);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.4);
  --highlight: #F9A825;
  --highlight-glow: rgba(249, 168, 37, 0.3);
}

/* ===== Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-ui);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
  min-height: 100dvh;
}

button {
  border: none;
  background: none;
  cursor: pointer;
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  -webkit-tap-highlight-color: transparent;
}

/* ===== App Container ===== */
#app {
  max-width: 900px;
  margin: 0 auto;
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
}

/* ===== Views ===== */
.view {
  display: none;
  animation: fadeIn 0.3s ease;
}
.view.active { display: block; }

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

/* ===== App Header ===== */
.app-header {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px 12px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  position: sticky;
  top: 0;
  z-index: 100;
}

.app-header h1 {
  font-size: clamp(0.78rem, 3.2vw, 1.25rem);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  text-align: center;
  flex: 1;
  justify-content: center;
}

.header-title-link {
  color: white;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: opacity 0.2s;
}
.header-title-link:hover {
  opacity: 0.85;
}
.de-accent {
  font-style: italic;
  font-weight: 400;
  opacity: 0.9;
}

.app-header h1 .logo-icon {
  font-size: 1.4rem;
}

.header-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}
.header-left, .header-right {
  width: 40px;
}

.header-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  transition: background var(--transition);
  color: white;
}
.header-btn:hover { background: rgba(255,255,255,0.15); }

/* ===== Level Tabs ===== */
.level-tabs {
  display: flex;
  gap: 6px;
  padding: 12px 16px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  background: var(--bg);
  position: sticky;
  top: 60px;
  z-index: 90;
}
.level-tabs::-webkit-scrollbar { display: none; }

.tab {
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
  transition: all var(--transition);
  background: var(--bg-card);
  border: 2px solid var(--border);
  color: var(--text-light);
  flex-shrink: 0;
}
.tab:hover { border-color: var(--primary-light); color: var(--primary); }
.tab.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}
.tab[data-level="1"].active { background: var(--level-1); border-color: var(--level-1); }
.tab[data-level="2"].active { background: var(--level-2); border-color: var(--level-2); }
.tab[data-level="3"].active { background: var(--level-3); border-color: var(--level-3); }
.tab[data-level="4"].active { background: var(--level-4); border-color: var(--level-4); }
.tab[data-level="5"].active { background: var(--level-5); border-color: var(--level-5); }

/* ===== Story Grid ===== */
.story-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  padding: 16px;
  padding-bottom: calc(var(--nav-height) + 32px);
}

/* ===== Story Card ===== */
.story-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: all var(--transition);
  cursor: pointer;
  position: relative;
}
.story-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.story-card:active { transform: translateY(-2px); }

.card-illustration {
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  position: relative;
  overflow: hidden;
}
.card-illustration::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 40px;
  background: linear-gradient(to top, var(--bg-card), transparent);
}

.card-body {
  padding: 16px;
}

.card-level {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 0.7rem;
  font-weight: 700;
  color: white;
  margin-bottom: 8px;
  letter-spacing: 0.5px;
}

.card-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 4px;
  line-height: 1.3;
}

.card-title-ja {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-bottom: 10px;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.card-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--border);
}
.card-progress-bar {
  height: 100%;
  background: var(--success);
  transition: width var(--transition);
  border-radius: 0 2px 0 0;
}

.card-complete-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--success);
  color: white;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  box-shadow: 0 2px 8px rgba(67, 160, 71, 0.4);
  z-index: 1;
}

/* ===== Bottom Navigation ===== */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 900px;
  height: var(--nav-height);
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-around;
  z-index: 200;
  padding-bottom: env(safe-area-inset-bottom, 0);
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 8px 16px;
  border-radius: 12px;
  transition: all var(--transition);
  font-size: 0.7rem;
  color: var(--text-muted);
}
.nav-item .nav-icon { font-size: 1.4rem; }
.nav-item:hover { color: var(--primary); }
.nav-item.active {
  color: var(--primary);
  font-weight: 600;
}

/* ===== Reader View ===== */
.reader-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.back-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  transition: background var(--transition);
  flex-shrink: 0;
}
.back-btn:hover { background: var(--border); }

.reader-title-area {
  flex: 1;
  min-width: 0;
}
.reader-title-text {
  font-size: 0.95rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.reader-title-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.reader-header-actions {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}

.reader-action-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: background var(--transition);
}
.reader-action-btn:hover { background: var(--border); }
.reader-action-btn.active { color: var(--primary); background: rgba(91, 106, 191, 0.1); }

/* Reader Content */
.reader-body {
  padding: 24px 20px;
  padding-bottom: 200px;
  max-width: 680px;
  margin: 0 auto;
}

.story-meta-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.level-badge {
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 700;
  color: white;
}

.word-count-badge {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.story-text-container {
  background: var(--bg-reader);
  border-radius: var(--radius);
  padding: 28px 24px;
  margin-bottom: 20px;
  line-height: 2;
  border: 1px solid var(--border);
  position: relative;
}

.story-text {
  font-family: var(--font-read);
  font-size: 1.2rem;
  line-height: 2.2;
  color: var(--text);
}

.story-text .word {
  cursor: pointer;
  padding: 2px 1px;
  border-radius: 4px;
  transition: all 0.15s ease;
  position: relative;
}
.story-text .word:hover {
  background: rgba(91, 106, 191, 0.1);
  color: var(--primary);
}
.story-text .word.highlighted {
  background: var(--highlight);
  box-shadow: 0 0 8px var(--highlight-glow);
  border-radius: 4px;
  animation: wordPulse 0.3s ease;
}
.story-text .word.spoken {
  color: var(--text-muted);
}
.story-text .word.vocab-word {
  border-bottom: 2px dotted var(--accent);
}

@keyframes wordPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

.sentence-marker {
  display: inline;
}

/* Translation section */
.translation-section {
  margin-bottom: 20px;
}

.translation-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-light);
  width: 100%;
  transition: all var(--transition);
}
.translation-toggle:hover { border-color: var(--primary-light); }
.translation-toggle .toggle-icon { transition: transform var(--transition); }
.translation-toggle.open .toggle-icon { transform: rotate(180deg); }

.translation-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
}
.translation-content.open {
  max-height: 2000px;
}

.translation-text {
  padding: 20px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  font-family: var(--font-read);
  font-size: 1rem;
  line-height: 2;
  color: var(--text-light);
}

/* Vocabulary section */
.vocab-section {
  margin-bottom: 20px;
}

.vocab-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-light);
  width: 100%;
  transition: all var(--transition);
  cursor: pointer;
}
.vocab-header:hover { border-color: var(--primary-light); }

.vocab-list {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
}
.vocab-list.open { max-height: 2000px; }

.vocab-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-top: none;
  font-size: 0.9rem;
}
.vocab-item:last-child {
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
}

.vocab-word {
  font-weight: 700;
  color: var(--primary);
  min-width: 100px;
  font-family: var(--font-read);
}
.vocab-meaning {
  flex: 1;
  color: var(--text-light);
}
.vocab-meaning-ja {
  color: var(--text-muted);
  font-size: 0.82rem;
}

/* Moral section */
.moral-section {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  padding: 20px 24px;
  border-radius: var(--radius);
  margin-bottom: 20px;
}
.moral-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  opacity: 0.8;
  margin-bottom: 8px;
}
.moral-text {
  font-family: var(--font-read);
  font-size: 1.05rem;
  font-style: italic;
  line-height: 1.6;
  margin-bottom: 8px;
}
.moral-text-ja {
  font-size: 0.9rem;
  opacity: 0.85;
}

/* ===== Audio Controls (Floating) ===== */
.audio-controls {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 900px;
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  padding: 12px 20px;
  padding-bottom: calc(12px + env(safe-area-inset-bottom, 0));
  z-index: 200;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.1);
}

.audio-progress {
  width: 100%;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  margin-bottom: 10px;
  cursor: pointer;
  position: relative;
}
.audio-progress-bar {
  height: 100%;
  background: var(--primary);
  border-radius: 2px;
  transition: width 0.1s linear;
}

.audio-main {
  display: flex;
  align-items: center;
  gap: 12px;
}

.play-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  transition: all var(--transition);
  flex-shrink: 0;
}
.play-btn:hover { background: var(--primary-dark); transform: scale(1.05); }
.play-btn:active { transform: scale(0.95); }

.audio-info {
  flex: 1;
  min-width: 0;
}
.audio-sentence {
  font-size: 0.8rem;
  color: var(--text-light);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.audio-time {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.speed-control {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.speed-btn {
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 700;
  transition: all var(--transition);
  color: var(--text-light);
}
.speed-btn:hover { background: var(--border); }

.speed-value {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--primary);
  min-width: 42px;
  text-align: center;
}

/* ===== Reading Settings Panel ===== */
.settings-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 300;
  animation: fadeIn 0.2s ease;
}
.settings-overlay.active { display: block; }

.reader-settings-panel {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%) translateY(100%);
  width: 100%;
  max-width: 900px;
  background: var(--bg-card);
  border-radius: var(--radius) var(--radius) 0 0;
  padding: 24px 20px;
  z-index: 310;
  transition: transform 0.3s ease;
  max-height: 70vh;
  overflow-y: auto;
}
.reader-settings-panel.active {
  transform: translateX(-50%) translateY(0);
}

.panel-handle {
  width: 40px;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  margin: 0 auto 20px;
}

.setting-group {
  margin-bottom: 24px;
}
.setting-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
}

.setting-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.setting-slider {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  outline: none;
}
.setting-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--primary);
  cursor: pointer;
}

.setting-value {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary);
  min-width: 40px;
  text-align: center;
}

.theme-toggle-row {
  display: flex;
  gap: 10px;
}
.theme-option {
  flex: 1;
  padding: 12px;
  border-radius: var(--radius-sm);
  border: 2px solid var(--border);
  text-align: center;
  font-size: 0.85rem;
  font-weight: 600;
  transition: all var(--transition);
}
.theme-option:hover { border-color: var(--primary-light); }
.theme-option.active { border-color: var(--primary); background: rgba(91, 106, 191, 0.1); color: var(--primary); }

.mode-toggle-row {
  display: flex;
  gap: 10px;
}
.mode-option {
  flex: 1;
  padding: 10px;
  border-radius: var(--radius-sm);
  border: 2px solid var(--border);
  text-align: center;
  font-size: 0.82rem;
  font-weight: 600;
  transition: all var(--transition);
}
.mode-option:hover { border-color: var(--primary-light); }
.mode-option.active { border-color: var(--primary); background: rgba(91, 106, 191, 0.1); color: var(--primary); }

/* ===== Stats View ===== */
.stats-header {
  padding: 24px 20px 16px;
}
.stats-header h2 {
  font-size: 1.4rem;
  font-weight: 700;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  padding: 0 16px 16px;
}

.stat-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
  box-shadow: var(--shadow);
}
.stat-icon { font-size: 1.8rem; margin-bottom: 8px; }
.stat-value {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--primary);
}
.stat-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.level-progress-section {
  padding: 16px;
}
.level-progress-section h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.level-progress-item {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.level-label {
  font-size: 0.82rem;
  font-weight: 600;
  min-width: 80px;
}
.level-bar {
  flex: 1;
  height: 8px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
}
.level-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.5s ease;
}
.level-count {
  font-size: 0.78rem;
  color: var(--text-muted);
  min-width: 32px;
  text-align: right;
}

/* ===== Word Popup ===== */
.word-popup {
  display: none;
  position: fixed;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  z-index: 500;
  max-width: 300px;
  animation: popIn 0.2s ease;
}
.word-popup.active { display: block; }

@keyframes popIn {
  from { opacity: 0; transform: scale(0.9) translateY(4px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.popup-word {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary);
  font-family: var(--font-read);
  margin-bottom: 6px;
}
.popup-meaning {
  font-size: 0.85rem;
  color: var(--text);
  margin-bottom: 4px;
}
.popup-meaning-ja {
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* ===== Voice Selector ===== */
.voice-selector {
  width: 100%;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 2px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 0.85rem;
  cursor: pointer;
  transition: border-color var(--transition);
}
.voice-selector:hover { border-color: var(--primary-light); }
.voice-selector:focus { border-color: var(--primary); outline: none; }

/* ===== Scroll to Top ===== */
.scroll-top-btn {
  position: fixed;
  bottom: 140px;
  right: 20px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  box-shadow: var(--shadow-lg);
  z-index: 150;
  transition: all var(--transition);
}
.scroll-top-btn.visible { display: flex; }
.scroll-top-btn:hover { transform: scale(1.1); }

/* ===== Empty State ===== */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}
.empty-state-icon { font-size: 3rem; margin-bottom: 12px; }
.empty-state-text { font-size: 0.9rem; }

/* ===== Loading ===== */
.loading-spinner {
  display: inline-block;
  width: 32px;
  height: 32px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== Responsive ===== */
@media (max-width: 480px) {
  .story-grid {
    grid-template-columns: 1fr;
  }
  .story-text {
    font-size: 1.05rem;
    line-height: 2;
  }
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .reader-body {
    padding: 16px 14px;
    padding-bottom: 180px;
  }
  .story-text-container {
    padding: 20px 16px;
  }
}

@media (min-width: 768px) {
  .story-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ===== Site Footer ===== */
.site-footer {
  text-align: center;
  padding: 28px 20px 90px;
}
.site-footer a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--primary);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 8px 20px;
  border: 1.5px solid var(--primary);
  border-radius: 20px;
  opacity: 0.7;
  transition: all 0.25s;
  letter-spacing: 0.03em;
}
.site-footer a::before {
  content: "🌐";
  font-size: 0.9rem;
}
.site-footer a:hover {
  opacity: 1;
  background: var(--primary);
  color: white;
}

/* ===== Print ===== */
@media print {
  .audio-controls, .bottom-nav, .reader-header, .settings-overlay, .reader-settings-panel { display: none !important; }
  .story-text-container { border: none; padding: 0; }
}
