/* ===== WALL DISPLAY (iPad / desktop): the whole board on one screen, no scrolling =====
   Loaded after styles.css. js/home.js sets html font-size so everything fits (binary search),
   so every size below is in rem/em. Phone (<=700px wide) or very short windows scroll normally. */
.he-only{display:none}
@media (min-width:701px) and (min-height:560px){
  html,body{height:100%;overflow:hidden}
  html:has(body.home){background:var(--wine)}
  /* the sports ticker owns a fixed strip at the very bottom edge; the board fills the rest exactly as before.
     When the ticker is hidden (offline, no games, outside its hours) the strip simply stays empty. */
  body.home{--tk-fs:clamp(15px,min(2vh,2.1vw),19px);--tk-inset:calc(env(safe-area-inset-bottom, 0px) * .3);--tk-h:calc(var(--tk-fs) * 2.2 + var(--tk-inset));
    box-sizing:border-box;padding-bottom:var(--tk-h);display:flex;flex-direction:column;height:100vh;height:100dvh;font-size:1rem;line-height:1.35}
  .home .skip{display:none}
  .home .site-header{flex:none;border-bottom-width:.15rem;padding-top:env(safe-area-inset-top)}
  /* header: logo + title on the left, vertically centered in the bar; nav tucked to the right */
  .home .hdr-in{max-width:none;padding:.22rem 1rem;display:flex;flex-wrap:nowrap;justify-content:space-between;align-items:center;gap:.4rem 1rem}
  .home .brand{font-size:1.6rem;gap:.6rem;letter-spacing:.03em;align-items:center;line-height:1}
  .home .brand-name{display:block;line-height:1;padding-top:.12em}
  .home .brand-mark{width:2.55rem;height:2.55rem;border-radius:.4rem;flex:none}
  .home .site-header nav{min-width:0}
  .home .site-header nav ul{flex-wrap:wrap;justify-content:flex-end;gap:0 1rem}
  .home .site-header nav a{font-size:.8rem;padding:.05rem 0;white-space:nowrap}

  .home main{flex:1 1 auto;min-height:0;max-width:none;width:100%;margin:0;padding:.4rem .75rem .25rem;display:flex;flex-direction:column}
  .home .topbar{flex:none;flex-wrap:nowrap;align-items:center;padding:0 .15rem .35rem;margin:0 0 .4rem;gap:1rem}
  .home .clock{font-size:3.5rem;line-height:.95;white-space:nowrap;font-weight:400;letter-spacing:0}
  .home .clock .ampm{font-size:.38em}
  .home .today{font-size:1.05rem;margin-top:.25rem;white-space:nowrap}
  .home .parsha-he{font-size:2.5rem;line-height:1.05}
  .home .parsha-en{font-size:1.2rem}
  .home .shabbos-date{font-size:.92rem}

  .home .board{flex:1 1 auto;min-height:0;display:grid;gap:.5rem;align-items:stretch;
    grid-template-columns:minmax(0,1.12fr) minmax(0,1fr);
    grid-template-rows:auto auto minmax(0,1fr);
    grid-template-areas:"times daf" "times up" "ann ann"}
  .home .board > .card{min-height:0;min-width:0;overflow:hidden;padding:.5rem .85rem .5rem;border-radius:.7rem}
  .home .times{grid-area:times}
  .home .daf{grid-area:daf}
  .home .upcoming{grid-area:up;grid-column:auto}
  .home .ann{grid-area:ann}
  .home .card-h{font-size:.74rem;margin:0 0 .3rem;padding-bottom:.3rem;letter-spacing:.18em}

  .home .z{padding:.36rem 0;gap:.6rem}
  .home .z-label{font-size:1.25rem}
  .home .z-label small{font-size:.86rem;margin-top:.05rem}
  .home .z-time{font-size:2rem}
  .home .z-minor .z-label{font-size:1.1rem}
  .home .z-minor .z-time{font-size:1.55rem}
  .home .specials{font-size:.92rem;padding:.3rem .55rem;margin-bottom:.25rem}
  .home .times-note{font-size:.88rem;margin-top:.3rem}

  /* Daf Yomi as one line, like the old display */
  .home .daf-row{display:flex;align-items:baseline;justify-content:space-between;gap:.4rem .8rem;flex-wrap:wrap}
  .home .daf-he{font-size:1.9rem;margin:0;text-align:right;line-height:1.15}
  .home .daf-en{font-size:1.05rem;margin:0;text-align:left}

  .home .up{flex-direction:row;flex-wrap:wrap;justify-content:space-between;align-items:baseline;gap:0 .6rem;padding:.2rem 0 .2rem .55rem;margin-bottom:.22rem;border-left-width:.18rem}
  .home .up-name{font-size:1.02rem}
  .home .up-date{font-size:.9rem;white-space:nowrap}
  .home .up-list{display:block}
  .home .up:nth-child(n){display:flex}

  .home .ann-list{display:grid;gap:.5rem .9rem;grid-template-columns:repeat(auto-fit,minmax(min(100%,19rem),1fr));align-items:start}
  .home .ann-item{padding:.1rem 0 .4rem}
  .home .ann-item h3{font-size:1.28rem}
  .home .ann-item p{font-size:1rem;margin-top:.15rem;line-height:1.3}
  .home .ann-permanent{padding:.55rem .8rem;border-radius:.55rem}
  .home .ann-permanent h3{font-size:1.4rem}
  .home .ann-dedic{font-size:1.15rem;margin:0 0 .15rem}

  /* nonessential on the wall: slim dedication line at the very bottom, long footer hidden */
  .home .dedication-strip{flex:none;margin:.3rem 0 0}
  .home .dedication-strip a{padding:.25rem .5rem;gap:0 .8rem}
  .home .dedication-strip .he{font-size:.95rem}
  .home .dedication-strip .ds-en{font-size:.8rem}
  .home .dedication-strip .ds-more{display:none}
  .home .site-footer{display:none}
  .home .ticker,.home .ticker[hidden]{display:block;position:fixed;left:0;right:0;bottom:0;z-index:5;font-size:var(--tk-fs);height:var(--tk-h);
    padding-bottom:var(--tk-inset);margin:0;box-sizing:border-box;border-top-width:2px;border-bottom:0}
  .home .ticker[hidden] .ticker-track{visibility:hidden}
  .home .ticker-track{height:calc(var(--tk-fs) * 2.2)}
}
/* landscape: wider than tall, give the board three columns' worth of room */
@media (min-width:701px) and (min-height:560px) and (orientation:landscape){
  .home .board{grid-template-columns:minmax(0,1fr) minmax(0,1.05fr)}
  .home .up-name{flex:1 1 auto}
}
/* a short desktop window or landscape phone: normal scrolling page, two columns */
@media (min-width:701px) and (max-height:559px){
  .board{grid-template-columns:1fr 1fr}
  .daf-row{display:flex;justify-content:space-between;align-items:baseline;gap:.5rem 1rem;flex-wrap:wrap}
}
@media (max-width:700px){
  .daf-row{display:block}
}

/* Oct 23 color test (Henry): every time number in the header's dark brown, labels stay black, title in gold */
.home .brand-name{color:var(--gold)}
.home .clock,.home .clock .ampm{color:var(--wine)}
.home .z-time,.home .z-minor .z-time,.home .z-time .ampm{color:var(--wine)}
.home .parsha-he,.home .parsha-en{color:var(--wine)}
.home .daf-he,.home .daf-en{color:var(--wine)}
.home .z-label,.home .z-minor .z-label,.home .up-name{color:#1a130e}
