:root {
  --ink: #12322c;
  --muted: #6d7d78;
  --green-950: #052f29;
  --green-900: #073a32;
  --green-800: #0a4a3e;
  --green-700: #146453;
  --green-100: #e6f1ed;
  --gold: #caa64b;
  --gold-soft: #f2e5b9;
  --cream: #f7f4eb;
  --paper: #fffdf8;
  --line: #dfe6e2;
  --danger-soft: #fff2dc;
  --shadow: 0 22px 60px rgba(7,58,50,.10);
  --radius-xl: 30px;
  --radius-lg: 22px;
  --radius-md: 16px;
}

html { scroll-behavior: smooth; }
.skip-link { position: fixed; z-index: 200; top: 8px; right: 8px; transform: translateY(-150%); padding: 10px 14px; color: #fff; background: #000; border-radius: 9px; }
.skip-link:focus { transform: none; }
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 3%, rgba(202,166,75,.12), transparent 28rem),
    var(--cream);
  font-family: "Noto Sans Arabic", "Segoe UI", Tahoma, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; }
.app-shell { min-height: 100vh; padding-bottom: 92px; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1240px;
  margin: 0 auto;
  padding: 18px 24px;
  background: rgba(247,244,235,.88);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(18,50,44,.07);
}
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; }
.brand-mark { width: 44px; height: 44px; display: grid; place-items: center; background: var(--green-900); border-radius: 14px; box-shadow: 0 8px 20px rgba(7,58,50,.18); }
.brand-mark svg { width: 30px; height: 30px; }
.brand-mark path:first-child { fill: var(--gold); }
.brand-mark path:last-child { fill: #fff; }
.brand strong { display: block; font-size: 18px; line-height: 1.2; }
.brand small { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; }
.top-actions { display: flex; align-items: center; gap: 10px; }
.icon-button, .streak-pill, .prayer-pill, .ruqyah-pill, .quran-radio-pill { border: 1px solid var(--line); background: rgba(255,255,255,.7); border-radius: 999px; cursor: pointer; }
.icon-button { width: 42px; height: 42px; }
.streak-pill { padding: 9px 14px; display: flex; align-items: center; gap: 7px; }
.streak-pill span { color: var(--gold); }
.prayer-pill { display: grid; grid-template-columns: auto auto; gap: 7px; align-items: center; padding: 8px 13px; color: var(--green-900); }
.prayer-pill span { color: var(--muted); font-size: 9px; }
.prayer-pill b { font-size: 12px; direction: ltr; }
.ruqyah-pill { min-height: 42px; display: flex; align-items: center; gap: 7px; padding: 7px 12px; color: var(--green-900); font-size: 11px; font-weight: 800; }
.ruqyah-pill .shield-glyph { width: 23px; height: 27px; }
.quran-radio-pill { min-height: 42px; display: flex; align-items: center; gap: 7px; padding: 7px 12px; color: var(--green-900); text-decoration: none; font-size: 10px; }
.radio-live-dot { width: 9px; height: 9px; background: #d94040; border: 2px solid #ffd9d9; border-radius: 50%; box-shadow: 0 0 0 0 rgba(217,64,64,.45); animation: radio-pulse 1.8s infinite; }
@keyframes radio-pulse { 70% { box-shadow: 0 0 0 7px rgba(217,64,64,0); } 100% { box-shadow: 0 0 0 0 rgba(217,64,64,0); } }
.shield-glyph path:first-child { fill: currentColor; }
.shield-glyph path:last-child { fill: var(--gold-soft); }
.kaaba-glyph path:first-child { fill: currentColor; }
.kaaba-glyph path:nth-child(2) { fill: var(--gold); }
.kaaba-glyph path:last-child { fill: var(--gold-soft); }

main { max-width: 1240px; margin: 0 auto; padding: 26px 24px 70px; }
.view { display: none; animation: fade-in .35s ease; }
.view.active { display: block; }
@keyframes fade-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(410px, .95fr); gap: 22px; align-items: stretch; }
.hero-card, .planner-card, .map-card, .ward-card, .feature-card, .tafsir-reader, .principles-card, .science-card, .progress-main, .goal-card {
  border-radius: var(--radius-xl);
  border: 1px solid rgba(18,50,44,.08);
  box-shadow: var(--shadow);
}
.hero-card { position: relative; overflow: hidden; min-height: 600px; padding: 64px 54px 48px; color: #fff; background: linear-gradient(145deg, #0b5144 0%, var(--green-950) 68%, #02231f 100%); }
.hero-card::after { content: ""; position: absolute; inset: auto -90px -150px auto; width: 390px; height: 390px; border: 1px solid rgba(217,183,91,.34); border-radius: 50%; box-shadow: 0 0 0 45px rgba(217,183,91,.035), 0 0 0 90px rgba(217,183,91,.025); }
.hero-pattern { position: absolute; inset: 0; opacity: .08; background-image: linear-gradient(30deg, transparent 48%, #fff 49%, #fff 51%, transparent 52%), linear-gradient(-30deg, transparent 48%, #fff 49%, #fff 51%, transparent 52%); background-size: 48px 84px; mask-image: linear-gradient(to left, transparent 10%, black 95%); }
.eyebrow, .kicker { color: var(--gold); font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.hero-card h1 { position: relative; margin: 26px 0 20px; font-size: clamp(42px, 6vw, 74px); line-height: 1.26; letter-spacing: -.055em; }
.hero-card h1 em { color: var(--gold-soft); font-style: normal; }
.hero-card > p { position: relative; max-width: 510px; margin: 0; font-size: 18px; line-height: 1.9; color: rgba(255,255,255,.76); }
.hero-quote { position: absolute; z-index: 1; right: 52px; left: 52px; bottom: 48px; display: grid; grid-template-columns: auto 1fr auto; gap: 15px; align-items: start; padding: 20px 22px; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.11); border-radius: 18px; backdrop-filter: blur(8px); }
.hero-quote > span { color: var(--gold); font: 34px Georgia, serif; }
.hero-quote p { margin: 0; font: 25px/1.6 "Amiri", "Traditional Arabic", serif; }
.hero-quote small { grid-column: 2; color: rgba(255,255,255,.6); }
.hero-quote span:last-child { grid-column: 3; grid-row: 1 / span 2; }

.planner-card { padding: 34px; background: rgba(255,253,248,.93); }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 28px; margin-bottom: 28px; }
.section-heading.compact { align-items: center; margin-bottom: 30px; }
.section-heading h2 { margin: 7px 0 0; font-size: clamp(28px, 4vw, 44px); line-height: 1.25; letter-spacing: -.04em; }
.section-heading.compact h2 { font-size: 29px; }
.section-heading > p { max-width: 520px; margin: 0; color: var(--muted); line-height: 1.8; }
.privacy-badge { padding: 7px 10px; color: var(--green-700); background: var(--green-100); border-radius: 99px; font-size: 11px; font-weight: 700; white-space: nowrap; }
.field-group { margin: 0; }
.field-group label, .mode-selector legend, .pace-row label, .minutes-editor label { display: block; margin-bottom: 9px; font-size: 12px; font-weight: 800; color: var(--muted); }
.input-row { display: flex; align-items: center; gap: 11px; min-height: 56px; padding: 0 14px; border: 1px solid var(--line); border-radius: var(--radius-md); background: #fff; transition: .2s ease; }
.input-row:focus-within { border-color: var(--green-700); box-shadow: 0 0 0 4px rgba(20,100,83,.08); }
.input-row input { min-width: 0; flex: 1; border: 0; outline: 0; color: var(--ink); background: transparent; }
.dot { width: 10px; height: 10px; border: 3px solid var(--green-700); border-radius: 50%; }
.destination-dot { border-color: var(--gold); }
.text-button, .clear-button { border: 0; background: transparent; cursor: pointer; }
.text-button { color: var(--green-700); font-size: 11px; font-weight: 800; }
.clear-button { font-size: 20px; color: #9aaba5; }
.field-group small { display: block; margin-top: 8px; color: #83918d; font-size: 11px; }
.route-line { width: 1px; height: 25px; margin: 2px 19px; border-right: 1px dashed #a9bbb4; }
.mode-selector { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 28px 0 24px; padding: 0; border: 0; }
.mode-selector legend { grid-column: 1/-1; width: 100%; }
.mode-selector label { cursor: pointer; }
.mode-selector input { position: absolute; opacity: 0; pointer-events: none; }
.mode-selector label span { min-height: 76px; display: grid; place-items: center; align-content: center; gap: 3px; padding: 10px 5px; text-align: center; background: #fff; border: 1px solid var(--line); border-radius: 14px; font-size: 12px; font-weight: 800; transition: .2s ease; }
.mode-selector label small { font-size: 9px; color: var(--muted); font-weight: 500; }
.mode-selector input:checked + span { color: #fff; background: var(--green-800); border-color: var(--green-800); box-shadow: 0 8px 20px rgba(7,58,50,.18); }
.mode-selector input:checked + span small { color: rgba(255,255,255,.7); }
.primary-button, .secondary-button { min-height: 54px; border-radius: 15px; cursor: pointer; font-weight: 800; transition: transform .2s, box-shadow .2s, opacity .2s; }
.primary-button { width: 100%; display: flex; align-items: center; justify-content: space-between; padding: 0 20px; color: #fff; border: 1px solid var(--green-900); background: var(--green-900); box-shadow: 0 12px 26px rgba(7,58,50,.18); }
.primary-button:hover { transform: translateY(-2px); box-shadow: 0 16px 28px rgba(7,58,50,.23); }
.primary-button:disabled { opacity: .6; cursor: wait; transform: none; }
.primary-button b { width: 31px; height: 31px; display: grid; place-items: center; color: var(--green-900); background: var(--gold-soft); border-radius: 50%; }

.result-section { padding-top: 34px; }
.journey-prayer-notice { display: grid; grid-template-columns: auto 1fr auto; gap: 13px; align-items: center; padding: 15px 17px; margin-bottom: 18px; color: #fff; background: linear-gradient(110deg, var(--green-900), var(--green-700)); border-radius: 18px; box-shadow: 0 14px 30px rgba(7,58,50,.16); }
.notice-icon { width: 42px; height: 42px; display: grid; place-items: center; color: var(--green-950); background: var(--gold-soft); border-radius: 13px; font-size: 23px; }
.journey-prayer-notice b, .journey-prayer-notice small { display: block; }
.journey-prayer-notice small { margin-top: 3px; color: rgba(255,255,255,.7); font-size: 10px; }
.journey-prayer-notice button { padding: 10px 13px; color: var(--green-950); background: var(--gold-soft); border: 0; border-radius: 11px; cursor: pointer; font-size: 10px; font-weight: 800; }
.result-summary { display: grid; grid-template-columns: 1fr auto auto; gap: 14px; align-items: end; padding: 8px 5px 22px; }
.result-title h2 { margin: 5px 0; font-size: 30px; }
.result-title p { margin: 0; color: var(--muted); }
.metric { min-width: 115px; padding: 14px 18px; border-right: 3px solid var(--green-700); background: rgba(255,255,255,.5); border-radius: 14px; }
.metric.gold { border-color: var(--gold); }
.metric strong, .metric span { display: block; }
.metric strong { font-size: 28px; line-height: 1; }
.metric span { margin-top: 7px; color: var(--muted); font-size: 11px; }
.result-grid { display: grid; grid-template-columns: 1.25fr .75fr; gap: 20px; }
.map-card { overflow: hidden; min-height: 490px; background: #dfe9e5; }
#map { width: 100%; height: 448px; background: #e7efec; }
.map-note { padding: 12px 16px; color: var(--muted); background: var(--paper); font-size: 11px; }
.ward-card { padding: 28px; background: var(--paper); }
.ward-topline { display: flex; justify-content: space-between; align-items: center; }
.ward-topline span { padding: 7px 10px; color: var(--green-700); background: var(--green-100); border-radius: 99px; font-size: 11px; font-weight: 800; }
.ward-topline button, .minutes-editor button { border: 0; color: var(--green-700); background: transparent; cursor: pointer; font-size: 11px; font-weight: 800; }
.minutes-editor { display: grid; grid-template-columns: 1fr auto; gap: 8px; padding: 14px; margin-top: 12px; background: var(--cream); border-radius: 14px; }
.minutes-editor label { grid-column: 1/-1; margin: 0; }
.minutes-editor input { width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 9px; }
.ward-card h3 { margin: 25px 0 8px; font-size: 24px; }
.ward-subtitle { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.7; }
.pace-row { display: flex; justify-content: space-between; align-items: center; margin: 20px 0 13px; }
.pace-row label { margin: 0; }
.pace-row select { padding: 7px 10px; color: var(--ink); border: 1px solid var(--line); background: #fff; border-radius: 10px; }
.plan-list { display: grid; gap: 8px; max-height: 190px; overflow: auto; padding-left: 3px; }
.plan-item { display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 10px; padding: 11px; border: 1px solid var(--line); border-radius: 13px; }
.plan-item > span { width: 34px; height: 34px; display: grid; place-items: center; color: var(--green-700); background: var(--green-100); border-radius: 10px; font-weight: 800; }
.plan-item b { display: block; font-size: 12px; }
.plan-item small { color: var(--muted); }
.plan-item > small { white-space: nowrap; }
.start-button { margin-top: 18px; }
.safety-callout { margin-top: 12px; padding: 11px; color: #805b18; background: var(--danger-soft); border-radius: 12px; font-size: 11px; line-height: 1.6; }

.value-section { padding: 78px 0 15px; }
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; }
.feature-card { padding: 28px; text-align: right; color: var(--ink); background: rgba(255,253,248,.85); cursor: pointer; }
.feature-card:hover { border-color: rgba(202,166,75,.7); transform: translateY(-3px); }
.feature-icon { width: 48px; height: 48px; display: grid; place-items: center; color: var(--gold); background: var(--green-900); border-radius: 15px; font-size: 24px; }
.feature-icon .shield-glyph { width: 25px; color: var(--gold); }
.feature-icon .kaaba-glyph { width: 27px; color: #fff; }
.adhkar-icon { font-size: 13px; font-weight: 900; }
.feature-card h3 { margin: 23px 0 8px; font-size: 20px; }
.feature-card p { min-height: 52px; margin: 0 0 16px; color: var(--muted); line-height: 1.75; }
.feature-card b { color: var(--green-700); font-size: 12px; }

.content-view { min-height: 70vh; padding-top: 32px; }
.page-intro { max-width: 760px; margin-bottom: 36px; }
.page-intro h1 { margin: 7px 0 12px; font-size: clamp(38px, 6vw, 66px); line-height: 1.2; letter-spacing: -.05em; }
.page-intro p { margin: 0; color: var(--muted); font-size: 16px; line-height: 1.9; }
.quran-intro { max-width: none; display: flex; justify-content: space-between; align-items: end; gap: 28px; }
.mushaf-badges { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.mushaf-badges span, .mushaf-badges a { padding: 8px 11px; color: var(--green-700); background: var(--green-100); border-radius: 99px; text-decoration: none; font-size: 10px; font-weight: 800; }
.mushaf-badges a { color: #725613; background: var(--gold-soft); }
.surah-search { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; margin-bottom: 22px; padding: 0 16px; min-height: 58px; background: var(--paper); border: 1px solid var(--line); border-radius: 17px; }
.surah-search > span { color: var(--gold); font-size: 22px; }
.surah-search input { width: 100%; border: 0; outline: 0; background: transparent; }
.surah-search b { color: var(--muted); font-size: 10px; white-space: nowrap; }
.surah-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.surah-card { position: relative; overflow: hidden; min-height: 190px; padding: 23px; text-align: right; color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 22px; cursor: pointer; }
.surah-card::after { content: attr(data-number); position: absolute; left: 13px; bottom: -24px; color: rgba(7,58,50,.05); font: 100px Georgia, serif; }
.surah-card:hover { border-color: var(--gold); transform: translateY(-2px); }
.surah-card small { color: var(--muted); }
.surah-card h2 { margin: 28px 0 5px; font: 34px "Amiri", "Traditional Arabic", serif; }
.surah-card b { position: relative; z-index: 1; color: var(--green-700); font-size: 11px; }

.quran-access-suite { margin-bottom: 22px; padding: 26px; background: rgba(255,253,248,.8); border: 1px solid var(--line); border-radius: var(--radius-xl); box-shadow: var(--shadow); }
.quran-access-heading { display: flex; justify-content: space-between; align-items: end; gap: 25px; margin-bottom: 20px; }
.quran-access-heading h2 { margin: 5px 0 0; font-size: 29px; }
.quran-access-heading > p { max-width: 520px; margin: 0; color: var(--muted); font-size: 10px; line-height: 1.75; }
.quran-access-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 11px; }
.quran-access-grid article { display: grid; grid-template-columns: 48px 1fr; gap: 13px; padding: 18px; background: #fff; border: 1px solid var(--line); border-radius: 17px; }
.access-tool-icon { width: 48px; height: 48px; display: grid; place-items: center; color: var(--gold); background: var(--green-900); border-radius: 14px; font-size: 21px; font-weight: 800; }
.quran-access-grid h3, .quran-access-grid p { margin: 0; }
.quran-access-grid p { min-height: 35px; margin-top: 4px; color: var(--muted); font-size: 9px; line-height: 1.65; }
.quran-access-grid label { display: grid; gap: 5px; margin-top: 10px; color: var(--muted); font-size: 9px; font-weight: 800; }
.quran-access-grid select { width: 100%; min-height: 40px; padding: 0 9px; color: var(--ink); background: var(--cream); border: 1px solid var(--line); border-radius: 10px; outline: 0; }
.quran-access-grid small { display: block; margin-top: 5px; color: var(--muted); font-size: 8px; }
.reciter-actions { display: grid; grid-template-columns: auto 1fr; gap: 9px; align-items: center; margin-top: 9px; }
.reciter-actions button { min-height: 38px; padding: 0 12px; color: var(--green-950); background: var(--gold-soft); border: 0; border-radius: 10px; cursor: pointer; font-size: 9px; font-weight: 900; }
.reciter-actions button:disabled { cursor: wait; opacity: .6; }
.reciter-actions small { margin: 0; line-height: 1.55; }
.access-buttons { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.access-buttons button, .open-mushaf-button { padding: 8px 10px; color: var(--green-700); background: var(--green-100); border: 0; border-radius: 9px; cursor: pointer; font-size: 9px; font-weight: 800; }
.access-buttons button[aria-pressed="true"] { color: #fff; background: var(--green-800); }
.analog-tool { color: #fff; background: var(--green-900) !important; }
.analog-tool p { color: rgba(255,255,255,.65); }
.analog-tool .access-tool-icon { color: var(--green-950); background: var(--gold-soft); }
.open-mushaf-button { color: var(--green-950); background: var(--gold-soft); }
.mushaf-studio { margin-bottom: 22px; padding: 26px; background: #e9e0cc; border: 1px solid #d7cab1; border-radius: var(--radius-xl); box-shadow: var(--shadow); }
.mushaf-studio[hidden] { display: none; }
.mushaf-studio-toolbar { display: flex; justify-content: space-between; align-items: end; gap: 16px; margin-bottom: 18px; }
.mushaf-studio-toolbar h2 { margin: 5px 0 0; font-size: 29px; }
.mushaf-page-controls { display: flex; gap: 7px; align-items: end; }
.mushaf-page-controls button { min-height: 41px; padding: 0 12px; color: #fff; background: var(--green-900); border: 0; border-radius: 10px; cursor: pointer; font-size: 9px; font-weight: 800; }
.mushaf-page-controls label { display: grid; gap: 4px; color: var(--muted); font-size: 8px; font-weight: 800; }
.mushaf-page-controls input { width: 76px; height: 41px; padding: 0 8px; text-align: center; border: 1px solid #cabda4; border-radius: 10px; }
.mushaf-spread { direction: rtl; display: grid; grid-template-columns: repeat(2, 1fr); gap: 7px; min-height: 560px; padding: 8px; background: #584d3b; border-radius: 14px; box-shadow: inset 0 0 35px rgba(0,0,0,.28); }
.mushaf-page { direction: rtl; position: relative; padding: 44px 28px 35px; color: #211b14; background: #fffaf0; border: 8px double #c7a95b; box-shadow: 0 10px 28px rgba(40,31,16,.18); }
.mushaf-page:nth-child(1) { border-radius: 8px 2px 2px 8px; }
.mushaf-page:nth-child(2) { border-radius: 2px 8px 8px 2px; }
.mushaf-page-header { position: absolute; top: 11px; right: 18px; left: 18px; display: flex; justify-content: space-between; color: #6a593b; font-size: 8px; font-weight: 800; }
.mushaf-page-text { text-align: justify; font: 23px/2.05 "Amiri", "Traditional Arabic", serif; }
.mushaf-surah-name { margin: 5px 0 8px; padding: 5px; text-align: center; color: #493817; background: #f1dfad; border-radius: 999px; font: 700 18px/1.4 "Amiri", "Traditional Arabic", serif; }
.mushaf-page-text .ayah-num { display: inline-grid; place-items: center; min-width: 23px; height: 23px; margin: 0 2px; color: #705619; border: 1px solid #caa64b; border-radius: 50%; font: 10px/1 Arial, sans-serif; }
.mushaf-loading { grid-column: 1/-1; align-self: center; text-align: center; color: #fff; }
.mushaf-assist-controls { display: grid; grid-template-columns: 1fr auto; gap: 12px 20px; align-items: center; margin-top: 15px; padding: 16px; background: rgba(255,255,255,.6); border-radius: 14px; }
.mushaf-assist-controls p { margin: 3px 0 0; color: var(--muted); font-size: 9px; line-height: 1.55; }
.vision-buttons { display: flex; flex-wrap: wrap; gap: 6px; }
.vision-buttons button { padding: 9px 11px; color: #fff; background: var(--green-900); border: 0; border-radius: 10px; cursor: pointer; font-size: 9px; font-weight: 800; }
.vision-buttons #stopVisionControlBtn { color: #7c2d2d; background: #fde8e8; }
.vision-status { grid-column: 1/-1; color: var(--green-700); font-size: 9px; font-weight: 800; }
#mushafCamera { width: 190px; border: 3px solid var(--gold); border-radius: 12px; transform: scaleX(-1); }
.mushaf-source-note { display: flex; justify-content: space-between; gap: 12px; margin: 13px 2px 0; color: var(--muted); font-size: 8px; }
.mushaf-source-note a { color: var(--green-700); }
.reader-preferences { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; align-items: end; padding: 10px 24px; background: var(--cream); border-top: 1px solid var(--line); }
.reader-preferences label { display: grid; gap: 3px; color: var(--muted); font-size: 8px; font-weight: 800; }
.reader-preferences select { min-width: 0; width: 100%; height: 35px; padding: 0 8px; color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 9px; font-size: 9px; }
.reader-preferences > span { color: var(--muted); font-size: 8px; white-space: nowrap; }
.ayah-translation { margin-top: 8px; padding: 10px 12px; color: var(--muted); background: var(--cream); border-radius: 10px; font-size: 11px; line-height: 1.85; }
body.large-quran-text .ayah-text { font-size: 36px; }
body.large-quran-text .mushaf-page-text { font-size: 30px; }
body.high-contrast { --ink: #000; --muted: #202020; --cream: #fff; --paper: #fff; --line: #000; background: #fff; }
body.high-contrast .topbar, body.high-contrast .quran-access-suite { background: #fff; }
body.high-contrast .surah-card, body.high-contrast .quran-access-grid article { border-width: 2px; }
body.high-contrast .ayah-text, body.high-contrast .mushaf-page-text { color: #000; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid #e0b83f; outline-offset: 3px; }

.ramadan-hero { display: flex; justify-content: space-between; align-items: end; gap: 28px; padding: 38px 42px; color: #fff; background: linear-gradient(135deg, #0b5144, var(--green-950)); border-radius: var(--radius-xl); box-shadow: var(--shadow); }
.ramadan-hero h1 { margin: 6px 0 8px; font-size: clamp(40px, 6vw, 64px); letter-spacing: -.05em; }
.ramadan-hero p { max-width: 680px; margin: 0; color: rgba(255,255,255,.68); line-height: 1.8; }
.ramadan-controls { display: grid; grid-template-columns: auto auto; gap: 8px; align-items: end; }
.ramadan-controls label { display: grid; gap: 5px; color: var(--gold-soft); font-size: 9px; font-weight: 800; }
.ramadan-controls select, .ramadan-controls button { height: 43px; padding: 0 12px; color: var(--green-950); background: var(--gold-soft); border: 0; border-radius: 11px; font-size: 10px; font-weight: 800; }
.ramadan-controls button { cursor: pointer; }
.ramadan-summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 18px 0; }
.ramadan-summary article { padding: 17px; background: var(--paper); border: 1px solid var(--line); border-radius: 16px; }
.ramadan-summary span, .ramadan-summary strong { display: block; }
.ramadan-summary span { color: var(--muted); font-size: 9px; }
.ramadan-summary strong { margin-top: 6px; font-size: 14px; }
.ramadan-table-card { overflow: hidden; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-xl); box-shadow: var(--shadow); }
.ramadan-table-head { display: flex; justify-content: space-between; align-items: end; gap: 15px; padding: 25px 28px; }
.ramadan-table-head h2 { margin: 5px 0 0; }
.ramadan-table-head button { padding: 9px 12px; color: var(--green-700); background: var(--green-100); border: 0; border-radius: 10px; cursor: pointer; font-size: 9px; font-weight: 800; }
.ramadan-table-wrap { overflow-x: auto; }
.ramadan-table-wrap table { width: 100%; min-width: 660px; border-collapse: collapse; }
.ramadan-table-wrap th, .ramadan-table-wrap td { padding: 13px 15px; text-align: right; border-top: 1px solid var(--line); font-size: 10px; }
.ramadan-table-wrap th { color: var(--muted); background: var(--cream); font-size: 9px; }
.ramadan-table-wrap tbody tr:nth-child(even) { background: #fcfaf3; }
.ramadan-table-wrap tbody tr.ramadan-today { background: var(--gold-soft); }
.ramadan-note { margin: 0; padding: 15px 28px; color: var(--muted); background: var(--cream); font-size: 9px; line-height: 1.75; }
.ramadan-table-card + .source-footer button { color: var(--green-700); background: transparent; border: 0; cursor: pointer; font-size: 9px; font-weight: 800; }

.prayer-intro { max-width: none; display: flex; justify-content: space-between; align-items: end; gap: 30px; }
.location-control { display: grid; justify-items: end; gap: 8px; }
.location-control span { color: var(--muted); font-size: 11px; }
.location-control button, .outline-action { padding: 10px 14px; color: var(--green-700); background: transparent; border: 1px solid var(--green-700); border-radius: 12px; cursor: pointer; font-size: 11px; font-weight: 800; }
.prayer-hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 18px; }
.next-prayer-card, .qibla-card, .mosque-map-card { border: 1px solid rgba(18,50,44,.08); border-radius: var(--radius-xl); box-shadow: var(--shadow); }
.next-prayer-card { padding: 32px; color: #fff; background: linear-gradient(145deg, #0b5144, var(--green-950)); }
.next-prayer-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.next-prayer-top > span { color: var(--gold-soft); font-size: 12px; font-weight: 800; }
.next-prayer-top select { max-width: 230px; padding: 8px 10px; color: rgba(255,255,255,.8); background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.15); border-radius: 10px; font-size: 10px; }
.next-prayer-top option { color: var(--ink); }
.next-prayer-name { margin-top: 36px; color: var(--gold); font-size: 18px; font-weight: 800; }
.countdown { direction: ltr; margin: 5px 0; font-size: clamp(48px, 8vw, 84px); line-height: 1; font-weight: 800; letter-spacing: -.06em; }
.next-prayer-card > p { margin: 8px 0 28px; color: rgba(255,255,255,.65); }
.prayer-times { display: grid; grid-template-columns: repeat(5, 1fr); gap: 7px; }
.prayer-time { display: grid; gap: 4px; padding: 10px 6px; text-align: center; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.09); border-radius: 12px; }
.prayer-time.active { color: var(--green-950); background: var(--gold-soft); }
.prayer-time span { font-size: 9px; }
.prayer-time b { direction: ltr; font-size: 12px; }
.calculation-note { display: block; margin-top: 17px; color: rgba(255,255,255,.5); font-size: 9px; line-height: 1.6; }
.qibla-card { position: relative; overflow: hidden; display: grid; grid-template-columns: 1fr 190px; align-items: center; padding: 31px; background: var(--paper); }
.qibla-copy h2 { margin: 7px 0; font-size: 28px; }
.qibla-copy p { color: var(--muted); line-height: 1.8; }
.compass-wrap { display: grid; place-items: center; }
.compass { position: relative; width: 172px; height: 172px; border: 1px solid #cbd9d4; border-radius: 50%; background: repeating-conic-gradient(from 0deg, rgba(7,58,50,.12) 0deg 1deg, transparent 1deg 15deg), radial-gradient(circle, #fff 0 55%, #edf4f1 56% 100%); box-shadow: inset 0 0 0 10px #fff, 0 12px 32px rgba(7,58,50,.1); }
.compass > span { position: absolute; z-index: 2; color: var(--muted); font-size: 10px; font-weight: 800; }
.compass .north { top: 12px; right: 50%; transform: translateX(50%); color: #a15e36; }
.compass .south { bottom: 12px; right: 50%; transform: translateX(50%); }
.compass .east { right: 13px; top: 50%; transform: translateY(-50%); }
.compass .west { left: 13px; top: 50%; transform: translateY(-50%); }
.qibla-arrow { position: absolute; z-index: 1; inset: 20px; transform-origin: center; transition: transform .2s ease-out; }
.qibla-arrow i { position: absolute; top: 10px; right: 50%; width: 3px; height: 58px; transform: translateX(50%); background: linear-gradient(var(--gold), var(--green-900)); border-radius: 99px; }
.qibla-arrow i::before { content: ""; position: absolute; top: -4px; left: 50%; transform: translateX(-50%); border-right: 7px solid transparent; border-left: 7px solid transparent; border-bottom: 0; border-top: 13px solid var(--gold); }
.qibla-arrow b { position: absolute; top: 50%; right: 50%; transform: translate(50%,-50%); width: 30px; height: 30px; display: grid; place-items: center; color: var(--gold); background: var(--green-900); border-radius: 50%; font-size: 11px; }
.compass-button { grid-column: 1/-1; justify-self: start; margin-top: 12px; min-height: 42px; }
.qibla-card > small { grid-column: 1/-1; display: block; margin-top: 8px; color: var(--muted); font-size: 9px; }
.mosque-section { padding-top: 55px; }
.mosque-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 18px; }
.mosque-map-card { overflow: hidden; min-height: 445px; background: #e7efec; }
#mosqueMap { width: 100%; height: 400px; }
.mosque-list { display: grid; gap: 9px; align-content: start; max-height: 445px; overflow: auto; }
.mosque-item { display: grid; grid-template-columns: 42px 1fr auto; gap: 11px; align-items: center; padding: 15px; background: var(--paper); border: 1px solid var(--line); border-radius: 17px; }
.mosque-item:first-child { border-color: var(--gold); box-shadow: 0 10px 25px rgba(202,166,75,.12); }
.mosque-rank { width: 42px; height: 42px; display: grid; place-items: center; color: var(--gold); background: var(--green-900); border-radius: 13px; font-weight: 800; }
.mosque-item b, .mosque-item small { display: block; }
.mosque-item small { margin-top: 4px; color: var(--muted); font-size: 10px; }
.mosque-item a { padding: 9px 11px; color: var(--green-700); border: 1px solid var(--line); border-radius: 10px; text-decoration: none; font-size: 10px; font-weight: 800; }
.empty-mosques { padding: 70px 20px; text-align: center; color: var(--muted); background: rgba(255,253,248,.7); border: 1px dashed #becdc7; border-radius: 22px; }

.ruqyah-intro { position: relative; overflow: hidden; display: grid; grid-template-columns: 118px 1fr; gap: 28px; align-items: center; padding: 38px 42px; margin-bottom: 18px; color: #fff; background: linear-gradient(130deg, var(--green-900), var(--green-950)); border-radius: var(--radius-xl); box-shadow: var(--shadow); }
.ruqyah-intro::after { content: ""; position: absolute; left: -65px; bottom: -90px; width: 240px; height: 240px; border: 1px solid rgba(202,166,75,.24); border-radius: 50%; box-shadow: 0 0 0 35px rgba(202,166,75,.035), 0 0 0 70px rgba(202,166,75,.025); }
.ruqyah-mark { position: relative; z-index: 1; width: 112px; height: 112px; display: grid; place-items: center; color: var(--gold); background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.12); border-radius: 30px; }
.ruqyah-mark .shield-glyph { width: 67px; }
.ruqyah-intro h1 { margin: 6px 0 8px; font-size: clamp(38px, 6vw, 64px); line-height: 1.25; letter-spacing: -.05em; }
.ruqyah-intro p { max-width: 760px; margin: 0; color: rgba(255,255,255,.72); line-height: 1.9; }
.ruqyah-principle { display: grid; grid-template-columns: auto 1fr auto; gap: 16px; align-items: center; padding: 18px 22px; color: #594917; background: #fff7dc; border: 1px solid #ead89b; border-radius: 18px; }
.ruqyah-principle b { white-space: nowrap; }
.ruqyah-principle p { margin: 0; font-size: 12px; line-height: 1.8; }
.ruqyah-principle a { color: var(--green-700); white-space: nowrap; font-size: 10px; font-weight: 800; }
.ruqyah-section, .ruqyah-dua-section { padding-top: 56px; }
.source-badge, .not-fixed-badge { padding: 8px 11px; color: var(--green-700); background: var(--green-100); border-radius: 99px; font-size: 10px; font-weight: 800; }
.not-fixed-badge { color: #7a5a13; background: var(--gold-soft); }
.ruqyah-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.ruqyah-card { display: flex; flex-direction: column; min-height: 260px; padding: 24px; background: var(--paper); border: 1px solid var(--line); border-radius: 22px; box-shadow: 0 14px 35px rgba(7,58,50,.06); }
.ruqyah-card.primary-ruqyah { color: #fff; background: linear-gradient(145deg, #0b5144, var(--green-950)); border-color: var(--green-900); }
.ruqyah-card-top { display: flex; justify-content: space-between; align-items: center; }
.ruqyah-card-top span { padding: 6px 9px; color: var(--green-700); background: var(--green-100); border-radius: 99px; font-size: 9px; font-weight: 800; }
.primary-ruqyah .ruqyah-card-top span { color: var(--green-950); background: var(--gold-soft); }
.ruqyah-card-top b { color: rgba(7,58,50,.14); font: 30px Georgia, serif; }
.primary-ruqyah .ruqyah-card-top b { color: rgba(255,255,255,.16); }
.ruqyah-card h3 { margin: 25px 0 8px; font: 29px "Amiri", "Traditional Arabic", serif; }
.ruqyah-card p { flex: 1; margin: 0; color: var(--muted); font-size: 11px; line-height: 1.8; }
.primary-ruqyah p { color: rgba(255,255,255,.68); }
.ruqyah-card-actions { display: flex; gap: 8px; align-items: center; margin-top: 20px; }
.ruqyah-card-actions button, .ruqyah-card-actions a { padding: 9px 11px; border-radius: 10px; font-size: 10px; font-weight: 800; cursor: pointer; }
.ruqyah-card-actions button { color: #fff; background: var(--green-700); border: 0; }
.ruqyah-card-actions a { color: var(--green-700); border: 1px solid var(--line); text-decoration: none; }
.primary-ruqyah .ruqyah-card-actions button { color: var(--green-950); background: var(--gold-soft); }
.primary-ruqyah .ruqyah-card-actions a { color: rgba(255,255,255,.72); border-color: rgba(255,255,255,.18); }
.section-note { max-width: 770px; margin: -12px 0 22px; color: var(--muted); font-size: 12px; line-height: 1.8; }
.general-range-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.general-range-grid button { min-height: 145px; padding: 20px; text-align: right; color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 19px; cursor: pointer; transition: .2s; }
.general-range-grid button:hover { transform: translateY(-2px); border-color: var(--gold); }
.general-range-grid span, .general-range-grid b, .general-range-grid small { display: block; }
.general-range-grid span { color: var(--gold); font-size: 11px; font-weight: 800; }
.general-range-grid b { margin: 9px 0; font-size: 24px; }
.general-range-grid small { color: var(--muted); line-height: 1.6; }
.ruqyah-dua-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.ruqyah-dua-grid article { padding: 28px; color: #fff; background: var(--green-900); border-radius: 24px; box-shadow: var(--shadow); }
.ruqyah-dua-grid span { color: var(--gold); font-size: 10px; font-weight: 800; }
.ruqyah-dua-grid blockquote { min-height: 145px; margin: 15px 0; font: 24px/2 "Amiri", "Traditional Arabic", serif; }
.ruqyah-dua-grid a { color: var(--gold-soft); font-size: 10px; font-weight: 800; }
.medical-notice { display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: start; margin-top: 18px; padding: 18px 22px; color: #6f4c19; background: var(--danger-soft); border-radius: 17px; }
.medical-notice span { font-weight: 800; white-space: nowrap; }
.medical-notice p { margin: 0; font-size: 11px; line-height: 1.8; }

.adhkar-hero { display: grid; grid-template-columns: 1fr 260px; gap: 26px; align-items: end; padding: 42px; color: #fff; background: linear-gradient(135deg, var(--green-900), #0b5a49); border-radius: var(--radius-xl); box-shadow: var(--shadow); }
.adhkar-hero h1 { margin: 6px 0 10px; font-size: clamp(42px, 7vw, 70px); line-height: 1.15; letter-spacing: -.05em; }
.adhkar-hero p { max-width: 690px; margin: 0; color: rgba(255,255,255,.7); line-height: 1.9; }
.adhkar-today { padding: 22px; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.12); border-radius: 20px; }
.adhkar-today span, .adhkar-today small { display: block; color: rgba(255,255,255,.65); font-size: 10px; }
.adhkar-today strong { display: block; margin: 8px 0; color: var(--gold-soft); font-size: 38px; }
.adhkar-today > div { height: 7px; overflow: hidden; margin-bottom: 9px; background: rgba(255,255,255,.12); border-radius: 99px; }
.adhkar-today i { display: block; width: 0; height: 100%; background: var(--gold); border-radius: inherit; transition: width .25s; }
.adhkar-tabs, .manasik-tabs { display: flex; gap: 7px; overflow-x: auto; margin: 18px 0 30px; padding: 7px; background: rgba(255,255,255,.62); border: 1px solid var(--line); border-radius: 18px; scrollbar-width: none; }
.adhkar-tabs::-webkit-scrollbar, .manasik-tabs::-webkit-scrollbar { display: none; }
.adhkar-tabs button, .manasik-tabs button { flex: 1; min-width: 120px; padding: 12px 15px; color: var(--muted); background: transparent; border: 0; border-radius: 12px; cursor: pointer; font-size: 11px; font-weight: 800; white-space: nowrap; }
.adhkar-tabs button.active, .manasik-tabs button.active { color: #fff; background: var(--green-900); box-shadow: 0 8px 18px rgba(7,58,50,.13); }
.adhkar-toolbar { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 17px; }
.adhkar-toolbar span { color: var(--gold); font-size: 11px; font-weight: 800; }
.adhkar-toolbar h2 { margin: 5px 0 0; font-size: 30px; }
.adhkar-toolbar button { padding: 9px 12px; color: #826c60; background: transparent; border: 1px solid #d8cbc4; border-radius: 11px; cursor: pointer; font-size: 9px; font-weight: 800; }
.adhkar-list { display: grid; gap: 12px; }
.dhikr-card { display: grid; grid-template-columns: 48px minmax(0, 1fr) 112px; gap: 18px; align-items: start; padding: 25px; background: var(--paper); border: 1px solid var(--line); border-radius: 22px; box-shadow: 0 12px 34px rgba(7,58,50,.055); }
.dhikr-card.complete { border-color: rgba(202,166,75,.75); background: #fffdf4; }
.dhikr-number { width: 48px; height: 48px; display: grid; place-items: center; color: var(--gold); background: var(--green-900); border-radius: 15px; font-weight: 800; }
.dhikr-copy > span { color: var(--green-700); font-size: 10px; font-weight: 800; }
.dhikr-copy blockquote { margin: 10px 0 12px; color: var(--ink); font: 23px/2 "Amiri", "Traditional Arabic", serif; }
.dhikr-copy a { color: var(--green-700); font-size: 9px; font-weight: 800; }
.dhikr-counter { display: grid; gap: 10px; justify-items: end; }
.dhikr-counter strong { direction: ltr; font-size: 23px; }
.dhikr-counter strong small { color: var(--muted); font-size: 11px; }
.dhikr-counter > div { display: flex; gap: 5px; }
.dhikr-counter button { min-width: 45px; min-height: 38px; padding: 0 9px; color: #fff; background: var(--green-700); border: 0; border-radius: 10px; cursor: pointer; font-size: 10px; font-weight: 800; }
.dhikr-card.complete .dhikr-counter button { color: var(--green-800); background: var(--gold-soft); }
.adhkar-method-note { margin-top: 14px; padding: 15px 18px; color: var(--muted); background: var(--green-100); border-radius: 14px; font-size: 10px; line-height: 1.8; }

.manasik-hero { position: relative; overflow: hidden; display: grid; grid-template-columns: 100px 1fr auto; gap: 25px; align-items: center; padding: 38px 42px; color: #fff; background: linear-gradient(135deg, #111d1a, var(--green-950)); border-radius: var(--radius-xl); box-shadow: var(--shadow); }
.manasik-hero::after { content: ""; position: absolute; left: -80px; top: -90px; width: 250px; height: 250px; border: 1px solid rgba(202,166,75,.18); border-radius: 50%; box-shadow: 0 0 0 45px rgba(202,166,75,.035); }
.manasik-kaaba { position: relative; z-index: 1; width: 96px; height: 96px; display: grid; place-items: center; color: #111; background: var(--gold-soft); border-radius: 26px; }
.manasik-kaaba .kaaba-glyph { width: 61px; }
.manasik-hero h1 { margin: 6px 0 9px; font-size: clamp(40px, 6vw, 64px); letter-spacing: -.05em; }
.manasik-hero p { max-width: 710px; margin: 0; color: rgba(255,255,255,.68); line-height: 1.85; }
.manasik-hero > a { position: relative; z-index: 1; padding: 11px 13px; color: var(--gold-soft); border: 1px solid rgba(242,229,185,.35); border-radius: 12px; text-decoration: none; font-size: 10px; font-weight: 800; white-space: nowrap; }
.manasik-panel { animation: fade-in .25s ease; }
.manasik-panel-heading { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 22px; }
.manasik-panel-heading h2 { margin: 5px 0 0; font-size: 34px; }
.manasik-panel-heading a { color: var(--green-700); font-size: 10px; font-weight: 800; }
.ritual-timeline { display: grid; grid-template-columns: repeat(4, 1fr); gap: 13px; }
.ritual-timeline article { position: relative; padding: 25px 22px; background: var(--paper); border: 1px solid var(--line); border-radius: 22px; }
.ritual-timeline article > span { width: 38px; height: 38px; display: grid; place-items: center; color: var(--green-950); background: var(--gold-soft); border-radius: 12px; font-weight: 900; }
.ritual-timeline h3 { margin: 21px 0 8px; font-size: 20px; }
.ritual-timeline p { min-height: 145px; margin: 0; color: var(--muted); font-size: 11px; line-height: 1.85; }
.ritual-timeline small { display: block; margin-top: 15px; padding-top: 13px; color: var(--green-700); border-top: 1px solid var(--line); font-size: 9px; line-height: 1.7; }
.hajj-days { display: grid; grid-template-columns: repeat(5, 1fr); gap: 11px; }
.hajj-days article { min-height: 255px; padding: 24px 20px; color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 21px; }
.hajj-days article.major { color: #fff; background: var(--green-900); }
.hajj-days time { color: var(--gold); font-size: 11px; font-weight: 900; }
.hajj-days h3 { margin: 25px 0 9px; font-size: 19px; }
.hajj-days p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.85; }
.hajj-days .major p { color: rgba(255,255,255,.7); }
.variant-warning { display: grid; grid-template-columns: auto 1fr; gap: 12px; margin-top: 14px; padding: 16px 19px; color: #6f5317; background: var(--gold-soft); border-radius: 15px; }
.variant-warning p { margin: 0; font-size: 10px; line-height: 1.8; }
.local-counter-badge { padding: 8px 11px; color: var(--green-700); background: var(--green-100); border-radius: 99px; font-size: 10px; font-weight: 800; }
.ritual-counters { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.ritual-counter { padding: 28px; background: var(--paper); border: 1px solid var(--line); border-radius: 26px; box-shadow: var(--shadow); }
.counter-heading { display: flex; justify-content: space-between; gap: 15px; }
.counter-heading span { color: var(--gold); font-size: 10px; font-weight: 800; }
.counter-heading h3 { margin: 5px 0 0; font-size: 23px; }
.counter-heading > b { color: var(--green-700); font-size: 11px; }
.counter-ring { --progress: 0deg; position: relative; width: 190px; height: 190px; display: grid; place-items: center; align-content: center; gap: 2px; margin: 28px auto 20px; background: radial-gradient(circle, var(--paper) 0 59%, transparent 60%), conic-gradient(var(--gold) var(--progress), var(--green-100) 0); border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(7,58,50,.04); transition: background .25s; }
.counter-ring::after { content: ""; position: absolute; inset: 14px; border: 1px dashed rgba(7,58,50,.12); border-radius: 50%; }
.counter-ring strong { position: relative; z-index: 1; font-size: 66px; line-height: 1; }
.counter-ring span { position: relative; z-index: 1; color: var(--muted); font-size: 11px; }
.counter-ring.complete { color: var(--green-700); }
.lap-dots { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.lap-dots i { height: 30px; display: grid; place-items: center; color: var(--muted); background: var(--green-100); border-radius: 9px; font-size: 9px; font-style: normal; }
.lap-dots i.done { color: var(--green-950); background: var(--gold-soft); font-weight: 900; }
.ritual-counter > p { min-height: 44px; margin: 15px 0; color: var(--muted); text-align: center; font-size: 10px; line-height: 1.75; }
.counter-actions { display: grid; grid-template-columns: 44px 1fr auto; gap: 7px; }
.counter-actions button { min-height: 48px; border-radius: 12px; cursor: pointer; font-weight: 800; }
.subtract-lap { color: var(--green-700); background: var(--green-100); border: 0; font-size: 22px; }
.complete-lap { color: #fff; background: var(--green-900); border: 0; }
.reset-laps { padding: 0 13px; color: #896f61; background: transparent; border: 1px solid #d9ccc5; font-size: 10px; }
.counter-safety { display: grid; grid-template-columns: auto 1fr; gap: 13px; margin-top: 15px; padding: 18px 20px; color: #79571c; background: var(--danger-soft); border-radius: 16px; }
.counter-safety p { margin: 0; font-size: 10px; line-height: 1.8; }
.manasik-reference-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 13px; }
.manasik-reference-grid article { padding: 25px; color: #fff; background: var(--green-900); border-radius: 22px; }
.manasik-reference-grid article > span { color: var(--gold); font-size: 10px; font-weight: 800; }
.manasik-reference-grid blockquote { min-height: 115px; margin: 14px 0; font: 23px/2 "Amiri", "Traditional Arabic", serif; }
.manasik-reference-grid a { color: var(--gold-soft); font-size: 9px; font-weight: 800; }
.manasik-reference-grid .no-fixed-dua { color: var(--ink); background: var(--gold-soft); }
.no-fixed-dua h3 { margin: 18px 0 8px; font-size: 25px; }
.no-fixed-dua p { margin: 0; color: #735d27; line-height: 1.8; }
.ruling-faq { display: grid; gap: 8px; margin-top: 18px; }
.ruling-faq details { padding: 17px 19px; background: var(--paper); border: 1px solid var(--line); border-radius: 15px; }
.ruling-faq summary { cursor: pointer; font-size: 12px; font-weight: 800; }
.ruling-faq p { margin: 12px 0 0; color: var(--muted); font-size: 11px; line-height: 1.85; }
.source-footer { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 16px; }
.source-footer a { padding: 9px 12px; color: var(--green-700); background: var(--green-100); border-radius: 10px; font-size: 9px; font-weight: 800; }
.miqat-finder { display: grid; grid-template-columns: 1fr auto; gap: 20px; align-items: center; padding: 28px; color: #fff; background: linear-gradient(120deg, var(--green-900), var(--green-700)); border-radius: 23px; box-shadow: var(--shadow); }
.miqat-finder-copy > span { color: var(--gold-soft); font-size: 10px; font-weight: 800; }
.miqat-finder h3 { margin: 7px 0 5px; font-size: 28px; }
.miqat-finder p { margin: 0; color: rgba(255,255,255,.67); font-size: 11px; line-height: 1.75; }
.miqat-finder button { padding: 12px 15px; color: var(--green-950); background: var(--gold-soft); border: 0; border-radius: 12px; cursor: pointer; font-size: 10px; font-weight: 900; }
.miqat-finder button:disabled { opacity: .65; cursor: wait; }
.miqat-route-warning { display: grid; grid-template-columns: auto 1fr; gap: 13px; margin: 12px 0 18px; padding: 16px 19px; color: #73541b; background: var(--danger-soft); border-radius: 15px; }
.miqat-route-warning p { margin: 0; font-size: 10px; line-height: 1.8; }
.miqat-list { display: grid; grid-template-columns: repeat(5, 1fr); gap: 9px; }
.miqat-item { min-height: 190px; display: flex; flex-direction: column; gap: 11px; padding: 18px; background: var(--paper); border: 1px solid var(--line); border-radius: 18px; }
.miqat-item.nearest { border-color: var(--gold); box-shadow: 0 12px 28px rgba(202,166,75,.13); }
.miqat-item > span { align-self: flex-start; padding: 5px 8px; color: var(--green-700); background: var(--green-100); border-radius: 99px; font-size: 9px; font-weight: 800; }
.miqat-item h3 { margin: 0 0 6px; font-size: 17px; }
.miqat-item p { margin: 0; color: var(--muted); font-size: 9px; line-height: 1.7; }
.miqat-item > div:last-child { display: flex; flex-wrap: wrap; gap: 5px; margin-top: auto; }
.miqat-item button, .miqat-item a { padding: 7px 9px; color: var(--green-700); background: transparent; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; text-decoration: none; font-size: 8px; font-weight: 800; }
.heritage-bridge { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-top: 20px; padding: 24px 26px; color: #fff; background: linear-gradient(120deg, #3e2f1f, #6f4b2b); border-radius: 22px; box-shadow: var(--shadow); }
.heritage-bridge h3 { margin: 6px 0 5px; font-size: 22px; }
.heritage-bridge p { margin: 0; color: rgba(255,255,255,.7); font-size: 10px; line-height: 1.75; }
.heritage-bridge button { flex: 0 0 auto; padding: 12px 15px; color: #3e2f1f; background: var(--gold-soft); border: 0; border-radius: 12px; cursor: pointer; font-size: 10px; font-weight: 900; }
.heritage-hero { position: relative; overflow: hidden; display: grid; grid-template-columns: 92px 1fr auto; gap: 24px; align-items: center; padding: 38px 42px; color: #fff; background: linear-gradient(135deg, #2e2119, #71472d); border-radius: var(--radius-xl); box-shadow: var(--shadow); }
.heritage-hero::after { content: ""; position: absolute; left: -75px; top: -100px; width: 260px; height: 260px; border: 1px solid rgba(242,229,185,.2); border-radius: 50%; box-shadow: 0 0 0 44px rgba(242,229,185,.04); }
.heritage-hero-mark { position: relative; z-index: 1; width: 88px; height: 88px; display: grid; place-items: center; color: #51351f; background: var(--gold-soft); border-radius: 26px; font-size: 42px; }
.heritage-hero h1 { margin: 6px 0 9px; font-size: clamp(40px, 6vw, 64px); letter-spacing: -.05em; }
.heritage-hero p { max-width: 690px; margin: 0; color: rgba(255,255,255,.72); line-height: 1.85; }
.heritage-count { position: relative; z-index: 1; padding: 10px 13px; color: var(--gold-soft); border: 1px solid rgba(242,229,185,.3); border-radius: 12px; font-size: 10px; font-weight: 800; white-space: nowrap; }
.heritage-principle { display: grid; grid-template-columns: auto 1fr; gap: 14px; margin-top: 16px; padding: 17px 20px; color: #704b2e; background: #f7e9d8; border: 1px solid #ead2b6; border-radius: 16px; }
.heritage-principle p { margin: 0; font-size: 10px; line-height: 1.8; }
.sacred-heading, .historical-sites-heading { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin: 52px 0 20px; }
.sacred-heading h2, .historical-sites-heading h2 { margin: 5px 0 0; font-size: 32px; }
.sacred-heading a { color: var(--green-700); font-size: 10px; font-weight: 800; }
.sacred-mosque-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 11px; margin-bottom: 14px; }
.sacred-mosque-grid button { min-height: 135px; padding: 22px; text-align: right; color: #fff; background: linear-gradient(140deg, #13231f, var(--green-900)); border: 1px solid rgba(255,255,255,.08); border-radius: 20px; cursor: pointer; }
.sacred-mosque-grid span, .sacred-mosque-grid small { display: block; color: var(--gold); font-size: 9px; font-weight: 800; }
.sacred-mosque-grid h3 { margin: 15px 0 10px; font: 27px "Amiri", "Traditional Arabic", serif; }
.sacred-mosque-grid small { color: rgba(255,255,255,.6); }
.heritage-map-layout { display: grid; grid-template-columns: 1.3fr .7fr; gap: 14px; }
.heritage-map-card { overflow: hidden; background: var(--paper); border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow); }
#sacredMap { width: 100%; height: 470px; background: #e7efec; }
.map-legend { display: flex; flex-wrap: wrap; gap: 15px; padding: 13px 17px; color: var(--muted); font-size: 9px; }
.map-legend span { display: flex; align-items: center; gap: 6px; }
.map-legend i { width: 9px; height: 9px; display: inline-block; border-radius: 50%; }
.mosque-dot { background: var(--gold); }
.miqat-dot { background: var(--green-700); }
.history-dot { background: #9a5a38; }
.audio-guide-card { display: flex; flex-direction: column; padding: 28px; color: #fff; background: var(--green-900); border-radius: 24px; box-shadow: var(--shadow); }
.audio-guide-icon { width: 48px; height: 48px; display: grid; place-items: center; color: var(--green-950); background: var(--gold-soft); border-radius: 15px; font-size: 23px; }
.audio-guide-card h3 { margin: 17px 0 7px; font-size: 26px; }
.audio-guide-card p { margin: 0; color: rgba(255,255,255,.65); font-size: 11px; line-height: 1.8; }
.guide-voice-label { display: grid; gap: 6px; margin-top: 20px; color: rgba(255,255,255,.72); font-size: 9px; font-weight: 800; }
.guide-voice-label select { width: 100%; min-height: 42px; padding: 0 10px; color: #fff; background: rgba(255,255,255,.09); border: 1px solid rgba(255,255,255,.18); border-radius: 11px; outline: 0; }
.guide-voice-label option { color: var(--ink); background: #fff; }
.audio-guide-card .preview-guide-voice { min-height: 40px; margin-top: 8px; color: #fff; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.16); }
.guide-voice-status { display: block; margin-top: 7px; color: rgba(255,255,255,.58); font-size: 8px; line-height: 1.6; }
.audio-guide-status { margin: 22px 0 12px; padding: 12px; color: var(--gold-soft); background: rgba(255,255,255,.07); border-radius: 12px; font-size: 10px; line-height: 1.7; }
.audio-guide-card button { min-height: 46px; color: var(--green-950); background: var(--gold-soft); border: 0; border-radius: 12px; cursor: pointer; font-weight: 900; }
.audio-guide-card .stop-audio-guide { color: #fff; background: #986044; }
.audio-guide-card > small { margin-top: auto; padding-top: 16px; color: rgba(255,255,255,.45); font-size: 8px; line-height: 1.7; }
.historical-sites-heading p { max-width: 480px; margin: 0; color: var(--muted); font-size: 10px; line-height: 1.75; }
.historical-sites { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.historical-site-card { min-height: 290px; display: flex; flex-direction: column; padding: 23px; background: var(--paper); border: 1px solid var(--line); border-radius: 21px; }
.site-card-top { display: flex; justify-content: space-between; gap: 10px; color: var(--gold); font-size: 9px; font-weight: 800; }
.site-card-top b { color: var(--green-700); }
.historical-site-card h3 { margin: 25px 0 8px; font-size: 23px; }
.historical-site-card p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.85; }
.historical-site-card > div:last-child { display: flex; flex-wrap: wrap; gap: 5px; margin-top: auto; padding-top: 18px; }
.historical-site-card button, .historical-site-card a { padding: 8px 9px; color: var(--green-700); background: var(--green-100); border: 0; border-radius: 9px; cursor: pointer; text-decoration: none; font-size: 8px; font-weight: 800; }
.historical-site-card button:first-child { color: #fff; background: var(--green-700); }
.world-atlas { margin-top: 72px; padding-top: 48px; border-top: 1px solid var(--line); }
.world-atlas-heading { display: flex; justify-content: space-between; align-items: end; gap: 28px; margin-bottom: 24px; }
.world-atlas-heading h2 { margin: 7px 0 8px; font-size: clamp(34px, 5vw, 54px); }
.world-atlas-heading p { max-width: 650px; margin: 0; color: var(--muted); line-height: 1.8; }
.atlas-counters { display: grid; grid-template-columns: repeat(2, 1fr); gap: 7px; min-width: 250px; }
.atlas-counters span { padding: 10px 12px; color: var(--muted); background: var(--paper); border: 1px solid var(--line); border-radius: 12px; font-size: 9px; }
.atlas-counters b { color: var(--green-700); font-size: 16px; }
.atlas-tabs { display: flex; gap: 7px; margin-bottom: 12px; padding: 5px; overflow-x: auto; background: #e9eee9; border-radius: 16px; }
.atlas-tabs button { min-height: 42px; flex: 1; padding: 8px 13px; color: var(--muted); background: transparent; border: 0; border-radius: 12px; cursor: pointer; white-space: nowrap; font-size: 10px; font-weight: 800; }
.atlas-tabs button.active { color: #fff; background: var(--green-900); box-shadow: 0 7px 18px rgba(7,58,50,.17); }
.atlas-caution { display: grid; grid-template-columns: auto 1fr; gap: 13px; margin-bottom: 14px; padding: 15px 18px; color: #6f5317; background: var(--gold-soft); border-radius: 14px; }
.atlas-caution p { margin: 0; font-size: 10px; line-height: 1.8; }
.atlas-layout { display: grid; grid-template-columns: 1.45fr .55fr; gap: 14px; }
.atlas-map-card { overflow: hidden; background: var(--paper); border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow); }
#historyAtlasMap { width: 100%; height: 540px; background: #e7efec; }
.certain-dot { background: var(--green-700); }
.approx-dot { background: var(--gold); }
.disputed-dot { background: #9a5a38; }
.atlas-summary-card { display: flex; flex-direction: column; justify-content: center; padding: 30px; color: #fff; background: linear-gradient(145deg, var(--green-900), #102d27); border-radius: 24px; box-shadow: var(--shadow); }
.atlas-summary-card h3 { margin: 12px 0 9px; font-size: 30px; }
.atlas-summary-card p { margin: 0; color: rgba(255,255,255,.65); font-size: 11px; line-height: 1.85; }
.atlas-summary-card > div { align-self: flex-start; margin-top: 24px; padding: 8px 11px; color: var(--green-950); background: var(--gold-soft); border-radius: 99px; font-size: 10px; font-weight: 900; }
.atlas-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 14px; }
.atlas-card { min-height: 320px; display: flex; flex-direction: column; padding: 22px; background: var(--paper); border: 1px solid var(--line); border-top: 4px solid var(--green-700); border-radius: 20px; }
.atlas-card.certainty-approx { border-top-color: var(--gold); }
.atlas-card.certainty-disputed { border-top-color: #9a5a38; }
.atlas-card-top { display: flex; justify-content: space-between; gap: 10px; color: var(--gold); font-size: 9px; font-weight: 800; }
.atlas-card-top b { color: var(--green-700); text-align: left; }
.atlas-card h3 { margin: 22px 0 5px; font-size: 23px; }
.atlas-card > small { color: #8a6a3d; font-size: 9px; font-weight: 800; }
.atlas-card > p { margin: 13px 0 0; color: var(--muted); font-size: 10px; line-height: 1.85; }
.atlas-card-actions { display: flex; flex-wrap: wrap; gap: 5px; margin-top: auto; padding-top: 18px; }
.atlas-card-actions button, .atlas-card-actions a { padding: 8px 9px; color: var(--green-700); background: var(--green-100); border: 0; border-radius: 9px; cursor: pointer; text-decoration: none; font-size: 8px; font-weight: 800; }
.atlas-card-actions button { color: #fff; background: var(--green-700); }
.atlas-method-note { margin: 14px 0 0; padding: 16px 18px; color: var(--muted); background: #ece8dc; border-radius: 14px; font-size: 9px; line-height: 1.8; }

.quiz-hero { position: relative; overflow: hidden; display: grid; grid-template-columns: 92px 1fr auto; gap: 24px; align-items: center; padding: 38px 42px; color: #fff; background: linear-gradient(135deg, #092f37, #0d5c64); border-radius: var(--radius-xl); box-shadow: var(--shadow); }
.quiz-hero::after { content: ""; position: absolute; left: -70px; top: -100px; width: 270px; height: 270px; border: 1px solid rgba(242,229,185,.17); border-radius: 50%; box-shadow: 0 0 0 45px rgba(242,229,185,.035); }
.quiz-mark { position: relative; z-index: 1; width: 88px; height: 88px; display: grid; place-items: center; color: #0d5057; background: var(--gold-soft); border-radius: 26px; font-size: 48px; font-weight: 900; }
.quiz-hero h1 { margin: 6px 0 9px; font-size: clamp(40px, 6vw, 64px); letter-spacing: -.05em; }
.quiz-hero p { max-width: 700px; margin: 0; color: rgba(255,255,255,.7); line-height: 1.85; }
.quiz-best { position: relative; z-index: 1; padding: 13px 15px; text-align: center; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.13); border-radius: 15px; }
.quiz-best span, .quiz-best strong { display: block; }
.quiz-best span { color: rgba(255,255,255,.58); font-size: 9px; }
.quiz-best strong { margin-top: 4px; color: var(--gold-soft); font-size: 20px; direction: ltr; }
.quiz-levels { display: grid; grid-template-columns: repeat(3, 1fr); gap: 11px; margin: 16px 0; }
.quiz-levels button { padding: 21px; text-align: right; background: var(--paper); border: 1px solid var(--line); border-radius: 18px; cursor: pointer; transition: .2s; }
.quiz-levels button.active { color: #fff; background: var(--green-900); border-color: var(--green-900); transform: translateY(-2px); box-shadow: var(--shadow); }
.quiz-levels span { color: var(--gold); font-size: 9px; font-weight: 800; }
.quiz-levels h2 { margin: 8px 0 5px; font-size: 24px; }
.quiz-levels p { margin: 0; color: var(--muted); font-size: 10px; }
.quiz-levels button.active p { color: rgba(255,255,255,.62); }
.quiz-stage { max-width: 900px; margin: 0 auto; }
.quiz-progress-row { display: flex; justify-content: space-between; align-items: center; gap: 15px; padding: 14px 4px 8px; }
.quiz-progress-row div { display: flex; align-items: center; gap: 9px; }
.quiz-progress-row span { padding: 5px 8px; color: var(--green-700); background: var(--green-100); border-radius: 99px; font-size: 9px; font-weight: 800; }
.quiz-progress-row b, .quiz-progress-row > strong { font-size: 10px; }
.quiz-progress-track { height: 7px; overflow: hidden; margin-bottom: 10px; background: #dfe8e4; border-radius: 99px; }
.quiz-progress-track i { width: 0; height: 100%; display: block; background: linear-gradient(90deg, var(--green-700), var(--gold)); border-radius: inherit; transition: width .25s; }
.quiz-question-card { padding: 34px; background: var(--paper); border: 1px solid var(--line); border-radius: 28px; box-shadow: var(--shadow); }
.quiz-question-number { width: 46px; height: 46px; display: grid; place-items: center; color: var(--green-950); background: var(--gold-soft); border-radius: 14px; font-weight: 900; }
.quiz-question-card h2 { margin: 22px 0 10px; font-size: clamp(25px, 4vw, 35px); line-height: 1.5; }
.quiz-hint-button { padding: 7px 0; color: var(--green-700); background: transparent; border: 0; cursor: pointer; font-size: 10px; font-weight: 800; }
.quiz-hint { margin: 5px 0 12px; padding: 11px 13px; color: #74571b; background: var(--gold-soft); border-radius: 11px; font-size: 10px; }
.quiz-options { display: grid; grid-template-columns: repeat(2, 1fr); gap: 9px; margin-top: 17px; }
.quiz-options button { min-height: 64px; display: flex; align-items: center; gap: 12px; padding: 12px 14px; text-align: right; color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 14px; cursor: pointer; font-size: 12px; font-weight: 800; }
.quiz-options button:hover:not(:disabled) { border-color: var(--green-700); }
.quiz-options button span { width: 32px; height: 32px; flex: 0 0 auto; display: grid; place-items: center; color: var(--green-700); background: var(--green-100); border-radius: 9px; direction: ltr; }
.quiz-options button.correct { color: #0b5d42; background: #e7f6ee; border-color: #5db18b; }
.quiz-options button.wrong { color: #8b3e34; background: #fff0ed; border-color: #d9968b; }
.quiz-feedback { display: flex; justify-content: space-between; gap: 18px; align-items: center; margin-top: 16px; padding: 16px 18px; color: var(--green-900); background: var(--green-100); border-radius: 14px; }
.quiz-feedback p { margin: 5px 0 0; color: var(--muted); font-size: 10px; line-height: 1.75; }
.quiz-feedback a { flex: 0 0 auto; color: var(--green-700); font-size: 9px; font-weight: 800; }
.quiz-next { width: 100%; margin-top: 12px; }
.empty-mosques span { display: block; margin-bottom: 15px; color: var(--gold); font-size: 32px; }
.empty-mosques b { color: var(--ink); }
.empty-mosques p { font-size: 11px; }

.tafsir-layout { display: grid; grid-template-columns: 1.3fr .7fr; gap: 20px; }
.tafsir-reader, .principles-card { padding: 34px; background: var(--paper); }
.verse-label, .verse-ref { color: var(--gold); font-weight: 800; font-size: 12px; }
.tafsir-reader blockquote { margin: 25px 0; padding: 0; border: 0; font: 32px/2.15 "Amiri", "Traditional Arabic", serif; }
.tafsir-block { padding-top: 22px; border-top: 1px solid var(--line); }
.source-line { display: flex; justify-content: space-between; gap: 15px; font-size: 11px; font-weight: 800; }
.source-line a { color: var(--green-700); }
.tafsir-block p { color: var(--muted); line-height: 2; }
.principles-card { background: var(--green-900); color: #fff; }
.principles-card h2 { margin-top: 0; }
.principles-card ul { display: grid; gap: 18px; padding: 0; list-style: none; }
.principles-card li { display: grid; gap: 4px; padding-bottom: 17px; border-bottom: 1px solid rgba(255,255,255,.1); }
.principles-card li span { color: rgba(255,255,255,.65); font-size: 12px; line-height: 1.7; }

.science-intro { max-width: none; display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: end; }
.science-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.science-card { padding: 27px; background: var(--paper); }
.science-card.featured { color: #fff; background: var(--green-900); }
.science-card-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 26px; }
.topic-icon { width: 42px; height: 42px; display: grid; place-items: center; color: var(--gold); background: rgba(202,166,75,.12); border-radius: 13px; font-size: 24px; }
.confidence { padding: 6px 9px; border-radius: 99px; font-size: 10px; font-weight: 800; }
.confidence.strong { color: #d5ffe9; background: rgba(129,237,184,.14); }
.confidence.interpretive { color: #785a11; background: #f4e7ba; }
.confidence.review { color: #6d5f59; background: #eee7e3; }
.science-card h2 { margin: 7px 0 10px; }
.science-card p { min-height: 102px; color: var(--muted); line-height: 1.9; }
.science-card.featured p { color: rgba(255,255,255,.72); }
.evidence-row { display: grid; gap: 3px; padding: 12px 0; border-top: 1px solid rgba(255,255,255,.12); }
.evidence-row b { font-size: 11px; color: var(--gold-soft); }
.evidence-row span { font-size: 12px; color: rgba(255,255,255,.75); }
.science-card a { display: inline-block; margin-top: 18px; color: var(--gold-soft); font-size: 11px; }
.review-note { padding: 13px; color: var(--muted); background: var(--cream); border-radius: 12px; font-size: 11px; line-height: 1.7; }

.zakat-feature-icon, .nav-zakat { font-family: "Amiri", "Traditional Arabic", serif; font-weight: 800; }
.zakat-hero { position: relative; overflow: hidden; display: grid; grid-template-columns: 92px 1fr auto; gap: 24px; align-items: center; padding: 38px 42px; color: #fff; background: linear-gradient(135deg, #0a493d, var(--green-950)); border-radius: var(--radius-xl); box-shadow: var(--shadow); }
.zakat-hero::after { content: ""; position: absolute; left: -80px; top: -95px; width: 260px; height: 260px; border: 1px solid rgba(202,166,75,.2); border-radius: 50%; box-shadow: 0 0 0 48px rgba(202,166,75,.04); }
.zakat-hero-mark { position: relative; z-index: 1; width: 86px; height: 86px; display: grid; place-items: center; color: var(--green-950); background: var(--gold-soft); border-radius: 25px; font: 700 46px/1 "Amiri", "Traditional Arabic", serif; }
.zakat-hero h1 { margin: 6px 0 8px; font-size: clamp(40px, 6vw, 64px); letter-spacing: -.05em; }
.zakat-hero p { max-width: 720px; margin: 0; color: rgba(255,255,255,.7); line-height: 1.85; }
.zakat-privacy { position: relative; z-index: 1; padding: 9px 12px; color: var(--gold-soft); border: 1px solid rgba(242,229,185,.3); border-radius: 99px; font-size: 10px; font-weight: 800; white-space: nowrap; }
.zakat-layout { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(310px, .75fr); gap: 18px; align-items: start; margin-top: 20px; }
.zakat-form-card, .zakat-result-card, .zakat-scope-card, .zakat-sources { background: var(--paper); border: 1px solid rgba(18,50,44,.08); border-radius: var(--radius-xl); box-shadow: var(--shadow); }
.zakat-form-card { padding: 30px; }
.zakat-card-heading { display: flex; justify-content: space-between; align-items: end; gap: 15px; }
.zakat-card-heading h2 { margin: 5px 0 0; font-size: 27px; }
.zakat-card-heading > span { padding: 7px 10px; color: var(--green-700); background: var(--green-100); border-radius: 99px; font-size: 10px; font-weight: 800; }
.assets-heading { margin-top: 30px; padding-top: 27px; border-top: 1px solid var(--line); }
.zakat-fields { display: grid; gap: 14px; margin-top: 20px; }
.zakat-fields.two-columns { grid-template-columns: repeat(2, 1fr); }
.zakat-fields label, .metal-grid label, #zakatDebtField { display: grid; gap: 7px; align-content: start; color: var(--muted); font-size: 11px; font-weight: 800; }
.zakat-fields label > small { min-height: 31px; color: #84918d; font-size: 9px; font-weight: 500; line-height: 1.65; }
.zakat-fields select, .metal-grid select, .metal-grid input { width: 100%; min-height: 48px; padding: 0 12px; color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 12px; outline: 0; }
.money-input { display: flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 12px; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.money-input:focus-within, .zakat-fields select:focus, .metal-grid select:focus, .metal-grid input:focus { border-color: var(--green-700); box-shadow: 0 0 0 4px rgba(20,100,83,.08); }
.money-input input { min-width: 0; width: 100%; height: 44px; color: var(--ink); background: transparent; border: 0; outline: 0; }
.money-input span { color: var(--green-700); font-size: 10px; white-space: nowrap; }
.zakat-field-note { margin: 11px 0 0; color: var(--muted); font-size: 10px; line-height: 1.7; }
.metal-fieldset { margin: 24px 0 0; padding: 19px; border: 1px solid var(--line); border-radius: 18px; }
.metal-fieldset legend { padding: 0 8px; color: var(--ink); font-size: 12px; font-weight: 800; }
.metal-grid { display: grid; grid-template-columns: 1.1fr .65fr 1.1fr; gap: 10px; }
.metal-fieldset > p { margin: 13px 0 0; color: var(--muted); font-size: 9px; line-height: 1.75; }
.zakat-options { display: grid; gap: 9px; margin-top: 20px; }
.zakat-check { display: grid; grid-template-columns: auto 1fr; gap: 11px; align-items: start; padding: 13px 14px; background: var(--cream); border-radius: 14px; cursor: pointer; }
.zakat-check input { width: 18px; height: 18px; accent-color: var(--green-700); }
.zakat-check b, .zakat-check small { display: block; }
.zakat-check b { color: var(--ink); font-size: 11px; }
.zakat-check small { margin-top: 3px; color: var(--muted); font-size: 9px; font-weight: 500; line-height: 1.5; }
#zakatDebtField { padding: 13px 14px; background: #fffaf0; border: 1px solid #ead9a7; border-radius: 14px; }
#zakatDebtField[hidden] { display: none; }
.zakat-actions { display: grid; grid-template-columns: 1fr auto; gap: 9px; margin-top: 22px; }
.zakat-reset { padding: 0 17px; color: var(--green-700); background: transparent; border: 1px solid var(--green-700); border-radius: 15px; cursor: pointer; font-size: 11px; font-weight: 800; }
.zakat-result-card { position: sticky; top: 105px; overflow: hidden; padding: 30px; color: #fff; background: linear-gradient(155deg, #0b5144, var(--green-950)); }
.zakat-result-card::after { content: "زكاة"; position: absolute; left: -12px; bottom: -48px; color: rgba(255,255,255,.035); font: 110px "Amiri", "Traditional Arabic", serif; }
.zakat-result-kicker { color: var(--gold); font-size: 11px; font-weight: 800; }
.zakat-status { position: relative; z-index: 1; display: inline-block; margin-top: 15px; padding: 7px 10px; border-radius: 99px; font-size: 10px; font-weight: 800; }
.zakat-status.pending { color: #66521d; background: var(--gold-soft); }
.zakat-status.due { color: #d9ffec; background: rgba(107,219,166,.17); }
.zakat-status.clear { color: #dbece7; background: rgba(255,255,255,.1); }
.zakat-due { position: relative; z-index: 1; padding: 34px 0 26px; border-bottom: 1px solid rgba(255,255,255,.12); }
.zakat-due span, .zakat-due small { display: block; color: rgba(255,255,255,.62); font-size: 10px; }
.zakat-due strong { direction: ltr; display: block; margin: 8px 0; text-align: right; font-size: clamp(36px, 5vw, 56px); line-height: 1.05; letter-spacing: -.04em; }
.zakat-breakdown { position: relative; z-index: 1; display: grid; gap: 0; margin: 14px 0 0; }
.zakat-breakdown div { display: flex; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1px solid rgba(255,255,255,.08); }
.zakat-breakdown dt { color: rgba(255,255,255,.6); font-size: 10px; }
.zakat-breakdown dd { direction: ltr; margin: 0; text-align: right; font-size: 11px; font-weight: 800; }
.zakat-breakdown .net-row dt, .zakat-breakdown .net-row dd { color: var(--gold-soft); }
.zakat-result-card > p { position: relative; z-index: 1; margin: 18px 0 0; color: rgba(255,255,255,.57); font-size: 9px; line-height: 1.75; }
.zakat-guidance { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 18px; }
.zakat-scope-card { padding: 25px; }
.zakat-scope-card > span { color: var(--green-700); font-size: 10px; font-weight: 800; }
.zakat-scope-card h2 { margin: 7px 0 15px; font-size: 20px; }
.zakat-scope-card ul { display: grid; gap: 9px; margin: 0; padding-right: 18px; color: var(--muted); font-size: 10px; line-height: 1.7; }
.zakat-scope-card.caution { background: #fffaf0; }
.zakat-scope-card.differences { color: #fff; background: var(--green-900); }
.zakat-scope-card.differences > span { color: var(--gold); }
.zakat-scope-card.differences ul { color: rgba(255,255,255,.68); }
.zakat-sources { margin-top: 18px; padding: 27px; }
.zakat-sources .section-heading { margin-bottom: 18px; }
.zakat-sources > div:last-child { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.zakat-sources a { display: grid; gap: 5px; min-height: 92px; padding: 14px; color: var(--ink); background: var(--cream); border-radius: 13px; text-decoration: none; }
.zakat-sources a:hover { outline: 1px solid var(--gold); }
.zakat-sources b { font-size: 10px; line-height: 1.6; }
.zakat-sources small { color: var(--muted); font-size: 8px; line-height: 1.55; }

.family-intro { max-width: none; display: flex; justify-content: space-between; align-items: end; gap: 35px; }
.notification-button { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; align-items: center; min-width: 235px; padding: 13px 16px; text-align: right; color: #fff; background: var(--green-900); border: 0; border-radius: 17px; cursor: pointer; }
.notification-button > span { grid-row: 1 / span 2; width: 36px; height: 36px; display: grid; place-items: center; color: var(--green-950); background: var(--gold-soft); border-radius: 11px; font-size: 20px; }
.notification-button b { font-size: 12px; }
.notification-button small { color: rgba(255,255,255,.58); font-size: 9px; }
.family-layout { display: grid; grid-template-columns: .68fr 1.32fr; gap: 18px; align-items: start; }
.relative-form-card, .relatives-panel, .friday-banner { background: var(--paper); border: 1px solid rgba(18,50,44,.08); border-radius: var(--radius-xl); box-shadow: var(--shadow); }
.relative-form-card { padding: 28px; }
.relative-form-card h2 { margin: 7px 0 22px; }
.relative-form-card form { display: grid; gap: 14px; }
.relative-form-card label { display: grid; gap: 7px; color: var(--muted); font-size: 11px; font-weight: 800; }
.relative-form-card label small { display: inline; font-weight: 400; }
.relative-form-card input, .relative-form-card select { width: 100%; min-height: 47px; padding: 0 12px; color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 12px; outline: 0; }
.relative-form-card input:focus, .relative-form-card select:focus { border-color: var(--green-700); box-shadow: 0 0 0 4px rgba(20,100,83,.08); }
.local-privacy { margin: 13px 0 0; color: var(--muted); font-size: 9px; line-height: 1.6; }
.relatives-panel { padding: 28px; }
.relatives-toolbar { display: flex; justify-content: space-between; align-items: end; gap: 15px; }
.relatives-toolbar h2 { margin: 5px 0 0; }
.relatives-toolbar > span { padding: 7px 10px; color: var(--green-700); background: var(--green-100); border-radius: 99px; font-size: 10px; font-weight: 800; }
.family-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 22px 0; }
.family-stats > div { padding: 13px; background: var(--cream); border-radius: 13px; }
.family-stats strong, .family-stats span { display: block; }
.family-stats strong { font-size: 24px; }
.family-stats span { margin-top: 3px; color: var(--muted); font-size: 9px; }
.relatives-list { display: grid; gap: 9px; max-height: 430px; overflow: auto; }
.relative-item { display: grid; grid-template-columns: 45px 1fr auto; gap: 11px; align-items: center; padding: 13px; border: 1px solid var(--line); border-radius: 16px; }
.relative-item.due { border-color: var(--gold); background: #fffdf4; }
.relative-avatar { width: 45px; height: 45px; display: grid; place-items: center; color: var(--gold); background: var(--green-900); border-radius: 14px; font-weight: 800; }
.relative-copy b, .relative-copy small { display: block; }
.relative-copy small { margin-top: 4px; color: var(--muted); font-size: 9px; }
.relative-actions { display: flex; gap: 5px; }
.relative-actions button, .relative-actions a { min-width: 34px; height: 34px; display: grid; place-items: center; padding: 0 8px; color: var(--green-700); background: var(--green-100); border: 0; border-radius: 9px; cursor: pointer; text-decoration: none; font-size: 10px; font-weight: 800; }
.relative-actions .done-contact { color: #fff; background: var(--green-700); }
.relative-actions .remove-relative { color: #8c6c61; background: #f4ece8; }
.empty-relatives { padding: 65px 20px; text-align: center; color: var(--muted); border: 1px dashed #bdccc6; border-radius: 18px; }
.empty-relatives span { display: block; margin-bottom: 12px; color: var(--gold); font-size: 34px; }
.empty-relatives b { color: var(--ink); }
.empty-relatives p { font-size: 11px; }
.friday-banner { display: grid; grid-template-columns: auto 1fr auto; gap: 20px; align-items: center; margin-top: 18px; padding: 25px 30px; color: #fff; background: linear-gradient(110deg, var(--green-900), #126652); }
.friday-banner > span { width: 66px; height: 66px; display: grid; place-items: center; text-align: center; color: var(--green-950); background: var(--gold-soft); border-radius: 20px; font-size: 12px; font-weight: 800; }
.friday-banner h2, .friday-banner p { margin: 0; }
.friday-banner p { margin-top: 5px; color: rgba(255,255,255,.65); font-size: 11px; }
.friday-banner > b { color: var(--gold-soft); font-size: 12px; }

.progress-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 16px; }
.progress-main { grid-row: span 2; padding: 35px; color: #fff; background: var(--green-900); }
.progress-main > span, .goal-card > span { color: var(--gold); font-size: 12px; font-weight: 800; }
.progress-main strong { display: block; margin: 20px 0 2px; font-size: 84px; line-height: 1; }
.progress-main small { color: rgba(255,255,255,.66); }
.week-bars { height: 135px; display: flex; align-items: end; gap: 10px; margin-top: 35px; }
.day-bar { flex: 1; display: grid; align-content: end; gap: 6px; height: 100%; }
.day-bar i { display: block; min-height: 8px; background: rgba(255,255,255,.18); border-radius: 8px 8px 3px 3px; }
.day-bar.active i { background: var(--gold); }
.day-bar span { text-align: center; font-size: 9px; color: rgba(255,255,255,.55); }
.goal-card { padding: 28px; background: var(--paper); }
.goal-card strong { display: block; margin: 20px 0 13px; font-size: 30px; }
.goal-card p { margin: 12px 0 0; color: var(--muted); line-height: 1.7; font-size: 12px; }
.goal-track { height: 8px; overflow: hidden; background: var(--green-100); border-radius: 99px; }
.goal-track i { display: block; height: 100%; background: var(--gold); border-radius: inherit; }

.bottom-nav { position: fixed; z-index: 60; right: 50%; bottom: 18px; transform: translateX(50%); display: flex; gap: 4px; padding: 6px; background: rgba(5,47,41,.94); border: 1px solid rgba(255,255,255,.1); border-radius: 22px; box-shadow: 0 18px 45px rgba(5,47,41,.3); backdrop-filter: blur(16px); }
.bottom-nav button { min-width: 84px; min-height: 58px; display: grid; place-items: center; align-content: center; gap: 3px; color: rgba(255,255,255,.55); background: transparent; border: 0; border-radius: 16px; cursor: pointer; }
.bottom-nav button span { font-size: 18px; }
.bottom-nav .nav-shield { height: 20px; }
.bottom-nav .nav-shield .shield-glyph { width: 18px; color: currentColor; }
.bottom-nav .nav-kaaba { height: 20px; }
.bottom-nav .nav-kaaba .kaaba-glyph { width: 20px; color: currentColor; }
.bottom-nav button b { font-size: 10px; }
.bottom-nav button.active { color: var(--green-950); background: var(--gold-soft); }

footer { max-width: 1240px; margin: 0 auto; padding: 32px 24px 120px; display: flex; justify-content: space-between; gap: 20px; color: var(--muted); border-top: 1px solid var(--line); }
footer p { margin: 6px 0 0; font-size: 11px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 18px; font-size: 11px; }

.reader-dialog { width: min(780px, calc(100% - 24px)); max-height: calc(100vh - 30px); padding: 0; color: var(--ink); background: var(--paper); border: 1px solid rgba(255,255,255,.2); border-radius: 28px; box-shadow: 0 40px 100px rgba(2,28,24,.35); }
.reader-dialog::backdrop { background: rgba(2,28,24,.72); backdrop-filter: blur(8px); }
.reader-toolbar { display: flex; justify-content: space-between; align-items: center; padding: 20px 25px 15px; }
.reader-toolbar span { color: var(--muted); font-size: 11px; }
.reader-toolbar h2 { margin: 3px 0 0; }
.reader-toolbar button { width: 40px; height: 40px; color: var(--muted); background: var(--cream); border: 0; border-radius: 50%; cursor: pointer; font-size: 22px; }
.reader-progress { height: 3px; background: var(--green-100); }
.reader-progress i { display: block; width: 0; height: 100%; background: var(--gold); transition: width .25s; }
.reader-body { max-height: 58vh; overflow: auto; padding: 25px 34px; }
.ayah { scroll-margin-top: 15px; padding: 15px 0; border-bottom: 1px solid rgba(18,50,44,.07); }
.ayah-text { font: 27px/2.15 "Amiri", "Traditional Arabic", serif; }
.ayah-num { display: inline-grid; width: 32px; height: 32px; place-items: center; margin: 0 6px; color: var(--green-700); border: 1px solid var(--gold); border-radius: 50%; font: 12px "Segoe UI", sans-serif; }
.ayah.playing { color: var(--green-700); background: linear-gradient(90deg, transparent, var(--green-100), transparent); }
.ayah-tools { display: flex; gap: 7px; margin-top: 4px; }
.ayah-tools button { padding: 7px 10px; color: var(--green-700); background: var(--green-100); border: 0; border-radius: 9px; cursor: pointer; font-size: 10px; font-weight: 800; }
.loading-state { padding: 70px 20px; text-align: center; color: var(--muted); }
.reader-actions { display: flex; gap: 10px; padding: 15px 25px 22px; border-top: 1px solid var(--line); }
.reader-actions .primary-button { flex: 1; }
.secondary-button { padding: 0 22px; color: var(--green-800); background: #fff; border: 1px solid var(--line); }
.toast { position: fixed; z-index: 100; right: 50%; bottom: 100px; transform: translate(50%, 15px); max-width: calc(100% - 32px); padding: 12px 18px; color: #fff; background: var(--green-950); border-radius: 12px; opacity: 0; pointer-events: none; transition: .25s; font-size: 12px; box-shadow: var(--shadow); }
.toast.show { opacity: 1; transform: translate(50%, 0); }

.tafsir-dialog { width: min(820px, calc(100% - 24px)); max-height: calc(100vh - 28px); padding: 0; color: var(--ink); background: var(--cream); border: 1px solid rgba(255,255,255,.2); border-radius: 28px; box-shadow: 0 40px 100px rgba(2,28,24,.35); }
.tafsir-dialog::backdrop { background: rgba(2,28,24,.72); backdrop-filter: blur(8px); }
.tafsir-dialog-body { max-height: 78vh; overflow: auto; padding: 0 25px 28px; }
.tafsir-dialog blockquote { margin: 0 0 16px; padding: 24px; text-align: center; color: #fff; background: var(--green-900); border-radius: 20px; font: 27px/2.05 "Amiri", "Traditional Arabic", serif; }
.reference-section { margin-top: 13px; padding: 22px; background: var(--paper); border: 1px solid var(--line); border-radius: 19px; }
.reference-title { display: flex; justify-content: space-between; gap: 15px; align-items: start; }
.reference-title span { color: var(--gold); font-size: 10px; font-weight: 800; }
.reference-title h3 { margin: 4px 0 0; }
.reference-title a { color: var(--green-700); font-size: 10px; font-weight: 800; }
.reference-content { color: var(--muted); line-height: 2; }
.reference-content .loading-state { padding: 32px 10px; }
.hadith-references { display: grid; gap: 9px; margin-top: 17px; }
.hadith-reference { display: grid; grid-template-columns: 1fr auto; gap: 10px; padding: 14px; background: var(--cream); border-radius: 13px; }
.hadith-reference b, .hadith-reference small { display: block; }
.hadith-reference p { margin: 5px 0; color: var(--muted); font-size: 11px; line-height: 1.7; }
.hadith-reference small { color: #5b766d; font-size: 9px; }
.hadith-reference a { align-self: center; padding: 8px 10px; color: var(--green-700); border: 1px solid var(--line); border-radius: 9px; text-decoration: none; font-size: 9px; font-weight: 800; }
.no-hadith { padding: 15px; color: var(--muted); background: var(--cream); border-radius: 12px; font-size: 11px; line-height: 1.8; }
.editorial-note { margin: 13px 0 0; color: var(--muted); font-size: 9px; line-height: 1.7; }

@media (max-width: 980px) {
  .hero-grid, .result-grid, .tafsir-layout, .science-grid, .prayer-hero-grid, .mosque-grid, .family-layout, .zakat-layout { grid-template-columns: 1fr; }
  .zakat-result-card { position: static; }
  .zakat-guidance { grid-template-columns: repeat(2, 1fr); }
  .zakat-sources > div:last-child { grid-template-columns: repeat(3, 1fr); }
  .hero-card { min-height: 520px; }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .ruqyah-grid { grid-template-columns: repeat(2, 1fr); }
  .general-range-grid { grid-template-columns: repeat(2, 1fr); }
  .ritual-timeline, .hajj-days { grid-template-columns: repeat(2, 1fr); }
  .manasik-hero { grid-template-columns: 90px 1fr; }
  .manasik-hero > a { grid-column: 2; justify-self: start; }
  .miqat-list { grid-template-columns: repeat(2, 1fr); }
  .heritage-hero { grid-template-columns: 82px 1fr; }
  .heritage-count { grid-column: 2; justify-self: start; }
  .heritage-map-layout, .atlas-layout { grid-template-columns: 1fr; }
  .historical-sites, .atlas-cards { grid-template-columns: repeat(2, 1fr); }
  .quiz-hero { grid-template-columns: 82px 1fr; }
  .quiz-best { grid-column: 2; justify-self: start; }
  .surah-grid { grid-template-columns: repeat(2, 1fr); }
  .science-intro { grid-template-columns: 1fr; gap: 5px; }
  .science-card p { min-height: auto; }
  .result-grid { grid-template-columns: 1fr; }
  .map-card { min-height: 380px; }
  #map { height: 340px; }
  .ramadan-hero { align-items: start; flex-direction: column; }
  .ramadan-summary { grid-template-columns: repeat(2, 1fr); }
  .mushaf-page-text { font-size: 20px; }
}

@media (max-width: 700px) {
  .topbar { padding: 13px 16px; }
  .brand-mark { width: 39px; height: 39px; }
  .brand small { display: none; }
  .streak-pill { font-size: 11px; }
  .quran-radio-pill { width: 42px; justify-content: center; padding: 6px; }
  .quran-radio-pill b { display: none; }
  .ruqyah-pill { width: 42px; justify-content: center; padding: 6px; }
  .ruqyah-pill span { display: none; }
  main { padding: 13px 13px 48px; }
  .hero-grid { gap: 12px; }
  .hero-card { min-height: 465px; padding: 40px 25px 25px; border-radius: 24px; }
  .hero-card h1 { font-size: 43px; }
  .hero-card > p { font-size: 14px; }
  .hero-quote { right: 24px; left: 24px; bottom: 25px; padding: 14px; }
  .hero-quote p { font-size: 20px; }
  .planner-card { padding: 23px 18px; border-radius: 24px; }
  .section-heading.compact { display: block; }
  .privacy-badge { display: inline-block; margin-top: 10px; }
  .mode-selector { grid-template-columns: repeat(2, 1fr); }
  .result-summary { grid-template-columns: 1fr 1fr; }
  .result-title { grid-column: 1/-1; }
  .metric { min-width: 0; }
  .feature-grid, .surah-grid, .progress-grid { grid-template-columns: 1fr; }
  .progress-main { grid-row: auto; }
  .section-heading { display: block; }
  .section-heading > p { margin-top: 15px; }
  .value-section { padding-top: 55px; }
  .content-view { padding-top: 20px; }
  .page-intro h1 { font-size: 42px; }
  .quran-intro { display: block; }
  .mushaf-badges { justify-content: flex-start; margin-top: 17px; }
  .surah-search { grid-template-columns: auto 1fr; }
  .surah-search b { grid-column: 1/-1; padding-bottom: 11px; }
  .tafsir-reader, .principles-card, .science-card { padding: 24px 20px; }
  .tafsir-reader blockquote { font-size: 26px; }
  .bottom-nav { right: 8px; left: 8px; bottom: 7px; transform: none; justify-content: flex-start; overflow-x: auto; border-radius: 20px; scrollbar-width: none; }
  .bottom-nav::-webkit-scrollbar { display: none; }
  .bottom-nav button { min-width: 70px; flex: 0 0 70px; min-height: 56px; padding: 4px; }
  .bottom-nav button b { font-size: 8px; }
  footer { display: block; padding: 28px 18px 105px; }
  .footer-links { margin-top: 20px; }
  .reader-body { padding: 20px; }
  .ayah-text { font-size: 24px; }
  .tafsir-dialog-body { padding: 0 14px 18px; }
  .tafsir-dialog blockquote { padding: 18px; font-size: 23px; }
  .reference-section { padding: 17px 14px; }
  .prayer-pill { display: none; }
  .prayer-intro { display: block; }
  .location-control { justify-items: start; margin-top: 18px; }
  .qibla-card { grid-template-columns: 1fr; text-align: center; }
  .qibla-copy { order: 2; margin-top: 22px; }
  .compass-wrap { order: 1; }
  .compass-button, .qibla-card > small { order: 3; justify-self: center; }
  .journey-prayer-notice { grid-template-columns: auto 1fr; }
  .journey-prayer-notice button { grid-column: 1/-1; }
  .next-prayer-card { padding: 25px 18px; }
  .next-prayer-top { align-items: flex-start; }
  .next-prayer-top select { max-width: 190px; }
  .prayer-times { gap: 4px; }
  .family-intro { display: block; }
  .notification-button { margin-top: 18px; }
  .friday-banner { grid-template-columns: auto 1fr; }
  .friday-banner > b { grid-column: 1/-1; }
  .feature-grid { grid-template-columns: 1fr; }
  .family-stats { gap: 5px; }
  .relatives-panel, .relative-form-card { padding: 21px 16px; }
  .ruqyah-intro { grid-template-columns: 1fr; padding: 28px 22px; }
  .ruqyah-mark { width: 74px; height: 74px; border-radius: 20px; }
  .ruqyah-mark .shield-glyph { width: 43px; }
  .ruqyah-principle { grid-template-columns: 1fr; gap: 7px; }
  .ruqyah-grid, .general-range-grid, .ruqyah-dua-grid { grid-template-columns: 1fr; }
  .ruqyah-card { min-height: 235px; }
  .ruqyah-dua-grid blockquote { min-height: auto; font-size: 22px; }
  .medical-notice { grid-template-columns: 1fr; gap: 5px; }
  .adhkar-hero { grid-template-columns: 1fr; padding: 28px 22px; }
  .adhkar-toolbar { align-items: center; }
  .dhikr-card { grid-template-columns: 40px 1fr; padding: 20px 16px; gap: 12px; }
  .dhikr-number { width: 40px; height: 40px; }
  .dhikr-counter { grid-column: 2; display: flex; justify-content: space-between; align-items: center; }
  .dhikr-copy blockquote { font-size: 21px; }
  .manasik-hero { grid-template-columns: 1fr; padding: 28px 22px; }
  .manasik-kaaba { width: 72px; height: 72px; border-radius: 20px; }
  .manasik-kaaba .kaaba-glyph { width: 45px; }
  .manasik-hero > a { grid-column: auto; }
  .manasik-panel-heading { align-items: start; flex-direction: column; }
  .ritual-timeline, .hajj-days, .ritual-counters, .manasik-reference-grid { grid-template-columns: 1fr; }
  .ritual-timeline p { min-height: auto; }
  .hajj-days article { min-height: auto; }
  .counter-safety, .variant-warning { grid-template-columns: 1fr; }
  .miqat-finder, .miqat-route-warning { grid-template-columns: 1fr; }
  .miqat-finder button { justify-self: start; }
  .heritage-bridge, .heritage-principle { display: grid; grid-template-columns: 1fr; }
  .heritage-bridge button { justify-self: start; }
  .heritage-hero { grid-template-columns: 1fr; padding: 28px 22px; }
  .heritage-count { grid-column: auto; }
  .world-atlas-heading { display: block; }
  .atlas-counters { margin-top: 14px; }
  .atlas-caution { grid-template-columns: 1fr; }
  .atlas-tabs button { min-width: 130px; flex: 0 0 auto; }
  .miqat-list, .sacred-mosque-grid, .historical-sites, .atlas-cards { grid-template-columns: 1fr; }
  .sacred-heading, .historical-sites-heading { display: block; }
  .sacred-heading a, .historical-sites-heading p { display: block; margin-top: 10px; }
  #sacredMap { height: 390px; }
  #historyAtlasMap { height: 430px; }
  .historical-site-card { min-height: 255px; }
  .quiz-hero { grid-template-columns: 1fr; padding: 28px 22px; }
  .quiz-best { grid-column: auto; justify-self: start; }
  .quiz-levels, .quiz-options { grid-template-columns: 1fr; }
  .quiz-question-card { padding: 24px 17px; }
  .quiz-feedback { align-items: start; flex-direction: column; }
  .zakat-hero { grid-template-columns: 1fr; padding: 28px 22px; }
  .zakat-hero-mark { width: 72px; height: 72px; border-radius: 20px; font-size: 39px; }
  .zakat-privacy { justify-self: start; }
  .zakat-form-card, .zakat-result-card { padding: 22px 17px; }
  .zakat-fields.two-columns, .metal-grid, .zakat-guidance, .zakat-sources > div:last-child { grid-template-columns: 1fr; }
  .zakat-actions { grid-template-columns: 1fr; }
  .zakat-reset { min-height: 48px; }
  .zakat-sources { padding: 22px 17px; }
  .zakat-sources a { min-height: auto; }
  .quran-access-suite { padding: 20px 15px; }
  .quran-access-heading { display: block; }
  .quran-access-heading > p { margin-top: 10px; }
  .quran-access-grid { grid-template-columns: 1fr; }
  .quran-access-grid article { grid-template-columns: 43px 1fr; padding: 15px; }
  .access-tool-icon { width: 43px; height: 43px; }
  .reciter-actions { grid-template-columns: 1fr; }
  .reciter-actions button { justify-self: start; }
  .mushaf-studio { padding: 19px 12px; }
  .mushaf-studio-toolbar { align-items: start; flex-direction: column; }
  .mushaf-page-controls { width: 100%; }
  .mushaf-page-controls button { flex: 1; }
  .mushaf-spread { grid-template-columns: 1fr; min-height: 450px; }
  .mushaf-page { padding: 41px 20px 30px; border-width: 6px; }
  .mushaf-page:nth-child(2) { display: none; }
  .mushaf-page-text { font-size: 21px; line-height: 2; }
  .mushaf-assist-controls { grid-template-columns: 1fr; }
  .vision-buttons { grid-column: 1; }
  #mushafCamera { width: 100%; }
  .mushaf-source-note { display: grid; }
  .reader-preferences { grid-template-columns: 1fr 1fr; padding: 9px 15px; }
  .reader-preferences > span { grid-column: 1/-1; white-space: normal; }
  .ramadan-hero { padding: 28px 22px; }
  .ramadan-controls { width: 100%; grid-template-columns: 1fr; }
  .ramadan-controls select, .ramadan-controls button { width: 100%; }
  .ramadan-summary { grid-template-columns: 1fr 1fr; gap: 6px; }
  .ramadan-summary article { padding: 13px; }
  .ramadan-table-head { align-items: start; padding: 20px 16px; }
  .ramadan-note { padding: 13px 16px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
