/* Loaded only by the synagogue display. Keep all font requests on the board's origin. */
@font-face {
  font-family: "Noto Sans Hebrew";
  src: url("/assets/synagogue-fonts/NotoSansHebrew-Regular.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Noto Sans Hebrew";
  src: url("/assets/synagogue-fonts/NotoSansHebrew-Bold.ttf") format("truetype");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: "Noto Serif Hebrew";
  src: url("/assets/synagogue-fonts/NotoSerifHebrew-Bold.ttf") format("truetype");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

body.screen {
  --sans: "Noto Sans Hebrew", system-ui, Arial, sans-serif;
  --serif: "Noto Serif Hebrew", Georgia, serif;
  --ink: #172b48;
  --muted: #495d73;
  --line: #d8e1eb;
  --blue: #204783;
  --gold: #f3cf8d;
  --paper: #fff;
  background: #edf2f7;
  color: var(--ink);
  font-family: var(--sans);
}
.screen .mast {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: .3em clamp(12px, 1.2vw, 26px);
  border: 0;
  border-radius: .85em .85em 0 0;
  background: linear-gradient(108deg, #12223e, #233e69 56%, #172c4c);
  color: #fff;
}
/* Arches echo the synagogue entrance without sitting over the lettering. */
.screen .mast::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  content: "";
  background: repeating-radial-gradient(ellipse 32% 380% at 78% 180%,
    transparent 0 15%, rgb(196 214 242 / 7%) 15.3% 15.7%, transparent 16% 22%);
  pointer-events: none;
}
.screen .mast .brand {
  mix-blend-mode: normal;
  background: var(--paper);
  border-radius: .46em;
  padding: .17em .4em;
}
.screen .mast h1, .screen .panel h2, .screen .occasion strong {
  font-family: var(--sans);
  font-weight: 700;
}
.screen .mast h1 { line-height: 1.12; }
.screen .mast .eyebrow { color: #dae7fc; }
.screen .mast .clock { color: #fff; }
.screen .mast .clock bdi {
  font-family: system-ui, sans-serif;
  font-weight: 650;
  letter-spacing: -.05em;
  font-variant-numeric: tabular-nums;
}
.screen .mast .clock strong { color: var(--gold); }
.screen .mast .clock small { color: #dbe6f5; }

.screen .solar {
  background: #e2eaf4;
  border: 1px solid #cbd7e6;
  border-top: 0;
  border-radius: 0 0 .8em .8em;
  padding-inline: clamp(8px, 1.2vw, 26px);
  color: var(--ink);
}
.screen .solar strong { color: #243f67; }
.screen .solar bdi { color: var(--blue); }

.screen .panel {
  --accent: #28599b;
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: 0 2px 6px rgb(24 48 77 / 5%);
}
.screen .shabbat-prayers { --accent: #5b488d; }
.screen .lessons { --accent: #14665f; }
.screen .panel header { border-color: var(--line); }
.screen .panel h2 {
  color: var(--ink);
  border-inline-start: .16em solid var(--accent);
  padding-inline-start: .37em;
  line-height: 1.2;
}
.screen .panel .counter { color: var(--muted); font-variant-numeric: tabular-nums; }
.screen .line, .screen .prayer-slot, .screen .occasion, .screen .lessons .line { border-color: var(--line); }
.screen .line small, .screen .occasion p, .screen .empty { color: var(--muted); }
.screen .line bdi, .screen .occasion strong, .screen .prayer-slot h3 { color: var(--accent); }
.screen .prayer-slot h3 { font-family: var(--sans); }
.screen .line[data-clock-time] bdi {
  color: #21487f;
  background: #eaf1fb;
  border-radius: .35em;
  padding: .05em .42em;
  line-height: 1.18;
  font-family: system-ui, sans-serif;
  font-weight: 700;
}
.screen .shabbat-prayers .line[data-clock-time] bdi { background: #f1edf9; color: #503974; }
.screen .lessons .line[data-clock-time] bdi { background: #e5f3f0; color: #11574d; }
.screen .shacharit-countdown { background: #244f89; color: #fff; }

.memorial-column {
  grid-area: candles;
  min-width: 0;
  min-height: 0;
  display: grid;
  gap: .85vh;
  container: memorial-rail / inline-size;
  align-content: start;
  grid-template-rows: auto var(--memorial-min, max-content);
}
.memorial-column:has(> .join-panel:not([hidden])) {
  grid-template-rows: auto var(--memorial-min, max-content) minmax(0, 1fr) auto;
  row-gap: clamp(8px, 1vh, 12px);
}
.memorial-column > .join-panel { grid-area: 4 / 1; }
.memorial-column:has(> .join-panel:not([hidden]))::before,
.memorial-column:has(> .join-panel:not([hidden]))::after {
  content: "";
  grid-area: 3 / 1;
  place-self: center;
  pointer-events: none;
}
.memorial-column::before {
  width: min(52%, 13rem);
  height: 1px;
  background: linear-gradient(to right, transparent, #bd9e64 40%, transparent 41% 59%, #bd9e64 60%, transparent);
}
.memorial-column::after {
  width: 6px;
  height: 6px;
  border: 1px solid #ad905b;
  background: #f7f1e5;
  transform: rotate(45deg);
}
.weekly-portion {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-content: center;
  min-block-size: clamp(76px, 8.4vh, 104px);
  padding: clamp(6px, .8vh, 12px) clamp(15px, 1.45vw, 28px);
  padding-inline-end: 40%;
  text-align: start;
  border: 1px solid #a58a58;
  border-radius: .55em;
  background: linear-gradient(110deg, #232c47, #14253d 74%, #1b3049);
  box-shadow: 0 2px 6px rgb(20 33 54 / 12%);
}
.portion-art { position: absolute; inset: 0; z-index: -2; display: flex; direction: ltr; }
.portion-art img { display: block; width: 0; min-width: 0; flex: 1; height: 100%; object-fit: cover; object-position: 35% 50%; }
.weekly-portion::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(to left, rgb(9 24 40 / 94%), rgb(9 24 40 / 78%) 32%, rgb(9 24 40 / 12%) 77%);
}
.portion-times { display: none; }
.memorial-column:has(.portion-times):not(:has(> .join-panel:not([hidden]))) {
  grid-template-rows: minmax(min-content,1fr) var(--memorial-min,max-content);
}
.memorial-column:not(:has(> .join-panel:not([hidden]))) .weekly-portion:has(.portion-times) {
  min-height: clamp(140px,20vh,245px); align-content: end;
  padding: clamp(10px,1.2vw,23px); text-shadow: 0 1px 4px #13263d;
}
.memorial-column:not(:has(> .join-panel:not([hidden]))) .weekly-portion:has(.portion-times)::before {
  background: linear-gradient(to top,rgb(7 21 37 / 96%),rgb(7 21 37 / 74%) 27%,transparent 78%);
}
.memorial-column:not(:has(> .join-panel:not([hidden]))) .portion-times {
  display: flex; flex-wrap: wrap; gap: .3em 1.2em; margin: .35em 0 0; color: #fff9e9;
}
.portion-times div { display: flex; align-items: baseline; gap: .35em; }
.portion-times dt { color: #f4dfba; font: 700 clamp(12px,1.05vw,21px)/1.25 var(--sans); }
.portion-times dd { margin: 0; font: 700 clamp(16px,1.5vw,30px)/1.2 var(--sans); font-variant-numeric: tabular-nums; }
.weekly-portion::after {
  content: "";
  position: absolute;
  inset: 4px;
  pointer-events: none;
  border: 1px solid rgb(221 194 137 / 32%);
  border-radius: max(2px, calc(.55em - 4px));
}
.weekly-portion h2 {
  display: flex;
  align-items: center;
  gap: .5em;
  margin: 0;
  color: #eed4a1;
  font: 700 clamp(13px, 1.04vw, 20px)/1.25 var(--sans);
}
.weekly-portion h2::before { content: ""; width: 1.15em; height: 1px; background: #c8a566; }
.weekly-portion p {
  margin: .03em 0 0;
  color: #fff7e8;
  font: 700 clamp(26px, 2.35vw, 49px)/1.16 var(--serif);
  overflow-wrap: anywhere;
  text-wrap: balance;
}
@container memorial-rail (max-width: 230px) {
  .weekly-portion { min-block-size: 62px; padding: 7px 11px; padding-inline-end: 28%; }

  .weekly-portion h2 { gap: .35em; font-size: 12px; }
  .weekly-portion h2::before { width: .65em; }
  .weekly-portion p { font-size: 23px; }
}
@container memorial-rail (max-width: 158px) {
  .weekly-portion { padding-inline-end: 16%; }

  .weekly-portion p { font-size: 19px; }
}
.screen .candles {
  --memorial-line: #e9e2d6;
  --memorial-gap: clamp(3px, .35vw, 7px);
  background: #fff;
  color: var(--ink);
}
.screen .candles header { border-color: var(--memorial-line); }
.screen .candles h2 {
  display: flex;
  align-items: center;
  gap: .45em;
  color: #64451e;
  border: 0;
  padding-inline: 0;
  font-family: var(--serif);
}
.screen .candles h2::before, .screen .candles h2::after {
  content: "";
  width: clamp(8px, 1.45vw, 30px);
  height: 1px;
  background: #ccac72;
}
.screen .candles .items {
  --flame-height: clamp(24px, 4vh, 56px);
  --name-size: 1.38em;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: var(--memorial-rows, none);
  grid-auto-rows: minmax(max-content,auto);
  align-content: stretch;
  margin-block: .22em;
  gap: clamp(2px,.3vh,4px) var(--memorial-gap);
}
.screen .candles .light {
  min-height: 0;
  justify-content: flex-start;
  gap: .1em;
  padding: .12em .18em;
  border: 1px solid var(--memorial-line);
  border-radius: .55em;
  background: #fff;
  overflow: visible;
}
/* Highlight borders and dedication length must not displace the candle. */
.screen .candles .light { --candle-inset: 5px; }
.screen .candles .items .light { padding-block-start: calc(var(--candle-inset) - var(--card-edge,1px)); }
.screen .candles .light:is(.memorial-first-month,.memorial-daily) { --card-edge: 2px; }
.screen .candles .light.memorial-anniversary { --card-edge: 3px; }
.screen .candles .light .memorial-candle {
  flex: none; align-self: center; display: block;
  height: var(--flame-height); width: auto; margin: 0;
}
.screen .candles .light > div {
  flex: none;
  align-self: stretch;
  min-width: 0;
  overflow-wrap: anywhere;
}
.screen .light strong {
  min-height: 0;
  font-size: calc(var(--name-size) * .755);
  color: var(--ink);
  font-family: var(--serif);
  line-height: 1.16;
  text-wrap: balance;
}
.screen .light .memorial-blessing {
  display: block;
  flex: none;
  margin-block-start: auto;
  padding-block-start: .14em;
  color: #6e5633;
  font: 500 max(10px,.65em)/1.05 var(--sans);
  text-align: center;
}
.screen .light .candle-flame { transform-box: fill-box; transform-origin: 50% 100%; }
.screen .light .candle-flame > path:first-child {
  stroke: #cc741e;
  stroke-width: .65;
  stroke-linejoin: round;
}
.screen .light p, .screen .candles .counter, .screen .candles .empty { color: var(--muted); }
.screen .candles daily-hilula {
  margin-block-start: 0;
  padding: 1px .35em;
  font-size: clamp(10px, .67em, 13px);
  line-height: 1.12;
  background: #fbf7ee;
  border: 1px solid #e2d6be;
  border-inline-start: 3px solid #bc9558;
  color: var(--ink);
  font-family: var(--sans);
}
@media (min-width: 1000px) {
  .screen .candles daily-hilula { display: flex; align-items: center; gap: .65em; padding-block: 2px; }
  .screen .candles .hilula-head { flex: none; }
  .screen .candles .hilula-window { min-width: 0; flex: 1; }
}
.screen .candles .hilula-head { gap: .1em .4em; }
.screen .candles .hilula-toggle { padding: .05em .4em; }
.screen .hilula-head strong { font-family: var(--sans); color: #68481d; }
.screen .hilula-date, .screen .hilula-names li::after { color: #725a37; }
.screen daily-hilula .hilula-toggle {
  border-color: #aa9774;
  color: #594421;
  border-radius: .4em;
}
.screen .update-toggle {
  border-color: #97abc4;
  color: #fff;
  border-radius: .4em;
}
.screen .board-codes .scan { background: #fff; border-color: #ccd8e7; color: #203f68; }
.screen .board-codes .whatsapp-join { color: #11574d; border-color: #bfd8d3; }
.screen .board-codes .scan:hover { background: #f3f7fb; }
.screen .board-codes img { background: #fff; }
.screen .scan-hint, .screen .credits { color: var(--muted); }
.screen .update-banner { background: #142944; color: #fff; border: 0; }
.screen .update-banner > strong {
  color: var(--gold);
  padding-inline-end: .65em;
  border-inline-end: 1px solid #63758d;
}
.screen .update-copy li::after, .screen .update-list li:not(:last-child)::after {
  color: var(--gold); margin-inline: clamp(22px,3vw,64px);
}
.screen :is(button, a, [tabindex]):focus-visible { outline: 3px solid #2575b7; outline-offset: 2px; }
.screen .update-banner :focus-visible { outline-color: #ffd388; }

@media (max-width: 700px), (max-height: 550px) {
  .screen .mast { padding: .2em .4em; }
  .screen .mast .brand { padding: .1em .22em; }
  .screen .mast .board-heading { min-width: 0; }
  .screen .line[data-clock-time] bdi { padding-inline: .25em; }
}

@media (min-width: 701px) and (max-height: 800px) {
  .screen .prayer-column .panel { padding-block: .32em; }
}
@media (max-width: 700px) and (orientation: portrait) and (max-height: 720px) {
  .screen .board-grid { grid-template-rows: minmax(0, 1.7fr) minmax(0, 1fr); }
  .prayer-column { grid-template-rows: minmax(0, 1fr) minmax(0, 1.45fr); }
}
@media (orientation: landscape) and (max-height: 550px) {
  .prayer-column { grid-template-rows: minmax(0, 1fr) minmax(0, 1.7fr); }
}

.screen .board-stage, .screen #board-panels {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
}
.screen .board-stage { position: relative; }
.screen.netz-counting #board-panels, .screen.netz-counting .credits { visibility: hidden; }
#netz-screen:not([hidden]) {
  position: absolute;
  inset: 0;
  box-sizing: border-box;
  margin: 0;
  padding: 2vmin 3vmin;
  border-radius: .75em;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 2vmin;
  background: #16284b;
  color: white;
  text-align: center;
}
#netz-screen-title { margin: 0; color: #f2d9a5; font: 700 clamp(1.2rem,5vmin,4.5rem)/1.25 var(--sans); }
#netz-screen-time {
  direction: ltr;
  font: 700 min(29vw,40vh)/1 system-ui, sans-serif;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.035em;
}
#netz-demo-link { color: #fff; font-size: clamp(.9rem,2.2vmin,1.3rem); padding: .5em; }

@media (max-width: 700px) and (orientation: portrait) {
  .screen .board-grid {
    grid-template-rows: minmax(0, 2.65fr) minmax(0, 1fr);
    grid-template-columns: minmax(0, 1.06fr) minmax(0, 1fr);
  }
  .screen .prayer-column { grid-template-rows: minmax(0, 1fr) minmax(0, 1.84fr); }
  .screen .candles header, .screen .candles header:has(.counter:not(:empty)) {
    padding-inline: 0;
    gap: 2px;
  }
  .screen .candles h2 { font-size: 1.03em; }
  .screen .candles h2::before, .screen .candles h2::after { display: none; }
  .screen .candles .counter { position: static; white-space: nowrap; }
  .memorial-column { gap: 3px; }
  .screen .candles .light :is(.anniversary-label,.memorial-death-date) { font-size: 10px; line-height: 1.1; }
  .screen .candles .items {
    grid-template-columns: repeat(2, minmax(0,1fr));
    --flame-height: clamp(17px,2.8vh,26px);
    margin-block: 2px;
    gap: 2px;
  }
  .screen .candles .light {
    position: relative;
    padding: 2px 1px;
    gap: 0;
  }
  .screen .candles .light strong { font-size: max(12px,.87em); line-height: 1.15; }
  .screen .light .memorial-blessing { padding-block-start: 1px; }
  .screen .prayer-column .prayer-slot h3 { margin-block: .1em; }
  .screen .board-codes .scan { min-height: 26px; }
  .screen .candles daily-hilula { padding: 1px .25em; }
}

@media (max-width: 700px), (max-width: 950px) and (max-height: 550px) and (pointer: coarse) {
  .screen .prayer-column header { align-items: baseline; gap: 2px; }
  .screen .prayer-column .counter { flex: none; white-space: nowrap; }

}
@media (max-width: 700px) and (orientation: portrait) and (max-height: 640px) {
  .screen .prayer-column { grid-template-rows: minmax(99px, 1fr) minmax(0, 1.65fr); }
}

@media (max-width: 365px) and (orientation: portrait) {
  .screen .board-grid { grid-template-rows: minmax(0, 3.4fr) minmax(0, 1fr); }
  .screen .candles .hilula-head { gap: .1em .18em; }
}
@media (max-height: 550px) and (orientation: landscape) {
  .screen .prayer-column { grid-template-rows: minmax(84px, 1fr) minmax(0, 1.65fr); }
}
@media (max-height: 550px) and (orientation: landscape) {
  .memorial-column { gap: 3px; }
  .screen .candles .items { --flame-height: 18px; --name-size: 1.12em; }
  .screen .prayer-column .items { padding-block: 2px; }
  .screen .prayer-column .prayer-slot h3 { margin-block: 0; }
  .screen .mast .clock { grid-template-columns: auto auto; align-items: center; }
}

.screen .solar-source { color: #243f67; font-weight: 700; text-decoration: none; }
.screen .solar-source:hover { text-decoration: underline; }
.screen .community-column { grid-template-rows: repeat(2,minmax(0,1fr)); }
.screen .community-choices { display: none; }
.screen .halachot { --accent: #876027; }
.screen .halachot-body { display: grid; flex: 1; min-height: 0; align-content: center; }
.screen .halachot-body article { padding: .38em 0; line-height: 1.32; }
.screen .halachot-body article + article { border-top: 1px solid var(--line); }
.screen .halachot-body p { margin: 0; font-weight: 700; }
.screen .halachot-body a { color: #664921; font-size: .77em; text-decoration: underline; text-underline-offset: .15em; }
.screen .lessons { display: grid; grid-template-rows: auto minmax(0,1fr); grid-template-columns: minmax(0,1fr); }
.screen .lessons > .items { grid-area: 2 / 1; }
.screen .board-footer {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto minmax(0,1fr);
  align-items: center;
  column-gap: .8em;
  padding-inline: 1.45vw;
}
.screen .board-footer small { margin: 0; }
.screen .board-footer .dedication { grid-area: 1 / 2; justify-self: center; text-align: center; }
.screen .board-footer .copyright { grid-area: 1 / 3; justify-self: end; text-align: left; }
.screen .copyright a { color: inherit; white-space: nowrap; text-decoration: none; }
.screen .copyright a:focus-visible, .screen .copyright a:hover { text-decoration: underline; }

@media (max-width: 700px) and (orientation: portrait),
       (max-height: 550px) and (orientation: landscape) {
  .screen .community-column[data-view] { grid-template-columns: minmax(0,1fr); grid-template-rows: auto minmax(0,1fr); gap: 3px; }
  .screen .community-column[data-view] .community-choices { display: flex; gap: 3px; }
  .screen .community-choices button { flex: 1; padding: .24em .1em; background: white; border: 1px solid #cad6e4; color: #314a69; font: 700 max(12px,.87em)/1.2 var(--sans); }
  .screen .community-choices button[aria-pressed=true] { background: #243f67; color: white; }
  .screen .community-column[data-view] > .panel { display: none; }
  .screen .community-column[data-view=halachot] > .halachot { display: flex; }
  .screen .community-column[data-view=lessons] > .lessons { display: grid; }
  .screen .halachot-body { display: block; overflow-y: auto; }
  .screen .halachot-body article { padding-block: .2em; }
  .screen .halachot-body a { font-size: max(12px,.8em); }
}
@media (max-width: 700px) and (orientation: portrait) {
  .screen .board-grid { grid-template-rows: minmax(0,2.15fr) minmax(9.8rem,1fr); }
}

@media (max-width: 700px) and (orientation: portrait) and (max-height: 680px) {
  .screen .board-grid { grid-template-rows: minmax(0,2.9fr) minmax(0,1fr); }
  .screen .candles { padding-inline: 2px; }
  .screen .candles h2 { font-size: 13px; }
  .screen .candles .hilula-head { flex-wrap: nowrap; }
  .screen .candles .hilula-head strong, .screen .candles .hilula-date { white-space: nowrap; }
}
@media (max-width: 700px) {
  .screen .board-footer { grid-template-columns: minmax(0,1fr); row-gap: 2px; }
  .screen .board-footer .dedication { grid-area: 1 / 1; }
  .screen .board-footer .copyright { grid-area: 2 / 1; }
}

.screen .prayer-column > .panel:only-child,
.screen .community-column > .panel:only-child { grid-area: 1 / 1 / -1 / -1; }
.screen .weekdays h2 .shacharit-countdown { margin-inline-start: .4em; }

body.screen {
  height: calc(100vh + var(--board-extra-height,0px));
  height: calc(100dvh + var(--board-extra-height,0px));
}
.screen .candles .items.measure-candles { grid-template-rows: none; grid-auto-rows: max-content; align-items: start; }
@media (max-width: 700px) and (orientation: portrait) {
  .screen .board-grid[data-extended] { grid-template-rows: var(--extended-row) minmax(0,1fr); }
}

.screen .candles .hilula-window { scrollbar-width: none; }

/* A single scale and ink for the full prayer timetable. */
.screen .prayer-column {
  --prayer-size: clamp(13px,1.65vw,34px);
  --schedule-ink: #1d3550;
}
.screen .prayer-column > .panel { padding-inline: clamp(5px,.75vw,17px); }
.screen .prayer-column > .panel { --heading-tint: #e8eff4; --heading-ink: #203e56; --heading-rule: #577d96; }
.screen .prayer-column > .friday-prayers { --heading-tint: #f4eddf; --heading-ink: #563d1d; --heading-rule: #a17b43; }
.screen .prayer-column > .friday-evening { --heading-tint: #eee9f1; --heading-ink: #503758; --heading-rule: #82658b; }
.screen .prayer-column > :is(.saturday-services,.holiday-services) { --heading-tint: #e4efeb; --heading-ink: #243f37; --heading-rule: #5a806c; }
.screen .prayer-column > .panel > header {
  color: var(--heading-ink); background: linear-gradient(to left,var(--heading-tint),#faf9f6);
  border: 0; border-inline-start: 4px solid var(--heading-rule);
  border-radius: .25em; margin: 0; padding: .22em .50em;
}
.screen .prayer-column > .panel > header h2 {
  padding: 0; border: 0; color: var(--heading-ink);
  font: 750 clamp(15px,1.65vw,34px)/1.15 var(--serif);
}
.screen .prayer-column .items {
  grid-auto-rows: minmax(0,1fr); align-content: stretch; gap: 0; padding-block: 0;
}
.screen .prayer-column .items.measure-prayers { grid-auto-rows: max-content; align-content: start; }
.screen .prayer-column .prayer-slot { display: flex; flex-direction: column; justify-content: center; }
.screen .prayer-column .line {
  display: grid; grid-template-columns: minmax(max-content,1fr) max-content;
  align-items: baseline; align-content: center; justify-content: space-between;
  min-width: 0; padding-block: .16em; padding-inline: 1px;
  gap: .12em clamp(7px,.9vw,20px); color: var(--schedule-ink);
}
.screen .prayer-column .line > div { display: contents; }
.screen .prayer-column .panel .line :is(strong,bdi) {
  color: inherit; background: transparent; border-radius: 0; padding: 0;
  font: 700 var(--prayer-size)/1.2 var(--sans); font-variant-numeric: tabular-nums;
  max-width: none; white-space: nowrap;
}
.screen .prayer-column .line strong { grid-area: 1 / 1; }
.screen .prayer-column .line > bdi, .screen .prayer-column .prayer-time {
  grid-area: 1 / 2; justify-self: end; white-space: nowrap;
}
.screen .prayer-column .prayer-slot h3 { color: var(--schedule-ink); }
.screen .prayer-column .line small {
  grid-area: 2 / 1 / 3 / -1; width: 0; min-width: 100%;
  font: 400 clamp(10px,.8vw,16px)/1.25 var(--sans); overflow-wrap: anywhere;
}
.screen .prayer-column .shacharit-countdown { font-variant-numeric: tabular-nums; }

.screen .prayer-column:has(> .friday-prayers) {
  grid-template-rows: var(--timetable-tracks, minmax(0,1.1fr) minmax(0,1.5fr) minmax(0,3.5fr));
}
.screen .prayer-column:has(> .weekdays),
.screen .prayer-column:has(> .shabbat-times-card) {
  grid-template-rows: var(--timetable-tracks, minmax(0,1.5fr) minmax(0,1.1fr) minmax(0,1.5fr) minmax(0,3.5fr));
}
.screen .friday-prayers h2 .shacharit-countdown { margin-inline-start: .4em; }
.shabbat-times-card {
  container-type: size;
  min-width: 0; min-height: 0;
  display: flex; flex-direction: column; justify-content: center;
  padding: clamp(5px,1.2vw,24px);
  border: 1px solid #ab8c59; border-radius: .65em;
  color: #fffaf0; background-color: #18212d;
  background-image: linear-gradient(270deg,rgba(12,19,31,.84),rgba(12,19,31,.68) 46%,rgba(12,19,31,.08) 77%),url("/assets/synagogue-shabbat-candles.webp");
  background-size: cover; background-position: center left;
  text-shadow: 0 1px 5px #111820;
}
.shabbat-times-card header { margin-block-end: min(3cqh,.7rem); }
.shabbat-times-card h2 { margin: 0; font: 700 clamp(16px,min(8.9cqw,12cqh),52px)/1.05 var(--serif); }
.shabbat-times-card header p { margin: .18em 0 0; font: 500 clamp(12px,min(4.4cqw,6.7cqh),22px)/1.12 var(--sans); color: #f3d6a8; }
.shabbat-times-card dl { display: grid; align-content: center; gap: min(3cqh,.8rem); margin: 0; }
.shabbat-times-card dt { font: 700 clamp(12px,min(5.1cqw,7cqh),26px)/1.16 var(--sans); }
.shabbat-times-card dd { margin: .03em 0 0; color: #ffe2b0; font: 700 clamp(13px,4.5cqw,24px)/1.06 var(--sans); }
.shabbat-times-card dd.clock-value { font: 650 clamp(20px,min(13.5cqw,18cqh),80px)/1.02 system-ui,sans-serif; font-variant-numeric: tabular-nums; }
@container (max-height: 155px) {
  .shabbat-times-card header p { display: none; }
  .shabbat-times-card dl { gap: 3px; }
  .shabbat-times-card dl > div { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 .32em; }
  .shabbat-times-card dd.clock-value { font-size: clamp(16px, min(10cqw,17cqh),30px); }
}

.screen .join-panel {
  --join-height: clamp(104px,16vh,152px);
  height: var(--join-height); min-height: var(--join-height); padding: .25em .45em;
}
.screen .join-panel header { justify-content: center; border: 0; padding: 0 0 .15em; }
.screen .join-panel h2 {
  border: 0; padding: 0; font: 700 clamp(13px,1.25vw,24px)/1.15 var(--serif);
  text-align: center; text-wrap: balance;
}
.screen .join-panel .board-codes {
  flex: 1; min-height: 0; container-type: size;
  grid-template-columns: repeat(2,minmax(0,1fr)); grid-template-rows: minmax(0,1fr); gap: .3em;
}
.screen .join-panel .scan {
  display: flex; flex-direction: row; align-items: center; justify-content: center; min-height: 0; min-width: 0;
  gap: .28em; padding: 2px; border: 1px solid var(--line); border-radius: .4em;
}
.screen .join-panel .scan img {
  display: block; width: min(50%,91cqh,96px); height: auto; aspect-ratio: 1;
}
.screen .join-panel .scan strong { font: 700 clamp(12px,.9vw,17px)/1.15 var(--sans); }
@container memorial-rail (max-width: 230px) {
  .screen .join-panel { --join-height: 128px; padding: 2px; }
  .screen .join-panel h2 { font-size: 13px; }
  .screen .join-panel .scan { flex-direction: column; gap: 1px; padding: 1px; }
  .screen .join-panel .scan img { width: min(100%,60cqh,66px); }
  .screen .join-panel .scan strong { font-size: 11px; }
}

.screen .lessons:has(> .gabbai-notices) {
  grid-template-rows: auto minmax(0,1fr) minmax(3.5em,.55fr);
}
.screen .lessons > .gabbai-notices {
  grid-area: 3 / 1; min-height: 0; padding: .18em 0 0;
  border: 0; border-top: 1px solid var(--line); border-radius: 0; box-shadow: none;
}
.screen .gabbai-notices header { padding: 0; border: 0; }
.screen .gabbai-notices header h3 { font: 700 1em/1.15 var(--sans); color: var(--ink); }
.screen .gabbai-notices .items { margin: 0; padding: 0; }
.screen .gabbai-notices article { padding: .12em 0; }
.screen .gabbai-notices p { margin: 0; font-size: .9em; line-height: 1.25; overflow-wrap: anywhere; }

#netz-screen:not([hidden]){
 background:#15243a linear-gradient(105deg,rgba(10,23,42,.56),rgba(10,25,44,.47),rgba(12,26,44,.58));
 background-image:linear-gradient(180deg,rgba(13,23,42,.48),rgba(10,24,41,.38) 48%,rgba(9,21,36,.68)),url('/assets/synagogue-jerusalem-dawn.webp');
 background-size:cover;background-position:center;gap:clamp(4px,1.3vmin,18px);
 text-shadow:0 2px 10px #122137,0 2px 24px #122137;
}
#netz-screen-title{max-width:95%;text-wrap:balance;font:700 clamp(1.8rem,7vmin,7rem)/1.12 Georgia,'Times New Roman',serif;color:#fff3ce}
#netz-screen .netz-caption{margin:.35em 0 0;font:600 clamp(.95rem,2.7vmin,2rem)/1.2 var(--sans);color:#fff6e2}
#netz-screen-time{color:white;font-size:min(28vw,30vh);line-height:.97}
#netz-demo-link{border-radius:5px;background:#142943ae}
@media(max-height:420px){#netz-screen:not([hidden]){gap:2px}#netz-screen-title{font-size:clamp(18px,6.8vmin,40px)}#netz-screen-time{font-size:min(23vw,22vh)}#netz-demo-link{padding:2px}}

/* Keep every prayer in the timetable throughout each rotation. */
.screen .prayer-column .items,
.screen .prayer-column .items.measure-prayers { display: flex; flex-direction: column; padding-block: 0; }
.screen .prayer-column .items > * { flex: 1 0 auto; }
.screen .prayer-column .items.measure-prayers > * { flex: 0 0 auto; }
.weekday-times {
  display: grid; grid-area: 2 / 1 / 3 / -1; grid-template-columns: repeat(6,minmax(0,1fr));
  gap: 1px; background: #edf2f5; border-radius: 4px; text-align: center;
}
.weekday-times > span { display: grid; align-content: center; padding-block: 1px; font: 600 clamp(10px,.84vw,16px)/1.1 var(--sans); }
.weekday-times time { font-variant-numeric: tabular-nums; }
.weekday-times [aria-current] { color: white; background: #36556a; border-radius: 3px; }
.screen { --community-art-height: clamp(76px,13vh,165px); }
.screen .community-column { grid-template-rows: minmax(0,1fr) minmax(0,1fr) var(--community-art-height); }
.tehillim-card {
  position: relative; isolation: isolate; overflow: hidden; display: grid; align-items: center;
  min-width: 0; border-radius: .5em; border: 1px solid #a68253; background: #30251e; color: #fff;
}
.tehillim-card img, .tehillim-screen > img {
  position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; object-position: 25% 48%;
}
.tehillim-card::before, .tehillim-screen::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(to left,rgba(31,23,20,.96),rgba(31,23,20,.8) 39%,transparent 67%);
}
.tehillim-card > div { padding-inline: 5% 37%; }
.tehillim-card h2 { margin: 0; color: #fff9e9; font: 750 clamp(19px,2.05vw,44px)/1.1 var(--serif); }
.tehillim-card p { margin: .28em 0 0; color: #f8db9d; font: 650 clamp(13px,1.14vw,25px)/1.2 var(--sans); }
body.screen:has(.sabbath-announcement:not([hidden])) { height: 100dvh; overflow: hidden; }
body.screen:has(.sabbath-announcement:not([hidden])) > :not(#board),
.screen #board:has(.sabbath-announcement:not([hidden])) > :not(.sabbath-announcement) { display: none; }
.sabbath-announcement[hidden] { display: none; }
.sabbath-announcement {
  isolation: isolate; position: fixed; inset: 0; z-index: 100; display: flex;
  align-items: center; overflow: hidden; color: #fff9e9; background: #30251e;
}
.sabbath-announcement .announcement-copy { padding: 5vw 6vw; width: 53%; box-sizing: border-box; }
.sabbath-announcement h2 { margin: 0; font: 750 clamp(36px,6.8vw,138px)/1.08 var(--serif); color: inherit; }
.sabbath-announcement p { margin: .65em 0 0; font: 550 clamp(21px,2.6vw,55px)/1.3 var(--sans); }
.sabbath-announcement .event-time { font-weight: 750; color: #f4d596; font-variant-numeric: tabular-nums; }
.rabbi-screen { background: linear-gradient(120deg,#192939,#172c41 72%,#243b4b); }
.rabbi-screen > img { position: absolute; inset-inline-end: 0; width: 46%; height: 100%; object-fit: cover; object-position: 50% 24%; }
.rabbi-screen .rabbi-name { color: #f4d596; font-family: var(--serif); font-size: clamp(26px,4vw,84px); }
@media (max-width:700px) and (orientation:portrait), (max-height:550px) and (orientation:landscape) {
  .screen { --community-art-height: clamp(48px,7vh,70px); }
  .screen .community-column[data-view] { grid-template-rows: auto minmax(0,1fr) var(--community-art-height); }
  .screen .community-column .tehillim-card { grid-area: 3 / 1; }
  .tehillim-card h2 { font-size: clamp(17px,2.7vh,24px); }
  .tehillim-card p { margin-top: 1px; font-size: 13px; }
  .screen .prayer-column > .panel { padding-block: 2px; }
  .screen .prayer-column > .panel > header { padding-block: 1px; }
}
@media (orientation:portrait) {
  .sabbath-announcement { align-items: flex-end; }
  .sabbath-announcement .announcement-copy { width: 100%; padding: 5vh 7vw 7vh; }
  .tehillim-screen > img { height: 70%; object-position: 19% center; }
  .tehillim-screen::before { background: linear-gradient(to top,#30251e 30%,transparent 65%); }
  .rabbi-screen > img { top: 0; width: 100%; height: 56%; object-position: 50% 24%; }
  .rabbi-screen .announcement-copy { padding-block: 3vh 5vh; }
}

.screen .tehillim-card[hidden], .oil-flame[hidden] { display: none; }
.screen .hanukkah-card {
  direction: rtl; display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.55fr);
  align-items: center; background: #0a1222; border-color: #a4874d;
}
.hanukkah-card::before { display: none; }
.hanukkah-card > .hanukkah-copy { z-index: 1; padding: 0 9% 0 0; }
.hanukkah-card h2 { text-wrap: balance; color: #fff2cd; }
.hanukkah-card p { color: #efcd85; }
.hanukkah-card figure {
  min-width: 0; height: 100%; margin: 0; padding: 0 3%; display: grid; align-items: center;
}
.oil-lamps { direction: ltr; position: relative; width: 100%; }
.hanukkah-card .oil-lamps img { position: static; display: block; width: 100%; height: auto; }
.oil-flame {
  position: absolute; transform: translate(-50%,-100%); border-radius: 80% 12% 65% 40%;
  background: radial-gradient(ellipse at 52% 73%,#fffef1 0 21%,#fff5ae 32%,#ffca58 61%,#ff9535 87%);
  box-shadow: 0 0 4px 1px #ffbd4eab, 0 0 10px 2px #ffab384d;
}
.hanukkah-card { background: linear-gradient(95deg,#020619,#101824); }
.oil-lamps img { mask-image: linear-gradient(to right,transparent,#000 1.5%,#000 98.5%,transparent); }
.oil-flame { width: 2.1%; height: 21%; top: 44.3%; }
.oil-flame[data-lamp="8"] { left: 7.73%; }
.oil-flame[data-lamp="7"] { left: 18.42%; }
.oil-flame[data-lamp="6"] { left: 29.02%; }
.oil-flame[data-lamp="5"] { left: 39.73%; }
.oil-flame[data-lamp="0"] { left: 50.22%; top: 36.4%; }
.oil-flame[data-lamp="4"] { left: 60.84%; }
.oil-flame[data-lamp="3"] { left: 71.43%; }
.oil-flame[data-lamp="2"] { left: 82.04%; }
.oil-flame[data-lamp="1"] { left: 92.6%; }

.screen .community-column:not(:has(.tehillim-card:not([hidden]))) {
  grid-template-rows: repeat(2,minmax(0,1fr));
}
@media (max-width:700px) and (orientation:portrait), (max-height:550px) and (orientation:landscape) {
  .screen .community-column[data-view]:not(:has(.tehillim-card:not([hidden]))) {
    grid-template-rows: auto minmax(0,1fr);
  }
}

.screen .community-column:has(> .shabbat-welcome:not([hidden])) > :is(.community-choices,.halachot,.lessons),
.shabbat-welcome[hidden] { display: none; }
.screen .community-column:has(> .shabbat-welcome:not([hidden])) + .memorial-column {
  grid-template-rows: var(--memorial-min,max-content) minmax(max-content,1fr) var(--community-art-height);
}
.screen .community-column:has(> .shabbat-welcome:not([hidden])) + .memorial-column > .weekly-portion {
  display: none;
}
.memorial-column > .halachot { min-height: max-content; }
.memorial-column > .halachot .halachot-body {
  overflow: visible; font-size: clamp(13px,1.04vw,22px);
}
.memorial-column > .halachot .halachot-body article {
  line-height: 1.27; padding-block: .2em;
}
.shabbat-demo-return { color: #f5d89e; text-underline-offset: .14em; }
.shabbat-welcome {
  grid-area: 1 / 1 / 3 / 2; position: relative; isolation: isolate; container-type: size;
  min-height: 0; min-width: 0; overflow: hidden; display: flex; align-items: end;
  color: #fff7df; border-radius: .6em; border: 1px solid #9d8153; background: #161f24;
}
.shabbat-welcome::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(to top,#0d1820 0%,rgba(13,24,32,.92) 21%,rgba(13,24,32,.48) 42%,transparent 65%);
}
.shabbat-welcome::after {
  content: ""; position: absolute; inset: 5px; border: 1px solid #fff1ce66;
  border-radius: .35em; pointer-events: none;
}
.shabbat-welcome .portion-art img { object-position: 45% 35%; }
.welcome-copy { width: 100%; padding: 5% 5% clamp(10px,4cqh,34px); box-sizing: border-box; text-align: center; }
.welcome-copy h2 { margin: 0; color: #fff5da; font: 700 clamp(24px,min(13cqw,16cqh),80px)/1.07 var(--serif); text-shadow: 0 2px 8px #12202a; }
.welcome-copy p { margin: .18em 0 .75em; color: #fee4ad; font: 700 clamp(15px,min(6.5cqw,9cqh),40px)/1.2 var(--serif); }
.welcome-copy .portion-times {
  display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); margin: 0; padding-block-start: .5em;
  border-top: 1px solid #e9c58c88;
}
.welcome-copy .portion-times div { display: grid; gap: .12em; justify-items: center; }
.welcome-copy .portion-times div + div { border-inline-start: 1px solid #e9c58c66; }
.welcome-copy .portion-times dt { font-size: clamp(12px,min(4.5cqw,7cqh),24px); }
.welcome-copy .portion-times dd { color: #fff; font-size: clamp(17px,min(8.4cqw,10cqh),46px); }
@container (max-height: 165px) {
  .welcome-copy { padding-block: 6px; }
  .welcome-copy p { margin: .05em 0 .25em; }
  .welcome-copy .portion-times { padding-block-start: 2px; }
}
