html, body {
  height: 100%;
  margin: 0;
  background: #000;
  color: #fff;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  overflow: hidden;
}

.status {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: #000;
  color: rgba(255,255,255,0.75);
  z-index: 60;
}

/* Discreet top bar */
.topbar {
  position: fixed;
  top: calc(10px + env(safe-area-inset-top));
  left: 50%;
  transform: translateX(-50%);
  width: min(1100px, calc(100% - 24px));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(0,0,0,0.35);
  backdrop-filter: blur(10px);
  z-index: 50;
  opacity: 0.18;
  transition: opacity 180ms ease;
}

.topbar:hover,
.topbar:focus-within {
  opacity: 0.95;
}

.topbar__left, .topbar__right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn {
  appearance: none;
  border: 0;
  background: rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.95);
  width: 42px;
  height: 34px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 18px;
  line-height: 34px;
}

.btn.small {
  width: 44px;
  font-size: 14px;
}

.btn:disabled {
  opacity: 0.35;
  cursor: default;
}

.label {
  color: rgba(255,255,255,0.78);
  font-size: 13px;
  letter-spacing: 0.01em;
}

/* Stage + page area */
.stage {
  width: 100vw;
  height: 100dvh;
  display: grid;
  place-items: center;
  position: relative;
}

/* Use the page efficiently + avoid iOS/Android "100vh" cropping */
.pageWrap {
  width: calc(100vw - 24px);
  height: calc(100dvh - 64px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  display: grid;
  place-items: center;
  box-sizing: border-box;
  padding: 72px 0 16px;
}

.canvas {
  background: #000;
  border-radius: 12px;
  box-shadow: 0 12px 30px rgba(0,0,0,0.45);
  opacity: 0;
  transition: opacity 160ms ease;
  max-width: 100%;
}

.canvas--ready {
  opacity: 1;
}

/* Hover arrows */
.arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 54px;
  height: 54px;
  border: 0;
  background: transparent;
  cursor: pointer;
  opacity: 0;
  transition: opacity 180ms ease;
  z-index: 20;
}

.stage:hover .arrow { opacity: 0.85; }
.arrow.prev { left: 14px; }
.arrow.next { right: 14px; }

.arrow::before {
  content: "";
  display: block;
  width: 18px;
  height: 18px;
  border-right: 2px solid rgba(255,255,255,0.9);
  border-bottom: 2px solid rgba(255,255,255,0.9);
  transform: rotate(135deg);
  margin: auto;
}

.arrow.next::before {
  transform: rotate(-45deg);
}

@media (hover: none) {
  .arrow { opacity: 0.55; }
}
