.editorial {
  --gutter: clamp(14px, 3vw, 48px);
  --card-width: clamp(156px, 29vw, 380px);
  margin-top: clamp(28px, 8vh, 96px);
  transition: opacity .28s ease;
}

.editorial-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 44px;
  padding-inline: var(--gutter);
  color: #555;
  letter-spacing: .09em;
  font-size: 11px;
}

.editorial-controls { display: flex; gap: 6px; }
.editorial-controls button { width: 44px; height: 44px; text-align: center; font-size: 21px; }
.editorial-controls button[aria-disabled="true"] { opacity: .32; cursor: default; }

.editorial .archive {
  display: flex;
  align-items: stretch;
  gap: clamp(12px, 2.4vw, 36px);
  margin: 0;
  padding: 18px var(--gutter) 24px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--gutter);
  scrollbar-width: thin;
  transition: none;
}

.editorial .archive:focus-visible { outline: 1px solid; outline-offset: -3px; }

.editorial .thumb {
  display: flex;
  flex: 0 0 var(--card-width);
  flex-direction: column;
  align-items: stretch;
  justify-content: start;
  gap: 10px;
  scroll-snap-align: start;
  perspective: 950px;
}

.editorial .thumb:focus-visible { outline-offset: 3px; }
.editorial .thumb.saved::after { color: #111; background: #fff; padding-inline: 6px; }

.editorial .thumb:nth-child(n) .thumb-art {
  max-width: none;
  aspect-ratio: 1;
  filter: saturate(.9);
  transform: rotateY(var(--tilt, 0deg)) scale(var(--scale, 1));
  transition: transform .25s ease-out, filter .25s ease-out;
}

.editorial .thumb:is(:hover, :focus-visible) .thumb-art { transform: none; filter: none; }

.editorial .thumb-caption {
  display: block;
  position: static;
  visibility: visible;
  opacity: 1;
  padding: 0;
  white-space: normal;
  font-size: 12px;
}

body.detail-open .editorial { opacity: 0; pointer-events: none; }
body.detail-open .editorial .archive { transform: none; }

@media (max-width: 640px) {
  .editorial { --card-width: min(74vw, 320px); }
  body.detail-open .editorial { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .editorial, .editorial .thumb:nth-child(n) .thumb-art { transition: none; }
  .editorial .thumb:nth-child(n) .thumb-art { transform: none; }
  .viewer { animation: none; }
}
