/* Athar 4.2.8 — requested functional refinements; preserve existing theme tokens. */
:root{--athar-nav-clearance:calc(180px + env(safe-area-inset-bottom))}
.app-shell{padding-bottom:var(--athar-nav-clearance)!important}
.view.active{padding-bottom:calc(48px + env(safe-area-inset-bottom))}
body .glass-nav{grid-template-columns:repeat(6,minmax(0,1fr))!important}
body .glass-nav .tab{min-width:0!important}
body .glass-nav .tab-icon svg{max-width:27px}
#view-duas .dua-search-wrap{overflow:hidden!important;isolation:isolate!important;border-radius:999px!important;box-shadow:none!important;background:var(--athar-card-color,var(--surface))!important}
#view-duas .dua-search-wrap:before,#view-duas .dua-search-wrap:after{border-radius:inherit!important;background:none!important;box-shadow:none!important}
#view-duas .search-input{background:transparent!important;border:none!important;border-radius:999px!important;box-shadow:none!important;min-width:0!important}
/* Artwork: no horizontal shelf/band across the mosque. Keep its own colors independent of the selected accent. */
#view-today .athar-sky{top:-24px!important;left:52%!important;width:min(105vw,500px)!important;height:262px!important;background-size:contain!important;background-position:right center!important;opacity:.91!important;filter:none!important;-webkit-mask-image:radial-gradient(ellipse 78% 76% at 83% 45%,#000 0%,#000 49%,rgba(0,0,0,.8) 68%,transparent 99%)!important;mask-image:radial-gradient(ellipse 78% 76% at 83% 45%,#000 0%,#000 49%,rgba(0,0,0,.8) 68%,transparent 99%)!important}
body[data-theme=light] #view-today .athar-sky{opacity:.83!important;filter:none!important;mix-blend-mode:multiply}
body[data-theme=oled] #view-today .athar-sky{opacity:.89!important;filter:none!important}
/* Quote is a separate, quiet footer under the existing completion row. */
#view-today .athar-prayer-hero,#view-today .athar-prayer-hero:not(:empty){height:auto!important;min-height:0!important;display:flex!important;flex-direction:column!important;gap:0!important;padding:14px 16px 15px!important}
#view-today .athar-prayer-hero .hero-content{height:115px!important;flex:0 0 115px!important}
#view-today .athar-quote{width:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;margin-top:10px;padding:9px 4px 0;border-top:1px solid var(--athar-card-border,var(--line));font-family:var(--font-arabic,'Noto Naskh Arabic',sans-serif);font-size:clamp(11px,2.7vw,13px);line-height:1.5;text-align:center;color:var(--muted)}
#view-today .athar-quote strong{font-size:clamp(14px,3.2vw,17px);font-weight:650;color:var(--text)}
#view-today .athar-quote small{font-size:11px;color:var(--muted)}
#view-today .athar-prayer-row{height:76px!important;min-height:76px!important;gap:5px!important}
#view-today .athar-prayer-identity{flex:1 1 auto;min-width:0!important;gap:7px!important}
#view-today .athar-prayer-identity-label{display:flex;flex:1;min-width:0;flex-direction:column;align-items:flex-start;justify-content:center;line-height:1.1;gap:4px}
#view-today .athar-prayer-identity-label .prayer-name{font-size:clamp(17px,4.5vw,21px)!important;color:var(--today-contrast-accent,var(--accent))!important}
#view-today .athar-main-time{font-family:var(--font-english,system-ui);font-size:clamp(11px,2.7vw,13px);font-variant-numeric:tabular-nums;letter-spacing:.02em;font-weight:600;color:var(--muted);white-space:nowrap}
#view-today .status-switch{gap:clamp(3px,1.1vw,8px)!important;flex-shrink:0!important;margin-left:auto!important}
#view-today .status-switch .state-btn{width:clamp(28px,8vw,34px)!important;min-width:clamp(28px,8vw,34px)!important;height:clamp(28px,8vw,34px)!important;flex-basis:clamp(28px,8vw,34px)!important}
#view-today .athar-prayer-identity .athar-prayer-symbol,.detail-prayer-heading .athar-prayer-symbol{background:#3b3722!important;color:#ffca05!important}
#view-today .athar-symbol-1,.detail-prayer-heading .athar-symbol-1{background:#3b3722!important;color:#ffca05!important}
#view-today .athar-symbol-2,.detail-prayer-heading .athar-symbol-2{background:#3b3722!important;color:#ffca05!important}
#view-today .athar-symbol-3,.detail-prayer-heading .athar-symbol-3{background:#40302e!important;color:#fd925f!important}
#view-today .athar-symbol-4,.detail-prayer-heading .athar-symbol-4{background:#2a2c49!important;color:#a79bff!important}
#view-today .athar-prayer-identity .athar-prayer-symbol svg,.detail-prayer-heading .athar-prayer-symbol svg{color:inherit!important;stroke:currentColor!important}
/* Fixed semantic selected-button colors, independent of palette accent. */
#view-today .status-switch .state-btn[aria-pressed=true].early{background:rgba(27,157,95,.27)!important;color:#60dfa3!important;border-color:#29aa78!important}
#view-today .status-switch .state-btn[aria-pressed=true].on-time{background:rgba(120,199,145,.25)!important;color:#a7efbb!important;border-color:#7bc895!important}
#view-today .status-switch .state-btn[aria-pressed=true].late{background:rgba(202,62,72,.24)!important;color:#ff8994!important;border-color:#da5968!important}
body[data-theme=light] #view-today .status-switch .state-btn[aria-pressed=true].early{color:#076b42!important;background:#e1f6e9!important}
body[data-theme=light] #view-today .status-switch .state-btn[aria-pressed=true].on-time{color:#357347!important;background:#eaf6e9!important}
body[data-theme=light] #view-today .status-switch .state-btn[aria-pressed=true].late{color:#a92837!important;background:#ffe7e6!important}
#view-today .athar-prayer-row.athar-full-activity{background:linear-gradient(110deg,#17392e,#1a362e)!important;border-color:#388768!important}
body[data-theme=light] #view-today .athar-prayer-row.athar-full-activity{background:#e0f4e8!important;border-color:#70b88c!important}
#view-today .athar-prayer-row.athar-full-activity .athar-main-time{color:var(--text)!important}
/* Additional prayer screen interactions. */
.prayer-related-head{display:flex;justify-content:space-between;align-items:center;gap:15px;margin-bottom:12px}
.prayer-related-head h2{margin:0!important;flex:1}
.athar-mini-add{flex-shrink:0;background:var(--accent);color:var(--accent-ink,#141619);border:0;border-radius:12px;padding:10px 13px;font-weight:750}
.athar-data-note{font-size:12px;line-height:1.65;color:var(--muted);padding:12px 0;overflow-wrap:anywhere}
.athar-dua-reading{max-height:min(58vh,680px);overflow:auto;white-space:pre-wrap;overflow-wrap:anywhere;color:var(--text);font-family:var(--font-arabic);font-size:clamp(20px,4.7vw,27px);line-height:2.1;padding:12px 0 18px}
.athar-dua-buttons{display:flex;flex-wrap:wrap;gap:8px}
.athar-dua-buttons .button{flex:1 1 100px;min-width:0;padding-inline:6px}
.athar-done-note{margin:12px auto;color:#75ca9c;font-weight:700}
/* Quran section remains honest about unavailable verified text and supports later imports. */
#view-quran{margin:0 auto;max-width:600px}
.quran-tabs,.quran-mode-control{display:flex;flex-wrap:wrap;gap:8px;margin:22px 0}
.quran-tabs .chip{padding:10px 15px;font-size:12px}
.quran-surah-list,.quran-book-list{display:grid;gap:10px;margin-top:15px}
.quran-surah{width:100%;min-height:67px;display:flex;gap:14px;align-items:center;justify-content:space-between;text-align:start;padding:12px 17px;border-radius:20px;background:var(--athar-card-color,var(--surface));border:1px solid var(--athar-card-border,var(--line));color:var(--text)}
.quran-number{width:32px;height:32px;border-radius:50%;flex:0 0 32px;display:grid;place-items:center;background:color-mix(in srgb,var(--accent) 12%,var(--surface));color:var(--accent);font-variant-numeric:tabular-nums;font-size:12px;font-weight:700}
.quran-surah-name{flex:1;font-size:20px;font-weight:650;font-family:var(--font-arabic)}
.quran-surah-state{font-size:11px;color:var(--muted)}
.quran-progress-row{display:flex;align-items:center;gap:12px;min-height:58px;border-bottom:1px solid var(--line);padding:10px 0}
.quran-progress-row>span:first-child{flex:1}
.quran-progress-row span+span{color:var(--muted);font-size:11px}
.quran-progress-row button{border-radius:12px;border:1px solid var(--line);background:var(--surface);color:var(--text);padding:10px}
.athar-quran-reader[hidden]{display:none!important}
.athar-quran-reader{position:fixed;inset:0;z-index:17;background:var(--bg);color:var(--text);overflow-y:auto;overscroll-behavior:contain;padding:calc(env(safe-area-inset-top) + 25px) max(22px,calc((100vw - 620px)/2)) calc(env(safe-area-inset-bottom) + 65px);scroll-padding-top:35px}
.athar-quran-reader header{display:flex;justify-content:space-between;align-items:center;min-height:45px;margin-bottom:40px}
.athar-quran-reader header button{border:0;background:none;color:var(--accent);font-size:19px;font-weight:650;padding:10px 0}
.athar-quran-reader h1{font-family:var(--font-arabic);font-size:30px;line-height:1.5;margin:10px 0 25px;text-align:center}
.quran-ayah{border-bottom:1px solid var(--line);padding:15px 0;scroll-margin-top:30px}
.quran-ayah p{font-family:'Amiri',var(--font-arabic),serif;font-size:clamp(23px,5.7vw,29px);line-height:2.2;overflow-wrap:break-word;letter-spacing:0}
.quran-ayah p small{font-size:.6em;color:var(--accent);white-space:nowrap}
.quran-ayah>div{display:flex;gap:12px;justify-content:flex-end}
.quran-ayah button{border:1px solid var(--line);background:var(--surface);color:var(--text);border-radius:10px;padding:10px;font-size:11px}
.quran-ayah.is-read{border-inline-start:3px solid #55a978;padding-inline-start:10px}
body:has(.athar-quran-reader:not([hidden])) .glass-nav{display:none!important}
@media(max-width:390px){#view-today .athar-prayer-row{padding:10px 10px!important}#view-today .athar-prayer-symbol{width:36px!important;height:36px!important;flex-basis:36px!important}#view-today .athar-prayer-identity{gap:5px!important}#view-today .athar-prayer-identity .prayer-name{font-size:17px!important}#view-today .athar-prayer-hero .hero-content{height:104px!important;flex-basis:104px!important}body .glass-nav .tab-icon svg{max-width:24px}}
/* Contain oversized atmospheric artwork within the actual viewport. */
#view-today .athar-sky{left:calc(52% - 21px)!important}
html,body{max-width:100%;overflow-x:clip}
.athar-welcome-art{display:block;margin:10px auto 16px;max-width:130px;max-height:130px;object-fit:contain;border-radius:18px}

.tafsir-chapter-content{font-family:var(--font-arabic);font-size:clamp(18px,4.3vw,25px);line-height:2.1;white-space:pre-wrap;overflow-wrap:anywhere;max-width:100%}.tafsir-page-controls{display:flex;gap:12px;margin:28px 0}.tafsir-page-controls .button{flex:1}
