:root { color-scheme:dark; --green:#06291d; --button-green:#06291d; --ivory:#f6e8c7; }
* { box-sizing:border-box; }
html { min-height:100%; background:var(--green); }
body { margin:0; overflow:hidden; }
.wedding { height:100vh; height:100dvh; width:100%; position:relative; overflow:hidden; isolation:isolate; display:grid; place-items:center; background:var(--green); }
/* Keep the original frame, character pixels and button anchors. */
.picture-frame { position:relative; width:min(100vw,177.6833156vh); width:min(100vw,177.6833156dvh); aspect-ratio:1672 / 941; }
.wedding-art { display:block; position:absolute; inset:0; width:100%; height:100%; pointer-events:none; }
.art-short,.art-tall { display:none; }
/* Match the artwork edges to the page and Safari toolbar tint without changing framing. */
.picture-frame::after { content:""; position:absolute; z-index:2; inset:0; pointer-events:none; background:linear-gradient(to bottom,var(--green) 0,rgba(6,41,29,0) 32px,rgba(6,41,29,0) calc(100% - 32px),var(--green) 100%); }

.enter-button { position:absolute; z-index:3; left:50%; top:77%; transform:translate(-50%,calc(-50% - 10px)); display:inline-flex; align-items:center; justify-content:center; min-height:44px; padding:5px; color:var(--button-green); font-family:'Wedding Calligraphy','Apple Chancery','Brush Script MT',cursive; font-size:1.54375rem; font-weight:400; letter-spacing:0; line-height:1.05; text-align:center; text-decoration:none; white-space:nowrap; -webkit-tap-highlight-color:transparent; touch-action:manipulation; user-select:none; -webkit-user-select:none; }
.enter-button span { display:flex; align-items:center; justify-content:center; width:175.56px; height:47.652px; padding:0; border:0; border-radius:0; background:transparent; box-shadow:none; position:relative; overflow:hidden; transition:filter .15s,transform .15s; }
/* Keep the supplied PNGs intact. Frame their artwork without the transparent canvas. */
.button-lettering { display:block; position:absolute; width:188.7557604%; height:143.8202247%; max-width:none; left:-42.9493088%; top:-23.8764045%; pointer-events:none; }
@media (hover:hover) and (pointer:fine) { .enter-button:hover span { filter:brightness(1.02); } }
.enter-button.is-held span,.enter-button:active span { filter:brightness(.96); transform:scale(.98); box-shadow:none; }
.enter-button.tap-feedback span { animation:button-tap .18s ease-out; }
@keyframes button-tap {
  0%,35% { transform:scale(.98); filter:brightness(.96); }
  100% { transform:scale(1); filter:brightness(1); }
}
.enter-button:focus-visible { outline:none; }
.enter-button:focus-visible span { outline:2px solid var(--ivory); outline-offset:4px; }
.colour-filters { position:absolute; width:0; height:0; overflow:hidden; pointer-events:none; }
.petal-layer { position:absolute; z-index:2; inset:0; overflow:hidden; pointer-events:none; }
.petal { position:absolute; top:-35px; left:var(--left); opacity:0; animation:petal-fall var(--duration) var(--delay) linear infinite; }
.petal-art { display:block; width:25px; height:25px; background-image:url('/assets/wedding-original.png'); background-size:1082px 849px; background-position:-1017px -449px; border-radius:50%; mix-blend-mode:lighten; transform:scale(var(--scale)); }
@keyframes petal-fall { 0% { opacity:0; transform:translate3d(0,-25px,0) rotate(0deg); } 8% { opacity:.7; } 50% { transform:translate3d(var(--drift),50svh,0) rotate(170deg); } 90% { opacity:.65; } 100% { opacity:0; transform:translate3d(0,calc(100svh + 50px),0) rotate(340deg); } }
@media (orientation:portrait) {
  .wedding { background:var(--green); }
  .picture-frame { width:100%; height:100%; aspect-ratio:auto; }
  .art-desktop { display:none; }
  .art-short { display:block; }
  .enter-button { top:max(78%,138.5929861849vw); font-size:1.30625rem; }
  .enter-button span { width:147.972px; height:43.89px; padding:0; }
  .petal:nth-child(n+9) { display:none; }
}
@media (orientation:portrait) and (max-aspect-ratio:941 / 1672) {
  .art-short { display:none; }
  .art-tall { display:block; }
  .enter-button { top:max(73.5%,158.8915592028vw); }
}
@media (prefers-reduced-motion:reduce) { .enter-button span { transition:none; } .enter-button.tap-feedback span { animation:none; filter:brightness(.94); } .enter-button.is-held span,.enter-button:active span { transform:none; filter:brightness(.94); } .petal-layer { display:none; } }

/* Home Screen mode lets artwork extend beneath the system status area. */
@media (display-mode:standalone), (display-mode:fullscreen) {
  html,body { width:100%; height:100%; margin:0; padding:0; }
  .wedding { width:100%; height:100vh; height:100dvh; }
  .picture-frame::after { display:none; }
}
