/* Alekscreen display — themeable, tuned for a 1080p TV.
   Sizes use vh/vw so it scales to any screen; --fs is the admin font-scale. */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root { --fs: 1; }

/* ---------- themes ---------- */
body {
  /* midnight (default): deep navy + gold */
  --bg-0: #0b1020;
  --bg-1: #101832;
  --glow-a: #1c2952;
  --glow-b: #14204a;
  --card: rgba(23, 33, 64, 0.72);
  --card-edge: rgba(212, 175, 55, 0.28);
  --card-top: rgba(232, 207, 133, 0.18);
  --gold: #d4af37;
  --gold-soft: #e8cf85;
  --ink: #f2ecdc;
  --ink-dim: #a9b0c7;
  --accent: #7fa8ff;
  --zebra: rgba(255, 255, 255, 0.025);
  --next-bg: rgba(212, 175, 55, 0.14);
  --shadow: 0 1vh 3vh rgba(0, 0, 0, 0.35);
  --banner-bg: linear-gradient(90deg, rgba(212,175,55,0.22), rgba(212,175,55,0.08));
}

body[data-theme="royal"] {
  --bg-0: #0c1533;
  --bg-1: #14245c;
  --glow-a: #23409c;
  --glow-b: #1a2f75;
  --card: rgba(26, 42, 92, 0.72);
  --card-edge: rgba(158, 185, 255, 0.30);
  --card-top: rgba(198, 216, 255, 0.20);
  --gold: #e3c56b;
  --gold-soft: #f0dda2;
  --ink: #f4f2ea;
  --ink-dim: #aebadb;
  --accent: #9db9ff;
  --zebra: rgba(255, 255, 255, 0.03);
  --next-bg: rgba(227, 197, 107, 0.16);
  --banner-bg: linear-gradient(90deg, rgba(157,185,255,0.22), rgba(157,185,255,0.07));
}

body[data-theme="burgundy"] {
  --bg-0: #180810;
  --bg-1: #2a0f1c;
  --glow-a: #571d33;
  --glow-b: #3d1425;
  --card: rgba(62, 22, 38, 0.72);
  --card-edge: rgba(217, 176, 76, 0.30);
  --card-top: rgba(240, 216, 150, 0.16);
  --gold: #d9b04c;
  --gold-soft: #ecd394;
  --ink: #f6ecdd;
  --ink-dim: #c2a4ab;
  --accent: #e8909f;
  --zebra: rgba(255, 255, 255, 0.025);
  --next-bg: rgba(217, 176, 76, 0.15);
  --banner-bg: linear-gradient(90deg, rgba(217,176,76,0.24), rgba(217,176,76,0.08));
}

body[data-theme="ivory"] {
  --bg-0: #efe8d6;
  --bg-1: #f7f2e5;
  --glow-a: #fffdf4;
  --glow-b: #ece1c6;
  --card: rgba(255, 253, 247, 0.85);
  --card-edge: rgba(150, 122, 40, 0.35);
  --card-top: rgba(255, 255, 255, 0.9);
  --gold: #96741c;
  --gold-soft: #7d6015;
  --ink: #232a45;
  --ink-dim: #6d7186;
  --accent: #35508f;
  --zebra: rgba(35, 42, 69, 0.035);
  --next-bg: rgba(150, 116, 28, 0.12);
  --shadow: 0 0.8vh 2.4vh rgba(80, 60, 20, 0.14);
  --banner-bg: linear-gradient(90deg, rgba(150,116,28,0.16), rgba(150,116,28,0.05));
}

body[data-theme="luach"] {
  /* classic printed luach: parchment, gold frames, black serif Hebrew */
  --bg-0: #ece5d3;
  --bg-1: #f8f4ea;
  --glow-a: #fffdf6;
  --glow-b: #e3dbc5;
  --card: #fdfbf4;
  --card-edge: rgba(163, 130, 42, 0.6);
  --card-top: rgba(255, 255, 255, 0.85);
  --gold: #a3822a;
  --gold-soft: #8a6d1d;
  --ink: #17140f;
  --ink-dim: #6f6a5c;
  --accent: #17140f;
  --zebra: rgba(90, 70, 20, 0.045);
  --next-bg: rgba(163, 130, 42, 0.15);
  --shadow: 0 0.6vh 2vh rgba(100, 80, 30, 0.13);
  --banner-bg: linear-gradient(90deg, rgba(163,130,42,0.16), rgba(163,130,42,0.05));
}

:root {
  --serif: "Cormorant Garamond", "Frank Ruhl Libre", Georgia, serif;
  --hebrew: "Frank Ruhl Libre", "Heebo", "David Libre", serif;
  --sans: "Heebo", "Segoe UI", Arial, sans-serif;
}

html, body { height: 100%; overflow: hidden; cursor: none; }

body {
  background:
    radial-gradient(120vw 80vh at 50% -20%, var(--glow-a) 0%, transparent 60%),
    radial-gradient(80vw 60vh at 100% 110%, var(--glow-b) 0%, transparent 55%),
    linear-gradient(170deg, var(--bg-1), var(--bg-0) 70%);
  color: var(--ink);
  font-family: var(--sans);
}

#screen {
  height: 100vh;
  display: grid;
  grid-template-rows: 17.5vh 1fr auto;
  gap: 1.2vh;
  padding: 1.2vh 1.2vw 0;
}
#screen.no-ticker { grid-template-rows: 17.5vh 1fr; }

/* ---------- header ---------- */
#header {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  /* bottom padding keeps the gold hairline clear of the letterhead address */
  padding: 0 1.6vw 1vh;
}
#header::after {
  /* gold hairline with a centered diamond ornament */
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold) 18%, var(--gold) 82%, transparent);
  opacity: 0.55;
}
#header .ornament {
  position: absolute;
  bottom: -0.85vh;
  left: 50%;
  transform: translateX(-50%);
  color: var(--gold);
  font-size: 1.5vh;
  background: transparent;
  line-height: 1;
}

.head-side { align-self: center; }
.head-clock { text-align: left; }
#clock {
  /* Frank Ruhl Libre: plain (lining) digits like the zmanim times — the old-style
     digits of the serif font made the 9 look like an eye */
  font-family: var(--hebrew);
  font-size: calc(4.5vh * var(--fs));
  font-weight: 600;
  line-height: 1;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
/* AM / PM sits on the clock's own line, right after the digits */
#clock { display: inline-block; vertical-align: baseline; }
#seconds-row { display: inline-block; vertical-align: baseline; margin-inline-start: 0.5vw; font-family: "Cormorant Garamond", var(--serif); font-size: calc(2vh * var(--fs)); font-weight: 600; color: var(--gold); letter-spacing: 0.12em; }

/* ---------- letterhead ---------- */
.letterhead {
  text-align: center;
  align-self: start;
  padding-top: 0.4vh;
  min-width: 0;
}
.letterhead-img {
  max-height: 14.5vh;
  max-width: 46vw;
  object-fit: contain;
}
/* On dark themes, a black letterhead image is inverted to parchment tones
   (light themes — ivory, luach — show it as-is) */
body:not([data-theme="ivory"]):not([data-theme="luach"]):not([data-theme="marble"]):not([data-theme="lobby"]) .letterhead-img.invert {
  filter: invert(0.92) sepia(0.35) saturate(1.6) hue-rotate(5deg);
}
/* marble is a LIGHT theme: the logo is not inverted but tinted the headings'
   gold #8d6f20 (black → gold; chain computed for that exact color) */
body[data-theme="marble"] .letterhead-img {
  filter: brightness(0) saturate(100%) invert(84%) sepia(33%) saturate(7768%) hue-rotate(8deg) brightness(63%) contrast(75%);
}

.arch-svg { width: 44vw; height: 8.2vh; display: block; margin: 0 auto; }
.arch-text {
  font-family: var(--hebrew);
  font-weight: 700;
  font-size: 64px; /* viewBox units — scales with the SVG */
  fill: var(--gold-soft);
  letter-spacing: 2px;
}
.lh-line2 {
  font-family: var(--hebrew);
  font-weight: 700;
  font-size: calc(2.6vh * var(--fs));
  color: var(--ink);
  direction: rtl;
  margin-top: 0.2vh;
}
.lh-line2::before, .lh-line2::after { content: "❦"; color: var(--gold); font-size: 0.75em; margin: 0 0.8vw; font-weight: 400; }
.lh-line3 {
  font-family: var(--hebrew);
  font-size: calc(2vh * var(--fs));
  color: var(--ink-dim);
  direction: rtl;
  margin-top: 0.1vh;
}
.lh-line3::before, .lh-line3::after { content: "—"; color: var(--card-edge); margin: 0 0.8vw; }
.lh-address {
  font-family: var(--sans);
  font-size: calc(1.6vh * var(--fs));
  letter-spacing: 0.06em;
  color: var(--ink-dim);
  margin-top: 0.2vh;
}

.head-right { text-align: right; }
.date-he { font-family: var(--hebrew); font-size: calc(3vh * var(--fs)); color: var(--gold-soft); direction: rtl; }
.parsha { font-family: var(--serif); font-size: calc(2.2vh * var(--fs)); color: var(--accent); }

/* ---------- main grid ---------- */
#main {
  display: grid;
  grid-template-columns: 24vw 1fr 24vw;
  gap: 1.2vw;
  min-height: 0;
}
#main.no-left { grid-template-columns: 1fr 24vw; }
#main.no-right { grid-template-columns: 24vw 1fr; }
#main.no-left.no-right { grid-template-columns: 1fr; }
#main.no-left .col-a { display: none; }
#main.no-right .col-b { display: none; }

.center-col, .col-a, .col-b { display: flex; flex-direction: column; gap: 1.2vh; min-height: 0; overflow: hidden; }
/* Cards stay in place and share the column; when a card's CONTENT is too
   long, only the list inside it auto-scrolls (data-autoscroll) — the card
   and its title never move */
.col-a > .card, .col-b > .card, .center-col > .card { flex: 1 1 auto; min-height: 0; }
.col-a .card, .col-b .card, .center-col .card { display: flex; flex-direction: column; }
.col-a .card h2, .col-b .card h2, .center-col .card h2 { flex: 0 0 auto; }
.card .time-list, .card .limud-list, .card .sec-items, .card .sec-scroll { flex: 1; min-height: 0; overflow: hidden; }

/* ---------- web / pdf sections (live site or PDF inside a card) ----------
   direction:ltr — the media box holds only an iframe; in the RTL luach layout
   an oversized (zoomed-out) iframe would otherwise overflow leftward and the
   scaled page would land outside the panel */
.section-card .sec-web { flex: 1; overflow: hidden; border-radius: 1vh; min-height: 0; direction: ltr; }
.section-card .sec-web iframe {
  width: 100%; height: 100%; border: 0; display: block; background: #fff;
}

/* events list scrolls by itself when long */
.events-card { display: flex; flex-direction: column; }
.event-list { flex: 1; overflow: hidden; min-height: 0; }

.card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--card-edge);
  border-radius: 1.6vh;
  padding: 1.6vh 1.4vw;
  box-shadow: var(--shadow), inset 0 1px 0 var(--card-top);
  overflow: hidden;
  min-height: 0;
}

.card h2 {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-bottom: 0.9vh;
  margin-bottom: 1vh;
}
.card h2::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, var(--gold), transparent 65%);
  opacity: 0.5;
}
.card h2 .he { font-family: var(--hebrew); font-size: calc(2.8vh * var(--fs)); color: var(--gold); direction: rtl; }

/* the loop-scroll engine moves this wrapper (startAutoScroll) */
.as-track { will-change: transform; }

/* ---------- zmanim / shabbos lists ---------- */
.zmanim-card { display: flex; flex-direction: column; }
.zmanim-card ul { flex: 1; display: flex; flex-direction: column; justify-content: space-evenly; }

.time-list { list-style: none; }
.time-list li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.6vw;
  padding: 0.25vh 0.5vw;
  font-size: calc(2.05vh * var(--fs));
  white-space: nowrap;
  border-radius: 0.7vh;
}
.time-list li:nth-child(even) { background: var(--zebra); }
.time-list .n { color: var(--ink); overflow: hidden; text-overflow: ellipsis; font-family: var(--hebrew); }
/* plaintext bidi: clock times stay LTR, Hebrew dates stay RTL, on every theme */
.time-list .t { font-variant-numeric: tabular-nums; color: var(--gold-soft); font-weight: 500; unicode-bidi: plaintext; }

/* passed zmanim fade; the next zman glows */
.time-list li.past { opacity: 0.45; }
.time-list li.next {
  background: var(--next-bg);
  box-shadow: inset 0.3vw 0 0 var(--gold);
  opacity: 1;
}
.time-list li.next .t { color: var(--gold); font-weight: 700; }

/* ---------- editable sections (each its own card, placeable in any column) ---------- */
.sec-items { list-style: none; column-gap: 2vw; }
.sec-items.two-col { display: grid; grid-auto-flow: column; grid-template-columns: 1fr 1fr; column-gap: 2vw; align-content: start; }
.sec-items li {
  display: flex;
  justify-content: space-between;
  break-inside: avoid;
  align-items: baseline; /* the time lines up with the label's first line, a note under it stays below */
  font-size: calc(2.3vh * var(--fs));
  padding: 0.25vh 0.4vw;
  border-radius: 0.7vh;
  font-family: var(--hebrew);
}
.sec-items li:nth-child(even) { background: var(--zebra); }
/* header line inside a times list — e.g. חול / שבת / יום טוב */
.sec-items li.times-header {
  display: block;
  text-align: center;
  color: var(--gold);
  font-weight: 700;
  font-size: calc(2.3vh * var(--fs));
  border-bottom: 1px solid var(--card-edge);
  background: none !important;
  padding: 0.7vh 0 0.3vh;
  break-after: avoid;
}

/* simchas-type section: one mazel tov per line, mixed Hebrew/English safe */
.sec-simchas li { unicode-bidi: plaintext; }
/* sponsorship-type section: centered dedication lines */
.sec-sponsors li { justify-content: center; text-align: center; unicode-bidi: plaintext; }

/* sponsorship board: big headers, sponsorship blocks (what / by whom /
   dedication), hairline separators like a printed parnes board */
.sponsor-board { flex: 1; min-height: 0; overflow: hidden; direction: rtl; font-family: var(--hebrew); }
.sponsor-board .sp-header {
  text-align: center;
  font-weight: 700;
  color: var(--gold);
  font-size: calc(2.7vh * var(--fs));
  padding: 0.8vh 0 0.5vh;
  border-bottom: 1px solid var(--card-edge);
}
.sponsor-board .sp-header:not(:first-child) { margin-top: 0.8vh; }
.sponsor-board .sp-item {
  text-align: center;
  padding: 0.6vh 0.4vw;
  border-bottom: 1px solid var(--zebra);
}
.sponsor-board .sp-title { font-weight: 700; font-size: calc(2.2vh * var(--fs)); }
.sponsor-board .sp-names { font-size: calc(1.85vh * var(--fs)); color: var(--ink-dim); unicode-bidi: plaintext; }
.sponsor-board .sp-n { white-space: nowrap; }
.sponsor-board .sp-sep { color: var(--gold); margin: 0 0.55em; }
.sponsor-board .sp-ded { font-size: calc(1.7vh * var(--fs)); color: var(--gold-soft); unicode-bidi: plaintext; }

/* featured sponsor — one sponsor alone, big, for its date range */
.sponsor-solo {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 1.2vh;
  direction: rtl;
  font-family: var(--hebrew);
}
.sponsor-solo .ss-text { font-size: calc(3.6vh * var(--fs)); font-weight: 700; color: var(--gold); unicode-bidi: plaintext; }
.sponsor-solo .ss-sub { font-size: calc(2.3vh * var(--fs)); color: var(--ink); unicode-bidi: plaintext; }

/* per-section smaller panel titles (settings in the panel dialog) */
.card.title-small h2 .he { font-size: calc(2.1vh * var(--fs)); }
.card.title-tiny h2 .he { font-size: calc(1.6vh * var(--fs)); }
.card.title-small h2, .card.title-tiny h2 { padding-bottom: 0.5vh; margin-bottom: 0.6vh; }
body[data-theme="luach"] .card.title-small h2 .he { font-size: calc(2.3vh * var(--fs)); }
body[data-theme="luach"] .card.title-tiny h2 .he { font-size: calc(1.8vh * var(--fs)); }

/* donors board — replica of the קרן הבנין fundraiser screen (dark slate
   gradient, gold header, light pill rows), in the display's own font */
.section-card.donor-card {
  background: linear-gradient(135deg, #3d4a4f 0%, #2d3a3f 50%, #4a5558 100%);
  border-color: rgba(0, 0, 0, 0.35);
  padding: 1vh 0.8vw;
}
.donor-board { flex: 1; min-height: 0; display: flex; gap: 1vw; direction: rtl; }
.db-side {
  flex: 0 0 27%; position: relative; overflow: hidden;
  display: flex; flex-direction: column; align-items: center;
  padding-top: 2vh; text-align: center; font-family: var(--hebrew);
}
.db-logo {
  position: absolute; bottom: 1vh; left: 50%; transform: translateX(-50%);
  width: 75%; opacity: 0.5; z-index: 0;
}
.db-t1 {
  font-size: calc(4.4vh * var(--fs)); font-style: italic; font-weight: 700;
  color: #d4c5a0; position: relative; z-index: 1; margin-bottom: 0.6vh;
}
.db-t2 {
  font-size: calc(3.2vh * var(--fs)); color: #c9b37a; line-height: 1.3;
  position: relative; z-index: 1;
}
.db-t3 {
  font-size: calc(2.8vh * var(--fs)); color: #c9b37a; font-style: italic;
  position: relative; z-index: 1; margin-top: 0.6vh;
}
.db-main { flex: 1; min-width: 0; display: flex; flex-direction: column; min-height: 0; }
.db-cols {
  display: flex; align-items: center; gap: 0.6vw; flex: none;
  background: rgba(0, 0, 0, 0.3); border-radius: 0.9vh;
  padding: 0.9vh 1vw; margin-bottom: 0.8vh;
  color: #f5d67a; font-weight: 700; font-family: var(--hebrew);
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}
.db-cols .c1 { flex: 1; font-size: calc(2.6vh * var(--fs)); }
.db-cols .c2 { width: 5.8em; text-align: center; white-space: nowrap; font-size: calc(1.8vh * var(--fs)); }
.donor-scroll { flex: 1; min-height: 0; overflow: hidden; }
.donor-list { list-style: none; will-change: transform; }
.donor-list li {
  display: flex; align-items: center; gap: 0.5vw;
  background: rgba(200, 200, 200, 0.95); border-radius: 99vh;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.25);
  padding: 0.6vh 1vw; margin: 0.8vh 0.2vw;
  font-family: var(--hebrew); font-size: calc(2.1vh * var(--fs));
}
.donor-list .dn {
  flex: 1; min-width: 0; font-weight: 700; color: #1a1a1a;
  unicode-bidi: plaintext; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  text-shadow: 0 1px 1px rgba(255, 255, 255, 0.5);
}
.donor-list .dprog { display: flex; align-items: center; gap: 0.4vw; flex: none; direction: ltr; }
.donor-list .dbar {
  width: 5vw; height: 1.6vh; border-radius: 1vh; overflow: hidden;
  background: #cfcfcf;
}
.donor-list .dbar i {
  display: block; height: 100%; border-radius: 1vh;
  background: linear-gradient(90deg, #f5a623 0%, #e09000 100%);
}
.donor-list .dbar i.full { background: linear-gradient(90deg, #5fd47a 0%, #2d8a4e 100%); }
.donor-list .dpct {
  width: 2.5em; text-align: center; font-weight: 800; color: #111;
  font-variant-numeric: tabular-nums;
}
.donor-list .damt {
  width: 5.6em; text-align: center; font-weight: 800; color: #111;
  font-variant-numeric: tabular-nums; direction: ltr; unicode-bidi: isolate;
  font-size: 0.75em;
}
.sec-items .v { color: var(--gold-soft); font-variant-numeric: tabular-nums; font-weight: 500; unicode-bidi: plaintext; flex: none; } /* plaintext: "8:45 PM" stays in that order inside an RTL panel */

/* text-type section */
.section-card .sec-rich {
  flex: 1; min-height: 0; overflow: hidden;
  padding: 0.4vh 1vw;
  font-size: calc(2.3vh * var(--fs)); line-height: 1.5;
  font-family: var(--hebrew); unicode-bidi: plaintext; direction: rtl;
}
.section-card .sec-rich h1, .section-card .sec-rich h2, .section-card .sec-rich h3 { color: var(--gold); margin: 0.6vh 0; }
.section-card .sec-rich ul, .section-card .sec-rich ol { padding-inline-start: 2vw; }

/* image-type section */
.section-card .sec-image { flex: 1; min-height: 0; }
.section-card .sec-image img { width: 100%; height: 100%; object-fit: contain; display: block; }

/* ---------- events ---------- */
.events-card { flex: 1; }
.event-list { list-style: none; }
.event-list li { display: flex; gap: 0.9vw; align-items: baseline; padding: 0.6vh 0; font-size: calc(2.1vh * var(--fs)); }
.event-list .d {
  min-width: 8.2vw;
  text-align: center;
  color: var(--accent);
  border: 1px solid var(--card-edge);
  border-radius: 999px;
  padding: 0.15vh 0.7vw;
  font-size: calc(1.65vh * var(--fs));
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  unicode-bidi: plaintext;
}
.event-list .tt { color: var(--ink); }
.event-list .tm { color: var(--gold-soft); margin-inline-start: auto; font-variant-numeric: tabular-nums; white-space: nowrap; }
.event-list .desc { color: var(--ink-dim); font-size: calc(1.7vh * var(--fs)); }

/* ---------- holiday banner ---------- */
.holiday-banner {
  background: var(--banner-bg);
  border: 1px solid var(--gold);
  border-radius: 1.2vh;
  text-align: center;
  padding: 1vh;
  font-family: var(--hebrew);
  font-size: calc(3vh * var(--fs));
  color: var(--gold-soft);
}
.hidden { display: none !important; }

/* ---------- limudim ---------- */
.limud-list { list-style: none; }
.limud-list li { padding: 0.35vh 0.4vw; font-size: calc(2vh * var(--fs)); display: flex; justify-content: space-between; gap: 1vw; border-radius: 0.7vh; font-family: var(--hebrew); }
.limud-list li:nth-child(even) { background: var(--zebra); }
.limud-list .l { color: var(--ink-dim); white-space: nowrap; }
.limud-list .txt { color: var(--ink); text-align: right; font-family: var(--hebrew); }

/* ---------- simchas ---------- */
.simcha-card { flex: 1; display: flex; flex-direction: column; }
.simcha-card::before {
  /* inner decorative frame */
  content: "";
  position: absolute;
  inset: 0.9vh;
  border: 1px solid var(--card-edge);
  border-radius: 1.1vh;
  pointer-events: none;
}
/* all simchas as a centered list (loop-scrolls when long): the person big,
   the occasion smaller beneath */
.simcha-list {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  list-style: none;
  text-align: center;
  font-family: var(--serif);
  padding: 0 1vw;
  direction: rtl;
}
.simcha-list li { padding: 0.6vh 0; unicode-bidi: plaintext; }
.simcha-list .sz-big { font-size: 1.4em; }
.simcha-list .sz-small { font-size: 0.72em; opacity: 0.85; }
.simcha-list .s1 {
  font-size: calc(2.6vh * var(--fs));
  color: var(--gold-soft);
  font-weight: 600;
  line-height: 1.3;
}
.simcha-list .s2 {
  font-size: calc(1.9vh * var(--fs));
  color: var(--ink);
  opacity: 0.85;
  line-height: 1.35;
  margin-top: 0.3vh;
}
@keyframes fadeIn { from { opacity: 0; transform: translateY(1vh); } to { opacity: 1; } }

/* ---------- Luach Classic theme: structure ---------- */
body[data-theme="luach"] {
  background:
    radial-gradient(45vw 40vh at 12% 18%, rgba(120,110,95,0.10), transparent 60%),
    radial-gradient(50vw 45vh at 85% 75%, rgba(120,110,95,0.09), transparent 60%),
    radial-gradient(35vw 30vh at 70% 15%, rgba(140,130,110,0.07), transparent 60%),
    linear-gradient(170deg, var(--bg-1), var(--bg-0) 75%);
}
body[data-theme="luach"] #main { direction: rtl; }
body[data-theme="luach"] .card {
  border: 1px solid var(--card-edge);
  box-shadow: var(--shadow), inset 0 0 0 0.45vh var(--card), inset 0 0 0 calc(0.45vh + 1px) var(--card-edge);
  padding-top: 2vh;
}
body[data-theme="luach"] .card h2 { justify-content: center; }
body[data-theme="luach"] .card h2 .en { display: none; }
body[data-theme="luach"] .card h2 .he { font-size: calc(3.2vh * var(--fs)); font-weight: 700; }
body[data-theme="luach"] .card h2::after {
  left: 15%; right: 15%;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}
body[data-theme="luach"] .time-list li,
body[data-theme="luach"] .sec-items li,
body[data-theme="luach"] .limud-list li { font-family: var(--hebrew); }
body[data-theme="luach"] .time-list .t,
body[data-theme="luach"] .sec-items .v { color: var(--ink); font-weight: 700; }
body[data-theme="luach"] .arch-text { fill: var(--ink); }
body[data-theme="luach"] .lh-line2 { color: var(--ink); }
body[data-theme="luach"] #clock { font-weight: 700; }
body[data-theme="luach"] .head-right { display: flex; flex-direction: column; align-items: flex-end; }
body[data-theme="luach"] .parsha {
  order: -1;
  font-family: var(--hebrew);
  font-size: calc(4vh * var(--fs));
  font-weight: 700;
  color: var(--ink);
  direction: rtl;
}
body[data-theme="luach"] .date-he { font-size: calc(2.2vh * var(--fs)); color: var(--ink); }
/* Frank Ruhl Libre, like the clock: plain digits (Cormorant's old-style 9 looked like an eye) */
#clock-date { font-family: var(--hebrew); font-size: calc(2vh * var(--fs)); color: var(--ink-dim); font-weight: 500; letter-spacing: 0.02em; }

/* AM / PM after a time: smaller than the digits (smallAmPm) */
.ampm { font-size: 0.55em; font-weight: 600; letter-spacing: 0.04em; margin-left: 0.3em; } /* times read left-to-right, so the gap is on the left */

/* small note under a section line (e.g. which minyan/room) */
.sec-items .note { display: block; font-size: 0.6em; color: var(--ink-dim); font-weight: 400; line-height: 1.3; }
.sec-items .note.inline { display: inline; margin-inline-start: 0.5em; font-size: 0.65em; }

/* keep clock times reading left-to-right inside the RTL layout
   (.t and .d use unicode-bidi: plaintext globally, which handles both
    Hebrew dates and English times correctly) */
body[data-theme="luach"] .sec-items .v,
body[data-theme="luach"] .limud-list .txt,
body[data-theme="luach"] .event-list .tm { direction: ltr; unicode-bidi: isolate; }
body[data-theme="luach"] .event-list li { direction: ltr; }

/* ---------- ticker ---------- */
#ticker-wrap {
  display: flex;
  align-items: center;
  gap: 1vw;
  min-height: 6vh;
  padding: 0.4vh 0;
  border-top: 1px solid var(--card-edge);
  overflow: hidden;
}
/* the ticker used to start with a gold ♦ marker; dropped at the owner's request */
.ticker {
  flex: 1;
  overflow: hidden;
  white-space: nowrap;
  mask-image: linear-gradient(90deg, transparent, #000 3%, #000 97%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 3%, #000 97%, transparent);
}
#ticker-text {
  display: inline-block;
  padding-left: 100%;
  font-size: calc(2.6vh * var(--fs));
  font-family: var(--hebrew);
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--ink);
  animation: scroll linear infinite;
  animation-duration: 60s;
  unicode-bidi: plaintext; /* mixed Hebrew/English announcements keep word order */
}
/* the divider between ticker entries: a faint hairline, not a character */
.tsep {
  display: inline-block; width: 1px; height: 0.85em; margin: 0 1.6em;
  vertical-align: -0.08em; background: var(--ink); opacity: 0.22;
}
@keyframes scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-100%); }
}
/* Hebrew strips move the other way: the text enters from the left */
#ticker-wrap.dir-right #ticker-text, .strip.dir-right .strip-text { animation-name: scroll-right; }
@keyframes scroll-right {
  from { transform: translateX(-100%); }
  to { transform: translateX(0); }
}

/* a line short enough to fit stands still, centred (fitStrip) */
.ticker.fits, .strip.fits { text-align: center; mask-image: none; -webkit-mask-image: none; }
.ticker.fits #ticker-text, .strip.fits .strip-text { animation: none; padding-left: 0; transform: none; }

/* reminders section: a sideways-scrolling strip inside its card */
.card.strip-card { justify-content: center; }
.strip {
  overflow: hidden;
  white-space: nowrap;
  mask-image: linear-gradient(90deg, transparent, #000 3%, #000 97%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 3%, #000 97%, transparent);
}
.strip-text {
  display: inline-block;
  padding-left: 100%;
  font-size: calc(2.8vh * var(--fs));
  font-family: var(--hebrew);
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--ink);
  animation: scroll linear infinite;
  animation-duration: 60s;
  unicode-bidi: plaintext;
}

/* image / pdf slideshow: two cross-fading layers */
.section-card .sec-slides { position: relative; flex: 1; min-height: 0; overflow: hidden; border-radius: 1vh; direction: ltr; background: transparent; } /* the plaque shows through beside a page that does not fill the panel (the owner did not want black bars) */
.section-card .sec-slides[data-fit="cover"] .slide-layer img { object-fit: cover; }
.section-card .sec-empty { flex: 1; display: flex; align-items: center; justify-content: center; opacity: .55; font-size: calc(2.2vh * var(--fs, 1)); text-align: center; padding: 2vh; } /* a Google Photos panel before its album is read */
.section-card .slide-layer { position: absolute; inset: 0; opacity: 0; transition: opacity 0.7s ease; }
.section-card .slide-layer.on { opacity: 1; }
.section-card .slide-layer img { width: 100%; height: 100%; object-fit: contain; display: block; }
.section-card .slide-layer iframe { width: 100%; height: 100%; border: 0; display: block; background: #fff; }

/* ---------- countdown panel ---------- */
.countdown { flex: 1; display: flex; align-items: center; justify-content: center; gap: 2.5vw; flex-wrap: wrap; }
.cd-unit { text-align: center; min-width: 4.5vw; }
.cd-n {
  font-family: var(--serif); font-weight: 700; line-height: 1;
  font-size: calc(7vh * var(--fs)); color: var(--gold);
  font-variant-numeric: tabular-nums;
}
.cd-l { font-family: var(--hebrew); font-size: calc(2vh * var(--fs)); color: var(--ink-dim); margin-top: 0.6vh; }
.cd-done { font-family: var(--hebrew); font-size: calc(4.5vh * var(--fs)); color: var(--gold); text-align: center; }

/* ---------- pasuk of the day ---------- */
.pasuk { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.2vh; padding: 0 1vw; text-align: center; }
.pasuk-text {
  font-family: var(--hebrew); direction: rtl; unicode-bidi: plaintext;
  font-size: calc(3.2vh * var(--fs)); line-height: 1.5; color: var(--ink);
}
.pasuk-src { font-family: var(--hebrew); direction: rtl; font-size: calc(2vh * var(--fs)); color: var(--gold-soft); }
body[data-theme="luach"] .cd-n, body[data-theme="luach"] .pasuk-src { color: var(--accent); }

/* ============================================================
   Theme: אבני זהב / Marble & Gold — built to sit on the shul's
   own wall: white marble, gold inlay lines, clear acrylic plaques
   on brass standoffs, and black nameplates with gold Hebrew.
   ============================================================ */
body[data-theme="marble"] {
  --bg-0: #eceae4;
  --bg-1: #fbfaf7;
  --glow-a: #ffffff;
  --glow-b: #e7e3da;
  --card: rgba(255, 255, 255, 0.70);
  --card-edge: rgba(176, 141, 58, 0.5);
  --card-top: rgba(255, 255, 255, 0.92);
  --gold: #b08d3a;
  --gold-soft: #8d6f20;
  --ink: #191510;
  --ink-dim: #6d685c;
  --accent: #191510;
  --zebra: rgba(120, 95, 30, 0.04);
  --next-bg: rgba(176, 141, 58, 0.16);
  --shadow: 0 1.2vh 2.6vh rgba(60, 50, 25, 0.16);
  --banner-bg: linear-gradient(90deg, rgba(176,141,58,0.2), rgba(176,141,58,0.05));
}
/* the wall itself: soft marble veining (the two gold inlay lines across it were
   dropped: they showed through the clear panels as a faint blurry line) */
body[data-theme="marble"] {
  background:
    linear-gradient(103deg, transparent 38%, rgba(150,145,135,0.10) 39.4%, transparent 40.6%),
    linear-gradient(97deg, transparent 61%, rgba(150,145,135,0.08) 62.2%, transparent 63.4%),
    radial-gradient(70vw 50vh at 18% 12%, rgba(255,255,255,0.95), transparent 70%),
    radial-gradient(60vw 60vh at 86% 88%, rgba(232,228,219,0.9), transparent 72%),
    linear-gradient(168deg, #fdfcfa, #eeebe4 72%, #e6e2d9);
}
/* a panel is a clear acrylic plaque held off the wall by brass standoffs */
body[data-theme="marble"] .card {
  background: linear-gradient(158deg, rgba(255,255,255,0.9), rgba(255,255,255,0.7));
  border: 1px solid rgba(176,141,58,0.5);
  border-radius: 0.9vh;
  box-shadow: 0 1.4vh 2.8vh rgba(60,50,25,0.16), inset 0 1px 0 rgba(255,255,255,0.95);
  /* room for the standoffs above and the scrollwork below */
  padding: 1.5vh 1.4vw 3.3vh;
}
/* no backdrop-filter blur here: it re-blurred the wall behind every panel on
   every frame a list moved, which the shul's Raspberry Pi could not keep up with */
/* the four brass standoffs */
body[data-theme="marble"] .card::before {
  content: '';
  position: absolute; inset: 0; pointer-events: none; z-index: 2;
  background-repeat: no-repeat;
  background-size: 1.05vh 1.05vh;
  background-position: 0.8vh 0.8vh, calc(100% - 0.8vh) 0.8vh, 0.8vh calc(100% - 0.8vh), calc(100% - 0.8vh) calc(100% - 0.8vh);
  background-image:
    radial-gradient(circle closest-side at 36% 33%, #f6e8c0 0 20%, #cfa852 46%, #8a6c22 82%, rgba(120,95,30,0) 100%),
    radial-gradient(circle closest-side at 36% 33%, #f6e8c0 0 20%, #cfa852 46%, #8a6c22 82%, rgba(120,95,30,0) 100%),
    radial-gradient(circle closest-side at 36% 33%, #f6e8c0 0 20%, #cfa852 46%, #8a6c22 82%, rgba(120,95,30,0) 100%),
    radial-gradient(circle closest-side at 36% 33%, #f6e8c0 0 20%, #cfa852 46%, #8a6c22 82%, rgba(120,95,30,0) 100%);
}
/* the heading is gold lettering straight on the plaque (the owner found the
   black nameplates too heavy) with a thin gold hairline under it */
body[data-theme="marble"] #main { direction: rtl; }
body[data-theme="marble"] .card h2 {
  justify-content: center;
  margin-bottom: 0.9vh;
  padding-bottom: 0.5vh;
}
body[data-theme="marble"] .card h2 .en { display: none; }
body[data-theme="marble"] .card h2 .he {
  color: #8d6f20;
  font-family: var(--hebrew);
  font-weight: 700;
  font-size: calc(3vh * var(--fs));
  letter-spacing: 0.02em;
  text-shadow: 0 1px 0 rgba(255,255,255,0.8);
}
/* a smaller title is also lighter: a long sentence used as a heading reads as a
   caption, not as a plaque name */
body[data-theme="marble"] .card.title-small h2 .he { font-size: calc(2.1vh * var(--fs)); font-weight: 600; }
body[data-theme="marble"] .card.title-tiny h2 .he { font-size: calc(1.55vh * var(--fs)); font-weight: 500; letter-spacing: 0; line-height: 1.3; }
body[data-theme="marble"] .card h2::after {
  display: block;
  left: 18%; right: 18%;
  background: linear-gradient(90deg, transparent, #b08d3a 30%, #b08d3a 70%, transparent);
  opacity: 0.7;
}
/* a list that is actually SCROLLING (the engine sets data-as-dup) fades out
   in a thin band at its top and bottom, so lines slide away under the heading
   instead of being cut off. A list that fits stays fully crisp, and the band
   is a fixed ~1.5vh, not a share of the panel (7% of a tall panel washed out
   the whole first line, e.g. a sponsors' header). Only the scrolling box
   itself is masked — masking the list inside it faded each copy mid-loop. */
body[data-theme="marble"] .card [data-autoscroll][data-as-dup] {
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 1.5vh, #000 calc(100% - 1.5vh), transparent);
  mask-image: linear-gradient(to bottom, transparent, #000 1.5vh, #000 calc(100% - 1.5vh), transparent);
  will-change: transform; /* its own layer: the fade is applied by the GPU, not repainted as the list moves */
}
/* sponsors board on marble: headers in the same deep gold as the panel
   titles (the lighter theme gold looked washed out), and no hairlines between
   sponsorships — like the other lists, they are kept apart by space */
body[data-theme="marble"] .sponsor-board .sp-header { color: #8d6f20; border-bottom-color: rgba(176,141,58,0.45); text-shadow: 0 1px 0 rgba(255,255,255,0.8); }
body[data-theme="marble"] .sponsor-board .sp-item { border-bottom: 0; padding: 0.8vh 0.4vw; }
body[data-theme="marble"] .sponsor-board .sp-ded { color: #8d6f20; }
/* A list right under a panel title reaches up behind the title and down
   behind the scrollwork (the engine measures the title into --hh), so lines
   scroll on behind them instead of stopping short; there they show lighter —
   still readable, but clearly passing behind the heading and the design.
   Margin and padding cancel out, so a list that fits sits exactly as before. */
body[data-theme="marble"] .card > h2 { position: relative; z-index: 2; }
/* a soft plaque-coloured glow keeps the title crisp over lines passing behind */
body[data-theme="marble"] .card > h2 .he { text-shadow: 0 0 0.5vh #fff, 0 0 1vh #fff, 0 0 1.6vh rgba(255,255,255,0.9), 0 1px 0 rgba(255,255,255,0.8); }
body[data-theme="marble"] .card > h2 + [data-autoscroll] {
  margin-top: calc(-1 * var(--hh, 0px)); padding-top: var(--hh, 0px);
  margin-bottom: -3.3vh; padding-bottom: 3.3vh;
}
body[data-theme="marble"] .card > h2 + [data-autoscroll][data-as-dup] {
  -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,0) 0, rgba(0,0,0,0.2) 0.8vh, rgba(0,0,0,0.2) var(--hh, 0px), #000 calc(var(--hh, 0px) + 1.2vh), #000 calc(100% - 4.6vh), rgba(0,0,0,0.2) calc(100% - 3.1vh), rgba(0,0,0,0.2) calc(100% - 0.8vh), rgba(0,0,0,0) 100%);
  mask-image: linear-gradient(to bottom, rgba(0,0,0,0) 0, rgba(0,0,0,0.2) 0.8vh, rgba(0,0,0,0.2) var(--hh, 0px), #000 calc(var(--hh, 0px) + 1.2vh), #000 calc(100% - 4.6vh), rgba(0,0,0,0.2) calc(100% - 3.1vh), rgba(0,0,0,0.2) calc(100% - 0.8vh), rgba(0,0,0,0) 100%);
}
/* list text in the wall's own ink and gold */
body[data-theme="marble"] .time-list li,
body[data-theme="marble"] .sec-items li,
body[data-theme="marble"] .limud-list li { font-family: var(--hebrew); }
body[data-theme="marble"] .time-list .t,
body[data-theme="marble"] .sec-items .v,
body[data-theme="marble"] .limud-list .txt { color: var(--ink); font-weight: 700; }
body[data-theme="marble"] .time-list .n,
body[data-theme="marble"] .sec-items .k { color: #3a342a; }
body[data-theme="marble"] .arch-text { fill: #8d6f20; }
body[data-theme="marble"] .lh-line2 { color: var(--ink); }
body[data-theme="marble"] .simcha-list .s1 { color: #2a241a; }
/* no every-other-line shading on the plaques (it read as a stray brown box on
   one line) */
body[data-theme="marble"] .time-list li:nth-child(even),
body[data-theme="marble"] .sec-items li:nth-child(even),
body[data-theme="marble"] .limud-list li:nth-child(even) { background: none; }
body[data-theme="marble"] .time-list li,
body[data-theme="marble"] .sec-items li:not(.times-header),
body[data-theme="marble"] .limud-list li { border-radius: 0; padding-top: 0.55vh; padding-bottom: 0.55vh; }
/* (the fine gold line under each line was dropped at the owner's request:
   on the TV a 1px line at uneven heights came out faint on some lines and
   missing on others) — lines are kept apart by space instead, and a note
   sits tight under its own line */
body[data-theme="marble"] .sec-items .note:not(.inline) { line-height: 1.15; margin-top: 0.1vh; }
body[data-theme="marble"] .time-list li.next { background: var(--next-bg); }
/* the bottom strip reads like the engraved gold line under the plaques */
body[data-theme="marble"] #ticker-wrap { border-top-color: rgba(176,141,58,0.55); }
body[data-theme="marble"] .tsep { background: #b08d3a; opacity: 0.5; }

/* the scrollwork from the plaques on the wall, at the foot of each panel */
body[data-theme="marble"] .card::after {
  content: '';
  position: absolute; left: 0; right: 0; bottom: 0.2vh; height: 4vh;
  pointer-events: none; z-index: 1; opacity: 0.34;
  background-repeat: no-repeat;
  background-size: auto 3.4vh, auto 3.4vh;
  background-position: 1.6vh bottom, calc(100% - 1.6vh) bottom;
  background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='40' viewBox='0 0 120 40'><g fill='none' stroke='%23b08d3a' stroke-width='1.6' stroke-linecap='round'><path d='M4 32c14 0 20-8 28-14 7-5 14-3 15 3 1 5-5 8-9 5-4-3-1-9 6-11 9-3 20 1 28 6'/><path d='M72 21c6 4 13 8 22 8'/><path d='M30 24c3-6 9-9 15-8'/></g><g fill='%23b08d3a'><circle cx='4' cy='32' r='2'/><circle cx='94' cy='29' r='2'/></g></svg>"), url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='40' viewBox='0 0 120 40'><g fill='none' stroke='%23b08d3a' stroke-width='1.6' stroke-linecap='round'><path d='M4 32c14 0 20-8 28-14 7-5 14-3 15 3 1 5-5 8-9 5-4-3-1-9 6-11 9-3 20 1 28 6'/><path d='M72 21c6 4 13 8 22 8'/><path d='M30 24c3-6 9-9 15-8'/></g><g fill='%23b08d3a'><circle cx='4' cy='32' r='2'/><circle cx='94' cy='29' r='2'/></g></svg>");
  transform: scaleY(1);
}
/* the right-hand one mirrors, like the pair on the wall */
body[data-theme="marble"] .card::after { background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='40' viewBox='0 0 120 40'><g fill='none' stroke='%23b08d3a' stroke-width='1.6' stroke-linecap='round'><path d='M4 32c14 0 20-8 28-14 7-5 14-3 15 3 1 5-5 8-9 5-4-3-1-9 6-11 9-3 20 1 28 6'/><path d='M72 21c6 4 13 8 22 8'/><path d='M30 24c3-6 9-9 15-8'/></g><g fill='%23b08d3a'><circle cx='4' cy='32' r='2'/><circle cx='94' cy='29' r='2'/></g></svg>"), url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='40' viewBox='0 0 120 40'><g transform='translate(120,0) scale(-1,1)' fill='none' stroke='%23b08d3a' stroke-width='1.6' stroke-linecap='round'><path d='M4 32c14 0 20-8 28-14 7-5 14-3 15 3 1 5-5 8-9 5-4-3-1-9 6-11 9-3 20 1 28 6'/><path d='M72 21c6 4 13 8 22 8'/><path d='M30 24c3-6 9-9 15-8'/></g><g transform='translate(120,0) scale(-1,1)' fill='%23b08d3a'><circle cx='4' cy='32' r='2'/><circle cx='94' cy='29' r='2'/></g></svg>"); }
body[data-theme="marble"] .donor-card::after { display: none; }

/* light themes: the whole header reads in black — clock, AM/PM, the date, the
   Hebrew date and the parsha (owner's request; no gold/grey/navy there) */
body[data-theme="ivory"] #clock, body[data-theme="luach"] #clock, body[data-theme="marble"] #clock,
body[data-theme="ivory"] #seconds-row, body[data-theme="luach"] #seconds-row, body[data-theme="marble"] #seconds-row,
body[data-theme="ivory"] #clock-date, body[data-theme="luach"] #clock-date, body[data-theme="marble"] #clock-date,
body[data-theme="ivory"] .date-he, body[data-theme="luach"] .date-he, body[data-theme="marble"] .date-he,
body[data-theme="ivory"] .parsha, body[data-theme="luach"] .parsha, body[data-theme="marble"] .parsha { color: #15130f; }

/* ---------- special screen "only this, edge to edge" (layout.bare) ----------
   a PDF / picture show fills the whole TV: no header, ticker, frame or title */
body.bare-screen #header,
body.bare-screen #holiday-banner { display: none !important; }
body.bare-screen #screen { grid-template-rows: 1fr; padding: 0; gap: 0; }
body.bare-screen #main { gap: 0; }
body.bare-screen .card {
  background: transparent; border: 0; border-radius: 0; padding: 0;
  box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none;
}
body.bare-screen .card::before,
body.bare-screen .card::after,
body.bare-screen .card > h2 { display: none !important; }
body.bare-screen .section-card .sec-slides { border-radius: 0; }

/* ---------- photo-frame edition (body.edition-frame) ----------
   a lobby screen: no Hebrew date, parsha or Yom Tov banner; the letterhead
   lines read left to right (an English name on the arch) */
body.edition-frame #heb-date,
body.edition-frame #parsha,
body.edition-frame #holiday-banner,
body.edition-frame #header .ornament { display: none !important; }
body.edition-frame .arch-text { font-family: var(--serif); letter-spacing: 1px; }
body.edition-frame .lh-line2,
body.edition-frame .lh-line3 { direction: ltr; font-family: var(--serif); }
body.edition-frame .lh-line2::before, body.edition-frame .lh-line2::after { content: "·"; }

/* ---------- lobby theme: the customer's lobby wall ----------
   cream linen wallpaper, each panel a picture in a dark walnut frame with a
   thin silver fillet (like the lobby's name sign), charcoal headings and the
   logo's blue as the one accent colour */
body[data-theme="lobby"] {
  --bg-0: #e6e1d6;
  --bg-1: #f1ede4;
  --glow-a: #fbf9f4;
  --glow-b: #dcd6c8;
  --card: rgba(252, 251, 248, 0.96);
  --card-edge: rgba(70, 50, 35, 0.55);
  --card-top: rgba(255, 255, 255, 0.9);
  --gold: #1d6fc3;
  --gold-soft: #3d3a36;
  --ink: #1b1a18;
  --ink-dim: #6b6660;
  --accent: #1d6fc3;
  --zebra: rgba(60, 45, 30, 0.035);
  --next-bg: rgba(29, 111, 195, 0.12);
  --shadow: 0 1vh 2.6vh rgba(50, 40, 25, 0.18);
  --banner-bg: linear-gradient(90deg, rgba(29,111,195,0.18), rgba(29,111,195,0.05));
  background:
    repeating-linear-gradient(0deg, rgba(255,255,255,0.22) 0 1px, transparent 1px 3px),
    repeating-linear-gradient(90deg, rgba(120,105,85,0.08) 0 1px, transparent 1px 3px),
    radial-gradient(80vw 60vh at 50% 0%, rgba(255,255,255,0.7), transparent 70%),
    linear-gradient(170deg, #f2eee6, #e7e2d7 70%, #ddd7ca);
}
body[data-theme="lobby"] .card {
  background: var(--card);
  border: 0.9vh solid #3a2a20;
  border-image: linear-gradient(160deg, #4d3a2a, #2b1d15 45%, #4d3a2a) 1;
  border-radius: 0;
  box-shadow: inset 0 0 0 2px #d6d2c9, inset 0 0 0 3px #8e8a82, 0 1.2vh 2.8vh rgba(50, 40, 25, 0.28);
  padding: 1.6vh 1.4vw;
}
body[data-theme="lobby"] .card h2 { justify-content: center; margin-bottom: 0.9vh; padding-bottom: 0.5vh; }
body[data-theme="lobby"] .card h2 .en { display: none; }
body[data-theme="lobby"] .card h2 .he {
  color: #3d3a36;
  font-family: var(--serif);
  font-weight: 600;
  font-size: calc(3vh * var(--fs));
  letter-spacing: 0.05em;
}
body[data-theme="lobby"] .card h2::after {
  display: block;
  left: 25%; right: 25%;
  background: linear-gradient(90deg, transparent, #1d6fc3 30%, #1d6fc3 70%, transparent);
  opacity: 0.8;
}
body[data-theme="lobby"] .section-card .sec-slides { border-radius: 0; }
body[data-theme="lobby"] #clock, body[data-theme="lobby"] #clock-date, body[data-theme="lobby"] .date-he { color: #1b1a18; }
body[data-theme="lobby"] #seconds-row { color: #1d6fc3; }
body[data-theme="lobby"] .arch-text { fill: #3d3a36; }
body[data-theme="lobby"] #header::after { background: linear-gradient(90deg, transparent, #8e8a82 18%, #8e8a82 82%, transparent); opacity: 0.8; }
body[data-theme="lobby"] #header .ornament { color: #8e8a82; }
body[data-theme="lobby"] .letterhead-img { filter: none; }
body.bare-screen[data-theme="lobby"] .card { border: 0; border-image: none; box-shadow: none; padding: 0; background: transparent; }
