:root {
  color-scheme: light;
  --green: #0d3b2e;
  --green-2: #174e3d;
  --green-3: #2a7158;
  --mint: #e8f0e9;
  --gold: #c7a86a;
  --paper: #fbfaf6;
  --ink: #1d2924;
  --muted: #78817b;
  --line: #e9e9e1;
  font-family: "DM Sans", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); }
button, select { font: inherit; }
button { cursor: pointer; }
a { color: inherit; }
.app-shell { min-height: 100vh; display: flex; }
.sidebar { width: 246px; flex: 0 0 246px; background: #fff; border-right: 1px solid #eeeee8; padding: 28px 17px 23px; display: flex; flex-direction: column; position: fixed; inset: 0 auto 0 0; z-index: 5; }
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; margin: 0 12px 54px; }
.brand-mark { width: 38px; height: 38px; display: grid; place-items: center; color: #f5e5bb; background: var(--green); border-radius: 12px; position: relative; overflow: hidden; box-shadow: inset 0 0 0 1px rgba(255,255,255,.16); }
.brand-mark:after { content: ""; position: absolute; width: 23px; height: 23px; border: 1px solid rgba(222,198,144,.6); border-radius: 50%; }
.brand-mark span { position: relative; z-index: 1; font: 700 22px "Amiri", serif; }
.brand-mark.small { width: 31px; height: 31px; border-radius: 10px; }
.brand-name { font-size: 19px; letter-spacing: -.8px; color: var(--green); font-weight: 600; }
.brand-name b { font-size: 12px; letter-spacing: 1px; color: var(--gold); margin-left: 2px; }
.side-label, .eyebrow { color: #89928c; font-size: 9px; font-weight: 700; letter-spacing: 1.55px; margin: 0; }
.side-label { margin: 0 13px 15px; }
.side-nav { display: grid; gap: 5px; }
.nav-item { width: 100%; padding: 11px 13px; border: 0; border-radius: 9px; color: #64716a; background: transparent; display: flex; align-items: center; text-align: left; gap: 13px; font-size: 12px; font-weight: 500; transition: .18s ease; }
.nav-item:hover { background: #f6f7f3; color: var(--green); }
.nav-item.active { color: var(--green); background: #eef4ed; font-weight: 700; }
.nav-icon { display: inline-grid; place-items: center; width: 18px; font-size: 17px; color: #73847a; }
.nav-item.active .nav-icon { color: #b09253; }
.sidebar-bottom { margin-top: auto; }
.language-select { display: flex; align-items: center; gap: 11px; padding: 11px 12px; color: #66746b; border: 1px solid var(--line); border-radius: 9px; margin: 0 2px; }
.language-select select { border: 0; appearance: none; outline: 0; background: transparent; color: #34443b; width: 100%; font-size: 11px; }
.chevron { font-size: 16px; }
.sidebar-note { margin: 26px 12px 0; display: flex; gap: 8px; color: #9aa39c; font-size: 10px; }
.tiny-star { color: var(--gold); }
.main { margin-left: 246px; width: calc(100% - 246px); min-height: 100vh; display: flex; flex-direction: column; }
.topbar { height: 72px; border-bottom: 1px solid #ecece5; display: flex; align-items: center; justify-content: space-between; padding: 0 54px; background: rgba(251,250,246,.9); }
.date-line { display: flex; align-items: center; gap: 9px; color: #7d8981; font-size: 10px; }
.date-dot { width: 6px; height: 6px; border-radius: 50%; background: #b69a62; }
.date-divider { color: #c3c4bd; }
.top-actions { display: flex; gap: 12px; align-items: center; }
.icon-button, .avatar, .dots-button { border: 0; background: transparent; }
.icon-button { color: #53675b; font-size: 17px; width: 33px; height: 33px; }
.avatar { width: 31px; height: 31px; border-radius: 50%; background: #e5eee6; color: var(--green); font-weight: 700; font-size: 11px; }
.mobile-brand { display: none; }
.content { width: min(1054px, 100%); margin: 0 auto; padding: 38px 54px 60px; flex: 1; }
.page { display: none; animation: appear .24s ease; }
.page.active { display: block; }
@keyframes appear { from { opacity: .4; transform: translateY(3px); } to { opacity: 1; transform: translateY(0); } }
.welcome-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 28px; }
.welcome-row h1, .page-heading h1 { font-size: clamp(32px, 4vw, 45px); letter-spacing: -2.2px; line-height: 1.05; color: #1b382b; margin: 12px 0 11px; font-weight: 500; }
.welcome-row h1 em { font-family: Georgia, serif; color: #a28855; font-weight: 400; }
.welcome-copy, .page-heading > p:last-child { color: #89918c; font-size: 12px; margin: 0; line-height: 1.7; }
.welcome-ornament { height: 118px; width: 118px; margin-right: 35px; display: grid; place-items: center; opacity: .74; }
.ornament-ring { width: 88px; height: 88px; border: 1px solid #d5c59f; border-radius: 50%; display: grid; place-items: center; color: #b6a06d; position: relative; font-size: 35px; }
.ornament-ring:before, .ornament-ring:after { content: ""; position: absolute; width: 62px; height: 62px; border: 1px solid #e0d7c2; transform: rotate(45deg); }
.ornament-ring:after { transform: rotate(0); border-radius: 50%; }
.verse-card { background: var(--green); border-radius: 14px; padding: 22px 27px 19px; color: white; position: relative; overflow: hidden; min-height: 174px; }
.verse-card:before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 87% 18%, rgba(221,196,138,.12), transparent 28%), linear-gradient(110deg, transparent 54%, rgba(255,255,255,.025)); }
.verse-heading, .verse-footer { display: flex; justify-content: space-between; align-items: center; position: relative; z-index: 1; }
.eyebrow.light { color: #bfcbbe; }
.dots-button { color: #cdd9ce; letter-spacing: 2px; font-size: 17px; }
.verse-arabic { font: 32px "Amiri", serif; text-align: center; color: #f7edcf; margin: 12px 0 2px; position: relative; z-index: 1; }
.verse-translation { font: 13px Georgia, serif; color: #e5e9dd; text-align: center; margin: 0 0 17px; position: relative; z-index: 1; }
.verse-footer { font-size: 9px; color: #cbd4c8; }
.verse-footer a { color: #d7c28e; text-decoration: none; }
.source-pill { border: 1px solid rgba(229,219,192,.3); border-radius: 20px; padding: 5px 9px; }
.verse-pattern { position: absolute; right: 22px; bottom: -34px; font-size: 110px; color: rgba(225,201,146,.07); }
.section-title-row { display: flex; justify-content: space-between; align-items: end; }
h2 { color: #1e3a2d; }
.section-title-row h2 { font-size: 17px; font-weight: 600; letter-spacing: -.4px; margin: 5px 0 0; }
.text-button { background: transparent; border: 0; color: #577660; font-size: 10px; padding: 5px 0; }
.text-button span:last-child { color: #af955f; margin-left: 5px; }
.prayer-strip { margin-top: 30px; }
.prayer-times { display: grid; grid-template-columns: 1.4fr repeat(5, 1fr); margin-top: 13px; border: 1px solid var(--line); background: white; border-radius: 11px; padding: 14px 8px; min-height: 72px; }
.prayer-next { padding: 0 14px; border-right: 1px solid var(--line); display: flex; flex-direction: column; justify-content: center; gap: 3px; }
.small-muted { color: #9ba29d; font-size: 8px; letter-spacing: 1px; }
.prayer-next strong { color: var(--green); font-size: 12px; }
.prayer-next > span:last-child { color: #929b94; font-size: 9px; }
.prayer-time { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; color: #7c8980; font-size: 9px; }
.prayer-time b { color: #31483b; font-size: 11px; font-weight: 600; }
.location-button { display: block; border: 0; background: transparent; color: #78877d; padding: 9px 2px 0; font-size: 9px; }
.location-button:hover { color: var(--green); }
.quick-title { margin: 27px 0 13px; }
.quick-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.quick-card { min-height: 121px; background: #fff; border: 1px solid var(--line); border-radius: 11px; padding: 14px 15px; display: flex; flex-direction: column; align-items: flex-start; text-align: left; position: relative; transition: transform .18s, box-shadow .18s; }
.quick-card:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(32,54,41,.07); }
.quick-symbol { font-size: 20px; color: #a38b59; margin-bottom: 9px; }
.quick-title-text { font-size: 11px; font-weight: 700; color: #314c3b; }
.quick-sub { font-size: 9px; color: #929a94; margin-top: 5px; }
.quick-arrow { position: absolute; right: 13px; top: 13px; color: #a9b0aa; font-size: 12px; }
.daily-card { background: #edf2e8; border-radius: 13px; margin-top: 23px; min-height: 164px; display: flex; justify-content: space-between; overflow: hidden; position: relative; }
.daily-copy { padding: 20px 24px; position: relative; z-index: 1; }
.daily-copy h2 { font: 20px Georgia, serif; color: #274836; margin: 9px 0 7px; line-height: 1.22; }
.daily-copy > p:not(.eyebrow) { color: #818d83; font-size: 10px; margin: 0 0 13px; }
.outline-button { background: transparent; color: #315a42; border: 1px solid #aebcae; border-radius: 6px; padding: 8px 11px; font-size: 9px; transition: .18s; }
.outline-button:hover { border-color: var(--green); background: rgba(255,255,255,.4); }
.outline-button span { color: #ad945e; padding-left: 7px; }
.sun-art { width: 230px; position: relative; overflow: hidden; }
.sun { position: absolute; font-size: 92px; color: rgba(195,166,101,.44); right: 66px; top: 11px; }
.horizon { position: absolute; width: 250px; height: 107px; right: -25px; bottom: -60px; border-radius: 50%; background: #dbe6d8; border-top: 1px solid rgba(176,157,111,.34); }
.page-heading { margin: 8px 0 26px; }
.page-heading h1 { margin-top: 9px; }
.tool-row { display: flex; gap: 11px; align-items: end; margin-bottom: 13px; }
.select-wrap { display: flex; flex-direction: column; gap: 6px; color: #8b948e; font-size: 9px; flex: 1; }
.select-wrap select { border: 1px solid var(--line); border-radius: 7px; color: #394d40; background: white; padding: 10px; font-size: 10px; outline: 0; }
.compact { padding: 10px 12px; }
.source-notice { display: flex; align-items: center; gap: 8px; padding: 10px 12px; background: #f2f4ee; color: #79867c; border-radius: 7px; font-size: 9px; line-height: 1.5; margin-bottom: 13px; }
.source-notice > span:first-child { color: #b19760; font-size: 14px; }
.source-notice a { margin-left: auto; color: #54705a; white-space: nowrap; text-decoration: none; }
.quran-output { display: grid; gap: 10px; }
.loading-state, .empty-state, .error-state { background: white; border: 1px solid var(--line); color: #858f87; padding: 24px; border-radius: 10px; text-align: center; font-size: 11px; }
.error-state { color: #985b4e; background: #fff8f5; }
.ayah-card { background: white; border: 1px solid var(--line); padding: 18px 19px; border-radius: 10px; }
.ayah-head { display: flex; align-items: center; justify-content: space-between; color: #9aa29a; font-size: 9px; }
.ayah-actions { display: flex; align-items: center; gap: 7px; }
.ayah-actions button { background: transparent; border: 1px solid #e9ece5; border-radius: 50%; width: 28px; height: 28px; color: #667c6b; font-size: 12px; }
.ayah-arabic { font: 28px/1.9 "Amiri", serif; color: #213e2e; margin: 10px 0; text-align: right; }
.ayah-translation { font: 12px/1.7 Georgia, serif; color: #68746c; margin: 0; }
.memorize-panel { margin-top: 18px; border-radius: 10px; background: #f0f3ed; padding: 18px 20px; display: flex; align-items: center; justify-content: space-between; }
.memorize-panel h3 { margin: 6px 0; font: 18px Georgia, serif; color: #294834; }
.memorize-panel p:not(.eyebrow) { margin: 0; font-size: 10px; color: #828d84; }
.progress-ring { width: 58px; height: 58px; border-radius: 50%; background: white; display: flex; flex-direction: column; align-items: center; justify-content: center; color: #496c52; border: 2px solid #dce5d8; }
.progress-ring span { font-size: 16px; font-weight: 600; line-height: 1; }
.progress-ring small { font-size: 7px; color: #89948b; margin-top: 3px; }
.tab-row { display: flex; border-bottom: 1px solid var(--line); gap: 22px; margin: 0 0 18px; overflow-x: auto; }
.tab { border: 0; background: transparent; padding: 0 0 10px; color: #919a93; font-size: 10px; white-space: nowrap; border-bottom: 2px solid transparent; }
.tab.active { color: #315940; border-color: #b39a63; font-weight: 700; }
.dua-list { display: grid; gap: 12px; }
.dua-card { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 17px 19px; }
.dua-card-head { display: flex; justify-content: space-between; align-items: center; }
.dua-tag { text-transform: uppercase; letter-spacing: 1.1px; font-size: 8px; font-weight: 700; color: #a08a5d; }
.dua-actions { display: flex; gap: 7px; }
.dua-actions button { border: 0; background: transparent; color: #89948b; font-size: 16px; padding: 2px 4px; }
.dua-actions button.saved { color: #b18f4d; }
.dua-arabic { font: 26px/1.8 "Amiri", serif; color: #1d412f; text-align: right; margin: 15px 0 8px; }
.dua-translit { font-size: 10px; color: #a08750; font-style: italic; margin: 6px 0; }
.dua-translation { font: 12px/1.65 Georgia, serif; color: #65746a; margin: 5px 0; }
.dua-somali { font-size: 11px; line-height: 1.6; color: #718078; margin: 6px 0; }
.dua-source { border-top: 1px solid #f0f0eb; padding-top: 10px; margin-top: 12px; display: flex; align-items: center; justify-content: space-between; font-size: 9px; color: #929a93; }
.dua-source a { text-decoration: none; color: #52745c; }
.tasbih-panel { position: relative; overflow: hidden; border-radius: 13px; margin-top: 23px; background: #123d2e; color: white; padding: 21px 24px; min-height: 198px; }
.tasbih-panel h2 { color: #f7f2e5; font: 22px Georgia, serif; line-height: 1.2; margin: 8px 0; }
.tasbih-panel p:not(.eyebrow) { color: #bfcec2; font-size: 10px; margin: 0; }
.tasbih-controls { display: flex; align-items: center; gap: 18px; margin-top: 15px; }
.tasbih-reset { background: transparent; border: 1px solid rgba(255,255,255,.33); border-radius: 5px; padding: 7px 12px; color: #dbe6dc; font-size: 9px; }
.tasbih-count { width: 58px; height: 58px; border-radius: 50%; border: 1px solid #d0bd8a; background: #f3eddd; color: #174332; display: flex; flex-direction: column; align-items: center; justify-content: center; box-shadow: 0 0 0 5px rgba(230,216,173,.1); }
.tasbih-count span { font-size: 18px; font-weight: 700; line-height: 1; }
.tasbih-count small { font-size: 5px; letter-spacing: .5px; margin-top: 3px; }
.beads { position: absolute; right: 8%; top: 45px; font-size: 32px; color: rgba(213,190,131,.58); transform: rotate(-20deg); letter-spacing: 7px; }
.beads span { font-size: 17px; color: rgba(255,255,255,.25); }
.location-panel { padding: 12px 15px; background: white; border: 1px solid var(--line); border-radius: 9px; display: flex; align-items: center; justify-content: space-between; margin-bottom: 15px; color: #66746a; font-size: 10px; }
.location-panel > div { display: flex; align-items: center; gap: 9px; }
.location-pin { color: #aa915d; font-size: 17px; }
.prayer-large { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 20px; }
.prayer-large-head { display: flex; justify-content: space-between; align-items: start; padding-bottom: 14px; border-bottom: 1px solid #eff0ea; }
.prayer-large-head h2 { margin: 6px 0 0; font-size: 16px; }
.prayer-large-head > span { color: #929b94; font-size: 9px; }
.prayer-list { display: grid; grid-template-columns: repeat(6,1fr); padding: 17px 0 8px; }
.prayer-list > div { display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 9px; color: #828d84; border-right: 1px solid #eff0ea; }
.prayer-list > div:last-child { border: 0; }
.prayer-list b { color: #345340; font-size: 11px; }
.api-attribution { font-size: 8px; color: #a2aaa3; border-top: 1px solid #f1f1ec; padding-top: 10px; margin-top: 8px; }
.qibla-panel { margin-top: 16px; display: flex; justify-content: space-between; align-items: center; background: #eef2e9; border-radius: 12px; padding: 21px; }
.qibla-panel h2 { margin: 6px 0; font-size: 16px; }
.qibla-panel p:not(.eyebrow) { color: #828d83; font-size: 10px; max-width: 310px; line-height: 1.6; }
.bearing-text { color: #49694e !important; font-weight: 700; }
.compass { width: 126px; height: 126px; display: grid; place-items: center; margin-right: 18px; }
.compass-ring { width: 112px; height: 112px; position: relative; border: 1px solid #c9d4c7; border-radius: 50%; background: rgba(255,255,255,.55); box-shadow: 0 0 0 6px rgba(255,255,255,.24); }
.compass-ring:before { content: ""; position: absolute; inset: 12px; border: 1px dashed #d1d9ce; border-radius: 50%; }
.compass-ring > span { position: absolute; color: #8b958c; font-size: 8px; }
.compass-ring .north { top: 5px; left: 50%; transform: translateX(-50%); color: #a2854d; }
.compass-ring .south { bottom: 5px; left: 50%; transform: translateX(-50%); }
.compass-ring .east { right: 7px; top: 50%; transform: translateY(-50%); }
.compass-ring .west { left: 7px; top: 50%; transform: translateY(-50%); }
.needle { position: absolute; width: 3px; height: 64px; left: calc(50% - 1.5px); top: 23px; transform-origin: 50% 50%; transition: transform .6s ease; }
.needle span { position: absolute; color: #b14c37; font-size: 20px; top: -10px; left: -7px; }
.needle i { position: absolute; left: 1px; top: 8px; width: 1px; height: 54px; background: #a8b2a7; }
.compass-center { position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%); width: 12px; height: 12px; display: grid; place-items: center; border-radius: 50%; background: var(--green); color: #fff; font-size: 8px; }
.learn-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 13px; }
.learn-card { background: white; border: 1px solid var(--line); border-radius: 10px; padding: 18px; min-height: 177px; }
.learn-icon { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 9px; background: #edf3eb; color: #a28a56; font-size: 17px; margin-bottom: 13px; }
.learn-card .eyebrow { font-size: 8px; }
.learn-card h2 { font-size: 15px; margin: 7px 0; }
.learn-card > p:not(.eyebrow) { color: #879188; font-size: 10px; line-height: 1.6; min-height: 32px; }
.learn-link { border: 0; background: transparent; padding: 0; color: #4f7356; text-decoration: none; font-size: 9px; cursor: pointer; }
.learn-link.plain { margin-top: 4px; }
.calendar-date { color: #4c6c51; font: 20px Georgia, serif; margin-top: 10px; }
.lesson-examples { margin-top: 23px; }
.lesson-examples > .section-title-row { margin-bottom: 12px; }
.lesson-examples > .section-title-row h2 { font-size: 15px; }
.examples-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.example-card { background: white; border: 1px solid var(--line); border-radius: 9px; padding: 14px; }
.example-card h3 { margin: 6px 0 10px; color: #345640; font-size: 11px; }
.example-card .example-arabic { font: 21px/1.8 "Amiri", serif; color: #244631; text-align: right; min-height: 48px; }
.example-card a { color: #537658; text-decoration: none; font-size: 8px; }
.source-note { margin-top: 16px; padding: 14px 17px; border-left: 2px solid #c1a66b; background: #f2f2eb; color: #647168; font-size: 10px; line-height: 1.7; }
.source-note strong { color: #2f5138; }
.source-note p { margin: 5px 0 0; }
.footer { padding: 12px 54px 22px; display: flex; justify-content: space-between; color: #a0a7a0; font-size: 8px; }
.bottom-nav { display: none; }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translate(-50%, 12px); opacity: 0; pointer-events: none; background: #173d2e; color: white; padding: 10px 15px; border-radius: 7px; font-size: 11px; z-index: 20; transition: .2s; box-shadow: 0 4px 18px #18372833; }
.toast.show { transform: translate(-50%, 0); opacity: 1; }
.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; }
.assistant-page-heading { margin-bottom: 19px; }
.assistant-workspace { display: grid; grid-template-columns: 196px minmax(0,1fr); gap: 13px; align-items: stretch; }
.assistant-history, .assistant-panel { border: 1px solid var(--line); background: #fff; border-radius: 12px; }
.assistant-history { padding: 13px 10px; min-height: 590px; }
.new-chat-button { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; padding: 10px 8px; color: #fff; border: 0; border-radius: 7px; background: var(--green); font-size: 12px; font-weight: 600; }
.new-chat-button span:first-child { font-size: 16px; line-height: 10px; color: #e3d3a9; }
.history-label { color: #9aa39c; font-size: 8px; font-weight: 700; letter-spacing: 1.2px; margin: 20px 6px 9px; }
.conversation-list { display: grid; gap: 4px; max-height: 470px; overflow-y: auto; }
.conversation-row { position: relative; display: flex; align-items: center; gap: 3px; }
.conversation-open { min-width: 0; flex: 1; overflow: hidden; padding: 9px 7px; border: 0; border-radius: 6px; background: transparent; color: #6f7a72; text-align: left; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.conversation-open:hover, .conversation-open.active { color: #315940; background: #eef4ed; }
.conversation-delete { border: 0; background: transparent; color: #9aa39c; padding: 5px; font-size: 12px; }
.assistant-panel { min-width: 0; min-height: 590px; display: flex; flex-direction: column; padding: 14px; }
.assistant-toolbar { display: flex; justify-content: flex-end; gap: 9px; }
.assistant-select { display: flex; align-items: center; gap: 6px; color: #89938b; font-size: 11px; }
.assistant-select select { max-width: 145px; padding: 8px 26px 8px 9px; border: 1px solid var(--line); border-radius: 7px; color: #354c3c; background: #fff; font-size: 12px; }
.assistant-notice { margin: 12px 0; padding: 9px 11px; border-radius: 7px; background: #f2f4ee; color: #77837a; font-size: 12px; line-height: 1.55; }
.assistant-notice.islamic { background: #edf3eb; color: #4c6c51; border-left: 2px solid #b19a65; }
.assistant-messages { display: flex; flex: 1; flex-direction: column; gap: 12px; min-height: 310px; max-height: 56vh; overflow-y: auto; padding: 8px 3px 14px; scroll-behavior: smooth; }
.assistant-empty { align-self: center; width: min(100%, 430px); margin: auto; padding: 22px 10px; text-align: center; }
.assistant-empty-mark { width: 41px; height: 41px; display: grid; place-items: center; margin: 0 auto 13px; border-radius: 13px; background: #edf3eb; color: #ab935c; font-size: 21px; }
.assistant-empty h2 { margin: 0 0 7px; font: 20px Georgia, serif; color: #2a4735; }
.assistant-empty p { margin: 0; color: #8a948c; font-size: 13px; line-height: 1.6; }
.assistant-suggestions { display: flex; flex-wrap: wrap; justify-content: center; gap: 7px; margin-top: 16px; }
.assistant-suggestions button { padding: 7px 9px; background: white; border: 1px solid var(--line); border-radius: 15px; color: #68786c; font-size: 11px; }
.assistant-message { max-width: min(88%, 650px); padding: 11px 13px; border-radius: 10px; color: #44564a; background: #f3f5f0; font-size: 14px; line-height: 1.65; white-space: pre-wrap; overflow-wrap: anywhere; }
.assistant-message.user { align-self: flex-end; background: var(--green); color: #f7f6ef; border-bottom-right-radius: 3px; }
.assistant-message.assistant { align-self: flex-start; border-bottom-left-radius: 3px; }
.assistant-message.error { align-self: flex-start; color: #8f5143; background: #fff5f1; border: 1px solid #f0dfd7; }
.assistant-message.pending::after { content: "▋"; color: #a68e58; animation: blink 1s steps(2, start) infinite; }
@keyframes blink { to { visibility: hidden; } }
.assistant-sources { display: grid; gap: 6px; margin-top: 9px; }
.assistant-source { display: block; padding: 8px 10px; border: 1px solid #e6ebe2; border-radius: 7px; background: #fff; color: #68776a; font-size: 11px; line-height: 1.5; text-decoration: none; }
.assistant-source strong { color: #3d6447; display: block; margin-bottom: 2px; }
.assistant-source:hover { border-color: #bfccb9; }
.assistant-composer { border: 1px solid #dfe5dc; border-radius: 10px; background: #fff; padding: 9px 10px 7px; }
.assistant-composer:focus-within { border-color: #9eaf9d; box-shadow: 0 0 0 2px rgba(42,113,88,.07); }
.assistant-composer textarea { display: block; width: 100%; min-height: 42px; max-height: 125px; resize: vertical; outline: 0; border: 0; background: transparent; color: #2c4033; font: 14px/1.6 "DM Sans", sans-serif; }
.assistant-composer textarea::placeholder { color: #a1aaa2; }
.composer-footer { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.voice-disclaimer { color: #77837a; font-size: 10px; line-height: 1.4; }
.composer-actions { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; }
.voice-button { width: 29px; height: 29px; border: 1px solid var(--line); border-radius: 50%; background: #fff; color: #607466; font-size: 12px; }
.voice-button:hover, .voice-button.recording { color: #fff; background: #9b594c; border-color: #9b594c; }
.voice-button:disabled { opacity: .4; cursor: not-allowed; }
.send-button { display: flex; align-items: center; gap: 8px; padding: 8px 11px; border: 0; border-radius: 7px; background: var(--green); color: white; font-size: 12px; }
.send-button span:last-child { color: #e4d4a9; font-size: 14px; }
.send-button:disabled { opacity: .5; cursor: wait; }
.assistant-footnote { margin: 8px 1px 0; text-align: center; color: #77837a; font-size: 10px; line-height: 1.5; }
body[dir="rtl"] .assistant-panel, body[dir="rtl"] .assistant-history { direction: rtl; }
body[dir="rtl"] .conversation-open { text-align: right; }
body[dir="rtl"] .assistant-message.user { border-bottom-right-radius: 10px; border-bottom-left-radius: 3px; }
body[dir="rtl"] .assistant-message.assistant { border-bottom-left-radius: 10px; border-bottom-right-radius: 3px; }
#assistant-messages[dir="rtl"] .assistant-message.user { border-bottom-right-radius: 10px; border-bottom-left-radius: 3px; }
#assistant-messages[dir="rtl"] .assistant-message.assistant { border-bottom-left-radius: 10px; border-bottom-right-radius: 3px; }

body[dir="rtl"] .sidebar { inset: 0 0 0 auto; border-right: 0; border-left: 1px solid #eeeee8; }
body[dir="rtl"] .main { margin-left: 0; margin-right: 246px; }
body[dir="rtl"] .nav-item { text-align: right; }
body[dir="rtl"] .main .content { direction: rtl; }
body[dir="rtl"] .footer { direction: rtl; }

@media (max-width: 1000px) {
  .sidebar { width: 215px; flex-basis: 215px; }
  .main { margin-left: 215px; width: calc(100% - 215px); }
  body[dir="rtl"] .main { margin-right: 215px; }
  .content { padding: 32px 32px 50px; }
  .topbar { padding: 0 32px; }
  .prayer-times { grid-template-columns: 1.3fr repeat(5, .8fr); }
  .prayer-next { padding: 0 8px; }
}
@media (max-width: 720px) {
  .sidebar { display: none; }
  .main { margin: 0; width: 100%; }
  body[dir="rtl"] .main { margin: 0; }
  .topbar { height: 58px; padding: 0 19px; }
  .mobile-brand { display: flex; align-items: center; gap: 8px; }
  .mobile-brand .brand-name { font-size: 15px; }
  .mobile-brand .brand-name b { font-size: 9px; }
  .date-line { display: none; }
  .top-actions { margin-left: auto; }
  .content { padding: 25px 19px 90px; }
  .welcome-row { margin-bottom: 22px; }
  .welcome-row h1 { font-size: 36px; }
  .welcome-ornament { width: 74px; height: 80px; margin: 0 2px 0 0; }
  .ornament-ring { width: 62px; height: 62px; font-size: 27px; }
  .ornament-ring:before { width: 44px; height: 44px; }
  .verse-card { padding: 19px 17px 16px; }
  .verse-arabic { font-size: 28px; }
  .prayer-strip { margin-top: 23px; }
  .prayer-times { grid-template-columns: repeat(5, 1fr); padding: 12px 4px; }
  .prayer-next { grid-column: 1 / -1; align-items: center; border-right: 0; border-bottom: 1px solid var(--line); padding: 0 0 10px; margin-bottom: 9px; }
  .prayer-time { gap: 5px; }
  .quick-grid { grid-template-columns: repeat(2, 1fr); gap: 9px; }
  .quick-card { min-height: 108px; padding: 12px; }
  .daily-card { min-height: 158px; }
  .daily-copy { padding: 19px 17px; }
  .daily-copy h2 { font-size: 18px; }
  .daily-copy > p:not(.eyebrow) { max-width: 225px; line-height: 1.5; }
  .sun-art { position: absolute; right: -83px; top: 0; height: 100%; opacity: .56; }
  .bottom-nav { display: flex; position: fixed; bottom: 0; inset-inline: 0; z-index: 10; padding: 7px 5px calc(7px + env(safe-area-inset-bottom)); background: rgba(255,255,255,.96); border-top: 1px solid #eceee8; justify-content: flex-start; overflow-x: auto; box-shadow: 0 -4px 15px rgba(21,51,33,.035); }
  .bottom-nav button { border: 0; background: transparent; display: flex; flex-direction: column; align-items: center; gap: 3px; flex: 0 0 49px; min-width: 0; color: #879289; }
  .bottom-nav button > span { font-size: 18px; line-height: 1; }
  .bottom-nav button small { font-size: 7px; white-space: nowrap; }
  .bottom-nav button.active { color: #28523a; }
  .bottom-nav button.active > span { color: #b3975d; }
  .footer { padding: 10px 19px 74px; }
  .page-heading { margin-bottom: 21px; }
  .page-heading h1 { font-size: 36px; }
  .page-heading > p:last-child { max-width: 360px; }
  .tool-row { flex-wrap: wrap; }
  .tool-row .select-wrap { min-width: 40%; }
  .source-notice { align-items: flex-start; }
  .source-notice a { align-self: center; }
  .ayah-card { padding: 15px; }
  .ayah-arabic { font-size: 25px; }
  .dua-card { padding: 15px; }
  .dua-arabic { font-size: 24px; }
  .learn-grid { grid-template-columns: 1fr; gap: 10px; }
  .examples-grid { grid-template-columns: 1fr; }
  .learn-card { min-height: unset; }
  .learn-card > p:not(.eyebrow) { min-height: unset; }
  .prayer-list { grid-template-columns: repeat(3,1fr); row-gap: 17px; }
  .prayer-list > div:nth-child(3) { border-right: 0; }
  .prayer-list > div:nth-child(4), .prayer-list > div:nth-child(5), .prayer-list > div:nth-child(6) { padding-top: 10px; border-top: 1px solid #eff0ea; }
  .qibla-panel { padding: 17px; }
  .compass { transform: scale(.82); margin-right: -6px; margin-left: -10px; flex: 0 0 105px; }
  .tasbih-panel { padding: 19px; }
  .beads { right: -12px; top: 34px; opacity: .6; }
  .assistant-page-heading { margin-bottom: 16px; }
  .assistant-workspace { display: block; }
  .assistant-history { min-height: 0; padding: 9px; border-radius: 10px 10px 0 0; border-bottom: 0; display: flex; align-items: center; gap: 8px; }
  .new-chat-button { flex: 0 0 auto; width: auto; padding: 9px; }
  .history-label { display: none; }
  .conversation-list { display: flex; flex: 1; gap: 5px; max-height: none; overflow-x: auto; }
  .conversation-row { flex: 0 0 auto; max-width: 150px; }
  .conversation-open { padding: 8px 7px; border: 1px solid #eff0ea; }
  .conversation-delete { display: none; }
  .assistant-panel { min-height: 66vh; border-radius: 0 0 10px 10px; padding: 10px; }
  .assistant-toolbar { justify-content: space-between; }
  .assistant-select { gap: 4px; font-size: 10px; }
  .assistant-select select { max-width: 130px; padding: 8px 19px 8px 7px; font-size: 11px; }
  .assistant-messages { min-height: 280px; max-height: 48vh; }
  .assistant-empty h2 { font-size: 18px; }
  .assistant-message { max-width: 94%; font-size: 14px; }
  .assistant-composer textarea { font-size: 14px; }
}
@media (max-width: 390px) {
  .content { padding-inline: 15px; }
  .welcome-row h1 { font-size: 32px; }
  .welcome-copy { max-width: 230px; }
  .welcome-ornament { width: 55px; }
  .quick-sub { font-size: 8px; }
  .daily-copy > p:not(.eyebrow) { max-width: 195px; }
}
