*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  background: #1f1f1f;
  color: #d8d8d8;
  font-family: Georgia, "Times New Roman", Times, serif;
  touch-action: manipulation;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem 1rem;
}

/* Landing */
.statement {
  max-width: 34rem;
  font-size: 1.05rem;
  line-height: 1.6;
}
.statement p { margin: 0 0 1.1rem; }
.statement h1 {
  margin: 0 0 1.25rem;
  font-size: inherit;
  font-weight: bold;
}
.enter {
  display: inline-block;
  margin-top: 1rem;
  color: #f2f2f2;
  text-decoration: none;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-size: 0.85rem;
  font-family: inherit;
  background: none;
  border: 0;
  border-bottom: 1px solid #666;
  border-radius: 0;
  padding: 0 0 2px;
  cursor: pointer;
}
.enter:hover, .enter:focus-visible { border-color: #f2f2f2; }
.statement .blocked { margin: 1rem 0 0; color: #999; font-size: 0.85rem; }

/* Viewer */
/* The stage is as wide as the window allows, but never so tall that the
   caption and controls (--chrome) are pushed off screen. */
.viewer {
  --chrome: 7.5rem;
  padding: 1rem;
}
.viewer main { width: 100%; text-align: center; }
figure {
  margin: 0 auto;
  width: min(100%, calc((100vh - 2rem - var(--chrome)) * 737 / 492));
  width: min(100%, calc((100dvh - 2rem - var(--chrome)) * 737 / 492));
}
.frame {
  position: relative;
  width: 100%;
  aspect-ratio: 737 / 492;
  background: #111;
}
.frame img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
#front { opacity: 1; }
#front.fading { transition: opacity 0.9s linear; }
figcaption {
  margin-top: 1rem;
  font-size: 1rem;
  letter-spacing: 0.02em;
}
.controls {
  margin-top: 1.5rem;
  display: flex;
  justify-content: center;
  gap: 0.75rem;
}
.controls button {
  font: inherit;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #d8d8d8;
  background: transparent;
  border: 1px solid #555;
  padding: 0.45rem 1.1rem;
  cursor: pointer;
}
.controls button:hover:not(:disabled),
.controls button:focus-visible { border-color: #d8d8d8; color: #fff; }
.controls button:disabled { opacity: 0.35; cursor: default; }
