/* Canvas workspace: tools → context → sign. Only the designer page loads this. */
.studio-page{--workspace-panel:310px;--workspace-header:72px;--workspace-rail:80px;font-size:18px;background:#ecefea}
.studio-page .sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.studio-page #main{padding:0;max-width:none;margin:0}
.studio-header{height:var(--workspace-header);position:relative;padding:10px 22px;gap:18px;background:#fcfbf7}
.studio-brand{gap:22px}.studio-brand .brand-logo{width:136px}.studio-brand h1{font-size:20px;border-left:1px solid var(--line);padding-left:22px;font-weight:550}
.studio-home{display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:8px 12px;white-space:nowrap;font-size:16px;font-weight:600;border:1px solid #c5cec5;border-radius:7px;color:#40584d;background:#fffefa;text-decoration:none}
.studio-home:hover{background:#eae3d8}.studio-home:focus-visible{outline:2px solid #80674b;outline-offset:2px}
@media(max-width:1100px){.studio-brand h1{display:none}}
@media(max-width:900px){.studio-header .studio-brand{gap:8px}.studio-home{padding-inline:8px;font-size:14px}}
.studio-history{gap:2px}.studio-history button{border:0;background:transparent;font-size:16px;min-width:44px;padding:8px}
.studio-history #reset-design-top{white-space:nowrap}.studio-history #reset-design-top span{display:inline}
.studio-header .studio-primary{font-size:17px;padding:10px 16px;min-height:44px;background:#4d685e}
.workspace-save{position:relative;font-size:16px}.workspace-save>summary{list-style:none;cursor:pointer;min-height:44px;display:flex;align-items:center;padding:8px 12px;border:1px solid #c5cec5;border-radius:7px;white-space:nowrap}
.workspace-save>summary::-webkit-details-marker{display:none}.workspace-save-menu{position:absolute;right:0;top:calc(100% + 12px);width:270px;max-width:calc(100vw - 24px);background:#fffefa;border:1px solid #c7d0c8;border-radius:10px;box-shadow:0 12px 32px #30463724;padding:12px;z-index:50}
.workspace-save-menu p{font-size:15px;margin:0 8px 8px;color:#5b695f}.workspace-save-menu button{width:100%;justify-content:flex-start;border:0;background:transparent;font-size:17px}
.studio-layout{display:grid;grid-template-columns:var(--workspace-rail) var(--workspace-panel) minmax(0,1fr);grid-template-rows:minmax(0,1fr);height:calc(100dvh - var(--workspace-header));min-height:460px;max-width:none;margin:0}
.workspace-rail{grid-column:1;grid-row:1;display:flex;flex-direction:column;align-items:stretch;gap:5px;padding:12px 7px;background:#f5f6f1;border-right:1px solid #d3dbd2;overflow-y:auto}
.workspace-rail button{flex-shrink:0;flex-direction:column;gap:5px;border:0;border-radius:9px;background:transparent;min-height:76px;padding:10px 2px;font-size:16px;font-weight:550;color:#59695e}
.workspace-rail button svg{width:25px;height:25px}.workspace-rail button[aria-pressed=true]{background:#dfe9e0;color:#294f3d;box-shadow:inset 3px 0 #587565}
.studio-inspector{grid-column:2;grid-row:1;position:relative;top:auto;max-height:none;min-height:0;overflow-y:auto;border:0;border-right:1px solid #d1dacf;background:#fcfbf7;overscroll-behavior:contain}
.workspace-panel-heading{display:flex;align-items:center;justify-content:space-between;position:sticky;top:0;z-index:10;padding:12px 18px;background:#fcfbf7;border-bottom:1px solid #e1e5dc;gap:10px}
.workspace-panel-heading h2{font-size:21px;margin:0;font-weight:650}.workspace-panel-heading button{border:0;background:transparent;padding:8px}
.studio-inspector :is(input,button,summary,select){scroll-margin-top:80px}
#studio-controls{padding:20px 18px 24px}.inspector-heading h2{font-size:18px}.inspector-heading{margin-bottom:12px}.selected-actions{gap:0}.selected-actions button{padding:8px}
.studio-page #add-text{width:100%;font-size:18px;min-height:48px;background:#536e63;color:#fffefa;border:0;border-radius:7px}
.studio-object-list>div{flex-basis:100%}.studio-object-list{gap:10px}.studio-object-list .layer-button{flex-basis:70px}
.studio-label,.studio-fieldset legend{font-size:17px}.studio-label{margin:16px 0 8px}.studio-page #edit-text{font-size:23px;min-height:56px}
.studio-fonts{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.studio-fonts button{gap:3px;padding:10px 4px;font-size:16px;background:#fffefa;border-color:#d4dcd2}.studio-fonts .font-sample{font-size:30px;line-height:1.45}
.studio-fonts button[aria-pressed=true]{background:#e6ede3;border-color:#587565;box-shadow:inset 0 0 0 1px #587565}
.studio-inspector-bottom{margin:0 18px 18px}.studio-inspector-bottom :is(a,button){font-size:15px}
.studio-preview{grid-column:3;grid-row:1;position:relative;top:auto;height:auto;min-height:0;padding:0;background:#e8ece7;z-index:1;overflow:hidden;display:flex;flex-direction:column}
.workspace-context{display:flex;align-items:center;gap:14px;background:#fcfbf7;border-bottom:1px solid #d3dbd2;padding:8px 18px;min-height:62px;flex-shrink:0;overflow-x:auto;scrollbar-width:thin}
#workspace-selection-tools{display:flex;align-items:center;gap:8px;flex-shrink:0}.workspace-context button{font-size:16px;min-height:42px;padding:8px 10px;border-color:#ccd6ca;white-space:nowrap;background:#fffefa}
.workspace-context p{font-size:16px;margin:0;color:#617164;white-space:nowrap}.workspace-context label{display:flex;align-items:center;flex-shrink:0;margin:0}
.workspace-context .workspace-font{width:144px}.studio-page .workspace-context select{font-size:16px;padding:8px 24px 8px 9px;min-height:42px;border-color:#ccd6ca}
.workspace-size{position:relative;width:94px}.studio-page .workspace-size input{font-size:17px;padding:8px 26px 8px 8px;min-height:42px;border-color:#ccd6ca;font-variant-numeric:tabular-nums}.workspace-size>span:last-child{position:absolute;right:8px;pointer-events:none;font-size:15px;color:#637063}
.studio-page .workspace-color input{width:44px;height:42px;padding:5px;border:1px solid #ccd6ca;border-radius:7px;background:#fffefa;cursor:pointer}
.studio-preview-toolbar{padding:12px 24px 4px;min-height:50px;flex-shrink:0}.studio-canvas-title{font-size:16px;color:#607060;font-weight:500}#studio-board-settings{font-size:16px}
.studio-canvas-area{display:block;flex:1;min-height:0;padding:0;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#abb9aa transparent;background-image:radial-gradient(#b7c3b466 .75px,transparent .75px);background-size:18px 18px}
.workspace-stage{min-width:100%;min-height:100%;width:max-content;display:grid;place-items:center;padding:18px;box-sizing:border-box}
.studio-board-wrap{width:var(--canvas-display-width,600px);max-width:none;min-width:0;display:block;flex:none}
.studio-board{width:100%;max-width:none;border-radius:5px;box-shadow:0 16px 34px -14px #253e315e}.studio-short .studio-board{max-width:none}
.studio-board::before,.studio-board::after{display:none}.studio-preview .studio-board canvas{height:100%;width:100%}
.studio-preview-notes{flex-shrink:0;margin:0;padding:6px 18px;font-size:15px;text-align:center;min-height:30px;background:#e8ece7}.studio-preview-notes p{margin:0}.studio-preview-notes p:empty{display:none}
.workspace-statusbar{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:58px;padding:7px 18px;background:#f7f8f3;border-top:1px solid #d4ded2;flex-shrink:0;font-size:15px}
.workspace-status-label{color:#596b5b}.workspace-zoom{display:flex;align-items:center;gap:7px;min-width:0}.workspace-zoom button{font-size:15px;min-height:40px;padding:7px;border:0;background:transparent}.workspace-zoom label{width:110px;display:flex;align-items:center}.workspace-zoom input{min-width:0}.workspace-zoom output{width:46px;text-align:center;font-variant-numeric:tabular-nums}.workspace-zoom #workspace-fit{padding-inline:10px;border-left:1px solid #d2dbcf;border-radius:0;margin-left:3px}
.studio-page[data-panel-open=false] .studio-layout{grid-template-columns:var(--workspace-rail) 0 minmax(0,1fr)}
.studio-page[data-panel-open=false] .studio-inspector{display:none}

.studio-page #art-back{display:none}.studio-compositions{gap:10px}.studio-compositions img{height:120px}.studio-compositions span{font-size:16px;padding:8px}
.studio-decor-tools{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}.studio-decor-tools button{flex-direction:column;padding:10px 4px;font-size:15px}.studio-decor-tools svg{width:54px;height:42px;stroke:#697c6d;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;fill:none}
.studio-export-note{font-size:14px;background:#f7f8f3;padding:9px 20px}.studio-notice{bottom:70px;font-size:16px}
@media(min-width:901px) and (max-width:1190px){.studio-page{--workspace-panel:284px;--workspace-rail:72px}.studio-header{gap:10px;padding-inline:16px}.studio-history span{display:none}.studio-brand{gap:14px}.studio-brand h1{padding-left:14px}.workspace-context{padding-inline:12px}.workspace-context button{padding-inline:8px}.workspace-status-label{display:none}.workspace-statusbar{justify-content:flex-end}.studio-preview-toolbar{padding-inline:18px}}
@media(max-width:900px){
 .studio-page{--workspace-header:64px;--workspace-rail:0px}.studio-header{height:64px;padding:8px 12px;gap:8px;position:relative}.studio-brand .brand-logo{width:105px}.studio-brand h1{display:none}.studio-history{margin-left:auto}.studio-history button{min-width:36px;min-height:44px;padding:6px}.studio-history span{display:none}.workspace-save>summary{font-size:15px;padding-inline:9px}.studio-header .studio-primary{font-size:16px;padding:10px;gap:4px}.studio-primary svg{display:none}
 .studio-layout,.studio-page[data-panel-open=false] .studio-layout{height:calc(var(--studio-vh,100dvh) - var(--workspace-header));min-height:440px;grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(210px,1fr) auto auto;position:relative;overflow:hidden}
 .studio-preview{grid-column:1;grid-row:1;position:relative;top:auto;border-bottom:0;height:auto;min-height:0;padding:0;z-index:1}
 .workspace-rail{grid-row:2;grid-column:1;flex-direction:row;justify-content:space-around;gap:0;padding:4px 6px;border:0;border-top:1px solid #d1d9ce;overflow-x:auto;overflow-y:hidden;background:#fafbf5;z-index:3}
 .workspace-rail button{flex:1;min-width:52px;min-height:62px;padding:7px 4px;font-size:15px;gap:3px}.workspace-rail button svg{width:22px;height:22px}.workspace-rail button[aria-pressed=true]{box-shadow:inset 0 -3px #587565}
 .studio-inspector{grid-column:1;grid-row:3;position:relative;top:auto;max-height:min(42dvh,380px);height:auto;min-height:0;border:0;border-top:1px solid #d1d9ce;z-index:2;overflow-y:auto}
 .workspace-panel-heading{padding:4px 16px;min-height:52px}.workspace-panel-heading h2{font-size:19px}#studio-controls{padding:16px 20px 24px}
 .workspace-context{min-height:58px;padding:7px 12px;gap:8px}.workspace-context p{font-size:15px}.workspace-context button{font-size:15px}.workspace-context .workspace-font{width:130px}.workspace-size{width:88px}#workspace-selection-tools{gap:6px}
 .studio-preview-toolbar{padding:3px 14px 0;min-height:43px}.studio-canvas-title{font-size:14px}#studio-board-settings{font-size:15px;min-height:40px}
 .workspace-stage{padding:12px}.studio-board,.studio-short .studio-board{max-width:none}.studio-preview-notes{padding:3px 12px;min-height:24px;font-size:14px}.studio-preview-notes #canvas-help{display:none}
 .workspace-statusbar{min-height:46px;padding:3px 12px;justify-content:flex-end}.workspace-status-label{display:none}.workspace-zoom{gap:4px;width:100%;justify-content:flex-end}.workspace-zoom label{width:80px}.workspace-zoom button{min-height:40px;font-size:14px}.workspace-zoom #workspace-fit{padding-inline:8px}.workspace-zoom output{font-size:14px}
 .studio-fonts{grid-template-columns:repeat(4,minmax(0,1fr));gap:7px}.studio-fonts button{font-size:15px;min-height:75px}.studio-fonts .font-sample{font-size:26px}.studio-fieldset{margin-top:18px}.studio-label,.studio-fieldset legend{font-size:18px}.studio-inspector-bottom{margin-inline:20px}.studio-compositions{grid-template-columns:repeat(2,minmax(0,1fr))}.studio-compositions img{height:140px}
 .studio-page[data-panel-open=true] .studio-preview-notes{max-height:56px;overflow-y:auto}.studio-notice{bottom:78px;max-width:calc(100vw - 24px)}.studio-export-note{padding:8px 14px;font-size:13px}
}
@media(max-width:430px){.studio-header{gap:4px;padding-inline:8px}.studio-brand .brand-logo{width:86px}.workspace-save>summary{font-size:14px;padding-inline:7px}.studio-header .studio-primary{font-size:15px;padding-inline:8px}.studio-history button{min-width:32px;padding-inline:4px}.studio-fonts{grid-template-columns:repeat(2,minmax(0,1fr))}.workspace-rail button{min-width:48px;font-size:14px}}
@media(max-width:760px){
 .studio-page{--workspace-header:112px}
 .studio-header{height:var(--workspace-header);display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-rows:44px 44px;gap:8px;padding:8px 12px}
 .studio-header .studio-brand{grid-column:1;grid-row:1}
 .studio-header .studio-primary{grid-column:2;grid-row:1;justify-self:end}
 .studio-header .studio-history{grid-column:1;grid-row:2;margin-left:0;gap:2px}
 .studio-header .workspace-save{grid-column:2;grid-row:2;justify-self:end}
 .studio-history #reset-design-top{font-size:14px;padding-inline:6px;gap:5px}
}
@media(prefers-reduced-motion:reduce){.studio-page *{scroll-behavior:auto!important;transition:none!important}}

/* Physical lettering measurements stay readable beside the canvas controls. */
#workspace-size-unit{font-size:14px;flex-shrink:0}.workspace-size{min-width:92px}#text-height-note{font-variant-numeric:tabular-nums}.studio-warning{flex-wrap:wrap;gap:8px}.studio-warning span{overflow-wrap:anywhere}

/* Keep the handoff choices together, with editing help one step away. */
.workspace-save-menu{width:350px;max-height:calc(100dvh - var(--workspace-header) - 28px);overflow-y:auto;overscroll-behavior:contain}
.workspace-export-group{padding-bottom:12px;margin-bottom:8px;border-bottom:1px solid #d7ded3}
.workspace-save-menu .workspace-export-group button{align-items:center;min-height:58px;white-space:normal;text-align:left}
.workspace-export-group button>span{display:block;line-height:1.5}
.workspace-export-group small{display:block;font-size:14px;font-weight:400;color:#53685c}
.workspace-save-menu #download-photoimpact{background:#e5eee3;border-radius:7px;color:#294f3d}
.workspace-save-menu #studio-export-status{font-size:14px;margin:8px;overflow-wrap:anywhere}
.workspace-save-menu #studio-export-status:empty{display:none}
@media(max-width:600px){.workspace-save-menu{position:fixed;top:calc(var(--workspace-header) + 4px);left:12px;right:12px;width:auto;max-width:none}}

/* Keep the library in place while objects are assembled on the canvas. */
.studio-page[data-selection-kind=art] .workspace-context{overflow:visible}
.studio-page[data-selection-kind=art] #workspace-selection-tools{flex-wrap:wrap;flex-shrink:1;min-width:0;width:100%}
.workspace-rotation-tools{display:flex;align-items:center;gap:6px;order:3}
.workspace-rotation-tools>label{gap:7px;font-size:16px;color:#53685c}
.workspace-angle{position:relative;display:flex;width:84px;align-items:center}
.studio-page #workspace-rotation{min-width:0;width:100%;padding:9px 24px 9px 8px;font-size:17px;min-height:44px;font-variant-numeric:tabular-nums}
.workspace-angle>span{position:absolute;right:9px;font-size:17px;pointer-events:none}
.workspace-context .workspace-rotation-tools button{min-height:44px;padding:8px;gap:3px;font-size:14px}
.workspace-rotation-tools button svg{width:20px;height:20px}
.studio-page .object-rotate{display:none;position:absolute;left:50%;top:-50px;transform:translateX(-50%);width:44px;height:44px;min-width:44px;min-height:44px;padding:10px;border:1px solid #7e694e;border-radius:50%;background:#f1c898;color:#342b20;cursor:grab;pointer-events:auto;touch-action:none}
.studio-page .is-selected .object-rotate{display:flex}
.studio-page .object-rotate:hover{background:#ffdfb7}
.studio-page .object-rotate:active{cursor:grabbing}
.studio-page .object-rotate:focus-visible{outline-color:#fff9ed}
.object-rotate::after{content:"";position:absolute;top:100%;left:50%;height:7px;width:1px;background:#f1c898;pointer-events:none}
@media(max-width:700px){.workspace-rotation-tools{flex-basis:100%;padding-top:4px}.studio-page[data-selection-kind=art] .workspace-context{padding-block:6px}.workspace-rotation-tools>label{font-size:15px}}

/* Dimensions are always above the canvas, independent of the active tool. */
.studio-preview-toolbar{order:-1;position:relative;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:8px 18px;min-height:58px;background:#f5f7f0;border-bottom:1px solid #d3dbd2;z-index:20}
.board-toolbar-actions{display:flex;align-items:center;gap:18px;min-width:0}
.studio-page #studio-board-settings{min-height:44px;padding:8px 12px;background:#fffefa;border:1px solid #91a396;border-radius:7px;gap:10px;font-size:17px;white-space:nowrap}
#studio-board-settings>span:first-child{font-size:15px;color:#5b6a60}
.board-price-link{font-size:16px;white-space:nowrap;color:#3e6452;text-underline-offset:4px}
.board-popover{position:absolute;top:calc(100% + 4px);left:18px;width:360px;max-width:calc(100% - 36px);max-height:calc(100dvh - var(--workspace-header) - 85px);overflow-y:auto;background:#fffefa;border:1px solid #b9c7b8;border-radius:12px;box-shadow:0 12px 30px #233d322e;padding:18px;text-align:left;overscroll-behavior:contain}
.board-popover-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:16px}
.board-popover h2{font-size:22px;margin:0}.board-popover-heading button{font-size:26px;min-width:44px;min-height:44px;padding:0;border:0;background:transparent}
.board-popover label{display:block;font-size:17px;margin:0 0 6px;font-weight:550}
.studio-page .board-popover :is(input,select){width:100%;font-size:18px;min-height:46px;padding:9px 11px;border:1px solid #aabaaa;border-radius:6px;background:#fffefa}
.board-custom{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);align-items:end;gap:10px;margin-top:16px}.board-custom>span{padding-bottom:17px;color:#64735f}.board-custom input{margin-top:6px}
.board-popover .board-hint{font-size:15px;line-height:1.6;color:#5d6b5e;margin:10px 0}
.studio-page #apply-board-size{width:100%;min-height:48px;font-size:18px;background:#496757;color:#fffefa;border:0;border-radius:7px;margin:5px 0}
.studio-page .board-arrange{width:100%;font-size:16px;min-height:44px;border:1px solid #cbd5c8;background:transparent}
#board-error{font-size:16px;color:#923d2f;margin:8px 0}
.stroke-settings{margin:18px 0;padding:18px 0;border-top:1px solid #d5dfd0}.stroke-settings h3{font-size:21px;margin:0}.stroke-settings .studio-label{margin-top:10px}.stroke-settings select{width:100%;font-size:17px}
.studio-page .studio-done-drawing{background:#496757;color:#fffefa;border:0;font-size:18px;min-height:50px}
@media(max-width:900px){
 .studio-preview-toolbar{padding:5px 12px;min-height:52px}.studio-canvas-title{display:none}.board-toolbar-actions{width:100%;justify-content:space-between;gap:8px}.board-price-link{font-size:15px}.studio-page #studio-board-settings{font-size:16px;gap:7px}
 .studio-page[data-board-open=true] .studio-preview{z-index:5;overflow:visible}
 .board-popover{position:fixed;top:calc(var(--workspace-header) + 56px);left:12px;right:12px;width:auto;max-width:none;max-height:calc(100dvh - var(--workspace-header) - 80px)}
 .studio-page[data-panel-open=true] .studio-preview-notes>:not(#designer-layout-status){display:none}
 .studio-page[data-panel-open=true] .studio-preview-notes:has(#designer-layout-status[hidden]){display:none}
}

/* Direct dimensions and a finite workshop LED palette. */
.board-toolbar-actions{flex-wrap:wrap;gap:10px}.board-quick-size{display:flex;align-items:center;gap:7px;font-size:17px}.board-quick-size label{display:flex;align-items:center;gap:5px}.studio-page .board-quick-size input{width:72px;min-height:44px;padding:6px;font-size:19px;border:1px solid #a8b6a4;border-radius:6px;background:#fffefa}.studio-preview-toolbar{flex-wrap:wrap;min-height:64px}.studio-page #workspace-add-art{white-space:nowrap;border:1px solid #91a18b;background:#e7eee1;color:#354e3f;font-size:18px}.workspace-context{flex-wrap:wrap}.studio-page .workspace-color select{width:100px;min-height:42px;padding:6px;font-size:18px}.studio-page .studio-custom-color select{width:130px;min-height:44px;padding:6px 10px;font-size:19px}.studio-page .studio-colors{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px}.studio-page .studio-colors button{width:auto;height:auto;min-height:66px;display:flex;flex-direction:column;align-items:center;gap:5px;padding:7px 3px;border:1px solid #a9b6a4;border-radius:7px;background:#fffefa}.studio-page .studio-colors button i{width:21px;height:21px;border-radius:50%;background:var(--swatch);border:1px solid #77816f}.studio-page .studio-colors button span{position:static;clip-path:none;clip:auto;width:auto;height:auto;overflow:visible;font-size:16px;color:#354336}.studio-page .studio-colors button[aria-pressed=true]{outline:2px solid #546a60;outline-offset:1px;background:#e4ebdf}
@media(max-width:900px){.board-quick-size{font-size:15px}.studio-page .board-quick-size input{width:60px;font-size:18px}.board-toolbar-actions{gap:6px}.board-price-link{display:none}.studio-canvas-title{display:none}.studio-page #workspace-add-art{font-size:16px}.workspace-context{max-height:132px;overflow-y:auto;flex-shrink:0}.studio-page .workspace-color select{width:90px;font-size:16px}}
@media(max-width:900px){.studio-page[data-selection-kind=art] .workspace-context{overflow:auto}.studio-page #workspace-selection-tools{min-width:0;max-width:100%;flex-wrap:wrap;flex-shrink:1}.workspace-context{max-height:144px}.studio-page .workspace-rotation-tools{flex-basis:auto}}

/* Mobile editing keeps the sign visible; settings occupy one bounded bottom pane. */
@media(max-width:900px){
 .studio-page{--workspace-header:56px;overflow:hidden}
 .studio-header{height:56px;display:flex;gap:4px;padding:6px 8px;flex-wrap:nowrap}
 .studio-header .studio-brand{flex:0 0 auto}.studio-brand .brand-logo{width:64px}
 .studio-header .studio-history{margin-left:auto;gap:0}.studio-history button{width:40px;min-width:40px;min-height:44px;padding:8px}
 .studio-history #reset-design-top span{display:none}.studio-header .studio-primary{font-size:14px;padding:8px;min-height:44px;white-space:nowrap}
 .workspace-save>summary{font-size:0;min-width:44px;justify-content:center;padding:6px}
 .workspace-save>summary::after{content:'儲存';font-size:15px}
 .studio-layout,.studio-page[data-panel-open=false] .studio-layout{min-height:0;height:calc(var(--studio-vh,100dvh) - 56px);grid-template-rows:minmax(0,1fr) 54px auto}
 .studio-preview-toolbar{min-height:46px;flex-shrink:0;padding:2px 10px;flex-wrap:nowrap}
 .board-quick-size{display:none}.board-toolbar-actions{justify-content:flex-end}
 #studio-board-settings>span:first-child{display:none}
 .studio-page #design-dimensions{position:static;width:auto;height:auto;margin:0;clip:auto;clip-path:none;overflow:visible;font-size:16px;font-weight:550;white-space:nowrap}
 .studio-page #studio-board-settings{min-height:40px;padding:6px 10px}
 .studio-page #workspace-add-art{display:none}
 .studio-page .workspace-context{min-height:48px;max-height:48px;padding:3px 8px;flex-wrap:nowrap;overflow-x:auto;overflow-y:hidden}
 .studio-page #workspace-selection-tools{flex-wrap:nowrap;flex-shrink:0;width:max-content;max-width:none}
 .studio-page[data-selection-kind=art] #workspace-selection-tools{flex-wrap:nowrap;width:max-content;max-width:none;flex-shrink:0}
 .workspace-rotation-tools{flex-basis:auto;flex-shrink:0;padding:0}
 .studio-page[data-panel-open=true] .workspace-context{display:none}
 .workspace-stage{padding:8px}.studio-preview-notes{max-height:42px;overflow-y:auto;font-size:13px;padding:2px 8px}
 .studio-warning{padding:5px 8px;font-size:13px;margin:0}
 .workspace-rail{padding:0 4px}.workspace-rail button{min-height:52px;flex-direction:row;gap:7px;font-size:15px;padding:4px;touch-action:manipulation}
 .workspace-rail button svg{width:21px;height:21px}
 .studio-inspector{height:min(34vh,270px);height:min(calc(var(--studio-vh,100dvh) * .34),270px);max-height:none;overscroll-behavior:contain}
 .workspace-panel-heading{min-height:44px;padding:0 12px}.workspace-panel-heading button{min-width:44px;min-height:44px}
 #studio-controls{padding:8px 12px 24px}
 #panel-text:not([hidden]){display:flex;flex-direction:column}
 .mobile-text-entry{order:-1}.mobile-text-entry>.studio-label{margin:0 0 5px;font-size:16px}
 .studio-page #edit-text{font-size:20px;min-height:48px;padding:8px 12px}
 .mobile-text-entry #text-help{font-size:13px;margin:6px 0 12px}
 .studio-object-list{gap:6px;margin:8px 0}.studio-page #add-text{min-height:44px;font-size:16px}
 .studio-page .workspace-statusbar{min-height:40px;padding:0 8px}.workspace-zoom label,.workspace-zoom output,.workspace-status-label{display:none}
 .studio-page[data-panel-open=true] .workspace-statusbar{display:none}
 .studio-page[data-keyboard-open=true]{--workspace-header:0px}
 .studio-page[data-keyboard-open=true] .studio-header,.studio-page[data-keyboard-open=true] .studio-preview-toolbar,.studio-page[data-keyboard-open=true] .workspace-rail,.studio-page[data-keyboard-open=true] .studio-preview-notes,.studio-page[data-keyboard-open=true] .workspace-context,.studio-page[data-keyboard-open=true] .workspace-statusbar{display:none}
 .studio-page[data-keyboard-open=true] .studio-layout{height:var(--studio-vh,100dvh);grid-template-rows:minmax(100px,1fr) 0 auto}
 .studio-page[data-keyboard-open=true] .studio-inspector{height:calc(var(--studio-vh,100dvh) * .52)}
}
@media(max-width:360px){.studio-brand .brand-logo{width:48px}.studio-history button{width:36px;min-width:36px}.studio-header .studio-primary{font-size:13px;padding-inline:6px}}

/* Selection controls occupy one stable row; overflow scrolls horizontally. */
@media(min-width:901px){
 .studio-page .workspace-context,.studio-page[data-selection-kind=art] .workspace-context{height:76px;min-height:76px;max-height:76px;box-sizing:border-box;flex-wrap:nowrap;overflow-x:scroll;overflow-y:hidden}
 .studio-page #workspace-selection-tools,.studio-page[data-selection-kind=art] #workspace-selection-tools{flex-wrap:nowrap;flex:0 0 auto;width:max-content;max-width:none}
 .studio-page .workspace-context>*{flex-shrink:0}
 .studio-page .workspace-rotation-tools{flex-basis:auto;flex-shrink:0;padding-top:0}
}

/* Paint-style desktop ribbon. Mobile retains its bottom tool strip. */
#workspace-minimum{font-size:14px;color:#53685c;white-space:nowrap}
#workspace-minimum:empty{display:none}
@media(min-width:901px){
 .studio-page .studio-layout{grid-template-columns:var(--workspace-panel) minmax(0,1fr);grid-template-rows:66px minmax(0,1fr)}
 .studio-page[data-panel-open=false] .studio-layout{grid-template-columns:0 minmax(0,1fr)}
 .studio-page .workspace-rail{grid-column:1 / -1;grid-row:1;flex-direction:row;align-items:center;padding:4px 18px;gap:12px;border-right:0;border-bottom:1px solid #d3dbd2;overflow:auto}
 .studio-page .workspace-rail button{min-height:52px;min-width:90px;flex-direction:row;gap:8px;padding:8px 14px}
 .studio-page .workspace-rail button[aria-pressed=true]{box-shadow:inset 0 -3px #587565}
 .studio-page .studio-inspector{grid-column:1;grid-row:2}
 .studio-page .studio-preview{grid-column:2;grid-row:2}
}

/* Direct pattern library and source-style red/white circuit diagrams. */
.studio-decor-tools button{min-height:100px;gap:8px;border:1px solid #c5cec5;background:#fffefa;touch-action:manipulation}
.studio-decor-tools button:hover{background:#e4ebdf}.studio-decor-tools button:focus-visible{outline:3px solid #546a60;outline-offset:2px}
.studio-decor-tools svg{width:64px;height:54px;stroke-width:2;stroke:#3e6452}
.studio-page .studio-effects{grid-template-columns:1fr;gap:10px;margin-top:16px}
.studio-page .studio-effects button{display:grid;grid-template-columns:112px minmax(0,1fr);column-gap:14px;align-items:center;padding:12px;text-align:left;min-height:94px}
.studio-page .studio-effects button[aria-pressed=true]{padding:11px;border-color:#546a60;background:#e5ede3}
.studio-effects .circuit-demo{grid-column:1;grid-row:1 / 3;display:flex;gap:8px;align-items:center;justify-content:center;background:#131713;border-radius:6px;padding:12px 7px;min-height:68px}
.circuit-lamp{display:grid;justify-items:center;gap:7px}.circuit-lamp small{font-size:13px;line-height:1;color:#f6f7ef}
.circuit-lamp i{display:block;width:17px;height:17px;border-radius:50%;background:#ecefe7;border:1px solid #b6c0b2}
.circuit-lamp i.is-lit{background:#ff5149;border-color:#ffa59e;box-shadow:0 0 9px #ff514988}
.studio-effects strong{grid-column:2;font-size:18px}.studio-effects button>span:last-child{grid-column:2;font-size:14px;line-height:1.5}
@media(max-width:900px){.studio-decor-tools{grid-template-columns:repeat(3,minmax(0,1fr))}.studio-decor-tools button{min-height:94px}.studio-page .studio-effects button{grid-template-columns:112px minmax(0,1fr)}}

/* One entry per task; secondary object controls are disclosed on demand. */
.studio-page #workspace-add-art,.studio-page #workspace-select,.studio-page .board-quick-size,
.studio-page .studio-canvas-title,.studio-page .studio-inspector-bottom,
.studio-page .workspace-status-label,.studio-page .workspace-zoom label{display:none}
.studio-page #design-dimensions{position:static;width:auto;height:auto;margin:0;clip:auto;clip-path:none;overflow:visible;font-size:16px}
.studio-page #studio-board-settings>span:first-child{display:none}
.studio-page .studio-preview-toolbar{min-height:50px;padding-block:3px}
.studio-page .workspace-context,.studio-page[data-selection-kind=art] .workspace-context{position:relative;z-index:21;height:58px;min-height:58px;max-height:58px;overflow:visible;flex-wrap:nowrap}
.studio-page #workspace-selection-tools{gap:8px}
.workspace-more{position:relative}
.workspace-more>summary{list-style:none;cursor:pointer;display:flex;align-items:center;justify-content:center;min-height:44px;padding:7px 12px;border:1px solid #ccd6ca;border-radius:7px;background:#fffefa;font-size:16px}
.workspace-more>summary::-webkit-details-marker{display:none}
.workspace-more-menu{position:absolute;right:0;top:calc(100% + 8px);width:300px;max-width:calc(100vw - 24px);padding:14px;display:flex;flex-wrap:wrap;align-items:center;gap:10px;background:#fffefa;border:1px solid #bac8ba;border-radius:10px;box-shadow:0 10px 30px #233d3230;max-height:50dvh;overflow:auto}
.workspace-more:not([open])>.workspace-more-menu{display:none}
.workspace-more-menu #workspace-minimum{width:100%}
.studio-page .workspace-more-menu .workspace-rotation-tools{flex-wrap:wrap;order:0}
.studio-page .studio-preview-notes{position:relative;overflow:visible;max-height:none;min-height:28px;padding:4px 12px;display:flex;gap:12px;align-items:center;justify-content:center;font-size:13px}
.studio-page #designer-layout-status{display:block;padding:0;margin:0;background:transparent;font-size:13px}
.studio-page #designer-layout-status[hidden]{display:none}
#designer-layout-status>summary{cursor:pointer;color:#8b5737;white-space:nowrap;padding:5px}
.layout-warning-body{position:absolute;bottom:100%;right:12px;z-index:25;width:340px;max-width:calc(100% - 24px);max-height:220px;overflow:auto;padding:14px;background:#fcf3e8;border:1px solid #dcc3a9;border-radius:8px;box-shadow:0 8px 24px #233d3226;text-align:left}
.layout-warning-body button{margin-top:10px}
.studio-page #panel-board [data-art-pane=templates]>h2,.studio-page #panel-board [data-art-pane=templates]>p{display:none}
@media(max-width:900px){
 .studio-page .workspace-context,.studio-page[data-selection-kind=art] .workspace-context{height:52px;min-height:52px;max-height:52px;padding:4px 6px}
 .studio-page #workspace-selection-tools{gap:4px}
 .studio-page .workspace-size{width:80px;min-width:80px}
 .studio-page .workspace-color select{width:76px}
 .studio-page #workspace-duplicate,.studio-page #workspace-delete{width:44px;min-width:44px;padding:8px}
 .workspace-more>summary{padding:6px 9px;font-size:15px}
 .workspace-more-menu{position:fixed;top:158px;left:12px;right:12px;width:auto;max-height:calc(var(--studio-vh,100dvh) - 220px)}
 .studio-page[data-panel-open=true] .workspace-context{display:none}
 .studio-page .studio-preview-notes{justify-content:flex-end;min-height:28px}
 .studio-page .studio-preview-notes #canvas-help{display:none}
 .studio-page .workspace-rail button{gap:5px}
}
@media(max-width:900px) and (max-height:500px) and (orientation:landscape){
 .studio-page .studio-layout{grid-template-columns:minmax(0,1fr) 260px;grid-template-rows:minmax(0,1fr) 48px}
 .studio-page[data-panel-open=false] .studio-layout{grid-template-columns:minmax(0,1fr) 0;grid-template-rows:minmax(0,1fr) 48px}
 .studio-page .studio-inspector{grid-column:2;grid-row:1 / -1;height:100%;border-left:1px solid #d1d9ce}
 .studio-page .workspace-rail{grid-column:1;grid-row:2}
 .studio-page .studio-preview{grid-column:1;grid-row:1}
 .studio-page .studio-decor-tools{grid-template-columns:repeat(2,minmax(0,1fr))}
}
