/* 20260917_immersive_workspace_v1 — workspace only; scene/grid and site header untouched.
   Solid-first declarations intentionally support Edge 100. */
#ai3dPageRoot {
    --ai3d-theme-bg: #10100f;
    --ai3d-theme-panel: #1d1d19;
    --ai3d-theme-popup: #26251f;
    --ai3d-theme-fg: #dfdccf;
    --ai3d-theme-muted: #99968a;
    --ai3d-theme-accent: #cbb787;
    --ai3d-theme-accent-2: #bca16d;
    --ai3d-theme-border: #494536;
    --ai3d-theme-on-accent: #171611;
    --ai3d-workspace-height: calc(100vh - var(--home-header-height, 72px));
    --ai3d-sidebar-width: 288px;
    padding: 0 !important;
    margin: 0 !important;
    color: #dfdccf;
    background: #10100f;
    min-height: 0 !important;
    font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
}
#ai3dPageRoot .ai3d-shell {
    position: relative; display: block !important; gap: 0 !important;
    width: 100%; height: var(--ai3d-workspace-height); min-height: 520px;
    padding: 0 !important; margin: 0 !important;
}
#ai3dPageRoot .ai3d-left {
    position: absolute; left: 32px; top: 64px; z-index: 40;
    width: 288px !important; min-width: 0 !important; max-width: 288px !important;
    height: auto !important; min-height: 0 !important;
    max-height: calc(100% - 150px) !important;
    padding: 18px !important; overflow: auto;
    border: 1px solid #67604a !important; border-radius: 12px !important;
    background: rgba(29,29,25,.96) !important;
    box-shadow: 0 14px 32px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.035) !important;
    scrollbar-width: thin; scrollbar-color: #605a49 #1d1d19;
}
#ai3dPageRoot .ai3d-left-panel {
    padding: 0 !important; margin: 0 0 16px !important;
    border: 0 !important; border-radius: 0 !important;
    background: transparent !important; box-shadow: none !important;
}
#ai3dPageRoot .ai3d-subtoggle {
    gap: 0 !important; padding: 0 !important; border: 0 !important;
    border-bottom: 1px solid #3b392f !important; border-radius: 0 !important;
    background: transparent !important; box-shadow: none !important;
}
#ai3dPageRoot .ai3d-subtoggle a {
    padding: 10px 4px !important; color: #a7a397 !important;
    background: transparent !important; border: 0 !important;
    border-bottom: 2px solid transparent !important; border-radius: 0 !important;
    font-size: 14px !important; font-weight: 400 !important; box-shadow: none !important;
}
#ai3dPageRoot .ai3d-subtoggle a.active { color: #d5c393 !important; border-bottom-color: #cbb787 !important; }
#ai3dPageRoot .ai3d-provider-toggle { margin-top: 10px; }
#ai3dPageRoot .ai3d-upload {
    min-height: 92px !important; padding: 0 !important; border: 1px dashed #484437 !important;
    border-radius: 8px !important; background: transparent !important; box-shadow: none !important;
}
#ai3dPageRoot .ai3d-upload-panel { padding: 0 !important; min-height: 90px !important; background: transparent !important; }
#ai3dPageRoot .ai3d-upload-empty {
    min-height: 90px !important; padding: 18px 10px !important;
    flex-direction: row !important; gap: 8px !important;
}
#ai3dPageRoot .ai3d-upload-empty .btn {
    width: 24px !important; height: 24px !important; margin: 0 !important;
    border: 0 !important; background: transparent !important; box-shadow: none !important;
}
#ai3dPageRoot .ai3d-upload-icon { width: 21px !important; height: 21px !important; color: #dfdccf !important; }
#ai3dPageRoot #ai3dUploadTitle { margin: 0 !important; color: #dfdccf !important; font-size: 14px !important; font-weight: 400 !important; }
#ai3dPageRoot .ai3d-upload-single-media { min-height: 100px; max-height: 220px; }
#ai3dPageRoot .ai3d-upload-preview { max-height: 220px; object-fit: contain; }
#ai3dPageRoot .sec { margin: 0 0 14px !important; }
#ai3dPageRoot .lab { font-size: 14px !important; font-weight: 400 !important; color: #d5d2c6 !important; }
#ai3dPageRoot .ai3d-input, #ai3dPageRoot .ai3d-select, #ai3dPageRoot .ai3d-seg a {
    color: #d5d2c6 !important; background: #272720 !important;
    border: 1px solid #494637 !important; border-radius: 7px !important; box-shadow: none !important;
}
#ai3dPageRoot .ai3d-seg a.active { color: #e1d1a5 !important; border-color: #b7a16f !important; background: #343023 !important; }
#ai3dPageRoot .ai3d-help { color: #969286 !important; font-size: 12px !important; line-height: 1.6 !important; }
#ai3dPageRoot #ai3dTextureSection > .lab { display: none; }
#ai3dPageRoot .ai3d-check { position: relative; display: flex; justify-content: space-between; flex-direction: row-reverse; width: 100%; padding: 0 !important; border: 0 !important; background: transparent !important; }
#ai3dPageRoot .ai3d-check span { color: #d5d2c6 !important; font-size: 14px !important; }
#ai3dPageRoot #ai3dTextureEnabledCheckbox {
    appearance: none; -webkit-appearance: none; flex: 0 0 36px;
    width: 36px; height: 20px; margin: 0; border: 1px solid #645d4b;
    border-radius: 20px; background: #49483f; position: relative; cursor: pointer;
}
#ai3dPageRoot #ai3dTextureEnabledCheckbox:checked { background: #bca16d; }
#ai3dPageRoot #ai3dTextureEnabledCheckbox::after {
    content: ''; display: block; width: 14px; height: 14px; border-radius: 50%;
    position: absolute; left: 2px; top: 2px; background: #f4efe0; transition: transform .15s;
}
#ai3dPageRoot #ai3dTextureEnabledCheckbox:checked::after { transform: translateX(16px); }
#ai3dPageRoot .ai3d-left-submit {
    display: flex !important; flex-direction: row-reverse; align-items: stretch; gap: 10px;
    position: static !important; margin: 0 !important; padding: 0 !important;
    border: 0 !important; background: transparent !important;
}
#ai3dPageRoot .ai3d-generate-wrap { flex: 1; min-width: 0; }
#ai3dPageRoot .ai3d-generate {
    width: 100%; min-height: 42px !important; margin: 0 !important;
    border-radius: 7px !important; background: #cbb787 !important;
    color: #171611 !important; font-size: 14px !important; font-weight: 500 !important; box-shadow: none !important;
}
#ai3dPageRoot .ai3d-generate:disabled { color: #a4a095 !important; background: #44443d !important; border-color: #4d4c42 !important; opacity: .65; cursor: not-allowed; }
#ai3dPageRoot .ai3d-generate-vip-badge { display: none !important; }
#ai3dPageRoot .ai3d-generate-price {
    display: flex; align-items: center; justify-content: center; gap: 4px;
    padding: 0 10px !important; margin: 0 !important; min-width: 94px;
    border: 1px solid #474335 !important; border-radius: 7px; color: #cbb787 !important;
    background: transparent !important; font-size: 12px !important;
}
#ai3dPageRoot .ai3d-generate-price strong { font-size: 14px !important; font-weight: 400 !important; color: #cbb787 !important; }
#ai3dPageRoot .ai3d-right {
    display: block !important; width: 100%; height: 100% !important;
    min-height: 0 !important; max-height: none !important; padding: 0 0 52px !important;
    gap: 0 !important; border: 0 !important; background: transparent !important; overflow: hidden;
}
#ai3dPageRoot .ai3d-preview-wrap, #ai3dPageRoot .ai3d-preview-stage, #ai3dPageRoot .ai3d-preview-stage-body {
    width: 100% !important; height: 100% !important; min-height: 0 !important;
    margin: 0 !important; padding: 0 !important; border: 0 !important;
    border-radius: 0 !important; box-shadow: none !important;
}
#ai3dPageRoot .ai3d-preview-stage-viewport--single {
    width: 100% !important; height: 100% !important; min-height: 0 !important;
    margin: 0 !important; border: 0 !important; border-radius: 0 !important;
}
/* Deliberately no canvas, grid-fallback, ground material or scene color overrides. */
#ai3dPageRoot .ai3d-right-toolbar {
    position: absolute !important;
    top: 28px !important; right: 28px !important; width: auto !important;
    max-width: calc(100% - 380px) !important; padding: 7px !important;
    display: flex !important; flex-direction: row !important; align-items: center !important;
    gap: 0 !important; border: 1px solid #464336 !important; border-radius: 11px !important;
    background: rgba(30,30,25,.97) !important; box-shadow: 0 8px 24px rgba(0,0,0,.28) !important;
    z-index: 35; overflow: visible;
}
#ai3dPageRoot .ai3d-workbench-view-actions { display: flex !important; flex-direction: row !important; gap: 0 !important; width: auto !important; padding: 0 !important; border: 0 !important; background: transparent !important; }
#ai3dPageRoot .ai3d-right-toolbar > .ai3d-debug-stl-btn,
#ai3dPageRoot .ai3d-workbench-view-btn,
#ai3dPageRoot .ai3d-render-mode-control,
#ai3dPageRoot .ai3d-advanced-tools { flex: 0 0 60px; width: 60px !important; min-width: 0 !important; margin: 0 !important; }
#ai3dPageRoot .ai3d-right-toolbar > .ai3d-debug-stl-btn,
#ai3dPageRoot .ai3d-workbench-view-btn,
#ai3dPageRoot .ai3d-render-mode-select,
#ai3dPageRoot .ai3d-advanced-tools > summary {
    height: 52px !important; min-height: 52px !important; padding: 5px 2px !important;
    display: flex !important; flex-direction: column !important; align-items: center; justify-content: center; gap: 4px !important;
    color: #bcb7a8 !important; background: transparent !important;
    border: 0 !important; border-radius: 6px !important; box-shadow: none !important;
    font-size: 11px !important; font-weight: 400 !important; white-space: nowrap; cursor: pointer;
}
#ai3dPageRoot .ai3d-right-toolbar button:disabled { opacity: .48 !important; cursor: not-allowed; }
#ai3dPageRoot .ai3d-right-toolbar button:not(:disabled):hover,
#ai3dPageRoot .ai3d-advanced-tools > summary:hover { background: #353126 !important; color: #e1d1a5 !important; }
#ai3dPageRoot #ai3dGroundGridToggle[aria-checked="true"],
#ai3dPageRoot .ai3d-workbench-view-btn.is-active { color: #d5bb83 !important; }
#ai3dPageRoot #ai3dGroundGridToggle [data-grid-track] { display: none !important; }
#ai3dPageRoot .ai3d-tool-icon { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; }
#ai3dPageRoot .ai3d-render-mode-control { position: relative; height: 52px; }
#ai3dPageRoot .ai3d-render-mode-control > .ai3d-tool-icon { position: absolute; top: 4px; left: 20px; pointer-events: none; color: #bcb7a8; z-index: 2; }
#ai3dPageRoot .ai3d-render-mode-select { width: 100% !important; padding-top: 29px !important; text-align: center; text-align-last: center; appearance: none; -webkit-appearance: none; }
#ai3dPageRoot .ai3d-render-mode-select option { color: #dfdccf; background: #26251f; }
#ai3dPageRoot .ai3d-advanced-tools > summary { list-style: none; }
#ai3dPageRoot .ai3d-advanced-tools > summary::-webkit-details-marker { display: none; }
#ai3dPageRoot .ai3d-advanced-menu { position: absolute; right: 0; top: calc(100% + 8px); width: 150px; padding: 8px; background: #26251f; border: 1px solid #62583f; border-radius: 8px; }
#ai3dPageRoot .ai3d-advanced-menu button { color: #dfdccf !important; background: #343126 !important; border-color: #62583f !important; }
#ai3dPageRoot .ai3d-turntable-duration-popover { top: calc(100% + 10px) !important; right: 0 !important; left: auto !important; width: 260px; color: #dfdccf !important; background: #26251f !important; border-color: #62583f !important; }
#ai3dPageRoot .ai3d-right-dock { position: absolute !important; right: 28px !important; bottom: 28px !important; width: 94px !important; max-width: 94px !important; padding: 0 !important; z-index: 34; }
#ai3dPageRoot .ai3d-right-card { padding: 0 !important; border: 0 !important; background: transparent !important; box-shadow: none !important; }
#ai3dPageRoot .ai3d-format-trigger { height: 42px !important; min-height: 42px !important; padding: 0 15px !important; color: #ded7c3 !important; background: #33332c !important; border: 1px solid #514d3c !important; border-radius: 7px !important; box-shadow: none !important; font-size: 14px !important; }
#ai3dPageRoot .ai3d-format-menu { top: auto !important; bottom: calc(100% + 8px) !important; color: #dfdccf !important; background: #26251f !important; border-color: #62583f !important; }
#ai3dPageRoot .ai3d-material-dock {
    width: auto !important; min-width: 0 !important; max-width: calc(100% - 280px);
    bottom: 46px !important; padding: 7px 9px !important; gap: 4px !important;
    border: 1px solid #39372b !important; border-radius: 10px !important;
    background: rgba(30,30,25,.94) !important; box-shadow: 0 8px 25px rgba(0,0,0,.18) !important;
}
#ai3dPageRoot .ai3d-material-dock-title { position: absolute; top: calc(100% + 8px); left: 0; width: 100%; text-align: center; color: #b6a782 !important; font-size: 12px !important; font-weight: 400 !important; text-shadow: none !important; }
#ai3dPageRoot .ai3d-material-dock-title span { display: none; }
#ai3dPageRoot .ai3d-material-spheres { display: flex !important; flex: none !important; gap: 12px !important; padding: 3px !important; background: transparent !important; border: 0 !important; box-shadow: none !important; }
#ai3dPageRoot .ai3d-material-sphere { width: 36px !important; height: 36px !important; flex: 0 0 36px; border-color: #888273 !important; }
#ai3dPageRoot .ai3d-material-sphere.is-active { border-color: #e2d4af !important; outline: 1px solid #cbb787; outline-offset: 3px; box-shadow: none !important; }
#ai3dPageRoot .ai3d-material-dock-arrow { width: 18px !important; height: 28px !important; border: 0 !important; background: transparent !important; color: #a49a7e !important; }
#ai3dPageRoot .ai3d-history-sidebar {
    position: absolute; z-index: 45; left: 0; right: 0; bottom: 0;
    width: 100% !important; height: auto !important; max-height: 48% !important;
    padding: 0 !important; border: 0 !important; border-top: 1px solid #403c2f !important;
    border-radius: 0 !important; background: #1d1d19 !important; box-shadow: none !important;
    display: flex !important; flex-direction: column; overflow: hidden;
}
#ai3dPageRoot .ai3d-history-sidebar-header { min-height: 52px; height: 52px; flex: 0 0 52px; padding: 0 28px !important; gap: 18px; border: 0 !important; background: transparent !important; }
#ai3dPageRoot .ai3d-history-drawer-toggle { display: flex; align-items: center; gap: 14px; padding: 0; color: #ded8c8; background: transparent; border: 0; font-size: 15px; cursor: pointer; white-space: nowrap; }
#ai3dPageRoot .ai3d-history-drawer-toggle::after { content: ''; width: 7px; height: 7px; border-right: 1px solid #cbb787; border-bottom: 1px solid #cbb787; transform: rotate(45deg); }
#ai3dPageRoot .is-history-open .ai3d-history-drawer-toggle::after { transform: rotate(225deg); }
#ai3dPageRoot .ai3d-history-summary { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; border-left: 1px solid #494536; padding-left: 18px; color: #979184; font-size: 12px; }
#ai3dPageRoot .ai3d-history-sidebar-actions { margin-left: auto; gap: 14px; }
#ai3dPageRoot #ai3dHistoryCount { color: #b3a17b !important; background: transparent !important; border: 0 !important; }
#ai3dPageRoot .ai3d-history-refresh-btn { width: 30px; height: 30px; color: #cbb787 !important; background: transparent !important; border: 0 !important; font-size: 25px; }
#ai3dPageRoot .ai3d-history-sidebar:not(.is-history-open) .ai3d-task-history-panel { display: none !important; }
#ai3dPageRoot .is-history-open .ai3d-task-history-panel { display: block !important; overflow-y: auto; min-height: 0; padding: 0 28px 18px !important; border: 0 !important; background: transparent !important; }
#ai3dPageRoot .ai3d-task-history-list { display: grid !important; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px !important; }
#ai3dPageRoot button:focus-visible, #ai3dPageRoot a:focus-visible, #ai3dPageRoot input:focus-visible, #ai3dPageRoot select:focus-visible, #ai3dPageRoot summary:focus-visible { outline: 2px solid #dcc58f !important; outline-offset: 3px; }
#ai3dPageRoot [hidden] { display: none !important; }
/* Reset legacy content-box and oversized control defaults within the workspace only. */
#ai3dPageRoot *, #ai3dPageRoot *::before, #ai3dPageRoot *::after { box-sizing: border-box; }
#ai3dPageRoot .ai3d-left { scrollbar-gutter: auto; }
#ai3dPageRoot .ai3d-subtoggle a { display: flex; align-items: center; justify-content: center; height: 40px !important; min-height: 40px !important; line-height: 1.2 !important; text-shadow: none !important; }
#ai3dPageRoot .ai3d-provider-toggle a { height: 34px !important; min-height: 34px !important; font-size: 12px !important; }
#ai3dPageRoot .ai3d-left-config-grid { gap: 0 !important; }
#ai3dPageRoot .ai3d-left .lab { margin-bottom: 8px !important; letter-spacing: 0; }
#ai3dPageRoot .ai3d-left .ai3d-input, #ai3dPageRoot .ai3d-left .ai3d-select { height: 34px !important; min-height: 34px !important; padding: 5px 9px !important; font-size: 13px !important; }
#ai3dPageRoot .ai3d-seg { gap: 6px !important; min-height: 0 !important; }
#ai3dPageRoot .ai3d-seg a { display: flex; align-items: center; justify-content: center; padding: 5px 6px !important; min-height: 32px !important; height: 32px !important; white-space: nowrap; font-size: 12px !important; line-height: 1.2 !important; text-shadow: none !important; }
#ai3dPageRoot #ai3dFaceCountSection { display: grid; grid-template-columns: minmax(0,1fr) 92px; align-items: center; gap: 8px; }
#ai3dPageRoot #ai3dFaceCountSection > .lab { margin: 0 !important; }
#ai3dPageRoot .ai3d-face-count-row { margin: 0 !important; }
#ai3dPageRoot #ai3dFaceCount { grid-column: 1 / -1; margin: 0 !important; }
#ai3dPageRoot .ai3d-render-mode-control { border: 0 !important; background: transparent !important; border-radius: 0 !important; box-shadow: none !important; }
#ai3dPageRoot .ai3d-render-mode-control::after { display: none !important; }
#ai3dPageRoot .ai3d-workbench-view-actions .ai3d-workbench-view-btn { flex-shrink: 0; }
/* Runtime replaces the rotation button label; a CSS icon survives those state updates. */
#ai3dPageRoot [data-workbench-action="turntable"] > .ai3d-tool-icon { display: none; }
#ai3dPageRoot [data-workbench-action="turntable"]::before { content: ''; display: block; flex: 0 0 21px; width: 21px; height: 21px; background: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%23bcb7a8%22%20stroke-width%3D%221.3%22%3E%3Cpath%20d%3D%22M5%208a8%208%200%201%201-1%208M5%203v5h5%22/%3E%3Cpath%20d%3D%22M10%2011h4v5h-4z%22/%3E%3C/svg%3E") center / 21px 21px no-repeat; }
@media (max-width: 1100px) and (min-width: 761px) {
    #ai3dPageRoot .ai3d-left { left: 18px; width: 254px !important; max-width: 254px !important; padding: 14px !important; }
    #ai3dPageRoot .ai3d-right-toolbar { right: 18px !important; max-width: calc(100% - 302px) !important; }
    #ai3dPageRoot .ai3d-right-toolbar > .ai3d-debug-stl-btn, #ai3dPageRoot .ai3d-workbench-view-btn, #ai3dPageRoot .ai3d-render-mode-control, #ai3dPageRoot .ai3d-advanced-tools { flex-basis: 54px; width: 54px !important; }
    #ai3dPageRoot .ai3d-render-mode-control > .ai3d-tool-icon { left: 17px; }
    #ai3dPageRoot .ai3d-material-dock { left: 62% !important; }
}
@media (max-width: 760px) {
    #ai3dPageRoot .ai3d-shell { height: auto; min-height: 0; padding: 12px !important; }
    #ai3dPageRoot .ai3d-left { position: relative; top: auto; left: auto; width: 100% !important; max-width: none !important; max-height: none !important; padding: 16px !important; margin-bottom: 12px; overflow: visible; }
    #ai3dPageRoot .ai3d-right { height: 620px !important; min-height: 0 !important; border: 1px solid #403c2f !important; border-radius: 10px; }
    #ai3dPageRoot .ai3d-right-toolbar { top: 10px !important; right: 10px !important; left: 10px; width: auto !important; max-width: none !important; padding: 5px !important; justify-content: space-between; }
    #ai3dPageRoot .ai3d-right-toolbar > .ai3d-debug-stl-btn, #ai3dPageRoot .ai3d-workbench-view-btn, #ai3dPageRoot .ai3d-render-mode-control, #ai3dPageRoot .ai3d-advanced-tools { flex: 0 0 43px; width: 43px !important; }
    #ai3dPageRoot .ai3d-right-toolbar > .ai3d-debug-stl-btn, #ai3dPageRoot .ai3d-workbench-view-btn, #ai3dPageRoot .ai3d-render-mode-select, #ai3dPageRoot .ai3d-advanced-tools > summary { font-size: 10px !important; }
    #ai3dPageRoot .ai3d-render-mode-control > .ai3d-tool-icon { left: 11px; }
    #ai3dPageRoot .ai3d-material-dock { left: 50% !important; bottom: 82px !important; max-width: calc(100% - 20px); padding: 5px !important; }
    #ai3dPageRoot .ai3d-material-spheres { gap: 10px !important; }
    #ai3dPageRoot .ai3d-material-sphere { width: 32px !important; height: 32px !important; flex-basis: 32px; }
    #ai3dPageRoot .ai3d-right-dock { right: 14px !important; bottom: 14px !important; }
    #ai3dPageRoot .ai3d-history-sidebar-header { padding: 0 14px !important; gap: 10px; }
    #ai3dPageRoot .ai3d-history-summary { padding-left: 10px; }
    #ai3dPageRoot .ai3d-task-history-list { grid-template-columns: repeat(2,minmax(0,1fr)); }
    #ai3dPageRoot .ai3d-turntable-duration-popover { max-width: calc(100vw - 60px); }
}
@media (prefers-reduced-motion: reduce) {
    #ai3dPageRoot *, #ai3dPageRoot *::before, #ai3dPageRoot *::after { transition: none !important; }
}
