.reference-story {
  --art-height: clamp(185px,min(36vw,48svh),520px);
  border-top: 1px solid var(--line);
}
.reference-stage { background: var(--bg); }
.reference-pair {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  border-bottom: 1px solid var(--line);
}
.reference-side { min-width: 0; padding-block: clamp(14px,2.1vw,30px) 12px; }
.reference-side + .reference-side { border-left: 1px solid var(--line); }
.reference-side h3 {
  margin: 0;
  padding-inline: clamp(10px,2vw,30px);
  color: #d7d4ce;
  font: 500 12px/1.5 var(--mono);
  letter-spacing: .035em;
}
.reference-strip, .reference-result {
  height: var(--art-height);
  margin: 0;
  padding: 0;
}
.reference-strip {
  display: flex;
  list-style: none;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
}
.reference-strip li, .reference-result {
  display: grid;
  place-items: center;
  grid-template: minmax(0,1fr) / minmax(0,1fr);
  min-height: 0;
}
.reference-strip li { flex: 0 0 100%; min-width: 0; scroll-snap-align: center; }
.xbo-wrap .reference-side img { width: 90%; height: 100%; min-height: 0; object-fit: contain; }
.xbo-wrap .reference-result img { width: 84%; }
.reference-controls {
  min-height: 48px;
  display: flex;
  align-items: center;
  font: 500 11px/1.4 var(--mono);
  letter-spacing: .025em;
}
.reference-controls button {
  width: 44px;
  min-height: 44px;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: 20px/1 var(--mono);
  cursor: pointer;
}
.reference-controls button[aria-disabled="true"] { color: #77736f; cursor: default; }
.reference-count { min-width: 5ch; text-align: center; font-variant-numeric: tabular-nums; }
.reference-name { color: var(--muted); margin-left: .5em; }
.reference-skip { margin-left: auto; display: inline-flex; align-items: center; min-height: 44px; }
.reference-story[data-reference-mode="pinned"] .reference-strip { display: grid; grid-template: minmax(0,1fr) / minmax(0,1fr); overflow: clip; }
.reference-story[data-reference-mode="pinned"] .reference-strip li {
  grid-area: 1 / 1;
  opacity: 0;
  transition: opacity .23s ease;
}
.reference-story[data-reference-mode] .reference-strip li.is-current { opacity: 1; }
.reference-story[data-reference-mode="pinned"] .reference-stage { position: sticky; top: var(--ref-inset); }
.reference-story[data-reference-mode="pinned"]::after { content: ''; display: block; height: var(--ref-travel); }
@media (max-width:760px) {
  .reference-story { --art-height: clamp(124px,43vw,300px); }
  .reference-side h3 { font-size: 11px; letter-spacing: 0; }
  .xbo-wrap .reference-side img { width: 100%; }
  .reference-controls { font-size: 10px; }
  .reference-name { margin-left: 0; }
}
@media (prefers-reduced-motion:reduce) {
  .reference-story[data-reference-mode] .reference-strip li { transition: none; }
}
.social-feed-link {
  display: block;
  width: fit-content;
  margin-top: 12px;
  color: var(--ink);
  font: 500 12px/1.5 var(--mono);
}
.social-story { --art-height: clamp(270px,56svh,650px); }
.social-story .reference-pair { grid-template-columns: minmax(0,2fr) minmax(0,3fr); }
.social-story .reference-side { padding-bottom: 0; }
.social-story .reference-side h3 { margin-bottom: 12px; }
.social-posts .reference-strip { background: #080808; }
.social-posts li > a { display: grid; width: 100%; height: 100%; min-height: 0; }
.xbo-wrap .social-posts img { width: 100%; }
.social-story .reference-name { color: #cfccc7; }
@media (max-width:760px) {
  .social-story { --art-height: clamp(235px,min(112vw,54svh),500px); }
  .social-story .reference-pair { display: block; }
  .social-story .social-source {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-block: 4px;
    border-bottom: 1px solid var(--line);
  }
  .social-story .social-source h3 { margin: 0; }
  .social-source .reference-result { width: 110px; height: 74px; }
  .social-story .social-posts { border-left: 0; }
  .social-story .reference-controls { border-bottom: 1px solid var(--line); }
  .social-story .reference-name { margin-left: 8px; }
}
