/* ------------------------------------------------------------------------- the Shabbat sky */

/* The living sky behind the Shabbat screen (shabbat/sky.js). One decorative element filling the
   screen under its content (z-index 0; the screen isolates its own stacking). The sky runs the
   whole height, behind the panels too; the sun and moon travel the band at its top (--sky-orbit,
   36% by default), so they stay in the open sky above the panels; the hills and the land are the
   bottom strip (--sky-land, 10% by default). Both can be moved from the screen's own rules.
   Everything that moves is a transform or opacity animation and nothing is blurred by a filter, so
   the panel's GPU only composites. The light itself (opacities, colours, positions) is written by
   sky.js, rounded, only when it changes. */
.shabbat-sky {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
    contain: strict;
    background: #050b1f;
}

.shabbat-sky div {
    position: absolute;
}

/* ---------------------------------------------------------------- the sky's light */

/* Night is the base; day lies over it at the daylight's opacity, so the blue hour between them is
   the two mixed. Both run from the zenith to the horizon at the bottom. */
.shabbat-sky-night,
.shabbat-sky-day {
    inset: 0;
}

.shabbat-sky-night {
    background: linear-gradient(to bottom, #050b1f 0%, #0a1838 34%, #14274f 66%, #243a6a 88%, #2e4676 100%);
    background: linear-gradient(to bottom in oklab, #050b1f 0%, #0a1838 34%, #14274f 66%, #243a6a 88%, #2e4676 100%);
}

.shabbat-sky-day {
    opacity: 0;
    background: linear-gradient(to bottom, #1650c2 0%, #2569d6 22%, #3f88e6 44%, #6eaef0 66%, #a6d1f8 84%, #d2e9fd 100%);
    background: linear-gradient(to bottom in oklab, #1650c2 0%, #2569d6 22%, #3f88e6 44%, #6eaef0 66%, #a6d1f8 84%, #d2e9fd 100%);
}

/* The warm light of dawn and dusk (and the gold of a low sun by day): a bloom around the sun, a
   band along the foot of its orbit (the horizon the eye reads: the top edge of the screen's
   panels), a fainter one at the bottom, and a cooler violet from the top. The strip is twice the
   sky's width and follows the sun's x (sky.js `--sky-glow-at`), so the light is brightest under
   the sun. */
.shabbat-sky-glows {
    top: 0;
    bottom: 0;
    left: -50%;
    width: 200%;
    transform: translateX(calc((var(--sky-glow-at, 50) - 50) * 0.5%));
}

.shabbat-sky-glow {
    inset: 0;
    opacity: 0;
}

.shabbat-sky-glow.is-dawn {
    background:
        radial-gradient(14% 30% at 50% calc(var(--sky-orbit, 36%) * 0.92), rgb(255 222 176 / 0.9), rgb(255 186 150 / 0.4) 44%, rgb(255 186 150 / 0) 80%),
        radial-gradient(46% 26% at 50% var(--sky-orbit, 36%), rgb(255 190 150 / 0.95) 0%, rgb(250 156 160 / 0.62) 34%, rgb(196 128 184 / 0.26) 62%, rgb(150 110 190 / 0) 86%),
        radial-gradient(60% 40% at 50% 100%, rgb(255 184 146 / 0.6), rgb(244 142 166 / 0) 80%),
        linear-gradient(to bottom, rgb(86 74 152 / 0.42), rgb(86 74 152 / 0) 28%);
}

.shabbat-sky-glow.is-day {
    background:
        radial-gradient(12% 24% at 50% calc(var(--sky-orbit, 36%) * 0.92), rgb(255 236 190 / 0.6), rgb(255 236 190 / 0) 80%),
        radial-gradient(44% 20% at 50% var(--sky-orbit, 36%), rgb(255 226 168 / 0.55), rgb(255 226 168 / 0) 80%);
}

.shabbat-sky-glow.is-dusk {
    background:
        radial-gradient(14% 30% at 50% calc(var(--sky-orbit, 36%) * 0.92), rgb(255 196 120 / 0.95), rgb(255 136 92 / 0.42) 44%, rgb(255 136 92 / 0) 80%),
        radial-gradient(48% 28% at 50% var(--sky-orbit, 36%), rgb(255 150 80 / 0.96) 0%, rgb(236 96 108 / 0.66) 32%, rgb(150 72 150 / 0.3) 62%, rgb(110 60 140 / 0) 86%),
        radial-gradient(60% 40% at 50% 100%, rgb(255 146 72 / 0.62), rgb(228 90 112 / 0) 80%),
        linear-gradient(to bottom, rgb(58 50 124 / 0.46), rgb(58 50 124 / 0) 30%);
}

/* The cross-fades are switched on after the first model is drawn (sky.js `data-settled`), so the
   sky opens on its real light; then a change of palette (dawn to day) takes a few calm seconds. */
.shabbat-sky[data-settled='true'] .shabbat-sky-glow {
    transition: opacity 4s linear;
}

.shabbat-sky[data-settled='true'] .shabbat-sky-glows {
    transition: transform 4s linear;
}

/* --------------------------------------------------------------------------- the vault */

/* The whole sky. Its container units (cqw) carry the clouds and birds across it. */
.shabbat-sky-vault {
    inset: 0;
    container-type: size;
}

/* A faint river of light behind the stars, on deep night only. */
.shabbat-sky-milkyway {
    left: -20%;
    top: 26%;
    width: 140%;
    height: 34%;
    opacity: 0;
    transform: rotate(-30deg);
    background:
        radial-gradient(closest-side at 56% 50%, rgb(214 222 255 / 0.15), rgb(214 222 255 / 0) 70%),
        radial-gradient(closest-side, rgb(168 182 240 / 0.1), rgb(168 182 240 / 0) 100%);
}

.shabbat-sky-stars,
.shabbat-sky-twinkle {
    inset: 0;
}

/* Each group of stars sinks almost out of sight and comes back as one, slowly, on its own period
   (sky.js: 6.7 to 12.7 s), so the sky visibly breathes without ever flickering. */
.shabbat-sky-twinkle {
    animation: shabbat-sky-twinkle-a var(--sky-twinkle-duration, 9s) ease-in-out var(--sky-twinkle-delay, 0s) infinite;
}

.shabbat-sky-twinkle[data-twinkle='b'] {
    animation-name: shabbat-sky-twinkle-b;
}

.shabbat-sky-twinkle[data-twinkle='steady'] {
    animation: none;
    opacity: 0.85;
}

.shabbat-sky-star {
    width: var(--sky-star-size, 0.2vmin);
    height: var(--sky-star-size, 0.2vmin);
    margin: calc(var(--sky-star-size, 0.2vmin) / -2) 0 0 calc(var(--sky-star-size, 0.2vmin) / -2);
    border-radius: 50%;
    background: rgb(var(--sky-star-rgb, 255 255 255) / var(--sky-star-alpha, 0.8));
}

/* The few bright ones: a wide soft halo, each twinkling on its own - shrinking and fading, then
   swelling a little past its size - so they read as the sky's brightest even from across the room. */
.shabbat-sky-star.is-bright {
    box-shadow: 0 0 calc(var(--sky-star-size) * 3.4) calc(var(--sky-star-size) * 0.45) rgb(var(--sky-star-rgb) / 0.45);
    animation: shabbat-sky-glint var(--sky-twinkle-duration, 7s) ease-in-out var(--sky-twinkle-delay, 0s) infinite;
}

/* The radiant few: two thin crossed rays, brightest at the star and gone at their tips. They belong
   to the star, so its twinkle swells and fades them too. */
.shabbat-sky-rays {
    left: 50%;
    top: 50%;
    width: calc(var(--sky-star-size) * 9);
    height: calc(var(--sky-star-size) * 9);
    margin: calc(var(--sky-star-size) * -4.5) 0 0 calc(var(--sky-star-size) * -4.5);
    pointer-events: none;
}

.shabbat-sky-rays::before,
.shabbat-sky-rays::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
}

.shabbat-sky-rays::before {
    width: 100%;
    height: 0.1vmin;
    transform: translate(-50%, -50%);
    background: linear-gradient(to right, rgb(var(--sky-star-rgb) / 0), rgb(var(--sky-star-rgb) / 0.55) 50%, rgb(var(--sky-star-rgb) / 0));
}

.shabbat-sky-rays::after {
    width: 0.1vmin;
    height: 100%;
    transform: translate(-50%, -50%);
    background: linear-gradient(to bottom, rgb(var(--sky-star-rgb) / 0), rgb(var(--sky-star-rgb) / 0.55) 50%, rgb(var(--sky-star-rgb) / 0));
}

/* Deep and slow: a group sinks to a fifth of its light and comes back. */
@keyframes shabbat-sky-twinkle-a {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.18; }
}

@keyframes shabbat-sky-twinkle-b {
    0%, 100% { opacity: 0.22; }
    40% { opacity: 1; }
    70% { opacity: 0.6; }
}

@keyframes shabbat-sky-glint {
    0%, 100% { opacity: 1; transform: scale(1); }
    40% { opacity: 0.3; transform: scale(0.7); }
    70% { opacity: 0.95; transform: scale(1.2); }
}

/* Shooting stars: two, on long uneven cycles, each a second and a half of light falling down-left,
   head first, in the open sky at the top. The delays put the first one about 20 s after the screen
   comes up, not at once. */
.shabbat-sky-meteor {
    display: none;
    width: 18vmin;
    height: 0.24vmin;
    border-radius: 999px;
    transform-origin: 0 50%;
    opacity: 0;
    background: linear-gradient(to right, rgb(255 255 255 / 0.95), rgb(206 222 255 / 0.45) 22%, rgb(206 222 255 / 0) 100%);
}

.shabbat-sky-meteor::before {
    content: '';
    position: absolute;
    left: -0.2vmin;
    top: 50%;
    width: 0.6vmin;
    height: 0.6vmin;
    margin-top: -0.3vmin;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 0 1.2vmin 0.3vmin rgb(206 222 255 / 0.7);
}

.shabbat-sky[data-meteors='on'] .shabbat-sky-meteor {
    display: block;
}

.shabbat-sky-meteor.is-1 {
    top: 5%;
    left: 64%;
    animation: shabbat-sky-meteor-1 79s linear -57s infinite;
}

.shabbat-sky-meteor.is-2 {
    top: 12%;
    left: 36%;
    animation: shabbat-sky-meteor-2 131s linear -61s infinite;
}

@keyframes shabbat-sky-meteor-1 {
    0% { opacity: 0; transform: rotate(-28deg) translateX(0) scaleX(0.25); }
    0.4% { opacity: 1; }
    1.9% { opacity: 0; transform: rotate(-28deg) translateX(-30vmin) scaleX(1); }
    100% { opacity: 0; transform: rotate(-28deg) translateX(-30vmin) scaleX(1); }
}

@keyframes shabbat-sky-meteor-2 {
    0% { opacity: 0; transform: rotate(-34deg) translateX(0) scaleX(0.25); }
    0.3% { opacity: 0.9; }
    1.3% { opacity: 0; transform: rotate(-34deg) translateX(-26vmin) scaleX(1); }
    100% { opacity: 0; transform: rotate(-34deg) translateX(-26vmin) scaleX(1); }
}

/* --------------------------------------------------------------------- the sun and moon */

/* The orbit: the band at the top the sun and moon travel in. Its container units place them by the
   model's x / y (percent of the band), so moving them is a transform, never a layout. */
.shabbat-sky-orbit {
    top: 0;
    left: 0;
    right: 0;
    height: var(--sky-orbit, 36%);
    container-type: size;
}

.shabbat-sky-sun,
.shabbat-sky-moon {
    display: none;
    left: 0;
    top: 0;
    width: var(--sky-body-size);
    height: var(--sky-body-size);
    transform: translate(calc(var(--sky-x, 50) * 1cqw - 50%), calc(var(--sky-y, 50) * 1cqh - 50%));
}

.shabbat-sky[data-sun='on'] .shabbat-sky-sun,
.shabbat-sky[data-moon='on'] .shabbat-sky-moon {
    display: block;
}

/* Between two models (one a second) the sun and moon glide instead of stepping: a linear two-second
   transition, chained model to model, so their whole arc is one continuous move. Only once the sky
   has opened on its first model (`data-settled`), so they never slide in from the corner. */
.shabbat-sky[data-settled='true'] .shabbat-sky-sun,
.shabbat-sky[data-settled='true'] .shabbat-sky-moon {
    transition: transform 2s linear, opacity 2s linear;
}

.shabbat-sky-sun {
    --sky-body-size: 8vmin;
}

/* A wide soft bloom, the sun's own light on the sky around it. */
.shabbat-sky-sun-halo {
    inset: -260%;
    border-radius: 50%;
    background: radial-gradient(closest-side, rgb(255 248 222 / 0.62), rgb(255 238 196 / 0.24) 30%, rgb(255 232 186 / 0) 100%);
}

/* Low in the sky the light turns orange and spreads (`--sky-sun-warmth`, the model's warmth). */
.shabbat-sky-sun-ember {
    inset: -200%;
    border-radius: 50%;
    opacity: var(--sky-sun-warmth, 0);
    background: radial-gradient(closest-side, rgb(255 170 92 / 0.75), rgb(255 124 72 / 0.26) 42%, rgb(255 124 72 / 0) 100%);
}

.shabbat-sky-sun-disc {
    inset: 0;
    border-radius: 50%;
    background: radial-gradient(circle, #fffef7 0%, #fff6d6 52%, #ffe7a3 100%);
    box-shadow: 0 0 2.4vmin 0.4vmin rgb(255 244 206 / 0.85);
}

.shabbat-sky-sun-disc::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    opacity: var(--sky-sun-warmth, 0);
    background: radial-gradient(circle, #ffe2b0 0%, #ffb067 70%, #ff8f4a 100%);
}

.shabbat-sky-moon {
    --sky-body-size: 6.4vmin;
}

/* The moon's soft glow: cool, fading with the daylight (sky.js sets its opacity). */
.shabbat-sky-moon-halo {
    inset: -220%;
    border-radius: 50%;
    background: radial-gradient(closest-side, rgb(214 226 255 / 0.34), rgb(190 208 255 / 0.12) 38%, rgb(190 208 255 / 0) 100%);
}

/* The disc: limb-darkened, with the grey seas on it. */
.shabbat-sky-moon-disc {
    inset: 0;
    border-radius: 50%;
    overflow: hidden;
    background:
        radial-gradient(22% 18% at 38% 34%, rgb(150 150 138 / 0.34), rgb(150 150 138 / 0) 100%),
        radial-gradient(18% 22% at 62% 44%, rgb(150 150 138 / 0.3), rgb(150 150 138 / 0) 100%),
        radial-gradient(20% 14% at 50% 66%, rgb(150 150 138 / 0.26), rgb(150 150 138 / 0) 100%),
        radial-gradient(10% 9% at 30% 58%, rgb(150 150 138 / 0.24), rgb(150 150 138 / 0) 100%),
        radial-gradient(circle at 42% 38%, #fffdf3 0%, #f1ecda 58%, #d6d0bd 100%);
    box-shadow: 0 0 1.6vmin rgb(226 234 255 / 0.55);
}

/* An optional phase (model `moon.phase`, sky.js `moonShape`): the dark half, plus an ellipse in one
   half - lit over the dark half past the quarter, dark over the lit half before it. The dark is the
   sky's own colour, not black, with a trace of earthshine left on it. Without a phase: full. */
.shabbat-sky-moon-dark,
.shabbat-sky-moon-bite {
    display: none;
    top: 0;
    bottom: 0;
    width: 50%;
}

.shabbat-sky-moon[data-shape='phase'] .shabbat-sky-moon-dark,
.shabbat-sky-moon[data-shape='phase'] .shabbat-sky-moon-bite {
    display: block;
}

.shabbat-sky-moon-dark {
    background: rgb(var(--sky-moon-shade, 14 22 50) / 0.9);
}

.shabbat-sky-moon[data-dark-side='left'] .shabbat-sky-moon-dark,
.shabbat-sky-moon[data-bite-side='left'] .shabbat-sky-moon-bite {
    left: 0;
}

.shabbat-sky-moon[data-dark-side='right'] .shabbat-sky-moon-dark,
.shabbat-sky-moon[data-bite-side='right'] .shabbat-sky-moon-bite {
    left: 50%;
}

.shabbat-sky-moon-bite {
    overflow: hidden;
}

.shabbat-sky-moon-ellipse {
    top: 0;
    bottom: 0;
    left: 0;
    width: 200%;
    border-radius: 50%;
    transform: scaleX(var(--sky-moon-squeeze, 1));
}

.shabbat-sky-moon[data-bite-side='right'] .shabbat-sky-moon-ellipse {
    left: -100%;
}

.shabbat-sky-moon[data-bite='lit'] .shabbat-sky-moon-ellipse {
    background: #efe9d6;
}

.shabbat-sky-moon[data-bite='dark'] .shabbat-sky-moon-ellipse {
    background: rgb(var(--sky-moon-shade, 14 22 50) / 0.9);
}

/* ------------------------------------------------------------------------- the weather */

/* Clouds drift right to left across the whole sky over minutes, never blurred by a filter: each is
   many soft-edged puffs that melt into one another over a shaded base, in sky.js's colours
   (`--sky-cloud`: white by day, warm at dawn and dusk, dim slate by moonlight). */
.shabbat-sky-clouds {
    inset: 0;
    opacity: 0.9;
}

.shabbat-sky-cloud {
    left: 0;
    transform: translateX(var(--sky-cloud-rest, 40cqw));
    animation: shabbat-sky-drift var(--sky-drift, 300s) linear var(--sky-drift-delay, 0s) infinite;
    background-repeat: no-repeat;
    /* One puff: solid through most of it, with a short soft rim, so the tops read as rounded
       billows and the puffs still melt into each other. The base is the cloud's shaded underside. */
    --sky-puff: radial-gradient(closest-side, rgb(var(--sky-cloud) / 0.97) 0%, rgb(var(--sky-cloud) / 0.94) 52%, rgb(var(--sky-cloud) / 0.5) 78%, rgb(var(--sky-cloud) / 0) 100%);
    --sky-puff-shade: radial-gradient(closest-side, rgb(var(--sky-cloud-shade) / 0.9) 0%, rgb(var(--sky-cloud-shade) / 0.7) 48%, rgb(var(--sky-cloud-shade) / 0) 100%);
}

@keyframes shabbat-sky-drift {
    from { transform: translateX(104cqw); }
    to { transform: translateX(-100%); }
}

/* A broad fair-weather cumulus. */
.shabbat-sky-cloud.is-1 {
    top: 8%;
    width: 38vmin;
    height: 15vmin;
    --sky-drift: 320s;
    --sky-drift-delay: -150s;
    --sky-cloud-rest: 50cqw;
    background-image: var(--sky-puff), var(--sky-puff), var(--sky-puff), var(--sky-puff), var(--sky-puff), var(--sky-puff), var(--sky-puff), var(--sky-puff), var(--sky-puff-shade);
    background-size: 26% 62%, 24% 54%, 22% 50%, 24% 44%, 24% 44%, 26% 30%, 26% 30%, 70% 52%, 92% 34%;
    background-position: 46% 4%, 30% 22%, 64% 16%, 20% 52%, 78% 48%, 10% 84%, 90% 82%, 50% 72%, 50% 100%;
}

/* A smaller one, lower and quicker. */
.shabbat-sky-cloud.is-2 {
    top: 21%;
    width: 24vmin;
    height: 9.5vmin;
    --sky-drift: 230s;
    --sky-drift-delay: -40s;
    --sky-cloud-rest: 12cqw;
    background-image: var(--sky-puff), var(--sky-puff), var(--sky-puff), var(--sky-puff), var(--sky-puff), var(--sky-puff-shade);
    background-size: 32% 66%, 28% 56%, 28% 44%, 28% 32%, 64% 50%, 94% 36%;
    background-position: 42% 6%, 70% 32%, 18% 56%, 88% 82%, 50% 74%, 50% 100%;
}

/* A long high wisp, thin and slow. */
.shabbat-sky-cloud.is-3 {
    top: 3%;
    width: 52vmin;
    height: 6vmin;
    --sky-drift: 420s;
    --sky-drift-delay: -300s;
    --sky-cloud-rest: 20cqw;
    background-image:
        radial-gradient(closest-side, rgb(var(--sky-cloud) / 0.5), rgb(var(--sky-cloud) / 0)),
        radial-gradient(closest-side, rgb(var(--sky-cloud) / 0.42), rgb(var(--sky-cloud) / 0)),
        radial-gradient(closest-side, rgb(var(--sky-cloud) / 0.36), rgb(var(--sky-cloud) / 0));
    background-size: 62% 70%, 46% 54%, 40% 46%;
    background-position: 30% 40%, 78% 64%, 6% 72%;
}

/* A small puff, further down behind the panels. */
.shabbat-sky-cloud.is-4 {
    top: 46%;
    width: 18vmin;
    height: 7.5vmin;
    --sky-drift: 260s;
    --sky-drift-delay: -190s;
    --sky-cloud-rest: 74cqw;
    background-image: var(--sky-puff), var(--sky-puff), var(--sky-puff), var(--sky-puff), var(--sky-puff-shade);
    background-size: 44% 74%, 38% 60%, 34% 38%, 64% 56%, 96% 46%;
    background-position: 36% 10%, 72% 40%, 14% 76%, 52% 64%, 50% 98%;
}

/* Birds, by day only: a flock crosses right to left now and then (about 40 s and 150 s after the
   screen comes up), rising and falling a little, each bird beating its own wings. */
.shabbat-sky-flock {
    display: none;
    left: 0;
    transform: translateX(110cqw);
    animation: shabbat-sky-flight var(--sky-flight, 240s) linear var(--sky-flight-delay, 0s) infinite;
}

.shabbat-sky[data-birds='on'] .shabbat-sky-flock {
    display: block;
}

.shabbat-sky-flock.is-1 {
    top: 25%;
    --sky-flight: 240s;
    --sky-flight-delay: -200s;
}

.shabbat-sky-flock.is-2 {
    top: 13%;
    --sky-flight: 300s;
    --sky-flight-delay: -150s;
}

@keyframes shabbat-sky-flight {
    0% { transform: translateX(104cqw); }
    20% { transform: translateX(-16cqw); }
    100% { transform: translateX(-16cqw); }
}

.shabbat-sky-flock-bob {
    left: 0;
    top: 0;
    animation: shabbat-sky-bob 7s ease-in-out infinite;
}

@keyframes shabbat-sky-bob {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-1.4vmin); }
}

/* A distant bird: two shallow wing arcs. */
.shabbat-sky-bird {
    width: var(--sky-bird-size, 2vmin);
    height: calc(var(--sky-bird-size, 2vmin) * 0.42);
    color: rgb(28 38 62 / 0.72);
    transform-origin: 50% 100%;
    animation: shabbat-sky-flap var(--sky-flap, 1s) ease-in-out var(--sky-flap-delay, 0s) infinite;
}

.shabbat-sky-bird::before,
.shabbat-sky-bird::after {
    content: '';
    position: absolute;
    top: 0;
    width: 50%;
    height: 100%;
    box-sizing: border-box;
    border-top: 0.24vmin solid currentColor;
    border-radius: 50% 50% 0 0 / 100% 100% 0 0;
}

.shabbat-sky-bird::before {
    left: 0;
}

.shabbat-sky-bird::after {
    right: 0;
}

@keyframes shabbat-sky-flap {
    0%, 100% { transform: scaleY(1); }
    50% { transform: scaleY(-0.55); }
}

/* ---------------------------------------------------------------------- the hills */

/* Two ridges along the bottom, their crests cut by sky.js (clip-path); the near one is the land
   down to the edge. Light hazy sage by day, near-black by night, warmed at dawn and dusk
   (`--sky-ridge`); the land turns at the same daylight as the screen's text. */
.shabbat-sky-hills {
    left: 0;
    right: 0;
    background-color: rgb(var(--sky-ridge, 20 30 60));
}

.shabbat-sky-hills.is-far {
    top: calc(100% - var(--sky-land, 10%) - 5vmin);
    bottom: 0;
    background-image: linear-gradient(to bottom, rgb(255 255 255 / 0.08), rgb(255 255 255 / 0) 6vmin);
}

.shabbat-sky-hills.is-near {
    top: calc(100% - var(--sky-land, 10%));
    bottom: 0;
    background-image: linear-gradient(to bottom, rgb(255 255 255 / 0.06), rgb(0 0 0 / 0.08) 40%, rgb(0 0 0 / 0.14) 100%);
}

/* The village's lit windows, at night only (sky.js sets the opacity). */
.shabbat-sky-windows {
    inset: 0;
    opacity: 0;
}

.shabbat-sky-window {
    width: 0.32vmin;
    height: 0.32vmin;
    margin: -0.16vmin 0 0 -0.16vmin;
    border-radius: 50%;
    background: #ffd58a;
    box-shadow: 0 0 0.9vmin 0.2vmin rgb(255 196 110 / 0.55);
}

/* ---------------------------------------------------------------------- stillness */

/* Paused (sky.js `setVisible(false)`, or the page hidden): every animation holds where it is and
   the scene stays on screen; a shooting star caught mid-fall is hidden rather than frozen. */
.shabbat-sky[data-paused='true'] *,
.shabbat-sky[data-paused='true'] *::before,
.shabbat-sky[data-paused='true'] *::after {
    animation-play-state: paused !important;
}

.shabbat-sky[data-paused='true'] .shabbat-sky-meteor {
    visibility: hidden;
}

/* Paused, the sun and moon do not glide either: they keep their true place, one still step at a time. */
.shabbat-sky[data-paused='true'] .shabbat-sky-sun,
.shabbat-sky[data-paused='true'] .shabbat-sky-moon {
    transition: none;
}

/* Off for the hours they do not belong to (sky.js): no work is done for what cannot be seen. */
.shabbat-sky[data-stars='off'] .shabbat-sky-stars,
.shabbat-sky[data-stars='off'] .shabbat-sky-milkyway {
    display: none;
}

/* Reduced motion: a still sky. Stars hold their light, clouds rest where they look best, and the
   shooting stars and birds stay away. */
@media (prefers-reduced-motion: reduce) {
    .shabbat-sky *,
    .shabbat-sky *::before,
    .shabbat-sky *::after {
        animation: none !important;
        transition: none !important;
    }

    .shabbat-sky-meteor,
    .shabbat-sky-flock {
        display: none !important;
    }
}
