:root {
    color-scheme: dark;
    --night: #0f100e;
    --ivory: #fff3df;
    --sand: #e4cdb0;
    --gold: #ffd496;
    font-family: Assistant, Arial, sans-serif;
    background: var(--night);
    color: var(--ivory);
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; min-height: 100svh; }
h1, p { margin: 0; }

.shabbat {
    display: grid;
    justify-items: center;
    align-content: center;
    isolation: isolate;
    min-height: 100vh;
    min-height: 100svh;
    padding-block: max(.25rem, env(safe-area-inset-top)) max(1.6rem, env(safe-area-inset-bottom));
    background: radial-gradient(ellipse at 50% 50%, #211810 0%, var(--night) 76%);
}

.scene {
    --flame-left: 32.6389%;
    --flame-top: 15.2083%;
    --flame-width: 36.1111%;
    position: relative;
    width: min(100%, 73rem);
    width: min(100%, 73rem, max(27rem, calc((100svh - 12rem) * 1.5)));
    isolation: isolate;
}

.scene picture, .scene img { display: block; width: 100%; height: auto; }

.scene::after {
    content: '';
    position: absolute;
    z-index: 2;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(0deg, var(--night) 0, #0f100eea 4%, #0f100e38 16%, transparent 24%),
        linear-gradient(90deg, var(--night), #0f100e00 8%, #0f100e00 92%, var(--night));
}

.scene > .scene-candle-plate, .scene > .scene-flames {
    position: absolute;
    z-index: 1;
    top: var(--flame-top);
    left: var(--flame-left);
    width: var(--flame-width);
    pointer-events: none;
}

.shabbat-copy {
    position: relative;
    z-index: 3;
    width: min(100%, 44rem);
    margin-block-start: -3.8rem;
    padding-inline: max(1rem, env(safe-area-inset-left), env(safe-area-inset-right));
    text-align: center;
    text-shadow: 0 .1em .5em #0f100e;
}

h1 {
    color: var(--ivory);
    font-size: clamp(3.2rem, 7.1vw, 6.5rem);
    font-weight: 760;
    line-height: .98;
    letter-spacing: -.045em;
    text-wrap: balance;
}

.notice {
    font-size: clamp(1.12rem, 1.65vw, 1.52rem);
    color: var(--sand);
    margin-block-start: .65rem;
}

.schedule {
    margin-block-start: .4rem;
    color: var(--ivory);
    font-size: clamp(1.01rem, 1.43vw, 1.28rem);
}

time {
    display: inline-block;
    color: var(--gold);
    font: 700 1.23em / 1 Georgia, 'Times New Roman', serif;
    font-variant-numeric: tabular-nums;
}

.wish {
    margin-block-start: .9rem;
    font-size: clamp(1.02rem, 1.51vw, 1.28rem);
    color: var(--gold);
    font-weight: 650;
    text-wrap: balance;
}

@media (max-width: 900px) and (orientation: portrait), (max-width: 499px) {
    .scene {
        --flame-left: 17.5%;
        --flame-top: 10.5556%;
        --flame-width: 50.7143%;
        width: min(100%, 30rem, max(14rem, calc((100svh - 10rem) * .68)));
    }
    .shabbat-copy { margin-block-start: -2.8rem; }
    h1 { font-size: clamp(2.75rem, 14vw, 5rem); }
}

@media (max-height: 540px) and (min-width: 500px) and (orientation: landscape) {
    .scene { width: min(100%, max(19rem, calc((100svh - 8.5rem) * 1.5))); }
    .shabbat-copy { margin-block-start: -2.4rem; }
    h1 { font-size: clamp(2.4rem, 7.1vw, 3.7rem); }
    .notice, .schedule { margin-block-start: .3rem; }
    .wish { margin-block-start: .48rem; }
}

