/* MOSHOO — browse the length of the cue within the detail view. */
.inspection-travel[hidden] { display: none !important; }

body.collection-preview .inspection-travel {
  --travel-top-limit: calc(106px + env(safe-area-inset-top, 0px));
  --travel-bottom-limit: calc(var(--detail-control-bottom, 183px) + 68px + env(safe-area-inset-bottom, 0px));
  --travel-track-preferred: 140px;
  --travel-track-height: clamp(44px, calc(100dvh - var(--travel-top-limit) - var(--travel-bottom-limit) - 96px), var(--travel-track-preferred));
  --travel-height: calc(var(--travel-track-height) + 96px);
  display: none;
  position: absolute;
  z-index: 4;
  top: clamp(var(--travel-top-limit), calc((100% + var(--travel-top-limit) - var(--travel-bottom-limit) - var(--travel-height)) / 2), calc(100% - var(--travel-bottom-limit) - var(--travel-height)));
  right: max(8px, calc(var(--detail-edge, 24px) - 12px));
  width: 44px;
  height: var(--travel-height);
  flex-direction: column;
  align-items: center;
  gap: 4px;
  border-radius: 22px;
  background: linear-gradient(180deg, #130b102e, #130b1059 50%, #130b102e);
  color: #c7aeb5;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

body.collection-preview .stage[data-inspecting="true"] .inspection-travel:not([hidden]) { display: flex; }
/* Full view retains presets; detail replaces them with continuous navigation. */
body.collection-preview .stage[data-inspecting="true"] .chapter-nav { display: none; }

body.collection-preview .inspection-travel .travel-end {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  gap: 4px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #c7aeb5;
  font-size: 10px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0;
  white-space: nowrap;
  transition: color .18s ease, background .18s ease;
}

body.collection-preview .inspection-travel .travel-end > span[aria-hidden="true"] {
  color: #d86577;
  font-size: 13px;
  line-height: 1;
}

@media (hover: hover) {
  body.collection-preview .inspection-travel .travel-end:hover { color: #ffe1e5; background: #a72b4126; }
}

body.collection-preview .inspection-travel .travel-end:active { background: #a72b4138; }

body.collection-preview .inspection-travel input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  writing-mode: vertical-lr;
  direction: ltr;
  display: block;
  flex: 0 0 var(--travel-track-height);
  width: 44px;
  min-width: 44px;
  height: var(--travel-track-height);
  min-height: 44px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #db5269;
  accent-color: #db5269;
  cursor: ns-resize;
  touch-action: none;
}

body.collection-preview .inspection-travel input[type="range"]::-webkit-slider-runnable-track {
  width: 2px;
  height: 100%;
  border: 0;
  border-radius: 2px;
  background: #97354b;
}

body.collection-preview .inspection-travel input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 10px;
  height: 10px;
  margin: 0 0 0 -4px;
  border: 1px solid #f29aaa;
  border-radius: 50%;
  background: #db5269;
  box-shadow: 0 0 10px #bd344748;
}

body.collection-preview .inspection-travel input[type="range"]::-moz-range-track {
  width: 2px;
  height: 100%;
  border: 0;
  border-radius: 2px;
  background: #97354b;
}

body.collection-preview .inspection-travel input[type="range"]::-moz-range-progress {
  width: 2px;
  border-radius: 2px;
  background: #b84158;
}

body.collection-preview .inspection-travel input[type="range"]::-moz-range-thumb {
  width: 10px;
  height: 10px;
  border: 1px solid #f29aaa;
  border-radius: 50%;
  background: #db5269;
  box-shadow: 0 0 10px #bd344748;
}

body.collection-preview .inspection-travel .travel-end:focus-visible,
body.collection-preview .inspection-travel input[type="range"]:focus-visible {
  outline: 1px solid #f09ca9;
  outline-offset: 2px;
}

body.collection-preview .inspection-travel :disabled { opacity: .35; cursor: wait; }

@media (max-width: 680px) {
  body.collection-preview .inspection-travel {
    --travel-top-limit: calc(91px + env(safe-area-inset-top, 0px));
    --travel-track-preferred: 100px;
    right: 8px;
  }
}

@media (max-height: 740px) and (min-width: 681px) {
  body.collection-preview .inspection-travel { --travel-top-limit: calc(87px + env(safe-area-inset-top, 0px)); }
}

@media (max-height: 700px) and (max-width: 680px) and (orientation: portrait) {
  body.collection-preview .inspection-travel {
    --travel-top-limit: calc(82px + env(safe-area-inset-top, 0px));
    --travel-track-preferred: 76px;
  }
}

@media (max-height: 600px) and (max-width: 680px) and (orientation: portrait) {
  body.collection-preview .inspection-travel { --travel-track-preferred: 60px; }
}

@media (max-height: 500px) and (min-width: 481px) and (orientation: landscape) {
  body.collection-preview .inspection-travel {
    --travel-top-limit: calc(71px + env(safe-area-inset-top, 0px));
    --travel-bottom-limit: calc(var(--detail-control-bottom, 96px) + 64px + env(safe-area-inset-bottom, 0px));
    --travel-track-preferred: 60px;
    right: max(8px, env(safe-area-inset-right, 0px));
  }
}

@media (prefers-reduced-motion: reduce) {
  body.collection-preview .inspection-travel .travel-end { transition: none; }
}
