/* FocusFlow Web App Styles */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #e07a5f;
  --primary-dark: #d66853;
  --text: #2d3748;
  --text-light: #718096;
  --bg: #faf8f5;
  --bg-secondary: #f5f0e8;
  --border: #e2e8f0;
  --radius: 12px;
  --radius-sm: 8px;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.5;
}

/* ========== SCREENS ========== */
.screen {
  display: none;
  min-height: 100vh;
}

.screen.active {
  display: flex;
  flex-direction: column;
}

/* ========== LANDING PAGE ========== */
#landing {
  max-width: 720px;
  margin: 0 auto;
  padding: 40px 24px;
}

.landing-header {
  text-align: center;
  margin-bottom: 40px;
}

.logo {
  font-size: 32px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

.logo span {
  color: var(--primary);
}

.tagline {
  font-size: 16px;
  color: var(--text-light);
}

.btn-demo {
  margin-top: 20px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  padding: 14px 28px;
  font-size: 16px;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 14px rgba(224, 122, 95, 0.3);
}

.btn-demo:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(224, 122, 95, 0.4);
}

/* Demo mode indicator */
.demo-indicator {
  position: fixed;
  top: 16px;
  right: 16px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 100;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.demo-indicator .speed-badge {
  background: rgba(255,255,255,0.25);
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 12px;
}

.demo-indicator .skip-demo {
  background: rgba(255,255,255,0.2);
  border: none;
  color: white;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
  cursor: pointer;
  margin-left: 8px;
}

.demo-indicator .skip-demo:hover {
  background: rgba(255,255,255,0.3);
}

/* ========== INPUT TABS ========== */
.input-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 16px;
  background: var(--bg-secondary);
  padding: 4px;
  border-radius: var(--radius);
}

.tab {
  flex: 1;
  padding: 12px 16px;
  border: none;
  background: transparent;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-light);
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: all 0.2s;
}

.tab:hover {
  color: var(--text);
}

.tab.active {
  background: white;
  color: var(--text);
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* ========== INPUT PANELS ========== */
.panel {
  display: none;
}

.panel.active {
  display: block;
}

textarea {
  width: 100%;
  padding: 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  font-size: 15px;
  font-family: inherit;
  line-height: 1.6;
  resize: vertical;
  transition: border-color 0.2s;
}

textarea:focus {
  outline: none;
  border-color: var(--primary);
}

textarea::placeholder {
  color: var(--text-light);
}

.panel-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 12px;
}

.char-count {
  font-size: 13px;
  color: var(--text-light);
}

/* ========== UPLOAD ZONE ========== */
.upload-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 48px 24px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
}

.upload-zone:hover {
  border-color: var(--primary);
  background: rgba(224, 122, 95, 0.05);
}

.upload-zone.dragover {
  border-color: var(--primary);
  background: rgba(224, 122, 95, 0.1);
}

.upload-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.upload-text {
  font-size: 16px;
  font-weight: 500;
  margin-bottom: 8px;
}

.upload-formats {
  font-size: 13px;
  color: var(--text-light);
}

.file-info {
  background: white;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
}

.file-name {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 4px;
}

.file-meta {
  font-size: 13px;
  color: var(--text-light);
  margin-bottom: 16px;
}

/* ========== URL INPUT ========== */
.url-input-group {
  display: flex;
  gap: 8px;
}

.url-input {
  flex: 1;
  padding: 12px 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  font-size: 15px;
  font-family: inherit;
}

.url-input:focus {
  outline: none;
  border-color: var(--primary);
}

.url-preview {
  margin-top: 16px;
  background: white;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

.url-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
}

.url-excerpt {
  font-size: 14px;
  color: var(--text-light);
  margin-bottom: 16px;
  line-height: 1.5;
}

.url-note {
  margin-top: 12px;
  font-size: 12px;
  color: var(--text-light);
  font-style: italic;
}

/* ========== BUTTONS ========== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(224, 122, 95, 0.3);
}

.btn-secondary {
  background: white;
  color: var(--text);
  border: 2px solid var(--border);
}

.btn-secondary:hover {
  border-color: var(--text-light);
}

.btn-icon {
  font-size: 12px;
}

.btn-icon-sm {
  width: 32px;
  height: 32px;
  border: 1px solid var(--border);
  background: white;
  border-radius: var(--radius-sm);
  font-size: 16px;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-icon-sm:hover {
  background: var(--bg-secondary);
}

/* ========== SETTINGS BAR ========== */
.settings-bar {
  display: flex;
  justify-content: center;
  gap: 32px;
  margin-top: 32px;
  padding: 20px;
  background: white;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.setting {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.setting label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.speed-control {
  display: flex;
  align-items: center;
  gap: 8px;
}

#speedDisplay {
  font-size: 15px;
  font-weight: 600;
  min-width: 80px;
  text-align: center;
}

select {
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: inherit;
  background: white;
  cursor: pointer;
}

/* ========== FEATURES ========== */
.landing-footer {
  margin-top: auto;
  padding-top: 40px;
}

.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 24px;
}

.feature {
  display: flex;
  gap: 12px;
  padding: 16px;
  background: white;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.feature-icon {
  font-size: 24px;
  flex-shrink: 0;
}

.feature-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.feature-text strong {
  font-size: 14px;
  font-weight: 600;
}

.feature-text span {
  font-size: 12px;
  color: var(--text-light);
}

.footer-note {
  text-align: center;
  font-size: 13px;
  color: var(--text-light);
}

.footer-note a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
}

.footer-note a:hover {
  text-decoration: underline;
}

/* ========== READER SCREEN ========== */
#reader {
  background: var(--bg);
}

#reader.active {
  display: block;
}

.reader-container {
  max-width: 600px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
}

/* Reader Themes */
.reader-container.theme-warm {
  background: linear-gradient(180deg, #faf8f5 0%, #f5f0e8 100%);
  color: #2d3748;
}
.reader-container.theme-warm .word-pivot { color: #e07a5f; }
.reader-container.theme-warm .focus-line { background: #e07a5f; }
.reader-container.theme-warm .progress-bar { background: #e07a5f; }

.reader-container.theme-sepia {
  background: linear-gradient(180deg, #f4ecd8 0%, #e8dcc8 100%);
  color: #5c4b37;
}
.reader-container.theme-sepia .word-pivot { color: #8b4513; }
.reader-container.theme-sepia .focus-line { background: #8b4513; }
.reader-container.theme-sepia .progress-bar { background: #8b4513; }

.reader-container.theme-dark {
  background: linear-gradient(180deg, #1a202c 0%, #2d3748 100%);
  color: #e2e8f0;
}
.reader-container.theme-dark .word-pivot { color: #68d391; }
.reader-container.theme-dark .focus-line { background: #68d391; }
.reader-container.theme-dark .progress-bar { background: #68d391; }

.reader-container.theme-midnight {
  background: linear-gradient(180deg, #0d1117 0%, #161b22 100%);
  color: #c9d1d9;
}
.reader-container.theme-midnight .word-pivot { color: #58a6ff; }
.reader-container.theme-midnight .focus-line { background: #58a6ff; }
.reader-container.theme-midnight .progress-bar { background: #58a6ff; }

/* Reader Header */
.reader-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(128,128,128,0.15);
}

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

.btn-close {
  width: 36px;
  height: 36px;
  border: none;
  background: rgba(128,128,128,0.1);
  border-radius: var(--radius-sm);
  font-size: 18px;
  cursor: pointer;
  color: inherit;
}

.btn-close:hover {
  background: rgba(128,128,128,0.2);
}

.reader-title {
  font-size: 14px;
  font-weight: 600;
  max-width: 300px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.reader-meta {
  font-size: 13px;
  opacity: 0.6;
}

/* Reader Main */
.reader-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 40px 20px;
}

.word-container {
  position: relative;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 40px 0;
}

.focus-line {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 2px;
  height: 100px;
  opacity: 0.25;
}

.word-display {
  font-family: Georgia, 'Times New Roman', serif;
  display: flex;
  align-items: baseline;
  justify-content: center;
  width: 100%;
}

.word-display.size-medium { font-size: 48px; }
.word-display.size-medium .word-pre,
.word-display.size-medium .word-post { min-width: 180px; }

.word-display.size-large { font-size: 64px; }
.word-display.size-large .word-pre,
.word-display.size-large .word-post { min-width: 220px; }

.word-display.size-xl { font-size: 80px; }
.word-display.size-xl .word-pre,
.word-display.size-xl .word-post { min-width: 260px; }

.word-pre {
  text-align: right;
  flex-shrink: 0;
}

.word-pivot {
  font-weight: 700;
  flex-shrink: 0;
}

.word-post {
  text-align: left;
  flex-shrink: 0;
}

/* Progress */
.progress-section {
  width: 100%;
  max-width: 400px;
  margin-top: 40px;
}

.progress-bar-container {
  width: 100%;
  height: 4px;
  background: rgba(128,128,128,0.15);
  border-radius: 2px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  width: 0;
  transition: width 0.1s ease-out;
}

.progress-stats {
  text-align: center;
  margin-top: 8px;
  font-size: 12px;
  opacity: 0.5;
}

/* Reader Controls */
.reader-controls {
  padding: 20px;
  border-top: 1px solid rgba(128,128,128,0.15);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.control-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
}

.btn-control {
  padding: 10px 16px;
  border: 1px solid rgba(128,128,128,0.25);
  background: rgba(128,128,128,0.08);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  color: inherit;
  cursor: pointer;
}

.btn-control:hover {
  background: rgba(128,128,128,0.15);
}

.btn-control.btn-sm {
  width: 36px;
  height: 36px;
  padding: 0;
}

.btn-play {
  min-width: 120px;
}

.theme-warm .btn-play {
  background: linear-gradient(135deg, #e07a5f, #d66853);
  border-color: #d66853;
  color: white;
}

.theme-sepia .btn-play {
  background: linear-gradient(135deg, #8b4513, #6b3410);
  border-color: #6b3410;
  color: white;
}

.theme-dark .btn-play {
  background: linear-gradient(135deg, #68d391, #48bb78);
  border-color: #48bb78;
  color: #1a202c;
}

.theme-midnight .btn-play {
  background: linear-gradient(135deg, #58a6ff, #388bfd);
  border-color: #388bfd;
  color: #0d1117;
}

.speed-value {
  font-size: 18px;
  font-weight: 700;
  min-width: 40px;
  text-align: center;
}

.speed-label {
  font-size: 12px;
  opacity: 0.6;
}

.select-control {
  padding: 8px 12px;
  border: 1px solid rgba(128,128,128,0.25);
  background: rgba(128,128,128,0.08);
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: inherit;
  cursor: pointer;
}

.theme-dark .select-control,
.theme-midnight .select-control {
  background: rgba(255,255,255,0.08);
}

.keyboard-hints {
  text-align: center;
  font-size: 11px;
  opacity: 0.4;
}

.key {
  display: inline-block;
  background: rgba(128,128,128,0.15);
  padding: 2px 6px;
  border-radius: 3px;
  font-family: monospace;
  margin: 0 2px;
}

/* Completion Overlay */
.completion-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: inherit;
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 16px;
  padding: 20px;
  z-index: 10;
}

.completion-overlay.active {
  display: flex;
}

.completion-icon {
  font-size: 64px;
}

.completion-title {
  font-size: 28px;
  font-weight: 700;
}

.completion-stats {
  font-size: 16px;
  opacity: 0.7;
}

.completion-actions {
  display: flex;
  gap: 12px;
  margin-top: 16px;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 640px) {
  #landing {
    padding: 24px 16px;
  }

  .features {
    grid-template-columns: 1fr;
  }

  .settings-bar {
    flex-direction: column;
    gap: 16px;
  }

  .setting {
    flex-direction: row;
    justify-content: space-between;
    width: 100%;
  }

  .word-display.size-medium { font-size: 36px; }
  .word-display.size-large { font-size: 48px; }
  .word-display.size-xl { font-size: 56px; }

  .word-display .word-pre,
  .word-display .word-post { min-width: 120px !important; }
}

/* ========== SPEED PRESETS ========== */
.speed-presets {
  display: flex;
  gap: 4px;
  margin-top: 12px;
  margin-bottom: 12px;
}

.preset-btn {
  flex: 1;
  padding: 6px 4px;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted, #4a5568);
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.15s;
}

.preset-btn:hover {
  background: #f7fafc;
  border-color: #cbd5e0;
}

.preset-btn.active {
  background: var(--primary);
  border-color: var(--primary-dark);
  color: white;
  box-shadow: 0 2px 8px rgba(224, 122, 95, 0.3);
}

@media (max-width: 380px) {
  .preset-btn { font-size: 10px; padding: 5px 2px; }
  .speed-presets { gap: 3px; }
}

/* In the reader sidebar/controls area, themes invert the active state */
.reader-container.theme-dark .preset-btn,
.reader-container.theme-midnight .preset-btn {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.15);
  color: inherit;
}

.reader-container.theme-dark .preset-btn:hover,
.reader-container.theme-midnight .preset-btn:hover {
  background: rgba(255, 255, 255, 0.12);
}

/* ========== AUTH CORNER ========== */
.auth-corner {
  position: absolute;
  top: 20px;
  right: 24px;
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 20;
}

.auth-btn {
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted, #4a5568);
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  font-family: inherit;
}
.auth-btn:hover {
  background: #f7fafc;
  border-color: #cbd5e0;
}

.auth-badge {
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 20px;
  cursor: pointer;
  border: none;
  font-family: inherit;
  transition: opacity 0.15s, background 0.15s;
}
.auth-badge.free {
  background: var(--primary);
  color: white;
}
.auth-badge.free:hover { opacity: 0.9; }
.auth-badge.paid {
  background: rgba(47, 133, 90, 0.12);
  color: #2f855a;
}
.auth-badge.paid:hover { background: rgba(47, 133, 90, 0.2); }

/* ========== PAYWALL MODAL ========== */
.paywall {
  position: fixed;
  inset: 0;
  background: rgba(45, 55, 72, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 1000;
  animation: paywall-fade-in 0.2s ease;
}

@keyframes paywall-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.paywall-card {
  background: white;
  border-radius: var(--radius);
  padding: 36px 32px 28px;
  max-width: 420px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
  text-align: center;
  position: relative;
}

.paywall-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  font-size: 18px;
  color: var(--text-light);
  cursor: pointer;
  border-radius: 50%;
}
.paywall-close:hover { background: rgba(0, 0, 0, 0.05); }

.paywall-icon {
  font-size: 48px;
  margin-bottom: 12px;
}

.paywall-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
  line-height: 1.25;
}

.paywall-sub {
  font-size: 14px;
  color: var(--text-light);
  line-height: 1.5;
  margin-bottom: 24px;
}

.paywall-plan {
  background: rgba(224, 122, 95, 0.06);
  border: 1px solid rgba(224, 122, 95, 0.18);
  border-radius: var(--radius-sm);
  padding: 18px 20px;
  margin-bottom: 20px;
  text-align: left;
}

.paywall-price {
  font-size: 28px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 10px;
}
.paywall-price span {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-light);
}

.paywall-perks {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
  color: var(--text-muted, #4a5568);
}

.paywall-cta {
  width: 100%;
  padding: 14px;
  font-size: 15px;
  margin-bottom: 8px;
}
.paywall-cta:disabled { opacity: 0.6; cursor: not-allowed; }

.paywall-later {
  background: none;
  border: none;
  font-size: 13px;
  color: var(--text-light);
  cursor: pointer;
  padding: 6px;
  font-family: inherit;
}
.paywall-later:hover { color: var(--text-muted, #4a5568); }

/* ========== READING STATS ========== */
.reading-stats {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin: 28px auto 0;
  padding: 18px 28px;
  background: rgba(224, 122, 95, 0.08);
  border: 1px solid rgba(224, 122, 95, 0.15);
  border-radius: var(--radius);
  max-width: 480px;
}

.reading-stats .stat {
  text-align: center;
}

.reading-stats .stat-num {
  font-size: 24px;
  font-weight: 700;
  color: var(--primary);
  line-height: 1;
  margin-bottom: 4px;
  font-variant-numeric: tabular-nums;
}

.reading-stats .stat-label {
  font-size: 11px;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

@media (max-width: 480px) {
  .reading-stats { gap: 20px; padding: 14px 16px; }
  .reading-stats .stat-num { font-size: 20px; }
}

/* ========== HEADING VISUAL ========== */
/* When the reader is on a heading word, render the surrounding letters
   bolder and slightly muted so the user feels the structural shift. */
.word-display.is-heading .word-pre,
.word-display.is-heading .word-post {
  font-weight: 700;
  opacity: 0.85;
}

/* ========== MINIMAP ========== */
/* Barcode-style minimap — every sentence in the doc is a horizontal block,
   sized proportionally to its word count so the entire document always fits
   in the viewport without scrolling. Hover any block for first-words preview;
   click to seek. */
.reader-minimap {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 64px;
  z-index: 5;
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-left: 1px solid var(--border);
  display: none;
  pointer-events: auto;
}

#reader.active .reader-minimap {
  display: block;
}

.minimap-content {
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 14px 10px;
  gap: 1px;
  overflow: hidden;
  cursor: pointer;
  user-select: none;
}

.minimap-sentence {
  background: rgba(45, 55, 72, 0.18);
  border-radius: 1px;
  min-height: 1px;
  transition: background 0.15s, transform 0.15s;
}

.minimap-sentence:hover {
  background: rgba(224, 122, 95, 0.45);
}

.minimap-sentence.is-heading {
  background: rgba(224, 122, 95, 0.5);
}

.minimap-sentence.current {
  background: var(--primary) !important;
  transform: scaleX(1.15);
  transform-origin: right center;
}

/* Theme variants — match the reader's mood */
.theme-sepia ~ * .reader-minimap,
.theme-sepia .reader-minimap {
  background: rgba(244, 236, 216, 0.7);
  border-left-color: rgba(139, 69, 19, 0.2);
}
.theme-sepia .minimap-sentence { background: rgba(92, 75, 55, 0.2); }
.theme-sepia .minimap-sentence.is-heading { background: rgba(139, 69, 19, 0.4); }
.theme-sepia .minimap-sentence.current { background: #8b4513 !important; }

.theme-dark .reader-minimap {
  background: rgba(26, 32, 44, 0.7);
  border-left-color: rgba(255, 255, 255, 0.08);
}
.theme-dark .minimap-sentence { background: rgba(226, 232, 240, 0.18); }
.theme-dark .minimap-sentence.is-heading { background: rgba(104, 211, 145, 0.45); }
.theme-dark .minimap-sentence.current { background: #68d391 !important; }

.theme-midnight .reader-minimap {
  background: rgba(13, 17, 23, 0.75);
  border-left-color: rgba(255, 255, 255, 0.06);
}
.theme-midnight .minimap-sentence { background: rgba(201, 209, 217, 0.18); }
.theme-midnight .minimap-sentence.is-heading { background: rgba(88, 166, 255, 0.5); }
.theme-midnight .minimap-sentence.current { background: #58a6ff !important; }

/* Hide the minimap on narrow screens — the reader content is centered at
   max-width 600px, so anything below ~900px viewport starts to cause overlap. */
@media (max-width: 900px) {
  .reader-minimap { display: none !important; }
}
