/* Shared presentation tokens for the standalone Bible; no engine or layout changes. */
:root {
  --bg: #f3f5f8;
  --card-bg: #ffffff;
  --text: #18212b;
  --text-muted: #526177;
  --border: #dce3ed;
  --primary-light: #edf3fd;
  --titulo-pasaje: #18212b;
  --brand-start: #0619D6;
  --brand-end: #3c63e8;
  --control-blue: #0413B5;
  --control-light: #96C5FA;
  --on-brand: #ffffff;
  --nav-surface: #edf2fc;
  --paper: #ffffff;
  --ink: #111111;
  --devotional-blue: #2e6b8f;
  --devotional-button: var(--control-blue);
  --devotional-soft: #edf5f9;
  --daily-surface: #f0f6ff;
  --daily-border: #c5dafa;
  --note-surface: #fffbea;
  --note-border: #ecdca0;
  --success: #2e7d32;
  --shadow: 0 6px 28px color-mix(in srgb, var(--text) 8%, transparent);
  --popover-shadow: 0 12px 32px color-mix(in srgb, var(--text) 16%, transparent);
  --brand-gradient: linear-gradient(115deg, var(--brand-start), var(--brand-end));
  --surface-subtle: #f6f8fc;
  --dialog-border: #d5e1f4;
  --scrim: color-mix(in srgb, #111827 58%, transparent);
  --toast-surface: #202933;
}
[data-theme="dark"] {
  --bg: #151719;
  --card-bg: #222528;
  --text: #f0f2f5;
  --text-muted: #b0bac8;
  --border: #3b424c;
  --primary-light: #2c374b;
  --titulo-pasaje: #f0f2f5;
  --nav-surface: #292e38;
  --surface-subtle: #282c31;
  --shadow: 0 6px 28px color-mix(in srgb, var(--bg) 35%, transparent);
}
body, button, input, select { letter-spacing: 0; }
button, input, select { font-family: 'Plus Jakarta Sans', -apple-system, sans-serif; }
.widget-container { border-radius: 8px; }
.top-header-bar {
  background: var(--brand-gradient) !important;
  padding: 8px 12px 10px;
  gap: 7px;
}
.app-brand-row { gap: 8px; }
.app-brand-name { letter-spacing: 0; line-height: 1.15; }
.top-header-bar .app-brand-name { color: var(--on-brand) !important; }
.app-brand-logo { object-fit: contain; }
.direct-search-row { gap: 8px; --search-control-height: 40px; }
.widget-container .app-brand-row > .btn-action { width: 36px; min-width: 36px; height: 36px; padding: 0; justify-content: center; }
.widget-container .app-brand-row > .btn-action svg { width: 20px; height: 20px; }
#searchBox,
.direct-search-row .select-version-tool,
.direct-search-row .mobile-version-control .mobile-select-trigger { height: var(--search-control-height); }
.direct-search-row .select-version-tool { line-height: normal; }
.direct-search-input {
  background: var(--card-bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0 12px;
}
.direct-search-input::placeholder { color: var(--text-muted); }
.direct-search-input:focus { outline: 2px solid var(--control-light); outline-offset: 1px; }
.direct-search-row .select-version-tool,
.direct-search-row .mobile-select-trigger {
  background: var(--control-blue);
  color: var(--on-brand);
  border: 1px solid color-mix(in srgb, var(--on-brand) 28%, transparent);
  border-radius: 8px;
}
.chapter-nav-bar { background: var(--nav-surface) !important; border-bottom-color: var(--border); }
#labelNavCapitulo { color: var(--text-muted); }
.nav-arrow-btn { color: var(--primary); border-color: var(--border); }
.nav-arrow-btn:not(:disabled):hover { background: var(--primary-light); border-color: var(--primary); }
.passage-title-main { color: var(--titulo-pasaje); }
.passage-version { color: var(--text-muted); }
.btn-action { border-radius: 6px; transition: background-color .15s ease, border-color .15s ease; }
.widget-container .passage-actions .btn-action.btn-font {
  background: var(--control-blue); color: var(--on-brand); border-color: var(--control-blue);
}
.widget-container .passage-actions .btn-action.btn-font:hover { background: var(--brand-start); color: var(--on-brand); }
.widget-container .passage-actions .btn-action.btn-font:active,
.widget-container .passage-actions .btn-action.btn-font[aria-pressed="true"] {
  background: var(--control-light); color: var(--control-blue); border-color: var(--control-light);
}
.widget-container .topics-toggle, .widget-container .study-toggle, .widget-container .parallel-toggle {
  background: var(--control-light); color: var(--control-blue); border-color: var(--control-light);
}
.widget-container .topics-toggle[aria-expanded="true"], .widget-container .study-toggle[aria-pressed="true"],
.widget-container .parallel-toggle[aria-pressed="true"], .widget-container .topics-toggle:active,
.widget-container .study-toggle:active, .widget-container .parallel-toggle:active {
  background: var(--control-blue); color: var(--on-brand); border-color: var(--control-blue);
}
.verses-container { letter-spacing: 0; }
.seccion-titulo { color: var(--vinotinto); letter-spacing: 0; border-bottom: 1px solid var(--border); }
.keyword-highlight { color: var(--primary); }
.jesus-word, .jesus-word .keyword-highlight, .jesus-word .search-highlight { color: var(--jesus-red); }
.direct-suggest, .share-menu, .parallel-panel { background: var(--card-bg); border-color: var(--border); border-radius: 8px; box-shadow: var(--popover-shadow); }
.ds-label, .ds-ref, .quick-label { letter-spacing: 0 !important; }
.ds-preview p { color: var(--text); }
.ds-chip.activo { color: var(--on-brand); }
.ds-chip, .pill-quick { border-color: var(--border); }
.widget-footer { background: var(--card-bg); border-top: 1px solid var(--border); }
.footer-anuncio { background: var(--primary-light); border: 1px solid var(--border); border-radius: 8px; }
.footer-anuncio:hover { background: var(--selected-verse); }
.footer-salir { border-color: var(--border); border-radius: 8px; }
.footer-brand { color: var(--text-muted); }
.topics-panel, .study-panel { border-top: 2px solid var(--primary); box-shadow: 0 -6px 20px color-mix(in srgb, var(--text) 6%, transparent); }
.topics-heading h2, .study-heading h2 { letter-spacing: 0; }
.welcome-overlay { background: var(--brand-gradient); }
.welcome-overlay::before, .welcome-overlay::after { display: none; }
.welcome-card, .devocional-card { background: var(--paper); border-radius: 8px; box-shadow: var(--popover-shadow); }
.welcome-card {
  background: var(--daily-surface);
  border: 1px solid var(--daily-border);
  border-top: 4px solid var(--control-light);
  max-height: calc(100dvh - 28px);
  overflow-y: auto;
}
.welcome-card .welcome-verse-text {
  padding: 16px 0;
  border-top: 1px solid var(--daily-border);
  border-bottom: 1px solid var(--daily-border);
  font-style: normal;
  line-height: 1.8;
}
.welcome-logo { border-radius: 0; box-shadow: none; }
.welcome-app-name, .devocional-titulo { color: var(--ink); letter-spacing: 0; }
.welcome-subtitle, .devocional-etiqueta, .devocional-historial-titulo, .plan-seccion-titulo { letter-spacing: 0; }
.welcome-verse-text { font-family: 'Merriweather', Georgia, serif; color: var(--ink); }
.welcome-subtitle { color: var(--devotional-blue); }
.welcome-btn, .welcome-share, .devocional-share, .plan-leido {
  background: var(--devotional-blue); color: var(--paper); border-radius: 8px; box-shadow: none;
}
.welcome-share { background: var(--devotional-soft); color: var(--devotional-blue); border: 1px solid var(--border); }
.welcome-card .welcome-btn, .welcome-card .welcome-share {
  background: var(--control-blue);
  color: var(--on-brand);
  border: 1px solid var(--control-blue);
}
.welcome-card .welcome-verse-ref { background: var(--paper); color: var(--control-blue); border-color: var(--daily-border); }
.welcome-card .welcome-subtitle { color: var(--control-blue); }
.welcome-btn:hover { transform: none; box-shadow: none; filter: brightness(1.08); }
.devocional-leer, .devocional-volver, .devocional-historial-item, .plan-lectura { border-radius: 8px; }
.devocional-close { color: var(--devotional-blue); background: var(--devotional-soft); }
.devocional-titulo { line-height: 1.4; padding-right: 10px; }
.devocional-reflexion { color: var(--ink); line-height: 1.8; }
.devocional-verse-ref, .welcome-verse-ref { background: var(--devotional-soft); color: var(--devotional-blue); border-radius: 6px; }
.devocional-historial-item { color: var(--ink); }
.devocional-historial-fecha, #planOverlay .plan-fecha, #planOverlay .plan-progreso-texto,
#planOverlay .plan-inicio-texto, #planOverlay .plan-seccion-titulo { color: var(--devotional-blue); }
#devocionalTexto { background: var(--note-surface); border-color: var(--note-border); border-left-color: var(--devotional-blue); border-radius: 8px; }
.plan-leido.hecho { background: var(--success); box-shadow: none; }
.plan-nav button { background: var(--devotional-soft); color: var(--devotional-blue); }
#devocionalOverlay button,
#planOverlay button,
#btnAnuncioDevocional,
#btnAnuncioPlan {
  background: var(--devotional-button);
  color: var(--on-brand);
  border-color: var(--devotional-button);
}
#devocionalOverlay button:hover,
#planOverlay button:hover,
#btnAnuncioDevocional:hover,
#btnAnuncioPlan:hover { background: var(--devotional-button); filter: brightness(1.08); }
#devocionalOverlay .devocional-historial-item.activo {
  background: var(--devotional-button);
  outline: 2px solid var(--control-light);
  outline-offset: 1px;
}
#devocionalOverlay .devocional-historial-fecha { color: var(--on-brand); }
#planOverlay .plan-leido.hecho { background: var(--success); border-color: var(--success); }
.passage-header { border-bottom-color: var(--border); }
.passage-actions .btn-share { background: var(--primary-light); color: var(--primary); border-color: var(--border); }
.direct-suggest { border-top: 3px solid var(--primary); }
.mobile-select-option:hover, .share-item:hover { background: var(--primary-light); }
.topics-handle { background: var(--text-muted); opacity: .55; }
.devocional-historial-item { line-height: 1.5; }
#planOverlay .plan-reiniciar { border-radius: 6px; padding: 8px 12px; }
/* Consistent detail treatment across every existing view. */
.widget-container { box-shadow: var(--shadow); }
.reading-area { padding-inline: 16px; }
.passage-header { padding-block: 4px 9px; margin-bottom: 10px; }
.passage-title-main { font-weight: 800; }
.seccion-titulo { padding-bottom: 8px; line-height: 1.5; }
.verse-item { border-radius: 6px; }
.verses-container { scrollbar-color: var(--border) transparent; scrollbar-width: thin; }
.direct-suggest { padding: 14px; }
.ds-label { color: var(--text-muted); margin-block: 12px 7px; }
.ds-chips, .quick-pills { gap: 7px; }
.ds-chip { background: var(--card-bg); border-width: 1px; border-radius: 6px; }
.ds-chip:hover { background: var(--primary-light); }
.ds-range-toggle { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; margin-block: 4px 8px; color: var(--text); font-size: .95rem; font-weight: 700; cursor: pointer; }
.ds-range-toggle input { width: 20px; height: 20px; margin: 0; accent-color: var(--control-blue); }
.top-header-bar > .ds-range-toggle { align-self: flex-start; margin: 0; min-height: 28px; color: var(--on-brand); }
body.clean-reading-mode .ds-range-toggle { display: none; }
.ds-chip:disabled { opacity: .4; cursor: default; background: var(--surface-subtle); border-color: var(--border); }
.ds-chip.activo, .testament-pill.active { background: var(--primary); color: var(--on-brand); border-color: var(--primary); }
.pill-quick, .testament-pill { border-radius: 6px; background: var(--surface-subtle); color: var(--primary); }
.ds-preview { background: var(--surface-subtle); border-left: 3px solid var(--primary); border-radius: 0; }
.ds-palabra { border-style: solid; border-width: 1px; }
.share-menu { padding: 7px; }
.share-item { padding: 11px 12px; border-radius: 6px; }
.share-item + .share-item { border-top: 1px solid var(--border); }
.share-ico { border-radius: 5px; }
.mobile-select-list { border-radius: 8px; box-shadow: var(--popover-shadow); }
.mobile-select-option { padding: 10px 12px; }
.parallel-panel { padding: 16px; }
.parallel-label { font-weight: 600; }
.parallel-option { background: var(--surface-subtle); border-radius: 6px; }
.parallel-head { background: var(--surface-subtle); }
.parallel-head span { font-size: 1.25em; }
.parallel-cell + .parallel-cell { background: var(--surface-subtle); }
.parallel-version-label { line-height: 1.4; }
.topics-header, .study-header {
  background: var(--surface-subtle);
  border-bottom: 1px solid var(--border);
  padding: 11px 14px;
}
.topics-heading h2, .study-heading h2 { font-weight: 800; line-height: 1.4; }
.topics-heading p, .study-heading p { margin-top: 3px; }
.topics-body, .study-body { padding: 10px 14px 14px; }
.topic-link.btn-action { padding-inline: 6px; line-height: 1.5; height: auto; }
.topic-reference { font-weight: 700; }
.study-reference { background: var(--surface-subtle); border-color: var(--border); }
.study-preview { border-top-color: var(--border); }
.study-source { background: var(--surface-subtle); line-height: 1.6; }
.selection-bar { background: var(--primary-light); border-width: 1px; border-color: var(--border); border-radius: 8px; box-shadow: var(--shadow); }
.btn-sel-share { background: var(--control-blue); color: var(--on-brand); border-color: var(--control-blue); }
.btn-sel-cancel { background: var(--card-bg); color: var(--text-muted); }
.btn-scroll-top { background: var(--control-blue); color: var(--on-brand); box-shadow: var(--shadow); }
.toast { background: var(--toast-surface); color: var(--on-brand); box-shadow: var(--popover-shadow); max-width: calc(100vw - 24px); white-space: normal; text-align: center; }
.devocional-overlay { background: var(--scrim); }
.devocional-card { border: 1px solid var(--dialog-border); border-top: 4px solid var(--control-light); }
.devocional-etiqueta, .devocional-historial-titulo { color: var(--control-blue); font-weight: 800; }
.devocional-titulo { margin-bottom: 14px; }
.devocional-historial { border-top-color: var(--dialog-border); }
.devocional-historial-item { padding: 12px; }
.plan-progreso-barra { background: var(--daily-border); height: 6px; }
.plan-progreso-fill { background: var(--control-blue); }
.plan-progreso-texto { margin-top: 9px; }
.plan-seccion-titulo { margin-top: 20px; }
.plan-lecturas { gap: 10px; }
.welcome-card .welcome-app-name { margin-bottom: 8px; }
.welcome-card .welcome-subtitle { font-weight: 700; }
.welcome-card .welcome-logo { margin-bottom: 16px; }
button:focus-visible, a:focus-visible, select:focus-visible { outline: 2px solid var(--control-light); outline-offset: 3px; }
@media (max-width: 767px) {
  .top-header-bar { padding: 7px 8px 9px; gap: 7px; }
  .app-brand-row { gap: 7px; }
  .app-brand-name { font-size: 1.2rem; }
  .direct-search-row { gap: 6px; --search-control-height: 40px; }
  .direct-search-input { padding: 0 10px; }
  .widget-container { border-radius: 0; }
  .reading-area { padding-inline: 10px; }
  .direct-suggest { padding: 12px; }
  .topics-header, .study-header { padding: 9px 10px; }
  .topics-body, .study-body { padding: 8px 10px 10px; }
  .parallel-cell + .parallel-cell { padding-inline: 8px; border-radius: 6px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
/* Full-screen game keeps the Bible mounted and its reading position intact. */
.game-dialog { position:fixed; inset:0; width:100%; max-width:none; height:100dvh; max-height:none; margin:0; padding:0; border:0; background:var(--paper); }
.game-dialog::backdrop { background:var(--scrim); }
.game-dialog iframe { display:block; width:100%; height:100%; border:0; }
@media(max-width:767px) { .footer-acciones { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:5px; } .footer-acciones .footer-anuncio { min-width:0; padding:8px 4px; gap:4px; font-size:.7rem; justify-content:center; } }
