:root {
    color-scheme: light;
    --bg: #f4f1e8;
    --surface: #fffdf8;
    --surface-2: #f0ede4;
    --surface-3: #e8e4d8;
    --ink: #182622;
    --muted: #6d7773;
    --line: #dedbd1;
    --brand: #123c34;
    --brand-2: #205e50;
    --brand-soft: #dcebe5;
    --gold: #bf8d36;
    --gold-soft: #f5ead2;
    --success: #2c8063;
    --danger: #b95b54;
    --tajweed-muted: #7a817e;
    --tajweed-madd-normal: #2573a8;
    --tajweed-madd-strong: #b34f45;
    --tajweed-madd-permissible: #7654a6;
    --tajweed-ghunnah: #9b3f79;
    --tajweed-ikhafa: #23775d;
    --tajweed-qalaqah: #bd6b16;
    --shadow: 0 16px 48px rgba(31, 45, 40, .08);
    --arabic-size: 36px;
    --meal-size: 14px;
    --word-meaning-size: 10px;
    --reciter-select-size: 16px;
    --search-ui-size: clamp(12px, calc(var(--meal-size) * .82), 17px);
    --search-meta-size: clamp(11px, calc(var(--meal-size) * .72), 15px);
    --search-hit-bg: #ffe084;
    --search-hit-ink: #17231f;
    --topbar-height: 72px;
    --persistent-controls-height: 44px;
    --persistent-controls-top: 14px;
    --persistent-controls-right: 28px;
    --persistent-controls-reserve: 226px;
    --juzhan-fatha: #df514a;
    --juzhan-kasra: #3378d4;
    --juzhan-damma: #168a60;
    --juzhan-sukun: #687789;
    --juzhan-shadda: #8b55c5;
    --juzhan-tanwin: #d47a08;
    --juzhan-madd: #008ca3;
}

.word-detail-dialog {
    width: min(760px, calc(100vw - 28px));
    max-height: min(820px, calc(100dvh - 28px));
}

.word-detail-content {
    display: grid;
    gap: 18px;
    overflow: auto;
    padding: 2px 4px 8px;
}

.word-detail-hero {
    display: grid;
    justify-items: center;
    gap: 5px;
    padding: 18px;
    border-radius: 18px;
    background: var(--surface-soft, #f7f3e9);
}

.word-detail-hero > strong {
    font-family: "Amiri Quran", "Traditional Arabic", serif;
    font-size: clamp(38px, 8vw, 58px);
    line-height: 1.45;
}

.word-detail-hero > span,
.word-detail-source,
.word-segment-list article > span {
    color: var(--muted, #6b6b64);
}

.word-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.word-detail-field {
    display: grid;
    gap: 5px;
    min-height: 74px;
    padding: 12px 14px;
    border: 1px solid var(--line, #ddd8cc);
    border-radius: 14px;
    background: var(--surface, #fff);
}

.word-detail-field small {
    color: var(--muted, #6b6b64);
}

.word-detail-arabic-value {
    font-family: "Amiri Quran", "Traditional Arabic", serif;
    font-size: 25px;
}

.word-detail-section {
    display: grid;
    gap: 10px;
}

.word-detail-section h3 {
    margin: 0;
    font-size: 16px;
}

.word-segment-list {
    display: grid;
    gap: 8px;
}

.word-segment-list article {
    display: grid;
    grid-template-columns: minmax(72px, auto) 1fr;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border: 1px solid var(--line, #ddd8cc);
    border-radius: 12px;
}

.word-segment-list article > strong {
    font-family: "Amiri Quran", "Traditional Arabic", serif;
    font-size: 25px;
    text-align: center;
}

.root-occurrence-list {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    max-height: 180px;
    overflow: auto;
}

.root-occurrence-list button {
    padding: 8px 10px;
    border: 1px solid var(--line, #ddd8cc);
    border-radius: 999px;
    background: var(--surface, #fff);
    color: inherit;
    cursor: pointer;
}

.root-occurrence-list button:hover {
    border-color: var(--accent, #b78a38);
}

.word-detail-source {
    margin: 0;
    font-size: 12px;
}

.word-detail-source a {
    color: inherit;
    font-weight: 700;
}

.word-detail-error {
    color: var(--danger, #9d342f);
}

@media (max-width: 600px) {
    .word-detail-dialog {
        width: calc(100vw - 18px);
        max-height: calc(100dvh - 18px);
    }

    .word-detail-grid {
        grid-template-columns: 1fr;
    }
}

html[data-theme="dark"] {
    color-scheme: dark;
    --bg: #101916;
    --surface: #17231f;
    --surface-2: #1d2c27;
    --surface-3: #25362f;
    --ink: #edf2ee;
    --muted: #a7b1ac;
    --line: #31443d;
    --brand: #84cbb5;
    --brand-2: #9bd8c5;
    --brand-soft: #263e36;
    --gold: #e2b96e;
    --gold-soft: #3e3424;
    --success: #6dc3a4;
    --danger: #e48d84;
    --tajweed-muted: #a5aaa8;
    --tajweed-madd-normal: #70b7e6;
    --tajweed-madd-strong: #ff948a;
    --tajweed-madd-permissible: #c5a3ed;
    --tajweed-ghunnah: #ee93cc;
    --tajweed-ikhafa: #75d0ad;
    --tajweed-qalaqah: #f2ae5d;
    --shadow: 0 18px 52px rgba(0, 0, 0, .22);
    --juzhan-fatha: #ff8179;
    --juzhan-kasra: #82b5ff;
    --juzhan-damma: #61d6a4;
    --juzhan-sukun: #b2becb;
    --juzhan-shadda: #c99bf4;
    --juzhan-tanwin: #ffc067;
    --juzhan-madd: #68d9e8;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    min-width: 320px;
    min-height: 100vh;
    background: var(--bg);
    color: var(--ink);
    font-family: "DM Sans", system-ui, sans-serif;
    -webkit-font-smoothing: antialiased;
}

button, input, select { font: inherit; }
button, select { color: inherit; }
button { cursor: pointer; }

/*
 * Ortak buton geri bildirimi
 * Fare, dokunmatik ekran, klavye ve TV kumandasinda her etkin komutun
 * alindigini ayni kisa "basma" hareketiyle belli eder.
 */
:where(button, input[type="button"], input[type="submit"], input[type="reset"], [role="button"]) {
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

:where(button:not(:disabled), input[type="button"]:not(:disabled), input[type="submit"]:not(:disabled), input[type="reset"]:not(:disabled), [role="button"]:not([aria-disabled="true"])):active,
:where(button, input[type="button"], input[type="submit"], input[type="reset"], [role="button"]).ui-button-pressed {
    transform: translateY(2px) scale(.97);
    filter: brightness(.88) saturate(1.08);
    box-shadow: inset 0 3px 7px rgba(0, 0, 0, .24), 0 1px 2px rgba(0, 0, 0, .12) !important;
}

:where(button, input[type="button"], input[type="submit"], input[type="reset"], [role="button"]).ui-button-confirmed {
    outline: 3px solid #2fa675;
    outline-offset: 2px;
    animation: ui-button-confirmed .72s ease-out;
}

@keyframes ui-button-confirmed {
    0% { filter: brightness(.9); box-shadow: inset 0 3px 7px rgba(0, 0, 0, .22), 0 0 0 0 rgba(47, 166, 117, .42); }
    42% { filter: brightness(1.08) saturate(1.12); box-shadow: inset 0 1px 2px rgba(0, 0, 0, .1), 0 0 0 7px rgba(47, 166, 117, .22); }
    100% { filter: none; box-shadow: 0 0 0 0 rgba(47, 166, 117, 0); }
}

@media (prefers-reduced-motion: reduce) {
    :where(button:not(:disabled), input[type="button"]:not(:disabled), input[type="submit"]:not(:disabled), input[type="reset"]:not(:disabled), [role="button"]:not([aria-disabled="true"])):active,
    :where(button, input[type="button"], input[type="submit"], input[type="reset"], [role="button"]).ui-button-pressed {
        transform: none;
        filter: brightness(.88);
    }

    :where(button, input[type="button"], input[type="submit"], input[type="reset"], [role="button"]).ui-button-confirmed {
        animation: none;
    }
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: fixed;
    z-index: 1000;
    left: 16px;
    top: -80px;
    background: var(--brand);
    color: var(--surface);
    padding: 10px 16px;
    border-radius: 8px;
}

.skip-link:focus { top: 8px; }

:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--gold) 80%, white);
    outline-offset: 3px;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 100;
    height: var(--topbar-height);
    display: grid;
    grid-template-columns: 260px minmax(240px, 620px) minmax(var(--persistent-controls-reserve), 1fr);
    align-items: center;
    gap: 28px;
    padding: 0 28px;
    border-bottom: 1px solid var(--line);
    background: color-mix(in srgb, var(--surface) 92%, transparent);
    backdrop-filter: blur(18px);
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--ink);
    text-decoration: none;
}

.brand-mark {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 50% 50% 45% 55%;
    background: var(--brand);
    color: var(--surface);
    font: 28px/1 "Amiri Quran", serif;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.16);
}

.brand strong, .brand small { display: block; }
.brand strong { font-size: 17px; letter-spacing: -.02em; }
.brand small { margin-top: 1px; color: var(--muted); font-size: 10px; letter-spacing: .06em; text-transform: uppercase; }

.quick-search, .sidebar-search {
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid var(--line);
    background: var(--surface-2);
    border-radius: 12px;
    padding: 0 14px;
}

.quick-search { position: relative; height: 42px; }
.quick-search input, .sidebar-search input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: 0;
    color: var(--ink);
    background: transparent;
}
.quick-search input { font-size: max(14px, var(--meal-size)); }
.quick-search input:dir(rtl) { font: clamp(20px, var(--arabic-size), 30px)/1.2 "Amiri Quran", "Traditional Arabic", serif; }
.quick-search input::-webkit-search-cancel-button { display: none; }
.quick-search-submit,
.quick-search-clear,
.quick-search-enter {
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    min-width: 30px;
    height: 30px;
    padding: 0;
    border: 0;
    border-radius: 8px;
    color: var(--muted);
    background: transparent;
    line-height: 1;
}
.quick-search-submit:hover,
.quick-search-clear:hover { color: var(--brand); background: var(--brand-soft); }
.quick-search-clear { font-size: 20px; }
.quick-search-clear:disabled { opacity: .32; cursor: default; }
.quick-search-enter {
    color: var(--muted);
    border: 1px solid var(--line);
    border-radius: 5px;
    padding: 2px 7px;
    background: var(--surface);
    font-size: 10px;
    font-family: inherit;
}
.quick-search-enter:hover { color: var(--brand); border-color: var(--brand); }
.quick-mode-search-tool {
    flex: 0 0 auto;
    width: 34px;
    min-width: 34px;
    height: 32px;
    display: none;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 0 4px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--brand);
    background: var(--surface);
    font: inherit;
    font-size: 13px;
    cursor: pointer;
}
.quick-mode-search-tool b { font-size: 8px; line-height: 1; }
.quick-mode-search-tool:hover, .quick-mode-search-tool[aria-expanded="true"] { border-color: var(--brand); background: var(--brand-soft); }
.quick-mode-search-tool.listening { color: white; border-color: var(--danger); background: var(--danger); animation: pulse 1.2s infinite; }
body.app-mode-read .quick-mode-search-tool,
body.app-mode-understand .quick-mode-search-tool,
body.app-mode-revelation .quick-mode-search-tool,
body.app-mode-commands .quick-mode-search-tool,
body.app-mode-hifz .quick-mode-search-tool,
body.app-mode-daily .quick-mode-search-tool { display: inline-flex; }
.quick-result-navigation {
    flex: 0 0 auto;
    height: 32px;
    display: none;
    align-items: center;
    gap: 1px;
    padding: 2px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: var(--surface);
}
body.app-mode-read .quick-result-navigation,
body.app-mode-understand .quick-result-navigation,
body.app-mode-revelation .quick-result-navigation,
body.app-mode-commands .quick-result-navigation,
body.app-mode-hifz .quick-result-navigation,
body.app-mode-daily .quick-result-navigation { display: inline-flex; }
.quick-result-navigation button {
    width: 27px;
    min-width: 27px;
    height: 26px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 6px;
    color: var(--brand);
    background: transparent;
    font: 800 20px/1 "DM Sans", system-ui, sans-serif;
    cursor: pointer;
}
.quick-result-navigation button:hover:not(:disabled) { background: var(--brand-soft); }
.quick-result-navigation button:disabled { color: var(--muted); opacity: .35; cursor: default; }
.quick-result-navigation output { min-width: 34px; color: var(--muted); font-size: 8px; font-weight: 750; text-align: center; white-space: nowrap; }
.topbar-arabic-keyboard {
    position: absolute;
    z-index: 500;
    top: calc(100% + 9px);
    left: 0;
    width: min(620px, calc(100vw - 24px));
    display: grid;
    grid-template-columns: repeat(10, minmax(0, 1fr));
    gap: 6px;
    padding: 11px;
    border: 1px solid color-mix(in srgb, var(--gold) 50%, var(--line));
    border-radius: 14px;
    background: var(--surface);
    box-shadow: var(--shadow);
    direction: rtl;
}
.topbar-arabic-keyboard[hidden] { display: none !important; }
.topbar-arabic-keyboard .arabic-search-key { min-height: 40px; }
.topbar-arabic-keyboard .arabic-search-key.wide { grid-column: span 2; }
.quick-search-results {
    position: absolute;
    z-index: 510;
    top: calc(100% + 9px);
    left: 0;
    right: 0;
    max-height: min(68vh, 610px);
    overflow: auto;
    overscroll-behavior: contain;
    display: grid;
    gap: 7px;
    padding: 10px;
    border: 1px solid color-mix(in srgb, var(--gold) 48%, var(--line));
    border-radius: 15px;
    background: var(--surface);
    box-shadow: var(--shadow);
}
.quick-search-results[hidden] { display: none !important; }
.quick-search-results-summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 3px 4px 7px; color: var(--muted); font-size: var(--search-meta-size); }
.quick-search-results-summary strong { color: var(--brand); font-size: var(--search-ui-size); }
.quick-search-result {
    width: 100%;
    display: grid;
    gap: 7px;
    padding: 11px 12px;
    border: 1px solid var(--line);
    border-radius: 11px;
    color: var(--ink);
    background: var(--surface-2);
    text-align: left;
    cursor: pointer;
}
.quick-search-result:hover, .quick-search-result:focus-visible, .quick-search-result[aria-selected="true"] { border-color: var(--gold); background: color-mix(in srgb, var(--gold-soft) 45%, var(--surface)); }
.quick-search-result > header { display: flex; align-items: center; justify-content: space-between; gap: 9px; }
.quick-search-result > header strong { color: var(--brand); font-size: var(--search-ui-size); }
.quick-search-result-fields { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px; }
.quick-search-result-fields span { padding: 3px 7px; border-radius: 999px; color: var(--brand); background: var(--brand-soft); font-size: var(--search-meta-size); font-weight: 800; }
.quick-search-result-arabic { margin: 0; direction: rtl; text-align: right; color: var(--ink); font: var(--arabic-size)/1.8 "Amiri Quran", "Traditional Arabic", serif; }
.quick-search-result-text { margin: 0; overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; color: var(--muted); font: var(--meal-size)/1.68 Georgia, "Times New Roman", serif; }
.quick-search-result-text b { margin-right: 5px; color: var(--gold); font: 800 var(--search-meta-size)/1.2 "DM Sans", system-ui, sans-serif; text-transform: uppercase; }
.quick-search-load-more { min-height: 42px; border: 1px solid var(--line); border-radius: 10px; color: var(--brand); background: var(--surface-2); font-size: var(--search-ui-size); font-weight: 800; cursor: pointer; }
.quick-search-load-more:hover { border-color: var(--brand); background: var(--brand-soft); }
.search-match-highlight {
    display: inline;
    padding: .02em .12em;
    border-radius: .24em;
    color: var(--search-hit-ink);
    background: var(--search-hit-bg);
    box-shadow: inset 0 -.15em 0 color-mix(in srgb, var(--gold) 52%, transparent);
    font: inherit;
    text-decoration: inherit;
    box-decoration-break: clone;
    -webkit-box-decoration-break: clone;
}
.search-match-highlight-word {
    padding: .04em .14em;
    border-radius: .24em;
    background: var(--search-hit-bg);
    outline: 2px solid color-mix(in srgb, var(--gold) 66%, transparent);
    outline-offset: 1px;
    box-decoration-break: clone;
    -webkit-box-decoration-break: clone;
}
.search-action {
    flex: 0 0 auto;
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 8px;
    color: var(--muted);
    background: transparent;
    line-height: 1;
}
.search-action:hover { color: var(--brand); background: var(--brand-soft); }
.search-action.listening { color: white; background: var(--danger); animation: pulse 1.2s infinite; }
.search-action.locating { color: #1b2b26; background: var(--gold); animation: pulse 1.2s infinite; }
.search-go { color: var(--surface); background: var(--brand); }
.search-go:hover { color: var(--surface); background: var(--brand-2); }
.search-hint { margin: -5px 4px 10px; color: var(--muted); font-size: 9px; line-height: 1.4; }

.topbar-actions { min-width: 0; display: flex; align-items: center; justify-content: flex-end; gap: 8px; white-space: nowrap; }
.persistent-topbar-actions {
    position: fixed;
    z-index: 240;
    top: max(var(--persistent-controls-top), env(safe-area-inset-top));
    right: max(var(--persistent-controls-right), env(safe-area-inset-right));
    height: var(--persistent-controls-height);
    pointer-events: auto;
    isolation: isolate;
}
.ui-language-control {
    height: 40px;
    min-width: 118px;
    max-width: 168px;
    padding: 0 8px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--ink);
}
.ui-language-control > span[aria-hidden="true"] { flex: 0 0 auto; font-size: 18px; line-height: 1; }
.ui-language-control select {
    width: 100%;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    font-size: 12px;
    font-weight: 650;
    cursor: pointer;
}
html[dir="rtl"] .ui-language-control select { direction: rtl; }
.icon-button, .avatar-button, .round-button {
    border: 1px solid var(--line);
    background: var(--surface);
    display: grid;
    place-items: center;
}
.icon-button { width: 40px; height: 40px; border-radius: 10px; font-size: 20px; }
.avatar-button { width: 38px; height: 38px; border-radius: 50%; background: var(--brand); color: var(--surface); border-color: var(--brand); font-weight: 700; }
.topbar-command-button {
    position: relative;
    flex: 0 0 auto;
    color: var(--muted);
    cursor: pointer;
    touch-action: manipulation;
}
.topbar-command-button:hover { color: var(--brand); border-color: var(--brand); background: var(--brand-soft); }
.topbar-command-button > span { display: grid; place-items: center; line-height: 1; pointer-events: none; }
.help-top-button > span { font: 800 19px/1 Georgia, serif; }
.comments-topbar-button > span { font-size: 17px; }
.daily-ayah-topbar-button > span { color: var(--gold); font: 20px/1 "Amiri Quran", Georgia, serif; }
.daily-ayah-topbar-button:hover > span { color: var(--brand); }
.comments-topbar-button > b {
    position: absolute;
    top: -5px;
    right: -5px;
    min-width: 17px;
    height: 17px;
    display: grid;
    place-items: center;
    padding: 0 4px;
    border: 2px solid var(--surface);
    border-radius: 999px;
    color: #fff;
    background: var(--gold);
    font-size: 8px;
    line-height: 1;
}
.comments-topbar-button > b[hidden] { display: none; }
.releases-topbar-button > b {
    position: absolute;
    top: -6px;
    right: -7px;
    padding: 2px 4px;
    border: 2px solid var(--surface);
    border-radius: 999px;
    color: #fff;
    background: var(--gold);
    font-size: 7px;
    line-height: 1;
    letter-spacing: .02em;
}
.other-shortcuts { position: relative; flex: 0 0 auto; }
.other-shortcuts-trigger {
    width: 46px;
    min-width: 46px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    color: #fff;
    border: 2px solid color-mix(in srgb, var(--gold) 78%, #7c5a12);
    border-radius: 12px;
    background: linear-gradient(145deg, color-mix(in srgb, var(--brand) 88%, #000), var(--brand));
    box-shadow: 0 6px 17px color-mix(in srgb, var(--brand) 34%, transparent), inset 0 0 0 1px rgba(255,255,255,.12);
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
.settings-trigger-icon { width: 27px; height: 27px; fill: none; stroke: currentColor; stroke-width: 1.85; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 1px 0 rgba(0,0,0,.18)); }
.other-shortcuts-trigger:hover, .other-shortcuts-trigger:focus-visible { transform: translateY(-1px); border-color: var(--gold); box-shadow: 0 7px 19px color-mix(in srgb, var(--gold) 34%, transparent); }
.other-shortcuts-menu {
    position: absolute;
    z-index: 190;
    top: calc(100% + 10px);
    right: 0;
    width: min(330px, calc(100vw - 16px));
    max-height: calc(100vh - var(--topbar-height) - 24px);
    max-height: calc(100dvh - var(--topbar-height) - 24px);
    display: grid;
    grid-template-columns: repeat(2, minmax(138px, 1fr));
    gap: 8px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 15px;
    background: color-mix(in srgb, var(--surface) 97%, transparent);
    box-shadow: 0 20px 50px rgba(12, 29, 24, .22);
    backdrop-filter: blur(18px);
    overflow: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable both-edges;
    scrollbar-width: auto;
    scrollbar-color: var(--gold) color-mix(in srgb, var(--surface-2) 82%, var(--line));
}
.other-shortcuts-menu::-webkit-scrollbar { width: 12px; height: 12px; }
.other-shortcuts-menu::-webkit-scrollbar-track { border-radius: 999px; background: color-mix(in srgb, var(--surface-2) 82%, var(--line)); }
.other-shortcuts-menu::-webkit-scrollbar-thumb { min-height: 38px; min-width: 38px; border: 3px solid color-mix(in srgb, var(--surface-2) 82%, var(--line)); border-radius: 999px; background: var(--gold); }
.other-shortcuts-menu::-webkit-scrollbar-corner { background: var(--surface-2); }
.other-shortcuts-menu[hidden] { display: none !important; }
.other-shortcuts-heading { grid-column: 1 / -1; display: grid; gap: 2px; padding: 2px 3px 8px; border-bottom: 1px solid var(--line); }
.other-shortcuts-heading strong { font-size: 11px; }
.other-shortcuts-heading small { color: var(--muted); font-size: 8px; }
.other-shortcuts-menu .topbar-command-button {
    width: 100%;
    height: 54px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 9px;
    padding: 0 11px;
    border-radius: 11px;
    text-align: left;
}
.other-shortcuts-menu .topbar-command-button > span:first-child { flex: 0 0 auto; width: 25px; font-size: 18px; }
.other-shortcuts-menu .shortcut-menu-label { display: block; min-width: 0; font-size: 10px; font-weight: 750; white-space: normal; }
.other-shortcuts-menu .shortcut-menu-streak {
    min-height: 54px;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 5px;
    padding: 0 11px;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: var(--surface);
}
.other-shortcuts-menu .shortcut-menu-streak > span:first-child { font-size: 18px; }
.other-shortcuts-menu .comments-topbar-button > b { top: 3px; right: 3px; }
.other-shortcuts-menu .releases-topbar-button > b { top: 3px; right: 3px; }
.other-shortcuts.open .other-shortcuts-trigger { color: #fff; border-color: var(--brand); background: var(--brand); box-shadow: 0 7px 20px color-mix(in srgb, var(--brand) 28%, transparent); }
.other-shortcuts-menu .settings-shortcut-button { grid-column: 1 / -1; min-height: 58px; color: var(--brand); border: 2px solid color-mix(in srgb, var(--gold) 62%, var(--line)); background: linear-gradient(145deg, var(--gold-soft), var(--surface)); }
.other-shortcuts-menu .settings-shortcut-button .shortcut-menu-label { font-size: 11px; }
.streak { display: flex; align-items: baseline; gap: 4px; padding: 7px 10px; color: var(--gold); }
.streak small { color: var(--muted); }

@media (max-width: 1180px) {
    :root { --persistent-controls-right: 12px; --persistent-controls-reserve: 210px; }
    .other-shortcuts-trigger { width: 44px; min-width: 44px; padding: 0; }
}

.app-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    min-height: calc(100vh - var(--topbar-height));
}
.app-shell.sidebar-visible { grid-template-columns: 260px minmax(0, 1fr) 280px; }

.sidebar, .practice-panel {
    position: sticky;
    top: var(--topbar-height);
    height: calc(100vh - var(--topbar-height));
    align-self: start;
    padding: 28px 20px;
    background: var(--surface);
}

.sidebar { border-right: 1px solid var(--line); display: flex; flex-direction: column; }
.sidebar[hidden] { display: none; }
.practice-panel { border-left: 1px solid var(--line); }
.sidebar-heading, .panel-heading, .dialog-heading { display: flex; align-items: center; justify-content: space-between; }
.sidebar-heading h2, .panel-heading h2, .dialog-heading h2 { margin: 2px 0 0; font-size: 20px; letter-spacing: -.03em; }
.eyebrow { margin: 0; color: var(--gold); font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; }
.surah-navigation-panel { min-height: 0; flex: 1; display: flex; flex-direction: column; overflow: hidden; }

.sidebar-search { height: 40px; margin: 18px 0 12px; padding-right: 5px; gap: 6px; }
.unified-sidebar-search {
    height: auto;
    display: grid;
    gap: 7px;
    padding: 7px;
    border-radius: 14px;
}
.sidebar-search-input-row { min-width: 0; display: flex; align-items: center; gap: 7px; padding: 0 2px 1px 7px; }
.sidebar-search-input-row > span { flex: 0 0 auto; color: var(--muted); }
.sidebar-search-input-row input { width: 100%; height: 38px; font-size: max(14px, var(--search-ui-size)); }
.sidebar-search-input-row input:dir(rtl) { font: clamp(20px, calc(var(--arabic-size) * .72), 28px)/1.2 "Amiri Quran", "Traditional Arabic", serif; }
.sidebar-search-tools { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 6px; padding-top: 7px; border-top: 1px solid var(--line); }
.sidebar-search-tool {
    min-width: 0;
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 5px 8px;
    border: 1px solid var(--line);
    border-radius: 9px;
    color: var(--brand);
    background: var(--surface);
    font: inherit;
    font-size: 10px;
    font-weight: 750;
    cursor: pointer;
}
.sidebar-search-tool:hover, .sidebar-search-tool[aria-expanded="true"] { border-color: var(--brand); background: var(--brand-soft); }
.sidebar-search-tool.listening { color: white; border-color: var(--danger); background: var(--danger); animation: pulse 1.2s infinite; }
.search-action-language { min-width: 54px; }
.arabic-search-keyboard {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 5px;
    margin: -4px 0 11px;
    padding: 9px;
    border: 1px solid color-mix(in srgb, var(--gold) 38%, var(--line));
    border-radius: 12px;
    background: var(--surface-2);
    direction: rtl;
}
.arabic-search-keyboard[hidden] { display: none; }
.arabic-search-key {
    min-width: 0;
    min-height: 36px;
    padding: 3px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--ink);
    background: var(--surface);
    font: 21px/1 "Amiri Quran", "Traditional Arabic", serif;
    cursor: pointer;
}
.arabic-search-key:hover, .arabic-search-key:focus-visible { border-color: var(--gold); background: var(--gold-soft); outline: none; }
.arabic-search-key.action { direction: ltr; color: var(--brand); font: 750 9px/1.1 "DM Sans", system-ui, sans-serif; }
.arabic-search-key.wide { grid-column: span 2; }
.surah-list-toolbar {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin: 0 0 7px;
    padding: 8px 6px 7px;
    border-bottom: 1px solid var(--line);
}
.surah-list-toolbar > div { min-width: 0; display: grid; gap: 2px; }
.surah-list-toolbar strong { color: var(--ink); font-size: 11px; }
.surah-list-toolbar small { color: var(--muted); font-size: 8px; }
.surah-list-toolbar button {
    flex: 0 0 auto;
    min-height: 30px;
    padding: 5px 8px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--brand);
    background: var(--surface);
    font: inherit;
    font-size: 9px;
    font-weight: 750;
    cursor: pointer;
}
.surah-list-toolbar button:hover { border-color: var(--brand); background: var(--brand-soft); }
.surah-list { min-height: 160px; flex: 1 1 auto; overflow-y: auto; overscroll-behavior: contain; padding-right: 4px; scrollbar-width: thin; }
.surah-list-load-error { display: grid; gap: 9px; margin: 8px 2px; padding: 14px 11px; border: 1px solid color-mix(in srgb, var(--danger) 35%, var(--line)); border-radius: 11px; color: var(--muted); background: var(--surface-2); font-size: 10px; line-height: 1.5; }
.surah-list-load-error button { min-height: 34px; border: 0; border-radius: 8px; color: white; background: var(--brand); font: inherit; font-size: 10px; font-weight: 750; }
.surah-item {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 6px;
    padding: 3px 4px;
    border-radius: 10px;
    background: transparent;
}
.surah-item:hover { background: var(--surface-2); }
.surah-item.active { background: var(--brand-soft); color: var(--brand); }
.surah-main { min-width: 0; display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 7px 4px; border: 0; text-align: left; color: inherit; background: transparent; }
.surah-number { width: 30px; height: 30px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 9px; font-size: 11px; }
.surah-item.active .surah-number { color: var(--surface); background: var(--brand); border-color: var(--brand); }
.surah-copy strong, .surah-copy small { display: block; }
.surah-copy strong { font-size: max(13px, var(--search-ui-size)); }
.surah-copy small { margin-top: 2px; color: var(--muted); font-size: var(--search-meta-size); }
.surah-arabic { font: clamp(21px, calc(var(--arabic-size) * .72), 32px)/1.15 "Amiri Quran", serif; }
.surah-juzs { max-width: 52px; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 3px; }
.juz-badge { min-width: 22px; height: 22px; padding: 0 4px; border: 1px solid var(--gold); border-radius: 7px; color: var(--gold); background: var(--surface); font-size: 9px; font-weight: 700; }
.juz-badge:hover, .juz-badge:focus-visible { color: var(--surface); background: var(--gold); }
.sidebar-footer { margin-top: auto; padding: 16px 8px 0; border-top: 1px solid var(--line); display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); }
.sidebar-footer strong { color: var(--ink); }
.list-skeleton, .loading-card div { background: linear-gradient(90deg, var(--surface-2), var(--surface-3), var(--surface-2)); background-size: 200% 100%; animation: shimmer 1.25s linear infinite; }
.list-skeleton { height: 48px; margin: 7px 0; border-radius: 10px; }

.reader { min-width: 0; padding: 36px clamp(20px, 5vw, 78px) 120px; }
.reader-hero {
    position: sticky;
    top: var(--topbar-height);
    z-index: 98;
    max-width: 920px;
    margin: 0 auto 24px;
    padding: 14px clamp(12px, 2vw, 22px) 16px;
    box-sizing: border-box;
    border: 1px solid color-mix(in srgb, var(--line) 78%, transparent);
    border-top: 0;
    border-radius: 0 0 18px 18px;
    text-align: center;
    background: color-mix(in srgb, var(--surface) 96%, transparent);
    box-shadow: 0 10px 24px rgba(20, 39, 33, .08);
    backdrop-filter: blur(16px);
}

/* Tesla tarzı çekilebilir üst perde. Üst kuşak ile sûre/araç başlığı beraber
   kapanır; bütün mevcut kontroller aynı DOM düğümlerinde ve işlevleriyle kalır. */
.topbar,
.reader,
.reader-hero {
    transition:
        height .34s cubic-bezier(.22, .8, .24, 1),
        max-height .34s cubic-bezier(.22, .8, .24, 1),
        margin .34s cubic-bezier(.22, .8, .24, 1),
        padding .34s cubic-bezier(.22, .8, .24, 1),
        opacity .22s ease,
        border-color .22s ease;
}
.topbar { box-sizing: border-box; overflow: visible; }
.reader-hero { max-height: 720px; overflow: hidden; }
.top-curtain-handle {
    position: sticky;
    top: calc(var(--topbar-height) + var(--top-curtain-hero-height, 170px) - 13px);
    z-index: 99;
    width: 76px;
    min-width: 76px;
    height: 30px;
    min-height: 30px;
    margin: -13px auto 14px;
    padding: 4px 12px 3px;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 7px;
    border: 1px solid color-mix(in srgb, var(--brand) 38%, var(--line));
    border-radius: 0 0 16px 16px;
    color: var(--brand);
    background: color-mix(in srgb, var(--surface) 96%, transparent);
    box-shadow: 0 7px 18px rgba(20, 39, 33, .13);
    backdrop-filter: blur(14px);
    cursor: ns-resize;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
}
.top-curtain-handle:hover,
.top-curtain-handle:focus-visible { border-color: var(--gold); color: var(--gold); background: var(--surface); }
.top-curtain-grip {
    width: 34px;
    height: 4px;
    justify-self: center;
    border-radius: 999px;
    background: currentColor;
    opacity: .72;
}
.top-curtain-chevron { font-size: 15px; font-weight: 900; line-height: 1; }
body.top-curtain-dragging,
body.top-curtain-dragging * { cursor: ns-resize !important; }
body.top-curtain-dragging .topbar,
body.top-curtain-dragging .reader,
body.top-curtain-dragging .reader-hero { transition: none !important; }
body.top-curtain-collapsed .topbar {
    height: 0 !important;
    min-height: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    border-color: transparent;
}
body.top-curtain-collapsed .reader { padding-top: 5px; }
body.top-curtain-collapsed .reader-hero {
    max-height: 0 !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    opacity: 0;
    pointer-events: none;
    border-color: transparent;
    box-shadow: none;
}
body.top-curtain-collapsed .top-curtain-handle {
    top: max(4px, env(safe-area-inset-top));
    margin-top: 0;
    margin-bottom: 10px;
    border-radius: 0 0 16px 16px;
}
body.top-curtain-collapsed .sidebar,
body.top-curtain-collapsed .practice-panel {
    top: 0;
    height: 100vh;
    height: 100dvh;
}
@media (prefers-reduced-motion: reduce) {
    .topbar, .reader, .reader-hero, .top-curtain-handle { transition: none !important; }
}
.reader-kicker { flex: 0 0 auto; display: flex; align-items: center; justify-content: center; gap: 7px; margin: 0; color: var(--muted); font-size: 11px; line-height: 1; text-transform: uppercase; letter-spacing: .1em; }
.reader-title-row { width: min(100%, 720px); display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; margin: 0 auto; }
.reader-title-row h1 { min-width: 0; margin: 0; overflow: hidden; font-size: clamp(28px, 4vw, 42px); letter-spacing: -.045em; text-align: center; text-overflow: ellipsis; white-space: nowrap; }
.title-surah-button { min-width: 78px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; color: var(--brand); font-weight: 800; }
.title-surah-button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.surah-details-toggle { width: 42px; height: 42px; display: grid; place-items: center; padding: 0; border: 2px solid color-mix(in srgb, var(--gold) 66%, var(--line)); border-radius: 50%; color: #654608; background: linear-gradient(145deg, var(--gold-soft), var(--surface)); box-shadow: 0 4px 13px color-mix(in srgb, var(--gold) 18%, transparent); font-size: 20px; font-weight: 850; cursor: pointer; transition: transform .18s ease, color .18s ease, border-color .18s ease, background .18s ease; }
.surah-details-toggle:hover, .surah-details-toggle:focus-visible, .surah-details-toggle.active { color: white; border-color: var(--brand); background: var(--brand); transform: translateY(-1px); outline: 0; }
.surah-title-details { width: min(100%, 760px); display: flex; align-items: center; justify-content: center; gap: 13px; margin: 13px auto 0; padding: 10px 13px; border: 1px solid color-mix(in srgb, var(--gold) 35%, var(--line)); border-radius: 14px; background: color-mix(in srgb, var(--gold-soft) 34%, var(--surface)); animation: surah-details-in .18s ease-out; }
.surah-title-details[hidden] { display: none !important; }
.reader-title-detail-copy { min-width: 0; display: flex; align-items: baseline; justify-content: center; gap: 12px; flex: 1 1 auto; }
@keyframes surah-details-in { from { opacity: 0; transform: translateY(-5px); } to { opacity: 1; transform: translateY(0); } }
.surah-step-button { min-width: 64px; display: grid; justify-items: center; gap: 4px; padding: 0; border: 0; color: var(--ink); background: transparent; cursor: pointer; }
.surah-step-icon { width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; background: var(--surface); font-size: 17px; line-height: 1; transition: border-color .18s ease, color .18s ease, background .18s ease, transform .18s ease; }
.surah-step-button small { color: var(--muted); font-size: 8px; font-weight: 750; line-height: 1; white-space: nowrap; }
.surah-step-button:hover .surah-step-icon, .surah-step-button:focus-visible .surah-step-icon { color: var(--brand); border-color: var(--brand); background: var(--brand-soft); transform: translateY(-1px); }
.surah-step-button:focus-visible { outline: 0; }
.surah-step-button:disabled { opacity: .35; cursor: not-allowed; }
.title-studio-audio-button { flex: 0 0 auto; min-height: 36px; padding: 6px 10px; white-space: nowrap; }
body.app-mode-revelation #previous-surah,
body.app-mode-revelation #next-surah { display: none !important; }
body.app-mode-commands .reader-title-row,
body.app-mode-commands .surah-title-details { display: none !important; }
body.app-mode-commands .reader-tools { margin-top: 0; }
body.app-mode-juzhan .reader-hero { display: block !important; margin-bottom: 16px; }
body.app-mode-juzhan .reader-title-row,
body.app-mode-juzhan .surah-title-details { display: none !important; }
body.app-mode-juzhan .reader-tools { margin-top: 0; }
body.app-mode-juzhan .reader-tools > * { display: none !important; }
body.app-mode-juzhan .reader-tools #mode-control { display: flex !important; }
body.app-mode-juzhan .topbar > .quick-search,
body.app-mode-juzhan .topbar .other-shortcuts { display: none !important; }
body.app-mode-juzhan .mobile-dock { display: none !important; }
.arabic-surah-name { min-width: 0; margin: 0; color: var(--gold); font: clamp(23px, 3vw, 30px)/1.2 "Amiri Quran", serif; }
.round-button { width: 42px; height: 42px; border-radius: 50%; }
.round-button:disabled { opacity: .35; cursor: not-allowed; }

.reader-tools { margin-top: 18px; display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }
.reading-position-tool-button { min-height: 44px; display: inline-flex; align-items: center; gap: 9px; padding: 6px 12px 6px 9px; border: 2px solid color-mix(in srgb, var(--brand) 56%, var(--line)); background: color-mix(in srgb, var(--brand-soft) 70%, var(--surface)); box-shadow: 0 4px 12px color-mix(in srgb, var(--brand) 10%, transparent); }
.reading-position-tool-button:hover, .reading-position-tool-button:focus-visible { border-color: var(--brand); box-shadow: 0 5px 16px color-mix(in srgb, var(--brand) 18%, transparent); }
.reading-position-icon { width: 25px; height: 25px; flex: 0 0 25px; fill: color-mix(in srgb, var(--brand-soft) 45%, var(--surface)); stroke: var(--brand); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.reading-position-copy { display: grid; gap: 2px; text-align: left; line-height: 1.05; }
.reading-position-tool-button strong { color: var(--brand); font-size: 12px; }
.reading-position-tool-button small { color: var(--muted); font-size: 8px; font-weight: 700; }
.studio-audio-button { border-color: color-mix(in srgb, var(--gold) 68%, var(--line)); background: linear-gradient(145deg, var(--gold-soft), var(--surface)); }
.studio-audio-button strong { color: var(--gold); }
.studio-audio-button[aria-pressed="true"] { border-color: var(--gold); color: var(--ink); background: var(--gold-soft); }
.studio-audio-button[aria-pressed="true"] strong { color: var(--brand); }

body.app-mode-read .app-shell { grid-template-columns: minmax(0, 1fr); }
body.app-mode-read .app-shell.sidebar-visible { grid-template-columns: 260px minmax(0, 1fr); }
body.app-mode-understand .app-shell { grid-template-columns: minmax(0, 1fr); }
body.app-mode-understand .app-shell.sidebar-visible { grid-template-columns: 260px minmax(0, 1fr); }
body.app-mode-revelation .app-shell { grid-template-columns: minmax(0, 1fr); }
body.app-mode-revelation .app-shell.sidebar-visible { grid-template-columns: 260px minmax(0, 1fr); }
body.app-mode-commands .app-shell { grid-template-columns: minmax(0, 1fr); }
body.app-mode-commands .app-shell.sidebar-visible { grid-template-columns: 260px minmax(0, 1fr); }
body.app-mode-hifz .app-shell,
body.app-mode-daily .app-shell,
body.app-mode-juzhan .app-shell { grid-template-columns: minmax(0, 1fr); }
body.app-mode-hifz .app-shell.sidebar-visible,
body.app-mode-daily .app-shell.sidebar-visible,
body.app-mode-juzhan .app-shell.sidebar-visible { grid-template-columns: 260px minmax(0, 1fr); }
body.app-mode-read .practice-panel,
body.app-mode-read .practice-scrim,
body.app-mode-read #practice-panel-toggle,
body.app-mode-read #quick-voice-button,
body.app-mode-read #mobile-listen,
body.app-mode-understand .practice-panel,
body.app-mode-understand .practice-scrim,
body.app-mode-understand #practice-panel-toggle,
body.app-mode-understand #quick-voice-button,
body.app-mode-understand #mobile-listen,
body.app-mode-understand #mobile-audio,
body.app-mode-understand #audio-button,
body.app-mode-revelation .practice-panel,
body.app-mode-revelation .practice-scrim,
body.app-mode-revelation #practice-panel-toggle,
body.app-mode-revelation #quick-voice-button,
body.app-mode-revelation #mobile-listen,
body.app-mode-revelation #mobile-audio,
body.app-mode-revelation #audio-button,
body.app-mode-commands .practice-panel,
body.app-mode-commands .practice-scrim,
body.app-mode-commands #practice-panel-toggle,
body.app-mode-commands #quick-voice-button,
body.app-mode-commands #mobile-listen,
body.app-mode-commands #mobile-audio,
body.app-mode-commands #audio-button,
body.app-mode-hifz .practice-panel,
body.app-mode-hifz .practice-scrim,
body.app-mode-hifz #practice-panel-toggle,
body.app-mode-hifz #quick-voice-button,
body.app-mode-hifz #mobile-listen,
body.app-mode-daily .practice-panel,
body.app-mode-daily .practice-scrim,
body.app-mode-daily #practice-panel-toggle,
body.app-mode-daily #quick-voice-button,
body.app-mode-daily #mobile-listen,
body.app-mode-daily #mobile-audio,
body.app-mode-daily #audio-button,
body.app-mode-juzhan .practice-panel,
body.app-mode-juzhan .practice-scrim,
body.app-mode-juzhan #practice-panel-toggle,
body.app-mode-juzhan #quick-voice-button,
body.app-mode-juzhan #mobile-listen,
body.app-mode-juzhan #mobile-audio,
body.app-mode-juzhan #audio-button,
body.app-mode-listen #mobile-audio,
body.app-mode-listen #audio-button { display: none !important; }

.recitation-player {
    max-width: 920px;
    display: grid;
    gap: 15px;
    margin: 0 auto 24px;
    padding: 20px;
    border: 1px solid color-mix(in srgb, var(--gold) 56%, var(--line));
    border-radius: 18px;
    background: linear-gradient(145deg, color-mix(in srgb, var(--gold-soft) 42%, var(--surface)), var(--surface));
    box-shadow: 0 14px 38px rgba(42, 54, 48, .06);
}
.recitation-player[hidden] { display: none; }
.recitation-player-heading { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 14px; }
.recitation-player-mark { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 50%; color: var(--surface); background: var(--brand); font-size: 20px; }
.recitation-player-heading h2 { margin: 3px 0; font-size: 17px; }
.recitation-player-heading p:not(.eyebrow) { margin: 0; color: var(--muted); font-size: 10px; }
.recitation-current { padding: 6px 9px; border-radius: 999px; color: var(--brand); background: var(--brand-soft); font-size: 9px; font-weight: 750; white-space: nowrap; }
.recitation-controls { display: grid; grid-template-columns: minmax(180px, 1fr) auto minmax(96px, 120px); align-items: end; gap: 10px; }
.recitation-speed-control { display: grid; gap: 5px; color: var(--muted); font-size: 9px; font-weight: 750; }
.recitation-speed-control select { height: 42px; padding: 0 34px 0 11px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); }
.recitation-play-button { min-height: 42px; display: inline-flex; align-items: center; gap: 9px; padding: 7px 14px; border: 1px solid var(--brand); border-radius: 11px; color: var(--surface); background: var(--brand); }
.recitation-play-button > span:first-child { font-size: 17px; }
.recitation-play-button > span:last-child { display: grid; text-align: left; }
.recitation-play-button strong { font-size: 11px; }
.recitation-play-button small { opacity: .76; font-size: 8px; }
.recitation-ayah-controls { display: flex; gap: 5px; }
.recitation-ayah-controls button { width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); }
.recitation-progress-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; }
.recitation-progress-row input { width: 100%; accent-color: var(--brand); }
.recitation-progress-row output { min-width: 86px; color: var(--muted); font-size: 9px; font-variant-numeric: tabular-nums; text-align: right; }
.recitation-attribution { margin: 0; color: var(--muted); font-size: 8px; line-height: 1.55; }
.recitation-attribution a { color: var(--brand); font-weight: 700; }

.word.reciting,
.word.meal-speech-reciting,
.word.basmala-reciting { border-color: var(--gold); background: var(--gold-soft); box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold) 18%, transparent); transform: translateY(-1px); }
.word.reciting > span:first-child,
.word.meal-speech-reciting > span:first-child,
.word.basmala-reciting > span:first-child { color: var(--brand); }

.mode-dialog { width: min(96vw, 980px); }
.mode-dialog form { padding: 24px; }
.mode-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 20px; }
.mode-option { position: relative; min-height: 210px; display: grid; align-content: start; justify-items: start; gap: 13px; padding: 20px; border: 1px solid var(--line); border-radius: 18px; color: var(--ink); background: var(--surface-2); text-align: left; }
.mode-option:hover, .mode-option[aria-pressed="true"] { border-color: var(--gold); background: linear-gradient(145deg, var(--gold-soft), var(--surface)); box-shadow: 0 12px 30px rgba(42, 54, 48, .08); }
.mode-option-icon { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 15px; color: var(--surface); background: var(--brand); font-size: 18px; }
.mode-option > span:nth-child(2) { display: grid; gap: 8px; }
.mode-option strong { font-size: 22px; }
.mode-option small { color: var(--muted); font-size: 11px; line-height: 1.6; }
.mode-option > b { position: absolute; top: 15px; right: 15px; padding: 4px 7px; border-radius: 999px; color: var(--brand); background: var(--brand-soft); font-size: 8px; }
.read-option > b { color: #775310; background: var(--gold-soft); }
.understand-option > b { color: var(--surface); background: var(--brand); }
.revelation-option > b { color: #775310; background: var(--gold-soft); }
.commands-option > b { color: #7a312b; background: color-mix(in srgb, var(--danger) 13%, var(--surface)); }
.mode-dialog-note { margin: 16px 0 0; padding: 12px 14px; border-radius: 12px; color: var(--muted); background: var(--surface-2); font-size: 10px; line-height: 1.6; }
.copyright-dialog { width: min(94vw, 940px); }
.copyright-dialog form { display: grid; gap: 16px; padding: 24px; }
.copyright-heading { align-items: flex-start; gap: 18px; }
.copyright-heading h2 { max-width: 680px; }
.copyright-beta-badge { flex: 0 0 auto; display: inline-grid; place-items: center; min-width: 58px; min-height: 30px; padding: 5px 10px; border: 1px solid color-mix(in srgb, var(--gold) 62%, var(--line)); border-radius: 999px; color: #775310; background: var(--gold-soft); font-size: 10px; font-weight: 800; letter-spacing: .12em; }
.copyright-notice-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.copyright-notice-grid section { padding: 16px 17px; border: 1px solid var(--line); border-radius: 15px; background: var(--surface-2); }
.copyright-notice-grid h3 { margin: 0 0 11px; color: var(--brand); font-size: 14px; }
.copyright-notice-grid p { margin: 0 0 10px; color: var(--muted); font-size: 10px; line-height: 1.68; }
.copyright-notice-grid p:last-child { margin-bottom: 0; }
.copyright-legal-note { margin: 0; padding: 12px 14px; border-left: 3px solid var(--gold); border-radius: 10px; color: var(--ink); background: var(--gold-soft); font-size: 10px; line-height: 1.6; }
.copyright-actions { display: grid; grid-template-columns: minmax(230px, auto) minmax(300px, 1fr); gap: 10px; }
.copyright-actions .dialog-done { width: auto; }
.copyright-contact-button { padding: 11px 14px; border: 1px solid var(--brand); border-radius: 10px; color: var(--brand); background: var(--surface); font-weight: 700; }
.copyright-contact-button:hover { background: var(--brand-soft); }
.guide-mode-overview { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 18px 0; padding: 16px; border: 1px solid color-mix(in srgb, var(--gold) 45%, var(--line)); border-radius: 16px; background: var(--gold-soft); }
.guide-mode-overview > div { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 4px 9px; padding: 12px; border-radius: 12px; background: var(--surface); }
.guide-mode-overview > div > span { grid-row: 1 / 3; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; color: var(--surface); background: var(--brand); }
.guide-mode-overview strong { font-size: 13px; }
.guide-mode-overview small { color: var(--muted); font-size: 9px; line-height: 1.5; }
.guide-mode-overview p { grid-column: 1 / -1; margin: 0; color: var(--muted); font-size: 10px; line-height: 1.6; }
.guide-learning-modes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin: 18px 0; }
.guide-learning-modes article { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr); align-content: start; gap: 12px; padding: 18px; border: 1px solid color-mix(in srgb, var(--brand) 25%, var(--line)); border-radius: 17px; background: linear-gradient(145deg, var(--surface), var(--surface-2)); }
.guide-learning-icon { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 14px; color: var(--surface); background: var(--brand); font: 800 18px/1 "Amiri Quran", inherit; }
.guide-learning-modes h3 { margin: 4px 0 6px; font-size: 17px; }
.guide-learning-modes p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.55; }
.guide-learning-modes ol { grid-column: 1 / -1; display: grid; gap: 7px; margin: 0; padding-left: 22px; color: var(--ink); font-size: 10px; line-height: 1.55; }
.guide-learning-modes .guide-note { grid-column: 1 / -1; padding: 10px; border-radius: 10px; color: var(--brand); background: var(--brand-soft); }
.guide-reading-history { display: grid; grid-template-columns: 54px minmax(0, 1fr); gap: 15px; margin: 18px 0; padding: 18px; border: 1px solid color-mix(in srgb, var(--brand) 34%, var(--line)); border-radius: 16px; background: linear-gradient(145deg, var(--brand-soft), var(--surface)); }
.guide-reading-history-icon { width: 54px; height: 54px; display: grid; place-items: center; border-radius: 16px; color: white; background: var(--brand); font-size: 22px; }
.guide-reading-history h3 { margin: 0 0 6px; font-size: 16px; }
.guide-reading-history p, .guide-reading-history ol { margin: 6px 0; color: var(--muted); font-size: 10px; line-height: 1.65; }
.guide-reading-history ol { padding-left: 18px; }
.design-credit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 34px auto 4px;
    color: var(--muted);
    font-size: 12px;
    letter-spacing: .08em;
}
.design-credit::before, .design-credit::after {
    content: "";
    width: 34px;
    height: 1px;
    background: color-mix(in srgb, var(--gold) 45%, transparent);
}
.design-credit strong { color: var(--gold); font-weight: 650; letter-spacing: .04em; }
.copyright-footer-button { margin-left: 4px; padding: 5px 9px; border: 1px solid color-mix(in srgb, var(--gold) 48%, var(--line)); border-radius: 999px; color: var(--brand); background: var(--surface); font-size: 9px; font-weight: 700; letter-spacing: .02em; }
.copyright-footer-button:hover { border-color: var(--gold); background: var(--gold-soft); }
.tool-button, .select-control {
    min-height: 38px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface);
    padding: 7px 12px;
    font-size: 12px;
}
.tool-button:hover, .tool-button[aria-pressed="true"] { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); }
.comments-tool-button { position: relative; }
.comments-tool-button b { min-width: 18px; height: 18px; display: inline-grid; place-items: center; padding: 0 5px; border-radius: 999px; color: white; background: var(--gold); font-size: 9px; }
.releases-tool-button { position: relative; }
.releases-tool-button b { padding: 2px 6px; border-radius: 999px; color: #fff; background: var(--gold); font-size: 8px; letter-spacing: .02em; }
.meal-search-topbar-button > span { font-size: 22px; font-weight: 700; transform: translateY(-1px); }

#meal-search-dialog { width: min(1040px, calc(100vw - 28px)); max-height: min(940px, calc(100dvh - 24px)); padding: 0; }
.meal-search-shell { max-height: inherit; overflow-y: auto; padding: 24px; }
.meal-search-heading { position: sticky; z-index: 4; top: -24px; margin: -2px -2px 0; padding: 4px 2px 15px; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 95%, transparent); backdrop-filter: blur(12px); }
.meal-search-scope { margin: 14px 0 12px; color: var(--brand); font-size: var(--search-ui-size); font-weight: 650; line-height: 1.5; }
.meal-search-dialog .meal-search-form { max-height: none; display: grid; gap: 7px; margin: 0; padding: 14px; overflow: visible; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-2); }
.meal-search-form > label { color: var(--ink); font-size: var(--search-ui-size); font-weight: 700; }
.meal-search-form > div { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px; }
.meal-search-form input { width: 100%; min-height: 46px; padding: 0 14px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); background: var(--surface); font: max(16px, var(--meal-size))/1.35 Georgia, "Times New Roman", serif; }
.meal-search-form input:dir(rtl) { font: clamp(22px, var(--arabic-size), 34px)/1.2 "Amiri Quran", "Traditional Arabic", serif; }
.meal-search-form input:focus { border-color: var(--gold); outline: 3px solid color-mix(in srgb, var(--gold-soft) 65%, transparent); }
.meal-search-form button, .meal-search-more, .meal-search-footer button { min-height: 44px; padding: 0 20px; border: 0; border-radius: 10px; color: var(--surface); background: var(--brand); font: inherit; font-size: var(--search-ui-size); font-weight: 750; cursor: pointer; }
.meal-search-form .meal-search-voice { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 82px; padding: 0 13px; color: var(--brand); border: 1px solid color-mix(in srgb, var(--brand) 34%, var(--line)); background: var(--surface); }
.meal-search-form .meal-search-voice.listening { color: white; border-color: var(--danger); background: var(--danger); box-shadow: 0 0 0 4px color-mix(in srgb, var(--danger) 18%, transparent); animation: meal-search-mic-pulse 1.25s ease-in-out infinite; }
.meal-search-form .meal-search-voice[disabled] { opacity: .55; cursor: not-allowed; }
@keyframes meal-search-mic-pulse { 50% { box-shadow: 0 0 0 8px color-mix(in srgb, var(--danger) 5%, transparent); } }
.meal-search-form small { color: var(--muted); font-size: var(--search-meta-size); line-height: 1.45; }
.meal-search-summary { margin: 14px 2px 10px; color: var(--muted); font-size: var(--search-ui-size); font-weight: 650; }
.meal-search-results { display: grid; gap: 14px; }
.meal-search-empty { margin: 0; padding: 28px 18px; border: 1px dashed var(--line); border-radius: 14px; color: var(--muted); text-align: center; }
.meal-search-result-card { display: grid; gap: 13px; padding: 19px 20px; border: 1px solid color-mix(in srgb, var(--gold) 36%, var(--line)); border-radius: 17px; background: var(--surface); box-shadow: 0 8px 24px rgba(20, 36, 30, .05); }
.meal-search-result-card > header { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding-bottom: 11px; border-bottom: 1px solid var(--line); }
.meal-search-result-card > header > div { min-width: 0; display: flex; align-items: center; gap: 10px; }
.meal-search-result-card > header > div > div { min-width: 0; display: grid; gap: 3px; }
.meal-search-result-card > header strong { color: var(--brand); font-size: var(--search-ui-size); }
.meal-search-matches { color: var(--gold); font-size: var(--search-meta-size); line-height: 1.35; }
.meal-search-go { flex: 0 0 auto; padding: 8px 11px; border: 1px solid var(--line); border-radius: 9px; color: var(--brand); background: var(--surface-2); font-size: var(--search-ui-size); font-weight: 700; cursor: pointer; }
.meal-search-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.meal-search-section-heading > strong { color: var(--muted); font-size: var(--search-ui-size); text-transform: uppercase; letter-spacing: .05em; }
.meal-search-arabic { display: flex; flex-wrap: wrap; justify-content: flex-start; gap: 6px 13px; direction: rtl; color: var(--ink); font-family: "Amiri Quran", "Traditional Arabic", serif; font-size: var(--arabic-size); line-height: 1.9; text-align: right; }
.meal-search-arabic > span { display: inline-block; }
.meal-search-meal { padding: 14px 0 2px; border-top: 1px solid var(--line); color: var(--ink); font-family: Georgia, 'Times New Roman', serif; font-size: var(--meal-size); line-height: 1.7; }
.meal-search-meal > a { display: block; width: fit-content; margin-top: 9px; color: var(--gold); font-family: "DM Sans", system-ui, sans-serif; font-size: var(--search-meta-size); font-weight: 700; }
.meal-search-detail { padding: 13px 14px; border: 1px solid color-mix(in srgb, var(--gold) 38%, var(--line)); border-radius: 12px; background: color-mix(in srgb, var(--gold-soft) 42%, var(--surface)); }
.meal-search-detail > div:first-child { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.meal-search-detail > div:first-child strong { color: var(--brand); font-size: var(--search-ui-size); }
.meal-search-detail > div:first-child a { color: var(--gold); font-size: var(--search-meta-size); font-weight: 700; }
.meal-search-detail-body { color: var(--ink); font: var(--meal-size)/1.68 Georgia, "Times New Roman", serif; }
.meal-search-detail-body > :first-child { margin-top: 0; }
.meal-search-detail-body > :last-child { margin-bottom: 0; }
.meal-search-references { padding: 12px 14px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface-2); }
.meal-search-references summary { color: var(--brand); font-size: var(--search-ui-size); font-weight: 700; cursor: pointer; }
.meal-search-references > div { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; }
.meal-search-references a { padding: 7px 9px; border: 1px solid var(--line); border-radius: 8px; color: var(--brand); background: var(--surface); font-size: var(--search-meta-size); font-weight: 650; }
.meal-search-more { display: block; margin: 16px auto 0; background: var(--gold); }
.meal-search-footer { position: sticky; z-index: 3; bottom: -24px; display: flex; justify-content: flex-end; margin: 18px -24px -24px; padding: 12px 24px; border-top: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 95%, transparent); backdrop-filter: blur(12px); }
.meal-search-footer button { display: inline-flex; align-items: center; gap: 8px; }

.daily-ayah-dialog { width: min(920px, calc(100vw - 28px)); }
.daily-ayah-dialog form { display: grid; gap: 18px; }
.daily-ayah-heading { padding-bottom: 13px; border-bottom: 1px solid var(--line); }
.daily-ayah-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-2); }
.daily-ayah-toolbar > div { display: grid; gap: 4px; }
.daily-ayah-toolbar strong { color: var(--ink); font-size: 13px; }
.daily-ayah-toolbar small { color: var(--muted); font-size: 9px; line-height: 1.45; }
.daily-ayah-define-button { flex: 0 0 auto; min-height: 40px; padding: 9px 14px; border: 1px solid var(--gold); border-radius: 11px; color: var(--brand); background: var(--gold-soft); font-size: 11px; font-weight: 850; cursor: pointer; }
.daily-ayah-define-button:hover { color: white; border-color: var(--brand); background: var(--brand); }
.daily-ayah-editor { display: grid; gap: 11px; padding: 16px; border: 1px solid color-mix(in srgb, var(--gold) 58%, var(--line)); border-radius: 15px; background: color-mix(in srgb, var(--gold-soft) 38%, var(--surface)); }
.daily-ayah-editor[hidden] { display: none !important; }
.daily-ayah-editor label { display: grid; gap: 8px; }
.daily-ayah-editor label strong { color: var(--ink); font-size: 12px; }
.daily-ayah-editor textarea { width: 100%; min-height: 132px; resize: vertical; padding: 12px 14px; border: 1px solid var(--line); border-radius: 11px; color: var(--ink); background: var(--surface); font: 700 13px/1.55 ui-monospace, Consolas, monospace; }
.daily-ayah-editor > small, #daily-ayah-editor-status { margin: 0; color: var(--muted); font-size: 9px; line-height: 1.55; }
.daily-ayah-editor-actions { display: flex; justify-content: flex-end; gap: 9px; }
.daily-ayah-editor-actions button { min-height: 38px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); background: var(--surface); font-size: 10px; font-weight: 800; }
.daily-ayah-editor-actions button.primary { color: white; border-color: var(--brand); background: var(--brand); }
.daily-ayah-list { display: grid; gap: 14px; }
.daily-ayah-empty { margin: 0; padding: 24px; color: var(--muted); border: 1px dashed var(--line); border-radius: 14px; text-align: center; }
.daily-ayah-card { display: grid; gap: 14px; padding: 19px 20px; border: 1px solid color-mix(in srgb, var(--gold) 42%, var(--line)); border-radius: 17px; background: linear-gradient(145deg, color-mix(in srgb, var(--gold-soft) 34%, var(--surface)), var(--surface)); }
.daily-ayah-card header { display: flex; align-items: center; justify-content: space-between; gap: 14px; color: var(--brand); font-size: 10px; font-weight: 800; }
.daily-ayah-card header button { flex: 0 0 auto; padding: 7px 10px; border: 1px solid var(--line); border-radius: 9px; color: var(--brand); background: var(--surface); font-size: 9px; font-weight: 800; }
.daily-ayah-card header button:hover { color: var(--surface); border-color: var(--brand); background: var(--brand); }
.daily-ayah-arabic { margin: 0; color: var(--ink); font: clamp(29px, 4.5vw, 42px)/1.9 "Amiri Quran", "Traditional Arabic", serif; text-align: right; }
.daily-ayah-word { display: inline-block; margin-inline: .12em; }
.daily-ayah-meal-label { justify-self: start; padding: 4px 8px; border-radius: 999px; color: var(--gold); background: color-mix(in srgb, var(--gold-soft) 72%, var(--surface)); font-size: 8px; font-weight: 850; }
.daily-ayah-meal { color: var(--muted); font: var(--meal-size)/1.75 Georgia, serif; }
.daily-ayah-meal > :first-child { margin-top: 0; }
.daily-ayah-meal > :last-child { margin-bottom: 0; }

@media (max-width: 600px) {
    #meal-search-dialog { width: calc(100vw - 14px); max-height: calc(100dvh - 14px); }
    .meal-search-shell { padding: 14px; }
    .meal-search-heading { top: -14px; padding-top: 3px; }
    .meal-search-form { padding: 11px; }
    .meal-search-form > div { grid-template-columns: minmax(0, 1fr) 52px 58px; }
    .meal-search-form button { padding: 0 10px; }
    .meal-search-form .meal-search-voice { min-width: 52px; padding: 0 8px; font-size: 17px; }
    .meal-search-voice-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
    .meal-search-result-card { padding: 15px 13px; }
    .meal-search-result-card > header { align-items: flex-start; }
    .meal-search-result-card > header > div { align-items: flex-start; }
    .meal-search-go { padding: 8px; }
    .meal-search-arabic { gap: 4px 10px; }
    .meal-search-footer { bottom: -14px; margin: 16px -14px -14px; padding: 10px 14px; }
    .meal-search-footer button { width: 100%; justify-content: center; }
    .daily-ayah-dialog { width: calc(100vw - 18px); max-height: calc(100dvh - 18px); }
    .daily-ayah-toolbar { align-items: stretch; flex-direction: column; }
    .daily-ayah-define-button { width: 100%; }
    .daily-ayah-card { padding: 15px 14px; }
    .daily-ayah-card header { align-items: flex-start; }
    .daily-ayah-arabic { font-size: clamp(27px, 9vw, 36px); line-height: 1.85; }
}

.comments-dialog { width: min(1180px, calc(100vw - 28px)); max-height: min(920px, calc(100dvh - 28px)); padding: 0; border: 1px solid var(--line); border-radius: 20px; color: var(--ink); background: var(--surface); box-shadow: var(--shadow); }
.comments-dialog::backdrop { background: rgba(10, 20, 17, .58); backdrop-filter: blur(5px); }
.comments-shell { max-height: inherit; overflow: auto; padding: 24px; }
.comments-heading { position: sticky; z-index: 5; top: -24px; display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: -2px -2px 18px; padding: 4px 2px 15px; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: blur(12px); }
.comments-heading h2 { margin: 2px 0 0; font-size: 24px; letter-spacing: -.035em; }
.comments-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 360px); align-items: start; gap: 18px; }
.comments-primary, .comments-top-panel { min-width: 0; }
.comments-top-panel { position: sticky; top: 74px; padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface-2); }
.comments-mobile-tabs { display: none; gap: 7px; margin-bottom: 14px; }
.comments-mobile-tabs button { flex: 1; padding: 10px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); background: var(--surface-2); font-weight: 700; }
.comments-mobile-tabs button.active { border-color: var(--brand); color: var(--surface); background: var(--brand); }
.comment-compose { display: grid; gap: 12px; margin-bottom: 22px; padding: 18px; border: 1px solid var(--gold); border-radius: 16px; background: linear-gradient(145deg, var(--gold-soft), var(--surface)); }
.comment-compose-heading { display: flex; justify-content: space-between; gap: 14px; }
.comment-compose-heading h3, .comments-section-heading h3 { margin: 0; font-size: 17px; }
.comment-compose-heading p, .comments-section-heading p { margin: 3px 0 0; color: var(--muted); font-size: 11px; }
.comment-compose-heading > span { color: var(--gold); font-size: 24px; }
.comment-rules { margin: 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; color: var(--muted); background: var(--surface); font-size: 10px; line-height: 1.55; }
.comment-rules strong { color: var(--ink); }
.comment-compose label { display: grid; gap: 6px; color: var(--ink); font-size: 11px; font-weight: 700; }
.comment-compose input, .comment-compose textarea { width: 100%; padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); background: var(--surface); font: 500 13px/1.55 "DM Sans", sans-serif; }
.comment-compose textarea { min-height: 118px; resize: vertical; }
.comment-compose input:focus, .comment-compose textarea:focus { outline: 2px solid color-mix(in srgb, var(--brand) 35%, transparent); border-color: var(--brand); }
.comment-honeypot { position: absolute !important; left: -10000px !important; width: 1px !important; height: 1px !important; overflow: hidden !important; }
.comment-human-check { width: fit-content; display: inline-flex !important; align-items: center; grid-template-columns: none !important; gap: 9px !important; padding: 10px 13px; border: 1px solid color-mix(in srgb, var(--brand) 34%, var(--line)); border-radius: 10px; color: var(--ink) !important; background: var(--surface); font-size: 11px !important; font-weight: 800 !important; cursor: pointer; user-select: none; }
.comment-human-check input { width: 18px !important; height: 18px; margin: 0; padding: 0 !important; accent-color: var(--brand); cursor: pointer; }
.comment-human-check:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.comment-compose-footer { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.comment-compose-footer small { color: var(--muted); font-size: 9px; line-height: 1.45; }
.comment-compose-footer button, .comments-more { padding: 10px 14px; border: 0; border-radius: 10px; color: white; background: var(--brand); font-size: 11px; font-weight: 800; cursor: pointer; }
.comment-compose-footer button:disabled { opacity: .55; cursor: wait; }
.comment-form-status { min-height: 18px; margin: 0; color: var(--success); font-size: 11px; font-weight: 700; }
.comment-form-status.error { color: var(--danger); }
.comments-section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin: 0 0 12px; }
.comments-section-heading > span { flex: 0 0 auto; color: var(--gold); font-size: 10px; font-weight: 800; }
.comment-list { display: grid; gap: 10px; }
.comment-card { padding: 15px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: 0 6px 18px rgba(20, 38, 32, .04); }
.comment-card-meta { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; color: var(--muted); font-size: 9px; }
.comment-card-meta strong { color: var(--ink); font-size: 12px; }
.comment-country-flag { font-size: 17px; line-height: 1; filter: saturate(.9); }
.comment-country-name { color: var(--muted); }
.comment-card-body { margin: 12px 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 12px; line-height: 1.68; }
.comment-translation { margin: 10px 0; padding: 10px 11px; border-left: 3px solid var(--gold); border-radius: 0 9px 9px 0; background: var(--gold-soft); white-space: pre-wrap; font-size: 11px; line-height: 1.6; }
.comment-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding-top: 10px; border-top: 1px solid var(--line); }
.comment-action { min-height: 31px; display: inline-flex; align-items: center; gap: 5px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 9px; color: var(--muted); background: var(--surface-2); font-size: 9px; font-weight: 700; cursor: pointer; }
.comment-action:hover, .comment-action.active { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }
.comment-reactions { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 8px; }
.comment-reaction { min-height: 29px; display: inline-flex; align-items: center; gap: 3px; padding: 4px 7px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink); background: var(--surface); font-size: 13px; cursor: pointer; }
.comment-reaction small { color: var(--muted); font-size: 8px; }
.comment-reaction.active { border-color: var(--gold); background: var(--gold-soft); }
.comment-thread-node { min-width: 0; }
.comment-replies { display: grid; gap: 9px; margin: 10px 0 0 18px; padding-left: 14px; border-left: 2px solid color-mix(in srgb, var(--gold) 48%, var(--line)); }
.comment-thread-node.level-1 > .comment-card { background: color-mix(in srgb, var(--surface) 88%, var(--brand-soft)); }
.comment-thread-node.level-2 > .comment-card,
.comment-thread-node.level-3 > .comment-card,
.comment-thread-node.level-4 > .comment-card { background: var(--surface-2); }
.comment-reply-slot:empty { display: none; }
.comment-reply-form { display: grid; gap: 8px; margin-top: 11px; padding: 11px; border: 1px solid var(--gold); border-radius: 11px; background: var(--gold-soft); }
.comment-reply-heading { display: grid; gap: 2px; }
.comment-reply-heading strong { font-size: 11px; }
.comment-reply-heading small { color: var(--muted); font-size: 9px; }
.comment-reply-form input:not(.comment-honeypot), .comment-reply-form textarea { width: 100%; padding: 9px 10px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); background: var(--surface); font: 500 11px/1.5 "DM Sans", sans-serif; }
.comment-reply-form textarea { min-height: 82px; resize: vertical; }
.comment-reply-footer { display: flex; align-items: center; justify-content: flex-end; gap: 7px; }
.comment-reply-footer button { padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); background: var(--surface); font-size: 9px; font-weight: 800; cursor: pointer; }
.comment-reply-footer button.primary { border-color: var(--brand); color: white; background: var(--brand); }
.comment-reply-footer button:disabled { opacity: .55; cursor: wait; }
.comment-reply-status { flex: 1; color: var(--success); font-size: 9px; }
.comment-reply-status.error { color: var(--danger); }
.comment-empty { margin: 0; padding: 22px 12px; border: 1px dashed var(--line); border-radius: 12px; color: var(--muted); text-align: center; font-size: 11px; }
.comment-list.compact .comment-card { padding: 12px; }
.comment-list.compact .comment-card-body { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 5; font-size: 11px; }
.comment-list.compact .comment-reactions { display: none; }
.comments-more { display: block; margin: 13px auto 0; }
.comments-translation-note { margin: 18px 0 0; padding-top: 13px; border-top: 1px solid var(--line); color: var(--muted); font-size: 9px; text-align: center; }

@media (max-width: 820px) {
    .comments-shell { padding: 16px; }
    .comments-heading { top: -16px; margin-bottom: 12px; }
    .comments-layout { grid-template-columns: 1fr; }
    .comments-mobile-tabs { display: flex; }
    .comments-top-panel { position: static; display: none; }
    .comments-dialog.show-top .comments-primary { display: none; }
    .comments-dialog.show-top .comments-top-panel { display: block; }
    .comment-compose-footer { align-items: stretch; flex-direction: column; }
}

html.speech-mobile .comments-dialog { width: min(940px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); }
html.speech-mobile .comments-layout { grid-template-columns: 1fr; }
html.speech-mobile .comments-mobile-tabs { display: flex; }
html.speech-mobile .comments-top-panel { position: static; display: none; }
html.speech-mobile .comments-dialog.show-top .comments-primary { display: none; }
html.speech-mobile .comments-dialog.show-top .comments-top-panel { display: block; }
html.speech-mobile .comment-card-body { font-size: 14px; }
html.speech-mobile .comment-action { min-height: 38px; padding: 8px 11px; font-size: 11px; }
html.speech-mobile .comment-reaction { min-height: 36px; padding: 7px 10px; font-size: 16px; }
html.speech-mobile .comment-replies { margin-left: 22px; padding-left: 17px; }
html.speech-mobile .comment-reply-form input:not(.comment-honeypot), html.speech-mobile .comment-reply-form textarea { font-size: 13px; }
html.speech-mobile .comment-human-check { min-height: 42px; padding: 10px 14px; font-size: 12px !important; }
html.speech-mobile .comment-human-check input { width: 21px !important; height: 21px; }
html.speech-mobile .comment-reply-footer button { min-height: 38px; font-size: 11px; }
.select-control { display: flex; align-items: center; gap: 8px; color: var(--muted); }
.select-control select { max-width: 150px; border: 0; outline: 0; background: transparent; font-weight: 600; }
.mode-select-control { border-color: color-mix(in srgb, var(--gold) 62%, var(--line)); color: var(--ink); background: var(--gold-soft); cursor: pointer; }
.mode-select-control:focus-within { border-color: var(--gold); box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold) 18%, transparent); }
.mode-select-icon { color: var(--brand); font-size: 13px; line-height: 1; }
.mode-select-label { color: var(--muted); white-space: nowrap; }
.mode-select-control select { min-width: 170px; max-width: 220px; color: var(--brand); font: 800 16px/1.25 "DM Sans", system-ui, sans-serif; cursor: pointer; }
.mode-select-control select:focus-visible { outline: 0; }
.session-reciter-control { display: none; border-color: color-mix(in srgb, var(--brand) 36%, var(--line)); background: color-mix(in srgb, var(--brand-soft) 38%, var(--surface)); }
.session-reciter-control select { width: clamp(240px, 34vw, 430px); max-width: 430px; color: var(--ink); font-size: clamp(13px, calc(var(--reciter-select-size) - 2px), 18px); font-weight: 650; }
body.app-mode-listen .session-reciter-control { display: none !important; }
body.app-mode-read .session-reciter-control,
body.app-mode-understand .session-reciter-control,
body.app-mode-revelation .session-reciter-control,
body.app-mode-commands .session-reciter-control,
body.app-mode-hifz .session-reciter-control,
body.app-mode-daily .session-reciter-control { display: flex; }

.learning-workspace { display: none; width: min(100%, 1120px); margin: 0 auto 22px; padding: 22px; border: 1px solid color-mix(in srgb, var(--gold) 55%, var(--line)); border-radius: 20px; background: linear-gradient(145deg, color-mix(in srgb, var(--gold-soft) 20%, var(--surface)), var(--surface)); box-shadow: 0 16px 44px rgba(25, 47, 41, .07); }
.learning-workspace[hidden] { display: none !important; }
body.app-mode-hifz #hifz-workspace,
body.app-mode-revelation #revelation-workspace,
body.app-mode-commands #commands-workspace,
body.app-mode-daily #daily-mode-workspace,
body.app-mode-juzhan #juzhan-workspace { display: block; }
body.app-mode-commands .ayah-stream { display: none; }
body.app-mode-juzhan .ayah-stream { display: none; }
.learning-workspace-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.learning-workspace-heading h2 { margin: 3px 0 4px; font-size: clamp(21px, 2.2vw, 30px); letter-spacing: -.04em; }
.learning-workspace-heading p:not(.eyebrow) { margin: 0; color: var(--muted); font-size: 12px; }
.learning-progress-ring { --progress: 0; flex: 0 0 auto; width: 78px; height: 78px; display: grid; place-content: center; border-radius: 50%; text-align: center; background: radial-gradient(circle at center, var(--surface) 57%, transparent 59%), conic-gradient(var(--brand) calc(var(--progress) * 1%), var(--line) 0); }
.learning-progress-ring strong, .learning-progress-ring small { display: block; }
.learning-progress-ring strong { color: var(--brand); font-size: 18px; }
.learning-progress-ring small { margin-top: 2px; color: var(--muted); font-size: 8px; }
.daily-mode-heading-actions { flex: 0 0 auto; display: flex; align-items: center; gap: 10px; }
.daily-mode-heading-actions .daily-ayah-define-button { max-width: 150px; }
.daily-mode-badge { flex: 0 0 auto; width: 86px; height: 86px; display: grid; place-content: center; border: 1px solid color-mix(in srgb, var(--gold) 68%, var(--line)); border-radius: 50%; text-align: center; background: radial-gradient(circle, var(--surface), var(--gold-soft)); }
.daily-mode-badge strong, .daily-mode-badge small { display: block; }
.daily-mode-badge strong { color: var(--brand); font-size: 27px; line-height: 1; }
.daily-mode-badge small { margin-top: 5px; color: var(--gold); font-size: 8px; font-weight: 850; }
.daily-mode-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 16px; }
.daily-mode-summary article { min-height: 72px; display: grid; align-content: center; gap: 6px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); }
.daily-mode-summary small { color: var(--muted); font-size: 9px; font-weight: 750; }
.daily-mode-summary strong { color: var(--ink); font-size: 12px; line-height: 1.4; }
.daily-mode-navigation {
    min-width: 0;
    max-width: 100%;
    display: flex;
    gap: 8px;
    margin-top: 13px;
    padding: 4px 2px 14px;
    overflow-x: scroll;
    overflow-y: hidden;
    overscroll-behavior-inline: contain;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x;
    scrollbar-gutter: stable;
    scrollbar-width: auto;
    scrollbar-color: var(--brand) var(--surface-2);
}
.daily-mode-navigation::-webkit-scrollbar { height: 12px; }
.daily-mode-navigation::-webkit-scrollbar-track { border-radius: 999px; background: var(--surface-2); }
.daily-mode-navigation::-webkit-scrollbar-thumb { min-width: 44px; border: 3px solid var(--surface-2); border-radius: 999px; background: var(--brand); }
.daily-mode-navigation::-webkit-scrollbar-thumb:hover { background: var(--gold); }
html.speech-television .daily-mode-navigation::-webkit-scrollbar { height: 16px; }
.daily-mode-navigation button, .daily-mode-navigation > span { flex: 0 0 auto; min-height: 42px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 11px; color: var(--ink); background: var(--surface); font: 750 11px/1.25 inherit; }
.daily-mode-navigation button { cursor: pointer; }
.daily-mode-navigation button.active { color: white; border-color: var(--brand); background: var(--brand); }
.daily-mode-navigation button small { display: block; margin-top: 3px; color: inherit; opacity: .74; font-size: 8px; }
.daily-mode-repeat-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 13px; border: 1px solid color-mix(in srgb, var(--gold) 55%, var(--line)); border-radius: 14px; background: color-mix(in srgb, var(--gold-soft) 35%, var(--surface)); }
.daily-mode-repeat-options[hidden] { display: none !important; }
.daily-mode-repeat-options label { display: grid; gap: 7px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); }
.daily-mode-repeat-options label span { color: var(--muted); font-size: 10px; font-weight: 800; }
.daily-mode-repeat-options select { width: 100%; border: 0; color: var(--ink); background: transparent; font: 800 13px/1.3 inherit; }
.daily-mode-jump-control { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: stretch; gap: 8px; }
.daily-mode-jump-control label { min-width: 0; }
.daily-mode-jump-control button { min-height: 48px; align-self: stretch; padding: 9px 14px; border: 1px solid var(--brand); border-radius: 11px; color: white; background: var(--brand); font: 850 11px/1.25 inherit; cursor: pointer; }
.daily-mode-jump-control button:hover, .daily-mode-jump-control button:focus-visible { background: color-mix(in srgb, var(--brand) 84%, var(--gold)); box-shadow: 0 4px 14px color-mix(in srgb, var(--brand) 18%, transparent); }
.daily-mode-jump-control button:disabled { opacity: .5; cursor: not-allowed; }
.daily-mode-jump-control > small { grid-column: 1 / -1; color: var(--muted); font-size: 9px; line-height: 1.5; }
.daily-mode-repeat-options > small { grid-column: 1 / -1; color: var(--muted); font-size: 9px; line-height: 1.5; }
body.app-mode-daily .ayah-card:not(.daily-selected-ayah) { display: none !important; }
body.app-mode-daily .ayah-card.daily-selected-ayah { border-color: color-mix(in srgb, var(--gold) 76%, var(--line)); }
.revelation-order-badge { flex: 0 0 auto; width: 86px; height: 86px; display: grid; place-content: center; border: 1px solid color-mix(in srgb, var(--gold) 60%, var(--line)); border-radius: 50%; text-align: center; background: radial-gradient(circle, var(--surface), var(--gold-soft)); }
.revelation-order-badge strong, .revelation-order-badge small { display: block; }
.revelation-order-badge strong { color: var(--brand); font-size: 25px; line-height: 1; }
.revelation-order-badge small { margin-top: 6px; color: var(--muted); font-size: 8px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.revelation-mode-grid { display: grid; grid-template-columns: .8fr 1fr 1.35fr; gap: 12px; margin-top: 20px; }
.revelation-mode-grid article { min-height: 98px; display: grid; align-content: center; gap: 6px; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.revelation-mode-grid small { color: var(--muted); font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.revelation-mode-grid strong { color: var(--ink); font-size: 15px; }
.revelation-mode-grid span, .revelation-mode-grid a { color: var(--muted); font-size: 10px; line-height: 1.45; }
.revelation-mode-grid a { width: max-content; color: var(--gold); font-weight: 800; }
.commands-mode-badge { flex: 0 0 auto; width: 86px; height: 86px; display: grid; place-content: center; border: 1px solid color-mix(in srgb, var(--danger) 45%, var(--line)); border-radius: 50%; text-align: center; background: radial-gradient(circle, var(--surface), color-mix(in srgb, var(--danger) 9%, var(--surface))); }
.commands-mode-badge strong, .commands-mode-badge small { display: block; }
.commands-mode-badge strong { color: var(--danger); font-size: 27px; line-height: 1; }
.commands-mode-badge small { margin-top: 6px; color: var(--muted); font-size: 8px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.commands-mode-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 20px; }
.commands-mode-grid button { min-height: 112px; display: grid; align-content: center; gap: 7px; padding: 16px; border: 1px solid var(--line); border-radius: 14px; color: inherit; text-align: start; background: var(--surface); cursor: pointer; }
.commands-mode-grid button:first-child { border-top-color: color-mix(in srgb, var(--brand) 70%, var(--line)); }
.commands-mode-grid button:nth-child(2) { border-top-color: color-mix(in srgb, var(--danger) 70%, var(--line)); }
.commands-mode-grid button:hover, .commands-mode-grid button:focus-visible { border-color: var(--gold); box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold) 14%, transparent); outline: 0; }
.commands-mode-grid button.active { border-color: var(--brand); background: color-mix(in srgb, var(--brand-soft) 65%, var(--surface)); box-shadow: inset 0 3px 0 var(--brand); }
.commands-mode-grid small { color: var(--gold); font-size: 9px; font-weight: 850; letter-spacing: .08em; }
.commands-mode-grid strong { color: var(--ink); font-size: 15px; }
.commands-mode-grid span { color: var(--muted); font-size: 10px; line-height: 1.55; }
.commands-mode-grid b { justify-self: start; min-width: 28px; padding: 4px 8px; border-radius: 999px; color: var(--brand); background: var(--brand-soft); font-size: 10px; }
.commands-catalog { display: grid; gap: 14px; margin-top: 18px; }
.commands-catalog-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 13px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); }
.commands-catalog-toolbar label { flex: 1 1 390px; min-height: 46px; display: flex; align-items: center; gap: 10px; padding: 0 13px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface-2); }
.commands-catalog-toolbar label:focus-within { border-color: var(--gold); box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold) 15%, transparent); }
.commands-catalog-toolbar input { width: 100%; border: 0; color: var(--ink); background: transparent; font: 700 13px/1.4 "DM Sans", system-ui, sans-serif; outline: 0; }
.commands-catalog-toolbar > div { flex: 0 0 auto; display: grid; text-align: end; }
.commands-catalog-toolbar strong { color: var(--brand); font-size: 13px; }
.commands-catalog-toolbar small { color: var(--muted); font-size: 9px; }
.commands-catalog-summary { min-width: 120px; }
.commands-catalog-actions { display: flex !important; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.commands-catalog-actions button, .commands-directive-actions button { min-height: 38px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 9px; color: var(--ink); background: var(--surface); font-size: 9px; font-weight: 850; cursor: pointer; }
.commands-catalog-actions button:hover, .commands-directive-actions button:hover { border-color: var(--gold); background: var(--gold-soft); }
.commands-topic-list { display: flex; gap: 8px; padding: 2px 1px 8px; overflow-x: auto; scrollbar-color: var(--gold) var(--surface-2); }
.commands-topic-list button { flex: 0 0 auto; min-height: 38px; padding: 7px 11px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); background: var(--surface); font-size: 10px; font-weight: 800; cursor: pointer; }
.commands-topic-list button.active { color: var(--surface); border-color: var(--brand); background: var(--brand); }
.commands-topic-list b { margin-inline-start: 5px; font-size: 9px; }
.commands-subtopic-list { display: flex; align-items: center; gap: 7px; padding: 9px 10px; overflow-x: auto; border-inline-start: 3px solid var(--gold); border-radius: 9px; background: color-mix(in srgb, var(--gold-soft) 40%, var(--surface)); scrollbar-color: var(--gold) var(--surface-2); }
.commands-subtopic-list[hidden] { display: none; }
.commands-subtopic-list > strong { flex: 0 0 auto; margin-inline-end: 4px; color: var(--gold); font-size: 9px; text-transform: uppercase; letter-spacing: .05em; }
.commands-subtopic-list button { flex: 0 0 auto; min-height: 34px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); background: var(--surface); font-size: 9px; font-weight: 800; cursor: pointer; }
.commands-subtopic-list button.active { color: white; border-color: var(--gold); background: var(--gold); }
.commands-subtopic-list b { margin-inline-start: 4px; }
.commands-directive-list { display: grid; gap: 8px; }
.commands-directive-subgroup { position: sticky; top: var(--header-height, 0); z-index: 2; margin: 12px 0 2px; padding: 9px 12px; border-inline-start: 4px solid var(--brand); border-radius: 8px; color: var(--brand); background: color-mix(in srgb, var(--brand-soft) 92%, var(--surface)); font-size: 13px; }
.commands-directive-card { border: 1px solid var(--line); border-radius: 11px; background: var(--surface); overflow: clip; }
.commands-directive-card[open] { border-color: color-mix(in srgb, var(--gold) 62%, var(--line)); box-shadow: 0 10px 28px rgba(25, 47, 41, .06); }
.commands-directive-card > summary { min-height: 66px; display: flex; align-items: center; gap: 11px; padding: 10px 14px 10px 10px; color: var(--ink); cursor: pointer; list-style: none; }
.commands-directive-card > summary::-webkit-details-marker { display: none; }
.commands-directive-card > summary::before { content: '›'; flex: 0 0 auto; color: var(--gold); font-size: 18px; font-weight: 900; transform: rotate(0); transition: transform .15s ease; }
.commands-directive-card[open] > summary::before { transform: rotate(90deg); }
.commands-index-number { flex: 0 0 auto; min-width: 62px; min-height: 50px; display: inline-grid; place-content: center; gap: 1px; padding: 5px 9px; border: 2px solid color-mix(in srgb, var(--gold) 78%, var(--brand)); border-radius: 12px; color: #fff; background: var(--brand); box-shadow: 0 4px 12px rgba(13, 75, 63, .17); text-align: center; font-variant-numeric: tabular-nums; }
.commands-index-number small { color: color-mix(in srgb, #fff 82%, var(--gold-soft)); font: 800 8px/1.05 "DM Sans", system-ui, sans-serif; letter-spacing: .07em; text-transform: uppercase; }
.commands-index-number b { font: 900 17px/1.05 "DM Sans", system-ui, sans-serif; }
.commands-directive-card > summary:hover .commands-index-number, .commands-directive-card > summary:focus-visible .commands-index-number, .commands-directive-card[open] > summary .commands-index-number { border-color: var(--gold); color: var(--brand); background: var(--gold-soft); box-shadow: 0 5px 16px rgba(191, 139, 45, .22); }
.commands-directive-card > summary:hover .commands-index-number small, .commands-directive-card > summary:focus-visible .commands-index-number small, .commands-directive-card[open] > summary .commands-index-number small { color: var(--gold); }
.commands-index-title { min-width: 0; font: 700 14px/1.45 Georgia, serif; }
.commands-index-title-block { min-width: 0; display: grid; gap: 7px; }
.commands-admin-heading-list { display: flex; flex-wrap: wrap; gap: 5px; }
.commands-admin-heading { display: inline-flex; align-items: center; min-height: 25px; padding: 4px 8px; border: 1px solid color-mix(in srgb, var(--gold) 45%, var(--line)); border-radius: 999px; color: var(--brand); background: var(--gold-soft); font: 800 10px/1.25 "DM Sans", system-ui, sans-serif; }
.commands-index-dots { min-width: 22px; flex: 1 1 auto; border-bottom: 2px dotted color-mix(in srgb, var(--muted) 45%, transparent); transform: translateY(-3px); }
.commands-index-reference { flex: 0 0 auto; color: var(--brand); font-size: 10px; font-weight: 850; white-space: nowrap; }
.commands-index-reference-link, .commands-inline-reference-link { padding: 2px 3px; border: 0; border-radius: 5px; color: var(--brand); background: transparent; font: inherit; font-weight: 900; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; cursor: pointer; }
.commands-index-reference-link:hover, .commands-index-reference-link:focus-visible, .commands-inline-reference-link:hover, .commands-inline-reference-link:focus-visible { color: var(--surface); background: var(--brand); outline: 0; text-decoration: none; }
.commands-reference-separator { color: var(--muted); }
.commands-directive-body { display: grid; gap: 13px; padding: 2px 16px 16px; border-top: 1px solid var(--line); }
.commands-directive-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; padding-top: 13px; }
.commands-directive-select { min-height: 38px; display: inline-flex; align-items: center; gap: 6px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 9px; font-size: 9px; font-weight: 850; }
.commands-directive-select input { width: 18px; height: 18px; accent-color: var(--brand); }
.commands-supplement-select { color: var(--gold); background: var(--gold-soft); }
.commands-directive-meta { display: flex; flex-wrap: wrap; gap: 6px; padding-top: 13px; }
.commands-directive-meta span { padding: 5px 8px; border-radius: 999px; color: var(--brand); background: var(--brand-soft); font-size: 9px; font-weight: 800; }
.commands-directive-section { display: grid; gap: 5px; }
.commands-directive-section strong { color: var(--gold); font-size: 10px; letter-spacing: .04em; text-transform: uppercase; }
.commands-directive-section p { margin: 0; color: var(--ink); font: var(--meal-size)/1.62 Georgia, serif; overflow-wrap: anywhere; }
.commands-reference-list { display: grid; gap: 11px; }
.commands-reference { display: grid; gap: 9px; padding: 13px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface-2); }
.commands-reference-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 9px; }
.commands-inline-reference-link { min-height: 34px; padding: 6px 8px; font-size: 10px; }
.commands-reference-word-flow { margin: 3px 0; padding: 12px 5px; border-block: 1px solid var(--line); }
.commands-reference-word-flow .word-button { scroll-margin-block: 42vh; }
.commands-reference-arabic { direction: rtl; margin: 0; color: var(--ink); text-align: right; font: var(--arabic-size)/2 "Amiri Quran", "Traditional Arabic", serif; }
.commands-reference-meal { margin: 0; color: var(--ink); font: var(--meal-size)/1.65 Georgia, serif; }
.commands-reference-supplements { display: grid; gap: 8px; }
.commands-reference-supplement { display: grid; gap: 4px; padding: 10px; border-inline-start: 3px solid var(--gold); border-radius: 8px; background: var(--surface); }
.commands-reference-supplement strong { color: var(--gold); font-size: 9px; text-transform: uppercase; }
.commands-reference-supplement p { margin: 0; font: var(--meal-size)/1.58 Georgia, serif; }
.commands-speech-active { border-radius: 8px; outline: 3px solid color-mix(in srgb, var(--gold) 64%, transparent); background: color-mix(in srgb, var(--gold-soft) 75%, transparent); }
.commands-reference-link { justify-self: start; min-height: 40px; padding: 8px 12px; border: 1px solid color-mix(in srgb, var(--gold) 55%, var(--line)); border-radius: 9px; color: var(--brand); background: var(--gold-soft); font-size: 10px; font-weight: 850; cursor: pointer; }
.commands-reference-link:hover, .commands-reference-link:focus-visible { color: var(--surface); border-color: var(--brand); background: var(--brand); outline: 0; }
.commands-load-more { justify-self: center; min-height: 43px; padding: 9px 18px; border: 1px solid var(--brand); border-radius: 10px; color: var(--surface); background: var(--brand); font-weight: 800; cursor: pointer; }
.commands-empty { margin: 0; padding: 22px; border: 1px dashed var(--line); border-radius: 12px; color: var(--muted); text-align: center; font-size: 11px; }
.commands-mode-caution { margin: 13px 0 0; padding: 12px 14px; border-inline-start: 3px solid var(--danger); border-radius: 8px; color: var(--muted); background: color-mix(in srgb, var(--danger) 7%, var(--surface)); font-size: 11px; line-height: 1.55; }
.commands-return-floating { position: fixed; z-index: 82; inset-inline-end: 18px; bottom: calc(var(--dock-height, 88px) + 18px); min-height: 44px; padding: 10px 14px; border: 1px solid var(--gold); border-radius: 999px; color: var(--surface); background: var(--brand); box-shadow: 0 12px 34px rgba(13, 39, 33, .24); font-size: 10px; font-weight: 900; cursor: pointer; }
.commands-return-floating[hidden] { display: none; }
.revelation-mode-caution { margin: 13px 0; padding: 12px 14px; border-inline-start: 3px solid var(--gold); border-radius: 8px; color: var(--muted); background: color-mix(in srgb, var(--gold-soft) 55%, var(--surface)); font-size: 11px; line-height: 1.55; }
.revelation-mode-navigation { display: grid; grid-template-columns: 1fr minmax(220px, 1.2fr) 1fr 1fr; gap: 10px; }
.revelation-mode-navigation > button, .revelation-mode-navigation > label { min-height: 68px; display: flex; align-items: center; justify-content: center; gap: 10px; padding: 11px 14px; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); background: var(--surface); }
.revelation-mode-navigation > button { cursor: pointer; }
.revelation-mode-navigation > button:disabled { cursor: not-allowed; opacity: .45; }
.revelation-mode-navigation > button span, .revelation-mode-navigation > label { min-width: 0; }
.revelation-mode-navigation small, .revelation-mode-navigation strong { display: block; }
.revelation-mode-navigation small, .revelation-mode-navigation label > span { color: var(--muted); font-size: 8px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
.revelation-mode-navigation strong { margin-top: 3px; overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.revelation-mode-navigation label { display: grid; align-content: center; }
.revelation-mode-navigation select { width: 100%; border: 0; color: var(--brand); background: transparent; font: 800 11px/1.3 "DM Sans", system-ui, sans-serif; outline: 0; }
body.app-mode-revelation .revelation-context { border-color: color-mix(in srgb, var(--gold) 72%, var(--line)); box-shadow: 0 8px 22px rgba(25, 47, 41, .05); }
body.app-mode-revelation .revelation-context-toggle { background: var(--gold-soft); }
.revelation-context { display: grid; gap: 11px; margin-top: 15px; padding: 15px; border: 1px solid color-mix(in srgb, var(--gold) 45%, var(--line)); border-radius: 13px; background: color-mix(in srgb, var(--gold-soft) 38%, var(--surface)); }
.revelation-context-heading, .revelation-context-source-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.revelation-context-heading > div { display: grid; gap: 3px; }
.revelation-context-heading span:first-child { color: var(--gold); font-size: 9px; font-weight: 850; letter-spacing: .08em; }
.revelation-context-heading strong { color: var(--brand); font-size: 13px; }
.revelation-context-count { flex: 0 0 auto; padding: 5px 8px; border-radius: 999px; color: var(--brand); background: var(--brand-soft); font-size: 9px; font-weight: 850; }
.revelation-context-notice { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.55; }
.revelation-context-toggle { justify-self: start; min-height: 40px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; color: var(--brand); background: var(--surface); font-size: 10px; font-weight: 800; cursor: pointer; }
.revelation-context-toggle:disabled { opacity: .65; cursor: wait; }
.revelation-context-body { display: grid; gap: 10px; }
.revelation-context-body[hidden] { display: none; }
.revelation-context-source { display: grid; gap: 9px; padding: 13px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); }
.revelation-context-source-heading strong { color: var(--brand); font-size: 11px; }
.revelation-context-source-heading a { color: var(--gold); font-size: 9px; font-weight: 800; text-decoration: none; }
.revelation-context-source-heading a:hover { text-decoration: underline; text-underline-offset: 3px; }
.revelation-context-metadata { display: flex; flex-wrap: wrap; gap: 6px; }
.revelation-context-metadata span { padding: 5px 7px; border-radius: 999px; color: var(--muted); background: var(--surface-2); font-size: 9px; font-weight: 700; }
.revelation-context-content { color: var(--ink); font: var(--meal-size)/1.68 Georgia, serif; overflow-wrap: anywhere; }
.revelation-context-content > :first-child { margin-top: 0; }
.revelation-context-content > :last-child { margin-bottom: 0; }
.revelation-context-content p, .revelation-context-content div { margin: 0 0 10px; }
.revelation-context-source-arabic { text-align: right; }
.revelation-context-source-arabic .revelation-context-source-heading { direction: rtl; }
.revelation-context-source-arabic .revelation-context-content { direction: rtl; text-align: right; font-family: "Amiri Quran", "Traditional Arabic", serif; font-size: clamp(18px, calc(var(--meal-size) * 1.15), 30px); line-height: 2; }
.revelation-context-source-arabic .revelation-context-content > div > div { padding: 10px 0; border-top: 1px solid var(--line); }
.revelation-context-source-arabic .revelation-context-content > div > div:first-child { padding-top: 0; border-top: 0; }
.revelation-context-source-arabic .revelation-context-content strong { color: var(--gold); font-family: "DM Sans", system-ui, sans-serif; font-size: 10px; }
.revelation-context-translation-actions { display: flex; align-items: center; justify-content: flex-start; padding-top: 8px; border-top: 1px solid var(--line); direction: ltr; }
.revelation-context-translate { min-height: 40px; padding: 8px 12px; border: 1px solid color-mix(in srgb, var(--gold) 48%, var(--line)); border-radius: 10px; color: var(--brand); background: var(--gold-soft); font-size: 10px; font-weight: 800; cursor: pointer; }
.revelation-context-translate:hover, .revelation-context-translate:focus-visible { color: var(--surface); border-color: var(--brand); background: var(--brand); }
.revelation-context-translate:disabled { opacity: .65; cursor: wait; }
.revelation-context-translation { margin-top: 2px; padding: 12px 13px; border-inline-start: 3px solid var(--gold); border-radius: 9px; color: var(--ink); background: var(--gold-soft); font: var(--meal-size)/1.68 Georgia, serif; white-space: pre-wrap; overflow-wrap: anywhere; }
.revelation-context-translation[hidden] { display: none; }
.revelation-context-translation-notice { display: block; margin-bottom: 8px; color: var(--gold); font: 800 9px/1.45 "DM Sans", system-ui, sans-serif; letter-spacing: .02em; }
.revelation-context-translation p { margin: 0; }

@media (max-width: 820px) {
    .revelation-mode-grid, .commands-mode-grid { grid-template-columns: 1fr; }
    .revelation-mode-navigation { grid-template-columns: 1fr 1fr; }
    .revelation-mode-navigation > label { grid-column: 1 / -1; grid-row: 1; }
}

@media (max-width: 520px) {
    .revelation-workspace, .commands-workspace { padding: 16px; }
    .revelation-order-badge, .commands-mode-badge { width: 72px; height: 72px; }
    .revelation-mode-navigation { grid-template-columns: 1fr; }
    .revelation-mode-navigation > label { grid-column: auto; }
    .commands-catalog-toolbar { align-items: stretch; flex-direction: column; }
    .commands-catalog-toolbar label { flex-basis: auto; }
    .commands-catalog-toolbar > div { text-align: start; }
    .commands-directive-card > summary { min-height: 64px; align-items: center; gap: 8px; padding: 9px 10px 9px 7px; }
    .commands-index-number { min-width: 56px; min-height: 48px; padding-inline: 7px; }
    .commands-index-number b { font-size: 16px; }
    .commands-index-title { font-size: 13px; }
    .commands-index-reference { max-width: 34%; overflow: hidden; text-overflow: ellipsis; }
    .commands-directive-body { padding-inline: 12px; }
}
.hifz-stage-flow { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 20px 0; }
.hifz-stage-flow span { display: inline-flex; align-items: center; gap: 7px; padding: 8px 11px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); background: var(--surface); font-size: 10px; font-weight: 800; }
.hifz-stage-flow span b { width: 21px; height: 21px; display: grid; place-items: center; border-radius: 50%; background: var(--surface-2); }
.hifz-stage-flow span.active { color: var(--surface); border-color: var(--brand); background: var(--brand); }
.hifz-stage-flow span.done { color: var(--brand); border-color: var(--brand); background: var(--brand-soft); }
.hifz-stage-flow i { color: var(--gold); font-style: normal; }
.hifz-controls { display: grid; grid-template-columns: repeat(4, minmax(125px, .62fr)) minmax(235px, 1.25fr); gap: 12px; }
.hifz-controls > label, .hifz-boundary-control, .hifz-session-summary { min-height: 74px; display: grid; align-content: center; gap: 7px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); }
.hifz-controls > label > span, .hifz-boundary-main > span, .hifz-word-boundary-select > span, .hifz-session-summary small { color: var(--muted); font-size: 9px; font-weight: 750; }
.hifz-boundary-main, .hifz-word-boundary-select { display: grid; gap: 7px; }
.hifz-word-boundary-toggle { display: flex; align-items: center; gap: 7px; padding-top: 7px; border-top: 1px solid var(--line); color: var(--brand); font-size: 9px; font-weight: 850; cursor: pointer; }
.hifz-word-boundary-toggle input { width: 17px; height: 17px; margin: 0; accent-color: var(--brand); }
.hifz-word-boundary-select { margin-top: 1px; padding: 8px; border-radius: 9px; background: var(--brand-soft); }
.hifz-word-boundary-select[hidden] { display: none !important; }
.hifz-word-boundary-select select:disabled { opacity: .55; }
.hifz-controls select { width: 100%; border: 0; color: var(--ink); background: transparent; font: 800 12px/1.2 inherit; outline: 0; }
.hifz-controls select:focus-visible { border-radius: 7px; outline: 2px solid color-mix(in srgb, var(--gold) 70%, transparent); outline-offset: 4px; }
.hifz-session-summary strong { font-size: 12px; }
.hifz-session-summary span { color: var(--gold); font-size: 10px; font-weight: 800; }
.hifz-actions { display: grid; grid-template-columns: minmax(220px, 1.5fr) repeat(3, minmax(130px, .7fr)); gap: 10px; margin-top: 13px; }
.hifz-actions > button { min-height: 55px; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); background: var(--surface); font: inherit; cursor: pointer; }
.hifz-actions .primary-action { width: auto; margin: 0; color: white; border-color: var(--brand); background: var(--brand); }
.hifz-actions button:disabled { opacity: .45; cursor: not-allowed; }
.learning-status { margin: 13px 0 0; padding: 10px 12px; border-radius: 10px; color: var(--muted); background: var(--surface-2); font-size: 10px; line-height: 1.5; }
.hifz-stats { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 11px; }
.hifz-stats span { padding: 7px 10px; border-radius: 999px; color: var(--brand); background: var(--brand-soft); font-size: 9px; }
.hifz-stats strong { font-size: 12px; }
.ayah-card.hifz-hidden .arabic-words { filter: blur(10px); user-select: none; pointer-events: none; transition: filter .2s; }
.ayah-card.hifz-hidden.hifz-peek .arabic-words { filter: none; pointer-events: auto; }
.ayah-card.hifz-range { border-color: color-mix(in srgb, var(--gold) 72%, var(--line)); }
body.app-mode-hifz.hifz-show-word-index .word[data-audio-word]::before { content: attr(data-audio-word); position: absolute; inset-block-start: 4px; inset-inline-start: 5px; min-width: 19px; height: 19px; display: grid; place-items: center; padding: 0 4px; border-radius: 999px; color: var(--brand); background: var(--brand-soft); font: 850 9px/1 "DM Sans", system-ui, sans-serif; }
body.app-mode-hifz.hifz-show-word-index .word[data-audio-word] { padding-top: 27px; }
body.app-mode-hifz .word.hifz-boundary-start { box-shadow: inset 0 0 0 2px #1b8b68, 0 0 0 3px color-mix(in srgb, #1b8b68 18%, transparent); }
body.app-mode-hifz .word.hifz-boundary-end { box-shadow: inset 0 0 0 2px var(--gold), 0 0 0 3px color-mix(in srgb, var(--gold) 18%, transparent); }
body.app-mode-hifz .word.hifz-boundary-start.hifz-boundary-end { box-shadow: inset 0 0 0 2px var(--brand), 0 0 0 4px color-mix(in srgb, var(--gold) 32%, transparent); }

.juzhan-layout { display: grid; grid-template-columns: minmax(190px, .42fr) minmax(0, 1.58fr); gap: 16px; margin-top: 18px; }
.juzhan-lessons { max-height: 690px; display: grid; align-content: start; gap: 8px; padding-inline-end: 4px; overflow-y: auto; scrollbar-width: thin; }
.juzhan-track-heading { position: sticky; top: 0; z-index: 2; margin-top: 4px; padding: 8px 9px 6px; border-bottom: 1px solid color-mix(in srgb, var(--gold) 55%, var(--line)); color: var(--gold); background: color-mix(in srgb, var(--surface) 94%, transparent); font-size: 9px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; }
.juzhan-track-heading:first-child { margin-top: 0; }
.juzhan-lesson-button { display: grid; grid-template-columns: 31px minmax(0, 1fr) auto; align-items: center; gap: 9px; padding: 10px; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); background: var(--surface); text-align: left; cursor: pointer; }
.juzhan-lesson-button > span:first-child { width: 31px; height: 31px; display: grid; place-items: center; border-radius: 9px; color: var(--brand); background: var(--brand-soft); font-weight: 900; }
.juzhan-lesson-button strong, .juzhan-lesson-button small { display: block; }
.juzhan-lesson-button strong { font-size: 13px; }
.juzhan-lesson-button small { margin-top: 3px; color: var(--muted); font-size: 10px; line-height: 1.35; }
.juzhan-lesson-button.active { color: #fff; border-color: var(--juzhan-lesson-color, var(--brand)); background: var(--juzhan-lesson-color, var(--brand)); box-shadow: 0 8px 20px color-mix(in srgb, var(--juzhan-lesson-color, var(--brand)) 25%, transparent); }
.juzhan-lesson-button.active > span:first-child { color: var(--juzhan-lesson-color, var(--brand)); background: #fff; }
.juzhan-lesson-button .lesson-check { color: var(--gold); font-size: 13px; }
.juzhan-lesson-area { min-width: 0; padding: 16px; border: 1px solid var(--line); border-radius: 15px; background: var(--surface); }
.juzhan-lesson-area > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.juzhan-lesson-area > header small { color: var(--gold); font-size: 9px; font-weight: 900; }
.juzhan-lesson-area > header h3 { margin: 3px 0 0; font-size: 19px; }
.juzhan-lesson-header-actions { display: flex; align-items: center; justify-content: flex-end; gap: 9px; flex-wrap: wrap; }
.juzhan-latin-toggle { min-height: 38px; display: inline-flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 9px; color: var(--ink); background: var(--surface-2); font-size: 11px; font-weight: 800; cursor: pointer; }
.juzhan-latin-toggle input { width: 18px; height: 18px; margin: 0; accent-color: var(--brand); cursor: pointer; }
#juzhan-complete-lesson, #juzhan-next-question { padding: 9px 12px; border: 1px solid var(--brand); border-radius: 9px; color: var(--brand); background: var(--brand-soft); font: 800 10px/1.2 inherit; cursor: pointer; }
#juzhan-lesson-description { color: var(--muted); font-size: 12px; line-height: 1.6; }
.juzhan-color-key { display: flex; align-items: stretch; gap: 7px; margin: 10px 0 12px; padding: 2px 1px 5px; overflow-x: auto; scrollbar-width: thin; }
.juzhan-color-key > span { flex: 0 0 auto; min-width: 88px; display: grid; grid-template-columns: 34px auto; align-items: center; gap: 7px; padding: 8px 10px; border: 1px solid color-mix(in srgb, currentColor 28%, var(--line)); border-radius: 999px; background: color-mix(in srgb, currentColor 8%, var(--surface)); }
.juzhan-color-key i { font: normal 29px/1 "Amiri Quran", "Traditional Arabic", serif; text-align: center; }
.juzhan-color-key b { color: var(--ink); font-size: 10px; white-space: nowrap; }
.juzhan-color-key > .mark-fatha { color: var(--juzhan-fatha); }
.juzhan-color-key > .mark-kasra { color: var(--juzhan-kasra); }
.juzhan-color-key > .mark-damma { color: var(--juzhan-damma); }
.juzhan-color-key > .mark-sukun { color: var(--juzhan-sukun); }
.juzhan-color-key > .mark-shadda { color: var(--juzhan-shadda); }
.juzhan-color-key > .mark-tanwin { color: var(--juzhan-tanwin); }
.juzhan-color-key > .mark-madd { color: var(--juzhan-madd); }
.juzhan-color-key .mark-fatha i, .juzhan-colored-glyph.mark-fatha { color: var(--juzhan-fatha); }
.juzhan-color-key .mark-kasra i, .juzhan-colored-glyph.mark-kasra { color: var(--juzhan-kasra); }
.juzhan-color-key .mark-damma i, .juzhan-colored-glyph.mark-damma { color: var(--juzhan-damma); }
.juzhan-color-key .mark-sukun i, .juzhan-colored-glyph.mark-sukun { color: var(--juzhan-sukun); }
.juzhan-color-key .mark-shadda i, .juzhan-colored-glyph.mark-shadda { color: var(--juzhan-shadda); }
.juzhan-color-key .mark-tanwin i, .juzhan-colored-glyph.mark-tanwin { color: var(--juzhan-tanwin); }
.juzhan-color-key .mark-madd i, .juzhan-colored-glyph.mark-madd { color: var(--juzhan-madd); }
.juzhan-colored-glyph { display: inline; color: inherit; transition: color .18s ease, filter .18s ease; }
.juzhan-colored-glyph.mark-shadda.mark-kasra { color: color-mix(in srgb, var(--juzhan-shadda) 58%, var(--juzhan-kasra)); }
.juzhan-colored-glyph.mark-shadda.mark-fatha { color: color-mix(in srgb, var(--juzhan-shadda) 58%, var(--juzhan-fatha)); }
.juzhan-colored-glyph.mark-shadda.mark-damma { color: color-mix(in srgb, var(--juzhan-shadda) 58%, var(--juzhan-damma)); }
.juzhan-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 10px; max-height: 410px; padding: 3px 6px 3px 3px; overflow: auto; scrollbar-width: thin; }
.juzhan-card { --juzhan-card-color: var(--gold); position: relative; min-height: 122px; display: grid; place-items: center; align-content: center; gap: 7px; padding: 13px 10px 11px; border: 1px solid color-mix(in srgb, var(--juzhan-card-color) 42%, var(--line)); border-radius: 14px; color: var(--ink); background: linear-gradient(145deg, color-mix(in srgb, var(--juzhan-card-color) 9%, var(--surface)), var(--surface)); box-shadow: inset 0 4px 0 color-mix(in srgb, var(--juzhan-card-color) 50%, transparent); cursor: pointer; transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease, background .18s ease; }
.juzhan-card[data-juzhan-tone="fatha"] { --juzhan-card-color: var(--juzhan-fatha); }
.juzhan-card[data-juzhan-tone="kasra"] { --juzhan-card-color: var(--juzhan-kasra); }
.juzhan-card[data-juzhan-tone="damma"] { --juzhan-card-color: var(--juzhan-damma); }
.juzhan-card[data-juzhan-tone="sukun"] { --juzhan-card-color: var(--juzhan-sukun); }
.juzhan-card[data-juzhan-tone="shadda"] { --juzhan-card-color: var(--juzhan-shadda); }
.juzhan-card[data-juzhan-tone="tanwin"] { --juzhan-card-color: var(--juzhan-tanwin); }
.juzhan-card[data-juzhan-tone="madd"] { --juzhan-card-color: var(--juzhan-madd); }
.juzhan-quiz-prompt[data-juzhan-tone="fatha"] { --juzhan-card-color: var(--juzhan-fatha); }
.juzhan-quiz-prompt[data-juzhan-tone="kasra"] { --juzhan-card-color: var(--juzhan-kasra); }
.juzhan-quiz-prompt[data-juzhan-tone="damma"] { --juzhan-card-color: var(--juzhan-damma); }
.juzhan-quiz-prompt[data-juzhan-tone="sukun"] { --juzhan-card-color: var(--juzhan-sukun); }
.juzhan-quiz-prompt[data-juzhan-tone="shadda"] { --juzhan-card-color: var(--juzhan-shadda); }
.juzhan-quiz-prompt[data-juzhan-tone="tanwin"] { --juzhan-card-color: var(--juzhan-tanwin); }
.juzhan-quiz-prompt[data-juzhan-tone="madd"] { --juzhan-card-color: var(--juzhan-madd); }
.juzhan-card[data-juzhan-tone="mixed"] { border-color: transparent; background: linear-gradient(var(--surface), var(--surface)) padding-box, linear-gradient(135deg, var(--juzhan-fatha), var(--juzhan-kasra), var(--juzhan-damma), var(--juzhan-shadda), var(--juzhan-tanwin)) border-box; box-shadow: inset 0 3px 0 color-mix(in srgb, var(--juzhan-madd) 42%, transparent); }
.juzhan-card:hover, .juzhan-card.active { transform: translateY(-2px); border-color: var(--juzhan-card-color); background: color-mix(in srgb, var(--juzhan-card-color) 14%, var(--surface)); box-shadow: inset 0 3px 0 var(--juzhan-card-color), 0 8px 18px color-mix(in srgb, var(--juzhan-card-color) 18%, transparent); }
.juzhan-card b { max-width: 100%; font: 48px/1.3 "Amiri Quran", "Traditional Arabic", serif; overflow-wrap: anywhere; }
.juzhan-cards[data-juzhan-lesson="0"] .juzhan-card b { font-size: clamp(62px, 6.5vw, 76px); line-height: 1.15; }
.juzhan-cards[data-juzhan-lesson="1"] .juzhan-card b { font-size: clamp(56px, 5.8vw, 68px); line-height: 1.18; }
.juzhan-card > span { font-size: 14px; font-weight: 900; line-height: 1.3; }
.juzhan-card-reading { display: none; }
.juzhan-cards.show-latin-readings .juzhan-card-reading { display: block; }
.juzhan-card small { color: var(--muted); font-size: 11px; font-weight: 700; line-height: 1.3; }
.juzhan-card::before { content: "2×"; position: absolute; top: 7px; inset-inline-start: 8px; padding: 3px 6px; border-radius: 999px; color: var(--brand); background: var(--brand-soft); font: 900 9px/1.2 "DM Sans", system-ui, sans-serif; }
.juzhan-cards.is-informational .juzhan-card::before { content: "Bilgi"; }
.juzhan-cards.is-informational .juzhan-card { min-height: 150px; cursor: default; }
.juzhan-cards.is-informational .juzhan-card b { font-size: clamp(48px, 5vw, 64px); }
.juzhan-card-group-title { grid-column: 1 / -1; margin: 8px 0 0; padding: 9px 12px; border-inline-start: 4px solid var(--gold); border-radius: 9px; color: var(--brand); background: color-mix(in srgb, var(--gold) 9%, var(--surface-2)); font-size: 15px; line-height: 1.35; }
.juzhan-card-group-title:first-child { margin-top: 0; }
.juzhan-card.juzhan-audio-loading, .juzhan-quiz-prompt.juzhan-audio-loading { opacity: .72; animation: word-audio-pulse .85s ease-in-out infinite; }
.juzhan-card.juzhan-audio-playing, .juzhan-quiz-prompt.juzhan-audio-playing { color: var(--juzhan-card-color, var(--brand)); border-color: var(--juzhan-card-color, var(--brand)); background: color-mix(in srgb, var(--juzhan-card-color, var(--brand)) 15%, var(--surface)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--juzhan-card-color, var(--brand)) 18%, transparent); }
.juzhan-card.juzhan-audio-loading::after, .juzhan-card.juzhan-audio-playing::after { position: absolute; top: 5px; inset-inline-end: 6px; min-width: 18px; display: grid; place-items: center; padding: 2px 5px; border-radius: 999px; color: var(--brand); background: var(--surface); font: 900 8px/1.2 "DM Sans", system-ui, sans-serif; }
.juzhan-card.juzhan-audio-loading::after { content: "…"; }
.juzhan-card.juzhan-audio-playing::after { content: "♪"; }
.juzhan-quiz { display: grid; grid-template-columns: minmax(90px, .4fr) minmax(90px, .32fr) minmax(220px, 1fr) auto; align-items: center; gap: 12px; margin-top: 16px; padding: 13px; border-radius: 13px; background: var(--surface-2); }
.juzhan-quiz h3 { margin: 3px 0 0; font-size: 16px; }
.juzhan-quiz small { color: var(--gold); font-size: 10px; font-weight: 900; }
.juzhan-quiz-prompt { border: 1px solid transparent; border-radius: 10px; font: 54px/1.25 "Amiri Quran", "Traditional Arabic", serif; text-align: center; cursor: pointer; }
.juzhan-quiz-prompt:focus-visible { border-color: var(--gold); outline: 3px solid color-mix(in srgb, var(--gold) 20%, transparent); }
.juzhan-quiz-options { display: grid; grid-template-columns: repeat(2, minmax(80px, 1fr)); gap: 6px; }
.juzhan-quiz-options button { min-height: 43px; padding: 10px; border: 1px solid var(--line); border-radius: 9px; color: var(--ink); background: var(--surface); font: 850 12px/1.25 inherit; cursor: pointer; }
.juzhan-quiz-options button.correct { color: #176c4b; border-color: #4fa982; background: #e8f6ef; }
.juzhan-quiz-options button.wrong { color: #9e3d35; border-color: #d2766d; background: #faecea; }
#juzhan-quiz-feedback { grid-column: 3; margin: 0; color: var(--muted); font-size: 12px; line-height: 1.4; }
#juzhan-next-question { grid-column: 4; grid-row: 1 / span 2; }

body:not(.app-mode-hifz) #mobile-hifz,
body:not(.app-mode-juzhan) #mobile-juzhan { display: none !important; }
body:not(.app-mode-hifz) #mobile-hifz-parameters { display: none !important; }
body:not(.app-mode-commands) #mobile-commands-speech { display: none !important; }
body.app-mode-hifz #mobile-audio { display: none !important; }

body.app-mode-hifz.hifz-hide-arabic .ayah-card .arabic-words,
body.app-mode-hifz.hifz-hide-arabic .ayah-card .arabic-select-control { display: none !important; }
body.app-mode-hifz.hifz-hide-meal .ayah-card .meal-row { display: none !important; }
body.app-mode-hifz.hifz-hide-footnotes .ayah-card .meal-annotation-heading,
body.app-mode-hifz.hifz-hide-footnotes .ayah-card .meal-annotation-body,
body.app-mode-hifz.hifz-hide-footnotes .ayah-card .meal-annotation-toggle,
body.app-mode-hifz.hifz-hide-footnotes .ayah-card .revelation-context { display: none !important; }
body.app-mode-hifz.hifz-hide-linked-ayahs .ayah-card .linked-ayah-toggle,
body.app-mode-hifz.hifz-hide-linked-ayahs .ayah-card .linked-ayah-list { display: none !important; }
body.app-mode-hifz.hifz-hide-footnotes.hifz-hide-linked-ayahs .ayah-card .meal-annotation { display: none !important; }

.notice { max-width: 920px; margin: 0 auto 16px; padding: 12px 14px; border: 1px solid var(--gold); background: var(--gold-soft); border-radius: 10px; font-size: 13px; }
.notice.error { color: var(--danger); border-color: var(--danger); }
.ayah-stream { max-width: 920px; margin: 0 auto; }
.ayah-card {
    position: relative;
    margin-bottom: 16px;
    padding: 22px clamp(18px, 4vw, 34px) 20px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--surface);
    box-shadow: 0 5px 24px rgba(26, 44, 38, .035);
    scroll-margin-top: calc(var(--topbar-height) + 18px);
}
.ayah-card.focused { border-color: var(--gold); box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold) 17%, transparent); }
.ayah-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 11px; }
.ayah-meta-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.word-action-control { min-height: 30px; display: inline-flex; align-items: center; gap: 6px; padding: 4px 7px; border: 1px solid color-mix(in srgb, var(--brand) 30%, var(--line)); border-radius: 9px; color: var(--brand); background: color-mix(in srgb, var(--brand-soft) 42%, var(--surface)); font-size: 10px; font-weight: 800; white-space: nowrap; }
.word-action-control > span { opacity: .72; }
.word-action-control select { max-width: 134px; min-height: 22px; padding: 0 18px 0 2px; border: 0; outline: 0; color: var(--brand); background: transparent; font: inherit; cursor: pointer; }
.word-action-control:hover, .word-action-control:focus-within { border-color: var(--brand); background: var(--brand-soft); }
.ayah-bookmark-button { min-height: 38px; display: inline-flex; align-items: center; gap: 7px; padding: 5px 10px 5px 7px; border: 2px solid color-mix(in srgb, var(--gold) 66%, var(--line)); border-radius: 10px; color: var(--brand); background: color-mix(in srgb, var(--gold-soft) 62%, var(--surface)); font-size: 10px; font-weight: 850; box-shadow: 0 3px 10px color-mix(in srgb, var(--gold) 10%, transparent); cursor: pointer; }
.ayah-bookmark-button:hover, .ayah-bookmark-button:focus-visible { border-color: var(--gold); background: var(--gold-soft); box-shadow: 0 5px 14px color-mix(in srgb, var(--gold) 18%, transparent); }
.ayah-bookmark-button:disabled { opacity: .55; }
.ayah-bookmark-icon { width: 23px; height: 23px; flex: 0 0 23px; fill: color-mix(in srgb, var(--gold-soft) 72%, var(--surface)); stroke: var(--brand); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ayah-bookmark-copy { display: grid; gap: 1px; text-align: left; line-height: 1.05; }
.ayah-bookmark-copy strong { color: var(--brand); font-size: 11px; }
.ayah-bookmark-copy small { color: var(--muted); font-size: 7px; font-weight: 750; white-space: nowrap; }
.ayah-ref { display: flex; align-items: center; gap: 8px; color: var(--brand); font-weight: 700; }
.ayah-badge { display: none; }
.selection-box, .meal-selection-box { width: 18px; height: 18px; margin: 0; accent-color: var(--brand); }
.content-select-control { display: inline-flex; align-items: center; gap: 7px; min-height: 32px; color: var(--muted); font-size: 9px; font-weight: 650; white-space: nowrap; cursor: pointer; }
.content-select-control:hover { color: var(--brand); }
.arabic-select-control { padding: 3px 6px; border: 1px solid transparent; border-radius: 8px; }

.arabic-words {
    display: flex;
    flex-wrap: wrap;
    flex-direction: row;
    justify-content: flex-start;
    gap: 5px 2px;
    margin: 18px 0 16px;
    direction: rtl;
    text-align: right;
}
.word {
    position: relative;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    min-width: 42px;
    padding: 5px 7px;
    border: 1px solid transparent;
    border-radius: 9px;
    background: transparent;
    font: var(--arabic-size)/1.8 "Amiri Quran", "Traditional Arabic", serif;
    touch-action: manipulation;
}
.word > span:first-child { direction: rtl; unicode-bidi: isolate; }
.word-arabic { color: var(--ink); }
.word-audio-trigger { position: relative; border-radius: 7px; cursor: pointer; transition: color .16s ease, background .16s ease, box-shadow .16s ease, opacity .16s ease; -webkit-touch-callout: none; user-select: none; touch-action: manipulation; }
.word-audio-trigger:hover { background: color-mix(in srgb, var(--brand-soft) 78%, transparent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand-soft) 62%, transparent); }
.word-audio-trigger:active { transform: scale(.98); }
.word.word-audio-loading .word-audio-trigger { opacity: .58; animation: word-audio-pulse .85s ease-in-out infinite; }
.word.word-audio-playing .word-audio-trigger { color: var(--brand); background: var(--brand-soft); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 13%, transparent); }
.word.word-audio-loading::after,
.word.word-audio-playing::after { position: absolute; top: -7px; left: 50%; min-width: 20px; padding: 1px 5px; transform: translateX(-50%); border: 1px solid var(--line); border-radius: 999px; color: var(--brand); background: var(--surface); font: 800 8px/1.4 "DM Sans", system-ui, sans-serif; pointer-events: none; }
.word.word-audio-loading::after { content: "…"; }
.word.word-audio-playing::after { content: "♪"; }
@keyframes word-audio-pulse { 50% { opacity: .78; } }
.word-arabic-morphology { display: inline-flex; align-items: baseline; flex-direction: row; gap: 0; direction: rtl; unicode-bidi: isolate; }
.morphology-segment { --morphology-color: var(--ink); color: color-mix(in srgb, var(--morphology-color) 84%, var(--ink)); }
.morphology-noun { --morphology-color: #377fbd; }
.morphology-proper-noun { --morphology-color: #188ca2; }
.morphology-verb { --morphology-color: #24973c; }
.morphology-adjective { --morphology-color: #883ab8; }
.morphology-pronoun { --morphology-color: #64758a; }
.morphology-relative { --morphology-color: #81751a; }
.morphology-preposition { --morphology-color: #c13f3f; }
.morphology-conjunction { --morphology-color: #ca7027; }
.morphology-determiner { --morphology-color: #4d5754; }
.morphology-adverb { --morphology-color: #078e86; }
.morphology-particle { --morphology-color: #ae5f39; }
.morphology-initials { --morphology-color: #865796; }
.morphology-other { --morphology-color: #68716e; }
.word-morphology-labels { max-width: 136px; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 3px; font-family: "DM Sans", system-ui, sans-serif; font-size: clamp(7px, calc(var(--word-meaning-size) * .76), 10px); line-height: 1.25; }
.word-morphology-label { --morphology-color: #68716e; display: inline-flex; align-items: center; gap: 3px; padding: 2px 5px; border: 1px solid color-mix(in srgb, var(--morphology-color) 38%, var(--line)); border-radius: 999px; color: color-mix(in srgb, var(--morphology-color) 77%, var(--ink)); background: color-mix(in srgb, var(--morphology-color) 10%, var(--surface)); white-space: nowrap; }
.word-morphology-label b { font-size: .9em; letter-spacing: .02em; }
.word-morphology-label small { font: inherit; }
.tajweed-rule { color: inherit; }
.tajweed-ham_wasl,
.tajweed-laam_shamsiyah,
.tajweed-slnt { color: var(--tajweed-muted); }
.tajweed-madda_normal { color: var(--tajweed-madd-normal); }
.tajweed-madda_necessary,
.tajweed-madda_obligatory,
.tajweed-madda_obligatory_monfasel,
.tajweed-madda_obligatory_mottasel { color: var(--tajweed-madd-strong); }
.tajweed-madda_permissible { color: var(--tajweed-madd-permissible); }
.tajweed-ghunnah,
.tajweed-iqlab,
.tajweed-idgham_ghunnah,
.tajweed-idgham_mutajanisayn,
.tajweed-idgham_mutaqaribayn,
.tajweed-idgham_shafawi,
.tajweed-idgham_wo_ghunnah { color: var(--tajweed-ghunnah); }
.tajweed-ikhafa,
.tajweed-ikhafa_shafawi { color: var(--tajweed-ikhafa); }
.tajweed-qalaqah { color: var(--tajweed-qalaqah); }
.tajweed-custom-alef-maksora { color: inherit; }
.word:hover { background: var(--surface-2); }
.word.current { border-color: var(--gold); background: var(--gold-soft); }
.word.correct { border-color: var(--success); background: color-mix(in srgb, var(--success) 12%, transparent); }
.word.incorrect { border-color: var(--danger); background: color-mix(in srgb, var(--danger) 11%, transparent); }
.word-meaning, .word-location { font-family: "DM Sans", system-ui, sans-serif; line-height: 1.25; direction: ltr; }
.word-meaning { --word-language-accent: #63706b; display: flex; align-items: baseline; justify-content: center; gap: 4px; max-width: 112px; color: color-mix(in srgb, var(--word-language-accent) 84%, var(--ink)); font-size: var(--word-meaning-size); font-weight: 700; text-align: center; }
.word-meaning + .word-meaning { margin-top: -3px; }
.word-meaning-language { flex: 0 0 auto; min-width: 18px; padding: 1px 3px; border: 1px solid color-mix(in srgb, var(--word-language-accent) 48%, var(--line)); border-radius: 999px; color: color-mix(in srgb, var(--word-language-accent) 88%, var(--ink)); background: color-mix(in srgb, var(--word-language-accent) 14%, var(--surface)); font-size: clamp(7px, calc(var(--word-meaning-size) * .68), 10px); font-weight: 850; line-height: 1.35; letter-spacing: .04em; }
.word-meaning-tr { --word-language-accent: #087d67; }
.word-meaning-en { --word-language-accent: #b36a05; }
.word-meaning-ru { --word-language-accent: #315fc7; }
.word-meaning-zh { --word-language-accent: #b43b73; }
.word-meaning-ko { --word-language-accent: #6649b2; }
.word-meaning-ja { --word-language-accent: #c2463d; }
.word-meaning-it { --word-language-accent: #27804e; }
.word-meaning-fr { --word-language-accent: #7650c1; }
.word-meaning-de { --word-language-accent: #777f19; }
.word-meaning-nl { --word-language-accent: #087f9d; }
.word-meaning-fa { --word-language-accent: #985426; }
.word-meaning-lat { --word-language-accent: #59677e; }
.word-meaning-tr-lat { --word-language-accent: #c85b16; }
.word-meaning-lat .word-meaning-language,
.word-meaning-tr-lat .word-meaning-language { min-width: 25px; }
.word-meaning-lat > span:last-child,
.word-meaning-tr-lat > span:last-child { font-style: italic; }
.word-meaning > span { min-width: 0; overflow-wrap: anywhere; }
.word-broken-meal { --word-language-accent: #8b4cc2; display: flex; flex-wrap: wrap; align-items: baseline; justify-content: center; gap: 3px 4px; max-width: 112px; color: color-mix(in srgb, var(--word-language-accent) 84%, var(--ink)); font-family: "DM Sans", system-ui, sans-serif; font-size: var(--word-meaning-size); font-weight: 700; line-height: 1.25; direction: ltr; text-align: center; }
.word-broken-meal-label { flex: 0 0 auto; min-width: 18px; padding: 1px 3px; border: 1px solid color-mix(in srgb, var(--word-language-accent) 48%, var(--line)); border-radius: 999px; color: color-mix(in srgb, var(--word-language-accent) 88%, var(--ink)); background: color-mix(in srgb, var(--word-language-accent) 14%, var(--surface)); font-family: "DM Sans", system-ui, sans-serif; font-size: clamp(7px, calc(var(--word-meaning-size) * .68), 10px); font-weight: 850; line-height: 1.35; letter-spacing: .04em; }
.word-broken-meal-text { flex: 1 1 72px; min-width: 0; overflow-wrap: anywhere; }
.word-broken-meal-span { flex: 0 0 auto; padding: 1px 4px; border-radius: 999px; color: var(--muted); background: var(--surface-2); font-family: "DM Sans", system-ui, sans-serif; font-size: clamp(7px, calc(var(--word-meaning-size) * .68), 10px); font-weight: 750; line-height: 1.35; white-space: nowrap; }
.word-location { color: var(--gold); font-size: 8px; letter-spacing: .03em; }
.meal-row { display: flex; align-items: flex-start; gap: 14px; padding-top: 15px; border-top: 1px solid var(--line); }
.meal-content { flex: 1; min-width: 0; }
.meal-text { min-width: 0; margin: 0; color: var(--muted); font: var(--meal-size)/1.75 Georgia, serif; }
.meal-source-attribution { display: block; width: fit-content; max-width: 100%; margin-top: 8px; color: var(--muted); font-family: "DM Sans", system-ui, sans-serif; font-size: clamp(11px, calc(var(--meal-size) * .58), 13px); font-weight: 650; line-height: 1.45; overflow-wrap: anywhere; }
.meal-source-attribution::before { content: "Kaynak · "; color: var(--gold); font-weight: 850; }
.meal-source-attribution a { color: var(--brand); font-weight: 850; text-decoration: underline; text-underline-offset: 2px; }
.meal-source-attribution a:hover { color: var(--gold); }
.meal-choice-attribution { margin-top: 7px; padding-top: 7px; border-top: 1px dashed var(--line); font-size: 10px; }
.meal-text-formatted { color: color-mix(in srgb, var(--muted) 78%, var(--surface)); }
.meal-text-formatted strong { color: var(--ink); font-weight: 750; }
.meal-text-formatted em { color: color-mix(in srgb, var(--muted) 82%, var(--surface)); font-style: normal; font-weight: 400; }
.meal-speech-word { border-radius: .28em; box-decoration-break: clone; -webkit-box-decoration-break: clone; transition: color .12s ease, background-color .12s ease, box-shadow .12s ease; }
.meal-speech-word.meal-speech-text-reciting { color: var(--brand); background: var(--gold-soft); box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold) 18%, transparent); }
.meal-speech-focus-target {
    scroll-margin-top: calc(var(--topbar-height) + 18px);
    border-radius: 10px;
    outline: 2px solid color-mix(in srgb, var(--gold) 68%, transparent);
    outline-offset: 6px;
    background: color-mix(in srgb, var(--gold-soft) 42%, transparent);
    transition: outline-color .2s, background .2s;
}
.meal-speech-transcript {
    display: grid;
    gap: 7px;
    margin-top: 15px;
    padding: 13px 15px;
    border: 1px solid color-mix(in srgb, var(--gold) 45%, var(--line));
    border-radius: 12px;
    color: var(--ink);
    background: color-mix(in srgb, var(--gold-soft) 48%, var(--surface));
}
.meal-speech-transcript strong { color: var(--brand); font-size: 10px; }
.meal-speech-transcript p { margin: 0; font: var(--meal-size)/1.68 Georgia, serif; overflow-wrap: anywhere; }
.meal-speech-transcript .meal-speech-transcript-arabic { font-family: "Amiri Quran", "Traditional Arabic", serif; font-size: min(var(--arabic-size), 40px); line-height: 1.75; text-align: right; }
.meal-select-control { flex: 0 0 auto; padding: 4px 7px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); }
.meal-select-control:has(.meal-selection-box:checked), .arabic-select-control:has(.selection-box:checked) { color: var(--brand); border-color: var(--brand); }
.meal-annotation { display: grid; gap: 12px; margin-top: 15px; padding: 15px; border: 1px solid color-mix(in srgb, var(--gold) 45%, var(--line)); border-radius: 13px; background: color-mix(in srgb, var(--gold-soft) 46%, var(--surface)); }
.meal-annotation-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding-bottom: 10px; border-bottom: 1px solid color-mix(in srgb, var(--gold) 35%, var(--line)); }
.meal-annotation-heading strong { color: var(--brand); font-size: 11px; }
.meal-annotation-heading a, .linked-ayah-card > a { color: var(--gold); font-size: 9px; font-weight: 750; text-decoration: none; }
.meal-annotation-heading a:hover, .linked-ayah-card > a:hover { text-decoration: underline; text-underline-offset: 3px; }
.meal-annotation-toggle { justify-self: start; min-height: 40px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; color: var(--brand); background: var(--surface); font-size: 10px; font-weight: 800; cursor: pointer; }
.meal-annotation-toggle:hover { color: var(--surface); border-color: var(--brand); background: var(--brand); }
.meal-annotation-toggle:disabled { opacity: .65; cursor: wait; }
.meal-annotation-body { color: var(--ink); font: var(--meal-size)/1.68 Georgia, serif; overflow-wrap: anywhere; }
.meal-annotation-body > :first-child { margin-top: 0; }
.meal-annotation-body > :last-child { margin-bottom: 0; }
.meal-annotation-body p, .meal-annotation-body div { margin: 0 0 10px; }
.meal-annotation-body ul, .meal-annotation-body ol { margin: 8px 0; padding-left: 22px; }
.meal-reference-link { color: var(--brand); font-weight: 750; text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--gold) 75%, transparent); text-underline-offset: 3px; }
.meal-reference-link:hover { color: var(--gold); }
.linked-ayah-toggle { min-height: 40px; display: flex; align-items: center; gap: 9px; width: fit-content; padding: 8px 11px; border: 1px solid var(--line); border-radius: 10px; color: var(--brand); background: var(--surface); font-size: 10px; font-weight: 750; cursor: pointer; }
.linked-ayah-toggle input { width: 18px; height: 18px; margin: 0; accent-color: var(--brand); }
.linked-ayah-list { display: grid; gap: 9px; }
.linked-ayah-list[hidden] { display: none; }
.linked-ayah-status { margin: 0; padding: 13px; border: 1px dashed var(--line); border-radius: 10px; color: var(--muted); text-align: center; font-size: 10px; }
.linked-ayah-card { display: grid; gap: 7px; padding: 13px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); }
.linked-ayah-card > button { justify-self: start; padding: 6px 9px; border: 0; border-radius: 8px; color: var(--brand); background: var(--brand-soft); font-size: 10px; font-weight: 800; cursor: pointer; }
.linked-ayah-card > button:hover { color: var(--surface); background: var(--brand); }
.linked-ayah-arabic { margin: 2px 0; color: var(--ink); font-family: "Amiri Quran", "Traditional Arabic", serif; font-size: min(var(--arabic-size), 40px); line-height: 1.75; text-align: right; }
.linked-ayah-meal { margin: 0; color: var(--muted); font: var(--meal-size)/1.65 Georgia, serif; }
.memorize .arabic-words, .memorize .meal-text, .memorize .meal-annotation { filter: blur(8px); user-select: none; transition: filter .2s; }
.memorize.revealed .arabic-words, .memorize.revealed .meal-text, .memorize.revealed .meal-annotation { filter: none; }
.reveal-button { display: none; position: absolute; inset: 0; margin: auto; width: 118px; height: 38px; z-index: 3; border: 1px solid var(--gold); border-radius: 10px; background: var(--gold-soft); color: var(--ink); }
.memorize .reveal-button { display: block; }
.memorize.revealed .reveal-button { display: none; }

.loading-card { height: 230px; }
.loading-card div { height: 16px; margin: 25px 0; border-radius: 7px; }
.loading-card div:nth-child(2) { height: 60px; }

.status-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--muted); box-shadow: 0 0 0 5px var(--surface-2); }
.status-dot.live { background: var(--danger); box-shadow: 0 0 0 5px color-mix(in srgb, var(--danger) 16%, transparent); animation: pulse 1.2s infinite; }
.session-ring {
    --score: 0;
    width: 142px;
    height: 142px;
    display: grid;
    place-items: center;
    margin: 32px auto 20px;
    border-radius: 50%;
    background: conic-gradient(var(--success) calc(var(--score) * 1%), var(--surface-3) 0);
    position: relative;
}
.session-ring::before { content: ""; position: absolute; inset: 9px; border-radius: 50%; background: var(--surface); }
.session-ring div { position: relative; text-align: center; }
.session-ring strong, .session-ring span { display: block; }
.session-ring strong { font-size: 28px; letter-spacing: -.05em; }
.session-ring span { color: var(--muted); font-size: 10px; }
.session-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 20px; }
.session-stats div { display: grid; grid-template-columns: 8px 1fr; align-items: center; gap: 3px 7px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; }
.session-stats strong { font-size: 18px; }
.session-stats small { grid-column: 2; color: var(--muted); font-size: 10px; }
.correct-dot, .wrong-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--success); }
.wrong-dot { background: var(--danger); }

.primary-action { width: 100%; display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 0; border-radius: 12px; background: var(--brand); color: var(--surface); text-align: left; }
.primary-action.listening { background: var(--danger); }
.primary-action strong, .primary-action small { display: block; }
.primary-action small { margin-top: 2px; opacity: .7; font-size: 9px; }
.mic-symbol { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; background: rgba(255,255,255,.14); font-size: 11px; }
.live-transcript { min-height: 44px; margin: 12px 2px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.practice-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.practice-actions button { padding: 9px 4px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-2); font-size: 10px; }
.daily-goal { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.daily-goal div { display: flex; justify-content: space-between; font-size: 11px; }
.daily-goal progress { width: 100%; height: 6px; margin: 10px 0 5px; accent-color: var(--gold); }
.daily-goal small { color: var(--muted); font-size: 9px; }

.settings-dialog { width: min(96vw, 960px); max-height: min(94vh, 920px); padding: 0; border: 1px solid var(--line); border-radius: 18px; color: var(--ink); background: var(--surface); box-shadow: var(--shadow); }
.settings-dialog::backdrop { background: rgba(10, 20, 17, .52); backdrop-filter: blur(4px); }
.settings-dialog form { max-height: inherit; overflow-y: auto; padding: 24px; }
.reading-position-dialog { width: min(94vw, 760px); }
.reading-position-dialog form { display: grid; gap: 16px; }
.reading-position-intro { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.65; }
.reading-position-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.reading-position-actions > button { min-height: 86px; display: grid; grid-template-columns: 34px minmax(0, 1fr); align-items: center; gap: 11px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; text-align: left; color: var(--ink); background: var(--surface-2); }
.reading-position-actions > button > span:first-child { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; color: white; background: var(--brand); font-size: 15px; }
.reading-position-actions strong, .reading-position-actions small { display: block; }
.reading-position-actions strong { color: var(--brand); font-size: 13px; }
.reading-position-actions small { margin-top: 4px; color: var(--muted); font-size: 9px; line-height: 1.45; }
.reading-position-actions > button:hover, .reading-position-actions > button:focus-visible { border-color: var(--gold); background: var(--gold-soft); }
.reading-position-actions > button:disabled { opacity: .55; cursor: not-allowed; }
.reading-position-save { border-color: color-mix(in srgb, var(--gold) 60%, var(--line)) !important; }
.reading-position-save > span:first-child { background: var(--gold) !important; }
.reading-position-history-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; padding-top: 4px; border-bottom: 1px solid var(--line); }
.reading-position-history-heading > div { display: grid; gap: 3px; padding-bottom: 10px; }
.reading-position-history-heading strong { color: var(--ink); font-size: 13px; }
.reading-position-history-heading small { color: var(--muted); font-size: 9px; }
.reading-position-history-heading > span { padding-bottom: 10px; color: var(--gold); font-size: 10px; font-weight: 800; }
.reading-position-list { max-height: min(44vh, 430px); display: grid; gap: 8px; overflow-y: auto; padding-right: 5px; scrollbar-width: thin; }
.reading-position-entry { display: grid; grid-template-columns: minmax(0, 1fr) 36px; align-items: stretch; gap: 6px; }
.reading-position-entry-main { min-width: 0; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 11px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 12px; text-align: left; color: var(--ink); background: var(--surface-2); }
.reading-position-entry-main:hover, .reading-position-entry-main:focus-visible { border-color: var(--gold); background: var(--gold-soft); }
.reading-position-entry-main > span:nth-child(2) { min-width: 0; }
.reading-position-entry-main strong, .reading-position-entry-main small { display: block; }
.reading-position-entry-main strong { overflow: hidden; font-size: 12px; white-space: nowrap; text-overflow: ellipsis; }
.reading-position-entry-main small { margin-top: 3px; color: var(--muted); font-size: 9px; text-transform: capitalize; }
.reading-position-entry-main .reading-position-environment { color: var(--brand); font-weight: 700; text-transform: none; }
.reading-position-mode { min-width: 66px; padding: 6px 8px; border-radius: 999px; text-align: center; color: var(--brand); background: var(--brand-soft); font-size: 9px; font-weight: 900; }
.reading-position-mode-read { color: var(--gold); background: var(--gold-soft); }
.reading-position-mode-understand { color: var(--surface); background: var(--brand); }
.reading-position-entry-arrow { color: var(--brand); font-size: 9px; font-weight: 800; white-space: nowrap; }
.reading-position-delete { width: 36px; border: 1px solid var(--line); border-radius: 10px; color: var(--muted); background: var(--surface); font-size: 18px; }
.reading-position-delete:hover, .reading-position-delete:focus-visible { border-color: var(--danger); color: var(--danger); background: color-mix(in srgb, var(--danger) 8%, var(--surface)); }
.reading-position-empty { margin: 0; padding: 22px; border: 1px dashed var(--line); border-radius: 12px; text-align: center; color: var(--muted); font-size: 11px; line-height: 1.6; }
.reading-position-status { min-height: 18px; margin: -4px 0 0; color: var(--muted); font-size: 10px; }
.meal-settings { margin: 18px 0 4px; padding: 0; border: 0; }
.meal-settings legend { font-size: 13px; font-weight: 700; }
.meal-settings > p { margin: 5px 0 12px; color: var(--muted); font-size: 10px; line-height: 1.5; }
.meal-catalog-summary { margin: 10px 0 8px; display: grid; grid-template-columns: repeat(3, minmax(0, 150px)); gap: 8px; }
.meal-catalog-summary > span { display: flex; align-items: baseline; gap: 7px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); }
.meal-catalog-summary strong { color: var(--brand); font-size: 18px; line-height: 1; }
.meal-catalog-summary small { color: var(--muted); font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.meal-source-link { color: var(--brand); font-weight: 700; text-underline-offset: 2px; }
.meal-source-link:hover { color: var(--gold); }
.meal-filter-control { height: 44px; margin: 10px 0 12px; display: flex; align-items: center; gap: 9px; padding: 0 13px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface-2); }
.meal-filter-control:focus-within { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-soft); }
.meal-filter-control > span[aria-hidden] { color: var(--gold); font-size: 18px; }
.meal-filter-control input { width: 100%; min-width: 0; border: 0; outline: 0; color: var(--ink); background: transparent; font: inherit; font-size: 12px; }
.meal-filter-control input::placeholder { color: var(--muted); }
.meal-settings-list { max-height: min(58vh, 570px); overflow-y: auto; display: grid; gap: 14px; padding: 2px 5px 2px 2px; scrollbar-width: thin; }
.meal-language-group { display: grid; gap: 8px; }
.meal-language-heading { position: sticky; z-index: 2; top: 0; margin: 0; display: flex; align-items: center; justify-content: space-between; padding: 8px 10px; border: 1px solid var(--line); border-radius: 9px; color: var(--brand); background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: blur(8px); font-size: 12px; }
.meal-language-heading small { color: var(--muted); font-size: 9px; font-weight: 600; }
.meal-language-items { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.meal-choice { display: grid; grid-template-columns: auto 26px 1fr; align-items: center; gap: 10px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); cursor: pointer; }
.meal-choice:hover, .meal-choice.active { border-color: var(--gold); background: var(--gold-soft); }
.meal-choice.unpublished { border-style: dashed; background: color-mix(in srgb, var(--surface-2) 90%, #b5544f 10%); }
.meal-choice.unpublished:hover { border-color: #b5544f; background: color-mix(in srgb, var(--surface-2) 82%, #b5544f 18%); }
.meal-choice input { width: 16px; height: 16px; accent-color: var(--brand); }
.meal-order { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; color: var(--surface); background: var(--brand); font-size: 9px; font-weight: 700; }
.meal-choice-text { min-width: 0; }
.meal-choice-text strong, .meal-choice-text code, .meal-choice-text small { display: block; }
.meal-choice-text strong { font-size: 12px; }
.meal-publication-badge { display: inline-flex; width: fit-content; margin-top: 4px; padding: 2px 7px; border-radius: 999px; font-size: 9px; font-weight: 800; line-height: 1.4; }
.meal-publication-badge.published { color: var(--brand); background: var(--brand-soft); }
.meal-publication-badge.unpublished { color: #8f2925; background: #f8dedc; }
.meal-choice-text code { margin-top: 2px; color: var(--gold); font-size: 9px; overflow-wrap: anywhere; }
.meal-choice-text small { margin-top: 4px; color: var(--muted); font-size: 10px; line-height: 1.4; }
.meal-catalog-details { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin-top: 7px; padding-top: 7px; border-top: 1px dashed var(--line); color: var(--muted); font-size: 9px; line-height: 1.4; }
.meal-catalog-details > span { display: inline; }
.meal-catalog-details a { color: var(--brand); font-weight: 800; text-decoration: underline; text-underline-offset: 2px; }
.meal-catalog-details a:hover { color: var(--gold); }
.meal-original-source-attribution { display: block; margin-top: 6px; }
.meal-original-source-attribution a { color: var(--brand); font-weight: 800; text-decoration: underline; text-underline-offset: 2px; }
.meal-original-source-attribution a:hover { color: var(--gold); }
.meal-settings-status { min-height: 15px; }
.meal-unavailable-dialog { width: min(92vw, 620px); }
.meal-unavailable-dialog form { display: grid; gap: 16px; padding: 22px; }
.meal-unavailable-notice { display: grid; gap: 10px; padding: 16px; border: 1px solid color-mix(in srgb, #b5544f 45%, var(--line)); border-radius: 14px; background: color-mix(in srgb, var(--surface-2) 91%, #b5544f 9%); }
.meal-unavailable-notice > strong { color: var(--ink); font-size: 16px; }
.meal-unavailable-notice p { margin: 0; color: var(--ink); font-size: 12px; line-height: 1.65; }
.meal-unavailable-notice small { color: var(--muted); font-size: 10px; line-height: 1.55; }
.meal-settings-empty { margin: 8px 0; padding: 22px; border: 1px dashed var(--line); border-radius: 10px; color: var(--muted); text-align: center; font-size: 11px; }
.setting-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.setting-row strong, .setting-row small { display: block; }
.setting-row small { margin-top: 4px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.setting-row input { width: 42px; height: 22px; accent-color: var(--brand); }
.setting-range { display: block; padding: 18px 0; }
.setting-range span { display: flex; justify-content: space-between; }
.setting-range output { color: var(--gold); }
.setting-range input { width: 100%; margin-top: 18px; accent-color: var(--brand); }
.dialog-done { width: 100%; padding: 12px; border: 0; border-radius: 10px; color: var(--surface); background: var(--brand); font-weight: 700; }
.dialog-action-row { display: grid; grid-template-columns: minmax(0, .72fr) minmax(0, 1.28fr); gap: 10px; width: 100%; }
.dialog-action-row .dialog-done { width: 100%; }
.dialog-back { min-height: 42px; padding: 10px 14px; border: 1px solid color-mix(in srgb, var(--brand) 40%, var(--line)); border-radius: 10px; color: var(--brand); background: var(--surface); font: inherit; font-weight: 800; cursor: pointer; }
.dialog-back:hover { background: var(--brand-soft); }
.dialog-back span { margin-right: 5px; }

/* The settings home screen must always have an unmistakable close control. */
#settings-dialog .settings-dialog-close {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    border: 2px solid color-mix(in srgb, var(--gold) 62%, var(--brand));
    border-radius: 12px;
    color: var(--surface);
    background: var(--brand);
    box-shadow: 0 6px 16px color-mix(in srgb, var(--brand) 28%, transparent);
    font-size: 27px;
    font-weight: 800;
    line-height: 1;
    cursor: pointer;
}
#settings-dialog .settings-dialog-close:hover {
    border-color: var(--gold);
    background: color-mix(in srgb, var(--brand) 88%, black);
    transform: translateY(-1px);
}
#settings-dialog .settings-dialog-close:active { transform: translateY(1px) scale(.96); }
#settings-dialog .settings-dialog-close:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--gold) 72%, white);
    outline-offset: 3px;
}

#settings-dialog { box-sizing: border-box; height: min(94vh, 920px); height: min(94dvh, 920px); max-height: calc(100vh - 20px); max-height: calc(100dvh - 20px); overflow: hidden; }
#settings-dialog form { box-sizing: border-box; height: 100%; min-height: 0; display: grid; grid-template-rows: auto minmax(140px, min(31vh, 300px)) minmax(0, 1fr) auto; grid-template-rows: auto minmax(140px, min(31dvh, 300px)) minmax(0, 1fr) auto; gap: 12px; overflow: hidden; }
#settings-dialog .dialog-heading,
#settings-dialog .reading-settings,
#settings-dialog .meal-settings,
#settings-dialog .dialog-done { min-height: 0; }
.reading-settings { height: 100%; min-height: 0; max-height: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding: 10px; overflow-x: hidden; overflow-y: scroll; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; touch-action: pan-y; scrollbar-gutter: stable; scrollbar-width: auto; scrollbar-color: var(--brand) var(--surface-2); align-content: start; border: 1px solid var(--line); border-radius: 13px; background: color-mix(in srgb, var(--surface-2) 72%, transparent); }
.setting-section-title { grid-column: 1 / -1; margin: 0 2px 1px; color: var(--brand); font-size: 12px; }
.word-auto-translation-warning { grid-column: 1 / -1; margin: 2px 0; padding: 10px 12px; border: 1px solid color-mix(in srgb, var(--gold) 58%, var(--line)); border-radius: 10px; color: var(--ink); background: var(--gold-soft); font-size: 10px; line-height: 1.5; }
.word-auto-translation-warning strong { display: block; margin-bottom: 3px; font-size: 11px; }
.word-auto-translation-warning button,
.translation-feedback-link,
.guide-note.translation-warning button { padding: 0; border: 0; color: var(--brand); background: transparent; font: inherit; font-weight: 800; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.word-auto-translation-warning button:hover,
.translation-feedback-link:hover,
.guide-note.translation-warning button:hover { color: var(--gold); }
#settings-dialog .setting-row,
#settings-dialog .setting-range { min-width: 0; margin: 0; padding: 10px 11px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
#settings-dialog .setting-row { gap: 10px; }
#settings-dialog .setting-row strong,
#settings-dialog .setting-range strong { font-size: 11px; }
#settings-dialog .setting-row small { margin-top: 3px; font-size: 9px; line-height: 1.35; }
#settings-dialog .setting-row input { flex: 0 0 auto; }
#settings-dialog .setting-range output { font-size: 10px; white-space: nowrap; }
#settings-dialog .setting-range input { margin-top: 10px; }
#settings-dialog .meal-settings { min-height: 0; margin: 0; display: flex; flex-direction: column; overflow: hidden; }
#settings-dialog .meal-settings legend { flex: 0 0 auto; }
#settings-dialog .meal-catalog-summary { flex: 0 0 auto; margin: 7px 0 5px; }
#settings-dialog .meal-catalog-summary > span { padding: 7px 10px; }
#settings-dialog .meal-settings-intro { flex: 0 0 auto; margin: 2px 0 5px; }
.meal-source-details { flex: 0 0 auto; margin: 0 0 5px; color: var(--muted); font-size: 10px; }
.meal-source-details summary { width: fit-content; color: var(--brand); cursor: pointer; font-weight: 700; }
.meal-source-details > p { max-height: 110px; margin: 7px 0; padding: 9px 10px; overflow-y: auto; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-2); line-height: 1.5; }
#settings-dialog .meal-filter-control { flex: 0 0 auto; height: 40px; margin: 5px 0 8px; }
#settings-dialog .meal-settings-list { min-height: 0; max-height: none; flex: 1 1 0; overflow-x: hidden; overflow-y: scroll; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; touch-action: pan-y; scrollbar-gutter: stable; scrollbar-width: auto; scrollbar-color: var(--brand) var(--surface-2); }
#settings-dialog .meal-language-items { gap: 6px; }
#settings-dialog .meal-choice { gap: 8px; padding: 8px; }
#settings-dialog .meal-choice-text small { margin-top: 3px; font-size: 9px; line-height: 1.3; }
#settings-dialog .meal-catalog-details { gap: 3px 8px; margin-top: 5px; padding-top: 5px; font-size: 8px; line-height: 1.3; }
#settings-dialog .meal-settings-status { flex: 0 0 auto; margin: 4px 0 0; }
#settings-dialog .dialog-done { position: relative; z-index: 8; min-height: 42px; margin: 0; padding: 10px; box-shadow: 0 -8px 18px color-mix(in srgb, var(--surface) 92%, transparent); }
#settings-dialog .reading-settings::-webkit-scrollbar,
#settings-dialog .meal-settings-list::-webkit-scrollbar,
#settings-dialog .meal-source-details > p::-webkit-scrollbar { width: 12px; height: 12px; }
#settings-dialog .reading-settings::-webkit-scrollbar-track,
#settings-dialog .meal-settings-list::-webkit-scrollbar-track,
#settings-dialog .meal-source-details > p::-webkit-scrollbar-track { border-radius: 999px; background: var(--surface-2); }
#settings-dialog .reading-settings::-webkit-scrollbar-thumb,
#settings-dialog .meal-settings-list::-webkit-scrollbar-thumb,
#settings-dialog .meal-source-details > p::-webkit-scrollbar-thumb { min-height: 34px; border: 3px solid var(--surface-2); border-radius: 999px; background: var(--brand); }
#settings-dialog .reading-settings::-webkit-scrollbar-thumb:hover,
#settings-dialog .meal-settings-list::-webkit-scrollbar-thumb:hover,
#settings-dialog .meal-source-details > p::-webkit-scrollbar-thumb:hover { background: var(--gold); }

/* Four-part settings center: appearance, word meanings, meals and reciter selection. */
#settings-dialog form { grid-template-rows: auto auto minmax(0, 1fr); }
#settings-dialog .settings-menu { min-height: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; }
#settings-dialog .settings-menu button { min-width: 0; display: flex; align-items: center; gap: 10px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 11px; color: var(--ink); background: var(--surface-2); text-align: left; cursor: pointer; }
#settings-dialog .settings-menu button > span:first-child { flex: 0 0 auto; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 9px; color: var(--brand); background: var(--surface); font-size: 15px; font-weight: 800; }
#settings-dialog .settings-menu button > span:last-child { min-width: 0; display: grid; gap: 2px; }
#settings-dialog .settings-menu strong { overflow: hidden; font-size: 11px; line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }
#settings-dialog .settings-menu small { overflow: hidden; color: var(--muted); font-size: 8px; line-height: 1.3; text-overflow: ellipsis; white-space: nowrap; }
#settings-dialog .settings-menu button:hover { border-color: var(--gold); }
#settings-dialog .settings-menu button.active { border-color: var(--brand); color: var(--surface); background: var(--brand); box-shadow: 0 8px 18px color-mix(in srgb, var(--brand) 18%, transparent); }
#settings-dialog .settings-menu button.active > span:first-child { color: var(--surface); background: color-mix(in srgb, var(--surface) 16%, transparent); }
#settings-dialog .settings-menu button.active small { color: color-mix(in srgb, var(--surface) 76%, transparent); }
#settings-dialog .settings-panel[hidden] { display: none !important; }
#settings-dialog .settings-panel:not([hidden]) { min-height: 0; display: grid; grid-template-rows: minmax(0, 1fr) auto; gap: 10px; overflow: hidden; }
#settings-dialog .appearance-settings { min-height: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; padding: 10px; overflow-x: hidden; overflow-y: auto; align-content: start; border: 1px solid var(--line); border-radius: 13px; background: color-mix(in srgb, var(--surface-2) 72%, transparent); scrollbar-gutter: stable; }
#settings-dialog .appearance-settings .setting-section-title { grid-column: 1 / -1; }
#settings-dialog .settings-panel > .reading-settings { height: auto; }
#settings-dialog .settings-panel > .meal-settings { height: 100%; }
#settings-dialog .settings-panel > .dialog-done { min-height: 42px; margin: 0; padding: 10px; box-shadow: 0 -8px 18px color-mix(in srgb, var(--surface) 92%, transparent); }
#settings-dialog .settings-panel-actions { position: relative; z-index: 8; min-height: 42px; margin: 0; box-shadow: 0 -8px 18px color-mix(in srgb, var(--surface) 92%, transparent); }
#settings-dialog .settings-panel-actions .dialog-done,
#settings-dialog .settings-panel-actions .dialog-back { min-height: 42px; margin: 0; padding: 10px; }
#settings-dialog .appearance-settings::-webkit-scrollbar { width: 12px; height: 12px; }
#settings-dialog .appearance-settings::-webkit-scrollbar-track { border-radius: 999px; background: var(--surface-2); }
#settings-dialog .appearance-settings::-webkit-scrollbar-thumb { min-height: 34px; border: 3px solid var(--surface-2); border-radius: 999px; background: var(--brand); }
#settings-dialog .reciter-settings { min-height: 0; margin: 0; display: grid; align-content: start; gap: 12px; padding: 14px; overflow-y: auto; border: 1px solid var(--line); border-radius: 13px; background: color-mix(in srgb, var(--surface-2) 72%, transparent); scrollbar-gutter: stable; }
#settings-dialog .reciter-settings legend { padding: 0 5px; color: var(--brand); font-size: 12px; font-weight: 800; }
.reciter-settings-intro { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.55; }
.settings-reciter-select-control { display: grid; gap: 10px; padding: 14px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); }
.settings-reciter-select-control > span strong,
.settings-reciter-select-control > span small { display: block; }
.settings-reciter-select-control > span strong { font-size: 12px; }
.settings-reciter-select-control > span small { margin-top: 4px; color: var(--muted); font-size: 9px; line-height: 1.4; }
.settings-reciter-select-control select { width: 100%; min-height: clamp(46px, calc(var(--reciter-select-size) + 30px), 58px); padding: 0 38px 0 12px; border: 1px solid var(--line); border-radius: 11px; color: var(--ink); background: var(--surface); font-size: var(--reciter-select-size); line-height: 1.3; }
.settings-reciter-select-control select option { font-size: var(--reciter-select-size); }
.settings-reciter-summary { margin: 0; padding: 10px 12px; border-radius: 10px; color: var(--brand); background: var(--brand-soft); font-size: 10px; font-weight: 750; line-height: 1.45; }
.settings-recitation-block { display: grid; grid-template-columns: minmax(150px, .38fr) minmax(0, 1fr); gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); }
.settings-recitation-heading { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-bottom: 9px; border-bottom: 1px solid var(--line); }
.settings-recitation-heading > span:first-child { min-width: 0; display: grid; gap: 3px; }
.settings-recitation-heading strong,
.settings-recitation-progress > span strong,
.settings-recitation-progress > span small,
.settings-recitation-block .recitation-speed-control > span strong,
.settings-recitation-block .recitation-speed-control > span small { display: block; }
.settings-recitation-heading > span:first-child > strong { font-size: 12px; }
.settings-recitation-heading > span:first-child > small,
.settings-recitation-progress > span small,
.settings-recitation-block .recitation-speed-control > span small { color: var(--muted); font-size: 9px; line-height: 1.4; }
.settings-recitation-block .recitation-speed-control { align-content: start; }
.settings-recitation-block .recitation-speed-control select { width: 100%; margin-top: auto; }
.settings-recitation-progress { min-width: 0; display: grid; gap: 8px; }
.settings-recitation-progress > span strong { font-size: 10px; }
.settings-recitation-block .recitation-progress-row { margin-top: auto; }
.settings-recitation-block .recitation-attribution { grid-column: 1 / -1; padding-top: 9px; border-top: 1px solid var(--line); }
#settings-dialog .reciter-settings .setting-range { background: var(--surface); }
#settings-dialog .reciter-settings::-webkit-scrollbar { width: 12px; height: 12px; }
#settings-dialog .reciter-settings::-webkit-scrollbar-track { border-radius: 999px; background: var(--surface-2); }
#settings-dialog .reciter-settings::-webkit-scrollbar-thumb { min-height: 34px; border: 3px solid var(--surface-2); border-radius: 999px; background: var(--brand); }

.releases-dialog { width: min(94vw, 820px); }
.releases-dialog form { padding: 0; }
.releases-heading { position: sticky; z-index: 4; top: 0; padding: 22px 24px 16px; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: blur(12px); }
.release-current { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 20px 24px 6px; padding: 16px 18px; border: 1px solid var(--gold); border-radius: 14px; background: linear-gradient(145deg, var(--gold-soft), var(--surface)); }
.release-current div { display: grid; gap: 2px; }
.release-current span { color: var(--muted); font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.release-current strong { font-size: 20px; }
.release-current time { color: var(--gold); font-size: 11px; font-weight: 800; }
.release-featured { position: relative; overflow: hidden; margin: 14px 24px 4px; padding: 20px; border: 1px solid color-mix(in srgb, var(--brand) 38%, var(--line)); border-radius: 16px; background: linear-gradient(135deg, color-mix(in srgb, var(--brand-soft) 82%, var(--surface)), var(--surface) 60%, var(--gold-soft)); box-shadow: 0 14px 34px rgba(18, 60, 52, .09); }
.release-featured::after { content: "▷"; position: absolute; top: -24px; right: 12px; color: color-mix(in srgb, var(--brand) 8%, transparent); font-size: 112px; line-height: 1; pointer-events: none; }
.release-featured-heading { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.release-featured-heading time { color: var(--muted); font-size: 10px; font-weight: 800; }
.release-featured-badge { display: inline-flex; align-items: center; padding: 5px 9px; border-radius: 999px; color: var(--surface); background: var(--brand); font-size: 9px; font-weight: 900; letter-spacing: .04em; text-transform: uppercase; }
.release-featured h3 { position: relative; z-index: 1; margin: 13px 0 7px; font-size: 19px; }
.release-featured > p { position: relative; z-index: 1; margin: 0; color: var(--muted); font-size: 11px; line-height: 1.6; }
.release-featured-modes { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 15px 0 12px; }
.release-featured:not(.meal-speech-featured) .release-featured-modes { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.release-featured-modes > div { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 2px 9px; padding: 12px; border: 1px solid color-mix(in srgb, var(--brand) 22%, var(--line)); border-radius: 12px; background: color-mix(in srgb, var(--surface) 91%, transparent); }
.release-featured-modes span { grid-row: 1 / 3; display: grid; width: 34px; height: 34px; place-items: center; border-radius: 50%; color: var(--surface); background: var(--brand); font-size: 14px; }
.release-featured-modes strong { font-size: 13px; }
.release-featured-modes small { color: var(--muted); font-size: 9px; line-height: 1.4; }
.release-featured .release-featured-note { padding-top: 11px; border-top: 1px dashed color-mix(in srgb, var(--brand) 28%, var(--line)); font-size: 10px; }
.meal-speech-featured { border-width: 2px; border-color: color-mix(in srgb, var(--gold) 72%, var(--brand)); background: linear-gradient(135deg, var(--gold-soft), var(--surface) 54%, var(--brand-soft)); }
.meal-speech-featured::after { content: ""; }
.meal-speech-featured-hero { position: relative; z-index: 1; display: grid; grid-template-columns: 64px 1fr; align-items: center; gap: 14px; margin: 14px 0; }
.meal-speech-featured-hero h3 { margin: 0 0 5px; color: var(--brand); font-size: 22px; }
.meal-speech-featured-hero p { margin: 0; color: var(--ink); font-size: 11px; line-height: 1.55; }
.release-preacher-icon { width: 62px; height: 62px; padding: 10px; border-radius: 18px; color: white; background: var(--brand); fill: currentColor; box-shadow: 0 10px 26px color-mix(in srgb, var(--brand) 28%, transparent); }
.release-preacher-voice { fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; }
.meal-speech-feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.meal-speech-feature-grid > div { border-color: color-mix(in srgb, var(--gold) 45%, var(--line)); }
.release-timeline { position: relative; display: grid; gap: 14px; padding: 18px 24px 24px 44px; }
.release-timeline::before { content: ""; position: absolute; top: 26px; bottom: 32px; left: 29px; width: 2px; background: linear-gradient(var(--gold), var(--line)); }
.release-entry { position: relative; padding: 17px 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-2); }
.release-entry::before { content: ""; position: absolute; top: 22px; left: -22px; width: 10px; height: 10px; border: 3px solid var(--surface); border-radius: 50%; background: var(--muted); box-shadow: 0 0 0 1px var(--line); }
.release-entry.latest { border-color: color-mix(in srgb, var(--gold) 58%, var(--line)); background: var(--surface); box-shadow: 0 10px 28px rgba(42, 54, 48, .06); }
.release-entry.latest::before { background: var(--gold); box-shadow: 0 0 0 1px var(--gold); }
.release-entry header { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 9px; }
.release-entry header time { color: var(--gold); font-weight: 800; }
.release-build { padding: 3px 7px; border-radius: 999px; background: var(--surface); }
.release-entry h3 { margin: 8px 0 10px; font-size: 16px; }
.release-interaction-summary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; margin: 0 0 12px; padding: 9px; border: 1px solid color-mix(in srgb, var(--gold) 48%, var(--line)); border-radius: 10px; background: linear-gradient(135deg, var(--gold-soft), var(--brand-soft)); }
.release-interaction-summary span { display: grid; gap: 2px; padding: 7px 9px; border-radius: 8px; color: var(--muted); background: color-mix(in srgb, var(--surface) 88%, transparent); font-size: 9px; }
.release-interaction-summary b { color: var(--brand); font-size: 10px; }
.release-entry ul { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.release-entry li { color: var(--muted); font-size: 11px; line-height: 1.55; }
.release-tag { display: inline-block; min-width: 64px; margin-right: 5px; padding: 2px 6px; border-radius: 999px; text-align: center; font-size: 8px; font-weight: 800; }
.release-tag.new { color: var(--brand); background: var(--brand-soft); }
.release-tag.improve { color: #775310; background: var(--gold-soft); }
.release-tag.privacy { color: #315e79; background: #e4f0f7; }
.releases-dialog .dialog-done { width: calc(100% - 48px); margin: 0 24px 24px; }

@media (max-width: 620px) {
    .releases-heading { padding: 17px 16px 13px; }
    .release-current { align-items: flex-start; flex-direction: column; margin: 14px 16px 4px; }
    .release-featured { margin: 12px 16px 4px; padding: 16px; }
    .release-featured h3 { font-size: 17px; }
    .release-featured-modes,
    .release-featured:not(.meal-speech-featured) .release-featured-modes { grid-template-columns: 1fr; }
    .release-timeline { padding: 14px 16px 18px 34px; }
    .release-timeline::before { left: 22px; }
    .release-entry::before { left: -18px; }
    .release-entry { padding: 14px; }
    .release-entry header { align-items: flex-start; flex-direction: column; gap: 4px; }
    .release-interaction-summary { grid-template-columns: 1fr; }
    .releases-dialog .dialog-done { width: calc(100% - 32px); margin: 0 16px 16px; }
}
.help-top-button { font-weight: 800; font-family: Georgia, serif; }
.help-dialog { width: min(94vw, 900px); max-height: min(92vh, 900px); }
.help-dialog form { scrollbar-width: thin; }
.help-heading {
    position: sticky;
    z-index: 5;
    top: -24px;
    margin: -24px -24px 18px;
    padding: 18px 24px;
    border-bottom: 1px solid var(--line);
    background: color-mix(in srgb, var(--surface) 94%, transparent);
    backdrop-filter: blur(16px);
}
.help-intro {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(210px, .6fr);
    align-items: center;
    gap: 24px;
    margin-bottom: 18px;
    padding: 24px;
    border: 1px solid color-mix(in srgb, var(--brand) 25%, var(--line));
    border-radius: 16px;
    background: linear-gradient(135deg, var(--brand-soft), var(--surface));
}
.help-time { display: inline-block; padding: 5px 9px; border-radius: 999px; color: var(--brand); background: var(--surface); font-size: 10px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.help-intro h3 { max-width: 530px; margin: 12px 0 8px; font-size: clamp(22px, 3vw, 34px); line-height: 1.08; letter-spacing: -.045em; }
.help-intro p { max-width: 580px; margin: 0; color: var(--muted); font-size: 13px; line-height: 1.65; }
.guide-quick-path { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 16px; }
.guide-quick-path span { display: inline-flex; align-items: center; gap: 6px; padding: 6px 9px; border: 1px solid var(--line); border-radius: 999px; color: var(--brand); background: var(--surface); font-size: 9px; font-weight: 800; }
.guide-quick-path b { width: 17px; height: 17px; display: grid; place-items: center; border-radius: 50%; color: white; background: var(--gold); font-size: 8px; }
.help-intro-mark { min-height: 150px; display: grid; place-items: center; align-content: center; border-radius: 14px; color: var(--surface); background: var(--brand); box-shadow: inset 0 0 0 1px rgba(255,255,255,.12); }
.help-intro-mark span { font: 64px/1 "Amiri Quran", "Traditional Arabic", serif; }
.help-intro-mark small { margin-top: 8px; opacity: .72; font-size: 9px; letter-spacing: .12em; text-transform: uppercase; }
.guide-list { display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; counter-reset: guide; }
.guide-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, .95fr);
    align-items: stretch;
    gap: 22px;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--surface);
}
.guide-copy { position: relative; padding-left: 42px; }
.guide-number { position: absolute; left: 0; top: 0; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 9px; color: var(--surface); background: var(--brand); font-size: 12px; font-weight: 800; }
.guide-copy h3 { margin: 2px 0 8px; font-size: 18px; letter-spacing: -.025em; }
.guide-copy p { margin: 0 0 10px; color: var(--muted); font-size: 12px; line-height: 1.65; }
.guide-copy .guide-lead { margin-bottom: 13px; color: var(--ink); font-size: 12px; font-weight: 600; }
.guide-interaction-callout { display: grid; grid-template-columns: auto repeat(2, minmax(0, 1fr)); align-items: stretch; gap: 7px; margin: 0 0 13px; padding: 8px; border: 2px solid color-mix(in srgb, var(--gold) 62%, var(--line)); border-radius: 11px; background: linear-gradient(135deg, var(--gold-soft), var(--brand-soft)); box-shadow: 0 8px 20px rgba(42, 54, 48, .07); }
.guide-interaction-callout > strong { display: grid; place-items: center; padding: 7px 9px; border-radius: 8px; color: white; background: var(--brand); font-size: 9px; text-align: center; }
.guide-interaction-callout span { display: grid; align-content: center; gap: 2px; padding: 7px 9px; border-radius: 8px; background: color-mix(in srgb, var(--surface) 91%, transparent); }
.guide-interaction-callout b { color: var(--brand); font-size: 10px; }
.guide-interaction-callout small { color: var(--muted); font-size: 8px; }
.guide-copy ul { margin: 8px 0 0; padding-left: 17px; color: var(--ink); font-size: 11px; line-height: 1.7; }
.guide-steps { display: grid; gap: 7px; margin: 0 0 13px; padding: 0; list-style: none; counter-reset: help-step; }
.guide-steps li { position: relative; min-height: 27px; padding: 5px 7px 5px 35px; border-radius: 8px; color: var(--ink); background: var(--surface-2); font-size: 10px; line-height: 1.55; counter-increment: help-step; }
.guide-steps li::before { content: counter(help-step); position: absolute; left: 7px; top: 6px; width: 19px; height: 19px; display: grid; place-items: center; border-radius: 6px; color: white; background: var(--brand); font-size: 8px; font-weight: 800; }
.guide-copy code { padding: 2px 5px; border-radius: 5px; color: var(--brand); background: var(--brand-soft); font: 700 10px/1.3 ui-monospace, monospace; }
.guide-copy .guide-note { margin-top: 11px; padding: 8px 10px; border-left: 3px solid var(--gold); border-radius: 0 7px 7px 0; color: var(--ink); background: var(--gold-soft); font-size: 10px; }
.guide-copy .guide-note.translation-warning { border: 1px solid color-mix(in srgb, var(--gold) 62%, var(--line)); border-left-width: 4px; border-radius: 7px; }
.guide-meal-speech-callout { margin: 14px 0 11px; padding: 13px; border: 2px solid color-mix(in srgb, var(--gold) 68%, var(--brand)); border-radius: 13px; background: linear-gradient(145deg, var(--gold-soft), var(--surface) 58%, var(--brand-soft)); box-shadow: 0 10px 24px rgba(42, 54, 48, .08); }
.guide-meal-speech-title { display: flex; align-items: center; gap: 11px; margin-bottom: 10px; }
.guide-meal-speech-title b { display: block; margin-bottom: 2px; color: var(--gold); font-size: 8px; letter-spacing: .1em; }
.guide-meal-speech-title h4 { margin: 0; color: var(--brand); font-size: 16px; }
.guide-preacher-icon { width: 45px; height: 45px; flex: 0 0 45px; padding: 7px; border-radius: 13px; color: white; background: var(--brand); fill: currentColor; }
.guide-preacher-voice { fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; }
.guide-meal-speech-callout ol { display: grid; gap: 5px; margin: 0; padding-left: 20px; color: var(--ink); font-size: 9px; line-height: 1.5; }
.guide-glossary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; margin-top: 11px; }
.guide-glossary span { padding: 7px 8px; border: 1px solid var(--line); border-radius: 7px; color: var(--muted); background: var(--surface-2); font-size: 8px; }
.guide-glossary b { display: block; margin-bottom: 2px; color: var(--brand); font-size: 9px; }
.guide-meal-stats { margin: 14px 0 10px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.guide-meal-stats > span { min-height: 86px; display: grid; place-items: center; align-content: center; padding: 10px; border: 1px solid var(--gold); border-radius: 12px; text-align: center; background: linear-gradient(145deg, var(--gold-soft), var(--surface)); }
.guide-meal-stats strong { color: var(--brand); font-size: clamp(34px, 4vw, 46px); line-height: .95; letter-spacing: -.05em; }
.guide-meal-stats small { margin-top: 8px; color: var(--gold); font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .12em; }
.guide-visual { min-height: 230px; overflow: hidden; padding: 18px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface-2); }
.mock-window-bar { display: flex; align-items: center; gap: 5px; color: var(--muted); font-size: 9px; }
.mock-window-bar i { width: 6px; height: 6px; border-radius: 50%; background: var(--line); }
.mock-window-bar span { margin-left: 5px; color: var(--ink); font-weight: 700; }
.mock-flow, .mock-memorize-flow { display: flex; align-items: center; justify-content: center; gap: 5px; margin: 13px 0 3px; }
.mock-flow span, .mock-memorize-flow span { display: inline-flex; align-items: center; gap: 4px; padding: 5px 7px; border-radius: 999px; color: var(--brand); background: var(--brand-soft); font-size: 7px; font-weight: 800; }
.mock-flow b, .mock-memorize-flow b { width: 14px; height: 14px; display: grid; place-items: center; border-radius: 50%; color: white; background: var(--brand); font-size: 6px; }
.mock-flow i, .mock-memorize-flow i { color: var(--gold); font-size: 9px; font-style: normal; }
.mock-search-line { display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 8px; margin: 15px 0 8px; padding: 10px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); font-size: 11px; }
.mock-search-line > span { color: var(--muted); }
.mock-search-line b { display: grid; place-items: center; width: 25px; height: 25px; border-radius: 50%; background: var(--gold-soft); font-size: 11px; }
.mock-search-line em { color: var(--brand); font-style: normal; font-weight: 800; }
.mock-search-examples { display: flex; gap: 6px; margin-bottom: 14px; }
.mock-search-examples span { padding: 5px 7px; border-radius: 7px; color: var(--muted); background: var(--surface-3); font-size: 8px; }
.mock-result { display: grid; grid-template-columns: 28px 1fr auto; align-items: center; gap: 9px; padding: 10px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); }
.mock-result > b { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 8px; color: var(--surface); background: var(--brand); font-size: 10px; }
.mock-result span, .mock-result small { display: block; }
.mock-result span { font-size: 10px; font-weight: 800; }
.mock-result small { margin-top: 2px; color: var(--muted); font-size: 8px; font-weight: 500; }
.mock-result > strong { color: var(--gold); font-size: 8px; }
.mock-result.active { border-color: var(--gold); box-shadow: 0 0 0 2px color-mix(in srgb, var(--gold) 12%, transparent); }
.mock-result.compact { margin-top: 6px; padding: 7px 10px; opacity: .78; }
.global-visual { background: linear-gradient(180deg, var(--surface), var(--surface-2)); }
.mock-brand { display: flex; align-items: center; gap: 7px; font-size: 10px; }
.mock-brand span { width: 27px; height: 27px; display: grid; place-items: center; border-radius: 50%; color: white; background: var(--brand); font: 18px/1 "Amiri Quran", serif; }
.mock-global-search { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 8px; margin: 15px 0 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); }
.mock-global-search b { overflow: hidden; text-align: right; white-space: nowrap; text-overflow: ellipsis; font: 17px/1.5 "Amiri Quran", "Traditional Arabic", serif; }
.mock-global-search em { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: var(--danger); font-style: normal; animation: help-mic-pulse 1.5s infinite; }
.mock-listening { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 9px; }
.mock-listening i { width: 7px; height: 7px; border-radius: 50%; background: var(--danger); }
.mock-candidate-flow { display: flex; align-items: center; justify-content: center; gap: 5px; margin: 11px 0 0; }
.mock-candidate-flow span, .mock-candidate-flow strong { padding: 5px 7px; border-radius: 7px; color: var(--muted); background: var(--surface-3); font-size: 7px; }
.mock-candidate-flow strong { color: var(--success); background: color-mix(in srgb, var(--success) 11%, var(--surface)); }
.mock-candidate-flow i { color: var(--gold); font-size: 8px; font-style: normal; }
.mock-found { margin-top: 14px; padding: 12px; border: 1px solid var(--success); border-radius: 9px; background: color-mix(in srgb, var(--success) 10%, var(--surface)); }
.mock-found strong, .mock-found small { display: block; }
.mock-found strong { color: var(--success); font-size: 11px; }
.mock-found small { margin-top: 4px; color: var(--muted); font-size: 8px; }
.guide-legend { display: flex; flex-wrap: wrap; gap: 7px; margin: 12px 0; }
.guide-legend span { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); font-size: 9px; }
.guide-legend i { width: 10px; height: 10px; border: 1px solid; border-radius: 3px; }
.legend-correct { border-color: var(--success) !important; background: color-mix(in srgb, var(--success) 16%, transparent); }
.legend-current { border-color: var(--gold) !important; background: var(--gold-soft); }
.legend-wrong { border-color: var(--danger) !important; background: color-mix(in srgb, var(--danger) 14%, transparent); }
.tracking-visual { background: var(--surface); }
.mock-ayah-head { display: flex; align-items: center; gap: 7px; color: var(--brand); font-size: 8px; }
.mock-ayah-head span { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 7px; background: var(--brand-soft); font-weight: 800; }
.mock-ayah-head i { margin-left: auto; color: var(--muted); font-style: normal; }
.mock-arabic-words { display: flex; flex-wrap: wrap; justify-content: center; gap: 5px; margin: 20px 0; }
.mock-arabic-words > span { min-width: 61px; padding: 7px 6px; border: 1px solid transparent; border-radius: 8px; text-align: center; font: 19px/1.35 "Amiri Quran", "Traditional Arabic", serif; }
.mock-arabic-words small { display: block; direction: ltr; color: var(--muted); font: 7px/1.2 "DM Sans", sans-serif; }
.mock-arabic-words .is-correct { border-color: var(--success); background: color-mix(in srgb, var(--success) 12%, transparent); }
.mock-arabic-words .is-current { border-color: var(--gold); background: var(--gold-soft); }
.mock-arabic-words .is-wrong { border-color: var(--danger); background: color-mix(in srgb, var(--danger) 11%, transparent); }
.mock-progress { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 8px; margin: 0 0 10px; }
.mock-progress > span { height: 5px; overflow: hidden; border-radius: 999px; background: var(--line); }
.mock-progress i { display: block; width: 50%; height: 100%; border-radius: inherit; background: var(--success); }
.mock-progress small { color: var(--muted); font-size: 7px; }
.mock-track-action { display: flex; align-items: center; gap: 9px; padding: 9px 11px; border-radius: 9px; color: white; background: var(--brand); }
.mock-track-action i { width: 22px; height: 22px; border-radius: 50%; background: rgba(255,255,255,.18); }
.mock-track-action strong, .mock-track-action small { display: block; }
.mock-track-action strong { font-size: 9px; }
.mock-track-action small { margin-top: 2px; opacity: .7; font-size: 7px; }
.word-info-visual { display: grid; place-items: center; padding: 16px; background: linear-gradient(145deg, var(--surface-3), var(--surface-2)); }
.mock-word-panel { width: min(100%, 330px); overflow: hidden; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); box-shadow: 0 14px 32px rgba(20, 48, 41, .1); }
.mock-word-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.mock-word-head span { font-size: 11px; font-weight: 800; }
.mock-word-head b { width: 21px; height: 21px; display: grid; place-items: center; border-radius: 50%; color: var(--muted); background: var(--surface-2); font-size: 12px; }
.mock-interaction-hints { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.mock-tap-hint { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 6px; color: var(--gold); background: var(--gold-soft); font-size: 7px; font-weight: 800; }
.mock-tap-hint b { width: 16px; height: 16px; display: grid; place-items: center; border-radius: 50%; color: white; background: var(--gold); font-size: 7px; }
.mock-tap-hint i { font-size: 11px; font-style: normal; }
.mock-tap-hint.sound { color: var(--brand); background: var(--brand-soft); }
.mock-tap-hint.sound b { background: var(--brand); }
.mock-word-hero { display: grid; place-items: center; padding: 11px; background: var(--brand-soft); }
.mock-word-hero strong { color: var(--brand); font: 26px/1.35 "Amiri Quran", "Traditional Arabic", serif; }
.mock-word-hero small { margin-top: 2px; color: var(--muted); font-size: 7px; }
.mock-word-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; padding: 9px; }
.mock-word-grid > span { min-width: 0; padding: 7px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface-2); }
.mock-word-grid small, .mock-word-grid strong { display: block; }
.mock-word-grid small { color: var(--muted); font-size: 6px; text-transform: uppercase; letter-spacing: .06em; }
.mock-word-grid strong { margin-top: 3px; color: var(--ink); font-size: 9px; }
.mock-word-grid strong[lang="ar"] { color: var(--brand); font: 15px/1.2 "Amiri Quran", "Traditional Arabic", serif; }
.mock-word-segment { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2px 8px; margin: 0 9px 8px; padding: 8px; border: 1px solid var(--gold); border-radius: 7px; background: var(--gold-soft); }
.mock-word-segment small { color: var(--gold); font-size: 6px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.mock-word-segment strong { grid-row: 1 / span 2; grid-column: 2; color: var(--brand); font: 18px/1.2 "Amiri Quran", "Traditional Arabic", serif; }
.mock-word-segment span { color: var(--muted); font-size: 7px; }
.mock-root-examples { display: flex; align-items: center; gap: 5px; padding: 0 9px 10px; }
.mock-root-examples small { margin-right: auto; color: var(--muted); font-size: 7px; }
.mock-root-examples span { padding: 4px 6px; border-radius: 6px; color: var(--brand); background: var(--brand-soft); font-size: 7px; font-weight: 800; }
.settings-visual { display: grid; place-items: center; padding: 17px; background: linear-gradient(145deg, var(--surface-3), var(--surface-2)); }
.mock-settings-panel { width: min(100%, 305px); overflow: hidden; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); box-shadow: 0 14px 32px rgba(20, 48, 41, .1); }
.mock-settings-head { display: flex; align-items: center; justify-content: space-between; padding: 11px 13px; border-bottom: 1px solid var(--line); }
.mock-settings-head span { font-size: 12px; font-weight: 800; }
.mock-settings-head b { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; color: var(--muted); background: var(--surface-2); font-size: 13px; }
.mock-meal-search { display: flex; align-items: center; gap: 7px; margin: 9px 11px 0; padding: 7px 9px; border: 1px solid var(--line); border-radius: 7px; color: var(--muted); background: var(--surface-2); font-size: 7px; }
.mock-meal-search b { overflow: hidden; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.mock-meal-stats { margin: 11px 11px 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 7px; }
.mock-meal-stats span { min-height: 58px; display: grid; place-items: center; align-content: center; border: 1px solid var(--gold); border-radius: 9px; background: var(--gold-soft); }
.mock-meal-stats strong { color: var(--brand); font-size: 24px; line-height: 1; }
.mock-meal-stats small { margin-top: 5px; color: var(--muted); font-size: 7px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.guide-catalog-card { break-inside: avoid; page-break-inside: avoid; }
.guide-language-catalog { grid-column: 1 / -1; padding: 16px 18px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface-2); }
.guide-language-catalog-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.guide-language-catalog-heading strong { color: var(--brand); font-size: 14px; }
.guide-language-catalog-heading small { color: var(--gold); font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.guide-language-list { margin: 0; padding-left: 24px; columns: 5 130px; column-gap: 28px; color: var(--ink); font-size: 10px; line-height: 1.45; }
.guide-language-list li { break-inside: avoid; margin: 0 0 6px; padding-left: 2px; }
.guide-language-list li::marker { color: var(--gold); font-weight: 800; }
.guide-language-list span { font-weight: 700; }
.guide-language-list small { display: block; color: var(--muted); font-size: 8px; }
.mock-active-meal { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 11px; padding: 10px; border: 1px solid var(--gold); border-radius: 9px; background: var(--gold-soft); }
.mock-active-meal span { min-width: 0; }
.mock-active-meal small, .mock-active-meal strong { display: block; }
.mock-active-meal small { color: var(--muted); font-size: 7px; }
.mock-active-meal strong { margin-top: 3px; overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.mock-active-meal code { flex: 0 0 auto; padding: 3px 5px; border-radius: 5px; color: var(--gold); background: var(--surface); font-size: 7px; }
.meal-content-search-visual, .daily-tajweed-visual { display: grid; place-items: center; background: linear-gradient(145deg, var(--surface-3), var(--surface-2)); }
.mock-meal-content-panel { width: min(100%, 340px); padding: 12px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); box-shadow: 0 14px 32px rgba(20, 48, 41, .1); }
.mock-meal-content-head { display: flex; align-items: center; justify-content: space-between; padding-bottom: 8px; border-bottom: 1px solid var(--line); color: var(--brand); font-size: 11px; font-weight: 800; }
.mock-meal-content-head b { width: 20px; height: 20px; display: grid; place-items: center; border-radius: 50%; color: var(--muted); background: var(--surface-2); }
.mock-meal-content-panel > small { display: block; margin: 8px 0; color: var(--muted); font-size: 7px; }
.mock-meal-content-input { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 7px; padding: 6px 7px 6px 9px; border: 1px solid var(--gold); border-radius: 8px; font-size: 8px; }
.mock-meal-content-input em { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; color: white; background: var(--danger); font-style: normal; }
.mock-meal-content-input b { padding: 5px 8px; border-radius: 6px; color: white; background: var(--brand); }
.mock-meal-content-count { margin: 8px 0 6px; color: var(--gold); font-size: 7px; font-weight: 800; }
.mock-meal-content-result { padding: 9px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-2); }
.mock-meal-content-result header { display: grid; gap: 2px; font-size: 7px; }
.mock-meal-content-result header strong { color: var(--brand); }
.mock-meal-content-result header em { color: var(--gold); font-size: 6px; font-style: normal; }
.mock-meal-content-result > p { margin: 8px 0 4px; text-align: right; font: 20px/1.6 "Amiri Quran", "Traditional Arabic", serif; }
.mock-meal-content-result > small { display: block; color: var(--muted); font-size: 7px; line-height: 1.45; }
.mock-meal-content-result > div { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.mock-meal-content-result > div span { padding: 4px 6px; border: 1px solid var(--brand); border-radius: 6px; color: var(--brand); background: var(--surface); font-size: 6px; font-weight: 700; }
.mock-meal-content-panel > button { width: 100%; margin-top: 8px; padding: 7px; border: 0; border-radius: 7px; color: white; background: var(--brand); font: 800 8px/1.3 inherit; }
.daily-tajweed-visual { align-content: center; gap: 10px; }
.mock-daily-toolbar { width: min(100%, 330px); display: flex; align-items: center; justify-content: center; gap: 5px; padding: 7px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.mock-daily-toolbar span, .mock-daily-toolbar strong { width: 27px; height: 27px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 7px; color: var(--brand); background: var(--surface-2); font-size: 9px; }
.mock-daily-toolbar strong { border-color: var(--gold); color: white; background: var(--gold); }
.mock-daily-card { width: min(100%, 330px); padding: 12px; border: 1px solid var(--gold); border-radius: 12px; background: var(--surface); box-shadow: 0 14px 32px rgba(20, 48, 41, .08); }
.mock-daily-card header { display: flex; align-items: center; justify-content: space-between; color: var(--gold); font-size: 7px; font-weight: 800; }
.mock-daily-card header b { padding: 4px 6px; border-radius: 6px; color: var(--brand); background: var(--brand-soft); }
.mock-daily-card > small { display: block; margin-top: 7px; color: var(--muted); font-size: 7px; }
.mock-daily-card > p { margin: 13px 0 8px; color: var(--ink); text-align: right; font: 24px/1.7 "Amiri Quran", "Traditional Arabic", serif; }
.mock-daily-card > em { display: block; padding-top: 8px; border-top: 1px solid var(--line); color: var(--muted); font-size: 7px; font-style: normal; line-height: 1.45; }
.tajweed-help-madd { color: var(--tajweed-madd-normal); }
.tajweed-help-ikhafa { color: var(--tajweed-ikhafa); }
.tajweed-help-ghunnah { color: var(--tajweed-ghunnah); }
.mock-tajweed-legend { width: min(100%, 330px); display: flex; flex-wrap: wrap; justify-content: center; gap: 7px; }
.mock-tajweed-legend span { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-size: 7px; }
.mock-tajweed-legend i { width: 8px; height: 8px; border-radius: 3px; background: var(--tajweed-madd-normal); }
.mock-tajweed-legend span:nth-child(2) i { background: var(--tajweed-ikhafa); }
.mock-tajweed-legend span:nth-child(3) i { background: var(--tajweed-ghunnah); }
.community-rights-visual, .recent-timeline-visual { display: grid; place-items: center; align-content: center; gap: 9px; background: linear-gradient(145deg, var(--surface-3), var(--surface-2)); }
.mock-community-tabs { width: min(100%, 340px); display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; padding: 5px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); }
.mock-community-tabs span, .mock-community-tabs strong { padding: 7px 5px; border-radius: 6px; color: var(--muted); text-align: center; font-size: 7px; }
.mock-community-tabs strong { color: white; background: var(--brand); }
.mock-community-comment, .mock-release-preview, .mock-beta-notice { width: min(100%, 340px); padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.mock-community-comment header { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 7px; }
.mock-community-comment header b { color: var(--brand); }
.mock-community-comment p { margin: 9px 0; color: var(--ink); font-size: 8px; line-height: 1.5; }
.mock-community-comment > div { display: flex; flex-wrap: wrap; gap: 5px; }
.mock-community-comment > div span { padding: 4px 6px; border-radius: 6px; color: var(--muted); background: var(--surface-2); font-size: 6px; font-weight: 700; }
.mock-release-preview { display: grid; gap: 3px; border-color: var(--gold); background: var(--gold-soft); }
.mock-release-preview small { color: var(--gold); font-size: 6px; font-weight: 800; letter-spacing: .08em; }
.mock-release-preview strong { color: var(--brand); font-size: 9px; line-height: 1.35; }
.mock-release-preview span { color: var(--muted); font-size: 7px; }
.mock-beta-notice { display: flex; align-items: center; gap: 9px; }
.mock-beta-notice b { padding: 5px 7px; border-radius: 6px; color: white; background: var(--gold); font-size: 7px; }
.mock-beta-notice span { color: var(--muted); font-size: 7px; }
.recent-summary-card .guide-copy { align-self: start; }
.guide-recent-list { display: grid; gap: 7px; margin: 0 !important; padding: 0 !important; list-style: none; }
.guide-recent-list li { padding: 7px 9px; border-left: 3px solid var(--gold); border-radius: 0 7px 7px 0; background: var(--surface-2); font-size: 9px !important; line-height: 1.55 !important; }
.guide-recent-list strong { color: var(--brand); }
.mock-recent-timeline { position: relative; width: min(100%, 340px); display: grid; gap: 8px; padding-left: 15px; }
.mock-recent-timeline::before { content: ""; position: absolute; top: 8px; bottom: 8px; left: 38px; width: 2px; background: linear-gradient(var(--line), var(--gold)); }
.mock-recent-timeline > div { position: relative; z-index: 1; display: grid; grid-template-columns: 46px 1fr; align-items: center; gap: 9px; }
.mock-recent-timeline time { padding: 6px 4px; border: 2px solid var(--surface-2); border-radius: 999px; color: white; background: var(--muted); text-align: center; font-size: 6px; font-weight: 800; }
.mock-recent-timeline span { padding: 8px 9px; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); background: var(--surface); font-size: 7px; line-height: 1.4; }
.mock-recent-timeline span b { display: block; margin-bottom: 2px; color: var(--brand); font-size: 8px; }
.mock-recent-timeline .latest time { background: var(--gold); }
.mock-recent-timeline .latest span { border-color: var(--gold); background: var(--gold-soft); }
.mock-setting-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 12px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.mock-setting-row strong, .mock-setting-row small { display: block; }
.mock-setting-row strong { font-size: 9px; }
.mock-setting-row small { margin-top: 2px; color: var(--muted); font-size: 7px; }
.mock-switch { position: relative; width: 31px; height: 17px; flex: 0 0 auto; border-radius: 999px; background: var(--line-strong); }
.mock-switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 13px; height: 13px; border-radius: 50%; background: white; box-shadow: 0 1px 3px rgba(0,0,0,.18); transition: left .18s ease; }
.mock-switch.on { background: var(--brand); }
.mock-switch.on::after { left: 16px; }
.mock-setting-range { padding: 10px 12px 13px; }
.mock-setting-range > span { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 9px; }
.mock-setting-range output { color: var(--gold); font-size: 8px; }
.mock-setting-range > b { position: relative; display: block; height: 4px; margin-top: 9px; border-radius: 999px; background: linear-gradient(to right, var(--brand) 0 var(--guide-font-progress, 33.33%), var(--line-strong) var(--guide-font-progress, 33.33%) 100%); }
.mock-setting-range > b i { position: absolute; top: 50%; left: 33.33%; width: 12px; height: 12px; border: 2px solid var(--surface); border-radius: 50%; background: var(--brand); box-shadow: 0 1px 4px rgba(0,0,0,.18); transform: translate(-50%, -50%); }
.memorize-visual { position: relative; display: grid; place-items: center; align-content: center; min-height: 230px; padding-top: 54px; background: var(--surface); }
.mock-memorize-flow { position: absolute; top: 15px; left: 10px; right: 10px; margin: 0; }
.mock-blurred-line { width: 88%; display: flex; gap: 8px; filter: blur(6px); }
.mock-blurred-line span { flex: 1; height: 34px; border-radius: 6px; background: var(--ink); opacity: .55; }
.memorize-visual button { position: absolute; z-index: 2; padding: 8px 20px; border: 1px solid var(--gold); border-radius: 8px; color: var(--ink); background: var(--gold-soft); font-size: 9px; cursor: default; }
.mock-blurred-meal { width: 80%; height: 10px; margin-top: 38px; border-radius: 5px; background: var(--muted); opacity: .45; filter: blur(5px); }
.mobile-visual { display: grid; place-items: center; gap: 10px; padding: 12px; background: linear-gradient(145deg, var(--surface-3), var(--surface-2)); }
.mock-phone-screen { position: relative; width: min(100%, 290px); height: 220px; overflow: hidden; border: 5px solid var(--ink); border-radius: 23px; background: var(--surface); box-shadow: 0 12px 30px rgba(0,0,0,.12); }
.mock-phone-screen::before { content: ""; position: absolute; z-index: 2; top: 5px; left: 50%; width: 50px; height: 6px; border-radius: 999px; background: var(--ink); transform: translateX(-50%); }
.mock-phone-ayah { margin: 25px 12px 0; padding: 20px 10px; border: 1px solid var(--line); border-radius: 10px; text-align: center; background: var(--surface-2); }
.mock-phone-ayah span { font: 18px/1.8 "Amiri Quran", "Traditional Arabic", serif; }
.mock-mobile-dock { position: absolute; left: 0; right: 0; bottom: 0; height: 70px; display: flex; align-items: center; justify-content: space-around; border-top: 2px solid var(--line); background: var(--surface); }
.mock-mobile-dock > span { min-width: 40px; color: color-mix(in srgb, var(--ink) 80%, var(--muted)); text-align: center; font-size: 17px; font-weight: 850; }
.mock-mobile-dock small { display: block; margin-top: 4px; font-size: 7px; font-weight: 850; }
.mock-mobile-dock .main { width: 54px; height: 54px; display: grid; place-items: center; align-content: center; margin-top: -31px; border-radius: 50%; color: white; background: var(--brand); box-shadow: 0 6px 14px color-mix(in srgb, var(--brand) 35%, transparent); }
.mock-desktop-dock { width: min(100%, 330px); display: flex; align-items: center; justify-content: center; gap: 3px; padding: 5px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); box-shadow: 0 7px 18px rgba(20, 39, 33, .1); }
.mock-desktop-dock span { min-width: 48px; padding: 7px 4px; border-radius: 7px; color: color-mix(in srgb, var(--ink) 78%, var(--muted)); text-align: center; font-size: 12px; font-weight: 800; }
.mock-desktop-dock span.active { color: white; background: var(--brand); }
.mock-desktop-dock small { display: block; margin-top: 3px; font-size: 6px; font-weight: 800; }
.mock-mobile-dock .mock-meal-speech svg, .mock-desktop-dock .mock-meal-speech svg { display: block; width: 16px; height: 16px; margin: 0 auto; fill: currentColor; }
.mock-mobile-dock .mock-meal-speech small, .mock-desktop-dock .mock-meal-speech small { line-height: 1.05; }
.share-visual { display: grid; place-items: center; background: linear-gradient(145deg, var(--surface-3), var(--surface-2)); }
.mock-share-panel { width: min(100%, 330px); padding: 12px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); box-shadow: 0 14px 32px rgba(20, 48, 41, .1); }
.mock-share-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-bottom: 8px; border-bottom: 1px solid var(--line); font-size: 8px; font-weight: 800; }
.mock-share-head b { color: var(--success); }
.mock-share-panel > p { margin: 12px 0 6px; color: var(--ink); text-align: right; font: 20px/1.7 "Amiri Quran", "Traditional Arabic", serif; }
.mock-share-panel > small { display: block; color: var(--muted); font-size: 7px; line-height: 1.5; }
.mock-share-options { display: flex; gap: 7px; margin: 11px 0; }
.mock-share-options span { display: inline-flex; align-items: center; gap: 5px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 7px; font-size: 7px; font-weight: 700; }
.mock-share-options i { width: 14px; height: 14px; display: grid; place-items: center; border: 1px solid var(--line-strong); border-radius: 4px; font-size: 8px; font-style: normal; }
.mock-share-options i.checked { border-color: var(--brand); color: white; background: var(--brand); }
.mock-share-panel button { width: 100%; padding: 8px; border: 0; border-radius: 7px; color: white; background: var(--brand); font: 800 8px/1.3 inherit; }
.mock-share-result { margin-top: 8px; padding: 6px 8px; border-radius: 7px; color: var(--success); background: color-mix(in srgb, var(--success) 10%, var(--surface)); font-size: 7px; font-weight: 800; text-align: center; }
.help-finish { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 16px 0; padding: 14px; border-radius: 11px; color: var(--brand); background: var(--brand-soft); font-size: 12px; }
.help-share { margin: 16px 0; padding: 18px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface-2); }
.help-share h3 { margin: 0; font-size: 15px; }
.help-share p { margin: 5px 0 0; color: var(--muted); font-size: 10px; line-height: 1.6; }
.help-share-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 9px; margin-top: 14px; }
.help-share-button { min-height: 42px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 13px; border: 1px solid var(--line-strong); border-radius: 9px; color: var(--ink); background: var(--surface); font: 700 10px/1.35 inherit; cursor: pointer; }
.help-share-button:hover { border-color: var(--gold); background: var(--gold-soft); }
.help-share-button.primary { border-color: var(--brand); color: white; background: var(--brand); }
.help-share-button.primary:hover { background: var(--brand-2); }
.help-share-button span { font-size: 15px; }
.help-share > small { display: block; margin-top: 10px; color: var(--muted); font-size: 9px; line-height: 1.5; }
@keyframes help-mic-pulse { 50% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--danger) 12%, transparent); } }
.toast { position: fixed; z-index: 300; left: 50%; bottom: var(--toast-bottom, 92px); width: max-content; max-width: min(88vw, 680px); transform: translate(-50%, 20px); opacity: 0; pointer-events: none; padding: 10px 16px; border-radius: 9px; color: var(--surface); background: var(--ink); box-shadow: var(--shadow); font-size: 12px; line-height: 1.45; text-align: center; transition: .2s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.preview-badge {
    position: fixed;
    z-index: 320;
    right: 18px;
    bottom: 18px;
    padding: 9px 13px;
    border: 1px solid var(--gold);
    border-radius: 9px;
    color: var(--ink);
    background: var(--gold-soft);
    box-shadow: var(--shadow);
    text-decoration: none;
    font-size: 11px;
    font-weight: 700;
}
.mobile-only, .mobile-dock, #practice-panel-toggle, .practice-panel-close, .practice-scrim { display: none; }
html:not(.speech-mobile) .mobile-dock {
    position: fixed;
    z-index: 150;
    left: 50%;
    bottom: 18px;
    display: flex;
    align-items: center;
    gap: 5px;
    max-width: calc(100vw - 32px);
    padding: 8px;
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: color-mix(in srgb, var(--surface) 94%, transparent);
    box-shadow: 0 12px 36px rgba(20, 39, 33, .16);
    backdrop-filter: blur(18px);
    transform: translateX(-50%);
}
html:not(.speech-mobile) .mobile-dock button {
    min-width: 76px;
    min-height: 56px;
    padding: 6px 10px;
    border: 0;
    border-radius: 10px;
    color: color-mix(in srgb, var(--ink) 78%, var(--muted));
    background: transparent;
    font-weight: 800;
}
html:not(.speech-mobile) .mobile-dock button:hover,
html:not(.speech-mobile) .mobile-dock button.active,
html:not(.speech-mobile) .mobile-dock button[aria-pressed="true"] { color: var(--brand); background: var(--brand-soft); }
html:not(.speech-mobile) .mobile-dock button span,
html:not(.speech-mobile) .mobile-dock button small { display: block; margin: auto; }
html:not(.speech-mobile) .mobile-dock button span { font-size: 22px; font-weight: 850; line-height: 1; }
html:not(.speech-mobile) .mobile-dock button small { margin-top: 5px; font-size: 10px; font-weight: 850; line-height: 1.15; }
.mobile-dock .mode-primary-action-slot {
    order: 10;
    flex: 0 0 108px;
    min-width: 108px;
    min-height: 68px;
    display: grid;
    place-items: center;
}
.mobile-dock .mode-primary-action-slot > button { grid-area: 1 / 1; }
.mobile-dock .mode-primary-action-slot > button:not(.dock-mic) { width: 100%; }
html:not(.speech-mobile) .mobile-dock .dock-mic { color: white; background: var(--brand); }
html:not(.speech-mobile) .mobile-dock .dock-mic:hover { color: white; background: var(--brand-2); }
html:not(.speech-mobile) .mobile-dock .dock-mic.listening { color: white; background: var(--danger); }
.mobile-dock #mobile-meal-speech[aria-pressed="true"] { color: var(--brand); background: var(--brand-soft); }
.mobile-dock #mobile-meal-speech { position: relative; order: 10; display: grid; place-items: center; }
body:not(.app-mode-understand):not(.app-mode-revelation):not(.app-mode-daily) #mobile-meal-speech,
body:not(.app-mode-understand):not(.app-mode-revelation):not(.app-mode-daily) #mobile-meal-speech-parameters { display: none !important; }
.mobile-dock #mobile-meal-speech-parameters { order: 11; }
.mobile-dock #mobile-hifz-parameters { order: 11; }
.mobile-dock #mobile-meal-speech small {
    max-width: 88px;
    margin-top: 5px;
    line-height: 1.08;
    white-space: normal;
}
.mobile-dock #mobile-meal-speech .meal-speech-control-icon {
    display: block;
    color: currentColor;
    font-size: 24px;
    font-weight: 900;
    line-height: 1;
}
html:not(.speech-mobile) .mobile-dock #mobile-meal-speech { min-width: 108px; }
html.speech-mobile .mobile-dock #mobile-meal-speech small { max-width: 92px; font-size: 10px; line-height: 1.05; }
.meal-speech-dialog {
    width: min(92vw, 520px);
    max-width: 520px;
    padding: 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 20px;
    color: var(--ink);
    background: var(--surface);
    box-shadow: 0 24px 80px rgba(13, 39, 33, .28);
}
.hifz-parameters-dialog .meal-speech-footnotes-option { align-items: flex-start; }
.meal-speech-dialog::backdrop { background: rgba(9, 27, 23, .48); backdrop-filter: blur(5px); }
.meal-speech-dialog form { padding: 22px; }
.meal-speech-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.meal-speech-heading small { color: var(--gold); font-size: 9px; font-weight: 800; letter-spacing: .12em; }
.meal-speech-heading h2 { margin: 4px 0 0; font-size: 22px; }
.meal-speech-heading .dialog-close { width: 36px; height: 36px; flex: 0 0 36px; padding: 0; border: 1px solid var(--line); border-radius: 10px; color: var(--muted); background: var(--surface-2); font-size: 21px; }
.meal-speech-dialog > form > p { margin: 14px 0 18px; color: var(--muted); font-size: 12px; line-height: 1.65; }
.meal-speech-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.meal-speech-actions button { min-height: 92px; display: grid; grid-template-columns: 30px 1fr; align-content: center; gap: 3px 9px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; color: var(--ink); background: var(--surface-2); text-align: left; }
.meal-speech-actions button:hover { border-color: var(--gold); background: var(--gold-soft); }
.meal-speech-actions button > span { grid-row: 1 / span 2; align-self: center; color: var(--brand); font-size: 24px; }
.meal-speech-actions button > strong { font-size: 12px; }
.meal-speech-actions button > small { color: var(--muted); font-size: 9px; line-height: 1.4; }
.meal-speech-footnotes-option { display: flex; align-items: center; gap: 12px; margin-top: 13px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); cursor: pointer; }
.meal-speech-footnotes-option[hidden] { display: none !important; }
.meal-speech-footnotes-option input { width: 20px; height: 20px; flex: 0 0 20px; accent-color: var(--brand); }
.meal-speech-footnotes-option span, .meal-speech-footnotes-option strong, .meal-speech-footnotes-option small { display: block; }
.meal-speech-footnotes-option strong { color: var(--ink); font-size: 11px; }
.meal-speech-footnotes-option small { margin-top: 3px; color: var(--muted); font-size: 9px; line-height: 1.45; }
.meal-speech-reference-note { display: block; margin-top: 10px; padding: 9px 11px; border-left: 3px solid var(--gold); border-radius: 0 8px 8px 0; color: var(--muted); background: var(--gold-soft); font-size: 9px; line-height: 1.5; }
.meal-speech-reference-note strong { color: var(--ink); }
.meal-speech-note { display: block; margin-top: 14px; color: var(--muted); font-size: 9px; line-height: 1.5; }
.meal-speech-parameter-actions { position: sticky; z-index: 4; bottom: -18px; margin: 16px -18px -18px; width: auto; padding: 12px 18px 18px; border-top: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 96%, transparent); backdrop-filter: blur(10px); }
.comments-back { display: block; width: min(240px, 100%); margin: 14px auto 0; }
.meal-search-footer { gap: 10px; }
.meal-search-footer .dialog-back { color: var(--brand); border: 1px solid color-mix(in srgb, var(--brand) 40%, var(--line)); background: var(--surface); }
.mobile-listening-status {
    position: fixed;
    z-index: 149;
    right: 14px;
    bottom: calc(18px + env(safe-area-inset-bottom));
    display: none;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border: 1px solid color-mix(in srgb, var(--danger) 35%, var(--line));
    border-radius: 999px;
    color: var(--ink);
    background: color-mix(in srgb, var(--surface) 94%, transparent);
    box-shadow: var(--shadow);
    backdrop-filter: blur(14px);
    font-size: 11px;
}
html.speech-mobile .mobile-listening-status { display: flex; }
.mobile-listening-status[hidden] { display: none !important; }
.mobile-listening-status > span {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--danger);
    box-shadow: 0 0 0 0 color-mix(in srgb, var(--danger) 38%, transparent);
    animation: mobile-listening-pulse 1.2s ease-in-out infinite;
}
.mobile-listening-status.paused { border-color: var(--line); }
.mobile-listening-status.paused > span { background: var(--muted); animation: none; box-shadow: none; }

/* Telefonlarda masaüstü yoğunluğu (980 CSS px) kullanıldığında klasik mobil
   media sorgusu çalışmaz. Cihaz sınıfı üzerinden aynı kontrolleri erişilebilir tut. */
html.speech-mobile { --topbar-height: 88px; }
html.speech-mobile { --persistent-controls-height: 46px; --persistent-controls-top: 21px; --persistent-controls-right: 12px; --persistent-controls-reserve: 220px; }
html.speech-mobile .topbar {
    grid-template-columns: 140px minmax(460px, 1fr) var(--persistent-controls-reserve);
    gap: 10px;
    padding: 0 12px;
}
html.speech-mobile .topbar-actions { gap: 4px; }
html.speech-mobile .topbar-actions .streak { display: none; }
html.speech-mobile .topbar-command-button,
html.speech-mobile #theme-button { width: 44px; height: 44px; border-radius: 11px; }
html.speech-mobile .other-shortcuts-trigger { width: 46px; min-width: 46px; height: 46px; padding: 0; }
html.speech-mobile .other-shortcuts-menu { position: fixed; top: calc(var(--persistent-controls-top) + var(--persistent-controls-height) + 8px); right: 10px; }
html.speech-mobile .topbar-actions .other-shortcuts-menu .shortcut-menu-streak { display: grid; }
html.speech-mobile .other-shortcuts-menu .topbar-command-button,
html.speech-mobile .other-shortcuts-menu #theme-button { width: 100%; height: 54px; display: flex; border-radius: 11px; }
html.speech-mobile .quick-search {
    height: 58px;
    gap: 6px;
    padding: 0 7px;
    border-radius: 16px;
}
html.speech-mobile .quick-search input {
    min-height: 52px;
    padding: 0 7px;
    font-size: 18px;
}
html.speech-mobile .quick-search-submit,
html.speech-mobile .quick-search-clear,
html.speech-mobile .quick-search-enter,
html.speech-mobile #quick-voice-button,
html.speech-mobile .quick-mode-search-tool {
    width: 48px;
    min-width: 48px;
    height: 48px;
    border-radius: 12px;
    touch-action: manipulation;
}
html.speech-mobile .quick-search-submit { font-size: 22px; }
html.speech-mobile .quick-search-clear { font-size: 30px; }
html.speech-mobile #quick-voice-button { font-size: 22px; }
html.speech-mobile .quick-mode-search-tool { display: none; font-size: 20px; }
html.speech-mobile body.app-mode-read .quick-mode-search-tool,
html.speech-mobile body.app-mode-understand .quick-mode-search-tool,
html.speech-mobile body.app-mode-revelation .quick-mode-search-tool { display: inline-flex; }
html.speech-mobile .quick-mode-search-tool b { font-size: 10px; }
html.speech-mobile .quick-result-navigation { height: 48px; }
html.speech-mobile .quick-result-navigation button { width: 40px; min-width: 40px; height: 42px; font-size: 28px; }
html.speech-mobile .quick-result-navigation output { min-width: 42px; font-size: 10px; }
html.speech-mobile .quick-search-enter {
    width: auto;
    min-width: 68px;
    padding: 0 12px;
    border: 1px solid var(--line);
    font-size: 14px;
    font-weight: 700;
}

/* Windows masaüstünde Global arama kontrollerini tam görünür ve kolay
   tıklanabilir tut; telefon yoğunlukları ayrı speech-mobile kurallarındadır. */
@media (min-width: 761px) {
html.speech-windows { --topbar-height: 80px; }
html.speech-windows .topbar {
    grid-template-columns: 250px minmax(420px, 680px) minmax(var(--persistent-controls-reserve), 1fr);
    gap: 24px;
}
html.speech-windows .quick-search {
    height: 54px;
    gap: 8px;
    padding: 0 9px;
    border-radius: 14px;
}
html.speech-windows .quick-search input {
    min-height: 48px;
    padding: 0 6px;
    font-size: 15px;
}
html.speech-windows .quick-search-submit,
html.speech-windows .quick-search-clear,
html.speech-windows .quick-search-enter,
html.speech-windows #quick-voice-button,
html.speech-windows .quick-mode-search-tool {
    width: 42px;
    min-width: 42px;
    height: 42px;
    border-radius: 11px;
}
html.speech-windows .quick-search-submit { font-size: 20px; }
html.speech-windows .quick-search-clear { font-size: 27px; }
html.speech-windows #quick-voice-button {
    overflow: visible;
    font-family: "Segoe UI Emoji", "Segoe UI Symbol", sans-serif;
    font-size: 21px;
    line-height: 1;
}
html.speech-windows .quick-mode-search-tool { display: none; font-size: 18px; }
html.speech-windows body.app-mode-read .quick-mode-search-tool,
html.speech-windows body.app-mode-understand .quick-mode-search-tool,
html.speech-windows body.app-mode-revelation .quick-mode-search-tool { display: inline-flex; }
html.speech-windows .quick-mode-search-tool b { font-size: 9px; }
html.speech-windows .quick-result-navigation { height: 42px; }
html.speech-windows .quick-result-navigation button { width: 34px; min-width: 34px; height: 36px; font-size: 25px; }
html.speech-windows .quick-result-navigation output { min-width: 40px; font-size: 9px; }
html.speech-windows .quick-search-enter {
    width: auto;
    min-width: 66px;
    padding: 0 12px;
    border: 1px solid var(--line);
    font-size: 13px;
    font-weight: 700;
}
}
html.speech-mobile #settings-button { display: grid; }
html.speech-mobile #practice-panel-toggle { display: inline-flex; }
html.speech-mobile .help-dialog { width: min(94vw, 760px); }
html.speech-mobile .help-intro { grid-template-columns: 1fr; }
html.speech-mobile .help-intro-mark { min-height: 115px; }
html.speech-mobile .guide-card { grid-template-columns: 1fr; }
html.speech-mobile .guide-copy p { font-size: 13px; }
html.speech-mobile .guide-copy ul { font-size: 12px; }
html.speech-mobile .guide-steps li { font-size: 12px; }
html.speech-mobile .guide-language-list { columns: 3 180px; font-size: 12px; }
html.speech-mobile .reader { padding-bottom: 126px; }
html.speech-mobile .mobile-dock {
    position: fixed;
    z-index: 150;
    left: 0;
    right: 0;
    bottom: 0;
    height: calc(88px + env(safe-area-inset-bottom));
    display: flex;
    align-items: flex-start;
    justify-content: space-around;
    padding: 9px 6px env(safe-area-inset-bottom);
    border-top: 2px solid var(--line);
    background: color-mix(in srgb, var(--surface) 94%, transparent);
    backdrop-filter: blur(18px);
}
html.speech-mobile .mobile-dock button { min-width: 58px; min-height: 68px; border: 0; background: transparent; color: color-mix(in srgb, var(--ink) 82%, var(--muted)); font-weight: 850; }
html.speech-mobile .mobile-dock button:not(.dock-mic) { flex: 1 1 0; min-width: 0; padding: 4px 3px; }
html.speech-mobile .mobile-dock button span,
html.speech-mobile .mobile-dock button small { display: block; margin: auto; }
html.speech-mobile .mobile-dock button span { font-size: 26px; font-weight: 900; line-height: 1; }
html.speech-mobile .mobile-dock button small { margin-top: 5px; color: inherit; font-size: 11px; font-weight: 850; line-height: 1.08; }
html.speech-mobile .mobile-dock .mode-primary-action-slot { flex-basis: 96px; min-width: 92px; min-height: 68px; }
html.speech-mobile .mobile-dock .dock-mic {
    width: 68px;
    height: 68px;
    min-width: 68px;
    min-height: 68px;
    margin-top: -29px;
    border-radius: 50%;
    color: white;
    background: var(--brand);
    box-shadow: 0 8px 24px color-mix(in srgb, var(--brand) 40%, transparent);
}
html.speech-mobile .mobile-dock .dock-mic.listening { background: var(--danger); }
html.speech-mobile .mobile-dock .dock-mic span { font-size: 16px; }
html.speech-mobile .mobile-dock button.active,
html.speech-mobile .mobile-dock button[aria-pressed="true"] { color: var(--brand); background: var(--brand-soft); border-radius: 9px; }
html.speech-mobile .mobile-listening-status { bottom: calc(98px + env(safe-area-inset-bottom)); }
html.speech-mobile .practice-panel.mobile-open {
    position: fixed;
    z-index: 240;
    top: calc(var(--topbar-height) + 12px);
    right: 14px;
    bottom: calc(98px + env(safe-area-inset-bottom));
    width: min(340px, calc(100vw - 28px));
    display: block;
    overflow-y: auto;
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: var(--shadow);
}
html.speech-mobile .practice-panel-close { display: grid; margin-left: auto; }
html.speech-mobile .practice-scrim {
    position: fixed;
    z-index: 230;
    inset: 0;
    display: block;
    background: rgba(10, 20, 17, .44);
}
html.speech-mobile .practice-scrim[hidden] { display: none !important; }
html.speech-mobile .preview-badge { bottom: 82px; }
html.speech-mobile .recitation-player { padding: 18px; }
html.speech-mobile .recitation-controls { grid-template-columns: minmax(220px, 1fr) auto minmax(110px, 130px); }
html.speech-mobile .recitation-play-button { min-height: 48px; }
html.speech-mobile .recitation-speed-control select,
html.speech-mobile .recitation-ayah-controls button { height: 48px; }

@media (max-width: 760px) {
    .mode-select-control { min-height: 44px; padding-inline: 10px; }
    .mode-select-control select { min-width: 155px; max-width: 200px; font-size: 14px; }
    .mode-select-label { font-size: 11px; }
    .recitation-player { padding: 16px; border-radius: 14px; }
    .recitation-player-heading { grid-template-columns: auto minmax(0, 1fr); }
    .recitation-current { grid-column: 1 / -1; justify-self: start; }
    .recitation-controls,
    html.speech-mobile .recitation-controls { grid-template-columns: minmax(0, 1fr) auto; }
    .recitation-play-button { grid-column: 1 / -1; justify-content: center; }
    .recitation-speed-control { grid-column: 1; grid-row: 2; }
    .recitation-ayah-controls { grid-column: 2; grid-row: 2; }
    .recitation-progress-row { grid-template-columns: 1fr; }
    .recitation-progress-row output { text-align: left; }
    .mode-dialog form { padding: 17px; }
    .mode-options { grid-template-columns: 1fr; }
    .mode-option { min-height: 140px; }
    .copyright-dialog { width: calc(100vw - 16px); max-height: calc(100dvh - 16px); border-radius: 14px; }
    .copyright-dialog form { gap: 12px; padding: 16px; }
    .copyright-heading h2 { font-size: 17px; }
    .copyright-beta-badge { min-width: 52px; min-height: 28px; }
    .copyright-notice-grid { grid-template-columns: 1fr; gap: 10px; }
    .copyright-notice-grid section { padding: 13px; }
    .copyright-notice-grid p { font-size: 9px; line-height: 1.62; }
    .copyright-actions { grid-template-columns: 1fr; }
    .copyright-actions .dialog-done { width: 100%; }
    .design-credit { flex-wrap: wrap; letter-spacing: .04em; }
    .guide-mode-overview { grid-template-columns: 1fr; }
    .guide-mode-overview p { grid-column: 1; }
}

@keyframes shimmer { to { background-position: -200% 0; } }
@keyframes pulse { 50% { transform: scale(1.25); } }

@media (max-width: 1180px) {
    .app-shell { grid-template-columns: minmax(0, 1fr); }
    .app-shell.sidebar-visible { grid-template-columns: 230px minmax(0, 1fr); }
    .practice-panel { display: none; }
    .topbar { grid-template-columns: 210px minmax(260px, 1fr) var(--persistent-controls-reserve); gap: 16px; }
}

@media (max-width: 760px) {
    :root { --topbar-height: 62px; --arabic-size: 32px; --persistent-controls-height: 38px; --persistent-controls-top: 12px; --persistent-controls-right: 8px; --persistent-controls-reserve: 104px; }
    .settings-dialog { width: min(96vw, 680px); }
    #settings-dialog { width: calc(100vw - 16px); height: calc(100vh - 16px); height: calc(100dvh - 16px); max-height: none; border-radius: 14px; }
    #settings-dialog form { grid-template-rows: auto minmax(110px, min(24vh, 200px)) minmax(0, 1fr) auto; grid-template-rows: auto minmax(110px, min(24dvh, 200px)) minmax(0, 1fr) auto; gap: 8px; padding: 14px; padding-bottom: max(14px, env(safe-area-inset-bottom)); overflow: hidden; }
    #settings-dialog .dialog-heading h2 { font-size: 18px; }
    .reading-settings { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; height: 100%; min-height: 0; max-height: none; padding: 8px; }
    #settings-dialog .setting-row,
    #settings-dialog .setting-range { min-height: 54px; padding: 8px; }
    #settings-dialog .setting-row strong,
    #settings-dialog .setting-range strong { font-size: 10px; line-height: 1.25; }
    #settings-dialog .setting-row small { display: none; }
    #settings-dialog .setting-row input { width: 36px; height: 20px; }
    #settings-dialog .setting-range span { align-items: flex-start; gap: 5px; }
    #settings-dialog .setting-range output { font-size: 9px; }
    #settings-dialog .setting-range input { margin-top: 8px; }
    #settings-dialog .meal-catalog-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
    #settings-dialog .meal-catalog-summary > span { padding: 6px 8px; }
    #settings-dialog .meal-catalog-summary strong { font-size: 15px; }
    #settings-dialog .meal-settings-intro { font-size: 9px; }
    #settings-dialog .meal-filter-control { height: 38px; margin: 4px 0 6px; }
    #settings-dialog .meal-settings { min-height: 0; }
    #settings-dialog .meal-settings-list { min-height: 0; max-height: none; }
    #settings-dialog .meal-settings-status { min-height: 12px; font-size: 9px; }
    #settings-dialog .dialog-done { position: relative; z-index: 8; bottom: auto; min-height: 42px; box-shadow: 0 -8px 18px color-mix(in srgb, var(--surface) 92%, transparent); }
    #settings-dialog form { grid-template-rows: auto auto minmax(0, 1fr); gap: 8px; }
    #settings-dialog .settings-menu { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px; }
    #settings-dialog .settings-menu button { min-height: 48px; justify-content: center; gap: 5px; padding: 6px; text-align: center; }
    #settings-dialog .settings-menu button > span:first-child { width: 29px; height: 29px; font-size: 13px; }
    #settings-dialog .settings-menu button > span:last-child { display: block; }
    #settings-dialog .settings-menu strong { display: block; font-size: 9px; white-space: normal; }
    #settings-dialog .settings-menu small { display: none; }
    #settings-dialog .appearance-settings { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; padding: 8px; }
    #settings-dialog .settings-recitation-block { grid-template-columns: 1fr; padding: 10px; }
    #settings-dialog .settings-recitation-heading,
    #settings-dialog .settings-recitation-block .recitation-attribution { grid-column: 1; }
    #settings-dialog .settings-panel:not([hidden]) { gap: 8px; }
    .meal-language-items { grid-template-columns: 1fr; }
    .settings-dialog:not(#settings-dialog) .meal-settings-list { max-height: min(56vh, 520px); }
    .reading-position-dialog form { gap: 12px; padding: 16px 14px; }
    .reading-position-actions { grid-template-columns: 1fr; gap: 8px; }
    .reading-position-actions > button { min-height: 72px; }
    .reading-position-list { max-height: 42vh; }
    .reading-position-entry-main { grid-template-columns: auto minmax(0, 1fr); }
    .reading-position-entry-arrow { display: none; }
    .reading-position-mode { min-width: 58px; padding-inline: 6px; }
    .mobile-only, .mobile-dock { display: flex; }
    .topbar { grid-template-columns: 40px minmax(0, 1fr) var(--persistent-controls-reserve); gap: 10px; padding: 0 12px; }
    .brand small, .quick-search, .streak { display: none; }
    .brand-mark { width: 34px; height: 34px; }
    .topbar-actions { gap: 3px; }
    .ui-language-control { min-width: 48px; max-width: 56px; height: 36px; padding: 0 5px; gap: 2px; }
    .ui-language-control > span[aria-hidden="true"] { display: inline; font-size: 17px; }
    .ui-language-control select { width: 15px; font-size: 0; }
    .ui-language-control select option { font-size: 14px; }
    .topbar-command-button,
    #theme-button { width: 36px; height: 36px; border-radius: 9px; font-size: 17px; }
    .other-shortcuts-trigger { width: 40px; min-width: 40px; height: 38px; padding: 0; }
    .settings-trigger-icon { width: 24px; height: 24px; stroke-width: 2; }
    .other-shortcuts-menu { position: fixed; top: calc(var(--persistent-controls-top) + var(--persistent-controls-height) + 7px); right: 8px; bottom: 8px; max-height: none; }
    .topbar-actions .other-shortcuts-menu .shortcut-menu-streak { display: grid; }
    .other-shortcuts-menu .topbar-command-button,
    .other-shortcuts-menu #theme-button { width: 100%; height: 54px; display: flex; border-radius: 11px; }
    .releases-topbar-button > b { top: -5px; right: -5px; font-size: 6px; }
    .avatar-button { display: none; }
    .app-shell { display: block; }
    .app-shell.sidebar-visible { display: block; }
    .sidebar {
        position: fixed;
        z-index: 220;
        inset: 0 auto 0 0;
        width: min(88vw, 330px);
        height: 100vh;
        transform: translateX(-105%);
        transition: transform .22s ease;
        box-shadow: var(--shadow);
        overflow: hidden;
    }
    .surah-navigation-panel { min-height: 260px; }
    .arabic-search-keyboard { max-height: 180px; overflow-y: auto; }
    .sidebar.open { transform: translateX(0); }
    .scrim { position: fixed; z-index: 210; inset: 0; background: rgba(10,20,17,.5); }
    .reader { padding: 24px 12px 126px; }
    .top-curtain-handle { width: 84px; min-width: 84px; height: 34px; min-height: 34px; margin-top: -15px; }
    body.top-curtain-collapsed .reader { padding-top: 4px; }
    .reader-title-row { grid-template-columns: auto minmax(0, 1fr) auto; gap: 7px; }
    .reader-title-row h1 { font-size: clamp(18px, 5.8vw, 30px); }
    .surah-details-toggle { width: 38px; height: 38px; font-size: 18px; }
    .surah-title-details { max-width: 100%; gap: 7px; padding: 9px 7px; flex-wrap: wrap; }
    .reader-title-detail-copy { order: -1; flex-basis: 100%; gap: 7px; }
    .arabic-surah-name { font-size: clamp(18px, 5.2vw, 27px); }
    .reader-kicker { gap: 3px; font-size: clamp(6px, 1.9vw, 9px); letter-spacing: .04em; }
    .round-button { width: 34px; height: 34px; }
    .title-surah-button { min-width: 46px; min-height: 42px; display: grid; justify-items: center; gap: 1px; padding: 3px 4px; }
    .title-surah-button svg { width: 18px; height: 18px; }
    .title-surah-button strong { font-size: 8px; line-height: 1; }
    .surah-step-button { min-width: 42px; gap: 3px; }
    .surah-step-icon { width: 32px; height: 32px; font-size: 15px; }
    .surah-step-button small { max-width: 43px; font-size: 6.5px; line-height: 1.05; white-space: normal; }
    .title-studio-audio-button { min-height: 32px; padding: 4px 7px; font-size: 8px; }
    .session-reciter-control select { width: min(76vw, 360px); max-width: 360px; }
    .reader-tools { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; padding: 2px 1px 8px; }
    .reader-tools > * { flex: 0 0 auto; }
    .help-dialog form { padding: 16px; }
    .help-heading { top: -16px; margin: -16px -16px 14px; padding: 14px 16px; }
    .help-intro { grid-template-columns: 1fr; padding: 18px; }
    .help-intro-mark { min-height: 105px; }
    .guide-card { grid-template-columns: 1fr; padding: 17px; }
    .guide-copy { padding-left: 39px; }
    .guide-steps li { font-size: 11px; }
    .guide-glossary { grid-template-columns: 1fr; }
    .guide-interaction-callout { grid-template-columns: 1fr; }
    .guide-language-catalog-heading { align-items: flex-start; flex-direction: column; }
    .guide-language-list { columns: 2 130px; }
    .guide-visual { min-height: 210px; }
    .help-finish { align-items: flex-start; flex-direction: column; }
    .ayah-card { border-radius: 13px; padding: 18px 14px; }
    .ayah-meta { align-items: flex-start; flex-wrap: wrap; }
    .ayah-meta-actions { gap: 5px; }
    .word-action-control { padding-inline: 5px; }
    .word-action-control > span { display: none; }
    .word-action-control select { max-width: 118px; }
    .ayah-bookmark-button { min-width: 116px; padding: 5px 8px 5px 6px; justify-content: flex-start; }
    .ayah-bookmark-copy { display: grid; }
    .arabic-words { margin-top: 14px; }
    .word { padding-inline: 4px; min-width: 35px; }
    .word-meaning, .word-broken-meal { max-width: 88px; font-size: var(--word-meaning-size); }
    .mobile-dock {
        position: fixed;
        z-index: 150;
        left: 0;
        right: 0;
        bottom: 0;
        height: calc(88px + env(safe-area-inset-bottom));
        align-items: flex-start;
        justify-content: space-around;
        padding: 9px 6px env(safe-area-inset-bottom);
        border-top: 2px solid var(--line);
        background: color-mix(in srgb, var(--surface) 94%, transparent);
        backdrop-filter: blur(18px);
    }
    .mobile-dock button { min-width: 50px; min-height: 68px; border: 0; background: transparent; color: color-mix(in srgb, var(--ink) 82%, var(--muted)); font-weight: 850; }
    .mobile-dock button:not(.dock-mic) { flex: 1 1 0; min-width: 0; padding: 4px 3px; }
    .mobile-dock button span, .mobile-dock button small { display: block; margin: auto; }
    .mobile-dock button span { font-size: 26px; font-weight: 900; line-height: 1; }
    .mobile-dock button small { margin-top: 5px; color: inherit; font-size: 11px; font-weight: 850; line-height: 1.08; }
    .mobile-dock .mode-primary-action-slot { flex-basis: 96px; min-width: 92px; min-height: 68px; }
    .mobile-dock .dock-mic { width: 68px; height: 68px; min-width: 68px; min-height: 68px; margin-top: -29px; border-radius: 50%; color: white; background: var(--brand); box-shadow: 0 8px 24px color-mix(in srgb, var(--brand) 40%, transparent); }
    .mobile-dock .dock-mic.listening { background: var(--danger); }
    .mobile-dock .dock-mic span { font-size: 16px; }
    .meal-speech-dialog form { padding: 18px 14px; }
    .meal-speech-heading h2 { font-size: 19px; }
    .meal-speech-actions { grid-template-columns: 1fr; }
    .meal-speech-actions button { min-height: 76px; }
    .mobile-listening-status {
        position: fixed;
        z-index: 149;
        right: 14px;
        bottom: calc(98px + env(safe-area-inset-bottom));
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 8px 12px;
        border: 1px solid color-mix(in srgb, var(--danger) 35%, var(--line));
        border-radius: 999px;
        color: var(--ink);
        background: color-mix(in srgb, var(--surface) 94%, transparent);
        box-shadow: var(--shadow);
        backdrop-filter: blur(14px);
        font-size: 11px;
    }
    .mobile-listening-status > span {
        width: 9px;
        height: 9px;
        border-radius: 50%;
        background: var(--danger);
        box-shadow: 0 0 0 0 color-mix(in srgb, var(--danger) 38%, transparent);
        animation: mobile-listening-pulse 1.2s ease-in-out infinite;
    }
    .mobile-listening-status.paused { border-color: var(--line); }
    .mobile-listening-status.paused > span { background: var(--muted); animation: none; box-shadow: none; }
    .toast { bottom: var(--toast-bottom, calc(92px + env(safe-area-inset-bottom))); }
    .preview-badge { right: 10px; bottom: 82px; }
}

@keyframes mobile-listening-pulse {
    0%, 100% { opacity: .48; box-shadow: 0 0 0 0 color-mix(in srgb, var(--danger) 38%, transparent); }
    50% { opacity: 1; box-shadow: 0 0 0 7px transparent; }
}

/* Tesla ve benzeri dokunmatik masaüstü tarayıcılarında büyük Global arama
   kontrolleri ile hızlı komutlar aynı satıra sığmayabilir. Komutları üstte,
   Global aramayı tam genişlikte ikinci satırda tutarak mikrofonu açık bırak. */
@media (min-width: 761px) and (max-width: 1280px) {
    html.speech-mobile { --topbar-height: 138px; --persistent-controls-top: 13px; }
    html.speech-mobile .topbar {
        height: var(--topbar-height);
        grid-template-columns: 140px minmax(0, 1fr);
        grid-template-rows: 52px 58px;
        grid-template-areas:
            "brand actions"
            "search search";
        gap: 8px 12px;
        padding: 10px 12px;
    }
    html.speech-mobile .brand { grid-area: brand; min-width: 0; }
    html.speech-mobile .quick-search {
        grid-area: search;
        width: 100%;
        min-width: 0;
        box-sizing: border-box;
    }
    html.speech-mobile .persistent-topbar-actions {
        grid-area: auto;
        width: auto;
        min-width: 0;
        justify-content: flex-end;
        overflow: visible;
        overscroll-behavior-x: auto;
        scrollbar-width: auto;
    }
    html.speech-mobile .topbar-actions > * { flex: 0 0 auto; }
}

@media (max-height: 640px) {
    #settings-dialog form { grid-template-rows: auto minmax(72px, 20vh) minmax(0, 1fr) auto; grid-template-rows: auto minmax(72px, 20dvh) minmax(0, 1fr) auto; gap: 6px; padding-top: 10px; padding-bottom: max(10px, env(safe-area-inset-bottom)); }
    #settings-dialog .dialog-heading .eyebrow { display: none; }
    #settings-dialog .dialog-heading h2 { font-size: 16px; }
    #settings-dialog .meal-settings-intro { display: none; }
    #settings-dialog .meal-catalog-summary { margin: 2px 0; gap: 5px; }
    #settings-dialog .meal-catalog-summary > span { padding: 4px 7px; }
    #settings-dialog .meal-filter-control { height: 34px; margin: 2px 0 4px; }
    #settings-dialog .meal-settings-status { min-height: 9px; margin-top: 2px; }
    #settings-dialog .dialog-done { min-height: 38px; padding: 7px; }
    #settings-dialog form { grid-template-rows: auto auto minmax(0, 1fr); }
    #settings-dialog .settings-menu button { min-height: 40px; padding: 4px 6px; }
    #settings-dialog .settings-menu button > span:first-child { width: 26px; height: 26px; }
}

/* Adaptive dialog viewport: keep every click-opened screen centered and usable
   across phones, tablets, desktop browsers, Google TV and vehicle displays. */
:root {
    --app-visual-width: 100vw;
    --app-visual-height: 100vh;
    --app-visual-height: 100dvh;
    --app-visual-left: 0px;
    --app-visual-top: 0px;
    --app-visual-center-x: 50vw;
    --app-visual-center-y: 50vh;
    --app-visual-center-y: 50dvh;
    --adaptive-dialog-total-gap: clamp(24px, 5vmin, 64px);
}

:is(
    dialog.settings-dialog,
    dialog.comments-dialog,
    dialog.meal-speech-dialog
)[open] {
    position: fixed;
    inset: auto;
    top: var(--app-visual-center-y);
    left: var(--app-visual-center-x);
    box-sizing: border-box;
    margin: 0;
    max-width: calc(var(--app-visual-width) - var(--adaptive-dialog-total-gap));
    max-height: calc(var(--app-visual-height) - var(--adaptive-dialog-total-gap));
    transform: translate(-50%, -50%);
    overscroll-behavior: contain;
}

:is(
    dialog.settings-dialog,
    dialog.meal-speech-dialog
)[open] > form {
    box-sizing: border-box;
    max-height: calc(var(--app-visual-height) - var(--adaptive-dialog-total-gap) - 2px);
    overflow-x: auto;
    overflow-y: scroll;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-gutter: stable;
}

/* Every current and future click-opened dialog receives this class from app.js.
   Keep its complete content reachable on TV, streaming sticks, vehicle screens,
   phones and desktop browsers. The vertical rail is always present; the
   horizontal rail appears only when a browser/device makes content wider. */
dialog[open] > .adaptive-dialog-scroll {
    box-sizing: border-box;
    max-width: 100%;
    max-height: calc(var(--app-visual-height) - var(--adaptive-dialog-total-gap) - 2px);
    overflow-x: auto !important;
    overflow-y: scroll !important;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-gutter: stable both-edges;
    scrollbar-width: auto;
    scrollbar-color: var(--brand) var(--surface-2);
}

dialog[open] > .adaptive-dialog-scroll::-webkit-scrollbar {
    width: 14px;
    height: 14px;
}
dialog[open] > .adaptive-dialog-scroll::-webkit-scrollbar-track {
    border-radius: 999px;
    background: var(--surface-2);
}
dialog[open] > .adaptive-dialog-scroll::-webkit-scrollbar-thumb {
    min-height: 42px;
    border: 3px solid var(--surface-2);
    border-radius: 999px;
    background: var(--brand);
}
dialog[open] > .adaptive-dialog-scroll::-webkit-scrollbar-corner {
    background: var(--surface-2);
}

/* Ayarlar kendi dört bölümünde bağımsız dikey kaydırma ve sabit Tamam düğmesi
   kullanır. Dış kabuk yalnız gerekirse yatay kayar; mevcut düzen korunur. */
#settings-dialog[open] > .adaptive-dialog-scroll {
    overflow-x: auto !important;
    overflow-y: hidden !important;
}

#copyright-dialog[open] {
    width: min(calc(var(--app-visual-width) - var(--adaptive-dialog-total-gap)), clamp(680px, 72vw, 1180px));
}

#mode-dialog[open] {
    width: min(calc(var(--app-visual-width) - var(--adaptive-dialog-total-gap)), clamp(700px, 76vw, 1180px));
}

#meal-speech-dialog[open] {
    width: min(calc(var(--app-visual-width) - var(--adaptive-dialog-total-gap)), clamp(480px, 48vw, 700px));
    max-width: none;
}

#settings-dialog[open] {
    width: min(calc(var(--app-visual-width) - var(--adaptive-dialog-total-gap)), clamp(760px, 78vw, 1240px));
    height: min(calc(var(--app-visual-height) - var(--adaptive-dialog-total-gap)), 960px);
    max-height: calc(var(--app-visual-height) - var(--adaptive-dialog-total-gap));
}

#reading-position-dialog[open] {
    width: min(calc(var(--app-visual-width) - var(--adaptive-dialog-total-gap)), clamp(560px, 62vw, 900px));
}

#word-detail-dialog[open],
#daily-ayah-dialog[open] {
    width: min(calc(var(--app-visual-width) - var(--adaptive-dialog-total-gap)), clamp(580px, 68vw, 980px));
}

#meal-search-dialog[open],
#releases-dialog[open] {
    width: min(calc(var(--app-visual-width) - var(--adaptive-dialog-total-gap)), clamp(720px, 88vw, 1240px));
}

#help-dialog[open],
#comments-dialog[open] {
    width: min(calc(var(--app-visual-width) - var(--adaptive-dialog-total-gap)), clamp(760px, 92vw, 1360px));
}

#comments-dialog[open] {
    overflow-x: hidden;
    overflow-y: auto;
}

:is(
    #copyright-dialog,
    #mode-dialog,
    #meal-speech-dialog,
    #settings-dialog,
    #reading-position-dialog,
    #word-detail-dialog,
    #daily-ayah-dialog,
    #meal-search-dialog,
    #releases-dialog,
    #help-dialog,
    #comments-dialog
) .dialog-heading h2,
#meal-speech-dialog .meal-speech-heading h2 {
    font-size: clamp(17px, 1.55vw, 25px);
}

@media (min-width: 1280px) and (min-height: 700px) {
    #copyright-dialog form,
    #mode-dialog form,
    #meal-speech-dialog form { padding: clamp(22px, 2vw, 32px); }
    .mode-option { min-height: clamp(210px, 25vh, 280px); }
    .copyright-notice-grid p,
    .mode-option small,
    .meal-speech-dialog > form > p { font-size: clamp(11px, .76vw, 14px); }
    .meal-speech-footnotes-option strong { font-size: clamp(12px, .72vw, 14px); }
    .meal-speech-footnotes-option small,
    .meal-speech-note,
    .meal-speech-reference-note { font-size: clamp(10px, .64vw, 12px); }
}

@media (max-width: 760px), (max-height: 600px) {
    :is(
        dialog.settings-dialog,
        dialog.comments-dialog,
        dialog.meal-speech-dialog
    )[open] {
        width: calc(var(--app-visual-width) - var(--adaptive-dialog-total-gap));
        max-width: calc(var(--app-visual-width) - var(--adaptive-dialog-total-gap));
        max-height: calc(var(--app-visual-height) - var(--adaptive-dialog-total-gap));
        border-radius: 14px;
    }

    :is(
        dialog.settings-dialog,
        dialog.meal-speech-dialog
    )[open] > form {
        max-height: calc(var(--app-visual-height) - var(--adaptive-dialog-total-gap) - 2px);
    }

    #settings-dialog[open] {
        height: calc(var(--app-visual-height) - var(--adaptive-dialog-total-gap));
        max-height: calc(var(--app-visual-height) - var(--adaptive-dialog-total-gap));
    }

    #copyright-dialog[open] form,
    #mode-dialog[open] form,
    #meal-speech-dialog[open] form { padding: clamp(12px, 3.5vw, 17px); }
}

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

@media print {
    @page { size: A4 portrait; margin: 12mm; }
    html.printing-help, html.printing-help body { color: #17241f; background: white !important; }
    html.printing-help body { min-width: 0; }
    html.printing-help body > :not(#help-dialog) { display: none !important; }
    html.printing-help #help-dialog {
        position: static !important;
        inset: auto !important;
        display: block !important;
        width: auto !important;
        max-width: none !important;
        max-height: none !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: visible !important;
        border: 0 !important;
        border-radius: 0 !important;
        color: #17241f !important;
        background: white !important;
        box-shadow: none !important;
    }
    html.printing-help #help-dialog::backdrop { display: none !important; }
    html.printing-help #help-dialog form { max-height: none !important; overflow: visible !important; padding: 0 !important; }
    html.printing-help .help-heading { position: static !important; margin: 0 0 14px !important; padding: 0 0 10px !important; border-bottom: 1px solid #d9dfdc !important; background: white !important; }
    html.printing-help .help-heading .icon-button,
    html.printing-help .help-share,
    html.printing-help .dialog-done { display: none !important; }
    html.printing-help .help-intro,
    html.printing-help .guide-card,
    html.printing-help .guide-visual,
    html.printing-help .help-finish { break-inside: avoid; page-break-inside: avoid; }
    html.printing-help .guide-list { gap: 10px; }
    html.printing-help .guide-card { grid-template-columns: minmax(0, 1fr) minmax(250px, .9fr); gap: 14px; padding: 15px; box-shadow: none; }
    html.printing-help .guide-visual { min-height: 190px; }
    html.printing-help .guide-copy h3 { font-size: 15px; }
    html.printing-help .guide-copy p { margin-bottom: 7px; font-size: 9px; line-height: 1.45; }
    html.printing-help .guide-copy .guide-lead { font-size: 9px; }
    html.printing-help .guide-copy ul { font-size: 8px; line-height: 1.45; }
    html.printing-help .guide-steps { gap: 4px; margin-bottom: 8px; }
    html.printing-help .guide-steps li { min-height: 22px; padding: 4px 6px 4px 29px; font-size: 8px; line-height: 1.4; }
    html.printing-help .guide-steps li::before { left: 5px; top: 4px; width: 17px; height: 17px; }
    html.printing-help .guide-copy .guide-note { font-size: 8px; }
    html.printing-help .guide-glossary span { padding: 5px 6px; font-size: 7px; }
    html.printing-help .guide-language-list { columns: 4 120px; font-size: 8px; }
    html.printing-help * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
/* Google TV'nin düşük güçlü WebView'inde uzun sûrelerin ekran dışındaki yüzlerce
   kartını sürekli yerleştirme/çizim hesabına sokma. Kartlar ve bütün işlevleri
   DOM'da kalır; görünür alana yaklaşınca tarayıcı tarafından doğal olarak açılır. */
.speech-television .ayah-card {
    content-visibility: auto;
    contain-intrinsic-size: auto 620px;
}

.speech-television .ayah-card.focused {
    content-visibility: visible;
}

/* Beş Ana Mod: Hıfz ve Cüz-hân çalışma alanlarının cihaz uyumu */
@media (max-width: 900px) {
    .hifz-controls { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .hifz-session-summary { grid-column: 1 / -1; }
    .hifz-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .hifz-actions .primary-action { grid-column: 1 / -1; }
    .juzhan-layout { grid-template-columns: 1fr; }
    .juzhan-lessons { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .juzhan-quiz { grid-template-columns: minmax(90px, .45fr) minmax(0, 1fr); }
    .juzhan-quiz-options { grid-column: 1 / -1; }
    #juzhan-quiz-feedback { grid-column: 1; }
    #juzhan-next-question { grid-column: 2; grid-row: auto; }
}

@media (max-width: 620px) {
    .learning-workspace { padding: 15px 12px; border-radius: 15px; }
    .learning-workspace-heading { align-items: flex-start; }
    .learning-progress-ring { width: 66px; height: 66px; }
    .hifz-stage-flow { justify-content: flex-start; padding-bottom: 4px; overflow-x: auto; scrollbar-width: thin; }
    .hifz-stage-flow span { flex: 0 0 auto; }
    .hifz-controls, .hifz-actions { grid-template-columns: 1fr; }
    .hifz-session-summary, .hifz-actions .primary-action { grid-column: auto; }
    .juzhan-lessons { max-height: none; display: flex; padding-bottom: 5px; overflow-x: auto; overflow-y: hidden; scrollbar-width: thin; }
    .juzhan-track-heading { position: static; flex: 0 0 128px; display: grid; place-items: center; margin: 0; padding: 7px 9px; border: 1px solid color-mix(in srgb, var(--gold) 55%, var(--line)); border-radius: 10px; text-align: center; white-space: normal; }
    .juzhan-lesson-button { flex: 0 0 145px; }
    .juzhan-lesson-area { padding: 12px; }
    .juzhan-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); max-height: 480px; gap: 9px; }
    .juzhan-card { min-height: 126px; }
    .juzhan-card b { font-size: 48px; }
    .juzhan-card > span { font-size: 14px; }
    .juzhan-card small { font-size: 11px; }
    .juzhan-quiz { grid-template-columns: 1fr; text-align: center; }
    .juzhan-quiz-options, #juzhan-quiz-feedback, #juzhan-next-question { grid-column: 1; }
    .guide-learning-modes { grid-template-columns: 1fr; }
}

html.speech-mobile body.app-mode-hifz #practice-panel-toggle,
html.speech-mobile body.app-mode-juzhan #practice-panel-toggle { display: none !important; }

.speech-television .learning-workspace { width: min(100%, 1500px); padding: 24px 28px; }
.speech-television .juzhan-cards { max-height: 520px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 13px; }
.speech-television .juzhan-card { min-height: 156px; }
.speech-television .juzhan-card b { font-size: 64px; }
.speech-television .juzhan-cards[data-juzhan-lesson="0"] .juzhan-card b { font-size: 84px; }
.speech-television .juzhan-cards[data-juzhan-lesson="1"] .juzhan-card b { font-size: 76px; }
.speech-television .juzhan-card > span { font-size: 17px; }
.speech-television .juzhan-card small { font-size: 14px; }
.speech-television .commands-directive-card > summary { min-height: 78px; gap: 14px; }
.speech-television .commands-index-number { min-width: 76px; min-height: 60px; border-width: 3px; }
.speech-television .commands-index-number small { font-size: 10px; }
.speech-television .commands-index-number b { font-size: 22px; }
.speech-television .hifz-actions > button,
.speech-television .juzhan-lesson-button,
.speech-television #juzhan-complete-lesson,
.speech-television #juzhan-next-question { min-height: 52px; font-size: 13px; }
@media (max-width: 760px) {
    .daily-mode-heading-actions { width: 100%; justify-content: space-between; }
    .daily-mode-heading-actions .daily-ayah-define-button { max-width: none; width: auto; }
    .daily-mode-summary { grid-template-columns: 1fr; }
    .daily-mode-repeat-options { grid-template-columns: 1fr; }
    .daily-mode-repeat-options > small { grid-column: auto; }
    .daily-mode-jump-control { grid-column: auto; grid-template-columns: 1fr; }
    .daily-mode-jump-control > small { grid-column: auto; }
    .daily-mode-badge { width: 70px; height: 70px; }
}
