.gallery-recommendations {
  min-width: 0;
  margin: -2px 0 30px;
}
.recommendation-heading,
.recommendation-heading-copy {
  display: flex;
  align-items: center;
}
.recommendation-heading { margin-bottom: 14px; }
.recommendation-heading-copy { min-width: 0; gap: 10px; }
.recommendation-heading h2 {
  margin: 0;
  font-family: var(--ui-font-heading);
  font-size: 21px;
  line-height: 1.3;
  letter-spacing: -.04em;
  white-space: nowrap;
}
.recommendation-star { font-size: 30px; line-height: 1; }
.recommendation-open:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.recommendation-stage {
  --recommendation-visible: 3;
  --recommendation-gap: 18px;
  position: relative;
  padding-inline: 60px;
}
.recommendation-stage:has(.recommendation-edge[hidden]) { padding-inline: 0; }
.recommendation-edge {
  position: absolute;
  top: calc(50% - 24px);
  z-index: 2;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: var(--ui-control-border, 2px) solid var(--ink);
  border-radius: 0;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 4px 4px 0 var(--ink);
  cursor: pointer;
  transition: transform 150ms ease-out, box-shadow 150ms ease-out;
}
.recommendation-edge-prev { left: 0; }
.recommendation-edge-next { right: 4px; }
.recommendation-edge svg {
  position: relative;
  width: 25px;
  height: 25px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5;
  stroke-linecap: square;
}
.recommendation-edge:focus-visible { outline: 2px solid var(--ink); outline-offset: 5px; }
.recommendation-edge:active { transform: translate(4px, 4px); box-shadow: none; transition: none; }
@media (hover: hover) and (pointer: fine) {
  .recommendation-edge:hover:not(:active) {
    background: var(--accent);
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0 var(--ink);
  }
}
.recommendation-viewport {
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  scroll-behavior: auto;
  touch-action: pan-x pan-y;
  user-select: none;
  -webkit-user-select: none;
  cursor: grab;
}
.recommendation-viewport.is-dragging,
.recommendation-viewport.is-dragging * { cursor: grabbing !important; }
.recommendation-viewport::-webkit-scrollbar { display: none; }
.recommendation-track {
  position: relative;
  display: flex;
  gap: var(--recommendation-gap);
  padding: 3px 6px 9px 3px;
  min-width: 0;
}
.recommendation-card {
  position: relative;
  flex: 0 0 calc((100% - (var(--recommendation-visible) - 1) * var(--recommendation-gap)) / var(--recommendation-visible));
  display: grid;
  grid-template-columns: 34% minmax(0, 1fr);
  height: 194px;
  min-width: 0;
  border: var(--ui-divider) solid var(--ink);
  background: var(--paper);
  box-shadow: 5px 5px 0 var(--ink);
}
.recommendation-art {
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: #f1f1ed;
}
.recommendation-art img { display: block; width: 100%; height: 100%; min-height: 0; }
.recommendation-poster-backdrop {
  position: absolute;
  inset: 0;
  z-index: -1;
  object-fit: cover;
  filter: blur(12px) brightness(.82) saturate(.9);
  transform: scale(1.18);
  pointer-events: none;
}
.recommendation-poster { position: relative; object-fit: contain; }
.recommendation-copy {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  padding: 14px 14px 12px;
}
.recommendation-copy .card-feedback-heading { padding-right: 0; }
.recommendation-topline { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.recommendation-status { font-size: 10px; font-weight: 800; line-height: 1.5; }
.recommendation-status::before { content: ''; display: inline-block; width: 6px; height: 6px; margin-right: 5px; background: var(--ink); }
.recommendation-status[data-status="open"]::before { background: #507000; }
.recommendation-number { font-size: 10px; color: #666; }
.recommendation-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0;
  font-family: var(--ui-font-heading);
  font-size: 17px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.recommendation-reason {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0;
  color: var(--ui-muted);
  font-size: 11px;
  line-height: 1.6;
}
.recommendation-meta {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
  font-size: 10px;
  line-height: 1.5;
}
.recommendation-meta-copy { display: grid; gap: 3px; min-width: 0; }
.recommendation-meta-copy span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.recommendation-arrow { position: relative; top: auto; right: auto; width: auto; font-size: 24px; line-height: 1; }
.recommendation-open {
  position: absolute;
  inset: 0;
  width: 100%;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: grab;
}
.recommendation-open:disabled { cursor: progress; }
.recommendation-feedback { margin: 12px 0 0; font-size: 12px; line-height: 1.7; }
@media (min-width: 768px) and (hover: hover) and (pointer: fine) {
  /* Let pointer tilt and its shadow extend beyond the scroll row without
     changing card dimensions or exposing a neighboring carousel card. */
  .recommendation-viewport { margin: -16px -8px; padding: 16px 8px; }
}
@media (max-width: 1200px) {
  .recommendation-stage { --recommendation-visible: 2; }
}
@media (max-width: 680px) {
  .gallery-recommendations { margin-bottom: 24px; }
  .recommendation-heading { margin-bottom: 10px; }
  .recommendation-heading h2 { font-size: 18px; }
  .recommendation-star { font-size: 24px; }
  /* Reserve space for the retained 44px arrow controls without covering cards. */
  .recommendation-stage { --recommendation-visible: 1; --recommendation-gap: 14px; padding: 0 0 60px; }
  .recommendation-stage:has(.recommendation-edge[hidden]) { padding-bottom: 0; }
  .recommendation-edge { top: auto; bottom: 4px; }
  .recommendation-edge-prev { left: calc(50% - 54px); }
  .recommendation-edge-next { right: calc(50% - 50px); }
  .recommendation-edge svg { width: 22px; height: 22px; }
  .recommendation-card { height: 194px; grid-template-columns: 33% minmax(0, 1fr); }
  .recommendation-copy { padding: 12px 10px; gap: 7px; }
  .recommendation-title { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .recommendation-edge { transition: none; }
}
