:root {
  --ink: #17312f;
  --teal: #063f3c;
  --teal-deep: #042e2c;
  --mint: #d9e4db;
  --paper: #f4f0e7;
  --paper-soft: #fbfaf6;
  --sand: #ded4c3;
  --gold: #c7a464;
  --gold-light: #e5c886;
  --line: rgba(23, 49, 47, .15);
  --muted: #687774;
  --serif: "Playfair Display", Georgia, serif;
  --sans: "DM Sans", "Noto Kufi Arabic", Arial, sans-serif;
  --arabic: "Noto Kufi Arabic", "DM Sans", Arial, sans-serif;
  --radius-lg: 28px;
  --radius-md: 18px;
  --shadow: 0 22px 55px rgba(9, 43, 39, .11);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { visibility: hidden; margin: 0; color: var(--ink); background: var(--paper-soft); font-family: var(--arabic); font-size: 15px; line-height: 1.75; }
body.language-ready { visibility: visible; }
html[lang="tr"] body, html[lang="en"] body { font-family: var(--sans); direction: ltr; }
html[lang="ar"] body { direction: rtl; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; }
.skip-link { position: fixed; inset-block-start: -100px; inset-inline-start: 16px; z-index: 100; padding: 8px 14px; color: white; background: var(--teal); border-radius: 7px; transition: .2s; }
.skip-link:focus { inset-block-start: 16px; }

.site-header { position: sticky; inset-block-start: 0; z-index: 50; background: rgba(251, 250, 246, .93); backdrop-filter: blur(18px); border-bottom: 1px solid rgba(23, 49, 47, .08); }
.topline { display: flex; align-items: center; gap: 11px; max-width: 1380px; margin: 0 auto; padding: 7px 42px 6px; color: rgba(244, 240, 231, .9); background: var(--teal-deep); font-size: 10px; letter-spacing: .065em; }
.topline-rule { width: 28px; height: 1px; background: var(--gold); opacity: .8; }
.nav-shell { height: 76px; max-width: 1380px; margin: 0 auto; padding: 0 42px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 10px; flex-shrink: 0; }
.brand-mark { width: 39px; height: 39px; display: grid; place-items: center; border: 1px solid rgba(199, 164, 100, .7); border-radius: 50%; overflow: hidden; }
.brand-mark img { width: 100%; height: 100%; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; letter-spacing: -.015em; }
.brand-text strong { font-size: 15px; font-family: var(--sans); font-weight: 700; }
.brand-text small { margin-top: 4px; color: var(--muted); font-family: var(--sans); font-size: 9px; letter-spacing: .16em; text-transform: uppercase; }
.desktop-nav { display: flex; align-items: center; gap: 28px; margin-inline-start: auto; }
.desktop-nav a { position: relative; padding: 8px 0; color: #40514e; font-size: 13px; font-weight: 600; }
.desktop-nav a::after { position: absolute; content: ""; inset-inline-start: 0; inset-block-end: 2px; width: 0; height: 1px; background: var(--gold); transition: width .25s ease; }
.desktop-nav a:hover::after, .desktop-nav a:focus-visible::after { width: 100%; }
.nav-actions { display: flex; align-items: center; gap: 15px; }
.search-trigger { display: inline-flex; align-items: center; gap: 6px; padding: 7px 10px; border: 0; color: var(--teal); background: transparent; font-size: 12px; font-weight: 700; }
.search-trigger span:first-child { font-size: 22px; line-height: 0; transform: translateY(-1px); }
.language-switcher { display: flex; overflow: hidden; border: 1px solid var(--line); border-radius: 7px; }
.language-switcher button { min-width: 28px; padding: 5px 6px; color: var(--muted); border: 0; background: transparent; font-family: var(--sans); font-size: 10px; font-weight: 700; }
.language-switcher button.active { color: var(--paper-soft); background: var(--teal); }
.menu-toggle, .mobile-nav { display: none; }

.hero { position: relative; min-height: 620px; overflow: hidden; color: white; background: var(--teal-deep); }
.hero-image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .58; mix-blend-mode: luminosity; }
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(4, 38, 36, .9) 0%, rgba(5, 57, 54, .65) 47%, rgba(4, 33, 32, .25) 100%); }
[dir="rtl"] .hero-overlay { background: linear-gradient(270deg, rgba(4, 38, 36, .9) 0%, rgba(5, 57, 54, .65) 47%, rgba(4, 33, 32, .25) 100%); }
.hero::after { position: absolute; content: ""; inset-inline-start: -18%; inset-block-end: -50%; width: 65vw; height: 65vw; border: 1px solid rgba(229, 200, 134, .23); border-radius: 50%; pointer-events: none; }
.hero-inner { position: relative; z-index: 1; min-height: 550px; max-width: 1380px; margin: 0 auto; padding: 88px 42px 80px; display: flex; align-items: center; justify-content: space-between; gap: 64px; }
.hero-copy { width: min(700px, 62vw); }
.eyebrow { margin: 0 0 14px; color: var(--gold); font-family: var(--sans); font-size: 10px; font-weight: 700; letter-spacing: .17em; line-height: 1.45; text-transform: uppercase; }
.eyebrow.light { color: var(--gold-light); }
.hero h1 { max-width: 650px; margin: 0; font-family: var(--arabic); font-size: clamp(37px, 4.8vw, 73px); font-weight: 600; letter-spacing: -.055em; line-height: 1.32; }
html[lang="tr"] .hero h1, html[lang="en"] .hero h1 { font-family: var(--serif); font-weight: 600; letter-spacing: -.04em; line-height: 1.05; }
.hero-intro { max-width: 570px; margin: 25px 0 32px; color: rgba(255,255,255,.83); font-size: 16px; line-height: 2; }
.hero-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 25px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 18px; min-height: 50px; padding: 10px 20px; border: 1px solid transparent; border-radius: 3px; font-size: 13px; font-weight: 700; transition: transform .2s, background .2s, color .2s; }
.button:hover { transform: translateY(-2px); }
.button-gold { color: var(--teal-deep); background: var(--gold-light); }
.button-dark { color: var(--paper-soft); background: var(--teal); }
.button-outline { color: var(--paper); border-color: rgba(244,240,231,.5); background: transparent; }
.button-outline:hover { color: var(--teal-deep); background: var(--paper); }
.text-link { display: inline-flex; align-items: center; gap: 9px; padding-block: 4px; color: var(--teal); border-bottom: 1px solid var(--gold); font-size: 13px; font-weight: 700; }
.light-link { color: white; border-color: var(--gold); }
.hero-rail { align-self: stretch; width: 215px; padding-inline-start: 29px; border-inline-start: 1px solid rgba(255,255,255,.3); display: flex; flex-direction: column; justify-content: center; }
.rail-seal { width: 42px; height: 42px; margin-bottom: 32px; display: grid; place-items: center; border: 1px solid var(--gold-light); border-radius: 50%; color: var(--gold-light); font-family: var(--serif); font-size: 16px; }
.hero-rail > p { margin: 0 0 11px; color: rgba(255,255,255,.62); font-size: 10px; letter-spacing: .12em; }
.hero-rail ol { padding: 0; margin: 0; list-style: none; }
.hero-rail li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid rgba(255,255,255,.14); font-size: 12px; }
.hero-rail li span { color: var(--gold-light); font-family: var(--sans); font-size: 10px; }
.hero-rail a:hover { color: var(--gold-light); }
.hero-footer { position: absolute; z-index: 1; inset-inline: 0; inset-block-end: 0; max-width: 1380px; margin: auto; padding: 16px 42px 17px; display: flex; justify-content: space-between; border-top: 1px solid rgba(255,255,255,.18); color: rgba(255,255,255,.68); font-size: 11px; }
.scroll-cue { color: var(--gold-light); font-family: var(--sans); font-size: 17px; }

.intro-band { max-width: 1380px; margin: 0 auto; padding: 84px 42px; display: grid; grid-template-columns: .72fr 1.75fr .78fr; gap: 42px; align-items: start; }
.section-label { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 11px; font-weight: 700; }
.section-label span:first-child { color: var(--gold); font-family: var(--sans); font-size: 12px; }
.intro-text { max-width: 710px; }
.large-copy { margin: 0 0 21px; font-size: clamp(20px, 2vw, 30px); font-weight: 500; letter-spacing: -.035em; line-height: 1.75; }
.language-note { padding: 17px 0 17px 18px; border-inline-start: 1px solid var(--line); color: var(--muted); font-size: 11px; line-height: 1.8; }
.globe { display: block; margin-bottom: 10px; color: var(--gold); font-size: 22px; }

.content-section { max-width: 1380px; margin: 0 auto; padding: 95px 42px; }
.quran-section { border-top: 1px solid var(--line); }
.section-heading { display: grid; grid-template-columns: minmax(250px, 1.15fr) minmax(260px, .85fr); align-items: end; gap: 70px; margin-bottom: 40px; }
.section-heading h2, .about-copy h2, .closing-section h2 { margin: 0; color: var(--teal); font-family: var(--arabic); font-size: clamp(30px, 3.4vw, 49px); font-weight: 600; letter-spacing: -.055em; line-height: 1.35; }
html[lang="tr"] .section-heading h2, html[lang="en"] .section-heading h2, html[lang="tr"] .about-copy h2, html[lang="en"] .about-copy h2, html[lang="tr"] .closing-section h2, html[lang="en"] .closing-section h2 { font-family: var(--serif); letter-spacing: -.035em; line-height: 1.12; }
.section-heading > p { max-width: 420px; margin: 0 0 5px; color: var(--muted); font-size: 14px; line-height: 1.95; }
.quran-layout { display: grid; grid-template-columns: 1.38fr .62fr; gap: 20px; }
.surah-browser { padding: 25px; background: white; border: 1px solid rgba(23,49,47,.1); border-radius: var(--radius-md); box-shadow: 0 11px 34px rgba(23,49,47,.04); }
.browser-topline, .browser-bottom { display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.browser-title { font-weight: 700; font-size: 15px; }
.content-status { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: 10px; }
.content-status i { width: 6px; height: 6px; border-radius: 50%; background: var(--gold); }
.surah-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 22px 0 19px; }
.surah-card { position: relative; min-height: 84px; padding: 13px; text-align: start; color: var(--ink); border: 1px solid rgba(23,49,47,.1); border-radius: 9px; background: var(--paper-soft); transition: background .18s, transform .18s, border .18s; }
.surah-card:hover, .surah-card.active { border-color: var(--gold); background: #fffdf7; transform: translateY(-2px); }
.surah-card span { display: block; }
.surah-card .surah-number { margin-bottom: 6px; color: var(--gold); font-family: var(--sans); font-size: 10px; font-weight: 700; }
.surah-card .surah-name { font-weight: 700; font-size: 13px; }
.surah-card .surah-meta { margin-top: 2px; color: var(--muted); font-family: var(--sans); font-size: 10px; }
.browser-bottom { color: var(--muted); font-size: 11px; }
.plain-button { padding: 0; color: var(--teal); border: 0; background: transparent; font-size: 11px; font-weight: 700; text-decoration: underline; text-underline-offset: 4px; }
.reading-panel { position: relative; min-height: 337px; overflow: hidden; padding: 33px 30px 27px; display: flex; flex-direction: column; justify-content: space-between; color: var(--paper-soft); background: var(--teal); border-radius: var(--radius-md); }
.reading-panel::before { position: absolute; content: ""; width: 230px; height: 230px; inset-inline-end: -90px; inset-block-start: -80px; border: 1px solid rgba(229,200,134,.4); border-radius: 50%; }
.panel-number { position: relative; color: var(--gold-light); font-family: var(--serif); font-size: 47px; line-height: .8; }
.reading-panel h3 { position: relative; margin: 13px 0 8px; font-family: var(--arabic); font-size: 29px; font-weight: 600; }
html[lang="tr"] .reading-panel h3, html[lang="en"] .reading-panel h3 { font-family: var(--serif); }
.reading-panel p { position: relative; max-width: 280px; margin: 0; color: rgba(255,255,255,.75); font-size: 12px; line-height: 2; }
.panel-actions { position: relative; display: flex; gap: 8px; }
.icon-button { width: 33px; height: 33px; display: grid; place-items: center; color: var(--paper-soft); border: 1px solid rgba(255,255,255,.4); border-radius: 50%; background: transparent; }
.icon-button:hover { color: var(--teal); background: var(--gold-light); border-color: var(--gold-light); }

.tafsir-section { max-width: none; padding: 0; color: var(--paper); background: var(--teal-deep); }
.tafsir-feature { min-height: 570px; max-width: 1380px; margin: 0 auto; padding: 94px 42px; display: grid; grid-template-columns: 1.1fr .9fr; align-items: center; gap: 120px; }
.tafsir-copy h2 { max-width: 520px; margin: 0; font-family: var(--arabic); font-size: clamp(37px, 4.5vw, 65px); font-weight: 600; letter-spacing: -.06em; line-height: 1.22; }
html[lang="tr"] .tafsir-copy h2, html[lang="en"] .tafsir-copy h2 { font-family: var(--serif); letter-spacing: -.04em; line-height: 1.08; }
.tafsir-copy h2 em { color: var(--gold-light); font-family: var(--serif); font-weight: 600; }
.tafsir-copy > p:not(.eyebrow) { max-width: 490px; margin: 24px 0 30px; color: rgba(255,255,255,.72); font-size: 14px; line-height: 2; }
.tafsir-card { position: relative; min-height: 340px; padding: 30px; overflow: hidden; color: var(--teal); background: var(--paper); border-radius: 2px 42px 2px 42px; }
.tafsir-card::after { position: absolute; content: ""; inset-inline-end: 18px; inset-block-end: 15px; width: 170px; height: 170px; border: 1px solid rgba(199,164,100,.4); border-radius: 50%; }
.card-topline, .source-line { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 10px; letter-spacing: .08em; }
.card-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--gold); }
.quote-mark { position: relative; z-index: 1; display: block; height: 58px; margin-top: 25px; color: var(--gold); font-family: var(--serif); font-size: 89px; line-height: 1; }
.tafsir-card > p { position: relative; z-index: 1; max-width: 340px; margin: 3px 0 29px; font-size: 17px; font-weight: 600; line-height: 1.9; }
.source-line { padding-top: 13px; border-top: 1px solid var(--line); }

.books-section { padding-bottom: 108px; }
.books-heading { margin-bottom: 45px; }
.book-gallery { display: grid; grid-template-columns: 1fr 1fr .72fr; gap: 22px; }
.book-placeholder { display: grid; grid-template-columns: 145px 1fr; min-height: 250px; padding: 17px; border: 1px solid var(--line); border-radius: 5px; background: white; transition: transform .2s, box-shadow .2s; }
.book-placeholder:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.book-cover { display: flex; flex-direction: column; justify-content: space-between; min-height: 212px; padding: 19px 16px; color: var(--gold-light); background: var(--teal); box-shadow: 6px 7px 0 rgba(199,164,100,.25); }
.book-cover span { font-family: var(--serif); font-size: 31px; }
.book-cover small { font-size: 9px; line-height: 1.6; }
.book-cover-alt { color: var(--teal); background: var(--sand); }
.book-meta { padding: 4px 0 0 19px; }
[dir="rtl"] .book-meta { padding: 4px 19px 0 0; }
.book-index { display: block; margin-bottom: 13px; color: var(--gold); font-family: var(--sans); font-size: 10px; font-weight: 700; }
.book-tag { display: inline-block; padding: 2px 7px; color: var(--muted); border: 1px solid var(--line); border-radius: 20px; font-size: 9px; }
.book-meta h3 { margin: 15px 0 8px; font-size: 18px; line-height: 1.45; }
.book-meta p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.9; }
.add-book-card { min-height: 250px; padding: 25px; display: flex; flex-direction: column; justify-content: center; color: var(--teal); border: 1px dashed rgba(23,49,47,.32); border-radius: 5px; }
.plus { width: 31px; height: 31px; display: grid; place-items: center; margin-bottom: 22px; color: var(--gold); border: 1px solid var(--gold); border-radius: 50%; font-size: 20px; }
.add-book-card p { margin: 0 0 18px; font-size: 14px; font-weight: 600; line-height: 1.9; }
.add-book-card a { width: fit-content; padding-bottom: 2px; border-bottom: 1px solid var(--gold); color: var(--muted); font-size: 11px; }

.about-section { display: grid; grid-template-columns: .85fr 1.15fr; min-height: 570px; color: var(--teal); background: #e4ece6; }
.about-visual { position: relative; min-height: 450px; overflow: hidden; padding: 65px 42px; display: flex; flex-direction: column; justify-content: flex-end; color: rgba(6,63,60,.62); background: #d1ded5; }
.visual-arch { position: absolute; inset-inline-start: 22%; inset-block-start: 0; width: min(420px, 65%); height: 410px; display: grid; place-items: center; border: 1px solid rgba(6,63,60,.24); border-radius: 210px 210px 0 0; border-bottom: none; }
.visual-arch::before, .visual-arch::after { position: absolute; content: ""; border: 1px solid rgba(6,63,60,.19); border-radius: inherit; border-bottom: none; }
.visual-arch::before { inset: 26px; }
.visual-arch::after { inset: 55px; }
.arch-star { position: relative; z-index: 1; color: var(--gold); font-size: 42px; }
.about-visual p { position: relative; max-width: 160px; margin: 0; font-size: 11px; }
.about-copy { max-width: 720px; padding: 91px 72px; }
.about-copy > p:not(.eyebrow) { max-width: 580px; margin: 21px 0 35px; color: #53706a; font-size: 14px; line-height: 2; }
.principles { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; max-width: 580px; padding-top: 23px; border-top: 1px solid rgba(23,49,47,.16); }
.principles > div > span { color: var(--gold); font-family: var(--sans); font-size: 10px; font-weight: 700; }
.principles h3 { margin: 7px 0 5px; font-size: 13px; }
.principles p { margin: 0; color: #58716d; font-size: 11px; line-height: 1.85; }

.closing-section { max-width: 1380px; margin: 0 auto; padding: 103px 42px; display: flex; flex-direction: column; align-items: center; text-align: center; }
.closing-section h2 { max-width: 750px; margin-bottom: 31px; }
.site-footer { display: flex; align-items: center; justify-content: space-between; gap: 25px; padding: 25px 42px; color: rgba(244,240,231,.68); background: var(--teal-deep); }
.footer-brand .brand-text strong { color: var(--paper-soft); }
.site-footer p { margin: 0; font-size: 10px; }
.to-top { padding: 5px 0; color: var(--gold-light); border: 0; border-bottom: 1px solid rgba(229,200,134,.6); background: transparent; font-size: 10px; }

.search-dialog { width: min(680px, calc(100% - 28px)); max-height: min(680px, 88vh); padding: 0; overflow: auto; color: var(--teal); border: 0; border-radius: 17px; background: var(--paper-soft); box-shadow: 0 25px 80px rgba(0,0,0,.38); }
.search-dialog::backdrop { background: rgba(3, 36, 34, .66); backdrop-filter: blur(4px); }
.dialog-header { display: flex; justify-content: space-between; gap: 18px; padding: 31px 32px 20px; }
.dialog-header h2 { margin: 0; font-family: var(--arabic); font-size: 28px; letter-spacing: -.035em; line-height: 1.45; }
html[lang="tr"] .dialog-header h2, html[lang="en"] .dialog-header h2 { font-family: var(--serif); }
.dialog-close { width: 31px; height: 31px; flex: 0 0 auto; display: grid; place-items: center; color: var(--teal); border: 1px solid var(--line); border-radius: 50%; background: transparent; font-size: 23px; line-height: 1; }
.search-field { margin: 0 32px; padding: 0 12px; display: flex; align-items: center; gap: 8px; border-bottom: 1px solid var(--teal); }
.search-field span { font-family: var(--sans); font-size: 25px; }
.search-field input { width: 100%; padding: 13px 0; color: var(--teal); border: 0; outline: 0; background: transparent; font-size: 14px; }
.search-results { min-height: 108px; padding: 19px 32px 18px; }
.result-empty { padding: 11px 0; color: var(--muted); font-size: 13px; }
.result-row { width: 100%; padding: 13px 0; display: flex; align-items: center; justify-content: space-between; gap: 14px; text-align: start; color: var(--teal); border: 0; border-bottom: 1px solid var(--line); background: transparent; }
.result-row strong { display: block; font-size: 13px; }
.result-row small { display: block; margin-top: 2px; color: var(--muted); font-size: 10px; }
.result-row span { color: var(--gold); }
.search-note { margin: 0; padding: 13px 32px; color: var(--muted); border-top: 1px solid var(--line); background: rgba(222,212,195,.22); font-size: 10px; }

@media (max-width: 980px) {
  .desktop-nav { gap: 18px; }
  .hero-inner { gap: 32px; }
  .hero-rail { width: 185px; }
  .book-gallery { grid-template-columns: 1fr 1fr; }
  .add-book-card { grid-column: span 2; min-height: 120px; }
  .about-copy { padding-inline: 45px; }
  .tafsir-feature { gap: 58px; }
}
@media (max-width: 760px) {
  body { font-size: 14px; }
  .topline { padding-inline: 20px; font-size: 9px; }
  .topline-rule { display: none; }
  .nav-shell { height: 66px; padding-inline: 20px; gap: 10px; }
  .desktop-nav, .search-trigger { display: none; }
  .nav-actions { gap: 9px; }
  .menu-toggle { width: 36px; height: 35px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; border: 0; background: transparent; }
  .menu-toggle span { display: block; width: 19px; height: 1px; background: var(--teal); transition: .2s; }
  .menu-toggle.open span:first-child { transform: translateY(3px) rotate(45deg); }
  .menu-toggle.open span:last-child { transform: translateY(-3px) rotate(-45deg); }
  .mobile-nav { max-height: 0; overflow: hidden; display: flex; flex-direction: column; padding-inline: 20px; background: var(--paper-soft); transition: max-height .25s ease; }
  .mobile-nav.open { max-height: 240px; padding-bottom: 14px; }
  .mobile-nav a { padding: 10px 0; border-top: 1px solid var(--line); font-size: 13px; font-weight: 700; }
  .hero { min-height: 670px; }
  .hero-overlay, [dir="rtl"] .hero-overlay { background: linear-gradient(180deg, rgba(4,38,36,.52), rgba(4,38,36,.93) 67%, rgba(4,38,36,.99)); }
  .hero-inner { min-height: 590px; padding: 75px 22px 75px; display: block; }
  .hero-copy { width: 100%; }
  .hero h1 { font-size: clamp(37px, 11.7vw, 55px); line-height: 1.37; }
  html[lang="tr"] .hero h1, html[lang="en"] .hero h1 { line-height: 1.1; }
  .hero-intro { font-size: 14px; }
  .hero-rail { width: 100%; margin-top: 39px; padding: 17px 0 0; border-inline-start: 0; border-top: 1px solid rgba(255,255,255,.3); }
  .rail-seal, .hero-rail > p { display: none; }
  .hero-rail ol { display: flex; gap: 13px; }
  .hero-rail li { padding: 0; border-bottom: 0; }
  .hero-footer { padding-inline: 22px; font-size: 10px; }
  .intro-band, .content-section { padding-inline: 22px; }
  .intro-band { padding-block: 58px; display: block; }
  .intro-text { margin: 22px 0 27px; }
  .language-note { padding: 14px 0; border-inline-start: 0; border-top: 1px solid var(--line); }
  .globe { display: inline; margin-inline-end: 8px; }
  .section-heading { display: block; margin-bottom: 30px; }
  .section-heading > p { margin-top: 17px; }
  .content-section { padding-block: 63px; }
  .quran-layout { display: block; }
  .surah-browser { padding: 16px; }
  .surah-grid { grid-template-columns: repeat(2, 1fr); }
  .surah-card { min-height: 76px; }
  .reading-panel { min-height: 275px; margin-top: 14px; padding: 25px 22px; }
  .tafsir-feature { min-height: unset; padding: 67px 22px; display: block; }
  .tafsir-copy h2 { font-size: clamp(39px, 11vw, 56px); }
  .tafsir-card { min-height: 310px; margin-top: 45px; padding: 25px 21px; }
  .book-gallery { display: block; }
  .book-placeholder, .add-book-card { margin-bottom: 14px; }
  .book-placeholder { grid-template-columns: 115px 1fr; min-height: 224px; }
  .book-cover { min-height: 187px; }
  .book-meta { padding-inline-start: 15px; }
  [dir="rtl"] .book-meta { padding-inline: 15px 0; }
  .add-book-card { min-height: 160px; }
  .about-section { display: block; }
  .about-visual { min-height: 330px; padding: 35px 22px; }
  .visual-arch { inset-inline-start: 22%; width: 66%; height: 330px; }
  .about-copy { padding: 59px 22px; }
  .principles { gap: 17px; }
  .closing-section { padding: 67px 22px; align-items: flex-start; text-align: start; }
  .site-footer { padding: 21px 22px; flex-wrap: wrap; }
  .site-footer p { order: 3; flex-basis: 100%; }
  .search-dialog { width: calc(100% - 20px); }
  .dialog-header { padding: 24px 21px 17px; }
  .search-field { margin-inline: 21px; }
  .search-results { padding-inline: 21px; }
  .search-note { padding-inline: 21px; }
}
@media (max-width: 390px) {
  .brand-text strong { font-size: 13px; }
  .brand-text small { font-size: 8px; }
  .brand-mark { width: 34px; height: 34px; }
  .language-switcher button { min-width: 24px; padding-inline: 4px; }
  .hero h1 { font-size: 36px; }
}

/* Quran reader refresh */
.browser-topline > div { display: flex; align-items: center; gap: 9px; }
.browser-count { min-width: 25px; padding: 2px 6px; color: var(--gold); border: 1px solid rgba(199,164,100,.45); border-radius: 20px; font-family: var(--sans); font-size: 9px; font-weight: 700; text-align: center; }
.quran-toolbar { display: grid; grid-template-columns: 1fr 128px; gap: 9px; margin-top: 19px; }
.quran-search { display: flex; align-items: center; gap: 8px; padding: 0 12px; border: 1px solid rgba(23,49,47,.13); border-radius: 8px; background: var(--paper-soft); }
.quran-search span { color: var(--gold); font-family: var(--sans); font-size: 22px; line-height: 1; }
.quran-search input { width: 100%; min-width: 0; padding: 10px 0; color: var(--ink); border: 0; outline: 0; background: transparent; font-size: 11px; }
.quran-search input::placeholder { color: #8b9792; }
.quran-toolbar select { padding: 0 10px; color: var(--ink); border: 1px solid rgba(23,49,47,.13); border-radius: 8px; outline: 0; background: var(--paper-soft); font-size: 11px; }
.quran-filters { display: flex; gap: 7px; margin: 11px 0 14px; overflow-x: auto; scrollbar-width: none; }
.quran-filters::-webkit-scrollbar { display: none; }
.filter-chip { flex: 0 0 auto; padding: 5px 10px; color: var(--muted); border: 1px solid rgba(23,49,47,.13); border-radius: 20px; background: transparent; font-size: 10px; }
.filter-chip:hover, .filter-chip.active { color: var(--teal); border-color: var(--gold); background: rgba(229,200,134,.15); }
.surah-grid { max-height: 378px; overflow-y: auto; padding: 2px 3px 4px 1px; scrollbar-color: var(--gold) rgba(23,49,47,.08); scrollbar-width: thin; }
.surah-card { min-height: 78px; }
.surah-card .surah-state { position: absolute; inset-block-start: 11px; inset-inline-end: 11px; width: 5px; height: 5px; border-radius: 50%; background: #c3d1c7; }
.surah-card.active .surah-state { background: var(--gold); box-shadow: 0 0 0 4px rgba(199,164,100,.14); }
.surah-card .surah-meta { display: flex; align-items: center; gap: 5px; }
.surah-card .surah-meta::before { content: ""; width: 4px; height: 4px; border-radius: 50%; background: currentColor; opacity: .5; }
.empty-surah { grid-column: 1 / -1; padding: 30px 12px; color: var(--muted); text-align: center; font-size: 12px; }
.panel-topline { position: relative; z-index: 1; display: flex; align-items: flex-start; justify-content: space-between; }
.saved-badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 8px; color: rgba(255,255,255,.7); border: 1px solid rgba(255,255,255,.2); border-radius: 20px; font-size: 9px; }
.saved-badge i { width: 5px; height: 5px; border-radius: 50%; background: #a7d7ae; }
.reading-panel .panel-number { margin: 0; }
.reading-progress { position: relative; z-index: 1; margin-top: 17px; }
.progress-label { display: flex; justify-content: space-between; color: rgba(255,255,255,.6); font-size: 9px; }
.progress-label strong { color: var(--gold-light); font-family: var(--sans); font-size: 10px; }
.progress-track { height: 3px; margin-top: 7px; overflow: hidden; border-radius: 5px; background: rgba(255,255,255,.16); }
.progress-track span { display: block; width: 11%; height: 100%; border-radius: inherit; background: var(--gold-light); transition: width .3s ease; }
.panel-actions { align-items: center; }
.continue-button { min-height: 33px; padding: 5px 11px; display: inline-flex; align-items: center; gap: 10px; color: var(--teal-deep); border: 0; border-radius: 3px; background: var(--gold-light); font-size: 10px; font-weight: 700; }
.continue-button:hover { background: white; transform: translateY(-1px); }
@media (max-width: 760px) {
  .quran-toolbar { grid-template-columns: 1fr 104px; }
  .surah-grid { max-height: 342px; }
  .continue-button { padding-inline: 9px; }
  .saved-badge { font-size: 8px; }
}

/* PDF import entry point */
.books-heading-side { display: flex; flex-direction: column; align-items: flex-start; gap: 18px; }
.books-heading-side > p { max-width: 420px; margin: 0 0 5px; color: var(--muted); font-size: 14px; line-height: 1.95; }
.add-pdf-trigger { display: inline-flex; align-items: center; gap: 10px; padding: 7px 12px 7px 9px; color: var(--teal); border: 1px solid rgba(199,164,100,.6); border-radius: 4px; background: rgba(229,200,134,.13); font-size: 11px; font-weight: 700; transition: .2s; }
.add-pdf-trigger:hover { color: var(--teal-deep); border-color: var(--gold); background: var(--gold-light); transform: translateY(-2px); }
.pdf-icon { width: 25px; height: 25px; display: grid; place-items: center; color: var(--paper-soft); border-radius: 50%; background: var(--teal); font-family: var(--sans); font-size: 19px; font-weight: 400; line-height: 1; }
.pdf-dialog { width: min(680px, calc(100% - 28px)); max-height: min(760px, 90vh); padding: 0; overflow: auto; color: var(--teal); border: 0; border-radius: 17px; background: var(--paper-soft); box-shadow: 0 25px 80px rgba(0,0,0,.38); }
.pdf-dialog::backdrop { background: rgba(3, 36, 34, .66); backdrop-filter: blur(4px); }
.pdf-dialog-intro { margin: 0; padding: 0 32px 20px; color: var(--muted); font-size: 12px; line-height: 1.9; }
.pdf-choice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; padding: 0 32px 20px; }
.pdf-choice { min-height: 119px; padding: 16px; display: flex; flex-direction: column; align-items: flex-start; gap: 5px; text-align: start; color: var(--teal); border: 1px solid var(--line); border-radius: 11px; background: white; transition: .2s; }
.pdf-choice:hover, .pdf-choice.selected { border-color: var(--gold); background: #fffdf7; transform: translateY(-2px); }
.choice-icon { width: 29px; height: 29px; display: grid; place-items: center; margin-bottom: 5px; color: var(--paper-soft); border-radius: 8px; background: var(--teal); font-family: var(--sans); font-size: 20px; }
.drive-icon { color: var(--teal); background: var(--gold-light); font-size: 17px; }
.pdf-choice strong { font-size: 12px; }
.pdf-choice small { color: var(--muted); font-size: 10px; line-height: 1.6; }
.drive-form { margin: 0 32px 17px; padding: 14px; border: 1px solid rgba(199,164,100,.55); border-radius: 9px; background: rgba(229,200,134,.1); }
.drive-form[hidden] { display: none; }
.drive-form label { display: block; margin-bottom: 8px; font-size: 11px; font-weight: 700; }
.drive-input-row { display: flex; gap: 7px; }
.drive-input-row input { flex: 1; min-width: 0; padding: 9px 10px; color: var(--teal); border: 1px solid var(--line); border-radius: 5px; outline: 0; background: white; font-family: var(--sans); font-size: 11px; direction: ltr; text-align: left; }
.drive-input-row button { padding: 8px 11px; color: var(--paper-soft); border: 0; border-radius: 5px; background: var(--teal); font-size: 10px; font-weight: 700; }
.drive-form > small { display: block; margin-top: 8px; color: var(--muted); font-size: 9px; line-height: 1.7; }
.pdf-import-status { min-height: 18px; padding: 0 32px; color: var(--teal); font-size: 11px; font-weight: 600; }
.pdf-import-status.error { color: #9a4b3f; }
.pdf-import-list { padding: 7px 32px 15px; }
.pdf-import-item { display: flex; align-items: center; gap: 11px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.pdf-file-icon { width: 30px; height: 35px; display: grid; place-items: center; flex: 0 0 auto; color: var(--teal); border: 1px solid rgba(199,164,100,.55); border-radius: 4px; background: var(--gold-light); font-family: var(--sans); font-size: 8px; font-weight: 700; }
.pdf-import-item strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.pdf-import-item small { display: block; margin-top: 2px; color: var(--muted); font-size: 9px; }
.pdf-import-item a { margin-inline-start: auto; color: var(--teal); font-size: 10px; text-decoration: underline; text-underline-offset: 3px; }
.pdf-dialog-note { margin: 0; padding: 12px 32px; color: var(--muted); border-top: 1px solid var(--line); background: rgba(222,212,195,.22); font-size: 9px; line-height: 1.8; }
@media (max-width: 760px) {
  .books-heading-side { margin-top: 17px; }
  .pdf-dialog-intro, .pdf-dialog-note { padding-inline: 21px; }
  .pdf-choice-grid { padding-inline: 21px; }
  .drive-form { margin-inline: 21px; }
  .pdf-import-status { padding-inline: 21px; }
  .pdf-import-list { padding-inline: 21px; }
  .drive-input-row { display: block; }
  .drive-input-row button { width: 100%; margin-top: 7px; }
}

.quran-heading-side { display: flex; flex-direction: column; align-items: flex-start; gap: 18px; }
.quran-heading-side > p { max-width: 420px; margin: 0 0 5px; color: var(--muted); font-size: 14px; line-height: 1.95; }
@media (max-width: 760px) { .quran-heading-side { margin-top: 17px; } }

.footer-actions { display: flex; align-items: center; gap: 18px; }
.admin-footer-link { color: var(--gold); font-family: var(--sans); font-size: 10px; font-weight: 700; text-decoration: underline; text-underline-offset: 4px; }
.admin-footer-link:hover { color: var(--gold-light); }
@media (max-width: 760px) { .footer-actions { gap: 10px; } .admin-footer-link { font-size: 9px; } }

html, body { overflow-x: hidden; }
img { max-width: 100%; }
.section-heading > *, .quran-layout > *, .book-gallery > * { min-width: 0; }
@media (max-width: 360px) {
  .nav-shell { padding-inline: 15px; gap: 8px; }
  .nav-actions { gap: 7px; }
  .search-trigger { padding-inline: 5px; }
  .hero-inner { padding-inline: 17px; }
  .hero h1 { font-size: 34px; }
  .hero-intro { font-size: 13px; }
  .content-section, .intro-band { padding-inline: 17px; }
  .quran-toolbar { grid-template-columns: 1fr 91px; gap: 6px; }
  .surah-browser { padding: 12px; }
}

.book-source-link { display: inline-block; margin-top: 10px; color: var(--teal); font-family: var(--sans); font-size: 10px; font-weight: 700; text-decoration: underline; text-underline-offset: 4px; }
.book-source-link:hover { color: var(--gold); }
.book-cover > span small { display: block; margin-top: 5px; font-family: var(--arabic); font-size: 9px; font-weight: 500; }
