:root {
    --primary: #2d3748;
    --primary-light: #4a5568;
    --accent: #3182ce;
    --accent-hover: #2b6cb0;
    --bg-color: #f7fafc;
    --surface-color: #ffffff;
    --text-main: #1a202c;
    --text-muted: #718096;
    --border-color: #e2e8f0;
    --success: #27ae60;
    --warning: #f39c12;
    --danger: #e74c3c;

    --font-ui: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --font-reading: 'Merriweather', Georgia, serif;

    --nav-height: 74px;
    --header-height: 70px;
    --border-radius: 12px;
    --reading-size: 1.08rem;
}

/* Clases para tema manual */
body.dark-mode {
    --primary: #e5e7eb;
    --primary-light: #cbd5e1;
    --accent: #60a5fa;
    --accent-hover: #3b82f6;
    --bg-color: #05070b;
    --surface-color: #0f1115;
    --text-main: #f8fafc;
    --text-muted: #9ca3af;
    --border-color: #1f2937;
}

body.light-mode {
    --primary: #2d3748;
    --primary-light: #4a5568;
    --accent: #3182ce;
    --accent-hover: #2b6cb0;
    --bg-color: #f7fafc;
    --surface-color: #ffffff;
    --text-main: #1a202c;
    --text-muted: #718096;
    --border-color: #e2e8f0;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;

    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-ui);
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.5;
    padding-top: calc(56px + env(safe-area-inset-top));
    padding-bottom: calc(88px + env(safe-area-inset-bottom));
    min-height: 100vh;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* ========================================
   HEADER FIJO SIMPLE (SIN EFECTOS DE SCROLL)
   ======================================== */
.app-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1100;
    height: calc(56px + env(safe-area-inset-top));
    padding-top: env(safe-area-inset-top);
    background-color: var(--surface-color);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-left: 16px;
    padding-right: 16px;
}

.app-header::before {
    content: "";
    position: absolute;
    top: calc(env(safe-area-inset-top) * -1);
    left: 0;
    right: 0;
    height: env(safe-area-inset-top);
    background: var(--surface-color);
    pointer-events: none;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
}

.app-header-main {
    text-align: center;
}

.app-header-main h1 {
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--primary);
    margin: 0;
    white-space: nowrap;
}

.header-left-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: none;
    background: transparent;
    color: var(--text-main);
    font-size: 20px;
    border-radius: 10px;
    cursor: pointer;
    flex-shrink: 0;
}

.header-left-btn:hover {
    background: rgba(0, 0, 0, 0.05);
}

body.dark-mode .header-left-btn:hover {
    background: rgba(255, 255, 255, 0.08);
}

.header-left-btn:active {
    transform: scale(0.95);
}

.header-settings-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: none;
    background: transparent;
    color: var(--text-main);
    border-radius: 10px;
    cursor: pointer;
    flex-shrink: 0;
}

.header-settings-btn:hover {
    background: rgba(0, 0, 0, 0.05);
}

body.dark-mode .header-settings-btn:hover {
    background: rgba(255, 255, 255, 0.08);
}

.header-settings-btn:active {
    transform: scale(0.95);
}

.header-settings-btn svg {
    width: 20px;
    height: 20px;
}

.header-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 16px;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: 0 12px 32px rgba(0,0,0,0.12);
    padding: 12px;
    min-width: 150px;
    z-index: 9999;
    display: none;
    animation: fadeInDown 0.2s ease;
}

.header-dropdown.show {
    display: block;
}

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

.dropdown-section {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    margin-bottom: 8px;
}

.dropdown-section:last-child {
    margin-bottom: 0;
}

.dropdown-btn {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 8px 14px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    color: var(--text-main);
    transition: background 0.2s, color 0.2s, border-color 0.2s;
    width: 100%;
    justify-content: center;
}

.dropdown-btn:hover {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

.dropdown-btn.active {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

.dropdown-streak {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-main);
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    gap: 6px;
}

/* ========================================
   CONTENIDO PRINCIPAL
   ======================================== */
.container {
    padding: 0 12px calc(24px + var(--nav-height) + 86px); /* ⭐ padding-top a 0 */
    max-width: 600px;
    margin: 0 auto;
}

/* Home View */
.date-badge {
    display: inline-block;
    background-color: var(--accent);
    color: white;
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 24px;
    box-shadow: 0 2px 4px rgba(49, 130, 206, 0.2);
}

.reading-card {
    background: var(--surface-color);
    border-radius: var(--border-radius);
    padding: 20px 16px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    margin-bottom: 20px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.reading-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 16px -4px rgba(0, 0, 0, 0.1);
}

.section-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 8px;
    text-align: center;
}

.reading-reference {
    font-family: var(--font-reading);
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 24px;
    text-align: center;
    line-height: 1.2;
}

.reading-text-shell {
    position: relative;
    padding: 2px 2px;
    border-radius: 14px;
    -webkit-user-select: auto;
    user-select: auto;
    -webkit-touch-callout: default;
}

.reading-text-shell::before,
.reading-text-shell::after {
    content: "";
    display: block;
    height: 6px;
}

.reading-text {
    font-family: var(--font-reading);
    font-size: var(--reading-size);
    line-height: 1.75;
    color: var(--text-main);
    text-align: justify;
    letter-spacing: 0.2px;
    cursor: text;
    user-select: text;
    -webkit-user-select: text;
    -webkit-touch-callout: default;
    word-break: normal;
    overflow-wrap: break-word;
    padding: 0;
    margin: 0;
}

.reading-text::selection,
.reading-text *::selection {
    background: rgba(59, 130, 246, 0.18);
}

.reading-text::-moz-selection,
.reading-text *::-moz-selection {
    background: rgba(59, 130, 246, 0.18);
}

body.dark-mode .reading-text::selection,
body.dark-mode .reading-text *::selection {
    background: rgba(147, 197, 253, 0.18);
}

body.dark-mode .reading-text::-moz-selection,
body.dark-mode .reading-text *::-moz-selection {
    background: rgba(147, 197, 253, 0.18);
}

.reading-text p,
.reading-text span,
.reading-text strong,
.reading-text em,
.reading-text sup,
.reading-text small {
    -webkit-user-select: text;
    user-select: text;
}

.reading-text p {
    margin-bottom: 1rem;
}

.reading-text p:last-child {
    margin-bottom: 0;
}

.main-action,
.action-group,
.home-reading-bar,
.reading-date-header,
.badge-progress,
.section-title,
.reading-reference,
.btn-primary,
.btn-secondary,
.home-reading-bar-btn,
.floating-btn,
.floating-toggle-btn,
.floating-streak {
    -webkit-user-select: none;
    user-select: none;
}

.reading-text sup {
    font-size: 0.7em;
    color: var(--text-muted);
    vertical-align: super;
    margin-right: 2px;
    font-weight: 600;
}

.reading-date-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;

    width: fit-content;
    max-width: calc(100% - 24px);
    margin: 6px auto 16px auto;

    background: linear-gradient(135deg, #4da3ff, #6ec1ff);
    color: #ffffff;

    padding: 7px 16px;
    border-radius: 999px;

    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-align: center;

    box-shadow: 0 4px 10px rgba(77, 163, 255, 0.25);
}
.reading-date-header::before {
    content: "📅";
    font-size: 0.95rem;
}

.badge-progress-icon {
    font-size: 1rem;
    line-height: 1;
}

.badge-progress {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: fit-content;
    max-width: calc(100% - 24px);
    margin: 0 auto 14px auto;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 0.86rem;
    font-weight: 700;
    line-height: 1.2;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    border: 1px solid transparent;
    text-align: center;
}

.badge-progress-text {
    white-space: normal;
}

/* Estado inicial */
.badge-inicial {
    background: rgba(255, 255, 255, 0.9);
    color: var(--text-muted);
    border-color: var(--border-color);
}

/* Cobre */
.badge-cobre {
    background: rgba(184, 115, 51, 0.14);
    color: #9c5d2e;
    border-color: rgba(184, 115, 51, 0.28);
}

/* Bronce */
.badge-bronce {
    background: rgba(205, 127, 50, 0.14);
    color: #a35d1f;
    border-color: rgba(205, 127, 50, 0.28);
}

/* Plata */
.badge-plata {
    background: rgba(192, 192, 192, 0.18);
    color: #68707a;
    border-color: rgba(160, 170, 180, 0.35);
}

/* Oro */
.badge-oro {
    background: rgba(212, 175, 55, 0.16);
    color: #9c7a00;
    border-color: rgba(212, 175, 55, 0.3);
}

/* Diamante */
.badge-diamante {
    background: rgba(120, 190, 255, 0.18);
    color: #2c6ea3;
    border-color: rgba(120, 190, 255, 0.34);
}

/* Corona */
.badge-corona {
    background: rgba(155, 89, 182, 0.16);
    color: #7d3c98;
    border-color: rgba(155, 89, 182, 0.3);
}

body.dark-mode .badge-inicial {
    background: rgba(255, 255, 255, 0.05);
    color: #cbd5e0;
    border-color: rgba(255, 255, 255, 0.08);
}

body.dark-mode .badge-cobre {
    background: rgba(184, 115, 51, 0.2);
    color: #f0b183;
    border-color: rgba(184, 115, 51, 0.32);
}

body.dark-mode .badge-bronce {
    background: rgba(205, 127, 50, 0.2);
    color: #f4be85;
    border-color: rgba(205, 127, 50, 0.34);
}

body.dark-mode .badge-plata {
    background: rgba(190, 200, 210, 0.14);
    color: #e2e8f0;
    border-color: rgba(190, 200, 210, 0.25);
}

body.dark-mode .badge-oro {
    background: rgba(212, 175, 55, 0.2);
    color: #ffd86b;
    border-color: rgba(212, 175, 55, 0.34);
}

body.dark-mode .badge-diamante {
    background: rgba(120, 190, 255, 0.18);
    color: #9ed5ff;
    border-color: rgba(120, 190, 255, 0.32);
}

body.dark-mode .badge-corona {
    background: rgba(155, 89, 182, 0.2);
    color: #d7a6ef;
    border-color: rgba(155, 89, 182, 0.34);
}

/* ========================================
   BOTONES
   ======================================== */
.btn-primary {
    display: block;
    width: 100%;
    background-color: var(--accent);
    color: white;
    border: none;
    padding: 16px;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    font-family: var(--font-ui);
    box-shadow: 0 4px 6px rgba(49, 130, 206, 0.2);
}

.btn-primary:hover:not(:disabled),
.btn-primary:active:not(:disabled) {
    background-color: var(--accent-hover);
    transform: none;
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-secondary {
    display: flex;
    width: 100%;
    margin: 0;
    padding: 14px 16px;
    min-height: 56px;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.03));
    color: var(--text-main);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    font-size: 0.98rem;
    font-weight: 600;
    cursor: pointer;
    font-family: var(--font-ui);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.btn-secondary:hover {
    background: linear-gradient(180deg, rgba(255,255,255,0.1), rgba(255,255,255,0.05));
    transform: none;
}

.btn-secondary:active {
    transform: none;
}

.btn-secondary.has-note {
    border-color: var(--accent);
    box-shadow: 0 0 0 1px rgba(49, 130, 206, 0.4);
}

.btn-secondary.has-note::after {
    content: '●';
    margin-left: 6px;
    font-size: 0.6rem;
    color: var(--accent);
}

.btn-secondary.danger {
    border-color: var(--danger);
    color: var(--danger);
}

.btn-secondary.danger:hover {
    background-color: var(--danger);
    color: white;
}

.main-action {
    margin: 22px 0 16px 0;
}

.action-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin: 14px 0 26px 0;
}

.reading-action-card {
    width: 100%;
    min-height: 88px;

    display: grid;
    grid-template-columns: 64px 1fr 24px;
    align-items: center;
    gap: 14px;

    padding: 18px 20px;
    border-radius: 24px;

    font-family: var(--font-ui);
    text-align: left;

    cursor: pointer;

    transform: translateZ(0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;

    transition:
        transform 0.16s ease,
        box-shadow 0.2s ease,
        border-color 0.2s ease,
        background 0.2s ease;
}

.reading-action-card:active {
    transform: scale(0.985);
}

.reading-action-icon {
    width: 58px;
    height: 58px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    border-radius: 999px;

    font-size: 1.55rem;

    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.08);

    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        0 8px 18px rgba(0, 0, 0, 0.18);
}

.reading-action-content {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.reading-action-title {
    display: flex;
    align-items: center;
    gap: 8px;

    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.15;

    color: #f8fafc;
}

.reading-action-subtitle {
    font-size: 0.92rem;
    font-weight: 500;
    line-height: 1.3;

    color: rgba(226, 232, 240, 0.72);
}

.reading-action-check {
    font-size: 1rem;
    font-weight: 800;
    color: #ffffff;
}

.reading-action-dot {
    width: 9px;
    height: 9px;
    border-radius: 999px;
    background: #4da3ff;
    box-shadow: 0 0 12px rgba(77, 163, 255, 0.65);
}

.reading-action-chevron {
    width: 13px;
    height: 13px;
    border-top: 3px solid rgba(255, 255, 255, 0.76);
    border-right: 3px solid rgba(255, 255, 255, 0.76);
    transform: rotate(45deg);
    justify-self: center;
}

.reading-action-primary {
    background:
        radial-gradient(circle at 92% 50%, rgba(59, 130, 246, 0.32), transparent 34%),
        linear-gradient(180deg, rgba(20, 24, 32, 0.94), rgba(12, 16, 24, 0.96));

    border: 1.5px solid rgba(77, 163, 255, 0.9);

    box-shadow:
        0 12px 32px rgba(59, 130, 246, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.reading-action-primary .reading-action-icon {
    background: rgba(30, 41, 59, 0.95);
    border-color: rgba(96, 165, 250, 0.12);
}

.reading-action-read {
    background:
        linear-gradient(180deg, rgba(37, 99, 170, 0.98), rgba(29, 78, 142, 0.98));

    border: 1px solid rgba(96, 165, 250, 0.45);

    box-shadow:
        0 12px 30px rgba(37, 99, 235, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.12);

    cursor: default;

    overflow: hidden;
}

.reading-action-read:disabled {
    opacity: 1;
}

.reading-action-read .reading-action-icon {
    color: #7db7ff;
    font-size: 2.2rem;

    background: rgba(30, 64, 120, 0.95);
    border: 1px solid rgba(125, 183, 255, 0.25);
}

.reading-action-share {
    background:
        linear-gradient(180deg, rgba(22, 26, 34, 0.92), rgba(13, 17, 24, 0.94));

    border: 1px solid rgba(255, 255, 255, 0.10);

    box-shadow:
        0 10px 26px rgba(0, 0, 0, 0.22),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);

    overflow: hidden;
}

.reading-action-share .reading-action-icon {
    background: rgba(255, 255, 255, 0.04);
}

@media (max-width: 480px) {
    .reading-action-card {
        min-height: 86px;
        grid-template-columns: 64px 1fr 24px;
        padding: 16px 18px;
        border-radius: 22px;
        gap: 12px;
    }

    .reading-action-icon {
        width: 54px;
        height: 54px;
        font-size: 1.4rem;
    }

    .reading-action-title {
        font-size: 1.12rem;
    }

    .reading-action-subtitle {
        font-size: 0.84rem;
    }
}

.action-group .btn-secondary:first-child {
    width: 100%;
}

/* ========================================
   BIBLIA
   ======================================== */
.bible-view,
.bible-reading-view {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* ========================================
   SECCIÓN BIBLIA - DISEÑO PROFESIONAL (CORREGIDO)
   ======================================== */

/* Barra de navegación superior (donde va el botón Volver) */
.bible-nav-top {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    padding: 0 4px;
}

.bible-back-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 18px;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 30px;
    color: var(--accent, #3182ce);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
    min-height: 44px;
    white-space: nowrap;
}

.bible-back-btn:hover {
    background: var(--hover-bg, #f5f5f5);
    border-color: var(--accent, #3182ce);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
}

.bible-back-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}

/* Header principal de la Biblia - LIMPIO Y CENTRADO */
.bible-header-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 28px 20px;
    background: var(--surface-color, #ffffff);
    border-radius: 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border-color, #eaeaea);
}

/* Título principal "Biblia" o nombre del libro */
.bible-title {
    font-size: 2.4rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--primary, #1a202c);
    line-height: 1.2;
    width: 100%;
}

/* Subtítulo con la versión de la Biblia */
.bible-subtitle {
    font-size: 0.9rem;
    color: var(--text-muted, #666666);
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    background: var(--tag-bg, #f0f0f0);
    padding: 6px 16px;
    border-radius: 30px;
    display: inline-block;
}

/* Versión de la Biblia en la pantalla de lectura */
.bible-reading-version {
    text-align: center;
    margin: 8px 0 20px 0;
    color: var(--text-muted, #666666);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.8;
}

/* Grid de libros */
.bible-books-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.bible-book-card {
    border: 1px solid var(--border-color);
    background: var(--surface-color);
    color: var(--text-main);
    border-radius: 14px;
    padding: 16px 12px;
    min-height: 92px;
    text-align: left;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 8px;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.04);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.bible-book-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.08);
    border-color: var(--accent, #3182ce);
}

.bible-book-name {
    font-size: 0.98rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1.3;
}

.bible-book-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 600;
}

.bible-chapters-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    margin-top: 8px;
}

.bible-chapter-btn {
    border: 1px solid var(--border-color);
    background: var(--surface-color);
    color: var(--text-main);
    border-radius: 12px;
    min-height: 54px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.04);
    transition: all 0.18s ease;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bible-chapter-btn:hover {
    transform: translateY(-2px);
    border-color: var(--accent, #3182ce);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.08);
    background: var(--accent, #3182ce);
    color: white;
}

/* Modo oscuro */
.dark-mode .bible-header-card,
.dark-mode .bible-book-card,
.dark-mode .bible-chapter-btn {
    background: var(--surface-color, #0f1115);
    border-color: var(--border-color, #1f2937);
}

.dark-mode .bible-title {
    color: var(--primary, #f8fafc);
}

.dark-mode .bible-subtitle,
.dark-mode .bible-reading-version {
    color: var(--text-muted, #9ca3af);
}

.dark-mode .bible-subtitle {
    background: var(--tag-bg-dark, #1f2937);
}

.dark-mode .bible-back-btn {
    color: var(--accent, #60a5fa);
    border-color: var(--border-color, #1f2937);
}

.dark-mode .bible-back-btn:hover {
    background: var(--hover-bg-dark, #1f2937);
    border-color: var(--accent, #60a5fa);
}

.dark-mode .bible-chapter-btn:hover {
    background: var(--accent, #60a5fa);
    color: white;
}

/* Responsive */
@media (max-width: 480px) {
    .bible-title {
        font-size: 2rem;
    }
    
    .bible-header-card {
        padding: 20px 16px;
    }
    
    .bible-back-btn {
        padding: 8px 14px;
        font-size: 0.9rem;
    }
    
    .bible-chapters-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.bible-book-card {
    border: 1px solid var(--border-color);
    background: var(--surface-color);
    color: var(--text-main);
    border-radius: 14px;
    padding: 16px 12px;
    min-height: 92px;
    text-align: left;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 8px;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.04);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.bible-book-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.08);
    border-color: rgba(49, 130, 206, 0.28);
}

.bible-book-card:active {
    transform: none;
}

.bible-book-name {
    font-size: 0.98rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1.3;
}

.bible-book-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 600;
}

.bible-chapters-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.bible-chapter-btn {
    border: 1px solid var(--border-color);
    background: var(--surface-color);
    color: var(--text-main);
    border-radius: 12px;
    min-height: 54px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.04);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background-color 0.18s ease;
}

.bible-chapter-btn:hover {
    transform: none;
    border-color: rgba(49, 130, 206, 0.35);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.08);
}

.bible-chapter-btn:active {
    transform: none;
}

.bible-reading-view h2 {
    font-family: var(--font-reading);
    font-size: 1.45rem;
    color: var(--primary);
    text-align: center;
    margin: 2px 0 4px;
}

.bible-reading-view .reading-text {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 18px 16px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
}

.bible-section-title {
    display: block;
    margin: 1.4rem 0 0.8rem;
    padding: 0.35rem 0 0.2rem;
    font-family: var(--font-ui);
    font-size: 0.98rem;
    font-weight: 700;
    line-height: 1.35;
    color: var(--text-main);
    opacity: 0.9;
    letter-spacing: 0.01em;
    border-top: 1px solid var(--border-color);
}

.bible-section-title:first-child {
    margin-top: 0;
    border-top: 0;
    padding-top: 0;
}

.verse-item + .bible-section-title {
    margin-top: 1.6rem;
}

body.dark-mode .bible-section-title {
    color: var(--text-main);
    border-top-color: var(--border-color);
}

.verse-study-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 8px;
    padding: 4px 10px;
    border: 1px solid rgba(49, 130, 206, 0.22);
    border-radius: 999px;
    background: rgba(49, 130, 206, 0.08);
    color: var(--accent);
    font-family: var(--font-ui);
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.2;
    cursor: pointer;
    vertical-align: middle;
    transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.verse-study-btn:hover {
    background: rgba(49, 130, 206, 0.14);
    border-color: rgba(49, 130, 206, 0.36);
}

.verse-study-btn:active {
    transform: scale(0.98);
}

body.dark-mode .verse-study-btn {
    border-color: rgba(96, 165, 250, 0.28);
    background: rgba(96, 165, 250, 0.12);
    color: #93c5fd;
}

body.dark-mode .verse-study-btn:hover {
    background: rgba(96, 165, 250, 0.18);
    border-color: rgba(96, 165, 250, 0.42);
}

@media (max-width: 480px) {
    .bible-books-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .bible-chapters-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 8px;
    }

    .bible-book-card {
        min-height: 84px;
        padding: 14px 10px;
    }

    .bible-chapter-btn {
        min-height: 50px;
        font-size: 0.95rem;
    }
}

/* ========================================
   CALENDARIO
   ======================================== */
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    margin-top: 8px;
}

.calendar-day {
    background-color: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 28px 14px 16px 14px;
    min-height: 150px;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
    transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}

.calendar-day:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
}

.calendar-day:active {
    transform: none;
}

.calendar-day.today {
    border: 2px solid var(--accent);
    background-color: rgba(49, 130, 206, 0.1);
}

.calendar-day.read {
    background-color: rgba(39, 174, 96, 0.1);
    border-color: var(--success);
}

.calendar-day.read.today {
    background-color: rgba(49, 130, 206, 0.1);
    border-color: var(--accent);
}

.today-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background-color: var(--accent);
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 999px;
    letter-spacing: 0.04em;
    z-index: 2;
}

.cal-date {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1.25;
    margin-bottom: 10px;
}

.cal-ref {
    font-size: 0.85rem;
    line-height: 1.35;
    color: var(--text-muted);
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 6px;
}

.cal-arrow {
    text-align: right;
    margin-top: 12px;
    color: var(--text-muted);
    font-size: 0.8rem;
}

.read-badge, .note-badge, .highlight-badge {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 20px;
}

.read-badge {
    background-color: var(--success);
    color: white;
}

.note-badge {
    background-color: var(--warning);
    color: white;
}

.highlight-badge {
    background-color: var(--accent);
    color: white;
}

/* ========================================
   NOTAS Y REFLEXIONES
   ======================================== */
.note-box {
    margin: 16px 0 30px 0;
    background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.02));
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
    animation: fadeNote 0.25s ease;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

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

.note-section {
    margin-bottom: 0;
    padding: 14px;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    background: rgba(0, 0, 0, 0.02);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.04);
    opacity: 0.9;
    cursor: pointer;
    transform-origin: center top;
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease, opacity 0.22s ease, background 0.22s ease;
}

body.dark-mode .note-section {
    background: rgba(255, 255, 255, 0.03);
}

.note-section.active {
    transform: none;
    border-color: rgba(99, 179, 237, 0.55);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.16);
    opacity: 1;
    background: rgba(49, 130, 206, 0.08);
}

body.dark-mode .note-section.active {
    border-color: rgba(99, 179, 237, 0.5);
    background: rgba(99, 179, 237, 0.08);
}

.note-title {
    font-size: 0.94rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 10px;
}

.note-textarea {
    width: 100%;
    min-height: 110px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 12px;
    font-size: 0.95rem;
    font-family: var(--font-ui);
    resize: vertical;
    background-color: var(--bg-color);
    color: var(--text-main);
    margin-bottom: 0;
    line-height: 1.6;
    transition: min-height 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease, background-color 0.22s ease;
}

.note-textarea:focus {
    outline: none;
    border-color: var(--accent);
}

.note-textarea.active {
    min-height: 240px;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(49, 130, 206, 0.16);
}

.note-textarea:not(:placeholder-shown) {
    border-color: rgba(77, 166, 255, 0.6);
}

.note-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 6px;
}

.note-privacy {
    font-size: 0.8rem;
    opacity: 0.8;
    margin-bottom: 10px;
    text-align: center;
    padding: 6px 10px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.04);
}

body.dark-mode .note-privacy {
    background: rgba(255, 255, 255, 0.05);
}

/* ========================================
   COMPARTAMOS SU VOZ
   ======================================== */
.community-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.community-header {
    text-align: center;
    margin: 4px 0 6px 0;
}

.community-title {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -0.02em;
}

.community-subtitle {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-top: 6px;
    line-height: 1.5;
}

.community-intro-card {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
}

.community-intro-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 8px;
}

.community-intro-text {
    font-size: 0.92rem;
    color: var(--text-muted);
    line-height: 1.65;
}

.community-feed {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.community-card {
    background: var(--surface-color);
    border-radius: 16px;
    padding: 18px 16px;
    border: 1px solid var(--border-color);
    box-shadow: 0 6px 18px rgba(0,0,0,0.05);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.community-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(0,0,0,0.08);
}

.community-card::before {
    content: "";
    display: block;
    height: 3px;
    width: 42px;
    background: var(--accent);
    border-radius: 999px;
    margin-bottom: 12px;
    opacity: 0.55;
}

.community-ref {
    font-family: var(--font-reading);
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--primary);
    margin-bottom: 6px;
    line-height: 1.3;
}

.community-meta {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-bottom: 12px;
    font-weight: 600;
}

.community-text {
    font-family: var(--font-reading);
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text-main);
    font-style: italic;
}

.community-form-card {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 18px;
    padding: 18px 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
    display: flex;
    flex-direction: column;
    gap: 14px;
    animation: fadeNote 0.22s ease;
}

.community-form-title {
    font-size: 1rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 2px;
}

.community-form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.community-label {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text-main);
}

.community-input,
.community-textarea {
    width: 100%;
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 12px 14px;
    font-size: 0.95rem;
    font-family: var(--font-ui);
    background: var(--bg-color);
    color: var(--text-main);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.community-char-counter {
    margin-top: 6px;
    text-align: right;
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 600;
    transition: color 0.2s ease;
}

.community-char-counter.warning {
    color: #b7791f;
}

.community-char-counter.danger {
    color: var(--danger);
}

.community-input:focus,
.community-textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(49, 130, 206, 0.12);
}

.community-input[readonly] {
    opacity: 0.9;
    font-weight: 600;
}

.community-textarea {
    min-height: 150px;
    resize: vertical;
    line-height: 1.6;
}

.community-check-group {
    padding-top: 2px;
}

.community-check-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    color: var(--text-main);
    font-weight: 500;
}

.community-check-label input[type="checkbox"] {
    transform: scale(1.05);
    accent-color: var(--accent);
}

.community-form-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 4px;
}

.community-actions {
    margin-top: 10px;
    display: flex;
    justify-content: flex-end;
}

.community-delete-main {
    border: 1px solid rgba(231, 76, 60, 0.38);
    background: transparent;
    color: var(--danger);
    font-size: 0.74rem;
    font-weight: 600;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 10px;
    min-height: auto;
    width: auto;
    box-shadow: none;
    opacity: 0.82;
    transition: opacity 0.18s ease, background-color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.community-delete-main:hover {
    opacity: 1;
    background: rgba(231, 76, 60, 0.08);
    border-color: rgba(231, 76, 60, 0.55);
}

.community-delete-main:active {
    transform: none;
}

body.dark-mode .community-delete-main {
    background: transparent;
    color: #ff8a80;
    border-color: rgba(255, 138, 128, 0.32);
}

body.dark-mode .community-delete-main:hover {
    background: rgba(255, 138, 128, 0.08);
    border-color: rgba(255, 138, 128, 0.5);
}

/* ========================================
   ESTADÍSTICAS
   ======================================== */
.stats-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.stat-card {
    background: var(--surface-color);
    border-radius: 16px;
    padding: 24px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border-color);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--accent);
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 6px;
}

.stat-progress {
    margin-top: 16px;
}

.progress-bar {
    height: 8px;
    background: var(--accent);
    border-radius: 4px;
    transition: width 0.5s ease;
}

.progress-text {
    font-size: 0.75rem;
    margin-top: 8px;
    color: var(--text-muted);
}

.stat-note {
    font-size: 0.75rem;
    margin-top: 8px;
    color: var(--text-muted);
}

/* ========================================
   AJUSTES / SETTINGS
   ======================================== */
.settings-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.setting-card {
    background: var(--surface-color);
    border-radius: 16px;
    padding: 20px;
    border: 1px solid var(--border-color);
}

.setting-card h3 {
    margin-bottom: 16px;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary);
}

.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

.setting-item:last-child {
    border-bottom: none;
}

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

.time-input {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-color);
    color: var(--text-main);
    font-family: var(--font-ui);
}

/* Switch toggle */
.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.3s;
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: var(--accent);
}

input:checked + .slider:before {
    transform: translateX(26px);
}

/* ========================================
   TOAST MESSAGES
   ======================================== */
.toast-message {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: rgba(0, 0, 0, 0.85);
    color: white;
    padding: 10px 20px;
    border-radius: 30px;
    font-size: 0.875rem;
    z-index: 10000;
    transition: transform 0.3s ease;
    pointer-events: none;
    max-width: 90vw;
    white-space: normal;
    text-align: center;
    font-weight: 500;
    backdrop-filter: blur(8px);
}

.toast-message.show {
    transform: translateX(-50%) translateY(0);
}

body.dark-mode .toast-message {
    background: rgba(255, 255, 255, 0.9);
    color: #1a1a2e;
}

/* ========================================
   BOTTOM NAVIGATION
   ======================================== */
.bottom-nav {
    position: fixed;
    left: 50%;
    bottom: calc(8px + env(safe-area-inset-bottom));  /* ← CAMBIA 14px por 8px */
    transform: translateX(-50%);
    width: min(88vw, 380px);
    height: 60px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-evenly;

    padding: 4px 10px;

    z-index: 1200;

    border-radius: 999px;

    background: rgba(10, 18, 32, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.12);

    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);

    box-shadow:
        0 12px 28px rgba(0, 0, 0, 0.36),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);

    transform: translateX(-50%) translateZ(0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.nav-btn {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.62);
    font-family: var(--font-ui);

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    flex: 1;
    min-width: 48px;
    height: 100%;

    cursor: pointer;
    transition: color 0.2s ease, transform 0.14s ease;
    padding: 0 2px;
}

.nav-btn > span {
    display: block;
    width: 100%;

    font-size: 0.6rem;
    margin-top: 3px;
    font-weight: 500;
    letter-spacing: -0.01em;

    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nav-btn.active {
    color: #4da3ff;
}

.nav-btn svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    stroke-width: 2;
}

.nav-btn:active {
    transform: scale(0.94);
}

body.light-mode .bottom-nav {
    background: rgba(255, 255, 255, 0.88);
    border-color: rgba(15, 23, 42, 0.08);
    box-shadow:
        0 12px 28px rgba(15, 23, 42, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

body.light-mode .nav-btn {
    color: rgba(31, 41, 55, 0.55);
}

body.light-mode .nav-btn.active {
    color: var(--accent);
}

body.dark-mode .bottom-nav {
    background: rgba(10, 18, 32, 0.88);
    border-color: rgba(255, 255, 255, 0.12);
}

body.dark-mode .nav-btn {
    color: rgba(255, 255, 255, 0.62);
}

body.dark-mode .nav-btn.active {
    color: #4da3ff;
}

.nav-btn-community {
    position: relative;
}

/* ========================================
   BADGE DE COMUNIDAD (NOTIFICACIONES)
   ======================================== */

.nav-btn-community {
    position: relative;
    overflow: visible;
}

.community-badge[data-count] {
    font-size: 10px;
}

.community-badge[data-count="10"],
.community-badge[data-count="11"],
.community-badge[data-count="12"],
.community-badge[data-count="13"],
.community-badge[data-count="14"],
.community-badge[data-count="15"],
.community-badge[data-count="16"],
.community-badge[data-count="17"],
.community-badge[data-count="18"],
.community-badge[data-count="19"],
.community-badge[data-count="20"] {
    min-width: 20px;
    padding: 0 6px;
}

.community-badge {
    position: absolute;
    top: 0px;
    right: 22px;
    z-index: 20;

    width: 16px;
    height: 16px;
    min-width: 16px;
    max-width: 16px;
    padding: 0;

    display: inline-flex !important;
    align-items: center;
    justify-content: center;

    border-radius: 999px;
    background: #ef4444;
    color: #ffffff;

    font-size: 9px;
    font-weight: 800;
    line-height: 1;

    border: 2px solid rgba(10, 18, 32, 0.95);
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.12),
        0 3px 8px rgba(239, 68, 68, 0.4);

    pointer-events: none;
}

.community-badge[hidden] {
    display: none !important;
}

.community-badge:not([hidden]) {
    animation: badge-pop 0.22s ease-out;
}

@keyframes badge-pop {
    0% {
        transform: scale(0.65);
        opacity: 0;
    }
    70% {
        transform: scale(1.12);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Efecto de pulso cuando hay notificaciones nuevas */
.community-badge:not([hidden]) {
    animation: badge-pulse 0.3s ease-out;
}

@keyframes badge-pulse {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }
    50% {
        transform: scale(1.15);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Badge oculto */
.community-badge[hidden] {
    display: none !important;
}

.community-badge:not([hidden]) {
    animation: badge-pop 0.25s ease;
}

@keyframes badge-pop {
    0% {
        transform: scale(0.6);
        opacity: 0;
    }
    60% {
        transform: scale(1.15);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Modo oscuro */
body.dark-mode .community-badge {
    background: rgba(239, 68, 68, 0.95);
    border-color: rgba(255, 255, 255, 0.25);
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

/* Modo claro */
body.light-mode .community-badge {
    background: rgba(239, 68, 68, 0.95);
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 3px 10px rgba(239, 68, 68, 0.3), 0 0 0 1px rgba(0, 0, 0, 0.08);
}

/* Ajuste para números de 2 dígitos */
.community-badge[data-count="10"],
.community-badge[data-count="11"],
.community-badge[data-count="12"],
.community-badge[data-count="13"],
.community-badge[data-count="14"],
.community-badge[data-count="15"],
.community-badge[data-count="16"],
.community-badge[data-count="17"],
.community-badge[data-count="18"],
.community-badge[data-count="19"],
.community-badge[data-count="20"] {
    padding: 0 4px;
}

/* Ajuste para pantallas pequeñas */
@media (max-width: 480px) {
    .community-badge {
        top: 0px;
        right: 0px;
        min-width: 18px;
        height: 18px;
        font-size: 10px;
        padding: 0 4px;
    }
}

.community-badge[hidden] {
    display: none !important;
}

/* ========================================
   HIGHLIGHTS INICIO - VERDE Y ROSA
   Pintan el texto, no el contenedor
   ======================================== */

.verse-item.highlight-green,
.verse-item.highlight-rose {
    background: transparent !important;
    border-color: transparent !important;
    box-shadow: none !important;
}

.verse-item.highlight-green .verse-text-content {
    background: rgba(34, 197, 94, 0.22);
    border-radius: 4px;
    padding: 0 0.12em;
    box-decoration-break: clone;
    -webkit-box-decoration-break: clone;
}

.verse-item.highlight-rose .verse-text-content {
    background: rgba(244, 63, 94, 0.22);
    border-radius: 4px;
    padding: 0 0.12em;
    box-decoration-break: clone;
    -webkit-box-decoration-break: clone;
}

body.dark-mode .verse-item.highlight-green .verse-text-content {
    background: rgba(34, 197, 94, 0.24);
}

body.dark-mode .verse-item.highlight-rose .verse-text-content {
    background: rgba(244, 63, 94, 0.24);
}

/* ========================================
   UTILIDADES
   ======================================== */
.fade-in {
    animation: fadeIn 0.22s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.loading {
    text-align: center;
    color: var(--text-muted);
    padding: 40px;
    font-style: italic;
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
}

/* Spinner para loading */
.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-color);
    border-top-color: var(--accent);
    border-radius: 50%;
    margin: 0 auto 16px;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (min-width: 768px) {
    .calendar-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .note-actions {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 4px 10px calc(20px + var(--nav-height) + 86px);
    }

    .reading-card {
        padding: 18px 14px;
    }

    .reading-reference {
        font-size: 1.45rem;
    }

    .reading-date-header {
        font-size: 0.9rem;
        padding: 7px 16px;
        margin: 6px auto 14px auto;
    }
}

/* ========================================
   ANIMACIONES ADICIONALES
   ======================================== */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(0.95); }
    100% { transform: scale(1); }
}

.mark-read-feedback {
    animation: pulse 0.3s ease;
}

/* ========================================
   ABOUT CARD (PROFESIONAL)
   ======================================== */
.about-card {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.about-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.about-header h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--primary);
}

.about-version {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    background: rgba(0,0,0,0.05);
    padding: 4px 10px;
    border-radius: 999px;
}

body.dark-mode .about-version {
    background: rgba(255,255,255,0.08);
}

.about-description {
    font-size: 0.92rem;
    line-height: 1.6;
    color: var(--text-muted);
}

/* FEATURES */
.about-features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.about-feature {
    font-size: 0.85rem;
    padding: 8px 10px;
    border-radius: 10px;
    background: rgba(0,0,0,0.03);
    color: var(--text-main);
    font-weight: 500;
}

body.dark-mode .about-feature {
    background: rgba(255,255,255,0.05);
}

/* DIVIDER */
.about-divider {
    height: 1px;
    background: var(--border-color);
    margin: 6px 0;
}

/* SUPPORT TEXT */
.about-support-text {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-align: center;
}

/* BUTTONS */
.about-actions {
    display: flex;
    gap: 10px;
}

.about-actions .btn-secondary {
    flex: 1;
    font-size: 0.9rem;
    padding: 12px;
}

.april-message {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 20000;
    backdrop-filter: blur(6px);
}

.april-box {
    background: var(--surface-color);
    padding: 22px 18px;
    border-radius: 16px;
    max-width: 320px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.25);
}

.april-box h2 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: var(--primary);
}

.april-box p {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-muted);
}

.april-message.hidden {
    display: none;
}

/* ========================================
   SPLASH SCREEN
   ======================================== */
#splash-screen {
    position: fixed;
    inset: 0;
    background: #0f172a;
    z-index: 30000;
    opacity: 1;
    transition: opacity 0.8s ease;
    overflow: hidden;
}

#splash-screen img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* =========================================================
   REACCIONES DE COMUNIDAD
   ========================================================= */

.community-reaction-row {
    margin-top: 14px;
    padding-top: 10px;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.community-reaction-bar {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 18px;
    flex-wrap: wrap;
    width: 100%;
}

.community-reaction-btn {
    appearance: none;
    -webkit-appearance: none;
    border: none;
    background: transparent;
    padding: 0;
    margin: 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    color: var(--text-muted);
    font: inherit;
    transition: transform 0.15s ease, opacity 0.15s ease, color 0.2s ease;
}

.community-reaction-btn:hover {
    transform: none;
    opacity: 0.92;
}

.community-reaction-btn:active {
    transform: none;
}

.community-reaction-btn.is-active {
    color: var(--accent);
    text-shadow: 0 0 10px color-mix(in srgb, var(--accent) 22%, transparent);
}

.community-reaction-btn.is-active .community-reaction-icon {
    filter: drop-shadow(0 0 6px color-mix(in srgb, var(--accent) 28%, transparent));
}

.community-reaction-icon {
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: currentColor;
    flex-shrink: 0;
}

.community-reaction-icon svg {
    width: 100%;
    height: 100%;
    display: block;
    overflow: visible;
}

.community-reaction-btn[data-reaction="pray"] .community-reaction-icon {
    width: 24px;
    height: 24px;
}

.community-reaction-count {
    font-size: 0.84rem;
    font-weight: 700;
    line-height: 1;
    min-width: 10px;
}

body.dark-mode .community-reaction-row {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

body.dark-mode .community-reaction-btn {
    color: #94a3b8;
}

.community-reaction-btn.is-loading {
    opacity: 0.6;
    pointer-events: none;
}

@media (max-width: 480px) {
    .community-reaction-bar {
        gap: 16px;
    }

    /* tamaño general un poco más grande */
    .community-reaction-icon {
        width: 23px;
        height: 23px;
    }

    /* oración ligeramente más grande que los demás */
    .community-reaction-btn[data-reaction="pray"] .community-reaction-icon {
        width: 26px;
        height: 26px;
    }

    .community-reaction-count {
        font-size: 0.8rem;
    }
}

.home-reading-bar {
    position: fixed;
    left: 50%;
    bottom: calc(78px + env(safe-area-inset-bottom));  /* ← CAMBIA 92px por 78px */
    transform: translateX(-50%);
    width: min(88vw, 380px);
    height: 44px;
    padding: 0 10px;
    border-radius: 999px;

    display: grid;
    grid-template-columns: 36px 1fr 36px;
    align-items: center;
    gap: 6px;

    z-index: 1190;

    background: rgba(20, 24, 32, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.12);

    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);

    box-shadow:
        0 10px 24px rgba(0, 0, 0, 0.28),
        inset 0 1px 0 rgba(255,255,255,0.06);

    transition: opacity 0.2s ease, transform 0.2s ease;
}

.home-reading-bar-btn {
    width: 30px;
    height: 30px;
    border: none;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.88);
    font-size: 0;
    font-weight: 700;
    cursor: pointer;

    display: flex;
    align-items: center;
    justify-content: center;

    transition: background 0.18s ease, transform 0.14s ease, opacity 0.18s ease;
}

.home-reading-bar-btn::before {
    content: "";
    width: 7px;
    height: 7px;
    border-top: 2px solid currentColor;
    border-right: 2px solid currentColor;
    display: block;
}

.home-reading-bar-btn:first-child::before {
    transform: rotate(-135deg);
    margin-left: 2px;
}

.home-reading-bar-btn:last-child::before {
    transform: rotate(45deg);
    margin-right: 2px;
}

.home-reading-bar-btn:active {
    transform: scale(0.92);
}

.home-reading-bar-btn:disabled {
    opacity: 0.28;
    pointer-events: none;
}

.home-reading-bar-title {
    min-width: 0;
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #ffffff;
    opacity: 0.88;
    padding: 0 4px;
}

body.light-mode .home-reading-bar {
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(255, 255, 255, 0.9);
    box-shadow:
        0 10px 24px rgba(15, 23, 42, 0.12),
        inset 0 1px 0 rgba(255,255,255,0.7);
}

body.light-mode .home-reading-bar-btn,
body.light-mode .home-reading-bar-title {
    color: #1f2937;
}

body.dark-mode .home-reading-bar {
    background: rgba(20, 24, 32, 0.74);
    border: 1px solid rgba(255, 255, 255, 0.10);
    box-shadow:
        0 10px 24px rgba(0, 0, 0, 0.34),
        inset 0 1px 0 rgba(255,255,255,0.06);
}

body.dark-mode .home-reading-bar-btn,
body.dark-mode .home-reading-bar-title {
    color: #f8fafc;
}

.intro-video-card {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 14px;
    margin-bottom: 16px;
}

.intro-video-head {
    text-align: center;
    margin-bottom: 10px;
}

.intro-video-label {
    font-size: 0.75rem;
    color: var(--accent);
    font-weight: 700;
}

.intro-video-title {
    font-size: 1rem;
    font-weight: 600;
}

.intro-video-frame {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    border-radius: 12px;
    overflow: hidden;
    background: #000;
}

.intro-video-frame iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.intro-video-note {
    font-size: 0.85rem;
    text-align: center;
    margin-top: 8px;
    color: var(--text-muted);
}

.community-input.error,
.community-textarea.error {
    border-color: #dc3545;
    background-color: #fff8f8;
    animation: shake 0.3s ease-in-out;
}

body.dark-mode .community-input.error,
body.dark-mode .community-textarea.error {
    background-color: rgba(231, 76, 60, 0.08);
    border-color: #e74c3c;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.community-reply-block {
    margin-top: 12px;
}

.community-reply-toolbar {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 8px;
}

.community-reply-toggle {
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    padding: 4px 0;
    transition: color 0.18s ease, opacity 0.18s ease;
}

.community-reply-toggle:hover {
    color: var(--accent);
    opacity: 0.9;
}

.community-reply-form {
    margin-top: 8px;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 14px;
    background: rgba(0, 0, 0, 0.02);
}

body.dark-mode .community-reply-form {
    background: rgba(255, 255, 255, 0.03);
}

.community-reply-textarea {
    width: 100%;
    min-height: 90px;
    resize: vertical;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 12px;
    font-size: 0.92rem;
    font-family: var(--font-ui);
    background: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
}

.community-reply-textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(49, 130, 206, 0.12);
}

.community-reply-form-footer {
    margin-top: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.community-reply-counter {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 600;
}

.community-reply-form-actions {
    display: flex;
    gap: 8px;
}

.community-reply-form-actions .btn-secondary,
.community-reply-form-actions .btn-primary {
    width: auto;
    min-height: 42px;
    padding: 10px 14px;
    font-size: 0.86rem;
    border-radius: 10px;
}

.community-reply-list {
    margin-top: 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-left: 10px;
    border-left: 2px solid rgba(148, 163, 184, 0.22);
}

.community-reply-item {
    margin-left: 0;
    padding: 8px 10px;
    border-left: none;
    background: rgba(15, 23, 42, 0.03);
    border-radius: 10px;
}

body.dark-mode .community-reply-item {
    background: rgba(255, 255, 255, 0.03);
}

.community-reply-meta {
    font-size: 0.72rem;
    color: var(--text-muted);
    font-weight: 600;
    opacity: 0.7;
    margin-bottom: 3px;
}

.community-reply-text {
    font-size: 0.86rem;
    line-height: 1.55;
    color: var(--text-muted);
}

.community-reply-actions {
    margin-top: 4px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.community-reply-item:hover .community-reply-actions {
    opacity: 1;
}

.community-reply-delete {
    border: none;
    background: transparent;
    color: var(--danger);
    font-size: 0.72rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
    opacity: 0.7;
}

/* ========================================
   PANEL DE SELECCIÓN (MEJORADO - ANDROID + iOS)
   ======================================== */

.selection-panel {
    position: fixed;
    inset: 0;
    z-index: 25000;
    pointer-events: none;
    transform: translateZ(0);
}

.selection-panel.visible {
    pointer-events: auto;
}

body.selection-panel-open {
    overflow: hidden !important;
    touch-action: none !important;
}

.selection-panel-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.58);
    opacity: 0;
    transition: opacity 0.22s ease;
    pointer-events: none;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

.selection-panel.visible .selection-panel-backdrop {
    opacity: 1;
    pointer-events: auto;
}

.selection-sheet-full {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;

    background: linear-gradient(180deg, #1b2029 0%, #151922 100%);
    color: #f8fafc;

    border-radius: 32px 32px 0 0;
    padding: 26px 26px max(24px, env(safe-area-inset-bottom));

    transform: translateY(105%);
    transition: transform 0.24s cubic-bezier(0.22, 1, 0.36, 1);

    box-shadow:
        0 -24px 60px rgba(0, 0, 0, 0.48),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);

    border: 1px solid rgba(255, 255, 255, 0.08);
    border-bottom: none;

    display: flex;
    flex-direction: column;
    gap: 16px;

    max-height: calc(88vh - env(safe-area-inset-top));
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.selection-panel.visible .selection-sheet-full {
    transform: translateY(0);
}

.selection-sheet-handle {
    width: 56px;
    height: 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.38);
    margin: 0 auto 8px;
}

.close-btn {
    position: absolute;
    top: 52px;
    right: 26px;

    width: 54px;
    height: 54px;
    border-radius: 999px;

    border: none;
    background: rgba(255, 255, 255, 0.10);
    color: #ffffff;

    font-size: 30px;
    line-height: 1;

    display: flex;
    align-items: center;
    justify-content: center;

    cursor: pointer;
    transition: transform 0.15s ease, background 0.15s ease;
}

.close-btn:active {
    transform: scale(0.94);
    background: rgba(255, 255, 255, 0.16);
}

.selection-sheet-title {
    padding-right: 70px;
}

.selection-sheet-title h3 {
    margin: 0;
    font-size: 1.65rem;
    line-height: 1.1;
    font-weight: 800;
    letter-spacing: -0.04em;
    color: #ffffff;
}

.selection-sheet-title p {
    margin: 8px 0 0;
    font-size: 1rem;
    color: rgba(226, 232, 240, 0.72);
    font-weight: 500;
}

.selection-section-label {
    margin-top: 8px;
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    color: rgba(226, 232, 240, 0.62);
}

.selection-color-card {
    min-height: 78px;
    padding: 18px 22px;
    border-radius: 18px;

    background: rgba(255, 255, 255, 0.055);
    border: 1px solid rgba(255, 255, 255, 0.055);

    display: flex;
    align-items: center;
    gap: 28px;
}

.color-btn {
    width: 42px;
    height: 42px;
    min-width: 42px;
    min-height: 42px;

    border-radius: 999px;
    border: 2px solid transparent;
    cursor: pointer;

    box-shadow:
        0 8px 18px rgba(0, 0, 0, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.35);

    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.color-btn:active {
    transform: scale(0.9);
}

.color-btn.is-active {
    border-color: #ffffff;
    box-shadow:
        0 0 0 4px rgba(255, 255, 255, 0.20),
        0 8px 18px rgba(0, 0, 0, 0.22),
        inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.color-btn.yellow {
    background: #ffd84a;
}

.color-btn.blue {
    background: #4b8df7;
}

.color-btn.green {
    background: #55c878;
}

.color-btn.rose {
    background: #f26677;
}

.selection-actions-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
}

.action-btn {
    min-height: 58px;
    border: none;
    border-radius: 16px;

    background: rgba(255, 255, 255, 0.075);
    color: #f8fafc;

    font-family: var(--font-ui);
    font-size: 0.98rem;
    font-weight: 700;

    cursor: pointer;
    transition: transform 0.15s ease, background 0.15s ease;
}

.action-btn:active {
    transform: scale(0.97);
    background: rgba(255, 255, 255, 0.12);
}

.action-btn.danger {
    color: #ff6b6b;
}

.selection-bottom {
    display: none;
    flex-direction: column;
    gap: 12px;
    padding-top: 2px;
}

.selection-panel.note-mode .selection-bottom {
    display: flex;
}

.selection-bottom textarea {
    width: 100%;
    min-height: 96px;
    max-height: 160px;

    border-radius: 16px;
    padding: 14px 16px;

    border: 1px solid rgba(255, 255, 255, 0.10);
    background: rgba(2, 6, 23, 0.38);
    color: #f8fafc;

    resize: none;
    font-family: var(--font-ui);
    font-size: 1rem;
    line-height: 1.5;
}

.selection-bottom textarea::placeholder {
    color: rgba(226, 232, 240, 0.48);
}

.selection-bottom textarea:focus {
    outline: none;
    border-color: rgba(96, 165, 250, 0.75);
    box-shadow: 0 0 0 4px rgba(96, 165, 250, 0.14);
}

.selection-bottom .btn-primary {
    border-radius: 16px;
    padding: 15px;
    font-size: 1rem;
    font-weight: 800;
    box-shadow: none;
}

.selection-status {
    margin: 4px 0 0;
    color: rgba(226, 232, 240, 0.52);
    font-size: 0.88rem;
    font-weight: 500;
}

@media (max-width: 420px) {
    .selection-sheet-full {
        padding-left: 20px;
        padding-right: 20px;
        border-radius: 28px 28px 0 0;
    }

    .selection-sheet-title h3 {
        font-size: 1.45rem;
    }

    .selection-color-card {
        gap: 22px;
        padding-left: 18px;
        padding-right: 18px;
    }

    .action-btn {
        font-size: 0.92rem;
    }

    .close-btn {
        right: 20px;
    }
}

/* ✅ NUEVO: Ajustes específicos para Android */
@media (max-width: 768px) and (pointer: coarse) {
    /* Evitar que el texto se mueva durante la selección */
    .reading-text-shell {
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
    }
    
    /* Mejorar visibilidad de la selección */
    .selection-surface ::selection {
        background: rgba(250, 204, 21, 0.35) !important;
        color: inherit !important;
    }
    
    .dark-mode .selection-surface ::selection {
        background: rgba(250, 204, 21, 0.25) !important;
    }
}

/* Modo oscuro para el backdrop */
.dark-mode .selection-panel-backdrop {
    background: rgba(0, 0, 0, 0.6);
}

.dark-mode .action-btn:active {
    background: rgba(255, 255, 255, 0.08);
}

.dark-mode .close-btn:active {
    background: rgba(255, 255, 255, 0.08);
}

/* ========================================
   RESALTADOS Y NOTAS DE SELECCIÓN
   ======================================== */

mark.user-highlight {
    padding: 0.08em 0.12em;
    border-radius: 0.3em;
    transition: background-color 0.2s ease, box-shadow 0.2s ease;
    color: inherit !important;
    -webkit-text-fill-color: currentColor !important;
}

mark.user-highlight-yellow {
    background: rgba(250, 204, 21, 0.22);
    box-shadow: 0 0 0 1px rgba(202, 138, 4, 0.18);
}

mark.user-highlight-blue {
    background: rgba(96, 165, 250, 0.22);
    box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.18);
}

mark.user-highlight-green {
    background: rgba(34, 197, 94, 0.22);
    box-shadow: 0 0 0 1px rgba(22, 163, 74, 0.18);
}

mark.user-highlight-rose {
    background: rgba(244, 63, 94, 0.20);
    box-shadow: 0 0 0 1px rgba(225, 29, 72, 0.16);
}

body.dark-mode mark.user-highlight-green {
    background: rgba(34, 197, 94, 0.16);
    box-shadow: inset 0 -1px 0 rgba(34, 197, 94, 0.12);
}

body.dark-mode mark.user-highlight-rose {
    background: rgba(244, 63, 94, 0.15);
    box-shadow: inset 0 -1px 0 rgba(244, 63, 94, 0.12);
}

.verse-item.highlight-green {
    background: rgba(34, 197, 94, 0.18);
    border-color: rgba(34, 197, 94, 0.36);
    box-shadow: inset 3px 0 0 rgba(34, 197, 94, 0.75);
}

.verse-item.highlight-rose {
    background: rgba(244, 63, 94, 0.16);
    border-color: rgba(244, 63, 94, 0.34);
    box-shadow: inset 3px 0 0 rgba(244, 63, 94, 0.72);
}

body.dark-mode .verse-item.highlight-green {
    background: rgba(34, 197, 94, 0.14);
    border-color: rgba(34, 197, 94, 0.28);
    box-shadow: inset 3px 0 0 rgba(34, 197, 94, 0.65);
}

body.dark-mode .verse-item.highlight-rose {
    background: rgba(244, 63, 94, 0.13);
    border-color: rgba(244, 63, 94, 0.28);
    box-shadow: inset 3px 0 0 rgba(244, 63, 94, 0.65);
}

body.dark-mode mark.user-highlight-yellow {
    background: rgba(250, 204, 21, 0.16);
    box-shadow: inset 0 -1px 0 rgba(250, 204, 21, 0.12);
}

body.dark-mode mark.user-highlight-blue {
    background: rgba(96, 165, 250, 0.16);
    box-shadow: inset 0 -1px 0 rgba(96, 165, 250, 0.12);
}

.selection-note-anchor {
    position: relative;
    border-bottom: 2px dotted rgba(49, 130, 206, 0.95);
    cursor: pointer;
}

.selection-note-anchor::after {
    content: '📝';
    font-size: 0.72em;
    margin-left: 4px;
    vertical-align: super;
    line-height: 1;
}

body.dark-mode .selection-note-anchor {
    border-bottom: 2px dotted rgba(96, 165, 250, 0.95);
}

/* ========================================
   SKELETON LOADING PARA COMUNIDAD
   ======================================== */
.skeleton-loading {
    padding: 20px;
}

.skeleton-header {
    height: 80px;
    background: linear-gradient(
        90deg,
        rgba(226, 232, 240, 0.7) 25%,
        rgba(241, 245, 249, 0.95) 50%,
        rgba(226, 232, 240, 0.7) 75%
    );
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 12px;
    margin-bottom: 20px;
}

.skeleton-card {
    height: 200px;
    background: linear-gradient(
        90deg,
        rgba(226, 232, 240, 0.7) 25%,
        rgba(241, 245, 249, 0.95) 50%,
        rgba(226, 232, 240, 0.7) 75%
    );
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 12px;
    margin-bottom: 16px;
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Modo oscuro para skeleton */
body.dark-mode .skeleton-header,
body.dark-mode .skeleton-card {
    background: linear-gradient(
        90deg,
        rgba(31, 41, 55, 0.72) 25%,
        rgba(51, 65, 85, 0.92) 50%,
        rgba(31, 41, 55, 0.72) 75%
    );
    background-size: 200% 100%;
}


/* ========================================
   ESTABILIDAD DE SCROLL (CORRECCIÓN)
   ======================================== */
html {
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

body {
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
}

body.selection-panel-open {
    overflow: hidden !important;
}

/* Asegurar que el contenido principal tenga scroll fluido */
#app-content {
    -webkit-overflow-scrolling: touch;
    min-height: 100vh;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }
}

/* ======================================== */
/* VERSÍCULOS SELECCIONABLES POR CLIC       */
/* ======================================== */

.verse-container {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.verse-item {
    padding: 10px 14px;
    border-radius: 10px;
    transition: all 0.15s ease;
    cursor: pointer;
    line-height: 1.65;
    border-left: 3px solid transparent;
}

.verse-item:active {
    background-color: rgba(0, 0, 0, 0.04);
}

.dark-mode .verse-item:active {
    background-color: rgba(255, 255, 255, 0.06);
}

.verse-number {
    font-weight: 600;
    font-size: 0.8em;
    margin-right: 8px;
    color: var(--text-muted);
    vertical-align: super;
}

.verse-text-content {
    font-weight: normal;
}

/* Versículo seleccionado - ESTILO PROFESIONAL */
.verse-selected {
    background-color: transparent !important;
    border-left: none !important;
}

.verse-selected .verse-text-content {
    background-color: rgba(66, 133, 244, 0.2);
    box-shadow: 0 0 0 2px rgba(66, 133, 244, 0.15);
    border-radius: 4px;
    padding: 0 2px;
    margin: 0 -2px;
    display: inline;
    -webkit-box-decoration-break: clone;
    box-decoration-break: clone;
}

.dark-mode .verse-selected .verse-text-content {
    background-color: rgba(96, 165, 250, 0.25);
    box-shadow: 0 0 0 2px rgba(96, 165, 250, 0.2);
}

/* Resaltados en versículos - ESTILO PROFESIONAL (SOLO TEXTO) */

/* Quitar fondo/borde del contenedor del versículo */
.verse-item.highlight-yellow,
.verse-item.highlight-blue,
.verse-item.highlight-green,
.verse-item.highlight-rose {
    background-color: transparent !important;
    border-left: none !important;
}

/* ----- Amarillo ----- */
.verse-item.highlight-yellow .verse-text,
.verse-item.highlight-yellow .verse-text-content {
    background-color: rgba(250, 204, 21, 0.4);
    border-radius: 4px;
    padding: 0 2px;
    margin: 0 -2px;
    display: inline;
    -webkit-box-decoration-break: clone;
    box-decoration-break: clone;
}
.dark-mode .verse-item.highlight-yellow .verse-text,
.dark-mode .verse-item.highlight-yellow .verse-text-content {
    background-color: rgba(250, 204, 21, 0.35);
}

/* ----- Azul ----- */
.verse-item.highlight-blue .verse-text,
.verse-item.highlight-blue .verse-text-content {
    background-color: rgba(59, 130, 246, 0.35);
    border-radius: 4px;
    padding: 0 2px;
    margin: 0 -2px;
    display: inline;
    -webkit-box-decoration-break: clone;
    box-decoration-break: clone;
}
.dark-mode .verse-item.highlight-blue .verse-text,
.dark-mode .verse-item.highlight-blue .verse-text-content {
    background-color: rgba(96, 165, 250, 0.3);
}

/* ----- Verde (NUEVO) ----- */
.verse-item.highlight-green .verse-text,
.verse-item.highlight-green .verse-text-content {
    background-color: rgba(34, 197, 94, 0.35);
    border-radius: 4px;
    padding: 0 2px;
    margin: 0 -2px;
    display: inline;
    -webkit-box-decoration-break: clone;
    box-decoration-break: clone;
}
.dark-mode .verse-item.highlight-green .verse-text,
.dark-mode .verse-item.highlight-green .verse-text-content {
    background-color: rgba(74, 222, 128, 0.35);
}

/* ----- Rosa (NUEVO) ----- */
.verse-item.highlight-rose .verse-text,
.verse-item.highlight-rose .verse-text-content {
    background-color: rgba(244, 114, 182, 0.35);
    border-radius: 4px;
    padding: 0 2px;
    margin: 0 -2px;
    display: inline;
    -webkit-box-decoration-break: clone;
    box-decoration-break: clone;
}
.dark-mode .verse-item.highlight-rose .verse-text,
.dark-mode .verse-item.highlight-rose .verse-text-content {
    background-color: rgba(251, 146, 208, 0.35);
}

/* ======================================== */
/* ÍCONO DE NOTA EN VERSÍCULOS              */
/* ======================================== */

.verse-note-icon {
    display: inline-block;
    margin-left: 8px;
    font-size: 0.85em;
    opacity: 0.7;
    cursor: pointer;
    transition: opacity 0.15s ease, transform 0.15s ease;
    vertical-align: middle;
}

.verse-note-icon:hover {
    opacity: 1;
    transform: scale(1.1);
}

.verse-item:hover .verse-note-icon {
    opacity: 0.9;
}

.dark-mode .verse-note-icon {
    opacity: 0.8;
}

/* ========================================
   BÚSQUEDA EN LA BIBLIA
   ======================================== */

.bible-search-container {
    margin-bottom: 20px;
}

.bible-search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.bible-search-input {
    width: 100%;
    padding: 16px 48px 16px 20px;
    font-size: 1rem;
    font-family: var(--font-ui);
    background: var(--surface-color);
    border: 2px solid var(--border-color);
    border-radius: 30px;
    color: var(--text-main);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.bible-search-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(49, 130, 206, 0.15);
}

.bible-search-clear {
    position: absolute;
    right: 12px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: var(--border-color);
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, color 0.2s ease;
}

.bible-search-clear:hover {
    background: var(--danger);
    color: white;
}

.bible-search-stats {
    padding: 12px 8px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-color);
}

.bible-search-results {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.bible-search-result-item {
    padding: 16px;
    background: var(--surface-color);
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
    margin-bottom: 8px;
    border: 1px solid var(--border-color);
}

.bible-search-result-item:hover {
    background: rgba(49, 130, 206, 0.05);
    transform: translateX(4px);
}

.bible-search-result-reference {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 8px;
}

.bible-search-result-text {
    font-family: var(--font-reading);
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-main);
}

.search-highlight {
    background: rgba(250, 204, 21, 0.4);
    padding: 0 2px;
    border-radius: 4px;
    font-weight: 600;
}

.dark-mode .search-highlight {
    background: rgba(250, 204, 21, 0.3);
}

.bible-search-placeholder {
    text-align: center;
    padding: 40px 20px;
}

.bible-search-icon {
    font-size: 3rem;
    margin-bottom: 16px;
    opacity: 0.6;
}

.bible-search-placeholder h3 {
    font-size: 1.2rem;
    color: var(--text-main);
    margin-bottom: 8px;
}

.bible-search-placeholder p {
    color: var(--text-muted);
    margin-bottom: 24px;
}

.bible-search-suggestions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.suggestion-tag {
    padding: 8px 16px;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 30px;
    font-size: 0.9rem;
    color: var(--accent);
    cursor: pointer;
    transition: all 0.2s ease;
}

.suggestion-tag:hover {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

/* Versículo encontrado en búsqueda (resaltado temporal) */
.verse-searched {
    animation: searchPulse 1s ease;
    background: rgba(250, 204, 21, 0.2) !important;
    border-radius: 8px;
}

@keyframes searchPulse {
    0%, 100% { background: rgba(250, 204, 21, 0.2); }
    50% { background: rgba(250, 204, 21, 0.5); }
}

.dark-mode .verse-searched {
    background: rgba(250, 204, 21, 0.25) !important;
}

/* Títulos de sección en la Biblia */
.bible-section-title {
    font-size: 1.1rem;
    font-weight: 700;
    text-align: center;
    margin: 20px 0 12px 0;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.dark-mode .bible-section-title {
    color: var(--accent);
}

/* ========================================
   PESTAÑAS DE FILTRO PARA BÚSQUEDA
   ======================================== */

.bible-search-filters {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    padding: 4px;
    background: var(--surface-color);
    border-radius: 40px;
    border: 1px solid var(--border-color);
}

.bible-filter-btn {
    flex: 1;
    padding: 10px 8px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.bible-filter-btn:hover {
    background: rgba(49, 130, 206, 0.1);
    color: var(--accent);
}

.bible-filter-btn.active {
    background: var(--accent);
    color: white;
    box-shadow: 0 2px 8px rgba(49, 130, 206, 0.3);
}

.dark-mode .bible-filter-btn {
    color: var(--text-muted);
}

.dark-mode .bible-filter-btn:hover {
    background: rgba(96, 165, 250, 0.15);
    color: var(--accent);
}

.dark-mode .bible-filter-btn.active {
    background: var(--accent);
    color: white;
}

@media (max-width: 480px) {
    .bible-filter-btn {
        font-size: 0.75rem;
        padding: 8px 4px;
    }
}

/* ========================================
   PAGINACIÓN BUSCADOR BÍBLICO
   ======================================== */

.bible-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 18px;
}

.bible-page-btn {
    min-width: 40px;
    height: 40px;
    padding: 0 10px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    background: var(--surface-color);
    color: var(--text-main);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.bible-page-btn.active {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

.bible-page-btn:disabled {
    opacity: 0.4;
}

/* ========================================
   TECLADO ABIERTO
   ======================================== */

body.keyboard-open .bottom-nav,
body.keyboard-open .home-reading-bar {
    opacity: 0 !important;
    pointer-events: none !important;
}

body.keyboard-open .home-reading-bar {
    transform: translateX(-50%) translateY(24px) !important;
}

body.keyboard-open {
    padding-bottom: 0 !important;
}

body.keyboard-open .app-header {
    transform: none !important;
}

/* ========================================
   HOME ACTION CARDS - MODO CLARO PROFESIONAL
   ======================================== */

body.light-mode .reading-action-card {
    background: linear-gradient(180deg, #ffffff, #f8fafc);
    border: 1px solid rgba(15, 23, 42, 0.06);

    box-shadow:
        0 6px 18px rgba(15, 23, 42, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

/* ICONO */
body.light-mode .reading-action-icon {
    background: #f1f5f9;
    border: 1px solid rgba(15, 23, 42, 0.06);
    box-shadow: none;
}

/* TITULO */
body.light-mode .reading-action-title {
    color: #0f172a;
}

/* SUBTITULO */
body.light-mode .reading-action-subtitle {
    color: #64748b;
}

/* CHEVRON */
body.light-mode .reading-action-chevron {
    border-color: rgba(15, 23, 42, 0.35);
}

/* BOTÓN PRINCIPAL (azul) */
body.light-mode .reading-action-primary {
    background: linear-gradient(180deg, #3b82f6, #2563eb);
    border: none;

    box-shadow:
        0 10px 24px rgba(59, 130, 246, 0.25);
}

body.light-mode .reading-action-primary .reading-action-title,
body.light-mode .reading-action-primary .reading-action-subtitle {
    color: white;
}

/* LEÍDO */
body.light-mode .reading-action-read {
    background: linear-gradient(180deg, #e0f2fe, #bae6fd);
    border: 1px solid rgba(59, 130, 246, 0.25);

    box-shadow:
        0 6px 16px rgba(59, 130, 246, 0.15);
}

body.light-mode .reading-action-read .reading-action-title {
    color: #1e40af;
}

body.light-mode .reading-action-read .reading-action-subtitle {
    color: #1e3a8a;
}

/* COMPARTIR */
body.light-mode .reading-action-share {
    background: linear-gradient(180deg, #ffffff, #f1f5f9);
    border: 1px solid rgba(15, 23, 42, 0.08);

    box-shadow:
        0 6px 18px rgba(15, 23, 42, 0.08);
}

/* ========================================
   PANEL INDEPENDIENTE PARA VER NOTA
   ======================================== */

.note-view-panel {
    position: fixed;
    inset: 0;
    z-index: 10050;
    display: none;
    align-items: flex-end;
}

.note-view-panel.visible {
    display: flex;
}

.note-view-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.56);
    backdrop-filter: blur(9px);
    -webkit-backdrop-filter: blur(9px);
}

.note-view-sheet {
    position: relative;
    width: 100%;
    max-height: 84vh;
    overflow-y: auto;
    padding: 22px 18px calc(24px + env(safe-area-inset-bottom));
    border-radius: 30px 30px 0 0;
    background: linear-gradient(180deg, #ffffff, #f8fafc);
    box-shadow: 0 -18px 42px rgba(0, 0, 0, 0.24);
    animation: noteViewSlideUp 0.34s cubic-bezier(0.32, 0.72, 0, 1);
    will-change: transform;
    touch-action: pan-y;
}

@keyframes noteViewSlideUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

.note-view-close {
    position: absolute;
    top: 38px;
    right: 18px;
    width: 46px;
    height: 46px;
    border: none;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.08);
    color: #111827;
    font-size: 1.35rem;
    cursor: pointer;
}

.note-view-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 34px;
    margin-bottom: 22px;
    padding-right: 58px;
}

.note-view-icon {
    width: 58px;
    height: 58px;
    border-radius: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(49, 130, 206, 0.12);
    color: var(--accent);
    font-size: 1.5rem;
}

.note-view-title {
    font-size: 1.35rem;
    font-weight: 800;
    color: #111827;
    line-height: 1.15;
}

.note-view-subtitle {
    margin-top: 4px;
    font-size: 0.92rem;
    color: #6b7280;
}

.note-view-quote {
    padding: 18px 18px 18px 20px;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(49,130,206,0.12), rgba(49,130,206,0.04));
    border-left: 4px solid var(--accent);
    font-family: var(--font-reading);
    font-style: italic;
    font-size: 0.98rem;
    line-height: 1.75;
    color: #111827;
}

.note-view-divider {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 18px 0;
    color: var(--accent);
    font-size: 1rem;
}

.note-view-divider::before,
.note-view-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: rgba(148, 163, 184, 0.35);
}

.note-view-content {
    padding: 18px;
    border-radius: 18px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    background: rgba(255, 255, 255, 0.82);
    color: #111827;
    font-size: 1rem;
    line-height: 1.7;
    white-space: pre-wrap;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
}

.note-view-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid rgba(148, 163, 184, 0.28);
}

.note-view-edit-btn,
.note-view-delete-btn {
    min-height: 54px;
    border-radius: 16px;
    font-family: var(--font-ui);
    font-size: 0.98rem;
    font-weight: 800;
    cursor: pointer;
}

.note-view-edit-btn {
    border: none;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #ffffff;
    box-shadow: 0 10px 20px rgba(37, 99, 235, 0.24);
}

.note-view-delete-btn {
    background: #ffffff;
    border: 1px solid rgba(220, 38, 38, 0.32);
    color: #dc2626;
}

.note-view-footer {
    margin-top: 18px;
    text-align: center;
    color: #6b7280;
    font-size: 0.86rem;
}

body.dark-mode .note-view-sheet {
    background: linear-gradient(180deg, #111827, #080b12);
}

body.dark-mode .note-view-title,
body.dark-mode .note-view-quote,
body.dark-mode .note-view-content {
    color: #f8fafc;
}

body.dark-mode .note-view-subtitle,
body.dark-mode .note-view-footer {
    color: #9ca3af;
}

body.dark-mode .note-view-close {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

body.dark-mode .note-view-content {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.1);
}

body.dark-mode .note-view-delete-btn {
    background: transparent;
    border-color: rgba(248, 113, 113, 0.35);
    color: #f87171;
}

/* ========================================
   PANEL DE SELECCIÓN - MODO CLARO
   ======================================== */

body.light-mode .selection-sheet-full {
    background: linear-gradient(180deg, #ffffff, #f8fafc);
    color: #111827;
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 -18px 42px rgba(15, 23, 42, 0.18);
}

body.light-mode .selection-sheet-title h3 {
    color: #111827;
}

body.light-mode .selection-sheet-title p,
body.light-mode .selection-section-label,
body.light-mode .selection-status {
    color: #64748b;
}

body.light-mode .selection-color-card,
body.light-mode .selection-actions-row {
    background: rgba(248, 250, 252, 0.95);
    border: 1px solid rgba(148, 163, 184, 0.22);
}

body.light-mode .action-btn {
    background: #ffffff;
    color: #111827;
    border: 1px solid rgba(148, 163, 184, 0.28);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
}

body.light-mode .action-btn:active {
    background: #f1f5f9;
}

body.light-mode .action-btn.danger {
    color: #dc2626;
    border-color: rgba(220, 38, 38, 0.28);
}

body.light-mode #selectionNote {
    background: #ffffff;
    color: #111827;
    border: 1px solid rgba(148, 163, 184, 0.35);
}

body.light-mode #selectionNote::placeholder {
    color: #94a3b8;
}

body.light-mode .close-btn {
    background: rgba(15, 23, 42, 0.08);
    color: #111827;
}

body.light-mode .selection-sheet-handle {
    background: rgba(15, 23, 42, 0.18);
}

/* ======================================== */
/* PERGAMINO DE PROGRESO - VERSIÓN COMPACTA  */
/* ======================================== */

.pergamino-libro {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 14px 12px;
    margin: 0 0 16px 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.pergamino-titulo {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 2px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.pergamino-subtitulo {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 10px;
    font-weight: 500;
    opacity: 0.8;
}

/* Capítulos */
.pergamino-capitulos {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 10px;
    max-height: 84px;
    overflow-y: auto;
    padding: 2px 0;
}

.pergamino-capitulo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 600;
    flex-shrink: 0;
}

.capitulo-leido {
    background: rgba(49, 130, 206, 0.12);
    color: var(--accent);
}

.capitulo-pendiente {
    background: transparent;
    color: var(--text-muted);
    opacity: 0.45;
}

/* Barra de progreso */
.pergamino-progreso {
    margin-top: 2px;
}

.pergamino-barra-fondo {
    height: 4px;
    background: var(--border-color);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 4px;
}

.pergamino-barra-lleno {
    height: 100%;
    background: var(--accent);
    border-radius: 4px;
    transition: width 0.6s ease;
}

.pergamino-porcentaje {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-align: right;
    font-weight: 600;
}

/* ======================================== */
/* TEMA OSCURO                               */
/* ======================================== */

.dark-mode .pergamino-libro {
    background: var(--surface-color);
    border-color: var(--border-color);
}

.dark-mode .capitulo-leido {
    background: rgba(96, 165, 250, 0.15);
    color: var(--accent);
}

.dark-mode .capitulo-pendiente {
    opacity: 0.3;
}

/* ======================================== */
/* BANNER DE HITO (se mantiene igual)         */
/* ======================================== */

.hito-banner {
    position: fixed;
    bottom: 100px;
    left: 15px;
    right: 15px;
    max-width: 400px;
    margin: 0 auto;
    background: linear-gradient(145deg, #1a1a2e, #0f3460);
    border: 2px solid #DAA520;
    border-radius: 20px;
    padding: 24px;
    z-index: 1000;
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
    animation: slideUp 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

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

.hito-banner-content {
    text-align: center;
    color: white;
}

.hito-banner-icono {
    font-size: 3rem;
    margin-bottom: 10px;
}

.hito-banner-titulo {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 4px;
    color: #FFD700;
}

.hito-banner-libro {
    font-size: 0.9rem;
    color: #DAA520;
    margin-bottom: 12px;
    font-weight: 600;
}

.hito-banner-descripcion {
    font-size: 0.95rem;
    margin-bottom: 16px;
    opacity: 0.9;
    line-height: 1.5;
}

.hito-banner-btn {
    background: #DAA520;
    color: #1a1a2e;
    border: none;
    padding: 10px 24px;
    border-radius: 25px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
}

.hito-banner-btn:active {
    transform: scale(0.95);
    background: #FFD700;
}

/* ======================================== */
/* BANNER DE LIBRO COMPLETADO               */
/* ======================================== */

.libro-completo-banner {
    position: fixed;
    bottom: 80px;
    left: 15px;
    right: 15px;
    max-width: 420px;
    margin: 0 auto;
    background: linear-gradient(145deg, #0f0c29, #302b63, #24243e);
    border: 3px solid #FFD700;
    border-radius: 24px;
    padding: 28px;
    z-index: 1000;
    box-shadow: 0 25px 50px rgba(0,0,0,0.6), 0 0 30px rgba(255, 215, 0, 0.2);
    animation: slideUp 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.libro-completo-content {
    text-align: center;
    color: white;
}

.libro-completo-icono {
    font-size: 3.5rem;
    margin-bottom: 12px;
    animation: flotar 2s ease-in-out infinite;
}

@keyframes flotar {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.libro-completo-titulo {
    font-size: 1.6rem;
    font-weight: 700;
    color: #FFD700;
    margin-bottom: 4px;
}

.libro-completo-subtitulo {
    font-size: 1rem;
    color: #e2c28b;
    margin-bottom: 16px;
}

.libro-completo-versiculo {
    font-style: italic;
    font-size: 0.9rem;
    opacity: 0.85;
    line-height: 1.5;
    margin-bottom: 4px;
}

.libro-completo-ref {
    font-size: 0.8rem;
    color: #DAA520;
    margin-bottom: 16px;
}

.libro-completo-btn {
    background: linear-gradient(135deg, #FFD700, #DAA520);
    color: #1a1a2e;
    border: none;
    padding: 12px 28px;
    border-radius: 25px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
}

.libro-completo-btn:active {
    transform: scale(0.95);
}

/* ========================================
   VIEW HERO / ENCABEZADO DE CADA SECCIÓN
   Diseño premium por vista
   ======================================== */

.view-hero {
    position: relative;
    overflow: hidden;

    margin: 6px 0 18px;
    padding: 22px 20px 20px;

    border-radius: 26px;
    border: 1px solid rgba(49, 130, 206, 0.16);

    background:
        radial-gradient(circle at top left, rgba(49, 130, 206, 0.16), transparent 34%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.58)),
        var(--surface-color);

    box-shadow:
        0 14px 34px rgba(15, 23, 42, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.view-hero::after {
    content: "";
    position: absolute;
    width: 120px;
    height: 120px;
    right: -48px;
    top: -48px;

    border-radius: 999px;
    background: rgba(49, 130, 206, 0.12);
    pointer-events: none;
}

.view-hero-kicker {
    position: relative;
    z-index: 1;

    width: fit-content;
    margin-bottom: 10px;
    padding: 5px 10px;

    border-radius: 999px;
    background: rgba(49, 130, 206, 0.10);
    color: var(--accent);

    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.view-hero h2 {
    position: relative;
    z-index: 1;

    margin: 0;

    font-size: clamp(1.7rem, 7vw, 2.45rem);
    line-height: 1.02;
    font-weight: 850;
    letter-spacing: -0.055em;

    color: var(--text-main);
}

.view-hero p {
    position: relative;
    z-index: 1;

    max-width: 34rem;
    margin: 10px 0 0;

    font-size: 0.94rem;
    line-height: 1.55;
    font-weight: 500;

    color: var(--text-muted);
}

/* Header global más limpio: solo marca */
.app-header-main h1 {
    margin: 0;
}

.app-header-main p {
    display: none !important;
}

/* Ajuste de separación después del hero */
.view-hero + .reading-date-header {
    margin-top: 4px;
}

.view-hero + .stats-container,
.view-hero + .calendar-grid,
.view-hero + .bible-view,
.view-hero + .community-container {
    margin-top: 14px;
}

/* Modo oscuro */
body.dark-mode .view-hero {
    border-color: rgba(96, 165, 250, 0.18);

    background:
        radial-gradient(circle at top left, rgba(96, 165, 250, 0.18), transparent 36%),
        linear-gradient(180deg, rgba(15, 23, 42, 0.86), rgba(15, 23, 42, 0.66)),
        var(--surface-color);

    box-shadow:
        0 16px 38px rgba(0, 0, 0, 0.30),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

body.dark-mode .view-hero::after {
    background: rgba(96, 165, 250, 0.12);
}

body.dark-mode .view-hero-kicker {
    background: rgba(96, 165, 250, 0.13);
    color: var(--accent);
}

/* Móvil */
@media (max-width: 480px) {
    .view-hero {
        margin: 4px 0 16px;
        padding: 20px 18px 18px;
        border-radius: 24px;
    }

    .view-hero-kicker {
        font-size: 0.62rem;
        margin-bottom: 9px;
    }

    .view-hero h2 {
        font-size: 1.72rem;
    }

    .view-hero p {
        font-size: 0.88rem;
        line-height: 1.5;
    }
}

/* ========================================
   HERO HOME - MÁS ELEGANTE Y DEVOCIONAL
   ======================================== */

.view-hero {
    padding: 24px 24px 22px;
    border-radius: 28px;

    background:
        radial-gradient(circle at 92% 0%, rgba(49, 130, 206, 0.13), transparent 30%),
        linear-gradient(135deg, rgba(255,255,255,0.96), rgba(248,250,252,0.86)),
        var(--surface-color);

    border: 1px solid rgba(49, 130, 206, 0.14);

    box-shadow:
        0 18px 42px rgba(15, 23, 42, 0.08),
        inset 0 1px 0 rgba(255,255,255,0.85);
}

.view-hero-meta {
    margin-bottom: 8px;

    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;

    color: var(--text-muted);
}

.view-hero-kicker {
    margin-bottom: 10px;
    padding: 5px 11px;

    font-size: 0.66rem;
    font-weight: 800;
    letter-spacing: 0.13em;

    background: rgba(49, 130, 206, 0.09);
    color: var(--accent);
}

.view-hero h2 {
    max-width: 520px;

    font-family: var(--font-reading);
    font-size: clamp(2rem, 6vw, 2.75rem);
    font-weight: 700;
    line-height: 1.08;
    letter-spacing: -0.045em;

    color: var(--primary);
}

.view-hero p {
    max-width: 500px;
    margin-top: 12px;

    font-size: 0.98rem;
    line-height: 1.65;
    font-weight: 500;

    color: var(--text-muted);
}

body.dark-mode .view-hero {
    background:
        radial-gradient(circle at 92% 0%, rgba(96, 165, 250, 0.15), transparent 30%),
        linear-gradient(135deg, rgba(15,23,42,0.95), rgba(15,23,42,0.78)),
        var(--surface-color);

    border-color: rgba(96, 165, 250, 0.16);
}

@media (max-width: 480px) {
    .view-hero {
        padding: 22px 20px 20px;
        border-radius: 26px;
    }

    .view-hero h2 {
        font-size: 2rem;
        line-height: 1.08;
    }

    .view-hero p {
        font-size: 0.92rem;
        line-height: 1.55;
    }
}

/* =========================================================
   BIBLIA - LECTOR MODERNO RV1909
   ========================================================= */

.bible-reader-view {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.bible-reader-topbar {
    position: sticky;
    top: calc(56px + env(safe-area-inset-top));
    z-index: 900;

    display: grid;
    grid-template-columns: 48px 1fr 48px;
    align-items: center;
    gap: 10px;

    margin: -2px -2px 0;
    padding: 10px 8px;

    background: color-mix(in srgb, var(--bg-color) 92%, transparent);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);

    border: 1px solid color-mix(in srgb, var(--border-color) 80%, transparent);
    border-radius: 22px;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
}

.bible-reader-icon-btn {
    width: 46px;
    height: 46px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    border: 1px solid var(--border-color);
    border-radius: 16px;

    background: var(--surface-color);
    color: var(--text-main);

    font-size: 1.1rem;
    font-weight: 800;
    cursor: pointer;

    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
}

.bible-reader-title-btn {
    min-width: 0;
    height: 50px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;

    border: 1px solid color-mix(in srgb, var(--accent) 26%, var(--border-color));
    border-radius: 18px;

    background:
        linear-gradient(180deg, color-mix(in srgb, var(--accent) 11%, var(--surface-color)), var(--surface-color));

    color: var(--text-main);
    cursor: pointer;

    box-shadow:
        0 8px 20px rgba(49, 130, 206, 0.10),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.bible-reader-book {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;

    font-size: 1rem;
    font-weight: 850;
    letter-spacing: -0.02em;
    color: var(--primary);
}

.bible-reader-chapter {
    font-size: 0.74rem;
    font-weight: 750;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.bible-reader-subbar {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 10px;

    padding: 4px 2px 2px;
}

.bible-reader-nav-btn {
    min-height: 40px;
    padding: 8px 12px;

    border: 1px solid var(--border-color);
    border-radius: 999px;

    background: var(--surface-color);
    color: var(--text-main);

    font-size: 0.82rem;
    font-weight: 750;
    cursor: pointer;

    box-shadow: 0 3px 10px rgba(15, 23, 42, 0.05);
}

.bible-reader-nav-btn:disabled {
    opacity: 0.38;
    cursor: not-allowed;
}

.bible-reader-version {
    color: var(--text-muted);
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    white-space: nowrap;
}

.bible-reader-content {
    margin-top: 2px;
}

.bible-reader-content .reading-text {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 22px 18px;

    box-shadow:
        0 14px 34px rgba(15, 23, 42, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.bible-reader-content .verse-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.bible-reader-content .verse-item {
    position: relative;
    margin: 0;
    padding: 2px 0 2px 0;

    font-family: var(--font-reading);
    font-size: var(--reading-size);
    line-height: 1.85;
    text-align: left;
}

.bible-reader-content .verse-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-width: 22px;
    height: 22px;
    margin-right: 8px;
    transform: translateY(-1px);

    border-radius: 999px;

    background: color-mix(in srgb, var(--accent) 12%, transparent);
    color: var(--accent);

    font-family: var(--font-ui);
    font-size: 0.68rem;
    font-weight: 850;
    line-height: 1;
}

.bible-reader-content .verse-text {
    color: var(--text-main);
}

/* Modo oscuro */
body.dark-mode .bible-reader-topbar {
    background: rgba(5, 7, 11, 0.82);
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.32);
}

body.dark-mode .bible-reader-icon-btn,
body.dark-mode .bible-reader-nav-btn {
    background: rgba(15, 17, 21, 0.96);
    border-color: rgba(255, 255, 255, 0.08);
}

body.dark-mode .bible-reader-title-btn {
    background:
        linear-gradient(180deg, rgba(96, 165, 250, 0.16), rgba(15, 17, 21, 0.98));
    border-color: rgba(96, 165, 250, 0.28);
    box-shadow:
        0 10px 24px rgba(0, 0, 0, 0.26),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

body.dark-mode .bible-reader-content .reading-text {
    background: rgba(15, 17, 21, 0.98);
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow:
        0 14px 34px rgba(0, 0, 0, 0.34),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

body.dark-mode .bible-reader-content .verse-number {
    background: rgba(96, 165, 250, 0.14);
    color: #93c5fd;
}

/* Responsive */
@media (max-width: 480px) {
    .bible-reader-topbar {
        grid-template-columns: 44px 1fr 44px;
        gap: 8px;
        padding: 8px 6px;
        border-radius: 20px;
    }

    .bible-reader-icon-btn {
        width: 42px;
        height: 42px;
        border-radius: 15px;
    }

    .bible-reader-title-btn {
        height: 46px;
        border-radius: 16px;
    }

    .bible-reader-book {
        font-size: 0.94rem;
    }

    .bible-reader-chapter {
        font-size: 0.68rem;
    }

    .bible-reader-subbar {
        gap: 6px;
    }

    .bible-reader-nav-btn {
        padding: 8px 9px;
        font-size: 0.76rem;
    }

    .bible-reader-version {
        font-size: 0.62rem;
    }

    .bible-reader-content .reading-text {
        padding: 20px 15px;
        border-radius: 22px;
    }

    .bible-reader-content .verse-item {
        line-height: 1.82;
    }
}

/* =========================================================
   BIBLIA - BIBLIOTECA MODERNA DE LIBROS Y CAPÍTULOS
   ========================================================= */

.bible-library-view {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.bible-library-hero {
    padding: 24px 20px;
    border-radius: 26px;
    border: 1px solid color-mix(in srgb, var(--accent) 18%, var(--border-color));

    background:
        radial-gradient(circle at 92% 12%, color-mix(in srgb, var(--accent) 18%, transparent), transparent 34%),
        linear-gradient(180deg, var(--surface-color), color-mix(in srgb, var(--surface-color) 86%, var(--bg-color)));

    box-shadow:
        0 16px 38px rgba(15, 23, 42, 0.08),
        inset 0 1px 0 rgba(255,255,255,0.5);

    text-align: left;
}

.bible-library-kicker {
    display: inline-flex;
    align-items: center;
    width: fit-content;

    margin-bottom: 10px;
    padding: 6px 11px;

    border-radius: 999px;
    background: color-mix(in srgb, var(--accent) 11%, transparent);
    color: var(--accent);

    font-size: 0.72rem;
    font-weight: 850;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.bible-library-hero h2 {
    margin: 0;
    color: var(--primary);
    font-size: 2.35rem;
    font-weight: 900;
    letter-spacing: -0.06em;
    line-height: 1;
}

.bible-library-hero p {
    max-width: 34rem;
    margin: 10px 0 0;

    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 500;
    line-height: 1.55;
}

.bible-library-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 18px;
}

.bible-library-action-btn {
    min-height: 46px;
    padding: 10px 14px;

    border: 1px solid var(--border-color);
    border-radius: 16px;

    background: var(--surface-color);
    color: var(--text-main);

    font-family: var(--font-ui);
    font-size: 0.9rem;
    font-weight: 800;
    cursor: pointer;

    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.06);
}

.bible-library-action-btn.primary {
    background: var(--accent);
    border-color: var(--accent);
    color: #ffffff;
    box-shadow: 0 10px 22px rgba(49, 130, 206, 0.22);
}

.bible-library-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.bible-library-section-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;

    padding: 0 4px;
}

.bible-library-section-header h3 {
    margin: 0;
    color: var(--primary);
    font-size: 1.05rem;
    font-weight: 850;
    letter-spacing: -0.02em;
}

.bible-library-section-header p {
    margin: 3px 0 0;
    color: var(--text-muted);
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1.35;
}

.bible-library-section-header > span {
    min-width: 34px;
    height: 26px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    border-radius: 999px;
    background: color-mix(in srgb, var(--accent) 10%, transparent);
    color: var(--accent);

    font-size: 0.76rem;
    font-weight: 850;
}

.bible-library-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.bible-library-book {
    min-height: 78px;
    padding: 14px 13px;

    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;

    border: 1px solid var(--border-color);
    border-radius: 18px;

    background: var(--surface-color);
    color: var(--text-main);

    text-align: left;
    font-family: var(--font-ui);
    cursor: pointer;

    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.055);
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.bible-library-book:active {
    transform: scale(0.99);
}

.bible-library-book.is-selected,
.bible-library-book:hover {
    border-color: color-mix(in srgb, var(--accent) 45%, var(--border-color));
    box-shadow: 0 12px 26px rgba(49, 130, 206, 0.13);
}

.bible-library-book-name {
    color: var(--primary);
    font-size: 0.96rem;
    font-weight: 850;
    line-height: 1.18;
    letter-spacing: -0.02em;
}

.bible-library-book-meta {
    color: var(--text-muted);
    font-size: 0.74rem;
    font-weight: 750;
    letter-spacing: 0.02em;
}

.bible-chapter-panel {
    padding: 18px;
    border-radius: 26px;
    border: 1px solid color-mix(in srgb, var(--accent) 22%, var(--border-color));

    background:
        radial-gradient(circle at 95% 0%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 30%),
        var(--surface-color);

    box-shadow: 0 16px 38px rgba(15, 23, 42, 0.08);
}

.bible-chapter-panel-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.bible-chapter-panel-header span {
    display: block;
    margin-bottom: 4px;

    color: var(--text-muted);
    font-size: 0.72rem;
    font-weight: 850;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.bible-chapter-panel-header h3 {
    margin: 0;
    color: var(--primary);
    font-size: 1.65rem;
    font-weight: 900;
    letter-spacing: -0.05em;
    line-height: 1.05;
}

.bible-chapter-panel-close {
    width: 38px;
    height: 38px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    border: 1px solid var(--border-color);
    border-radius: 14px;

    background: var(--surface-color);
    color: var(--text-muted);

    font-size: 1.3rem;
    font-weight: 700;
    cursor: pointer;
}

.bible-chapter-panel-meta {
    margin: 4px 0 14px;
    color: var(--text-muted);
    font-size: 0.88rem;
    font-weight: 650;
}

.bible-chapter-picker {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 9px;
}

.bible-chapter-pill {
    min-height: 48px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    border: 1px solid var(--border-color);
    border-radius: 15px;

    background: color-mix(in srgb, var(--surface-color) 94%, var(--bg-color));
    color: var(--text-main);

    font-family: var(--font-ui);
    font-size: 0.95rem;
    font-weight: 850;
    cursor: pointer;

    box-shadow: 0 5px 14px rgba(15, 23, 42, 0.05);
}

.bible-chapter-pill:hover,
.bible-chapter-pill:active {
    border-color: var(--accent);
    background: var(--accent);
    color: #ffffff;
}

/* Modo oscuro */
body.dark-mode .bible-library-hero,
body.dark-mode .bible-chapter-panel,
body.dark-mode .bible-library-book,
body.dark-mode .bible-library-action-btn,
body.dark-mode .bible-chapter-panel-close,
body.dark-mode .bible-chapter-pill {
    border-color: rgba(255, 255, 255, 0.08);
}

body.dark-mode .bible-library-hero {
    background:
        radial-gradient(circle at 92% 12%, rgba(96, 165, 250, 0.16), transparent 34%),
        linear-gradient(180deg, rgba(15, 17, 21, 0.98), rgba(8, 10, 15, 0.98));
    box-shadow: 0 16px 38px rgba(0, 0, 0, 0.34);
}

body.dark-mode .bible-library-book,
body.dark-mode .bible-library-action-btn,
body.dark-mode .bible-chapter-panel,
body.dark-mode .bible-chapter-panel-close,
body.dark-mode .bible-chapter-pill {
    background: rgba(15, 17, 21, 0.98);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
}

body.dark-mode .bible-library-action-btn.primary,
body.dark-mode .bible-chapter-pill:hover,
body.dark-mode .bible-chapter-pill:active {
    background: var(--accent);
    color: #ffffff;
}

/* Responsive */
@media (max-width: 480px) {
    .bible-library-view {
        gap: 16px;
    }

    .bible-library-hero {
        padding: 22px 18px;
        border-radius: 24px;
    }

    .bible-library-hero h2 {
        font-size: 2.05rem;
    }

    .bible-library-actions {
        grid-template-columns: 1fr;
    }

    .bible-library-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 9px;
    }

    .bible-library-book {
        min-height: 74px;
        padding: 13px 12px;
        border-radius: 17px;
    }

    .bible-library-book-name {
        font-size: 0.9rem;
    }

    .bible-chapter-panel {
        padding: 16px;
        border-radius: 24px;
    }

    .bible-chapter-panel-header h3 {
        font-size: 1.45rem;
    }

    .bible-chapter-picker {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 8px;
    }

    .bible-chapter-pill {
        min-height: 46px;
        border-radius: 14px;
    }
}

/* =========================================================
   BIBLIA - BÚSQUEDA MODERNA
   ========================================================= */

.bible-search-modern {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.bible-search-hero {
    padding: 22px 18px;
    border-radius: 26px;
    border: 1px solid color-mix(in srgb, var(--accent) 18%, var(--border-color));
    background:
        radial-gradient(circle at 92% 12%, color-mix(in srgb, var(--accent) 18%, transparent), transparent 34%),
        linear-gradient(180deg, var(--surface-color), color-mix(in srgb, var(--surface-color) 86%, var(--bg-color)));
    box-shadow: 0 16px 38px rgba(15, 23, 42, 0.08);
}

.bible-search-topline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.bible-search-back {
    min-height: 38px;
    padding: 8px 13px;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    background: var(--surface-color);
    color: var(--accent);
    font-size: 0.84rem;
    font-weight: 850;
    cursor: pointer;
}

.bible-search-topline span {
    padding: 6px 10px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--accent) 11%, transparent);
    color: var(--accent);
    font-size: 0.72rem;
    font-weight: 850;
    letter-spacing: 0.08em;
}

.bible-search-hero h2 {
    margin: 0;
    color: var(--primary);
    font-size: 1.85rem;
    font-weight: 900;
    letter-spacing: -0.055em;
    line-height: 1.05;
}

.bible-search-hero p {
    margin: 8px 0 0;
    color: var(--text-muted);
    font-size: 0.93rem;
    font-weight: 520;
    line-height: 1.55;
}

.bible-search-panel {
    padding: 12px;
    border-radius: 24px;
    border: 1px solid var(--border-color);
    background: var(--surface-color);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
}

.bible-search-modern .bible-search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.bible-search-input-icon {
    position: absolute;
    left: 16px;
    z-index: 2;
    font-size: 0.95rem;
    opacity: 0.7;
    pointer-events: none;
}

.bible-search-modern .bible-search-input {
    width: 100%;
    min-height: 54px;
    padding: 14px 50px 14px 44px;
    border: 1px solid color-mix(in srgb, var(--accent) 20%, var(--border-color));
    border-radius: 18px;
    background: color-mix(in srgb, var(--surface-color) 92%, var(--bg-color));
    color: var(--text-main);
    font-family: var(--font-ui);
    font-size: 1rem;
    font-weight: 650;
    box-shadow: none;
}

.bible-search-modern .bible-search-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 14%, transparent);
}

.bible-search-modern .bible-search-clear {
    position: absolute;
    right: 9px;
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 14px;
    background: color-mix(in srgb, var(--text-muted) 14%, transparent);
    color: var(--text-muted);
    font-size: 1.25rem;
    font-weight: 700;
    cursor: pointer;
}

.bible-search-modern .bible-search-filters {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin: 12px 0 0;
    padding: 5px;
    border: 1px solid var(--border-color);
    border-radius: 18px;
    background: color-mix(in srgb, var(--bg-color) 80%, transparent);
}

.bible-search-modern .bible-filter-btn {
    min-height: 38px;
    padding: 8px 10px;
    border: 0;
    border-radius: 14px;
    background: transparent;
    color: var(--text-muted);
    font-size: 0.82rem;
    font-weight: 850;
    cursor: pointer;
}

.bible-search-modern .bible-filter-btn.active {
    background: var(--accent);
    color: #ffffff;
    box-shadow: 0 8px 18px rgba(49, 130, 206, 0.22);
}

.bible-search-results-shell {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.bible-search-modern .bible-search-stats {
    padding: 0 4px;
    border: 0;
    color: var(--text-muted);
    font-size: 0.84rem;
    font-weight: 800;
}

.bible-search-modern .bible-search-results {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.bible-search-modern .bible-search-result-item {
    width: 100%;
    margin: 0;
    padding: 16px;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    background: var(--surface-color);
    color: var(--text-main);
    text-align: left;
    cursor: pointer;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.055);
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.bible-search-modern .bible-search-result-item:hover {
    transform: none;
    border-color: color-mix(in srgb, var(--accent) 42%, var(--border-color));
    box-shadow: 0 12px 28px rgba(49, 130, 206, 0.12);
}

.bible-search-modern .bible-search-result-reference {
    display: inline-flex;
    width: fit-content;
    margin-bottom: 9px;
    padding: 5px 9px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--accent) 11%, transparent);
    color: var(--accent);
    font-family: var(--font-ui);
    font-size: 0.76rem;
    font-weight: 900;
    letter-spacing: 0.02em;
}

.bible-search-modern .bible-search-result-text {
    display: block;
    color: var(--text-main);
    font-family: var(--font-reading);
    font-size: 0.98rem;
    line-height: 1.72;
}

.bible-search-result-open {
    display: inline-flex;
    margin-top: 12px;
    color: var(--accent);
    font-size: 0.78rem;
    font-weight: 850;
}

.bible-search-modern .search-highlight {
    background: rgba(250, 204, 21, 0.34);
    border-radius: 5px;
    padding: 0 3px;
    font-weight: 800;
}

.bible-search-modern .bible-search-placeholder {
    padding: 34px 20px;
    border: 1px dashed color-mix(in srgb, var(--accent) 28%, var(--border-color));
    border-radius: 24px;
    background: color-mix(in srgb, var(--surface-color) 86%, var(--bg-color));
    text-align: center;
}

.bible-search-modern .bible-search-icon {
    width: 52px;
    height: 52px;
    margin: 0 auto 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 18px;
    background: color-mix(in srgb, var(--accent) 11%, transparent);
    color: var(--accent);
    font-size: 1.7rem;
    opacity: 1;
}

.bible-search-modern .bible-search-placeholder h3 {
    margin: 0 0 7px;
    color: var(--primary);
    font-size: 1.08rem;
    font-weight: 900;
    letter-spacing: -0.02em;
}

.bible-search-modern .bible-search-placeholder p {
    margin: 0 0 18px;
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.55;
}

.bible-search-modern .bible-search-suggestions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 9px;
}

.bible-search-modern .suggestion-tag {
    min-height: 38px;
    padding: 8px 14px;
    border: 1px solid color-mix(in srgb, var(--accent) 22%, var(--border-color));
    border-radius: 999px;
    background: var(--surface-color);
    color: var(--accent);
    font-family: var(--font-ui);
    font-size: 0.84rem;
    font-weight: 850;
    cursor: pointer;
}

.bible-search-modern .suggestion-tag:hover {
    background: var(--accent);
    color: #ffffff;
}

.bible-search-loading {
    padding: 36px 20px;
    border-radius: 24px;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    text-align: center;
    color: var(--text-muted);
    font-weight: 700;
}

/* Paginación en buscador moderno */
.bible-search-modern .bible-pagination {
    margin-top: 14px;
    gap: 8px;
}

.bible-search-modern .bible-page-btn {
    min-width: 40px;
    height: 40px;
    border-radius: 14px;
    font-size: 0.82rem;
    font-weight: 850;
}

/* Modo oscuro */
body.dark-mode .bible-search-hero,
body.dark-mode .bible-search-panel,
body.dark-mode .bible-search-modern .bible-search-result-item,
body.dark-mode .bible-search-loading {
    background: rgba(15, 17, 21, 0.98);
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.32);
}

body.dark-mode .bible-search-hero {
    background:
        radial-gradient(circle at 92% 12%, rgba(96, 165, 250, 0.16), transparent 34%),
        linear-gradient(180deg, rgba(15, 17, 21, 0.98), rgba(8, 10, 15, 0.98));
}

body.dark-mode .bible-search-modern .bible-search-input {
    background: rgba(8, 10, 15, 0.98);
    border-color: rgba(255, 255, 255, 0.08);
}

body.dark-mode .bible-search-modern .bible-search-filters,
body.dark-mode .bible-search-modern .bible-search-placeholder {
    background: rgba(8, 10, 15, 0.82);
    border-color: rgba(255, 255, 255, 0.08);
}

/* Responsive */
@media (max-width: 480px) {
    .bible-search-hero {
        padding: 20px 16px;
        border-radius: 24px;
    }

    .bible-search-hero h2 {
        font-size: 1.6rem;
    }

    .bible-search-panel {
        padding: 10px;
        border-radius: 22px;
    }

    .bible-search-modern .bible-search-input {
        min-height: 52px;
        font-size: 0.96rem;
    }

    .bible-search-modern .bible-filter-btn {
        font-size: 0.78rem;
        padding: 8px 6px;
    }

    .bible-search-modern .bible-search-result-item {
        padding: 15px;
        border-radius: 18px;
    }
}

/* ========================================
   BOTÓN STRONG / ESTUDIO DE VERSÍCULO
   ======================================== */

.verse-study-btn {
    appearance: none;
    -webkit-appearance: none;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    margin-left: 8px;
    padding: 3px 9px;

    border: 1px solid rgba(96, 165, 250, 0.28);
    border-radius: 999px;

    background: rgba(96, 165, 250, 0.10);
    color: #93c5fd;

    font-family: var(--font-ui);
    font-size: 0.68rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0.01em;

    cursor: pointer;
    vertical-align: middle;

    box-shadow: none;
}

.verse-study-btn::before {
    content: "Strong";
}

.verse-study-btn {
    font-size: 0;
}

.verse-study-btn::before {
    font-size: 0.68rem;
}

.verse-study-btn:hover {
    background: rgba(96, 165, 250, 0.16);
    border-color: rgba(96, 165, 250, 0.42);
}

.verse-study-btn:active {
    transform: scale(0.98);
}

body.light-mode .verse-study-btn {
    background: rgba(49, 130, 206, 0.08);
    border-color: rgba(49, 130, 206, 0.22);
    color: var(--accent);
}

body.light-mode .verse-study-btn:hover {
    background: rgba(49, 130, 206, 0.14);
    border-color: rgba(49, 130, 206, 0.36);
}

.verse-study-btn,
.verse-study-btn *,
.no-select {
    -webkit-user-select: none !important;
    user-select: none !important;
    -webkit-touch-callout: none !important;
}

/* ========================================
   STRONG SHEET PANEL - DISEÑO PROFESIONAL
   ======================================== */

.strong-sheet-panel {
    position: fixed;
    inset: 0;
    z-index: 25000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.24s ease;
}

.strong-sheet-panel.visible {
    opacity: 1;
    pointer-events: auto;
}

.strong-sheet-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(3, 10, 24, 0.62);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.strong-sheet-content {
    position: absolute;
    left: 50%;
    bottom: calc(10px + env(safe-area-inset-bottom));
    width: min(92vw, 390px);
    max-height: 54vh;
    overflow-y: auto;

    background:
        linear-gradient(180deg, rgba(23, 42, 68, 0.96), rgba(10, 25, 45, 0.98));
    color: #f8fafc;

    border: 1px solid rgba(147, 197, 253, 0.18);
    border-radius: 24px;
    padding: 12px 14px 14px;

    box-shadow:
        0 24px 70px rgba(0, 0, 0, 0.45),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);

    transform: translate(-50%, 110%);
    transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.strong-sheet-panel.visible .strong-sheet-content {
    transform: translate(-50%, 0);
}

.strong-sheet-handle {
    width: 40px;
    height: 4px;
    border-radius: 999px;
    background: rgba(226, 232, 240, 0.42);
    margin: 0 auto 10px;
}

.strong-sheet-close {
    position: absolute;
    top: 12px;
    right: 12px;

    width: 34px;
    height: 34px;

    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 999px;

    background: rgba(15, 23, 42, 0.58);
    color: rgba(226, 232, 240, 0.9);

    font-size: 1rem;
    font-weight: 800;
    line-height: 1;

    display: flex;
    align-items: center;
    justify-content: center;
}

.strong-sheet-title {
    padding: 4px 42px 12px 4px;
}

.strong-sheet-kicker {
    display: block;
    margin-bottom: 5px;

    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;

    color: #60a5fa;
}

.strong-sheet-title h3 {
    margin: 0;

    font-family: var(--font-reading);
    font-size: 1.75rem;
    line-height: 1.05;
    font-weight: 700;

    color: #f8fafc;
}

.strong-sheet-title p {
    display: inline-flex;
    align-items: center;

    margin: 7px 0 0;
    padding: 4px 10px;

    border-radius: 999px;
    background: rgba(96, 165, 250, 0.14);

    font-size: 0.86rem;
    font-weight: 800;

    color: #60a5fa;
}

.strong-sheet-card {
    border: 1px solid rgba(147, 197, 253, 0.14);
    background: rgba(2, 13, 30, 0.36);
    border-radius: 18px;
    padding: 4px 12px;
    margin-bottom: 12px;
}

.strong-sheet-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    align-items: center;

    padding: 10px 0;

    border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

.strong-sheet-row span,
.strong-sheet-definition span {
    font-size: 0.7rem;
    font-weight: 800;
    color: rgba(203, 213, 225, 0.72);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.strong-sheet-row strong {
    max-width: 190px;

    text-align: right;
    font-size: 0.98rem;
    font-weight: 800;

    color: #f8fafc;
}

#strongSheetOriginal {
    font-size: 1.45rem;
    font-weight: 800;
    direction: rtl;
    line-height: 1.1;
}

#strongSheetTransliteration {
    font-size: 0.98rem;
}

.strong-sheet-definition {
    padding: 10px 0 12px;
}

.strong-sheet-definition p {
    margin: 7px 0 0;

    font-size: 0.94rem;
    line-height: 1.45;

    color: rgba(248, 250, 252, 0.92);
}

.strong-sheet-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.strong-sheet-btn {
    min-height: 46px;

    border: 1px solid rgba(147, 197, 253, 0.25);
    border-radius: 15px;

    background: rgba(2, 13, 30, 0.42);
    color: #f8fafc;

    font-size: 0.94rem;
    font-weight: 800;
}

.strong-sheet-btn.primary {
    background: linear-gradient(180deg, #60a5fa, #3b82f6);
    color: #ffffff;
    border-color: rgba(96, 165, 250, 0.75);
}

.strong-sheet-btn:active,
.strong-sheet-close:active {
    transform: scale(0.97);
}

.selection-actions-row-pro {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.action-btn-image {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(214, 181, 109, 0.38);
    background:
        linear-gradient(135deg, rgba(214, 181, 109, 0.18), rgba(255, 255, 255, 0.06));
    color: var(--text-primary, #f8f3ea);
    font-weight: 700;
}

.action-btn-image::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        120deg,
        transparent 0%,
        rgba(255, 255, 255, 0.22) 45%,
        transparent 70%
    );
    transform: translateX(-120%);
    transition: transform 0.55s ease;
}

.action-btn-image:hover::before,
.action-btn-image:active::before {
    transform: translateX(120%);
}

@media (max-width: 420px) {
    .selection-actions-row-pro {
        grid-template-columns: repeat(2, 1fr);
    }
}

.verse-image-open {
    overflow: hidden;
}

.verse-image-panel {
    position: fixed;
    inset: 0;
    z-index: 9998;
    display: none;
}

.verse-image-panel.visible {
    display: block;
}

.verse-image-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(5, 8, 15, 0.72);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.verse-image-sheet {
    position: absolute;
    left: 50%;
    bottom: 0;
    width: min(100%, 520px);
    max-height: 94vh;
    transform: translateX(-50%);
    overflow-y: auto;
    padding: 12px 18px calc(18px + env(safe-area-inset-bottom));
    border-radius: 30px 30px 0 0;
    background:
        radial-gradient(circle at top left, rgba(214, 181, 109, 0.16), transparent 34%),
        linear-gradient(180deg, rgba(20, 24, 34, 0.98), rgba(10, 13, 20, 0.98));
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 -24px 80px rgba(0, 0, 0, 0.42);
}

.verse-image-close {
    position: absolute;
    top: 16px;
    right: 18px;
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.09);
    color: rgba(255, 255, 255, 0.86);
    font-size: 17px;
    font-weight: 700;
}

.verse-image-header {
    padding: 26px 46px 14px 4px;
}

.verse-image-kicker {
    display: block;
    margin-bottom: 8px;
    color: #d6b56d;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.16em;
}

.verse-image-header h3 {
    margin: 0;
    color: #fff8ec;
    font-size: 23px;
    line-height: 1.15;
}

.verse-image-header p {
    margin: 8px 0 0;
    color: rgba(255, 255, 255, 0.66);
    font-size: 14px;
    line-height: 1.45;
}

.verse-image-preview-wrap {
    width: min(78vw, 270px);
    margin: 8px auto 20px;
    padding: 10px;
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.075);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow:
        0 22px 60px rgba(0, 0, 0, 0.34),
        inset 0 1px 0 rgba(255, 255, 255, 0.10);
}

#verseImagePreview {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 22px;
    background: #111827;
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.32);
}

.verse-image-controls {
    margin-top: 6px;
}

.verse-image-control-label {
    margin-bottom: 10px;
    color: rgba(255, 255, 255, 0.62);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.verse-template-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.verse-template-btn {
    min-height: 46px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.07);
    color: rgba(255, 255, 255, 0.78);
    font-size: 14px;
    font-weight: 750;
}

.verse-template-btn.is-active {
    color: #fff8ec;
    border-color: rgba(214, 181, 109, 0.58);
    background:
        linear-gradient(135deg, rgba(214, 181, 109, 0.26), rgba(255, 255, 255, 0.08));
    box-shadow: 0 10px 28px rgba(214, 181, 109, 0.14);
}

.verse-image-actions {
    display: grid;
    grid-template-columns: 1fr 1fr 1.15fr;
    gap: 10px;
    margin-top: 18px;
}

.verse-image-secondary,
.verse-image-primary {
    min-height: 48px;
    border: 0;
    border-radius: 16px;
    font-size: 14px;
    font-weight: 800;
}

.verse-image-secondary {
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.76);
}

.verse-image-primary {
    background: rgba(255, 255, 255, 0.14);
    color: #fff8ec;
}

.verse-image-primary.strong {
    background: linear-gradient(135deg, #d6b56d, #f3dca2);
    color: #21170d;
    box-shadow: 0 14px 36px rgba(214, 181, 109, 0.26);
}

@media (max-width: 420px) {
    .verse-image-sheet {
        padding-left: 14px;
        padding-right: 14px;
    }

    .verse-image-actions {
        grid-template-columns: 1fr 1fr 1fr;
    }

    .verse-image-preview-wrap {
        width: min(62vw, 210px);
    }
}

@media (max-width: 520px) {
    .verse-image-sheet {
        max-height: 82vh;
        padding: 10px 14px calc(14px + env(safe-area-inset-bottom));
        border-radius: 24px 24px 0 0;
    }

    .verse-image-header {
        padding: 14px 42px 8px 42px;
        text-align: center;
    }

    .verse-image-kicker {
        margin-bottom: 6px;
        font-size: 10px;
        letter-spacing: 0.13em;
    }

    .verse-image-header h3 {
        font-size: 19px;
        line-height: 1.15;
    }

    .verse-image-header p {
        margin-top: 5px;
        font-size: 12.5px;
        line-height: 1.35;
    }

    .verse-image-close {
        top: 12px;
        right: 14px;
        width: 34px;
        height: 34px;
        font-size: 15px;
    }

    .verse-image-preview-wrap {
        width: min(64vw, 220px);
        margin: 6px auto 12px;
        padding: 8px;
        border-radius: 22px;
    }

    #verseImagePreview {
        border-radius: 17px;
    }

    .verse-image-control-label {
        margin-bottom: 7px;
        font-size: 10px;
        text-align: center;
    }

    .verse-template-grid {
        gap: 7px;
    }

    .verse-template-btn {
        min-height: 36px;
        border-radius: 12px;
        font-size: 12.5px;
    }

    .verse-image-actions {
        gap: 7px;
        margin-top: 12px;
        grid-template-columns: 1fr 1fr 1fr;
    }

    .verse-image-secondary,
    .verse-image-primary {
        min-height: 39px;
        border-radius: 12px;
        font-size: 12.5px;
    }
}

/* ========================================
   PANEL GUÍA - PROFUNDIZA EN SU VOZ
   ======================================== */

.note-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.note-title-row .note-title {
    margin-bottom: 0;
}

.note-guide-btn {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.72);
    color: var(--text-secondary, #64748b);
    font-size: 16px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
    transition:
        transform 0.18s ease,
        background 0.18s ease,
        color 0.18s ease,
        border-color 0.18s ease,
        box-shadow 0.18s ease;
}

.note-guide-btn:hover,
.note-guide-btn:focus-visible {
    background: rgba(255, 255, 255, 0.95);
    color: var(--primary-color, #8b5a2b);
    border-color: rgba(139, 90, 43, 0.28);
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.12);
    transform: translateY(-1px);
    outline: none;
}

.note-guide-btn[aria-expanded="true"] {
    background: linear-gradient(135deg, rgba(139, 90, 43, 0.14), rgba(218, 165, 32, 0.18));
    color: var(--primary-color, #8b5a2b);
    border-color: rgba(139, 90, 43, 0.32);
}

.note-guide-panel {
    position: relative;
    margin: 2px 0 12px;
    padding: 14px 15px 14px 16px;
    border: 1px solid rgba(139, 90, 43, 0.14);
    border-radius: 18px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(250, 247, 240, 0.92));
    color: var(--text-primary, #1f2937);
    box-shadow:
        0 18px 40px rgba(15, 23, 42, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.75);
    animation: noteGuideIn 0.22s ease both;
}

.note-guide-panel::before {
    content: "";
    position: absolute;
    top: -7px;
    right: 18px;
    width: 14px;
    height: 14px;
    background: rgba(255, 255, 255, 0.96);
    border-left: 1px solid rgba(139, 90, 43, 0.14);
    border-top: 1px solid rgba(139, 90, 43, 0.14);
    transform: rotate(45deg);
}

.note-guide-panel p {
    margin: 0 0 8px;
    font-size: 0.88rem;
    font-weight: 650;
    letter-spacing: -0.01em;
    color: var(--text-primary, #1f2937);
}

.note-guide-panel ul {
    margin: 0;
    padding-left: 18px;
}

.note-guide-panel li {
    margin: 6px 0;
    font-size: 0.86rem;
    line-height: 1.42;
    color: var(--text-secondary, #64748b);
}

.note-guide-panel[hidden] {
    display: none;
}

@keyframes noteGuideIn {
    from {
        opacity: 0;
        transform: translateY(-6px) scale(0.985);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Modo oscuro */
body.dark-mode .note-guide-btn {
    background: rgba(30, 41, 59, 0.72);
    color: rgba(226, 232, 240, 0.78);
    border-color: rgba(148, 163, 184, 0.18);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.24);
}

body.dark-mode .note-guide-btn:hover,
body.dark-mode .note-guide-btn:focus-visible,
body.dark-mode .note-guide-btn[aria-expanded="true"] {
    background: rgba(51, 65, 85, 0.92);
    color: #f8d98c;
    border-color: rgba(248, 217, 140, 0.28);
}

body.dark-mode .note-guide-panel {
    background:
        linear-gradient(135deg, rgba(30, 41, 59, 0.97), rgba(15, 23, 42, 0.94));
    color: rgba(248, 250, 252, 0.94);
    border-color: rgba(248, 217, 140, 0.15);
    box-shadow:
        0 18px 42px rgba(0, 0, 0, 0.32),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

body.dark-mode .note-guide-panel::before {
    background: rgba(30, 41, 59, 0.97);
    border-color: rgba(248, 217, 140, 0.15);
}

body.dark-mode .note-guide-panel p {
    color: rgba(248, 250, 252, 0.94);
}

body.dark-mode .note-guide-panel li {
    color: rgba(203, 213, 225, 0.86);
}

/* Ajuste móvil */
@media (max-width: 480px) {
    .note-guide-btn {
        width: 32px;
        height: 32px;
        flex-basis: 32px;
        font-size: 15px;
    }

    .note-guide-panel {
        padding: 13px 14px;
        border-radius: 16px;
    }

    .note-guide-panel p {
        font-size: 0.86rem;
    }

    .note-guide-panel li {
        font-size: 0.84rem;
    }
}

.verse-image-control-group {
    margin-bottom: 14px;
}

.verse-format-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    padding: 4px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.055);
    border: 1px solid rgba(255, 255, 255, 0.09);
}

.verse-format-btn {
    min-height: 42px;
    border: 0;
    border-radius: 14px;
    background: transparent;
    color: rgba(255, 255, 255, 0.68);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: -0.01em;
}

.verse-format-btn.is-active {
    color: #21170d;
    background: linear-gradient(135deg, #d6b56d, #f3dca2);
    box-shadow:
        0 10px 26px rgba(214, 181, 109, 0.22),
        inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

@media (max-width: 520px) {
    .verse-image-control-group {
        margin-bottom: 10px;
    }

    .verse-format-grid {
        gap: 6px;
        border-radius: 15px;
    }

    .verse-format-btn {
        min-height: 34px;
        border-radius: 11px;
        font-size: 12px;
    }
}

.verse-image-preview-wrap.format-post {
    width: min(66vw, 250px);
    aspect-ratio: 4 / 5;
}

.verse-image-preview-wrap.format-story {
    width: min(50vw, 210px);
    aspect-ratio: 9 / 16;
}

.verse-image-preview-wrap.format-square {
    width: min(68vw, 250px);
    aspect-ratio: 1 / 1;
}

.verse-image-preview-wrap.format-square #verseImagePreview {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.verse-image-preview-wrap.format-post #verseImagePreview,
.verse-image-preview-wrap.format-story #verseImagePreview {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

@media (max-width: 520px) {
    .verse-image-preview-wrap.format-post {
        width: min(62vw, 225px);
    }

    .verse-image-preview-wrap.format-story {
        width: min(44vw, 185px);
    }

    .verse-image-preview-wrap.format-square {
        width: min(64vw, 230px);
    }
}

.verse-text-size-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    padding: 4px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.055);
    border: 1px solid rgba(255, 255, 255, 0.09);
}

.verse-text-size-btn {
    min-height: 42px;
    border: 0;
    border-radius: 14px;
    background: transparent;
    color: rgba(255, 255, 255, 0.68);
    font-size: 13px;
    font-weight: 800;
}

.verse-text-size-btn.is-active {
    color: #21170d;
    background: linear-gradient(135deg, #d6b56d, #f3dca2);
    box-shadow:
        0 10px 26px rgba(214, 181, 109, 0.22),
        inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

@media (max-width: 520px) {
    .verse-text-size-grid {
        gap: 6px;
        border-radius: 15px;
    }

    .verse-text-size-btn {
        min-height: 34px;
        border-radius: 11px;
        font-size: 12px;
    }
}

.verse-link-toggle-wrap {
    display: flex;
    justify-content: center;
}

.verse-link-toggle-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-height: 44px;
    padding: 4px 14px 4px 5px;
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.055);
    color: rgba(255, 255, 255, 0.68);
    font-size: 13px;
    font-weight: 800;
}

.verse-link-toggle-indicator {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
    transition: transform 0.22s ease, background 0.22s ease;
}

.verse-link-toggle-btn.is-active {
    color: #21170d;
    background: linear-gradient(135deg, #d6b56d, #f3dca2);
    box-shadow:
        0 12px 30px rgba(214, 181, 109, 0.22),
        inset 0 1px 0 rgba(255, 255, 255, 0.42);
}

.verse-link-toggle-btn.is-active .verse-link-toggle-indicator {
    background: rgba(33, 23, 13, 0.86);
    transform: translateX(4px);
}

.verse-link-toggle-text {
    flex: 1;
    text-align: center;
}

@media (max-width: 520px) {
    .verse-link-toggle-btn {
        min-height: 36px;
        font-size: 12px;
    }

    .verse-link-toggle-indicator {
        width: 28px;
        height: 28px;
    }
}

/* ========================================
   MINI ACTIONS (LEÍDO + COMPARTIR)
   ======================================== */

.action-group .reading-action-card {
    min-height: 76px;
    padding: 14px 14px;
    border-radius: 22px;

    grid-template-columns: 52px 1fr;
    gap: 12px;

    align-items: center;
}

.action-group .reading-action-chevron {
    display: none;
}

.action-group .reading-action-icon {
    width: 48px;
    height: 48px;
    font-size: 1.15rem;
}

.action-group .reading-action-content {
    gap: 2px;
}

.action-group .reading-action-title {
    font-size: 0.95rem;
    line-height: 1.05;
    font-weight: 800;
}

.action-group .reading-action-subtitle {
    font-size: 0.74rem;
    line-height: 1.2;
    opacity: 0.72;
}

.action-group .reading-action-read .reading-action-icon {
    font-size: 1.7rem;
}

.action-group .reading-action-subtitle {
    display: none;
}
