/* أوّاب — TV display (v1.6.33.35). Landscape, sized in vw/vh so it scales to any screen; colours come from the site theme. */
:root{--deep:#043d35;--primary:#06483f;--mid:#19534d;--accent:#d7aa5b;--accentDeep:#9a7b44;--page:#fbf8f1;--soft:#eef7f1}
*{box-sizing:border-box}
html,body{margin:0;height:100%;overflow:hidden;background:var(--deep);color:#fff;font-family:'Tajawal','Noto Sans Arabic',system-ui,sans-serif}
body.tv-idle{cursor:none}
.tv{position:relative;display:grid;grid-template-rows:auto 1fr auto auto;height:100vh;padding:3.2vh 3.4vw 2.4vh;gap:2.4vh;
 background:radial-gradient(120% 90% at 85% 0%,var(--mid) 0%,var(--primary) 45%,var(--deep) 100%)}
.tv::before{content:"";position:absolute;inset:0;pointer-events:none;opacity:.07;
 background-image:radial-gradient(circle at 1px 1px,#fff 1px,transparent 1.4px);background-size:2.4vw 2.4vw}
.tv>*{position:relative}
.tv-top{display:flex;align-items:center;justify-content:space-between;gap:3vw}
.tv-brand{display:flex;align-items:center;gap:1.4vw;min-width:0}
.tv-logo{height:9vh;width:auto;filter:brightness(0) invert(1) sepia(.35) saturate(1.6) hue-rotate(5deg)}
.tv-place{display:flex;flex-direction:column;min-width:0}
.tv-place strong{font-size:4.2vh;font-weight:800;line-height:1.25;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:52vw}
.tv-place span{font-size:2.5vh;color:var(--accent);font-weight:700}
.tv-clock{display:flex;flex-direction:column;align-items:flex-end}
.tv-clock strong{font-size:8vh;font-weight:800;line-height:1;font-variant-numeric:tabular-nums;letter-spacing:.02em}
.tv-clock strong small{font-size:.38em;margin-inline-start:.4vw;color:var(--accent)}
.tv-clock span{margin-top:.8vh;font-size:2.6vh;color:#d9ebe4;font-weight:700}
.tv-hero{display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;border-radius:3vh;
 background:linear-gradient(180deg,#ffffff12,#ffffff06);border:1px solid #ffffff22;padding:2vh 2vw}
.tv-kicker{margin:0;font-size:3.4vh;font-weight:700;color:#d9ebe4}
.tv-next{margin:.6vh 0 0;font-size:11vh;font-weight:800;line-height:1.15;color:#fff}
.tv-count{margin-top:.4vh;font-size:15vh;font-weight:800;line-height:1;color:var(--accent);font-variant-numeric:tabular-nums;letter-spacing:.03em}
.tv-sub2{margin:1.4vh 0 0;font-size:3vh;color:#d9ebe4;font-weight:700;min-height:3.6vh}
.tv-hero.is-now{animation:tvPulse 1.6s ease-in-out infinite;border-color:var(--accent)}
.tv-hero.is-now .tv-count{color:#fff}
@keyframes tvPulse{0%,100%{box-shadow:0 0 0 0 transparent}50%{box-shadow:0 0 0 .8vh color-mix(in srgb,var(--accent) 55%,transparent),0 0 6vh color-mix(in srgb,var(--accent) 45%,transparent)}}
.tv-row{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:1.2vw}
.tv-card{display:flex;flex-direction:column;align-items:center;gap:.6vh;padding:2vh 1vw;border-radius:2.4vh;background:#ffffff10;border:1px solid #ffffff1f;text-align:center}
.tv-card b{font-size:3.6vh;font-weight:800}
.tv-card .adhan{font-size:5.4vh;font-weight:800;line-height:1.1;font-variant-numeric:tabular-nums}
.tv-card .adhan small,.tv-card .iqama small{font-size:.45em;color:#cfe3dc;margin-inline-start:.3vw}
.tv-card .iqama{font-size:2.8vh;font-weight:700;color:var(--accent);font-variant-numeric:tabular-nums}
.tv-card .iqama em{font-style:normal;color:#cfe3dc;margin-inline-end:.4vw}
.tv-card.is-next{background:var(--accent);border-color:var(--accent);color:var(--deep);transform:translateY(-.8vh);box-shadow:0 1.6vh 3vh #0005}
.tv-card.is-next .adhan small,.tv-card.is-next .iqama small,.tv-card.is-next .iqama em{color:var(--deep);opacity:.75}
.tv-card.is-next .iqama{color:var(--deep)}
.tv-card.is-past{opacity:.55}
.tv-card.is-sunrise .adhan{font-size:4.6vh}
.tv-foot{display:flex;justify-content:flex-end;align-items:center;font-size:1.9vh;color:#b9d4ca}
.tv-change{font:inherit;font-size:2vh;font-weight:800;color:var(--deep);background:var(--accent);border:0;border-radius:99px;padding:.8vh 1.6vw;cursor:pointer}
.tv-change:focus-visible,.tv-area:focus-visible{outline:.5vh solid #fff;outline-offset:.4vh}
.tv-overlay{position:fixed;inset:0;z-index:5;display:flex;align-items:center;justify-content:center;background:#021d19e6;padding:4vh 4vw}
.tv-overlay[hidden]{display:none}
.tv-panel{width:min(92vw,1100px);max-height:90vh;display:flex;flex-direction:column;gap:1.6vh;background:var(--page);color:var(--deep);border-radius:3vh;padding:4vh 3vw}
.tv-panel h2{margin:0;font-size:4.6vh}
.tv-panel p{margin:0;font-size:2.4vh;color:var(--mid);line-height:1.6}
.tv-areas{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:1.2vw;overflow:auto;padding:.6vh}
.tv-area{font:inherit;text-align:start;display:flex;flex-direction:column;gap:.3vh;padding:1.8vh 1.4vw;border-radius:2vh;border:2px solid #d8e4dc;background:#fff;color:var(--deep);cursor:pointer}
.tv-area strong{font-size:3vh;font-weight:800;color:var(--primary)}
.tv-area span{font-size:2vh;color:var(--mid)}
.tv-area:focus,.tv-area:hover{border-color:var(--primary);background:var(--soft)}
.tv-msg{grid-column:1/-1;font-size:2.6vh;color:var(--mid)}
@media (orientation:portrait){
 .tv{grid-template-rows:auto auto auto 1fr;padding:3vh 4vw 2vh;gap:2vh}
 .tv-top{flex-direction:column;align-items:stretch;gap:1.4vh}
 .tv-logo{height:6vh}.tv-place strong{font-size:3.2vh;max-width:78vw}.tv-place span{font-size:2vh}
 .tv-clock{align-items:center}.tv-clock strong{font-size:7vh}.tv-clock span{font-size:2vh;text-align:center}
 .tv-hero{padding:3vh 3vw}.tv-kicker{font-size:2.6vh}.tv-next{font-size:7vh}.tv-count{font-size:9.5vh}.tv-sub2{font-size:2.2vh}
 .tv-row{grid-template-columns:repeat(3,minmax(0,1fr));gap:1.4vh 2.4vw;align-content:start}
 .tv-card{padding:1.6vh 1vw}.tv-card b{font-size:2.5vh}.tv-card .adhan{font-size:3.8vh}.tv-card.is-sunrise .adhan{font-size:3.4vh}.tv-card .iqama{font-size:1.9vh}
 .tv-areas{grid-template-columns:repeat(2,minmax(0,1fr))}
 .tv-foot{font-size:1.5vh}
}
@media (prefers-reduced-motion:reduce){.tv-hero.is-now{animation:none}}

/* adhan sound */
.tv-actions{display:flex;gap:1vw;align-items:center}
.tv-sound{font:inherit;font-size:2vh;font-weight:800;color:#fff;background:#ffffff1a;border:2px solid var(--accent);border-radius:99px;padding:.7vh 1.6vw;cursor:pointer}
.tv-sound.is-on{background:var(--accent);color:var(--deep)}
.tv-sound.is-locked{animation:tvBlink 1.4s ease-in-out infinite}
.tv-sound:focus-visible{outline:.5vh solid #fff;outline-offset:.4vh}
@keyframes tvBlink{50%{opacity:.45}}
.tv-toast{position:fixed;left:50%;bottom:7vh;transform:translateX(-50%);z-index:6;background:#000c;color:#fff;font-size:2.6vh;font-weight:800;padding:1.4vh 2.4vw;border-radius:99px;border:2px solid var(--accent)}
.tv-toast[hidden]{display:none}
@media (prefers-reduced-motion:reduce){.tv-sound.is-locked{animation:none}}
.tv-now{font-size:2vh;font-weight:800;color:var(--accent);margin-inline-end:.6vw;white-space:nowrap}
.tv-now[hidden]{display:none}
.tv-crumb{margin:0;font-size:2.6vh!important;font-weight:800;color:var(--accent)!important}
.tv-crumb:empty,#tvPickNote:empty{display:none}
.tv-area.is-back{border-style:dashed;background:transparent}
.tv-area.is-back strong{color:var(--mid)}
.tv-area.is-current{border-color:var(--accent);box-shadow:inset 0 0 0 2px var(--accent)}
.tv-area.is-alt{border-style:dashed}

/* v1.6.33.40 — fixed-width digits + equal footer buttons */
.fd{display:inline-block;direction:ltr;unicode-bidi:isolate;white-space:nowrap}
.dg{display:inline-block;width:.6em;text-align:center}
.dc{display:inline-block;width:.32em;text-align:center}
.tv-count .dc{position:relative;top:-.06em}
.tv-actions .tv-sound,.tv-actions .tv-change{font-size:2.4vh;min-height:6vh;padding:1vh 2.2vw;border-radius:99px;display:inline-flex;align-items:center;justify-content:center;gap:.6vw;min-width:19vw}
.tv-actions .tv-change{border:2px solid var(--accent)}
.tv-actions [hidden]{display:none!important}
.tv-actions button,.tv-actions a{white-space:nowrap;flex:none}
.tv-actions{flex:none}.tv-now{white-space:nowrap}
/* v1.6.33.49 — Quran panel: reciter, surah, play mode */
.tv-qpanel{width:min(94vw,1300px);max-height:94vh;gap:1.4vh;padding:3vh 2.6vw}
.tv-qhead{display:flex;align-items:center;justify-content:space-between;gap:2vw}
.tv-qpanel h3{margin:0 0 .8vh;font-size:2.4vh;color:var(--accent);font-weight:800}
.tv-qpanel section[hidden]{display:none}
.tv-qgrid{display:grid;gap:.9vw;padding:.4vh}
.tv-qgrid.is-reciters{grid-template-columns:repeat(4,minmax(0,1fr))}
.tv-qgrid.is-surahs{grid-template-columns:repeat(6,minmax(0,1fr));max-height:30vh;overflow:auto}
.tv-qgrid.is-modes{grid-template-columns:repeat(3,minmax(0,1fr))}
.tv-qbtn{font:inherit;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.2vh;padding:1.2vh .8vw;border-radius:1.6vh;border:2px solid #d8e4dc;background:#fff;color:var(--deep);cursor:pointer;text-align:center;min-height:6vh}
.tv-qbtn strong{font-size:2.3vh;font-weight:800;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}
.tv-qbtn span{font-size:1.7vh;color:var(--mid)}
.tv-qbtn.is-on{background:var(--accent);border-color:var(--accent);color:#2b2005}
.tv-qbtn.is-on span{color:#4a3a10}
.tv-qbtn:focus,.tv-qbtn:hover{outline:.5vh solid var(--primary);outline-offset:.2vh}
.tv-qbtn:focus-visible{outline:.5vh solid var(--primary)}
.tv-qbtn.is-close{flex-direction:row;min-height:5vh;padding:.8vh 1.4vw}
.tv-qactions{display:flex;gap:1vw}
.tv-qactions .tv-qbtn{flex:1;min-height:7vh}
.tv-qbtn.is-play{background:var(--primary);border-color:var(--primary);color:#fff}
.tv-qbtn.is-stop{border-color:#c0392b;color:#c0392b}
.tv-qactions [hidden]{display:none!important}
@media(max-aspect-ratio:4/3){.tv-qgrid.is-surahs{grid-template-columns:repeat(3,minmax(0,1fr))}.tv-qgrid.is-reciters{grid-template-columns:repeat(2,minmax(0,1fr))}}
/* v1.6.33.50 — opening screen, leaves with a fade once the times are ready */
.tv-splash{position:fixed;inset:0;z-index:20;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1.6vh;background:radial-gradient(120% 90% at 50% 0%,var(--mid) 0%,var(--primary) 45%,var(--deep) 100%);color:#fff;transition:opacity .9s ease,visibility 0s linear .9s;animation:tvSplashSafety .9s ease 12s forwards}
.tv-splash.is-out{opacity:0;visibility:hidden}
.tv-splash-logo{width:28vh;height:28vh;margin-bottom:1vh;border-radius:50%;border:.35vh solid var(--accent);display:grid;place-items:center;animation:tvSplashPop 1s ease both}
.tv-splash-logo img{height:18vh;width:auto;filter:brightness(0) invert(1) sepia(.35) saturate(1.6) hue-rotate(5deg)}
.tv-splash-name{font-size:9vh;font-weight:800;line-height:1.1;animation:tvSplashUp .9s .25s ease both}
.tv-splash-tag{font-size:3.6vh;font-weight:700;color:var(--accent);animation:tvSplashUp .9s .4s ease both}
.tv-splash-ayah{margin:2.4vh 0 0;font-size:3vh;line-height:1.8;color:#e7f2ee;text-align:center;display:flex;flex-direction:column;align-items:center;animation:tvSplashUp .9s .8s ease both}
.tv-splash-ayah small{font-size:1.9vh;color:#9fc3b8}
.tv-splash-bar{width:22vw;height:.5vh;border-radius:1vh;background:#ffffff22;overflow:hidden;margin-top:2vh;animation:tvSplashUp .6s 1s ease both}
.tv-splash-bar i{display:block;height:100%;width:40%;border-radius:1vh;background:var(--accent);animation:tvSplashRun 1.4s ease-in-out infinite}
@keyframes tvSplashPop{from{transform:scale(.6);opacity:0}to{transform:none;opacity:1}}
@keyframes tvSplashUp{from{transform:translateY(1.4vh);opacity:0}to{transform:none;opacity:1}}
@keyframes tvSplashRun{0%{transform:translateX(130%)}100%{transform:translateX(-260%)}}
@keyframes tvSplashSafety{to{opacity:0;visibility:hidden}}
@media(prefers-reduced-motion:reduce){.tv-splash *{animation:none!important}}
/* v1.6.33.52 — the footer may never push the page wider than the screen (long reciter / surah names) */
html,body{overflow-x:hidden;max-width:100vw}
.tv{width:100vw;max-width:100vw;overflow:hidden;box-sizing:border-box}
.tv-foot{gap:1vw;min-width:0}
.tv-actions{flex:0 1 auto;min-width:0;max-width:100%}
.tv-now{flex:0 1 auto;min-width:0;max-width:30vw;overflow:hidden;text-overflow:ellipsis}
.tv-actions .tv-sound,.tv-actions .tv-change{min-width:15vw;padding:1vh 1.6vw}
.tv{grid-template-columns:minmax(0,1fr)}.tv>*{min-width:0}

/* v1.6.33.55 — sound menu */
.tv-spanel{width:min(94vw,1100px)}
.tv-qgrid.is-sound{grid-template-columns:repeat(3,minmax(0,1fr))}
.tv-qgrid.is-sound .tv-qbtn{min-height:13vh;padding:1.6vh 1vw}
.tv-qgrid.is-sound .tv-qbtn strong{white-space:normal;font-size:2.8vh;line-height:1.4}
.tv-qgrid.is-sound .tv-qbtn span{font-size:2vh;text-align:center}
@media(max-aspect-ratio:4/3){.tv-qgrid.is-sound{grid-template-columns:minmax(0,1fr)}}
/* v1.6.33.56 — سطر العدّادات: ينكسر بين الأجزاء فقط فلا تبقى الشرطة وحدها في بداية سطر */
.tv-area span i{font-style:normal;white-space:nowrap}

/* v1.6.33.72 — prayer icons above the names (gold; deep green on the highlighted card) */
.tv-card .tv-ico{width:min(8.4vh,5.2vw);height:min(8.4vh,5.2vw);flex:none;color:var(--accent);fill:none;stroke:currentColor;stroke-width:2.8;stroke-linecap:round;stroke-linejoin:round}
.tv-card.is-next .tv-ico{color:var(--deep)}
@media(orientation:portrait){.tv-card .tv-ico{width:min(7vh,9vw);height:min(7vh,9vw)}}

/* v1.6.33.65: theme chooser + dimmer */
.tv-actions .tv-mini{min-width:0;padding:1vh 1.4vw}
#tvDimmer{position:fixed;inset:0;background:#000;opacity:0;pointer-events:none;z-index:9999;transition:opacity .35s ease}
.tv-qgrid.is-themes{grid-template-columns:repeat(3,minmax(0,1fr))}
.tv-qgrid.is-themes .tv-qbtn{min-height:11vh;flex-direction:row;gap:1.2vw;justify-content:flex-start;padding:1.4vh 1.4vw}
.tv-qgrid.is-themes .tv-qbtn strong{font-size:2.6vh;white-space:normal}
.tv-sw{flex:none;display:inline-flex;width:7vh;height:4.6vh;border-radius:1vh;overflow:hidden;border:2px solid #0002}
.tv-sw i{flex:1}
.tv-qgrid.is-themes .tv-qbtn.is-on::after{content:"✓";margin-inline-start:auto;font-size:3vh;font-weight:900}
@media(max-aspect-ratio:4/3){.tv-qgrid.is-themes{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* v1.6.33.72: hidden from the control panel */
.tv-actions .tv-off,.tv-actions button.tv-off{display:none!important}

/* v1.6.33.72: notice card next to the countdown (left of it); the countdown moves right, then returns to the centre */
.tv-hero-main{display:flex;flex-direction:column;align-items:center;justify-content:center;flex:1 1 auto;min-width:0;width:100%}
.tv-hero.has-notice{flex-direction:row;justify-content:space-between;gap:3vw;padding-inline:2.4vw}
.tv-hero.has-notice .tv-hero-main{width:auto;flex:1 1 0}
.tv-hero.has-notice .tv-next{font-size:8vh}
.tv-hero.has-notice .tv-count{font-size:11.5vh}
.tv-hero.has-notice .tv-kicker{font-size:3vh}
.tv-notice-col{flex:0 0 calc(30% * var(--nw,1));align-self:stretch;min-width:0;display:flex;flex-direction:column;align-items:stretch;gap:1.4vh}
.tv-notice-col[hidden]{display:none}
.tv-takbeer{align-self:center;flex:none;font:inherit;font-size:2.6vh;font-weight:800;color:#f3d796;background:var(--deep,#043d35);border:.35vh solid var(--accent,#d7aa5b);border-radius:99px;padding:.9vh 2.6vw;cursor:pointer;white-space:nowrap;box-shadow:0 .8vh 2.4vh #0006}
.tv-takbeer[hidden]{display:none}
.tv-takbeer.is-on{background:var(--accent,#d7aa5b);color:var(--deep,#043d35)}
.tv-takbeer:focus-visible{outline:.5vh solid #fff;outline-offset:.4vh}
.tv-notice{flex:1 1 auto;min-height:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1.2vh;text-align:center;padding:2.6vh 1.6vw;border-radius:2.6vh;background:var(--nbg,#fbf8f1);color:var(--ntx,var(--deep));box-shadow:inset 1.3vh 0 0 var(--nc,var(--accent)),inset -1.3vh 0 0 var(--nc,var(--accent)),0 1vh 3vh #0006;animation:tvNoticeIn .7s cubic-bezier(.2,.8,.2,1)}
.tv-notice[hidden]{display:none}
.tv-hero.has-notice .tv-hero-main{min-width:0}
.tv-notice .tvn-media{font-size:9vh;line-height:1}
/* Uploaded notice icon: always 96x96 px, centred above its title, whatever the source size (512x512 or other) or the screen */
.tv-notice{--tv-icon:96px}
.tv-notice .tvn-media{flex:0 0 auto;display:flex;align-items:center;justify-content:center;margin:0}
.tv-notice .tvn-media img{display:block;flex:none;width:var(--tv-icon);height:var(--tv-icon);min-width:var(--tv-icon);min-height:var(--tv-icon);max-width:none;max-height:none;object-fit:contain;object-position:center;border-radius:1.6vh}
.tv-notice .tvn-title{font-size:5.2vh;font-weight:800;line-height:1.2;overflow-wrap:anywhere}
.tv-notice .tvn-body{font-size:2.7vh;font-weight:700;line-height:1.45;opacity:.82;overflow-wrap:anywhere}
.tv-notice .tvn-body:empty{display:none}
@keyframes tvNoticeIn{from{opacity:0;transform:translateX(-4vw) scale(.96)}to{opacity:1;transform:none}}
@media (orientation:portrait){
 .tv-hero.has-notice{flex-direction:column;gap:2vh;padding-inline:3vw}
 .tv-hero.has-notice .tv-hero-main{width:100%}
 .tv-hero.has-notice .tv-next{font-size:6vh}.tv-hero.has-notice .tv-count{font-size:8vh}
 .tv-notice-col{flex:0 0 auto;width:100%}.tv-takbeer{font-size:2.2vh;padding:.7vh 4vw}
 .tv-notice{flex:0 0 auto;padding:2vh 3vw}
 .tv-notice .tvn-media{font-size:7vh}
 .tv-notice .tvn-title{font-size:3.8vh}.tv-notice .tvn-body{font-size:2.2vh}
}
@media (prefers-reduced-motion:reduce){.tv-notice{animation:none}}

/* v1.6.33.72: portrait screens must still show every card AND the footer buttons, with or without a notice */
@media (orientation:portrait){
 .tv{gap:1.3vh;padding:2.2vh 4vw 1.4vh}
 .tv-top{gap:.8vh}.tv-logo{height:5vh}
 .tv-clock strong{font-size:5.4vh}.tv-clock span{margin-top:.3vh;font-size:1.8vh}
 .tv-hero{padding:2vh 3vw}.tv-next{font-size:6.2vh;margin-top:.2vh}.tv-count{font-size:8.6vh}.tv-sub2{margin-top:.6vh;min-height:0}
 .tv-card{padding:1vh .8vw}.tv-card .tv-ico{width:min(5.2vh,8vw);height:min(5.2vh,8vw)}
 .tv-hero.has-notice{gap:1.4vh}
 .tv-hero.has-notice .tv-kicker{font-size:2.2vh}.tv-hero.has-notice .tv-next{font-size:5vh}.tv-hero.has-notice .tv-count{font-size:7vh}.tv-hero.has-notice .tv-sub2{font-size:1.9vh;margin-top:.3vh}
 .tv-notice{padding:1vh 3vw;gap:.8vh}.tv-notice .tvn-media{font-size:5.6vh}.tv-notice .tvn-title{font-size:3vh;line-height:1.15}.tv-notice .tvn-body{font-size:1.8vh;line-height:1.3}
 .tv-hero.has-notice{gap:1vh;padding-block:1.4vh}
 .tv-hero.has-notice .tv-kicker{font-size:2vh}.tv-hero.has-notice .tv-next{font-size:4.4vh}.tv-hero.has-notice .tv-count{font-size:6.2vh}
}

/* v1.6.33.73 — browser F11 / any 16:9–16:10 desktop window: the screen is sized from the real window (not 100vw/100vh, which can be larger than what is visible),
   fixed line-heights so a wider web font cannot push the footer buttons out, and the countdown card shrinks (never the footer) when space is short */
html,body{width:100%;max-width:100%;height:100%}
.tv{width:100%;max-width:100%;height:100%}
@media (orientation:landscape){
 .tv-kicker,.tv-sub2,.tv-place span,.tv-clock span,.tv-card b,.tv-card .iqama{line-height:1.3}
 .tv-actions button{line-height:1.25}
 .tv{grid-template-rows:auto minmax(0,1fr) auto auto}
 .tv-hero{min-height:0;overflow:hidden;container-type:size}
 .tv-kicker{font-size:min(3.4vh,8.1cqh)}
 .tv-next{font-size:min(11vh,26.5cqh)}
 .tv-count{font-size:min(15vh,35.5cqh)}
 .tv-sub2{font-size:min(3vh,7.1cqh)}
 .tv-hero.has-notice .tv-kicker{font-size:min(3vh,8.5cqh)}
 .tv-hero.has-notice .tv-next{font-size:min(8vh,23.5cqh)}
 .tv-hero.has-notice .tv-count{font-size:min(11.5vh,34cqh)}
}

/* v1.6.33.73 — Eid takbeer button: inside the notice card, on the icon row, left of the icon, centred between the icon and the card's left edge (no more space under the card) */

/* v1.6.33.74 — mosque picker: header row with a close button */
.tv-phead{flex:none}
.tv-phead h2{margin:0}
.tv-phead .tv-qbtn.is-close[hidden]{display:none}
.tv-panel .tv-phead .tv-qbtn.is-close{min-width:14vw}

/* v1.6.33.75 — short landscape screens (phones in landscape, e.g. 858×396): everything is re-proportioned so the fixed 96×96 notice icon, its title and text sit inside the card with even padding,
   and the prayer cards + footer buttons stay fully visible. Text never drops below a readable pixel size. */
@media (orientation:landscape) and (max-height:640px){
 .tv{padding:2vh 3vw 1.4vh;gap:1.4vh}
 .tv-logo{height:7vh}
 .tv-place strong{font-size:max(3.8vh,13px)}.tv-place span{font-size:max(2.3vh,10px)}
 .tv-clock strong{font-size:max(5.6vh,18px)}.tv-clock span{font-size:max(2.1vh,10px);margin-top:.3vh}
 .tv-hero{padding:1vh 2vw}
 .tv-card{padding:1.1vh .6vw;gap:.3vh}
 .tv-card .tv-ico{width:max(20px,min(6vh,4.4vw));height:max(20px,min(6vh,4.4vw))}
 .tv-card b{font-size:max(3.2vh,11px)}
 .tv-card .adhan{font-size:max(4.6vh,14px)}.tv-card.is-sunrise .adhan{font-size:max(4.2vh,13px)}
 .tv-card .iqama{font-size:max(2.4vh,10px)}
 .tv-card.is-next{transform:translateY(-.4vh)}
 .tv-actions .tv-sound,.tv-actions .tv-change{font-size:max(2.4vh,11px);min-height:max(6vh,24px);padding:.5vh 1.4vw}
 .tv-actions .tv-mini{padding:.5vh 1.2vw}
 .tv-hero.has-notice{padding:1vh 2vw}
 .tv-notice{padding:1.2vh 1.4vw;gap:.6vh}
 .tv-notice .tvn-title{font-size:max(4vh,14px);line-height:1.2;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}
 .tv-notice .tvn-body{font-size:max(2.4vh,11px);line-height:1.35;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3;overflow:hidden}
}

.tv-takbeer .tk-i{font-size:1.15em;line-height:1}

/* v1.6.33.75 — portrait screens. TV on its side: the footer buttons wrap and stay on screen. Phones (≤700px wide): sizes follow the screen width so nothing overflows, with readable minimums. */
@media (orientation:portrait){
 .tv-foot{justify-content:center}
 .tv-actions{flex-wrap:wrap;justify-content:center;max-width:100%}
 .tv-actions .tv-sound,.tv-actions .tv-change{min-width:0;font-size:1.7vh;min-height:4.6vh;padding:.7vh 2.6vw}
}
@media (orientation:portrait) and (max-width:700px){
 .tv{padding:max(10px,1.4vh) 4vw max(8px,1vh);gap:max(7px,1vh)}
 .tv-top{gap:.4vh}.tv-logo{height:max(30px,4.4vh)}
 .tv-place strong{font-size:max(min(5.2vw,2.6vh),15px);max-width:72vw}.tv-place span{font-size:max(3.4vw,12px)}
 .tv-clock strong{font-size:max(min(7.6vw,3.6vh),24px)}.tv-clock span{font-size:max(3.2vw,12px);margin-top:.2vh}
 .tv-hero{padding:1vh 3vw}
 .tv-kicker{font-size:max(3.8vw,13px)}.tv-next{font-size:max(min(9.5vw,4.6vh),30px);margin-top:.2vh}.tv-count{font-size:max(min(13.5vw,6.2vh),42px)}.tv-sub2{font-size:max(3.3vw,12px);margin-top:.5vh}
 .tv-hero.has-notice{gap:max(6px,.8vh);padding-block:1vh}
 .tv-hero.has-notice .tv-kicker{font-size:max(3.6vw,13px)}.tv-hero.has-notice .tv-next{font-size:max(min(8.4vw,4vh),28px)}.tv-hero.has-notice .tv-count{font-size:max(min(12vw,5.6vh),38px)}.tv-hero.has-notice .tv-sub2{font-size:max(3.2vw,12px);margin-top:.3vh}
 .tv-notice{padding:max(8px,1vh) 3vw;gap:max(4px,.6vh)}
 .tv-notice .tvn-title{font-size:max(5vw,17px);line-height:1.2;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}
 .tv-notice .tvn-body{font-size:max(3.5vw,13px);line-height:1.35;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3;overflow:hidden}
 .tv-row{gap:max(6px,.8vh) 2vw}
 .tv-card{padding:max(7px,.8vh) .6vw;gap:max(2px,.25vh)}
 .tv-card .tv-ico{width:max(22px,min(7vw,3.2vh));height:max(22px,min(7vw,3.2vh))}
 .tv-card b{font-size:max(3.9vw,13px)}.tv-card .adhan{font-size:max(min(6.2vw,3vh),19px)}.tv-card.is-sunrise .adhan{font-size:max(min(5.6vw,2.8vh),18px)}.tv-card .iqama{font-size:max(2.9vw,11px)}
 .tv-card.is-next{transform:none}
 .tv-actions{gap:max(6px,.8vh) 2vw}
 .tv-actions .tv-sound,.tv-actions .tv-change{font-size:max(3.2vw,12px);min-height:max(4.4vh,36px);padding:.5vh 3vw}
 .tv-actions .tv-mini{padding:.5vh 2.6vw}
}
@media (orientation:portrait) and (min-width:701px){
 .tv{gap:1.1vh;padding:2vh 4vw 1.4vh}
 .tv-top{gap:.6vh}.tv-logo{height:5vh}.tv-place strong{font-size:2.8vh}.tv-place span{font-size:1.8vh}
 .tv-clock strong{font-size:4.4vh}.tv-clock span{font-size:1.6vh;margin-top:.2vh}
 .tv-row{gap:1vh 2vw}
 .tv-card{padding:.9vh .8vw;gap:.2vh}.tv-card .tv-ico{width:min(4.6vh,8vw);height:min(4.6vh,8vw)}
 .tv-card b{font-size:2.1vh}.tv-card .adhan{font-size:3.2vh}.tv-card.is-sunrise .adhan{font-size:3vh}.tv-card .iqama{font-size:1.6vh}
 .tv-card.is-next{transform:none}
 .tv-actions{gap:.8vh 1.6vw}
 .tv-actions .tv-sound,.tv-actions .tv-change{font-size:1.5vh;min-height:4vh;padding:.5vh 2vw}
}

/* v1.6.33.75 — pop-up windows (mosque picker, Quran, sound, theme) on short landscape screens: readable minimum sizes, still inside the screen */
@media (orientation:landscape) and (max-height:640px){
 .tv-panel{padding:2.4vh 2.4vw;gap:1.2vh;max-height:94vh}
 .tv-panel h2{font-size:max(4.6vh,18px)}.tv-panel p{font-size:max(2.4vh,12px)}.tv-crumb{font-size:max(2.6vh,12px)!important}
 .tv-areas{overflow:auto}
 .tv-area{padding:1.2vh 1.2vw}.tv-area strong{font-size:max(3.4vh,14px)}.tv-area span{font-size:max(2.2vh,11px)}
 .tv-qpanel{padding:2vh 2vw;gap:1vh;max-height:96vh}
 .tv-qpanel h3{font-size:max(2.4vh,12px)}
 .tv-qbtn{min-height:max(6vh,32px);padding:.8vh .8vw}.tv-qbtn strong{font-size:max(2.6vh,13px)}.tv-qbtn span{font-size:max(2vh,11px)}
 .tv-qgrid.is-surahs{max-height:34vh}
 .tv-qgrid.is-sound .tv-qbtn,.tv-qgrid.is-themes .tv-qbtn{min-height:max(9vh,42px)}
 .tv-qgrid.is-sound .tv-qbtn strong,.tv-qgrid.is-themes .tv-qbtn strong{font-size:max(2.8vh,13px)}
 .tv-qgrid.is-sound .tv-qbtn span{font-size:max(2vh,11px)}
 .tv-qactions .tv-qbtn{min-height:max(7vh,36px)}
}


/* v1.6.33.75 — notice card: clear breathing room between icon → title → text (spacing is set per screen type) */
.tv-notice{gap:0;--sp1:2.4vh;--sp2:1.4vh}
.tv-notice .tvn-media{margin-bottom:var(--sp1)}
.tv-notice .tvn-title{margin-bottom:var(--sp2)}
.tv-notice .tvn-title:last-child,.tv-notice .tvn-body:empty{margin-bottom:0}
@media (orientation:portrait){.tv-notice{--sp1:1.6vh;--sp2:1vh}}
@media (orientation:landscape) and (max-height:640px){.tv-notice{--sp1:max(7px,1.8vh);--sp2:max(4px,1.1vh)}}
@media (orientation:portrait) and (max-width:700px){.tv-notice{--sp1:max(10px,1.2vh);--sp2:max(6px,.7vh)}}

/* v1.6.33.76 — sources block in the footer, one line under the other (title, adhan, iqama, last update) */
.tv-foot{align-items:flex-end}
#tvSource{flex:1 1 0;min-width:0;display:flex;flex-direction:column;gap:.2vh;font-size:1.7vh;line-height:1.3;opacity:.85}
#tvSource>span{display:block;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#tvSource>span[hidden]{display:none}
#tvSrcT{font-weight:800;opacity:.9}
#tvSource>#tvSrc1,#tvSource>#tvSrc2{white-space:normal;overflow-wrap:anywhere}
@media (orientation:landscape) and (max-height:640px){#tvSource{font-size:max(1.7vh,9px);line-height:1.2;gap:0}}
@media (orientation:portrait) and (min-width:701px){.tv-foot{gap:2vw}#tvSource{flex:0 0 34%;max-width:34%;font-size:1.5vh}.tv-actions{flex:1 1 0;justify-content:flex-end}}
@media (orientation:portrait) and (max-width:700px){.tv-foot{flex-direction:column;align-items:stretch;gap:max(5px,.6vh)}#tvSource{flex:none;font-size:max(2.7vw,10px);line-height:1.2;gap:0;align-items:center;text-align:center}.tv-actions{width:100%}
 .tv-notice .tvn-body{-webkit-line-clamp:2}}

/* v1.6.33.76 — tighter spacing where the sources block makes the footer taller */
@media (orientation:landscape) and (max-height:640px){.tv{gap:1.2vh}.tv-notice{padding:1vh 1.4vw}}
@media (orientation:portrait) and (min-width:701px){.tv{gap:.9vh}.tv-notice{--sp1:1.3vh;--sp2:.9vh}#tvSource{font-size:1.4vh}}
@media (orientation:portrait) and (max-width:700px){.tv-row{gap:5px 2vw}.tv-card{padding:max(5px,.6vh) .6vw}.tv-notice{padding:max(6px,.8vh) 3vw;--sp1:max(8px,1vh);--sp2:max(5px,.6vh)}.tv-hero{padding-block:.8vh}}
@media (orientation:landscape) and (max-height:380px){.tv-notice .tvn-body{-webkit-line-clamp:2}}

/* v1.6.33.76 — Eid takbeer button: last item inside the notice card, centred under the text (keeps the card, the screen layout and the footer buttons exactly as they were) */
.tv-notice{--sp3:2.2vh}
.tv-notice .tv-takbeer{flex:none;align-self:center;margin:var(--sp3) 0 0;line-height:1.25;white-space:nowrap;padding:.8vh 2.2vw;font-size:2.4vh;display:flex;align-items:center;justify-content:center;gap:.35em;min-height:5.2vh}
@media (orientation:portrait){.tv-notice{--sp3:1.3vh}.tv-notice .tv-takbeer{font-size:2vh;padding:.6vh 4vw;min-height:4.4vh}}
@media (orientation:landscape) and (max-height:640px){.tv-notice{--sp3:max(6px,1.5vh)}.tv-notice .tv-takbeer{font-size:max(2.3vh,11px);padding:.4vh 1.4vw;min-height:max(4.8vh,24px)}}
@media (orientation:portrait) and (max-width:700px){.tv-notice{--sp3:max(7px,.9vh)}.tv-notice .tv-takbeer{font-size:max(3.3vw,12px);padding:.3vh 4vw;min-height:32px}}
.tv-notice .tv-takbeer[hidden]{display:none}
/* v1.6.33.76 — medium-height landscape screens (≈ 641–920px): slightly tighter card so icon, title, text and the takbeer button always fit inside it */
@media (orientation:landscape) and (min-height:641px){
 .tv-notice{padding:1.6vh 1.6vw;--sp1:1.8vh;--sp2:1vh;--sp3:1.6vh}
 .tv-notice .tvn-title{font-size:4.6vh}
 .tv-notice .tvn-body{font-size:2.4vh;line-height:1.4}
 .tv-notice .tv-takbeer{font-size:2.2vh;padding:.5vh 2vw;min-height:4.6vh}
}

/* v1.6.33.76 — notice icon: one proportional size for every logo, scaled with the screen so it sits in proportion to the title, text and card frame
   (≈78px on a 1080p TV, 52px on 720p, never below 44px or above 84px). Every gap in the card is a fraction of the icon size, so the card stays harmonious on any screen. */
.tv-notice{--tv-icon:clamp(44px,7.2vh,84px);--sp1:calc(var(--tv-icon) * .26);--sp2:calc(var(--tv-icon) * .15);--sp3:calc(var(--tv-icon) * .3)}
@media (orientation:portrait){.tv-notice{--tv-icon:clamp(44px,4.4vh,76px)}}
.tv-notice .tvn-media{font-size:calc(var(--tv-icon) * .92)}
.tv-notice .tvn-media img{border-radius:calc(var(--tv-icon) * .22)}
@media (orientation:portrait) and (min-width:701px){
 .tv-notice{padding:1.1vh 3vw}
 .tv-notice .tvn-title{font-size:2.8vh;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}
 .tv-notice .tvn-body{font-size:1.7vh;line-height:1.3;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}
 .tv-notice .tv-takbeer{min-height:3.8vh;padding:.4vh 4vw}
}


/* v1.6.33.77 — pop-ups can always be scrolled on phones: the dark layer scrolls, the Quran window grows to its content and the Play/Stop buttons stay pinned at the bottom */
.tv-overlay{overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;align-items:flex-start}
.tv-overlay>.tv-panel{margin:auto}
@supports(height:100dvh){.tv-overlay{inset:0 0 auto 0;height:100dvh}}
@media (max-width:900px),(max-height:640px){
 .tv-qpanel{max-height:none;overflow:visible}
 .tv-qpanel .tv-qgrid.is-surahs{max-height:none;overflow:visible}
 .tv-qpanel .tv-qactions{position:sticky;bottom:0;z-index:2;background:var(--page);padding:max(6px,1vh) 0;margin-top:auto;box-shadow:0 -10px 12px -10px #0003}
 .tv-overlay{padding:max(8px,2vh) max(8px,2.4vw)}
}
/* v1.6.33.77 — phone, portrait: footer buttons in neat equal rows (Quran full width, the rest two per row; a single last button fills its row) */
@media (orientation:portrait) and (max-width:700px){
 .tv-actions{display:flex;flex-wrap:wrap;justify-content:stretch;gap:max(5px,.6vh) max(8px,2.4vw)}
 .tv-actions>.tv-sound,.tv-actions>.tv-change{flex:1 1 calc(50% - max(8px,2.4vw));min-width:0;white-space:normal;line-height:1.25;text-align:center;min-height:max(4.4vh,36px);padding:.4vh 2vw;font-size:max(3.3vw,12.5px)}
 /* sources under the buttons: line 1 = sources on one line, line 2 = last update */
 .tv-actions{order:1}
 #tvSource{order:2;display:flex;flex-direction:row;flex-wrap:wrap;justify-content:center;align-items:baseline;gap:0 .55em;font-size:max(2.9vw,10px);line-height:1.3;opacity:.85;text-align:center}
 #tvSource>span{overflow:visible;text-overflow:clip;min-width:0}
 #tvSource>#tvSrc3{flex:0 0 100%}
}


@media (orientation:portrait) and (max-width:700px) and (max-height:800px){
 .tv{gap:max(4px,.55vh)}
 .tv-actions>.tv-sound,.tv-actions>.tv-change{min-height:34px}
 .tv-hero.has-notice{padding-block:.6vh}
}

/* v1.6.33.77 — Arabic letters with dots above (ش ث ت ق …): where text is clipped (line clamp / ellipsis) keep room above the line so the top dot is never cut. Padding and negative margin cancel out, so the layout does not move. */
.tv-notice .tvn-title,.tv-notice .tvn-body,.tv-place strong,.tv-qbtn strong,#tvSource>span,.tv-now{padding-top:.24em;margin-top:-.24em}

/* v1.6.33.78 — «آخر تحديث … - إلى موقع أوّاب»: the link to the main site sits on the last-update line */
#tvSrc3 #tvHome{color:var(--accent);font-weight:800;text-decoration:underline;text-underline-offset:.25em;padding:.5em .3em;margin:-.5em -.3em;cursor:pointer}
#tvSrc3 #tvHome:focus-visible,#tvSrc3 #tvHome:hover{color:#fff;outline:0}
@media (pointer:none){#tvSrc3 #tvHome,#tvSrc3 #tvSep{display:none}}
#tvSource>#tvSrc3{white-space:nowrap;overflow:visible;text-overflow:clip}

/* Touch layout on narrow portrait screens. Desktop and TV use the existing layout. */
@media (orientation:portrait) and (max-width:700px){
  html,body{overflow-y:auto}
  .tv{height:auto;min-height:100%;grid-template-rows:auto auto auto auto;align-content:start}
  .tv-foot{gap:9px}
  .tv-actions{
    --tv-btn-gap:8px;
    align-items:stretch;
    gap:var(--tv-btn-gap);
    padding:8px;
    border:1px solid #ffffff24;
    border-radius:18px;
    background:#001b1726;
  }
  .tv-actions>button.tv-sound,.tv-actions>button.tv-change{
    flex:1 1 calc((100% - var(--tv-btn-gap)) / 2);
    min-width:0;
    min-height:44px;
    padding:5px 6px;
    border-radius:12px;
    border-width:1px;
    font-size:clamp(13px,3.55vw,16px);
    line-height:1.25;
    white-space:normal;
    text-wrap:balance;
  }
  .tv-actions>#tvUseLocation{
    color:#fff;
    background:#ffffff12;
    border-color:#ffffff55;
  }
  .tv-actions>button:focus-visible{
    outline:2px solid #fff;
    outline-offset:2px;
  }
  .tv-foot>.tv-now{
    order:0;
    display:block;
    flex:none;
    width:100%;
    max-width:none;
    margin:0;
    padding:7px 10px;
    border:1px solid #ffffff24;
    border-radius:12px;
    background:#001b1726;
    text-align:center;
    font-size:clamp(12px,3.4vw,15px);
    line-height:1.4;
    white-space:normal;
    overflow-wrap:anywhere;
    text-wrap:balance;
  }
  .tv-foot>.tv-now[hidden]{display:none}
}

/* Compact phone typography for playback notices and settings panels. */
@media (orientation:portrait) and (max-width:700px){
  .tv-actions>button.tv-sound,.tv-actions>button.tv-change{
    font-size:clamp(12px,3.2vw,14px);
    min-height:44px;
  }
  .tv-foot>.tv-now{
    font-size:clamp(12px,3.1vw,14px);
    padding:6px 10px;
  }
  .tv-toast{
    top:calc(10px + env(safe-area-inset-top, 0px));
    bottom:auto;
    width:max-content;
    max-width:min(90vw,360px);
    padding:7px 13px;
    border-width:1px;
    border-radius:12px;
    font-size:clamp(12px,3.3vw,14px);
    line-height:1.35;
    text-align:center;
    overflow-wrap:anywhere;
    pointer-events:none;
  }
  .tv-overlay>.tv-panel{
    width:min(94vw,520px);
    gap:10px;
    padding:14px;
    border-radius:18px;
  }
  .tv-panel .tv-qhead{gap:8px}
  .tv-panel h2{
    min-width:0;
    font-size:clamp(18px,4.6vw,22px);
    line-height:1.3;
    text-wrap:balance;
  }
  .tv-panel p{font-size:13px;line-height:1.45}
  .tv-panel .tv-crumb{
    font-size:13px!important;
    line-height:1.5;
    overflow-wrap:anywhere;
  }
  .tv-panel .tv-qhead .tv-qbtn.is-close{
    flex:none;
    min-width:0;
    min-height:40px;
    padding:4px 8px;
    border-radius:10px;
  }
  .tv-panel .tv-qbtn.is-close strong{font-size:13px}
  #tvPickUseLocation{
    min-height:42px;
    border-radius:11px;
    font-size:14px;
    padding:5px 10px;
  }
  .tv-areas,.tv-qgrid{gap:7px;padding:3px}
  .tv-area{
    min-height:56px;
    min-width:0;
    justify-content:center;
    padding:8px;
    border-radius:11px;
  }
  .tv-area strong{
    font-size:clamp(14px,3.7vw,16px);
    line-height:1.35;
    overflow-wrap:anywhere;
    text-wrap:balance;
  }
  .tv-area span{font-size:12px;line-height:1.4}
  .tv-qpanel h3{font-size:14px;margin:0 0 4px}
  .tv-qpanel .tv-qbtn{min-height:42px;padding:6px 7px;border-radius:11px}
  .tv-qpanel .tv-qbtn strong{
    font-size:clamp(13px,3.4vw,15px);
    line-height:1.35;
    white-space:normal;
    overflow-wrap:anywhere;
  }
  .tv-qpanel .tv-qbtn span{
    font-size:12px;
    line-height:1.35;
    overflow-wrap:anywhere;
  }
  .tv-qgrid.is-themes .tv-qbtn,
  .tv-qgrid.is-sound .tv-qbtn{min-height:54px;padding:8px 10px}
  .tv-qgrid.is-themes .tv-qbtn strong,
  .tv-qgrid.is-sound .tv-qbtn strong{font-size:clamp(14px,3.8vw,17px)}
  .tv-qgrid.is-sound .tv-qbtn span{font-size:12px}
  .tv-qactions .tv-qbtn{min-height:44px}
}
