:root {
  color-scheme: dark;
  font-family: Arial, Helvetica, sans-serif;
  background: #08131d;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: #08131d;
}

button,
a {
  font: inherit;
}

#deck {
  position: relative;
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  user-select: none;
}

#stage {
  position: relative;
  width: min(100vw, calc(100vh * 16 / 9));
  height: min(100vh, calc(100vw * 9 / 16));
  margin: 0;
  overflow: hidden;
  background: #f7f0e3;
  box-shadow: 0 0 80px rgb(0 0 0 / 45%);
}

#slide {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  -webkit-user-drag: none;
}

.click-zone {
  position: fixed;
  z-index: 2;
  top: 0;
  width: 28vw;
  height: 100vh;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

#previous-zone {
  left: 0;
  cursor: w-resize;
}

#next-zone {
  right: 0;
  cursor: e-resize;
}

#progress {
  position: fixed;
  z-index: 4;
  right: 0;
  bottom: 0;
  left: 0;
  height: 4px;
  background: rgb(255 255 255 / 13%);
}

#progress span {
  display: block;
  width: 0;
  height: 100%;
  background: #ef6755;
  transition: width 160ms ease-out;
}

#controls {
  position: fixed;
  z-index: 5;
  right: 18px;
  bottom: 18px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px;
  border: 1px solid rgb(255 255 255 / 15%);
  border-radius: 10px;
  background: rgb(8 19 29 / 80%);
  color: #fff9ef;
  opacity: 0;
  backdrop-filter: blur(10px);
  transition: opacity 150ms ease;
}

#deck:hover #controls,
#controls:focus-within {
  opacity: 1;
}

#controls button,
#controls a {
  min-width: 34px;
  height: 32px;
  padding: 0 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}

#controls button:hover,
#controls button:focus-visible,
#controls a:hover,
#controls a:focus-visible {
  outline: none;
  background: rgb(255 255 255 / 14%);
}

#counter {
  min-width: 62px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

#hint {
  position: fixed;
  z-index: 6;
  bottom: 24px;
  left: 50%;
  padding: 9px 14px;
  transform: translateX(-50%);
  border-radius: 8px;
  background: rgb(8 19 29 / 78%);
  color: #fff9ef;
  font-size: 14px;
  pointer-events: none;
  transition: opacity 500ms ease;
}

#hint.hidden {
  opacity: 0;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (prefers-reduced-motion: reduce) {
  #progress span,
  #controls,
  #hint {
    transition: none;
  }
}

@media (pointer: coarse) {
  #controls {
    opacity: 1;
  }

  #hint {
    display: none;
  }
}
