.shopao-to3d-result-card { position: relative; isolation: isolate; }
.to3d-result-actions { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; opacity: 0; transition: opacity .15s; background: rgb(0 0 0 / 22%); }
.shopao-to3d-result-card:hover .to3d-result-actions, .shopao-to3d-result-card:focus-within .to3d-result-actions { opacity: 1; }
.to3d-result-actions button, .shopao-to3d-preview button { display: inline-flex; align-items: center; justify-content: center; gap: 5px; cursor: pointer; border: 0; border-radius: 4px; font: inherit; }
.to3d-result-actions button { color: white; background: rgb(0 0 0 / 60%); padding: 7px; min-height: 34px; font-size: 13px; }
.to3d-result-view { text-align: center; }
.to3d-result-view button { background: transparent; }
.to3d-result-tools { position: absolute; left: 6px; right: 6px; bottom: 8px; display: flex; justify-content: center; gap: 4px; flex-wrap: wrap; }
.shopao-to3d-preview { position: fixed; padding: 0; border: 0; border-radius: 8px; width: min(1600px, 96vw); height: min(960px, 88dvh); max-width: none; max-height: none; color: #34363b; background: white; font: 14px -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif; }
.shopao-to3d-preview[open] { display: grid; grid-template-columns: 104px minmax(0, 1fr) 210px; }
.shopao-to3d-preview::backdrop { background: rgb(0 0 0 / 65%); }
.to3d-preview-thumbs { padding: 16px 12px; overflow: auto; border-right: 1px solid #eceef1; }
.to3d-preview-thumbs button { padding: 3px; margin-bottom: 8px; width: 100%; border: 2px solid transparent; background: transparent; }
.to3d-preview-thumbs button[aria-current="true"] { border-color: #6c86c9; }
.to3d-preview-thumbs img { width: 100%; max-height: 120px; object-fit: contain; display: block; }
.to3d-preview-main { position: relative; min-width: 0; min-height: 0; display: flex; flex-direction: column; background: #f7f8fc; padding: 20px; gap: 10px; }
.to3d-preview-stage { flex: 1 1 auto; min-height: 0; display: grid; grid-template-columns: 1fr 1fr; cursor: grab; touch-action: none; }
.to3d-preview-stage:active { cursor: grabbing; }
.to3d-preview-stage figure { margin: 0; min-width: 0; min-height: 0; position: relative; overflow: hidden; border-right: 1px solid white; }
.to3d-preview-stage img { width: 100%; height: 100%; object-fit: contain; display: block; user-select: none; pointer-events: none; }
.to3d-preview-stage figcaption { position: absolute; z-index: 1; top: 10px; left: 10px; padding: 7px 12px; color: #526da7; background: #edf5ff; border-radius: 4px; }
.to3d-preview-zoom { display: flex; gap: 6px; align-items: center; justify-content: center; }
.to3d-preview-zoom button { min-width: 32px; min-height: 32px; color: white; background: #373b42; }
.to3d-preview-zoom output { display: inline-block; width: 54px; text-align: center; }
.to3d-preview-toolbar { display: flex; flex: 0 0 auto; flex-wrap: wrap; gap: 5px; justify-content: center; padding: 8px; background: white; border-radius: 6px; }
.to3d-preview-toolbar button { flex-direction: column; min-width: 56px; min-height: 48px; padding: 5px; font-size: 12px; background: white; color: #41464f; }
.to3d-preview-toolbar button:hover, .shopao-to3d-preview button:focus-visible { background: #e9eff9; outline: 2px solid #6c86c9; }
.to3d-preview-toolbar button[data-to3d-action="download"] { background: #6c86c9; color: white; padding: 5px 12px; }
.to3d-preview-info { padding: 32px 16px 16px; overflow: auto; overflow-wrap: anywhere; }
.to3d-preview-info h3 { margin: 8px 0 16px; font-size: 15px; font-weight: 600; }
.to3d-preview-info dl { display: grid; grid-template-columns: 60px 1fr; font-size: 12px; gap: 14px 8px; margin: 0 0 24px; padding-bottom: 24px; border-bottom: 1px solid #eee; }
.to3d-preview-info dt { color: #969ba3; }
.to3d-preview-info dd { margin: 0; }
.to3d-preview-prompt { white-space: pre-wrap; line-height: 1.8; font-size: 13px; }
.to3d-preview-close { position: absolute; right: 6px; top: 6px; }
.to3d-preview-close button { width: 30px; height: 30px; background: white; color: #444; }
.shopao-to3d-preview button:disabled, .to3d-result-actions button:disabled { cursor: wait; opacity: .55; }
@media (hover: none) { .to3d-result-actions { opacity: 1; background: transparent; } .to3d-result-view { align-self: center; background: rgb(0 0 0 / 45%); border-radius: 4px; } }
@media (max-width: 760px) {
  .shopao-to3d-preview { width: 100vw; height: calc(100dvh - 12px); border-radius: 4px; }
  .shopao-to3d-preview[open] { grid-template-columns: 1fr; grid-template-rows: 66px minmax(0, 1fr) 130px; }
  .to3d-preview-thumbs { display: flex; padding: 5px 42px 5px 8px; gap: 6px; border-right: 0; }
  .to3d-preview-thumbs button { width: 44px; margin: 0; flex: none; }
  .to3d-preview-thumbs img { height: 50px; }
  .to3d-preview-main { padding: 6px; gap: 6px; }
  .to3d-preview-stage figcaption { top: 4px; left: 4px; padding: 4px 7px; font-size: 12px; }
  .to3d-preview-toolbar { gap: 3px; padding: 4px; }
  .to3d-preview-toolbar button { min-width: 60px; min-height: 44px; }
  .to3d-preview-info { padding: 8px 12px; border-top: 1px solid #eee; }
  .to3d-preview-info dl { grid-template-columns: 65px 1fr; gap: 6px; padding-bottom: 8px; margin-bottom: 8px; }
}
.to3d-result-delete { position: absolute; top: 8px; right: 8px; }
.to3d-preview-reference img { display: block; width: 100%; max-height: 220px; object-fit: contain; }
.to3d-preview-reference p { margin: 0; padding: 6px; background: #f5f5f5; }
.to3d-preview-stage img[hidden], .to3d-preview-reference[hidden] { display: none; }
