/* ============ SWIPE FEEDBACK ============ */
.book-viewport.swiping { transition: none; }

/* Reader-style swipe visual: dim overlay + stage-wide drag translate on book-viewport. */
.reader-stage {
  --swipe-shift-x: 0px;
  --swipe-shift-y: 0px;
  --swipe-scale: 1;
  --swipe-dim: 0;
}

.reader-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background-color: rgba(15, 23, 42, var(--swipe-dim));
  opacity: 0;
  transition: opacity 140ms ease;
}

.reader-stage.swipe-resetting::before {
  transition: opacity 140ms ease, background-color 180ms ease;
}

.reader-stage.is-swiping::before,
.reader-stage.swipe-resetting::before {
  opacity: 1;
}

.book-viewport {
  transform: translate3d(var(--swipe-shift-x), var(--swipe-shift-y), 0)
    scale(var(--swipe-scale));
  will-change: transform;
}

.reader-stage.swipe-resetting .book-viewport {
  transition: transform 180ms cubic-bezier(0.22, 0.9, 0.24, 1);
}

/* ============ COVER SWIPE HINT (mobile only) ============ */
.cover-hint {
  position: absolute;
  right: 14px;
  bottom: 14px;
  z-index: 3;
  pointer-events: none;
  transition: opacity 220ms ease;
}

.cover-hint--hidden {
  opacity: 0;
}

.cover-hint-badge {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  padding: 6px 10px 7px;
  border-radius: 18px;
  background: rgba(30, 41, 59, 0.24);
  border: 1px solid rgba(255, 255, 255, 0.14);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.14);
}

.cover-hint-row {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.cover-hint-up {
  height: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: -1px;
}

.cover-hint-text {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.16px;
  color: rgba(255, 255, 255, 0.96);
  text-shadow: 0 8px 18px rgba(0, 0, 0, 0.32);
  white-space: nowrap;
}

.cover-hint-chevrons-up,
.cover-hint-chevrons-left {
  display: block;
  overflow: visible;
}

.cover-hint-chevrons-up path,
.cover-hint-chevrons-left path {
  fill: none;
  stroke: rgba(255, 255, 255, 0.95);
  stroke-width: 2.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.cover-hint-chevrons-left {
  animation: coverHintLeftFloat 1.5s ease-in-out infinite;
}

.cover-hint-chevrons-up {
  animation: coverHintUpFloat 1.5s ease-in-out infinite;
}

.cover-hint-chevrons-left .l1,
.cover-hint-chevrons-up .u1 { opacity: 0.32; }

.cover-hint-chevrons-left .l2,
.cover-hint-chevrons-up .u2 { opacity: 0.64; }

.cover-hint-chevrons-left .l3,
.cover-hint-chevrons-up .u3 { opacity: 1; }

@keyframes coverHintLeftFloat {
  0%, 100% { transform: translateX(0); opacity: 0.74; }
  50%      { transform: translateX(-4px); opacity: 1; }
}

@keyframes coverHintUpFloat {
  0%, 100% { transform: translateY(0); opacity: 0.74; }
  50%      { transform: translateY(-4px); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .cover-hint-chevrons-left,
  .cover-hint-chevrons-up { animation: none; }
}
