@font-face{font-family:Hind Siliguri;src:url(fonts/HindSiliguri-Regular.ttf)}
:root{color-scheme:dark;font-family:"Hind Siliguri",sans-serif;background:#052820;color:#fff8e7}
*{box-sizing:border-box}body{margin:0}
main{min-height:100vh;background:radial-gradient(ellipse at top right,#11624c,#052820 65%);padding:clamp(14px,3vw,48px)}
main:fullscreen{overflow:auto}
.tv-header{display:flex;align-items:center;gap:16px;border-bottom:1px solid #c39b50;padding:0 0 14px}
.tv-header h1{margin:0;font-size:clamp(1.45rem,4vw,4rem);line-height:1.15}
.tv-header span, time, h2, h3{color:#f3cd82}
time{margin-left:auto;font-size:clamp(1rem,3vw,3rem);white-space:nowrap;text-align:right}
nav{display:flex;flex-wrap:wrap;gap:8px;margin:16px 0}
button{font:inherit;padding:8px 13px;border:1px solid #ccaa64;border-radius:8px;color:#fff8e7;background:#103f33;cursor:pointer}
button:focus-visible,button[aria-pressed=true]{outline:2px solid #ffe3ac;background:#f0cc81;color:#082d23}
section h2{font-size:clamp(1.35rem,3vw,3.25rem);margin:12px 0}
section p{font-size:clamp(1rem,2vw,2.15rem);white-space:pre-line;overflow-wrap:anywhere}
.tv-times{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,155px),1fr));gap:12px}
article{background:#103d32;border:1px solid #a48b52;border-radius:12px;padding:16px;margin-bottom:8px}
article h3,article p{margin:0}.tv-times strong,.countdown{font-size:clamp(2rem,7vw,7rem);line-height:1.17}
video{width:min(100%,1200px);max-height:61vh;background:#000}

.tv-header {
    position: relative;
    isolation: isolate;
    min-height: clamp(115px,16vw,230px);
    padding: clamp(12px,2.5vw,34px);
    border: 1px solid #c39b50;
    border-radius: 18px;
    overflow: hidden;
    background: #052e23;
}
.tv-banner {
    position: absolute;
    z-index: -2;
    inset: 0 0 0 auto;
    width: 72%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 58%;
}
.tv-header::after {
    content: "";
    position: absolute;
    z-index: -1;
    inset: 0;
    background: linear-gradient(90deg,#052e23 12%,#052e23dd 42%,#052e2355 75%,#052e23ba);
}
.tv-logo { width: clamp(42px,7vw,88px); height: auto; border-radius: 12px; }
.tv-header h1 { overflow-wrap: anywhere; }
#tv-clock {
    background: #052e23e8;
    padding: 6px 12px;
    border: 1px solid #c39b50;
    border-radius: 10px;
}
#tv-content {
    border: 1px solid #a48b52;
    border-radius: 18px;
    padding: clamp(13px,2vw,28px);
    background: #0b3026;
}
#tv-content[data-view="next"], #tv-content[data-view="video"] { text-align: center; }
.countdown {
    display: inline-block;
    padding: 9px 18px;
    color: #f9d581;
    border-radius: 15px;
    background: #052219;
    border: 1px solid #c39b50;
    font-variant-numeric: tabular-nums;
}
.tv-times article {
    background: linear-gradient(145deg,#194d3c,#10372b);
    border-top: 3px solid #d1ab5f;
}
.tv-times strong { font-size: clamp(1.75rem,4vw,4.7rem); }
@media (max-width:600px) {
    .tv-header { flex-wrap: wrap; gap: 10px; }
    #tv-clock { margin-left: 0; }
}

#masjid-tv{padding:clamp(8px,1.7vw,24px);background:radial-gradient(at 88% 14%,#0f654d,#03291f 62%)}
.tv-header{min-height:auto;padding:9px 16px;background:#053a29;border-radius:12px}
.tv-header .tv-banner{display:none}
.tv-header h1{font-size:clamp(1.15rem,3.1vw,3.2rem)}
.tv-logo{width:clamp(34px,5vw,72px)}
#tv-clock{font-size:clamp(.85rem,2.3vw,2.3rem)}
#tv-scene{position:relative;display:grid;grid-template-columns:minmax(0, .85fr) minmax(0,1.3fr);min-height:clamp(280px,37vw,64vh);border:1px solid #c5a650;border-radius:16px;overflow:hidden;background:#064332 url(art/emerald-wave.svg) center bottom/100% 30% no-repeat}
.tv-scenery{position:relative;min-height:180px;overflow:hidden}
.tv-scenery img{width:100%;height:100%;object-fit:cover;position:absolute;inset:0}
.tv-scenery::after{content:"";position:absolute;inset:auto 0 0;height:30%;background:url(art/emerald-wave.svg) center bottom/100% 100%}
.tv-scenery span{display:none}
#tv-content{margin:clamp(8px,1.2vw,20px);padding:clamp(8px,1.6vw,22px);background:#f7fff8;color:#0b3026;overflow-wrap:anywhere;min-width:0}
#tv-content h2,#tv-content h3{color:#104435}
#tv-content h2{margin-top:0}
.tv-prayer-table{width:100%;border-collapse:collapse;text-align:center;font-size:clamp(1rem,2.4vw,2.4rem)}
.tv-prayer-table th{background:#075344;color:#fff9df}
.tv-prayer-table td,.tv-prayer-table th{padding:.2em .35em;border-bottom:1px solid #c9ddd1}
.tv-prayer-table tr:nth-child(even){background:#e9f4ed}
#masjid-tv[data-view="next"] #tv-content{background:linear-gradient(140deg,#06543b,#08362a);color:white}
#masjid-tv[data-view="next"] #tv-content h2{color:#f8d677}
#masjid-tv[data-view="next"] .countdown{color:#fff3b9}
#masjid-tv[data-view="ramadan"] #tv-scene{background-color:#063346}
#masjid-tv[data-view="ramadan"] .tv-scenery span{display:block;position:absolute;color:#ffdf85;font-size:clamp(38px,9vw,125px);top:0;left:8%;text-shadow:0 0 26px #ffe097;z-index:1}
.tv-ramadan-times article{background:#065342;color:white}
.tv-ramadan-times article:nth-child(2){background:#76124b}
#tv-content .tv-ramadan-times h3{color:white}
#masjid-tv[data-view="notices"] #tv-content article{background:#e8f4ed;border-color:#c7dbcc}
.tv-donation-image{display:block;max-width:min(75%,240px);max-height:33vh;object-fit:contain;background:white;padding:8px}
.tv-embedded nav{display:none}
@media(max-width:560px){#tv-scene{grid-template-columns:minmax(0,1fr)}.tv-scenery{min-height:105px}}

#tv-scene::after {
    content: "";
    position: absolute;
    inset: 0;
    background: url("art/tv-frame.svg") center / 100% 100% no-repeat;
    pointer-events: none;
}
.tv-scenery img { object-position: 54% center; }
.tv-scenery::after { background: linear-gradient(0deg,#042c22,transparent); }
#tv-content { position: relative; z-index: 1; box-shadow: 0 8px 22px #011d19a6; }
#tv-content .module-icon, #masjid-tv nav .module-icon {
    width: 1.4em;
    height: 1.4em;
    object-fit: contain;
    vertical-align: middle;
    margin-inline-end: .28em;
}
#masjid-tv[data-view="ramadan"] #tv-scene {
    background: radial-gradient(ellipse at 24% 16%,#13556b,#092f42 62%,#041e2b);
}
#masjid-tv[data-view="ramadan"] .tv-scenery img { filter: brightness(.59) saturate(.85); }
#masjid-tv[data-view="ramadan"] .tv-scenery span { top: 6%; z-index: 1; }
#masjid-tv[data-view="donation"] #tv-content { background: linear-gradient(145deg,#fff,#fff2ce); }

/* Distinct screen compositions for the five published TV modes. */
.tv-local-time { display: none; }
#masjid-tv[data-view="prayers"] .tv-local-time {
    position: absolute;
    z-index: 1;
    display: grid;
    bottom: 9%;
    left: 8%;
    width: 84%;
    padding: .45rem;
    text-align: center;
    background: #003a29f2;
    border: 1px solid #f9d992;
    border-radius: 15px;
}
.tv-local-time strong { font-size: clamp(1.65rem,4.5vw,5rem); line-height: 1.15; }
.tv-local-time small { color: #fff2b5; }
#masjid-tv[data-view="next"] #tv-scene { grid-template-columns: minmax(0,1fr) minmax(0,1.45fr); }
#masjid-tv[data-view="next"] #tv-content {
    align-self: center;
    background: url("art/royal-lantern.svg") right 4% top / auto 52% no-repeat,
                radial-gradient(ellipse at 50% 5%,#0d7451,#053425 78%);
    text-align: center;
    border-color: #efd88d;
}
#masjid-tv[data-view="next"] #tv-content h3 { font-size: clamp(1.4rem,4vw,4rem); margin: .2em 0; color: white; }
.tv-countdown-units { display: block; color: #fff3c6; }
.tv-next-details { margin: .5em 0 0; color: #fff7dc; }
#masjid-tv[data-view="ramadan"] #tv-scene { grid-template-columns: 1fr; grid-template-rows: minmax(210px,36vh) auto; }
#masjid-tv[data-view="ramadan"] .tv-scenery img { object-position: center 57%; }
#masjid-tv[data-view="ramadan"] #tv-content {
    margin-top: -2.3rem;
    background: #032d25;
    border-color: #f0ce74;
}
#masjid-tv[data-view="ramadan"] #tv-content h2 { color: #fff1ab; }
.tv-ramadan-times article { border: 1px solid #ffdf89; box-shadow: inset 0 0 19px #ffffff20; }
#masjid-tv[data-view="notices"] #tv-scene { grid-template-columns: minmax(0,.62fr) minmax(0,1.65fr); }
#masjid-tv[data-view="notices"] #tv-content h2 { background: #073e30; color: white; border-radius: 9px; padding: .24em .5em; }
#masjid-tv[data-view="notices"] #tv-content .tv-lead-notice { background: #e8f4ed; border-inline-start: 5px solid #d3a34c; }
#masjid-tv[data-view="donation"] #tv-scene { grid-template-columns: minmax(0,1fr) minmax(0,1.55fr); }
#masjid-tv[data-view="donation"] #tv-content { border-bottom: 8px solid #eac36a; }
.tv-campaign { display: flex; flex-wrap: wrap; align-items: start; gap: .8rem; }
.tv-campaign p { flex: 1 1 12rem; margin: 0; }
.tv-campaign img { border: 1px solid #dac48b; border-radius: 12px; }
@media (max-width:560px) {
    #masjid-tv[data-view] #tv-scene { grid-template-columns: minmax(0,1fr); }
    #masjid-tv[data-view="prayers"] .tv-local-time { bottom: 5%; }
}

/* Emerald and gold contrast for distance viewing. */
#masjid-tv { background: radial-gradient(ellipse at 85% 15%,#006140,#00291e 65%); }
.tv-header { box-shadow: inset 0 1px #e8c76a66,0 3px 8px #00150e80; }
#tv-scene { border-color: #f0ce76; box-shadow: 0 4px 12px #00140ec7; }
.tv-scenery img { object-position: 50% center; }
#tv-content {
    border-color: #efdc97;
    box-shadow: inset 0 1px #fffdf2,0 4px 0 #013a2677,0 5px 13px #001f188c;
}
.tv-prayer-table th { background: linear-gradient(#097044,#004b2f); }
.tv-prayer-table td { border-inline-end: 1px solid #cadbd1; }
.tv-prayer-table tbody tr:nth-child(even) { background: #f0f8f3; }
.tv-local-time { box-shadow: inset 0 0 15px #2fc5826b,0 4px 11px #00241999; }
#masjid-tv[data-view="next"] #tv-content h2 {
    width: fit-content;
    margin-inline: auto;
    padding: .12em .7em;
    border-radius: 30px;
    background: linear-gradient(#fff0a4,#dca438);
    color: #144531;
}
#masjid-tv[data-view="ramadan"] #tv-content { background: linear-gradient(135deg,#004525,#002d3a); }
.tv-ramadan-times article { background: linear-gradient(145deg,#08784a,#004327); }
.tv-ramadan-times article:nth-of-type(2) { background: linear-gradient(145deg,#a42372,#64133f); }
#masjid-tv[data-view="ramadan"] .tv-scenery {
    background: radial-gradient(ellipse at 18% 25%,#15666c,#03292e 55%,#051d29);
}
#masjid-tv[data-view="ramadan"] .tv-scenery img {
    inset: 0 0 0 auto;
    width: 62%;
    object-position: 50% 65%;
    filter: brightness(.82) saturate(1.18);
    mask-image: linear-gradient(90deg,transparent,#000 25%);
}
#masjid-tv[data-view="ramadan"] .tv-scenery span {
    left: 17%;
    top: 14%;
    color: #fff2a7;
    text-shadow: 0 0 24px #facb68;
}
#masjid-tv[data-view="ramadan"] .tv-ramadan-times article { text-align: center; }

#masjid-tv > nav {
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(115px,1fr));
    gap:8px;
}
#masjid-tv > nav button {
    min-width:0;
    min-height:44px;
    display:flex;
    justify-content:center;
    align-items:center;
    gap:.4em;
    padding:7px 5px;
    line-height:1.25;
    text-align:center;
}
#masjid-tv > nav img { flex:none; }
@media (max-width:600px) {
    #masjid-tv > nav { grid-template-columns:repeat(2,minmax(0,1fr)); }
    #masjid-tv > nav #tv-fullscreen { grid-column:1 / -1; }
}
