/* Reuse the video gallery controls in an uncluttered character showcase. */
.lego-feature { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 36px; align-items: center; margin-block: 28px 42px; }
.lego-stage { height: min(52dvh, 440px); min-height: 280px; display: grid; place-items: center; }
.lego-stage img { width: 100%; height: 100%; min-height: 0; display: block; object-fit: contain; filter: var(--character-grade, brightness(1.08) contrast(1.06) saturate(1.1)); }
.lego-feature-copy { border-left: 1px solid #b7925e88; padding: 12px 0 12px 26px; }
.lego-position { color: var(--brass); font-size: 12px; letter-spacing: .12em; margin: 0 0 12px; }
.lego-feature-copy h2 { font-size: clamp(28px, 4vw, 40px); font-weight: normal; line-height: 1.2; margin: 0; }
.lego-character-gallery .clip-list { grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 14px; align-items: start; }
.lego-shelf-heading { font-size: 17px; font-weight: normal; color: var(--muted); padding-bottom: 12px; border-bottom: 1px solid #b7925e44; }
.lego-choice { --character-grade: brightness(1.08) contrast(1.06) saturate(1.1); text-align: center; }
.lego-choice .clip-preview { border: 0; border-bottom: 2px solid transparent; padding-bottom: 12px; background: transparent; }
.lego-choice .clip-preview img { height: 100px; object-fit: contain; aspect-ratio: auto; filter: var(--character-grade); }
.lego-choice .clip-name { font-size: 12px; line-height: 1.35; padding-top: 10px; }
.lego-choice[aria-pressed="true"] { color: var(--text); }
.lego-choice[aria-pressed="true"] .clip-preview { border-bottom-color: var(--brass); }
.lego-choice:hover .clip-preview { border-bottom-color: #b7925e88; }
.lego-choice[data-title="Fire"] { --character-grade: brightness(1.08) contrast(1.08) saturate(1.14); }
.lego-choice[data-title="Ice"] { --character-grade: brightness(1.06) contrast(1.07) saturate(1.13); }
.lego-choice[data-title="The Mechanic"], .lego-choice[data-title="Skullivan"] { --character-grade: brightness(1.18) contrast(1.03) saturate(1.08); }
.lego-choice[data-title="The Raven King"] { --character-grade: brightness(1.13) contrast(1.05) saturate(1.12); }
@media (max-width: 600px) {
 .lego-feature { grid-template-columns: 1fr; gap: 22px; margin-bottom: 32px; }
 .lego-stage { height: 40dvh; min-height: 260px; }
 .lego-feature-copy { padding: 0; border-left: 0; text-align: center; }
 .lego-position { margin-bottom: 8px; }
 .lego-character-gallery .clip-list { display: grid; grid-auto-flow: column; grid-template-columns: none; grid-auto-columns: 92px; overflow-x: auto; padding-bottom: 14px; scroll-snap-type: x proximity; }
 .lego-choice { scroll-snap-align: start; }
}

.lego-stage { touch-action: pan-y pinch-zoom; }
.lego-stage img { user-select: none; -webkit-user-drag: none; }
.lego-stage:focus-visible { outline: 1px solid var(--brass); outline-offset: 6px; border-radius: 4px; }

.lego-controls { justify-content: flex-start; gap: 12px; margin-top: 24px; }
@media (max-width: 600px) { .lego-controls { justify-content: center; margin-top: 18px; } }

/* Use the catalogue's native scroll-snap viewer for touch and trackpads. */
.lego-stage.catalogue-slides { display: flex; touch-action: auto; border-radius: 0; }
.lego-stage.catalogue-slides .catalogue-detail-image { flex: 0 0 100%; width: 100%; min-width: 0; height: 100%; max-height: none; object-fit: contain; }

.lego-feature { position: relative; padding-inline: 48px; }
.lego-position { margin: 12px 0 0; }
.lego-controls { position: static; margin: 0; }
.lego-controls button { position: absolute; top: 50%; transform: translateY(-50%); }
#lego-previous { left: 0; }
#lego-next { right: 0; }
@media (min-width: 601px) {
 .lego-controls { display: contents; }
}
@media (max-width: 600px) {
 .lego-feature { padding-inline: 38px; }
 .lego-controls { margin: 0; }
 .lego-controls button { top: calc(max(40dvh, 260px) / 2); width: 32px; height: 32px; }
}
.lego-feature > .lego-controls { display: contents; }

.lego-feature { padding-inline: 0; }

/* Let slides travel to the paper edge rather than the content gutter. */
.lego-feature { grid-template-columns: minmax(0, 1fr); gap: 22px; }
.lego-stage.catalogue-slides {
  width: min(100vw, 920px);
  max-width: none;
  margin-inline: calc((100% - min(100vw, 920px)) / 2);
}
.lego-feature-copy { border: 0; padding: 0; text-align: center; }
.lego-controls button { top: calc(max(min(52dvh, 440px), 280px) / 2); }
@media (max-width: 600px) {
 .lego-controls button { top: calc(max(40dvh, 260px) / 2); }
}

/* Position each halo at the alpha-weighted center of its contained image. */
.lego-slide { position: relative; isolation: isolate; flex: 0 0 100%; width: 100%; min-width: 0; height: 100%; scroll-snap-align: start; scroll-snap-stop: always; }
.lego-slide::before { content: ''; position: absolute; width: min(70vw, 350px); height: min(70vw, 350px); left: var(--glow-x, 50%); top: var(--glow-y, 50%); transform: translate(-50%, -50%); background: radial-gradient(ellipse, color-mix(in srgb, var(--glow-color) 28%, transparent) 0%, color-mix(in srgb, var(--glow-color) 12%, transparent) 38%, transparent 70%); z-index: -1; pointer-events: none; }
.lego-stage.catalogue-slides .lego-slide img { width: 100%; height: 100%; display: block; object-fit: contain; }

.lego-slide::before { display: none; }
