:root {
  --font-main: 'Inter', system-ui, -apple-system, sans-serif;
  --font-heading: 'Outfit', 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Tema oscuro (predeterminado) */
  --bg-page: #0b0f17;
  --bg-card: #111827;
  --bg-card-hover: #1f2937;
  --bg-subtle: #1e293b;
  --bg-input: #0d121d;

  --accent-primary: #3b82f6;
  --accent-hover: #2563eb;
  --accent-emerald: #10b981;
  --accent-amber: #f59e0b;
  --accent-rose: #f43f5e;
  --accent-indigo: #6366f1;

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --border-subtle: #1e293b;
  --border-card: #334155;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
}

[data-theme="light"] {
  --bg-page: #f8fafc;
  --bg-card: #ffffff;
  --bg-card-hover: #f1f5f9;
  --bg-subtle: #f1f5f9;
  --bg-input: #ffffff;

  --accent-primary: #2563eb;
  --accent-hover: #1d4ed8;
  --accent-emerald: #059669;
  --accent-amber: #d97706;
  --accent-rose: #e11d48;
  --accent-indigo: #4f46e5;

  --text-main: #0f172a;
  --text-muted: #475569;
  --text-dim: #64748b;
  --border-subtle: #e2e8f0;
  --border-card: #cbd5e1;
}

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

body {
  font-family: var(--font-main);
  background-color: var(--bg-page);
  color: var(--text-main);
  overflow-x: clip;
  width: 100%;
  max-width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.5;
}

h1, h2, h3, h4, h5, h6,
.brand-title,
.card-title,
.seo-guide-title {
  font-family: var(--font-heading);
  letter-spacing: -0.02em;
  font-weight: 700;
}

.mono, code, kbd {
  font-family: var(--font-mono);
}

/* Layout canónico */
.tool-layout {
  max-width: 1240px;
  margin: 1.5rem auto 3rem;
  padding: 0 1rem;
  box-sizing: border-box;
  flex: 1 0 auto;
  width: 100%;
}

.tool-with-sidebar {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
  width: 100%;
}

.tool-main-content {
  flex: 1 1 0%;
  min-width: 0;
  width: 100%;
}

/* Tarjeta principal */
.speech-app-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.15);
  margin-bottom: 2.5rem;
}

/* Navegación por pestañas */
.tool-tabs-nav {
  display: flex;
  gap: 0.5rem;
  border-bottom: 2px solid var(--border-subtle);
  margin-bottom: 1.5rem;
  overflow-x: auto;
  scrollbar-width: none;
}

.tool-tabs-nav::-webkit-scrollbar {
  display: none;
}

.tool-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

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

.tool-tab-btn.active {
  color: var(--accent-primary);
  border-bottom-color: var(--accent-primary);
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
  animation: fadeIn 0.25s ease;
}

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

/* Editor de texto y barra de herramientas */
.text-editor-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.editor-label {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-main);
}

.toolbar-right {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.form-select {
  padding: 0.45rem 2rem 0.45rem 0.75rem;
  background-color: var(--bg-subtle);
  color: var(--text-main);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.88rem;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.6rem center;
  max-width: 260px;
}

.btn-action-icon {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.85rem;
  background: var(--bg-subtle);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-action-icon:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent-primary);
}

/* Área del editor */
.editor-container {
  background: var(--bg-input);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 1rem;
  margin-bottom: 1.5rem;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
  transition: border-color 0.2s ease;
}

.editor-container:focus-within {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.speech-textarea {
  width: 100%;
  min-height: 220px;
  background: transparent;
  border: none;
  outline: none;
  resize: vertical;
  color: var(--text-main);
  font-family: var(--font-main);
  font-size: 1rem;
  line-height: 1.65;
}

.speech-textarea::placeholder {
  color: var(--text-dim);
}

.editor-footer-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-subtle);
}

.stat-pill {
  font-size: 0.82rem;
  color: var(--text-muted);
  background: var(--bg-subtle);
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-sm);
}

.stat-pill strong {
  color: var(--text-main);
}

/* Banner CTA Teleprónter */
.teleprompter-cta-box {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1.25rem;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.12), rgba(99, 102, 241, 0.08));
  border: 1px solid rgba(59, 130, 246, 0.25);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  margin-bottom: 2rem;
}

.cta-info h3 {
  font-size: 1.15rem;
  color: var(--text-main);
  margin-bottom: 0.25rem;
}

.cta-info p {
  font-size: 0.88rem;
  color: var(--text-muted);
}

.btn-prompter-launch {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.75rem 1.4rem;
  background: var(--accent-primary);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}

.btn-prompter-launch:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.45);
}

/* Bento Grid de Modos de locución */
.timing-modes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.timing-card {
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  transition: all 0.2s ease;
}

.timing-card:hover {
  border-color: var(--border-card);
  transform: translateY(-2px);
}

.timing-card.highlighted {
  border-color: var(--accent-primary);
  background: linear-gradient(180deg, rgba(59, 130, 246, 0.08) 0%, var(--bg-subtle) 100%);
  box-shadow: 0 0 15px rgba(59, 130, 246, 0.15);
}

.timing-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.mode-badge {
  font-size: 0.72rem;
  text-transform: uppercase;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
}

.mode-badge.primary {
  background: rgba(59, 130, 246, 0.2);
  color: var(--accent-primary);
}

.speed-indicator {
  font-size: 0.8rem;
  color: var(--text-dim);
}

.mode-title {
  font-size: 1rem;
  color: var(--text-main);
  margin-bottom: 0.5rem;
}

.time-display {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
}

.time-display.primary {
  color: var(--accent-primary);
}

.mode-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.45;
}

/* Control de velocidad personalizada y límite */
.custom-pacing-container {
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin-bottom: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.slider-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.slider-label {
  font-size: 0.9rem;
  color: var(--text-main);
}

.slider-label span {
  color: var(--accent-primary);
  margin-left: 0.4rem;
}

.custom-time-output {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--accent-primary);
}

.range-slider {
  width: 100%;
  height: 8px;
  border-radius: 4px;
  background: var(--bg-card);
  outline: none;
  cursor: pointer;
  accent-color: var(--accent-primary);
}

.slider-ticks {
  display: flex;
  justify-content: space-between;
  margin-top: 0.4rem;
  font-size: 0.75rem;
  color: var(--text-dim);
}

.time-limit-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-subtle);
}

.time-limit-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.limit-status {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 600;
}

.limit-status.ok {
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-emerald);
}

.limit-status.over {
  background: rgba(244, 63, 94, 0.15);
  color: var(--accent-rose);
}

/* Tarjeta de legibilidad Fernández-Huerta */
.readability-summary-card {
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.5rem;
}

.readability-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.readability-title-box h4 {
  font-size: 1.1rem;
  color: var(--text-main);
  margin-bottom: 0.2rem;
}

.readability-title-box p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.readability-score-badge {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
}

.score-number {
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent-emerald);
  line-height: 1;
}

.score-text {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.readability-stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-subtle);
}

.readability-metric {
  display: flex;
  flex-direction: column;
}

.metric-label {
  font-size: 0.78rem;
  color: var(--text-dim);
  text-transform: uppercase;
  margin-bottom: 0.25rem;
}

.metric-value {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-main);
}

.metric-sub {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* Pestaña Diapositivas */
.slides-calculator-panel h3 {
  font-size: 1.3rem;
  margin-bottom: 0.4rem;
}

.slides-dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
  margin: 1.5rem 0 2rem;
}

.slide-rule-card {
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.rule-badge {
  font-size: 0.72rem;
  text-transform: uppercase;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  background: rgba(59, 130, 246, 0.15);
  color: var(--accent-primary);
  margin-bottom: 0.75rem;
}

.slide-rule-card h4 {
  font-size: 1.05rem;
  color: var(--text-main);
  margin-bottom: 1rem;
}

.slide-big-number {
  font-size: 3.5rem;
  font-weight: 800;
  color: var(--accent-primary);
  line-height: 1;
  margin-bottom: 0.35rem;
}

.slide-unit {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.rule-explanation {
  font-size: 0.82rem;
  color: var(--text-dim);
  line-height: 1.45;
}

/* Estructura del discurso */
.speech-structure-card {
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.5rem;
}

.speech-structure-card h4 {
  font-size: 1.15rem;
  margin-bottom: 1.25rem;
}

.structure-timeline {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.timeline-step {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-subtle);
}

.timeline-step:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.step-marker {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--accent-primary);
  background: rgba(59, 130, 246, 0.15);
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-sm);
  min-width: 60px;
  text-align: center;
}

.step-content strong {
  display: block;
  font-size: 0.98rem;
  color: var(--text-main);
  margin-bottom: 0.2rem;
}

.step-timing {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent-emerald);
  margin-bottom: 0.35rem;
}

.step-content p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.45;
}

/* Pestaña Ritmo y Coach */
.coach-header h3 {
  font-size: 1.3rem;
  margin-bottom: 0.4rem;
}

.coach-header p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.55;
}

.coach-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin: 1.25rem 0;
  padding: 0.75rem 1rem;
  background: var(--bg-subtle);
  border-radius: var(--radius-sm);
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.legend-dot.green { background: #10b981; }
.legend-dot.yellow { background: #f59e0b; }
.legend-dot.red { background: #f43f5e; }

.coach-analysis-box {
  background: var(--bg-input);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  min-height: 180px;
  max-height: 380px;
  overflow-y: auto;
  line-height: 1.8;
  margin-bottom: 2rem;
}

.sentence-span {
  display: inline;
  padding: 2px 4px;
  border-radius: 4px;
  margin: 0 1px;
}

.sentence-span.green {
  background: rgba(16, 185, 129, 0.15);
  color: var(--text-main);
}

.sentence-span.yellow {
  background: rgba(245, 158, 11, 0.18);
  color: var(--text-main);
}

.sentence-span.red {
  background: rgba(244, 63, 94, 0.22);
  color: var(--text-main);
  border-bottom: 2px dashed #f43f5e;
}

.empty-state {
  color: var(--text-dim);
  font-style: italic;
  font-size: 0.9rem;
}

.tips-accordion-group h4 {
  font-size: 1.15rem;
  margin-bottom: 1rem;
}

.tip-card {
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  margin-bottom: 0.75rem;
}

.tip-card strong {
  display: block;
  font-size: 0.95rem;
  color: var(--text-main);
  margin-bottom: 0.3rem;
}

.tip-card p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Pestaña Informe pericial */
.report-header h3 {
  font-size: 1.3rem;
  margin-bottom: 0.4rem;
}

.report-header p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.report-textarea {
  width: 100%;
  min-height: 320px;
  background: var(--bg-input);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  color: var(--text-main);
  font-size: 0.85rem;
  line-height: 1.6;
  resize: vertical;
  margin-bottom: 1.25rem;
}

.report-actions-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.btn-primary, .btn-accent {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
}

.btn-primary {
  background: var(--accent-primary);
  color: #ffffff;
}

.btn-primary:hover {
  background: var(--accent-hover);
}

.btn-accent {
  background: var(--bg-subtle);
  border: 1px solid var(--border-card);
  color: var(--text-main);
}

.btn-accent:hover {
  background: var(--bg-card-hover);
}

/* ================================================================
   VISOR DE TELEPRÓNTER A PANTALLA COMPLETA
   ================================================================ */
.prompter-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: #000000;
  color: #ffffff;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  user-select: none;
}

.prompter-top-controls {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid #334155;
  padding: 0.75rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 100;
  transition: opacity 0.3s ease;
}

.prompter-ctrl-left, .prompter-ctrl-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.prompter-ctrl-center {
  display: flex;
  align-items: center;
}

.prompter-timer {
  font-size: 1.15rem;
  font-weight: 700;
  color: #38bdf8;
  background: rgba(0, 0, 0, 0.5);
  padding: 0.35rem 0.85rem;
  border-radius: 6px;
  border: 1px solid #1e293b;
}

.btn-prompter-action {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 0.95rem;
  background: #1e293b;
  color: #f8fafc;
  border: 1px solid #475569;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-prompter-action:hover {
  background: #334155;
  border-color: #94a3b8;
}

.btn-prompter-action.close {
  background: #dc2626;
  border-color: #ef4444;
}

.btn-prompter-action.close:hover {
  background: #b91c1c;
}

.prompter-speed-control, .prompter-font-size-control {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: #0f172a;
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius-sm);
  border: 1px solid #334155;
  font-size: 0.85rem;
}

.btn-prompter-mini {
  width: 28px;
  height: 28px;
  background: #1e293b;
  color: #ffffff;
  border: 1px solid #475569;
  border-radius: 4px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-prompter-mini:hover {
  background: #38bdf8;
  color: #0f172a;
}

/* Guía de enfoque */
.prompter-focus-guide {
  position: absolute;
  top: 38%;
  left: 0;
  width: 100%;
  height: 60px;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(56, 189, 248, 0.08) 0%, rgba(56, 189, 248, 0.18) 50%, rgba(56, 189, 248, 0.08) 100%);
  border-top: 1px dashed rgba(56, 189, 248, 0.4);
  border-bottom: 1px dashed rgba(56, 189, 248, 0.4);
  z-index: 50;
}

/* Visor de texto */
.prompter-viewport {
  flex: 1;
  overflow-y: scroll;
  scrollbar-width: none;
  padding: 40vh 12% 60vh 12%;
  scroll-behavior: auto;
}

.prompter-viewport::-webkit-scrollbar {
  display: none;
}

.prompter-text-stream {
  font-size: 42px;
  line-height: 1.85;
  color: #ffffff;
  text-align: left;
  transition: transform 0.2s ease;
  word-wrap: break-word;
}

.prompter-text-stream.mirrored {
  transform: scaleX(-1);
}

.prompter-progress-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 6px;
  background: #1e293b;
  z-index: 100;
}

.prompter-progress-fill {
  width: 0%;
  height: 100%;
  background: #38bdf8;
  transition: width 0.1s linear;
}

/* Modal accesible de avisos */
.custom-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999999;
  padding: 1rem;
}

.custom-modal-box {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 480px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.4);
  overflow: hidden;
  animation: fadeIn 0.2s ease;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-subtle);
}

.modal-title {
  font-size: 1.15rem;
  color: var(--text-main);
}

.btn-close-modal {
  background: transparent;
  border: none;
  font-size: 1.5rem;
  color: var(--text-muted);
  cursor: pointer;
  line-height: 1;
}

.modal-body {
  padding: 1.5rem;
  font-size: 0.95rem;
  color: var(--text-main);
  line-height: 1.6;
}

.modal-footer {
  padding: 1rem 1.5rem;
  background: var(--bg-subtle);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  justify-content: flex-end;
}

/* Estilos SEO y Acordeón canónico */
.seo-guide-section {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin-top: 2.5rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.seo-guide-header {
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 1.25rem;
}

.seo-guide-title {
  font-size: 1.45rem;
  color: var(--text-main);
  margin-bottom: 0.4rem;
}

.seo-guide-subtitle {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.seo-guide-content h3 {
  font-size: 1.15rem;
  color: var(--text-main);
  margin: 1.5rem 0 0.5rem;
}

.seo-guide-content p {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 1rem;
}

.seo-guide-content ul {
  margin: 0.75rem 0 1.25rem 1.5rem;
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.65;
}

.seo-guide-content li {
  margin-bottom: 0.5rem;
}

.seo-faq-accordion {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.seo-faq-item {
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color 0.2s ease;
}

.seo-faq-item[open] {
  border-color: var(--border-card);
}

.seo-faq-question {
  padding: 1rem 1.25rem;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-main);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
}

.seo-faq-question::-webkit-details-marker {
  display: none;
}

.seo-faq-icon {
  color: var(--text-muted);
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.seo-faq-item[open] .seo-faq-icon {
  transform: rotate(180deg);
}

.seo-faq-answer {
  padding: 0 1.25rem 1.25rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Responsive */
@media (max-width: 900px) {
  .prompter-top-controls {
    flex-direction: column;
    gap: 0.75rem;
    padding: 0.75rem;
  }

  .prompter-viewport {
    padding: 45vh 5% 60vh 5%;
  }

  .prompter-text-stream {
    font-size: 28px;
  }
}

@media (max-width: 600px) {
  .text-editor-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .toolbar-right {
    justify-content: space-between;
  }

  .form-select {
    max-width: 100%;
    flex: 1 1 100%;
  }

  .teleprompter-cta-box {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }

  .btn-prompter-launch {
    justify-content: center;
  }
}
