:root{
  --gold:#e6d28f;
  --gold-light:#f5e6b3;
  --gold-dark:#8b6914;
  --gold-wood:#6f5033;
}

html,body{
  margin:0;
  padding:0;
  height:100%;
  width:100%;
}

body{
  font-family:"Frank Ruhl Libre",Arial,sans-serif;
  color:#fff;
  background:
    radial-gradient(1200px 600px at 50% -10%, #183e5e 0%, rgba(24,62,94,0) 70%),
    linear-gradient(180deg,#0c2132,#0b1b2a 40%,#0a1a29);
  overflow:hidden;
}

/* ============================
   FULL SCREEN MAIN BOARD
   ============================ */
.board{
  width:100vw;
  height:100vh;
  display:flex;
  flex-direction:column;
  gap:1.8vh;
  padding:1.5vh 1.5vw;
  box-sizing:border-box;
  position:relative;   /* for clock */
}

/* Main content + bottom bar: main takes ~80%, bottom ~20% */
.board-main{
  flex:1;
  min-height:0;
  display:flex;
  flex-direction:column;
  gap:1.8vh;
}
.board-bottom{
  flex:0 0 18%;
  min-height:12.6vh;
  max-height:19.8vh;
  display:flex;
  flex-direction:row;
  gap:1vw;
  padding:0 0 0.5vh 0;
  box-sizing:border-box;
}

/* ============================
   PASSOVER TEMP LAYOUT
   Active via .board.passover-layout class from script.js
   ============================ */
.board.passover-layout .board-main{
  position:relative;
  gap:1.8vh;
}
.board.passover-layout .columns{
  position:relative;
  grid-template-columns:1fr 1fr 1fr 1fr;
  column-gap:1vw;
}
.board.passover-layout .columns > .panel-wrap{
  position:relative;
  z-index:3;
}
.board.passover-layout .columns > .panel-wrap:first-child{
  grid-column:1;
}
.board.passover-layout .columns > .panel-wrap:last-child{
  grid-column:4;
}
.board.passover-layout .middle-wrapper{
  position:absolute;
  top:0.8vh;
  bottom:-19vh;
  left:22%;
  right:22%;
  margin-top:0;
  z-index:2;
  min-height:0;
  grid-column:auto;
}
.board.passover-layout .framed{
  margin-top:0;
}
.board.passover-layout .columns.pdf-mode .middle-wrapper{
  position:absolute;
  top:0.8vh;
  bottom:-19vh;
  left:22%;
  right:22%;
  grid-column:auto;
  height:auto;
  min-height:0;
  align-self:stretch;
}
.board.passover-layout .columns.pdf-mode .pdf-container{
  overflow:hidden;
}
.board.passover-layout .columns.pdf-mode .pdf-container img{
  position:absolute;
  top:50%;
  left:50%;
  transform:translate(-50%, -50%);
  max-width:94%;
  max-height:94%;
  width:auto;
  height:auto;
  object-fit:contain;
}
.board.passover-layout .board-bottom{
  display:grid;
  grid-template-columns:1fr 2.4fr 1fr;
  gap:1vw;
  align-items:stretch;
}
.board.passover-layout #sub-schedule,
.board.passover-layout #sub-mazal-tov{
  display:none;
}
.board.passover-layout #sub-announcements{
  grid-column:1;
}
.board.passover-layout #sub-community{
  grid-column:3;
}

/* ============================
   SEFIRAT HA’OMER – TOP LEFT
   ============================ */
.omer-frame{
  position:absolute;
  top:1.2vh;
  left:1.5vw;
  z-index:5;
  max-width:min(42vw, 520px);
  padding:1vh 2vw;
  border-radius:1.6vh;
  border:0.28vh solid #d4b66a;
  box-shadow:
    0 0.6vh 1.8vh rgba(0,0,0,0.45),
    inset 0 0 0.3vh rgba(0,0,0,0.6);
  background:
    radial-gradient(circle at 70% 0%, rgba(255,255,255,0.10), transparent 60%),
    linear-gradient(145deg,#1b2838,#0c1722);
}
.omer-frame[hidden]{
  display:none !important;
}
.omer-inner{
  text-align:right;
  color:#f5f4e6;
}
.omer-title{
  font-weight:800;
  font-size:clamp(22px,3.2vh,40px);
  color:var(--gold);
  text-shadow:0 0.15vh 0.4vh rgba(0,0,0,0.5);
  margin-bottom:0.5vh;
  letter-spacing:0.02em;
}
.omer-line{
  display:flex;
  flex-direction:row;
  justify-content:flex-start;
  align-items:baseline;
  gap:0.35em;
  flex-wrap:wrap;
  font-size:clamp(18px,2.6vh,34px);
  line-height:1.35;
  margin-top:0.25vh;
  text-shadow:0 0 0.25vh rgba(255,255,200,0.35);
}
/* `hidden` alone loses to `display:flex` above in some browsers */
.omer-line[hidden]{
  display:none !important;
}
.omer-k{
  font-weight:600;
  color:#d7e7ff;
  flex-shrink:0;
}
.omer-v{
  font-weight:700;
  color:#f5f4e6;
}
/* ============================
   DIGITAL CLOCK – TOP RIGHT
   ============================ */
.clock-frame{
  position:absolute;
  top:1.2vh;
  right:1.5vw;
  z-index:5;

  padding:1.2vh 2.4vw;       /* larger */
  border-radius:1.6vh;
  border:0.28vh solid #d4b66a;

  box-shadow:
    0 0.6vh 1.8vh rgba(0,0,0,0.45),   /* softer */
    inset 0 0 0.3vh rgba(0,0,0,0.6);

  background:
    radial-gradient(circle at 30% 0%, rgba(255,255,255,0.10), transparent 60%),
    linear-gradient(145deg,#1b2838,#0c1722);
}

.clock-display{
  font-family:"Frank Ruhl Libre", monospace;
  font-size:clamp(32px,4.4vh,52px);   /* larger */
  letter-spacing:0.10em;
  color:#f5f4e6;

  text-shadow:
    0 0 0.3vh rgba(255,255,200,0.45),
    0 0 0.6vh rgba(255,255,200,0.40);  /* less glow */

  direction:ltr;
  unicode-bidi:embed;
  text-align:left;
}

/* ============================
   HEADER
   ============================ */
header{
  text-align:center;
  margin-top:0.3vh;
  flex-shrink:0;
}

header h1{
  margin:0 0 0.4vh 0;
  font-weight:800;
  color:var(--gold);
  text-shadow:0 0.3vh 0.3vh #4b351f,0 0.6vh 1.8vh rgba(0,0,0,.4);
  font-size:clamp(60px,8.4vh,120px);  /* enlarged */
}

header h2{
  margin:0;
  font-weight:600;
  color:#d7e7ff;
  font-style:italic;
  font-size:clamp(26px,3.8vh,40px);   /* enlarged */
}

/* ============================
   4-COLUMN GRID (option B)
   ============================ */
.columns{
  display:grid;
  grid-template-columns:480fr 520fr 520fr 480fr;
  grid-template-rows:1fr;
  column-gap:2vw;
  flex:1;
  min-height:0;
  margin-top:-1.8vh;
}

/* When image is shown: side panels same width as no-image (480fr), middle takes rest */
.columns.pdf-mode{
  grid-template-columns:480fr 1040fr 480fr;
}
.columns.pdf-mode .middle-wrapper{
  grid-column:2;
  height:100%;
  min-height:0;
  margin-top:0;
  align-self:stretch;
}

/* ============================
   BLUE PANEL WRAPPER
   ============================ */
.panel-wrap{
  display:flex;
  flex-direction:column;
  align-items:stretch;
  width:100%;
  min-height:0;   /* allow shrink in grid so content doesn't bleed */
}

/* Panel Title */
.panel-title{
  color:var(--gold);
  text-align:center;
  font-weight:800;
  font-size:clamp(38px,4.8vh,58px);
  margin:0 0 0.5vh 0;
  text-shadow:0 0.2vh 0 #4b351f,0 0.6vh 1.2vh rgba(0,0,0,.5);
  width:96%;
  align-self:center;
}

.panel-date{
  text-align:center;
  color:#f2f7ff;
  font-size:clamp(16px,2.2vh,22px);
  margin:-0.2vh 0 1.2vh 0;
  text-shadow:0 0.1vh 0 rgba(0,0,0,.6);
}

/* ============================
   OUTER BLUE PANELS
   ============================ */
.panel{
  position:relative;
  background:linear-gradient(180deg,#12324d,#102b42);
  border:0.3vh solid #6f5033;
  border-radius:1.2vh;
  padding:4vh 2vh 1.6vh 2vh;
  box-shadow:
    inset 0 0 0 0.1vh rgba(255,255,255,.06),
    0 1.8vh 4vh rgba(0,0,0,.55);
  box-sizing:border-box;
  overflow:hidden;
  min-height:0;
}

.panel.outer{
  flex:1;
  width:100%;
  max-height:100%;   /* fill column; height limited by board-main */
}

/* ============================
   ZMANIM LISTS
   ============================ */
.zman-section{margin-bottom:1.4vh;}
.zman-list{display:flex;flex-direction:column;gap:0.5vh;}

.zman-row{
  display:grid;
  grid-template-columns:1fr auto;
  gap:0.6vh;
  font-size:clamp(18px,2.4vh,28px);
  align-items:center;
}

.zman-label{text-align:right;}
.zman-label-note{
  font-size:0.82em;
}
.zman-row.tzeis-option{
  font-size:clamp(16px,2.1vh,24px);
}
.zman-row.tzeis-option .zman-label{
  padding-right:1.1em;
}

/* Top panel density tweaks (applied to זמני התפילה panel) */
.columns > .panel-wrap:first-child .panel{
  padding:3.2vh 1.6vh 1.2vh 1.6vh;
}
.columns > .panel-wrap:first-child .panel-date{
  margin:-0.2vh 0 0.55vh 0;
  font-size:clamp(14px,1.8vh,19px);
}
.columns > .panel-wrap:first-child .zman-list{
  gap:0.28vh;
}
.columns > .panel-wrap:first-child .zman-row{
  font-size:clamp(17px,2.1vh,25px);
  gap:0.35vh;
}
.columns > .panel-wrap:first-child .zman-row.tzeis-option{
  font-size:clamp(16px,1.95vh,23px);
}
.columns > .panel-wrap:first-child .zman-time{
  min-width:3.6em;
}

/* Right panel (זמני היום): keep rows compact so all lines stay inside panel */
.columns > .panel-wrap:last-child .zman-row{
  font-size:clamp(16px,2.05vh,24px);
}
.columns > .panel-wrap:last-child .zman-row.tzeis-option{
  font-size:clamp(14px,1.85vh,21px);
}
.columns > .panel-wrap:last-child .zman-time{
  font-size:1em;
}

/* RTL: first column = visually right panel (זמני התפילה).
   Holiday weeks (ParshaHebrew is a Yom Tov label): keep panel background, hide all text.
   Timed schedule-image override (announcement-mode): hide zmanim and show the PNG. */
.columns > .panel-wrap:first-child .panel.tefillah-blank-mode .parsha-title,
.columns > .panel-wrap:first-child .panel.tefillah-blank-mode .holiday-row,
.columns > .panel-wrap:first-child .panel.tefillah-blank-mode .section-caption,
.columns > .panel-wrap:first-child .panel.tefillah-blank-mode .zman-section,
.columns > .panel-wrap:first-child .panel.tefillah-blank-mode .shabbos-summer-morning-note,
.columns > .panel-wrap:first-child .panel.tefillah-blank-mode .tefillah-announcement,
.columns > .panel-wrap:first-child .panel.announcement-mode .parsha-title,
.columns > .panel-wrap:first-child .panel.announcement-mode .holiday-row,
.columns > .panel-wrap:first-child .panel.announcement-mode .section-caption,
.columns > .panel-wrap:first-child .panel.announcement-mode .zman-section,
.columns > .panel-wrap:first-child .panel.announcement-mode .shabbos-summer-morning-note{
  display:none !important;
}
.columns > .panel-wrap:first-child .panel.announcement-mode{
  display:flex;
  flex-direction:column;
  border:none;
  border-radius:0;
  box-shadow:none;
  background:transparent;
  padding:0;
}
.columns > .panel-wrap:first-child.tefillah-schedule-image .panel-title{
  display:none !important;
}
.columns > .panel-wrap:first-child .panel-title.announcement-heading{
  direction:rtl;
}
.tefillah-announcement{
  display:none;
  margin:0;
  padding:0;
  height:100%;
  min-height:0;
  color:#0f2233;
  direction:rtl;
  text-align:center;
}
.columns > .panel-wrap:first-child .panel.announcement-mode .tefillah-announcement{
  display:flex;
  align-items:stretch;
  justify-content:stretch;
  flex:1 1 auto;
  min-height:0;
  width:100%;
  height:100%;
}

/* Rosh Hashanah schedule — HTML (no logo), fills right column */
.rh-schedule{
  display:flex;
  flex-direction:column;
  justify-content:flex-start;
  width:100%;
  height:100%;
  min-height:0;
  box-sizing:border-box;
  padding:1.2vh 0.7vh 1vh;
  background:#f7f4ec;
  border:0.18vh solid #1a4a6e;
  border-radius:0.8vh;
  color:#0a1628;
  overflow:hidden;
}
.rh-schedule-fast-only{
  padding-top:1.6vh;
}
.rh-schedule-fast-only .rh-fast-title{
  margin:0 0 1vh;
  font-size:clamp(22px,3.1vh,36px);
}
.rh-schedule-fast-only .rh-fast{
  flex:0 0 auto;
}
.rh-schedule-fast-only .rh-fast thead th{
  font-size:clamp(12px,1.6vh,18px);
  padding:0.75vh 0.2vh;
}
.rh-schedule-fast-only .rh-fast td{
  padding:0.9vh 0.2vh;
}
.rh-schedule-fast-only .rh-fast .rh-primary{
  font-size:clamp(15px,2.1vh,24px);
}
.rh-schedule-title{
  margin:0 0 1vh;
  font-size:clamp(22px,3.1vh,36px);
  font-weight:800;
  line-height:1.15;
  color:#0a1628;
}
.rh-main,
.rh-fast{
  width:100%;
  border-collapse:collapse;
  table-layout:fixed;
}
.rh-main th,
.rh-main td,
.rh-fast th,
.rh-fast td{
  border:1px solid #1a1a1a;
  vertical-align:top;
  text-align:center;
  padding:0.55vh 0.25vh;
}
.rh-main thead th{
  font-size:clamp(11px,1.55vh,17px);
  font-weight:800;
  line-height:1.2;
  padding:0.55vh 0.2vh 0.65vh;
}
.rh-day{
  display:block;
}
.rh-date{
  display:block;
  margin-top:0.25vh;
  font-family:Georgia, "Times New Roman", serif;
  font-style:italic;
  font-weight:500;
  font-size:0.86em;
  direction:ltr;
  unicode-bidi:isolate;
}
/* Labels sit outside the boxed 3-day grid (closes the open top-right corner). */
.rh-corner,
.rh-main tbody .rh-row-label{
  width:15%;
  background:transparent;
  border:none !important;
  box-shadow:none;
  padding:0.55vh 0.35vh 0.45vh 0.15vh;
}
.rh-row-label{
  font-size:clamp(12px,1.7vh,18px);
  font-weight:800;
  line-height:1.25;
}
.rh-row-label .rh-row-sub{
  display:block;
  font-size:0.78em;
  font-weight:600;
  margin-top:0.2vh;
}
.rh-primary{
  font-size:clamp(15px,2.15vh,24px);
  font-weight:800;
  line-height:1.15;
  direction:ltr;
  unicode-bidi:isolate;
}
.rh-sub{
  margin-top:0.25vh;
  font-size:clamp(11px,1.45vh,16px);
  font-weight:600;
  line-height:1.2;
  direction:ltr;
  unicode-bidi:isolate;
}
/* Secondary lines under times */
.rh-note{
  margin-top:0.15vh;
  font-size:clamp(8px,1.05vh,12px);
  font-weight:600;
  line-height:1.12;
}
.rh-note-en{
  font-family:Georgia, "Times New Roman", serif;
  font-style:italic;
  font-size:clamp(7.5px,0.95vh,11px);
  direction:ltr;
  unicode-bidi:isolate;
}
/* Shachris secondary lines a bit smaller */
.rh-main tbody tr:first-child .rh-sub,
.rh-main tbody tr:first-child .rh-note{
  font-size:clamp(8px,1.05vh,12px);
}
.rh-main tbody tr:first-child .rh-note-en{
  font-size:clamp(7.5px,0.95vh,11px);
}
.rh-dash{
  margin-top:0.35vh;
  font-size:clamp(12px,1.5vh,16px);
  font-weight:600;
  color:#555;
}
.rh-fast-title{
  margin:1.1vh 0 0.7vh;
  font-size:clamp(18px,2.5vh,28px);
  font-weight:800;
  line-height:1.1;
}
.rh-fast thead th{
  font-size:clamp(10px,1.35vh,15px);
  font-weight:800;
  line-height:1.2;
  padding:0.55vh 0.15vh;
}
.rh-fast td{
  padding:0.7vh 0.15vh;
  vertical-align:middle;
}
.rh-fast .rh-primary{
  font-size:clamp(13px,1.85vh,20px);
}

/* Sukkot schedule — high-contrast, fills right column */
.sukkot-schedule{
  justify-content:stretch;
  gap:0.35vh;
  padding:0.45vh 0.4vh 0.4vh;
  background:#fff;
  color:#000;
  border:0.65vh solid #6f5033;
  border-radius:0;
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
  text-rendering:geometricPrecision;
}
.sukkot-schedule .rh-schedule-title{
  margin:0;
  font-size:clamp(20px,2.7vh,32px);
  color:#000;
  white-space:nowrap;
  letter-spacing:0.01em;
}
.sukkot-schedule .sukkot-grid{
  flex:1.1 1 0;
  min-height:0;
  height:auto;
}
.sukkot-schedule .rh-main th,
.sukkot-schedule .rh-main td{
  border:2px solid #000;
  vertical-align:middle;
  padding:0.18vh 0.08vh;
}
.sukkot-schedule .rh-main thead th{
  font-size:clamp(11px,1.5vh,17px);
  padding:0.22vh 0.08vh 0.28vh;
  color:#000;
}
.sukkot-schedule .rh-date{
  font-size:0.8em;
  color:#111;
}
.sukkot-schedule .rh-corner,
.sukkot-schedule .rh-main tbody .rh-row-label{
  border:none !important;
  padding:0.15vh 0.2vh 0.15vh 0.04vh;
  color:#000;
}
.sukkot-schedule .rh-row-label{
  font-size:clamp(11px,1.55vh,18px);
}
.sukkot-schedule .rh-row-label .rh-row-sub{
  font-size:0.76em;
}
.sukkot-schedule .rh-primary{
  font-size:clamp(15px,2.2vh,26px);
  font-variant-numeric:tabular-nums;
  color:#000;
}
.sukkot-schedule .sukkot-after-shkiah{
  font-size:clamp(12px,1.55vh,18px);
  white-space:nowrap;
}
.sukkot-schedule .rh-sub,
.sukkot-schedule .rh-note,
.sukkot-schedule .rh-main tbody tr:first-child .rh-sub,
.sukkot-schedule .rh-main tbody tr:first-child .rh-note{
  font-size:clamp(10px,1.25vh,14px);
  font-weight:700;
  color:#000;
  white-space:nowrap;
}
.sukkot-chol{
  width:100%;
  flex:0.75 1 0;
  min-height:0;
  height:auto;
  border-collapse:collapse;
  table-layout:fixed;
}
.sukkot-chol th,
.sukkot-chol td{
  border:2px solid #000;
  text-align:center;
  vertical-align:middle;
  padding:0.18vh 0.08vh;
  color:#000;
}
.sukkot-chol thead th{
  font-size:clamp(12px,1.6vh,18px);
  font-weight:800;
  text-decoration:underline;
  text-underline-offset:0.18vh;
}
.sukkot-chol tbody th{
  font-size:clamp(12px,1.5vh,17px);
  font-weight:700;
  font-family:Georgia, "Times New Roman", serif;
  font-style:italic;
  direction:ltr;
  unicode-bidi:isolate;
  white-space:nowrap;
}
.sukkot-chol .rh-primary{
  font-size:clamp(14px,2vh,24px);
}

/* Yom Kippur schedule — two stacked day tables, no logo */
.yk-schedule{
  justify-content:flex-start;
  gap:0.55vh;
  padding:0.7vh 0.55vh 0.55vh;
}
.yk-schedule .rh-schedule-title{
  margin:0 0 0.2vh;
  font-size:clamp(18px,2.5vh,30px);
  white-space:nowrap;
}
.yk-block{
  display:flex;
  flex-direction:column;
  flex:1 1 0;
  min-height:0;
}
.yk-block-title{
  margin:0;
  font-size:clamp(16px,2.2vh,26px);
  font-weight:800;
  line-height:1.15;
  text-align:center;
  text-decoration:underline;
  text-underline-offset:0.28vh;
}
.yk-block-date{
  display:block;
  margin:0.08vh 0 0.28vh;
  font-family:Georgia, "Times New Roman", serif;
  font-style:italic;
  font-weight:500;
  font-size:clamp(11px,1.4vh,16px);
  text-align:center;
  direction:ltr;
  unicode-bidi:isolate;
}
.yk-times{
  width:100%;
  height:100%;
  border-collapse:collapse;
  table-layout:fixed;
}
.yk-times th,
.yk-times td{
  border:1px solid #1a1a1a;
  vertical-align:middle;
  padding:0.32vh 0.5vh;
}
.yk-times th{
  width:54%;
  text-align:right;
  font-size:clamp(13px,1.85vh,21px);
  font-weight:800;
  line-height:1.2;
}
.yk-times td{
  width:46%;
  text-align:center;
}
.yk-times .rh-primary{
  font-size:clamp(16px,2.25vh,26px);
}
.yk-times .rh-row-sub{
  display:block;
  font-size:0.86em;
  font-weight:700;
  margin-top:0.15vh;
}
.yk-times tr.yk-emphasis th{
  font-size:clamp(14px,2vh,23px);
}
.yk-times tr.yk-emphasis .rh-primary{
  font-size:clamp(17px,2.45vh,28px);
}
.yk-note{
  display:inline-block;
  font-size:clamp(12px,1.55vh,18px);
  font-weight:800;
  line-height:1.15;
  direction:ltr;
  unicode-bidi:isolate;
}

/* Shabbos HaGadol: דרשה row + following Mincha row */
.columns > .panel-wrap:first-child .zman-row.shabbos-hagadol-emphasis .zman-label,
.columns > .panel-wrap:first-child .zman-row.shabbos-hagadol-emphasis .zman-time{
  color:#fff;
  font-weight:800;
}

/* Class rows (e.g., שיעור, Pirkei Avos): differentiate from tefillah rows */
.columns > .panel-wrap:first-child .zman-row.class-highlight-row .zman-label,
.columns > .panel-wrap:first-child .zman-row.class-highlight-row .zman-time{
  color:#8fd6ff;
}

/* Summer Shabbos morning: earlier שחרית / שוכן עד */
.columns > .panel-wrap:first-child .zman-row.summer-morning-tefillah .zman-label,
.columns > .panel-wrap:first-child .zman-row.summer-morning-tefillah .zman-time{
  color:#ffe082;
  font-weight:800;
}
.columns > .panel-wrap:first-child .panel.outer.has-summer-morning-note{
  padding-bottom:2.6vh;
}
.columns > .panel-wrap:first-child .panel.outer .shabbos-summer-morning-note{
  position:absolute;
  bottom:0.45vh;
  left:1vh;
  margin:0;
  padding:0;
  color:#ffe082;
  font-size:clamp(9px,1.05vh,12px);
  line-height:1;
  font-weight:600;
  direction:ltr;
  text-align:left;
  white-space:nowrap;
  z-index:2;
  pointer-events:none;
}
.columns > .panel-wrap:first-child .panel.outer .shabbos-summer-morning-note[hidden]{
  display:none;
}
.columns > .panel-wrap:first-child .zman-label-note{
  font-size:0.72em;
  white-space:nowrap;
}

.zman-time{
  direction:ltr;
  min-width:4em;
  font-size:1.1em;
  font-variant-numeric:tabular-nums;
  font-weight:700;
}

/* ============================
   LEFT BLUE PANEL INNER TITLES
   ============================ */
.parsha-title{
  text-align:center;
  color:#f6ecd0;
  font-size:clamp(30px,4vh,52px);
  font-weight:800;
  margin:-0.4vh 0 1.2vh 0;
  text-shadow:0 0.3vh 0.3vh rgba(0,0,0,.6);
  white-space:nowrap;
}

.holiday-row{
  text-align:center;
  color:#f2f7ff;
  font-size:clamp(18px,2.2vh,24px);
  font-weight:600;
  margin:0 0 1.2vh 0;
  text-shadow:0 0.1vh 0 rgba(0,0,0,.6);
}
.holiday-row[aria-hidden="true"]{
  display:none;
}

.section-caption{
  text-align:center;
  color:#f6ecd0;
  font-size:clamp(18px,2.6vh,26px);
  font-weight:700;
  margin:0.2vh 0 0.5vh 0;
  text-shadow:0 0.2vh 0.2vh rgba(0,0,0,.5);
}

.section-divider{
  height:0.2vh;
  margin:0.5vh 0 0.8vh 0;
  background:linear-gradient(to left,rgba(0,0,0,0),rgba(230,210,143,0.9),rgba(0,0,0,0));
}

/* ============================
   SCREWS
   ============================ */
.screw{
  position:absolute;
  width:2.2vh;height:2.2vh;border-radius:50%;
  background:radial-gradient(circle at 30% 30%,#fff 0%,#e3e3e3 22%,#aaa 50%,#5a5a5a 80%,#222 100%);
  border:0.1vh solid #111;
  box-shadow:
    inset 0 0.2vh 0.4vh rgba(0,0,0,.5),
    inset 0 -0.2vh 0.2vh rgba(255,255,255,.3),
    0 0.2vh 0.6vh rgba(0,0,0,.7);
}

.screw::after{
  content:"";
  position:absolute;
  top:50%;left:50%;
  width:1.4vh;height:0.2vh;
  transform:translate(-50%,-50%) rotate(var(--rot,0deg));
  background:linear-gradient(180deg,#111,#444);
}

.screw.tl{top:1vh;right:1vh;--rot:5deg;}
.screw.tr{top:1vh;left:1vh;--rot:-12deg;}
.screw.bl{bottom:1vh;right:1vh;--rot:8deg;}
.screw.br{bottom:1vh;left:1vh;--rot:-4deg;}

/* ============================
   MIDDLE WRAPPER (two frames or image)
   Spans the two middle columns so all 4 frames balance
   ============================ */
.middle-wrapper{
  grid-column:2 / 4;
  display:grid;
  grid-template-columns:1fr 1fr;
  column-gap:2vw;
  min-height:0;
  margin-top:5vh;
  box-sizing:border-box;
  align-self:stretch;
}

.pdf-container{
  display:none;
  grid-column:1 / -1;
  position:relative;
  width:100%;
  height:100%;
  min-height:0;
  overflow:hidden;
  /* Transparent so board background shows through – matches screen */
  background:transparent;
  align-items:center;
  justify-content:center;
}
.columns.pdf-mode .pdf-container{
  display:flex;
}
.columns.pdf-mode .middle-wrapper .framed{
  display:none;
}
.pdf-container img{
  position:absolute;
  top:50%;
  left:50%;
  transform:translate(-50%, -50%) scale(0.9);
  max-width:100%;
  max-height:100%;
  width:auto;
  height:auto;
  object-fit:contain;
  display:block;
}
.pdf-container.multi-image-mode{
  padding:1vh 1.4vw;
  gap:1.2vw;
}
.pdf-container.multi-image-mode img{
  position:static;
  top:auto;
  left:auto;
  transform:none;
  max-width:calc(50% - 0.8vw);
  max-height:100%;
  width:auto;
  height:auto;
  flex:0 1 calc(50% - 0.8vw);
  object-fit:contain;
}

/* Midday focus (1:00–2:15): spotlight middle images, dim the rest */
.board .columns > .panel-wrap,
.board .board-bottom{
  transition:opacity 0.85s ease, filter 0.85s ease;
}
.board.midday-focus-mode .columns > .panel-wrap,
.board.midday-focus-mode .board-bottom{
  opacity:0.22;
  filter:saturate(0.65) brightness(0.85);
  pointer-events:none;
}
.board.midday-focus-mode .middle-wrapper{
  margin-top:1.2vh;
  z-index:2;
}
.board.midday-focus-mode .pdf-container{
  border-radius:1.2vh;
  box-sizing:border-box;
  animation:midday-focus-pulse 1.85s ease-in-out infinite;
}
.board.midday-focus-mode .pdf-container.multi-image-mode{
  padding:1.4vh 1.6vw;
  gap:1.6vw;
}
.board.midday-focus-mode .pdf-container.multi-image-mode img{
  max-width:calc(50% - 1vw);
  flex:0 1 calc(50% - 1vw);
  max-height:96%;
}
.board.midday-focus-mode .pdf-container:not(.multi-image-mode) img{
  transform:translate(-50%, -50%) scale(0.98);
}
@keyframes midday-focus-pulse{
  0%, 100%{
    box-shadow:
      0 0 0 0.28vh rgba(230,210,143,0.35),
      0 0 1.4vh rgba(230,210,143,0.12),
      inset 0 0 0 0.12vh rgba(245,230,179,0.12);
  }
  50%{
    box-shadow:
      0 0 0 0.55vh rgba(230,210,143,0.88),
      0 0 3.2vh rgba(230,210,143,0.32),
      inset 0 0 0 0.18vh rgba(245,230,179,0.28);
  }
}
@media (prefers-reduced-motion: reduce){
  .board.midday-focus-mode .pdf-container{
    animation:none;
    box-shadow:
      0 0 0 0.45vh rgba(230,210,143,0.75),
      0 0 2.2vh rgba(230,210,143,0.22),
      inset 0 0 0 0.15vh rgba(245,230,179,0.2);
  }
}

/* ============================
   CENTER GOLD FRAMES (CSS-only, no image)
   Transparent center so page background shows through.
   ============================ */
.framed{
  min-height:0;
  margin-top:5vh;
  align-self:stretch;
  box-sizing:border-box;
  padding:0.15vh 1vh;
  min-width:0;
  border-radius:1.8vh;
  /* Outer dark band (wood tone) then drop shadow */
  box-shadow:
    0 0 0 0.35vh var(--gold-wood),
    0 1.8vh 4vh rgba(0,0,0,.55);
  /* Gold frame: thick beveled border; center stays transparent */
  border:5.6vh solid transparent;
  background:
    transparent padding-box,
    linear-gradient(135deg,
      var(--gold-light) 0%,
      var(--gold) 25%,
      var(--gold-dark) 50%,
      var(--gold) 75%,
      var(--gold-light) 100%
    ) border-box;
  background-origin:border-box;
  background-clip:padding-box, border-box;
}

.frame-content{
  height:100%;
  width:100%;
  min-width:0;
  padding:0 0.8vh 1.5vh 0.8vh;
  display:flex;
  flex-direction:column;
  justify-content:flex-start;
  align-items:stretch;
  box-sizing:border-box;
}

.frame-content h3{
  color:#f6ecd0;
  /* Avoid fullscreen blow-up from vh-driven sizing */
  font-size:clamp(30px, min(2.8vw, 4vh), 48px);
  font-weight:800;
  margin:-0.5vh 0 0.7vh;
  line-height:1.1;
  text-shadow:0 0.3vh 0.2vh rgba(0,0,0,.6);
  width:100%;
  min-width:0;
  box-sizing:border-box;
  text-align:center;
}

.frame-content.no-title h3{
  display:none;
}

.frame-content ul{
  list-style:none;
  padding:0;
  margin:0;
  text-align:center;
  width:100%;
  max-width:100%;
  min-width:0;
  box-sizing:border-box;
}

.frame-content li{
  color:#fff7e6;
  font-size:clamp(18px, min(1.7vw, 2.5vh), 28px);
  line-height:1.25;
  margin-bottom:0.4vh;
  text-shadow:0 0.2vh 0.2vh rgba(0,0,0,.6);
  overflow-wrap:break-word;
  word-break:break-word;
}

/* If admin leaves a row empty, keep a visible blank line. */
.frame-content li:empty{
  min-height:1.1em;
}
.frame-content li.blank-line{
  min-height:1.1em;
  color:transparent;
  text-shadow:none;
}

/* Keep first line centered in both top-middle panels */
#pane-parnas-hayom .frame-content ul > li:first-child,
#pane-ner-lmaor .frame-content ul > li:first-child{
  text-align:center !important;
}

/* Keep sponsorship copy comfortably inside frame borders */
#pane-parnas-hayom .frame-content ul{
  padding:0 0.6em;
}
#pane-parnas-hayom .frame-content li{
  font-size:clamp(21px, min(1.73vw, 2.65vh), 30px);
  line-height:1.2;
}

/* ============================
   EXPERIMENT: marble/silver middle panels
   Toggle by adding `experimental-mid-marble` to `.board`
   ============================ */
.board.experimental-mid-marble .middle-wrapper .framed{
  /* Replace the entire “gold frame” look with a single silver matte panel */
  border:0.28vh solid rgba(20,28,38,0.35);
  box-shadow:
    inset 0 0 0 0.12vh rgba(255,255,255,0.45),
    0 1.8vh 4vh rgba(0,0,0,.45);
  background:
    linear-gradient(180deg,#eef0f4 0%, #dde1e8 55%, #c5ccd8 100%);
  background-clip:border-box;
}

.board.experimental-mid-marble .middle-wrapper .frame-content h3{
  color:#13294b; /* deep navy blue */
  text-shadow:none;
}
.board.experimental-mid-marble .middle-wrapper .frame-content li{
  color:#111;
  text-shadow:none;
}

.board.experimental-mid-marble .middle-wrapper .framed{
  /* undo the thick gold-frame border from base style */
  border-width:0.28vh;
}

/* ============================
   BOTTOM PANEL – FOUR SUB-PANELS
   ============================ */
.sub-panel{
  flex:1;
  min-width:0;
  display:flex;
  flex-direction:column;
  background:linear-gradient(180deg,#0f2638,#0d1f2e);
  border:0.25vh solid #6f5033;
  border-radius:1vh;
  padding:0.8vh 1vw;
  box-shadow:
    inset 0 0 0 0.1vh rgba(255,255,255,.05),
    0 0.8vh 2vh rgba(0,0,0,.4);
  box-sizing:border-box;
  overflow:hidden;
}

.sub-panel-title{
  color:var(--gold);
  font-weight:800;
  font-size:clamp(20px,2.6vh,30px);
  margin:0 0 0.7vh 0;
  line-height:1.15;
  letter-spacing:0.01em;
  text-align:center;
  text-shadow:0 0.15vh 0 #4b351f;
  flex-shrink:0;
}

.sub-panel-content{
  flex:1;
  min-height:0;
  color:#e8eef5;
  font-size:clamp(16px,2vh,22px);
  line-height:1.45;
  text-shadow:0 0.1vh 0 rgba(0,0,0,.5);
}

.sub-panel-scroll .sub-panel-content{
  overflow-y:auto;
  overflow-x:hidden;
  padding-inline-end:0.3vw;
}
.sub-panel-scroll .sub-panel-content::-webkit-scrollbar{
  width:0.35vw;
}
.sub-panel-scroll .sub-panel-content::-webkit-scrollbar-track{
  background:rgba(0,0,0,.25);
  border-radius:0.5vh;
}
.sub-panel-scroll .sub-panel-content::-webkit-scrollbar-thumb{
  background:var(--gold-dark);
  border-radius:0.5vh;
}

.sub-panel-content ul{
  list-style:none;
  padding:0;
  margin:0;
}
.sub-panel-content li{
  margin-bottom:0.6vh;
  padding-bottom:0.4vh;
  border-bottom:1px solid rgba(230,210,143,0.15);
}
.sub-panel-content li:last-child{
  border-bottom:none;
}
/* Weekday tefillot: four columns, labels above times (RTL: סליחות … מעריב) */
#sub-announcements{
  flex:1.28;
  padding-left:0.55vw;
  padding-right:0.55vw;
}
#sub-announcements .sub-panel-content{
  overflow:hidden;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:0.55vh;
  padding-top:0.15vh;
  padding-bottom:0.25vh;
}
#sub-announcements .chol-times-grid{
  display:grid;
  grid-template-columns:repeat(3, minmax(0, 1fr));
  width:100%;
  height:auto;
  flex:0 1 auto;
  align-items:center;
  direction:rtl;
}
#sub-announcements .chol-times-grid.has-slichos{
  grid-template-columns:repeat(4, minmax(0, 1fr));
}
#sub-announcements .chol-time-col{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:0.35vh;
  text-align:center;
  min-width:0;
  padding:0 0.25vw;
}
#sub-announcements .chol-time-col[hidden]{
  display:none !important;
}
#sub-announcements .chol-time-col + .chol-time-col{
  border-inline-start:1px solid rgba(230,210,143,0.28);
}
#sub-announcements .chol-time-label{
  font-weight:700;
  color:var(--gold);
  font-size:clamp(12px, 1.45vh, 18px);
  line-height:1.15;
  white-space:nowrap;
}
#sub-announcements .chol-time-value{
  font-weight:800;
  font-size:clamp(15px, 2vh, 24px);
  line-height:1.1;
  color:#f5f4e6;
  direction:ltr;
  unicode-bidi:isolate;
  white-space:nowrap;
}
#sub-announcements .chol-time-col.chol-slichos-erev-yk .chol-time-label{
  font-size:clamp(11px, 1.3vh, 16px);
  white-space:normal;
  max-width:100%;
  line-height:1.12;
}
#sub-mazal-tov .sub-panel-content{
  display:flex;
  align-items:center;
  justify-content:center;
  text-align:center;
  overflow:hidden;
}
#sub-mazal-tov .sub-panel-content li{
  border-bottom:none;
  margin:0;
  padding:0.45em 0.75em;
  border:1px solid rgba(230,210,143,0.38);
  border-radius:0.55em;
  background:linear-gradient(180deg,rgba(230,210,143,0.14),rgba(230,210,143,0.07));
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,0.05),
    0 0.35vh 1vh rgba(0,0,0,0.28);
  font-weight:700;
  letter-spacing:0.01em;
}
.sub-panel-content p{
  margin:0;
  font-size:1.05em;
}
.sub-panel-content p + p{
  margin-top:0.6vh;
}
.sub-panel-content a{
  color:var(--gold-light);
  text-decoration:underline;
}
.sub-panel-content a:hover{
  color:var(--gold);
}
.sub-panel-static .sub-panel-content{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  text-align:center;
}
.sub-panel-static .sub-panel-content p{
  max-width:100%;
}
#sub-community .sub-panel-content{
  direction:ltr;
  text-align:left;
  align-items:flex-start;
  font-size:0.92em;
}
#sub-community .sub-panel-content p:nth-child(n+2){
  margin-left:1.1em;
}
#sub-community .sub-panel-content a{
  word-break:break-all;
}

/* Kiosk display (?kiosk=1 in URL) — hide mouse over the board */
html.kiosk,
html.kiosk *{
  cursor:none !important;
}

