/* V7: stable canvas, local view presets, contextual tools. */
:root { --red:#c53724; }
.toast { pointer-events:none; }
.canvas-toolbar { position:relative; flex-wrap:nowrap; z-index:5; }
#edit-view { display:none; }
.view-toggle { border:0; padding:0; }
.view-toggle #preview-view { border:1px solid #ccd0c8; min-height:40px; font-weight:700; color:#252b25; background:white; }
.view-toggle #preview-view[aria-pressed=true] { color:white; background:#252b25; }
.preview-controls { margin-left:auto; }
.history-tools { border:0; }
.mobile-zoom { display:inline-flex; min-height:40px; font-size:13px; gap:6px; padding:8px 11px; border:1px solid #ccd0c8; }
.zoom-tools { display:none; position:absolute; right:0; top:48px; z-index:10; background:white; border:1px solid var(--line); border-radius:9px; box-shadow:0 8px 32px #1d271a20; padding:12px; gap:6px; }
.zoom-tools-open .zoom-tools { display:flex; }
.zoom-tools > button { min-height:40px; }
.boundary-info { width:34px; height:40px; min-height:40px; padding:7px; color:#66715f; }
.preview-caption { display:none!important; }
.preview-body { margin-top:8px; }
.canvas-holder { right:96px; }
.garment-canvas,.ink-window,.review-ink { overflow:clip; }
.side-switcher { left:auto; right:0; width:78px; }
.side-switcher button { min-height:98px; background:#fff; }
.side-switcher [aria-pressed=true] { background:#f3f5ef; }
.view-tag { display:none; }
.product-bar { padding:18px 24px 15px; }
.product-topline > strong { font-size:19px; }
#change-product,#details { border:1px solid #cbd0c6; border-radius:6px; padding:6px 10px; min-height:34px; font-size:12px; text-decoration:none; background:#fff!important; }
#change-product:hover,#details:hover { border-color:#57654e; background:#f2f4ed!important; }
.product-bar > span { font-size:13px; }
.product-bottomline { margin-top:9px; }
.tool-nav { height:55px; display:flex; padding:0 20px; gap:6px; }
.tool-nav button { flex-direction:row; flex:1; min-height:55px; font-size:13px; padding:8px; gap:7px; }
.tool-nav button .icon { width:18px; height:18px; }
.tool-nav .layers-nav { flex:0 0 auto; margin-left:auto; font-size:12px; }
.tool-nav .layers-nav .icon { width:17px; }
.tool-nav [aria-pressed=true]:after { left:7px; right:7px; height:3px; }
.sheet-heading { padding:22px 24px 15px; min-height:66px; }
.sheet-heading .eyebrow { display:none; }
.sheet-heading h1 { font-size:23px; margin:0; letter-spacing:-.4px; }
.panel-body { padding-inline:24px; }
.muted { font-size:14px; line-height:1.6; margin-bottom:20px; max-width:360px; }
.start-options { gap:12px; }
.start-options button { min-height:80px; border-radius:8px; }
.start-options strong { font-size:16px; }
.start-options small { font-size:12px; }
.swatches { grid-template-columns:repeat(8,minmax(0,1fr)); gap:4px; }
.swatches button { width:100%; max-width:48px; justify-self:start; }
.swatches i { width:30px; height:30px; }
.color-caption { font-size:14px; }
.add-another { min-height:34px; font-size:12px; padding:6px 9px; margin-left:auto; background:#fff; }
.action-bar { padding:14px 24px; min-height:82px; justify-content:flex-end; gap:18px; }
.footer-guidance strong { display:none; }
.footer-guidance > span { margin:0; font-size:13px; }
.main-action { width:calc(var(--panel) - 48px); max-width:540px; min-height:54px; box-shadow:0 3px 8px #a72c181d; font-size:17px; }
.mobile-tool-strip { display:none; }
.product-dialog { width:min(1020px,calc(100% - 48px)); }
.detail-layout { display:grid; grid-template-columns:1.15fr 1fr; gap:30px; align-items:start; }
.detail-gallery > img { width:100%; aspect-ratio:1; object-fit:contain; display:block; border:1px solid #eceee7; border-radius:8px; }
.detail-thumbs { display:grid; grid-template-columns:repeat(6,minmax(0,1fr)); gap:5px; margin-top:10px; }
.detail-thumbs button { padding:2px; min-height:44px; border-radius:4px; }
.detail-thumbs button[aria-pressed=true] { border-color:#273222; box-shadow:0 0 0 1px #273222; }
.detail-thumbs img { width:100%; aspect-ratio:1; object-fit:contain; }
.detail-copy h3 { font-size:24px; margin:7px 0 15px; letter-spacing:-.5px; }
.detail-copy .facts { grid-template-columns:1fr; gap:14px; margin-bottom:20px; }
.detail-copy .facts > div { display:flex; justify-content:space-between; gap:12px; font-size:14px; }
.detail-copy .facts small { margin:0; font-size:10px; }
.detail-copy details { margin-top:24px; font-size:14px; }
.detail-copy summary { cursor:pointer; font-weight:700; }
.catalog-dialog { width:min(830px,calc(100% - 40px)); }
.style-card[aria-current=true] { border:2px solid #3c4a35; background:#f8f9f4; }
.style-image { position:relative; }
.style-image span { position:absolute; left:8px; top:8px; font-size:11px; background:#263024; color:white; padding:5px 7px; border-radius:4px; }
.style-select { display:flex; align-items:center; justify-content:space-between; margin-top:10px; font-size:13px; border-top:1px solid var(--line); padding-top:10px; }
.style-select .icon { width:17px; }
@media(min-width:901px) {
 .control-panel .product-bar,.sheet-heading { padding-inline:24px; }
 .sheet-heading h1 { font-size:23px; }
 .panel-body { padding-inline:24px; }
 .preview-pane { padding:13px 22px 16px; }
 .tool-sheet { min-height:0; }
 .side-switcher { top:45%; }
}
@media(max-width:900px) {
 .studio-main { position:relative; padding-bottom:58px; }
 .studio-header { height:58px; }
 .preview-pane { padding:5px 10px 6px; min-height:0; }
 .canvas-toolbar { gap:3px; }
 .preview-controls { gap:2px; }
 .view-toggle #preview-view { min-height:38px; font-size:12px; padding:6px 9px; }
 .mobile-zoom { font-size:12px; min-height:38px; padding:6px 7px; }
 .history-tools .icon-button { min-height:38px; width:30px; }
 .boundary-info { width:30px; min-height:38px; height:38px; }
 .zoom-tools { top:44px; flex-wrap:wrap; padding:10px; left:0; }
 .zoom-tools > button { padding:7px 8px; font-size:11px; }
 .preview-body { margin-top:2px; padding:0; }
 .canvas-holder { inset:0 0 45px; }
 .garment-canvas { width:100%; height:100%; }
 .side-switcher { right:auto; left:50%; top:auto; bottom:0; width:auto; gap:8px; }
 .side-switcher button { min-height:38px; min-width:99px; padding:5px 13px; font-size:12px; }
 .side-switcher img { width:22px; height:26px; }
 .controls-wrap { position:absolute; left:0; right:0; bottom:0; border:0; background:transparent; box-shadow:none; z-index:7; }
 #desktop-tools { display:none; }
 .mobile-tool-strip { display:flex; height:58px; background:#fff; border-top:1px solid var(--line); padding:3px 8px; gap:4px; order:2; }
 .mobile-tool-strip button { flex:1; min-width:0; border:0; border-radius:5px; padding:5px 3px; min-height:50px; font-size:11px; flex-direction:column; gap:3px; background:#fff; }
 .mobile-tool-strip .icon { width:19px; height:19px; }
 #mobile-context button { font-size:11px; }
 .font-symbol { font:700 20px/20px Georgia,serif; height:20px; }
 #mobile-context #mobile-done { background:#263024; color:white; flex-direction:row; margin:3px 0; min-height:44px; }
 body[data-selected=true] #mobile-context [data-mobile-tab=content] { font-size:12px; }
 body[data-editor-tab=content] [data-mobile-tab=content],body[data-editor-tab=style] [data-mobile-tab=style],body[data-editor-tab=position] [data-mobile-tab=position] { background:#eef1e7; }
 body[data-selected=true][data-panel=editor] .editor-tabs, .position-entry { display:none!important; }
 .tool-sheet { position:absolute; bottom:58px; left:0; right:0; background:#fafaf8; border-top:1px solid #cfd5c8; border-radius:14px 14px 0 0; box-shadow:0 -8px 28px #1b291313; height:250px; max-height:46dvh; }
 body[data-sheet=false] .tool-sheet { display:none; }
 .sheet-heading { min-height:52px; padding:11px 16px 9px; }
 .sheet-heading h1 { font-size:18px; }
 .sheet-heading #collapse-sheet { display:flex; width:36px; min-height:38px; transform:rotate(0); margin:0; }
 .sheet-heading #collapse-sheet .icon { transform:none; }
 .sheet-heading #add-another { display:none; }
 .editor-actions { grid-template-columns:repeat(3,minmax(0,1fr)); }
 .editor-actions #done-editing { display:none; }
 .panel-body { padding:0 16px 15px; }
 .editor-actions { padding:6px 12px; }
 .editor-actions button { min-height:40px; }
 body[data-panel=editor] .tool-sheet { height:264px; }
 body[data-panel=editor][data-editor-tab=position] .tool-sheet { height:212px; }
 body[data-panel=text] .tool-sheet { height:278px; }
 body[data-panel=upload] .tool-sheet { height:285px; }
 body[data-panel=product] .tool-sheet { height:252px; }
 body[data-panel=layers] .tool-sheet { height:280px; }
 .selection-handle,body:not(.positioning) .selection-handle { display:block; width:48px; height:48px; min-height:48px; right:-24px; bottom:-24px; }
 .selection-handle:after { width:14px; height:14px; left:17px; top:17px; border-radius:3px; box-shadow:0 1px 4px #0003; }
 .selection-box { outline-width:1.5px; }
 .swatches { grid-template-columns:repeat(8,minmax(0,1fr)); gap:1px; }
 .swatches i { width:27px; height:27px; }
 .swatches button { min-height:42px; height:42px; }
 .action-bar { min-height:68px; padding:8px 14px max(8px,env(safe-area-inset-bottom)); gap:12px; }
 .main-action { width:auto; min-height:50px; font-size:15px; max-width:none; }
 .mobile-next { width:104px; font-size:11px; }
 body.preview-clean .studio-main { padding-bottom:0; }
 body.preview-clean .controls-wrap { display:none; }
 body[data-step=sizes] .studio-main,body[data-step=review] .studio-main { padding-bottom:0; }
 body[data-step=sizes] .controls-wrap,body[data-step=review] .controls-wrap { position:relative; bottom:auto; flex:1; }
 body[data-step=sizes] .tool-sheet,body[data-step=review] .tool-sheet { position:relative; bottom:auto; height:auto; flex:1; max-height:none; box-shadow:none; border-radius:0; }
 body[data-step=sizes] .sheet-heading h1,body[data-step=review] .sheet-heading h1 { font-size:23px; }
 body[data-step=sizes] .sheet-heading,body[data-step=review] .sheet-heading { padding:20px 16px; }
 body.keyboard-open .studio-main { padding-bottom:0; }
 body.keyboard-open .controls-wrap { position:relative; min-height:0; flex:1; }
 body.keyboard-open .mobile-tool-strip { display:none; }
 body.keyboard-open .tool-sheet { position:relative; bottom:auto; max-height:none; height:auto; flex:1; }
 .product-dialog { width:calc(100% - 20px); padding:17px; }
 .detail-layout { display:block; }
 .detail-gallery > img { max-height:42dvh; }
 .detail-copy { margin-top:22px; }
 .detail-copy h3 { font-size:21px; }
 .detail-copy .facts { grid-template-columns:repeat(3,minmax(0,1fr)); }
 .detail-copy .facts > div { display:block; font-size:12px; }
 .detail-copy .facts small { margin-bottom:4px; }
 .catalog-dialog { width:calc(100% - 20px); }
}
