:root {
  --bg: #efe4d0;
  --bg-2: #f7f1e6;
  --card: #fffaf2;
  --ink: #1c1712;
  --muted: #655c52;
  --green: #0e5c43;
  --green-deep: #0c3328;
  --gold: #8a6428;
  --gold-soft: #e7d3a4;
  --line: #e4d5bc;
  --amber: #8a5412;
  --amber-bg: #f6e3c4;
  --done-bg: #dceadf;
  --shadow: 0 18px 40px rgba(48, 30, 10, 0.08);
  --ar: 2.15rem;
  --size-ar: 2.15rem;
  --size-ok: 1.76rem;
  --size-meal: 0.95rem;
  --radius: 5px;
  --safe: env(safe-area-inset-bottom);
  font-synthesis: none;
}

* { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  overflow-x: clip;
  max-width: 100%;
}
body {
  margin: 0;
  overflow-x: clip;
  max-width: 100%;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% -10%, rgba(232, 208, 150, 0.7), transparent 36%),
    radial-gradient(circle at 100% 0%, rgba(15, 92, 67, 0.08), transparent 28%),
    var(--bg);
  font-family: "Source Sans 3", "Segoe UI", sans-serif;
  line-height: 1.45;
}
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }

#app { overflow-x: clip; max-width: 100%; }
.wrap { width: min(1040px, calc(100% - 28px)); max-width: 100%; margin: 0 auto; }
.top {
  background: var(--green-deep);
  color: #f6edd9;
  border-bottom: 2px solid #c6a15a;
  height: 80px;
  min-height: 80px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}
.top::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 90% 120% at 12% -30%, rgba(198, 161, 90, 0.16), transparent 55%);
  pointer-events: none;
}
.top-inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px 14px;
  padding: 0;
  height: 80px;
  min-height: 80px;
  box-sizing: border-box;
  flex-wrap: nowrap;
}
.brand { display: flex; gap: 10px; align-items: center; background: none; border: 0; color: inherit; padding: 0; text-align: left; }
.mark {
  width: 36px; height: 36px;
  flex-shrink: 0;
  display: block;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.18);
}
.mark img, .mark svg { width: 36px; height: 36px; display: block; }
.brand > span:last-child {
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.brand strong { display: inline; font-family: Literata, Georgia, serif; font-size: 1.08rem; letter-spacing: -0.02em; line-height: 1.15; }
.brand small { color: #d9cbb0; font-size: 0.82rem; }
.domain { color: #d9cbb0; font-size: 0.8rem; }
.site-nav {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 5px;
  max-width: min(72vw, 640px);
  overflow-x: auto;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 2px 0;
  mask-image: linear-gradient(90deg, transparent, #000 12px, #000 calc(100% - 12px), transparent);
}
.site-nav::-webkit-scrollbar { display: none; }
.site-nav a {
  color: #f6edd9;
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  padding: 7px 11px;
  border-radius: 999px;
  border: 1px solid rgba(246, 237, 217, 0.14);
  background: rgba(0, 0, 0, 0.12);
  white-space: nowrap;
  flex-shrink: 0;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.site-nav a:hover {
  background: rgba(198, 161, 90, 0.14);
  border-color: rgba(198, 161, 90, 0.45);
  color: #fff;
}
.site-nav a.is-on {
  background: rgba(198, 161, 90, 0.28);
  border-color: #c6a15a;
  color: #fff;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.12);
}
.top-inner { flex-wrap: nowrap; }
.brand { min-width: 0; margin-right: auto; }
@media (min-width: 900px) {
  .site-nav { max-width: none; flex: 1; justify-content: flex-end; mask-image: none; }
  .site-nav a { font-size: 0.8rem; padding: 8px 12px; }
}
@media (max-width: 720px) {
  .top, .top-inner { height: 80px; min-height: 80px; }
  .site-nav { max-width: 58vw; }
  .site-nav a { padding: 6px 9px; font-size: 0.74rem; }
  .brand strong { font-size: 0.98rem; }
  .brand small { display: none; }
}

.hero { padding: 12px 0 2px; }
.hero-top {
  display: flex;
  flex-wrap: nowrap;
  align-items: baseline;
  gap: 0.5rem 0.75rem;
  min-width: 0;
  overflow: hidden;
}
.hero-top h1 {
  font-size: clamp(1.15rem, 3vw, 2rem);
  line-height: 1.12;
  max-width: none;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hero-top .eyebrow { margin: 0; flex-shrink: 0; }
.eyebrow { margin: 0 0 4px; letter-spacing: 0.12em; text-transform: uppercase; font-size: 0.7rem; color: var(--gold); font-weight: 700; }
h1, h2, h3 { font-family: Literata, Georgia, serif; font-weight: 560; letter-spacing: -0.03em; margin: 0; }
h1 { font-size: clamp(1.65rem, 3.4vw, 2.55rem); line-height: 1.08; max-width: 18ch; }
.lede { max-width: 46rem; color: var(--muted); font-size: 0.96rem; margin: 6px 0 0; }

.resume, .stats, .panel, .card, .ayah, .toolbar, .player {
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.resume {
  margin: 10px 0;
  border-radius: var(--radius);
  padding: 11px 13px;
  display: flex; justify-content: space-between; gap: 10px; align-items: center;
  background: linear-gradient(180deg, #fffaf2, #f3ecdf);
}
.resume h2 { font-size: 1.15rem; }
.stats { margin: 6px 0 10px; border-radius: var(--radius); display: grid; grid-template-columns: repeat(3, 1fr); }
.stat { padding: 9px 11px; }
.stat + .stat { border-left: 1px solid var(--line); }
.stat b { display: block; font-family: Literata, Georgia, serif; font-size: 1.35rem; color: var(--green); line-height: 1.1; }
.stat span { color: var(--muted); font-size: 0.84rem; }

.filters {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  overflow-y: hidden;
  max-width: 100%;
  min-width: 0;
  padding-bottom: 6px;
  -webkit-overflow-scrolling: touch;
}
.chip, .seg button, .ghost, .solid, .player button {
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: #fff;
}
.chip, .seg button { padding: 6px 10px; white-space: nowrap; font-size: 0.92rem; }
.chip.is-on, .seg button[aria-pressed="true"], .solid {
  background: var(--green-deep);
  color: #f6edd9;
  border-color: var(--green-deep);
}
.search { width: 100%; margin: 4px 0 10px; padding: 9px 12px; border-radius: var(--radius); border: 1px solid var(--line); background: #fff; }

.home-intro { padding-bottom: 28px; }
.intro-hero { padding: 14px 0 10px; }
.intro-hero h1 { font-size: clamp(1.35rem, 3.2vw, 2rem); max-width: none; white-space: normal; }
.intro-grid { display: grid; gap: 10px; margin: 12px 0; }
@media (min-width: 640px) { .intro-grid { grid-template-columns: 1fr 1fr; } }
.intro-card {
  text-align: left;
  padding: 14px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--card);
  box-shadow: var(--shadow);
  display: grid;
  gap: 6px;
}
.intro-card strong { font-family: Literata, Georgia, serif; font-size: 1.12rem; color: var(--green-deep); }
.intro-card span { color: var(--muted); font-size: 0.9rem; line-height: 1.35; }
.intro-pick.panel {
  border-radius: var(--radius);
  padding: 12px 14px;
  margin: 8px 0 12px;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.intro-pick-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; margin-top: 6px; }
.intro-pick-row select { padding: 9px 10px; border-radius: var(--radius); border: 1px solid var(--line); background: #fff; font-size: 0.94rem; min-width: 0; }
.intro-resume { margin-top: 4px; }
.intro-skip { text-align: center; margin: 16px 0 0; }
.intro-skip .ghost { padding: 8px 14px; }

.quiz-cta {
  margin: 10px 0;
  border-radius: var(--radius);
  padding: 12px 14px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  background: linear-gradient(180deg, #e8f3ec, #fffaf2);
}
.quiz-cta h2 { font-size: 1.1rem; margin: 0 0 4px; }
.quiz-page { padding-bottom: 24px; }
.quiz-stats { margin: 10px 0; border-radius: var(--radius); display: grid; grid-template-columns: repeat(3, 1fr); }
.quiz-card { margin: 10px 0; padding: 14px 16px; border-radius: var(--radius); }
.quiz-card h1 { font-size: 1.2rem; margin: 4px 0 12px; max-width: none; }
.quiz-prompt {
  margin: 0 0 14px;
  padding: 12px 14px;
  border-left: 3px solid var(--green);
  background: #f4f0e8;
  border-radius: var(--radius);
  font-size: 1.02rem;
  line-height: 1.5;
}
.quiz-prompt.is-okunus { text-align: right; font-weight: 600; direction: ltr; }
.quiz-prompt.is-meal { font-family: "Source Serif 4", Georgia, serif; }
.quiz-reveal { color: var(--green); font-weight: 700; margin: 0 0 12px; }
.quiz-options { display: grid; gap: 8px; }
.quiz-opt {
  text-align: left;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  font-size: 1rem;
}
.quiz-opt.is-correct { background: var(--done-bg); border-color: var(--green); color: var(--green-deep); font-weight: 700; }
.quiz-opt.is-wrong { background: #fde8e8; border-color: #c45; }
.quiz-opt:disabled { cursor: default; opacity: 1; }
.quiz-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.top-quiz-exit { color: #f6edd9; border-color: rgba(255,255,255,0.25); }
.section-title { margin: 2px 0 8px; font-size: 1.08rem; }
.grid { display: grid; grid-template-columns: 1fr; gap: 12px; margin-bottom: 22px; }
.card { border-radius: var(--radius); padding: 0; overflow: hidden; position: relative; }
.card button.open {
  width: 100%; text-align: left; background: transparent; border: 0; padding: 14px 14px 12px;
}
.card-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: baseline;
  flex-wrap: nowrap;
  min-width: 0;
}
.card-ar {
  font-family: "Scheherazade New", serif;
  font-size: 1.7rem;
  line-height: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.card-tr {
  font-family: Literata, Georgia, serif;
  font-size: 1.2rem;
  flex-shrink: 0;
  white-space: nowrap;
}
.card-meta { color: var(--muted); font-size: 0.92rem; }
.bar { margin-top: 10px; height: 6px; border-radius: var(--radius); background: #efe4d0; display: flex; overflow: hidden; }
.bar i { display: block; height: 100%; }
.bar .done { background: var(--green); }
.bar .learn { background: #d39a45; }
.done-pill {
  display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: var(--radius);
  background: var(--done-bg); color: var(--green); font-size: 0.75rem; font-weight: 700;
}
.grid .card:only-child { grid-column: 1 / -1; }
.here { color: var(--gold); font-weight: 700; font-size: 0.8rem; }

.study-head {
  padding: 8px 0 4px;
  display: flex;
  flex-wrap: nowrap;
  align-items: baseline;
  gap: 0.45rem 0.55rem;
  min-width: 0;
  overflow: hidden;
}
.study-head h1 {
  font-size: clamp(1rem, 2.4vw, 1.35rem);
  line-height: 1.15;
  margin: 0;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.study-head .study-meta {
  font-size: 0.8rem;
  margin: 0;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
}
.study-head .ar-name {
  font-family: "Scheherazade New", serif;
  font-size: clamp(1.05rem, 2.6vw, 1.45rem);
  line-height: 1;
  margin: 0;
  flex-shrink: 0;
  max-width: 38%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ar-name { font-family: "Scheherazade New", serif; font-size: 1.55rem; line-height: 1; }
.back { background: transparent; border: 0; color: var(--green); padding: 0; font-weight: 700; font-size: 0.92rem; white-space: nowrap; flex-shrink: 0; }
.solid, .ghost { padding: 7px 11px; font-size: 0.92rem; }
.ghost { background: transparent; }

.toolbar-shell { margin-bottom: 4px; }

.toolbar-head { display: flex; align-items: stretch; }
.toolbar-head .toolbar-toggle { flex: 1 1 auto; min-width: 0; border-top-right-radius: 0; border-bottom-right-radius: 0; }
.toolbar-pin {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-left: 0;
  background: #fff;
  color: var(--green-deep);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 0 var(--radius) var(--radius) 0;
  box-shadow: var(--shadow);
}
.toolbar-shell:not(.is-collapsed) .toolbar-pin {
  border-bottom-right-radius: 0;
  border-bottom-color: transparent;
  box-shadow: none;
}
.toolbar-pin.is-on { background: var(--green-deep); color: #f6edd9; border-color: var(--green-deep); }
.toolbar-shell.is-pinned {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(1040px, calc(100% - 28px));
  z-index: 4;
}
.toolbar-shell.is-pinned .toolbar {
  max-height: calc(100vh - 150px);
  overflow: auto;
  background: var(--card);
}
.toolbar-pin-spacer[hidden] { display: none !important; }
.toolbar-toggle {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow);
  text-align: left;
  min-height: 0;
}
.toolbar-toggle-title { font-family: Literata, Georgia, serif; font-weight: 560; font-size: 1rem; }
.toolbar-toggle-meta { color: var(--muted); font-size: 0.86rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.toolbar-shell.is-collapsed .toolbar-toggle { margin-bottom: 0; }
.toolbar-shell:not(.is-collapsed) .toolbar-toggle {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  border-bottom-color: transparent;
  margin-bottom: 0;
}
.toolbar-shell .toolbar {
  border-top-left-radius: 0;
  border-top-right-radius: 0;
  margin-top: 0;
}
.toolbar-shell.is-collapsed .toolbar,
.toolbar[hidden] {
  display: none !important;
}
.toolbar { border-radius: var(--radius); padding: 6px 8px; display: grid; gap: 4px; margin-bottom: 4px; }
.field label, .block-label { display: block; font-size: 0.68rem; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; color: var(--gold); margin-bottom: 2px; }
select, input[type="range"] { width: 100%; }
input[type="range"] { min-height: 22px; accent-color: var(--green); }
select { padding: 3px 8px; border-radius: var(--radius); border: 1px solid var(--line); background: #fff; font-size: 0.86rem; }
.seg { display: flex; flex-wrap: wrap; gap: 4px; }
.layers { display: flex; flex-wrap: wrap; gap: 4px; }
.toolbar .chip, .toolbar .seg button, .toolbar .solid { padding: 4px 12px; font-size: 0.84rem; line-height: 1.3; }
.note { color: var(--muted); font-size: 0.92rem; margin: 8px 0 0; }

.besmele, .ayah { border-radius: var(--radius); padding: 14px 16px; margin: 12px 0; }
.besmele { margin-top: 6px; }
.besmele { background: transparent; border: 0; box-shadow: none; padding: 0; margin: 2px 0 8px; }
.besmele .layer-ar { display: block; text-align: center; margin: 0; }
body:not(.show-ar) .besmele .layer-ar { display: block; }
.ayah.is-active {
  border-color: #b9893e;
  box-shadow: inset 0 0 0 2px rgba(185, 137, 62, 0.28), var(--shadow);
}
.ayah-merged { padding: 0; overflow: hidden; }
.ayah-merged .merged-tools-host {
  padding: 7px 10px;
  border-bottom: 1px solid var(--line);
  background: #f8f2e8;
}
.ayah-merged .merged-body { padding: 6px 16px 14px; }
.merged-flow { margin: 10px 0 0; }
.merged-flow .ayah-piece {
  display: inline;
  padding: 0;
  border: 0;
  background: transparent;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}
.merged-flow .ayah-piece.is-active { background: rgba(185, 137, 62, 0.16); border-radius: 0.2em; }
.piece-ar > .layer-ar { display: inline; margin: 0; }
.merged-flow .segment-pick {
  display: inline-grid;
  place-items: center;
  width: 1.35rem;
  height: 1.35rem;
  margin: 0 0.16rem;
  padding: 0;
  vertical-align: middle;
  border-radius: var(--radius);
  border: 1.5px solid var(--gold);
  background: #fff;
  color: var(--green-deep);
  font-family: Literata, Georgia, serif;
  font-weight: 600;
  font-size: 0.7rem;
  line-height: 1;
}
.merged-flow .segment-pick.is-on {
  background: var(--green-deep);
  color: #f6edd9;
  border-color: var(--green-deep);
}
.piece-num { color: var(--green-deep); font-weight: 700; }
.ayah-tools {
  display: flex;
  justify-content: space-between;
  gap: 4px;
  align-items: center;
  min-width: 0;
  max-width: 100%;
}
.left-tools, .marks, .right-tools {
  display: flex;
  gap: 4px;
  align-items: center;
  min-width: 0;
  max-width: 100%;
}
.merged-tools-host .ayah-tools { flex-wrap: wrap; }
.right-tools { flex-wrap: wrap; justify-content: flex-end; }
.num {
  width: 26px; height: 26px; border-radius: var(--radius); display: grid; place-items: center;
  font-size: 0.82rem;
  border: 1.5px solid var(--gold); color: var(--green-deep); font-family: Literata, Georgia, serif;
}
.repeat-left {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--amber);
  background: var(--amber-bg);
  border: 1px solid #d4a85a;
  border-radius: var(--radius);
  padding: 4px 8px;
  white-space: nowrap;
}
.repeat-left[hidden] { display: none !important; }
.icon, .marks button { border: 1px solid var(--line); background: #fff; border-radius: var(--radius); padding: 2px 7px; font-size: 0.78rem; line-height: 1.2; }
.icon[aria-pressed="true"] { background: var(--gold-soft); }
.marks button[aria-pressed="true"] { background: var(--green-deep); color: #f6edd9; border-color: var(--green-deep); }
.marks button[data-state="learn"][aria-pressed="true"] { background: var(--amber); border-color: var(--amber); }
.layer-ar {
  font-family: "Scheherazade New", serif;
  font-size: var(--size-ar);
  line-height: 2.05;
  text-align: right;
  direction: rtl;
  margin: 8px 0 2px;
  overflow-wrap: anywhere;
  word-break: break-word;
  max-width: 100%;
}
.layer-words { max-width: 100%; }
.layer-words .wbw {
  display: inline-block;
  padding: 0.06em 0.14em;
  margin: 0 0.04em;
  border-radius: var(--radius);
  transition: background 0.12s ease, color 0.12s ease, box-shadow 0.12s ease;
}
.layer-words .wbw.is-on {
  background: var(--gold-soft);
  color: var(--green-deep);
  box-shadow: 0 0 0 2px rgba(185, 137, 62, 0.35);
}
.reciter-select {
  width: 100%;
  padding: 6px 8px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: #fff;
  font-size: 0.9rem;
}
body.route-study { padding-bottom: calc(128px + var(--safe)); }
body.route-study.player-collapsed { padding-bottom: calc(48px + var(--safe)); }
body.route-study.player-collapsed .ayah,
body.route-study.player-collapsed .part,
body.route-study.player-collapsed .toolbar { scroll-margin-bottom: 100px; }
.layer-ok {
  font-size: var(--size-ok);
  line-height: 1.45;
  font-weight: 600;
  color: #243028;
  text-align: right;
  margin: 0 0 10px;
  overflow-wrap: break-word;
}
.layer-meal {
  font-family: "Source Serif 4", Georgia, serif;
  font-size: var(--size-meal);
  line-height: 1.45;
  color: #6d645b;
  text-align: left;
  margin: 4px 0 0;
}
body:not(.show-ar) .layer-ar, body:not(.show-ok) .layer-ok, body:not(.show-meal) .layer-meal { display: none; }
body:not(.ok-marked) .ok-marked, body.ok-marked .ok-plain { display: none; }
.box-hide {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: var(--radius);
  padding: 2px 7px;
  min-height: 0;
  font-size: 0.78rem;
  line-height: 1.2;
  font-weight: 700;
}
.box-hide.is-on { background: var(--green-deep); color: #f6edd9; border-color: var(--green-deep); }
.ayah.is-hidden .ayah-body,
.ayah-segment.is-hidden .ayah-body,
.ayah-piece.is-hidden,
.besmele.is-hidden .besmele-body { filter: blur(9px); user-select: none; cursor: pointer; }

.part { margin: 10px 0 6px; }
.part + .part { margin-top: 22px; }
.part-head { display: flex; justify-content: space-between; align-items: center; gap: 6px; margin: 0 0 2px; min-width: 0; }
.part-head h2 {
  font-size: 1.02rem;
  margin: 0;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.part-head .ghost { flex-shrink: 0; white-space: nowrap; }
.part.is-active .part-head h2 { color: var(--green); }
.part-nav { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0; max-width: 100%; }
.part-nav button {
  flex: 1 1 8rem;
  min-width: 0;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: var(--radius);
  padding: 6px 10px;
  font-size: 0.9rem;
}
.part-nav button:disabled { opacity: 0.45; }
.part-badge { font-size: 0.82rem; color: var(--muted); white-space: nowrap; flex-shrink: 0; }
.ayah-pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 6px 0 10px;
  padding: 8px 10px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: rgba(255, 250, 242, 0.85);
}
.ayah-pager-meta { font-size: 0.86rem; color: var(--muted); text-align: center; flex: 1 1 auto; }
.ayah-pager button { border: 1px solid var(--line); background: #fff; border-radius: var(--radius); padding: 6px 10px; font-size: 0.88rem; }
.ayah-pager button:disabled { opacity: 0.45; }
.save-row { display: flex; justify-content: flex-end; margin-top: 1px; }
.sizes { display: grid; gap: 1px; }
.size-row { display: grid; grid-template-columns: 3.4rem 24px minmax(0, 1fr) 24px 2.4rem; gap: 3px; align-items: center; font-size: 0.8rem; }
.size-row button { width: 24px; height: 24px; border: 1px solid var(--line); background: #fff; border-radius: var(--radius); padding: 0; font-size: 0.85rem; }
.size-row output { text-align: right; font-variant-numeric: tabular-nums; }
.footer { color: var(--muted); font-size: 0.88rem; padding: 8px 0 40px; }
.footer p { margin: 0 0 8px; }

.player-shell {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 5;
  width: 100%;
  max-width: 100%;
  display: none;
}
body.route-study .player-shell { display: block; }
.player-toggle {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 4px 12px;
  border: 0;
  border-top: 2px solid #c6a15a;
  border-radius: var(--radius) var(--radius) 0 0;
  background: var(--green-deep);
  color: #f6edd9;
  text-align: left;
  min-height: 0;
}
.player-toggle-title { font-weight: 600; font-size: 0.82rem; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.player-toggle-now { font-weight: 500; color: #d9cbb0; }
.player-toggle-meta { color: #d9cbb0; font-size: 0.76rem; white-space: nowrap; flex-shrink: 0; }
.player-shell.is-collapsed .player-toggle-meta { color: var(--gold-soft); }
.player {
  width: 100%;
  max-width: 100%;
  border-left: 0;
  border-right: 0;
  border-bottom: 0;
  border-radius: 0;
  padding: 4px 12px calc(4px + var(--safe));
  border-top: 1px solid var(--line);
}
.player-details[hidden] { display: none !important; }
.player-shell.is-collapsed .player { padding-bottom: calc(6px + var(--safe)); }
.ayah, .part, .toolbar { scroll-margin-top: 12px; scroll-margin-bottom: 120px; }
.player-row { width: min(1040px, 100%); margin: 0 auto; display: grid; grid-template-columns: auto 1fr auto; gap: 6px; align-items: center; }
.player-row button { padding: 4px 12px; font-size: 0.84rem; line-height: 1.3; }
#play-toggle { background: var(--green); color: white; border-color: var(--green); min-width: 88px; font-weight: 700; }
.now { text-align: center; font-size: 0.8rem; color: var(--muted); margin-top: 2px; }
.speed-line { width: min(1040px, 100%); margin: 2px auto 0; display: grid; grid-template-columns: auto 1fr auto; gap: 8px; align-items: center; font-size: 0.78rem; }

#toast {
  position: fixed; left: 50%; bottom: calc(140px + var(--safe)); transform: translateX(-50%);
  background: var(--green-deep); color: white; padding: 10px 14px; border-radius: var(--radius); z-index: 6;
}

.empty { color: var(--muted); padding: 12px 0 24px; }

@media (min-width: 800px) {
  .grid { grid-template-columns: 1fr 1fr; }
  .toolbar { grid-template-columns: 1.05fr 0.95fr; align-items: start; }
  .toolbar .wide { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .wrap { width: min(1040px, calc(100% - 20px)); }
  .toolbar-shell.is-pinned { width: min(1040px, calc(100% - 20px)); }
  .hero-top { flex-wrap: wrap; }
  .hero-top h1 { white-space: normal; text-overflow: unset; }
  .study-head { flex-wrap: wrap; row-gap: 0.25rem; }
  .study-head .ar-name { max-width: 100%; flex: 1 1 auto; }
  .study-head h1 { flex: 1 1 6rem; }
  .stats { grid-template-columns: 1fr; }
  .stat + .stat { border-left: 0; border-top: 1px solid var(--line); }
  .resume { align-items: stretch; flex-direction: column; }
  .domain { display: none; }
  .top-inner { gap: 8px; }
  .top-inner .solid { padding: 8px 10px; font-size: 0.86rem; white-space: nowrap; }
  .brand strong { font-size: 0.95rem; }
  .brand small { font-size: 0.78rem; }
  .study-head .study-meta { display: none; }
  .toolbar-toggle { flex-wrap: wrap; }
  .toolbar-toggle-meta { flex: 1 1 100%; white-space: normal; }
  .top-inner .solid { max-width: 42%; overflow: hidden; text-overflow: ellipsis; }
  .ayah-tools { flex-wrap: wrap; align-items: center; }
  .left-tools { flex: 1 1 auto; }
  .right-tools, .marks { flex: 1 1 100%; }
  .marks { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .icon, .marks button, .box-hide { min-height: 30px; }
  .marks button, .box-hide { padding: 2px 4px; font-size: 0.72rem; line-height: 1.15; }
  .player-row button { padding: 4px 8px; }
  #play-toggle { min-width: 0; }
  .repeat-left { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
  .ayah-pager button { flex: 1 1 7.5rem; min-width: 0; }
}
@media (max-width: 380px) {
  .size-row {
    grid-template-columns: 24px minmax(0, 1fr) 24px;
    row-gap: 4px;
  }
  .size-row > span:first-child { grid-column: 1 / -1; }
  .size-row output { grid-column: 1 / -1; text-align: left; }
  .left-tools { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}


.tajweed-block { display: grid; gap: 4px; }
.tj-legend { margin-top: 4px; }
.tj-legend summary { cursor: pointer; font-size: 0.82rem; font-weight: 700; color: var(--green-deep); }
.tj-group { margin-top: 6px; }
.tj-chip { display: inline-flex; align-items: flex-start; gap: 6px; text-align: left; max-width: 100%; padding: 4px 8px; white-space: normal; }
.tj-chip b { display: block; font-size: 0.78rem; line-height: 1.2; }
.tj-chip small { display: block; font-size: 0.7rem; line-height: 1.25; font-weight: 500; color: var(--muted); max-width: 28rem; }
.tj-chip.is-on small { color: #f3e6cf; }
.tj-swatch { width: 0.7rem; height: 0.7rem; border-radius: 2px; margin-top: 0.2rem; flex: 0 0 auto; box-shadow: inset 0 0 0 1px rgba(0,0,0,.15); }
.tj-source a { color: var(--green); }
.layer-tajweed .tj-ham_wasl,
.layer-tajweed .tj-slnt,
.layer-tajweed .tj-lam_shamsiyah { color: #AAAAAA; }
.layer-tajweed .tj-madda_normal { color: #537FFF; }
.layer-tajweed .tj-madda_permissible { color: #4050FF; }
.layer-tajweed .tj-madda_obligatory { color: #2144C1; }
.layer-tajweed .tj-madda_necessary { color: #000EBC; }
.layer-tajweed .tj-ghn { color: #FF7E1E; }
.layer-tajweed .tj-ikhf { color: #9400A8; }
.layer-tajweed .tj-ikhf_shfw { color: #D500B7; }
.layer-tajweed .tj-iqlb { color: #26BFFD; }
.layer-tajweed .tj-idgh_ghn { color: #169777; }
.layer-tajweed .tj-idgh_w_ghn { color: #169200; }
.layer-tajweed .tj-idghm_shfw { color: #58B800; }
.layer-tajweed .tj-idgh_mus,
.layer-tajweed .tj-idgh_mut { color: #A1A1A1; }
.layer-tajweed .tj-qlq { color: #DD0008; }

a.chip { text-decoration: none; display: inline-flex; align-items: center; color: inherit; }
.note a { color: var(--green); font-weight: 700; }
.tecvid-page { padding: 18px 0 48px; }
.tecvid-page h1,
.tecvid-page h2,
.tecvid-page h3 { white-space: normal; overflow: visible; text-overflow: unset; }
.tecvid-page h1 { font-family: Literata, Georgia, serif; margin: 0 0 8px; }
.tecvid-page h2 { font-family: Literata, Georgia, serif; font-size: 1.35rem; margin: 0 0 6px; }
.tecvid-page .lede { max-width: 46rem; }
.tecvid-toc { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0 4px; }
.tecvid-group { margin-top: 26px; scroll-margin-top: 12px; }
.tecvid-rule {
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr);
  gap: 12px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
  margin-top: 8px;
  box-shadow: var(--shadow);
}
.tecvid-bar { border-radius: 3px; min-height: 100%; }
.tecvid-rule h3 { margin: 0 0 2px; font-size: 1.05rem; display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; }
.tecvid-ar { font-family: "Scheherazade New", serif; font-size: 1.35rem; font-weight: 400; color: var(--green-deep); }
.tecvid-meta { display: flex; gap: 10px; align-items: baseline; margin: 0 0 6px; }
.tecvid-count { font-weight: 700; color: var(--green-deep); }
.tecvid-hex { color: var(--muted); font-size: 0.78rem; letter-spacing: 0.04em; }
.tecvid-rule p { margin: 0 0 6px; }
.tecvid-letters {
  font-family: "Scheherazade New", serif;
  font-size: 1.55rem;
  line-height: 1.7;
  letter-spacing: 0.08em;
  margin: 4px 0 0;
}
.tecvid-ex {
  font-family: "Scheherazade New", serif;
  font-size: 2rem;
  line-height: 1.6;
  margin: 8px 0 0;
}

a.intro-card { text-decoration: none; color: inherit; }
.tecvid-intro { grid-column: 1 / -1; }
.tecvid-home {
  margin: 4px 0 12px;
  padding: 12px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #e8f3ec, #fffaf2);
  box-shadow: var(--shadow);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}
.tecvid-home b { display: block; font-family: Literata, Georgia, serif; color: var(--green-deep); font-size: 1.05rem; }
.tecvid-home small { display: block; color: var(--muted); font-size: 0.86rem; }
a.solid, .tecvid-home .solid { text-decoration: none; display: inline-flex; align-items: center; }
.tecvid-kicker { margin: 8px 0 4px; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--gold); }
.tecvid-samples { display: grid; gap: 8px; }
.tecvid-sample { margin: 0; padding: 8px 10px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.tecvid-sample .tecvid-ex { margin: 0; }
.tecvid-sample figcaption { margin-top: 6px; font-size: 1.05rem; line-height: 1.45; color: var(--muted); }
.tecvid-sample figcaption b { color: var(--green-deep); }

.tecvid-sample figcaption { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.tecvid-sample figcaption > span { min-width: 0; }
.tecvid-play { flex: 0 0 auto; font-size: 1rem; padding: 6px 14px; }

.mahrec-home { background: linear-gradient(180deg, #efe7f8, #fffaf2); }
.mahrec-intro { grid-column: 1 / -1; }
.mahrec-stage { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(240px, .75fr); gap: 14px; align-items: start; margin: 14px 0; }
.mahrec-svg { width: 100%; height: auto; background: #fffaf2; border: 1px solid var(--line); border-radius: var(--radius); display: block; }
.mahrec-line, .mahrec-wall { fill: none; stroke: #234237; stroke-linecap: round; }
.mahrec-line { stroke-width: 10; }
.mahrec-wall { stroke-width: 12; }
.mahrec-lip { fill: #f3d5c4; stroke: #234237; stroke-width: 2.5; }
.mahrec-tooth { fill: #fff; stroke: #234237; stroke-width: 2; }
.mahrec-label { font-size: 15px; fill: #3d4a43; font-weight: 700; font-family: "Source Sans 3", "Segoe UI", sans-serif; }
.mahrec-zone { opacity: .28; transition: opacity .25s ease; cursor: pointer; }
.mahrec-zone.is-on { opacity: .9; }
.zone-cevf { fill: #2f6f8f; }
.zone-halk { fill: #0f5c43; }
.zone-lisan { fill: #b7791f; }
.zone-sefe { fill: #9f1239; }
.zone-haysum { fill: #6d28d9; }
.mahrec-air { stroke: #2f6f8f; stroke-width: 3; stroke-dasharray: 7 8; opacity: .35; }
.mahrec-svg:has(.zone-cevf.is-on) .mahrec-air,
.mahrec-svg:has(.zone-haysum.is-on) .mahrec-air { opacity: .9; animation: mahrec-flow 1.1s linear infinite; }
@keyframes mahrec-flow { to { stroke-dashoffset: -30; } }
.mahrec-dot { cursor: pointer; color: #234237; }
.mahrec-hit { fill: transparent; }
.mahrec-mark { fill: #fff; stroke: currentColor; stroke-width: 2; }
.mahrec-dot text { font-size: 12px; text-anchor: middle; fill: #234237; font-family: "Source Sans 3", "Segoe UI", sans-serif; pointer-events: none; }
.mahrec-dot.is-on { color: var(--green-deep); }
.mahrec-dot.is-on .mahrec-mark { fill: var(--gold); animation: mahrec-pulse 1.1s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes mahrec-pulse { 50% { transform: scale(1.28); } }
.mahrec-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 8px; }
.mahrec-key { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.mahrec-char { font-family: "Scheherazade New", serif; font-size: 1.7rem; line-height: 1; padding: 2px 8px; border-radius: 8px; border: 1px solid var(--line); background: #fff; }
.mahrec-char.is-on { background: var(--green-deep); color: #f6edd9; border-color: var(--green-deep); }
.mahrec-detail { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); }
.mahrec-detail h2 { margin: 0 0 4px; font-size: 1.45rem; }
.mahrec-detail .mahrec-letters, .mahrec-card .mahrec-letters { font-family: "Scheherazade New", serif; font-size: 2.2rem; line-height: 1.4; margin: 6px 0; color: var(--green-deep); }
.mahrec-place { margin: 0; color: var(--gold); font-weight: 700; }
.mahrec-detail p, .mahrec-card p { font-size: 1.05rem; line-height: 1.5; }
.mahrec-video-block { margin: 8px 0 18px; }
.mahrec-video-wrap { position: relative; padding-top: 56.25%; border-radius: var(--radius); overflow: hidden; background: #14241d; border: 1px solid var(--line); }
.mahrec-video-wrap iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.mahrec-cards { display: grid; gap: 8px; }
.mahrec-card { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; margin: 0; padding: 12px 14px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); cursor: pointer; text-align: start; }
.mahrec-card.is-on { border-color: var(--green-deep); box-shadow: var(--shadow); }
.mahrec-card h3 { margin: 0; font-size: 1.12rem; }
.mahrec-no { width: 32px; height: 32px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; background: #e8f3ec; color: var(--green-deep); font-weight: 700; }
.mahrec-card.is-on .mahrec-no { background: var(--green-deep); color: #f6edd9; }
.mahrec-how { margin-top: 18px; }
@media (max-width: 800px) {
  .mahrec-stage { grid-template-columns: 1fr; }
}

#to-top {
  position: fixed;
  right: 16px;
  bottom: calc(18px + var(--safe));
  z-index: 6;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 0;
  border-radius: 999px;
  padding: 10px 16px;
  background: var(--green-deep);
  color: #f6edd9;
  font-weight: 700;
  letter-spacing: 0.01em;
  box-shadow: var(--shadow);
}
#to-top::before { content: "\2191"; font-size: 1.05rem; line-height: 1; }
#to-top[hidden] { display: none; }
body.route-study #to-top { bottom: calc(136px + var(--safe)); }
body.route-study.player-collapsed #to-top { bottom: calc(62px + var(--safe)); }

.mahrec-key { display: grid; grid-template-columns: repeat(auto-fill, minmax(48px, 1fr)); gap: 6px; margin: 4px 0 18px; }
.mahrec-char { width: 100%; min-height: 52px; display: grid; place-items: center; padding: 0; background: #fff; border: 1px solid var(--line); border-radius: 12px; font-family: "Scheherazade New", serif; font-size: 1.9rem; line-height: 1; }
.mahrec-soundbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; }
.mahrec-soundbar[hidden] { display: none; }
.mahrec-listen { margin-top: 0; }
.mahrec-rates { display: flex; gap: 4px; }
.mahrec-rates .chip { min-width: 46px; justify-content: center; }
.mouth { max-width: 460px; }
.mouth-wrap { margin: 10px 0 0; }
.mouth { width: 100%; height: auto; display: block; background: #fffaf2; border: 1px solid var(--line); border-radius: var(--radius); }
.mouth-bg { fill: #fffaf2; }
.face { fill: #f3d7c4; }
.cavity { fill: #fffaf2; }
.nose, .throat { fill: #e7d3bf; }
.nose-air { fill: none; stroke: #6d28d9; stroke-width: 8; stroke-linecap: round; opacity: var(--nose); }
.palate { fill: none; stroke: #e7d3bf; stroke-width: 14; stroke-linecap: round; }
.teeth { fill: #fff; stroke: #d9cbb8; stroke-width: 1.5; }
.tongue { fill: #e07a7a; transform-box: fill-box; transform-origin: 20% 60%; transform: translate(var(--tx), var(--ty)) rotate(var(--tr)); transition: transform 0.45s ease; }
.jaw { transform: translateY(var(--jaw)); transition: transform 0.45s ease; }
.lip { fill: #c45c6a; }
.spot { fill: #0f5c43; transform: translate(var(--sx), var(--sy)); transition: transform 0.45s ease; }
.mouth.is-speaking .spot { animation: mouth-spot 1.1s ease-in-out infinite; }
.air circle { fill: #2f6f8f; offset-path: path("M 78 120 C 130 108, 180 110, 230 118"); animation: mouth-air 1.5s linear infinite; }
.air circle:nth-child(2) { animation-delay: 0.4s; }
.air circle:nth-child(3) { animation-delay: 0.8s; }
.mouth[data-zone="haysum"] .air circle { offset-path: path("M 150 112 C 140 86, 132 64, 146 44"); fill: #6d28d9; }
.mouth { --jaw: 6px; --tx: 0px; --ty: 2px; --tr: 0deg; --sx: 160px; --sy: 108px; --nose: 0.25; }
.mouth[data-pose="cevf"] { --jaw: 12px; --ty: 6px; --sx: 156px; --sy: 102px; --nose: 0.15; }
.mouth[data-pose="halk-dip"] { --jaw: 4px; --ty: 0px; --sx: 46px; --sy: 128px; }
.mouth[data-pose="halk-orta"] { --jaw: 4px; --sx: 62px; --sy: 108px; }
.mouth[data-pose="halk-yakin"] { --jaw: 5px; --ty: -4px; --tr: -6deg; --sx: 86px; --sy: 96px; }
.mouth[data-pose="kaf"] { --jaw: 4px; --ty: -10px; --tr: -14deg; --sx: 108px; --sy: 90px; }
.mouth[data-pose="kef"] { --jaw: 4px; --tx: 8px; --ty: -10px; --tr: -8deg; --sx: 136px; --sy: 88px; }
.mouth[data-pose="dil-orta"] { --jaw: 5px; --tx: 16px; --ty: -8px; --tr: -4deg; --sx: 176px; --sy: 96px; }
.mouth[data-pose="dad"] { --jaw: 4px; --tx: 6px; --ty: -8px; --tr: -8deg; --sx: 154px; --sy: 104px; }
.mouth[data-pose="lam"] { --jaw: 3px; --tx: 22px; --ty: -10px; --tr: 8deg; --sx: 214px; --sy: 100px; }
.mouth[data-pose="nun"] { --jaw: 3px; --tx: 26px; --ty: -6px; --tr: 4deg; --sx: 222px; --sy: 110px; --nose: 0.55; }
.mouth[data-pose="ra"] { --jaw: 4px; --tx: 18px; --ty: -4px; --tr: 3deg; --sx: 206px; --sy: 114px; }
.mouth[data-pose="niti"] { --jaw: 2px; --tx: 28px; --ty: -2px; --tr: 8deg; --sx: 236px; --sy: 100px; }
.mouth[data-pose="usel"] { --jaw: 6px; --tx: 30px; --ty: 4px; --sx: 240px; --sy: 118px; }
.mouth[data-pose="lesev"] { --jaw: 4px; --tx: 28px; --ty: 1px; --tr: 6deg; --sx: 238px; --sy: 108px; }
.mouth[data-pose="fe"] { --jaw: -1px; --tx: 4px; --ty: 3px; --sx: 252px; --sy: 112px; }
.mouth[data-pose="dudak"] { --jaw: -8px; --ty: 2px; --sx: 274px; --sy: 120px; }
.mouth[data-pose="dudak"][data-letter="و"] { --jaw: 2px; --sx: 276px; --sy: 114px; }
.mouth[data-pose="haysum"] { --jaw: 3px; --nose: 1; --sx: 140px; --sy: 42px; }
.mouth[data-pose="haysum"][data-letter="م"] { --jaw: -7px; }
.mouth[data-pose="haysum"][data-letter="ن"] { --tx: 26px; --ty: -6px; --tr: 4deg; }
.mouth-wrap figcaption { margin-top: 6px; font-size: 0.92rem; color: var(--muted); line-height: 1.4; }
@keyframes mouth-spot { 50% { opacity: 0.45; } }
@keyframes mouth-air { to { offset-distance: 100%; } }

.gate-hero, .gate-kelime { text-align: center; }
.gate-hero { padding: 28px 0 6px; }
.gate-bism {
  font-family: "Scheherazade New", serif;
  font-size: clamp(1.8rem, 4.2vw, 2.7rem);
  line-height: 1.9;
  color: var(--green-deep);
  margin: 0;
}
.gate-hero h1, .gate-page h1 {
  font-family: Literata, Georgia, serif;
  font-size: clamp(1.7rem, 4vw, 2.6rem);
  line-height: 1.15;
  color: var(--green-deep);
  max-width: 16em;
  margin: 8px auto 10px;
}
.gate-hero .lede, .gate-kelime .lede { max-width: 38em; margin: 0 auto; }
.gate-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin: 22px 0;
}
.gate-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 148px;
  padding: 16px;
  text-decoration: none;
  color: inherit;
  background:
    linear-gradient(180deg, rgba(14, 92, 67, 0.06), transparent 42%),
    var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
}
.gate-card:hover { border-color: #c6a15a; }
.gate-ar {
  font-family: "Scheherazade New", serif;
  font-size: 1.85rem;
  line-height: 1;
  color: var(--green);
}
.gate-card strong {
  font-family: Literata, Georgia, serif;
  font-size: 1.2rem;
  color: var(--green-deep);
}
.gate-card span:last-child { color: var(--muted); line-height: 1.4; }
.gate-kelime {
  margin: 8px 0 28px;
  padding: 18px 16px 20px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
}
.gate-page { padding-bottom: 28px; }
.gate-page .lede { max-width: 40em; }
.faith-list { display: grid; gap: 10px; margin: 16px 0; }
.faith-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
}
.faith-no {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--green-deep);
  color: #f6edd9;
  font-weight: 700;
}
.faith-item b {
  display: block;
  font-family: Literata, Georgia, serif;
  color: var(--green-deep);
  font-size: 1.05rem;
}
.faith-item p { margin: 2px 0 0; color: var(--ink); line-height: 1.45; text-wrap: pretty; }
.faith-item--link {
  padding: 0;
  align-items: stretch;
}
.faith-item--link .faith-no { margin: 12px 0 12px 12px; align-self: center; }
.faith-link {
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 0;
  gap: 12px;
  padding: 12px 16px 12px 0;
  color: inherit;
  text-decoration: none;
}
.faith-link > div { flex: 1; min-width: 0; }
.faith-link:hover .faith-more { color: var(--green); }
.faith-more {
  flex-shrink: 0;
  margin-left: auto;
  align-self: center;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--muted);
  white-space: nowrap;
}
.crumb {
  margin: 0 0 10px;
  font-size: 0.88rem;
  color: var(--muted);
}
.crumb a { color: var(--green); font-weight: 600; text-decoration: none; }
.crumb a:hover { text-decoration: underline; }
.crumb span[aria-hidden] { margin: 0 0.35em; opacity: 0.5; }


.intro-question { margin: 0.35rem 0 0; font-size: 1.15rem; font-weight: 600; color: var(--ink); }

.guide-stack { display: grid; gap: 14px; margin: 18px 0 24px; }
.guide-block {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px 18px;
}
.guide-block h2 { margin: 0 0 6px; font-size: 1.12rem; letter-spacing: -0.01em; }
.guide-lead { margin: 0 0 12px; color: var(--muted); line-height: 1.5; font-size: 0.95rem; }
.guide-sub { margin: 12px 0 6px; font-weight: 600; font-size: 0.95rem; }
.guide-steps { margin: 0; padding-left: 1.25rem; }
.guide-steps li { margin: 0.4rem 0; line-height: 1.5; }
.guide-steps--dot { list-style: disc; }
.guide-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; margin-top: 4px; }
.guide-table th, .guide-table td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: top; }
.guide-table th { background: rgba(198, 161, 90, 0.14); font-weight: 600; }
.guide-block a { color: var(--gold); text-decoration: underline; text-underline-offset: 2px; }
@media (max-width: 520px) {
  .guide-table { font-size: 0.82rem; }
  .guide-table th, .guide-table td { padding: 6px 8px; }
}

.site-foot {
  margin-top: 48px;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(198, 161, 90, 0.06) 0%, rgba(15, 22, 18, 0) 42%);
}
.site-foot-inner {
  display: grid;
  gap: 22px;
  padding: 28px 0 36px;
}
.site-foot-brand { max-width: 28rem; }
.site-foot-mark {
  margin: 0 0 6px;
  font-family: var(--arabic, "Amiri", serif);
  font-size: 1.05rem;
  color: var(--gold);
  opacity: 0.95;
}
.site-foot-title {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.site-foot-tag {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
}
.site-foot-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
}
.site-foot-nav a {
  color: var(--ink);
  text-decoration: none;
  font-size: 0.9rem;
  padding: 4px 0;
  border-bottom: 1px solid transparent;
}
.site-foot-nav a:hover {
  color: var(--gold);
  border-bottom-color: rgba(198, 161, 90, 0.45);
}
.site-foot-end { display: grid; gap: 8px; }
.site-foot-meta {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.5;
  max-width: 52rem;
}
.site-foot-copy {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.8rem;
  opacity: 0.9;
}
@media (min-width: 720px) {
  .site-foot-inner {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
  .site-foot-end { grid-column: 1 / -1; }
}

.page-banner {
  height: 160px;
  min-height: 160px;
  max-height: 160px;
  position: relative;
  overflow: hidden;
  background-color: var(--green-deep);
  border-bottom: 1px solid rgba(198, 161, 90, 0.4);
}
.page-banner-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.page-banner-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    rgba(10, 24, 18, 0.88) 0%,
    rgba(10, 24, 18, 0.55) 48%,
    rgba(10, 24, 18, 0.2) 100%
  );
}
.page-banner-inner {
  position: relative;
  z-index: 1;
  height: 160px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  padding: 0;
}
.page-banner-eyebrow {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #d9cbb0;
}
.page-banner-title {
  margin: 0;
  font-family: Literata, Georgia, serif;
  font-size: clamp(1.35rem, 2.8vw, 1.85rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: #fff;
  text-shadow: 0 1px 18px rgba(0, 0, 0, 0.35);
}

.vakit-picker { margin: 0 0 14px; max-width: 28rem; }
.vakit-label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 6px;
  letter-spacing: 0;
  text-transform: none;
}
.vakit-ac { position: relative; max-width: 420px; }
.vakit-input {
  width: 100%;
  padding: 11px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  font-size: 1rem;
  background: #fff;
  box-sizing: border-box;
}
.vakit-input:focus {
  outline: 2px solid rgba(198, 161, 90, 0.55);
  border-color: #c6a15a;
}
.vakit-ac-list {
  position: absolute;
  z-index: 40;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  max-height: 260px;
  overflow-y: auto;
  margin: 0;
  padding: 6px 0;
  list-style: none;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.12);
}
.vakit-ac-item {
  padding: 9px 14px;
  cursor: pointer;
  font-size: 0.95rem;
}
.vakit-ac-item:hover,
.vakit-ac-item.is-active {
  background: rgba(198, 161, 90, 0.16);
}
.vakit-panel { margin: 8px 0 20px; }
.vakit-loading, .vakit-error { color: var(--muted); margin: 12px 0; }
.vakit-date { margin: 0 0 8px; color: var(--muted); font-size: 0.9rem; }
.vakit-next {
  margin: 0 0 14px;
  padding: 10px 14px;
  border-radius: var(--radius);
  background: rgba(198, 161, 90, 0.14);
  border: 1px solid rgba(198, 161, 90, 0.35);
  font-size: 0.95rem;
}
.vakit-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
@media (min-width: 640px) {
  .vakit-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.vakit-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--panel);
}
.vakit-card.is-next {
  border-color: #c6a15a;
  box-shadow: inset 0 0 0 1px rgba(198, 161, 90, 0.35);
  background: rgba(198, 161, 90, 0.1);
}
.vakit-name { font-size: 0.82rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.vakit-time { font-size: 1.35rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.vakit-note { margin: 14px 0 0; font-size: 0.82rem; color: var(--muted); line-height: 1.45; }

.gate-page-tight { padding-top: 12px; padding-bottom: 24px; }
.gate-page-lede {
  margin: 0 0 14px;
  max-width: 100%;
  line-height: 1.6;
  color: var(--muted);
  font-size: 0.98rem;
  text-wrap: pretty;
}
.gate-page .gate-page-lede { max-width: 100%; }
.gate-page-lede--tight { margin-top: -6px; }
.gate-hero--compact { padding: 10px 0 4px; }
.gate-hero--compact .lede { margin-top: 8px; }
.hero--compact { padding: 8px 0 2px; }
.hero--compact .gate-page-lede { margin-bottom: 10px; }
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Namaz rehberi */
.namaz-page .gate-page-lede { margin-bottom: 12px; }
.namaz-quick {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 14px;
}
.namaz-quick-card {
  display: grid;
  gap: 2px;
  padding: 12px 12px 11px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: linear-gradient(165deg, #fffaf2 0%, #f3ecdf 100%);
  box-shadow: var(--shadow);
  color: inherit;
  text-decoration: none;
  min-height: 0;
}
.namaz-quick-card strong { font-family: Literata, Georgia, serif; font-size: 0.95rem; color: var(--green-deep); }
.namaz-quick-card span:last-child { font-size: 0.78rem; color: var(--muted); line-height: 1.35; }
.namaz-quick-ico { font-size: 1.05rem; line-height: 1.2; margin-bottom: 2px; color: var(--green); font-family: "Scheherazade New", serif; }
.namaz-toc {
  margin: 0 0 16px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--card);
}
.namaz-toc-label {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 8px;
}
.namaz-toc-track {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.namaz-toc-track a {
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--green-deep);
  text-decoration: none;
}
.namaz-toc-track a:hover { border-color: var(--green); background: var(--done-bg); }
.namaz-page .guide-stack {
  counter-reset: namaz-sec;
  gap: 12px;
  margin-top: 4px;
}
.namaz-page .guide-block {
  counter-increment: namaz-sec;
  border-left: 3px solid rgba(14, 92, 67, 0.35);
  scroll-margin-top: 88px;
}
.namaz-page .guide-block h2 {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: 1.15rem;
  color: var(--green-deep);
}
.namaz-page .guide-block h2::before {
  content: counter(namaz-sec);
  flex-shrink: 0;
  width: 1.65rem;
  height: 1.65rem;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-size: 0.82rem;
  font-family: "Source Sans 3", system-ui, sans-serif;
  font-weight: 700;
  color: #f6edd9;
  background: linear-gradient(145deg, var(--green) 0%, var(--green-deep) 100%);
}
.namaz-vakit-grid {
  display: none;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 8px;
}
.namaz-vakit-card {
  padding: 10px 11px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  display: grid;
  gap: 2px;
}
.namaz-vakit-name { font-weight: 700; color: var(--green-deep); font-size: 0.92rem; }
.namaz-vakit-farz { font-family: Literata, Georgia, serif; font-size: 1.35rem; color: var(--green); line-height: 1.1; }
.namaz-vakit-farz small { font-size: 0.65rem; font-weight: 600; color: var(--muted); }
.namaz-vakit-note { font-size: 0.75rem; color: var(--muted); line-height: 1.35; }
.namaz-page .guide-table-wrap { overflow-x: auto; }
@media (max-width: 720px) {
  .namaz-quick { grid-template-columns: 1fr; }
  .namaz-vakit-grid { display: grid; }
  .namaz-page .guide-table-wrap { display: none; }
}
@media (min-width: 721px) {
  .namaz-vakit-grid { display: none; }
}
