html,
body {
  height: 100%;
}

body {
  margin: 0;
  background: #ffffff;
  overflow: hidden;
}

body.shabbat-mode {
  background: #07060a;
}

body.shabbat-mode #birdsBack,
body.shabbat-mode #birdsFront,
body.shabbat-mode .marquee,
body.shabbat-mode .footer {
  display: none;
}

body.shabbat-mode .center {
  transform: none;
  gap: 16px;
}

body.shabbat-mode .image-stack {
  display: none;
}

body.shabbat-mode .caption {
  position: fixed;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  color: rgba(255, 255, 255, 0.92);
}

body.shabbat-mode .caption-he {
  position: fixed;
  top: 56px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  color: rgba(255, 120, 220, 0.9);
}

body.shabbat-mode .tagline {
  position: fixed;
  top: 86px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  color: rgba(255, 255, 255, 0.65);
}

body.shabbat-mode .torah-toggle {
  background: rgba(255, 0, 180, 0.15);
  border-color: rgba(255, 0, 180, 0.35);
  color: rgba(255, 120, 220, 0.9);
}

body.shabbat-mode .torah-toggle:hover {
  background: rgba(255, 0, 180, 0.25);
  border-color: rgba(255, 0, 180, 0.5);
}

body.shabbat-mode .torah-body::-webkit-scrollbar-track {
  background: rgba(255, 0, 180, 0.08);
}

body.shabbat-mode .torah-body::-webkit-scrollbar-thumb {
  background: rgba(255, 0, 180, 0.4);
}

body.shabbat-mode .torah-body::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 0, 180, 0.55);
}

body.shabbat-mode .social a {
  color: rgba(255, 255, 255, 0.78);
}

@media (max-width: 640px) {
  body.shabbat-mode .caption {
    top: 14px;
  }

  body.shabbat-mode .caption-he {
    top: 48px;
  }

  body.shabbat-mode .tagline {
    top: 76px;
  }

  body.shabbat-mode .social {
    left: 50%;
    top: 110px;
    transform: translateX(-50%);
    flex-wrap: wrap;
    justify-content: center;
  }
}

body.shabbat-mode .torah {
  width: min(720px, calc(100vw - 44px));
  margin-top: 0;
  padding: 18px 18px;
  border-radius: 16px;
  background: rgba(15, 13, 20, 0.86);
  border: 1px solid rgba(255, 0, 180, 0.22);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.04), 0 18px 60px rgba(255, 0, 180, 0.12);
}

body.shabbat-mode .torah-label {
  color: rgba(255, 0, 180, 0.8);
}

body.shabbat-mode .torah-body {
  color: rgba(255, 255, 255, 0.88);
}

body.shabbat-mode .torah-body a {
  color: rgba(255, 120, 220, 0.95);
}

body.shabbat-mode .footer {
  display: block;
  color: rgba(255, 255, 255, 0.55);
}

#birdsBack,
#birdsFront {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  display: block;
  pointer-events: none;
}

#birdsBack {
  z-index: 1;
}

.nav {
  position: fixed;
  top: 22px;
  left: 22px;
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 2;
}

.nav-links {
  display: flex;
  gap: 14px;
}

.nav a {
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji",
    "Segoe UI Emoji";
  font-size: 13px;
  letter-spacing: 0.06em;
  text-decoration: none;
  color: rgba(0, 0, 0, 0.55);
  position: relative;
  transition: color 160ms ease;
}

.nav a:hover {
  color: rgba(0, 0, 0, 0.75);
}

.nav a::after {
  content: '';
  position: absolute;
  left: -2px;
  right: -2px;
  bottom: -6px;
  height: 10px;
  opacity: 0;
  transform: scaleX(0.2);
  transform-origin: left;
  transition: opacity 160ms ease, transform 220ms ease;
  background-repeat: repeat-x;
  background-position: left center;
  background-size: 44px 10px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='44' height='10' viewBox='0 0 44 10'%3E%3Cpath d='M1 6 C 6 2, 10 10, 15 6 S 24 10, 29 6 S 38 10, 43 6' fill='none' stroke='rgba(255,0,180,0.55)' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  pointer-events: none;
}

.nav a:hover::after {
  opacity: 1;
  transform: scaleX(1);
}

.nav-toggle {
  appearance: none;
  background: transparent;
  border: 0;
  padding: 10px;
  margin: -10px;
  display: none;
  cursor: pointer;
}

.nav-toggle-bar {
  display: block;
  width: 18px;
  height: 1.5px;
  background: rgba(0, 0, 0, 0.55);
  margin: 4px 0;
  border-radius: 999px;
}

@media (max-width: 640px) {
  .nav {
    top: 14px;
    left: 14px;
  }

  .nav-toggle {
    display: inline-block;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 28px;
    left: 0;
    flex-direction: column;
    gap: 10px;
    padding: 12px 12px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 10px;
    backdrop-filter: blur(8px);
  }

  .nav[data-open='true'] .nav-links {
    display: flex;
  }
}

.stage {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  z-index: 2;
}

.center {
  display: grid;
  justify-items: center;
  gap: 10px;
  transform: translateY(-26px);
}

.image-stack {
  display: grid;
}

.image-stack > img {
  grid-area: 1 / 1;
}

.center-image {
  max-width: min(35vw, 450px);
  max-height: min(35vh, 450px);
  width: auto;
  height: auto;
}

.center-image-pink {
  transform: translate(10px, 10px);
  opacity: 0;
  filter: brightness(0) saturate(100%) invert(36%) sepia(92%) saturate(7216%) hue-rotate(305deg)
      brightness(110%) contrast(110%)
    drop-shadow(0 0 10px rgba(255, 0, 180, 0.35)) drop-shadow(0 0 22px rgba(255, 0, 180, 0.22));
  mix-blend-mode: multiply;
}

@keyframes pinkExplode {
  0% {
    opacity: 0;
    transform: translate(0px, 0px) scale(1.08);
    filter: brightness(0) saturate(100%) invert(36%) sepia(92%) saturate(7216%) hue-rotate(305deg)
        brightness(110%) contrast(110%)
      blur(4px) drop-shadow(0 0 0 rgba(255, 0, 180, 0));
  }
  45% {
    opacity: 1;
    transform: translate(16px, 16px) scale(1);
    filter: brightness(0) saturate(100%) invert(36%) sepia(92%) saturate(7216%) hue-rotate(305deg)
        brightness(110%) contrast(110%)
      blur(0.6px) drop-shadow(0 0 24px rgba(255, 0, 180, 0.55)) drop-shadow(0 0 48px rgba(255, 0, 180, 0.28));
  }
  100% {
    opacity: 0.85;
    transform: translate(10px, 10px);
    filter: brightness(0) saturate(100%) invert(36%) sepia(92%) saturate(7216%) hue-rotate(305deg)
        brightness(110%) contrast(110%)
      drop-shadow(0 0 10px rgba(255, 0, 180, 0.35)) drop-shadow(0 0 22px rgba(255, 0, 180, 0.22));
  }
}

.image-stack.explode .center-image-pink {
  animation: pinkExplode 1400ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.social {
  position: fixed;
  left: 22px;
  top: calc(22px + env(safe-area-inset-top));
  display: flex;
  gap: 16px;
  z-index: 2;
}

.social a {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  color: rgba(0, 0, 0, 0.55);
  transition: color 160ms ease, filter 200ms ease;
}

.social a:hover {
  color: rgba(255, 0, 180, 0.85);
  filter: drop-shadow(0 0 8px rgba(255, 0, 180, 0.25));
}

.social svg {
  width: 28px;
  height: 28px;
  display: block;
}

.torah-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.torah-label {
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji",
    "Segoe UI Emoji";
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 0, 180, 0.7);
}

.torah-toggle {
  appearance: none;
  background: rgba(255, 0, 180, 0.1);
  border: 1px solid rgba(255, 0, 180, 0.3);
  border-radius: 6px;
  padding: 4px 10px;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: rgba(255, 0, 180, 0.85);
  cursor: pointer;
  transition: all 160ms ease;
}

.torah-toggle:hover {
  background: rgba(255, 0, 180, 0.18);
  border-color: rgba(255, 0, 180, 0.45);
}

.torah-toggle:active {
  transform: scale(0.96);
}

.torah-body {
  font-family: "Noto Sans Hebrew", "Arial Hebrew", "David", "Heebo", ui-sans-serif, system-ui, -apple-system,
    Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  font-size: 20px;
  line-height: 1.2;
  color: rgba(0, 0, 0, 0.72);
  direction: rtl;
  text-align: right;
  max-height: 180px;
  overflow-y: auto;
  padding-right: 4px;
}

.torah-body::-webkit-scrollbar {
  width: 8px;
}

.torah-body::-webkit-scrollbar-track {
  background: rgba(255, 0, 180, 0.05);
  border-radius: 4px;
}

.torah-body::-webkit-scrollbar-thumb {
  background: rgba(255, 0, 180, 0.3);
  border-radius: 4px;
}

.torah-body::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 0, 180, 0.45);
}

.torah-body.show-english {
  direction: ltr;
  text-align: left;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
}

.torah-body a {
  color: rgba(255, 0, 180, 0.85);
  text-decoration: none;
}

.torah-body a:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-color: rgba(255, 0, 180, 0.45);
}

@media (max-width: 640px) {
  .social {
    left: 50%;
    top: calc(10px + env(safe-area-inset-top));
    transform: translateX(-50%);
    gap: 14px;
    flex-wrap: wrap;
    justify-content: center;
  }

  .center {
    transform: translateY(22px);
  }
}

.torah {
  width: min(520px, calc(100vw - 44px));
  margin-top: 10px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(255, 0, 180, 0.16);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.03), 0 8px 30px rgba(255, 0, 180, 0.08);
  backdrop-filter: blur(10px);
}

@media (max-width: 640px) {
  .torah {
    width: calc(100vw - 28px);
    padding: 10px 12px;
  }
}

.caption {
  font-family: "Caveat", ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial,
    "Apple Color Emoji", "Segoe UI Emoji";
  font-size: 36px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: rgba(0, 0, 0, 0.78);
  text-align: center;
}

.caption-he {
  font-family: "Noto Sans Hebrew", "Arial Hebrew", "David", "Heebo", ui-sans-serif, system-ui, -apple-system,
    Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: rgba(0, 0, 0, 0.6);
  direction: rtl;
  text-align: center;
  margin-top: -2px;
}

.tagline {
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial,
    "Apple Color Emoji", "Segoe UI Emoji";
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.01em;
  color: rgba(0, 0, 0, 0.5);
  text-align: center;
  margin-top: 4px;
  max-width: 320px;
  line-height: 1.4;
}

.marquee {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 18px;
  z-index: 2;
  pointer-events: none;
  overflow: hidden;
  display: none;
}

.marquee-track {
  display: inline-flex;
  white-space: nowrap;
  gap: 48px;
  padding-left: 100%;
  animation: marquee 42s linear infinite;
  will-change: transform;
}

.marquee-track span {
  font-family: "Caveat", ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial,
    "Apple Color Emoji", "Segoe UI Emoji";
  font-size: 20px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(0, 0, 0, 0.55);
}

@keyframes marquee {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-100%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .marquee-track {
    animation: none;
    padding-left: 0;
  }

  .center-image-pink {
    animation: none;
  }
}

#birdsFront {
  z-index: 3;
}

.footer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: calc(14px + env(safe-area-inset-bottom));
  z-index: 2;
  text-align: center;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji",
    "Segoe UI Emoji";
  font-size: 12px;
  letter-spacing: 0.08em;
  color: rgba(0, 0, 0, 0.4);
  text-transform: uppercase;
  pointer-events: none;
}
