:root {
    --primary: #54a0ff;
    --primary-dark: #2e86de;
    --primary-light: #0094ff21;
    --accent: #54a0ff;
    --accent-light: #eaf4ff;
    --bg: #ffffff;
    --bg-card: #ffffff;
    --text: #222;
    --text-light: #777;
    --text-muted: #999;
    --border: #eee;
    --shadow: 0 1px 6px rgba(0,0,0,0.06);
    --shadow-lg: 0 4px 20px rgba(0,0,0,0.1);
    --radius: 8px;
    --radius-sm: 6px;
    --player-height: 72px;
    --arabic-font: 'Amiri', 'Traditional Arabic', 'Scheherazade', serif;
    --translation-font: -apple-system, system-ui, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --mushaf-font: 'Amiri', 'Traditional Arabic', 'Scheherazade New', serif;
    --mushaf-arabic-size: 28px;
    --ui-font: -apple-system, system-ui, BlinkMacSystemFont, Helvetica, Roboto, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    --transition: 0.3s ease;
}

[data-theme="dark"] {
    --primary: #5eadff;
    --primary-dark: #3d96f0;
    --primary-light: #1a2c42;
    --accent: #5eadff;
    --accent-light: #1a2c42;
    --bg: #111827;
    --bg-card: #1f2937;
    --text: #e5e7eb;
    --text-light: #9ca3af;
    --text-muted: #6b7280;
    --border: #2d3748;
    --shadow: 0 1px 6px rgba(0,0,0,0.2);
    --shadow-lg: 0 4px 20px rgba(0,0,0,0.3);
}

[data-theme="dark"] .list-top-bar,
[data-theme="dark"] .list-hero {
    background: var(--bg);
}

[data-theme="dark"] .list-top-bar::before,
[data-theme="dark"] .list-hero::before {
    display: none;
}

/* Анимация движения звёзд (медленный дрейф) */
@keyframes stars-drift {
    0%, 100% { background-position: 0 0, 50px 35px, 80px 20px; }
    33% { background-position: 80px 40px, 0 70px, 0 0; }
    66% { background-position: 160px 120px, 100px 0, 120px 60px; }
}

::-webkit-scrollbar { width: 2px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--primary); }

* { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 16px; scroll-behavior: smooth; }

html, body, * {
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
}
* {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}
*::selection,
*::-moz-selection {
    background: transparent;
    color: inherit;
}
*:focus {
    outline: none;
}
img, svg, video, canvas {
    -webkit-user-drag: none;
    user-drag: none;
    -webkit-user-select: none;
    user-select: none;
}

body {
    font-family: var(--ui-font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
}
input, textarea, [contenteditable="true"] {
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
    -webkit-touch-callout: default;
}

/* ============ LIST VIEW (Main screen) ============ */

.list-view {
    min-height: 100vh;
}

.pull-refresh {
    height: 0;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: height 0.2s ease;
    background: var(--bg);
}
.pull-refresh-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 0;
    color: var(--text-light);
    font-size: 0.85rem;
}
.pull-refresh-icon {
    font-size: 1.2rem;
    color: var(--primary);
    transition: transform 0.2s;
}
.pull-refresh.refreshing .pull-refresh-icon {
    animation: pull-refresh-spin 0.8s linear infinite;
}
@keyframes pull-refresh-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.list-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 14px 4px;
    min-height: 44px;
    background: #fff;
    position: relative;
    overflow: visible;
}

.list-top-bar::before {
    content: '';
    position: absolute;
    inset: 0;
    background-color: var(--primary);
    -webkit-mask-image:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160' viewBox='0 0 160 160'%3E%3Cg fill='%23fff' fill-opacity='0.4'%3E%3Ccircle cx='12' cy='8' r='1'/%3E%3Ccircle cx='45' cy='23' r='0.6'/%3E%3Ccircle cx='78' cy='5' r='1.2'/%3E%3Ccircle cx='95' cy='40' r='0.7'/%3E%3Ccircle cx='5' cy='55' r='0.6'/%3E%3Ccircle cx='33' cy='72' r='1'/%3E%3Ccircle cx='62' cy='88' r='0.6'/%3E%3Ccircle cx='88' cy='65' r='0.7'/%3E%3Ccircle cx='18' cy='95' r='0.6'/%3E%3Ccircle cx='125' cy='18' r='0.6'/%3E%3Ccircle cx='52' cy='42' r='0.5'/%3E%3Ccircle cx='72' cy='58' r='0.8'/%3E%3Ccircle cx='112' cy='82' r='0.6'/%3E%3Ccircle cx='138' cy='45' r='0.5'/%3E%3Ccircle cx='28' cy='128' r='0.7'/%3E%3Ccircle cx='145' cy='115' r='0.5'/%3E%3Ccircle cx='25' cy='15' r='0.6'/%3E%3Ccircle cx='100' cy='30' r='0.5'/%3E%3Ccircle cx='15' cy='80' r='0.7'/%3E%3Ccircle cx='90' cy='90' r='0.5'/%3E%3Ccircle cx='120' cy='55' r='0.6'/%3E%3Ccircle cx='35' cy='42' r='0.5'/%3E%3Ccircle cx='75' cy='75' r='0.7'/%3E%3Ccircle cx='110' cy='12' r='0.5'/%3E%3Ccircle cx='8' cy='120' r='0.6'/%3E%3Ccircle cx='55' cy='130' r='0.5'/%3E%3Ccircle cx='115' cy='38' r='0.6'/%3E%3Ccircle cx='48' cy='8' r='0.5'/%3E%3Ccircle cx='155' cy='60' r='0.6'/%3E%3Ccircle cx='68' cy='42' r='0.5'/%3E%3C/g%3E%3C/svg%3E"),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100' viewBox='0 0 100 100'%3E%3Cg fill='%23fff' fill-opacity='0.25'%3E%3Ccircle cx='20' cy='10' r='0.5'/%3E%3Ccircle cx='55' cy='25' r='0.4'/%3E%3Ccircle cx='8' cy='48' r='0.55'/%3E%3Ccircle cx='42' cy='62' r='0.5'/%3E%3Ccircle cx='68' cy='8' r='0.4'/%3E%3Ccircle cx='15' cy='70' r='0.5'/%3E%3Ccircle cx='72' cy='55' r='0.4'/%3E%3Ccircle cx='85' cy='78' r='0.45'/%3E%3Ccircle cx='32' cy='92' r='0.4'/%3E%3Ccircle cx='5' cy='30' r='0.5'/%3E%3Ccircle cx='40' cy='5' r='0.4'/%3E%3Ccircle cx='90' cy='45' r='0.5'/%3E%3Ccircle cx='25' cy='75' r='0.4'/%3E%3Ccircle cx='60' cy='90' r='0.5'/%3E%3Ccircle cx='78' cy='25' r='0.4'/%3E%3Ccircle cx='50' cy='50' r='0.5'/%3E%3Ccircle cx='95' cy='65' r='0.4'/%3E%3Ccircle cx='18' cy='85' r='0.5'/%3E%3C/g%3E%3C/svg%3E"),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Cg fill='%23fff' fill-opacity='0.2'%3E%3Ccircle cx='10' cy='5' r='0.5'/%3E%3Ccircle cx='35' cy='20' r='0.4'/%3E%3Ccircle cx='60' cy='8' r='0.6'/%3E%3Ccircle cx='85' cy='35' r='0.4'/%3E%3Ccircle cx='5' cy='45' r='0.5'/%3E%3Ccircle cx='28' cy='60' r='0.4'/%3E%3Ccircle cx='55' cy='75' r='0.5'/%3E%3Ccircle cx='75' cy='50' r='0.4'/%3E%3Ccircle cx='15' cy='85' r='0.5'/%3E%3Ccircle cx='95' cy='15' r='0.4'/%3E%3Ccircle cx='42' cy='32' r='0.3'/%3E%3Ccircle cx='68' cy='55' r='0.5'/%3E%3Ccircle cx='92' cy='72' r='0.4'/%3E%3Ccircle cx='18' cy='95' r='0.4'/%3E%3Ccircle cx='50' cy='5' r='0.3'/%3E%3Ccircle cx='105' cy='45' r='0.5'/%3E%3Ccircle cx='8' cy='68' r='0.4'/%3E%3Ccircle cx='115' cy='90' r='0.3'/%3E%3C/g%3E%3C/svg%3E");
    mask-image:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160' viewBox='0 0 160 160'%3E%3Cg fill='%23fff' fill-opacity='0.4'%3E%3Ccircle cx='12' cy='8' r='1'/%3E%3Ccircle cx='45' cy='23' r='0.6'/%3E%3Ccircle cx='78' cy='5' r='1.2'/%3E%3Ccircle cx='95' cy='40' r='0.7'/%3E%3Ccircle cx='5' cy='55' r='0.6'/%3E%3Ccircle cx='33' cy='72' r='1'/%3E%3Ccircle cx='62' cy='88' r='0.6'/%3E%3Ccircle cx='88' cy='65' r='0.7'/%3E%3Ccircle cx='18' cy='95' r='0.6'/%3E%3Ccircle cx='125' cy='18' r='0.6'/%3E%3Ccircle cx='52' cy='42' r='0.5'/%3E%3Ccircle cx='72' cy='58' r='0.8'/%3E%3Ccircle cx='112' cy='82' r='0.6'/%3E%3Ccircle cx='138' cy='45' r='0.5'/%3E%3Ccircle cx='28' cy='128' r='0.7'/%3E%3Ccircle cx='145' cy='115' r='0.5'/%3E%3Ccircle cx='25' cy='15' r='0.6'/%3E%3Ccircle cx='100' cy='30' r='0.5'/%3E%3Ccircle cx='15' cy='80' r='0.7'/%3E%3Ccircle cx='90' cy='90' r='0.5'/%3E%3Ccircle cx='120' cy='55' r='0.6'/%3E%3Ccircle cx='35' cy='42' r='0.5'/%3E%3Ccircle cx='75' cy='75' r='0.7'/%3E%3Ccircle cx='110' cy='12' r='0.5'/%3E%3Ccircle cx='8' cy='120' r='0.6'/%3E%3Ccircle cx='55' cy='130' r='0.5'/%3E%3Ccircle cx='115' cy='38' r='0.6'/%3E%3Ccircle cx='48' cy='8' r='0.5'/%3E%3Ccircle cx='155' cy='60' r='0.6'/%3E%3Ccircle cx='68' cy='42' r='0.5'/%3E%3C/g%3E%3C/svg%3E"),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100' viewBox='0 0 100 100'%3E%3Cg fill='%23fff' fill-opacity='0.25'%3E%3Ccircle cx='20' cy='10' r='0.5'/%3E%3Ccircle cx='55' cy='25' r='0.4'/%3E%3Ccircle cx='8' cy='48' r='0.55'/%3E%3Ccircle cx='42' cy='62' r='0.5'/%3E%3Ccircle cx='68' cy='8' r='0.4'/%3E%3Ccircle cx='15' cy='70' r='0.5'/%3E%3Ccircle cx='72' cy='55' r='0.4'/%3E%3Ccircle cx='85' cy='78' r='0.45'/%3E%3Ccircle cx='32' cy='92' r='0.4'/%3E%3Ccircle cx='5' cy='30' r='0.5'/%3E%3Ccircle cx='40' cy='5' r='0.4'/%3E%3Ccircle cx='90' cy='45' r='0.5'/%3E%3Ccircle cx='25' cy='75' r='0.4'/%3E%3Ccircle cx='60' cy='90' r='0.5'/%3E%3Ccircle cx='78' cy='25' r='0.4'/%3E%3Ccircle cx='50' cy='50' r='0.5'/%3E%3Ccircle cx='95' cy='65' r='0.4'/%3E%3Ccircle cx='18' cy='85' r='0.5'/%3E%3C/g%3E%3C/svg%3E"),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Cg fill='%23fff' fill-opacity='0.2'%3E%3Ccircle cx='10' cy='5' r='0.5'/%3E%3Ccircle cx='35' cy='20' r='0.4'/%3E%3Ccircle cx='60' cy='8' r='0.6'/%3E%3Ccircle cx='85' cy='35' r='0.4'/%3E%3Ccircle cx='5' cy='45' r='0.5'/%3E%3Ccircle cx='28' cy='60' r='0.4'/%3E%3Ccircle cx='55' cy='75' r='0.5'/%3E%3Ccircle cx='75' cy='50' r='0.4'/%3E%3Ccircle cx='15' cy='85' r='0.5'/%3E%3Ccircle cx='95' cy='15' r='0.4'/%3E%3Ccircle cx='42' cy='32' r='0.3'/%3E%3Ccircle cx='68' cy='55' r='0.5'/%3E%3Ccircle cx='92' cy='72' r='0.4'/%3E%3Ccircle cx='18' cy='95' r='0.4'/%3E%3Ccircle cx='50' cy='5' r='0.3'/%3E%3Ccircle cx='105' cy='45' r='0.5'/%3E%3Ccircle cx='8' cy='68' r='0.4'/%3E%3Ccircle cx='115' cy='90' r='0.3'/%3E%3C/g%3E%3C/svg%3E");
    -webkit-mask-size: 160px 160px, 100px 100px, 120px 120px;
    mask-size: 160px 160px, 100px 100px, 120px 120px;
    -webkit-mask-position: 0 0, 50px 35px, 80px 20px;
    mask-position: 0 0, 50px 35px, 80px 20px;
    animation: stars-drift 100s ease-in-out infinite;
    pointer-events: none;
}

.list-top-bar .header-btn,
.list-top-bar .settings-dropdown,
.list-top-bar .list-top-bar-tools,
.list-top-bar .list-top-bar-left,
.list-top-bar .list-top-bar-row,
.list-top-bar .list-top-bar-links-row { position: relative; z-index: 1; }

.list-top-bar-left {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    min-width: 0;
    flex: 1;
}

.list-top-bar-row {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 5px;
    width: 100%;
    min-width: 0;
    min-height: 0;
}

.list-top-bar-row .list-menu-toggle {
    grid-column: 1;
    flex-shrink: 0;
}

.list-top-bar-row .list-top-bar-links-row {
    grid-column: 2;
    flex: none;
    min-width: 0;
    justify-content: center;
}

.list-top-bar-row .settings-dropdown,
.list-top-bar-row .list-top-bar-tools {
    grid-column: 3;
    flex-shrink: 0;
    margin-left: 0;
    display: flex;
    align-items: center;
    align-self: center;
}

.list-top-bar-links-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 4px 8px;
    min-width: 0;
}

.list-top-bar-links-row .list-top-bar-howto {
    flex: 0 1 auto;
    min-width: 0;
    text-align: center;
    justify-content: center;
    align-items: center;
    height: 36px;
}

.list-top-bar .list-top-bar-howto {
    margin-top: 0;
    padding-left: 0;
    line-height: 1.15;
}

.list-top-bar-links-row .header-btn-info.text-btn {
    font-size: 0.76rem;
    padding: 0 10px;
    letter-spacing: 0;
    border-radius: 10px;
    transition: background var(--transition), color var(--transition);
}
.list-top-bar-links-row .header-btn-info.text-btn:hover {
    background: var(--primary-light);
}

.list-top-bar-links-row .list-top-bar-howto-label {
    display: inline-block;
    position: relative;
    border-bottom: 2.6px solid var(--primary);
    padding-bottom: 1px;
    line-height: 1;
}

.list-top-bar-links-row .list-top-bar-howto[data-ajax-page="news"] {
    position: relative;
    overflow: visible;
}
.news-unread-badge {
    position: absolute;
    top: -8px;
    right: -10px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 999px;
    background: #ef4444;
    color: #fff !important;
    font-size: 10px;
    font-weight: 700;
    line-height: 16px;
    text-align: center;
    box-shadow: 0 0 0 2px var(--bg, #fff);
    pointer-events: none;
    box-sizing: border-box;
}
.news-unread-badge[hidden] { display: none !important; }
.list-side-menu-link[data-ajax-page="news"] {
    position: relative;
}
.list-side-menu-link[data-ajax-page="news"] .news-unread-badge {
    position: static;
    flex-shrink: 0;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    line-height: 20px;
    font-size: 12px;
    font-weight: 600;
    box-shadow: none;
}

.list-top-bar .header-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.list-top-bar #settings-toggle {
    width: 38px;
    height: 38px;
    font-size: 1.3rem;
    border: none;
    background: var(--bg-card);
    color: #000;
    transition: background var(--transition), color var(--transition);
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.list-top-bar #settings-toggle i {
    color: #000;
}
.list-top-bar #settings-toggle:hover {
    background: var(--primary-light);
    color: #000;
}
.list-top-bar #settings-toggle:hover i {
    color: #000;
}

[data-theme="dark"] .list-top-bar #settings-toggle,
[data-theme="dark"] .list-top-bar #settings-toggle i {
    color: #fff;
}
[data-theme="dark"] .list-top-bar #settings-toggle:hover,
[data-theme="dark"] .list-top-bar #settings-toggle:hover i {
    color: #fff;
}

.list-top-bar .list-top-bar-tools {
    display: inline-flex;
    align-items: center;
    gap: 2px;
}

.list-top-bar .list-hero-video-btn,
.list-top-bar #list-video-btn {
    position: relative;
    top: 0;
    right: auto;
    z-index: 1;
    width: 38px;
    height: 38px;
    font-size: 1.3rem;
    border: none;
    background: var(--bg-card);
    color: #000;
    box-shadow: none;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border-radius: 50%;
    pointer-events: auto;
    transition: background var(--transition), color var(--transition);
}
.list-top-bar .list-hero-video-btn i,
.list-top-bar #list-video-btn i {
    color: #000;
}
.list-top-bar .list-hero-video-btn:hover,
.list-top-bar #list-video-btn:hover {
    background: var(--primary-light);
    color: #000;
}
.list-top-bar .list-hero-video-btn:hover i,
.list-top-bar #list-video-btn:hover i {
    color: #000;
}

[data-theme="dark"] .list-top-bar .list-hero-video-btn,
[data-theme="dark"] .list-top-bar #list-video-btn,
[data-theme="dark"] .list-top-bar .list-hero-video-btn i,
[data-theme="dark"] .list-top-bar #list-video-btn i {
    color: #fff;
}
[data-theme="dark"] .list-top-bar .list-hero-video-btn:hover,
[data-theme="dark"] .list-top-bar #list-video-btn:hover {
    background: var(--primary-light);
    color: #fff;
}
[data-theme="dark"] .list-top-bar .list-hero-video-btn:hover i,
[data-theme="dark"] .list-top-bar #list-video-btn:hover i {
    color: #fff;
}

.list-top-bar .header-btn-info.text-btn {
    width: auto;
    min-width: 0;
    padding: 0 12px;
    border: none;
    background: transparent;
    border-radius: 0;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    gap: 6px;
    letter-spacing: 0.01em;
}
.list-top-bar .header-btn-info.text-btn:hover {
    text-decoration: none;
    background: transparent;
    border: none;
}

.list-top-bar .info-top-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-wrap: nowrap;
    max-width: min(100%, 220px);
    height: auto;
    min-height: 40px;
}
.list-top-bar .info-top-link-logo {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    object-fit: contain;
    border-radius: 5px;
}
.list-top-bar .info-top-link-site {
    white-space: nowrap;
    font-weight: 700;
}

/* Бренд MyQuran.ru (#info-toggle) — слева в строке, настройки справа; без лишних отступов */
.list-top-bar #info-toggle.info-top-link {
    min-height: 0;
    max-width: min(100%, 440px);
    gap: 7px;
    padding: 0;
    margin: 0;
    font-size: 1.28rem;
    flex: 0 1 auto;
    min-width: 0;
}
.list-top-bar #info-toggle .info-top-link-logo {
    width: 32px;
    height: 32px;
    border-radius: 8px;
}

/* Кнопка меню и боковая панель */
.list-top-bar #list-menu-toggle {
    width: 40px;
    height: 40px;
    font-size: 1.4rem;
    border: none;
    background: var(--bg-card);
    color: #000;
    border-radius: 50%;
    transition: background var(--transition), color var(--transition);
}

.list-top-bar #list-menu-toggle i {
    color: #000;
    line-height: 1;
}

.list-top-bar #list-menu-toggle:hover {
    background: var(--primary-light);
    color: #000;
    border: none;
}

.list-top-bar #list-menu-toggle:hover i {
    color: #000;
}

.list-side-menu {
    position: fixed;
    inset: 0;
    z-index: 12000;
    pointer-events: none;
    visibility: hidden;
}

.list-side-menu.is-open {
    pointer-events: auto;
    visibility: visible;
}

.list-side-menu-backdrop {
    position: absolute;
    inset: 0;
    border: none;
    padding: 0;
    margin: 0;
    width: 100%;
    height: 100%;
    background: rgba(8, 12, 20, 0.4);
    opacity: 0;
    transition: opacity var(--transition);
    cursor: pointer;
}

.list-side-menu.is-open .list-side-menu-backdrop {
    opacity: 1;
}

.list-side-menu-panel {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(400px, 92vw);
    max-width: 100%;
    background: var(--bg);
    box-shadow: var(--shadow-lg);
    transform: translateX(-100%);
    transition: transform var(--transition);
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow: hidden;
    font-family: var(--ui-font);
}

.list-side-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
    gap: 10px;
    padding: calc(16px + env(safe-area-inset-top, 0px)) 20px 16px;
    background: var(--bg);
    border-bottom: none;
}

.list-side-menu-header-title {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
    color: var(--text);
}

.list-side-menu-close {
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    border: 1px solid var(--border);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    color: var(--text-muted);
    font-size: 1.2rem;
    line-height: 1;
    padding: 0;
    cursor: pointer;
    transition: all var(--transition);
}

.list-side-menu-close i {
    display: block;
    line-height: 1;
}

.list-side-menu-close:hover,
.list-side-menu-close:active {
    background: var(--primary-light);
    border-color: var(--primary);
    color: var(--primary);
}

.list-side-menu-nav {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 8px 16px calc(28px + env(safe-area-inset-bottom, 0px));
    overflow-y: auto;
    overscroll-behavior: contain;
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
}

.list-side-menu-divider {
    display: none;
}

.list-side-menu-section {
    margin: 0 0 12px;
    padding: 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 14px;
}

.list-side-menu-section:last-child {
    margin-bottom: 0;
}

.list-side-menu-section + .list-side-menu-section {
    margin-top: 0;
}

.list-side-menu-section-title {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 0 10px;
    margin: 0 0 4px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--primary);
    border-bottom: 1px solid var(--border);
}

.list-side-menu-group {
    background: none;
    border: none;
    border-radius: 0;
    overflow: visible;
    box-shadow: none;
}

.list-side-menu.is-open .list-side-menu-panel {
    transform: translateX(0);
}

.list-side-menu-link {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    min-height: 44px;
    margin: 0;
    padding: 12px 0;
    border: none;
    border-radius: 0;
    background: transparent;
    text-decoration: none;
    color: var(--text);
    font-size: 0.92rem;
    font-weight: 600;
    letter-spacing: 0;
    text-align: left;
    font-family: var(--ui-font);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: background var(--transition), color var(--transition);
}

.list-side-menu-link:active {
    background: transparent;
    text-decoration: none;
    color: var(--primary);
}
@media (hover: hover) {
    .list-side-menu-link:hover {
        background: transparent;
        text-decoration: none;
        color: var(--primary);
    }
}

.list-side-menu-link:not(:last-child) {
    border-bottom: 1px solid var(--border);
}

.list-side-menu-link:not(:last-child)::after {
    display: none;
}

.list-side-menu-icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-light);
    color: var(--primary);
    font-size: 1.05rem;
    line-height: 1;
}

.list-side-menu-icon i {
    display: block;
    line-height: 1;
    color: var(--primary);
}

.list-side-menu-icon--recognize,
.list-side-menu-icon--info,
.list-side-menu-icon--sections,
.list-side-menu-icon--download,
.list-side-menu-icon--check,
.list-side-menu-icon--ask,
.list-side-menu-icon--video,
.list-side-menu-icon--news,
.list-side-menu-icon--howto {
    background: var(--primary-light);
}

.list-side-menu-link-text,
.list-side-menu-link .list-top-bar-howto-label {
    flex: 1 1 auto;
    min-width: 0;
    display: block;
    border-bottom: none;
    padding-bottom: 0;
    line-height: 1.25;
    color: inherit;
}

.list-side-menu-chevron {
    flex-shrink: 0;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-left: 2px;
}

[data-theme="dark"] .list-side-menu-panel {
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.45);
}

body.list-side-menu-open {
    overflow: hidden;
}

.list-hero {
    text-align: center;
    padding: 28px 20px 16px;
    background: #fff;
    position: relative;
    overflow: hidden;
}

.list-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160' viewBox='0 0 160 160'%3E%3Cg fill='%2354a0ff' fill-opacity='0.4'%3E%3Ccircle cx='12' cy='8' r='1'/%3E%3Ccircle cx='45' cy='23' r='0.6'/%3E%3Ccircle cx='78' cy='5' r='1.2'/%3E%3Ccircle cx='95' cy='40' r='0.7'/%3E%3Ccircle cx='5' cy='55' r='0.6'/%3E%3Ccircle cx='33' cy='72' r='1'/%3E%3Ccircle cx='62' cy='88' r='0.6'/%3E%3Ccircle cx='88' cy='65' r='0.7'/%3E%3Ccircle cx='18' cy='95' r='0.6'/%3E%3Ccircle cx='125' cy='18' r='0.6'/%3E%3Ccircle cx='52' cy='42' r='0.5'/%3E%3Ccircle cx='72' cy='58' r='0.8'/%3E%3Ccircle cx='112' cy='82' r='0.6'/%3E%3Ccircle cx='138' cy='45' r='0.5'/%3E%3Ccircle cx='28' cy='128' r='0.7'/%3E%3Ccircle cx='145' cy='115' r='0.5'/%3E%3Ccircle cx='25' cy='15' r='0.6'/%3E%3Ccircle cx='100' cy='30' r='0.5'/%3E%3Ccircle cx='15' cy='80' r='0.7'/%3E%3Ccircle cx='90' cy='90' r='0.5'/%3E%3Ccircle cx='120' cy='55' r='0.6'/%3E%3Ccircle cx='35' cy='42' r='0.5'/%3E%3Ccircle cx='75' cy='75' r='0.7'/%3E%3Ccircle cx='110' cy='12' r='0.5'/%3E%3Ccircle cx='8' cy='120' r='0.6'/%3E%3Ccircle cx='55' cy='130' r='0.5'/%3E%3Ccircle cx='115' cy='38' r='0.6'/%3E%3Ccircle cx='48' cy='8' r='0.5'/%3E%3Ccircle cx='155' cy='60' r='0.6'/%3E%3Ccircle cx='68' cy='42' r='0.5'/%3E%3C/g%3E%3C/svg%3E"),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100' viewBox='0 0 100 100'%3E%3Cg fill='%2354a0ff' fill-opacity='0.25'%3E%3Ccircle cx='20' cy='10' r='0.5'/%3E%3Ccircle cx='55' cy='25' r='0.4'/%3E%3Ccircle cx='8' cy='48' r='0.55'/%3E%3Ccircle cx='42' cy='62' r='0.5'/%3E%3Ccircle cx='68' cy='8' r='0.4'/%3E%3Ccircle cx='15' cy='70' r='0.5'/%3E%3Ccircle cx='72' cy='55' r='0.4'/%3E%3Ccircle cx='85' cy='78' r='0.45'/%3E%3Ccircle cx='32' cy='92' r='0.4'/%3E%3Ccircle cx='5' cy='30' r='0.5'/%3E%3Ccircle cx='40' cy='5' r='0.4'/%3E%3Ccircle cx='90' cy='45' r='0.5'/%3E%3Ccircle cx='25' cy='75' r='0.4'/%3E%3Ccircle cx='60' cy='90' r='0.5'/%3E%3Ccircle cx='78' cy='25' r='0.4'/%3E%3Ccircle cx='50' cy='50' r='0.5'/%3E%3Ccircle cx='95' cy='65' r='0.4'/%3E%3Ccircle cx='18' cy='85' r='0.5'/%3E%3C/g%3E%3C/svg%3E"),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Cg fill='%2354a0ff' fill-opacity='0.2'%3E%3Ccircle cx='10' cy='5' r='0.5'/%3E%3Ccircle cx='35' cy='20' r='0.4'/%3E%3Ccircle cx='60' cy='8' r='0.6'/%3E%3Ccircle cx='85' cy='35' r='0.4'/%3E%3Ccircle cx='5' cy='45' r='0.5'/%3E%3Ccircle cx='28' cy='60' r='0.4'/%3E%3Ccircle cx='55' cy='75' r='0.5'/%3E%3Ccircle cx='75' cy='50' r='0.4'/%3E%3Ccircle cx='15' cy='85' r='0.5'/%3E%3Ccircle cx='95' cy='15' r='0.4'/%3E%3Ccircle cx='42' cy='32' r='0.3'/%3E%3Ccircle cx='68' cy='55' r='0.5'/%3E%3Ccircle cx='92' cy='72' r='0.4'/%3E%3Ccircle cx='18' cy='95' r='0.4'/%3E%3Ccircle cx='50' cy='5' r='0.3'/%3E%3Ccircle cx='105' cy='45' r='0.5'/%3E%3Ccircle cx='8' cy='68' r='0.4'/%3E%3Ccircle cx='115' cy='90' r='0.3'/%3E%3C/g%3E%3C/svg%3E");
    background-size: 160px 160px, 100px 100px, 120px 120px;
    background-position: 0 0, 50px 35px, 80px 20px;
    animation: stars-drift 100s ease-in-out infinite;
    pointer-events: none;
}

.list-hero .list-logo,
.list-hero .list-hero-site,
.list-hero .list-hero-quote { position: relative; z-index: 1; }

.list-hero .list-hero-mode {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    flex-direction: column;
}

.list-hero .list-hero-mode .sidebar-mode-btn + .sidebar-mode-btn {
    border-left: none;
    border-top: 1px solid var(--border);
}

.list-hero .list-hero-layout {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    flex-direction: column;
}

.list-hero .list-hero-layout .sidebar-mode-btn + .sidebar-mode-btn {
    border-left: none;
    border-top: 1px solid var(--border);
}

.list-view.listen-sidebar-mode .list-hero-layout {
    display: none;
}

.list-view.check-sidebar-mode .sidebar-listener-panel {
    display: none;
}

body.check-reader-mode #audio-player,
body.check-reader-embed #audio-player {
    display: none !important;
}

body.interface-rtl .list-hero .list-hero-mode {
    left: auto;
    right: 12px;
}
body.interface-rtl .list-hero .list-hero-layout {
    right: auto;
    left: 12px;
}

.list-logo {
    display: block;
    width: 28%;
    max-width: 90px;
    margin: 0 auto 8px;
}

.list-hero-site {
    display: block;
    font-weight: 700;
    font-size: 1.9rem;
    color: #000;
    margin-bottom: 6px;
}

.list-hero-site-accent {
    color: var(--primary);
    font-size: 1.12em;
    -webkit-text-stroke: 1px #000;
    paint-order: stroke fill;
}

.list-hero-quote {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text);
}

/* Toolbar */
.list-toolbar {
    display: flex;
    align-items: center;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    padding: 8px 16px;
    gap: 10px;
    border-bottom: 1px solid var(--border);
    position: relative;
    background: var(--bg);
}

.list-toolbar--hidden,
.list-toolbar[hidden] {
    display: none !important;
}

.sidebar-mode-toggle {
    display: inline-flex;
    flex-shrink: 0;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--bg);
}
.sidebar-mode-btn {
    width: 38px;
    height: 38px;
    padding: 0;
    margin: 0;
    border: none;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    transition: background 0.2s ease, color 0.2s ease;
}
.sidebar-mode-btn + .sidebar-mode-btn {
    border-left: 1px solid var(--border);
}
.sidebar-mode-btn:hover {
    color: var(--text);
    background: var(--primary-light);
}
.sidebar-mode-btn.active {
    color: var(--primary);
    background: var(--primary-light);
}
.sidebar-mode-ai-label {
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    line-height: 1;
}

.sidebar-listener-panel {
    display: none;
    border-bottom: 1px solid var(--border);
    background: var(--bg);
    position: sticky;
    top: 50px;
    z-index: 49;
    padding: 8px 0 10px;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
}
#sidebar-listener-panel {
    display: none !important;
}
.sidebar-listener-panel::-webkit-scrollbar {
    height: 4px;
}
.sidebar-listener-panel::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 999px;
}
.list-view.listen-sidebar-mode .sidebar-listener-panel {
    display: block;
}
.list-view.listen-sidebar-mode .sidebar-listener-reciters {
    display: none;
}
.sidebar-listener-label {
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: var(--text-muted);
    padding: 0 16px 8px;
    cursor: pointer;
    user-select: none;
}
.sidebar-listener-reciters {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 0 16px 4px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}
.sidebar-listener-reciters::-webkit-scrollbar {
    height: 4px;
}
.reciter-chip {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    width: 82px;
    min-height: 0;
    padding: 6px 6px 8px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--bg);
    color: var(--text);
    cursor: pointer;
    font-family: var(--ui-font);
    text-align: center;
    transition: border-color 0.2s ease, background 0.2s ease;
}
.reciter-chip:hover {
    border-color: var(--primary);
}
.reciter-chip.active {
    border-color: var(--primary);
    background: var(--primary-light);
    box-shadow: 0 0 0 1px var(--primary-light);
}
.reciter-chip-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}
.reciter-chip-avatar--initials {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    font-weight: 700;
    color: #fff;
}
.reciter-chip-name {
    font-size: 0.62rem;
    font-weight: 600;
    line-height: 1.25;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    max-width: 100%;
}

.list-view.listen-sidebar-mode .list-tabs {
    display: flex;
}
.list-view.listen-sidebar-mode .sidebar-tab[data-filter="history"] {
    display: none;
}
.list-view.listen-sidebar-mode .sidebar-tab[data-filter="bookmarks"],
.list-view.listen-sidebar-mode .sidebar-tab[data-filter="meccan"],
.list-view.listen-sidebar-mode .sidebar-tab[data-filter="medinan"] {
    display: none;
}
.list-view.listen-sidebar-mode .sidebar-tab[data-filter="all"] { order: 1; }
.list-view.listen-sidebar-mode .sidebar-tab[data-filter="playlists"] { order: 2; }
.list-view.listen-sidebar-mode .sidebar-tab[data-filter="favorites"] { order: 3; }
.list-view:not(.listen-sidebar-mode) .sidebar-tab[data-filter="playlists"] {
    display: none !important;
}

.surah-item--listen {
    cursor: pointer;
}
.surah-item--listen .surah-number {
    margin-right: 14px;
}
.surah-item--listen .surah-listen-toggle {
    flex-shrink: 0;
    width: 44px;
    min-width: 44px;
    height: 44px;
    margin: 0 8px 0 0;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--bg);
    color: var(--primary);
    font-size: 1.25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.surah-item--listen .surah-listen-toggle:hover {
    border-color: var(--primary);
    background: var(--primary-light);
}
.surah-item--listen .surah-listen-toggle.is-playing {
    border-color: var(--primary);
    background: var(--primary-light);
    color: var(--primary-dark, var(--primary));
}

.listener-reciter-chip {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    width: 108px;
    min-height: 86px;
    padding: 8px 8px 10px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: linear-gradient(180deg, var(--bg) 0%, rgba(0, 0, 0, 0.02) 100%);
    color: var(--text);
    cursor: pointer;
    font-family: var(--ui-font);
    text-align: center;
    transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.listener-reciter-chip:hover {
    border-color: var(--primary);
    background: var(--primary-light);
    transform: translateY(-1px);
}
.listener-reciter-chip .reciter-chip-avatar {
    width: 34px;
    height: 34px;
}
.listener-reciter-chip .reciter-chip-avatar--initials {
    font-size: 0.68rem;
    font-weight: 700;
}
.listener-reciter-chip .reciter-chip-name {
    font-size: 0.6rem;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: 0.01em;
    max-width: 100%;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.listener-reciter-chip.active {
    border-color: var(--primary);
    background: var(--primary-light);
    box-shadow: 0 0 0 1px var(--primary-light), 0 6px 14px rgba(0, 0, 0, 0.08);
}

.listener-reciter-list-item {
    width: 100%;
    border: none;
    background: transparent;
    text-align: left;
    padding: 14px 16px;
    margin: 0;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    cursor: pointer;
}
.listener-reciter-list-item:hover {
    background: var(--primary-light);
}
.listener-reciter-list-item.active {
    background: var(--primary-light);
}
.listener-reciter-list-item .meta {
    font-size: 0.68rem;
    line-height: 1.25;
    color: var(--text-muted);
}
.listener-reciter-avatar {
    width: 42px;
    height: 42px;
    min-width: 42px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    border: none;
    box-shadow: none;
    transform: none;
}
.listener-reciter-fav-btn {
    margin-left: 10px;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: none;
    color: var(--text-light);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    flex-shrink: 0;
    font-size: 1.2rem;
}
.listener-reciter-fav-btn:hover {
    color: var(--primary);
    background: var(--primary-light);
}
.listener-reciter-fav-btn.is-active {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.08);
}

.listener-riwaya-select-wrap {
    padding: 8px 12px 10px;
    border-bottom: 1px solid var(--border);
    background: var(--bg);
}
.listener-riwaya-select-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}
.listener-riwaya-select-box {
    position: relative;
    width: 100%;
}
.listener-filter-selector {
    position: relative;
}
.listener-filter-selected {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    height: 54px;
    padding: 0 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg);
    color: var(--text);
    cursor: pointer;
    font-family: var(--ui-font);
    font-size: 0.85rem;
    transition: border-color var(--transition), box-shadow var(--transition);
}
.listener-filter-selected:hover {
    border-color: var(--primary);
}
.listener-filter-selected:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(84,160,255,0.12);
    outline: none;
}
.listener-filter-flag {
    width: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}
.listener-filter-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
    align-items: flex-start;
}
.listener-filter-name {
    font-size: 0.82rem;
    font-weight: 500;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
}
.listener-filter-subtitle {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-align: left;
}
.listener-filter-chevron {
    font-size: 0.75rem;
    color: var(--text-muted);
    transition: transform var(--transition);
}
.listener-filter-dropdown {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 4px);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    max-height: 300px;
    padding: 4px 0;
    z-index: 160;
    overflow-y: auto;
}
.listener-filter-selector.open .listener-filter-chevron {
    transform: rotate(180deg);
}
.listener-filter-selector.open .listener-filter-dropdown {
    display: block;
}
.listener-filter-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    width: 100%;
    border: 0;
    background: transparent;
    text-align: left;
    font: inherit;
    cursor: pointer;
    transition: background var(--transition);
}
.listener-filter-option:hover {
    background: var(--primary-light);
}
.listener-filter-option.active {
    background: var(--primary-light);
}
.listener-filter-option-name {
    flex: 1;
    font-size: 0.85rem;
    font-weight: 400;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.listener-filter-option.active .listener-filter-option-name {
    font-weight: 500;
}
.listener-filter-check {
    font-size: 1rem;
    color: var(--primary);
    opacity: 0;
    flex-shrink: 0;
    transition: opacity var(--transition);
}
.listener-filter-option.active .listener-filter-check {
    opacity: 1;
}
body.interface-rtl .listener-filter-selected {
    flex-direction: row-reverse;
}
body.interface-rtl .listener-filter-selected .listener-filter-info {
    align-items: flex-end;
}

.listener-surah-header {
    display: flex;
    align-items: center;
    gap: 12px;
}
.listener-surah-header h3 {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.2;
}
.listener-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--text);
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease;
}
.listener-back-btn:hover {
    border-color: var(--primary);
    background: var(--primary-light);
}

.list-toolbar .settings-dropdown {
    flex-shrink: 0;
}

.list-search {
    flex: 1 1 0%;
    min-width: 0;
    max-width: 100%;
    position: relative;
}

.list-search input {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    padding: 9px 36px 9px 34px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg);
    color: var(--text);
    font-size: 0.85rem;
    font-family: var(--ui-font);
    outline: none;
    transition: border-color var(--transition);
}

.list-search input:focus { border-color: var(--primary); }

.list-search-clear {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    transition: color var(--transition), background var(--transition);
}
.list-search-clear:hover {
    color: var(--text);
    background: var(--primary-light);
}

.list-search .search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.8rem;
    pointer-events: none;
}

.voice-search-toolbar-btn {
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    color: var(--primary);
    font-size: 1.1rem;
}

#list-ayah-recognize-btn {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border: none;
    color: #fff;
}
#list-ayah-recognize-btn i {
    color: #fff;
}
#list-ayah-recognize-btn:hover {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border: none;
    color: #fff;
    filter: brightness(1.08);
}

#list-ayah-recognize-btn.recording,
#list-ayah-recognize-btn.recording i {
    color: #fff;
    filter: none;
}
#list-ayah-recognize-btn.recording {
    background: #ef4444;
    animation: micPulse 1.2s ease-in-out infinite;
}

.list-toolbar-video-btn,
.list-toolbar #list-video-btn {
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    color: var(--primary);
    font-size: 1.15rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    background: transparent;
    border: none;
}
.list-toolbar-video-btn i,
.list-toolbar #list-video-btn i {
    color: var(--primary);
}
.list-toolbar-video-btn:hover,
.list-toolbar #list-video-btn:hover {
    background: var(--primary-light);
    color: var(--primary);
}

.list-toolbar .list-search--hidden {
    display: none !important;
}

.list-toolbar-right {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
}

/* Tabs */
.list-tabs {
    display: flex;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    background: var(--bg);
    z-index: 49;
}

.list-view.list-explore-active .list-hero {
    display: none;
}

.sidebar-tab {
    flex: 1;
    padding: 10px;
    text-align: center;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-light);
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all var(--transition);
    border-bottom: 2px solid transparent;
    font-family: var(--ui-font);
}

.sidebar-tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.sidebar-tab:hover { background: transparent; }
.sidebar-tab[data-filter="meccan"],
.sidebar-tab[data-filter="medinan"] {
    font-size: 0.72rem;
}

.ayah-search-panel {
    padding: 0 0 8px;
    border-bottom: 1px solid var(--border);
    background: var(--bg);
}
.ayah-search-header {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 6px 12px;
    padding: 12px 16px 8px;
}
.ayah-search-header strong {
    font-size: 0.95rem;
    color: var(--text);
}
.ayah-search-header span {
    font-size: 0.78rem;
    color: var(--text-muted);
}
.ayah-search-status {
    padding: 10px 16px 14px;
    font-size: 0.86rem;
    color: var(--text-muted);
}
.ayah-search-item {
    display: block;
    width: 100%;
    text-align: left;
    padding: 12px 16px;
    border: 0;
    border-top: 1px solid var(--border);
    background: var(--bg-card);
    color: inherit;
    cursor: pointer;
    font: inherit;
}
.ayah-search-item:hover {
    background: var(--accent-light);
}
.ayah-search-ref {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 6px;
}
.ayah-search-arabic {
    font-family: var(--arabic-font, 'Amiri', serif);
    font-size: 1.15rem;
    line-height: 1.9;
    color: var(--text);
    margin-bottom: 4px;
}
.ayah-search-translation {
    font-family: var(--translation-font);
    font-size: 0.9rem;
    line-height: 1.55;
    color: var(--text);
}
.ayah-search-item mark {
    background: color-mix(in srgb, var(--primary) 28%, transparent);
    color: inherit;
    padding: 0 0.1em;
    border-radius: 3px;
}

/* Surah grid */
.surah-grid {
    display: flex;
    flex-wrap: wrap;
    align-content: flex-start;
    min-height: 60vh;
}

.surah-item {
    display: flex;
    align-items: center;
    padding: 14px 16px;
    min-height: 5.5rem;
    height: 5.5rem;
    box-sizing: border-box;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    color: var(--text);
    flex-basis: 100%;
    max-width: 100%;
    width: 100%;
    border-bottom: 1px solid var(--border);
    background: #fff;
}
[data-theme="dark"] .surah-item {
    background: var(--bg-card);
}
.surah-item:last-child { border-bottom: none; }
.surah-item:nth-child(odd) { background: var(--accent-light); }
.surah-grid .list-section-header {
    flex-basis: 100%;
    max-width: 100%;
    width: 100%;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    background: var(--bg);
}
.surah-grid .list-section-header h3 {
    margin: 0;
    font-size: 1.02rem;
    color: var(--text);
}
.surah-grid .list-section-header + .surah-item {
    background: #fff;
}
[data-theme="dark"] .surah-grid .list-section-header + .surah-item {
    background: var(--bg-card);
}
.surah-item.active {
    background: #f0f0f0;
    border-left: 3px solid var(--primary);
}
[data-theme="dark"] .surah-item.active {
    background: #2d3748;
}
.surah-item.active .surah-info .name-en,
.surah-item.active .surah-info .meta,
.surah-item.active .name-ar,
.surah-item.active .surah-ayah-count {
    color: var(--text);
}
.surah-item.active .surah-info .meta,
.surah-item.active .surah-ayah-count {
    color: var(--text-light);
}

.surah-number {
    font-family: var(--ui-font);
    font-size: 14px;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    margin-right: 18px;
    margin-left: 4px;
    font-weight: 700;
    color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    z-index: 1;
}

.surah-number::before,
.surah-number::after {
    content: '';
    position: absolute;
    inset: 0;
    border: 1.6px solid var(--primary);
    border-radius: 10px;
    background: transparent;
    z-index: -1;
    transition: all 0.3s;
}

.surah-number::before {
    transform: rotate(45deg) scale(1.04);
}

.surah-number::after {
    display: none;
}

[data-theme="dark"] .surah-number {
    color: var(--text);
}

.surah-item:hover .surah-number::before,
.surah-item:hover .surah-number::after,
.surah-item.active .surah-number::before,
.surah-item.active .surah-number::after {
    background: var(--primary);
    border-color: var(--primary);
}

.surah-item:hover .surah-number,
.surah-item.active .surah-number {
    color: #fff;
}

.surah-info {
    flex: 1;
    min-width: 0;
}

.surah-info .name-en {
    font-family: var(--ui-font);
    font-weight: 700;
    font-size: 16px;
    color: var(--text);
    margin-bottom: 2px;
}

.surah-info .meta {
    font-family: var(--ui-font);
    font-size: 14px;
    color: var(--text-light);
}

.surah-item .name-ar-wrap {
    flex-shrink: 0;
    margin-left: 12px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.surah-item .name-ar {
    font-family: var(--arabic-font);
    font-size: 18px;
    color: var(--text);
    direction: rtl;
}

.surah-item .surah-ayah-count {
    font-family: var(--ui-font);
    font-size: 0.7rem;
    color: var(--text-light);
    margin-top: 2px;
    font-weight: 500;
}
/* Mobile: responsive columns (no desktop sidebar) */
@media (min-width: 768px) and (max-width: 1023px) {
    .surah-item {
        flex-basis: 50%;
        max-width: 50%;
    }
}

/* ============ READ VIEW ============ */

.read-view {
    min-height: 100vh;
    padding-bottom: calc(var(--player-height) + 20px);
}

/* Mobile default: read-view hidden */
.read-view.hidden-mobile { display: none; }

/* ============ DESKTOP SPLIT LAYOUT (≥1024px) ============ */

@media (min-width: 1024px) {
    :root {
        --sidebar-width: 380px;
    }

    .app-container {
        display: flex;
        min-height: 100vh;
    }

    .list-view {
        width: var(--sidebar-width);
        flex-shrink: 0;
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        overflow-y: auto;
        border-right: 1px solid var(--border);
        z-index: 60;
        background: var(--bg);
        min-height: 100vh;
    }

    .list-view .list-top-bar-links-row .list-top-bar-howto[data-ajax-page="download"] {
        display: none;
    }

    .list-view .list-hero {
        display: flex;
        flex-direction: column;
        align-items: center;
        padding: 16px 16px 12px;
        text-align: center;
    }

    .list-view .list-logo {
        max-width: 120px;
        width: auto;
        height: auto;
        margin: 0 auto 8px;
    }

    .list-view .list-hero-site {
        margin-bottom: 4px;
    }

    .list-view .list-hero-quote {
        font-size: 0.8rem;
        margin-top: 0;
    }

    .surah-item {
        flex-basis: 100% !important;
        max-width: 100% !important;
        padding: 14px 16px;
    }

    .read-view {
        margin-left: var(--sidebar-width);
        flex: 1;
        min-height: 100vh;
        display: block !important;
        position: relative;
    }

    .read-view.hidden-mobile {
        display: block !important;
    }

    .read-view .back-btn { display: none; }

    .info-view {
        margin-left: var(--sidebar-width);
        flex: 1;
        min-height: 100vh;
    }

    .info-view .back-btn { display: none; }
    .info-view-header { justify-content: center; }
    .info-view-header .back-btn { display: flex; }

    .read-view.hidden-by-info { display: none !important; }

    .read-view-empty {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        min-height: 60vh;
        color: var(--text-muted);
        text-align: center;
        padding: 40px 20px;
    }

    .read-view-empty-icon { font-size: 3rem; margin-bottom: 16px; opacity: 0.5; }
    .read-view-empty-text { font-size: 1.1rem; font-weight: 600; margin-bottom: 6px; color: var(--text-light); }
    .read-view-empty-hint { font-size: 0.85rem; }

    .list-tabs {
        position: sticky;
        top: 0;
    }

    .audio-player {
        left: var(--sidebar-width);
        right: 0;
        bottom: 0;
    }

    /* На больших экранах текст в чтении ограничен `max-width: 860px`,
       поэтому делаем и плеер таким же по ширине, чтобы правая часть
       оставалась в рамках контента. */
    .audio-player { padding-left: 0; padding-right: 0; }
    .audio-player .player-row {
        max-width: 860px;
        padding-left: 20px;
        padding-right: 20px;
        margin-left: auto;
        margin-right: auto;
    }
    .audio-player .player-progress-top {
        max-width: 100%;
        padding-left: 0;
        padding-right: 0;
        margin-left: 0;
        margin-right: 0;
    }
}

@media (min-width: 1400px) {
    :root {
        --sidebar-width: 420px;
    }
}

.read-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: transform var(--transition);
    overflow: hidden;
}

.read-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160' viewBox='0 0 160 160'%3E%3Cg fill='%23fff' fill-opacity='0.55'%3E%3Ccircle cx='12' cy='8' r='1'/%3E%3Ccircle cx='45' cy='23' r='0.6'/%3E%3Ccircle cx='78' cy='5' r='1.2'/%3E%3Ccircle cx='95' cy='40' r='0.7'/%3E%3Ccircle cx='5' cy='55' r='0.6'/%3E%3Ccircle cx='33' cy='72' r='1'/%3E%3Ccircle cx='62' cy='88' r='0.6'/%3E%3Ccircle cx='88' cy='65' r='0.7'/%3E%3Ccircle cx='18' cy='95' r='0.6'/%3E%3Ccircle cx='125' cy='18' r='0.6'/%3E%3Ccircle cx='52' cy='42' r='0.5'/%3E%3Ccircle cx='72' cy='58' r='0.8'/%3E%3Ccircle cx='112' cy='82' r='0.6'/%3E%3Ccircle cx='138' cy='45' r='0.5'/%3E%3Ccircle cx='28' cy='128' r='0.7'/%3E%3Ccircle cx='145' cy='115' r='0.5'/%3E%3Ccircle cx='25' cy='15' r='0.6'/%3E%3Ccircle cx='100' cy='30' r='0.5'/%3E%3Ccircle cx='15' cy='80' r='0.7'/%3E%3Ccircle cx='90' cy='90' r='0.5'/%3E%3Ccircle cx='120' cy='55' r='0.6'/%3E%3Ccircle cx='35' cy='42' r='0.5'/%3E%3Ccircle cx='75' cy='75' r='0.7'/%3E%3Ccircle cx='110' cy='12' r='0.5'/%3E%3Ccircle cx='8' cy='120' r='0.6'/%3E%3Ccircle cx='55' cy='130' r='0.5'/%3E%3Ccircle cx='115' cy='38' r='0.6'/%3E%3Ccircle cx='48' cy='8' r='0.5'/%3E%3Ccircle cx='155' cy='60' r='0.6'/%3E%3Ccircle cx='68' cy='42' r='0.5'/%3E%3C/g%3E%3C/svg%3E"),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100' viewBox='0 0 100 100'%3E%3Cg fill='%23fff' fill-opacity='0.35'%3E%3Ccircle cx='20' cy='10' r='0.5'/%3E%3Ccircle cx='55' cy='25' r='0.4'/%3E%3Ccircle cx='8' cy='48' r='0.55'/%3E%3Ccircle cx='42' cy='62' r='0.5'/%3E%3Ccircle cx='68' cy='8' r='0.4'/%3E%3Ccircle cx='15' cy='70' r='0.5'/%3E%3Ccircle cx='72' cy='55' r='0.4'/%3E%3Ccircle cx='85' cy='78' r='0.45'/%3E%3Ccircle cx='32' cy='92' r='0.4'/%3E%3Ccircle cx='5' cy='30' r='0.5'/%3E%3Ccircle cx='40' cy='5' r='0.4'/%3E%3Ccircle cx='90' cy='45' r='0.5'/%3E%3Ccircle cx='25' cy='75' r='0.4'/%3E%3Ccircle cx='60' cy='90' r='0.5'/%3E%3Ccircle cx='78' cy='25' r='0.4'/%3E%3Ccircle cx='50' cy='50' r='0.5'/%3E%3Ccircle cx='95' cy='65' r='0.4'/%3E%3Ccircle cx='18' cy='85' r='0.5'/%3E%3C/g%3E%3C/svg%3E"),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Cg fill='%23fff' fill-opacity='0.25'%3E%3Ccircle cx='10' cy='5' r='0.5'/%3E%3Ccircle cx='35' cy='20' r='0.4'/%3E%3Ccircle cx='60' cy='8' r='0.6'/%3E%3Ccircle cx='85' cy='35' r='0.4'/%3E%3Ccircle cx='5' cy='45' r='0.5'/%3E%3Ccircle cx='28' cy='60' r='0.4'/%3E%3Ccircle cx='55' cy='75' r='0.5'/%3E%3Ccircle cx='75' cy='50' r='0.4'/%3E%3Ccircle cx='15' cy='85' r='0.5'/%3E%3Ccircle cx='95' cy='15' r='0.4'/%3E%3Ccircle cx='42' cy='32' r='0.3'/%3E%3Ccircle cx='68' cy='55' r='0.5'/%3E%3Ccircle cx='92' cy='72' r='0.4'/%3E%3Ccircle cx='18' cy='95' r='0.4'/%3E%3Ccircle cx='50' cy='5' r='0.3'/%3E%3Ccircle cx='105' cy='45' r='0.5'/%3E%3Ccircle cx='8' cy='68' r='0.4'/%3E%3Ccircle cx='115' cy='90' r='0.3'/%3E%3C/g%3E%3C/svg%3E");
    background-size: 160px 160px, 100px 100px, 120px 120px;
    background-position: 0 0, 50px 35px, 80px 20px;
    animation: stars-drift 100s ease-in-out infinite;
    pointer-events: none;
}

.read-header .back-btn,
.read-header .read-header-right,
.read-header .read-header-surah-name { position: relative; z-index: 1; }

.read-header-surah-name {
    flex: 1;
    text-align: center;
    font-family: var(--arabic-font);
    font-size: 1.4rem;
    font-weight: 700;
    direction: rtl;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition), visibility var(--transition);
    pointer-events: none;
}

.read-header.show-surah-name .read-header-surah-name {
    opacity: 1;
    visibility: visible;
}

.read-header .back-btn {
    background: transparent;
    border: none;
    box-shadow: none;
    color: #fff;
}

.read-header .back-btn:hover {
    background: transparent;
    border: none;
    box-shadow: none;
    color: #fff;
    opacity: 0.85;
}

.read-header .back-btn i {
    font-size: 1.55rem;
    line-height: 1;
}

.read-header .header-btn {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    color: #fff;
}

.read-header .header-btn:hover {
    background: rgba(255, 255, 255, 0.35);
    border-color: rgba(255, 255, 255, 0.6);
    color: #fff;
}
.read-header .read-ayah-jump-btn {
    background: transparent;
    border: none;
    box-shadow: none;
    min-width: 36px;
    padding: 0 8px;
    font-variant-numeric: tabular-nums;
    display: inline-flex;
    align-items: center;
    gap: 0.35em;
    white-space: nowrap;
}
.read-header .read-ayah-jump-btn:hover {
    background: transparent;
    border: none;
}

.read-header .read-tajweed-btn {
    background: transparent;
    border: none;
    box-shadow: none;
}
.read-header .read-tajweed-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border: none;
}
.read-header .read-tajweed-q {
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1;
    color: #fff;
}
.read-header .surah-favorite-btn.active {
    background: transparent;
    border: none;
    box-shadow: none;
}
.read-header .surah-favorite-btn.active i {
    color: #ed4956;
    -webkit-text-stroke: 0.6px #ffffff;
    text-shadow: 0 0 1px rgba(255, 255, 255, 0.9);
}
.read-header .surah-favorite-btn {
    background: transparent;
    border: none;
    box-shadow: none;
    margin-left: 10px;
}
.read-header .surah-favorite-btn:hover {
    background: transparent;
    border: none;
    box-shadow: none;
}
.read-header .surah-favorite-btn i {
    font-size: 1.35rem;
}
.read-header .surah-favorite-btn.active:hover i {
    color: #ed4956;
}

.read-header #read-font-size-btn {
    background: transparent;
    border: none;
}
.read-header #read-font-size-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border: none;
}

.read-tajweed-btn[hidden] { display: none !important; }
.read-view.hidden-mobile .read-tajweed-btn { display: none !important; }

.font-size-btn-label,
.read-header .read-ayah-prefix,
.read-header .read-ayah-num {
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

/* Font size modal (read view) */
.font-size-modal {
    position: fixed;
    inset: 0;
    z-index: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition), visibility var(--transition);
}
.font-size-modal.show {
    opacity: 1;
    visibility: visible;
}
.font-size-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
}
.font-size-modal-panel {
    position: relative;
    width: 100%;
    max-width: 320px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}
.font-size-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 20px;
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--bg-card) 100%);
    border-bottom: 1px solid var(--border);
}
.font-size-modal-header h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: 0.02em;
    display: flex;
    align-items: center;
    gap: 10px;
}
.font-size-modal-header h3::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 20px;
    border-radius: 2px;
    background: var(--primary);
}
.font-size-modal-close {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.06);
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1rem;
    transition: background var(--transition), color var(--transition);
}
.font-size-modal-close:hover {
    background: var(--primary-light);
    color: var(--primary);
}
[data-theme="dark"] .font-size-modal-close {
    background: rgba(255, 255, 255, 0.08);
}
[data-theme="dark"] .font-size-modal-close:hover {
    background: var(--primary-light);
    color: var(--primary);
}
.font-size-modal-toolbar {
    display: flex;
    justify-content: flex-end;
    padding: 8px 16px 0;
}
.font-size-modal-reset {
    border: none;
    background: transparent;
    color: var(--primary);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    padding: 4px 2px;
}
.font-size-modal-reset:hover {
    text-decoration: underline;
}
.font-size-modal-body { padding: 8px 16px 16px; }
.font-size-modal-bg-section {
    padding-top: 4px;
    padding-bottom: 12px;
}
.font-size-bg-swatches {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.font-size-bg-swatch {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid var(--border);
    padding: 0;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
    flex-shrink: 0;
    transition: transform var(--transition), box-shadow var(--transition);
}
.font-size-bg-swatch:hover {
    transform: scale(1.08);
}
.font-size-bg-swatch.active {
    box-shadow: 0 0 0 2px var(--bg-card), 0 0 0 4px var(--primary);
}
.font-size-modal-section {
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
}
.font-size-modal-section:first-child { padding-top: 6px; }
.font-size-modal-section:last-child {
    border-bottom: none;
    padding-bottom: 4px;
}
.font-size-modal-section .font-size-control { margin-top: 10px; }
.font-size-modal-row {
    margin-bottom: 14px;
}
.font-size-modal-row:last-child { margin-bottom: 0; }
.font-size-modal-section .font-size-label-row > label:not(.toggle-switch),
.font-size-modal-section .font-size-toggle-text,
.font-size-modal-row .font-size-label-row > label:not(.toggle-switch),
.font-size-modal-row .font-size-toggle-text {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0;
}
.font-size-modal-section .toggle-switch,
.font-size-modal-row .toggle-switch {
    display: inline-block;
    margin-bottom: 0;
}

/* Tajweed rules legend modal */
.tajweed-rules-panel {
    max-width: 380px;
}
.tajweed-rules-body {
    max-height: min(70vh, 520px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}
.tajweed-rules-intro {
    margin: 0 0 14px;
    font-size: 0.85rem;
    line-height: 1.45;
    color: var(--text-light);
}
.tajweed-rules-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.tajweed-rule-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 10px;
    background: var(--bg);
    border: 1px solid var(--border);
}
.tajweed-rule-swatch {
    flex-shrink: 0;
    width: 10px;
    height: 28px;
    border-radius: 4px;
}
.tajweed-rule-sample {
    flex-shrink: 0;
    width: 36px;
    text-align: center;
    font-family: var(--arabic-font, 'Amiri', serif);
    font-size: 1.25rem;
    line-height: 1.2;
    direction: rtl;
}
.tajweed-rule-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.tajweed-rule-text strong {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text);
}
.tajweed-rule-text span {
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.35;
}

/* --- mushaf mode header --- */
.read-header.mushaf-mode .read-header-surah-name {
    display: none;
}
.read-header.mushaf-mode .read-ayah-jump-btn,
.read-header.mushaf-mode .surah-favorite-btn,
.read-header.mushaf-mode #read-font-size-btn {
    display: none;
}
.read-header.mushaf-mode .read-tajweed-btn:not([hidden]) {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.read-header.mushaf-mode .read-header-right {
    margin-left: 0;
}

.mushaf-hdr-info {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-width: 0;
    position: relative;
    z-index: 1;
}

.mushaf-hdr-surah,
.mushaf-hdr-page,
.mushaf-hdr-juz {
    display: flex;
    flex-direction: column;
    line-height: 1.25;
    flex: 1;
    min-width: 0;
}

.mushaf-hdr-surah { align-items: flex-start; }
.mushaf-hdr-page { align-items: center; }
.mushaf-hdr-juz { align-items: flex-end; }

.mushaf-hdr-ru {
    font-family: var(--ui-font);
    font-size: 0.78rem;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.mushaf-hdr-ar {
    font-family: var(--mushaf-font);
    font-size: 0.72rem;
    font-weight: 400;
    color: rgba(255,255,255,0.7);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.mushaf-hdr-page .mushaf-hdr-ru { font-weight: 700; }
.mushaf-hdr-page .mushaf-hdr-ar { direction: rtl; }

@media (max-width: 640px) {
    .mushaf-hdr-info { gap: 6px; }
    .mushaf-hdr-ru { font-size: 0.7rem; }
    .mushaf-hdr-ar { font-size: 0.65rem; }
}

body.scroll-hide-ui .read-header {
    transform: translateY(-100%);
}

body.scroll-hide-ui .audio-player.visible {
    transform: translateY(100%);
}


.back-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: var(--bg);
    color: var(--text);
    font-size: 1.25rem;
    font-weight: 600;
    font-family: var(--ui-font);
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
}

.back-btn:hover {
    background: var(--primary-light);
    border-color: var(--primary);
    color: var(--primary);
}

.read-header-search {
    flex: 1;
    position: relative;
    max-width: 320px;
}

.read-header-search input {
    width: 100%;
    padding: 8px 12px 8px 34px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg);
    color: var(--text);
    font-size: 0.85rem;
    font-family: var(--ui-font);
    outline: none;
    transition: all var(--transition);
}

.read-header-search input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(84,160,255,0.15);
}

.read-header-search .search-icon {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.8rem;
}

.read-header-right {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
}

/* Header buttons */
.header-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--text);
    cursor: pointer;
    transition: all var(--transition);
    font-size: 1rem;
}

.header-btn:hover {
    background: var(--primary-light);
    border-color: var(--primary);
    color: var(--primary);
}

/* Settings dropdown */
.settings-dropdown { position: relative; }

.settings-panel {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    background: var(--bg);
    display: none;
    flex-direction: column;
    z-index: 1000;
    overflow: hidden;
}

.settings-panel.show { display: flex; }

.settings-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: none;
    background: var(--bg);
    flex-shrink: 0;
}

.settings-panel-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text);
    margin: 0;
    letter-spacing: -0.02em;
}

.settings-panel-close {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 50%;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-muted);
    cursor: pointer;
    transition: all var(--transition);
    font-size: 1.2rem;
}

.settings-panel-close:hover {
    background: var(--primary-light);
    border-color: var(--primary);
    color: var(--primary);
}

.settings-panel-body {
    flex: 1;
    overflow-y: auto;
    padding: 8px 16px 28px;
    max-width: 480px;
    margin: 0 auto;
    width: 100%;
}

/* Блок настроек мусхафа: отступ до следующей группы */
#settings-layout-mushaf {
    padding-bottom: 18px;
}

/* ============ CUSTOM MUSHAF FONT SELECTOR ============ */
.mushaf-font-selector { position: relative; }
.mushaf-font-selected {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg);
    color: var(--text);
    cursor: pointer;
    font-family: var(--ui-font);
    font-size: 0.85rem;
    transition: border-color var(--transition), box-shadow var(--transition);
}
.mushaf-font-selected:hover { border-color: var(--primary); }
.mushaf-font-selected:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(84,160,255,0.12); outline: none; }
.mushaf-font-selected-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; align-items: flex-start; }
.mushaf-font-selected-name { font-size: 0.85rem; font-weight: 500; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; width: 100%; }
.mushaf-font-selected-sample {
    font-family: var(--mushaf-font);
    font-size: 1.25rem;
    line-height: 1.4;
    color: var(--text);
    direction: rtl;
    text-align: right;
    width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 6px;
    padding: 6px 8px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}
.mushaf-font-chevron { font-size: 0.75rem; color: var(--text-muted); transition: transform var(--transition); flex-shrink: 0; }
.mushaf-font-selector.open .mushaf-font-chevron { transform: rotate(180deg); }

.mushaf-font-dropdown {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 4px);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    z-index: 120;
    max-height: 320px;
    overflow-y: auto;
    padding: 6px 0;
}
.mushaf-font-selector.open .mushaf-font-dropdown { display: block; }

.mushaf-font-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    cursor: pointer;
    transition: background var(--transition);
}
.mushaf-font-option:hover { background: var(--primary-light); }
.mushaf-font-option.active { background: var(--primary-light); }

.mushaf-font-option-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
}
.mushaf-font-option-name {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.mushaf-font-option-sample {
    font-size: 1.05rem;
    line-height: 1.35;
    color: var(--text);
    direction: rtl;
    text-align: right;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 6px;
    padding: 6px 8px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}
.mushaf-font-check {
    font-size: 1rem;
    color: var(--primary);
    opacity: 0;
    flex-shrink: 0;
    transition: opacity var(--transition);
}
.mushaf-font-option.active .mushaf-font-check { opacity: 1; }

/* ============ CUSTOM ARABIC FONT SELECTOR ============ */
.arabic-font-selector { position: relative; }
.arabic-font-selected {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg);
    color: var(--text);
    cursor: pointer;
    font-family: var(--ui-font);
    font-size: 0.85rem;
    transition: border-color var(--transition), box-shadow var(--transition);
}
.arabic-font-selected:hover { border-color: var(--primary); }
.arabic-font-selected:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(84,160,255,0.12); outline: none; }
.arabic-font-selected-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; align-items: flex-start; }
.arabic-font-selected-name { font-size: 0.85rem; font-weight: 500; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; width: 100%; }
.arabic-font-selected-sample {
    font-family: var(--arabic-font);
    font-size: 1.25rem;
    line-height: 1.4;
    color: var(--text);
    direction: rtl;
    text-align: right;
    width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 6px;
    padding: 6px 8px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}
.arabic-font-chevron { font-size: 0.75rem; color: var(--text-muted); transition: transform var(--transition); flex-shrink: 0; }
.arabic-font-selector.open .arabic-font-chevron { transform: rotate(180deg); }
.arabic-font-dropdown {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 4px);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    z-index: 120;
    max-height: 320px;
    overflow-y: auto;
    padding: 6px 0;
}
.arabic-font-selector.open .arabic-font-dropdown { display: block; }
.arabic-font-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    cursor: pointer;
    transition: background var(--transition);
}
.arabic-font-option:hover { background: var(--primary-light); }
.arabic-font-option.active { background: var(--primary-light); }
.arabic-font-option-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.arabic-font-option-name { font-size: 0.85rem; font-weight: 500; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.arabic-font-option-sample {
    font-size: 1.05rem;
    line-height: 1.35;
    color: var(--text);
    direction: rtl;
    text-align: right;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 6px;
    padding: 6px 8px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}
.arabic-font-check { font-size: 1rem; color: var(--primary); opacity: 0; flex-shrink: 0; transition: opacity var(--transition); }
.arabic-font-option.active .arabic-font-check { opacity: 1; }

/* ============ CUSTOM TRANSLATION FONT SELECTOR ============ */
.translation-font-selector { position: relative; }
.translation-font-selected {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg);
    color: var(--text);
    cursor: pointer;
    font-family: var(--ui-font);
    font-size: 0.85rem;
    transition: border-color var(--transition), box-shadow var(--transition);
}
.translation-font-selected:hover { border-color: var(--primary); }
.translation-font-selected:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(84,160,255,0.12); outline: none; }
.translation-font-selected-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; align-items: flex-start; }
.translation-font-selected-name { font-size: 0.85rem; font-weight: 500; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; width: 100%; }
.translation-font-selected-sample {
    font-family: var(--translation-font);
    font-size: 0.95rem;
    line-height: 1.4;
    color: var(--text);
    direction: ltr;
    text-align: left;
    width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 6px;
    padding: 6px 8px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}
.translation-font-chevron { font-size: 0.75rem; color: var(--text-muted); transition: transform var(--transition); flex-shrink: 0; }
.translation-font-selector.open .translation-font-chevron { transform: rotate(180deg); }
.translation-font-dropdown {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 4px);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    z-index: 120;
    max-height: 320px;
    overflow-y: auto;
    padding: 6px 0;
}
.translation-font-selector.open .translation-font-dropdown { display: block; }
.translation-font-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    cursor: pointer;
    transition: background var(--transition);
}
.translation-font-option:hover { background: var(--primary-light); }
.translation-font-option.active { background: var(--primary-light); }
.translation-font-option-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.translation-font-option-name { font-size: 0.85rem; font-weight: 500; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.translation-font-option-sample {
    font-size: 0.9rem;
    line-height: 1.35;
    color: var(--text);
    direction: ltr;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 6px;
    padding: 6px 8px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}
.translation-font-check { font-size: 1rem; color: var(--primary); opacity: 0; flex-shrink: 0; transition: opacity var(--transition); }
.translation-font-option.active .translation-font-check { opacity: 1; }

.settings-group {
    margin-bottom: 12px;
    padding: 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 14px;
}

.settings-group:last-child { margin-bottom: 0; }

.style-color-swatches {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 8px;
}
.style-color-swatch {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid var(--border);
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.style-color-swatch:hover {
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}
.style-color-swatch.active {
    border-color: var(--text);
    box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--text);
}

.settings-combined-arabic,
.settings-combined-translation {
    padding: 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 14px;
    margin-bottom: 12px;
}
.settings-combined-arabic .settings-group,
.settings-combined-translation .settings-group {
    margin-bottom: 0;
    padding: 0;
    background: none;
    border: none;
    border-radius: 0;
}
.settings-combined-title {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--primary);
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}
.settings-combined-row {
    margin-bottom: 14px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border);
}
.settings-combined-row:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}
.settings-combined-row > label:first-child {
    margin-bottom: 6px;
}

.settings-layout-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.settings-layout-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    width: 100%;
    min-height: 118px;
    padding: 10px 10px 12px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--bg);
    color: var(--text);
    cursor: pointer;
    text-align: left;
    font-family: var(--ui-font);
    box-shadow: var(--shadow);
    transition: border-color var(--transition), background var(--transition), box-shadow var(--transition), transform var(--transition);
}
.settings-layout-card:hover {
    border-color: var(--primary);
    transform: translateY(-1px);
}
.settings-layout-card.active {
    border-color: var(--primary);
    background: var(--primary-light);
    box-shadow: 0 0 0 1px var(--primary), var(--shadow);
}
.settings-layout-card-preview {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 48px;
    border-radius: 10px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--primary);
    font-size: 1.55rem;
    line-height: 1;
}
.settings-layout-card-preview i {
    display: block;
    line-height: 1;
}
.settings-layout-card.active .settings-layout-card-preview {
    background: var(--bg);
    border-color: transparent;
    color: var(--primary-dark);
}
.settings-layout-card-body {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1px;
    min-width: 0;
    padding: 0 2px;
}
.settings-layout-card-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1.25;
}
.settings-layout-card-en {
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--text-muted);
    line-height: 1.3;
    letter-spacing: 0.01em;
}
.settings-layout-card-hint {
    font-size: 0.68rem;
    font-weight: 500;
    color: var(--text-light);
    line-height: 1.3;
    margin-top: 2px;
}
.settings-layout-card-check {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    color: #fff;
    background: var(--primary);
    opacity: 0;
    transform: scale(0.8);
    transition: opacity var(--transition), transform var(--transition);
}
.settings-layout-card.active .settings-layout-card-check {
    opacity: 1;
    transform: scale(1);
}
body.interface-rtl .settings-layout-card-body {
    align-items: flex-end;
    text-align: right;
}
body.interface-rtl .settings-layout-card-check {
    right: auto;
    left: 8px;
}

.settings-group-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

.settings-group-toggle > label:first-child { margin-bottom: 0; }

.reciter-group-header {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 10px 14px 4px;
    user-select: none;
    pointer-events: none;
}
.reciter-dropdown > .reciter-group-header:first-child {
    padding-top: 4px;
}
.reciter-dropdown > .reciter-group-header:not(:first-child) {
    margin-top: 4px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

.settings-label-sub {
    display: block;
    font-size: 0.62rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-top: 2px;
    text-transform: none;
    letter-spacing: 0;
    opacity: 0.8;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 46px;
    height: 26px;
    cursor: pointer;
    flex-shrink: 0;
}

.toggle-switch input {
    position: absolute;
    opacity: 0;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    z-index: 2;
    cursor: pointer;
}

.toggle-slider {
    position: absolute;
    inset: 0;
    background: #d1d5db;
    border-radius: 26px;
    transition: background 0.3s cubic-bezier(.4,0,.2,1);
}

[data-theme="dark"] .toggle-slider {
    background: #374151;
}

.toggle-slider::before {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    left: 3px;
    bottom: 3px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 1px 4px rgba(0,0,0,0.18);
    transition: transform 0.3s cubic-bezier(.4,0,.2,1);
}

.toggle-switch input:checked + .toggle-slider {
    background: var(--primary);
}

.toggle-switch input:checked + .toggle-slider::before {
    transform: translateX(20px);
}

.toggle-switch-sm {
    width: 36px;
    height: 20px;
}
.toggle-switch-sm .toggle-slider { border-radius: 20px; }
.toggle-switch-sm .toggle-slider::before {
    width: 16px;
    height: 16px;
    left: 2px;
    bottom: 2px;
}
.toggle-switch-sm input:checked + .toggle-slider::before {
    transform: translateX(16px);
}

.font-size-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
#modal-tajweed-row {
    margin: 10px 0 0;
    cursor: pointer;
    user-select: none;
}

.settings-group label {
    display: block;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-light);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* Info view (отдельная страница) */
.info-view {
    display: none;
    flex-direction: column;
    min-height: 100vh;
    padding-bottom: calc(var(--player-height) + 20px);
    background: var(--bg);
}

.info-view.visible { display: flex; }

.info-view-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    padding: 10px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.info-view-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text);
    margin: 0;
}

.info-view-body {
    flex: 1;
    overflow-y: auto;
    padding: 24px 20px;
    max-width: 560px;
    margin: 0 auto;
    width: 100%;
}

.read-view.hidden-by-info { display: none !important; }

.info-block {
    margin-bottom: 20px;
}

.info-block:last-child { margin-bottom: 0; }

.info-block h3 {
    font-size: 1.25rem;
    margin: 0 0 8px;
    color: var(--text);
}

.info-block h4 {
    font-size: 1rem;
    margin: 0 0 8px;
    color: var(--text);
}

.info-block p {
    margin: 0 0 8px;
    font-size: 0.9rem;
    color: var(--text-light);
    line-height: 1.5;
}

.info-block p:last-child { margin-bottom: 0; }

.info-block a {
    color: var(--primary);
    text-decoration: none;
}

.info-block a:hover { text-decoration: underline; }

.info-share-wrap { margin-top: 12px; }
.info-share-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0.6rem 1.2rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--primary);
    background: var(--primary);
    color: #fff;
    font-size: 0.95rem;
    font-weight: 600;
    font-family: var(--ui-font);
    cursor: pointer;
    transition: all var(--transition);
}
.info-share-btn:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    color: #fff;
}
.info-share-caption {
    margin: 14px 0 0;
    font-size: 0.85rem;
    color: var(--text-light);
    line-height: 1.5;
}

.settings-group select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--bg);
    color: var(--text);
    font-size: 0.9rem;
    font-family: var(--ui-font);
    outline: none;
    transition: border-color 0.2s ease;
}

.settings-group select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(84,160,255,0.12); }

/* ============ CUSTOM RECITER SELECTOR ============ */
.reciter-selector { position: relative; }
.reciter-selected {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg);
    color: var(--text);
    cursor: pointer;
    font-family: var(--ui-font);
    font-size: 0.85rem;
    transition: border-color var(--transition), box-shadow var(--transition);
}
.reciter-selected:hover { border-color: var(--primary); }
.reciter-selected:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(84,160,255,0.12); outline: none; }
.reciter-selected-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; align-items: flex-start; }
.reciter-selected-name { font-size: 0.85rem; font-weight: 500; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; width: 100%; }
.reciter-selected-name-en { font-size: 0.72rem; color: var(--text-muted); text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; width: 100%; }
.reciter-chevron { font-size: 0.75rem; color: var(--text-muted); transition: transform var(--transition); }
.reciter-selector.open .reciter-chevron { transform: rotate(180deg); }

.reciter-avatar {
    width: 36px;
    height: 36px;
    min-width: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    color: #fff;
    object-fit: cover;
    user-select: none;
}
img.reciter-avatar { display: block; }

.reciter-dropdown {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 4px);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    z-index: 120;
    max-height: 320px;
    overflow-y: auto;
    padding: 6px 0;
}
.reciter-selector.open .reciter-dropdown { display: block; }

.reciter-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    cursor: pointer;
    transition: background var(--transition);
}
.reciter-option:hover { background: var(--primary-light); }
.reciter-option.active { background: var(--primary-light); }

.reciter-option-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
}
.reciter-option-name {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.reciter-option-name-en {
    font-size: 0.72rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.reciter-check {
    font-size: 1rem;
    color: var(--primary);
    opacity: 0;
    flex-shrink: 0;
    transition: opacity var(--transition);
}
.reciter-option.active .reciter-check { opacity: 1; }

/* ── Translation selector (like reciter) ── */
.translation-selector { position: relative; }
.translation-selected {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg);
    color: var(--text);
    cursor: pointer;
    font-family: var(--ui-font);
    font-size: 0.85rem;
    transition: border-color var(--transition), box-shadow var(--transition);
}
.translation-selected:hover { border-color: var(--primary); }
.translation-selected:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(84,160,255,0.12); outline: none; }
.translation-selected-flag {
    font-size: 1.35rem;
    line-height: 1;
    flex-shrink: 0;
}
.translation-selected-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
    align-items: flex-start;
}
.translation-selected-name {
    font-size: 0.85rem;
    font-weight: 500;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
}
.translation-selected-lang {
    font-size: 0.72rem;
    color: var(--text-muted);
    text-align: left;
}
.translation-chevron {
    font-size: 0.75rem;
    color: var(--text-muted);
    transition: transform var(--transition);
}
.translation-selector.open .translation-chevron { transform: rotate(180deg); }

.translation-dropdown {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 4px);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    z-index: 120;
    max-height: 340px;
    overflow-y: auto;
    padding: 0 0 6px;
}
.translation-selector.open .translation-dropdown { display: block; }

.interface-lang-dropdown.translation-dropdown {
    max-height: none;
    padding: 4px 0;
}

/* RTL interface (Arabic UI language) */
body.interface-rtl .settings-panel,
body.interface-rtl .settings-panel-body,
body.interface-rtl .modal-overlay .modal-box,
body.interface-rtl .repeat-range-modal,
body.interface-rtl .voice-search-modal,
body.interface-rtl .list-mode-confirm-modal {
    direction: rtl;
    text-align: right;
}

body.interface-rtl .settings-group label,
body.interface-rtl .settings-group-toggle {
    text-align: right;
}

body.interface-rtl .translation-selected,
body.interface-rtl .reciter-selected,
body.interface-rtl .settings-group-toggle {
    flex-direction: row-reverse;
}

body.interface-rtl .translation-selected-info,
body.interface-rtl .reciter-selected-info {
    align-items: flex-end;
}

body.interface-rtl .translation-option,
body.interface-rtl .reciter-option {
    flex-direction: row-reverse;
}

body.interface-rtl .settings-panel-close {
    margin-left: 0;
    margin-right: auto;
}

.translation-dropdown-search {
    position: sticky;
    top: 0;
    background: var(--bg-card);
    padding: 8px 10px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 1;
}
.translation-dropdown-search i {
    font-size: 0.82rem;
    color: var(--text-muted);
    flex-shrink: 0;
}
.translation-dropdown-search input {
    width: 100%;
    border: none;
    outline: none;
    background: transparent;
    font-size: 0.84rem;
    font-family: var(--ui-font);
    color: var(--text);
}
.translation-dropdown-search input::placeholder {
    color: var(--text-muted);
}

.translation-lang-group { }
.translation-lang-group.hidden { display: none; }
.translation-lang-header {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 10px 14px 4px;
    user-select: none;
}

.translation-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    cursor: pointer;
    transition: background var(--transition);
}
.translation-option:hover { background: var(--primary-light); }
.translation-option.active { background: var(--primary-light); }
.translation-option.hidden { display: none; }

.translation-option-name {
    flex: 1;
    font-size: 0.85rem;
    font-weight: 400;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.translation-option.active .translation-option-name { font-weight: 500; }

.translation-check {
    font-size: 1rem;
    color: var(--primary);
    opacity: 0;
    flex-shrink: 0;
    transition: opacity var(--transition);
}
.translation-option.active .translation-check { opacity: 1; }

.settings-clear-cache-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 13px 16px;
    font-size: 0.88rem;
    font-weight: 600;
    font-family: var(--ui-font);
    color: var(--primary);
    background: var(--primary-light);
    border: 1px solid transparent;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
}
.settings-clear-cache-btn:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}
.settings-clear-cache-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.settings-reset-modal {
    z-index: 1100;
}
.settings-reset-panel {
    max-width: 360px;
}
.settings-reset-warn {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--text);
}
.settings-reset-actions {
    display: flex;
    gap: 8px;
    padding: 0 20px 18px;
}
.settings-reset-cancel,
.settings-reset-confirm {
    flex: 1;
    min-height: 42px;
    border-radius: 12px;
    font-family: var(--ui-font);
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.settings-reset-cancel {
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--text);
}
.settings-reset-cancel:hover {
    background: var(--primary-light);
    border-color: var(--primary);
    color: var(--primary);
}
.settings-reset-confirm {
    border: 1px solid transparent;
    background: var(--primary);
    color: #fff;
}
.settings-reset-confirm:hover {
    background: var(--primary-dark);
}
.settings-reset-confirm:disabled,
.settings-reset-cancel:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.font-size-control {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0 4px;
    width: 100%;
}

.font-size-control span:first-of-type {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 600;
    width: 16px;
    flex-shrink: 0;
    text-align: center;
}
.font-size-control input[type="range"] {
    flex: 1 1 auto;
    min-width: 0;
    width: 100%;
    height: 28px;
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
    outline: none;
    cursor: pointer;
    touch-action: pan-y;
}
.font-size-control input[type="range"]::-webkit-slider-runnable-track {
    height: 6px;
    border-radius: 999px;
    background: linear-gradient(to right, var(--primary) 0 var(--range-progress, 0%), var(--border) var(--range-progress, 0%) 100%);
    transition: background 0.12s ease;
}
.font-size-control input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 22px;
    height: 22px;
    margin-top: -8px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    border: 3px solid var(--bg-card);
    box-shadow: 0 2px 8px rgba(84,160,255,0.35);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.font-size-control input[type="range"]:active::-webkit-slider-thumb {
    transform: scale(1.18);
    box-shadow: 0 3px 12px rgba(84,160,255,0.5);
}
.font-size-control input[type="range"]::-moz-range-track {
    height: 6px;
    border-radius: 999px;
    background: var(--border);
}
.font-size-control input[type="range"]::-moz-range-progress {
    height: 6px;
    border-radius: 999px;
    background: var(--primary);
}
.font-size-control input[type="range"]::-moz-range-thumb {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    border: 3px solid var(--bg-card);
    box-shadow: 0 2px 8px rgba(84,160,255,0.35);
    transition: transform 0.18s ease;
}

.font-size-control span:last-of-type {
    font-size: 0.72rem;
    color: var(--primary);
    min-width: 52px;
    text-align: right;
    font-weight: 600;
    background: var(--primary-light);
    padding: 2px 8px;
    border-radius: 6px;
}

/* ============ SURAH VIEW ============ */

.surah-view { padding: 0; }

/* Баннер суры — визуально единый блок с read-header (тот же градиент и звёзды) */
.surah-banner {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
    padding: 36px 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* Звёздный космос: мелкие звёзды поверх фона, цвет фона сохранён */
.surah-banner::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160' viewBox='0 0 160 160'%3E%3Cg fill='%23fff' fill-opacity='0.55'%3E%3Ccircle cx='12' cy='8' r='1'/%3E%3Ccircle cx='45' cy='23' r='0.6'/%3E%3Ccircle cx='78' cy='5' r='1.2'/%3E%3Ccircle cx='95' cy='40' r='0.7'/%3E%3Ccircle cx='5' cy='55' r='0.6'/%3E%3Ccircle cx='33' cy='72' r='1'/%3E%3Ccircle cx='62' cy='88' r='0.6'/%3E%3Ccircle cx='88' cy='65' r='0.7'/%3E%3Ccircle cx='18' cy='95' r='0.6'/%3E%3Ccircle cx='125' cy='18' r='0.6'/%3E%3Ccircle cx='52' cy='42' r='0.5'/%3E%3Ccircle cx='72' cy='58' r='0.8'/%3E%3Ccircle cx='112' cy='82' r='0.6'/%3E%3Ccircle cx='138' cy='45' r='0.5'/%3E%3Ccircle cx='28' cy='128' r='0.7'/%3E%3Ccircle cx='145' cy='115' r='0.5'/%3E%3Ccircle cx='25' cy='15' r='0.6'/%3E%3Ccircle cx='100' cy='30' r='0.5'/%3E%3Ccircle cx='15' cy='80' r='0.7'/%3E%3Ccircle cx='90' cy='90' r='0.5'/%3E%3Ccircle cx='120' cy='55' r='0.6'/%3E%3Ccircle cx='35' cy='42' r='0.5'/%3E%3Ccircle cx='75' cy='75' r='0.7'/%3E%3Ccircle cx='110' cy='12' r='0.5'/%3E%3Ccircle cx='8' cy='120' r='0.6'/%3E%3Ccircle cx='55' cy='130' r='0.5'/%3E%3Ccircle cx='115' cy='38' r='0.6'/%3E%3Ccircle cx='48' cy='8' r='0.5'/%3E%3Ccircle cx='155' cy='60' r='0.6'/%3E%3Ccircle cx='68' cy='42' r='0.5'/%3E%3C/g%3E%3C/svg%3E"),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100' viewBox='0 0 100 100'%3E%3Cg fill='%23fff' fill-opacity='0.35'%3E%3Ccircle cx='20' cy='10' r='0.5'/%3E%3Ccircle cx='55' cy='25' r='0.4'/%3E%3Ccircle cx='8' cy='48' r='0.55'/%3E%3Ccircle cx='42' cy='62' r='0.5'/%3E%3Ccircle cx='68' cy='8' r='0.4'/%3E%3Ccircle cx='15' cy='70' r='0.5'/%3E%3Ccircle cx='72' cy='55' r='0.4'/%3E%3Ccircle cx='85' cy='78' r='0.45'/%3E%3Ccircle cx='32' cy='92' r='0.4'/%3E%3Ccircle cx='5' cy='30' r='0.5'/%3E%3Ccircle cx='40' cy='5' r='0.4'/%3E%3Ccircle cx='90' cy='45' r='0.5'/%3E%3Ccircle cx='25' cy='75' r='0.4'/%3E%3Ccircle cx='60' cy='90' r='0.5'/%3E%3Ccircle cx='78' cy='25' r='0.4'/%3E%3Ccircle cx='50' cy='50' r='0.5'/%3E%3Ccircle cx='95' cy='65' r='0.4'/%3E%3Ccircle cx='18' cy='85' r='0.5'/%3E%3C/g%3E%3C/svg%3E"),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Cg fill='%23fff' fill-opacity='0.25'%3E%3Ccircle cx='10' cy='5' r='0.5'/%3E%3Ccircle cx='35' cy='20' r='0.4'/%3E%3Ccircle cx='60' cy='8' r='0.6'/%3E%3Ccircle cx='85' cy='35' r='0.4'/%3E%3Ccircle cx='5' cy='45' r='0.5'/%3E%3Ccircle cx='28' cy='60' r='0.4'/%3E%3Ccircle cx='55' cy='75' r='0.5'/%3E%3Ccircle cx='75' cy='50' r='0.4'/%3E%3Ccircle cx='15' cy='85' r='0.5'/%3E%3Ccircle cx='95' cy='15' r='0.4'/%3E%3Ccircle cx='42' cy='32' r='0.3'/%3E%3Ccircle cx='68' cy='55' r='0.5'/%3E%3Ccircle cx='92' cy='72' r='0.4'/%3E%3Ccircle cx='18' cy='95' r='0.4'/%3E%3Ccircle cx='50' cy='5' r='0.3'/%3E%3Ccircle cx='105' cy='45' r='0.5'/%3E%3Ccircle cx='8' cy='68' r='0.4'/%3E%3Ccircle cx='115' cy='90' r='0.3'/%3E%3C/g%3E%3C/svg%3E");
    background-size: 160px 160px, 100px 100px, 120px 120px;
    background-position: 0 0, 50px 35px, 80px 20px;
    animation: stars-drift 100s ease-in-out infinite;
    pointer-events: none;
}

.surah-banner-content { position: relative; z-index: 1; }

.surah-banner .surah-name-ar {
    font-family: var(--arabic-font);
    font-size: 2.8rem;
    font-weight: 700;
    margin-bottom: 6px;
    direction: rtl;
}

.surah-banner .surah-name-en { font-size: 1rem; font-weight: 500; opacity: 0.9; margin-bottom: 4px; }
.surah-banner .surah-meaning { font-size: 0.85rem; opacity: 0.7; margin-bottom: 14px; }

.surah-banner .surah-meta-pills {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.surah-banner-listen {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
    padding: 10px 20px;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--primary-dark);
    background: #fff;
    border: none;
    border-radius: 24px;
    cursor: pointer;
    font-family: var(--ui-font);
    transition: background 0.2s, transform 0.2s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.surah-banner-listen:hover {
    background: rgba(255,255,255,0.95);
    transform: scale(1.02);
}
.surah-banner-listen:active {
    transform: scale(0.98);
}
.surah-banner-listen i {
    font-size: 1.1rem;
}

.meta-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    background: rgba(255,255,255,0.18);
    border-radius: 16px;
    font-size: 0.78rem;
}
button.meta-pill {
    border: none;
    color: inherit;
    cursor: pointer;
    font-family: inherit;
    transition: background var(--transition);
}
button.meta-pill:hover {
    background: rgba(255,255,255,0.35);
}
.meta-pill-play i { font-size: 0.85em; }

.bismillah {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 120px;
    padding: 32px 20px;
    font-family: var(--arabic-font);
    font-size: 1.8rem;
    color: #fff;
    direction: rtl;
    cursor: pointer;
    background: linear-gradient(135deg, #2ede95 0%, #22b877 100%);
    margin: 0;
    position: relative;
    overflow: hidden;
}
/* Звёздный эффект поверх зелёного фона (как в баннере суры) */
.bismillah::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160' viewBox='0 0 160 160'%3E%3Cg fill='%23fff' fill-opacity='0.55'%3E%3Ccircle cx='12' cy='8' r='1'/%3E%3Ccircle cx='45' cy='23' r='0.6'/%3E%3Ccircle cx='78' cy='5' r='1.2'/%3E%3Ccircle cx='95' cy='40' r='0.7'/%3E%3Ccircle cx='5' cy='55' r='0.6'/%3E%3Ccircle cx='33' cy='72' r='1'/%3E%3Ccircle cx='62' cy='88' r='0.6'/%3E%3Ccircle cx='88' cy='65' r='0.7'/%3E%3Ccircle cx='18' cy='95' r='0.6'/%3E%3Ccircle cx='125' cy='18' r='0.6'/%3E%3Ccircle cx='52' cy='42' r='0.5'/%3E%3Ccircle cx='72' cy='58' r='0.8'/%3E%3Ccircle cx='112' cy='82' r='0.6'/%3E%3Ccircle cx='138' cy='45' r='0.5'/%3E%3Ccircle cx='28' cy='128' r='0.7'/%3E%3Ccircle cx='145' cy='115' r='0.5'/%3E%3Ccircle cx='25' cy='15' r='0.6'/%3E%3Ccircle cx='100' cy='30' r='0.5'/%3E%3Ccircle cx='15' cy='80' r='0.7'/%3E%3Ccircle cx='90' cy='90' r='0.5'/%3E%3Ccircle cx='120' cy='55' r='0.6'/%3E%3Ccircle cx='35' cy='42' r='0.5'/%3E%3Ccircle cx='75' cy='75' r='0.7'/%3E%3Ccircle cx='110' cy='12' r='0.5'/%3E%3Ccircle cx='8' cy='120' r='0.6'/%3E%3Ccircle cx='55' cy='130' r='0.5'/%3E%3Ccircle cx='115' cy='38' r='0.6'/%3E%3Ccircle cx='48' cy='8' r='0.5'/%3E%3Ccircle cx='155' cy='60' r='0.6'/%3E%3Ccircle cx='68' cy='42' r='0.5'/%3E%3C/g%3E%3C/svg%3E"),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100' viewBox='0 0 100 100'%3E%3Cg fill='%23fff' fill-opacity='0.35'%3E%3Ccircle cx='20' cy='10' r='0.5'/%3E%3Ccircle cx='55' cy='25' r='0.4'/%3E%3Ccircle cx='8' cy='48' r='0.55'/%3E%3Ccircle cx='42' cy='62' r='0.5'/%3E%3Ccircle cx='68' cy='8' r='0.4'/%3E%3Ccircle cx='15' cy='70' r='0.5'/%3E%3Ccircle cx='72' cy='55' r='0.4'/%3E%3Ccircle cx='85' cy='78' r='0.45'/%3E%3Ccircle cx='32' cy='92' r='0.4'/%3E%3Ccircle cx='5' cy='30' r='0.5'/%3E%3Ccircle cx='40' cy='5' r='0.4'/%3E%3Ccircle cx='90' cy='45' r='0.5'/%3E%3Ccircle cx='25' cy='75' r='0.4'/%3E%3Ccircle cx='60' cy='90' r='0.5'/%3E%3Ccircle cx='78' cy='25' r='0.4'/%3E%3Ccircle cx='50' cy='50' r='0.5'/%3E%3Ccircle cx='95' cy='65' r='0.4'/%3E%3Ccircle cx='18' cy='85' r='0.5'/%3E%3C/g%3E%3C/svg%3E"),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Cg fill='%23fff' fill-opacity='0.25'%3E%3Ccircle cx='10' cy='5' r='0.5'/%3E%3Ccircle cx='35' cy='20' r='0.4'/%3E%3Ccircle cx='60' cy='8' r='0.6'/%3E%3Ccircle cx='85' cy='35' r='0.4'/%3E%3Ccircle cx='5' cy='45' r='0.5'/%3E%3Ccircle cx='28' cy='60' r='0.4'/%3E%3Ccircle cx='55' cy='75' r='0.5'/%3E%3Ccircle cx='75' cy='50' r='0.4'/%3E%3Ccircle cx='15' cy='85' r='0.5'/%3E%3Ccircle cx='95' cy='15' r='0.4'/%3E%3Ccircle cx='42' cy='32' r='0.3'/%3E%3Ccircle cx='68' cy='55' r='0.5'/%3E%3Ccircle cx='92' cy='72' r='0.4'/%3E%3Ccircle cx='18' cy='95' r='0.4'/%3E%3Ccircle cx='50' cy='5' r='0.3'/%3E%3Ccircle cx='105' cy='45' r='0.5'/%3E%3Ccircle cx='8' cy='68' r='0.4'/%3E%3Ccircle cx='115' cy='90' r='0.3'/%3E%3C/g%3E%3C/svg%3E");
    background-size: 160px 160px, 100px 100px, 120px 120px;
    background-position: 0 0, 50px 35px, 80px 20px;
    animation: stars-drift 100s ease-in-out infinite;
    pointer-events: none;
}

.ayah-list {
    padding: 8px 20px 40px;
    max-width: 860px;
    margin: 0 auto;
}

.ayah-card {
    margin: 0 -20px;
    padding: 20px;
    border-radius: 0;
    border-bottom: 1px solid var(--border);
    transition: background var(--transition);
    position: relative;
}

.ayah-card:last-child { border-bottom: none; }
.surah-end-nav {
    margin: 18px 0 6px;
    display: flex;
    gap: 10px;
    justify-content: space-between;
}
.surah-end-nav-btn {
    flex: 1;
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--bg-card);
    color: var(--text);
    cursor: pointer;
    font-family: var(--ui-font);
    font-weight: 600;
    transition: all var(--transition);
}
.surah-end-nav-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-light);
}
.surah-end-nav-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    background: var(--bg-muted);
    color: var(--text-muted);
}

.ayah-card:hover {
    background: var(--primary-light);
}

.ayah-card.playing {
    background: var(--accent-light);
    border-left: 3px solid var(--primary);
}

.mushaf-word.mushaf-playing {
    color: var(--primary-dark, var(--primary));
    background: var(--primary-light);
    border-radius: 4px;
    transition: background 0.3s, color 0.3s;
}
.mushaf-ayah-end.mushaf-playing {
    color: var(--primary);
    transition: background 0.3s, color 0.3s, box-shadow 0.3s;
}
.mushaf-ayah-end.mushaf-playing::before {
    background: var(--primary-light) !important;
    border-color: var(--primary) !important;
}
.mushaf-ayah-end.mushaf-playing::after {
    display: none !important;
}

.mushaf-word.mushaf-bookmarked {
    background: rgba(76, 175, 80, 0.15);
    border-radius: 4px;
    transition: background 0.3s;
}
.mushaf-ayah-end.mushaf-bookmarked {
    color: #4caf50;
    transition: background 0.3s, border-color 0.3s, color 0.3s;
}
.mushaf-ayah-end.mushaf-bookmarked::before {
    background: rgba(76, 175, 80, 0.12) !important;
    border-color: rgba(76, 175, 80, 0.5) !important;
}
.mushaf-ayah-end.mushaf-bookmarked::after {
    display: none !important;
}
[data-theme="dark"] .mushaf-word.mushaf-bookmarked {
    background: rgba(76, 175, 80, 0.12);
}
[data-theme="dark"] .mushaf-ayah-end.mushaf-bookmarked::before {
    background: rgba(76, 175, 80, 0.1) !important;
    border-color: rgba(76, 175, 80, 0.4) !important;
}


.ayah-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

/* Номер аята в списке / превью настроек — как .surah-number (ромб) */
.ayah-badge {
    font-family: var(--ui-font);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    margin: 4px;
    background: transparent;
    color: #000;
    font-size: 14px;
    font-weight: 700;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
    text-align: center;
}

.ayah-badge::before,
.ayah-badge::after {
    content: '';
    position: absolute;
    inset: 0;
    border: 1.6px solid var(--primary);
    border-radius: 10px;
    background: transparent;
    z-index: -1;
    transition: all 0.3s;
}

.ayah-badge::before {
    transform: rotate(45deg) scale(1.04);
}

.ayah-badge::after {
    display: none;
}

[data-theme="dark"] .ayah-badge {
    color: #fff;
}
.surah-view.read-view-bg-dark-comfort .ayah-badge,
.surah-view.read-view-bg-dark-contrast .ayah-badge,
.surah-view.read-view-bg-midnight-blue .ayah-badge,
.surah-view.read-view-bg-warm-charcoal .ayah-badge,
.surah-view.read-view-bg-deep-teal .ayah-badge {
    color: #fff;
}

.ayah-card:hover .ayah-badge::before {
    background: var(--primary);
    border-color: var(--primary);
}
.ayah-card:hover .ayah-badge {
    color: #fff;
}

.ayah-card.playing .ayah-badge {
    color: #fff;
}
.ayah-card.playing .ayah-badge::before {
    background: var(--primary);
    border-color: var(--primary);
}

.ayah-actions { display: flex; gap: 5px; opacity: 0; transition: opacity var(--transition); }
.ayah-card:hover .ayah-actions,
.ayah-card.playing .ayah-actions { opacity: 1; }

.ayah-action-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: var(--bg-card);
    color: var(--text-light);
    cursor: pointer;
    transition: all var(--transition);
    font-size: 0.82rem;
}

.ayah-action-btn:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
.ayah-action-btn.bookmarked { background: var(--primary); color: #fff; border-color: var(--primary); }

/* Снимок карточки для скачивания как PNG */
.ayah-download-wrap {
    box-sizing: border-box;
    border-radius: 12px;
    overflow: hidden;
}
.ayah-download-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 20px;
    letter-spacing: 0.02em;
}
.ayah-download-wrap .ayah-arabic {
    margin-bottom: 18px;
    line-height: 2.2;
    text-align: right;
    direction: rtl;
}
.ayah-download-wrap .ayah-translation {
    line-height: 1.8;
}

/* Модальное окно скачивания аятов */
.ayah-download-modal {
    position: fixed;
    inset: 0;
    z-index: 2200;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}
.ayah-download-modal.show {
    opacity: 1;
    pointer-events: auto;
}
.ayah-download-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
}
.ayah-download-panel {
    position: relative;
    z-index: 1;
    width: 360px;
    max-width: calc(100vw - 24px);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: 0 12px 34px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    transform: translateY(14px);
    transition: transform 0.2s ease;
}
.ayah-download-modal.show .ayah-download-panel {
    transform: translateY(0);
}
.ayah-download-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border-bottom: 1px solid var(--border);
}
.ayah-download-header-title {
    display: flex;
    flex-direction: column;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text);
}
.ayah-download-subtitle {
    margin-top: 3px;
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--text-muted);
}
.ayah-download-close {
    width: 34px;
    height: 34px;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}
.ayah-download-close:hover {
    background: var(--primary-light);
    color: var(--primary);
}
.ayah-download-body {
    padding: 14px;
}
.ayah-download-presets {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}
.ayah-download-preset-btn {
    flex: 1;
    min-height: 34px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--bg);
    color: var(--text);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
}
.ayah-download-preset-btn:hover {
    border-color: var(--primary);
    background: var(--primary-light);
    color: var(--primary);
}
/* Диапазон аятов — те же колонки/колёса, что в repeat-range-modal */
.ayah-download-modal .ayah-download-range-pickers.repeat-range-body {
    padding: 0;
    margin-bottom: 14px;
}
.ayah-download-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
}
.ayah-download-action-btn {
    min-height: 38px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--bg);
    color: var(--text);
    font-size: 0.86rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
}
.ayah-download-action-btn:hover {
    border-color: var(--primary);
    background: var(--primary-light);
    color: var(--primary);
}

/* ============ READ HEADER: кнопка дизайна фона ============ */
.read-design-btn {
    width: 36px;
    height: 36px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.read-design-btn:hover {
    background: rgba(255,255,255,0.35);
}
.read-design-swatch {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: block;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
/* Модальное окно выбора дизайна фона */
.read-design-modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
}
.read-design-modal.show {
    opacity: 1;
    pointer-events: auto;
}
.read-design-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}
.read-design-panel {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
    box-shadow: 0 16px 48px rgba(0,0,0,0.25);
    padding: 0;
    overflow: hidden;
    transform: scale(0.98);
    transition: transform 0.2s ease;
}
.read-design-modal.show .read-design-panel {
    transform: scale(1);
}
.read-design-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border);
    font-weight: 600;
    font-size: 1rem;
    color: var(--text);
}
.read-design-close {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: var(--text-light);
    cursor: pointer;
}
.read-design-close:hover {
    background: var(--primary-light);
    color: var(--primary);
}
.read-design-grid {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    align-content: flex-start;
    justify-content: center;
    gap: 12px;
    padding: 20px;
    overflow-y: auto;
    overflow-x: hidden;
}
.read-design-grid::-webkit-scrollbar {
    width: 8px;
}
.read-design-grid::-webkit-scrollbar-track {
    background: var(--bg);
    border-radius: 4px;
}
.read-design-grid::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 4px;
}
.read-design-grid::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}
.read-design-bg-circle {
    width: 66px;
    height: 66px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s, box-shadow 0.2s;
}
.read-design-bg-circle span {
    width: 66px;
    height: 66px;
    border-radius: 50%;
    display: block;
    box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}
.read-design-bg-circle:hover {
    transform: scale(1.08);
}
.read-design-bg-circle:hover span {
    box-shadow: 0 2px 8px rgba(0,0,0,0.25);
}
.read-design-bg-circle.active span {
    box-shadow: 0 0 0 3px var(--primary);
}
/* Фоны чтения: цвет на карточке аята; полотно суры — фон приложения */
.surah-view.read-view-bg-soft-light { background: var(--bg); }
.surah-view.read-view-bg-soft-light .ayah-card { background: #f5f5f0; }
.surah-view.read-view-bg-classic-paper { background: var(--bg); }
.surah-view.read-view-bg-classic-paper .ayah-card { background: #f2ecdd; }
.surah-view.read-view-bg-warm-sepia { background: var(--bg); }
.surah-view.read-view-bg-warm-sepia .ayah-card { background: #efe3cf; }
.surah-view.read-view-bg-clean-white { background: var(--bg); }
.surah-view.read-view-bg-clean-white .ayah-card { background: #ffffff; }
.surah-view.read-view-bg-calm-gray { background: var(--bg); }
.surah-view.read-view-bg-calm-gray .ayah-card { background: #f3f4f6; }
.surah-view.read-view-bg-elegant-cream { background: var(--bg); }
.surah-view.read-view-bg-elegant-cream .ayah-card { background: #f8f1e7; }
.surah-view.read-view-bg-soft-mint { background: var(--bg); }
.surah-view.read-view-bg-soft-mint .ayah-card { background: #ecf7f3; }
.surah-view.read-view-bg-soft-blue { background: var(--bg); }
.surah-view.read-view-bg-soft-blue .ayah-card { background: #e7f0fb; }
.surah-view.read-view-bg-soft-lavender { background: var(--bg); }
.surah-view.read-view-bg-soft-lavender .ayah-card { background: #f3edf7; }
.surah-view.read-view-bg-pale-blush { background: var(--bg); }
.surah-view.read-view-bg-pale-blush .ayah-card { background: #fce7f0; }
.surah-view.read-view-bg-soft-apricot { background: var(--bg); }
.surah-view.read-view-bg-soft-apricot .ayah-card { background: #ffeedd; }
.surah-view.read-view-bg-honey-warm { background: var(--bg); }
.surah-view.read-view-bg-honey-warm .ayah-card { background: #faf3e0; }
.surah-view.read-view-bg-pale-lime { background: var(--bg); }
.surah-view.read-view-bg-pale-lime .ayah-card { background: #f0f9e8; }
.surah-view.read-view-bg-aqua-mist { background: var(--bg); }
.surah-view.read-view-bg-aqua-mist .ayah-card { background: #e5faf5; }
.surah-view.read-view-bg-periwinkle { background: var(--bg); }
.surah-view.read-view-bg-periwinkle .ayah-card { background: #e8eaf6; }
.surah-view.read-view-bg-dusty-blue { background: var(--bg); }
.surah-view.read-view-bg-dusty-blue .ayah-card { background: #e0e9f2; }
.surah-view.read-view-bg-shell-pink { background: var(--bg); }
.surah-view.read-view-bg-shell-pink .ayah-card { background: #fdf2f8; }
.surah-view.read-view-bg-oat-warm { background: var(--bg); }
.surah-view.read-view-bg-oat-warm .ayah-card { background: #ebe6dc; }
.surah-view.read-view-bg-ice-cyan { background: var(--bg); }
.surah-view.read-view-bg-ice-cyan .ayah-card { background: #dff6fc; }
.surah-view.read-view-bg-lilac-wash { background: var(--bg); }
.surah-view.read-view-bg-lilac-wash .ayah-card { background: #f0eaf6; }
.surah-view.read-view-bg-sage-mist { background: var(--bg); }
.surah-view.read-view-bg-sage-mist .ayah-card { background: #e6efe3; }
.surah-view.read-view-bg-sand-dune { background: var(--bg); }
.surah-view.read-view-bg-sand-dune .ayah-card { background: #efe8dc; }
.surah-view.read-view-bg-pale-gold { background: var(--bg); }
.surah-view.read-view-bg-pale-gold .ayah-card { background: #fbf6e8; }
.surah-view.read-view-bg-rose-dust { background: var(--bg); }
.surah-view.read-view-bg-rose-dust .ayah-card { background: #f8e8ec; }
.surah-view.read-view-bg-sky-pastel { background: var(--bg); }
.surah-view.read-view-bg-sky-pastel .ayah-card { background: #e3f2fd; }
.surah-view.read-view-bg-dark-comfort { background: var(--bg); }
.surah-view.read-view-bg-dark-comfort .ayah-card { background: #111827; }
.surah-view.read-view-bg-dark-contrast { background: var(--bg); }
.surah-view.read-view-bg-dark-contrast .ayah-card { background: #0b1120; }
.surah-view.read-view-bg-midnight-blue { background: var(--bg); }
.surah-view.read-view-bg-midnight-blue .ayah-card { background: #1e293b; }
.surah-view.read-view-bg-warm-charcoal { background: var(--bg); }
.surah-view.read-view-bg-warm-charcoal .ayah-card { background: #292524; }
.surah-view.read-view-bg-deep-teal { background: var(--bg); }
.surah-view.read-view-bg-deep-teal .ayah-card { background: #115e59; }
/* Рамка карточек на тёмных темах */
.surah-view.read-view-bg-dark-comfort .ayah-card,
.surah-view.read-view-bg-dark-contrast .ayah-card,
.surah-view.read-view-bg-midnight-blue .ayah-card,
.surah-view.read-view-bg-warm-charcoal .ayah-card,
.surah-view.read-view-bg-deep-teal .ayah-card {
    border-color: rgba(148,163,184,0.35);
}
/* Hover / воспроизведение: смешивание с выбранным фоном карточки (--read-ayah-card-bg задаётся в JS) */
#surah-view-content.surah-view .ayah-card:hover:not(.playing):not(.ayah-download-card) {
    background: color-mix(in srgb, var(--primary) 16%, var(--read-ayah-card-bg, var(--bg-card)));
}
#surah-view-content.surah-view .ayah-card.playing {
    background: color-mix(in srgb, var(--primary) 26%, var(--read-ayah-card-bg, var(--bg-card)));
    border-left: 3px solid var(--primary);
}
@supports not (background: color-mix(in srgb, red 10%, blue)) {
    #surah-view-content.surah-view .ayah-card:hover:not(.playing):not(.ayah-download-card) {
        background: var(--primary-light);
    }
    #surah-view-content.surah-view .ayah-card.playing {
        background: var(--accent-light);
    }
}
.ayah-highlight-off #surah-view-content.surah-view .ayah-card.playing {
    background: var(--read-ayah-card-bg, var(--bg-card)) !important;
    border-left: none !important;
}
.ayah-highlight-off #surah-view-content.surah-view .ayah-card:hover:not(.ayah-download-card),
.ayah-highlight-off #surah-view-content.surah-view .ayah-card:active:not(.ayah-download-card) {
    background: var(--read-ayah-card-bg, var(--bg-card)) !important;
}
.ayah-highlight-off #surah-view-content.surah-view .ayah-card.playing .ayah-badge {
    color: inherit !important;
}
.ayah-highlight-off #surah-view-content.surah-view .ayah-card:hover .ayah-badge,
.ayah-highlight-off #surah-view-content.surah-view .ayah-card:active .ayah-badge {
    color: inherit !important;
}
.ayah-highlight-off #surah-view-content.surah-view .ayah-card:hover .ayah-badge::before,
.ayah-highlight-off #surah-view-content.surah-view .ayah-card:active .ayah-badge::before {
    background: transparent !important;
    border-color: var(--primary) !important;
}
.ayah-highlight-off #surah-view-content.surah-view .ayah-card.playing .ayah-badge::before {
    background: transparent !important;
    border-color: var(--primary) !important;
}
.ayah-highlight-off #surah-view-content.surah-view .ayah-card.playing .ayah-actions {
    opacity: 0 !important;
}
.ayah-download-card {
    margin: 0;
    border-bottom: none;
}
.surah-view.read-view-bg-dark-comfort .ayah-arabic,
.surah-view.read-view-bg-dark-contrast .ayah-arabic,
.surah-view.read-view-bg-midnight-blue .ayah-arabic,
.surah-view.read-view-bg-warm-charcoal .ayah-arabic,
.surah-view.read-view-bg-deep-teal .ayah-arabic {
    color: var(--ayah-arabic-color, #f9fafb);
}
.surah-view.read-view-bg-dark-comfort .ayah-translation,
.surah-view.read-view-bg-dark-contrast .ayah-translation,
.surah-view.read-view-bg-midnight-blue .ayah-translation,
.surah-view.read-view-bg-warm-charcoal .ayah-translation,
.surah-view.read-view-bg-deep-teal .ayah-translation {
    color: var(--ayah-translation-color, #e5e7eb);
}
.surah-view.read-view-bg-dark-comfort .ayah-download-title,
.surah-view.read-view-bg-dark-contrast .ayah-download-title,
.surah-view.read-view-bg-midnight-blue .ayah-download-title,
.surah-view.read-view-bg-warm-charcoal .ayah-download-title,
.surah-view.read-view-bg-deep-teal .ayah-download-title {
    color: rgba(249, 250, 251, 0.88);
}
/* Карточки и текст на градиентах */
.surah-view.read-view-bg-gradient .ayah-card,
.surah-view.read-view-bg-sunset .ayah-card,
.surah-view.read-view-bg-ocean .ayah-card,
.surah-view.read-view-bg-purple .ayah-card,
.surah-view.read-view-bg-gold .ayah-card,
.surah-view.read-view-bg-rose .ayah-card,
.surah-view.read-view-bg-night .ayah-card,
.surah-view.read-view-bg-aurora .ayah-card,
.surah-view.read-view-bg-peach .ayah-card,
.surah-view.read-view-bg-twilight .ayah-card {
    background: rgba(255,255,255,0.12);
    border-color: rgba(255,255,255,0.2);
}
.surah-view.read-view-bg-gradient .ayah-arabic,
.surah-view.read-view-bg-sunset .ayah-arabic,
.surah-view.read-view-bg-ocean .ayah-arabic,
.surah-view.read-view-bg-purple .ayah-arabic,
.surah-view.read-view-bg-gold .ayah-arabic,
.surah-view.read-view-bg-rose .ayah-arabic,
.surah-view.read-view-bg-night .ayah-arabic,
.surah-view.read-view-bg-aurora .ayah-arabic,
.surah-view.read-view-bg-peach .ayah-arabic,
.surah-view.read-view-bg-twilight .ayah-arabic { color: var(--ayah-arabic-color, rgba(255,255,255,0.95)); }
.surah-view.read-view-bg-gradient .ayah-translation,
.surah-view.read-view-bg-sunset .ayah-translation,
.surah-view.read-view-bg-ocean .ayah-translation,
.surah-view.read-view-bg-purple .ayah-translation,
.surah-view.read-view-bg-gold .ayah-translation,
.surah-view.read-view-bg-rose .ayah-translation,
.surah-view.read-view-bg-night .ayah-translation,
.surah-view.read-view-bg-aurora .ayah-translation,
.surah-view.read-view-bg-peach .ayah-translation,
.surah-view.read-view-bg-twilight .ayah-translation { color: var(--ayah-translation-color, rgba(255,255,255,0.9)); border-left-color: rgba(255,255,255,0.5); }
.surah-view.read-view-bg-gradient .ayah-badge,
.surah-view.read-view-bg-sunset .ayah-badge,
.surah-view.read-view-bg-ocean .ayah-badge,
.surah-view.read-view-bg-purple .ayah-badge,
.surah-view.read-view-bg-gold .ayah-badge,
.surah-view.read-view-bg-rose .ayah-badge,
.surah-view.read-view-bg-night .ayah-badge,
.surah-view.read-view-bg-aurora .ayah-badge,
.surah-view.read-view-bg-peach .ayah-badge,
.surah-view.read-view-bg-twilight .ayah-badge { background: transparent; color: #fff; }

.surah-view.read-view-bg-gradient .ayah-badge::before,
.surah-view.read-view-bg-sunset .ayah-badge::before,
.surah-view.read-view-bg-ocean .ayah-badge::before,
.surah-view.read-view-bg-purple .ayah-badge::before,
.surah-view.read-view-bg-gold .ayah-badge::before,
.surah-view.read-view-bg-rose .ayah-badge::before,
.surah-view.read-view-bg-night .ayah-badge::before,
.surah-view.read-view-bg-aurora .ayah-badge::before,
.surah-view.read-view-bg-peach .ayah-badge::before,
.surah-view.read-view-bg-twilight .ayah-badge::before {
    border-color: rgba(255,255,255,0.7);
    background: rgba(255,255,255,0.2);
}
.surah-view.read-view-bg-gradient .ayah-card:hover .ayah-badge::before,
.surah-view.read-view-bg-sunset .ayah-card:hover .ayah-badge::before,
.surah-view.read-view-bg-ocean .ayah-card:hover .ayah-badge::before,
.surah-view.read-view-bg-purple .ayah-card:hover .ayah-badge::before,
.surah-view.read-view-bg-gold .ayah-card:hover .ayah-badge::before,
.surah-view.read-view-bg-rose .ayah-card:hover .ayah-badge::before,
.surah-view.read-view-bg-night .ayah-card:hover .ayah-badge::before,
.surah-view.read-view-bg-aurora .ayah-card:hover .ayah-badge::before,
.surah-view.read-view-bg-peach .ayah-card:hover .ayah-badge::before,
.surah-view.read-view-bg-twilight .ayah-card:hover .ayah-badge::before,
.surah-view.read-view-bg-gradient .ayah-card.playing .ayah-badge::before,
.surah-view.read-view-bg-sunset .ayah-card.playing .ayah-badge::before,
.surah-view.read-view-bg-ocean .ayah-card.playing .ayah-badge::before,
.surah-view.read-view-bg-purple .ayah-card.playing .ayah-badge::before,
.surah-view.read-view-bg-gold .ayah-card.playing .ayah-badge::before,
.surah-view.read-view-bg-rose .ayah-card.playing .ayah-badge::before,
.surah-view.read-view-bg-night .ayah-card.playing .ayah-badge::before,
.surah-view.read-view-bg-aurora .ayah-card.playing .ayah-badge::before,
.surah-view.read-view-bg-peach .ayah-card.playing .ayah-badge::before,
.surah-view.read-view-bg-twilight .ayah-card.playing .ayah-badge::before {
    background: var(--primary);
    border-color: var(--primary);
}
.surah-view.read-view-bg-gradient .ayah-download-title,
.surah-view.read-view-bg-sunset .ayah-download-title,
.surah-view.read-view-bg-ocean .ayah-download-title,
.surah-view.read-view-bg-purple .ayah-download-title,
.surah-view.read-view-bg-gold .ayah-download-title,
.surah-view.read-view-bg-rose .ayah-download-title,
.surah-view.read-view-bg-night .ayah-download-title,
.surah-view.read-view-bg-aurora .ayah-download-title,
.surah-view.read-view-bg-peach .ayah-download-title,
.surah-view.read-view-bg-twilight .ayah-download-title { color: rgba(255,255,255,0.95); }

.ayah-arabic {
    font-family: var(--arabic-font);
    font-size: var(--arabic-size, 28px);
    line-height: 2.2;
    text-align: right;
    direction: rtl;
    color: var(--ayah-arabic-color, var(--text));
    margin-bottom: 12px;
    word-spacing: 3px;
}

/* Tajweed color rules (alquran.cloud quran-tajweed) */
.ayah-arabic tajweed {
    font-style: inherit;
    font-weight: inherit;
}
.ayah-arabic tajweed.ham_wasl,
.ayah-arabic tajweed.slnt,
.ayah-arabic tajweed.laam_shamsiyah {
    color: #aaaaaa;
}
.ayah-arabic tajweed.madda_normal {
    color: #537fff;
}
.ayah-arabic tajweed.madda_permissible {
    color: #4050ff;
}
.ayah-arabic tajweed.madda_necessary {
    color: #000ebc;
}
.ayah-arabic tajweed.madda_obligatory {
    color: #2144c1;
}
.ayah-arabic tajweed.qlq {
    color: #dd0008;
}
.ayah-arabic tajweed.ghn,
.ayah-arabic tajweed.idgh_w_ghn,
.ayah-arabic tajweed.idghm_shfw,
.ayah-arabic tajweed.iqlab {
    color: #169200;
}
.ayah-arabic tajweed.idgh_wo_ghn,
.ayah-arabic tajweed.idgh_mus {
    color: #169200;
}
.ayah-arabic tajweed.ikhf,
.ayah-arabic tajweed.ikhf_shfw {
    color: #9400a8;
}

.mushaf-word tajweed,
.mushaf-bsm-text tajweed {
    font-style: inherit;
    font-weight: inherit;
}
.mushaf-word tajweed.ham_wasl,
.mushaf-word tajweed.slnt,
.mushaf-word tajweed.laam_shamsiyah,
.mushaf-bsm-text tajweed.ham_wasl,
.mushaf-bsm-text tajweed.slnt,
.mushaf-bsm-text tajweed.laam_shamsiyah {
    color: #aaaaaa;
}
.mushaf-word tajweed.madda_normal,
.mushaf-bsm-text tajweed.madda_normal {
    color: #537fff;
}
.mushaf-word tajweed.madda_permissible,
.mushaf-bsm-text tajweed.madda_permissible {
    color: #4050ff;
}
.mushaf-word tajweed.madda_necessary,
.mushaf-bsm-text tajweed.madda_necessary {
    color: #000ebc;
}
.mushaf-word tajweed.madda_obligatory,
.mushaf-bsm-text tajweed.madda_obligatory {
    color: #2144c1;
}
.mushaf-word tajweed.qlq,
.mushaf-bsm-text tajweed.qlq {
    color: #dd0008;
}
.mushaf-word tajweed.ghn,
.mushaf-word tajweed.idgh_w_ghn,
.mushaf-word tajweed.idghm_shfw,
.mushaf-word tajweed.iqlab,
.mushaf-bsm-text tajweed.ghn,
.mushaf-bsm-text tajweed.idgh_w_ghn,
.mushaf-bsm-text tajweed.idghm_shfw,
.mushaf-bsm-text tajweed.iqlab {
    color: #169200;
}
.mushaf-word tajweed.idgh_wo_ghn,
.mushaf-word tajweed.idgh_mus,
.mushaf-bsm-text tajweed.idgh_wo_ghn,
.mushaf-bsm-text tajweed.idgh_mus {
    color: #169200;
}
.mushaf-word tajweed.ikhf,
.mushaf-word tajweed.ikhf_shfw,
.mushaf-bsm-text tajweed.ikhf,
.mushaf-bsm-text tajweed.ikhf_shfw {
    color: #9400a8;
}

html[data-mushaf-highlight="true"] .mushaf-word[data-kw],
html[data-mushaf-highlight="true"] .mushaf-bsm-word {
    display: inline-block;
}
html[data-mushaf-highlight="true"][data-mushaf-playing="true"] .mushaf-word.mushaf-karaoke-target:not(.is-done):not(.is-active),
html[data-mushaf-highlight="true"][data-mushaf-playing="true"] .mushaf-bsm-word.mushaf-karaoke-target:not(.is-done):not(.is-active),
html[data-mushaf-highlight="true"][data-mushaf-playing="true"] .mushaf-word.mushaf-ahead,
html[data-mushaf-highlight="true"][data-mushaf-playing="true"] .mushaf-ayah-end.mushaf-ahead {
    opacity: 0.35;
    transition: opacity 0.12s ease;
}
html[data-mushaf-highlight="true"][data-mushaf-playing="true"] .mushaf-word.is-done,
html[data-mushaf-highlight="true"][data-mushaf-playing="true"] .mushaf-word.is-active,
html[data-mushaf-highlight="true"][data-mushaf-playing="true"] .mushaf-bsm-word.is-done,
html[data-mushaf-highlight="true"][data-mushaf-playing="true"] .mushaf-bsm-word.is-active,
html[data-mushaf-highlight="true"] .mushaf-bsm-text.mushaf-bsm-playing {
    opacity: 1;
}
html[data-mushaf-highlight="true"] .mushaf-word.is-active,
html[data-mushaf-highlight="true"] .mushaf-bsm-word.is-active {
    -webkit-mask-image: linear-gradient(to left, #000 0 var(--kw-p, 0%), rgba(0,0,0,0.35) var(--kw-p, 0%));
    mask-image: linear-gradient(to left, #000 0 var(--kw-p, 0%), rgba(0,0,0,0.35) var(--kw-p, 0%));
}
html[data-mushaf-highlight="true"] .mushaf-word.mushaf-playing,
html[data-mushaf-highlight="true"] .mushaf-ayah-end.mushaf-playing {
    background: none !important;
    color: inherit;
    box-shadow: none !important;
}
html[data-mushaf-highlight="true"] .mushaf-ayah-end.mushaf-playing::before,
html[data-mushaf-highlight="true"] .mushaf-ayah-end.mushaf-playing::after {
    background: none !important;
    border-color: transparent !important;
    box-shadow: none !important;
}

.ayah-end-marker {
    display: inline;
    margin-right: 0.25em;
    color: var(--primary);
    font-size: 0.85em;
    opacity: 0.9;
}

.ayah-translation {
    font-family: var(--translation-font);
    font-size: var(--translation-size, 15px);
    line-height: 1.8;
    color: var(--ayah-translation-color, var(--text-light));
    padding-left: 16px;
    border-left: 3px solid var(--primary);
}
.ayah-translation[dir="rtl"] {
    text-align: right;
    padding-left: 0;
    padding-right: 16px;
    border-left: none;
    border-right: 3px solid var(--primary);
}

html[data-translation-karaoke="true"] .ayah-translation .ayah-karaoke-base {
    opacity: 0.3;
}
.ayah-karaoke-stack {
    position: relative;
}
.ayah-karaoke-fill {
    display: none;
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}
html[data-translation-karaoke="true"] .ayah-card.playing .ayah-translation .ayah-karaoke-fill {
    display: block;
}

.ayah-tafsir {
    margin-top: 10px;
    padding: 8px 12px;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.035);
    border: 1px solid var(--border);
}
.ayah-tafsir > summary {
    cursor: pointer;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--primary);
    list-style: none;
}
.ayah-tafsir > summary::-webkit-details-marker { display: none; }
.ayah-tafsir > summary::before {
    content: '▸';
    display: inline-block;
    margin-right: 6px;
    transition: transform 0.15s ease;
}
.ayah-tafsir[open] > summary::before { transform: rotate(90deg); }
.ayah-tafsir-body {
    margin-top: 8px;
    font-family: var(--translation-font);
    font-size: var(--tafsir-size, 18px);
    line-height: 1.7;
    color: var(--ayah-translation-color, var(--text-light));
}
.ayah-tafsir-body[dir="rtl"] {
    text-align: right;
    font-family: var(--arabic-font, 'Amiri', serif);
    line-height: 1.9;
}

.settings-offline-hint {
    margin: 8px 0 0;
    font-size: 0.78rem;
    line-height: 1.4;
    color: var(--text-muted);
}
.ayah-kword {
    display: inline;
}
html[data-arabic-karaoke="true"] .ayah-arabic .ayah-kword {
    display: inline-block;
    opacity: 0.3;
}
html[data-arabic-karaoke="true"] .ayah-card.playing .ayah-arabic .ayah-kword.is-done {
    opacity: 1;
}
html[data-arabic-karaoke="true"] .ayah-card.playing .ayah-arabic .ayah-kword.is-active {
    opacity: 1;
    -webkit-mask-image: linear-gradient(to left, #000 0 var(--kw-p, 0%), rgba(0,0,0,0.3) var(--kw-p, 0%));
    mask-image: linear-gradient(to left, #000 0 var(--kw-p, 0%), rgba(0,0,0,0.3) var(--kw-p, 0%));
}

/* ============ РЕЖИМ МЕДИНСКОГО МУСХАФА (Madani 1405) ============ */
.mushaf-container {
    container-type: inline-size;
    container-name: mushaf;
    max-width: 640px;
    margin: 0 auto;
    padding: 16px 12px 80px;
    overflow: hidden;
    background: #fff;
    min-height: 100%;
    /* Адаптивный размер шрифта: от ширины контейнера, аяты не выходят за границы */
    --mushaf-arabic-size: clamp(11px, 5.5vw, 26px);
}
@supports (container-type: inline-size) {
    .mushaf-container {
        --mushaf-arabic-size: clamp(11px, 5.8cqw, 26px);
    }
}
.mushaf-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    color: var(--text-muted);
}
.mushaf-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    padding: 10px 0;
    direction: rtl;
}
.mushaf-nav-btn {
    width: 40px; height: 40px;
    display: flex; align-items: center; justify-content: center;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: var(--bg-card);
    color: var(--text);
    cursor: pointer;
    font-size: 1rem;
    transition: all var(--transition);
}
.mushaf-nav-btn:hover {
    background: var(--primary); color: #fff; border-color: var(--primary);
}
.mushaf-page-indicator {
    font-family: var(--arabic-font);
    font-size: 1rem; font-weight: 700;
    color: var(--text-light);
    direction: rtl; min-width: 80px; text-align: center;
}

/* --- page frame --- */
.mushaf-page {
    background: var(--bg-card);
    overflow: hidden;
    max-width: 100%;
}



/* --- page body --- */
.mushaf-page-body {
    padding: 0;
    direction: rtl;
    max-width: 100%;
    overflow: hidden;
}

/* --- generic line height --- */
.mushaf-line {
    min-height: calc(var(--mushaf-arabic-size, 28px) * 2.4);
    display: flex;
    align-items: center;
    direction: rtl;
}

/* --- ayah line (justified words) --- */
.mushaf-line-ayah {
    font-family: var(--mushaf-font);
    font-size: var(--mushaf-arabic-size, 28px);
    line-height: 2.4;
    color: var(--text);
    justify-content: space-between;
    overflow: hidden;
    white-space: nowrap;
    min-width: 0;
}
.mushaf-line-ayah.centered {
    justify-content: center;
    gap: 0.3em;
}

/* words & verse-end markers */
.mushaf-word { cursor: pointer; user-select: none; flex-shrink: 0; }
.mushaf-ayah-end {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    margin: 0 0.2em;
    vertical-align: middle;
    flex-shrink: 0;
    user-select: none;
    font-family: var(--mushaf-font);
    box-sizing: border-box;
    line-height: 1;
    direction: rtl;
    text-align: center;
    transition: background 0.2s, color 0.2s, border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

/* --- стили номера аята (настройка «Стиль маркера аята») --- */

/* 1. Звезда — как номер суры в списке (ромб: квадрат + rotate, как .surah-number) */
html:not([data-mushaf-ayah-end]) .mushaf-ayah-end,
html[data-mushaf-ayah-end="star"] .mushaf-ayah-end {
    min-width: 2.25em;
    height: 2.25em;
    font-size: 0.52em;
    font-weight: 700;
    color: #000;
    background: transparent;
    position: relative;
    z-index: 1;
}
html[data-theme="dark"]:not([data-mushaf-ayah-end]) .mushaf-ayah-end,
html[data-theme="dark"][data-mushaf-ayah-end="star"] .mushaf-ayah-end {
    color: var(--text);
}
html:not([data-mushaf-ayah-end]) .mushaf-ayah-end::before,
html[data-mushaf-ayah-end="star"] .mushaf-ayah-end::before,
html:not([data-mushaf-ayah-end]) .mushaf-ayah-end::after,
html[data-mushaf-ayah-end="star"] .mushaf-ayah-end::after {
    content: '';
    position: absolute;
    inset: 0;
    border: 1.6px solid var(--primary);
    border-radius: 10px;
    background: transparent;
    z-index: -1;
    transition: all 0.3s;
}
html:not([data-mushaf-ayah-end]) .mushaf-ayah-end::before,
html[data-mushaf-ayah-end="star"] .mushaf-ayah-end::before {
    transform: rotate(45deg) scale(1.04);
}
html:not([data-mushaf-ayah-end]) .mushaf-ayah-end::after,
html[data-mushaf-ayah-end="star"] .mushaf-ayah-end::after {
    display: none;
}

html:not([data-mushaf-ayah-end]) .mushaf-ayah-end:hover::before,
html[data-mushaf-ayah-end="star"] .mushaf-ayah-end:hover::before {
    background: var(--primary);
    border-color: var(--primary);
}
html:not([data-mushaf-ayah-end]) .mushaf-ayah-end:hover,
html[data-mushaf-ayah-end="star"] .mushaf-ayah-end:hover {
    color: #fff;
}

/* 2. Солнце */
html[data-mushaf-ayah-end="sun"] .mushaf-ayah-end {
    min-width: 1.9em;
    height: 1.9em;
    border-radius: 50%;
    font-size: 0.55em;
    font-weight: 700;
    color: var(--primary);
    background: var(--bg-card);
    border: 1px dashed var(--primary);
    box-shadow: 0 0 0 2px var(--bg-card), 0 0 0 3px var(--primary);
    position: relative;
}
html[data-mushaf-ayah-end="sun"] .mushaf-ayah-end:hover {
    background: var(--primary);
    color: #fff;
    border-style: solid;
}

/* 3. Капля */
html[data-mushaf-ayah-end="drop"] .mushaf-ayah-end {
    min-width: 1.8em;
    height: 1.8em;
    font-size: 0.55em;
    font-weight: 700;
    color: var(--primary);
    position: relative;
    z-index: 1;
}
html[data-mushaf-ayah-end="drop"] .mushaf-ayah-end::before {
    content: '';
    position: absolute;
    inset: 0;
    border: 1.5px solid var(--primary);
    border-radius: 50% 50% 50% 0;
    transform: rotate(45deg);
    background: color-mix(in srgb, var(--primary) 10%, var(--bg-card));
    z-index: -1;
    transition: all 0.3s;
}
html[data-mushaf-ayah-end="drop"] .mushaf-ayah-end:hover::before {
    background: var(--primary);
}
html[data-mushaf-ayah-end="drop"] .mushaf-ayah-end:hover {
    color: #fff;
}

/* 4. Классика (двойной круг) */
html[data-mushaf-ayah-end="classic"] .mushaf-ayah-end {
    min-width: 2em;
    height: 2em;
    border: 2px solid var(--primary);
    border-radius: 50%;
    font-size: 0.55em;
    font-weight: 700;
    color: var(--primary);
    background: transparent;
    box-shadow: inset 0 0 0 1px var(--bg-card), inset 0 0 0 2px var(--primary);
    transition: all 0.3s;
}
html[data-mushaf-ayah-end="classic"] .mushaf-ayah-end:hover {
    background: var(--primary);
    color: #fff;
    box-shadow: none;
}

/* Настройки: превью стилей маркера */
.mushaf-ayah-style-swatches {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}
.mushaf-ayah-style-btn {
    width: 44px;
    height: 44px;
    padding: 0;
    border: 2px solid var(--border);
    border-radius: 12px;
    background: var(--bg);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    line-height: 0;
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.mushaf-ayah-style-btn:hover,
.mushaf-ayah-style-btn.active {
    transform: scale(1.06);
    border-color: var(--primary);
}
.mushaf-ayah-style-demo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--mushaf-font);
    pointer-events: none;
    line-height: 1;
    direction: rtl;
    text-align: center;
    position: relative;
    z-index: 1;
}

.mushaf-ayah-style-demo--star {
    width: 32px;
    height: 32px;
    font-family: var(--ui-font);
    font-size: 14px;
    font-weight: 700;
    color: #000;
}
[data-theme="dark"] .mushaf-ayah-style-demo--star {
    color: var(--text);
}
.mushaf-ayah-style-demo--star::before,
.mushaf-ayah-style-demo--star::after {
    content: '';
    position: absolute;
    inset: 0;
    border: 1.6px solid var(--primary);
    border-radius: 10px;
    background: transparent;
    z-index: -1;
    transition: all 0.3s;
}
.mushaf-ayah-style-demo--star::before {
    transform: rotate(45deg) scale(1.04);
}
.mushaf-ayah-style-demo--star::after {
    display: none;
}
.mushaf-ayah-style-btn:hover .mushaf-ayah-style-demo--star::before,
.mushaf-ayah-style-btn.active .mushaf-ayah-style-demo--star::before {
    background: var(--primary);
    border-color: var(--primary);
}
.mushaf-ayah-style-btn:hover .mushaf-ayah-style-demo--star,
.mushaf-ayah-style-btn.active .mushaf-ayah-style-demo--star {
    color: #fff;
}

.mushaf-ayah-style-demo--sun {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    font-size: 11px;
    font-weight: 700;
    color: var(--primary);
    background: var(--bg-card);
    border: 1px dashed var(--primary);
    box-shadow: 0 0 0 1px var(--bg-card), 0 0 0 2px var(--primary);
}

.mushaf-ayah-style-demo--drop {
    width: 26px;
    height: 26px;
    font-size: 11px;
    font-weight: 700;
    color: var(--primary);
}
.mushaf-ayah-style-demo--drop::before {
    content: '';
    position: absolute;
    inset: 0;
    border: 1.5px solid var(--primary);
    border-radius: 50% 50% 50% 0;
    transform: rotate(45deg);
    background: color-mix(in srgb, var(--primary) 10%, var(--bg-card));
    z-index: -1;
}

.mushaf-ayah-style-demo--classic {
    width: 26px;
    height: 26px;
    border: 2px solid var(--primary);
    border-radius: 50%;
    font-size: 11px;
    font-weight: 700;
    color: var(--primary);
    box-shadow: inset 0 0 0 1px var(--bg-card), inset 0 0 0 2px var(--primary);
}

/* --- surah-name decoration --- */
.mushaf-line-surah { justify-content: center; }
.mushaf-surah-frame {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: var(--primary-light);
    border: 2px solid var(--primary);
    border-radius: 20px;
    padding: 3px 28px;
    min-width: 60%;
}
[data-theme="dark"] .mushaf-surah-frame {
    background: var(--primary-light);
    border-color: var(--primary-dark);
}
.mushaf-surah-title {
    font-family: var(--mushaf-font);
    font-size: 1rem; font-weight: 700;
    color: var(--primary-dark);
}
[data-theme="dark"] .mushaf-surah-title { color: var(--primary); }
.mushaf-surah-ornament { color: var(--primary); font-size: 0.85rem; }

/* --- basmallah line --- */
.mushaf-line-bsm { justify-content: center; }
.mushaf-bsm-text {
    font-family: var(--mushaf-font);
    font-size: calc(var(--mushaf-arabic-size, 28px) * 0.85);
    color: var(--text);
    cursor: pointer;
}

/* --- empty line --- */
.mushaf-line-empty { /* keeps min-height for 15-line grid */ }

/* --- page footer --- */
.mushaf-page-ftr {
    text-align: center;
    padding: 6px 16px 10px;
    font-family: var(--mushaf-font);
    font-size: 0.95rem; font-weight: 700;
    color: var(--text-muted);
    border-top: 1px solid var(--border);
}

/* --- page slide animations --- */
#mushaf-page-wrap {
    overflow: hidden;
}

@keyframes slideOutLeft {
    0%   { transform: translateX(0); opacity: 1; }
    100% { transform: translateX(-40px); opacity: 0; }
}
@keyframes slideOutRight {
    0%   { transform: translateX(0); opacity: 1; }
    100% { transform: translateX(40px); opacity: 0; }
}
@keyframes slideInRight {
    0%   { transform: translateX(40px); opacity: 0; }
    100% { transform: translateX(0); opacity: 1; }
}
@keyframes slideInLeft {
    0%   { transform: translateX(-40px); opacity: 0; }
    100% { transform: translateX(0); opacity: 1; }
}

.mushaf-page.flip-out-left  { animation: slideOutLeft 0.18s ease-in forwards; }
.mushaf-page.flip-out-right { animation: slideOutRight 0.18s ease-in forwards; }
.mushaf-page.flip-in-right  { animation: slideInRight 0.25s ease-out forwards; }
.mushaf-page.flip-in-left   { animation: slideInLeft 0.25s ease-out forwards; }

/* --- mobile --- */
@media (max-width: 640px) {
    .mushaf-container { padding: 10px 6px 70px; }
    .mushaf-page-body { padding: 0; }
    .mushaf-line {
        min-height: calc(var(--mushaf-arabic-size, 28px) * 0.85 * 2.2);
    }
    .mushaf-line-ayah {
        font-size: calc(var(--mushaf-arabic-size, 28px) * 0.85);
        line-height: 2.2;
    }
    .mushaf-surah-frame { padding: 2px 18px; }
    .mushaf-surah-title { font-size: 0.88rem; }
    .mushaf-bsm-text { font-size: calc(var(--mushaf-arabic-size, 28px) * 0.72); }
}

/* ============ SEARCH RESULTS ============ */

.search-results { display: none; padding: 20px; max-width: 860px; margin: 0 auto; }
.search-results.active { display: block; }
.search-results-header { margin-bottom: 18px; }
.search-results-header h3 { font-size: 1.05rem; color: var(--text); }
.search-results-header p { font-size: 0.82rem; color: var(--text-muted); }

.search-result-item {
    padding: 14px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 10px;
    cursor: pointer;
    transition: all var(--transition);
}

.search-result-item:hover { border-color: var(--primary); box-shadow: var(--shadow); }
.search-result-ref { font-size: 0.78rem; font-weight: 700; color: var(--primary); margin-bottom: 6px; }
.search-result-text { font-family: var(--translation-font); font-size: 0.92rem; color: var(--text); line-height: 1.7; }
.search-result-text[dir="rtl"] { font-family: var(--arabic-font); font-size: 1.2rem; line-height: 2; }

/* ============ BOOKMARKS VIEW ============ */

/* Last playback card */
.last-playback-card {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    flex: 1 1 100%;
    padding: 14px 16px;
    margin: 0 0 6px;
    background: linear-gradient(135deg, var(--primary-light), transparent);
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all var(--transition);
    box-sizing: border-box;
}
.last-playback-card:hover {
    box-shadow: var(--shadow);
    background: linear-gradient(135deg, var(--primary-light), var(--primary-light));
}
.last-playback-icon {
    font-size: 2rem;
    color: var(--primary);
    line-height: 1;
    flex-shrink: 0;
}
.last-playback-info {
    flex: 1;
    min-width: 0;
}
.last-playback-title {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--primary);
    margin-bottom: 2px;
}
.last-playback-detail {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.last-playback-time {
    font-size: 0.75rem;
    color: var(--text-light);
    margin-top: 2px;
}
.last-playback-ar {
    font-family: var(--arabic-font);
    font-size: 1.15rem;
    color: var(--text);
    direction: rtl;
    flex-shrink: 0;
    margin-left: auto;
}
[data-theme="dark"] .last-playback-card {
    background: linear-gradient(135deg, rgba(var(--primary-rgb, 84, 160, 255), 0.12), transparent);
}

.bookmarks-view { display: none; padding: 20px; max-width: 860px; margin: 0 auto; }
.bookmarks-view.active { display: block; }
.bookmarks-list-content { padding: 12px 16px 24px; overflow-y: auto; min-height: 60vh; }
.bookmarks-header { margin-bottom: 18px; }
.bookmarks-header h3 { font-size: 1.1rem; color: var(--text); }
.playlist-listen-actions {
    padding: 10px 16px 0;
}
.playlist-btn-listen {
    width: 100%;
    border: 1px solid var(--primary);
    background: var(--primary-light);
    color: var(--primary);
    border-radius: 10px;
    padding: 10px 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    font-weight: 600;
    font-family: var(--ui-font);
}
.playlist-btn-listen:hover {
    background: rgba(var(--primary-rgb, 84, 160, 255), 0.22);
}
.playlists-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.playlists-section-header h3 {
    flex: 1;
    min-width: 0;
}
.playlists-section-header .playlist-btn-create {
    flex-shrink: 0;
    white-space: nowrap;
}
.playlist-actions {
    padding: 10px 16px;
    border-bottom: 1px solid var(--border);
}
.playlist-btn-create {
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--text);
    border-radius: 10px;
    padding: 8px 12px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-family: var(--ui-font);
}
.playlist-btn-create:hover {
    border-color: var(--primary);
    background: var(--primary-light);
}
.playlist-card { cursor: pointer; }
.playlist-card-actions,
.playlist-item-actions {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
}
.playlist-action-btn {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--text-light);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.playlist-action-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}
.playlist-action-btn-danger:hover {
    border-color: #ef4444;
    color: #ef4444;
}
.repeat-range-body.playlist-create-modal-body {
    padding-top: 16px;
    padding-bottom: 12px;
}
.playlist-name-input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--bg);
    color: var(--text);
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.playlist-name-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb, 84, 160, 255), 0.2);
}

.bookmark-item {
    display: flex;
    align-items: center;
    padding: 12px 14px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 8px;
    cursor: pointer;
    transition: all var(--transition);
    gap: 12px;
}

.bookmark-item:hover { border-color: var(--primary); box-shadow: var(--shadow); }
.bookmark-info { flex: 1; }
.bookmark-info .bk-ref { font-weight: 700; color: var(--primary); font-size: 0.85rem; }

.bookmark-info .bk-text {
    font-family: var(--arabic-font);
    font-size: 1.05rem;
    direction: rtl;
    color: var(--text);
    margin-top: 3px;
    line-height: 1.8;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.bookmark-info .bk-translation {
    margin-top: 6px;
    color: var(--text-light);
    font-size: 0.88rem;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.bookmark-info .bk-translation {
    margin-top: 6px;
    color: var(--text-light);
    font-size: 0.88rem;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.bookmark-remove {
    padding: 5px;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.95rem;
    transition: color var(--transition);
}

.bookmark-remove:hover { color: #ef4444; }

/* ============ AUDIO PLAYER ============ */

.audio-player {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--player-height);
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-top: none;
    box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    padding: 0;
    gap: 0;
    z-index: 90;
    transform: translateY(100%);
    transition: transform var(--transition);
    overflow: hidden;
    border-radius: 0;
}
.audio-player.expanded {
    top: 0;
    height: 100vh;
    padding: 20px 16px 22px;
}
.audio-player.expanded .player-row {
    opacity: 0;
    pointer-events: none;
}
.player-expanded-panel {
    display: none;
    width: 100%;
    max-width: 560px;
    margin: 0 auto;
    flex: 1;
    position: relative;
    z-index: 3;
    align-items: center;
    justify-content: flex-start;
    flex-direction: column;
    gap: 14px;
    height: 100%;
    padding: 0 0 12px;
}
.audio-player.expanded .player-expanded-panel {
    display: flex;
}
.player-expanded-top {
    position: absolute;
    top: 0;
    right: 0;
    width: auto;
    display: flex;
    justify-content: flex-end;
    z-index: 2;
}
.player-collapse-btn {
    width: 32px;
    height: 32px;
}
.player-expanded-info {
    margin: auto 0 12px;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    text-align: center;
    justify-content: center;
    gap: 8px 10px;
}
.player-expanded-info .player-surah {
    font-size: 1.25rem;
    max-width: 70vw;
    font-weight: 600;
}
.player-expanded-info .player-ayah-text {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: min(92vw, 540px);
    order: 3;
    direction: rtl;
    font-family: var(--arabic-font);
    font-size: clamp(1.35rem, 3.6vw, 2rem);
    line-height: 1.8;
    max-width: min(92vw, 540px);
    color: #fff;
    text-align: center;
    align-self: center;
    margin: 0 auto;
    z-index: 1;
    pointer-events: none;
}
.player-expanded-info .player-ayah-num {
    order: 2;
    font-size: 0.95rem;
    color: rgba(255,255,255,0.82);
    white-space: nowrap;
    align-self: center;
}
.player-expanded-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 0;
    width: 100%;
}
.player-expanded-controls .player-btn {
    width: 54px;
    height: 54px;
    font-size: 1.25rem;
}
.player-expanded-controls .play-btn {
    width: 66px;
    height: 66px;
    font-size: 1.6rem;
}
.player-expanded-reciter {
    width: min(100%, 371px);
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding-top: 0;
    padding-right: 44px;
    align-self: stretch;
    margin: 0 auto;
}
.player-expanded-reciter label {
    font-size: 0.86rem;
    font-weight: 600;
    color: rgba(255,255,255,0.9);
    text-align: left;
}
.player-expanded-reciter select {
    height: 44px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--text);
    padding: 0 12px;
    font-family: var(--ui-font);
    font-size: 0.85rem;
    outline: none;
    transition: border-color var(--transition), box-shadow var(--transition);
}
.player-expanded-reciter select:hover {
    border-color: var(--primary);
}
.player-expanded-reciter select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(84,160,255,0.12);
}
body.player-expanded {
    overflow: hidden;
}
.player-close-full-btn {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: #fff;
    cursor: pointer;
    font-size: 0.95rem;
    flex-shrink: 0;
    transition: background var(--transition);
}
.player-close-full-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    color: #fff;
}
.player-expand-btn {
    width: 32px;
    height: 32px;
    font-size: 0.95rem;
    flex-shrink: 0;
}

.audio-player::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160' viewBox='0 0 160 160'%3E%3Cg fill='%23fff' fill-opacity='0.55'%3E%3Ccircle cx='12' cy='8' r='1'/%3E%3Ccircle cx='45' cy='23' r='0.6'/%3E%3Ccircle cx='78' cy='5' r='1.2'/%3E%3Ccircle cx='95' cy='40' r='0.7'/%3E%3Ccircle cx='5' cy='55' r='0.6'/%3E%3Ccircle cx='33' cy='72' r='1'/%3E%3Ccircle cx='62' cy='88' r='0.6'/%3E%3Ccircle cx='88' cy='65' r='0.7'/%3E%3Ccircle cx='18' cy='95' r='0.6'/%3E%3Ccircle cx='125' cy='18' r='0.6'/%3E%3Ccircle cx='52' cy='42' r='0.5'/%3E%3Ccircle cx='72' cy='58' r='0.8'/%3E%3Ccircle cx='112' cy='82' r='0.6'/%3E%3Ccircle cx='138' cy='45' r='0.5'/%3E%3Ccircle cx='28' cy='128' r='0.7'/%3E%3Ccircle cx='145' cy='115' r='0.5'/%3E%3Ccircle cx='25' cy='15' r='0.6'/%3E%3Ccircle cx='100' cy='30' r='0.5'/%3E%3Ccircle cx='15' cy='80' r='0.7'/%3E%3Ccircle cx='90' cy='90' r='0.5'/%3E%3Ccircle cx='120' cy='55' r='0.6'/%3E%3Ccircle cx='35' cy='42' r='0.5'/%3E%3Ccircle cx='75' cy='75' r='0.7'/%3E%3Ccircle cx='110' cy='12' r='0.5'/%3E%3Ccircle cx='8' cy='120' r='0.6'/%3E%3Ccircle cx='55' cy='130' r='0.5'/%3E%3Ccircle cx='115' cy='38' r='0.6'/%3E%3Ccircle cx='48' cy='8' r='0.5'/%3E%3Ccircle cx='155' cy='60' r='0.6'/%3E%3Ccircle cx='68' cy='42' r='0.5'/%3E%3C/g%3E%3C/svg%3E"),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100' viewBox='0 0 100 100'%3E%3Cg fill='%23fff' fill-opacity='0.35'%3E%3Ccircle cx='20' cy='10' r='0.5'/%3E%3Ccircle cx='55' cy='25' r='0.4'/%3E%3Ccircle cx='8' cy='48' r='0.55'/%3E%3Ccircle cx='42' cy='62' r='0.5'/%3E%3Ccircle cx='68' cy='8' r='0.4'/%3E%3Ccircle cx='15' cy='70' r='0.5'/%3E%3Ccircle cx='72' cy='55' r='0.4'/%3E%3Ccircle cx='85' cy='78' r='0.45'/%3E%3Ccircle cx='32' cy='92' r='0.4'/%3E%3Ccircle cx='5' cy='30' r='0.5'/%3E%3Ccircle cx='40' cy='5' r='0.4'/%3E%3Ccircle cx='90' cy='45' r='0.5'/%3E%3Ccircle cx='25' cy='75' r='0.4'/%3E%3Ccircle cx='60' cy='90' r='0.5'/%3E%3Ccircle cx='78' cy='25' r='0.4'/%3E%3Ccircle cx='50' cy='50' r='0.5'/%3E%3Ccircle cx='95' cy='65' r='0.4'/%3E%3Ccircle cx='18' cy='85' r='0.5'/%3E%3C/g%3E%3C/svg%3E"),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Cg fill='%23fff' fill-opacity='0.25'%3E%3Ccircle cx='10' cy='5' r='0.5'/%3E%3Ccircle cx='35' cy='20' r='0.4'/%3E%3Ccircle cx='60' cy='8' r='0.6'/%3E%3Ccircle cx='85' cy='35' r='0.4'/%3E%3Ccircle cx='5' cy='45' r='0.5'/%3E%3Ccircle cx='28' cy='60' r='0.4'/%3E%3Ccircle cx='55' cy='75' r='0.5'/%3E%3Ccircle cx='75' cy='50' r='0.4'/%3E%3Ccircle cx='15' cy='85' r='0.5'/%3E%3Ccircle cx='95' cy='15' r='0.4'/%3E%3Ccircle cx='42' cy='32' r='0.3'/%3E%3Ccircle cx='68' cy='55' r='0.5'/%3E%3Ccircle cx='92' cy='72' r='0.4'/%3E%3Ccircle cx='18' cy='95' r='0.4'/%3E%3Ccircle cx='50' cy='5' r='0.3'/%3E%3Ccircle cx='105' cy='45' r='0.5'/%3E%3Ccircle cx='8' cy='68' r='0.4'/%3E%3Ccircle cx='115' cy='90' r='0.3'/%3E%3C/g%3E%3C/svg%3E");
    background-size: 160px 160px, 100px 100px, 120px 120px;
    background-position: 0 0, 50px 35px, 80px 20px;
    animation: stars-drift 100s ease-in-out infinite;
    pointer-events: none;
}

.audio-player .player-info,
.audio-player .player-controls,
.audio-player .player-volume,
.audio-player .player-progress-top,
.audio-player .player-row,
.audio-player .player-row-left,
.audio-player .player-row-right,
.audio-player .player-controls-center { position: relative; z-index: 1; }

.player-progress-top {
    width: 100%;
    max-width: 100%;
    padding: 0;
    margin: 0;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 2;
}
.player-progress-top input[type="range"] {
    display: block;
    width: 100%;
    height: 4px;
    -webkit-appearance: none;
    appearance: none;
    background: rgba(255, 255, 255, 0.32);
    border-radius: 0;
    outline: none;
    cursor: pointer;
}
.player-progress-top input[type="range"]::-webkit-slider-runnable-track {
    height: 4px;
    background: rgba(255, 255, 255, 0.32);
    border-radius: 0;
}
.player-progress-top input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 0;
    height: 0;
    border-radius: 0;
    background: #fff;
    border: none;
    margin-top: 0;
}
.player-progress-top input[type="range"]::-moz-range-track {
    height: 4px;
    background: rgba(255, 255, 255, 0.32);
    border-radius: 0;
    border: none;
}
.player-progress-top input[type="range"]::-moz-range-progress {
    height: 4px;
    background: #fff;
    border-radius: 0;
}
.player-progress-top input[type="range"]::-moz-range-thumb {
    width: 0;
    height: 0;
    border-radius: 0;
    background: #fff;
    border: none;
}

.player-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    max-width: 100%;
    padding: 6px 12px;
    box-sizing: border-box;
}
.player-row-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}
.player-controls-center {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 0;
}
.player-range-wrap {
    display: flex;
    align-items: center;
    min-width: 0;
}
.player-row-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}
.player-info-compact {
    flex-shrink: 0;
    min-width: 0;
}
.player-info-compact .player-surah { max-width: 120px; }
.player-info-compact .player-ayah-num { font-size: 0.65rem; }

.player-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    min-width: 0;
    cursor: pointer;
    line-height: 1.2;
}

.player-controls-right,
.player-controls-center {
    gap: 4px;
}
.player-surah {
    font-size: 0.75rem;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100px;
}
.player-ayah-num {
    font-size: 0.65rem;
    color: rgba(255,255,255,0.75);
    white-space: nowrap;
}

body.listen-player-minimal .audio-player .player-controls-center,
body.listen-player-minimal .audio-player .player-volume {
    display: none !important;
}
body.listen-player-minimal .audio-player .player-progress-top {
    display: block;
}
body.listen-player-minimal .audio-player .player-row {
    position: relative;
    justify-content: center;
}
body.listen-player-minimal .audio-player .player-row-left {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    flex: 0 1 auto;
    min-width: 0;
}
body.listen-player-minimal .audio-player .player-row-left .player-info {
    display: flex;
    position: static;
    max-width: 170px;
    align-items: flex-start;
    text-align: left;
    cursor: pointer;
    order: 1;
}
body.listen-player-minimal .audio-player .player-row-left .player-controls-main {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    order: 2;
}
body.listen-player-minimal .audio-player .player-listen-repeat-btn {
    display: inline-flex;
    width: 40px;
    height: 40px;
    font-size: 1.05rem;
    order: 3;
}
body.listen-player-minimal .audio-player .player-listen-repeat-btn.repeat-active {
    background: #fff;
    color: var(--primary);
}
body.listen-player-minimal .audio-player .player-listen-repeat-btn.repeat-active:hover {
    background: rgba(255, 255, 255, 0.95);
    color: var(--primary-dark);
}
body.listen-player-minimal .audio-player .player-listen-nav-btn {
    width: 40px;
    height: 40px;
    font-size: 1.05rem;
}
body.listen-player-minimal .audio-player .play-btn {
    width: 52px;
    height: 52px;
    font-size: 1.35rem;
}
body.listen-player-minimal .audio-player .player-row-right {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    margin-left: 0;
}
body.listen-player-minimal .audio-player .player-close-full-btn {
    width: 36px;
    height: 36px;
}
body.listen-player-minimal .audio-player .player-row-left .player-info .player-surah {
    max-width: 170px;
}
body:not(.listen-player-minimal) .audio-player .player-listen-repeat-btn {
    display: none;
}

.audio-player.visible { transform: translateY(0); transition: transform var(--transition); }
body:has(#audio-player.visible) .list-view,
body:has(#listener-audio-player.visible) .list-view {
    padding-bottom: calc(var(--player-height) + 20px);
}

.player-controls {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.player-btn {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: var(--text);
    cursor: pointer;
    transition: all var(--transition);
    font-size: 0.9rem;
    flex-shrink: 0;
}

.audio-player .player-btn { color: #fff; }
.audio-player #player-repeat { width: 48px; height: 48px; font-size: 1.1rem; }
.audio-player #player-range {
    width: auto;
    min-width: 48px;
    height: 48px;
    padding: 0 10px;
    font-size: 1.1rem;
    flex-direction: column;
    gap: 2px;
    align-items: center;
    justify-content: center;
}
.audio-player .player-btn:hover { background: rgba(255, 255, 255, 0.25); color: #fff; }
.audio-player #player-range:hover { background: transparent; }

.player-btn:hover { background: var(--primary-light); color: var(--primary); }

.player-btn.play-btn {
    width: 42px;
    height: 42px;
    margin: 0 2px;
    font-size: 1.1rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    color: var(--primary);
}
.player-btn.play-btn:hover { background: #fff; color: var(--primary-dark); transform: scale(1.05); }

.player-btn.repeat-active { background: none; color: #fff; }
.player-btn.repeat-active:hover { background: rgba(255, 255, 255, 0.15); color: #fff; }
.audio-player .player-btn.repeat-active {
    background: transparent;
    color: #fff;
}
.audio-player #player-repeat.player-btn.repeat-active {
    background: #fff;
    color: var(--primary);
}
.audio-player #player-repeat.player-btn.repeat-active:hover {
    background: rgba(255, 255, 255, 0.95);
    color: var(--primary-dark);
}
.audio-player .player-btn.repeat-active .range-label {
    color: #fff;
}
.audio-player .player-btn.repeat-active:hover {
    background: rgba(255, 255, 255, 0.15);
    color: var(--primary);
}
.audio-player #player-range.player-btn.repeat-active:hover { background: transparent; }

.range-title {
    font-size: 0.75rem;
    font-weight: 600;
    color: #fff;
    line-height: 1.2;
    white-space: nowrap;
}
.range-label {
    font-size: 0.65rem;
    font-weight: 400;
    letter-spacing: -0.02em;
    white-space: nowrap;
    color: rgba(255, 255, 255, 0.75);
}
.audio-player #player-range .range-label { font-size: 0.65rem; }
.audio-player #player-range {
    position: relative;
}
.range-ayah-badge {
    position: absolute;
    top: 2px;
    right: 6px;
    font-size: 0.5rem;
    font-weight: 700;
    color: var(--primary);
    background: #fff;
    border-radius: 4px;
    padding: 0 3px;
    line-height: 1.5;
    letter-spacing: 0.02em;
    z-index: 2;
}

.player-volume {
    display: flex;
    align-items: center;
    gap: 4px;
    min-width: 0;
    width: 70px;
    flex-shrink: 0;
}

.player-volume .vol-icon {
    font-size: 0.95rem;
    color: var(--text-light);
    cursor: pointer;
    padding: 2px;
    line-height: 1;
}

.audio-player .player-volume .vol-icon { color: #fff; }

.player-volume input[type="range"] {
    width: 56px;
    -webkit-appearance: none;
    height: 4px;
    background: var(--border);
    border-radius: 2px;
    outline: none;
}

.player-volume input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    background: var(--primary);
    border-radius: 50%;
    cursor: pointer;
}

.audio-player .player-volume input[type="range"] {
    background: rgba(255, 255, 255, 0.3);
}

.audio-player .player-volume input[type="range"]::-webkit-slider-thumb {
    background: #fff;
}

/* ============ REPEAT RANGE MODAL ============ */
.repeat-range-modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s;
    pointer-events: none;
}
.repeat-range-modal.show {
    opacity: 1;
    pointer-events: auto;
}
.repeat-range-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.5);
}
.repeat-range-content {
    position: relative;
    background: var(--bg-card);
    border-radius: 16px;
    width: 300px;
    max-width: 90vw;
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
    overflow: hidden;
    transform: translateY(20px);
    transition: transform 0.2s;
}
.repeat-range-modal.show .repeat-range-content {
    transform: translateY(0);
}
.repeat-range-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text);
    border-bottom: 1px solid var(--border);
}
.repeat-range-subtitle {
    display: block;
    font-size: 0.7rem;
    font-weight: 400;
    color: var(--text-muted);
    margin-top: 2px;
}
.repeat-range-repeat-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.2s, color 0.2s;
}
.repeat-range-repeat-btn:hover {
    background: var(--primary-light);
    color: var(--primary);
}
.repeat-range-repeat-btn.repeat-active {
    background: var(--primary-light);
    color: var(--primary);
}
.repeat-range-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.1rem;
    padding: 4px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s;
}
.repeat-range-close:hover {
    background: var(--primary-light);
    color: var(--primary);
}
.repeat-range-surah-row {
    padding: 14px 18px 0;
}
.rr-surah-picker {
    position: relative;
    height: 132px;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--bg);
}
.rr-surah-picker-highlight {
    position: absolute;
    top: 44px;
    left: 0;
    right: 0;
    height: 44px;
    border-top: 1.5px solid var(--primary);
    border-bottom: 1.5px solid var(--primary);
    background: var(--primary-light);
    pointer-events: none;
    z-index: 1;
    border-radius: 6px;
}
.rr-surah-picker-list {
    height: 100%;
    overflow-y: auto;
    padding: 44px 0;
    -webkit-overflow-scrolling: touch;
}
.rr-surah-picker-list::-webkit-scrollbar { display: none; }
.rr-surah-picker-list { scrollbar-width: none; }
.rr-surah-item {
    height: 44px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 14px;
    cursor: pointer;
    transition: opacity 0.15s;
    opacity: 0.4;
}
.rr-surah-item.active {
    opacity: 1;
    font-weight: 600;
}
.rr-surah-num {
    min-width: 28px;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--primary);
    text-align: center;
}
.rr-surah-name {
    font-size: 0.88rem;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.repeat-range-body {
    padding: 18px;
    display: flex;
    gap: 14px;
}
.rr-num-picker {
    position: relative;
    height: 132px;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--bg);
}
.rr-num-picker-highlight {
    position: absolute;
    top: 44px;
    left: 0;
    right: 0;
    height: 44px;
    border-top: 1.5px solid var(--primary);
    border-bottom: 1.5px solid var(--primary);
    background: var(--primary-light);
    pointer-events: none;
    z-index: 1;
    border-radius: 6px;
}
.rr-num-picker-list {
    height: 100%;
    overflow-y: auto;
    padding: 44px 0;
    -webkit-overflow-scrolling: touch;
}
.rr-num-picker-list::-webkit-scrollbar { display: none; }
.rr-num-picker-list { scrollbar-width: none; }
.rr-num-item {
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.05rem;
    font-weight: 500;
    color: var(--text);
    opacity: 0.35;
    transition: opacity 0.15s;
    user-select: none;
}
.rr-num-item.active {
    opacity: 1;
    font-weight: 700;
    color: var(--primary);
}
.repeat-range-body.ayah-jump-modal-body {
    justify-content: center;
}
.repeat-range-body.ayah-jump-modal-body .repeat-range-field {
    max-width: 120px;
    flex: none;
    width: 100%;
}

.repeat-range-field {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.repeat-range-field label {
    font-size: calc(0.68rem + 2px);
    font-weight: 600;
    color: var(--text-muted);
}
.repeat-range-field select {
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg);
    color: var(--text);
    font-size: 0.95rem;
    outline: none;
    cursor: pointer;
    transition: border-color 0.2s;
}
.repeat-range-field select:focus {
    border-color: var(--primary);
}
.repeat-range-apply {
    display: block;
    width: calc(100% - 36px);
    margin: 0 18px 18px;
    padding: 14px 10px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}
.repeat-range-apply:hover {
    background: var(--primary-dark);
}
.repeat-range-cancel {
    display: block;
    width: calc(100% - 36px);
    margin: 0 18px 18px;
    padding: 10px;
    background: none;
    color: #e74c3c;
    border: 1px solid #e74c3c;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}
.repeat-range-cancel:hover {
    background: #e74c3c;
    color: #fff;
}

/* ============ LOADING ============ */

.loading-overlay { display: none; position: fixed; inset: 0; background: rgba(255,255,255,0.7); z-index: 1000; align-items: center; justify-content: center; }
[data-theme="dark"] .loading-overlay { background: rgba(0,0,0,0.5); }
.loading-overlay.show { display: flex; }
.spinner { width: 40px; height: 40px; border: 3px solid var(--border); border-top-color: var(--primary); border-radius: 50%; animation: spin 0.7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.loading-inline { display: flex; align-items: center; justify-content: center; padding: 50px 20px; color: var(--text-muted); gap: 10px; }
.loading-inline .spinner-sm { width: 20px; height: 20px; border: 2px solid var(--border); border-top-color: var(--primary); border-radius: 50%; animation: spin 0.7s linear infinite; }

/* ============ TOAST ============ */

.toast-container { position: fixed; bottom: 90px; right: 20px; z-index: 2000; display: flex; flex-direction: column; gap: 6px; }
.toast { padding: 10px 18px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-sm); box-shadow: var(--shadow-lg); font-size: 0.82rem; color: var(--text); animation: toastIn 0.3s ease; display: flex; align-items: center; gap: 6px; }
.toast.success { border-left: 3px solid var(--primary); }
.toast.error { border-left: 3px solid #ef4444; }
.playlist-surah-pick-body {
    max-height: min(58vh, 440px);
    overflow: hidden;
}
.playlist-surah-pick-list {
    margin-top: 10px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--bg);
    overflow-y: auto;
    max-height: min(48vh, 360px);
}
.playlist-surah-pick-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
}
.playlist-surah-pick-item:last-child { border-bottom: 0; }
.playlist-surah-pick-item.is-disabled { opacity: 0.55; cursor: default; }
.playlist-surah-pick-checkbox { width: 18px; height: 18px; flex: 0 0 18px; }
.playlist-surah-pick-number {
    width: 28px;
    font-weight: 700;
    color: var(--primary);
    flex: 0 0 28px;
}
.playlist-surah-pick-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.playlist-surah-pick-meaning {
    font-size: 0.86rem;
    color: var(--text);
}
.playlist-surah-pick-name {
    font-size: 0.78rem;
    color: var(--muted);
}
.toast-listener-resume {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    min-width: 220px;
    max-width: 92vw;
}
.listener-resume-msg { font-weight: 600; line-height: 1.35; }
.listener-resume-actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.listener-resume-btn {
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--text);
    border-radius: var(--radius-sm);
    padding: 8px 12px;
    font-size: 0.82rem;
    cursor: pointer;
    font-family: var(--ui-font);
}
.listener-resume-primary {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary-dark);
}
.listener-resume-btn:hover { opacity: 0.92; }

/* ============ MODE SWITCH CONFIRM MODAL ============ */
.mode-switch-modal {
    position: fixed;
    inset: 0;
    z-index: 2100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s ease;
}
.mode-switch-modal.show {
    opacity: 1;
    pointer-events: auto;
}
body.mode-switch-open {
    overflow: hidden;
}
.mode-switch-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}
.mode-switch-panel {
    position: relative;
    width: min(100%, 360px);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.22);
    padding: 22px 20px 18px;
    transform: translateY(16px) scale(0.98);
    transition: transform 0.22s ease;
}
.mode-switch-modal.show .mode-switch-panel {
    transform: translateY(0) scale(1);
}
.mode-switch-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    transition: background 0.2s, color 0.2s;
}
.mode-switch-close:hover {
    background: var(--primary-light);
    color: var(--primary);
}
.mode-switch-hero {
    text-align: center;
    padding: 4px 28px 14px;
}
.mode-switch-icon-wrap {
    width: 56px;
    height: 56px;
    margin: 0 auto 12px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.55rem;
    color: var(--primary);
    background: linear-gradient(145deg, var(--primary-light) 0%, rgba(84, 160, 255, 0.12) 100%);
    border: 1px solid rgba(84, 160, 255, 0.2);
}
.mode-switch-icon-wrap .sidebar-mode-ai-label {
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: 0.06em;
}
.mode-switch-title {
    margin: 0 0 6px;
    font-size: 1.12rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.02em;
    line-height: 1.3;
}
.mode-switch-target {
    margin: 0;
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.45;
}
.mode-switch-target strong {
    color: var(--text);
    font-weight: 700;
}
.mode-switch-effects {
    list-style: none;
    margin: 0 0 18px;
    padding: 12px 14px;
    border-radius: 12px;
    background: var(--bg);
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.mode-switch-effect {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}
.mode-switch-effect-icon {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: var(--primary);
    background: var(--primary-light);
}
.mode-switch-effect-icon-warn {
    color: #b45309;
    background: rgba(245, 158, 11, 0.15);
}
.mode-switch-effect-text {
    font-size: 0.9rem;
    line-height: 1.45;
    color: var(--text);
    padding-top: 3px;
}
.mode-switch-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.mode-switch-btn {
    min-height: 44px;
    border-radius: 12px;
    border: 1px solid var(--border);
    font-family: var(--ui-font);
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.1s;
}
.mode-switch-btn:active {
    transform: scale(0.98);
}
.mode-switch-btn-cancel {
    background: var(--bg);
    color: var(--text);
}
.mode-switch-btn-cancel:hover {
    background: var(--primary-light);
    border-color: rgba(84, 160, 255, 0.35);
}
.mode-switch-btn-confirm {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary-dark);
    box-shadow: 0 4px 14px rgba(84, 160, 255, 0.35);
}
.mode-switch-btn-confirm:hover {
    filter: brightness(1.05);
}
@media (max-width: 380px) {
    .mode-switch-actions {
        grid-template-columns: 1fr;
    }
    .mode-switch-btn-confirm {
        order: -1;
    }
}

@keyframes toastIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* ============ VOICE SEARCH ============ */

.voice-search-modal {
    position: fixed; inset: 0; z-index: 3000;
    display: flex; align-items: flex-end; justify-content: center;
    opacity: 0; pointer-events: none;
    transition: opacity 0.25s ease;
}
.voice-search-modal.show { opacity: 1; pointer-events: auto; }
.voice-search-backdrop {
    position: absolute; inset: 0;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
}
.voice-search-panel {
    position: relative; z-index: 1;
    width: 100%; max-width: 480px;
    max-height: 90vh;
    background: var(--bg-card);
    border-radius: 20px 20px 0 0;
    display: flex; flex-direction: column;
    box-shadow: 0 -4px 30px rgba(0,0,0,0.15);
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(.4,0,.2,1);
}
.voice-search-modal.show .voice-search-panel {
    transform: translateY(0);
}
.voice-search-handle { display: none; }
.voice-search-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 18px 22px 12px; border-bottom: 1px solid var(--border);
}
.voice-search-header h3 {
    font-size: 1rem; font-weight: 700; color: var(--text);
    margin: 0; display: flex; align-items: center; gap: 8px;
}
.voice-search-header h3 i { color: var(--primary); font-size: 1.1rem; }
.voice-search-close {
    width: 36px; height: 36px; border: none; background: none;
    color: var(--text-muted); font-size: 1.1rem; cursor: pointer;
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    transition: background 0.2s;
}
.voice-search-close:hover { background: var(--bg); }

.voice-search-results {
    flex: 1; min-height: 120px; max-height: 40vh;
    overflow-y: auto; padding: 12px 0 12px;
    display: flex; flex-direction: column; align-items: stretch; justify-content: flex-start;
}
.voice-search-placeholder {
    display: flex; flex-direction: column; align-items: stretch;
    gap: 0; color: var(--text-muted);
}
.voice-search-placeholder:empty { display: none; }

.voice-search-instructions {
    padding: 16px 22px;
}
.vs-instr-title {
    font-size: 0.85rem; font-weight: 700; color: var(--text);
    margin-bottom: 12px; display: flex; align-items: center; gap: 6px;
}
.vs-instr-title i { color: var(--primary); font-size: 1rem; }
.vs-instr-steps {
    display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px;
}
.vs-instr-step {
    display: flex; align-items: center; gap: 10px; font-size: 0.85rem; color: var(--text);
}
.vs-instr-step i { color: var(--primary); font-size: 0.85rem; }
.vs-step-num {
    flex-shrink: 0; width: 22px; height: 22px;
    background: var(--primary); color: #fff;
    border-radius: 50%; font-size: 0.72rem; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
}
.vs-instr-example {
    font-size: 0.8rem; color: var(--text-muted); line-height: 1.5;
    padding: 10px 12px; background: var(--accent-light);
    border-radius: 8px; display: flex; align-items: flex-start; gap: 8px;
}
[data-theme="dark"] .vs-instr-example { background: var(--bg); }
.vs-instr-example i { color: var(--primary); font-size: 0.9rem; margin-top: 1px; flex-shrink: 0; }
.vs-instr-example b { color: var(--text); }
.voice-search-placeholder .voice-surah-card {
    border-radius: 0; margin: 0; cursor: default;
}
.voice-search-placeholder .voice-ayat-label {
    padding: 10px 20px 10px 70px;
    font-size: 0.95rem; font-weight: 700;
    color: var(--primary);
    border-bottom: 1px solid var(--border);
    background: var(--accent-light);
}
[data-theme="dark"] .voice-search-placeholder .voice-ayat-label {
    background: var(--bg-card);
}
.voice-open-surah-btn {
    display: inline-flex; align-items: center; gap: 6px;
    margin-top: 8px; padding: 10px 22px;
    background: var(--primary); color: #fff;
    border: none; border-radius: 10px; cursor: pointer;
    font-size: 0.9rem; font-weight: 600;
    transition: background 0.2s, transform 0.15s;
}
.voice-open-surah-btn:hover { background: var(--primary-dark, #1565c0); }
.voice-open-surah-btn:active { transform: scale(0.96); }
.voice-open-surah-btn i { font-size: 1rem; opacity: 0.9; }

.voice-result-item {
    padding: 14px 16px; margin-bottom: 10px;
    background: var(--bg); border: 1px solid var(--border);
    border-radius: 12px; cursor: pointer;
    transition: box-shadow 0.2s, border-color 0.2s;
}
.voice-result-item:hover {
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    border-color: var(--primary);
}
.voice-result-ref {
    font-size: 0.75rem; font-weight: 700; color: var(--primary);
    margin-bottom: 6px; display: flex; align-items: center; gap: 6px;
}
.voice-result-arabic {
    font-family: var(--arabic-font, 'Amiri', serif);
    font-size: 1.2rem; line-height: 2; direction: rtl;
    color: var(--text); margin-bottom: 4px;
}
.voice-result-translation {
    font-size: 0.8rem; color: var(--text-muted); line-height: 1.5;
}

.voice-search-bottom {
    padding: 14px 18px 20px;
    border-top: 1px solid var(--border);
    display: flex; flex-direction: row; align-items: center; gap: 14px;
}
.voice-search-text {
    width: 100%; min-height: 0; max-height: 40px;
    font-size: 0.95rem; text-align: left;
    color: var(--text); line-height: 1.6;
    overflow-y: auto; word-break: break-word;
}
.voice-search-text:empty { display: none; }

.voice-search-wave { display: none; height: 48px; }
.voice-search-wave.active { display: flex; align-items: center; justify-content: center; }
.voice-wave-bars {
    display: flex; align-items: center; gap: 3px; height: 48px;
}
.voice-wave-bars span {
    display: block; width: 3px; border-radius: 2px;
    background: var(--primary); opacity: 0.6;
    animation: voiceWave 0.8s ease-in-out infinite alternate;
}
.voice-wave-bars span:nth-child(1)  { height: 8px;  animation-delay: 0s; }
.voice-wave-bars span:nth-child(2)  { height: 16px; animation-delay: 0.05s; }
.voice-wave-bars span:nth-child(3)  { height: 24px; animation-delay: 0.1s; }
.voice-wave-bars span:nth-child(4)  { height: 32px; animation-delay: 0.15s; }
.voice-wave-bars span:nth-child(5)  { height: 40px; animation-delay: 0.2s; }
.voice-wave-bars span:nth-child(6)  { height: 32px; animation-delay: 0.25s; }
.voice-wave-bars span:nth-child(7)  { height: 24px; animation-delay: 0.3s; }
.voice-wave-bars span:nth-child(8)  { height: 16px; animation-delay: 0.35s; }
.voice-wave-bars span:nth-child(9)  { height: 8px;  animation-delay: 0.4s; }
.voice-wave-bars span:nth-child(10) { height: 16px; animation-delay: 0.45s; }
.voice-wave-bars span:nth-child(11) { height: 24px; animation-delay: 0.5s; }
.voice-wave-bars span:nth-child(12) { height: 36px; animation-delay: 0.55s; }
.voice-wave-bars span:nth-child(13) { height: 40px; animation-delay: 0.6s; }
.voice-wave-bars span:nth-child(14) { height: 36px; animation-delay: 0.65s; }
.voice-wave-bars span:nth-child(15) { height: 24px; animation-delay: 0.7s; }
.voice-wave-bars span:nth-child(16) { height: 16px; animation-delay: 0.75s; }
.voice-wave-bars span:nth-child(17) { height: 8px;  animation-delay: 0.8s; }
.voice-wave-bars span:nth-child(18) { height: 16px; animation-delay: 0.85s; }
.voice-wave-bars span:nth-child(19) { height: 24px; animation-delay: 0.9s; }
.voice-wave-bars span:nth-child(20) { height: 32px; animation-delay: 0.95s; }

@keyframes voiceWave {
    0%   { transform: scaleY(0.3); opacity: 0.4; }
    100% { transform: scaleY(1);   opacity: 0.9; }
}

.voice-search-hint {
    flex: 1; min-width: 0;
    font-size: 1rem; font-weight: 600;
    color: var(--text); text-align: left;
}

.voice-search-mic {
    flex-shrink: 0;
    width: 56px; height: 56px;
    border-radius: 50%; border: none;
    background: var(--primary); color: #fff;
    font-size: 1.4rem; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 16px rgba(46,222,149,0.3);
    transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}
.voice-search-mic:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 24px rgba(46,222,149,0.4);
}
.voice-search-mic.recording {
    background: #ef4444;
    box-shadow: 0 4px 16px rgba(239,68,68,0.4);
    animation: micPulse 1.2s ease-in-out infinite;
}
@keyframes micPulse {
    0%, 100% { transform: scale(1); }
    50%      { transform: scale(1.08); }
}


.voice-search-loading {
    display: flex; align-items: center; justify-content: center;
    gap: 8px; padding: 30px; color: var(--text-muted); font-size: 0.85rem;
}
.voice-search-loading .spinner-sm {
    width: 18px; height: 18px;
    border: 2px solid var(--border); border-top-color: var(--primary);
    border-radius: 50%; animation: spin 0.7s linear infinite;
}

.voice-search-no-results {
    text-align: center; padding: 30px 10px; color: var(--text-muted); font-size: 0.85rem;
}

/* ============ LAZY LOAD ============ */

.ayah-sentinel { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 28px 20px; color: var(--text-muted); font-size: 0.85rem; }
.ayah-fade-in { animation: ayahAppear 0.4s ease both; }
@keyframes ayahAppear { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }

/* ============ RESPONSIVE ============ */

@media (max-width: 1023px) {
    .read-view-empty { display: none !important; }
}

@media (max-width: 640px) {
    .list-top-bar { padding: 6px 12px 0; min-height: 42px; }
    .list-top-bar .header-btn { width: 36px; height: 36px; font-size: 1.1rem; }
    .list-top-bar #settings-toggle,
    .list-top-bar #list-menu-toggle { width: 38px; height: 38px; font-size: 1.3rem; border: none; }
    .list-top-bar .header-btn-info.text-btn { padding: 0 8px; font-size: 0.78rem; }
    .list-top-bar-links-row .header-btn-info.text-btn { font-size: 0.72rem; padding: 0 6px; }
    .list-top-bar .info-top-link { min-height: 36px; max-width: min(100%, 200px); gap: 4px; }
    .list-top-bar .info-top-link-logo { width: 18px; height: 18px; border-radius: 4px; }
    .list-top-bar #info-toggle.info-top-link {
        min-height: 0;
        max-width: min(100%, 400px);
        gap: 6px;
        padding: 0;
        margin: 0;
        font-size: 1.22rem;
    }
    .list-top-bar #info-toggle .info-top-link-logo {
        width: 28px;
        height: 28px;
        border-radius: 6px;
    }
    .list-hero { padding: 16px 16px 10px; }
    .list-logo { display: block; max-width: 140px; width: 44%; margin-left: auto; margin-right: auto; }
    .list-toolbar { padding: 6px 12px; }
    .read-header { padding: 8px 12px; gap: 8px; }
    .back-btn { width: 40px; height: 40px; font-size: 1.1rem; }
    .surah-banner { padding: 22px 14px; }
    .surah-banner .surah-name-ar { font-size: 2rem; }
    .ayah-list { padding: 8px 14px 40px; }
    .ayah-card { margin: 0 -14px; }
    .ayah-arabic { font-size: calc(var(--arabic-size, 28px) * 0.85) !important; }
    .audio-player { padding: 0; }
    .player-row { padding: 6px 10px; }
    .player-row { gap: 8px; }
    .player-controls { gap: 2px; }
    .player-btn { width: 32px; height: 32px; font-size: 0.85rem; }
    .audio-player #player-repeat,
    .audio-player #player-range { width: auto; min-width: 44px; height: 44px; padding: 0 8px; font-size: 1rem; }
    .player-btn.play-btn { width: 38px; height: 38px; margin: 0 1px; font-size: 1rem; }
    .player-surah { font-size: 0.7rem; max-width: 70px; }
    .player-ayah-num { font-size: 0.6rem; }
    .player-volume { display: none; }
    .audio-player.expanded {
        padding: 14px 12px 20px;
    }
    .player-expanded-controls .player-btn {
        width: 48px;
        height: 48px;
        font-size: 1.1rem;
    }
    .player-expanded-controls .play-btn {
        width: 58px;
        height: 58px;
        font-size: 1.45rem;
    }
}

/* Тост после «Поделиться» (ajax info и т.д.) */
.app-toast {
    position: fixed;
    left: 50%;
    bottom: max(20px, calc(var(--player-height, 72px) + 16px));
    z-index: 2500;
    max-width: min(92vw, 360px);
    padding: 12px 18px;
    margin: 0;
    border-radius: var(--radius-sm);
    background: var(--text);
    color: #fff;
    font-size: 0.88rem;
    font-weight: 500;
    line-height: 1.45;
    text-align: center;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.22);
    opacity: 0;
    transform: translateX(-50%) translateY(12px);
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
}
.app-toast.app-toast--visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ============ FIRST-RUN SETUP WIZARD (fullscreen) ============ */
.setup-wizard {
    position: fixed;
    inset: 0;
    z-index: 2500;
    display: flex;
    flex-direction: column;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}
.setup-wizard.show {
    opacity: 1;
    pointer-events: auto;
}
body.setup-wizard-open {
    overflow: hidden;
}
body.setup-wizard-open .app-container {
    pointer-events: none;
    user-select: none;
}
.setup-wizard-backdrop {
    display: none;
}
.setup-wizard-panel {
    position: relative;
    flex: 1;
    width: 100%;
    height: 100%;
    max-height: none;
    min-height: 0;
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
    border: none;
    border-radius: 0;
    box-shadow: none;
    padding: max(20px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) max(18px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
    transform: none;
    transition: none;
}
.setup-wizard.show .setup-wizard-panel {
    transform: none;
}
.setup-wizard-progress {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin-bottom: 14px;
    flex-shrink: 0;
}
.setup-wizard-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--border);
    transition: background 0.2s, transform 0.2s;
}
.setup-wizard-dot.active {
    background: var(--primary);
    transform: scale(1.15);
}
.setup-wizard-dot.done {
    background: var(--primary-light);
}
.setup-wizard-line {
    width: 36px;
    height: 2px;
    background: var(--border);
    margin: 0 4px;
}
.setup-wizard-step-label {
    margin: 0 0 6px;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--primary);
    text-align: center;
}
.setup-wizard-title {
    margin: 0 0 6px;
    font-size: clamp(1.35rem, 4vw, 1.75rem);
    font-weight: 700;
    text-align: center;
    color: var(--text);
    line-height: 1.25;
    flex-shrink: 0;
}
.setup-wizard-subtitle {
    margin: 0 0 16px;
    font-size: clamp(0.92rem, 2.5vw, 1.05rem);
    color: var(--text-muted);
    text-align: center;
    line-height: 1.4;
    flex-shrink: 0;
}
.setup-wizard-body {
    flex: 1;
    min-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.setup-wizard-step {
    display: none;
    flex-direction: column;
    min-height: 0;
    height: 100%;
}
.setup-wizard-step-active {
    display: flex;
}
/* Step 1 — welcome & language */
.setup-wizard--step-1 .setup-wizard-title {
    font-size: clamp(1.5rem, 5vw, 2rem);
}
.setup-wizard--step-1 .setup-wizard-subtitle {
    margin-bottom: 12px;
}
.setup-wizard-step1-inner,
.setup-wizard-step-inner {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    max-width: 720px;
    margin: 0 auto;
    padding: 4px 0;
}
.setup-wizard-step1-inner {
    justify-content: center;
    gap: 20px;
    padding: 8px 0 4px;
}
.setup-wizard-step1-hero {
    text-align: center;
    flex-shrink: 0;
}
.setup-wizard-hero-tagline {
    margin: 0;
    font-size: clamp(0.95rem, 2.8vw, 1.1rem);
    color: var(--text-muted);
    line-height: 1.45;
    max-width: 28em;
    margin-left: auto;
    margin-right: auto;
}
.setup-wizard-step-inner .setup-wizard-scroll-list {
    flex: 1;
    min-height: 0;
}
.setup-wizard-lang-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    width: 100%;
}
.setup-wizard-lang-card {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 14px;
    width: 100%;
    padding: 16px 18px;
    min-height: 76px;
    border: 2px solid var(--border);
    border-radius: 16px;
    background: var(--bg);
    cursor: pointer;
    text-align: left;
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s, transform 0.15s;
    -webkit-tap-highlight-color: transparent;
}
.setup-wizard-lang-card:hover {
    border-color: var(--primary);
    background: var(--primary-light);
    transform: translateY(-1px);
}
.setup-wizard-lang-card.selected {
    border-color: var(--primary);
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--bg-card) 100%);
    box-shadow: 0 4px 20px rgba(84, 160, 255, 0.2);
}
.setup-wizard-lang-card:active {
    transform: translateY(0);
}
.setup-wizard-lang-flag-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: var(--bg-card);
    font-size: 1.85rem;
    line-height: 1;
    box-shadow: inset 0 0 0 1px var(--border);
}
.setup-wizard-lang-card.selected .setup-wizard-lang-flag-wrap {
    box-shadow: inset 0 0 0 2px var(--primary);
}
.setup-wizard-lang-text {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}
.setup-wizard-lang-name {
    font-size: clamp(1.1rem, 3.5vw, 1.25rem);
    font-weight: 700;
    color: var(--text);
    line-height: 1.2;
}
.setup-wizard-lang-native {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.3;
}
.setup-wizard-lang-card--rtl .setup-wizard-lang-text {
    text-align: right;
}
.setup-wizard-lang-check {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    color: var(--primary);
    font-size: 1.45rem;
    opacity: 0;
    transform: scale(0.6);
    transition: opacity 0.2s, transform 0.2s;
}
.setup-wizard-lang-card.selected .setup-wizard-lang-check {
    opacity: 1;
    transform: scale(1);
}
.setup-wizard-step-hint {
    margin: 0;
    text-align: center;
    font-size: 0.82rem;
    color: var(--text-muted);
    line-height: 1.4;
    flex-shrink: 0;
    padding-top: 4px;
}
@media (min-width: 540px) {
    .setup-wizard-lang-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 14px;
    }
    .setup-wizard-lang-card {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto;
        justify-items: center;
        text-align: center;
        padding: 20px 14px 18px;
        min-height: 148px;
        gap: 10px;
    }
    .setup-wizard-lang-card--rtl .setup-wizard-lang-text {
        text-align: center;
    }
    .setup-wizard-lang-text {
        align-items: center;
    }
    .setup-wizard-lang-check {
        order: -1;
        margin-bottom: 2px;
    }
    .setup-wizard-lang-flag-wrap {
        width: 56px;
        height: 56px;
        font-size: 2rem;
    }
}
@media (min-width: 540px) {
    .setup-wizard--step-1 .setup-wizard-actions {
        max-width: 720px;
    }
}
.setup-wizard-search-wrap {
    position: relative;
    margin-bottom: 10px;
    flex-shrink: 0;
}
.setup-wizard-search-wrap .bi-search {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
}
.setup-wizard-search {
    width: 100%;
    padding: 10px 12px 10px 36px;
    border: 1px solid var(--border);
    border-radius: 12px;
    font-size: 0.95rem;
    background: var(--bg);
    color: var(--text);
}
.setup-wizard-search:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}
.setup-wizard-scroll-list {
    flex: 1;
    min-height: 0;
    max-height: none;
    overflow-y: auto;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--bg);
    -webkit-overflow-scrolling: touch;
}
.setup-wizard-lang-header {
    padding: 10px 14px 6px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--text-muted);
    background: var(--bg-card);
    position: sticky;
    top: 0;
    z-index: 1;
    border-bottom: 1px solid var(--border);
}
.setup-wizard-lang-header.hidden,
.setup-wizard-option.hidden {
    display: none !important;
}
.setup-wizard-option {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 11px 14px;
    border: none;
    border-bottom: 1px solid var(--border);
    background: transparent;
    cursor: pointer;
    text-align: left;
    color: var(--text);
    transition: background 0.15s;
}
.setup-wizard-option:last-child {
    border-bottom: none;
}
.setup-wizard-option:hover {
    background: var(--primary-light);
}
.setup-wizard-option.selected {
    background: var(--primary-light);
}
.setup-wizard-option-name {
    flex: 1;
    font-size: 0.95rem;
    font-weight: 500;
    line-height: 1.3;
}
.setup-wizard-option-flag {
    font-size: 1.2rem;
    line-height: 1;
}
.setup-wizard-option-check {
    color: var(--primary);
    font-size: 1.1rem;
    opacity: 0;
}
.setup-wizard-option.selected .setup-wizard-option-check {
    opacity: 1;
}
.setup-wizard-reciter-list .setup-wizard-option {
    padding: 10px 14px;
}
.setup-wizard-reciter-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}
.setup-wizard-reciter-avatar.initials {
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    color: #fff;
}
.setup-wizard-reciter-meta {
    flex: 1;
    min-width: 0;
}
.setup-wizard-reciter-name-en {
    display: block;
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 2px;
}
.setup-wizard-actions {
    display: flex;
    gap: 10px;
    margin-top: 16px;
    flex-shrink: 0;
    max-width: 720px;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
}
.setup-wizard--step-1 .setup-wizard-btn-next {
    padding: 15px 20px;
    font-size: 1.05rem;
}
.setup-wizard-btn {
    flex: 1;
    padding: 13px 16px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: opacity 0.2s, transform 0.15s;
}
.setup-wizard-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}
.setup-wizard-btn-back {
    flex: 0 0 auto;
    min-width: 96px;
    background: var(--bg);
    color: var(--text);
    border: 1px solid var(--border);
}
.setup-wizard-btn-next {
    background: var(--primary);
    color: #fff;
}
.setup-wizard-btn-next:not(:disabled):hover {
    opacity: 0.92;
}
body.interface-rtl .setup-wizard-search-wrap .bi-search {
    left: auto;
    right: 12px;
}
body.interface-rtl .setup-wizard-search {
    padding: 10px 36px 10px 12px;
}
body.interface-rtl .setup-wizard-option {
    text-align: right;
}
body.interface-rtl .setup-wizard--step-1 .setup-wizard-lang-card:not(.setup-wizard-lang-card--rtl) {
    text-align: right;
    grid-template-columns: auto 1fr auto;
}
body.interface-rtl .setup-wizard--step-1 .setup-wizard-lang-card:not(.setup-wizard-lang-card--rtl) .setup-wizard-lang-text {
    text-align: right;
}
@media (max-width: 539px) {
    body.interface-rtl .setup-wizard--step-1 .setup-wizard-lang-card {
        grid-template-columns: auto 1fr auto;
    }
}

.hidden { display: none !important; }

.ayah-kword.mq-word-tap {
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.15s ease, box-shadow 0.15s ease;
}
.ayah-kword.mq-word-tap:hover {
    background: rgba(46, 220, 149, 0.18);
}
.ayah-kword.is-word-active {
    background: rgba(46, 220, 149, 0.28);
    box-shadow: 0 0 0 1px rgba(46, 220, 149, 0.45);
}
.mq-word-panel {
    position: fixed;
    left: 0;
    right: 0;
    bottom: calc(var(--player-height, 72px) + env(safe-area-inset-bottom, 0px));
    z-index: 118;
    padding: 0 12px 10px;
    pointer-events: none;
}
.mq-word-panel[hidden] { display: none !important; }
.mq-word-panel-inner {
    pointer-events: auto;
    max-width: 520px;
    margin: 0 auto;
    background: rgba(8, 24, 32, 0.96);
    border: 1px solid rgba(125, 255, 224, 0.22);
    border-radius: 16px;
    padding: 14px 44px 12px 14px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
    color: #eaf7ff;
    max-height: min(52vh, 420px);
    overflow-y: auto;
}
.mq-word-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    cursor: pointer;
}
.mq-word-panel-inner { position: relative; }
.mq-word-title {
    margin: 0 0 8px;
    font-size: 0.82rem;
    font-weight: 600;
    color: rgba(234, 247, 255, 0.72);
}
.mq-word-form {
    font-family: 'Amiri', 'Scheherazade New', serif;
    font-size: clamp(1.35rem, 4.5vw, 1.85rem);
    line-height: 1.6;
    text-align: right;
    margin-bottom: 10px;
}
.mq-word-meta {
    display: grid;
    gap: 6px;
    margin-bottom: 12px;
    font-size: 0.84rem;
}
.mq-word-meta div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 6px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.mq-word-meta span { color: rgba(234, 247, 255, 0.65); }
.mq-word-conc-title {
    margin: 0 0 8px;
    font-size: 0.82rem;
    font-weight: 700;
    color: rgba(234, 247, 255, 0.8);
}
.mq-word-conc-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.mq-word-conc-item {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    padding: 8px 10px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    cursor: pointer;
    font: inherit;
    min-width: 72px;
}
.mq-word-conc-ref { font-size: 0.72rem; opacity: 0.75; }
.mq-word-conc-form {
    font-family: 'Amiri', 'Scheherazade New', serif;
    font-size: 1.05rem;
}
.mq-word-empty {
    margin: 0;
    font-size: 0.84rem;
    color: rgba(234, 247, 255, 0.65);
}
.mq-word-source {
    margin: 10px 0 0;
    font-size: 0.72rem;
    color: rgba(234, 247, 255, 0.45);
}
