@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;450;500;550;600;650;700&family=Manrope:wght@400;500;600;650;700;750;800&display=swap');
:root{--page:#f6f5f1;--panel:#fffefa;--stage:#e9e8e2;--ink:#263d34;--muted:#60685f;--line:#dedfd5;--accent:#b84724;--accent-light:#f9ede6;--focus:#934122;--radius:12px;--s1:4px;--s2:8px;--s3:12px;--s4:16px;--s5:24px;--s6:32px;--s7:48px;font-family:'DM Sans',sans-serif;font-size:14px;color:var(--ink);background:var(--page)}
*{box-sizing:border-box}body{margin:0}button,input,select{font:inherit}button,a,input,select{-webkit-tap-highlight-color:transparent}button{cursor:pointer}button:disabled{cursor:default;opacity:.35}button{color:inherit}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,#scene:focus-visible{outline:2px solid var(--focus);outline-offset:4px}button{transition:background .15s,color .15s,transform .15s}button:hover:not(:disabled){filter:brightness(.97)}svg{width:20px;height:20px;display:block;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}button span[data-icon]{display:inline-flex;flex-shrink:0}button{border:0}a{color:inherit}h1,h2,h3,p{margin:0}h2,h3{font-family:'Manrope',sans-serif}input[type=color]{appearance:none;padding:0;border:0;cursor:pointer;background:none}input[type=color]::-webkit-color-swatch-wrapper{padding:0}input[type=color]::-webkit-color-swatch{border:1px solid #0002;border-radius:8px}input[type=range]{width:100%;height:4px;accent-color:var(--ink);cursor:pointer;margin:14px 0 8px}input[type=checkbox]{accent-color:var(--ink);width:17px;height:17px;cursor:pointer}select{max-width:100%;border:1px solid var(--line);background:var(--panel);border-radius:7px;padding:9px;color:var(--ink)}
.app-header{height:83px;border-bottom:1px solid var(--line);padding:0 40px;display:flex;align-items:center;justify-content:space-between;background:var(--panel);gap:16px}.brand{display:flex;align-items:center;gap:10px;text-decoration:none;direction:ltr;color:#000;flex-shrink:0}.brand-wordmark{display:flex;flex-direction:column;align-items:flex-start;gap:2px;font-family:Arial,sans-serif;font-style:italic;line-height:.95}.brand-tama{font-size:28px;font-weight:400;letter-spacing:2px}.brand-studio{font-family:"Arial Black",Arial,sans-serif;font-size:21px;font-weight:900;letter-spacing:-.7px}.brand-illustration{width:52px;height:52px;stroke:none;fill:none;mix-blend-mode:multiply;flex-shrink:0}.header-center{font-size:12px;color:var(--muted);display:flex;gap:8px;align-items:center}.live-dot{width:5px;height:5px;background:var(--accent);border-radius:50%}.button{min-height:39px;border:1px solid var(--line);border-radius:8px;padding:9px 14px;background:var(--panel);display:inline-flex;align-items:center;justify-content:center;gap:8px;font-size:12px;font-weight:550;white-space:nowrap}.button svg{width:16px;height:16px}.button.primary{background:var(--ink);color:white;border-color:var(--ink)}.button.subtle{border-color:transparent;background:transparent}.small-button{font-size:12px;display:inline-flex;align-items:center;justify-content:center;gap:6px;padding:7px 10px;border:1px solid transparent;border-radius:6px;background:transparent;white-space:nowrap}.small-button svg{width:14px;height:14px}.small-button[aria-pressed=true]{background:var(--ink);color:white}
main{max-width:1680px;margin:0 auto;padding:0 40px}.project-bar{height:84px;display:flex;justify-content:space-between;align-items:center;gap:16px;position:relative;z-index:15}.eyebrow{font-size:12px;font-weight:650;letter-spacing:1.8px;line-height:1.6;color:var(--muted)}.project-title{display:flex;align-items:center;gap:6px;min-width:0}.project-title input{background:transparent;border:0;padding:2px 0;font-family:Manrope,sans-serif;font-size:22px;font-weight:650;letter-spacing:-.6px;width:280px;max-width:100%;min-width:0;color:var(--ink)}.project-title svg{width:13px;height:13px;color:var(--muted)}.project-actions{display:flex;flex-direction:column;gap:8px;position:absolute;top:calc(100% + 8px);right:0;width:280px;max-width:calc(100vw - 24px);padding:12px;background:var(--panel);border:1px solid var(--control-border);border-radius:10px;box-shadow:0 8px 28px #263d3426;max-height:calc(100dvh - 72px);overflow:auto}.save-status{display:block;font-size:12px;line-height:1.5;color:var(--muted);margin-top:3px;max-width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.save-status:before{content:'';display:inline-block;width:5px;height:5px;background:#63806a;border-radius:50%;margin-right:6px}
.studio{display:grid;grid-template-columns:70px minmax(0,1fr) 304px;min-height:695px;border:1px solid var(--line);border-radius:var(--radius);background:var(--panel);overflow:hidden}.tool-rail{grid-column:1;grid-row:1 / 3;padding:16px 4px;display:flex;flex-direction:column;justify-content:space-between;border-right:1px solid var(--line)}.tool-group{display:flex;align-items:center;flex-direction:column;gap:8px}.tool{padding:8px 2px;width:54px;min-height:76px;border-radius:7px;background:transparent;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;font-size:12px;line-height:1.3;color:var(--muted)}.tool>span:last-child{max-width:100%;text-align:center;white-space:normal}.tool svg{width:21px;height:21px}.tool.active{background:var(--ink);color:var(--panel)}.rail-divider{height:1px;background:var(--line);width:25px;margin:5px 0}.icon-button{width:32px;height:32px;display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;background:transparent;border-radius:6px}.icon-button svg{width:17px;height:17px}.preview-top-left{display:flex;align-items:center;gap:12px;min-width:0}.preview-top-left .history-group{display:flex;flex-direction:row;gap:2px;margin:0;padding:2px;border:1px solid #ffffffb0;border-radius:8px;background:#f9f9f0d9}.preview-top-left .history-group .icon-button{width:40px;height:40px}.preview-top-left .view-label{white-space:nowrap}.workspace{grid-column:2;grid-row:1;min-width:0;min-height:0;display:flex;flex-direction:column}.stage{min-height:0;flex:1;position:relative;background:radial-gradient(ellipse at 48% 40%,#f4f3ed 0%,var(--stage) 75%);overflow:hidden}.stage-top{position:absolute;left:16px;right:16px;top:12px;display:flex;justify-content:space-between;align-items:center;gap:8px;z-index:2;pointer-events:none}.stage-top button{pointer-events:auto}.view-label{display:flex;align-items:center;gap:6px;font-size:10px;letter-spacing:1px;font-weight:600;color:var(--muted)}.view-label i{width:5px;height:5px;background:#718578;border-radius:50%}#scene{position:absolute;inset:0;touch-action:none}#scene canvas{display:block;width:100%;height:100%;outline:none}.scene-loading{display:grid;place-items:center;height:100%;color:var(--muted);font-size:12px}.scene-error{max-width:350px;margin:auto;padding:80px 20px;line-height:1.7;font-size:13px;position:relative;z-index:3}.stage-meta{position:absolute;left:20px;top:72px;display:flex;align-items:center;gap:8px;font-size:12px;color:var(--muted);pointer-events:none}.meta-line{height:9px;width:1px;background:#a9afa4}.stage-bottom{position:absolute;left:16px;right:16px;bottom:12px;display:flex;justify-content:space-between;align-items:center;gap:8px;pointer-events:none}.stage-bottom>div{pointer-events:auto}.view-buttons{display:flex;padding:3px;border:1px solid #ffffffb0;background:#f9f9f087;border-radius:7px;backdrop-filter:blur(10px)}.view-buttons button{min-height:36px;background:transparent;padding:6px 12px;font-size:13px;border-radius:4px;color:var(--muted)}.view-buttons button.selected{background:var(--panel);color:var(--ink);box-shadow:0 1px 3px #00000008}.zoom-buttons{display:flex;background:#faf9f180;border:1px solid #fff9;border-radius:6px}.zoom-buttons .icon-button{width:36px;height:36px}.interaction-bar{flex-shrink:0;min-height:48px;display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;padding:4px 16px;border-bottom:1px solid var(--line);gap:8px;color:var(--muted);font-size:12px}.interaction-bar #tool-hint{display:flex;align-items:center;gap:7px}.interaction-bar svg{height:13px;width:13px}.hint-dot{color:#adb1a7;padding:0 2px}.texture-section{grid-column:2;grid-row:2;min-width:0;padding:0;background:var(--panel)}.texture-heading{display:flex;justify-content:space-between;align-items:center;gap:16px;padding:12px 16px;min-height:56px;cursor:pointer;list-style:none}.texture-heading .eyebrow{font-size:12px;letter-spacing:1.5px}.texture-heading h2{font-size:13px;font-weight:650;margin-top:3px;letter-spacing:-.2px}.texture-size{font-size:12px;color:var(--muted)}.texture-canvas-wrap{height:auto;aspect-ratio:4;border:1px solid var(--line);border-radius:5px;position:relative;overflow:hidden}.texture-canvas-wrap canvas{width:100%;height:100%;display:block}.texture-seam{position:absolute;left:5px;bottom:5px;font-size:12px;letter-spacing:1px;background:#fff9;border-radius:2px;padding:3px 4px;color:#455147}.texture-labels{display:flex;justify-content:space-between;color:var(--muted);font-size:12px;margin-top:7px}
.inspector{border-left:1px solid var(--line);display:flex;flex-direction:column;min-width:0}.inspector-tabs{display:flex;flex-shrink:0;border-bottom:1px solid var(--line);padding:0 12px;gap:0;min-height:52px;background:var(--panel)}.inspector-tabs button{flex:1;min-width:0;font-size:14px;min-height:48px;padding:12px 4px;background:transparent;border-bottom:2px solid transparent;color:var(--muted)}.inspector-tabs button[aria-selected=true]{border-bottom-color:var(--accent);color:var(--ink);font-weight:650}#settings-panel{padding:16px;flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#a6afa0 transparent}.panel-heading{font-size:17px;font-weight:650;letter-spacing:-.5px;margin-bottom:5px}.panel-description{font-size:12px;line-height:1.7;color:var(--muted);margin-bottom:21px}.control-group{margin-bottom:22px}.control-group:last-child{margin-bottom:0}.control-label{display:flex;justify-content:space-between;align-items:center;font-size:14px;font-weight:600;margin-bottom:10px;gap:8px}.control-label output,.value{font-weight:400;font-size:12px;color:var(--muted)}.segmented{display:flex;border:1px solid var(--line);padding:3px;border-radius:7px;gap:3px}.segmented button{flex:1;min-width:0;padding:8px 5px;min-height:36px;background:transparent;border-radius:4px;font-size:13px;color:var(--muted)}.segmented button.selected{background:var(--ink);color:white}.color-pair{display:grid;grid-template-columns:1fr 1fr;gap:10px}.color-field{border:1px solid var(--line);border-radius:7px;padding:9px;display:flex;align-items:center;gap:8px;min-width:0}.color-field input{width:29px;height:30px;flex-shrink:0}.color-field label{font-size:12px;display:block;line-height:1.5}.color-field code{font-family:inherit;font-size:12px;color:var(--muted);text-transform:uppercase}.swatches{display:flex;gap:7px;margin-top:12px}.swatch{width:20px;height:20px;border-radius:50%;padding:0;border:1px solid #0002;position:relative}.swatch.selected:after{position:absolute;content:'';inset:-4px;border:1px solid var(--ink);border-radius:50%}.range-labels{display:flex;justify-content:space-between;font-size:12px;color:var(--muted);margin-top:3px}.divider{border:0;border-top:1px solid var(--line);margin:22px 0}.presets{display:flex;gap:9px}.preset{flex:1;display:flex;flex-direction:column;align-items:center;gap:7px;padding:8px 4px;background:transparent;border:1px solid var(--line);border-radius:7px;font-size:12px}.preset-ball{width:29px;height:29px;border-radius:50%;box-shadow:inset -5px -4px 9px #0001}.inspector-footer{display:none}.inspector-footer svg{width:25px;height:25px;color:#8e937e}.inspector-footer p{font-size:12px;color:var(--muted);line-height:1.6}.inspector-footer strong{color:var(--ink);font-weight:500}.inline-label{display:flex;align-items:center;justify-content:space-between;gap:12px;font-size:14px}.text-input{width:100%;max-width:100%;min-width:0;padding:10px 11px;border:1px solid var(--control-border);border-radius:6px;background:white;color:var(--ink);font-size:14px}.field-hint{font-size:12px;line-height:1.6;color:var(--muted);margin-top:9px}.drop-zone{border:1px dashed #99a092;border-radius:9px;padding:25px 12px;display:flex;flex-direction:column;align-items:center;text-align:center;gap:9px;background:#f7f7ef;width:100%;margin-bottom:15px}.drop-zone.dragover{background:var(--accent-light);border-color:var(--accent)}.drop-zone>svg{width:27px;height:27px;color:#697b68}.drop-zone strong{font-size:12px;font-weight:550}.drop-zone small{font-size:12px;color:var(--muted);line-height:1.7}.file-info{display:flex;align-items:center;gap:8px;padding:9px;background:#edf1e7;border-radius:6px;margin-bottom:18px}.file-info span{font-size:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1}.full-width{width:100%}.danger-link{font-size:12px;color:#a4422d;padding:0;background:transparent;text-decoration:underline;text-underline-offset:3px}.dimension-control{display:flex;align-items:center;gap:8px}.dimension-control input{width:70px}.dimension-control span{font-size:12px;color:var(--muted)}.text-stack{display:flex;flex-direction:column;gap:10px}.page-footer{display:flex;justify-content:space-between;gap:15px;padding:12px 0;color:var(--muted);font-size:11px;line-height:1.6}.page-footer>span:first-child{letter-spacing:.2px}.footer-sep{padding:0 8px;color:#a5aaa0}#toast{position:fixed;bottom:26px;left:50%;transform:translate(-50%,20px);max-width:min(480px,90vw);background:var(--ink);color:white;padding:12px 18px;border-radius:9px;z-index:20;font-size:12px;line-height:1.6;box-shadow:0 4px 22px #0002;opacity:0;pointer-events:none;transition:.2s}#toast.visible{opacity:1;transform:translate(-50%,0)}
dialog{border:1px solid var(--line);border-radius:16px;background:var(--panel);padding:28px;width:min(440px,calc(100% - 32px));color:var(--ink);box-shadow:0 20px 80px #0002;max-height:90vh;overflow:auto}dialog::backdrop{background:#17261f70;backdrop-filter:blur(4px)}.dialog-top{display:flex;justify-content:space-between;align-items:center;margin-bottom:14px}dialog h2{font-size:25px;letter-spacing:-1px;margin-bottom:12px}dialog>p{font-size:12px;color:var(--muted);line-height:1.8;margin-bottom:22px}.export-option{width:100%;display:flex;align-items:center;text-align:left;gap:12px;border:1px solid var(--control-border);border-radius:8px;background:var(--panel);padding:12px;margin-top:10px}.export-option>span:nth-child(2){flex:1;min-width:0}.export-option strong{display:block;font-weight:650;font-size:14px}.export-option small{display:block;color:var(--muted);font-size:12px;line-height:1.5;margin-top:5px}dialog .fine-print{font-size:12px;line-height:1.8;margin:20px 0 0}.help-steps{padding-left:20px;margin:20px 0}.help-steps li{padding:0 0 15px 5px;font-size:12px}.help-steps strong,.help-steps span{display:block;line-height:1.8}.help-steps span{color:var(--muted);font-size:12px}.help-tip{font-size:12px;line-height:1.8;background:#eff1e9;padding:13px;border-radius:7px}




.inspiration-section{grid-column:1/-1;border:1px solid var(--line);border-radius:9px;padding:14px;background:#f4f5ed;min-width:0}.inspiration-section>.control-label{flex-wrap:wrap}.inspiration-section #get-inspired{min-height:42px}.inspiration-idea{display:flex;align-items:center;gap:11px;min-height:78px;padding:12px 0 7px}.inspiration-idea>div:last-child{min-width:0}.inspiration-idea strong{font-size:12px;font-weight:650;line-height:1.5;display:block;overflow-wrap:anywhere}.inspiration-idea p{font-size:12px;line-height:1.5;color:var(--muted);margin-top:3px}.inspiration-ball{width:43px;height:43px;border-radius:50%;overflow:hidden;display:flex;flex-direction:column;flex-shrink:0;position:relative;transform:rotate(-15deg)}.inspiration-ball:after{content:'';position:absolute;inset:0;border-radius:50%;box-shadow:inset -5px -5px 10px #0002,inset 3px 3px 6px #fff3}.inspiration-ball span{min-height:0}.inspiration-navigation{display:flex;justify-content:space-between;gap:8px;margin-top:10px}.inspiration-navigation button{flex:1;min-height:34px;border-color:var(--line);background:var(--panel);font-size:12px;padding:7px}.inspiration-status{font-size:12px;color:var(--muted);text-align:center;line-height:1.6;margin-top:8px;font-variant-numeric:tabular-nums}.inspiration-restore{font-size:12px;text-decoration:underline;text-underline-offset:3px;width:100%}.inspiration-section .presets{margin-top:14px}.inspiration-section .preset{background:var(--panel)}.inspiration-section .field-hint{font-size:12px;line-height:1.6}
.inspiration-options{margin-bottom:13px}.inspiration-layer-label{display:flex;align-items:center;justify-content:space-between;gap:12px;font-size:12px;margin-bottom:10px}.inspiration-layer-label select{width:110px;min-width:0;min-height:35px;font-size:12px;padding:7px 9px}.inspiration-options .inline-label{font-size:12px}.inspiration-color-field{margin-top:10px;background:var(--panel)}.inspiration-options .field-hint{margin-top:7px}.band-order .band-remove{font-size:12px;min-height:32px;padding:4px 6px;color:#9e442e;border-color:var(--control-border)}.band-order .band-remove:disabled{color:var(--muted)}.band-card-head{gap:6px}
.band-editor{margin-bottom:24px;grid-column:1/-1}
.artwork-builder,.artwork-stack,.artwork-editor,.artwork-template{grid-column:1/-1;min-width:0}
.artwork-builder{padding:0;border:0;background:transparent}
#artwork-preset{font-size:12px;min-height:40px}
#artwork-preset-preview{display:block;width:100%;height:auto;aspect-ratio:4;margin:12px 0;border:1px solid var(--line);border-radius:5px;background:var(--panel)}
.artwork-builder .drop-zone{margin:12px 0 0;padding:17px 10px}
.artwork-builder .field-hint{margin-bottom:0}
.artwork-builder #artwork-preset-description{margin:0 0 12px}
.artwork-order-hint{margin:var(--s3) 0 var(--s2)}
.layers-heading{display:flex;align-items:center;justify-content:space-between;gap:var(--s2);margin-bottom:var(--s3);min-width:0}
.layers-heading .panel-heading{margin:0}
.layers-heading h3,.artwork-editor h3{font-size:14px;font-weight:700;line-height:1.5;overflow-wrap:anywhere}
.layers-heading .value{flex-shrink:0}
#add-design-layer{min-height:44px}
.layer-add-chooser{grid-column:1/-1;min-width:0;border:1px solid var(--control-border);border-radius:8px;padding:var(--s3);margin-bottom:var(--s4)}
.layer-add-chooser .layers-heading{margin-bottom:0}
.layer-add-chooser .layers-heading .small-button{min-height:44px}
.layer-type-choices{display:flex;flex-direction:column;gap:var(--s2);margin:var(--s3) 0 var(--s4)}
.layer-type-choices .button{justify-content:flex-start;min-height:44px;white-space:normal;text-align:start;border-color:var(--control-border)}
.layer-type-choices .button svg{flex-shrink:0}
.layer-type-choices .button[aria-pressed=true]{background:var(--ink);color:var(--panel);border-color:var(--ink)}
.design-panel-options{margin-top:var(--s4)}
.artwork-list{border:1px solid var(--line);border-radius:8px;overflow:hidden}
.artwork-row{display:flex;align-items:center;gap:6px;padding:6px;border-bottom:1px solid var(--line);min-width:0}
.artwork-row:last-child{border-bottom:0}
.artwork-row.selected{background:#eaf0e4;box-shadow:inset 3px 0 var(--ink)}
.artwork-row>input{flex-shrink:0;margin:0 3px}
.artwork-select{display:flex;align-items:center;gap:8px;flex:1;min-width:0;min-height:44px;background:transparent;padding:6px 0;text-align:start;border-radius:4px}
.artwork-select canvas{width:44px;height:32px;object-fit:contain;flex-shrink:0;border:1px solid #0001;border-radius:3px;background:repeating-conic-gradient(#e8e9e1 0% 25%,#fffefa 0% 50%) 0 0/10px 10px}
.artwork-select>span{font-size:12px;line-height:1.5;min-width:0;overflow-wrap:anywhere}
.artwork-select small{display:block;font-size:12px;color:var(--muted)}
.artwork-order{display:flex;flex-direction:column}
.artwork-order .icon-button{width:32px;height:36px;font-size:15px}
.artwork-row .artwork-delete{width:36px;height:44px;color:#a4422d}
.artwork-row button:focus-visible{outline-offset:-2px}
.artwork-editor{padding:var(--s3);border:1px solid var(--line);border-radius:8px}
.artwork-editor h3{margin-bottom:var(--s4);outline:none}
.artwork-editor>.empty-state{margin-bottom:var(--s4)}
.artwork-stack .empty-state{padding:var(--s4) 0;line-height:1.7}
.artwork-editor>.text-input{font-size:12px}
.artwork-editor .control-group:last-of-type{margin-bottom:12px}
.artwork-actions{display:flex;justify-content:space-between;gap:8px;margin:9px 0 18px}
.artwork-actions .small-button{border-color:var(--control-border);min-height:44px;white-space:normal;text-decoration:none}
.artwork-replace{margin-bottom:4px}
.artwork-replace+.field-hint{margin-bottom:20px}
/* Native inspector disclosures keep related controls together at every width. */
.inspector-overview,.inspector-guide,.section-actions,.inspector-section{grid-column:1/-1;min-width:0}
.inspector-overview{margin-bottom:16px}
.inspector-overview h2{font-size:17px;font-weight:650;line-height:1.4;letter-spacing:-.5px;margin-bottom:5px}
.inspector-overview p{margin:0;font-size:12px;line-height:1.6;color:var(--muted);overflow-wrap:anywhere}
.inspector-guide{margin-bottom:12px;border:1px solid var(--line);border-radius:9px;background:#f4f5ed}
.inspector-guide>summary{display:grid;grid-template-columns:minmax(0,1fr) 12px;gap:12px;align-items:center;min-height:44px;padding:12px 14px;font-size:12px;font-weight:600;line-height:1.6;cursor:pointer;overflow-wrap:anywhere;border-radius:8px;list-style:none}
.inspector-guide>summary::-webkit-details-marker{display:none}
.inspector-guide>summary::marker{content:''}
.inspector-guide>p,.inspector-guide>ol,.inspector-guide>ul{font-size:12px;line-height:1.6;color:var(--muted);margin:0 14px 12px;overflow-wrap:anywhere}
.inspector-guide>ol,.inspector-guide>ul{padding-left:18px}
.guide-links{display:flex;flex-wrap:wrap;gap:8px;padding:0 14px 14px}
.guide-links button{min-height:36px;max-width:100%;padding:8px 10px;border:1px solid var(--line);border-radius:6px;background:var(--panel);font-size:12px;line-height:1.5;text-align:left;white-space:normal;overflow-wrap:anywhere}
.guide-links button strong,.guide-links button span{display:block}
.guide-links button strong{font-weight:600}
.guide-links button span{margin-top:3px;font-size:12px;font-weight:400;color:var(--muted)}
.section-actions{display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:4px;margin-bottom:12px}
.tips-toggle{display:inline-flex;align-items:center;gap:6px;min-height:36px;max-width:100%;margin-right:auto;font-size:12px;line-height:1.5;color:var(--muted);cursor:pointer}
.tips-toggle input[type=checkbox]{width:16px;height:16px;margin:0;flex-shrink:0}
.section-actions button{min-height:36px;max-width:100%;padding:8px;font-size:12px;line-height:1.5;color:var(--muted);background:transparent;border-radius:6px;white-space:normal}
.section-actions button:hover:not(:disabled){color:var(--ink);background:#eff1e9}
.inspector-section{margin-bottom:12px;border:1px solid var(--line);border-radius:9px;background:var(--panel)}
.inspector-section:last-child{margin-bottom:0}
.inspector-section>summary{display:grid;grid-template-columns:minmax(0,1fr) 12px;column-gap:12px;row-gap:5px;align-items:center;min-height:44px;padding:14px;list-style:none;cursor:pointer;border-radius:8px}
.inspector-section>summary::-webkit-details-marker{display:none}
.inspector-section>summary::marker{content:''}
.inspector-section[open]>summary{background:#f4f5ed;border-bottom:1px solid var(--line);border-radius:8px 8px 0 0}
.inspector-section>summary:focus-visible,.inspector-guide>summary:focus-visible{outline:2px solid var(--focus);outline-offset:2px}
.section-heading{grid-column:1;grid-row:1;min-width:0}
.section-title{display:block;font-family:'Manrope',sans-serif;font-size:12px;font-weight:700;line-height:1.5;overflow-wrap:anywhere}
.section-description{display:none;margin-top:3px;font-size:12px;font-weight:400;line-height:1.5;color:var(--muted);overflow-wrap:anywhere}
.inspector-section[open]>summary .section-description,.inspector-section>summary:focus-visible .section-description{display:block}

body.tips-hidden #settings-panel :is(.field-hint,.panel-description,.wood-description,.inspector-guide,.section-description):not(.empty-state):not(.tool-instructions):not(.file-requirements){display:none}
.section-status{display:block;grid-column:1;min-width:0;max-width:100%;font-size:12px;font-weight:500;line-height:1.5;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.section-heading>.section-status{margin-top:5px}
.section-chevron{grid-column:2;grid-row:1;justify-self:center;align-self:center;display:block;width:8px;height:8px;border-right:1.5px solid currentColor;border-bottom:1.5px solid currentColor;transform:rotate(45deg);transition:transform .15s;color:var(--muted);pointer-events:none}
.inspector-section[open]>summary .section-chevron,.inspector-guide[open]>summary .section-chevron{transform:rotate(225deg)}
.section-content{padding:14px;min-width:0}
.section-content>.inspiration-section,.section-content>.artwork-builder,.section-content>.artwork-editor{padding:0;border:0;border-radius:0;background:transparent}
.section-content>.inspector-section[data-section-id="paint-inspiration"]>summary{padding:12px}
.section-content>.inspector-section[data-section-id="paint-inspiration"]>.section-content{padding:12px 9px}
.section-content>.control-group:last-child,.section-content>.band-editor:last-child,.section-content>.artwork-builder:last-child,.section-content>.artwork-editor:last-child{margin-bottom:0}
.section-content .control-label,.section-content .inline-label{min-width:0;overflow-wrap:anywhere}
.section-content .button{max-width:100%;white-space:normal}
.section-content .wood-control{max-width:none}
.drawing-tools{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:16px}
.drawing-tools .small-button{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:38px;max-width:100%;padding:8px 10px;border:1px solid var(--line);background:var(--panel);font-size:12px;white-space:normal}
.drawing-tools .small-button[aria-pressed=true]{color:var(--panel);background:var(--ink);border-color:var(--ink)}
.drawing-tools svg{width:16px;height:16px;flex-shrink:0}
.pattern-editor{min-width:0;margin-bottom:16px}
.motif-file{display:flex;align-items:center;gap:8px;min-width:0;margin-top:8px}
.motif-file>span{min-width:0;flex:1;overflow-wrap:anywhere;font-size:12px;color:var(--muted)}
.motif-file>.small-button{flex-shrink:0;border:1px solid var(--line)}
.kaleidoscope-controls>.control-label{margin-top:12px}
.pattern-canvas{display:block;width:min(100%,360px);height:auto;aspect-ratio:1;max-width:100%;border:1px solid var(--muted);border-radius:6px;background:repeating-conic-gradient(#f1f1e9 0% 25%,#fffefa 0% 50%) 0 0/16px 16px;touch-action:none;cursor:crosshair}
.pattern-canvas:focus-visible{outline:2px solid var(--focus);outline-offset:3px}
.pattern-drawing-actions{display:flex;flex-wrap:wrap;align-items:center;gap:6px;margin:10px 0 16px}
.pattern-drawing-actions .small-button{border:1px solid var(--line);white-space:normal}
.pattern-drawing-actions>.value{font-size:12px;margin-left:auto}
.generator-preview{display:block;width:100%;height:auto;aspect-ratio:4;max-width:100%;border:1px solid var(--line);border-radius:5px;background:repeating-conic-gradient(#f1f1e9 0% 25%,#fffefa 0% 50%) 0 0/12px 12px}


.splatter-top-view{margin-bottom:18px}
.splatter-add-row{display:flex;align-items:center;justify-content:space-between;gap:8px}
.splatter-add-row .button{min-width:0}
.splatter-layer-hint{margin-bottom:12px}
.splatter-colors>.inspector-section{background:#f8f8f1}
.splatter-colors .section-content{padding:12px 9px}
.splatter-colors .section-title{font-size:12px}
.section-swatch{display:inline-block;vertical-align:middle;width:13px;height:13px;margin-right:7px;border:1px solid #0003;border-radius:50%}
.splatter-colors .section-description{font-variant-numeric:tabular-nums}
.splatter-layer-actions{display:flex;flex-wrap:wrap;align-items:center;gap:6px;margin-top:12px}
.splatter-layer-actions .danger-link{margin-left:auto;text-decoration:none;border:1px solid var(--line);padding:7px}
.splatter-layer-actions .icon-button{border:1px solid var(--line)}


.detail-section{grid-column:1/-1;min-width:0}.asset-preview{display:flex;align-items:center;gap:8px;padding:9px;border:1px solid var(--line);border-radius:8px;margin-bottom:10px;min-width:0}.asset-preview img,.sticker-select img{width:42px;height:42px;object-fit:contain;background:repeating-conic-gradient(#eee 0% 25%,white 0% 50%) 0 0/12px 12px;border-radius:4px;flex-shrink:0}.asset-preview span{font-size:12px;min-width:0;overflow-wrap:anywhere;flex:1}.asset-control .button{white-space:normal}.sticker-settings,.sticker-edit{padding:14px;border:1px solid var(--line);border-radius:8px;background:#f5f6ef}.sticker-settings>.control-group:last-child{margin-bottom:0}.sticker-edit{margin-bottom:22px}.sticker-list{max-height:225px;overflow-y:auto;border:1px solid var(--line);border-radius:8px}.sticker-row{display:flex;align-items:center;padding:4px;border-bottom:1px solid var(--line);gap:4px}.sticker-row:last-child{border:0}.sticker-select{display:flex;align-items:center;gap:8px;background:transparent;padding:7px;text-align:left;min-width:0;flex:1;border-radius:5px;font-size:12px}.sticker-select.selected{background:#e4ecdf}.sticker-select img{width:30px;height:30px}.sticker-select span{min-width:0}.sticker-select small{display:block;font-size:12px;max-width:145px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--muted);margin-top:3px}
.rotation-controls{display:flex;align-items:center;gap:8px;flex-shrink:0;min-width:0}.rotation-controls label,.rotation-controls output{font-size:12px}.rotation-controls input[type=range]{width:90px;margin:0}.rotation-controls output{min-width:32px;font-variant-numeric:tabular-nums}

.wood-control{grid-column:1/-1;max-width:440px}.wood-selection{display:flex;align-items:center;gap:var(--s3);min-width:0}.wood-swatch{display:block;width:64px;height:44px;flex-shrink:0;object-fit:cover;border:1px solid var(--line);border-radius:8px}.wood-legacy{background:repeating-linear-gradient(8deg,#c9a479,#d3b18b 3px,#bf996e 5px)}.wood-selection select{flex:1;min-width:0;font-size:12px;min-height:44px}.wood-description{font-size:12px;line-height:1.6;color:var(--muted);margin:var(--s2) 0 var(--s3)}.wood-control .button{white-space:normal}.wood-control .button:disabled{opacity:1;color:var(--muted);background:var(--page)}
.band-count{margin-bottom:12px}.band-count button{font-size:12px}.band-strip{display:flex;height:14px;border-radius:4px;overflow:hidden;border:1px solid #0002}.band-strip span{min-width:0}.band-total{display:flex;justify-content:space-between;gap:6px;font-size:12px;color:var(--muted);margin:8px 0 12px}.band-total strong{font-weight:500;white-space:nowrap}.edge-actions{display:flex;align-items:center;gap:3px;flex-wrap:wrap;margin:0 0 12px}.edge-actions>span{font-size:12px;color:var(--muted);margin-right:3px}.edge-actions .small-button{font-size:12px;background:#eff1e9;padding:5px 6px}.band-list{display:flex;flex-direction:column;gap:10px}.band-card{padding:10px;border:1px solid var(--line);border-radius:8px;background:#fcfcf7;min-width:0}.band-card-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:8px}.band-card-head strong{font-size:13px;font-weight:600}.band-order{display:flex;gap:3px}.band-order .icon-button{height:32px;width:32px;font-size:16px}.band-fields{display:grid;grid-template-columns:36px minmax(0,1fr) 62px;align-items:center;gap:6px;min-width:0}.band-fields>input[type=color]{width:36px;height:36px;flex-shrink:0}.band-fields select{font-size:13px;padding:7px 4px;min-width:0;width:100%;height:38px}.percent-field{display:flex;align-items:center;border:1px solid var(--line);border-radius:5px;background:var(--panel);padding-right:6px;min-width:0}.percent-field input{border:0;background:transparent;color:var(--ink);width:42px;min-width:0;padding:7px 2px 7px 5px;font-size:13px;appearance:textfield}.percent-field input::-webkit-inner-spin-button{appearance:none}.percent-field span{font-size:12px;color:var(--muted)}.band-boundary{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:12px}.band-boundary>span{font-size:12px;color:var(--muted)}.band-boundary .segmented{width:120px}.band-boundary .segmented button{font-size:12px;padding:5px}.band-fade-label{display:flex;justify-content:space-between;align-items:center;font-size:12px;color:var(--muted);margin-top:13px}.band-fade-label+input{margin-top:10px}.bevel-fields{display:flex;align-items:center;gap:8px;min-width:0}.bevel-fields>select{font-size:13px;flex:1;min-width:0}.bevel-fields .color-field{padding:5px;flex:1;min-width:0}.bevel-fields .color-field code{display:none}.bevel-fields .color-field input{width:25px;height:25px}.tool-quickbar{display:flex;align-items:center;justify-content:center;gap:12px;padding:12px 22px;background:#edf0e6;border-bottom:1px solid var(--line)}.tool-quickbar[hidden]{display:none}.tool-quickbar>svg{width:18px;height:18px;flex-shrink:0}.tool-quickbar label{font-size:12px;white-space:nowrap}.tool-quickbar input{width:170px;max-width:42%;margin:0}.tool-quickbar output{font-size:12px;min-width:47px;white-space:nowrap}.brush-size-control{background:#edf0e6;padding:14px;border-radius:8px}







.app-header{height:64px;border-bottom:1px solid var(--line);padding:0 24px;display:flex;align-items:center;justify-content:space-between;background:var(--panel);gap:16px}
main{max-width:1680px;margin:0 auto;padding:0 24px}
.studio{display:grid;grid-template-columns:64px minmax(0,1fr) 340px;grid-template-rows:minmax(0,1fr) auto;height:calc(100dvh - 194px);min-height:360px;border:1px solid var(--line);border-radius:var(--radius);background:var(--panel);overflow:hidden}
.inspector{grid-column:3;grid-row:1 / 3;border-left:1px solid var(--line);display:flex;flex-direction:column;min-width:0;min-height:0}
.section-title{display:block;font-family:Manrope,sans-serif;font-size:14px;font-weight:700;line-height:1.5;overflow-wrap:anywhere}
.section-status{display:block;grid-column:1;min-width:0;max-width:100%;font-size:12px;font-weight:500;line-height:1.5;color:var(--muted);white-space:normal;overflow-wrap:anywhere}
.section-content{padding:12px;min-width:0}
/* Workspace shell and shared controls use one responsive policy. */
:root{--control-border:#778276}
*,*::before,*::after{box-sizing:border-box}
button,input,select,summary{max-width:100%}
summary:focus-visible{outline:2px solid var(--focus);outline-offset:3px}
select,.button,.color-field,.segmented,.percent-field{border-color:var(--control-border)}
.button{font-size:13px;min-height:40px}
.small-button{font-size:12px;min-height:36px}
.project-identity{min-width:0}
#save-status:not([data-state=saved])::before{background:var(--muted)}
#save-status[data-state=error]{color:var(--focus)}
#save-status[data-state=error]::before{background:var(--focus)}
.project-menu{position:relative;flex-shrink:0}
.project-menu>summary{display:flex;align-items:center;gap:8px;min-height:44px;padding:10px 14px;background:var(--ink);color:var(--panel);border-radius:8px;list-style:none;cursor:pointer;font-size:14px;font-weight:600}
.project-menu>summary::-webkit-details-marker,.texture-heading::-webkit-details-marker{display:none}
.project-menu>summary::marker,.texture-heading::marker{content:''}
.project-menu>summary .section-chevron{color:inherit;margin-left:6px}
.project-menu[open]>summary .section-chevron,.texture-section[open]>summary .section-chevron{transform:rotate(225deg)}
.project-actions .button{width:100%;justify-content:flex-start;white-space:normal;text-align:left;min-height:44px}
.project-menu-help{font-size:12px;color:var(--muted);line-height:1.6;padding:4px}
.preview-actions{display:flex;gap:4px;pointer-events:auto}
.preview-actions .small-button{background:#fffefad9;min-height:40px;border:1px solid #fffefa}
.preview-actions .small-button[aria-pressed=true]{background:var(--ink);border-color:var(--ink);color:var(--panel)}
.preview-actions svg{width:17px;height:17px;flex-shrink:0}
#preview-lights{width:44px;min-width:44px;min-height:44px;padding:10px}
#preview-lights[aria-expanded=true]{background:var(--ink);color:var(--panel);border-color:var(--ink)}
.lighting-popover{position:fixed;z-index:60;width:304px;max-width:calc(100% - 24px);padding:12px 16px 16px;background:var(--panel);border:1px solid var(--control-border);border-radius:10px;box-shadow:0 8px 28px #263d3426;overflow:auto;overscroll-behavior:contain;pointer-events:auto}
.lighting-popover[hidden]{display:none}
.lighting-heading{display:flex;justify-content:space-between;align-items:center;gap:8px;margin-bottom:4px}
.lighting-heading h2{font-size:16px;font-weight:700;line-height:1.5}
.lighting-popover .icon-button{width:44px;height:44px;min-width:44px}
.lighting-popover .inline-label{min-height:44px;font-size:14px}
.lighting-popover .control-group{margin-top:16px;margin-bottom:0}
.lighting-popover .control-label{font-size:13px}
.lighting-popover .segmented button{min-height:44px}
.lighting-popover input[type=range]{height:44px;margin:0}
.lighting-popover .field-hint{margin-top:4px}
.starter-navigation{display:flex;justify-content:space-between;gap:8px;margin-top:8px}
.starter-navigation .small-button{min-height:44px;border:1px solid var(--control-border)}
.bevel-ring-control{border-top:1px solid var(--line);padding-top:16px}
.bevel-ring-control>.control-label,.bevel-ring-control>.color-field{margin-top:16px}
.texture-heading strong{font-size:13px;font-weight:600;display:block}
.texture-heading small{font-size:12px;color:var(--muted);display:block;margin-top:2px}
.texture-content{padding:0 16px 12px}
.inspector-overview p,.section-description{font-size:12px;line-height:1.6}
.inspector-guide>summary{font-size:13px}
.section-actions button,.tips-toggle{font-size:12px}
.section-actions{gap:2px}
.pattern-gallery,.starter-gallery{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:12px 0}
.pattern-choice,.starter-card{display:flex;flex-direction:column;align-items:stretch;min-width:0;gap:8px;padding:8px;border:1px solid var(--control-border);border-radius:8px;background:var(--panel);font-size:13px;line-height:1.4;text-align:left}
.pattern-choice[aria-pressed=true]{outline:2px solid var(--ink);outline-offset:1px;background:#edf1e7}
.pattern-choice canvas,.starter-card canvas{display:block;width:100%;height:auto;border:1px solid var(--line);border-radius:4px}
.pattern-choice canvas{aspect-ratio:16 / 5}
.starter-card canvas{aspect-ratio:4 / 3}
.starter-card strong{font-size:13px}
.starter-card small,.starter-card span,.starter-card p,.starter-card .field-hint{font-size:12px;line-height:1.5;color:var(--muted);margin:0}
.pattern-gallery-toggle{margin:12px 0}
.pattern-gallery-toggle>summary{min-height:44px;padding:10px;border:1px solid var(--control-border);border-radius:6px;font-size:13px;line-height:1.6;cursor:pointer}
.generator-draft-status{font-size:12px;line-height:1.6;color:var(--muted);padding:10px 12px;border:1px solid var(--line);border-radius:6px;background:#f4f5ed;margin-bottom:12px}
.generator-applied-actions{display:flex;flex-wrap:wrap;gap:8px;margin:12px 0}
.generator-applied-actions .button,.generator-applied-actions .small-button{flex:1;min-height:44px;white-space:normal;border-color:var(--control-border)}
.context-view-button{min-height:40px;margin:0 0 12px;border:1px solid var(--control-border)}
.recent-list{display:flex;flex-direction:column;gap:8px}
.recent-design{display:flex;align-items:center;gap:12px;width:100%;min-height:72px;padding:12px;border:1px solid var(--control-border);border-radius:8px;background:var(--panel);text-align:left}
.recent-design img,.recent-design canvas{width:80px;height:40px;object-fit:contain;border-radius:5px;flex-shrink:0;background:var(--stage)}
.recent-design:disabled{opacity:1;color:var(--muted);background:var(--page)}
.recent-design>span,.recent-design>div{min-width:0;flex:1}
.recent-design strong{display:block;font-size:14px;overflow-wrap:anywhere}
.recent-design small,.recent-design time{display:block;font-size:12px;line-height:1.6;color:var(--muted);margin-top:3px}
.export-option canvas{width:72px;height:56px;object-fit:contain;flex-shrink:0;border:1px solid var(--line);border-radius:5px;background:var(--stage)}
.export-option #export-preview-thumb{width:64px;height:64px}
dialog .icon-button{width:44px;height:44px}
dialog .fine-print,.help-steps span,.help-tip{font-size:12px}
#toast{z-index:50;width:max-content;max-width:min(480px,calc(100% - 32px))}
body.preview-expanded{overflow:hidden}
body.preview-expanded .stage{position:fixed;inset:12px;z-index:40;height:auto;min-height:0;border:1px solid var(--control-border);border-radius:var(--radius);box-shadow:0 0 0 24px var(--page)}
body.preview-expanded .stage-meta{display:flex}
@media(min-width:1200px){.interaction-bar #tool-hint{flex:1}.rotation-controls{margin-left:auto}}
@media(min-width:901px) and (max-width:1280px){.view-label{display:none}.stage-top{left:12px;right:12px}.preview-actions .small-button{padding:7px 8px}.interaction-bar #tool-hint{display:none}.rotation-controls{width:100%;justify-content:space-between}.rotation-controls input[type=range]{flex:1;max-width:150px}}
@media(min-width:901px) and (max-width:1100px){.preview-control-label{display:none}.preview-actions .small-button{width:40px;padding:8px}}
@media(min-width:1450px){.studio{grid-template-columns:70px minmax(0,1fr) 380px}.tool-rail{padding-left:7px;padding-right:7px}#settings-panel{padding:20px}.section-content{padding:14px}}
@media(max-width:900px){
  :root{--mobile-project-height:48px;--mobile-preview-height:40vh;--mobile-tabs-height:44px}
  @supports(height:40dvh){:root{--mobile-preview-height:40dvh}}
  html{scroll-padding-top:calc(var(--mobile-project-height) + var(--mobile-preview-height) + var(--mobile-tabs-height) + 12px)}
  body{padding-top:calc(var(--mobile-project-height) + var(--mobile-preview-height) + var(--mobile-tabs-height))}
  .app-header{display:none}
  main{padding:0 16px;max-width:720px}
  .project-bar{position:fixed;top:0;left:0;right:0;height:var(--mobile-project-height);padding:2px 12px;background:var(--panel);border-bottom:1px solid var(--line);gap:8px;z-index:30}
  .project-title input{font-size:16px;line-height:1.2;width:280px;letter-spacing:-.2px;padding:0}
  .project-title svg{width:12px;height:12px;flex-shrink:0}
  .project-identity{flex:1}
  .save-status{font-size:12px;line-height:1.3;margin-top:2px}
  .save-status:before{width:4px;height:4px;margin-right:5px}
  .project-menu>summary{min-height:44px;padding:8px 10px;font-size:13px;gap:6px}
  .project-menu>summary>span[data-icon]{display:none}
  .project-menu>summary .section-chevron{margin-left:2px}
  .project-actions{right:0;top:calc(100% + 4px);max-height:calc(100dvh - 64px)}
  .studio{display:flex;flex-direction:column;height:auto;min-height:0;border:0;border-radius:0;overflow:visible;background:var(--panel)}
  .tool-rail{display:none}
  .workspace{display:contents}
  .stage{position:fixed;z-index:20;top:var(--mobile-project-height);left:0;right:0;height:var(--mobile-preview-height);min-height:0;border-radius:0}
  body.lights-open .stage{z-index:35}
  .stage-top{top:6px;left:8px;right:8px;gap:6px}
  .preview-top-left{gap:0}
  .preview-top-left .history-group{padding:0;gap:0}
  .preview-top-left .history-group .icon-button{width:44px;height:44px}
  .preview-actions{gap:4px}
  .preview-actions .small-button{width:44px;height:44px;padding:12px}
  .preview-control-label,.view-label,.stage-meta{display:none}
  .stage-bottom{left:8px;right:8px;bottom:6px;gap:8px}
  .view-buttons{padding:0}
  .view-buttons button{min-height:44px;min-width:44px;font-size:12px;padding:6px 9px}
  .zoom-buttons .icon-button{width:44px;height:44px}
  .interaction-bar{position:static;min-height:52px;border:0;border-bottom:1px solid var(--line);padding:4px 0;gap:0;background:var(--panel)}
  .interaction-bar #tool-hint{display:none}
  .rotation-controls{width:100%;gap:8px;justify-content:space-between}
  .rotation-controls .small-button{min-height:44px;padding:4px;font-size:12px}
  .rotation-controls input[type=range]{flex:1;width:auto;min-width:40px;max-width:160px;margin:0;height:44px}
  .rotation-controls label,.rotation-controls output{font-size:12px}
  .rotation-controls output{min-width:32px;text-align:right}
  .inspector{border:0;display:block}
  .inspector-tabs{position:fixed;z-index:25;top:calc(var(--mobile-project-height) + var(--mobile-preview-height));left:0;right:0;height:var(--mobile-tabs-height);min-height:44px;padding:0 8px;gap:0;box-shadow:0 4px 10px #263d3412}
  .inspector-tabs button{min-height:44px;padding:8px 4px;font-size:14px}
  #settings-panel{overflow:visible;display:block;padding:16px 0}
  .inspector-overview{margin-bottom:16px}
  .section-content{padding:12px}
  .inspector-section>summary{padding:14px 12px}
  .inspector-guide>summary{padding:12px}
  .inspector-footer{display:none}
  .texture-section{padding:0;border:1px solid var(--line);border-radius:8px;margin-bottom:12px}
  .texture-heading{padding:12px;min-height:56px}
  .texture-content{padding:0 12px 12px}
  .tool-quickbar{position:static;flex-wrap:wrap;padding:12px;gap:8px}
  .tool-quickbar input{max-width:36%}
  .page-footer{flex-direction:column;font-size:11px;gap:4px;padding:12px 0 calc(16px + env(safe-area-inset-bottom))}
  .button,.small-button,.icon-button,.segmented button,.preset,.guide-links button,.section-actions button,.tips-toggle,.drawing-tools .small-button,.motif-file>.small-button,.kaleidoscope-controls>.inline-label,.context-view-button{min-height:44px}
  .icon-button,.artwork-order .icon-button,.band-order .icon-button,.splatter-layer-actions .icon-button{min-width:44px;min-height:44px}
  .band-order .band-remove{min-height:44px}
  select,.text-input,input[type=color]{min-height:44px;font-size:14px}
  input[type=range]{height:44px;margin:0}
  .control-group{margin-bottom:20px}
  .band-count button{padding:8px 2px;font-size:13px}
  .band-fields{grid-template-columns:44px minmax(0,1fr);gap:8px}
  .band-fields>input[type=color]{width:44px;height:44px}
  .band-fields select{font-size:14px;min-height:44px;padding:8px}
  .percent-field{grid-column:2;justify-self:end;width:100px}
  .percent-field input{width:72px;min-height:44px;font-size:14px}
  .band-card{padding:12px}
  .band-card-head{align-items:flex-start}
  .band-card-head strong{padding-top:12px;font-size:13px}
  .band-order{gap:2px}
  .band-boundary .segmented{width:132px}
  .bevel-fields{flex-wrap:wrap}
  .bevel-fields>select{flex-basis:100%;width:100%}
  .bevel-fields .color-field{flex-basis:100%}
  .color-field input{width:44px;height:44px}
  .color-field label{font-size:13px}
  .color-field code{font-size:12px}
  .artwork-row{flex-wrap:wrap;gap:4px}
  .artwork-select{min-width:0;flex:1 1 calc(100% - 40px);min-height:44px}
  .artwork-order{flex-direction:row;margin-left:auto}
  .artwork-actions{flex-wrap:wrap}
  .artwork-actions .small-button{flex:1}
  .inspiration-navigation button{min-height:44px}
  .inspiration-section #get-inspired,.inspiration-layer-label select,#artwork-preset,.artwork-actions .small-button{min-height:44px}
  label:has(input[type=checkbox]){min-height:44px}
  .sticker-row{flex-wrap:wrap}
  .splatter-layer-actions button{min-height:44px;min-width:44px}
  .swatch{min-width:44px;min-height:44px}
  .swatches{flex-wrap:wrap}
  dialog{padding:20px;width:calc(100% - 24px);max-height:calc(100dvh - 24px)}
  dialog h2{font-size:22px}
  .export-option{gap:10px;padding:10px}
  .export-option canvas,.export-option #export-preview-thumb{width:52px;height:52px}
  .export-option>span[data-icon]{display:none}
  body.preview-expanded .stage{inset:8px;height:auto;z-index:40}
  body.preview-expanded .stage-meta{top:64px;left:16px;right:16px;flex-wrap:wrap}
  body.preview-expanded #expand-preview{width:44px;padding:8px}
  body.preview-expanded #expand-preview .preview-control-label{display:inline}
  body.preview-expanded #expand-preview svg{display:none}
}
@media(min-width:541px) and (max-width:900px){
  .band-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:start}
  .pattern-gallery{grid-template-columns:repeat(3,minmax(0,1fr))}
  .project-bar{padding-left:24px;padding-right:24px}
}
@media(max-width:360px){
  .project-menu>summary{font-size:12px;padding:8px}
  .project-title input{font-size:15px}
  .stage-bottom{left:5px;right:5px;gap:4px}
  .view-buttons button{padding-left:7px;padding-right:7px}
  .rotation-controls{gap:4px}
  .rotation-controls label{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
  .section-actions{justify-content:space-between}
  .tips-toggle{width:100%}
  .band-order{flex-wrap:wrap;justify-content:flex-end;max-width:150px}
  .band-card-head strong{flex:1}
  .band-total{flex-wrap:wrap}
}
/* The full drawing square has its own viewport; only its tools may scroll. */
.motif-dialog{width:min(1040px,calc(100% - 32px));height:min(820px,calc(100dvh - 32px));max-width:none;max-height:none;padding:16px;overflow:hidden;border-radius:12px}
.motif-dialog[open]{display:grid;grid-template-rows:auto minmax(0,1fr);gap:12px}
.motif-dialog-header{display:flex;align-items:center;justify-content:space-between;gap:16px;min-width:0}
.motif-dialog-header h2{margin:0;font-size:20px;line-height:1.3;letter-spacing:-.5px;overflow-wrap:anywhere}
.motif-dialog-header .button{min-width:72px;min-height:44px;flex-shrink:0;font-size:14px}
.motif-dialog-body{display:grid;grid-template-columns:minmax(0,1fr) 280px;gap:16px;min-height:0;min-width:0}
.motif-dialog-board{display:grid;place-items:center;min-width:0;min-height:0;overflow:hidden;background:var(--page);border-radius:8px}
.motif-dialog-board .pattern-canvas{max-width:none;flex-shrink:0}
.motif-dialog-tools{min-height:0;min-width:0;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;padding:4px;display:flex;flex-direction:column;gap:16px}
.motif-dialog-copy{font-size:12px;line-height:1.6;color:var(--muted)}
.motif-dialog-actions{display:flex;flex-wrap:wrap;gap:8px}
.motif-dialog-actions .small-button{flex:1;min-height:44px;padding:8px;font-size:13px;white-space:normal;border:1px solid var(--control-border);background:var(--panel)}
.motif-dialog-fields{display:grid;grid-template-columns:1fr;gap:16px;min-width:0}
.motif-dialog-field{min-width:0}
.motif-dialog-field>label{display:flex;justify-content:space-between;gap:8px;align-items:center;margin-bottom:8px;font-size:14px;font-weight:600;line-height:1.5}
.motif-dialog-field output{font-size:13px;font-weight:400;color:var(--muted)}
.motif-dialog-field input[type=color]{width:100%;height:44px;border:1px solid var(--control-border);border-radius:8px;margin-bottom:8px}
.motif-dialog-field input[type=range]{width:100%;height:44px;margin:0}
.motif-dialog-symmetry{display:flex;flex-direction:column;gap:8px}
.motif-dialog-symmetry .inline-label{min-height:44px;font-size:14px;line-height:1.5;gap:8px}
.motif-dialog-symmetry input[type=checkbox]{width:24px;height:24px;flex-shrink:0}
.motif-dialog-symmetry select{min-height:44px;min-width:72px;border-color:var(--control-border)}
.motif-dialog-notice{font-size:12px;line-height:1.6;color:var(--ink);padding:8px;border:1px solid var(--control-border);border-radius:6px}
.motif-dialog-notice:empty{display:none}
@media(max-width:900px){
  .motif-dialog{width:100%;height:100dvh;margin:0;padding:12px;padding-top:max(12px,env(safe-area-inset-top));padding-bottom:max(12px,env(safe-area-inset-bottom));border:0;border-radius:0}
  .motif-dialog-body{grid-template-columns:minmax(0,1fr) 260px;gap:12px}
}
@media(max-width:599px) and (orientation:portrait){
  .motif-dialog-body{grid-template-columns:1fr;grid-template-rows:minmax(0,min(calc(100vw - 24px),calc(100dvh - 284px))) minmax(0,1fr)}
  .motif-dialog-fields{grid-template-columns:1fr 1fr;gap:12px}
  .motif-dialog-tools{border-top:1px solid var(--line);padding-top:12px;gap:12px}
}
@media(max-height:420px) and (orientation:landscape){
  .motif-dialog-header h2{font-size:18px}
  .motif-dialog-tools{gap:12px}
}
@media(prefers-reduced-motion:reduce){*{transition:none!important;scroll-behavior:auto!important}}

/* Interface direction is independent of the physical tama and motif axes. */
.project-identity{flex:1;min-width:0}
.language-control{display:flex;align-items:center;gap:8px;flex-shrink:0}
.language-control label{font-size:12px;color:var(--muted)}
.language-select-wrap{position:relative;display:inline-flex;direction:ltr}
.language-symbol{position:absolute;left:10px;top:50%;transform:translateY(-50%);font:18px/1 'Apple Color Emoji','Segoe UI Emoji',sans-serif;pointer-events:none}
.language-control select{min-height:44px;width:136px;border:1px solid var(--control-border);background:var(--panel);border-radius:8px;padding:8px 8px 8px 36px;font-size:14px;direction:ltr}
.export-option,.artwork-select,.guide-links button,.sticker-select,.project-actions .button,.pattern-choice,.starter-card,.recent-design{text-align:start}
.control-label,.inline-label,.segmented button,.button{overflow-wrap:anywhere}
.segmented button{white-space:normal}
.pattern-canvas,#scene,#texture-preview,.texture-labels,input[type=range],input[type=number],code,output{direction:ltr}
.layers-heading>.value{direction:ltr;unicode-bidi:isolate}
[lang=ja] body{font-family:'DM Sans','Yu Gothic','Meiryo',sans-serif}
[lang=he] body{font-family:'DM Sans',Arial,sans-serif}
[lang=zh] body{font-family:'DM Sans','PingFang SC','Microsoft YaHei','Noto Sans CJK SC',sans-serif}
[lang=ar] body{font-family:'DM Sans','Noto Sans Arabic',Tahoma,Arial,sans-serif}
[lang=zh] :is(h1,h2,h3,.project-title input){font-family:'Manrope','PingFang SC','Microsoft YaHei','Noto Sans CJK SC',sans-serif}
[lang=ar] :is(h1,h2,h3,.project-title input){font-family:'Manrope','Noto Sans Arabic',Tahoma,Arial,sans-serif}
[lang=he] .eyebrow,[lang=he] .view-label,[lang=he] .section-title{letter-spacing:normal}
[lang=ar] :is(.eyebrow,.view-label,.section-title,.detail-category,.panel-heading,.project-title input,.texture-seam,.page-footer>span:first-child,h1,h2,h3){letter-spacing:normal}
[dir=rtl] .inspector{border-left:0;border-right:1px solid var(--line)}
[dir=rtl] .project-actions{right:auto;left:0}
[dir=rtl] .project-menu>summary .section-chevron{margin-left:0;margin-right:6px}
[dir=rtl] .save-status:before{margin-right:0;margin-left:6px}
[dir=rtl] .help-steps{padding-left:0;padding-right:20px}
[dir=rtl] .help-steps li{padding-left:0;padding-right:5px}
[dir=rtl] .artwork-order{margin-left:0;margin-right:auto}
[dir=rtl] .percent-field{direction:ltr}
[dir=rtl] .range-labels{direction:ltr}
@media(max-width:900px){
  .language-control label{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
  .language-control select{width:116px;font-size:12px;padding:6px 6px 6px 34px}
  .project-menu>summary{max-width:126px;white-space:normal;line-height:1.2}
  [dir=rtl] .inspector{border:0}
  [dir=rtl] .project-menu>summary .section-chevron{margin-right:2px}
}

/* Wrapped text formatting uses independent toggle buttons. */
.text-style-options{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}

/* One Studio navigation, beside the tama on desktop and below it on phones. */
.tool-rail .inspector-tabs{position:static;display:flex;flex-direction:column;align-items:stretch;padding:0;gap:8px;border:0;background:transparent}
.tool-rail .inspector-tabs button{flex:none;width:100%;min-height:72px;padding:10px 2px;border:0;border-radius:7px;font-size:12px;gap:7px}
.tool-rail .inspector-tabs button>span:last-child{min-width:0;overflow-wrap:anywhere}
.tool-rail .inspector-tabs button[aria-selected=true]{background:var(--ink);color:var(--panel)}
.tool-rail .inspector-tabs button[hidden]{display:none}
.detail-category{font-size:12px;line-height:1.5;color:var(--muted);letter-spacing:.7px;margin:20px 0 8px;text-transform:uppercase}
.template-download{width:100%;justify-content:flex-start;margin-top:8px;white-space:normal;min-height:44px}
.template-download .value{margin-inline-start:auto}
.pattern-editor>.pattern-canvas{width:120px;max-width:100%;touch-action:pan-y;cursor:default;pointer-events:none}
.pattern-drawing-actions{flex-wrap:wrap}
.pattern-drawing-actions [data-expand-motif]{background:var(--ink);color:var(--panel);min-height:44px;padding:9px 14px}
.admin-exports .button{white-space:normal;min-height:44px;text-align:start}
.admin-exports .field-hint{margin:6px 0 20px}
.admin-exports .field-hint:last-child{margin-bottom:0}
@media(max-width:900px){
  .tool-rail{display:contents}
  .tool-rail .inspector-tabs{position:fixed;z-index:25;top:calc(var(--mobile-project-height) + var(--mobile-preview-height));left:0;right:0;height:var(--mobile-tabs-height);min-height:44px;padding:0 8px;gap:2px;flex-direction:row;background:var(--panel);border-bottom:1px solid var(--line);box-shadow:0 4px 10px #263d3412}
  .tool-rail .inspector-tabs button{flex:1;min-width:0;width:auto;min-height:44px;padding:8px 4px;border-radius:0;font-size:13px;flex-direction:row;gap:5px}
  .tool-rail .inspector-tabs button svg{width:16px;height:16px}
  .tool-rail .inspector-tabs button[aria-selected=true]{background:var(--panel);color:var(--ink);box-shadow:inset 0 -3px var(--accent)}
}
.text-style-option{min-width:0;min-height:44px;padding:8px 6px;border:1px solid var(--control-border);border-radius:7px;background:var(--panel);font-size:13px;line-height:1.4;overflow-wrap:anywhere}
.text-style-option.selected{background:var(--ink);border-color:var(--ink);color:white}
.text-format-bold{font-weight:700}.text-format-italic{font-style:italic}.text-format-underline{text-decoration:underline;text-underline-offset:3px}

/* Exact values share the existing slider label row, opening only while edited. */
output.numeric-value{display:inline-flex;align-items:center;justify-content:flex-end;gap:2px;flex-shrink:0;min-width:44px;min-height:32px;padding:2px 4px;cursor:text;text-decoration:underline dotted;text-underline-offset:4px;border-radius:4px;white-space:nowrap;font-variant-numeric:tabular-nums}
output.numeric-value:focus-visible{outline:2px solid var(--focus);outline-offset:2px}
output.numeric-value:hover:not([aria-disabled=true]){background:var(--page);color:var(--ink)}
output.numeric-value[aria-disabled=true]{cursor:default;opacity:.5;text-decoration:none}
output.numeric-editing{min-width:0;text-decoration:none}
input.numeric-editor{box-sizing:border-box;width:7ch;min-width:0;max-width:100%;min-height:32px;padding:4px;border:1px solid var(--control-border);border-radius:4px;background:var(--panel);color:var(--ink);font-size:16px;line-height:1.25;text-align:end;direction:ltr}
.rotation-controls #rotation-speed-value.numeric-value{width:auto;min-width:44px}
@media(max-width:900px){output.numeric-value,input.numeric-editor{min-height:44px}.rotation-controls #rotation-speed-value.numeric-editing{max-width:100px}}

.svg-crop-control{min-height:44px;cursor:pointer}
.top-engraving-preview{display:block;width:120px;height:120px;margin:0 0 12px;border:1px solid var(--control-border);border-radius:6px;background:var(--page)}
.band-boundary .segmented{width:156px;flex-shrink:0}
.tool-quickbar{flex-wrap:wrap}
.preview-sticker-done{position:absolute;z-index:2;left:50%;bottom:68px;transform:translateX(-50%);width:max-content;max-width:calc(100% - 24px);min-height:44px;padding:10px 16px;white-space:normal;text-align:center;line-height:1.4}
.preview-sticker-done[hidden]{display:none}
.preview-sticker-done>span:last-child{min-width:0;overflow-wrap:anywhere}
