:root {
  --paper: #e5d2b8;
  --phone-max: 430px;
}
* { box-sizing: border-box; }
html, body {
  margin: 0;
  width: 100%;
  min-height: 100%;
  background: var(--paper);
}
html { -webkit-text-size-adjust: 100%; }
body { overflow: hidden; }
button, video, img { -webkit-tap-highlight-color: transparent; }

.intro {
  position: fixed;
  inset: 0;
  z-index: 1000;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 35%, rgba(255,255,255,.16), transparent 42%),
    #c9a57f;
  opacity: 1;
  visibility: visible;
  transition: opacity 110ms linear, visibility 0s linear 110ms;
}
.stage {
  position: relative;
  width: min(100vw, calc(100dvh * 0.5625));
  aspect-ratio: 9 / 16;
  max-height: 100dvh;
  overflow: hidden;
  background: #d6b997;
  touch-action: manipulation;
  user-select: none;
  isolation: isolate;
}
.intro::before {
  content: "";
  position: absolute;
  inset: -24px;
  background: url("assets/poster.jpg") center / cover no-repeat;
  filter: blur(18px);
  transform: scale(1.08);
  opacity: .34;
  pointer-events: none;
}
.media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
  pointer-events: none;
  user-select: none;
}
.video { opacity: 0; visibility: hidden; }
.intro.is-playing .poster { opacity: 0; visibility: hidden; }
.intro.is-playing .video { opacity: 1; visibility: visible; }
.seal-button {
  position: absolute;
  z-index: 4;
  left: 50%;
  top: 55.2%;
  width: 27%;
  max-width: 122px;
  min-width: 88px;
  aspect-ratio: 1.15 / 1;
  transform: translate(-50%, -50%);
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  touch-action: manipulation;
}
.seal-button:focus-visible { outline: 2px solid rgba(255,255,255,.75); outline-offset: 5px; }

.open-hint {
  position: absolute;
  z-index: 4;
  left: 50%;
  top: 63.2%;
  margin: 0;
  transform: translateX(-50%);
  color: rgba(178, 136, 63, .92);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(10px, 2.7vw, 13px);
  font-weight: 500;
  letter-spacing: .09em;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
  text-shadow: 0 1px 0 rgba(255,255,255,.28);
  pointer-events: none;
  transition: opacity 120ms ease;
}
.intro.is-playing .open-hint { opacity: 0; }
.intro.is-playing .seal-button { pointer-events: none; }
.intro.is-done { opacity: 0; visibility: hidden; pointer-events: none; }
@media (min-width: 700px) {
  .stage {
    width: min(var(--phone-max), calc((100dvh - 36px) * 0.5625));
    max-height: calc(100dvh - 36px);
    border-radius: 22px;
    box-shadow: 0 24px 70px rgba(45, 27, 14, .28), 0 0 0 1px rgba(255,255,255,.12);
  }
  .seal-button { max-width: 116px; }
}
@media (max-width: 699px) { .stage { border-radius: 0; } }
@media (prefers-reduced-motion: reduce) { .intro { transition: none; } }
