html,
body {
  height: 100%;
}

body {
  background: var(--night);
  overflow: hidden;
}

.show {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  height: 100vh;
  height: 100dvh;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
  background: var(--night);
}

.top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 1.25rem;
}

.top__home {
  font-size: 1.375rem;
  text-decoration: none;
  white-space: nowrap;
}

.top__home i {
  color: var(--gold);
}

.top__credit {
  margin: 0;
  color: var(--ivory-dim);
  font-size: 1rem;
  text-align: right;
}

.top__credit em {
  color: var(--ivory);
}

.stage {
  position: relative;
  min-height: 0;
  overflow: hidden;
  touch-action: pan-y pinch-zoom;
}

.slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  transition: opacity 450ms ease;
  user-select: none;
  -webkit-user-drag: none;
}

.slide:not([src]) {
  visibility: hidden;
}

.slide.is-active {
  opacity: 1;
}

.status {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: 1rem;
  margin: 0;
  padding: 0.35rem 0.8rem;
  transform: translateX(-50%);
  background: rgba(20, 16, 22, 0.86);
  color: var(--ivory);
  font-size: 1rem;
  white-space: nowrap;
}

.zone {
  position: absolute;
  z-index: 2;
  top: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  width: 28%;
  padding: 0 1.25rem;
  border: 0;
  background: none;
  color: var(--ivory);
  cursor: pointer;
  opacity: 0;
  transition: opacity 160ms ease;
}

.zone svg {
  width: 2.5rem;
  height: 1.1rem;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.7));
}

.zone--prev {
  left: 0;
  justify-content: flex-start;
}

.zone--next {
  right: 0;
  justify-content: flex-end;
}

@media (hover: hover) {
  .zone:hover {
    opacity: 1;
  }
}

.bar {
  padding: 0.25rem 1.25rem 0.6rem;
}

.scrub {
  display: block;
  width: 100%;
  height: 1.5rem;
  margin: 0;
  background: none;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}

.scrub::-webkit-slider-runnable-track {
  height: 1px;
  background: var(--aubergine-line);
}

.scrub::-moz-range-track {
  height: 1px;
  background: var(--aubergine-line);
}

.scrub::-webkit-slider-thumb {
  width: 0.7rem;
  height: 1.1rem;
  margin-top: -0.55rem;
  border: 0;
  border-radius: 0;
  background: var(--gold);
  appearance: none;
  -webkit-appearance: none;
}

.scrub::-moz-range-thumb {
  width: 0.7rem;
  height: 1.1rem;
  border: 0;
  border-radius: 0;
  background: var(--gold);
}

.controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.controls__group {
  display: flex;
  gap: 0.25rem;
  margin-left: -0.6rem;
}

.control {
  min-height: 2.75rem;
  padding: 0 0.6rem;
  border: 0;
  background: none;
  color: var(--ivory);
  cursor: pointer;
  font: inherit;
  font-size: 1.0625rem;
}

.control:hover {
  color: var(--gold);
}

.control--play {
  min-width: 4.25rem;
  color: var(--gold);
  font-style: italic;
}

.control--full {
  margin-right: -0.6rem;
}

.count {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
  margin-left: auto;
  color: var(--ivory-dim);
  font-size: 1.0625rem;
}

.count input {
  width: 3.4rem;
  padding: 0.1rem 0.2rem;
  border: 0;
  border-bottom: 1px solid var(--aubergine-line);
  border-radius: 0;
  background: none;
  color: var(--ivory);
  font: inherit;
  font-size: 1.0625rem;
  text-align: right;
  appearance: textfield;
  -moz-appearance: textfield;
}

.count input::-webkit-outer-spin-button,
.count input::-webkit-inner-spin-button {
  margin: 0;
  -webkit-appearance: none;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.noscript {
  position: fixed;
  inset: auto 0 0;
  margin: 0;
  padding: 1rem;
  background: var(--aubergine);
  text-align: center;
}

@media (max-width: 620px) {
  .top {
    display: block;
    padding: 0.5rem 1rem;
  }

  .top__credit {
    font-size: 0.9375rem;
    text-align: left;
  }

  .bar {
    padding: 0.15rem 1rem 0.4rem;
  }

  .control--full {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .slide,
  .zone {
    transition: none;
  }
}
