:root {
  color-scheme: light;
  font-family: system-ui, sans-serif;
  background: #f6f1e8;
  color: #30241f;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
main {
  display: grid;
  grid-template-rows: auto minmax(13rem, 1fr);
  gap: clamp(.65rem, 2vh, 1.4rem);
  height: 100vh;
  height: 100dvh;
  min-height: 24rem;
  max-width: 69rem;
  margin: auto;
  padding: max(.65rem, env(safe-area-inset-top)) max(1rem, env(safe-area-inset-right))
    max(.3rem, env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left));
}
.carousel {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto auto;
  gap: .3rem;
  min-width: 0;
}
h1 {
  margin: 0;
  font: 400 clamp(2.75rem, 7vw, 5rem)/.9 Georgia, serif;
  letter-spacing: -.07em;
}
h1 span { color: #a34e36; }

button { font: inherit; cursor: pointer; }
button:focus-visible { outline: 3px solid #a34e36; outline-offset: 3px; }

.stage {
  overflow: hidden;
  border-radius: .8rem;
  background: #231c18;
  box-shadow: 0 .6rem 1.8rem #30241f22;
}
.portrait, video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 0;
  border: 0;
  background: transparent;
}
.portrait { touch-action: pan-y pinch-zoom; }
.portrait:focus-visible { outline-offset: -4px; }
.portrait img { display: block; width: 100%; height: 100%; object-fit: contain; }

.position {
  text-align: center;
  font-size: .75rem;
  font-variant-numeric: tabular-nums;
}

.filmstrip {
  position: relative;
  display: flex;
  gap: .5rem;
  overflow-x: auto;
  padding: .4rem;
}
.tile {
  position: relative;
  flex: 0 0 clamp(3.5rem, 10vw, 5.25rem);
  aspect-ratio: 1;
  padding: 0;
  border: 2px solid transparent;
  border-radius: .45rem;
  background: #e9ddcc;
}
.tile[aria-current] { border-color: #a34e36; }
.tile img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: .25rem; }
.tile span {
  position: absolute;
  right: .2rem;
  bottom: .2rem;
  display: grid;
  place-items: center;
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 50%;
  background: #241b18e6;
  color: #fff;
  font-size: .65rem;
}
