.ronda {
  --thumb-size: clamp(48px, 8.6vw, 105px);
  margin: 16px auto 30px;
  transition: opacity .25s ease;
}

.selected-reference {
  width: min(78vw, 39vh, 470px);
  min-width: min(65vw, 235px);
  margin: 0 auto;
}

#feature { display: block; width: 100%; }
#feature-art { display: block; width: 100%; aspect-ratio: 1; }
.selected-reference figcaption {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding-block: 8px;
  border-bottom: 1px solid #dedbd6;
}
#feature-name { font-size: 14px; }
#open-reference { flex: none; font-size: 12px; text-decoration: underline; }

.ring {
  position: relative;
  width: min(94vw, 1120px);
  margin: 8px auto 0;
  touch-action: pan-y;
}

.ronda .archive {
  display: block;
  height: clamp(105px, 14vh, 155px);
  margin: 0;
  padding: 0;
  isolation: isolate;
  perspective: 800px;
  transition: none;
}

.ronda .thumb {
  position: absolute;
  top: 50%;
  left: 50%;
  width: var(--thumb-size);
  min-height: 0;
  transform: translate(-50%, -50%) translate(var(--ring-x), var(--ring-y))
    scale(var(--ring-scale)) rotateY(var(--ring-angle));
}

.ronda .thumb:nth-child(n) .thumb-art {
  width: 100%;
  max-width: none;
  aspect-ratio: 1;
  filter: none;
  transform: none;
}

.ronda .thumb[aria-current="true"] { outline: 1px solid #222; outline-offset: 4px; }
.ronda .thumb-caption { display: none; }

.ring-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}
.ring-controls button { text-align: center; min-width: 44px; min-height: 44px; font-size: 20px; }
#ring-count { min-width: 6ch; text-align: center; color: #555; font-variant-numeric: tabular-nums; }
body.detail-open .ronda { opacity: 0; pointer-events: none; }
body.detail-open .ronda .archive { transform: none; }

@media (max-width: 640px) {
  .ronda { margin-top: 24px; }
  .selected-reference { width: min(76vw, 380px); }
  body.detail-open .ronda { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .ronda { transition: none; }
  .viewer { animation: none; }
}
