@font-face {
  font-family: "Noto Naskh Arabic";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("fonts/noto-naskh-arabic.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+FB50-FDFF, U+FE70-FEFC;
}

@font-face {
  font-family: "Figtree";
  font-style: normal;
  font-weight: 300 900;
  font-display: swap;
  src: url("fonts/figtree-variable.ttf") format("truetype");
}

@font-face {
  font-family: "Plus Jakarta Sans";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("fonts/plus-jakarta-sans-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02FF, U+1E00-1E9F, U+2020, U+20A0-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Plus Jakarta Sans";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("fonts/plus-jakarta-sans-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: light;
  --ink: #171411;
  --ink-soft: #6d655e;
  --paper: #ffffff;
  --surface: #ffffff;
  --surface-soft: #ffffff;
  --forest: #08783f;
  --forest-deep: #055f32;
  --forest-soft: #edf7f1;
  --gold: #08783f;
  --gold-light: #d4eadc;
  --line: #e7e1db;
  --line-strong: #d8cec4;
  --notice-brown: #08783f;
  --notice-bg: #f1f8f4;
  --danger: #9a372e;
  --shadow-sm: 0 12px 35px rgba(8, 120, 63, .07);
  --shadow-lg: 0 30px 80px rgba(8, 120, 63, .12);
  --radius-sm: 12px;
  --radius-md: 20px;
  --radius-lg: 32px;
  --shell: 1180px;
  --arabic-size: 2.875rem;
  --transition-fast: 160ms cubic-bezier(.2, 0, 0, 1);
  --transition: 200ms cubic-bezier(.2, 0, 0, 1);
  --transition-slow: 400ms cubic-bezier(.2, 0, 0, 1);
}

html[data-theme="kitab"] {
  color-scheme: light;
  --ink: #1b1812;
  --ink-soft: #625a49;
  --paper: #f4edd6;
  --surface: #fbf7e9;
  --surface-soft: #ece0bd;
  --forest: #59451c;
  --forest-deep: #2c2211;
  --forest-soft: #e5d5a8;
  --gold: #9b7528;
  --gold-light: #d8bb72;
  --line: #dac99a;
  --line-strong: #bda465;
  --notice-brown: #7c581d;
  --notice-bg: #efe0b6;
  --danger: #94392f;
  --shadow-sm: 0 12px 35px rgba(77, 57, 22, .09);
  --shadow-lg: 0 30px 80px rgba(77, 57, 22, .14);
}

html[data-theme="kitab"] body {
  background-color: var(--paper);
  background-image:
    radial-gradient(circle at 15% 5%, rgba(255, 255, 255, .38), transparent 31%),
    radial-gradient(circle at 86% 38%, rgba(154, 111, 35, .035), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, .11), rgba(164, 120, 39, .018));
}

html[data-theme="night"] {
  color-scheme: dark;
  --ink: #e8e5de;
  --ink-soft: #aaa69d;
  --paper: #10100f;
  --surface: #181816;
  --surface-soft: #201f1c;
  --forest: #78d8a1;
  --forest-deep: #9ce7bc;
  --forest-soft: #173326;
  --gold: #78d8a1;
  --gold-light: #a9ebc5;
  --line: #34322e;
  --line-strong: #4a4741;
  --notice-brown: #8ee2b2;
  --notice-bg: #17281f;
  --danger: #ff9188;
  --shadow-sm: 0 12px 35px rgba(0, 0, 0, .48);
  --shadow-lg: 0 30px 80px rgba(0, 0, 0, .72);
}

html[data-theme="night"] body {
  color: var(--ink);
  background: var(--paper);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "Figtree", "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  font-weight: 400;
  font-optical-sizing: auto;
  font-kerning: normal;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
svg { width: 1.25rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.desktop-nav a,
.search-result,
.popular-card,
.surah-card,
.continue-reading,
.continue-reading-button,
.segmented-control button,
.toolbar-button,
.verse-action,
.chapter-link,
.reader-neighbour,
.reader-settings-button,
.reader-selectors select,
.source-toc a,
.footer-links a {
  transition:
    color var(--transition-fast),
    background-color var(--transition-fast),
    border-color var(--transition-fast),
    box-shadow var(--transition),
    transform var(--transition-fast),
    opacity var(--transition-fast);
}

button:active,
.continue-reading:active,
.surah-card:active,
.popular-card:active,
.chapter-link:active,
.reader-neighbour:active {
  transform: translateY(1px);
}

:focus-visible {
  outline: 3px solid var(--notice-brown);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  z-index: 999;
  top: 12px;
  left: 12px;
  padding: 10px 16px;
  color: #fff;
  background: var(--forest-deep);
  border-radius: 8px;
  transform: translateY(-160%);
}

.skip-link:focus { transform: translateY(0); }
.shell { width: min(calc(100% - 48px), var(--shell)); margin-inline: auto; }
.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; }

.site-header {
  position: sticky;
  z-index: 100;
  top: 0;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}

.header-inner { min-height: 78px; display: flex; align-items: center; gap: 30px; }
.brand { display: inline-flex; align-items: center; gap: 12px; min-width: max-content; }
.brand-mark { display: grid; width: 44px; aspect-ratio: 1; place-items: center; border: 1px solid color-mix(in srgb, var(--gold) 64%, transparent); border-radius: 50%; color: var(--gold); background: color-mix(in srgb, var(--gold) 7%, transparent); font-family: "Noto Naskh Arabic", serif; font-size: 24px; line-height: 1; }
.brand-kahmi-mark { display: block; width: 44px; height: 44px; overflow: hidden; flex: 0 0 44px; border-radius: 9px; background: #fff; box-shadow: 0 0 0 1px var(--line); }
.brand-kahmi-mark img { width: 194px; max-width: none; height: 44px; object-fit: cover; object-position: left center; }
.brand-copy { display: grid; line-height: 1.2; }
.brand-copy strong { font-size: .93rem; letter-spacing: -.025em; }
.brand-copy small { margin-top: 4px; color: var(--ink-soft); font-size: .75rem; font-weight: 400; letter-spacing: .01em; }
.desktop-nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.desktop-nav a { position: relative; padding: 11px 15px; color: var(--ink-soft); font-size: .84rem; font-weight: 700; }
.desktop-nav a:hover, .desktop-nav a.is-active { color: var(--ink); }
.desktop-nav a.is-active::after { position: absolute; right: 15px; bottom: 5px; left: 15px; height: 2px; content: ""; background: var(--gold); }
.icon-button { display: grid; width: 44px; height: 44px; padding: 0; place-items: center; color: var(--ink); border: 1px solid var(--line); border-radius: 50%; background: var(--surface); cursor: pointer; transition: color var(--transition-fast), background-color var(--transition-fast), border-color var(--transition-fast), transform var(--transition-fast); }
.icon-button:hover { border-color: var(--gold); transform: translateY(-1px); }
.theme-picker { position: relative; }
.theme-menu { position: absolute; z-index: 140; top: calc(100% + 10px); right: 0; width: 180px; overflow: hidden; padding: 6px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: var(--shadow-lg); }
.theme-menu button { display: flex; width: 100%; min-height: 44px; align-items: center; gap: 10px; padding: 0 12px; color: var(--ink-soft); border: 0; border-radius: 9px; background: transparent; cursor: pointer; font-size: .8rem; font-weight: 700; text-align: left; }
.theme-menu button::before { width: 8px; height: 8px; flex: 0 0 auto; content: ""; border: 1px solid var(--line-strong); border-radius: 50%; }
.theme-menu button:hover { color: var(--ink); background: var(--surface-soft); }
.theme-menu button.is-active { color: var(--ink); background: color-mix(in srgb, var(--gold) 10%, var(--surface)); }
.theme-menu button.is-active::before { border-color: var(--gold); background: var(--gold); box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold) 14%, transparent); }
.app-toast { position: fixed; z-index: 300; bottom: 24px; left: 50%; min-width: 180px; max-width: calc(100% - 32px); padding: 12px 18px; color: #fff; border: 1px solid rgba(255, 255, 255, .15); border-radius: 999px; background: #171411; box-shadow: 0 14px 40px rgba(0, 0, 0, .24); opacity: 0; transform: translate(-50%, 12px); transition: opacity 180ms ease, transform 180ms ease; font-size: .82rem; font-weight: 700; text-align: center; }
.app-toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

.home-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(76px, 9vw, 126px) 0 clamp(80px, 10vw, 140px);
  background:
    radial-gradient(circle at 84% 5%, color-mix(in srgb, var(--gold) 15%, transparent), transparent 28%),
    linear-gradient(180deg, color-mix(in srgb, var(--forest-soft) 42%, var(--paper)), var(--paper));
}

.home-hero::before { position: absolute; top: 0; right: max(-160px, calc((100vw - var(--shell)) / 2 - 330px)); width: 600px; height: 600px; content: ""; opacity: .12; border: 1px solid var(--gold); border-radius: 50%; box-shadow: inset 0 0 0 90px transparent, inset 0 0 0 91px var(--gold), inset 0 0 0 180px transparent, inset 0 0 0 181px var(--gold); pointer-events: none; }
.hero-grid { position: relative; display: grid; grid-template-columns: minmax(0, 1.16fr) minmax(360px, .84fr); gap: clamp(50px, 8vw, 112px); align-items: center; }
.eyebrow { display: flex; align-items: center; gap: 10px; margin: 0 0 20px; color: var(--forest); font-size: .7rem; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.eyebrow span { width: 24px; height: 1px; background: var(--gold); }
.hero-copy h1, .section-heading h2, .trust-section h2, .reader-title h1, .source-hero h1 { margin: 0; font-size: clamp(2.75rem, 5.8vw, 5.2rem); line-height: 1.02; letter-spacing: -.062em; }
.hero-copy h1 em { color: var(--forest); font-family: Georgia, "Times New Roman", serif; font-weight: 400; }
.hero-lead { max-width: 680px; margin: 28px 0 30px; color: var(--ink-soft); font-size: clamp(1rem, 1.35vw, 1.14rem); line-height: 1.8; }

.quran-search { display: flex; max-width: 610px; min-height: 60px; align-items: center; gap: 13px; padding: 0 18px; border: 1px solid var(--line-strong); border-radius: 16px; background: var(--surface); box-shadow: var(--shadow-sm); transition: border var(--transition), box-shadow var(--transition); }
.quran-search:focus-within { border-color: var(--gold); box-shadow: 0 0 0 4px color-mix(in srgb, var(--gold) 15%, transparent), var(--shadow-sm); }
.quran-search svg, .filter-field svg { color: var(--forest); }
.quran-search input, .filter-field input { min-width: 0; flex: 1; color: var(--ink); border: 0; outline: 0; background: transparent; }
.quran-search input::placeholder, .filter-field input::placeholder { color: color-mix(in srgb, var(--ink-soft) 76%, transparent); }
.quran-search kbd { padding: 2px 8px; color: var(--ink-soft); border: 1px solid var(--line); border-radius: 6px; background: var(--surface-soft); font-size: .72rem; }
.search-results { position: absolute; z-index: 20; width: min(610px, 100%); max-height: 330px; margin-top: 8px; overflow: auto; padding: 8px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); box-shadow: var(--shadow-lg); }
.search-result { display: grid; grid-template-columns: 34px 1fr auto; gap: 12px; align-items: center; padding: 11px 12px; border-radius: 10px; }
.search-result:hover, .search-result:focus-visible { background: var(--surface-soft); }
.search-result .number { color: var(--gold); font-size: .74rem; font-weight: 800; }
.search-result strong { font-size: .88rem; }
.search-result small { color: var(--ink-soft); font-size: .72rem; }
.search-result .arabic-mini { font-family: "Noto Naskh Arabic", serif; font-size: 1.15rem; }

.hero-actions { display: flex; align-items: center; gap: 24px; margin-top: 26px; }
.button { display: inline-flex; min-height: 48px; align-items: center; justify-content: center; gap: 10px; padding: 0 20px; border: 1px solid transparent; border-radius: 12px; font-size: .82rem; font-weight: 800; transition: transform var(--transition), background var(--transition), border var(--transition); }
.button:hover { transform: translateY(-2px); }
.button svg { width: 16px; }
.button-primary { color: #fff; background: var(--forest-deep); box-shadow: 0 12px 25px rgba(9, 43, 36, .18); }
html[data-theme="kitab"] .button-primary { color: #24180d; background: var(--gold-light); }
.button-light { color: var(--forest-deep); background: #f7f2e6; }
.text-link { padding: 8px 0; border-bottom: 1px solid var(--line-strong); font-size: .82rem; font-weight: 800; }

.continue-card { position: relative; overflow: hidden; padding: clamp(30px, 4vw, 46px); color: #f4f8f6; border: 1px solid rgba(255, 255, 255, .1); border-radius: var(--radius-lg); background: linear-gradient(145deg, #174d40, #092b24); box-shadow: var(--shadow-lg); }
.continue-ornament { position: absolute; top: -110px; right: -95px; width: 270px; height: 270px; opacity: .24; border: 1px solid var(--gold-light); border-radius: 50%; box-shadow: inset 0 0 0 42px transparent, inset 0 0 0 43px var(--gold-light), inset 0 0 0 84px transparent, inset 0 0 0 85px var(--gold-light); }
.continue-topline { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 14px; color: rgba(255, 255, 255, .66); font-size: .64rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.source-chip { padding: 6px 9px; color: var(--gold-light); border: 1px solid rgba(229, 202, 138, .3); border-radius: 999px; letter-spacing: .03em; text-transform: none; }
.arabic-display { position: relative; margin: 56px 0 42px; font-family: "Noto Naskh Arabic", serif; font-size: clamp(2.25rem, 4.5vw, 3.8rem); font-weight: 500; line-height: 1.8; text-align: center; }
.continue-card h2 { margin: 0; font-size: 1.8rem; letter-spacing: -.04em; }
.continue-card > p:not(.arabic-display, .translation-preview) { margin: 4px 0 0; color: rgba(255, 255, 255, .62); font-size: .8rem; }
.continue-divider { height: 1px; margin: 24px 0 20px; background: rgba(255, 255, 255, .12); }
.translation-preview { margin: 0; color: rgba(255, 255, 255, .78); font-family: Georgia, serif; font-size: 1rem; line-height: 1.7; }
.continue-link { display: flex; align-items: center; justify-content: space-between; margin-top: 28px; padding-top: 17px; color: var(--gold-light); border-top: 1px solid rgba(229, 202, 138, .24); font-size: .78rem; font-weight: 800; }

.quick-section, .surah-section { padding: clamp(82px, 9vw, 128px) 0; }
.quick-section { background: var(--surface); }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 50px; margin-bottom: 42px; }
.section-heading h2, .trust-section h2, .source-hero h1 { max-width: 760px; font-size: clamp(2.15rem, 4vw, 3.8rem); }
.section-heading > p { max-width: 480px; margin: 0; color: var(--ink-soft); font-size: .92rem; line-height: 1.8; }
.popular-grid { display: grid; grid-template-columns: repeat(6, 1fr); border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--line); gap: 1px; overflow: hidden; }
.popular-card { min-height: 180px; padding: 22px; background: var(--surface); transition: background var(--transition), transform var(--transition); }
.popular-card:hover { position: relative; z-index: 1; background: var(--surface-soft); box-shadow: 0 0 0 1px var(--gold); }
.popular-card .popular-number { display: flex; align-items: center; justify-content: space-between; color: var(--ink-soft); font-size: .67rem; font-weight: 800; }
.popular-card .popular-arrow { color: var(--gold); font-size: 1rem; }
.popular-card .arabic-name { display: block; margin: 26px 0 14px; color: var(--forest); font-family: "Noto Naskh Arabic", serif; font-size: 1.7rem; line-height: 1; }
.popular-card strong { display: block; font-size: .88rem; }
.popular-card small { color: var(--ink-soft); font-size: .68rem; }

.surah-section { border-top: 1px solid var(--line); background: var(--paper); }
.surah-tools { display: flex; align-items: center; gap: 12px; }
.filter-field { display: flex; min-width: 240px; height: 44px; align-items: center; gap: 10px; padding: 0 13px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.filter-field svg { width: 16px; }
.segmented-control { display: flex; padding: 3px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.segmented-control button { min-height: 44px; padding: 0 14px; color: var(--ink-soft); border: 0; border-radius: 7px; background: transparent; cursor: pointer; font-size: .82rem; font-weight: 600; }
.segmented-control button.is-active { color: #fff; background: var(--forest-deep); }
.result-count { margin: -22px 0 20px; color: var(--ink-soft); font-size: .74rem; }
.surah-grid { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.surah-card { display: grid; grid-template-columns: 42px 1fr auto; min-height: 112px; gap: 16px; align-items: center; padding: 20px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--surface); transition: background var(--transition); }
.surah-card:hover { background: var(--surface-soft); }
.surah-number { display: grid; width: 38px; height: 38px; place-items: center; color: var(--forest); border: 1px solid var(--line-strong); border-radius: 50%; font-size: .68rem; font-weight: 800; }
.surah-meta { min-width: 0; }
.surah-meta strong { display: block; overflow: hidden; font-size: .86rem; text-overflow: ellipsis; white-space: nowrap; }
.surah-meta small { color: var(--ink-soft); font-size: .68rem; }
.surah-arabic { color: var(--forest); font-family: "Noto Naskh Arabic", serif; font-size: 1.42rem; }
.empty-state { padding: 36px; text-align: center; color: var(--ink-soft); border: 1px solid var(--line); background: var(--surface); }

.trust-section { padding: clamp(84px, 10vw, 140px) 0; color: #f2f6f4; background: var(--forest-deep); }
.trust-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 62px 100px; }
.eyebrow-light { color: var(--gold-light); }
.trust-copy p { max-width: 570px; margin: 2px 0 26px; color: rgba(255, 255, 255, .68); font-size: .96rem; line-height: 1.9; }
.trust-stat { display: grid; padding-top: 22px; border-top: 1px solid rgba(255, 255, 255, .14); }
.trust-stat:nth-of-type(3) { grid-column: span 1; }
.trust-grid { grid-template-columns: repeat(3, 1fr); }
.trust-grid > div:first-child { grid-column: 1 / 2; }
.trust-copy { grid-column: 2 / 4; }
.trust-stat strong { color: var(--gold-light); font-family: Georgia, serif; font-size: 2.35rem; font-weight: 400; }
.trust-stat span { color: rgba(255, 255, 255, .55); font-size: .72rem; }

/* Ayat tersimpan */
.bookmarks-main { min-height: calc(100vh - 144px); background: var(--paper); }
.bookmarks-hero { padding: clamp(70px, 9vw, 120px) 0 clamp(52px, 7vw, 84px); border-bottom: 1px solid var(--line); background: linear-gradient(180deg, color-mix(in srgb, var(--forest-soft) 44%, var(--paper)), var(--paper)); }
.bookmarks-hero-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(280px, .75fr); gap: clamp(50px, 8vw, 110px); align-items: end; }
.bookmarks-hero h1 { margin: 0; max-width: 780px; font-size: clamp(2.6rem, 5vw, 4.8rem); line-height: 1.02; letter-spacing: -.06em; }
.bookmarks-hero-grid > div:last-child { padding-bottom: 5px; }
.bookmarks-hero-grid > div:last-child p { margin: 0 0 22px; color: var(--ink-soft); line-height: 1.8; }
.bookmarks-hero-grid > div:last-child strong { color: var(--notice-brown); font-size: .78rem; }
.bookmarks-content { padding: clamp(54px, 7vw, 92px) 0 110px; }
.bookmark-list { display: grid; gap: 18px; }
.bookmark-card { padding: clamp(24px, 4vw, 42px); border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); box-shadow: var(--shadow-sm); }
.bookmark-card-heading { display: flex; align-items: start; justify-content: space-between; gap: 22px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.bookmark-card-heading a { display: grid; }
.bookmark-card-heading a span { color: var(--notice-brown); font-size: .67rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.bookmark-card-heading a strong { margin-top: 3px; font-size: 1rem; }
.bookmark-remove { display: inline-flex; min-height: 44px; align-items: center; gap: 8px; padding: 0 13px; color: var(--ink-soft); border: 1px solid var(--line); border-radius: 10px; background: var(--surface); cursor: pointer; font-size: .76rem; font-weight: 700; }
.bookmark-remove:hover { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 40%, var(--line)); }
.bookmark-remove svg { width: 17px; }
.bookmark-arabic { margin: 28px 0 20px; font-family: "Noto Naskh Arabic", serif; font-size: clamp(2rem, 4vw, 3rem); line-height: 2; text-align: right; }
.bookmark-translation { max-width: 900px; margin: 0; color: var(--ink-soft); font-size: 1.04rem; line-height: 1.82; }
.bookmark-open { display: inline-block; margin-top: 24px; color: var(--notice-brown); border-bottom: 1px solid color-mix(in srgb, var(--notice-brown) 45%, transparent); font-size: .8rem; font-weight: 800; }
.bookmark-empty { padding: clamp(46px, 8vw, 90px) 24px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); text-align: center; }
.bookmark-empty > span { display: block; color: var(--notice-brown); font-size: 2.4rem; }
.bookmark-empty h2 { margin: 12px 0 6px; font-size: 1.6rem; }
.bookmark-empty p { margin: 0 0 22px; color: var(--ink-soft); }

.site-footer { color: #e6eeea; background: #061b16; }
.footer-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 90px; padding: 78px 0 64px; }
.brand-footer .brand-copy small { color: rgba(255, 255, 255, .48); }
.footer-brand > p { max-width: 500px; margin: 22px 0 0; color: rgba(255, 255, 255, .52); font-size: .82rem; line-height: 1.85; }
.footer-links { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.footer-links > div { display: grid; align-content: start; gap: 9px; }
.footer-links strong { margin-bottom: 7px; color: var(--gold-light); font-size: .68rem; letter-spacing: .11em; text-transform: uppercase; }
.footer-links a { color: rgba(255, 255, 255, .66); font-size: .78rem; }
.footer-links a:hover { color: #fff; }
.footer-bottom { display: flex; min-height: 66px; align-items: center; justify-content: space-between; color: rgba(230, 238, 234, .72); border-top: 1px solid rgba(255, 255, 255, .1); font-size: .66rem; }
.footer-credit-link { color: #f4faf7; font-weight: 700; text-decoration: underline; text-decoration-color: rgba(244, 250, 247, .42); text-underline-offset: 3px; transition: color var(--transition-fast), text-decoration-color var(--transition-fast); }
.footer-credit-link:hover, .footer-credit-link:focus-visible { color: #fff; text-decoration-color: currentColor; }

/* Reader */
.reader-page { background: var(--surface-soft); }
.reader-main { padding: 36px 0 100px; }
.breadcrumb { display: flex; align-items: center; gap: 9px; margin-bottom: 22px; color: var(--ink-soft); font-size: .72rem; }
.breadcrumb span { opacity: .55; }
.reader-hero { position: relative; overflow: hidden; padding: clamp(32px, 5vw, 56px); color: #f4f7f5; border-radius: var(--radius-lg); background: linear-gradient(135deg, #174d40, #092b24); box-shadow: var(--shadow-lg); }
.reader-hero::after { position: absolute; top: -180px; right: -90px; width: 430px; height: 430px; content: ""; opacity: .18; border: 1px solid var(--gold-light); border-radius: 50%; box-shadow: inset 0 0 0 70px transparent, inset 0 0 0 71px var(--gold-light), inset 0 0 0 140px transparent, inset 0 0 0 141px var(--gold-light); }
.reader-title { position: relative; z-index: 1; display: flex; align-items: end; justify-content: space-between; gap: 40px; }
.reader-kicker { margin: 0 0 12px; color: var(--gold-light); font-size: .67rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.reader-title h1 { font-size: clamp(2.6rem, 6vw, 5rem); }
.reader-subtitle { margin: 13px 0 0; color: rgba(255, 255, 255, .62); font-size: .78rem; }
.reader-arabic-title { margin: 0; font-family: "Noto Naskh Arabic", serif; font-size: clamp(3rem, 6vw, 5rem); font-weight: 500; line-height: 1.15; }
.reader-toolbar { position: sticky; z-index: 60; top: 92px; display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 22px 0; padding: 10px 12px 10px 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: var(--shadow-sm); }
.reader-toolbar p { margin: 0; color: var(--ink-soft); font-size: .7rem; }
.toolbar-actions { display: flex; gap: 7px; }
.toolbar-button { display: inline-flex; min-height: 38px; align-items: center; gap: 7px; padding: 0 11px; color: var(--ink); border: 1px solid var(--line); border-radius: 9px; background: var(--surface); cursor: pointer; font-size: .68rem; font-weight: 700; }
.toolbar-button:hover { border-color: var(--gold); }
.toolbar-button svg { width: 15px; }
.bismillah { padding: 42px 20px 30px; color: var(--forest); font-family: "Noto Naskh Arabic", serif; font-size: clamp(2rem, 4vw, 3.4rem); text-align: center; }
.verse-list { display: grid; gap: 14px; }
.verse-card { scroll-margin-top: 168px; padding: clamp(24px, 4vw, 42px); border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); transition: border var(--transition), box-shadow var(--transition); }
.verse-card:target { border-color: var(--gold); box-shadow: 0 0 0 4px color-mix(in srgb, var(--gold) 14%, transparent); }
.verse-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.verse-number { display: inline-grid; min-width: 42px; height: 42px; place-items: center; color: var(--forest); border: 1px solid var(--line-strong); border-radius: 50%; font-size: .68rem; font-weight: 800; }
.verse-actions { display: flex; gap: 7px; }
.verse-action { display: grid; width: 38px; height: 38px; padding: 0; place-items: center; color: var(--ink-soft); border: 1px solid var(--line); border-radius: 50%; background: var(--surface-soft); cursor: pointer; }
.verse-action:hover, .verse-action.is-saved { color: var(--forest); border-color: var(--gold); }
.verse-action svg { width: 15px; }
.verse-arabic { margin: clamp(30px, 5vw, 52px) 0 30px; font-family: "Noto Naskh Arabic", serif; font-size: var(--arabic-size); font-weight: 500; line-height: 2.05; text-align: right; }
.verse-translation { max-width: 850px; margin: 0; color: var(--ink-soft); font-size: .95rem; line-height: 1.9; }
.hide-translation .verse-translation, .hide-translation .footnote-list { display: none; }
.footnote-list { margin: 18px 0 0; padding-top: 16px; border-top: 1px solid var(--line); }
.footnote-list summary { color: var(--forest); cursor: pointer; font-size: .7rem; font-weight: 800; }
.footnote-list ol { margin: 12px 0 0; padding-left: 20px; color: var(--ink-soft); font-size: .78rem; }
.reader-pagination { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 24px; }
.chapter-link { display: flex; min-height: 92px; align-items: center; justify-content: space-between; gap: 18px; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); }
.chapter-link:hover { border-color: var(--gold); }
.chapter-link small { display: block; color: var(--ink-soft); font-size: .65rem; }
.chapter-link strong { font-size: .84rem; }
.chapter-link .arabic-name { color: var(--forest); font-family: "Noto Naskh Arabic", serif; font-size: 1.35rem; }
.reader-status { padding: 14px 18px; color: #705317; border: 1px solid #e5cc8d; border-radius: 12px; background: #fff8e7; font-size: .72rem; }
html[data-theme="kitab"] .reader-status { color: var(--notice-brown); border-color: var(--line-strong); background: var(--notice-bg); }

.settings-panel { position: fixed; z-index: 300; inset: 0; display: grid; justify-items: end; opacity: 0; background: rgba(2, 16, 13, .46); transition: opacity var(--transition); }
.settings-panel[hidden] { display: none; }
.settings-panel.is-open { opacity: 1; }
.settings-sheet { width: min(420px, 100%); height: 100%; padding: 28px; overflow: auto; background: var(--surface); box-shadow: -20px 0 60px rgba(0, 0, 0, .18); transform: translateX(100%); transition: transform var(--transition-slow); }
.settings-panel.is-open .settings-sheet { transform: translateX(0); }
.settings-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 34px; }
.settings-header h2 { margin: 0; font-size: 1.3rem; }
.setting-group { padding: 22px 0; border-top: 1px solid var(--line); }
.setting-group > label, .setting-label { display: block; margin-bottom: 13px; font-size: .75rem; font-weight: 800; }
.setting-section-label { padding: 24px 0 10px; color: var(--notice-brown); font-size: .65rem; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.range-row { display: flex; align-items: center; gap: 15px; }
.range-row input { width: 100%; accent-color: var(--forest); }
.range-row span { color: var(--ink-soft); font-family: "Noto Naskh Arabic", serif; }
.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.switch { position: relative; width: 46px; height: 26px; flex: 0 0 auto; }
.switch input { position: absolute; opacity: 0; }
.switch span { position: absolute; inset: 0; border-radius: 99px; background: var(--line-strong); transition: background var(--transition); }
.switch span::after { position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; content: ""; border-radius: 50%; background: #fff; transition: transform var(--transition); }
.switch input:checked + span { background: var(--forest); }
.switch input:checked + span::after { transform: translateX(20px); }
.switch input:disabled + span { background: var(--line); cursor: not-allowed; }
.setting-unavailable .setting-label::after { display: inline-block; padding: 2px 6px; margin-left: 7px; color: var(--ink-soft); border: 1px solid var(--line); border-radius: 999px; content: "Belum tersedia"; font-size: .52rem; font-weight: 700; vertical-align: 1px; }
.language-options { display: flex; flex-wrap: wrap; gap: 7px; }
.language-options button { min-width: 44px; min-height: 44px; padding: 0 12px; color: var(--ink-soft); border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface); cursor: pointer; font-size: .72rem; font-weight: 750; }
.language-options button[aria-pressed="true"] { color: #fff; border-color: var(--notice-brown); background: var(--notice-brown); }
html[data-theme="kitab"] .language-options button[aria-pressed="true"] { color: #24180d; }
.language-options button:disabled { opacity: .48; cursor: not-allowed; }
.setting-select { width: 100%; min-height: 48px; padding: 0 38px 0 13px; color: var(--ink-soft); border: 1px solid var(--line); border-radius: 10px; background: var(--surface-soft); }
.setting-select:disabled { opacity: .72; cursor: not-allowed; }

/* Sources */
.source-main { padding-bottom: 110px; }
.source-hero { padding: clamp(72px, 9vw, 125px) 0 72px; border-bottom: 1px solid var(--line); background: linear-gradient(180deg, var(--forest-soft), var(--paper)); }
.source-hero p:not(.eyebrow) { max-width: 720px; margin: 24px 0 0; color: var(--ink-soft); font-size: 1rem; line-height: 1.85; }
.source-content { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 70px; padding-top: 70px; }
.source-toc { position: sticky; top: 110px; align-self: start; display: grid; gap: 7px; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); }
.source-toc strong { margin-bottom: 6px; font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; }
.source-toc a { color: var(--ink-soft); font-size: .75rem; }
.source-toc a:hover { color: var(--forest); }
.source-article { min-width: 0; }
.source-block { scroll-margin-top: 110px; padding: 0 0 55px; margin-bottom: 55px; border-bottom: 1px solid var(--line); }
.source-block:last-child { border-bottom: 0; }
.source-block h2 { margin: 0 0 18px; font-size: clamp(1.7rem, 3vw, 2.5rem); letter-spacing: -.04em; }
.source-block p, .source-block li { color: var(--ink-soft); font-size: .9rem; line-height: 1.85; }
.source-table { width: 100%; border-collapse: collapse; margin-top: 24px; background: var(--surface); }
.source-table th, .source-table td { padding: 16px; text-align: left; vertical-align: top; border: 1px solid var(--line); font-size: .74rem; }
.source-table th { color: var(--forest); background: var(--surface-soft); }
.checksum { overflow-wrap: anywhere; font-family: ui-monospace, monospace; font-size: .68rem; }

@media (max-width: 1080px) {
  .hero-grid { grid-template-columns: 1fr .82fr; gap: 45px; }
  .popular-grid { grid-template-columns: repeat(3, 1fr); }
  .surah-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 820px) {
  .shell { width: min(calc(100% - 32px), var(--shell)); }
  .desktop-nav { display: none; }
  .theme-toggle { margin-left: auto; }
  .home-hero { padding-top: 70px; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-copy h1 { font-size: clamp(2.75rem, 11vw, 4.6rem); }
  .continue-card { max-width: 580px; }
  .section-heading { display: grid; align-items: start; }
  .surah-tools { flex-wrap: wrap; }
  .filter-field { flex: 1 1 100%; }
  .trust-grid { grid-template-columns: 1fr 1fr; gap: 45px 30px; }
  .trust-grid > div:first-child, .trust-copy { grid-column: 1 / -1; }
  .trust-stat:last-child { grid-column: 1 / -1; }
  .footer-grid { grid-template-columns: 1fr; gap: 50px; }
  .source-content { grid-template-columns: 1fr; }
  .source-toc { position: static; }
  .reader-toolbar { top: 88px; }
}

@media (max-width: 580px) {
  .shell { width: min(calc(100% - 24px), var(--shell)); }
  .header-inner { min-height: 70px; }
  .brand-mark { width: 39px; }
  .brand-kahmi-mark { width: 39px; height: 39px; flex-basis: 39px; border-radius: 8px; }
  .brand-kahmi-mark img { width: 172px; height: 39px; }
  .brand-copy strong { font-size: .82rem; }
  .brand-copy small { font-size: .58rem; }
  .hero-copy h1 { letter-spacing: -.055em; }
  .hero-actions { align-items: flex-start; flex-direction: column; gap: 13px; }
  .quran-search { min-height: 56px; }
  .quran-search kbd { display: none; }
  .continue-card { padding: 27px; border-radius: 24px; }
  .continue-topline { align-items: flex-start; flex-direction: column; }
  .arabic-display { margin: 38px 0 32px; font-size: 2.45rem; }
  .popular-grid { grid-template-columns: repeat(2, 1fr); }
  .popular-card { min-height: 162px; padding: 18px; }
  .surah-tools { display: grid; width: 100%; }
  .segmented-control { width: 100%; }
  .segmented-control button { flex: 1; }
  .surah-grid { grid-template-columns: 1fr; }
  .surah-card { min-height: 98px; }
  .trust-grid { grid-template-columns: 1fr; }
  .trust-stat, .trust-stat:last-child { grid-column: 1; }
  .footer-links { gap: 24px; }
  .footer-bottom { align-items: flex-start; flex-direction: column; justify-content: center; gap: 3px; }
  .reader-main { padding-top: 20px; }
  .reader-hero { padding: 26px 22px; border-radius: 22px; }
  .reader-title { align-items: flex-start; flex-direction: column-reverse; gap: 24px; }
  .reader-arabic-title { font-size: 3.5rem; }
  .reader-toolbar { top: 79px; align-items: flex-start; flex-direction: column; padding: 11px; }
  .reader-toolbar p { padding-left: 4px; }
  .toolbar-actions { width: 100%; }
  .toolbar-button { flex: 1; justify-content: center; }
  .verse-card { padding: 22px 18px; border-radius: 16px; }
  .verse-arabic { font-size: min(var(--arabic-size), 2.35rem); line-height: 1.95; }
  .reader-pagination { grid-template-columns: 1fr; }
  .settings-sheet { padding: 22px; }
  .source-hero { padding-top: 64px; }
  .source-content { padding-top: 45px; }
  .source-table { display: block; overflow-x: auto; }
}

/* Quran application redesign — reading-first, Manbaul Huda identity */
.quran-app-home { background: var(--surface); }
.quran-app-home .app-header { background: color-mix(in srgb, var(--surface) 94%, transparent); }
.quran-directory { min-height: 80vh; }
.directory-intro { padding: 56px 0 46px; border-bottom: 1px solid var(--line); background: var(--surface); }
.directory-intro-grid { display: grid; grid-template-columns: minmax(0, 1fr) 330px; align-items: end; gap: 70px; }
.directory-kicker { margin: 0 0 9px; color: var(--forest); font-size: .75rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; }
.directory-intro h1 { max-width: 700px; margin: 0; font-size: clamp(2.15rem, 3.45vw, 3.35rem); line-height: 1.08; letter-spacing: -.042em; font-weight: 700; }
.directory-intro h1 span { color: var(--forest); font-weight: 500; }
.directory-intro-grid > div > p:last-child { max-width: 640px; margin: 18px 0 0; color: var(--ink-soft); font-size: 1rem; line-height: 1.65; }
.continue-reading { position: relative; display: grid; min-height: 132px; align-content: center; padding: 24px 60px 24px 25px; color: var(--ink); border: 1px solid var(--line-strong); border-radius: 18px; background: var(--surface); box-shadow: var(--shadow-sm); }
.continue-reading-label { margin-bottom: 9px; color: var(--forest); font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.continue-reading strong { font-size: 1.2rem; font-weight: 700; }
.continue-reading small { margin-top: 3px; color: var(--ink-soft); }
.continue-reading-arrow { position: absolute; right: 23px; bottom: 23px; color: var(--forest); font-size: 1.35rem; }
.directory-content { padding: 44px 0 88px; }
.reading-shortcuts { display: flex; align-items: center; gap: 18px; margin-bottom: 48px; }
.reading-shortcuts > span { flex: 0 0 auto; color: var(--ink-soft); font-size: .75rem; font-weight: 600; }
.quran-app-home .popular-grid { display: flex; flex-wrap: wrap; gap: 9px; overflow: visible; border: 0; background: transparent; }
.quran-app-home .popular-card { display: inline-flex; min-height: 44px; align-items: center; padding: 0 17px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); }
.quran-app-home .popular-card:hover { background: var(--forest-soft); box-shadow: none; }
.quran-app-home .popular-card .popular-number,
.quran-app-home .popular-card .arabic-name,
.quran-app-home .popular-card small { display: none; }
.quran-app-home .popular-card strong { font-size: .8rem; font-weight: 600; }
.directory-heading { display: flex; align-items: end; justify-content: space-between; gap: 30px; margin-bottom: 22px; }
.directory-heading h2 { margin: 0; font-size: clamp(1.75rem, 2.1vw, 2rem); letter-spacing: -.03em; font-weight: 700; }
.directory-tools { position: relative; width: min(410px, 100%); }
.quran-app-home .quran-search { width: 100%; min-height: 50px; border-radius: 12px; box-shadow: none; }
.quran-app-home .search-results { right: 0; width: 100%; }
.surah-filterbar { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.surah-filterbar .filter-field { width: 220px; min-width: 0; }
.surah-filterbar .result-count { margin: 0 0 0 auto; }
.quran-app-home .surah-grid { gap: 12px; border: 0; }
.quran-app-home .surah-card { min-height: 78px; padding: 13px 15px; border: 1px solid var(--line); border-radius: 13px; box-shadow: 0 3px 12px rgba(20,50,40,.025); }
.quran-app-home .surah-card:hover { border-color: color-mix(in srgb, var(--forest) 45%, var(--line)); background: var(--surface); transform: translateY(-1px); }
.quran-app-home .surah-number { width: auto; height: auto; border: 0; border-radius: 0; font-size: .76rem; }
.quran-app-home .surah-meta strong { font-size: 1rem; font-weight: 600; }
.quran-app-home .surah-meta small { font-size: .875rem; font-weight: 400; line-height: 1.45; }
.quran-app-home .surah-arabic { font-size: 1.35rem; }
.source-notice { padding: 31px 0; color: var(--ink); border-top: 1px solid var(--line); background: var(--surface); }
.source-notice-inner, .source-notice-inner > div { display: flex; align-items: center; gap: 14px; }
.source-notice-inner { justify-content: space-between; }
.source-notice-inner > div > span { display: grid; width: 36px; height: 36px; place-items: center; color: #fff; border-radius: 50%; background: var(--forest); font-weight: 900; }
.source-notice strong { display: block; font-size: .82rem; }
.source-notice p { margin: 2px 0 0; color: var(--ink-soft); font-size: .69rem; }
.source-notice a { color: var(--forest); font-size: .72rem; font-weight: 800; }
.compact-footer .footer-bottom { min-height: 58px; }
.compact-footer { color: var(--ink-soft); border-top: 1px solid var(--line); background: var(--surface); }
.compact-footer .footer-bottom { border-top: 0; }

/* Search-first homepage, adapted from mature Quran application patterns */
.quran-search-hero { padding: 54px 0 58px; }
.search-landing { display: grid; justify-items: center; text-align: center; }
.search-landing .directory-kicker { margin-bottom: 7px; }
.search-landing h1 { margin: 0; color: var(--ink); font-size: clamp(2.5rem, 3.2vw, 2.8rem); line-height: 1.12; letter-spacing: -.035em; }
.search-landing-copy { max-width: 630px; margin: 13px 0 26px; color: var(--ink-soft); font-size: 1rem; }
.hero-search-wrap { position: relative; width: min(680px, 100%); }
.hero-search-wrap .quran-search { width: 100%; max-width: none; min-height: 58px; border-color: var(--line-strong); border-radius: 12px; box-shadow: 0 8px 28px rgba(18, 16, 14, .06); }
.hero-search-wrap .search-results { width: 100%; text-align: left; }
.search-landing-actions { display: flex; gap: 9px; margin-top: 14px; }
.search-landing-actions a { display: inline-flex; min-height: 44px; align-items: center; justify-content: center; padding: 9px 17px; color: var(--ink); border: 1px solid var(--line); border-radius: 8px; background: var(--surface); font-size: .86rem; font-weight: 600; }
.search-landing-actions a:first-child { color: #fff; border-color: var(--ink); background: var(--ink); }
html[data-theme="kitab"] .search-landing-actions a:first-child { color: #24180d; border-color: #ead7a5; background: #ead7a5; }
.start-reading-section { padding: 42px 0 46px; border-bottom: 1px solid var(--line); }
.start-reading-heading { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 18px; }
.start-reading-heading h2 { margin: 0; color: var(--ink); font-size: 1.75rem; font-weight: 700; letter-spacing: -.02em; }
.start-reading-heading a { color: var(--ink-soft); font-size: .78rem; font-weight: 600; }
.start-reading-section .continue-reading { display: grid; min-height: 150px; grid-template-columns: 150px minmax(0, 1fr) auto; align-items: center; align-content: initial; gap: 28px; padding: 24px 28px; }
.continue-reading-arabic { color: var(--ink); font-family: "Noto Naskh Arabic", serif; font-size: 2.65rem; line-height: 1.25; text-align: center; }
.continue-reading-copy { display: grid; }
.continue-reading-copy strong { color: var(--ink); font-size: 1.25rem; font-weight: 600; }
.continue-reading-copy strong small { color: var(--ink-soft); font-size: 1rem; font-weight: 400; }
.continue-reading-copy > span:last-child { margin-top: 6px; color: var(--ink-soft); font-size: .78rem; }
.continue-reading-button { display: inline-flex; min-width: 78px; min-height: 44px; align-items: center; justify-content: center; padding: 8px 17px; color: #fff; border-radius: 999px; background: var(--ink); text-align: center; font-size: .86rem; font-weight: 600; }
html[data-theme="kitab"] .continue-reading-button { color: #24180d; background: #ead7a5; }
.quran-dotcom-direction .directory-content { padding-top: 42px; }
.quran-dotcom-direction .reading-shortcuts { padding-bottom: 32px; margin-bottom: 38px; border-bottom: 1px solid var(--line); }
.quran-dotcom-direction .directory-heading { margin-bottom: 20px; }
.quran-dotcom-direction .source-notice { color: var(--ink); border-color: #ead8c7; background: var(--notice-bg); }
.quran-dotcom-direction .source-notice-inner > div > span { color: #fff; background: var(--notice-brown); }
.quran-dotcom-direction .source-notice strong,
.quran-dotcom-direction .source-notice a { color: var(--notice-brown); }

/* Reading screen */
.reader-app { --reader-width: 1024px; background: var(--surface); }
.reader-appbar { position: sticky; z-index: 100; top: 0; border-bottom: 1px solid var(--line); background: var(--surface); }
.reader-appbar-grid { display: grid; grid-template-columns: 180px minmax(420px, 1fr) 180px; min-height: 118px; align-items: center; gap: 24px; }
.reader-back { display: inline-flex; min-width: 44px; min-height: 44px; align-items: center; gap: 10px; color: var(--ink); font-size: .86rem; font-weight: 600; }
.reader-back > span:first-child { color: var(--forest); font-size: 1.15rem; }
.reader-switcher { display: grid; justify-items: center; gap: 10px; }
.reader-neighbours { display: grid; width: min(420px, 100%); grid-template-columns: 1fr 1fr; gap: 8px; }
.reader-neighbour { display: flex; min-height: 44px; align-items: center; gap: 10px; padding: 5px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.reader-neighbour-next { justify-content: flex-end; text-align: right; }
.reader-neighbour > span:first-child:last-child, .reader-neighbour > span:last-child:first-child { color: var(--forest); font-size: 1.15rem; }
.reader-neighbour-copy { display: grid; line-height: 1.15; }
.reader-neighbour-copy small { color: var(--ink-soft); font-size: .52rem; }
.reader-neighbour-copy strong { font-size: .75rem; font-weight: 600; }
.reader-selectors { display: flex; gap: 8px; }
.reader-selectors select { min-height: 44px; padding: 0 32px 0 12px; color: var(--ink); border: 1px solid var(--line); border-radius: 8px; background: var(--surface); font-size: .84rem; }
.reader-app-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.reader-settings-button { display: inline-flex; min-height: 44px; align-items: center; gap: 8px; padding: 0 12px; color: var(--ink); border: 0; background: transparent; cursor: pointer; font-size: .84rem; font-weight: 600; }
.reader-settings-button svg { width: 16px; color: var(--forest); }
.reader-app .reader-main { padding: 0 0 90px; background: var(--surface); }
.reader-shell { width: min(calc(100% - 48px), var(--reader-width)); margin-inline: auto; }
.reader-chapter-heading { padding: 48px 0 35px; text-align: center; }
.reader-chapter-heading .reader-arabic-title { margin: 0 0 5px; color: var(--forest); font-size: clamp(2.4rem, 5vw, 3.8rem); line-height: 1.35; }
.reader-chapter-heading h1 { margin: 0; font-size: clamp(1.625rem, 2vw, 1.75rem); letter-spacing: -.02em; font-weight: 600; }
.reader-chapter-heading > p:last-child { margin: 4px 0 0; color: var(--ink-soft); font-size: .78rem; }
.reader-app .reader-status { width: fit-content; max-width: 100%; margin: 0 auto 20px; padding: 9px 14px; border-radius: 999px; text-align: center; font-size: .78rem; line-height: 1.45; }
.reader-app .bismillah { padding: 28px 20px 45px; font-size: clamp(2rem, 4vw, 3.15rem); }
.reader-app .verse-list { gap: 0; border-top: 1px solid var(--line); }
.reader-app .verse-card { position: relative; display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 24px; padding: 36px 4px 40px; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; box-shadow: none; content-visibility: auto; contain-intrinsic-block-size: auto 330px; }
.reader-app .verse-card:target { border-color: var(--gold); box-shadow: inset 3px 0 0 var(--gold); }
.reader-app .verse-top { display: flex; align-items: flex-start; flex-direction: column; justify-content: flex-start; gap: 12px; grid-column: 1; grid-row: 1 / span 3; }
.reader-app .verse-number { width: 44px; min-width: 44px; height: 44px; color: var(--forest); border-color: var(--gold); font-size: .82rem; }
.reader-app .verse-actions { flex-direction: column; }
.reader-app .verse-action { width: 44px; height: 44px; border: 0; background: transparent; }
.reader-app .verse-arabic { grid-column: 2; margin: 0 0 18px; line-height: 2.15; }
.reader-app .verse-translation { grid-column: 2; max-width: 920px; color: var(--ink); font-size: 1.125rem; line-height: 1.78; }
.reader-app .footnote-list { grid-column: 2; }
.reader-app .reader-pagination { margin-top: 32px; }
.reader-footer { color: var(--ink-soft); border-top: 1px solid var(--line); background: var(--surface-soft); }
.reader-footer .reader-shell { display: flex; min-height: 60px; align-items: center; justify-content: space-between; font-size: .65rem; }
.reader-footer .footer-credit-link { color: var(--ink); text-decoration-color: var(--line-strong); }
.reader-footer .footer-credit-link:hover, .reader-footer .footer-credit-link:focus-visible { color: var(--notice-brown); }
.setting-note { margin: 0; color: var(--ink-soft); font-size: .76rem; }

@media (max-width: 900px) {
  .directory-intro-grid { grid-template-columns: 1fr; gap: 30px; }
  .continue-reading { max-width: 440px; }
  .reader-appbar-grid { grid-template-columns: auto 1fr auto; min-height: 92px; gap: 12px; }
  .reader-back span:last-child, .reader-settings-button { font-size: 0; }
  .reader-settings-button svg { width: 20px; }
  .reader-neighbour-copy small { display: none; }
}

@media (max-width: 680px) {
  body { font-size: 16px; }
  .directory-intro { padding: 38px 0 32px; }
  .directory-intro h1 { font-size: clamp(2rem, 10vw, 3rem); }
  .directory-heading { align-items: stretch; flex-direction: column; }
  .directory-tools { width: 100%; }
  .surah-filterbar { align-items: stretch; flex-direction: column; }
  .surah-filterbar .filter-field { width: 100%; }
  .surah-filterbar .result-count { margin: 0; }
  .quran-app-home .surah-grid { grid-template-columns: 1fr; }
  .reading-shortcuts { align-items: flex-start; flex-direction: column; }
  .source-notice-inner { align-items: flex-start; flex-direction: column; }
  .reader-appbar-grid { grid-template-columns: 44px 1fr 96px; grid-template-rows: 44px auto; min-height: 142px; gap: 8px 12px; padding-block: 10px; }
  .reader-back { grid-column: 1; grid-row: 1; }
  .reader-switcher { width: 100%; grid-column: 1 / -1; grid-row: 2; }
  .reader-app-actions { grid-column: 3; grid-row: 1; }
  .reader-back span:last-child { display: none; }
  .reader-neighbours { width: 100%; }
  .reader-neighbour { padding: 4px 8px; }
  .reader-neighbour-copy strong { max-width: 80px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .reader-selectors { display: grid; width: 100%; grid-template-columns: 1fr 1fr; }
  .reader-selectors label:first-child { min-width: 0; }
  .reader-selectors select { width: 100%; }
  .reader-app-actions .icon-button { width: 44px; height: 44px; flex: 0 0 44px; }
  .reader-shell { width: min(calc(100% - 28px), var(--reader-width)); }
  .reader-chapter-heading { padding-top: 35px; }
  .reader-app .reader-status { border-radius: 10px; }
  .reader-app .verse-card { grid-template-columns: 44px minmax(0,1fr); gap: 14px; padding: 30px 0 34px; }
  .reader-app .verse-number { width: 44px; min-width: 44px; height: 44px; }
  .reader-app .verse-action { width: 44px; height: 44px; }
  .reader-app .verse-arabic { font-size: min(var(--arabic-size), 2.875rem); line-height: 2; }
  .reader-app .verse-translation { font-size: 1.0625rem; line-height: 1.75; }
  .reader-app .reader-pagination { grid-template-columns: 1fr; }
  .quran-search-hero { padding: 38px 0 42px; }
  .search-landing h1 { font-size: 2.25rem; }
  .search-landing-copy { font-size: .94rem; }
  .search-landing-actions { width: 100%; }
  .search-landing-actions a { flex: 1; }
  .start-reading-section .continue-reading { min-height: 145px; grid-template-columns: 74px minmax(0, 1fr); gap: 16px; padding: 20px; }
  .continue-reading-arabic { font-size: 1.9rem; }
  .continue-reading-button { grid-column: 1 / -1; width: 100%; }
}

/* Quran product parity pass — measured from Quran.com and Quran NU, rebuilt locally. */
:root {
  --shell: 1148px;
  --reader-width: 1160px;
  --line: #e8e6e3;
  --line-strong: #d8d3ce;
  --ink-soft: #67625d;
  --shadow-sm: 0 8px 24px rgba(23, 20, 17, .055);
}

.quran-app-home .site-header { min-height: 64px; }
.quran-app-home .header-inner { min-height: 64px; }
.quran-app-home .quran-search-hero { padding: 30px 0 26px; }
.quran-app-home .search-landing { max-width: 820px; }
.quran-app-home .directory-kicker { margin-bottom: 8px; font-size: .72rem; letter-spacing: .11em; }
.quran-app-home .search-landing h1 { font-size: 2.5rem; line-height: 1.2; letter-spacing: -.035em; }
.quran-app-home .search-landing-copy { margin-top: 10px; font-size: 1rem; line-height: 1.55; }
.quran-app-home .hero-search-wrap { max-width: 750px; margin-top: 20px; }
.quran-app-home .hero-search-wrap .quran-search { min-height: 56px; border-radius: 14px; box-shadow: 0 8px 22px rgba(23, 20, 17, .06); }
.quran-app-home .search-landing-actions { margin-top: 12px; }
.quran-app-home .search-landing-actions a { min-height: 40px; padding-inline: 18px; border-radius: 14px; font-size: .875rem; }

.start-reading-section { padding: 40px 0 44px; background: #fafafa; }
.start-reading-heading { margin-bottom: 22px; }
.start-reading-heading h2 { font-size: 2rem; line-height: 1.35; letter-spacing: -.025em; }
.start-reading-heading > a { font-size: .875rem; text-decoration: underline; text-underline-offset: 3px; }
.start-reading-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.start-reading-section .continue-reading { min-height: 174px; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: 1fr auto; gap: 12px 20px; padding: 22px 24px; border-color: transparent; border-radius: 15px; background: #fff; box-shadow: 0 4px 16px rgba(23, 20, 17, .07); }
.start-reading-section .continue-reading:hover { border-color: var(--line-strong); transform: translateY(-2px); box-shadow: 0 10px 26px rgba(23, 20, 17, .09); }
.start-reading-section .continue-reading-arabic { grid-column: 1 / -1; align-self: center; font-size: 3.2rem; text-align: left; }
.start-reading-section .continue-reading-copy { grid-column: 1; grid-row: 2; }
.start-reading-section .continue-reading-button { grid-column: 2; grid-row: 2; align-self: end; }
.start-reading-section .continue-reading-copy strong { font-size: 1.375rem; line-height: 1.3; }
.start-reading-section .continue-reading-copy > span:last-child { font-size: .875rem; }
.start-reading-section .continue-reading-button { min-width: 68px; min-height: 36px; padding-inline: 16px; }
.reading-companions { display: grid; gap: 14px; }
.reading-companions > a { display: grid; min-height: 80px; grid-template-columns: 42px minmax(0, 1fr) 18px; align-items: center; gap: 14px; padding: 15px 18px; border: 1px solid transparent; border-radius: 15px; background: #fff; box-shadow: 0 4px 16px rgba(23, 20, 17, .055); transition: border-color var(--transition-fast), box-shadow var(--transition), transform var(--transition-fast); }
.reading-companions > a:hover { border-color: var(--line-strong); transform: translateY(-1px); box-shadow: 0 8px 22px rgba(23, 20, 17, .08); }
.reading-companions .companion-icon { display: grid; width: 40px; height: 40px; place-items: center; color: #fff; border-radius: 50%; background: var(--notice-brown); font-size: .76rem; font-weight: 700; }
.reading-companions > a > span:nth-child(2) { display: grid; gap: 3px; }
.reading-companions strong { font-size: 1rem; line-height: 1.3; letter-spacing: -.01em; }
.reading-companions small { color: var(--ink-soft); font-size: .8rem; line-height: 1.45; }
.reading-companions > a > span:last-child { color: var(--ink-soft); font-size: 1.5rem; }
.khatam-planner { margin-top: 16px; padding: clamp(22px, 4vw, 34px); border: 1px solid var(--line); border-radius: 15px; background: var(--surface); box-shadow: 0 4px 16px rgba(23, 20, 17, .055); }
.khatam-heading { display: flex; align-items: end; justify-content: space-between; gap: 40px; }
.khatam-heading h3 { margin: 4px 0 7px; font-size: clamp(1.3rem, 2.2vw, 1.8rem); line-height: 1.25; letter-spacing: -.035em; }
.khatam-heading p { max-width: 620px; margin: 0; color: var(--ink-soft); font-size: .83rem; }
.khatam-options { display: flex; flex: 0 0 auto; gap: 7px; padding: 4px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-soft); }
.khatam-options button { min-height: 44px; padding: 0 16px; color: var(--ink-soft); border: 0; border-radius: 8px; background: transparent; cursor: pointer; font-size: .78rem; font-weight: 750; }
.khatam-options button:hover { color: var(--ink); }
.khatam-options button[aria-pressed="true"] { color: #fff; background: var(--notice-brown); }
html[data-theme="kitab"] .khatam-options button[aria-pressed="true"] { color: #24180d; background: var(--gold); }
.khatam-state { display: flex; align-items: end; justify-content: space-between; gap: 20px; padding-top: 22px; margin-top: 22px; border-top: 1px solid var(--line); }
.khatam-state > div { display: grid; gap: 3px; }
.khatam-state strong { font-size: .9rem; }
.khatam-state span { color: var(--ink-soft); font-size: .75rem; }
.khatam-reset { min-height: 44px; padding: 0 12px; color: var(--ink-soft); border: 1px solid var(--line); border-radius: 9px; background: transparent; cursor: pointer; font-size: .72rem; font-weight: 700; }
.khatam-reset:hover { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 40%, var(--line)); }
.khatam-track { height: 5px; margin-top: 18px; overflow: hidden; border-radius: 99px; background: var(--line); }
.khatam-track span { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--notice-brown); transition: width var(--transition-slow); }
html[data-theme="kitab"] .start-reading-section { background: var(--surface-soft); }
html[data-theme="kitab"] .start-reading-section .continue-reading,
html[data-theme="kitab"] .reading-companions > a,
html[data-theme="kitab"] .khatam-planner { background: var(--surface); }
html[data-theme="kitab"] .quran-search-hero { background-image: radial-gradient(circle at 50% -30%, rgba(216, 180, 111, .12), transparent 52%); }
html[data-theme="kitab"] .segmented-control button.is-active,
html[data-theme="kitab"] .reading-companions .companion-icon,
html[data-theme="kitab"] .quran-dotcom-direction .source-notice-inner > div > span { color: #24180d; background: var(--gold); }
html[data-theme="kitab"] .reader-app .reader-main { background-image: linear-gradient(90deg, transparent, rgba(240, 217, 155, .018) 50%, transparent); }

.quran-app-home .directory-content { padding-top: 34px; }
.quran-app-home .reading-shortcuts { align-items: center; padding: 0 0 30px; margin-bottom: 34px; }
.reading-shortcuts-copy { display: grid; min-width: 160px; gap: 2px; }
.reading-shortcuts-copy strong { font-size: 1rem; }
.reading-shortcuts-copy span { color: var(--ink-soft); font-size: .75rem; }
.quran-app-home .popular-card strong { font-size: .875rem; }
.quran-app-home .directory-heading h2 { font-size: 2rem; line-height: 1.35; }
.quran-app-home .surah-filterbar { padding: 16px 0 20px; }
.quran-app-home .surah-grid { gap: 12px; }
.quran-app-home .surah-card { min-height: 104px; padding: 16px 18px; border-radius: 12px; box-shadow: none; }
.quran-app-home .surah-card:hover { border-color: var(--notice-brown); box-shadow: 0 7px 20px rgba(23, 20, 17, .055); }
.quran-app-home .surah-card .surah-number,
.quran-app-home .surah-card .surah-arrow { color: var(--notice-brown); }
.segmented-control button.is-active { background: var(--notice-brown); }
.quran-search:focus-within,
.filter-field:focus-within { border-color: var(--notice-brown); box-shadow: 0 0 0 3px color-mix(in srgb, var(--notice-brown) 14%, transparent); }
.search-results:not([hidden]) { animation: quran-pop var(--transition-fast) both; transform-origin: top center; }
@keyframes quran-pop {
  from { opacity: 0; transform: translateY(-4px) scale(.99); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
body,
.site-header,
.reader-appbar,
.reader-brandbar,
.reader-footer,
.verse-card,
.surah-card { transition: color var(--transition), background-color var(--transition), border-color var(--transition-fast); }

.reader-app { --reader-width: 1160px; }
.reader-appbar { position: sticky; top: 0; background: var(--surface); }
.reader-brandbar { border-bottom: 1px solid var(--line); background: var(--surface); }
.reader-brandbar-inner { display: flex; min-height: 62px; align-items: center; justify-content: space-between; gap: 24px; }
.reader-brandbar-inner nav { display: flex; align-items: center; gap: 18px; }
.reader-brandbar-inner nav > a { color: var(--ink-soft); font-size: .8rem; font-weight: 600; }
.reader-brandbar-inner nav > a:hover { color: var(--ink); }
.reader-brandbar-inner .brand-mark { width: 38px; font-size: 21px; }
.reader-brandbar-inner .brand-copy strong { font-size: .84rem; }
.reader-brandbar-inner .brand-copy small { font-size: .66rem; }
.reader-controlbar { min-height: 84px; }
.reader-appbar-grid { grid-template-columns: 190px minmax(420px, 1fr) 190px; }
.reader-neighbour { border-radius: 12px; }
.reader-selectors select { border-radius: 10px; }
.reader-context { display: flex; min-height: 18px; align-items: center; justify-content: center; gap: 9px; color: var(--ink-soft); font-size: .66rem; white-space: nowrap; }
.reader-context span + span::before, .reader-context strong::before { margin-right: 9px; color: var(--line-strong); content: "·"; }
.reader-context strong { color: var(--notice-brown); font-size: inherit; }
.reader-progress-track { display: block; width: min(100%, 430px); height: 2px; overflow: hidden; border-radius: 999px; background: var(--line); }
.reader-progress-track > span { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--notice-brown); transition: width 180ms linear; }
.reader-app .reader-main { padding-bottom: 80px; }
.reader-chapter-heading { padding: 20px 0 10px; }
.reader-chapter-heading .reader-arabic-title { margin-bottom: 0; font-size: 2.35rem; line-height: 1.3; }
.reader-chapter-heading h1 { font-size: 1.45rem; line-height: 1.3; }
html[data-theme="kitab"] .reader-chapter-heading .reader-arabic-title,
html[data-theme="kitab"] .reader-chapter-heading h1 { color: var(--ink); }
html[data-theme="kitab"] .reader-app .bismillah { color: var(--ink); }
.reader-chapter-heading > p:last-child { margin-top: 2px; font-size: .8rem; }
.reader-app .reader-status { margin-bottom: 10px; color: var(--notice-brown); border-color: #e5c9ac; background: var(--notice-bg); }
.reader-app .bismillah { padding: 16px 20px 22px; font-size: 2.65rem; line-height: 1.55; }
.reader-loading { display: grid; min-height: 70vh; grid-template-columns: 52px minmax(0, 1fr); align-content: start; gap: 26px 28px; padding: 30px 8px; }
.reader-loading-number { width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 50%; background: var(--surface-soft); }
.reader-loading-copy { display: grid; align-content: start; gap: 14px; padding-top: 7px; }
.reader-loading-copy i { display: block; height: 13px; border-radius: 999px; background: linear-gradient(90deg, var(--surface-soft), var(--line), var(--surface-soft)); background-size: 220% 100%; animation: reader-loading 1.4s ease-in-out infinite; }
.reader-loading-copy i:nth-child(1) { width: 92%; height: 22px; justify-self: end; }
.reader-loading-copy i:nth-child(2) { width: 78%; }
.reader-loading-copy i:nth-child(3) { width: 54%; }
@keyframes reader-loading { 0%, 100% { background-position: 100% 0; opacity: .65; } 50% { background-position: 0 0; opacity: 1; } }
.reader-app .verse-card { grid-template-columns: 52px minmax(0, 1fr); gap: 28px; padding: 16px 8px 32px; contain-intrinsic-block-size: auto 280px; }
.reader-app .verse-number { width: 42px; min-width: 42px; height: 42px; color: var(--notice-brown); border-color: #cba884; }
.reader-app .verse-action { color: #77716b; }
html[data-theme="kitab"] .reader-app .verse-number { color: var(--ink); border-color: var(--ink); }
html[data-theme="kitab"] .reader-app .verse-action,
html[data-theme="kitab"] .reader-app .verse-action:hover,
html[data-theme="kitab"] .reader-app .verse-action.is-saved { color: var(--ink); }
.reader-app .verse-arabic { margin-bottom: 20px; font-size: var(--arabic-size); line-height: 2.05; }
.reader-app .verse-translation { max-width: 940px; font-size: 1.125rem; line-height: 1.78; }

/* Mode Malam: hitam pekat dengan hierarki putih dan abu-abu netral. */
html[data-theme="night"] .quran-app-home,
html[data-theme="night"] .reader-app,
html[data-theme="night"] .reader-app .reader-main,
html[data-theme="night"] .bookmarks-main { background: var(--paper); }
html[data-theme="night"] .quran-search-hero { background: var(--paper); background-image: none; }
html[data-theme="night"] .start-reading-section { background: #141412; }
html[data-theme="night"] .start-reading-section .continue-reading,
html[data-theme="night"] .reading-companions > a,
html[data-theme="night"] .khatam-planner { background: var(--surface); }
html[data-theme="night"] .continue-card,
html[data-theme="night"] .reader-hero { color: var(--ink); border-color: var(--line); background: var(--surface); }
html[data-theme="night"] .button-primary,
html[data-theme="night"] .continue-reading-button,
html[data-theme="night"] .search-landing-actions a:first-child,
html[data-theme="night"] .segmented-control button.is-active,
html[data-theme="night"] .language-options button[aria-pressed="true"],
html[data-theme="night"] .khatam-options button[aria-pressed="true"] { color: var(--paper); border-color: var(--ink); background: var(--ink); }
html[data-theme="night"] .reader-status,
html[data-theme="night"] .reader-app .reader-status { color: var(--ink); border-color: var(--line-strong); background: var(--notice-bg); }
html[data-theme="night"] .reader-chapter-heading .reader-arabic-title,
html[data-theme="night"] .reader-chapter-heading h1,
html[data-theme="night"] .reader-app .bismillah,
html[data-theme="night"] .reader-app .verse-arabic,
html[data-theme="night"] .reader-app .verse-translation { color: var(--ink); }
html[data-theme="night"] .reader-app .verse-number { color: var(--ink); border-color: var(--ink); }
html[data-theme="night"] .reader-app .verse-action,
html[data-theme="night"] .reader-app .verse-action:hover,
html[data-theme="night"] .reader-app .verse-action.is-saved { color: var(--ink); }
html[data-theme="night"] .reading-companions .companion-icon,
html[data-theme="night"] .quran-dotcom-direction .source-notice-inner > div > span { color: var(--paper); background: var(--ink); }
html[data-theme="night"] .site-footer { color: var(--ink); background: #0b0b0a; border-top: 1px solid var(--line); }
html[data-theme="night"] .site-footer .footer-bottom { color: var(--ink-soft); border-top-color: var(--line); }
html[data-theme="night"] .site-footer .footer-credit-link { color: var(--ink); text-decoration-color: var(--line-strong); }
html[data-theme="night"] .site-footer .footer-credit-link:hover,
html[data-theme="night"] .site-footer .footer-credit-link:focus-visible { color: var(--notice-brown); }
html[data-theme="kitab"] .site-footer { color: #f3e9cc; background: #2c2211; }
html[data-theme="kitab"] .site-footer .footer-bottom { color: #d6c7a1; border-top-color: rgba(255, 243, 207, .18); }
html[data-theme="kitab"] .site-footer .footer-credit-link { color: #fff3cf; text-decoration-color: rgba(255, 243, 207, .45); }
html[data-theme="kitab"] .site-footer .footer-credit-link:hover,
html[data-theme="kitab"] .site-footer .footer-credit-link:focus-visible { color: #fff; }
.setting-help { display: block; max-width: 250px; color: var(--ink-soft); font-size: .7rem; font-weight: 400; line-height: 1.45; }
.toggle-row .setting-label { margin-bottom: 4px; }
.ngaji-mode .reader-brandbar,
.ngaji-mode .reader-chapter-heading,
.ngaji-mode .reader-status,
.ngaji-mode .reader-footer,
.ngaji-mode .reader-pagination { display: none; }
.ngaji-mode .reader-main { padding-top: 18px; }
.ngaji-mode .reader-controlbar { min-height: 70px; }
.ngaji-mode .verse-card { scroll-margin-top: 88px; }

@media (max-width: 900px) {
  .start-reading-grid { grid-template-columns: 1fr; }
  .start-reading-section .continue-reading { max-width: none; }
  .reader-appbar-grid { grid-template-columns: auto 1fr auto; }
  .bookmarks-hero-grid { grid-template-columns: 1fr; gap: 28px; }
  .khatam-heading { align-items: stretch; flex-direction: column; gap: 20px; }
  .khatam-options { align-self: start; }
}

@media (max-width: 680px) {
  html { scroll-padding-top: 0; }
  .quran-app-home .site-header, .quran-app-home .header-inner { min-height: 58px; }
  .quran-app-home .quran-search-hero { padding: 27px 0 25px; }
  .quran-app-home .search-landing h1 { font-size: 2.125rem; }
  .quran-app-home .hero-search-wrap { margin-top: 18px; }
  .start-reading-section { padding: 30px 0 34px; }
  .start-reading-heading h2, .quran-app-home .directory-heading h2 { font-size: 1.625rem; }
  .start-reading-section .continue-reading { min-height: 166px; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: 1fr auto; gap: 10px 14px; padding: 18px; }
  .start-reading-section .continue-reading-arabic { grid-column: 1 / -1; font-size: 2.45rem; }
  .start-reading-section .continue-reading-button { grid-column: 2; grid-row: 2; width: auto; }
  .reading-companions > a { min-height: 78px; padding: 14px; }
  .khatam-planner { padding: 20px; }
  .khatam-options { display: grid; width: 100%; grid-template-columns: repeat(3, 1fr); }
  .khatam-options button { padding-inline: 8px; }
  .khatam-state { align-items: start; flex-direction: column; }
  .reading-shortcuts-copy { min-width: 0; }
  .reader-brandbar-inner { min-height: 58px; }
  .reader-brandbar { overflow: hidden; }
  .reader-brandbar-inner .brand-copy small, .reader-brandbar-inner nav > a { display: none; }
  .reader-brandbar-inner nav { gap: 0; }
  .theme-menu { position: fixed; top: 64px; right: 16px; }
  .bookmarks-hero { padding: 48px 0 40px; }
  .bookmarks-hero h1 { font-size: 2.45rem; }
  .bookmarks-content { padding: 34px 0 70px; }
  .bookmark-card { padding: 20px; }
  .bookmark-card-heading { gap: 12px; }
  .bookmark-remove span { display: none; }
  .bookmark-arabic { font-size: 2.15rem; line-height: 1.9; }
  .bookmark-translation { font-size: 1rem; }
  .reader-controlbar { min-height: 110px; }
  .reader-appbar-grid { grid-template-columns: 44px 1fr 44px; grid-template-rows: 36px auto; padding-block: 7px; }
  .reader-app-actions { grid-column: 3; }
  .reader-chapter-heading { padding: 18px 0 9px; }
  .reader-chapter-heading .reader-arabic-title { font-size: 2.15rem; }
  .reader-app .bismillah { padding: 15px 8px 20px; font-size: 2.25rem; line-height: 1.55; }
  .reader-app .verse-card { grid-template-columns: 42px minmax(0,1fr); gap: 10px; padding: 14px 0 28px; }
  .reader-app .verse-card { scroll-margin-top: 182px; }
  .reader-app .verse-arabic { font-size: min(var(--arabic-size), 2.7rem); line-height: 2; }
  .reader-app .verse-translation { font-size: 1.125rem; line-height: 1.76; }
  .reader-loading { grid-template-columns: 42px minmax(0, 1fr); gap: 24px 10px; padding: 28px 0; }
  .reader-loading-number { width: 40px; height: 40px; }
  .reader-appbar.is-compact .reader-brandbar { display: none; }
  .reader-appbar.is-compact .reader-controlbar { min-height: 58px; grid-template-columns: 44px minmax(0, 1fr) 44px; grid-template-rows: 44px; gap: 8px; padding-block: 7px; }
  .reader-appbar.is-compact .reader-back { grid-column: 1; grid-row: 1; }
  .reader-appbar.is-compact .reader-switcher { grid-column: 2; grid-row: 1; }
  .reader-appbar.is-compact .reader-neighbours { display: none; }
  .reader-appbar.is-compact .reader-selectors { grid-template-columns: minmax(0, 1fr) 90px; gap: 6px; }
  .reader-appbar.is-compact .reader-selectors select { padding-inline: 8px 24px; font-size: .78rem; }
  .reader-appbar.is-compact .reader-context { display: none; }
  .reader-appbar.is-compact .reader-progress-track { position: absolute; right: 0; bottom: 0; left: 0; width: 100%; }
  .reader-appbar.is-compact .reader-app-actions { grid-column: 3; grid-row: 1; }
  .reader-appbar.is-compact + .reader-main .verse-card { scroll-margin-top: 72px; }
  .ngaji-mode .reader-controlbar { min-height: 58px; }
}

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