:root{color-scheme:dark;--green:#103f33;--gold:#dec378;--muted:#b7d0c5;--line:#487462;--header:#245c48}
*{box-sizing:border-box}
html,body{width:100%;height:100%;margin:0;overflow:hidden}
body{background:#092e25;color:#f7faf6;font-family:system-ui,-apple-system,sans-serif;padding:clamp(10px,1.7vh,24px) clamp(14px,2vw,38px);display:grid;grid-template-rows:auto minmax(0,1fr) auto;gap:clamp(8px,1.4vh,20px)}
header{display:flex;align-items:center;justify-content:space-between;gap:2vw;padding-bottom:clamp(8px,1.3vh,16px);border-bottom:2px solid var(--gold);min-width:0}
.brand{display:flex;align-items:center;gap:clamp(10px,1.1vw,20px);min-width:0}.brand img{width:clamp(46px,4.8vmin,90px);height:clamp(50px,5.2vmin,96px);object-fit:contain;background:#fff;border-radius:9px;flex:0 0 auto}
h1{font-family:Georgia,serif;font-size:clamp(18px,2.4vmin,40px);line-height:1.1;margin:0;white-space:nowrap}p{margin:.3em 0}.brand p,.clock-area p{color:var(--muted);font-size:clamp(12px,1.25vmin,20px)}
.clock-area{text-align:end;flex:0 0 auto}#clock{font-size:clamp(24px,3.6vmin,58px);font-variant-numeric:tabular-nums;direction:ltr;display:block;color:var(--gold);line-height:1}
main{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:clamp(10px,1.6vw,28px);min-height:0}
.panel{background:var(--green);border:1px solid var(--line);border-radius:clamp(10px,1.4vmin,18px);overflow:hidden;min-width:0;min-height:0}
.prayer-panel,.notice-panel{display:flex;flex-direction:column}
.section-head{background:var(--header);padding:clamp(8px,1.25vh,16px) clamp(12px,1.35vw,24px);display:flex;align-items:center;justify-content:space-between;gap:12px;font-size:clamp(16px,2vmin,30px);font-weight:400;border-bottom:2px solid var(--gold);flex:0 0 auto}
.badge{font-size:clamp(10px,1.05vmin,16px);color:var(--gold);white-space:nowrap}
table{width:100%;border-collapse:collapse;font-variant-numeric:tabular-nums;table-layout:fixed;flex:1}thead{height:9%}tbody tr{height:15.16%}th,td{padding:clamp(3px,.72vh,10px) clamp(5px,.8vw,14px);text-align:center;border-bottom:1px solid #416552;line-height:1.05}th{font-size:clamp(10px,1.22vmin,18px);color:var(--muted);font-weight:400}td{font-size:clamp(16px,2.35vmin,34px);font-weight:400}th:first-child,td:first-child{text-align:start}td:last-child{color:var(--gold)}tr.active{background:#32694e;box-shadow:inset 4px 0 var(--gold)}
.next{padding:clamp(7px,1.2vh,16px) clamp(10px,1.3vw,22px);text-align:center;background:#163c31;min-height:clamp(76px,13vh,132px);display:flex;flex-direction:column;justify-content:center;flex:0 0 auto}.next span{font-size:clamp(13px,1.55vmin,23px)}.next strong{display:block;font-size:clamp(28px,4.4vmin,66px);line-height:1.08;color:var(--gold);font-variant-numeric:tabular-nums;direction:ltr}.next p{font-size:clamp(10px,1.12vmin,17px);color:var(--muted)}.next.urgent{background:#ead592;color:#173f30}.next.urgent strong,.next.urgent p{color:#173f30}
#notices{padding:clamp(14px,2vw,36px);flex:1;min-height:0;display:flex;flex-direction:column;justify-content:center;gap:clamp(12px,2vh,26px);overflow:hidden}.notice{border-inline-start:4px solid var(--gold);padding-inline-start:clamp(12px,1.4vw,24px)}.notice h2{color:var(--gold);font-size:clamp(21px,3vmin,46px);line-height:1.2;margin:0 0 1vh}.notice p{font-size:clamp(16px,2.1vmin,32px);line-height:1.45;white-space:pre-line;overflow-wrap:anywhere}
.notice-panel.prayer-alert .section-head{background:#8b6b1f;color:#fff}.notice-panel.prayer-alert #notices{background:linear-gradient(145deg,#ead592,#caa44b);color:#123c30}.notice-panel.prayer-alert .notice{border-inline-start:0;text-align:center;padding:0}.notice-panel.prayer-alert .notice h2{color:#123c30;font-size:clamp(28px,4.2vmin,64px)}.notice-panel.prayer-alert .notice p{color:#123c30;font-size:clamp(18px,2.55vmin,38px);font-weight:400;line-height:1.65}.notice-panel.prayer-alert .friday{display:none}
.friday{padding:clamp(8px,1.2vh,15px) clamp(12px,1.6vw,28px);background:var(--header);border-top:1px solid var(--line);font-size:clamp(12px,1.35vmin,20px);flex:0 0 auto}.friday strong{color:var(--gold)}
footer{display:flex;align-items:center;justify-content:space-between;gap:16px;font-size:clamp(10px,1vmin,13px);color:var(--muted);min-height:26px}footer div{display:flex;gap:8px;align-items:center}button,footer a{border:1px solid #6f8c7c;border-radius:6px;padding:5px 9px;background:transparent;color:var(--muted);font:inherit;text-decoration:none;cursor:pointer}
html[lang=ur] body{font-family:"Geeza Pro","Noto Naskh Arabic",serif}html[lang=ur] h1{font-family:inherit}html[lang=ur] .notice p{line-height:1.75}td:not(:first-child){direction:ltr}button:focus-visible,a:focus-visible{outline:3px solid var(--gold)}
@media(max-aspect-ratio:4/3),(max-width:700px){html,body{height:auto;min-height:100%;overflow:auto}body{display:block;padding:14px}main{grid-template-columns:1fr;margin-top:14px}.panel{margin-bottom:14px;min-height:520px}header{gap:12px}.brand img{width:44px;height:48px}h1{font-size:clamp(16px,4vw,24px);white-space:normal}.clock-area p{max-width:130px}.section-head{padding:13px}#notices{padding:22px}.notice{padding-inline-start:14px}.friday{padding:14px}footer{align-items:flex-start;flex-wrap:wrap;margin-top:4px}}
@media(max-height:650px) and (min-aspect-ratio:4/3){body{padding:7px 14px;gap:6px}.brand img{width:38px;height:41px}.brand p,.clock-area p{font-size:10px}.section-head{padding:6px 10px}.next{min-height:65px;padding:5px}.friday{padding:6px 12px}footer{min-height:20px}}

/* Light reading surfaces framed by the masjid's green headers. */
:root{color-scheme:light;--heading-green:#245c48;--reading-ink:#173f32}
body{background:#f0f3ed;color:var(--reading-ink)}
header{background:var(--heading-green);color:#fff;padding:2vh 1.5vw;border-radius:14px 14px 0 0}
.panel{background:#fffdf7;border-color:#cad8cd;color:var(--reading-ink)}
.section-head{background:var(--heading-green);color:#fff}
thead{background:#eaf0e8}
th{color:#4c6558}
th,td{border-bottom-color:#d7e1d5}
td:last-child{color:#795c1d}
tr.active{background:#e4edda;box-shadow:inset 4px 0 #b18b37}
.next{background:#edf2e7;color:var(--reading-ink)}
.next strong{color:#245c48}
.next p{color:#4c6558}
.notice h2{color:#245c48}
.friday{background:#edf2e7;border-top-color:#d7e1d5}
.friday strong{color:#795c1d}
footer,button,footer a{color:#4c6558}
/* Align the light-green footer bands across both display panels. */
.friday{min-height:var(--prayer-footer-height,clamp(76px,13vh,132px));display:flex;flex-direction:column;justify-content:center}
#hijriDate{color:var(--gold);font-weight:400}

/* Distance-readable TV type, one announcement at a time. */
@font-face{font-family:TVUrdu;src:url('/assets/fonts/NotoNaskhArabic.ttf') format('truetype');font-weight:100 900;font-display:swap}
html[lang=ur] body{font-family:TVUrdu,serif}
h1{font-size:clamp(22px,3.1vmin,56px)}
#clock{font-size:clamp(36px,5.4vmin,100px)}
.brand p,.clock-area p{font-size:clamp(13px,1.75vmin,32px)}
.section-head{font-size:clamp(20px,2.65vmin,48px)}
th{font-size:clamp(16px,2.3vmin,40px);font-weight:400}
td{font-size:clamp(24px,3.9vmin,76px);padding:.8vh .55vw}
.next span{font-size:clamp(18px,2.5vmin,45px)}
.next strong{font-size:clamp(38px,5.2vmin,94px)}
.next p{font-size:clamp(13px,1.65vmin,30px)}
.notice h2,.notice-panel.prayer-alert .notice h2{font-size:clamp(27px,4.1vmin,76px);line-height:1.22}
.notice p,.notice-panel.prayer-alert .notice p{font-size:clamp(24px,3.8vmin,70px);line-height:1.4;font-weight:400}
html[lang=ur] .notice p{line-height:1.65}
.notice-source{display:block;font-size:clamp(13px,1.65vmin,30px);color:inherit;opacity:.85;text-decoration:none;margin-top:2vh}
.notice{animation:slide-in .5s ease-out}.friday{font-size:clamp(14px,1.8vmin,32px)}
@keyframes slide-in{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
@media(prefers-reduced-motion:reduce){.notice{animation:none}}
body[data-mode=countdown] .prayer-panel table,body[data-mode=countdown] .prayer-panel .section-head{display:none}
body[data-mode=countdown] .next{flex:1;background:#fff7df;gap:3vh}
body[data-mode=countdown] .next span{font-size:clamp(28px,4.4vmin,82px);font-weight:400}
body[data-mode=countdown] .next strong{order:1;font-size:clamp(48px,8.5vmin,170px)}
body[data-mode=countdown] .next p{font-size:clamp(20px,2.6vmin,48px)}
#quietView[hidden]{display:none}
body[data-mode=jamaat]{display:block;background:#071611;color:#9caf9f;padding:0}
body[data-mode=jamaat]>header,body[data-mode=jamaat]>main,body[data-mode=jamaat]>footer{display:none}
#quietView{height:100dvh;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;gap:7vh;padding:6vw}
#quietClock{display:block;font-size:12vmin;font-variant-numeric:tabular-nums;direction:ltr}
#quietPrayer{font-size:5.5vmin;margin:2vh 0;font-weight:400}
#quietMobile{font-size:5.5vmin;line-height:1.6;max-width:90vw;margin:0}
@media(max-aspect-ratio:4/3){td{font-size:clamp(22px,5vw,40px)}.notice p{font-size:clamp(24px,5vw,40px)}}
/* Urdu reads from the right, including the order of the two panels. */
main{direction:ltr}html[lang=ur] main,html[lang=ur] .panel{direction:rtl}
[hidden]{display:none!important}
footer{flex-wrap:wrap;gap:6px 14px}footer .settings{gap:12px;flex-wrap:wrap}
footer select{font:inherit;color:#173f32;background:#fffdf7;border:1px solid #6f8c7c;border-radius:6px;padding:5px;max-width:180px}
footer label{white-space:nowrap}footer select:focus-visible{outline:3px solid var(--gold)}
body[data-city=other] .friday{display:none}


.brand:has(#masjidName[hidden]) #location{font-size:clamp(24px,3.4vmin,60px);color:#fff;font-weight:400}

.guidance-notice .notice-arabic{font-family:"Geeza Pro","Noto Naskh Arabic",serif;font-size:clamp(25px,3.8vmin,52px);line-height:1.7;margin:12px 0;color:#285d4e}.guidance-notice p:not(.notice-arabic){font-size:clamp(20px,2.8vmin,38px);line-height:1.5}.guidance-notice h2{font-size:clamp(22px,3vmin,42px)}

.clock-pair{display:flex;align-items:center;justify-content:flex-end;gap:16px;direction:ltr}.analog-clock{width:clamp(72px,11vmin,140px);height:clamp(72px,11vmin,140px);flex:none}.analog-clock svg{display:block;width:100%;height:100%}body:not([data-clock-mode]) .analog-clock,body[data-clock-mode=digital] .analog-clock{display:none}body[data-clock-mode=analog] #clock,body[data-clock-mode=analog] #quietClock{display:none}.quiet-clocks{justify-content:center;margin-bottom:20px}.quiet-clocks .analog-clock{width:clamp(150px,26vmin,360px);height:clamp(150px,26vmin,360px)}@media(max-width:700px){.clock-pair{gap:8px}.analog-clock{width:64px;height:64px}}

/* Prayer periods use the same calm reading palette as the normal display. */
.next.urgent,body[data-mode=countdown] .next{background:#eef3ed;color:#173f32}
.next.urgent strong{color:#245c48}.next.urgent p{color:#4c6558}
.notice-panel.prayer-alert .section-head{background:var(--heading-green);color:#fff}
.notice-panel.prayer-alert #notices{background:#fffdf7;color:#173f32}
.notice-panel.prayer-alert .notice h2{color:#245c48}
.notice-panel.prayer-alert .notice p{color:#173f32}
.notice-panel.prayer-alert .guidance-notice h2{font-size:clamp(21px,3vmin,44px)}
.notice-panel.prayer-alert .guidance-notice .notice-arabic{font-family:TVUrdu,serif;font-size:clamp(26px,4vmin,58px);line-height:1.65;margin:1vh 0}
.notice-panel.prayer-alert .guidance-notice p:not(.notice-arabic){font-size:clamp(19px,2.7vmin,40px);line-height:1.5;font-weight:400}
.notice-panel.prayer-alert .guidance-notice .dua-instruction{color:#795c1d;font-size:clamp(16px,2.2vmin,32px);font-weight:400}
.notice-panel.prayer-alert .notice-source{margin-top:1.5vh}
#quietView{gap:3vh;padding:4vh 5vw}
#quietMobile{overflow-wrap:anywhere;white-space:pre-line}

/* Keep the clock at the outer corner with the dates beside it. */
header .clock-area{display:flex;align-items:center;gap:clamp(12px,1.6vw,28px);min-width:0}
header .clock-dates{order:1;text-align:end;max-width:24vw}
header .clock-pair{order:2}
header .clock-dates p{margin:.15em 0;line-height:1.45}
@media(max-width:700px){header .clock-area{gap:8px}header .clock-dates{max-width:30vw}header .clock-dates p{font-size:12px}header h1{white-space:normal}}

#fullscreenHelp{max-width:min(90vw,480px);max-height:85dvh;overflow:auto;padding:24px;border:1px solid #cad8cd;border-radius:14px;background:#fffdf7;color:#173f32;font:16px/1.6 system-ui,sans-serif}
#fullscreenHelp::backdrop{background:#0008}#fullscreenHelp h2{font-size:22px;margin:0 0 10px}#fullscreenHelp button{margin-top:16px;padding:8px 18px}
/* Phone landscape must fit the visible area, including Safari's browser bars. */
@media(orientation:landscape) and (max-height:650px){
 html{height:100%;overflow:auto}
 body{height:100vh;height:100dvh;min-height:300px;display:grid;overflow:visible;padding:6px max(8px,env(safe-area-inset-right)) max(6px,env(safe-area-inset-bottom)) max(8px,env(safe-area-inset-left));gap:5px;grid-template-rows:auto minmax(0,1fr) auto}
 header{padding:5px 10px;gap:10px;border-radius:9px 9px 0 0}
 header .brand{gap:8px}header .brand img{width:32px;height:34px}
 header h1{font-size:clamp(15px,2.3vw,22px);white-space:normal;line-height:1.2}
 header .brand p,header .clock-dates p{font-size:11px;line-height:1.25}
 header .clock-area{gap:8px}header .clock-dates{max-width:26vw}header .clock-pair{gap:6px}
 header .analog-clock{width:46px;height:46px}header #clock{font-size:24px}
 main{grid-template-columns:minmax(0,1fr) minmax(0,1fr);margin:0;gap:8px;min-height:0}
 main .panel{min-height:0;margin:0;border-radius:9px}
 .prayer-panel{overflow:auto}
 .section-head{font-size:15px;line-height:1.2;padding:4px 8px;border-bottom-width:1px}.badge{font-size:9px}
 table{height:0;min-height:0}thead{height:auto}tbody tr{height:auto}
 th,td{padding:1px 5px;line-height:1.05}th{font-size:11px}td{font-size:clamp(14px,4dvh,23px)}
 .next{min-height:0;padding:3px 6px}.next span{font-size:12px;line-height:1.2}.next strong{font-size:20px;line-height:1}.next p{font-size:10px;margin:1px 0}.next p:empty{display:none}
 #notices{padding:8px;gap:5px;overflow:auto;justify-content:flex-start}
 .notice{padding-inline-start:8px;border-inline-start-width:2px;margin-block:auto;flex-shrink:0}
 .notice h2,.guidance-notice h2,.notice-panel.prayer-alert .notice h2{font-size:18px;line-height:1.25;margin:0 0 4px}
 .notice p,html[lang=ur] .notice p,.guidance-notice p:not(.notice-arabic),.notice-panel.prayer-alert .guidance-notice p:not(.notice-arabic){font-size:16px;line-height:1.45;margin:3px 0}
 .guidance-notice .notice-arabic,.notice-panel.prayer-alert .guidance-notice .notice-arabic{font-size:20px;line-height:1.5;margin:4px 0}
 .friday{min-height:0;padding:3px 8px;font-size:11px;line-height:1.25}.friday p{margin:2px 0}
 footer{min-height:0;margin:0;gap:4px;font-size:10px;align-items:center;flex-wrap:nowrap}footer div{gap:4px}footer .settings{gap:4px}footer select{max-width:125px;padding:3px}footer button,footer a{padding:5px}footer #status{display:none}
 body[data-mode=countdown] .next{gap:8px}
 body[data-mode=countdown] .next span{font-size:20px}
 body[data-mode=countdown] .next p{font-size:16px}
 body[data-mode=countdown] .next strong{font-size:clamp(36px,12dvh,72px)}
}

/* Only normal hours use the full-width table; prayer stages take priority. */
body.timetable-only main{grid-template-columns:minmax(0,1fr)}
body.timetable-only .notice-panel{display:none}

/* Larger, heavier type for reading across a room on landscape TV displays. */
@media(min-width:800px) and (min-height:501px) and (min-aspect-ratio:4/3){
 header{padding:1vh 1.3vw}
 header .brand{flex:1;min-width:0}
 header h1{white-space:normal;font-size:clamp(24px,3vmin,48px);line-height:1.15}
 header .brand p{font-size:clamp(15px,1.8vmin,26px);color:#e4eee8}
 header .clock-area{gap:1.2vw;max-width:58%;flex-shrink:1}
 header .clock-dates{max-width:22vw;min-width:0}
 header .clock-dates p{font-size:clamp(19px,2.5vmin,36px);font-weight:400;line-height:1.3;color:#f5f8f1}
 header .clock-dates #hijriDate{color:#f3d991}
 header .clock-pair{gap:1vw;flex-shrink:0}
 header #clock{font-family:Arial,system-ui,sans-serif;font-size:clamp(46px,7vmin,100px);font-weight:400;letter-spacing:.015em;color:#fff}
 header .analog-clock{width:clamp(96px,14vmin,170px);height:clamp(96px,14vmin,170px)}
 body[data-clock-mode=both] header #clock{font-size:clamp(40px,5.5vmin,80px)}
 body[data-clock-mode=both] header .analog-clock{width:11vmin;height:11vmin}
 th{font-size:clamp(20px,2.6vmin,36px);font-weight:400;color:#234c3c}
 td{font-size:clamp(30px,4.6vmin,68px);font-weight:400;padding:.45vh .4vw}
 td:not(:first-child){font-family:Arial,system-ui,sans-serif;font-weight:400;letter-spacing:.015em;white-space:nowrap}
 td:last-child{color:#694c10}
 body.timetable-only td{font-size:clamp(38px,6.5vmin,94px);padding:.3vh .65vw}
 body.timetable-only th{font-size:clamp(22px,3vmin,42px)}
 body.timetable-only .section-head{padding:.7vh 1.3vw}
 body.timetable-only .next{min-height:0;padding:.6vh 1vw}
 body.timetable-only .next strong{font-size:clamp(42px,6vmin,88px);font-weight:400}
 .next strong{font-family:Arial,system-ui,sans-serif;font-weight:400}
}

/* Matching patterned side panels keep the timetable centred and compact. */
@media(min-aspect-ratio:4/3){
 body.timetable-only main{grid-template-columns:minmax(14px,1fr) minmax(0,6fr) minmax(14px,1fr);gap:clamp(6px,1vw,20px)}
 body.timetable-only main::before,body.timetable-only main::after{content:""}
 body.timetable-only .prayer-panel{border:2px solid #b59b50}
 body.timetable-only th,body.timetable-only td{text-align:center}
 body.timetable-only td,body.timetable-only th{border-left:1px solid #c4d2c1;border-right:1px solid #c4d2c1}
}
@media(min-aspect-ratio:4/3) and (max-height:500px){
 body.timetable-only main{grid-template-columns:minmax(8px,1fr) minmax(0,12fr) minmax(8px,1fr);gap:5px}
}

/* Consistent starting edge for prayer names, with regular-weight display text. */
body h1,body h2,body strong{font-weight:400}
body .prayer-panel th:first-child,body .prayer-panel td:first-child{text-align:start;padding-inline-start:clamp(10px,1.3vw,24px);width:28%}
@media(min-width:800px) and (min-height:501px) and (min-aspect-ratio:4/3){
 body.timetable-only .prayer-panel td:first-child{font-size:clamp(32px,5.3vmin,76px)}
}

/* Design B: one continuous, faint geometric layer across the entire display. */
body{background-color:#faf8ef}
body::after{content:"";position:fixed;inset:0;z-index:5;pointer-events:none;background:url('/assets/tv-geometric-pattern.svg') repeat;background-size:120px 120px;opacity:.16}
body[data-mode=jamaat]::after{opacity:.05}
#fullscreenHelp{background:#fffdf7}

/* Release the footer row in fullscreen and restore it on every exit path. */
body.screen-fullscreen{grid-template-rows:auto minmax(0,1fr)}
body.screen-fullscreen>footer{display:none}
#exitFullscreen{position:fixed;inset-inline-end:max(8px,env(safe-area-inset-right));bottom:max(8px,env(safe-area-inset-bottom));z-index:6;width:36px;height:36px;padding:0;border:1px solid #8da28e;border-radius:8px;background:#fffdf7;color:#245c48;font:24px/1 system-ui,sans-serif;opacity:.45}
#exitFullscreen:hover,#exitFullscreen:focus-visible{opacity:1}

/* Make the next jamaat prominent without taking height from the prayer rows. */
body:not([data-mode=countdown]) .next strong{font-size:clamp(44px,6.5vmin,100px);font-weight:400}
@media(orientation:landscape){
 body:not([data-mode=countdown]) .next{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);align-items:center;column-gap:clamp(12px,2vw,36px);row-gap:0;min-height:0;padding:.5vh 1vw}
 body:not([data-mode=countdown]) .next span{text-align:end;font-size:clamp(20px,3.2vmin,46px);line-height:1.2}
 body:not([data-mode=countdown]) .next strong{justify-self:start;text-align:center;font-size:clamp(44px,7.5vmin,108px);line-height:1}
 body:not([data-mode=countdown]) .next p{grid-column:1 / -1;margin:2px 0 0}
}
@media(orientation:landscape) and (max-height:500px){
 body:not([data-mode=countdown]) .next{padding:3px 6px;column-gap:12px}
 body:not([data-mode=countdown]) .next span{font-size:16px}
 body:not([data-mode=countdown]) .next strong{font-size:32px}
}

/* Theme colours come from the saved background palette; layout stays unchanged. */
body[data-theme=active]:not([data-mode=jamaat]){background:var(--tv-bg);color:var(--tv-ink);--gold:var(--tv-head-accent);--heading-green:var(--tv-head);--reading-ink:var(--tv-ink)}
body[data-theme=active] header,body[data-theme=active] .section-head{background:var(--tv-head);color:var(--tv-head-ink)}
body[data-theme=active] header .brand p,body[data-theme=active] header .clock-dates p,body[data-theme=active] header #clock,body[data-theme=active] .brand:has(#masjidName[hidden]) #location{color:var(--tv-head-ink)}
body[data-theme=active] header #hijriDate,body[data-theme=active] .badge{color:var(--tv-head-accent)}
body[data-theme=active] .panel,body[data-theme=active] .notice-panel.prayer-alert #notices{background:var(--tv-bg);color:var(--tv-ink);border-color:var(--tv-line)}
body[data-theme=active] .next,body[data-theme=active] .next.urgent,body[data-theme=active][data-mode=countdown] .next,body[data-theme=active] .friday,body[data-theme=active] thead,body[data-theme=active] tr.active{background:var(--tv-band);color:var(--tv-band-ink)}
body[data-theme=active] .next strong,body[data-theme=active] .next p,body[data-theme=active] th,body[data-theme=active] tr.active td{color:var(--tv-band-ink)}
body[data-theme=active] td:last-child,body[data-theme=active] .friday strong{color:var(--tv-accent)}
body[data-theme=active] th,body[data-theme=active] td,body[data-theme=active] .friday{border-color:var(--tv-line)}
body[data-theme=active] .notice h2,body[data-theme=active] .notice p,body[data-theme=active] .notice-panel.prayer-alert .notice h2,body[data-theme=active] .notice-panel.prayer-alert .notice p{color:var(--tv-ink)}
body[data-theme=active] footer,body[data-theme=active] button,body[data-theme=active] footer a{color:var(--tv-ink);border-color:var(--tv-line)}
body[data-theme=active] footer select,body[data-theme=active] #exitFullscreen,body[data-theme=active] #fullscreenHelp{background:var(--tv-bg);color:var(--tv-ink);border-color:var(--tv-line)}
body[data-theme=active] .analog-clock svg>circle:first-child{fill:var(--tv-bg)}
body[data-theme=active] .analog-clock svg>line{stroke:var(--tv-ink)}
body[data-theme=active] .analog-clock svg>text,body[data-theme=active] .analog-clock svg>circle:last-child{fill:var(--tv-ink)}
body[data-theme=active] .analog-clock svg>[data-hand=second]{stroke:var(--tv-accent)}
/* The quiet prayer period stays dim even with a fixed cream palette. */
body[data-mode=jamaat] .analog-clock svg>circle:first-child{fill:#071611}
body[data-mode=jamaat] .analog-clock svg>line{stroke:#9caf9f}
body[data-mode=jamaat] .analog-clock svg>text,body[data-mode=jamaat] .analog-clock svg>circle:last-child{fill:#9caf9f}

body[data-theme=active]::after{opacity:var(--tv-pattern-opacity,.12)}
body[data-mode=jamaat]::after{opacity:.04}
