:root {
  color-scheme: light;
  --paper: #f7f7f0;
  --paper-deep: #edf1e9;
  --ink: #173d32;
  --ink-soft: #536b60;
  --forest: #17634b;
  --forest-deep: #083f34;
  --sage: #deebe2;
  --coral: #c85856;
  --gold: #d2a832;
  --line: #e2e7df;
  --white: #ffffff;
  --surface-muted: #f4f7f2;
  --control-surface: #ffffff;
  --control-border: #d8e2da;
  --text-muted: #718178;
  --bubble-assistant: #f0f4ef;
  --bubble-user: #e1eee5;
  --soft-accent: #e7f0e8;
  --sans: 'IBM Plex Sans Arabic', Tahoma, sans-serif;
  --quran: 'Amiri', Georgia, serif;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #111a17;
  --paper-deep: #192722;
  --ink: #e5ede8;
  --ink-soft: #b1c0b7;
  --forest: #2b7055;
  --forest-deep: #102a21;
  --sage: #294537;
  --coral: #e28a78;
  --gold: #ddba70;
  --line: #304139;
  --white: #1a2721;
  --surface-muted: #202e27;
  --control-surface: #17231d;
  --control-border: #3b4c42;
  --text-muted: #a4b3a9;
  --bubble-assistant: #25342c;
  --bubble-user: #294237;
  --soft-accent: #25392e;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); transition: background-color .2s, color .2s; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
.app-shell { min-height: 100vh; display: block; direction: rtl; }
.sidebar { position: sticky; z-index: 10; top: 0; min-height: 72px; padding: 10px clamp(16px, 4vw, 56px); background: var(--forest-deep); color: #f4f2e9; display: flex; align-items: center; gap: 28px; box-shadow: 0 5px 18px #09271d20; }
.brand { flex: 0 0 auto; display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; padding: 0 4px; }
.brand-mark { width: 44px; height: 44px; flex: 0 0 44px; border: 1px solid #9ab59a; border-radius: 10px 2px 10px 2px; object-fit: cover; }
.brand-copy { display: grid; gap: 0; line-height: 1.35; }
.brand-copy strong { font-size: 17px; font-weight: 600; }
.brand-copy small { color: #a9b9a9; font-size: 12px; }
.sidebar-label { display: none; }
.side-nav { min-width: 0; display: flex; align-items: center; gap: 5px; overflow-x: auto; scrollbar-width: thin; }
.nav-item { min-height: 42px; flex: 0 0 auto; display: flex; align-items: center; gap: 8px; padding: 0 11px; color: #c5d4cb; text-decoration: none; font-size: 12px; border-radius: 8px; transition: background .2s, color .2s; white-space: nowrap; }
.nav-item:hover, .nav-item.active { color: #fff; background: #1b5a45; }
.nav-item.active { box-shadow: inset 0 -2px #e0bd57; }
.nav-icon { width: 20px; color: #e0c46f; font: 20px/1 'Material Symbols Rounded'; font-variation-settings: 'FILL' 0, 'wght' 500, 'GRAD' 0, 'opsz' 20; text-align: center; }
.sidebar-bottom { display: none; }
.streak-orbit { width: 50px; height: 50px; border: 1px solid #64836b; border-radius: 50%; display: grid; place-items: center; color: #e4c77e; font-size: 23px; margin-bottom: 13px; box-shadow: 0 0 0 6px #214538; }
.streak-title { font-size: 13px; margin: 0 0 5px; }
.streak-note { font-size: 11px; line-height: 1.8; color: #a5b6aa; margin: 0; }
.sidebar-foot { margin-top: 25px; color: #839b8b; font-size: 10px; display: flex; align-items: center; gap: 7px; }
.status-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #a4bf86; }
.main-content { width: min(100%, 1280px); margin-inline: auto; padding: 28px clamp(20px, 4.2vw, 64px) 18px; }
.app-page:not(.active) { display: none; }
.topbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.topbar-actions { display: flex; align-items: center; gap: 9px; }
.eyebrow { color: var(--text-muted); font-size: 11px; margin: 0 0 5px; }
.topbar h1 { font-size: clamp(18px, 2vw, 23px); margin: 0; font-weight: 600; }
.wave { color: var(--coral); font-size: 15px; margin-right: 4px; }
.avatar { width: 39px; height: 39px; display: grid; place-items: center; border: 1px solid var(--control-border); border-radius: 12px; background: var(--soft-accent); color: var(--forest); cursor: pointer; }
.theme-toggle { width: 39px; height: 39px; display: grid; place-items: center; border: 1px solid var(--control-border); border-radius: 12px; background: var(--white); color: var(--ink); cursor: pointer; font: 21px/1 var(--sans); transition: background-color .2s, border-color .2s, transform .2s; }
.theme-toggle .material-symbols-rounded, .avatar .material-symbols-rounded { font-size: 20px; font-variation-settings: 'FILL' 0, 'wght' 500, 'GRAD' 0, 'opsz' 20; }
.theme-toggle:hover { background: var(--soft-accent); transform: rotate(-12deg); }
.welcome-band { min-height: 230px; position: relative; overflow: hidden; display: grid; grid-template-columns: 1.2fr .8fr; background: var(--forest); color: #f8f4e7; }
.media-slider { position: relative; margin-bottom: 20px; overflow: hidden; background: var(--forest-deep); color: #fff; }
.media-slide-content { width: 100%; height: clamp(180px, 27vw, 340px); display: grid; place-items: center; overflow: hidden; background: #142b21; }
.media-slide { width: 100%; height: 100%; display: block; object-fit: cover; }
.home-feature-grid { display: grid; grid-template-columns: 280px minmax(0, 1fr); align-items: stretch; gap: 16px; margin-bottom: 24px; }
.home-feature-grid .media-slider { grid-column: 1; grid-row: 1; width: 100%; aspect-ratio: 1; margin: 0; }
.home-feature-grid .media-slide-content { height: 100%; aspect-ratio: 1; }
.home-feature-grid .welcome-band { grid-column: 2; grid-row: 1; min-height: 280px; }
.media-audio-slide { position: relative; width: 100%; height: 100%; display: grid; place-items: center; overflow: hidden; background: radial-gradient(ellipse at center, #2a5948, #173d31 72%); }
.media-audio-cover { width: 68%; height: 68%; object-fit: cover; border: 1px solid #d6c17f; border-radius: 50%; box-shadow: 0 0 0 8px #ffffff15; }
.media-slide-audio { position: absolute; bottom: 17px; left: 6%; width: 88%; height: 36px; }
.media-slider-caption { position: absolute; inset: auto 0 0; min-height: 67px; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 18px; background: linear-gradient(transparent, #10251edb); }
.media-slider-caption > strong { font-size: 13px; font-weight: 500; }
.media-slider-controls { display: flex; align-items: center; gap: 9px; }
.media-slider-controls > button { width: 30px; height: 30px; border: 1px solid #ffffff80; background: #173d31c9; color: #fff; font-size: 20px; line-height: 1; cursor: pointer; }
.media-slide-dots { display: flex; gap: 5px; }
.media-slide-dots button { width: 7px; height: 7px; padding: 0; border: 0; border-radius: 50%; background: #ffffff80; cursor: pointer; }
.media-slide-dots button.active { background: #e5cf94; }
.welcome-copy { padding: 29px 35px; position: relative; z-index: 1; }
.mini-label { color: #d4bf85; font-size: 10px; letter-spacing: 0; }
.welcome-copy h2 { font: 700 29px/1.55 var(--quran); margin: 8px 0 2px; }
.welcome-copy p { font-size: 12px; color: #c2d0c3; margin: 0 0 15px; }
.primary-link { color: #203b32; background: #e5d19a; text-decoration: none; display: inline-flex; align-items: center; gap: 13px; padding: 9px 14px; font-size: 11px; border-radius: 2px; transition: background .2s, transform .2s; }
.primary-link:hover { background: #f1dfaa; transform: translateY(-2px); }
.primary-link span { font-size: 17px; }
.welcome-art { position: relative; min-height: 230px; overflow: hidden; background-image: radial-gradient(ellipse at center, #2a5948 0, #214b3d 48%, #214b3d 72%); }
.art-ring { position: absolute; border: 1px solid #789176; border-radius: 50%; top: 43%; left: 50%; transform: translate(-50%, -50%); }
.ring-one { width: 175px; height: 175px; opacity: .6; }
.ring-two { width: 130px; height: 130px; border-color: #b39e64; opacity: .65; }
.art-mushaf-frame { position: absolute; z-index: 1; top: 43%; left: 50%; width: 120px; height: 120px; display: grid; place-items: center; border: 2px solid #e5cd84; border-radius: 50%; background: linear-gradient(145deg, #356750, #214b3d 58%, #143529); box-shadow: 0 12px 22px #10251e99, inset 3px 3px 7px #ffffff35, inset -5px -6px 10px #0d251c99; transform: translate(-50%, -50%) perspective(520px) rotateX(8deg) rotateY(-8deg); animation: mushaf-appear .8s ease-out both; }
.art-mushaf { width: 55px; height: 94px; object-fit: contain; border-radius: 3px; filter: drop-shadow(0 4px 5px #10251e99); transform: translateZ(8px); }
.art-star { position: absolute; color: #e6d8aa; }
.star-one { top: 25%; left: 25%; font-size: 17px; }
.star-two { bottom: 24%; right: 23%; font-size: 23px; }
.art-caption { position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%); white-space: nowrap; font: 16px var(--quran); color: #d2d9c6; }
.stats-row { display: grid; grid-template-columns: repeat(3, 1fr); overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: var(--white); box-shadow: 0 5px 18px #163d2d0c; margin-bottom: 24px; }
.stat-block { min-height: 91px; display: flex; align-items: center; gap: 13px; padding: 15px 17px; position: relative; }
.stat-block + .stat-block { border-right: 1px solid var(--line); }
.stat-icon { width: 35px; height: 35px; display: grid; place-items: center; border-radius: 50%; font: 20px/1 'Material Symbols Rounded'; font-variation-settings: 'FILL' 0, 'wght' 500, 'GRAD' 0, 'opsz' 20; }
.icon-green { background: #e2eadf; color: var(--forest); }
.icon-coral { background: #f2e2db; color: var(--coral); }
.icon-gold { background: #efe8d5; color: #a17b31; }
.stat-block > div:not(.goal-track) { display: grid; gap: 4px; }
.stat-label { color: var(--text-muted); font-size: 10px; }
.stat-block strong { font-size: 19px; font-weight: 600; line-height: 1; }
.stat-block strong small { font-size: 10px; color: var(--text-muted); font-weight: 400; }
.stat-tail { margin-right: auto; font-size: 10px; color: var(--text-muted); }
.goal-stat { display: grid; grid-template-columns: 35px 1fr; column-gap: 13px; }
.goal-stat .stat-icon { grid-row: 1 / span 2; }
.goal-stat > div:not(.goal-track) { grid-column: 2; grid-row: 1; }
.goal-track { grid-column: 2; grid-row: 2; width: 100%; height: 4px; background: var(--line); border-radius: 5px; overflow: hidden; margin-top: 4px; }
.goal-track span { display: block; width: 0; height: 100%; background: var(--coral); transition: width .35s ease; }
.section-heading { display: flex; align-items: end; justify-content: space-between; margin: 0 0 12px; }
.section-heading .eyebrow { margin-bottom: 2px; }
.section-heading h2 { font-size: 16px; margin: 0; font-weight: 600; }
.prayer-heading { max-width: 900px; }
.prayer-source-label { color: var(--text-muted); font-size: 10px; }
.prayer-panel { max-width: 900px; border-top: 1px solid var(--line); padding-top: 14px; }
.prayer-controls { display: grid; grid-template-columns: minmax(180px, 1fr) minmax(180px, 1fr) auto; align-items: end; gap: 12px; }
.prayer-controls label { display: grid; gap: 5px; color: var(--ink-soft); font-size: 10px; }
.prayer-controls select { width: 100%; min-width: 0; height: 38px; padding: 0 10px; border: 1px solid var(--control-border); border-radius: 2px; background: var(--control-surface); color: var(--ink); font: 11px var(--sans); }
.prayer-location-button { min-height: 38px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 0 14px; border: 1px solid var(--forest); border-radius: 2px; background: var(--forest); color: #fff; font-size: 11px; cursor: pointer; }
.prayer-location-button:hover { background: var(--forest-deep); }
.prayer-location-button:disabled { opacity: .6; cursor: wait; }
.prayer-location-button span { font-size: 17px; }
.prayer-status { min-height: 20px; margin: 14px 0 5px; color: var(--ink-soft); font-size: 11px; }
.prayer-date { margin-bottom: 12px; color: var(--text-muted); font-size: 10px; }
.prayer-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.prayer-time-item { min-height: 148px; position: relative; isolation: isolate; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; gap: 12px; padding: 15px 14px 14px 76px; border: 1px solid var(--line); border-right: 3px solid var(--forest); background: radial-gradient(ellipse at 90% 100%, var(--soft-accent), var(--white) 72%); transform-style: preserve-3d; transition: transform .25s, box-shadow .25s; }
.prayer-time-item:hover { transform: perspective(700px) translateY(-3px) rotateX(2deg); box-shadow: 0 10px 18px #142c2018; }
.prayer-time-item > span, .prayer-time-item > strong { position: relative; z-index: 1; }
.prayer-time-item > span { color: var(--ink-soft); font-size: 11px; }
.prayer-time-item > strong { color: var(--ink); font-size: 23px; font-weight: 600; direction: ltr; text-align: right; font-variant-numeric: tabular-nums; }
.prayer-time-item.sunrise-time { border-right-color: var(--gold); }
.prayer-minaret { position: absolute; z-index: 0; right: 13px; bottom: 8px; width: 48px; height: 112px; transform: perspective(170px) rotateY(-13deg); transform-style: preserve-3d; opacity: .88; filter: drop-shadow(4px 3px 2px #142c2022); }
.prayer-minaret span { position: absolute; display: block; }
.minaret-base { bottom: 0; left: 5px; width: 40px; height: 9px; background: linear-gradient(90deg, var(--gold), #ead9a4 45%, #90703b); clip-path: polygon(10% 0, 90% 0, 100% 100%, 0 100%); }
.minaret-shaft { bottom: 8px; left: 14px; width: 22px; height: 67px; border-inline: 2px solid var(--gold); background: repeating-linear-gradient(0deg, transparent 0 11px, #bc91456b 11px 13px), linear-gradient(90deg, #667b5d, #e6d8aa 50%, #607955); clip-path: polygon(17% 0, 83% 0, 100% 100%, 0 100%); box-shadow: inset 4px 0 #ffffff33, inset -4px 0 #233c2c33; }
.minaret-balcony { bottom: 72px; left: 3px; width: 43px; height: 7px; border-block: 1px solid #866632; background: linear-gradient(90deg, #a8884b, #f2e2b5, #9a793e); transform: translateZ(5px); }
.minaret-dome { bottom: 78px; left: 10px; width: 30px; height: 23px; border: 1px solid #957741; border-radius: 55% 55% 8% 8% / 75% 75% 12% 12%; background: linear-gradient(90deg, #84977a, #f4e8c7 48%, #829473); }
.minaret-crescent { bottom: 102px; left: 22px; width: 6px; height: 9px; border-right: 1.5px solid var(--gold); border-radius: 50%; transform: rotate(20deg); }
.prayer-attribution { margin: 14px 0 0; color: var(--text-muted); font-size: 9px; line-height: 1.8; }
.prayer-tools-grid { display: grid; grid-template-columns: minmax(180px, .8fr) minmax(0, 1.2fr); gap: 26px; margin-top: 22px; border-top: 1px solid var(--line); }
.qibla-panel, .adhan-panel { min-width: 0; padding: 17px 0; }
.tool-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.tool-heading .eyebrow { margin: 0 0 3px; }
.tool-heading h3 { margin: 0; font-size: 15px; font-weight: 600; }
.tool-heading > strong { color: var(--gold); font-size: 16px; direction: ltr; font-variant-numeric: tabular-nums; }
.qibla-compass { width: min(210px, 78vw); aspect-ratio: 1; position: relative; display: grid; place-items: center; margin: 17px auto; border: 3px double var(--gold); border-radius: 50%; background: radial-gradient(circle, var(--white) 48%, var(--soft-accent) 49%, var(--white) 73%); box-shadow: inset 0 0 0 7px var(--white), inset 0 0 0 8px var(--line), 0 12px 22px #142c201a; transform: perspective(620px) rotateX(5deg); }
.compass-ticks { position: absolute; inset: 11px; border-radius: 50%; background: repeating-conic-gradient(from 0deg, var(--gold) 0deg 1deg, transparent 1deg 15deg); mask: radial-gradient(circle, transparent 69%, #000 70% 73%, transparent 74%); }
.compass-north { position: absolute; top: 10px; color: var(--coral); font-size: 11px; font-weight: 700; }
.qibla-needle { width: 100%; height: 100%; position: absolute; display: grid; place-items: center; transition: transform .7s cubic-bezier(.2,.8,.2,1); }
.qibla-needle::before { content: ''; width: 16px; height: 74px; background: linear-gradient(180deg, var(--forest) 0 50%, var(--gold) 50% 100%); clip-path: polygon(50% 0, 100% 53%, 61% 45%, 61% 100%, 39% 100%, 39% 45%, 0 53%); filter: drop-shadow(1px 2px 2px #142c2044); }
.qibla-needle span { position: absolute; color: var(--gold); font-size: 15px; top: 50%; left: 50%; transform: translate(-50%, -50%); text-shadow: 0 1px 4px #0003; }
.compass-center { position: absolute; width: 24px; height: 24px; display: grid; place-items: center; border: 1px solid var(--gold); border-radius: 50%; background: var(--white); color: var(--ink); font: 700 12px var(--quran); }
.tool-status { min-height: 16px; margin: 7px 0; color: var(--ink-soft); font-size: 10px; }
.qibla-note { margin: 0; color: var(--text-muted); font-size: 9px; line-height: 1.8; }
.adhan-live-dot { width: 8px; height: 8px; border-radius: 50%; background: #79aa7b; box-shadow: 0 0 0 4px var(--soft-accent); }
.adhan-reciter-label { display: grid; gap: 5px; margin-top: 14px; color: var(--ink-soft); font-size: 10px; }
.adhan-reciter-label select { width: 100%; height: 37px; padding: 0 10px; border: 1px solid var(--control-border); border-radius: 2px; background: var(--control-surface); color: var(--ink); font: 11px var(--sans); }
.adhan-panel audio { display: block; width: 100%; height: 36px; margin-top: 10px; }
.adhan-auto-control { display: flex; align-items: center; gap: 8px; margin-top: 12px; color: var(--ink-soft); font-size: 10px; }
.adhan-auto-control input { width: 16px; height: 16px; accent-color: var(--forest); }
.adhan-stage { min-height: 84px; display: flex; align-items: center; gap: 12px; margin-top: 12px; padding: 10px; border-right: 3px solid var(--gold); background: var(--surface-muted); animation: appear .25s ease-out both; }
.adhan-stage[hidden] { display: none; }
.adhan-stage img { width: 60px; height: 60px; flex: 0 0 60px; border: 1px solid var(--gold); border-radius: 50%; object-fit: cover; object-position: center 28%; }
.adhan-stage div { min-width: 0; display: grid; gap: 3px; }
.adhan-stage span, .adhan-stage small { color: var(--text-muted); font-size: 9px; }
.adhan-stage strong { color: var(--ink); font-size: 12px; }
.iqama-delay-control { display: grid; grid-template-columns: 1fr minmax(100px, 140px); align-items: center; gap: 12px; margin-top: 12px; color: var(--ink-soft); font-size: 10px; }
.iqama-delay-control select { height: 32px; padding: 0 8px; border: 1px solid var(--control-border); border-radius: 2px; background: var(--control-surface); color: var(--ink); font: 10px var(--sans); }
.session-tag { color: var(--ink-soft); font-size: 10px; display: inline-flex; align-items: center; gap: 7px; padding-bottom: 3px; }
.session-tag .status-dot { width: 6px; height: 6px; }
.khatmah-layout { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 14px; max-width: 1000px; }
.khatmah-settings, .plan-today { min-width: 0; padding: 18px; border: 1px solid var(--line); background: var(--white); }
.plan-block-heading { margin-bottom: 13px; }
.plan-block-heading .eyebrow { margin-bottom: 3px; }
.plan-block-heading h3, .plan-today h3, .reading-panel-heading h3 { margin: 0; font-size: 14px; font-weight: 600; }
.khatmah-settings > label { display: grid; gap: 5px; margin-bottom: 11px; color: var(--ink-soft); font-size: 10px; }
.khatmah-settings select, .khatmah-settings input { width: 100%; min-width: 0; height: 38px; padding: 0 10px; border: 1px solid var(--control-border); border-radius: 2px; background: var(--control-surface); color: var(--ink); font: 11px var(--sans); }
.khatmah-settings .plan-save-button { width: 100%; min-height: 38px; margin-top: 2px; }
.khatmah-settings .tool-status { margin: 7px 0 0; }
.plan-today { display: flex; flex-direction: column; align-items: flex-start; background: var(--forest-deep); color: #f4f2e9; }
.plan-today-head { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.plan-today .eyebrow { color: #b4c4b4; }
.plan-day-mark { width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid #8c9d6f; border-radius: 50%; color: #dfc77f; font-size: 19px; }
.plan-daily-target { width: 100%; flex: 1; margin: 20px 0 9px; color: #f2e6c1; font: 19px/1.9 var(--quran); overflow-wrap: anywhere; }
.plan-reading-time, .plan-progress-label { margin: 0 0 10px; color: #bdcbbd; font-size: 10px; }
.plan-progress-track { width: 100%; height: 5px; overflow: hidden; margin: 5px 0 8px; background: #ffffff26; }
.plan-progress-track span { display: block; width: 0; height: 100%; background: #dfc77f; transition: width .25s ease; }
.plan-today .primary-link { margin-top: 6px; }
.plan-complete-button { min-height: 34px; margin-top: 8px; padding: 0 12px; border: 1px solid #a3b49c; background: transparent; color: inherit; font: 10px var(--sans); cursor: pointer; }
.plan-complete-button:disabled { border-color: #738276; color: #9ba99d; cursor: default; }
.plan-parts-section { max-width: 1000px; margin-top: 20px; padding-top: 17px; border-top: 1px solid var(--line); }
.plan-part-grid { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 7px; }
.plan-part-button { aspect-ratio: 1; min-width: 0; border: 1px solid var(--line); background: var(--white); color: var(--ink); font: 14px var(--quran); cursor: pointer; transition: border-color .15s, background .15s, color .15s; }
.plan-part-button:hover { border-color: var(--forest); background: var(--soft-accent); color: var(--forest); }
.plan-reading-panel { max-width: 1000px; margin-top: 18px; padding: 18px clamp(14px, 3vw, 28px); border: 1px solid var(--line); background: var(--white); scroll-margin-top: 150px; }
.khatmah-page [hidden] { display: none !important; }
.reading-panel-heading { display: flex; align-items: end; justify-content: space-between; gap: 14px; padding-bottom: 11px; border-bottom: 1px solid var(--line); }
.reading-panel-heading .eyebrow { margin-bottom: 3px; }
.plan-reading-reference { color: var(--text-muted); font-size: 9px; text-align: left; }
.plan-reading-status { margin: 8px 0; }
.plan-ayah-list { max-height: 68vh; overflow-y: auto; padding: 3px 0 10px; }
.plan-surah-heading { margin: 16px 0 4px; padding: 8px 0; border-bottom: 1px solid var(--line); color: var(--forest); font: 700 18px var(--quran); }
.plan-ayah { margin: 0; padding: 8px 0; color: var(--ink); font: 23px/2.1 var(--quran); text-align: justify; }
.plan-ayah + .plan-ayah { border-top: 1px solid #eef1ed; }
.plan-ayah-number { display: inline-block; margin-inline-start: 5px; color: var(--gold); font: 12px var(--sans); white-space: nowrap; }
.plan-reading-panel > .plan-complete-button { border-color: var(--forest); color: var(--forest); }
.plan-reading-panel > .plan-complete-button:disabled { border-color: var(--line); color: var(--text-muted); }
.study-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 15px; align-items: stretch; }
.practice-grid { grid-template-columns: minmax(0, 1fr); max-width: 900px; }
.practice-panel, .chat-panel { min-width: 0; background: var(--white); border: 1px solid var(--line); }
.practice-panel { padding: 17px 20px 13px; }
.panel-topline { color: var(--ink-soft); font-size: 10px; display: flex; justify-content: space-between; align-items: center; }
.round-icon { width: 27px; height: 27px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; color: var(--gold); font-size: 16px; }
.study-selects { display: flex; align-items: end; justify-content: space-between; gap: 9px; margin: 9px 0 12px; }
.study-selects label, .recitation-row label, .translation-row label { display: grid; gap: 4px; color: var(--ink-soft); font-size: 9px; }
.study-selects select, .recitation-row select, .translation-row select { max-width: 100%; height: 31px; padding: 0 8px; border: 1px solid var(--control-border); border-radius: 2px; background: var(--control-surface); color: var(--ink); font-size: 10px; }
.study-selects select { min-width: 150px; }
.source-note { color: var(--text-muted); font-size: 8px; text-align: left; }
.mushaf-reader { max-width: 720px; margin: 14px auto 20px; border: 2px solid #7e343c; background: #d9c69e; color: #201a14; box-shadow: 0 2px 8px #35241224; }
.mushaf-reader-heading { min-height: 48px; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 14px; color: #19483c; font-size: 13px; }
.mushaf-emblem { width: 34px; height: 34px; flex: 0 0 34px; display: grid; place-items: center; border: 2px double #d9b75c; outline: 1px solid #19483c; outline-offset: 2px; border-radius: 50%; background: #19483c; color: #f4d986; font: 23px/1 var(--quran); box-shadow: 0 0 0 4px #d9c69e; }
.mushaf-page { max-height: min(58vh, 580px); min-height: 390px; overflow-y: auto; margin: 0 5px; padding: 10px clamp(12px, 4vw, 30px); border: 1px solid #7e343c; outline: 1px solid #c19c51; outline-offset: -5px; background-color: #fff4d8; background-image: repeating-linear-gradient(0deg, #65451a0a 0, #65451a0a 1px, transparent 1px, transparent 5px); text-align: justify; }
.mushaf-ornament { color: #873b42; text-align: center; font-size: 19px; line-height: 1.4; }
.mushaf-basmala { margin: 15px 0 18px; color: #655345; font: 22px/1.8 var(--quran); text-align: center; }
.mushaf-reader-verses { color: #17140f; font: 25px/2.05 var(--quran); text-align: justify; }
.mushaf-reader-ayah { border-radius: 2px; transition: background-color .18s, box-shadow .18s; }
.mushaf-reader-ayah.is-playing { background: #ead58d; box-shadow: 0 0 0 3px #ead58d; color: #173d31; }
.mushaf-ayah-marker { color: #78511e; font: 15px var(--sans); white-space: nowrap; }
.mushaf-player { padding: 7px 12px 8px; background: #e4d2ac; }
.mushaf-player-times { display: flex; justify-content: space-between; color: #30261b; font-size: 11px; font-variant-numeric: tabular-nums; }
.mushaf-player input[type="range"] { width: 100%; height: 18px; margin: 0; accent-color: #694629; }
.mushaf-player-controls { display: flex; align-items: center; justify-content: space-between; gap: 5px; }
.mushaf-player-controls button { min-width: 36px; min-height: 36px; padding: 0 6px; border: 1px solid #19483c; background: #f7edda; color: #173d31; font-size: 10px; cursor: pointer; }
.mushaf-player-controls .mushaf-play-button { width: 54px; height: 54px; border: 2px solid #a8492c; border-radius: 50%; background: #d96532; color: #fff; font-size: 22px; box-shadow: 0 2px 5px #39241735; }
.mushaf-save-button { width: 36px; height: 36px; flex: 0 0 36px; border: 1px solid #19483c; border-radius: 50%; background: #fff4d8; color: #19483c; font-size: 23px; line-height: 1; cursor: pointer; }
.mushaf-save-button.is-saved { border-color: #ad3546; color: #ad3546; background: #fff0ee; }
.mushaf-player-controls button:disabled { opacity: .45; cursor: default; }
.mushaf-player-status { min-height: 14px; margin: 2px 0 0; color: #4b3724; font-size: 9px; }
.practice-prompt { font-size: 12px; color: var(--ink-soft); margin: 13px 0 9px; }
.verse-card { min-height: 82px; padding: 14px 10px 7px; border-block: 1px solid var(--line); display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 6px; color: var(--ink); font: 26px/1.8 var(--quran); text-align: center; }
.missing-word { color: var(--coral); font: 20px var(--sans); letter-spacing: 0; border-bottom: 1px dashed #c87961; min-width: 42px; line-height: 1.3; }
.verse-reference { text-align: center; font-size: 9px; color: var(--text-muted); margin: 7px 0 9px; }
.answer-form { display: flex; gap: 7px; }
.answer-form input, .chat-form input { min-width: 0; flex: 1; border: 1px solid var(--control-border); border-radius: 2px; background: var(--control-surface); color: var(--ink); outline: none; }
.answer-form input { height: 37px; padding: 0 11px; font-size: 11px; }
.answer-form input:focus, .chat-form input:focus { border-color: var(--forest); box-shadow: 0 0 0 2px var(--soft-accent); }
.answer-button { border: 0; background: var(--forest); color: #fff; padding: 0 14px; font-size: 11px; border-radius: 2px; cursor: pointer; }
.answer-button span { margin-right: 5px; font-size: 15px; }
.feedback { min-height: 17px; padding-top: 5px; color: var(--text-muted); font-size: 10px; }
.feedback.success { color: #36734e; }
.feedback.error { color: var(--coral); }
.text-button { border: 0; padding: 0; color: var(--ink-soft); background: transparent; cursor: pointer; font-size: 10px; }
.text-button span { margin-right: 3px; font-size: 14px; }
.verse-recitation-controls { display: flex; align-items: center; flex-wrap: wrap; gap: 9px 12px; margin-top: 12px; }
.verse-recitation-button { min-height: 36px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 13px; border: 1px solid var(--forest); border-radius: 2px; background: var(--soft-accent); color: var(--forest); font: 11px var(--sans); cursor: pointer; }
.verse-recitation-button:hover { background: var(--sage); }
.verse-recitation-button.is-recording { border-color: var(--coral); background: var(--coral); color: #fff; }
.verse-recitation-button.is-recording svg { animation: mic-pulse .8s ease-in-out infinite alternate; }
.verse-recitation-status { flex: 1 1 220px; min-height: 16px; margin: 0; color: var(--ink-soft); font-size: 10px; line-height: 1.7; }
.verse-recitation-result { margin-top: 8px; padding: 10px; border-right: 2px solid var(--gold); background: var(--surface-muted); }
.verse-recitation-result[hidden] { display: none; }
.recitation-match-heading { margin: 0 0 8px; color: var(--ink); font-size: 10px; font-weight: 600; }
.recitation-match-words { display: flex; flex-wrap: wrap; gap: 6px; }
.recitation-token { padding: 4px 7px; border: 1px solid var(--control-border); border-radius: 2px; color: var(--ink-soft); font: 17px/1.6 var(--quran); }
.recitation-token.match { border-color: #73a77e; background: #e7f1e7; color: #28633c; }
.recitation-token.different, .recitation-token.missed { border-color: #cf8673; background: #f8e9e4; color: #994b3b; }
.recitation-token.extra { border-color: var(--gold); background: #f5f0e3; color: #7e622d; }
.recitation-disclaimer { margin: 5px 0 9px; color: var(--text-muted); font-size: 8px; line-height: 1.7; }
.recitation-row { display: grid; grid-template-columns: minmax(130px, 1fr) minmax(130px, 1fr) minmax(180px, 1.4fr); align-items: center; gap: 8px; border-top: 1px solid var(--line); margin-top: 12px; padding-top: 9px; }
.recitation-row label[hidden] { display: none; }
.recitation-row audio { width: 100%; height: 32px; }
.recitation-row .source-note { grid-column: 1 / -1; text-align: right; }
.translation-row { display: grid; grid-template-columns: auto minmax(90px, 1fr) auto; align-items: center; gap: 8px; margin-top: 9px; }
.translation-row button { min-height: 30px; border: 1px solid var(--control-border); background: var(--surface-muted); color: var(--ink); font-size: 9px; padding: 0 10px; cursor: pointer; }
.translation-row button:disabled { opacity: .6; cursor: wait; }
.translation-row p { grid-column: 1 / -1; margin: 0; padding: 8px 10px; border-right: 2px solid var(--gold); background: var(--surface-muted); color: var(--ink); font: 11px/1.8 var(--sans); }
.chat-panel { min-height: 320px; display: flex; flex-direction: column; }
.assistant-page .chat-panel { min-height: min(68vh, 640px); }
.assistant-page .chat-messages { max-height: none; }
.chat-heading { padding: 12px 15px; display: flex; align-items: center; gap: 10px; border-bottom: 1px solid var(--line); }
.assistant-avatar, .message-avatar { flex: 0 0 auto; border-radius: 50%; background: var(--forest); color: #e9d69e; display: grid; place-items: center; font: 700 15px var(--quran); }
.assistant-avatar { width: 34px; height: 34px; position: relative; }
.assistant-avatar img { width: 100%; height: 100%; border-radius: inherit; object-fit: cover; object-position: center 28%; }
.online-dot { position: absolute; width: 8px; height: 8px; background: #8eb37f; border: 2px solid var(--white); border-radius: 50%; bottom: 0; right: 0; }
.chat-heading h2 { font-size: 12px; margin: 0 0 2px; }
.chat-heading p { margin: 0; font-size: 9px; color: var(--text-muted); }
.chat-sparkle { margin-right: auto; color: #c6a75e; }
.conversation-toolbar { display: grid; grid-template-columns: auto minmax(130px, 1fr); gap: 8px; padding: 9px 12px; border-bottom: 1px solid var(--line); }
.conversation-toolbar button { min-height: 34px; display: inline-flex; align-items: center; gap: 6px; padding: 0 10px; border: 1px solid var(--control-border); border-radius: 2px; background: var(--soft-accent); color: var(--ink); font-size: 10px; cursor: pointer; }
.conversation-toolbar button span { font-size: 18px; line-height: 1; }
.conversation-toolbar button:disabled { opacity: .55; cursor: wait; }
.conversation-toolbar select { min-width: 0; height: 34px; padding: 0 8px; border: 1px solid var(--control-border); border-radius: 2px; background: var(--control-surface); color: var(--ink); font: 10px var(--sans); }
.chat-messages { flex: 1; min-height: 135px; max-height: 190px; overflow-y: auto; padding: 13px 13px 5px; display: flex; flex-direction: column; gap: 10px; }
.assistant-page .chat-messages { max-height: none; }
.assistant-page .message { align-items: flex-start; gap: 10px; }
.assistant-page .assistant-message .message-avatar { margin-top: 4px; }
.assistant-page .assistant-message .message-bubble { max-width: min(92%, 760px); padding: 10px 12px; background: transparent; border-radius: 0; }
.assistant-page .assistant-message .message-bubble p { font-size: 14px; line-height: 1.95; }
.assistant-page .assistant-message .message-citations { gap: 6px; margin-top: 12px; padding: 9px 11px; border-block-start: 1px solid var(--line); border-inline-start: 2px solid var(--gold); font-size: 11px; line-height: 1.7; }
.assistant-page .assistant-message .message-citations strong { font-size: 11px; }
.assistant-page .assistant-message .message-citations a, .assistant-page .assistant-message .message-citations span { font-size: 11px; }
.assistant-page .assistant-message .message-bubble time { font-size: 9px; margin-top: 8px; }
.message { display: flex; gap: 7px; align-items: flex-end; animation: appear .25s ease-out both; }
.message-avatar { width: 24px; height: 24px; object-fit: cover; object-position: center 28%; }
.message-bubble { max-width: 88%; padding: 8px 10px 6px; background: var(--bubble-assistant); border-radius: 2px 10px 2px 10px; }
.message-bubble p { font-size: 10px; line-height: 1.8; margin: 0; white-space: pre-wrap; }
.message-citations { display: grid; gap: 3px; margin-top: 7px; padding: 6px 8px; border-inline-start: 2px solid var(--gold); color: var(--text-muted); font-size: 8px; }
.message-citations strong { color: var(--ink-soft); font-size: 8px; }
.message-citations a, .message-citations span { overflow-wrap: anywhere; color: inherit; text-decoration: none; }
.message-citations a:hover { color: var(--forest); text-decoration: underline; }
.message-bubble time { display: block; font-size: 8px; color: var(--text-muted); margin-top: 4px; }
.message-feedback { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; margin-top: 6px; }
.message-feedback button { min-height: 26px; padding: 2px 8px; border: 1px solid var(--control-border); border-radius: 3px; background: var(--surface); color: var(--text-muted); font: 9px var(--sans); cursor: pointer; }
.message-feedback button[aria-pressed="true"] { border-color: var(--forest); color: var(--forest); background: var(--soft-accent); }
.message-feedback button:disabled { opacity: .55; cursor: wait; }
.message-feedback span { color: var(--text-muted); font-size: 8px; }
.user-message { justify-content: flex-start; }
.user-message .message-bubble { background: var(--bubble-user); border-radius: 10px 2px 10px 2px; }
.suggestions { padding: 4px 13px 6px; display: flex; gap: 6px; flex-wrap: wrap; }
.suggestions button { min-height: 32px; cursor: pointer; border: 1px solid var(--control-border); border-radius: 3px; background: var(--surface-muted); color: var(--ink-soft); font-size: 9px; padding: 5px 9px; }
.suggestions button:hover { border-color: var(--forest); background: var(--surface-muted); }
.suggestions button[aria-pressed="true"] { border-color: var(--forest); background: var(--forest); color: #fff; }
.suggestions button.meaning-shortcut { border-color: #19483c; background: #19483c; color: #fff2c8; font-weight: 600; }
.suggestions button.meaning-shortcut span { margin-inline-end: 5px; color: #e1bf60; }
.suggestions button.meaning-shortcut[aria-pressed="true"] { border-color: #d4ad4d; background: #d4ad4d; color: #173d31; }
.suggestions button.meaning-shortcut[aria-pressed="true"] span { color: #173d31; }
.chat-surah-directory { padding: 0 13px 6px; }
.chat-surah-directory summary { width: fit-content; padding: 3px 0; color: var(--forest); cursor: pointer; font-size: 10px; }
.chat-surah-list { max-height: 140px; overflow-y: auto; display: flex; flex-wrap: wrap; gap: 5px; padding: 5px 1px; }
.chat-surah-list button { min-height: 29px; padding: 4px 8px; border: 1px solid var(--line); background: var(--white); color: var(--ink-soft); font-size: 9px; cursor: pointer; }
.chat-surah-list button:hover { border-color: var(--forest); color: var(--forest); }
.chat-typeahead { max-height: 180px; overflow-y: auto; margin: 0 12px 5px; padding: 5px; border: 1px solid var(--line); background: var(--white); }
.chat-typeahead[hidden] { display: none; }
.chat-typeahead-heading { margin: 4px 6px; color: var(--text-muted); font-size: 9px; }
.chat-typeahead button { width: 100%; display: grid; gap: 2px; padding: 7px; border: 0; border-bottom: 1px solid var(--line); background: transparent; color: var(--ink); text-align: right; cursor: pointer; }
.chat-typeahead button:hover { background: var(--surface-muted); }
.chat-typeahead button strong { color: var(--forest); font-size: 10px; }
.chat-typeahead button span { overflow: hidden; color: var(--ink-soft); font: 14px/1.6 var(--quran); text-overflow: ellipsis; white-space: nowrap; }
.chat-typeahead button .chat-typeahead-explanation { display: -webkit-box; overflow: hidden; color: var(--text-muted); font: 9px/1.55 var(--sans); white-space: normal; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.chat-typeahead-status { margin: 5px; color: var(--text-muted); font-size: 9px; }
.chat-intent-hint { display: grid; gap: 3px; margin: 5px 7px; padding: 8px 10px; border-inline-start: 2px solid var(--gold); background: var(--surface-muted); color: var(--ink); }
.chat-intent-hint strong { font-size: 10px; }
.chat-intent-hint span { color: var(--text-muted); font-size: 9px; line-height: 1.6; }
.chat-intent-options { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 3px; }
.chat-typeahead .chat-intent-options button { width: auto; min-height: 27px; display: inline-flex; align-items: center; padding: 3px 9px; border: 1px solid var(--control-border); border-radius: 3px; background: var(--white); color: var(--forest); font: 9px var(--sans); }
.chat-form { margin: 0 12px; padding: 6px; display: flex; align-items: center; gap: 7px; background: var(--surface-muted); border: 1px solid var(--line); }
.chat-form input { height: 30px; padding: 0 7px; border-color: transparent; background: transparent; font-size: 10px; }
.chat-form input:focus { box-shadow: none; border-color: transparent; }
.chat-form button { width: 29px; height: 29px; flex: 0 0 auto; border: 0; border-radius: 50%; background: var(--forest); color: white; font-size: 17px; cursor: pointer; transition: transform .2s, opacity .2s; }
.chat-form button:hover { transform: translateY(-2px); }
.chat-form button:disabled { opacity: .55; }
.voice-button { background: var(--soft-accent) !important; color: var(--forest) !important; border: 1px solid var(--forest) !important; }
.voice-button .material-symbols-rounded { font-size: 15px; line-height: 1; }
.voice-button.is-listening { background: var(--coral) !important; color: #fff !important; border-color: var(--coral) !important; animation: mic-pulse .8s ease-in-out infinite alternate; }
.chat-speech-button { background: var(--soft-accent) !important; color: var(--forest) !important; border: 1px solid var(--line) !important; }
.chat-speech-button .material-symbols-rounded { font-size: 15px; line-height: 1; }
.chat-disclaimer { margin: 7px 13px 9px; font-size: 8px; color: var(--text-muted); text-align: center; }
@media (max-width: 600px) {
  .assistant-page .assistant-message .message-bubble { max-width: calc(100% - 34px); padding: 8px 4px; }
  .assistant-page .assistant-message .message-bubble p { font-size: 13px; }
}
.download-panel, .about-panel { max-width: 900px; display: grid; grid-template-columns: 100px minmax(0, 1fr); align-items: center; gap: 20px; padding: 22px 0; border-block: 1px solid var(--line); }
.download-panel > img, .about-mark img { width: 82px; height: 82px; object-fit: cover; border: 1px solid var(--line); border-radius: 11px 3px 11px 3px; }
.download-copy h3, .about-copy h3, .registration-panel h3 { margin: 0 0 6px; font-size: 17px; }
.download-copy p, .about-copy p, .registration-panel > div > p { max-width: 680px; color: var(--ink-soft); font-size: 11px; line-height: 1.9; }
.download-copy .eyebrow { margin-bottom: 3px; }
.download-link { margin-top: 4px; }
.download-link[aria-disabled="true"] { opacity: .6; pointer-events: none; }
.download-copy .tool-status { margin: 7px 0 0; }
.about-panel { grid-template-columns: 90px minmax(0, 1fr); align-items: start; }
.about-mark { padding-top: 6px; }
.about-copy p { margin: 0 0 8px; }
.registration-panel { max-width: 900px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, 280px); align-items: center; gap: 22px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.registration-panel h3 { margin-bottom: 4px; }
.registration-panel > div > p { margin: 0; }
.registration-panel form { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 7px; }
.registration-panel form label { grid-column: 1 / -1; color: var(--ink-soft); font-size: 10px; }
.registration-panel input { min-width: 0; height: 37px; padding: 0 10px; border: 1px solid var(--control-border); background: var(--control-surface); color: var(--ink); }
.registration-panel .tool-status { grid-column: 1 / -1; margin: 0; }
.chat-surah-card { width: min(100%, 720px); align-self: stretch; animation: appear .25s ease-out both; }
.chat-mushaf-reader { border: 2px solid #7e343c; background: #d9c69e; color: #201a14; box-shadow: 0 2px 8px #35241224; }
.chat-mushaf-heading { min-height: 48px; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 14px; color: #19483c; font-size: 13px; }
.chat-mushaf-heading > span { color: #873b42; font-size: 18px; }
.chat-mushaf-heading > span:first-child { width: 34px; height: 34px; flex: 0 0 34px; display: grid; place-items: center; border: 2px double #d9b75c; outline: 1px solid #19483c; outline-offset: 2px; border-radius: 50%; background: #19483c; color: #f4d986; font: 23px/1 var(--quran); box-shadow: 0 0 0 4px #d9c69e; }
.chat-mushaf-heading small { white-space: nowrap; font-size: 9px; }
.chat-mushaf-page { max-height: min(58vh, 580px); min-height: 390px; overflow-y: auto; margin: 0 5px; padding: 10px clamp(12px, 4vw, 30px); border: 1px solid #7e343c; outline: 1px solid #c19c51; outline-offset: -5px; background-color: #fff4d8; background-image: repeating-linear-gradient(0deg, #65451a0a 0, #65451a0a 1px, transparent 1px, transparent 5px); }
.chat-mushaf-page .mushaf-basmala { margin: 11px 0 14px; font-size: 20px; }
.chat-mushaf-verses { color: #17140f; font: 23px/2.05 var(--quran); text-align: justify; }
.chat-mushaf-ayah { border-radius: 2px; transition: background-color .18s, box-shadow .18s; scroll-margin-block: 12px; }
.chat-mushaf-ayah.is-playing { background: #ead58d; box-shadow: 0 0 0 3px #ead58d; color: #173d31; }
.chat-mushaf-player { display: grid; gap: 5px; padding: 7px 12px 8px; background: #e4d2ac; }
.chat-mushaf-player > label { display: flex; align-items: center; gap: 8px; color: #19483c; font-size: 10px; }
.chat-mushaf-player select { min-width: 0; flex: 1; height: 34px; padding: 0 8px; border: 1px solid #19483c; background: #fff4d8; color: #201a14; font: 11px var(--sans); }
.chat-mushaf-player input[type="range"] { width: 100%; height: 18px; margin: 0; accent-color: #19483c; }
.chat-mushaf-status { min-height: 13px; margin: 0; color: #69543d; font-size: 9px; }
.page-footer { color: var(--text-muted); }

:root[data-theme="dark"] .stat-icon.icon-green { background: #294537; color: #c2deca; }
:root[data-theme="dark"] .stat-icon.icon-coral { background: #49302b; color: #f0a08d; }
:root[data-theme="dark"] .stat-icon.icon-gold { background: #423a28; color: #e6c879; }
:root[data-theme="dark"] .feedback.success { color: #91c69b; }
:root[data-theme="dark"] .chat-mushaf-status { color: #69543d; }
.page-footer { display: flex; justify-content: space-between; color: var(--text-muted); font-size: 9px; padding-top: 16px; }
.donation-panel { display: grid; justify-items: center; gap: 12px; margin: 24px 0 8px; padding: 20px 0; border-block: 1px solid var(--line); text-align: center; }
.donation-panel img { display: block; width: min(100%, 720px); height: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
@media (max-width: 520px) {
  .mushaf-page { min-height: 360px; padding-inline: 12px; }
  .mushaf-reader-verses { font-size: 22px; line-height: 2; }
  .mushaf-player-controls button { min-width: 32px; padding-inline: 3px; }
  .mushaf-player-controls .mushaf-play-button { width: 48px; height: 48px; }
}
@keyframes appear { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
@keyframes mushaf-appear { from { opacity: 0; } to { opacity: 1; } }
@keyframes mic-pulse { from { transform: scale(.9); } to { transform: scale(1.08); } }

@media (min-width: 1450px) {
  .welcome-band { min-height: 250px; }
  .welcome-copy { padding: 36px 42px; }
  .welcome-art { min-height: 250px; }
  .study-grid { gap: 20px; }
  .practice-panel { padding: 20px 24px 16px; }
}
@media (max-width: 940px) {
  .sidebar { gap: 12px; padding-inline: 18px; }
  .main-content { padding-inline: 22px; }
  .nav-item { padding-inline: 8px; font-size: 11px; }
  .home-feature-grid { grid-template-columns: 230px minmax(0, 1fr); gap: 12px; }
  .home-feature-grid .welcome-band { min-height: 230px; }
  .khatmah-layout { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .study-grid { grid-template-columns: minmax(0, 1fr); }
  .chat-panel { min-height: 330px; }
  .chat-messages { max-height: 230px; }
}
@media (max-width: 640px) {
  .app-shell { display: block; padding-bottom: 0; }
  .sidebar { position: sticky; top: 0; width: 100%; min-height: 0; padding: 8px 12px 0; display: block; }
  .brand { padding: 0 2px 8px; }
  .brand-mark { width: 35px; height: 35px; flex-basis: 35px; }
  .brand-copy strong { font-size: 14px; }
  .brand-copy small { font-size: 10px; }
  .side-nav { width: 100%; height: 42px; gap: 3px; }
  .nav-item { justify-content: center; gap: 5px; flex-direction: row; font-size: 10px; min-width: max-content; min-height: 37px; padding: 0 9px; border-radius: 2px 2px 0 0; }
  .nav-item.active { box-shadow: inset 0 -2px #d1b06b; }
  .nav-icon { width: auto; font-size: 15px; line-height: 1; }
  .main-content { padding: 17px 15px 16px; }
  .conversation-toolbar { grid-template-columns: auto minmax(0, 1fr); }
  .chat-surah-list { max-height: 120px; }
  .topbar { margin-bottom: 16px; }
  .khatmah-layout { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .khatmah-settings, .plan-today { padding: 14px; }
  .plan-part-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
  .plan-reading-panel { padding: 13px 12px; scroll-margin-top: 120px; }
  .plan-reading-reference { max-width: 48%; line-height: 1.7; }
  .plan-ayah { font-size: 21px; line-height: 2; }
  .home-feature-grid { grid-template-columns: minmax(0, 1fr); gap: 14px; margin-bottom: 18px; }
  .home-feature-grid .media-slider { grid-column: 1; grid-row: 1; width: min(100%, 300px); justify-self: center; }
  .home-feature-grid .welcome-band { grid-column: 1; grid-row: 2; min-height: 210px; }
  .welcome-band { min-height: 210px; grid-template-columns: 1fr .52fr; }
  .home-feature-grid .media-slide-content { height: 100%; }
  .media-slider-caption { min-height: 54px; padding: 8px 10px; }
  .media-slider-caption > strong { max-width: 54%; overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
  .media-slider-controls { gap: 6px; }
  .media-slider-controls > button { width: 27px; height: 27px; }
  .welcome-copy { padding: 24px 18px; }
  .welcome-copy h2 { font-size: 24px; }
  .welcome-copy p { max-width: 190px; line-height: 1.8; }
  .welcome-art { min-height: 210px; }
  .ring-one { width: 120px; height: 120px; }
  .ring-two { width: 90px; height: 90px; }
  .art-mushaf-frame { width: 88px; height: 88px; }
  .art-mushaf { width: 39px; height: 66px; }
  .art-caption { font-size: 11px; bottom: 13px; }
  .stats-row { margin-bottom: 18px; }
  .stat-block { min-height: 85px; padding: 12px 7px; gap: 7px; flex-wrap: wrap; }
  .stat-icon { width: 29px; height: 29px; font-size: 14px; }
  .stat-label { font-size: 9px; }
  .stat-block strong { font-size: 16px; }
  .stat-tail { display: none; }
  .goal-stat { grid-template-columns: 29px 1fr; column-gap: 7px; }
  .section-heading { align-items: start; gap: 8px; }
  .section-heading h2 { font-size: 15px; }
  .session-tag { font-size: 9px; padding-top: 9px; white-space: nowrap; }
  .practice-panel { padding: 15px; }
  .study-selects { align-items: start; flex-direction: column; }
  .prayer-source-label { max-width: 130px; text-align: left; }
  .prayer-controls { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .prayer-location-button { grid-column: 1 / -1; }
  .prayer-tools-grid { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .qibla-panel { border-bottom: 1px solid var(--line); }
  .qibla-compass { width: min(190px, 72vw); }
  .prayer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
  .prayer-time-item { min-height: 132px; padding: 12px 10px 12px 60px; }
  .prayer-time-item > strong { font-size: 19px; }
  .prayer-minaret { right: 7px; bottom: 6px; width: 42px; height: 96px; transform: perspective(150px) rotateY(-13deg) scale(.88); transform-origin: right bottom; }
  .adhan-stage { gap: 9px; padding: 8px; }
  .adhan-stage img { width: 52px; height: 52px; flex-basis: 52px; }
  .study-selects select { width: 100%; }
  .source-note { text-align: right; }
  .verse-card { font-size: 23px; }
  .recitation-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .recitation-row audio { grid-column: 1 / -1; }
  .translation-row { grid-template-columns: auto minmax(90px, 1fr) auto; }
  .chat-mushaf-page { min-height: 340px; padding-inline: 12px; }
  .chat-mushaf-verses { font-size: 21px; line-height: 2; }
  .chat-mushaf-player .mushaf-player-controls button { min-width: 32px; padding-inline: 3px; }
  .chat-mushaf-player .mushaf-play-button { width: 48px; height: 48px; }
  .page-footer { padding-inline: 2px; font-size: 8px; }
  .download-panel, .about-panel { grid-template-columns: 58px minmax(0, 1fr); gap: 12px; padding-block: 16px; }
  .download-panel > img, .about-mark img { width: 54px; height: 54px; }
  .download-copy h3, .about-copy h3 { font-size: 14px; }
  .registration-panel { grid-template-columns: minmax(0, 1fr); gap: 13px; padding-block: 16px; }
}
@media (max-width: 360px) {
  .sidebar { padding-inline: max(8px, env(safe-area-inset-left)) max(8px, env(safe-area-inset-right)); }
  .nav-item { gap: 4px; padding-inline: 7px; font-size: 9px; }
  .main-content { padding-inline: max(11px, env(safe-area-inset-left)) max(11px, env(safe-area-inset-right)); padding-bottom: max(16px, env(safe-area-inset-bottom)); }
  .topbar h1 { font-size: 16px; }
  .home-feature-grid .media-slider { width: min(100%, 260px); }
  .welcome-band { grid-template-columns: minmax(0, 1fr) .42fr; }
  .welcome-copy { padding-inline: 13px; }
  .welcome-copy h2 { font-size: 21px; }
  .welcome-copy p { font-size: 10px; }
  .welcome-art { min-height: 200px; }
  .stat-block { gap: 5px; padding-inline: 5px; }
  .stat-label { font-size: 8px; }
  .stat-block strong { font-size: 14px; }
  .donation-panel { gap: 9px; margin-top: 18px; padding-block: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

.ramadan-dashboard { display: grid; grid-template-columns: minmax(190px, .8fr) minmax(190px, .8fr) minmax(280px, 1.25fr); gap: 1px; overflow: hidden; margin-bottom: 25px; border: 1px solid var(--line); border-radius: 14px; background: var(--line); }
.ramadan-clock-panel, .ramadan-countdown-panel, .alarm-panel { min-width: 0; padding: 20px; background: var(--white); }
.ramadan-clock-panel { background: var(--forest-deep); color: #f5f2e8; }
.ramadan-clock-panel .eyebrow, .ramadan-clock-panel .weekday-date { color: #b8c8bb; }
.ramadan-clock-panel h2 { margin: 0 0 13px; color: #f3df9c; font: 700 22px var(--quran); }
.live-clock { display: block; direction: ltr; color: #fff; font-size: 30px; letter-spacing: 1px; font-variant-numeric: tabular-nums; }
.calendar-dates { display: grid; gap: 4px; margin-top: 9px; font-size: 11px; }
.calendar-dates span:first-child { color: #d5dfd3; }
.calendar-dates span:last-child { color: #e5ce8d; }
.weekday-date { margin: 10px 0 0; font-size: 10px; }
.ramadan-countdown-panel { display: flex; flex-direction: column; justify-content: center; background: radial-gradient(circle at 90% 15%, var(--soft-accent), var(--white) 65%); }
.ramadan-countdown { display: block; margin: 8px 0; color: var(--forest); font: 700 22px var(--quran); line-height: 1.65; }
.ramadan-season-note { margin: 0; color: var(--text-muted); font-size: 10px; line-height: 1.8; }
.alarm-panel { border-inline-start: 1px solid var(--line); }
.alarm-heading { display: flex; align-items: start; justify-content: space-between; gap: 12px; }
.alarm-heading h3 { margin: 0; color: var(--ink); font-size: 16px; }
.alarm-mark { color: var(--gold); font-size: 24px; }
.alarm-form { display: grid; grid-template-columns: 130px minmax(0, 1fr) auto; align-items: end; gap: 8px; margin-top: 14px; }
.alarm-form label { display: grid; gap: 5px; color: var(--ink-soft); font-size: 10px; }
.alarm-form input[type="time"] { width: 100%; height: 37px; padding: 0 8px; border: 1px solid var(--control-border); background: var(--control-surface); color: var(--ink); }
.alarm-sound-picker input { width: 100%; max-width: 180px; overflow: hidden; color: var(--text-muted); font-size: 9px; }
.alarm-save-button { min-height: 37px; padding: 0 13px; border: 1px solid var(--forest); border-radius: 2px; background: var(--forest); color: #fff; cursor: pointer; font-size: 10px; }
.alarm-save-button:hover { background: var(--forest-deep); }
.alarm-file-name { min-height: 15px; margin: 8px 0 0; color: var(--text-muted); font-size: 9px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.alarm-panel .tool-status { margin-bottom: 0; }
@media (max-width: 900px) {
  .ramadan-dashboard { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .alarm-panel { grid-column: 1 / -1; border-inline-start: 0; }
}
@media (max-width: 560px) {
  .ramadan-dashboard { grid-template-columns: minmax(0, 1fr); }
  .alarm-panel { grid-column: auto; }
  .alarm-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .alarm-save-button { grid-column: 1 / -1; }
}

.home-hero-slider { min-height: clamp(360px, 48vw, 540px); margin-bottom: 24px; border-radius: 8px; }
.home-hero-slider .media-slide-content { height: 100%; min-height: inherit; }
.home-hero-slider .media-slide { height: 100%; object-fit: cover; }
.home-hero-slider .media-slide-content::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, #10251e30 0%, #10251e65 42%, #10251ed9 100%); pointer-events: none; }
.home-hero-slider .media-slide-content { position: relative; }
.home-hero-slider .media-slide-content > * { position: relative; z-index: 0; }
.home-hero-slider .media-slide-content video { width: 100%; height: 100%; object-fit: cover; }
.home-hero-slider .media-slider-caption { z-index: 3; }
.home-hero-overlay { position: absolute; z-index: 2; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 28px 22px 58px; color: #fff; text-align: center; pointer-events: none; }
.home-hero-brand { position: absolute; top: 20px; right: 24px; display: grid; gap: 2px; text-align: right; text-shadow: 0 2px 8px #000b; }
.home-hero-brand span { font-size: 16px; font-weight: 700; }
.home-hero-brand small { color: #d8e4d9; font-size: 10px; }
.home-hero-time { direction: ltr; font-size: clamp(42px, 7vw, 78px); font-weight: 300; line-height: 1; letter-spacing: 1px; text-shadow: 0 3px 15px #000c; font-variant-numeric: tabular-nums; }
.home-hero-dates { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 12px; font-size: 12px; font-weight: 600; text-shadow: 0 2px 7px #000c; }
.home-hero-dates span + span { color: #f0d58f; }
.home-hero-weekday { margin-top: 5px; color: #f0d58f; font-size: 12px; text-shadow: 0 2px 7px #000c; }
.home-hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 22px; pointer-events: auto; }
.hero-action { display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px; border: 1px solid #fff9; border-radius: 3px; background: #173d31b8; color: #fff; text-decoration: none; font-size: 10px; backdrop-filter: blur(4px); }
.hero-action-gold { border-color: #ead294; background: #e5d19adb; color: #203b32; }
@media (max-width: 560px) {
  .home-hero-slider { min-height: 390px; }
  .home-hero-brand { top: 15px; right: 16px; }
  .home-hero-brand span { font-size: 13px; }
  .home-hero-time { font-size: 46px; }
  .home-hero-dates { font-size: 10px; gap: 7px; }
  .home-hero-actions { margin-top: 17px; }
}

/* Dashboard layout inspired by the supplied desktop reference. */
.app-shell { direction: ltr; display: grid; grid-template-columns: 188px minmax(0, 1fr); align-items: start; background: #f4f8f8; }
.sidebar { grid-column: 1; grid-row: 1; position: sticky; top: 0; width: 188px; height: 100vh; min-height: 620px; padding: 20px 14px 16px; display: flex; flex-direction: column; align-items: stretch; gap: 22px; direction: rtl; background: linear-gradient(180deg, #064d45, #003d38 76%, #00332f); box-shadow: 4px 0 20px #073d3518; }
.brand { justify-content: center; flex-direction: column; gap: 6px; padding: 0 4px 8px; text-align: center; }
.brand-mark { width: 50px; height: 50px; flex-basis: 50px; border: 0; border-radius: 0; object-fit: contain; mix-blend-mode: screen; }
.brand-copy { gap: 3px; }
.brand-copy strong { color: #fff; font-size: 16px; }
.brand-copy small { color: #a9c6be; font-size: 10px; }
.side-nav { width: 100%; display: grid; gap: 4px; overflow: visible; }
.nav-item { min-height: 42px; justify-content: space-between; padding: 0 10px; color: #d0e1db; font-size: 11px; border-radius: 8px; }
.nav-item:hover, .nav-item.active { color: #fff; background: #087564; }
.nav-item.active { box-shadow: inset 0 0 0 1px #2a9a83; }
.nav-icon { color: #bdd8cd; }
.sidebar-bottom { display: block; margin-top: auto; padding: 16px 5px 0; border-top: 1px solid #ffffff20; text-align: center; }
.streak-title { color: #e2c476; font: 12px var(--quran); }
.sidebar-foot { justify-content: center; margin-top: 12px; color: #9bb9ad; }
.main-content { grid-column: 2; grid-row: 1; width: 100%; max-width: none; min-width: 0; margin: 0; padding: 14px clamp(16px, 2vw, 30px) 24px; direction: rtl; }
.topbar { min-height: 42px; margin-bottom: 14px; }
.topbar-search-wrap { width: min(440px, 60%); height: 38px; display: flex; align-items: center; gap: 8px; padding: 0 12px; border: 1px solid #dce7e8; border-radius: 10px; background: #fff; color: #91aab0; box-shadow: 0 2px 9px #163c3810; }
.topbar-search-wrap button { width: 25px; height: 25px; flex: 0 0 auto; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; background: transparent; color: #1b6c69; cursor: pointer; }
.topbar-search-wrap button:hover { background: #eaf4f1; }
.topbar-search-wrap button .material-symbols-rounded { font-size: 17px; }
.topbar-search-wrap > span { font-size: 18px; }
.topbar-search-wrap input { width: 100%; height: 34px; border: 0; outline: 0; background: transparent; color: #173d42; font-size: 11px; }
.topbar-search-wrap input::placeholder { color: #92a8ad; }
.topbar-actions { gap: 10px; }
.theme-toggle { width: 34px; height: 34px; border-radius: 50%; background: #064d45; color: #fff; }
.profile-chip { display: flex; align-items: center; gap: 7px; color: #18454b; font-size: 11px; font-weight: 600; }
.profile-chip .avatar { width: 34px; height: 34px; border: 0; border-radius: 50%; background: #a8c0c3; color: #fff; }
.home-dashboard-grid { display: grid; grid-template-columns: minmax(0, 1fr) 258px; align-items: start; gap: 14px; direction: rtl; }
.home-center-column, .home-aside { min-width: 0; }
.home-feature-grid { grid-template-columns: minmax(0, 1fr) 170px 205px; gap: 10px; margin-bottom: 12px; }
.home-feature-grid .media-slider { grid-column: 2; grid-row: 1; width: 100%; aspect-ratio: 1.35; border-radius: 11px; }
.home-feature-grid .media-slide-content { aspect-ratio: auto; height: 100%; }
.dashboard-audio-card { grid-column: 3; grid-row: 1; min-width: 0; align-self: stretch; padding: 12px; border: 1px solid #e0e9eb; border-radius: 11px; background: #fff; box-shadow: 0 3px 12px #123e3910; }
.audio-card-heading { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; color: #087968; }
.audio-card-heading > .material-symbols-rounded { width: 31px; height: 31px; display: grid; place-items: center; border-radius: 50%; background: #e4f3ee; font-size: 19px; }
.audio-card-heading > div { display: grid; gap: 2px; }
.audio-card-heading strong { color: #19494e; font-size: 11px; }
.audio-card-heading small { color: #83999b; font-size: 9px; }
.dashboard-audio-card > select, .dashboard-reciter-label select { width: 100%; height: 32px; padding: 0 8px; border: 1px solid #dce7e8; border-radius: 6px; background: #fbfdfc; color: #28555b; font: 10px var(--sans); }
.dashboard-reciter-label { display: grid; gap: 4px; margin-top: 7px; color: #71888d; font-size: 9px; }
.dashboard-audio-card audio { display: block; width: 100%; height: 34px; margin-top: 8px; }
.dashboard-audio-card .tool-status { min-height: 24px; margin: 5px 0 0; font-size: 8px; line-height: 1.6; }
.dashboard-audio-card [hidden] { display: none !important; }
.home-feature-grid .welcome-band { grid-column: 1; grid-row: 1; min-height: 190px; grid-template-columns: minmax(0, 1.3fr) minmax(135px, .7fr); overflow: hidden; border: 1px solid #cfe5e2; border-radius: 11px; background: linear-gradient(120deg, #dcefed, #f5fbf8 55%, #c7e1dc); color: #0b4548; }
.welcome-copy { padding: 20px 22px; }
.dashboard-date { margin: 0 0 3px; color: #638b84; font-size: 9px; }
.welcome-copy h2 { color: #0d454b; font: 700 23px/1.5 var(--sans); }
.welcome-copy p { max-width: 310px; color: #466f70; line-height: 1.8; }
.welcome-copy .mini-label { color: #0b7d6d; }
.welcome-copy .primary-link { background: #087d6d; color: #fff; border-radius: 999px; }
.welcome-art { min-height: 190px; background: radial-gradient(ellipse at center, #aad5c7 0, #d7ebe2 56%, #d0e7df 100%); }
.art-ring { border-color: #4d9c88; }
.ring-two { border-color: #d0aa53; }
.art-mushaf-frame { width: 104px; height: 104px; border-color: #d9b850; background: linear-gradient(145deg, #0d7262, #135b50 58%, #073e37); }
.art-mushaf { width: 48px; height: 78px; }
.art-caption { color: #245e55; font-size: 13px; }
.dashboard-actions { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; margin-bottom: 12px; }
.dashboard-action { min-height: 86px; position: relative; display: grid; grid-template-columns: 34px minmax(0, 1fr); align-content: center; align-items: center; column-gap: 8px; padding: 11px 10px; border: 1px solid #e1e9ec; border-radius: 10px; color: #204d57; text-decoration: none; box-shadow: 0 2px 7px #163c3808; transition: transform .2s, box-shadow .2s; }
.dashboard-action:hover { transform: translateY(-2px); box-shadow: 0 7px 16px #163c3814; }
.dashboard-action > .material-symbols-rounded { width: 32px; height: 32px; display: grid; place-items: center; grid-row: 1 / span 2; border-radius: 50%; font-size: 18px; }
.dashboard-action strong { font-size: 11px; }
.dashboard-action small { margin-top: 2px; color: #789096; font-size: 9px; }
.action-arrow { position: absolute; left: 8px; bottom: 8px; color: #5c8990; font-size: 13px; }
.action-recitation { background: #fff7df; }
.action-recitation > .material-symbols-rounded { background: #f5e7b6; color: #926d15; }
.action-tafsir { background: #e5f6f0; }
.action-tafsir > .material-symbols-rounded { background: #c9eee0; color: #137767; }
.action-audio { background: #e9f4ff; }
.action-audio > .material-symbols-rounded { background: #d2e8fc; color: #3477ad; }
.action-review { background: #f5ecfb; }
.action-review > .material-symbols-rounded { background: #ebdafa; color: #8055a5; }
.assistant-invitation, .recent-activity, .daily-ward-card, .streak-card, .prayer-shortcut-card { border: 1px solid #e0e9eb; border-radius: 10px; background: #fff; box-shadow: 0 3px 12px #123e3910; }
.assistant-invitation { padding: 14px 15px 12px; }
.assistant-invitation-head { display: flex; align-items: center; gap: 9px; }
.assistant-mini-avatar { width: 35px; height: 35px; overflow: hidden; flex: 0 0 35px; border: 2px solid #a7d3c6; border-radius: 50%; background: #e8f5ee; }
.assistant-mini-avatar img { width: 100%; height: 100%; object-fit: cover; }
.assistant-invitation-head .eyebrow { margin: 0 0 2px; color: #18816e; }
.assistant-invitation-head h2 { margin: 0; color: #17484d; font-size: 14px; }
.assistant-online { display: inline-flex; align-items: center; gap: 5px; margin-right: auto; color: #64837f; font-size: 9px; }
.assistant-online .status-dot { background: #66be83; }
.assistant-invitation > p { margin: 10px 0; color: #587177; font-size: 10px; line-height: 1.8; }
.assistant-prompt-row { display: flex; flex-wrap: wrap; gap: 6px; }
.assistant-prompt-row a { padding: 6px 9px; border: 1px solid #deeaeb; border-radius: 999px; color: #427078; text-decoration: none; font-size: 9px; }
.assistant-prompt-row a:hover { border-color: #7cbbb0; background: #eef8f4; }
.assistant-open-link, .ward-continue, .streak-link, .prayer-shortcut-card > a { display: flex; align-items: center; justify-content: space-between; margin-top: 11px; color: #087866; text-decoration: none; font-size: 10px; font-weight: 600; }
.home-lower-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(180px, .8fr); gap: 10px; margin-top: 11px; }
.recent-activity { padding: 12px 13px; }
.mini-section-heading, .aside-card-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.mini-section-heading h2, .aside-card-heading h2 { margin: 0; color: #19494e; font-size: 12px; font-weight: 600; }
.mini-section-heading > span, .aside-card-heading > span { color: #0b7969; font-size: 17px; }
.recent-activity > a { display: grid; grid-template-columns: 27px minmax(0, 1fr) 15px; align-items: center; gap: 8px; padding: 9px 0; border-bottom: 1px solid #edf1f1; color: #28535a; text-decoration: none; }
.recent-activity > a:last-child { padding-bottom: 1px; border: 0; }
.activity-icon { width: 27px; height: 27px; display: grid; place-items: center; border-radius: 50%; background: #e7f5f0; color: #278676; font: 15px/1 'Material Symbols Rounded'; }
.recent-activity > a > span:nth-child(2) { display: grid; gap: 3px; }
.recent-activity strong { font-size: 10px; }
.recent-activity small { color: #8a9ca0; font-size: 8px; }
.recent-activity > a > .material-symbols-rounded { color: #95aeb0; font-size: 16px; }
.quran-quote { min-height: 145px; position: relative; display: flex; align-items: end; overflow: hidden; border-radius: 10px; background: #e8f1e8; color: #fff; text-decoration: none; }
.quran-quote::after { position: absolute; inset: 35% 0 0; background: linear-gradient(transparent, #143d32d9); content: ''; }
.quran-quote img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.quran-quote > span { z-index: 1; display: grid; gap: 4px; padding: 13px; text-align: center; width: 100%; }
.quran-quote strong { font: 16px var(--quran); }
.quran-quote small { color: #e0eee8; font-size: 9px; }
.home-aside { display: grid; gap: 10px; }
.daily-ward-card, .streak-card, .prayer-shortcut-card { padding: 13px; }
.ward-surah { display: grid; grid-template-columns: 38px minmax(0, 1fr) 16px; align-items: center; gap: 8px; margin: 14px 0; color: #285159; text-decoration: none; }
.ward-book-mark { width: 38px; height: 43px; display: grid; place-items: center; border: 1px solid #c8ab5c; border-radius: 4px; background: linear-gradient(145deg, #176c56, #06453c); color: #e4ca7b; font: 23px var(--quran); box-shadow: 2px 3px 6px #1c4c3a26; }
.ward-surah > span:nth-child(2) { display: grid; gap: 4px; }
.ward-surah strong { font-size: 11px; }
.ward-surah small { color: #8aa0a2; font-size: 9px; }
.ward-surah > .material-symbols-rounded { color: #90a7a8; }
.ward-progress-label { display: flex; align-items: center; justify-content: space-between; color: #769095; font-size: 9px; }
.ward-progress-label strong { color: #226b64; font-size: 10px; }
.daily-ward-card .goal-track { height: 7px; margin: 7px 0; background: #e3eeee; }
.daily-ward-card .goal-track span { background: #078674; }
.ward-continue { justify-content: center; min-height: 34px; margin-top: 10px; border-radius: 999px; background: #087968; color: #fff; }
.progress-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin: 12px 0 10px; }
.progress-metrics > div { min-height: 67px; display: grid; align-content: center; justify-items: center; gap: 5px; border-radius: 8px; background: #f5f9f8; }
.progress-metrics strong { color: #194e56; font-size: 19px; }
.progress-metrics strong small { color: #82999d; font-size: 9px; font-weight: 400; }
.progress-metrics span { color: #7b9296; font-size: 8px; }
.week-dots { display: flex; justify-content: space-between; gap: 4px; }
.week-dots span { width: 24px; height: 24px; display: grid; place-items: center; border: 1px solid #e5eeee; border-radius: 50%; color: #789096; font-size: 8px; }
.streak-link { margin-top: 10px; }
.prayer-shortcut-card p { margin: 9px 0; color: #71888d; font-size: 9px; line-height: 1.8; }
.prayer-shortcut-card > a { min-height: 34px; justify-content: center; gap: 7px; margin-top: 0; border-radius: 999px; background: #eef7f3; }
.ramadan-dashboard { margin: 16px 0; }
.donation-panel { margin-top: 15px; }
:root[data-theme="dark"] .app-shell { background: var(--paper); }
:root[data-theme="dark"] .topbar-search-wrap, :root[data-theme="dark"] .assistant-invitation, :root[data-theme="dark"] .recent-activity, :root[data-theme="dark"] .daily-ward-card, :root[data-theme="dark"] .streak-card, :root[data-theme="dark"] .prayer-shortcut-card { background: var(--white); border-color: var(--line); }
:root[data-theme="dark"] .home-feature-grid .welcome-band { background: linear-gradient(120deg, #1c3c37, #203b37 55%, #274942); color: var(--ink); }
:root[data-theme="dark"] .welcome-copy h2, :root[data-theme="dark"] .assistant-invitation-head h2, :root[data-theme="dark"] .mini-section-heading h2, :root[data-theme="dark"] .aside-card-heading h2 { color: var(--ink); }
:root[data-theme="dark"] .progress-metrics > div, :root[data-theme="dark"] .assistant-prompt-row a { background: var(--surface-muted); }
@media (max-width: 1100px) {
  .home-dashboard-grid { grid-template-columns: minmax(0, 1fr) 230px; gap: 10px; }
  .home-feature-grid { grid-template-columns: minmax(0, 1fr) 145px 190px; }
  .home-feature-grid .welcome-band { min-height: 180px; }
  .dashboard-actions { gap: 7px; }
  .dashboard-action { grid-template-columns: 28px minmax(0, 1fr); column-gap: 6px; padding-inline: 7px; }
  .dashboard-action > .material-symbols-rounded { width: 28px; height: 28px; }
}
@media (max-width: 760px) {
  .app-shell { display: block; direction: rtl; }
  .sidebar { position: sticky; z-index: 20; width: 100%; height: auto; min-height: 0; padding: 8px 12px 0; display: block; }
  .brand { width: fit-content; flex-direction: row; justify-content: flex-start; gap: 8px; padding: 0 2px 7px; text-align: right; }
  .brand-mark { width: 35px; height: 35px; flex-basis: 35px; }
  .brand-copy strong { font-size: 13px; }
  .side-nav { display: flex; height: 42px; gap: 3px; overflow-x: auto; }
  .nav-item { min-height: 36px; flex: 0 0 auto; justify-content: center; gap: 5px; padding: 0 9px; border-radius: 7px 7px 0 0; font-size: 10px; }
  .sidebar-bottom { display: none; }
  .main-content { padding: 12px 14px 20px; }
  .home-dashboard-grid { grid-template-columns: minmax(0, 1fr); }
  .home-center-column { grid-row: 1; }
  .home-aside { grid-row: 2; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: stretch; }
  .home-aside > section { min-width: 0; }
  .home-feature-grid { grid-template-columns: minmax(0, 1fr) 150px; }
  .dashboard-audio-card { grid-column: 1 / -1; grid-row: 2; }
  .topbar { margin-bottom: 12px; }
  .topbar-search-wrap { width: min(440px, 65%); }
  .profile-greeting { display: none; }
}
@media (max-width: 560px) {
  .home-feature-grid { grid-template-columns: minmax(0, 1fr); }
  .home-feature-grid .media-slider { grid-column: 1; grid-row: 2; width: 100%; aspect-ratio: 2.5; }
  .home-feature-grid .welcome-band { grid-column: 1; grid-row: 1; min-height: 185px; grid-template-columns: minmax(0, 1fr) 110px; }
  .dashboard-audio-card { grid-column: 1; grid-row: 3; }
  .welcome-copy { padding: 17px 15px; }
  .welcome-copy h2 { font-size: 19px; }
  .welcome-copy p { font-size: 10px; }
  .welcome-art { min-height: 185px; }
  .art-mushaf-frame { width: 76px; height: 76px; }
  .art-mushaf { width: 35px; height: 60px; }
  .dashboard-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-action { min-height: 75px; }
  .assistant-invitation { padding: 12px; }
  .assistant-prompt-row a { font-size: 8px; }
  .home-lower-grid { grid-template-columns: minmax(0, 1fr); }
  .quran-quote { min-height: 135px; }
  .home-aside { grid-template-columns: minmax(0, 1fr); }
  .topbar-search-wrap { width: min(100%, 280px); }
  .topbar-search-wrap input { font-size: 10px; }
  .topbar-actions { gap: 6px; }
  .theme-toggle, .profile-chip .avatar { width: 32px; height: 32px; }
}

@media (max-width: 1100px) {
  .home-dashboard-grid { grid-template-columns: minmax(0, 1fr); }
  .home-center-column { grid-row: 1; }
  .home-aside { grid-row: 2; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .home-feature-grid { grid-template-columns: minmax(0, 1fr) 180px; align-items: stretch; }
  .home-feature-grid .welcome-band { grid-column: 1; grid-row: 1; min-width: 0; min-height: 190px; }
  .home-feature-grid .media-slider { grid-column: 2; grid-row: 1; min-width: 0; aspect-ratio: 1.35; }
  .dashboard-audio-card { grid-column: 1 / -1; grid-row: 2; }
}

.media-slider-caption { gap: 6px; padding: 8px 10px; }
.media-slider-caption > strong { min-width: 0; flex: 1 1 auto; overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.media-slider-controls { min-width: 0; flex: 0 0 auto; gap: 4px; }
.media-slider-controls > button { width: 24px; height: 24px; flex: 0 0 24px; }
.media-slide-dots { max-width: clamp(24px, 8vw, 42px); flex: 0 1 42px; overflow-x: auto; gap: 3px; scrollbar-width: none; }
.media-slide-dots::-webkit-scrollbar, .side-nav::-webkit-scrollbar { display: none; }
.media-slide-dots button { flex: 0 0 7px; }

@media (max-width: 760px) {
  .side-nav { scroll-snap-type: x proximity; scrollbar-width: none; overscroll-behavior-inline: contain; }
  .nav-item { scroll-snap-align: start; }
  .topbar { gap: 8px; }
  .topbar-search-wrap { width: auto; min-width: 0; flex: 1 1 0; }
  .topbar-search-wrap input { min-width: 0; }
  .topbar-actions { flex: 0 0 auto; }
}

@media (max-width: 560px) {
  .home-aside { grid-template-columns: minmax(0, 1fr); }
  .home-feature-grid { grid-template-columns: minmax(0, 1fr); }
  .home-feature-grid .welcome-band { grid-column: 1; grid-row: 1; }
  .home-feature-grid .media-slider { grid-column: 1; grid-row: 2; }
  .dashboard-audio-card { grid-column: 1; grid-row: 3; }
  .topbar-search-wrap { padding-inline: 8px; gap: 5px; }
  .topbar-search-wrap input { font-size: 9px; }
  .media-slider-caption { padding-inline: 8px; }
}

.profile-chip { min-height: 36px; padding: 0; border: 0; background: transparent; cursor: pointer; }
.profile-chip:hover .profile-greeting { color: #087866; }
.account-logout-button { min-height: 30px; padding: 0 9px; border: 1px solid var(--control-border); border-radius: 7px; background: var(--white); color: var(--ink-soft); cursor: pointer; font-size: 9px; }
.account-dialog { width: min(420px, calc(100vw - 28px)); max-width: none; padding: 22px; border: 1px solid #dce7e8; border-radius: 12px; background: #fff; color: #173d42; box-shadow: 0 22px 70px #123e3933; }
.account-dialog::backdrop { background: #092d2b70; backdrop-filter: blur(3px); }
.account-dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.account-dialog-head .eyebrow { color: #66847f; }
.account-dialog-head h2 { margin: 0; font-size: 18px; }
.account-close-button { width: 34px; height: 34px; border: 1px solid #e1e9e8; border-radius: 50%; background: #f7faf9; color: #42645f; cursor: pointer; font-size: 22px; }
.account-mode-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin: 18px 0 14px; padding: 4px; border-radius: 8px; background: #eef5f3; }
.account-mode-switch button { min-height: 36px; border: 0; border-radius: 6px; background: transparent; color: #587975; cursor: pointer; font-size: 11px; }
.account-mode-switch button[aria-pressed="true"] { background: #fff; color: #087968; box-shadow: 0 1px 4px #123e3917; }
.account-dialog form { display: grid; gap: 8px; }
.account-dialog form label { margin-top: 4px; color: #587975; font-size: 10px; }
.account-dialog input { width: 100%; min-height: 42px; padding: 0 11px; border: 1px solid #dce7e8; border-radius: 7px; background: #fff; color: #173d42; font: 14px var(--sans); }
.account-dialog input:focus { outline: 2px solid #b8dfd4; border-color: #168c79; }
.account-dialog input[name="pin"] { letter-spacing: 4px; text-align: center; }
.account-submit-button { min-height: 42px; margin-top: 7px; border: 0; border-radius: 8px; background: #087968; color: #fff; cursor: pointer; font-size: 11px; font-weight: 600; }
.account-submit-button:disabled { opacity: .65; cursor: wait; }
.account-dialog-logout-button { width: 100%; min-height: 40px; margin-top: 12px; border: 1px solid var(--control-border); border-radius: 8px; background: var(--surface-muted); color: var(--ink); cursor: pointer; font-size: 11px; }
.account-status { min-height: 19px; margin: 2px 0 0; color: #28715d; font-size: 10px; line-height: 1.7; }
.account-status.error { color: #a64237; }
:root[data-theme="dark"] .account-dialog { border-color: var(--line); background: var(--white); color: var(--ink); }
:root[data-theme="dark"] .account-dialog input { border-color: var(--control-border); background: var(--control-surface); color: var(--ink); }
:root[data-theme="dark"] .account-close-button, :root[data-theme="dark"] .account-mode-switch button[aria-pressed="true"] { border-color: var(--line); background: var(--white); color: var(--ink); }
@media (max-width: 420px) {
  .account-dialog { padding: 17px; }
  .account-mode-switch { margin-top: 14px; }
  .account-logout-button { min-height: 28px; padding-inline: 7px; }
}

@media (max-width: 760px) {
  .sidebar { position: static; }
  .side-nav {
    position: fixed;
    z-index: 1000;
    inset-inline: 0;
    bottom: 0;
    width: auto;
    height: calc(62px + env(safe-area-inset-bottom));
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    align-items: stretch;
    gap: 0;
    padding: 5px 5px calc(5px + env(safe-area-inset-bottom));
    overflow: visible;
    border-top: 1px solid var(--line);
    background: var(--white);
    box-shadow: 0 -4px 16px #123e3917;
  }
  .nav-item {
    width: 100%;
    min-width: 0;
    height: 100%;
    min-height: 0;
    display: grid;
    grid-template-rows: 22px auto;
    align-content: center;
    justify-items: center;
    gap: 1px;
    padding: 3px 1px;
    border-radius: 7px;
    color: var(--ink-soft);
    font-size: 8px;
    line-height: 1.2;
  }
  .nav-item:hover, .nav-item.active { color: var(--forest); background: var(--soft-accent); }
  .nav-item.active { box-shadow: inset 0 0 0 1px var(--line); }
  .nav-icon { width: auto; color: inherit; font-size: 19px; }
  .nav-label { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
  .nav-item:focus-visible { outline: 2px solid var(--forest); outline-offset: -2px; }
  .main-content { padding-bottom: calc(82px + env(safe-area-inset-bottom)); }
}