.viewer-toolbar{position:relative;z-index:8;display:flex;align-items:center;justify-content:space-between;gap:8px;flex-shrink:0;min-height:58px;padding:10px 14px;background:#e9edf1;border-bottom:1px solid #d0d7e0;color:#344156}.viewer-toolbar button,.viewer-toolbar summary{font-size:11px;padding:9px 12px;white-space:nowrap}.viewer-actions{display:flex;gap:7px;margin-left:auto}#viewer-save-design{background:#edb257;color:#18202c;border-color:#d29a40;font-weight:bold}#viewer-export{background:#fff;color:#344156;border-color:#bbc6d5}#patch-tools{margin:0}#patch-tools>summary{list-style:none;border:1px solid #bbc6d5;background:#fff;border-radius:6px;color:#344156;display:flex;gap:15px;align-items:center;font-weight:bold}#patch-tools>summary::-webkit-details-marker{display:none}#patch-tools[open]>summary{border-color:#d39e42}#patch-popover{position:absolute;top:calc(100% + 5px);left:12px;width:300px;max-width:calc(100vw - 32px);max-height:min(610px,calc(100dvh - 210px));overflow-y:auto;background:#202937;color:#eef2f7;border:1px solid #526078;border-radius:10px;padding:14px;box-shadow:0 12px 35px #0004;scrollbar-width:thin;scrollbar-color:#718096 #202937}.patch-popover-heading{display:flex;justify-content:space-between;align-items:center;font-size:13px;margin-bottom:6px}.patch-popover-heading button{padding:3px 9px;font-size:18px}#patch-logo-library{width:100%;margin:4px 0 9px}#custom-patch-panel{border:0;margin:0;padding:0;display:grid;grid-template-columns:1fr 1fr;gap:7px 12px}#custom-patch-panel>h2{display:none}#custom-patch-panel>.note,#custom-patch-panel>.patch-toggle,#custom-patch-panel>button,#custom-patch-panel>input[type=file],#custom-patch-panel>.patch-file-label{grid-column:1/-1}#custom-patch-panel>label{display:flex;flex-direction:column;align-items:flex-start;gap:5px;margin:0;font-size:10px}#custom-patch-panel>label.patch-toggle{flex-direction:row;align-items:center;margin:0 0 3px}#custom-patch-panel input[type=number]{width:74px;padding:5px}#custom-patch-panel .note{font-size:10px;line-height:1.5;margin:1px 0 5px}#custom-patch-panel button{margin:2px 0;padding:7px;font-size:10px}#custom-patch-panel .patch-file-label{margin:5px 0 0!important}.selected-decoration#custom-patch-panel{outline:none}#stage>#status{top:12px;left:14px;font-size:11px}#viewer-action-status{position:absolute;top:100%;right:12px;margin:9px 0 0;max-width:55%;font-size:10px;line-height:1.4;text-align:right;color:#4d5a6c;pointer-events:none}#viewer-action-status:empty{display:none}#overlap-picker{max-width:calc(100% - 28px)}
.studio-popup{width:min(440px,calc(100vw - 28px));max-height:calc(100dvh - 40px);overflow:auto;background:#161b24;color:#eef2f7;border:1px solid #526078;border-radius:12px;padding:22px;box-shadow:0 24px 90px #0008;scrollbar-width:thin}.studio-popup::backdrop{background:#0a1019b8;backdrop-filter:blur(3px)}.studio-popup-heading{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:16px}.studio-popup-heading h2{font-size:20px}.studio-popup-heading button{font-size:20px;line-height:1;padding:5px 10px}.studio-popup .personal-library{padding:0;margin:0;border:0}.studio-popup .export-controls{padding:0;margin:0;border:0}.studio-popup .export-controls>h2{display:none}.studio-popup .export-controls label{font-size:12px;margin:18px 0}.studio-popup .export-controls select{max-width:210px;font-size:12px}.studio-popup .note{font-size:11px}.studio-popup .design-save-actions button{font-size:11px}.studio-popup [hidden],#personal-library[hidden]{display:none}.studio-popup #save,.studio-popup #load{font-size:11px;margin-top:15px}.studio-popup details{margin:0 0 18px}#open-cap-settings{width:100%;font-size:11px;margin-top:16px}#controls-panel .row{min-height:32px}#controls-panel #autosave-status{margin-bottom:12px}#controls-panel>.note{font-size:11px;margin:8px 0 14px}
@media(max-width:1100px) and (min-width:901px){.viewer-toolbar{padding:9px 8px;gap:5px}.viewer-toolbar button,.viewer-toolbar summary{padding:8px;font-size:10px}.viewer-actions{gap:4px}#patch-tools>summary{gap:6px}}
@media(max-width:540px){.viewer-toolbar{padding:9px 10px;min-height:54px;gap:5px}.viewer-toolbar button,.viewer-toolbar summary{padding:8px;font-size:10px}.viewer-actions{gap:5px}#patch-tools>summary{gap:6px}#patch-popover{left:10px;width:280px;max-height:calc(100dvh - 190px)}#viewer-action-status{font-size:9px;max-width:48%}.studio-popup{padding:18px}.studio-popup .export-controls select{max-width:180px}}
#patch-artwork-options{grid-column:1/-1;margin:4px 0}#patch-artwork-options>summary{font-size:11px;padding:5px 0;color:#cbd4e2}#patch-artwork-options label{display:block;font-size:10px;margin:7px 0!important}#patch-artwork-options input{max-width:100%;margin-bottom:8px}#patch-artwork-options button{width:100%}

#controls-panel>.nav-section{margin:10px 0;border:1px solid #465165;border-radius:7px;overflow:hidden}#controls-panel>.nav-section>summary{display:flex;align-items:center;justify-content:space-between;list-style:none;margin:0;padding:12px 10px;background:#202937;border:0;border-radius:0;color:#eef2f7;font-size:12px;font-weight:bold;cursor:pointer}#controls-panel>.nav-section>summary::-webkit-details-marker{display:none}#controls-panel>.nav-section>summary span{color:#f2b653;font-size:15px;transition:transform .15s}#controls-panel>.nav-section[open]>summary span{transform:rotate(180deg)}#controls-panel>.nav-section[open]>summary{border-bottom:1px solid #465165}.nav-section-body{padding:0 9px 10px}.nav-section-body>.note{font-size:10px;margin:10px 0}#controls-panel #patch-popover{position:static;top:auto;left:auto;width:auto;max-width:none;max-height:none;overflow:visible;padding:10px;background:#161b24;border:0;border-radius:0;box-shadow:none}#controls-panel .patch-popover-heading{display:none}#controls-panel #patch-tools{margin:10px 0}#controls-panel #colors .row{font-size:10px;gap:4px}#controls-panel #colors .picked-color{max-width:45px;font-size:9px}#controls-panel #colors input[type=color]{width:33px}#controls-panel #open-cap-settings{margin-top:4px}
#house-party{background:#174d59;color:#fff;border-color:#174d59}#house-party:hover{background:#216777}#house-party-status{font-size:13px;line-height:1.5;margin:12px 0}#house-party-download{margin-top:16px;background:#edb257;color:#18202c;font-weight:bold}.viewer-actions{flex-wrap:wrap;justify-content:flex-end}

.viewer-toolbar .model-selector{display:flex;flex-direction:column;gap:3px;flex:1 1 140px;min-width:120px;max-width:240px;padding:0;margin:0;border:0}.viewer-toolbar .model-selector label{font-size:9px;line-height:1.2;color:#4d5a6c;margin:0;font-weight:700}.viewer-toolbar .model-selector select{width:100%;min-width:0;height:32px;padding:5px 24px 5px 8px;background:#fff;color:#344156;border:1px solid #bbc6d5;border-radius:5px;font-size:11px}.viewer-toolbar .viewer-actions{flex-shrink:0}@media(max-width:540px){.viewer-toolbar{flex-wrap:wrap}.viewer-toolbar .model-selector{max-width:none;flex-basis:100%}.viewer-toolbar .viewer-actions{margin-left:auto}}

#stage>#patch-tools{position:absolute;top:42px;left:12px;z-index:16;width:300px;max-width:calc(100% - 24px);max-height:calc(100% - 54px);overflow-y:auto;margin:0;border-radius:10px;box-shadow:0 12px 35px #0005;scrollbar-width:thin;background:#202937;color:#eef2f7}#stage>#patch-tools[hidden],#stage>#patch-tools>summary,#custom-patch-panel[hidden],#embroidery-placement[hidden],#controls-panel>.nav-section[hidden]{display:none!important}#stage #patch-popover{position:static;width:auto;max-width:none;max-height:none;border:1px solid #526078;border-radius:10px;padding:12px;box-shadow:none}#stage .patch-popover-heading{display:flex;position:sticky;top:0;z-index:1;background:#202937;padding:0 0 8px;margin-bottom:4px}#stage .patch-popover-heading strong{font-size:13px}#stage .decoration-style-label{display:flex;align-items:center;justify-content:space-between;gap:12px;font-size:11px;margin:7px 0 10px}#decoration-style{background:#161b24;color:#eef2f7;border:1px solid #526078;border-radius:5px;padding:6px;font-size:11px;max-width:160px}#embroidery-placement{display:grid;grid-template-columns:1fr 1fr;gap:12px}#embroidery-placement label{display:flex;flex-direction:column;gap:6px;font-size:11px}#embroidery-placement input{width:74px;padding:5px}#embroidery-placement>button{grid-column:1/-1;font-size:11px}#stage #patch-popover button{font-size:11px}#stage #close-patch-tools{font-size:18px;padding:3px 9px}@media(max-width:540px){#stage>#patch-tools{top:35px;left:8px;max-width:calc(100% - 16px);max-height:calc(100% - 43px);width:280px}}

#embroidery-placement input{background:#161b24;color:#eef2f7;border:1px solid #526078;border-radius:5px;font:11px Arial}

.render-view-bar{display:flex;align-items:center;gap:16px;flex-wrap:wrap;padding:8px 14px;background:#e9edf1;border-bottom:1px solid #d0d7e0;color:#344156;font-size:11px;flex-shrink:0}.realistic-toggle{display:flex;align-items:center;gap:7px;font-weight:bold;cursor:pointer}.render-view-bar input[type=checkbox]{accent-color:#174d59}.render-view-bar details{margin:0;position:relative}.render-view-bar summary{cursor:pointer;font-weight:bold;padding:5px 8px}.render-view-bar details[open]{padding:8px;background:#fff;border:1px solid #bbc6d5;border-radius:6px}.render-view-bar details label{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:8px 0}.render-view-bar [hidden]{display:none!important}#render-view-status{font-size:10px;color:#526078;margin-left:auto}@media(max-width:540px){.render-view-bar{gap:8px;padding:7px 10px}#render-view-status{flex-basis:100%;margin:0}}

.render-view-bar details[open]{padding:0;background:transparent;border:0}.render-view-bar summary{color:#344156;font-size:11px;margin:0}.render-lighting-controls{position:absolute;left:0;top:calc(100% + 7px);width:230px;padding:12px;background:#fff;border:1px solid #bbc6d5;border-radius:7px;box-shadow:0 8px 25px #0002;z-index:20}.render-view-bar details:not([open]) .render-lighting-controls{display:none}.render-view-bar{position:relative;z-index:9}#viewer-action-status{top:calc(100% + 48px);max-width:45%}

#stage.photography-stage>#status{color:#dce4ed;text-shadow:0 1px 3px #000}.preview:has(.photography-stage) #viewer-action-status{color:#dce4ed;text-shadow:0 1px 3px #000}

/* Keep lighting controls inside the popover at narrow viewer widths. */
.render-lighting-controls{width:min(230px,calc(100vw - 36px));min-width:0;box-sizing:border-box}
.render-view-bar details .render-lighting-controls label{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:6px;align-items:center;min-width:0;margin:10px 0}
.render-lighting-controls input[type=range]{grid-column:1/-1;display:block;width:100%;max-width:100%;min-width:0;margin:0;box-sizing:border-box;cursor:pointer;touch-action:pan-y;accent-color:#174d59}
.render-lighting-controls output{font-variant-numeric:tabular-nums;color:#344156;font-size:11px}
.render-lighting-controls label:has(input[type=checkbox]){display:flex!important;justify-content:flex-start!important}
.render-lighting-controls select{min-width:0;max-width:100%;grid-column:1/-1}
