:root {
  color-scheme: dark;
  font-family: Charter, "Bitstream Charter", Georgia, serif;
  background: #090807;
  color: #fffaf4;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-width: 320px;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: #090807;
}

button {
  font: inherit;
}

:focus-visible {
  outline: 3px solid #f7c3a6;
  outline-offset: 4px;
}

.slideshow {
  position: fixed;
  inset: 0;
  isolation: isolate;
  background: #090807;
}

.stage-layer {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: grid;
  place-items: center;
  opacity: 0;
  transition:
    opacity 900ms cubic-bezier(0.16, 1, 0.3, 1),
    filter 900ms cubic-bezier(0.16, 1, 0.3, 1);
  filter: brightness(0.84);
}

.stage-layer.is-visible {
  z-index: 1;
  opacity: 1;
  filter: brightness(1);
}

.stage-layer img,
.stage-layer video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #090807;
}

.caption {
  position: absolute;
  z-index: 3;
  left: max(24px, env(safe-area-inset-left));
  bottom: max(24px, env(safe-area-inset-bottom));
  width: min(760px, calc(100% - 48px));
  padding: 12px 16px 13px;
  border-radius: 12px;
  background: rgb(30 27 26 / 88%);
  box-shadow: 0 16px 38px rgb(0 0 0 / 30%);
  font-size: clamp(1rem, 2.3vw, 1.45rem);
  line-height: 1.35;
  text-wrap: balance;
}

.empty-state {
  position: absolute;
  z-index: 2;
  inset: 0;
  display: grid;
  align-content: center;
  justify-items: center;
  padding: 32px;
  text-align: center;
}

.empty-state[hidden] {
  display: none;
}

.empty-state__mark {
  width: 74px;
  height: 5px;
  margin-bottom: 28px;
  border-radius: 999px;
  background: linear-gradient(90deg, #f7c3a6, #e8a73a, #a6bcc6, #8f914a);
}

.empty-state h1 {
  max-width: 12ch;
  margin: 0;
  font-size: clamp(2.4rem, 7vw, 5rem);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 0.98;
  text-wrap: balance;
}

.empty-state p {
  max-width: 42ch;
  margin: 24px 0 0;
  color: #d9cec2;
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: clamp(1rem, 2vw, 1.2rem);
  line-height: 1.55;
}

.notice {
  position: absolute;
  z-index: 4;
  top: max(18px, env(safe-area-inset-top));
  left: 50%;
  max-width: min(520px, calc(100% - 32px));
  padding: 10px 14px;
  transform: translateX(-50%);
  border-radius: 12px;
  background: rgb(9 8 7 / 90%);
  box-shadow: 0 14px 32px rgb(0 0 0 / 28%);
  color: #fffaf4;
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 0.9rem;
  text-align: center;
}

.sound-gate {
  position: absolute;
  z-index: 5;
  top: 50%;
  left: 50%;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 12px 18px;
  transform: translate(-50%, -50%);
  border: 0;
  border-radius: 12px;
  background: #f7c3a6;
  box-shadow: 0 18px 44px rgb(0 0 0 / 40%);
  color: #2f2a27;
  cursor: pointer;
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-weight: 750;
}

.sound-gate[hidden] {
  display: none;
}

.sound-gate svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

noscript {
  position: fixed;
  z-index: 10;
  inset: 24px auto auto 24px;
  padding: 12px;
  background: #fffaf4;
  color: #332d29;
}

@media (max-width: 600px) {
  .caption {
    left: max(14px, env(safe-area-inset-left));
    bottom: max(14px, env(safe-area-inset-bottom));
    width: calc(100% - 28px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .stage-layer {
    transition-duration: 120ms;
  }
}
