@font-face {
  font-family: MorHebrew;
  src: url("/hebrew.ttf") format("truetype");
  font-display: swap;
  font-weight: 400;
}
* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  height: 100%;
  width: 100%;
  overflow: hidden;
  background: #102c29;
  font-family: MorHebrew, Arial, sans-serif;
}
#display {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 100vw;
  height: 100vh;
  transform: translate(-50%, -50%) rotate(var(--angle, 0deg));
  display: grid;
  grid-template-columns: 2fr 7fr;
  grid-template-rows: 9fr 1fr;
  gap: 0;
  background: #d6ebaf;
  color: #123e35;
  transform-origin: center;
}
#display.turned {
  width: 100vh;
  height: 100vw;
}
#side {
  background: #163e37;
  color: #edf5e3;
  padding: clamp(12px, 2vw, 50px);
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  align-items: flex-start;
  overflow: hidden;
  font-size: clamp(13px, 1.45vw, 36px);
}
#side p {
  white-space: pre-line;
  margin: 0.3em 0;
}
#side p:empty {
  display: none;
}
#clock {
  font-size: clamp(27px, 4vw, 90px);
  direction: ltr;
  letter-spacing: -0.06em;
  font-variant-numeric: tabular-nums;
}
#stage {
  position: relative;
  display: grid;
  align-items: center;
  overflow: hidden;
  background:
    radial-gradient(
      circle at -5% -10%,
      #edf8b9 0 21%,
      #bad88f 21% 33%,
      transparent 33%
    ),
    #d6ebaf;
}
#copy {
  margin: 6%;
  position: relative;
  overflow-wrap: anywhere;
}
#copy small,
#coverLabel {
  font-size: clamp(18px, 2vw, 54px);
  font-weight: 700;
}
h1 {
  font-size: clamp(40px, 7vw, 160px);
  line-height: 1.06;
  letter-spacing: -0.06em;
  margin: 0.22em 0;
}
#body,
#coverText {
  font-size: clamp(22px, 2.7vw, 80px);
  line-height: 1.32;
  white-space: pre-line;
  margin: 0.45em 0;
}
#media {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: #101d1b;
}
#media:empty {
  display: none;
}
#media > * {
  max-width: 100%;
  max-height: 100%;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
#media:not(:empty) + #copy {
  display: none;
}
footer {
  grid-column: 1/-1;
  background: #f8faec;
  display: flex;
  align-items: center;
  gap: 2vw;
  padding: 0 2vw;
  font-size: clamp(17px, 2vw, 54px);
  min-width: 0;
}
footer div {
  overflow: hidden;
  flex: 1;
  direction: ltr;
}
#ticker {
  display: inline-block;
  white-space: nowrap;
  direction: rtl;
  animation: crawl 34s linear infinite;
}
footer b {
  color: #42633a;
}
#qr svg {
  width: clamp(60px, 6vw, 150px);
  height: auto;
  display: block;
}
#qr {
  font-size: 0.75em;
}
#cover {
  z-index: 2;
  position: fixed;
  inset: 0;
  padding: 7vw;
  background: #173b35;
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
#cover[hidden] {
  display: none;
}
#cover.alert {
  background: #a51221;
}
#cover.dark {
  background: #000;
}
#cover.pair h1 {
  direction: ltr;
  text-align: right;
  letter-spacing: 0.12em;
}
body.night #display {
  filter: brightness(0.62);
}
#display.static * {
  animation-play-state: paused !important;
}
.portrait #display,
#display.portrait {
  grid-template-columns: 1fr;
  grid-template-rows: minmax(0, 2fr) minmax(0, 7fr) minmax(0, 1fr);
}
#display.portrait #side {
  flex-direction: row;
  align-items: center;
  gap: 1em;
  font-size: clamp(13px, 2.2vw, 32px);
}
#display.portrait footer {
  grid-column: 1;
}
#display.static #clock {
  visibility: hidden;
}
@keyframes crawl {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: translateX(100vw);
  }
}
@media (prefers-reduced-motion: reduce) {
  #ticker {
    animation: none;
  }
}

#stage[data-theme="water"] {
  background:
    radial-gradient(circle at 0% 0%, #9fd6e9 0 27%, transparent 27%), #d6edf5;
  color: #12394b;
}
#stage[data-theme="maintenance"] {
  background: linear-gradient(33deg, #efb65e 0 14%, transparent 14%), #fae2ad;
  color: #48341b;
}
#stage[data-theme="event"] {
  background:
    radial-gradient(circle at 5% 6%, #d2c0eb 0 26%, transparent 26%), #efe4fa;
  color: #352649;
}
#stage[data-theme="meeting"] {
  background: linear-gradient(135deg, #9bc8bb 0 19%, transparent 19%), #deece1;
  color: #1d3d37;
}
