.product-detail-image{padding:0;cursor:zoom-in}
.product-detail-image img{object-fit:contain;transform:none!important;cursor:zoom-in}
.product-detail-image>span{font-size:14px;line-height:1.5;background:#fffffff0;color:#62533e;bottom:16px;left:16px;right:16px;padding:8px 12px}
.photo-dialog{width:100vw;max-width:100vw;height:100dvh;max-height:100dvh;margin:0;padding:0;overflow:hidden;background:#f3f3f2;color:#302a22}
.photo-dialog[open]{display:grid;grid-template-rows:auto minmax(0,1fr) auto}
.photo-header{display:flex;justify-content:space-between;align-items:center;gap:20px;padding:14px 26px;background:#fffefc;border-bottom:1px solid #dedbd5}
.photo-model{display:flex;gap:18px;align-items:baseline;min-width:0}
.photo-model h2{font:30px/1.2 var(--serif);letter-spacing:0;white-space:nowrap}
.photo-model-number{font-size:14px;letter-spacing:1.5px;color:#8b795d}
.photo-dialog .modal-close{position:static;float:none;margin:0;right:auto;flex-shrink:0;display:flex;align-items:center;gap:12px;width:auto;height:44px;padding:0 12px;border-radius:0;border:1px solid #ddd5c9;background:transparent;font:14px var(--sans)}
.photo-dialog .modal-close span{font-size:26px;line-height:1}
.photo-stage{position:relative;min-height:0;overflow:hidden;touch-action:none;cursor:zoom-in;outline-offset:-4px;user-select:none;-webkit-user-select:none}
.photo-stage.is-zoomed{cursor:grab}
.photo-stage.is-zoomed.is-dragging{cursor:grabbing}
.photo-stage .photo-image{position:absolute;left:50%;top:50%;max-width:none;max-height:none;transform-origin:50% 50%;object-fit:contain;pointer-events:none;user-select:none;will-change:transform}
.photo-loading .photo-image,.photo-error .photo-image{visibility:hidden}
.photo-message{display:none;position:absolute;inset:40% 15% auto;text-align:center;font-size:14px;line-height:1.7}
.photo-loading .photo-loading-message,.photo-error .photo-error-message{display:block}
.photo-footer{display:flex;justify-content:space-between;align-items:center;gap:24px;padding:12px 26px max(12px,env(safe-area-inset-bottom));border-top:1px solid #dedbd5;background:#fffefc}
.photo-footer p{font-size:14px;color:#746956;line-height:1.6;max-width:590px}
.photo-footer>.photo-controls{max-width:none;flex-wrap:nowrap}
.photo-controls{display:flex;gap:8px;align-items:center;flex-shrink:0}
.photo-controls button{height:44px;min-width:44px;border:1px solid #d7ccbb;background:#fffefb;color:#463b2b;font:24px var(--sans);padding:0 10px}
.photo-controls button:disabled{opacity:.35;cursor:default}
.photo-controls [data-photo-fit]{font-size:14px;padding:0 16px;margin-left:8px}
.photo-scale{font-size:14px;min-width:50px;text-align:center;font-variant-numeric:tabular-nums}
@media(max-width:680px){
  .product-detail-image{height:auto;max-height:none;aspect-ratio:4/3}
  .product-detail-image img{height:100%;object-fit:contain}
  .photo-header{padding:10px 14px;gap:10px}
  .photo-model{display:block}.photo-model h2{font-size:25px}.photo-model-number{font-size:14px}
  .photo-dialog .modal-close{font-size:14px;gap:8px;padding:0 10px}
  .photo-footer{flex-direction:column-reverse;gap:8px;padding:10px 12px max(12px,env(safe-area-inset-bottom))}
  .photo-footer p{text-align:center;font-size:14px;margin:0;max-width:350px}
  .photo-controls{justify-content:center}.photo-controls [data-photo-fit]{margin-left:4px;padding:0 12px}
}

/* The photo and live text share one coordinate system at every viewport size. */
.engraving-photo{background:#eef0f2}
.engraving-art{position:absolute;inset:0;width:100%;height:100%;display:block}
.engraving-art image{filter:saturate(.88)}
.engraving-live-note{font-size:14px!important;color:#d7c6a7!important;line-height:1.7!important;margin:18px 0 16px!important;min-height:40px}
.engraving-input-wrap input{font-size:16px}
.engraving-demo .micro-copy{font-size:14px;max-width:370px}
@media(max-width:680px){.engraving-photo{height:auto;min-height:0;aspect-ratio:1.08}.engraving-art{height:100%}.engraving-photo>span{bottom:14px;font-size:14px;letter-spacing:1.4px;padding:7px 10px}}

.photo-footer p{font-size:14px;line-height:1.7;color:#686156}.engraving-live-note{font-size:14px!important}.engraving-demo .micro-copy{font-size:14px!important;max-width:460px}

/* A short catch-up keeps one-finger inspection gentle; pinch stays direct. */
@media(prefers-reduced-motion:no-preference){
  .photo-stage.is-touch-panning .photo-image{transition:transform 90ms ease-out}
}
