.dp-gallery-open { display:block; width:100%; padding:0; background:none; border:0; cursor:zoom-in; }
.dp-gallery-strip { display:flex; gap:8px; overflow-x:auto; margin-block-start:8px; padding:2px; }
.dp-gallery-thumb { flex:0 0 56px; width:56px; height:56px; padding:2px; background:#fff; border:1px solid #aab8c9; border-radius:8px; cursor:pointer; }
.dp-gallery-thumb[aria-pressed="true"] { border:2px solid #1766b1; }
.dp-gallery-thumb img { display:block; width:100%; height:100%; object-fit:contain; }
.dp-gallery-count { margin-block:6px 0; text-align:center; font-variant-numeric:tabular-nums; }
.dp-gallery-dialog { width:100%; height:100%; max-width:none; max-height:none; margin:0; padding:12px; box-sizing:border-box; border:0; background:#111827; color:#fff; }
.dp-gallery-dialog::backdrop { background:#111827; }
.dp-gallery-dialog[open] { display:grid; grid-template-rows:auto minmax(0,1fr); gap:10px; }
.dp-gallery-toolbar { display:flex; flex-wrap:wrap; justify-content:center; align-items:center; gap:8px; }
.dp-gallery-toolbar button { min-height:40px; padding:4px 10px; border:1px solid #94a3b8; border-radius:8px; background:#fff; color:#111827; cursor:pointer; }
.dp-gallery-full { display:grid; place-items:center; min-width:0; min-height:0; overflow:hidden; touch-action:none; }
.dp-gallery-full img { width:100%; height:100%; min-height:0; object-fit:contain; touch-action:none; user-select:none; -webkit-user-drag:none; }
.dp-page .dp-gallery-open { height:100%; min-height:0; }
.dp-page .dp-gallery-open img { width:100%; height:100%; min-height:0; max-height:none; object-fit:contain; }

/* Keep detail track sizing independent of the thumbnail strip. */
.dp-page .dp-hero > *,
.dp-page .dp-media-frame,
.dp-gallery-thumbnails,
.dp-gallery-strip {
  min-inline-size: 0;
  max-inline-size: 100%;
}
.dp-page .dp-media-frame {
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
}
.dp-page .dp-gallery-open { min-inline-size: 0; }
.dp-page .dp-info-card :is(h2,.dp-lead) { max-inline-size: 100%; overflow-wrap: anywhere; }
.dp-page .dp-actions > * { min-inline-size: 0; max-inline-size: 100%; }
.dp-page .dp-actions .dp-button-primary { white-space: normal; overflow-wrap: anywhere; }
.dp-gallery-thumbnails { position: relative; }
.dp-gallery-strip {
  box-sizing: border-box;
  overscroll-behavior-x: contain;
  touch-action: pan-x pan-y pinch-zoom;
  scrollbar-width: thin;
}
.dp-gallery-arrow {
  position: absolute;
  inset-block-start: 50%;
  z-index: 1;
  display: none;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  transform: translateY(-50%);
  padding: 0;
  border: 1px solid #aab8c9;
  border-radius: 50%;
  background: #fff;
  color: #17365c;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .16);
  cursor: pointer;
}
.dp-gallery-arrow-right { right: 3px; }
.dp-gallery-arrow-left { left: 3px; }
@media (hover: hover) and (pointer: fine) {
  .dp-gallery-arrow:not([hidden]) { display: inline-flex; }
}
@media (max-width: 820px) {
  .dp-page .dp-hero { grid-template-columns: minmax(0, 1fr); }
}
.dp-page .dp-gallery-thumb {
  box-sizing: border-box;
  transition: none;
}
.dp-page .dp-gallery-thumb[aria-pressed="true"] {
  border: 2px solid #1766b1;
}
