.product-dialog {
  color-scheme: dark;
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100dvh;
  max-width: none;
  max-height: none;
  padding: 0;
  margin: 0;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: #fff7e8;
  font-family: var(--font-reading, -apple-system, BlinkMacSystemFont, "PingFang SC", sans-serif);
}
.product-dialog::backdrop { background: rgba(20, 15, 10, .28); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.product-dialog *, .product-dialog *::before, .product-dialog *::after { box-sizing: border-box; }
.product-dialog .product-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); clip-path: inset(50%); white-space: nowrap; border: 0; pointer-events: none; }
.product-stage { position: absolute; inset: 0; width: 100%; height: 100%; min-height: 0; background: transparent; }
.product-canvas { display: block; width: 100%; height: 100%; touch-action: none; cursor: grab; outline: none; }
.product-canvas.is-dragging { cursor: grabbing; }
.product-dialog button { display: grid; place-items: center; width: 44px; height: 44px; min-width: 44px; min-height: 44px; margin: 0; padding: 0; color: #fff7e8; border: 0; background: rgba(34, 27, 20, .18); border-radius: 50%; cursor: pointer; touch-action: manipulation; }
.product-dialog button:hover:not(:disabled) { background: rgba(34, 27, 20, .34); }
.product-dialog button:disabled { opacity: .25; cursor: default; }
.product-dialog button:focus-visible, .product-canvas:focus-visible { outline: 2px solid #fff0cf; outline-offset: -4px; }
.product-dialog svg { display: block; width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.product-close { position: absolute; z-index: 2; top: calc(24px + env(safe-area-inset-top, 0px)); right: calc(24px + env(safe-area-inset-right, 0px)); }
.product-controls { position: absolute; z-index: 2; right: calc(24px + env(safe-area-inset-right, 0px)); bottom: calc(24px + env(safe-area-inset-bottom, 0px)); display: flex; align-items: center; gap: 6px; }
.product-controls .product-reset { margin-left: 4px; }
.product-reset svg { width: 20px; height: 20px; }
.product-loading, .product-error { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 14px; padding: 30px; text-align: center; color: #fff7e8; font-size: 13px; line-height: 1.7; }
.product-loading { pointer-events: none; }
.product-spinner { width: 22px; height: 22px; border-radius: 50%; border: 1px solid rgba(255, 245, 221, .3); border-top-color: #fff4db; animation: product-load 1s linear infinite; }
@keyframes product-load { to { transform: rotate(360deg); } }
.product-error { flex-direction: column; }
.product-error p { max-width: 28em; margin: 0; text-shadow: 0 1px 3px rgba(0, 0, 0, .5); }
.product-error button { width: auto; padding: 0 22px; border-radius: 3px; background: rgba(247, 238, 219, .95); color: #4a3328; font-size: 12px; letter-spacing: .06em; }
.product-error button:hover:not(:disabled) { background: #fff7e6; }
.product-error button:focus-visible { outline-color: #973b31; }
.product-dialog [hidden] { display: none !important; }
@media (max-width: 640px), (max-height: 540px) {
  .product-close { top: calc(12px + env(safe-area-inset-top, 0px)); right: calc(12px + env(safe-area-inset-right, 0px)); }
  .product-controls { right: calc(12px + env(safe-area-inset-right, 0px)); bottom: calc(12px + env(safe-area-inset-bottom, 0px)); gap: 4px; }
}
@media (prefers-reduced-motion: reduce) { .product-spinner { animation: none; } }
