:root {
  color-scheme: dark;
  background: #000;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: #000;
  overscroll-behavior: none;
}

body {
  position: fixed;
  inset: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  user-select: none;
  -webkit-user-select: none;
}

#app {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100dvh;
  overflow: hidden;
  background: #000;
  touch-action: none;
}

.track {
  display: flex;
  width: max-content;
  height: 100%;
  will-change: transform;
  transform: translate3d(0, 0, 0);
}

.track.animating {
  transition: transform 300ms cubic-bezier(.22, .61, .36, 1);
}

.slide {
  position: relative;
  flex: 0 0 100vw;
  width: 100vw;
  height: 100dvh;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #000;
}

.slide img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  pointer-events: none;
  -webkit-user-drag: none;
}

.result {
  position: absolute;
  left: 50%;
  bottom: calc(14px + env(safe-area-inset-bottom));
  transform: translateX(-50%) translateY(8px);
  max-width: calc(100vw - 96px);
  padding: 7px 13px 8px;
  border-radius: 13px;
  background: rgba(0, 0, 0, .72);
  color: rgba(255, 255, 255, .96);
  font-size: clamp(15px, 4vw, 20px);
  line-height: 1.15;
  font-weight: 650;
  letter-spacing: .01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 0;
  transition: opacity 180ms ease, transform 180ms ease;
  pointer-events: none;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.result.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.fullscreen-btn {
  position: fixed;
  left: calc(10px + env(safe-area-inset-left));
  bottom: calc(10px + env(safe-area-inset-bottom));
  z-index: 20;
  width: 42px;
  height: 42px;
  padding: 0 0 3px;
  display: none;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 13px;
  background: rgba(0,0,0,.58);
  color: rgba(255,255,255,.94);
  font: 600 24px/1 system-ui, sans-serif;
  box-shadow: 0 2px 14px rgba(0,0,0,.25);
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
  cursor: pointer;
}

.fullscreen-btn.visible {
  display: flex;
}

@media (display-mode: fullscreen) {
  .fullscreen-btn {
    display: none !important;
  }
}
