/* Chabad Display — designed on a fixed 1920×1080 stage, scaled to fit any screen. */
@font-face { font-family: "Cormorant"; font-weight: 500; src: url(fonts/cormorant-garamond-latin-500-normal.woff2) format("woff2"), url(fonts/cormorant-garamond-latin-500-normal.woff) format("woff"); }
@font-face { font-family: "Cormorant"; font-weight: 600; src: url(fonts/cormorant-garamond-latin-600-normal.woff2) format("woff2"), url(fonts/cormorant-garamond-latin-600-normal.woff) format("woff"); }
@font-face { font-family: "Figtree"; font-weight: 300; src: url(fonts/figtree-latin-300-normal.woff2) format("woff2"), url(fonts/figtree-latin-300-normal.woff) format("woff"); }
@font-face { font-family: "Figtree"; font-weight: 400; src: url(fonts/figtree-latin-400-normal.woff2) format("woff2"), url(fonts/figtree-latin-400-normal.woff) format("woff"); }
@font-face { font-family: "Figtree"; font-weight: 500; src: url(fonts/figtree-latin-500-normal.woff2) format("woff2"), url(fonts/figtree-latin-500-normal.woff) format("woff"); }
@font-face { font-family: "Figtree"; font-weight: 600; src: url(fonts/figtree-latin-600-normal.woff2) format("woff2"), url(fonts/figtree-latin-600-normal.woff) format("woff"); }
@font-face { font-family: "Frank Ruhl"; font-weight: 500; src: url(fonts/frank-ruhl-libre-hebrew-500-normal.woff2) format("woff2"), url(fonts/frank-ruhl-libre-hebrew-500-normal.woff) format("woff"); }
@font-face { font-family: "Frank Ruhl"; font-weight: 700; src: url(fonts/frank-ruhl-libre-hebrew-700-normal.woff2) format("woff2"), url(fonts/frank-ruhl-libre-hebrew-700-normal.woff) format("woff"); }

:root {
  --bg: #071226;
  --bg-hi: #102a52;
  --panel: rgba(255, 255, 255, 0.035);
  --panel-line: rgba(214, 178, 110, 0.22);
  --gold: #d8b46e;
  --gold-hi: #f0d59c;
  --gold-dim: #9c7f4c;
  --ink: #f4ede0;
  --muted: #9eabc4;
  --faint: #5d6c88;
}

html, body {
  margin: 0; padding: 0; width: 100%; height: 100%;
  background: var(--bg); overflow: hidden; cursor: none;
}
body { color: var(--ink); font-family: "Figtree", "Helvetica Neue", Arial, sans-serif; -webkit-font-smoothing: antialiased; }
.he { font-family: "Frank Ruhl", "Times New Roman", serif; }

#stage {
  position: absolute; left: 0; top: 0; width: 1920px; height: 1080px;
  -webkit-transform-origin: 0 0; transform-origin: 0 0;
  background:
    radial-gradient(ellipse 1100px 800px at 18% 10%, rgba(40, 80, 150, 0.45), rgba(7, 18, 38, 0) 70%),
    radial-gradient(ellipse 900px 600px at 95% 100%, rgba(216, 180, 110, 0.07), rgba(7, 18, 38, 0) 70%),
    var(--bg);
  overflow: hidden;
  transition: opacity 0.8s;
}
#stage.loading { opacity: 0; }

/* ---------- left column ---------- */
.left {
  position: absolute; left: 56px; top: 52px; bottom: 96px; width: 540px;
  display: -webkit-flex; display: flex; -webkit-flex-direction: column; flex-direction: column;
}
.portrait { margin: 0; }
.portrait-frame {
  position: relative; width: 540px; height: 690px;
  border-radius: 270px 270px 10px 10px; overflow: hidden;
  background: linear-gradient(180deg, #1a2f55, #0b1830);
  box-shadow: 0 0 0 1px rgba(216, 180, 110, 0.55), 0 0 0 10px rgba(7, 18, 38, 1), 0 0 0 11px rgba(216, 180, 110, 0.3), 0 30px 80px rgba(0, 0, 0, 0.55);
}
.portrait-frame img { position: absolute; left: 0; top: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; display: none; }
.portrait-frame.has-img img { display: block; }
.portrait-frame.has-img .portrait-empty { display: none; }
.portrait-empty {
  position: absolute; left: 0; right: 0; top: 0; bottom: 0;
  display: -webkit-flex; display: flex; -webkit-flex-direction: column; flex-direction: column;
  -webkit-align-items: center; align-items: center; -webkit-justify-content: center; justify-content: center;
  color: var(--gold-dim); text-align: center;
}
.pe-mark { font-size: 64px; color: var(--gold); opacity: 0.6; margin-bottom: 20px; }
.pe-text { font-size: 22px; line-height: 1.6; }
.pe-text code { color: var(--gold); font-size: 20px; }
figcaption { text-align: center; margin-top: 30px; }
.cap1 { font-family: "Cormorant", Georgia, serif; font-weight: 600; font-size: 40px; color: var(--gold-hi); letter-spacing: 0.5px; }
.cap2 { font-size: 20px; color: var(--muted); margin-top: 4px; letter-spacing: 1.5px; text-transform: uppercase; }
.org { margin-top: auto; text-align: center; padding-top: 18px; border-top: 1px solid var(--panel-line); }
.org-name { font-family: "Cormorant", Georgia, serif; font-weight: 600; font-size: 34px; color: var(--ink); }
.org-web { font-size: 19px; color: var(--gold); letter-spacing: 2px; margin-top: 2px; }

/* ---------- right column ---------- */
.right {
  position: absolute; left: 664px; right: 56px; top: 40px; bottom: 96px;
  display: -webkit-flex; display: flex; -webkit-flex-direction: column; flex-direction: column;
}
.top { display: -webkit-flex; display: flex; -webkit-align-items: center; align-items: center; height: 168px; }
.clock { font-weight: 300; font-size: 156px; line-height: 1; letter-spacing: -4px; color: var(--ink); white-space: nowrap; font-variant-numeric: tabular-nums; }
.ampm { font-size: 46px; font-weight: 400; letter-spacing: 1px; color: var(--gold); margin-left: 14px; }
.dates { margin-left: auto; text-align: right; }
.greg { font-size: 34px; font-weight: 500; color: var(--ink); }
.heb-en { font-size: 27px; color: var(--muted); margin-top: 6px; }
.heb-he { font-size: 46px; color: var(--gold-hi); font-weight: 700; margin-top: 2px; line-height: 1.15; }

.card {
  background: var(--panel); border: 1px solid var(--panel-line); border-radius: 22px;
}
.kicker { font-size: 19px; letter-spacing: 3px; text-transform: uppercase; color: var(--gold); font-weight: 600; }

/* Shabbat card */
.shabbat {
  margin-top: 18px; padding: 28px 40px; height: 196px;
  display: -webkit-flex; display: flex; -webkit-align-items: center; align-items: center;
  background: linear-gradient(110deg, rgba(216, 180, 110, 0.13), rgba(216, 180, 110, 0.03) 55%, rgba(255, 255, 255, 0.02));
  border-color: rgba(216, 180, 110, 0.4);
}
.sh-head { -webkit-flex: 1 1 auto; flex: 1 1 auto; min-width: 0; }
.sh-title { font-family: "Cormorant", Georgia, serif; font-weight: 600; font-size: 60px; line-height: 1.05; margin-top: 10px; color: var(--ink); }
.sh-sub { margin-top: 8px; font-size: 24px; color: var(--muted); }
.sh-sub .he { font-size: 32px; color: var(--gold-hi); margin-right: 16px; }
.sh-times { display: -webkit-flex; display: flex; -webkit-flex: 0 0 auto; flex: 0 0 auto; }
.t { text-align: center; padding: 0 34px; border-left: 1px solid var(--panel-line); }
.t:first-child { border-left: 0; }
.t-label { font-size: 19px; letter-spacing: 2px; text-transform: uppercase; color: var(--gold); font-weight: 600; }
.t-time { font-size: 72px; font-weight: 400; line-height: 1.1; margin-top: 4px; white-space: nowrap; }
.t-time small { font-size: 28px; color: var(--muted); margin-left: 6px; font-weight: 400; }
.t-day { font-size: 21px; color: var(--muted); }
.t-count { font-size: 18px; color: var(--gold); margin-top: 4px; }
.shabbat.now .sh-title { color: var(--gold-hi); }
.sh-services { white-space: nowrap; font-size: 23px; color: var(--ink); margin-left: 4px; }
.sh-services i { display: inline-block; width: 1px; height: 22px; background: var(--panel-line); margin: 0 18px; vertical-align: -3px; }
.sh-services b { color: var(--gold); font-weight: 600; letter-spacing: 1px; margin-right: 10px; font-size: 18px; text-transform: uppercase; }

/* notices (Chanukah, fasts, Omer) */
.notices { margin-top: 14px; display: none; }
.notices.on { display: block; }
.notice {
  display: inline-block; margin-right: 12px; padding: 9px 20px; border-radius: 40px;
  background: rgba(216, 180, 110, 0.15); border: 1px solid rgba(216, 180, 110, 0.45);
  font-size: 22px; color: var(--gold-hi);
}
.notice b { color: var(--ink); font-weight: 600; margin-left: 8px; }

/* zmanim strip */
.zmanim { margin-top: 18px; display: -webkit-flex; display: flex; }
.z {
  -webkit-flex: 1 1 0; flex: 1 1 0; text-align: center; padding: 14px 4px 12px;
  border-radius: 16px; margin-left: 10px; background: var(--panel); border: 1px solid transparent;
}
.z:first-child { margin-left: 0; }
.z-he { font-family: "Frank Ruhl", serif; font-size: 22px; color: var(--gold); font-weight: 500; }
.z-label { font-size: 15px; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); margin-top: 2px; white-space: nowrap; }
.z-time { font-size: 30px; font-weight: 500; margin-top: 6px; white-space: nowrap; }
.z.past { opacity: 0.42; }
.z.next { background: rgba(216, 180, 110, 0.16); border-color: rgba(216, 180, 110, 0.6); }
.z.next .z-time { color: var(--gold-hi); }

/* bottom row: always-on study card + rotating panel */
.bottom { margin-top: 18px; -webkit-flex: 1 1 auto; flex: 1 1 auto; min-height: 0; display: -webkit-flex; display: flex; }
.study { width: 470px; -webkit-flex: 0 0 470px; flex: 0 0 470px; margin-right: 18px; padding: 20px 28px 14px; box-sizing: border-box; overflow: hidden; }
.bottom.wide .study { display: none; }
.study-title { font-family: "Cormorant", Georgia, serif; font-weight: 600; font-size: 34px; color: var(--gold-hi); margin-bottom: 6px; }
.srow { display: -webkit-flex; display: flex; -webkit-align-items: baseline; align-items: baseline; padding: 7px 0; border-top: 1px solid rgba(255, 255, 255, 0.06); }
.srow:first-child { border-top: 0; }
.srow-label { width: 128px; -webkit-flex: 0 0 128px; flex: 0 0 128px; font-size: 15px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--gold); font-weight: 600; white-space: nowrap; }
.srow-value { -webkit-flex: 1 1 auto; flex: 1 1 auto; min-width: 0; font-size: 23px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* rotator */
.rotator {
  -webkit-flex: 1 1 auto; flex: 1 1 auto; min-width: 0; position: relative;
  padding: 24px 32px 20px; overflow: hidden;
}
.rot-head { display: -webkit-flex; display: flex; -webkit-align-items: center; align-items: center; margin-bottom: 14px; }
.rot-title { font-family: "Cormorant", Georgia, serif; font-weight: 600; font-size: 34px; color: var(--gold-hi); }
.rot-dots { margin-left: auto; }
.rot-dots i { display: inline-block; width: 10px; height: 10px; border-radius: 6px; background: var(--faint); margin-left: 10px; transition: all 0.4s; }
.rot-dots i.on { background: var(--gold); width: 34px; }
.rot-body { position: relative; transition: opacity 0.6s; }
.rot-body.fade { opacity: 0; }

.row { display: -webkit-flex; display: flex; -webkit-align-items: center; align-items: center; padding: 10px 0; border-top: 1px solid rgba(255, 255, 255, 0.06); }
.row:first-child { border-top: 0; }
.datebox { width: 118px; text-align: center; -webkit-flex: 0 0 118px; flex: 0 0 118px; margin-right: 18px; }
.datebox .dow { white-space: nowrap; font-size: 16px; letter-spacing: 2px; text-transform: uppercase; color: var(--gold); font-weight: 600; }
.datebox .dnum { font-size: 34px; font-weight: 500; line-height: 1.1; }
.row-main { -webkit-flex: 1 1 auto; flex: 1 1 auto; min-width: 0; }
.row-title { font-size: 27px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-sub { font-size: 20px; color: var(--muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-he { font-family: "Frank Ruhl", serif; font-size: 30px; color: var(--gold-hi); margin-left: 24px; white-space: nowrap; }
.chip { margin-left: 16px; padding: 6px 16px; border-radius: 30px; font-size: 18px; color: var(--gold-hi); border: 1px solid rgba(216, 180, 110, 0.4); white-space: nowrap; }
.chip.hot { background: var(--gold); color: #1a1408; border-color: var(--gold); font-weight: 600; }

.grid { display: -webkit-flex; display: flex; -webkit-flex-wrap: wrap; flex-wrap: wrap; }
.cell { width: 33.33%; box-sizing: border-box; padding: 10px 24px 10px 0; }
.cell-label { white-space: nowrap; font-size: 17px; letter-spacing: 2px; text-transform: uppercase; color: var(--gold); font-weight: 600; }
.cell-label .he { font-size: 21px; letter-spacing: 0; text-transform: none; color: var(--gold-dim); margin-left: 10px; font-weight: 500; }
.cell-value { font-size: 26px; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.announce { font-size: 34px; line-height: 1.35; }
.longtext { font-family: "Cormorant", Georgia, serif; font-weight: 500; line-height: 1.32; color: var(--ink); }
.longtext-src { font-size: 18px; color: var(--gold); margin-top: 10px; letter-spacing: 1px; }
.announce-title { font-family: "Cormorant", Georgia, serif; font-size: 50px; font-weight: 600; color: var(--ink); margin-bottom: 8px; }
.quote { font-family: "Cormorant", Georgia, serif; font-size: 44px; line-height: 1.3; color: var(--ink); }
.quote-src { font-size: 22px; color: var(--gold); margin-top: 14px; letter-spacing: 1px; }
.empty { font-size: 26px; color: var(--muted); padding: 30px 0; }

/* footer */
.foot {
  position: absolute; left: 56px; right: 56px; bottom: 30px; height: 40px;
  font-size: 20px; color: var(--muted); letter-spacing: 1px; text-align: center; line-height: 40px;
}
.foot-dot { color: var(--gold); margin: 0 16px; }
.status { position: absolute; right: 0; top: 15px; width: 10px; height: 10px; border-radius: 5px; background: transparent; }
.status.stale { background: #c96a4a; }
