/*
 * pa'amon — מסך התצוגה
 *
 * המסך נצפה ממרחק של כמה מטרים במסדרון, על פלזמה 16:9.
 * לכן כל המידות ביחידות cqw — אחוז מרוחב הבמה — כך שהטיפוגרפיה
 * נראית זהה על 1080p, על 4K ועל תצוגה מקדימה קטנה בלוח הניהול.
 */

*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: #0B0D14;
  overflow: hidden;
}

body {
  font-family: 'Assistant', 'Heebo', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  color: #F2EDE4;
}

/* ============================================================
   הבמה
   ============================================================ */

.board {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: #0B0D14;
}

/* משטח 16:9 שמתכווץ לפי הצלע הצרה — בלי פסים שחורים מיותרים */
.stage {
  position: relative;
  width: min(100vw, calc(100vh * 16 / 9));
  height: min(100vh, calc(100vw * 9 / 16));
  container-type: inline-size;
  overflow: hidden;
  background: var(--bgc, #141A3F);
  transition: background-color .7s cubic-bezier(.22, 1, .36, 1);

  /* אזורים שמורים למסגרת הקבועה. שום תוכן של שקופית לא נכנס לתוכם. */
  --safe-top: 7.5cqw;
  --safe-bottom: 4.5cqw;
}

.fx-layer { position: absolute; inset: 0; }

/* ============================================================
   שקופיות ומעברים
   ============================================================ */

.slide {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  color: var(--fg, #F2EDE4);
  background: var(--bgc, #141A3F);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.slide.is-on {
  opacity: 1;
  visibility: visible;
  z-index: 2;
}

/* --- מעברי כניסה. משתנים בין שקופית לשקופית כדי שהמסך לא ימאס --- */

.slide[data-t="sweep"].is-on { animation: t-sweep .78s cubic-bezier(.22, 1, .36, 1) both; }
.slide[data-t="up"].is-on    { animation: t-up .72s cubic-bezier(.22, 1, .36, 1) both; }
.slide[data-t="box"].is-on   { animation: t-box .8s cubic-bezier(.22, 1, .36, 1) both; }
.slide[data-t="fade"].is-on  { animation: t-fade .6s ease both; }
.slide[data-t="zoom"].is-on  { animation: t-zoom .8s cubic-bezier(.22, 1, .36, 1) both; }
.slide[data-t="split"].is-on { animation: t-split .85s cubic-bezier(.22, 1, .36, 1) both; }

@keyframes t-sweep {
  from { clip-path: inset(0 0 0 100%); }
  to   { clip-path: inset(0 0 0 0); }
}
@keyframes t-up {
  from { clip-path: inset(100% 0 0 0); }
  to   { clip-path: inset(0 0 0 0); }
}
@keyframes t-box {
  from { clip-path: inset(50% 50% 50% 50%); }
  to   { clip-path: inset(0 0 0 0); }
}
@keyframes t-fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes t-zoom {
  from { opacity: 0; transform: scale(1.06); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes t-split {
  from { clip-path: polygon(0 0, 100% 0, 100% 0, 0 0, 0 100%, 100% 100%, 100% 100%, 0 100%); }
  to   { clip-path: polygon(0 0, 100% 0, 100% 50%, 0 50%, 0 50%, 100% 50%, 100% 100%, 0 100%); }
}

/* --- כניסת אלמנטים בתוך השקופית. --i קובע את סדר ההופעה --- */

.slide.is-on .rise,
.slide.is-on .fade,
.slide.is-on .snap,
.slide.is-on .draw { animation-delay: calc(var(--i, 0) * .09s + .16s); }

.rise, .fade, .snap { opacity: 0; }

.slide.is-on .rise {
  animation: a-rise .68s cubic-bezier(.22, 1, .36, 1) both;
}
.slide.is-on .fade {
  animation: a-fade .8s ease both;
}
.slide.is-on .snap {
  animation: a-snap .5s cubic-bezier(.34, 1.4, .64, 1) both;
}
.slide.is-on .draw {
  animation: a-draw .7s cubic-bezier(.22, 1, .36, 1) both;
}

@keyframes a-rise {
  from { opacity: 0; transform: translateY(1.6cqw); }
  to   { opacity: 1; transform: none; }
}
@keyframes a-fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes a-snap {
  from { opacity: 0; transform: scale(.9); }
  to   { opacity: 1; transform: none; }
}
@keyframes a-draw {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}

/* ============================================================
   טיפוגרפיה משותפת לעיצובי יום ההולדת
   ============================================================ */

.bd-pad {
  position: relative;
  z-index: 2;
  display: grid;
  align-content: center;
  gap: 1.5cqw;
  padding: var(--safe-top) 7cqw var(--safe-bottom);
  height: 100%;
}
.bd-center { justify-items: center; text-align: center; }
.bd-start  { justify-items: start; text-align: start; }
.bd-over   { z-index: 3; }

/*
 * פריסה על מלוא הגובה: פתיח למעלה, השם במרכז, הברכה למטה.
 * בלי זה כל התוכן מצטופף באמצע ומשאיר שוליים מתים — בדיוק מה
 * שהאפיון אוסר (§23: "העיצוב צריך לנצל את כל שטח המסך").
 */
.bd-spread {
  align-content: space-between;
  gap: 2cqw;
}
.bd-zone {
  display: grid;
  gap: 1.1cqw;
  justify-items: inherit;
  width: 100%;
}
.bd-spread.bd-center .bd-zone { justify-items: center; }
.bd-zone-tight { gap: .3cqw; }
.bd-spread .bd-zone:last-child { align-content: end; }

.bd-opener {
  font-size: 2.2cqw;
  font-weight: 700;
  letter-spacing: .18em;
  color: var(--ac);
}

/*
 * הסולם בנוי לקריאה ממרחק של כמה מטרים במסדרון. השם הוא הגיבור
 * ולכן הוא גדול משמעותית מכל השאר — מי שעוברת ליד רואה קודם כול למי זה.
 */
.bd-name {
  margin: 0;
  font-weight: 800;
  line-height: .9;
  letter-spacing: -.025em;
  color: var(--fg);
  text-wrap: balance;
}
.bd-md  { font-size: 7.5cqw; }
.bd-lg  { font-size: 11cqw; }
.bd-xl  { font-size: 15cqw; }
.bd-xxl { font-size: 19cqw; }

.bd-serif {
  font-family: 'Frank Ruhl Libre', 'Bellefair', serif;
  font-weight: 500;
  letter-spacing: -.01em;
}

.bd-meta {
  margin: 0;
  font-size: 2.5cqw;
  font-weight: 600;
  color: var(--ac);
  opacity: .92;
}

.bd-wish {
  margin: .8cqw 0 0;
  max-width: 62cqw;
  font-size: 2.8cqw;
  line-height: 1.45;
  font-weight: 500;
  color: var(--fg);
  opacity: .88;
  text-wrap: pretty;
}

.bd-note {
  margin: .8cqw 0 0;
  font-size: 1.7cqw;
  font-weight: 600;
  color: var(--ac);
  opacity: .72;
}
.bd-note-inline { margin-block-start: 1.2cqw; }

/* ============================================================
   המבנים
   ============================================================ */

/* חצי מסך בצבע */
.bd-half {
  position: absolute;
  inset-block: 0;
  inset-inline-start: 0;
  width: 38%;
  background: var(--mid);
  transform-origin: inline-start;
}
.bd-layout-split .bd-pad { padding-inline-end: 42cqw; }

/* ספרה ענקית ברקע — נוגעת בקצוות בכוונה, לא בטעות */
.bd-numeral {
  position: absolute;
  inset-block-start: 50%;
  inset-inline-end: 2cqw;
  translate: 0 -50%;
  font-size: 40cqw;
  font-weight: 800;
  line-height: .78;
  color: var(--mid);
  opacity: .6;
  z-index: 1;
}
.bd-layout-numeral .bd-pad { padding-inline-end: 32cqw; }
.bd-layout-numeral .bd-wish { max-width: 52cqw; }

/* רצועה רוחבית שהשם יושב עליה */
.bd-band {
  position: absolute;
  inset-block-start: 50%;
  inset-inline: 0;
  height: 20cqw;
  translate: 0 -55%;
  background: var(--mid);
  transform-origin: inline-end;
  z-index: 1;
}
/* מתחת לאזור השמור, כדי לא להתנגש בלוגו ובתאריך */
.bd-topline {
  position: absolute;
  inset-block-start: var(--safe-top);
  inset-inline-start: 7cqw;
  font-size: 1.9cqw;
  font-weight: 700;
  letter-spacing: .16em;
  color: var(--ac);
  z-index: 3;
}
.bd-layout-band .bd-pad { align-content: center; }

.bd-foot {
  position: absolute;
  inset-block-end: calc(var(--safe-bottom) + 1cqw);
  inset-inline: 7cqw;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 3cqw;
  z-index: 3;
}
.bd-foot .bd-wish { max-width: 52cqw; }

/* מסגרת */
.bd-frame {
  position: absolute;
  inset: 2.6cqw;
  border: .3cqw solid var(--ac);
  opacity: .45;
  transform-origin: center;
  z-index: 1;
}
.bd-layout-frame .bd-pad { padding-inline: 10cqw; }

/* אדיטוריאל */
.bd-editorial { gap: 1.6cqw; }
.bd-rule {
  width: 100%;
  height: .22cqw;
  background: var(--ac);
  opacity: .5;
  transform-origin: inline-end;
}
/* הספרה בפינה — בצד הנגדי לחתימה שבתחתית */
.bd-corner {
  position: absolute;
  inset-block-end: var(--safe-bottom);
  inset-inline-end: 5cqw;
  font-size: 9cqw;
  font-weight: 800;
  line-height: 1;
  color: var(--mid);
  z-index: 2;
}

/* הד חוזר */
.bd-stack { gap: .2cqw; }
.bd-rep {
  font-size: 10cqw;
  font-weight: 800;
  line-height: .96;
  letter-spacing: -.02em;
  color: transparent;
  -webkit-text-stroke: .16cqw var(--ac);
}
.bd-rep-solid {
  color: var(--fg);
  -webkit-text-stroke: 0;
}

/*
 * עיגול מרכזי. המרכוז נעשה עם margin אוטומטי ולא עם inset-inline-start
 * ו-translate — הצירוף הזה נשבר בכיוון ימין־לשמאל ודוחף את הצורה הצידה.
 */
.bd-disc {
  position: absolute;
  inset-block-start: 50%;
  inset-inline: 0;
  width: 62cqw;
  height: 62cqw;
  margin-inline: auto;
  translate: 0 -50%;
  border-radius: 50%;
  background: var(--mid);
  opacity: .85;
  z-index: 1;
}

/* פינה */
.bd-corner-layout {
  align-content: end;
  justify-items: start;
  text-align: start;
  padding: var(--safe-top) 8cqw calc(var(--safe-bottom) + 2cqw);
}

/* כרטיס */
.bd-card {
  display: grid;
  justify-items: center;
  gap: 1.4cqw;
  width: 100%;
  padding: 6cqw 7cqw;
  background: color-mix(in srgb, var(--fg) 8%, transparent);
  border: .14cqw solid color-mix(in srgb, var(--ac) 45%, transparent);
  border-radius: 1.4cqw;
  backdrop-filter: blur(6px);
  text-align: center;
}
.bd-layout-card .bd-pad { padding-inline: 9cqw; }
.bd-card .bd-wish { max-width: 56cqw; }

/* רשת */
.bd-grid {
  position: absolute;
  inset: 0;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  z-index: 1;
  opacity: .35;
}
.bd-grid b { border-inline-start: .1cqw solid var(--ac); }
/* טקסט מצד אחד, גיל מהצד השני — ביחס קבוע כדי שהכיתה לא תישבר */
.bd-split-row {
  grid-auto-flow: column;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 5cqw;
  justify-items: stretch;
}
.bd-split-row .bd-wish { max-width: none; }
.bd-split-row .bd-meta { white-space: nowrap; }

.bd-age-block {
  font-size: 15cqw;
  font-weight: 800;
  line-height: .85;
  color: var(--ac);
  text-align: center;
  white-space: nowrap;
}
.bd-age-block em {
  display: block;
  margin-block-start: .4cqw;
  font-size: 1.8cqw;
  font-style: normal;
  font-weight: 600;
  letter-spacing: .1em;
  opacity: .8;
}

/* אור מרכזי */
.bd-spot {
  position: absolute;
  inset-block-start: 45%;
  inset-inline: 0;
  width: 105cqw;
  height: 105cqw;
  margin-inline: auto;
  translate: 0 -50%;
  border-radius: 50%;
  background: radial-gradient(circle,
    color-mix(in srgb, var(--ac) 42%, transparent) 0%,
    color-mix(in srgb, var(--ac) 12%, transparent) 34%,
    transparent 64%);
  z-index: 1;
}

/* כרזה */
.bd-poster { gap: .4cqw; }
.bd-poster-age {
  font-size: 7cqw;
  font-weight: 800;
  color: var(--ac);
  line-height: 1;
}
.bd-poster .bd-wish { margin-block-start: 1.6cqw; }

/* אותיות בתנועה */
.bd-kinetic { display: flex; gap: .1em; direction: rtl; }
.bd-ltr {
  display: inline-block;
  opacity: 0;
}
.slide.is-on .bd-ltr {
  animation: a-letter .6s cubic-bezier(.22, 1, .36, 1) both;
  animation-delay: calc(var(--i, 0) * .05s + .28s);
}
.bd-sp { width: .3em; }
@keyframes a-letter {
  from { opacity: 0; transform: translateY(1.4cqw) rotate(-6deg); }
  to   { opacity: 1; transform: none; }
}

/* מינימלי */
.bd-minimal { gap: 1.3cqw; }
.bd-tick {
  width: 6cqw;
  height: .3cqw;
  background: var(--ac);
  transform-origin: inline-end;
}

/* ============================================================
   שקופיות שאינן יום הולדת
   ============================================================ */

.msg-pad {
  position: relative;
  z-index: 2;
  display: grid;
  align-content: center;
  gap: 1.6cqw;
  padding: 7cqw 8cqw;
  height: 100%;
}
.msg-label {
  font-size: 1.9cqw;
  font-weight: 700;
  letter-spacing: .16em;
  color: var(--ac);
}
.msg-title {
  margin: 0;
  font-size: 6.4cqw;
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -.02em;
  color: var(--fg);
  text-wrap: balance;
}
.msg-body {
  margin: 0;
  max-width: 66cqw;
  font-size: 2.6cqw;
  line-height: 1.5;
  font-weight: 500;
  color: var(--fg);
  opacity: .9;
  text-wrap: pretty;
}
.msg-rule {
  width: 14cqw;
  height: .26cqw;
  background: var(--ac);
  transform-origin: inline-end;
}

/*
 * תמונות ומסמכים.
 *
 * ברירת המחדל היא contain על רקע שחור: תמונה לאורך שצולמה בטלפון
 * תוצג במלואה עם פסים בצדדים, ולא תיחתך. חיתוך היה מוריד ראשים
 * מתמונה של כיתה — וזה בדיוק מה שאסור שיקרה.
 */
.media-fill {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: #000;
}
.media-fill img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* תמונה שממלאת יפה את המסך — לבחירת המנהלת, כשאין חשש לחיתוך */
.media-fill.is-cover img { object-fit: cover; }

.pdf-fill { background: #F7F3EA; }
.pdf-fill img { object-fit: contain; }

.media-cap {
  position: absolute;
  inset-inline: 0;
  inset-block-end: 0;
  z-index: 2;
  padding: 12cqw 7cqw 5cqw;
  background: linear-gradient(to top, rgba(8, 10, 18, .88), transparent);
  color: #F7F3EA;
}
.media-cap h2 {
  margin: 0 0 .5cqw;
  font-size: 4cqw;
  font-weight: 800;
  letter-spacing: -.01em;
}
.media-cap p {
  margin: 0;
  font-size: 2.1cqw;
  font-weight: 500;
  opacity: .88;
}
.pdf-badge {
  position: absolute;
  inset-block-start: 4cqw;
  inset-inline-start: 5cqw;
  z-index: 3;
  padding: .7cqw 1.5cqw;
  font-size: 1.5cqw;
  font-weight: 700;
  border-radius: 10cqw;
  background: rgba(8, 10, 18, .6);
  color: #F7F3EA;
}

/* מסך ברירת מחדל כשאין תוכן ליום */
.idle-pad {
  position: relative;
  z-index: 2;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 1.4cqw;
  height: 100%;
  text-align: center;
}
.idle-mark {
  display: grid;
  place-items: center;
  width: 11cqw;
  height: 11cqw;
  border-radius: 2.2cqw;
  background: var(--ac);
  color: var(--bgc);
  font-size: 5.4cqw;
  font-weight: 800;
}
.idle-name {
  margin: 0;
  font-size: 6.6cqw;
  font-weight: 800;
  letter-spacing: -.02em;
  color: var(--fg);
}
.idle-city {
  margin: 0;
  font-size: 2.2cqw;
  font-weight: 600;
  letter-spacing: .12em;
  color: var(--ac);
}

/* ============================================================
   מסגרת קבועה: לוגו, שם התיכון, תאריך עברי, חתימה
   ============================================================ */

/*
 * המסגרת יושבת מעל כל השקופיות ולכן אינה יורשת את הצבעים שלהן.
 * display.html מציב את ארבעת המשתנים על .stage בכל מעבר שקופית,
 * וכאן הם נצרכים — כך שהלוגו והתאריך קריאים גם על רקע בהיר וגם על כהה.
 */
.chrome {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  color: var(--fg, #F2EDE4);
  transition: color .7s cubic-bezier(.22, 1, .36, 1);
}

.crest {
  position: absolute;
  inset-block-start: 2.4cqw;
  inset-inline-start: 3cqw;
  display: flex;
  align-items: center;
  gap: 1cqw;
}
.crest img {
  width: 3.6cqw;
  height: 3.6cqw;
  object-fit: contain;
  border-radius: .6cqw;
}
.crest-mark {
  display: grid;
  place-items: center;
  width: 3.6cqw;
  height: 3.6cqw;
  border-radius: .8cqw;
  background: currentColor;
  font-size: 1.9cqw;
  font-weight: 800;
}
.crest-mark span { color: var(--bgc, #141A3F); }
.crest-name {
  font-size: 1.75cqw;
  font-weight: 700;
  line-height: 1.15;
  opacity: .92;
}
.crest-name small {
  display: block;
  font-size: 1.25cqw;
  font-weight: 600;
  opacity: .68;
}

.hdate {
  position: absolute;
  inset-block-start: 2.4cqw;
  inset-inline-end: 3cqw;
  text-align: end;
  opacity: .88;
}
.hdate b {
  display: block;
  font-size: 1.9cqw;
  font-weight: 700;
}
.hdate span {
  display: block;
  font-size: 1.3cqw;
  font-weight: 500;
  opacity: .7;
}

.sig {
  position: absolute;
  inset-block-end: 1.6cqw;
  inset-inline-start: 3cqw;
  font-size: 1.15cqw;
  font-weight: 700;
  letter-spacing: .1em;
  opacity: .55;
}

.progress {
  position: absolute;
  inset-block-end: 0;
  inset-inline: 0;
  height: .3cqw;
  background: color-mix(in srgb, currentColor 14%, transparent);
}
.progress i {
  display: block;
  height: 100%;
  width: 0;
  background: var(--ac, currentColor);
}

/* ============================================================
   סרגל הפעלה — נחבא עד שמזיזים את העכבר
   ============================================================ */

.ops {
  position: fixed;
  inset-block-end: 1.2rem;
  inset-inline: 0;
  z-index: 40;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: .5rem;
  flex-wrap: wrap;
  padding: 0 1rem;
  opacity: 0;
  transform: translateY(.6rem);
  transition: opacity .25s ease, transform .25s ease;
  pointer-events: none;
}
.ops.is-visible { opacity: 1; transform: none; pointer-events: auto; }

.ops button {
  font: inherit;
  font-size: .82rem;
  font-weight: 600;
  color: #F2EDE4;
  background: rgba(18, 20, 32, .82);
  border: 1px solid rgba(242, 237, 228, .18);
  border-radius: .55rem;
  padding: .42rem .85rem;
  cursor: pointer;
  backdrop-filter: blur(8px);
}
.ops button:hover { background: rgba(38, 42, 62, .92); }
.ops button.is-active { background: #F2EDE4; color: #12141F; border-color: #F2EDE4; }
.ops .ops-text {
  font-size: .78rem;
  font-weight: 600;
  color: rgba(242, 237, 228, .72);
  padding: 0 .35rem;
}

/* מסך טעינה ושגיאה */
.curtain {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 1rem;
  padding: 2rem;
  text-align: center;
  background: #0B0D14;
  transition: opacity .5s ease;
}
.curtain[hidden] { display: none; }
.curtain.is-gone { opacity: 0; pointer-events: none; }
.curtain h1 { margin: 0; font-size: 1.5rem; font-weight: 700; }
.curtain p { margin: 0; font-size: .95rem; opacity: .7; max-width: 32rem; line-height: 1.6; }
.curtain a {
  color: #FFD166;
  font-weight: 600;
}

/* חיבור המסך בקוד */
.curtain .connect {
  display: grid;
  gap: .6rem;
  justify-items: center;
  margin-block-start: .6rem;
}
.curtain .connect[hidden] { display: none; }
.curtain .connect label { font-size: .9rem; opacity: .75; }
.curtain .connect input {
  width: 13ch;
  padding: .55rem .8rem;
  font: 700 1.6rem/1 'IBM Plex Mono', Consolas, monospace;
  letter-spacing: .12em;
  text-align: center;
  text-transform: uppercase;
  color: #FFF;
  background: rgba(255, 255, 255, .08);
  border: 1.5px solid rgba(255, 255, 255, .3);
  border-radius: .6rem;
  outline: none;
}
.curtain .connect input:focus { border-color: #FFD166; }
.curtain .connect button {
  padding: .6rem 1.6rem;
  font: 700 1rem/1 inherit;
  font-family: inherit;
  color: #0B0D14;
  background: #FFD166;
  border: 0;
  border-radius: .6rem;
  cursor: pointer;
}
.curtain .connect button:disabled { opacity: .6; cursor: default; }
.curtain .connect-status { min-height: 1.3em; font-size: .9rem; opacity: .85; }

.spinner {
  width: 2.2rem;
  height: 2.2rem;
  border: 3px solid rgba(242, 237, 228, .2);
  border-block-start-color: #FFD166;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================
   תנועה מופחתת — המסך עדיין עובד, פשוט בלי אנימציות
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
  .slide.is-on,
  .slide.is-on .rise,
  .slide.is-on .fade,
  .slide.is-on .snap,
  .slide.is-on .draw,
  .slide.is-on .bd-ltr {
    animation: t-fade .3s ease both !important;
  }
  .stage { transition: none; }
  .spinner { animation-duration: 3s; }
}

/* ============================================================
   לוגו התיכון בברכות
   ============================================================
   הלוגו מרחף מעל המבנה, ולכן הוא מופיע באותו מקום בכל העיצובים
   הטיפוגרפיים בלי שאף מבנה צריך לדעת עליו. במידות יחסיות (cqh)
   כדי שייראה זהה בכל רזולוציית מסך.
   ------------------------------------------------------------ */

.bd-logo {
  position: absolute;
  inset-inline: 0;
  top: 4cqh;
  z-index: 6;
  display: flex;
  justify-content: center;
  pointer-events: none;
}

.bd-logo img {
  height: 11cqh;
  max-width: 30cqw;
  object-fit: contain;
  /* צל רך כדי שלוגו כהה לא ייבלע ברקע כהה, ולהפך */
  filter: drop-shadow(0 2px 12px rgba(0, 0, 0, .38));
}

/* במזל טוב הלוגו יושב בתוך גוש הטקסט, מעל "מזל טוב" —
   ראש המסך תפוס בשרשרת הדגלונים. */
.mz .mz-logo {
  display: flex;
  justify-content: center;
  margin-block-end: 2.2cqh;
}

.mz .mz-logo img {
  height: 10cqh;
  max-width: 28cqw;
  object-fit: contain;
  filter: drop-shadow(0 2px 12px rgba(0, 0, 0, .45));
}

.mz .mz-slide--light .mz-logo img {
  filter: drop-shadow(0 2px 10px rgba(0, 0, 0, .18));
}

/* ============================================================
   הודעות מעוצבות
   ============================================================
   הסגנון של js/msg-design.js. גם מסך התצוגה וגם התצוגה המקדימה
   בעורך טוענים את הקובץ הזה - מקור אחד, מראה אחד.

   הכל ביחידות מכל (cqw/cqh) כדי שההודעה תיראה זהה על פלזמה
   במסדרון ועל התצוגה המקדימה הקטנה בעורך.
   ------------------------------------------------------------ */

.msgd {
  position: absolute;
  inset: 0;
  /*
   * המכל של יחידות המדידה. הבמה שמסביב מוגדרת inline-size בלבד,
   * ושם cqh נופל לגובה החלון במקום לגובה השקופית - הריווח האנכי
   * היה יוצא שגוי גם על המסך וגם בתצוגה המקדימה.
   */
  container-type: size;
  display: grid;
  background: var(--m-bg);
  color: var(--m-text);
  font-family: var(--m-font);
  overflow: hidden;
}

/* על תמונת רקע - שכבת האפלה עדינה, אחרת טקסט נבלע בתמונה */
.msgd-photo::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10, 8, 14, .25), rgba(10, 8, 14, .45));
}

.msgd-zone {
  position: relative;
  z-index: 2;
  max-width: 74cqw;
  padding: 4cqh 5cqw;
  display: flex;
  flex-direction: column;
  gap: 1.6cqh;
}

/* ---------- מיקום בתשע נקודות ---------- */

.msgd-h-start  { justify-items: start;  text-align: start; }
.msgd-h-center { justify-items: center; text-align: center; }
.msgd-h-end    { justify-items: end;    text-align: end; }
.msgd-v-start  { align-items: start; }
.msgd-v-center { align-items: center; }
.msgd-v-end    { align-items: end; }

.msgd-h-start .msgd-zone  { align-items: flex-start; }
.msgd-h-center .msgd-zone { align-items: center; }
.msgd-h-end .msgd-zone    { align-items: flex-end; }

/* בגרירה חופשית הגוש ממוקם בעצמו, והמרכוז נעשה סביבו */
.msgd-free .msgd-zone { text-align: center; align-items: center; }

/* ---------- הטקסטים ---------- */

.msgd-label {
  font-size: 1.7cqw;
  font-weight: 600;
  letter-spacing: .35em;
  padding-inline-start: .35em;
  color: var(--m-ac);
}

.msgd-title {
  margin: 0;
  font-size: 6cqw;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -.01em;
}

.msgd-body {
  margin: 0;
  font-size: 2.6cqw;
  line-height: 1.65;
  max-width: 58cqw;
  opacity: .92;
  white-space: pre-line;
}

.msgd-rule {
  width: 9cqw;
  height: .45cqh;
  border-radius: 1cqh;
  background: var(--m-ac);
}

/* ---------- גדלים ---------- */

.msgd-s-sm .msgd-title { font-size: 4.4cqw; }
.msgd-s-sm .msgd-body  { font-size: 2.1cqw; }
.msgd-s-lg .msgd-title { font-size: 7.8cqw; }
.msgd-s-lg .msgd-body  { font-size: 3cqw; }

/* ---------- רצועה עליונה ---------- */

.msgd-t-banner .msgd-bannerbar {
  position: relative;
  z-index: 2;
  align-self: start;
  justify-self: stretch;
  padding: 3cqh 5cqw 2.6cqh;
  background: var(--m-ac);
  display: flex;
  flex-direction: column;
  gap: .8cqh;
}
.msgd-t-banner .msgd-bannerbar .msgd-label,
.msgd-t-banner .msgd-bannerbar .msgd-title {
  color: var(--m-bg-contrast, #fff);
}
.msgd-t-banner { grid-template-rows: auto 1fr; }

/* ---------- כרטיס ---------- */

.msgd-cardbox {
  background: rgba(255, 255, 255, .94);
  color: #2A2621;
  border-radius: 2cqh;
  box-shadow: 0 2cqh 6cqh rgba(20, 12, 8, .18);
  padding: 5cqh 5cqw;
}
.msgd-dark .msgd-cardbox { background: rgba(255, 252, 245, .96); }
.msgd-cardbox .msgd-label { color: var(--m-ac); }

/* ---------- סרט צד ---------- */

.msgd-t-ribbon .msgd-sideband {
  position: absolute;
  inset-block: 0;
  inset-inline-start: 0;
  width: 3.2cqw;
  background: var(--m-ac);
}
.msgd-t-ribbon .msgd-zone { margin-inline-start: 7cqw; }

/* ---------- רצועה תחתונה ---------- */

.msgd-t-strip { grid-template-rows: 1fr auto; }
.msgd-t-strip .msgd-stripbar {
  position: relative;
  z-index: 2;
  justify-self: stretch;
  padding: 2.4cqh 5cqw;
  background: color-mix(in srgb, var(--m-ac) 92%, black);
}
.msgd-t-strip .msgd-stripbar .msgd-body {
  color: #fff;
  max-width: none;
  font-size: 2.3cqw;
}

/* ---------- ציטוט ---------- */

.msgd-t-quote .msgd-mark {
  font-size: 12cqw;
  line-height: .5;
  color: var(--m-ac);
  font-family: 'Frank Ruhl Libre', serif;
}
.msgd-t-quote .msgd-big {
  font-size: 4.2cqw;
  line-height: 1.5;
  font-weight: 600;
  opacity: 1;
}
.msgd-t-quote .msgd-attrib {
  font-size: 2.4cqw;
  font-weight: 600;
  color: var(--m-ac);
}

/* ---------- כרזה ---------- */

.msgd-t-poster .msgd-huge {
  font-size: 11cqw;
  line-height: 1.05;
  letter-spacing: -.02em;
}

/* ---------- מסגרת ---------- */

.msgd-t-frame .msgd-border {
  position: absolute;
  inset: 3.4cqh 2.4cqw;
  border: .35cqh solid var(--m-ac);
  outline: .12cqh solid var(--m-ac);
  outline-offset: .9cqh;
  pointer-events: none;
}
