/* Kur'an-ı Kerim Oku — İslami Davet. Mobil öncelikli; renk belirteçleri ana sitenin temasıyla aynı. */

@font-face { font-family: "Noto Sans Arabic"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/noto-sans-arabic.woff2") format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0898-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: "IBM Plex Sans Arabic"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/ibm-plex-sans-arabic.woff2") format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0898-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
/* Kral Fahd Matbaası Hafs yazı tipi: lisansı gereği değiştirilmeden (TTF) sunulur; yalnızca seçildiğinde indirilir. */
@font-face { font-family: "KFGQPC Hafs"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/kfgqpc-hafs-v30.ttf") format("truetype"); }
/* Shaikh Hamdullah Mushaf (Muhammet Abay; Diyanet Kur'an sitesinden): kullanım şartı gereği değiştirilmeden sunulur. */
@font-face { font-family: "Shaikh Hamdullah Mushaf"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/shaikh-hamdullah-mushaf.ttf") format("truetype"); }
/* Muhammet Abay'ın Diyanet Kur'an sitesindeki diğer yazı tipleri; değiştirilmeden sunulur, yalnızca seçilince indirilir. */
@font-face { font-family: "Amasya Abay"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/amasya.ttf") format("truetype"); }
@font-face { font-family: "Feyzul Furkan"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/feyzul-furkan.ttf") format("truetype"); }
@font-face { font-family: "Feyzul Furkan 1005"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/feyzul-furkan-1005.ttf") format("truetype"); }
@font-face { font-family: "Amiri Quran"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/amiri-quran-arabic.woff2") format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0898-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC, U+102E0-102FB, U+10E60-10E7E, U+10EFD-10EFF, U+1EE00-1EEFF; }
@font-face { font-family: "Scheherazade New"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/scheherazade-new-arabic.woff2") format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0898-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@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+0898-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: Inter; font-style: normal; font-weight: 400 700; font-display: swap; src: url("../fonts/inter-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; }
@font-face { font-family: Inter; font-style: normal; font-weight: 400 700; font-display: swap; src: url("../fonts/inter-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --bg: #fbfaf7; --bg-tint: #f4f1ea; --surface: #ffffff; --surface-2: #f8f6f1;
  --ink: #14201b; --ink-2: #36423d; --muted: #5f6b65; --line: #e6e1d6; --line-strong: #d3ccbd;
  --primary: #0e5a45; --primary-ink: #ffffff; --primary-soft: #e3efe9; --primary-strong: #0a4334;
  --accent: #a87f32; --accent-soft: #f5ecd9; --focus: #c28a1d; --danger: #a23b2a;
  --paper: #fffdf6; --mark: #f6e7bf;
  --shadow: 0 1px 2px rgb(20 32 27 / 5%), 0 8px 24px -12px rgb(20 32 27 / 14%);
  --shadow-lg: 0 24px 60px -24px rgb(20 32 27 / 30%);
  --font-sans: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  /* Varsayılan: okunuşu kolay bilgisayar hattı (Noto Sans Arabic). Sure adları ve ayet numaraları Amiri ile kalır. */
  --ar-font: "Noto Sans Arabic", "Noto Naskh Arabic", "Amiri Quran", sans-serif;
  --ar-size: 30px; --tr-size: 17px; --lh: 1; --gap: 1;
  --top-h: 58px; --tab-h: 62px; --player-h: 0px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --radius: 14px; --radius-lg: 20px;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0c1311; --bg-tint: #111a17; --surface: #131c19; --surface-2: #18231f;
  --ink: #e9eee9; --ink-2: #c8d1cb; --muted: #94a29b; --line: #24312c; --line-strong: #33433d;
  --primary: #5cc6a0; --primary-ink: #06261c; --primary-soft: #16302a; --primary-strong: #86dcbc;
  --accent: #d9b56b; --accent-soft: #2a2416; --focus: #e7c071;
  --paper: #111a17; --mark: #4a3d18;
  --shadow: 0 1px 0 rgb(255 255 255 / 3%) inset, 0 10px 30px -18px rgb(0 0 0 / 70%);
  --shadow-lg: 0 30px 60px -20px rgb(0 0 0 / 70%);
  color-scheme: dark;
}
:root.f-abay { --ar-font: "Shaikh Hamdullah Mushaf", "Noto Naskh Arabic", serif; }
:root.f-amasya { --ar-font: "Amasya Abay", "Noto Naskh Arabic", serif; }
:root.f-feyzul { --ar-font: "Feyzul Furkan", "Noto Naskh Arabic", serif; }
:root.f-feyzul1005 { --ar-font: "Feyzul Furkan 1005", "Noto Naskh Arabic", serif; }
/* Bu yazı tipinde ۗ glifi boş: durak/süs işaretleri yedek yazı tipiyle çizilir. */
:root.f-abay .ar-fb { font-family: "Noto Naskh Arabic", serif; }
:root.f-sans { --ar-font: "Noto Sans Arabic", "Noto Naskh Arabic", "Amiri Quran", sans-serif; }
:root.f-qpc { --ar-font: "KFGQPC Hafs", "Noto Naskh Arabic", serif; }
:root.f-plex { --ar-font: "IBM Plex Sans Arabic", "Noto Sans Arabic", sans-serif; }
:root.f-amiri { --ar-font: "Amiri Quran", "Scheherazade New", "Noto Naskh Arabic", serif; }
:root.f-scheherazade { --ar-font: "Scheherazade New", "Amiri Quran", "Noto Naskh Arabic", serif; }
:root.f-naskh { --ar-font: "Noto Naskh Arabic", "Amiri Quran", serif; }
@media (min-width: 768px) { :root { --ar-size: 34px; --tr-size: 17.5px; } }
@media (min-width: 1024px) { :root { --tab-h: 0px; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--top-h) + 12px); }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.55 var(--font-sans); overflow-x: clip; -webkit-tap-highlight-color: transparent; }
a { color: var(--primary); text-decoration-thickness: 1px; text-underline-offset: 2px; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
img, svg { display: block; }
h1, h2, h3 { line-height: 1.25; margin: 0; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
/* Kaydırma kapları ve paneller tıklanınca odak alabilir; çevrelerine odak halkası çizilmez. */
dialog:focus-visible, .nav-scroll:focus-visible, .sheet-body:focus-visible, .pl-panel:focus-visible, .main:focus-visible { outline: none; }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { flex: none; }
.skip { position: absolute; left: 8px; top: -60px; z-index: 100; background: var(--primary); color: var(--primary-ink); padding: 10px 14px; border-radius: 10px; }
.skip:focus { top: 8px; }
[hidden] { display: none !important; }

/* ---------- Üst çubuk ---------- */
.topbar {
  position: sticky; top: 0; z-index: 40; height: var(--top-h);
  display: flex; align-items: center; gap: 6px; padding: 0 8px 0 10px;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--primary); text-decoration: none; padding: 6px; border-radius: 10px; flex: none; }
.brand-text { display: none; }
.brand-text strong { display: block; font-size: 15px; color: var(--ink); letter-spacing: -.01em; }
.brand-text small { display: block; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.locator {
  flex: 1; min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto auto; column-gap: 6px;
  text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 6px 10px; min-height: 44px;
}
.loc-main { font-weight: 650; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.loc-sub { grid-row: 2; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.loc-chev { grid-row: 1 / span 2; grid-column: 2; align-self: center; color: var(--muted); }
.top-actions { display: flex; gap: 2px; flex: none; }
.ib { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; border: 0; background: transparent; color: var(--ink-2); padding: 0; text-decoration: none; }
.ib:hover { background: var(--bg-tint); }
.ib.sm { width: 40px; height: 40px; color: var(--muted); }
.desk { display: none; }
:root[data-theme="dark"] .when-light, :root:not([data-theme="dark"]) .when-dark { display: none; }

/* ---------- Yerleşim ---------- */
.shell { min-height: calc(100dvh - var(--top-h)); }
.main { max-width: 860px; margin: 0 auto; padding: 8px 16px calc(var(--tab-h) + var(--player-h) + var(--safe-b) + 32px); outline: none; }
.site-foot { max-width: 860px; margin: 0 auto; padding: 8px 16px calc(var(--tab-h) + var(--player-h) + var(--safe-b) + 24px); color: var(--muted); font-size: 13px; text-align: center; margin-top: calc(-1 * (var(--tab-h) + var(--player-h) + var(--safe-b) + 16px)); }
.site-foot p { margin: 4px 0; }
.site-foot a { color: var(--muted); }

.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 4px; margin: 6px 0 0; padding: 0; font-size: 13px; color: var(--muted); }
.crumbs li + li::before { content: "›"; margin-right: 4px; opacity: .7; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--primary); text-decoration: underline; }

/* ---------- Sure başlığı ---------- */
.surah-head, .ayah-head, .page-head { text-align: center; padding: 18px 0 8px; }
.sh-ar { font-family: "Amiri Quran", var(--ar-font); font-size: 44px; line-height: 1.5; color: var(--primary); margin: 0; }
.sh-title { font-size: 21px; font-weight: 650; letter-spacing: -.01em; display: inline-flex; align-items: center; gap: 10px; justify-content: center; }
.sh-num { display: inline-grid; place-items: center; width: 34px; height: 34px; font-size: 14px; color: var(--accent); border: 1.5px solid var(--accent); border-radius: 50%; font-variant-numeric: tabular-nums; }
.sh-meta { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 0; margin: 8px 0 0; color: var(--muted); font-size: 14px; }
.sh-meta span + span::before { content: "·"; margin: 0 8px; }
.sh-meta a { color: inherit; }
.ayah-head h1 { font-size: 22px; }
.page-head h1 { font-size: 24px; }
.sh-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin: 16px 0 4px; }
.sh-actions.center { margin: 24px 0; }
.basmala {
  font-family: var(--ar-font); font-size: calc(var(--ar-size) * .95); line-height: 2; text-align: center; color: var(--ink);
  margin: 18px auto 4px; padding-top: 16px; position: relative; max-width: 560px;
}
.basmala::before { content: ""; position: absolute; top: 0; left: 15%; right: 15%; height: 1px; background: linear-gradient(90deg, transparent, var(--accent), transparent); opacity: .6; }

/* ---------- Butonlar ve formlar ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); font-weight: 600; font-size: 15px; text-decoration: none; }
.btn:hover { border-color: var(--primary); }
.btn.primary { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.btn.primary:hover { background: var(--primary-strong); }
.btn.ghost { background: transparent; }
.btn.sm { min-height: 36px; padding: 0 12px; font-size: 14px; }
input[type="search"], input[type="number"], input[type="text"], select {
  min-height: 44px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--surface); padding: 0 12px; width: 100%; font-size: 16px;
}
select { appearance: none; padding-right: 34px; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 55%, calc(100% - 13px) 55%; background-size: 5px 5px; background-repeat: no-repeat; }
input:focus, select:focus { outline: 2px solid var(--focus); outline-offset: 0; border-color: transparent; }
.check { display: flex; align-items: center; gap: 10px; min-height: 40px; cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--primary); flex: none; }
.hint { color: var(--muted); font-size: 13.5px; margin: 6px 0; }
.notice { background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent); padding: 10px 14px; border-radius: 12px; }

/* ---------- Ayetler (ayet ayet) ---------- */
.ayahs { margin-top: 8px; }
.ayah { padding: calc(10px + var(--gap) * 8px) 0; border-bottom: 1px solid var(--line); scroll-margin-top: 4px; content-visibility: auto; contain-intrinsic-size: auto 260px; }
.ayah:last-child { border-bottom: 0; }
.ayah-bar { display: flex; align-items: center; gap: 8px; min-height: 40px; }
.ayah-ref { font-size: 13px; font-weight: 650; color: var(--accent); background: var(--accent-soft); padding: 4px 10px; border-radius: 999px; text-decoration: none; font-variant-numeric: tabular-nums; }
.badge { font-size: 12px; padding: 3px 8px; border-radius: 999px; border: 1px solid var(--line-strong); color: var(--muted); }
.badge.sajda { border-color: var(--accent); color: var(--accent); }
.ayah-tools { margin-left: auto; display: flex; }

.ar {
  font-family: var(--ar-font); font-size: var(--ar-size); line-height: calc(2.15 * var(--lh));
  text-align: right; color: var(--ink); margin: 6px 0 10px; word-spacing: .06em;
  font-feature-settings: "kern", "liga", "calt";
}
.ar-no {
  display: inline-grid; place-items: center; min-width: 1.9em; height: 1.9em; padding: 0 .2em;
  font-family: "Amiri Quran", var(--ar-font); font-size: .5em; line-height: 1; color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 70%, transparent); border-radius: 50%; vertical-align: .35em; margin: 0 .15em;
}
.trs { display: grid; gap: 10px; }
.tr { font-size: var(--tr-size); line-height: calc(1.72 * var(--lh)); color: var(--ink-2); margin: 0; overflow-wrap: break-word; }
.tr.translit { font-style: italic; color: var(--muted); }
.ayah.is-playing { background: linear-gradient(90deg, var(--primary-soft), transparent 85%); box-shadow: inset 3px 0 0 var(--primary); padding-left: 12px; padding-right: 8px; margin: 0 -12px; border-radius: 0 12px 12px 0; }
.ayah.is-playing [data-act="play"] { color: var(--primary); }
.single .ayah { border: 0; }
.ayah.is-target { background: linear-gradient(90deg, var(--accent-soft), transparent 85%); box-shadow: inset 3px 0 0 var(--accent); padding-left: 12px; margin-left: -12px; border-radius: 0 12px 12px 0; }
.single .ar { font-size: calc(var(--ar-size) * 1.15); }
.single .tr { font-size: calc(var(--tr-size) * 1.05); }

/* İçerik seçimi (sayfa yenilemeden) */
:root.c-arabic #ayahs .trs, :root.c-arabic #ayahs .flow-trs { display: none; }
:root.c-meal #ayahs .ar, :root.c-meal #ayahs .basmala { display: none; }
:root.c-meal #ayahs .tr { color: var(--ink); }

/* ---------- Bütün sure / mushaf akışı ---------- */
.mpage { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 18px 16px 10px; margin: 14px 0 18px; box-shadow: var(--shadow); }
.ar.flow { text-align: justify; text-align-last: center; margin: 0; line-height: calc(2.3 * var(--lh)); }
.fa { cursor: pointer; border-radius: 6px; scroll-margin-top: 28px; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.fa:hover, .fa:focus-visible { background: var(--primary-soft); outline: none; }
.fa.is-playing { background: var(--mark); }
.fa.is-target { background: var(--accent-soft); }
.sajda-mark { color: var(--accent); }
.flow-trs { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line-strong); display: grid; gap: 8px; }
.flow-trs .tr { font-size: calc(var(--tr-size) * .95); }
.tr-no { display: inline-block; min-width: 1.8em; margin-right: 6px; font-size: 12px; font-weight: 700; color: var(--accent); text-decoration: none; font-variant-numeric: tabular-nums; }
.mpage-foot { text-align: center; font-size: 12.5px; color: var(--muted); margin-top: 12px; }
.mpage-foot a { color: inherit; }
.surah-band { text-align: center; margin: 22px 0 10px; padding: 10px 0 0; border-top: 3px double color-mix(in srgb, var(--accent) 65%, transparent); }
.mpage .surah-band { margin-top: 6px; }
.mpage .surah-band:first-child { border-top: 0; margin-top: 0; }
.band-link { display: inline-flex; flex-direction: column; align-items: center; text-decoration: none; color: var(--ink); }
.band-ar { font-family: "Amiri Quran", var(--ar-font); font-size: 30px; color: var(--primary); line-height: 1.6; }
.band-tr { font-weight: 650; font-size: 15px; }
.band-tr small { display: block; font-weight: 400; color: var(--muted); font-size: 12.5px; }
.surah-band .basmala { margin-top: 6px; padding-top: 6px; }
.surah-band .basmala::before { display: none; }
.mushaf-nav { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 10px 0 0; }
.mn-label { font-size: 14px; color: var(--muted); text-align: center; }
.mn-label strong { color: var(--ink); }
.mushaf .mpage { padding: 22px 18px 12px; }

/* ---------- Gezinme (sayfa ile sayfa arası) ---------- */
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 26px 0 8px; }
.pg { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--ink); text-decoration: none; min-height: 60px; }
.pg:hover { border-color: var(--primary); }
.pg small { display: block; color: var(--muted); font-size: 12px; }
.pg span { min-width: 0; font-weight: 600; font-size: 15px; }
.pg.next { justify-content: flex-end; text-align: right; grid-column: 2; }
.pager.numbered { grid-template-columns: 1fr auto 1fr; align-items: center; }
.pager.numbered .pg.next { grid-column: 3; }
.pg-info { color: var(--muted); font-size: 14px; }

/* ---------- Tek ayet sayfası ---------- */
.ayah-quick { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 18px; }
.tafsir-box { border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 16px; background: var(--surface); }
.tafsir-box h2 { font-size: 17px; margin-bottom: 8px; }
.tf-list { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 8px; }
.tf-list a { display: grid; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; text-decoration: none; color: var(--ink); }
.tf-list a:hover { border-color: var(--primary); }
.tf-list span { font-size: 14px; color: var(--ink-2); }
.tf-list small { color: var(--muted); font-size: 12.5px; }

/* ---------- Alt sekme çubuğu ---------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; height: calc(var(--tab-h) + var(--safe-b)); padding-bottom: var(--safe-b);
  display: grid; grid-template-columns: repeat(5, 1fr); background: color-mix(in srgb, var(--surface) 94%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-top: 1px solid var(--line);
}
.tabbar button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; border: 0; background: none; color: var(--muted); font-size: 11.5px; font-weight: 550; }
.tabbar button[aria-pressed="true"], .tabbar button:active { color: var(--primary); }

/* ---------- Ses oynatıcı ---------- */
.player {
  position: fixed; left: 0; right: 0; bottom: calc(var(--tab-h) + var(--safe-b)); z-index: 44;
  background: var(--surface); border-top: 1px solid var(--line); box-shadow: 0 -10px 30px -18px rgb(0 0 0 / 35%);
}
.pl-progress { height: 3px; background: var(--line); }
.pl-progress span { display: block; height: 100%; width: 0; background: var(--primary); transition: width .25s linear; }
.pl-mini { display: flex; align-items: center; gap: 4px; padding: 6px 8px; height: 62px; }
.pl-main { width: 48px; height: 48px; border-radius: 50%; border: 0; background: var(--primary); color: var(--primary-ink); display: grid; place-items: center; flex: none; }
.player .when-playing { display: none; }
.player.is-playing .when-playing { display: block; }
.player.is-playing .when-paused { display: none; }
.player.is-loading .pl-main { opacity: .7; }
.pl-label { flex: 1; min-width: 0; text-align: left; border: 0; background: none; padding: 4px 8px; }
.pl-label strong, .pl-label small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-label strong { font-size: 15px; }
.pl-label small { color: var(--muted); font-size: 12.5px; }
.pl-panel { padding: 4px 16px 14px; border-top: 1px solid var(--line); max-height: 60dvh; overflow: auto; }
.pl-transport { display: flex; align-items: center; justify-content: center; gap: 6px; }
.pl-time { font-variant-numeric: tabular-nums; color: var(--muted); font-size: 13px; min-width: 96px; text-align: center; }
.pl-opts { margin-top: 8px; }
.pl-range { margin: 10px 0 0; border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px 10px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.pl-range legend { font-size: 13px; color: var(--muted); padding: 0 4px; }
.pl-range input { width: 80px; }
.pl-range select { width: auto; flex: 1; min-width: 100px; }
.pl-note { font-size: 12.5px; color: var(--muted); }
.player.is-expanded .pl-mini [id="pl-expand"] svg { transform: rotate(180deg); }

/* ---------- Sayfalar (dialog / bottom sheet) ---------- */
dialog { border: 0; padding: 0; color: var(--ink); background: var(--surface); }
dialog::backdrop { background: rgb(8 14 12 / 45%); }
dialog.sheet { width: 100%; max-width: 100%; margin: auto 0 0; max-height: 88dvh; border-radius: var(--radius-lg) var(--radius-lg) 0 0; box-shadow: var(--shadow-lg); padding-bottom: var(--safe-b); }
dialog.sheet.tall { height: 88dvh; }
dialog.sheet[open] { display: flex; flex-direction: column; }
@media (prefers-reduced-motion: no-preference) {
  dialog.sheet[open] { animation: sheet-in .18s ease-out; }
  @keyframes sheet-in { from { transform: translateY(24px); } to { transform: none; } }
}
.sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 8px 6px 18px; flex: none; }
.sheet-head::before { content: ""; position: absolute; top: 6px; left: 50%; width: 38px; height: 4px; margin-left: -19px; border-radius: 4px; background: var(--line-strong); }
.sheet-head h2 { font-size: 17px; }
.sheet-body { padding: 6px 18px 20px; overflow: auto; overscroll-behavior: contain; flex: 1; }
.menu { list-style: none; margin: 0; padding: 0; }
.menu button, .menu a { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 50px; padding: 0 6px; border: 0; background: none; text-align: left; color: var(--ink); text-decoration: none; font-size: 15.5px; border-radius: 10px; }
.menu button:hover, .menu a:hover { background: var(--bg-tint); }
.menu svg { color: var(--muted); }

/* Gezinme paneli */
.nav { overflow: hidden; }
.nav-scroll { flex: 1; overflow: auto; overscroll-behavior: contain; padding: 4px 14px 24px; } /* üst boşluk: odak çerçevesi kesilmesin */
.goto { position: relative; margin: 0 0 6px; }
.goto input { padding-left: 38px; }
.goto-icon { position: absolute; left: 12px; top: 13px; color: var(--muted); pointer-events: none; }
.tabs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 4px; margin: 0 0 6px; padding: 4px; background: var(--bg-tint); border-radius: 12px; flex: none; }
.tabs button { border: 0; background: none; min-height: 36px; border-radius: 9px; font-weight: 600; font-size: 14px; color: var(--muted); }
.tabs button[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgb(0 0 0 / 8%); }
/* Panel bölümleri (Tanzil'deki kutular gibi) */
.pane { border-top: 1px solid var(--line); }
.pane-title { display: flex; align-items: center; min-height: 40px; margin: 4px 0 0; font-size: 12.5px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); outline-offset: 2px; }
.pane-body { padding: 2px 0 16px; }
.nav-grid { display: grid; grid-template-columns: 46px 32px minmax(0, 1fr) 32px; align-items: center; gap: 8px 4px; }
.nav-grid label { font-size: 14px; font-weight: 600; color: var(--ink-2); }
.nav-grid select { min-height: 40px; }
.ib.xs { width: 32px; height: 40px; border-radius: 10px; color: var(--muted); }
.ib.xs:hover { color: var(--primary); }
.reset-btn { margin-top: 4px; width: 100%; }
.slist { list-style: none; margin: 0; padding: 0; }
.srow { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 8px 8px; border-radius: 12px; text-decoration: none; color: var(--ink); min-height: 54px; }
.srow:hover { background: var(--bg-tint); }
.srow.is-current { background: var(--primary-soft); }
.snum { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--bg-tint); font-size: 13px; font-weight: 650; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.is-current .snum { background: var(--primary); color: var(--primary-ink); }
.sname { font-weight: 600; font-size: 15px; min-width: 0; }
.sname small { display: block; font-weight: 400; color: var(--muted); font-size: 12.5px; }
.sar { font-family: "Amiri Quran", var(--ar-font); font-size: 21px; color: var(--primary); line-height: 1.4; }
.empty { color: var(--muted); padding: 16px 12px; }
.grid-list { list-style: none; margin: 4px 6px; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.gcell { display: grid; place-items: center; aspect-ratio: 1; border: 1px solid var(--line); border-radius: 12px; text-decoration: none; color: var(--ink); }
.gcell strong { font-size: 18px; line-height: 1; }
.gcell small { color: var(--muted); font-size: 11.5px; }
.gcell:hover { border-color: var(--primary); }
.gcell.is-current { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.gcell.is-current small { color: inherit; opacity: .8; }

/* Ayarlar */
.settings { display: grid; gap: 12px; }
.set-h { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-top: 6px; }
.seg-field { border: 0; padding: 0; margin: 0; }
/* Osmanî / İmlâî seçimi yalnızca Noto Sans Arabic ile. */
.script-seg { display: none !important; }
:root.f-sans .script-seg { display: grid !important; }
.seg-field legend { font-size: 14px; font-weight: 600; margin-bottom: 6px; padding: 0; }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 4px; background: var(--bg-tint); border-radius: 12px; }
.seg button { border: 0; background: none; min-height: 40px; border-radius: 9px; font-size: 13.5px; font-weight: 550; color: var(--ink-2); padding: 0 4px; white-space: nowrap; }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--primary); box-shadow: 0 1px 3px rgb(0 0 0 / 10%); font-weight: 650; }
.field { display: grid; gap: 6px; font-size: 14px; font-weight: 600; }
.range-field { display: grid; grid-template-columns: 1fr auto; gap: 4px 8px; font-size: 14px; font-weight: 600; }
.range-field output { color: var(--muted); font-weight: 500; font-variant-numeric: tabular-nums; }
.range-field input { grid-column: 1 / -1; width: 100%; accent-color: var(--primary); height: 32px; }

/* Arama */
.search-form { display: grid; grid-template-columns: 1fr; gap: 8px; padding: 0 18px 8px; flex: none; }
.search-page-form { display: grid; grid-template-columns: 1fr; gap: 8px; margin: 8px 0 16px; }
.results { margin-top: 4px; }
.ref-hit { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--radius); background: var(--primary); color: var(--primary-ink); text-decoration: none; margin-bottom: 12px; font-weight: 650; }
.ref-hit span { flex: 1; }
.ref-hit small { display: block; font-weight: 500; opacity: .85; font-size: 12.5px; }
.s-hits { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 6px; }
.s-hits a { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 12px; text-decoration: none; color: var(--ink); }
.res-count { color: var(--muted); font-size: 13.5px; margin: 8px 0; }
.hits { list-style: none; margin: 0; padding: 0; }
.hit { padding: 14px 0; border-bottom: 1px solid var(--line); }
.hit-ref { font-weight: 650; font-size: 14px; text-decoration: none; }
.hit .ar { font-size: calc(var(--ar-size) * .8); margin: 6px 0; }
.hit .tr { font-size: 15.5px; }
.hit-go { display: inline-flex; align-items: center; gap: 2px; font-size: 13.5px; margin-top: 6px; text-decoration: none; }
mark { background: var(--mark); color: inherit; border-radius: 3px; padding: 0 1px; }

/* Kaldığın yer */
.saved-last { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: var(--radius); background: var(--primary-soft); text-decoration: none; color: var(--ink); margin-bottom: 14px; }
.saved-last small { display: block; color: var(--muted); font-size: 12.5px; }
.saved-last strong { display: block; }

/* Bildirim */
.toast { position: fixed; left: 50%; bottom: calc(var(--tab-h) + var(--player-h) + var(--safe-b) + 14px); transform: translate(-50%, 20px); z-index: 60; background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 999px; font-size: 14.5px; opacity: 0; pointer-events: none; transition: opacity .15s, transform .15s; max-width: calc(100vw - 32px); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* Metin sayfaları */
.prose { max-width: 720px; margin: 12px auto; }
.prose h1 { font-size: 26px; margin: 10px 0 12px; }
.prose h2 { font-size: 18px; margin: 26px 0 8px; }
.prose.center { text-align: center; }
.prose details { margin: 8px 0; }
.prose summary { cursor: pointer; color: var(--primary); }
.notice-block { white-space: pre-wrap; font-size: 12px; background: var(--bg-tint); padding: 12px; border-radius: 12px; overflow-x: auto; }
.mono code { font-size: 12.5px; }

/* ---------- Tablet ---------- */
@media (min-width: 600px) {
  .search-form, .search-page-form { grid-template-columns: 1fr 220px; }
  .search-page-form { grid-template-columns: 1fr 220px auto; }
  .brand-text { display: block; }
  .grid-list { grid-template-columns: repeat(6, 1fr); }
}
@media (min-width: 768px) {
  .main { padding-left: 24px; padding-right: 24px; }
  .topbar { padding: 0 14px; gap: 12px; }
  .locator { flex: 0 1 380px; margin: 0 auto; }
  dialog.sheet { margin: auto; max-width: 560px; border-radius: var(--radius-lg); max-height: 82dvh; }
  dialog.sheet.tall { height: 82dvh; max-width: 680px; }
  .sheet-head::before { display: none; }
  .player { left: 50%; right: auto; width: min(760px, calc(100vw - 32px)); transform: translateX(-50%); border: 1px solid var(--line); border-radius: 18px; bottom: calc(var(--tab-h) + var(--safe-b) + 10px); overflow: hidden; }
  .sh-ar { font-size: 52px; }
  .mpage { padding: 26px 30px 14px; }
}

/* ---------- Masaüstü ---------- */
@media (min-width: 1024px) {
  .tabbar { display: none; }
  .desk { display: inline-grid; }
  .shell { display: grid; grid-template-columns: 340px minmax(0, 1fr); }
  /* Metin sütunu kalan alanı doldurur (en çok 1100 px); kenar çubuğunun yanında boş bant kalmaz. */
  .main { max-width: 1100px; padding-left: 40px; padding-right: 40px; }
  .site-foot { max-width: 1100px; }
  .ayah .trs, .flow-trs { max-width: 82ch; }
  .pl-opts { display: none; }
  .main, .site-foot { width: 100%; }
  .site-foot { grid-column: 2; }
  /* Gezinme paneli masaüstünde kalıcı kenar çubuğu olur. */
  dialog.nav, dialog.nav:not([open]) {
    display: flex; animation: none; flex-direction: column; position: sticky; top: var(--top-h); height: calc(100dvh - var(--top-h)); max-height: none;
    width: auto; max-width: none; margin: 0; border-radius: 0; box-shadow: none; border-right: 1px solid var(--line); background: var(--bg); animation: none; z-index: 1; inset: var(--top-h) auto auto auto; align-self: start;
  }
  dialog.nav .sheet-close, dialog.nav .sheet-head::before { display: none; }
  dialog.nav .sheet-head { padding-top: 14px; }
  .player { bottom: 16px; left: calc(50% + 170px); width: min(760px, calc(100vw - 400px)); }
  .toast { left: calc(50% + 170px); }
  .ayah-tools .ib.sm { opacity: .55; }
  .ayah:hover .ayah-tools .ib.sm, .ayah-tools .ib.sm:focus-visible { opacity: 1; }
}
@media (min-width: 1400px) {
  .shell { grid-template-columns: 370px minmax(0, 1fr); }
  .player, .toast { left: calc(50% + 185px); }
}

@media print {
  .topbar, .tabbar, .player, .nav, .ayah-tools, .sh-actions, .pager, .toast, dialog { display: none !important; }
  .main { padding: 0; }
}
