: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;
    --topbar-height: 72px;
}

.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);
}

* { 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; }

.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) auto;
    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 { 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::-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); }
.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; }
.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;
}
.streak { display: flex; align-items: baseline; gap: 4px; padding: 7px 10px; color: var(--gold); }
.streak small { color: var(--muted); }

.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; }

.sidebar-search { height: 40px; margin: 18px 0 12px; padding-right: 5px; gap: 6px; }
.surah-list { flex: 1; overflow-y: auto; padding-right: 4px; scrollbar-width: thin; }
.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: 13px; }
.surah-copy small { margin-top: 2px; color: var(--muted); font-size: 10px; }
.surah-arabic { font: 19px/1 "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 { max-width: 920px; margin: 0 auto 24px; text-align: center; }
.reader-kicker { display: flex; justify-content: center; gap: 7px; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .1em; }
.reader-title-row { display: grid; grid-template-columns: 42px 1fr 42px; align-items: center; gap: 20px; margin-top: 14px; }
.reader-title-row h1 { margin: 0; font-size: clamp(28px, 4vw, 42px); letter-spacing: -.045em; }
.arabic-surah-name { margin: 2px 0 0; color: var(--gold); font: 28px/1.4 "Amiri Quran", serif; }
.round-button { width: 42px; height: 42px; border-radius: 50%; }
.round-button:disabled { opacity: .35; cursor: not-allowed; }

.reader-tools { margin-top: 22px; display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }
.mode-tool-button { border-color: color-mix(in srgb, var(--gold) 62%, var(--line)); background: var(--gold-soft); }
.mode-tool-button strong { color: var(--brand); }
.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-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-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 auto auto; align-items: end; gap: 10px; }
.recitation-select-control, .recitation-speed-control { display: grid; gap: 5px; color: var(--muted); font-size: 9px; font-weight: 750; }
.recitation-select-control select, .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.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.basmala-reciting > span:first-child { color: var(--brand); }

.mode-dialog { width: min(94vw, 760px); }
.mode-dialog form { padding: 24px; }
.mode-options { display: grid; grid-template-columns: repeat(2, 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); }
.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(2, 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; }
.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; }

.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-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) {
    .daily-ayah-dialog { width: calc(100vw - 18px); max-height: calc(100dvh - 18px); }
    .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; }

.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; color: var(--muted); font-size: 11px; }
.ayah-ref { display: flex; align-items: center; gap: 8px; color: var(--brand); font-weight: 700; }
.ayah-badge { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 9px; background: var(--brand-soft); }
.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;
}
.word > span:first-child { direction: rtl; unicode-bidi: isolate; }
.word-arabic { color: var(--ink); }
.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 { display: flex; align-items: baseline; justify-content: center; gap: 4px; max-width: 112px; color: var(--muted); font-size: var(--word-meaning-size); text-align: center; }
.word-meaning + .word-meaning { margin-top: -3px; }
.word-meaning-language { flex: 0 0 auto; min-width: 18px; padding: 1px 3px; border-radius: 999px; color: var(--brand); background: var(--brand-soft); font-size: clamp(7px, calc(var(--word-meaning-size) * .68), 10px); font-weight: 800; line-height: 1.35; letter-spacing: .04em; }
.word-meaning-en .word-meaning-language { color: #775310; background: var(--gold-soft); }
.word-meaning-nl .word-meaning-language { color: #185f75; background: color-mix(in srgb, #2e8ca8 16%, var(--surface)); }
.word-meaning-lat .word-meaning-language { min-width: 25px; color: #735296; background: color-mix(in srgb, #8b6aad 18%, var(--surface)); }
.word-meaning-lat > span:last-child { font-style: italic; }
.word-meaning > span { min-width: 0; overflow-wrap: anywhere; }
.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-text { flex: 1; min-width: 0; margin: 0; color: var(--muted); font: var(--meal-size)/1.75 Georgia, serif; }
.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-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; }
.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(2, 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 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-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-settings-status { min-height: 15px; }
.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; }

#settings-dialog { height: min(94vh, 920px); height: min(94dvh, 920px); }
#settings-dialog form { box-sizing: border-box; height: 100%; display: flex; flex-direction: column; gap: 12px; overflow: hidden; }
#settings-dialog .dialog-heading,
#settings-dialog .reading-settings,
#settings-dialog .dialog-done { flex: 0 0 auto; }
.reading-settings { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding: 10px; 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; }
#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: 1 1 auto; flex-direction: column; }
#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: 130px; max-height: none; flex: 1 1 auto; overscroll-behavior: contain; }
#settings-dialog .meal-settings-status { flex: 0 0 auto; margin: 4px 0 0; }
#settings-dialog .dialog-done { padding: 10px; }

.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-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; }
.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-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 { 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; }
    .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-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-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-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-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; }
.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: 58px; display: flex; align-items: center; justify-content: space-around; border-top: 1px solid var(--line); background: var(--surface); }
.mock-mobile-dock > span { min-width: 40px; color: var(--muted); text-align: center; font-size: 14px; }
.mock-mobile-dock small { display: block; margin-top: 3px; font-size: 6px; }
.mock-mobile-dock .main { width: 46px; height: 46px; display: grid; place-items: center; align-content: center; margin-top: -29px; 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: 42px; padding: 5px 3px; border-radius: 7px; color: var(--muted); text-align: center; font-size: 10px; }
.mock-desktop-dock span.active { color: white; background: var(--brand); }
.mock-desktop-dock small { display: block; margin-top: 2px; font-size: 5px; }
.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: 28px; 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; 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: 3px;
    max-width: calc(100vw - 32px);
    padding: 6px;
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: 16px;
    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: 70px;
    min-height: 46px;
    padding: 5px 8px;
    border: 0;
    border-radius: 10px;
    color: var(--muted);
    background: transparent;
}
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: 17px; line-height: 1; }
html:not(.speech-mobile) .mobile-dock button small { margin-top: 5px; font-size: 8px; font-weight: 700; }
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-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 .topbar {
    grid-template-columns: 140px minmax(460px, 1fr) auto;
    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 .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 {
    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-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) auto;
    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 {
    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-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: 108px; }
html.speech-mobile .mobile-dock {
    position: fixed;
    z-index: 150;
    left: 0;
    right: 0;
    bottom: 0;
    height: calc(70px + env(safe-area-inset-bottom));
    display: flex;
    align-items: flex-start;
    justify-content: space-around;
    padding: 8px 8px env(safe-area-inset-bottom);
    border-top: 1px 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; border: 0; background: transparent; color: var(--muted); }
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: 20px; }
html.speech-mobile .mobile-dock button small { margin-top: 3px; font-size: 9px; }
html.speech-mobile .mobile-dock .dock-mic {
    width: 62px;
    height: 62px;
    min-width: 62px;
    margin-top: -27px;
    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: 13px; }
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(78px + 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(78px + 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 auto auto; }
html.speech-mobile .recitation-play-button { min-height: 48px; }
html.speech-mobile .recitation-select-control select,
html.speech-mobile .recitation-speed-control select,
html.speech-mobile .recitation-ayah-controls button { height: 48px; }

@media (max-width: 760px) {
    .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 { grid-template-columns: 1fr 1fr; }
    .recitation-select-control { grid-column: 1 / -1; }
    .recitation-play-button { justify-content: center; }
    .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: 170px; }
    .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) auto; gap: 16px; }
}

@media (max-width: 760px) {
    :root { --topbar-height: 62px; --arabic-size: 32px; }
    .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 { gap: 8px; padding: 14px; }
    #settings-dialog .dialog-heading h2 { font-size: 18px; }
    .reading-settings { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; 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(2, 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-list { min-height: 110px; max-height: none; }
    #settings-dialog .meal-settings-status { min-height: 12px; font-size: 9px; }
    .meal-language-items { grid-template-columns: 1fr; }
    .settings-dialog:not(#settings-dialog) .meal-settings-list { max-height: min(56vh, 520px); }
    .mobile-only, .mobile-dock { display: flex; }
    .topbar { grid-template-columns: 40px 1fr auto; gap: 10px; padding: 0 12px; }
    .brand small, .quick-search, .streak { display: none; }
    .brand-mark { width: 34px; height: 34px; }
    .topbar-actions { gap: 3px; }
    .topbar-command-button,
    #theme-button { width: 36px; height: 36px; border-radius: 9px; font-size: 17px; }
    .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);
    }
    .sidebar.open { transform: translateX(0); }
    .scrim { position: fixed; z-index: 210; inset: 0; background: rgba(10,20,17,.5); }
    .reader { padding: 24px 12px 108px; }
    .reader-title-row { grid-template-columns: 34px 1fr 34px; gap: 8px; }
    .round-button { width: 34px; height: 34px; }
    .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-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; }
    .arabic-words { margin-top: 14px; }
    .word { padding-inline: 4px; min-width: 35px; }
    .word-meaning { max-width: 88px; font-size: var(--word-meaning-size); }
    .mobile-dock {
        position: fixed;
        z-index: 150;
        left: 0;
        right: 0;
        bottom: 0;
        height: calc(70px + env(safe-area-inset-bottom));
        align-items: flex-start;
        justify-content: space-around;
        padding: 8px 8px env(safe-area-inset-bottom);
        border-top: 1px solid var(--line);
        background: color-mix(in srgb, var(--surface) 94%, transparent);
        backdrop-filter: blur(18px);
    }
    .mobile-dock button { min-width: 50px; border: 0; background: transparent; color: var(--muted); }
    .mobile-dock button span, .mobile-dock button small { display: block; margin: auto; }
    .mobile-dock button span { font-size: 20px; }
    .mobile-dock button small { margin-top: 3px; font-size: 9px; }
    .mobile-dock .dock-mic { width: 54px; height: 54px; min-width: 54px; margin-top: -23px; 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: 13px; }
    .mobile-listening-status {
        position: fixed;
        z-index: 149;
        right: 14px;
        bottom: calc(78px + 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: 88px; }
    .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; }
}

@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; }
}
