/* Landscape monitor layout: scale with the screen's viewport, including 1080p/1440p/4K. */
@media (min-width:1000px) and (min-height:600px){
 html,body{height:100%;margin:0}body{height:100dvh;display:grid;grid-template-rows:auto minmax(0,1fr) auto;overflow:hidden;font-size:clamp(14px,1.65vh,28px)}
 header,.screen header{padding:2.2vh 2.5vw;gap:1.5vw}header h1{font-size:clamp(25px,3.2vh,52px);margin-bottom:.7vh}.seal{width:7vh;height:7vh;font-size:2.5vh}.brand{gap:1.2vw}.date{font-size:1.6vh;line-height:1.6}#hdate{font-size:2.6vh}#clock{font-size:5.8vh}#clock span{font-size:2vh}small,.eyebrow{font-size:1.15vh;letter-spacing:.13em}
 main{min-height:0;width:100%;max-width:none;margin:0;padding:1.5vh 2.5vw 0;display:flex;flex-direction:column;gap:1.2vh}.toolbar{flex:none;gap:.5vw;margin:0}.tabs button,button{font-size:1.4vh;padding:.85vh .8vw}.actions{gap:.5vw}.live{font-size:1.2vh;letter-spacing:.13em}.notice{flex:none;margin:0;padding:.9vh 1vw;font-size:1.3vh}
 .layout{flex:1;min-height:0;grid-template-columns:1.7fr 1fr;gap:1.4vw}.layout>div{min-height:0;display:flex;flex-direction:column;gap:1.5vh}.layout>div>section{flex:1;min-height:0;display:flex;flex-direction:column}.panel{border-radius:1vh}.panelhead{flex:none;padding:1.4vh 1.3vw}.panelhead h2{font-size:2.6vh}.he{font-size:2.7vh}
 .prayers{flex:1;min-height:0;align-items:center}.prayer{height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:1vh .8vw}.icon{font-size:2.8vh;height:auto;margin-bottom:.6vh}.prayer .he{font-size:3.2vh}.prayer h3{font-size:3.2vh;margin:.7vh 0}.sub{font-size:1.35vh}.prayer .time{font-size:5.3vh;margin:1.4vh 0 .3vh;line-height:1.1}.time em{font-size:1.65vh}.prayer .service-note{font-size:1.35vh;line-height:1.4;margin:.5vh 0}.prayer .service-note:empty{display:none}.prayer .empty{font-size:1.65vh;margin-top:2.5vh;line-height:1.6;max-width:90%}
 .next{flex:none;padding:1.5vh 1.3vw}.next strong{font-size:2.9vh;margin-top:.6vh}.next b{font-size:4vh}
 .bottom{flex:0 0 37%;min-height:0;margin:0;gap:1.4vw;grid-template-columns:1.1fr 1fr}.bottom>.panel{min-height:0;display:flex;flex-direction:column}.bottom .panelhead{padding:1.15vh 1.2vw}.bottom .panelhead h2{font-size:2.4vh}.bottom .he{font-size:2.4vh}.content{padding:1vh 1.2vw;font-size:1.55vh;line-height:1.55}.bottom .content{min-height:0}.content p{margin:.5vh 0}#shabbat>.he{margin-bottom:.5vh!important}#shabbat .zrow{padding:.35vh 0;gap:.6vw}#shabbat .zrow span{font-size:1.5vh}#shabbat .zrow strong{font-size:1.9vh}#shabbat .zrow small{display:inline;font-size:1vh;margin-left:.4vw;letter-spacing:0}.hint,#shabbat .hint{font-size:1.15vh;line-height:1.4}#notes{font-size:1.6vh;line-height:1.65}
 .layout>section{min-height:0;display:flex;flex-direction:column}.zlist{flex:1;min-height:0;padding:0 1.3vw;display:flex;flex-direction:column;justify-content:space-evenly}.zrow{flex:1;padding:.4vh 0;gap:1vw}.zrow .heb{font-size:2.35vh}.zrow strong{font-size:2.8vh}.zrow small{font-size:1.05vh;margin-top:.35vh;letter-spacing:.03em}#status{flex:none;padding:1vh 1.3vw;font-size:1.15vh}
 footer{padding:1vh 2.5vw;font-size:1.1vh;line-height:1.4}.screen .actions,.screen footer{display:none}.screen .toolbar{justify-content:space-between}
 /* Settings stay independently scrollable without moving the display board. */
 dialog{font-size:16px}dialog small{font-size:12px}dialog button{font-size:15px;padding:10px 15px}dialog .hint{font-size:12px}
}
@media (min-width:1000px) and (min-height:600px){
 .bottom{flex-basis:39%}#shabbat .hint{display:none}#shabbat .zrow{padding:.45vh 0;line-height:1.1}#shabbat .zrow small{display:none}#shabbat .zrow span{font-size:1.45vh}#shabbat .zrow strong{font-size:1.9vh}#notes{font-size:1.45vh;line-height:1.5}
}
@media (min-width:1000px) and (min-height:600px){
 .prayer{min-height:0}.prayer:has(.time ~ .time) .icon,.prayer:has(.time ~ .time) .sub{display:none}.prayer:has(.time ~ .time) .time{font-size:4.5vh;margin:.7vh 0 .2vh}.prayer:has(.time ~ .time) h3{font-size:2.8vh;margin:.4vh 0}.prayer:has(.time ~ .time) .he{font-size:2.8vh}.prayer:has(.time ~ .time) .service-note{font-size:1.2vh;margin:.3vh 0}
}
/* Large television: one viewport, generous edge clearance and readable from a distance. */
@media (min-width:1000px) and (min-height:600px){
 body{grid-template-rows:auto minmax(0,1fr);padding:1.2vh 1vw 1.8vh}
 header,.screen header{padding:1.4vh 1.5vw}header h1{font-size:3.6vh}#clock{font-size:6.6vh}#hdate{font-size:3vh}.date{font-size:1.8vh}.seal{width:7.5vh;height:7.5vh}
 main{padding:1vh 1.5vw 0;gap:1vh}.notice,footer{display:none}.toolbar{min-height:4vh}.live{font-size:1.4vh}.tabs button,button{font-size:1.65vh;padding:.7vh .7vw}
 .layout{grid-template-columns:1.65fr 1fr;gap:1.2vw}.layout>div{gap:1.2vh}.panelhead{padding:1.1vh 1.2vw}.panelhead h2{font-size:3vh}.panelhead small{font-size:1.25vh}.he{font-size:3vh}
 .prayer .icon{display:none}.prayer .he{font-size:3.8vh}.prayer h3{font-size:3.5vh}.prayer .sub{font-size:1.6vh}.prayer .time{font-size:7vh;margin:1.6vh 0 .5vh}.prayer .time em{font-size:2vh}.prayer .empty{font-size:2vh;line-height:1.35}.prayer .service-note{font-size:1.6vh;line-height:1.3}.prayer:has(.time ~ .time) .time{font-size:5.6vh;margin:.7vh 0}.prayer:has(.time ~ .time) .service-note{font-size:1.5vh}
 .next{padding:1.2vh 1.2vw}.next strong{font-size:3.1vh}.next b{font-size:4.5vh}.next small{font-size:1.4vh}
 .bottom{flex-basis:39%;grid-template-columns:1.15fr 1fr;gap:1.2vw}.bottom .panelhead{padding:1vh 1vw}.bottom .panelhead h2{font-size:2.7vh}.bottom .panelhead .he{font-size:2.5vh}.bottom .content{padding:1vh 1vw}#shabbat>.he{font-size:2.6vh}#shabbat .zrow{padding:.65vh 0;line-height:1.2}#shabbat .zrow span{font-size:1.8vh}#shabbat .zrow strong{font-size:2.3vh}#notes{font-size:1.8vh;line-height:1.5}
 .zrow .heb{font-size:2.7vh}.zrow strong{font-size:3.2vh}.zrow small{font-size:1.15vh}#status{font-size:1.2vh;padding:.8vh 1.2vw}
}
@media (min-width:1000px) and (min-height:600px){#shabbat .zrow{padding:.4vh 0;line-height:1.1}#shabbat .zrow strong{font-size:2.2vh}}
/* Phone and tablet layout: natural scrolling, no horizontal overflow. */
@media(max-width:999px){
 html,body{width:100%;height:auto;overflow-x:hidden}body{font-size:16px}
 header,.screen header{padding:20px 16px;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:18px 10px}.brand{gap:10px;min-width:0}.seal{width:44px;height:44px;flex-shrink:0;font-size:16px}header h1{font-size:clamp(17px,4.5vw,25px);line-height:1.25;margin-bottom:6px}.brand small{font-size:9px;letter-spacing:.7px;line-height:1.5;display:block}.clock{align-self:start}#clock{font-size:clamp(23px,5.5vw,34px);white-space:nowrap}#clock span{font-size:12px}.clock>small{font-size:8px;letter-spacing:.3px}.date{grid-column:1/-1;order:unset;width:100%;font-size:14px;line-height:1.6}#hdate{font-size:23px}
 main{padding:16px 12px}.toolbar{display:flex;flex-direction:column;align-items:stretch;gap:12px;margin-bottom:16px}.live{text-align:center;font-size:10px}.tabs{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:2px}.tabs button{padding:12px 2px;font-size:12px;min-height:44px;white-space:nowrap}.actions{display:grid;grid-template-columns:1fr 1fr;gap:8px}.actions button{min-height:44px;padding:10px 5px;font-size:13px}.notice{font-size:12px;padding:12px;line-height:1.5}
 .layout{display:flex;flex-direction:column;gap:16px}.layout>div{display:contents}.layout>div>section{order:0}.layout>section{order:1}.bottom{order:2;display:grid;grid-template-columns:1fr;gap:16px;margin-top:0}.panel{min-width:0;border-radius:10px}.panelhead{padding:16px}.panelhead h2{font-size:24px}.panelhead small{font-size:10px;letter-spacing:1px}.panelhead .he{font-size:23px}.prayers{display:flex;flex-direction:column;min-height:0}.prayer{width:100%;padding:18px 16px;border-right:0;border-bottom:1px solid var(--line);display:grid;grid-template-columns:1fr 1fr;gap:6px 12px;text-align:left;align-items:center}.prayer:last-child{border-bottom:0}.prayer .icon{display:none}.prayer .he{grid-column:1;font-size:25px}.prayer h3{grid-column:1;font-size:23px;margin:0}.prayer .sub{grid-column:1;font-size:12px}.prayer .time{grid-column:2;font-size:36px;margin:4px 0;text-align:right;line-height:1.15}.prayer .time em{font-size:13px}.prayer .empty{grid-column:2;grid-row:1/4;margin:0;font-size:14px;line-height:1.6;text-align:right}.prayer .service-note{grid-column:1/-1;font-size:13px;margin:4px 0;line-height:1.5}.prayer .service-note:empty{display:none}.next{padding:16px;gap:10px}.next strong{font-size:22px;line-height:1.3}.next b{font-size:27px}.zlist{padding:4px 16px}.zrow{padding:13px 0;gap:10px}.zrow .heb{font-size:22px}.zrow strong{font-size:23px;white-space:nowrap}.zrow small{font-size:10px;line-height:1.5;letter-spacing:.3px}.content{padding:16px;font-size:15px;line-height:1.7}#shabbat .zrow span{font-size:14px}#shabbat .zrow strong{font-size:22px}#notes{overflow-wrap:anywhere}footer{padding:20px 16px;font-size:11px;line-height:1.6;display:block}footer span{display:block;margin-bottom:8px}dialog{padding:20px 16px;width:calc(100% - 24px);max-height:90dvh}dialog .fields{grid-template-columns:1fr}dialog button{min-height:44px}input,textarea,select{font-size:16px}button{touch-action:manipulation}.screen .actions{display:grid}.screen footer{display:block}
}
@media(max-width:380px){header,.screen header{grid-template-columns:1fr}.clock{text-align:center}.clock>small{display:none}.date{grid-column:1}.brand{justify-content:center}.prayer .time{font-size:32px}.tabs button{font-size:11px}}
