:root {
  color-scheme: dark;
  font-family: Georgia, 'Times New Roman', serif;
  background: #070c11;
  color: #fff5e7;
  --gold: #e7c58f;
  --muted: #a8b1ba;
  --ease: cubic-bezier(.2,.7,.2,1);
}
* { box-sizing: border-box; }
body { margin: 0; }
button { font: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
button:focus-visible { outline: 2px solid var(--gold); outline-offset: 5px; }
[hidden] { display: none !important; }
.film { min-height: 100svh; position: relative; isolation: isolate; overflow: clip; background: radial-gradient(ellipse at 50% 35%, #18232d 0%, #0a1119 42%, #070c11 78%); }
.brand { position: relative; z-index: 3; padding: max(1.25rem, env(safe-area-inset-top)) max(1.5rem, env(safe-area-inset-left)); margin: 0; font: .8125rem/1.4 system-ui, sans-serif; letter-spacing: .34em; color: #d9c7ab; }
.scene { position: relative; width: min(calc(100% - 2rem), calc((100svh - 7.25rem) * .5625)); margin: .1rem auto 2rem; }
.media-frame { position: relative; width: 100%; aspect-ratio: 9 / 16; background: #070c11; border-radius: 1rem; overflow: hidden; box-shadow: 0 24px 80px #0008, 0 2px 10px #0005; outline: 1px solid #e7c58f22; }
video { display: block; width: 100%; height: 100%; object-fit: contain; background: #070c11; }
.tint { position: absolute; inset: 0; pointer-events: none; opacity: 0; background: linear-gradient(180deg, transparent 26%, #070c110d 42%, #070c1166 62%, #070c11eb 88%, #070c11 100%); transition: opacity 2s var(--ease); }
.start { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 1.25rem; background: linear-gradient(#070c1110,#070c1115 35%,#070c1155); }
.play { width: 4.5rem; height: 4.5rem; padding: 1.25rem; display: grid; place-items: center; border: 1px solid #f6e7c987; border-radius: 50%; background: #101b27b0; backdrop-filter: blur(14px); box-shadow: 0 12px 32px #0004, inset 0 1px 0 #ffffff26; color: #fff6e5; transition: transform .3s var(--ease), background .3s; }
.play svg { width: 1.5rem; height: 1.5rem; margin-left: 3px; fill: currentColor; }
.start-label { margin: 0; font: .875rem/1.5 system-ui,sans-serif; text-shadow: 0 1px 6px #000; color: #fff6e7; }
.controls { position: absolute; bottom: 0; left: 0; right: 0; padding: 2.5rem .75rem .7rem; background: linear-gradient(transparent, #03080bd9); color: #f8efe3; }
.control-row { display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
.control { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 44px; padding: .6rem .85rem; border: 1px solid #ffffff20; border-radius: 999px; background: #0b15237a; font: .875rem/1.3 system-ui,sans-serif; color: #f8efe3; transition: background .25s, border-color .25s, transform .25s; }
.control svg { width: 1rem; height: 1rem; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.timeline { height: 2px; margin: .6rem .25rem .4rem; background: #ffffff35; overflow: hidden; border-radius: 3px; }
.timeline-fill { display: block; height: 100%; width: 100%; transform: scaleX(0); transform-origin: left; background: #e8c997; }
.time { display: block; padding-inline: .25rem; color: #e0ded9; font: .75rem/1.5 system-ui,sans-serif; font-variant-numeric: tabular-nums; letter-spacing: .03em; }
.message { text-align: center; position: relative; z-index: 2; padding: 1rem 1.5rem max(2rem, env(safe-area-inset-bottom)); }
.message > * { margin: 0; }
h1 { font-size: clamp(2.45rem, 6.8vw, 3.5rem); font-weight: 400; line-height: 1.1; letter-spacing: -.045em; text-wrap: balance; }
.name { display: block; margin-top: .5em; color: var(--gold); font-size: .53em; line-height: 1.4; letter-spacing: -.01em; }
.love { margin-top: 1rem; font-size: clamp(1.125rem, 3.6vw, 1.375rem); line-height: 1.6; color: #efdfc3; }
.divider { width: 2rem; height: 1px; background: linear-gradient(90deg, transparent, #bc9868, transparent); margin: 1.4rem auto; }
.words { max-width: 34rem; margin-inline: auto; color: #ebe5dc; font-size: clamp(1rem, 3vw, 1.1875rem); line-height: 1.85; text-wrap: balance; }
.words span { display: block; }
.words span + span { margin-top: .5rem; }
.signature { margin-top: 1.75rem; color: var(--muted); font: .75rem/1.6 system-ui, sans-serif; letter-spacing: .11em; }
.replay { margin-top: 1.4rem; color: #d3c4ae; border-color: #d9bf8f2e; background: #ffffff04; }
.error { padding: 1rem; color: #fff0da; font: 1rem/1.5 system-ui,sans-serif; text-align: center; }
.loading { position: absolute; inset: 0; display: grid; place-content: center; background: #070c1160; color: #fff3e0; font: .875rem system-ui,sans-serif; }
.finished .scene { width: min(100%, 34rem); margin-top: -4.25rem; margin-bottom: 0; }
.finished .media-frame { border-radius: 0; box-shadow: none; outline: none; }
.finished .tint { opacity: 1; }
.finished .message { margin-top: -68%; }
.finished .message > * { animation: reveal 1.6s var(--ease) both; }
.finished .message h1 { animation-delay: .4s; }
.finished .love { animation-delay: .75s; }
.finished .divider { animation-delay: .9s; }
.finished .words { animation-delay: 1.15s; }
.finished .signature, .finished .replay { animation-delay: 1.5s; }
@keyframes reveal { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@media (hover: hover) and (pointer: fine) {
  .play:hover { transform: translateY(-2px) scale(1.025); background: #18293ad9; }
  .control:hover { border-color: #e7c58f70; background: #dcb88715; transform: translateY(-1px); }
}
@media (max-width: 420px) {
  .brand { padding-left: 1.25rem; }
  .message { padding-inline: 1.125rem; }
  .love { margin-top: .8rem; }
  .divider { margin-block: 1.125rem; }
}
@media (min-width: 740px) and (min-aspect-ratio: 6 / 5) {
  .brand { padding: 1.4rem clamp(1.5rem, 4vw, 4rem); }
  .finished .scene { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1fr); align-items: center; gap: clamp(2rem, 5vw, 5rem); width: min(calc(100% - 5rem), 66rem); margin: .25rem auto 2rem; }
  .finished .media-frame { width: min(100%, calc((100svh - 7.25rem) * .5625)); justify-self: center; border-radius: 1rem; outline: 1px solid #d9bf8f25; box-shadow: 0 30px 80px #0009, inset 0 1px 0 #ffffff20; }
  .finished .tint { opacity: .18; }
  .finished .message { margin: 0; padding: 1.5rem 0; text-align: left; }
  h1 { font-size: clamp(2.5rem, 4.8vw, 4.3rem); }
  .name { font-size: .48em; }
  .divider { margin-left: 0; }
  .words { margin-left: 0; font-size: clamp(1rem, 1.55vw, 1.2rem); }
  .words span + span { margin-top: .6rem; }
  .signature { margin-top: 2rem; }
}
@media (min-width: 740px) and (max-height: 540px) and (orientation: landscape) {
  .finished .scene { width: calc(100% - 3rem); gap: 2rem; grid-template-columns: .7fr 1.3fr; }
  .finished .message { padding-block: .5rem 1rem; }
  .finished .media-frame { width: min(100%, 13rem); }
  h1 { font-size: 2.4rem; }
  .love { margin-top: .6rem; }
  .divider { margin-block: .8rem; }
  .signature { margin-top: 1rem; }
  .replay { margin-top: .85rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
