:root { color-scheme: dark; --navy: #19185e; --orange: #ff6b00; }
* { box-sizing: border-box; }
html, body { min-height: 100%; margin: 0; }
body { background: var(--navy); color: var(--orange); font-family: 'Arial', sans-serif; }
body.intro-active { overflow: hidden; background: #000; }
body.intro-active::after, body.intro-active .pattern { display: none; }
.intro { position: fixed; inset: 0; z-index: 10; background: #000; overflow: hidden; }
/* Size the video itself at 16:9 so Safari also preserves the poster and playback proportions. */
.intro video { position: absolute; left: 50%; top: 50%; display: block; width: max(100vw, calc(100vh * 16 / 9)); height: max(100vh, calc(100vw * 9 / 16)); max-width: none; max-height: none; transform: translate(-50%, -50%); object-fit: cover; object-position: center; pointer-events: none; }
@supports (height: 100dvh) {
  .intro { height: 100dvh; }
  .intro video { width: max(100vw, calc(100dvh * 16 / 9)); height: max(100dvh, calc(100vw * 9 / 16)); }
}
.intro-action { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; padding: 0; background: transparent; color: #fff; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.intro-action:focus-visible { outline: 2px solid #fff; outline-offset: -6px; border-radius: 0; }
.intro-hint { position: absolute; left: 50%; bottom: max(28px, env(safe-area-inset-bottom)); transform: translateX(-50%); padding: 10px 18px; border-radius: 30px; background: #0008; font: 400 14px/1.4 Arial, sans-serif; white-space: nowrap; }
body::after { content: ''; position: fixed; inset: 0; pointer-events: none; background: radial-gradient(ellipse at 50% 40%, transparent 20%, #08092480 100%); }
.pattern { position: fixed; inset: 0; background: url('/assets/pattern.jpeg') center / 610px; opacity: .085; mask-image: radial-gradient(ellipse at center, transparent 24%, black 95%); transition: opacity 1s; }
main { min-height: 100svh; display: grid; place-items: center; padding: 24px; position: relative; z-index: 1; }
.login { width: min(100%, 400px); display: flex; flex-direction: column; align-items: center; padding: 0 14px 18px; }
.logo { width: 300px; max-width: 90%; height: 122px; object-fit: cover; filter: url(#logo-ink); user-select: none; }
.pin { display: flex; gap: 19px; margin: 12px 0 30px; height: 16px; align-items: center; }
.pin span { width: 11px; height: 11px; border: 1.5px solid #ff852c80; border-radius: 50%; transition: background .16s, box-shadow .16s, transform .16s; }
.pin span.filled { background: var(--orange); border-color: var(--orange); box-shadow: 0 0 16px #ff6b0050; transform: scale(1.1); }
.keypad { display: grid; grid-template-columns: repeat(3, 84px); column-gap: 31px; row-gap: 12px; align-items: center; justify-content: center; }
.bottle { border: 0; background: transparent; width: 84px; height: 113px; padding: 0; position: relative; cursor: pointer; -webkit-tap-highlight-color: transparent; transition: transform .18s, filter .18s; }
.bottle img { position: absolute; height: 100%; width: auto; top: 0; left: 50%; transform: translateX(-50%); pointer-events: none; filter: drop-shadow(0 7px 7px #0006); }
.bottle span { position: absolute; top: 58%; left: 50%; transform: translate(-50%, -25%); width: 30px; height: 32px; border-radius: 5px; display: grid; place-items: center; color: #fff9e9; background: #17165a; border: 1px solid #efbc69; box-shadow: 0 2px 4px #0005; font: 800 24px/1 Arial, sans-serif; pointer-events: none; }
.bottle:hover { transform: translateY(-5px) rotate(-3deg); filter: brightness(1.12); }
.bottle:active { transform: translateY(1px) scale(.92); }
button:focus-visible { outline: 2px solid #ffb36b; outline-offset: 6px; border-radius: 9px; }
.erase { background: none; border: 0; color: #ff9b54; cursor: pointer; width: 64px; height: 64px; justify-self: center; display: grid; place-items: center; opacity: .7; }
.erase:hover { opacity: 1; }
.erase svg { width: 25px; height: 25px; }
[hidden] { display: none !important; }
.countdown { width: 100%; text-align: center; display: flex; flex-direction: column; align-items: center; animation: reveal 1s ease both; }
.countdown .countdown-logo { width: clamp(270px, 32vw, 460px); max-width: 90%; height: auto; aspect-ratio: 2.46; margin-bottom: clamp(32px, 6vh, 64px); }
.waiting { margin: 0 0 24px; font-size: clamp(16px, 2vw, 24px); font-weight: 400; letter-spacing: .04em; color: #ffa05d; }
.evening { margin: 0; font-size: clamp(58px, 11vw, 154px); font-weight: 900; line-height: .97; letter-spacing: -.065em; }
.evening span { display: block; }
.is-evening .countdown-logo { margin-bottom: clamp(36px, 6vh, 68px); }
.time { display: flex; align-items: center; justify-content: center; gap: clamp(6px, 1.6vw, 27px); font-size: clamp(32px, 10vw, 148px); font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -.055em; text-shadow: 0 4px 40px #ff6b0018; }
.time span { min-width: 1.3em; }
.time b { font-weight: 400; font-size: .58em; opacity: .55; transform: translateY(-.08em); }
body.unlocked .pattern { opacity: .045; }
.shake { animation: shake .4s; }
@keyframes shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
@keyframes reveal { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@media (max-height: 730px) { main { padding: 12px; } .logo { height: 100px; width: 260px; } .pin { margin: 8px 0 20px; } .bottle { height: 94px; } .keypad { row-gap: 9px; } .bottle span { width: 26px; height: 29px; font-size: 21px; } }
@media (prefers-reduced-motion: reduce) { *, *::after { animation: none !important; transition: none !important; } }
