.mug-stage[hidden],.mug-stage [hidden],.mug-settings[hidden],.mug-settings [hidden]{display:none!important}
.mug-stage{position:absolute;top:0;right:0;bottom:0;left:0;inset:0;z-index:20;display:grid;grid-template-rows:minmax(0,1fr) auto;isolation:isolate;background:radial-gradient(ellipse at 50% 44%,#fffcf6 0%,#f0e8dc 74%);border-radius:22px;overflow:hidden}
.mug-stage::before{content:"";position:absolute;bottom:13%;left:26%;width:48%;height:9%;background:#493b2b28;filter:blur(18px);border-radius:50%;z-index:-1}
.mug-model-canvas{width:100%;height:100%;min-height:0;touch-action:none;cursor:grab;outline-offset:-4px}
.mug-model-canvas:active{cursor:grabbing}.mug-model-canvas:focus-visible{outline:2px solid #9b723c}
.mug-model-hint{font-size:12px;color:#725f48;text-align:center;margin:0;padding:10px 16px 14px}
.mug-settings{padding:18px;border:1px solid #decbb0;border-radius:16px;background:#fffaf1;margin:12px 0;display:grid;gap:12px;color:#473a2c}
.mug-settings h3,.mug-settings p{margin:0}.mug-settings h3{font-size:16px}.mug-settings p{font-size:13px;line-height:1.65}.mug-settings small{font-size:12px;color:#806c53;line-height:1.5}
.mug-settings button{border:1px solid #c6a574;border-radius:10px;padding:11px;background:#5d4932;color:white;font:inherit;cursor:pointer}.mug-settings button:disabled{opacity:.5;cursor:default}
.mug-stage .mug-official-image{position:absolute;top:0;right:0;bottom:0;left:0;inset:0;width:100%;height:calc(100% - 42px);object-fit:contain;background:#fffaf4;z-index:2}
.mug-view-switch{position:absolute;top:14px;right:14px;z-index:3;display:flex;gap:3px;padding:4px;border:1px solid #d7c4a7;border-radius:24px;background:#fffef9;box-shadow:0 3px 12px #493b2b12}
.mug-view-switch button{border:0;border-radius:20px;padding:8px 13px;background:transparent;color:#5d4932;cursor:pointer;font:inherit;font-size:13px;white-space:nowrap}
.mug-view-switch button[aria-pressed=true]{background:#5d4932;color:#fff}.mug-view-switch button:focus-visible{outline:2px solid #9b723c;outline-offset:2px}
.mug-unfolded{position:absolute;top:0;right:0;bottom:42px;left:0;inset:0 0 42px;z-index:2;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:16px;padding:65px 24px 22px;background:#fffaf4}
.mug-unfolded canvas{display:block;width:100%;max-width:100%;max-height:calc(100% - 42px);object-fit:contain;aspect-ratio:2000/941;border:1px solid #d7c4a7;background:#fff;box-shadow:0 10px 30px #493b2b12}
.mug-unfolded p{margin:0;text-align:center;font-size:12px;line-height:1.5;color:#725f48}
@media(max-width:600px){.mug-view-switch{top:10px;right:10px}.mug-view-switch button{font-size:12px;padding:7px 10px}.mug-unfolded{padding:60px 14px 18px}}
.mug-layout-controls{display:grid;gap:14px;padding:14px 0;border-bottom:1px solid #e6daca}
.mug-color-choice{display:grid;gap:8px;font-size:13px;font-weight:600}.mug-color-choice select{width:100%;min-height:42px;padding:9px 12px;border:1px solid #cbb38e;border-radius:10px;background:white;color:#473a2c;font:inherit}.mug-color-choice select:focus-visible{outline:2px solid #947245;outline-offset:2px}
.mug-layout-controls>label{display:grid;grid-template-columns:1fr auto;gap:7px;font-size:13px}
.mug-layout-controls input[type=range]{grid-column:1/-1;width:100%;accent-color:#947245}
.mug-layout-controls output{font-variant-numeric:tabular-nums;color:#806c53}
.mug-layout-controls .mug-lock{display:flex;gap:8px;align-items:center}
.mug-layout-controls .mug-lock input,.mug-confirm input{width:auto;accent-color:#947245}
.mug-settings .mug-secondary{background:white;color:#5d4932;padding:8px}
.mug-cost{display:flex;justify-content:space-between;gap:8px;font-size:13px;border-top:1px solid #e6daca;padding-top:14px}
.mug-settings .mug-address-slot #orderPanel{display:grid!important;gap:12px;margin:0;padding:0;border:0;box-shadow:none;background:transparent}
.mug-settings #orderPanel>h2,.mug-settings #orderPanel>label:has(>#quantityInput),.mug-settings #orderPanel>.order-secondary-actions,.mug-settings #submitOrder,.mug-settings #orderResult{display:none!important}
.mug-product-active .editor>.creator-intro,.mug-product-active #photoPanel{display:none!important}
.mug-product-active .editor>section:not(.mug-settings){display:none!important}
.mug-settings .mug-confirm{display:flex;align-items:flex-start;gap:8px;font-size:13px;line-height:1.6}.mug-confirm input{margin-top:4px}
.mug-product-active #frameStage{position:relative;min-height:300px}
.mug-product-active #frameModel,.mug-product-active #legacyFramePreview,.mug-product-active #productRenderCanvas,.mug-product-active .puzzle-stage,.mug-product-active .puzzle-making-settings{display:none!important}
.mug-product-active #lightToggle,.mug-product-active #homeSceneButton,.mug-product-active #toolCompare,.mug-product-active #aiWorkGift,.mug-product-active #orderPanel,.mug-product-active #templatePanel,.mug-product-active #textEditorAccordion,.mug-product-active .puzzle-product-arrow{display:none!important}
.mug-product-active .scene-preview-card{display:none!important}
.mug-product-active #photoPanel .control-grid,.mug-product-active #photoPanel .toggle-row,.mug-product-active #aiDesignPanel{display:none!important}
.mug-product-active #fitImageButton{display:none!important}
.mug-product-active #toolText,.mug-product-active #toolScene,.mug-product-active .ai-work-edit-capabilities,.mug-product-active .ai-work-edit-heading p{display:none!important}
.mug-product-active .ai-work-edit-heading::after{content:"当前作品已用于杯子预览。检查画面和留白，再确认制作效果图。";font-size:12px;line-height:1.6;color:#725f48}
.mug-product-active .editor section:has(>[data-orientation]),.mug-product-active .editor section:has(>.segmented>[data-orientation]),.mug-product-active .editor section:has(>.segmented>[data-mode]){display:none!important}
.mug-product-active .mug-settings{scroll-margin-top:100px}
@media(max-width:850px){.mug-settings{margin:12px 16px}.mug-product-active #frameStage{min-height:370px}}

/* PC cup preview keeps its view switch inside the scene, without a duplicate toolbar row. */
@media(min-width:851px){
  body.h5-workspace.mug-product-active .product-preview>.preview-controls{display:none!important}
  body.h5-workspace.mug-product-active .product-preview{grid-template-rows:minmax(0,1fr) auto}
  body.h5-workspace.mug-product-active .product-preview>#frameStage{grid-row:1}
  body.h5-workspace.mug-product-active .product-preview>.workbench-preview-bottom{grid-row:2}
  body.h5-workspace.mug-product-active .product-preview.pc-product-layout{grid-template-rows:auto minmax(0,1fr) auto}
  body.h5-workspace.mug-product-active .product-preview.pc-product-layout>#frameStage{grid-row:2}
  body.h5-workspace.mug-product-active .product-preview.pc-product-layout>.workbench-preview-bottom{grid-row:3}
}
