.detail-photo{min-width:0}
/* Original gallery images are contained in a stable frame, never cropped. */
.detail-gallery{min-width:0;width:100%;padding-bottom:15px;background:var(--paper)}
.detail-gallery-track{display:flex;overflow-x:auto;scroll-snap-type:x mandatory;scrollbar-width:none;overscroll-behavior-x:contain;touch-action:pan-x pan-y pinch-zoom;aspect-ratio:3/2;outline-offset:-4px}
.detail-gallery-track::-webkit-scrollbar{display:none}
.detail-gallery-slide{flex:0 0 100%;min-width:0;scroll-snap-align:start;scroll-snap-stop:always;height:100%}
.detail-gallery-photo{display:block;position:relative;width:100%;height:100%;padding:0;cursor:zoom-in;background:var(--wash)}
.detail-gallery-photo img{width:100%;height:100%;max-height:none;object-fit:contain;user-select:none;-webkit-user-drag:none}
.detail-gallery-photo .photo-open{color:var(--ink)}
.detail-gallery-bar{display:flex;align-items:center;gap:15px;padding:13px 16px 10px;font-size:12px;color:var(--muted)}
.detail-gallery-bar>[data-gallery-caption]{margin-inline-end:auto;color:var(--ink)}
.detail-gallery-arrows{display:flex;gap:7px}
.detail-gallery-arrows button{display:grid;place-items:center;width:44px;height:44px;border:1px solid var(--line);color:var(--ink)}
.detail-gallery-arrows button:first-child .icon{transform:rotate(180deg)}
.detail-gallery-arrows button:disabled{opacity:.35}
.detail-gallery-choices{display:flex;gap:8px;overflow-x:auto;padding:4px 16px 8px;scrollbar-width:thin;scrollbar-color:var(--gold) transparent}
.detail-gallery-choices button{flex:0 0 58px;width:58px;height:58px;padding:3px;border:1px solid var(--line);background:var(--paper)}
.detail-gallery-choices button[aria-pressed=true]{border-color:var(--gold);box-shadow:inset 0 0 0 1px var(--gold)}
.detail-gallery-choices img{width:100%;height:100%;object-fit:contain}
.detail-gallery-hint{margin:4px 16px 0;font-size:11px;line-height:1.7;color:var(--muted)}
.dimension-note{display:block;margin-top:7px;font-size:10px;line-height:1.7;color:var(--muted)}
.photo-gallery-nav{padding-top:12px;margin-bottom:12px;border-top:1px solid #ffffff1a}
.photo-gallery-toolbar{display:flex;align-items:center;justify-content:center;gap:14px}
.photo-gallery-toolbar button{width:44px;height:44px;display:grid;place-items:center;border:1px solid #a897783d;color:#f8f5ef}
.photo-gallery-toolbar button:first-child .icon{transform:rotate(180deg)}
.photo-gallery-toolbar p{font-size:11px;color:#e8d0a6;min-width:130px;text-align:center}
.photo-gallery-thumbs{display:flex;justify-content:flex-start;gap:7px;max-width:350px;overflow-x:auto;margin:10px auto 0;padding:3px;scrollbar-width:thin}
.photo-gallery-thumbs button{flex:0 0 49px;width:49px;height:43px;padding:3px;background:#ffffff08;border:1px solid #a897783d}
.photo-gallery-thumbs button[aria-pressed=true]{border-color:#d5b578}
.photo-gallery-thumbs img{width:100%;height:100%;object-fit:contain}
@media(max-width:680px){.detail-gallery-bar{padding-inline:12px;gap:10px}.detail-gallery-choices{padding-inline:12px;gap:7px}.detail-gallery-choices button{width:52px;height:52px;flex-basis:52px}.detail-gallery-hint{margin-inline:12px}}
@media(max-height:540px){.photo-gallery-thumbs{display:none}.photo-gallery-nav{padding-top:6px;margin-bottom:6px}.photo-gallery-toolbar button{height:36px}.photo-gallery-toolbar{gap:10px}}
