@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{--ink:#292c2a;--muted:#93958f;--line:#eaece6;--accent:#dc7558;--paper:#fff;--bg:#f7f8f4}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--ink);font-family:'DM Sans',sans-serif;font-size:var(--text-body)}button,input,select{font:inherit}button,a,input,select{-webkit-tap-highlight-color:transparent}button{cursor:pointer}button{color:inherit}button:focus-visible,a:focus-visible,select:focus-visible,canvas:focus-visible{outline:2px solid var(--accent);outline-offset:4px}button{border:0;background:none}svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round}.svg-defs{position:absolute;width:0;height:0}.header{height:88px;border-bottom:1px solid #e6e8e1;display:flex;align-items:center;justify-content:space-between;padding:0 36px;background:#fff}.brand{text-decoration:none;color:#272e28;display:flex;align-items:center;font-family:Manrope,sans-serif;font-weight:800;letter-spacing:-2px;font-size:34px}.brand-mark{width:31px;height:35px;display:inline-grid;place-items:center;color:#fff;background:var(--accent);font-size:31px;border-radius:10px 4px 10px 4px;font-style:italic;margin-right:10px;line-height:1;letter-spacing:-4px;padding-right:6px}.brand-dot{color:var(--accent)}.brand-divider{height:25px;background:#e2e4dd;width:1px;margin:0 22px}.brand-tag{font-family:'DM Sans',sans-serif;letter-spacing:1.8px;font-size:var(--text-sm);font-weight:550}.header nav{height:100%;display:flex;gap:30px;margin-right:80px}.nav-item{padding:0 5px;position:relative;font-size:var(--text-control);color:#969991}.nav-item.active{color:#292e28}.nav-item.active:after{position:absolute;bottom:0;left:0;right:0;content:'';height:3px;background:var(--accent)}.nav-item span{display:inline-grid;place-items:center;background:#f0f1ed;border-radius:4px;font-size:var(--text-sm);width:17px;height:17px;margin-left:7px}.header-actions{display:flex;align-items:center;gap:21px}.save-status{font-size:var(--text-sm);color:#999d94;display:flex;align-items:center;gap:6px}.save-status i{height:5px;width:5px;background:#91a491;border-radius:50%}.button{background:#2f3d34;color:white;border-radius:7px;display:flex;align-items:center;justify-content:center;gap:10px;font-size:var(--text-control);font-weight:500}.export{height:39px;padding:0 16px}.export svg{width:15px}.profile{width:29px;height:29px;border-radius:50%;border:1px solid #e4e6df;color:#80867c;font-family:Georgia,serif;font-size:17px}.workspace{display:grid;grid-template-columns:290px minmax(400px,1fr) 310px;min-height:788px;margin:25px 25px 0;gap:0;max-width:1800px}.panel{background:white;border:1px solid #e8eae3;border-radius:12px;padding:25px 23px;position:relative;z-index:1;height:fit-content;min-height:770px}.panel-title{display:flex;align-items:center;justify-content:space-between}.panel-title>svg{color:#8b9388;width:19px}.eyebrow{font-size:var(--text-xs);font-weight:600;letter-spacing:1.5px;color:#92988c}.panel-title h1,.panel-title h2{font-family:Manrope,sans-serif;letter-spacing:-.5px;font-size:19px;font-weight:750;margin:8px 0 0}.panel-intro{font-size:var(--text-control);color:#92968e;margin:9px 0 25px}.unit-row{display:flex;justify-content:space-between;align-items:center;font-size:var(--text-sm);color:#858c80;border-top:1px solid var(--line);padding:19px 0 22px}.segmented{display:inline-flex;gap:2px;padding:3px;border-radius:6px;background:#f2f3ef}.segmented button{font-size:var(--text-sm);border-radius:4px;padding:5px 10px;color:#92968d}.segmented .active{background:white;box-shadow:0 1px 4px #28322212;color:#3b4437}.measure-control{margin-bottom:24px}.measure-label{display:flex;align-items:center;justify-content:space-between;margin-bottom:13px;font-size:var(--text-control);font-weight:500}.number-wrap{display:flex;align-items:center;gap:5px;font-size:var(--text-sm);font-weight:400;color:#a0a397}.measure-number{font-size:var(--text-control);font-weight:550;color:#424b3d;border:1px solid #e9ebe3;border-radius:4px;width:44px;padding:4px 2px;text-align:center;appearance:textfield;-moz-appearance:textfield}.measure-number::-webkit-inner-spin-button{appearance:none}.measure-control input[type=range]{display:block;appearance:none;-webkit-appearance:none;width:100%;height:3px;background:linear-gradient(to right,#a0ad94 var(--progress),#ecefe7 var(--progress));cursor:pointer;border-radius:3px;margin:0}.measure-control input[type=range]::-webkit-slider-thumb{-webkit-appearance:none;background:#fff;border:3px solid #8f9f81;width:12px;height:12px;border-radius:50%;box-shadow:0 0 0 3px #fff}.measure-control input[type=range]::-moz-range-thumb{background:white;border:3px solid #8f9f81;width:7px;height:7px;border-radius:50%}.range-labels{display:flex;justify-content:space-between;font-size:var(--text-xs);color:#b4b8ad;margin-top:9px}.text-button{font-size:var(--text-sm);color:#91978a;padding:0}.more{display:flex;width:100%;justify-content:space-between;align-items:center;padding:0 0 20px;border-bottom:1px solid var(--line);margin-top:1px}.more span{background:#f3f4ef;color:#8c9382;font-size:var(--text-sm);padding:2px 5px;border-radius:3px}.skin-row{display:flex;justify-content:space-between;align-items:center;margin:22px 0;font-size:var(--text-sm)}.skin-tones{display:flex;gap:7px}.skin-tones button{height:17px;width:17px;border-radius:50%;background:var(--swatch)}.skin-tones button.active{outline:1px solid #718064;outline-offset:3px}.reset-button{display:flex;justify-content:center;align-items:center;gap:8px;border:1px solid #e9ebe4;border-radius:5px;width:100%;height:35px;color:#8b9384;font-size:var(--text-sm)}.reset-button svg{width:12px}.measure-note{display:flex;gap:12px;background:#f6f7f3;padding:16px 13px;margin-top:22px;border-radius:6px}.measure-note svg{width:20px;flex-shrink:0;color:#a1ab95}.measure-note strong{font-size:var(--text-sm);font-weight:500;color:#6d785f}.measure-note p{font-size:var(--text-sm);line-height:1.7;color:#959e8b;margin:4px 0 0}.stage{position:relative;overflow:hidden;min-height:788px;background:radial-gradient(ellipse at 50% 52%,#f0efe9 0%,#f7f8f4 66%)}.stage-heading{position:absolute;top:29px;left:32px;pointer-events:none;z-index:2}.stage-heading .eyebrow{font-size:var(--text-xs);letter-spacing:1.6px}.stage-heading h2{font-family:Manrope,sans-serif;letter-spacing:-1px;font-weight:500;font-size:31px;line-height:1.25;margin:12px 0 9px}.stage-heading em{font-family:Georgia,serif;font-weight:400;color:#7e8d70;font-size:33px}.stage-heading p{font-size:var(--text-sm);color:#9a9f92}.stage-actions{position:absolute;right:27px;top:33px;display:flex;flex-direction:column;align-items:flex-end;gap:7px;z-index:2}.scene-badge{font-size:var(--text-xs);letter-spacing:1px;color:#9a9f92;display:flex;align-items:center;gap:7px}.scene-badge span{width:5px;height:5px;border-radius:50%;background:#93a381}.scene-badge i{height:9px;width:1px;background:#dcded6;margin:0 2px}#renderCanvas{width:100%;height:100%;position:absolute;inset:0;touch-action:none;outline:none}.loading{position:absolute;inset:0;z-index:5;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:18px;background:#f6f7f2;color:#8e9982;font-size:var(--text-control)}.loader{width:25px;height:25px;border:2px solid #e1e5d9;border-top-color:#7c8f6c;border-radius:50%;animation:spin 1s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}.avatar-label{position:absolute;bottom:112px;left:50%;transform:translateX(-50%);display:flex;align-items:center;gap:6px;white-space:nowrap;font-size:var(--text-xs);letter-spacing:1.1px;color:#858f7d;flex-wrap:wrap;justify-content:center;width:160px;pointer-events:none}.avatar-dot{height:4px;width:4px;border-radius:50%;background:#98a68e}.avatar-label small{width:100%;text-align:center;font-size:var(--text-xs);letter-spacing:0;color:#a2a99a;margin-top:1px}.view-tools{position:absolute;right:22px;top:43%;display:flex;flex-direction:column;align-items:center;padding:4px;background:#ffffffd9;border:1px solid #e3e6db;border-radius:7px;box-shadow:0 4px 12px #53643f06}.tool{height:32px;width:31px;font-size:18px;display:grid;place-items:center;color:#9aab8d;border-radius:4px}.tool svg{width:15px;height:15px}.tool.active{background:#edf1e7;color:#657959}.view-tools>span{width:15px;height:1px;background:#e7ebdf;margin:5px 0}.scene-bottom{position:absolute;left:27px;right:24px;bottom:58px;display:flex;justify-content:space-between;align-items:center;gap:10px}.view-switch{border:1px solid #e2e6d9;background:transparent;padding:3px}.view-switch button{padding:6px 13px;font-size:var(--text-sm)}.orbit-hint{color:#a4ab9b;font-size:var(--text-xs)}.orbit-hint>span{font-size:17px;vertical-align:-1px;margin-right:5px}.orbit-hint b{font-weight:400;margin:0 7px}.physics-button{display:flex;gap:5px;align-items:center;font-size:var(--text-xs);color:#8b9881;padding:0}.physics-button>span{height:5px;width:5px;border-radius:50%;background:#aaa}.physics-button.active>span{background:#9daf87}.physics-button strong{font-size:var(--text-xs);background:#e7eddf;color:#7b906a;padding:3px 4px;border-radius:3px;font-weight:500}.simulation-controls{display:flex;align-items:center;justify-content:center;gap:10px;position:absolute;bottom:18px;left:0;right:0;font-size:var(--text-xs);color:#aab09e}.simulation-controls button{display:flex;align-items:center;gap:5px;font-size:var(--text-sm);color:#899a7b}.simulation-controls svg{height:13px;width:13px}.wardrobe-panel{padding:25px 20px}.category-tabs{display:flex;gap:0;justify-content:space-between;border-bottom:1px solid var(--line);margin-top:23px;margin-bottom:18px}.category-tabs button{font-size:var(--text-sm);color:#989f90;padding:0 2px 12px;position:relative}.category-tabs .active{color:#505f43;font-weight:500}.category-tabs .active:after{position:absolute;bottom:-1px;left:0;right:0;height:2px;background:#8c9d7b;content:''}.clothing-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-bottom:23px}.clothing-card{display:flex;flex-direction:column;align-items:stretch;justify-content:flex-start;border:1px solid #e9ece3;border-radius:7px;overflow:hidden;padding:0;text-align:left;position:relative;background:#fff}.clothing-card.active{border:1.5px solid #9eac8f}.garment-preview{flex:none;height:93px;background:#f6f7f2;display:grid;place-items:center}.garment-preview svg{width:70px;height:76px;stroke-width:.7;stroke:#0002;fill:var(--garment-colour,#778268);filter:drop-shadow(2px 4px 2px #0000000b)}.clothing-card.active .garment-preview{background:#f0f3ea}.clothing-card h4{font-size:var(--text-sm);font-weight:500;margin:10px 9px 4px}.clothing-card p{font-size:var(--text-xs);color:#a0a795;margin:0 9px 10px}.card-check{position:absolute;right:7px;top:7px;background:#81936e;color:white;border-radius:50%;height:13px;width:13px;display:grid;place-items:center;font-size:var(--text-xs)}.section-line{display:flex;align-items:center;justify-content:space-between}.section-line h3{font-size:var(--text-control);font-weight:550;margin:0}.section-line>span{color:#a3a997;font-size:var(--text-xs)}.customise{border-top:1px solid var(--line);padding-top:21px}.colour-heading{display:flex;justify-content:space-between;margin:19px 0 13px;font-size:var(--text-sm)}.colour-heading>span:last-child{color:#a0a791;font-size:var(--text-xs)}.colours{display:flex;gap:10px}.colours button{width:23px;height:23px;background:var(--swatch);border-radius:50%;border:1px solid #00000006;position:relative}.colours button.active{outline:1px solid #879779;outline-offset:3px}.colours button.active:after{content:'✓';position:absolute;inset:0;display:grid;place-items:center;color:white;font-size:var(--text-sm);text-shadow:0 0 2px #2229}.material-label{font-size:var(--text-sm);display:block;margin:20px 0 9px}.select-wrap{position:relative}.select-wrap select{appearance:none;width:100%;border:1px solid #e4e8dc;background:#fff;border-radius:5px;padding:10px 12px;font-size:var(--text-sm);color:#6e795e}.select-wrap>span{position:absolute;right:12px;top:8px;color:#a8b199;pointer-events:none}.fabric-info{display:flex;align-items:center;justify-content:space-between;font-size:var(--text-xs);color:#a4ab98;margin-top:9px}.fabric-dot{height:5px;width:5px;background:#a5b18f;border-radius:50%}.outfit{border-top:1px solid var(--line);padding-top:21px;margin-top:23px}.outfit .text-button{font-size:var(--text-xs);color:#a2a997}.outfit-row{display:flex;align-items:center;gap:10px;margin-top:13px}.outfit-thumb{width:29px;height:32px;background:#f5f6f0;border-radius:4px;display:grid;place-items:center}.outfit-thumb svg{height:24px;width:22px;fill:var(--garment-colour);stroke:#0001;stroke-width:.7}.outfit-row strong{font-size:var(--text-sm);font-weight:500;display:block}.outfit-row small{font-size:var(--text-xs);color:#a6ad9b;display:block;margin-top:4px}.outfit-row>button{margin-left:auto;color:#a3ab96;font-size:15px}.save-look{margin:0;width:auto;min-height:30px;background:transparent;color:#72796c;border:0;height:auto;padding:3px 0;font-size:var(--text-sm);font-weight:500;line-height:1.4}.save-look:hover{color:#41483d;text-decoration:underline;text-underline-offset:3px}.button:hover{filter:brightness(1.06)}footer{display:flex;justify-content:space-between;margin:0 25px;padding:21px 0 20px;color:#a3aa99;font-size:var(--text-xs)}footer>span{display:flex;align-items:center;gap:8px}.footer-mark{font-size:15px;color:#97a889}.footer-divider{color:#d5dace;margin:0 7px}footer button{font-size:var(--text-xs);color:#969f8c;padding:0}footer button>span{margin-left:7px}dialog{border:1px solid #e1e5d8;border-radius:12px;padding:26px;width:min(540px,90vw);max-height:80vh;color:var(--ink);box-shadow:0 20px 100px #18261233}dialog::backdrop{background:#28332166;backdrop-filter:blur(4px)}.modal-top{display:flex;justify-content:space-between;align-items:center}.modal-top h2{font-size:21px;font-family:Manrope,sans-serif;margin:0}.modal-top button{font-size:25px;color:#8e9980}#modalBody{font-size:var(--text-body);line-height:1.8;color:#7b8670;margin-top:15px}#modalBody ul{padding-left:20px}.saved-look{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;border-bottom:1px solid var(--line);padding:14px 0}.saved-look strong{color:#48543e;font-size:var(--text-control)}.saved-look small{display:block;font-size:var(--text-sm)}.saved-look button{background:#edf1e5;border-radius:5px;padding:8px 12px;font-size:var(--text-sm)}.saved-look>div:first-child{min-width:0;overflow-wrap:anywhere}.saved-look-actions{display:flex;align-items:center;gap:6px}.saved-look .load-look{width:8.5rem;flex:none;white-space:nowrap}.saved-look .delete-look{display:grid;place-items:center;width:36px;min-height:36px;padding:8px;background:none;color:#a88b7b;margin:0;flex:none}#toast{position:fixed;bottom:25px;left:50%;transform:translate(-50%,20px);background:#34432e;color:white;padding:13px 24px;border-radius:8px;font-size:var(--text-control);opacity:0;transition:.2s;z-index:20;pointer-events:none;box-shadow:0 5px 25px #26332130}#toast.show{opacity:1;transform:translate(-50%,0)}[hidden]{display:none!important}button:disabled{opacity:.5;cursor:wait}@media(min-width:1500px){.workspace{grid-template-columns:310px minmax(500px,1fr) 330px;margin:30px auto 0;width:calc(100% - 70px);min-height:calc(100vh - 185px)}.panel{min-height:800px}.stage{min-height:820px}.stage-heading{left:45px}.measure-control{margin-bottom:28px}}@media(max-width:1200px){.header{padding:0 22px}.brand-tag,.brand-divider{display:none}.header nav{margin-right:0}.workspace{grid-template-columns:252px minmax(300px,1fr) 270px;margin:20px 16px 0}.panel{padding:23px 17px}.stage-heading{left:24px}.stage-heading h2{font-size:26px}.stage-heading em{font-size:29px}.stage-actions{right:15px}.scene-badge{font-size:var(--text-xs)}.scene-bottom{left:18px;right:18px;flex-wrap:wrap;justify-content:center;gap:14px}.orbit-hint{display:none}.header-actions{gap:14px}.colours{gap:8px}.colours button{width:21px;height:21px}.category-tabs button{font-size:var(--text-sm)}.garment-preview{height:86px}.panel-title h1,.panel-title h2{font-size:17px}}@media(max-width:900px){.header{height:73px}.save-status,.brand-tag{display:none}.workspace{grid-template-columns:230px minmax(300px,1fr);margin:15px}.wardrobe-panel{grid-column:1/-1;min-height:unset;margin-top:15px;display:grid;grid-template-columns:1fr 1fr;gap:0 30px}.wardrobe-panel>.panel-title,.wardrobe-panel>.panel-intro,.category-tabs,.clothing-grid{grid-column:1}.wardrobe-panel>.panel-intro{margin-bottom:0}.category-tabs{margin-top:15px}.clothing-grid{grid-template-columns:repeat(4,1fr);margin-bottom:0}.garment-preview{height:100px}.clothing-card h4{font-size:var(--text-xs)}.customise{grid-column:2;grid-row:1/5;border-top:0;padding-top:0}.outfit{grid-column:1}.stage{min-height:780px}.stage-actions{top:180px;left:24px;right:auto;align-items:flex-start}.header nav{gap:18px}.export{padding:0 11px;font-size:var(--text-sm)}.header-actions{gap:9px}.brand{font-size:29px}.brand-mark{width:26px;height:30px}footer{margin:0 17px}}@media(max-width:600px){.header{padding:0 15px}.brand{font-size:27px}.header nav{gap:10px;margin-left:12px}.nav-item{font-size:var(--text-sm)}.nav-item span{display:none}.profile{display:none}.export{font-size:0;width:34px;padding:0}.export svg{width:16px}.workspace{display:flex;flex-direction:column;margin:0 12px}.stage{order:0;width:100%;height:660px;min-height:660px}.measure-panel{order:1;min-height:unset;width:100%;padding:23px}.wardrobe-panel{order:2;display:block;width:100%;margin-top:12px;padding:23px}.stage-heading{left:12px;top:25px}.stage-heading h2{font-size:25px}.stage-heading em{font-size:29px}.stage-actions{left:auto;right:10px;top:29px;align-items:flex-end}.scene-badge{font-size:var(--text-xs);letter-spacing:.5px}.stage-heading .eyebrow{font-size:var(--text-xs)}.stage-heading p{font-size:var(--text-sm)}.view-tools{right:4px;top:45%}.avatar-label{bottom:110px}.scene-bottom{bottom:57px;left:5px;right:5px;justify-content:space-between}.simulation-controls{bottom:17px}.simulation-controls>span{font-size:var(--text-xs)}.measurements{display:grid;grid-template-columns:1fr 1fr;gap:0 24px}.measure-control{margin-bottom:24px}.unit-row{padding-bottom:20px}.skin-row{justify-content:space-between}.skin-tones{gap:12px}.wardrobe-panel .panel-intro{margin-bottom:25px}.clothing-grid{grid-template-columns:repeat(4,1fr);gap:8px;margin-bottom:22px}.garment-preview{height:85px}.garment-preview svg{height:65px;width:50px}.clothing-card h4{font-size:var(--text-xs);line-height:1.4;margin:8px 6px 4px}.clothing-card p{font-size:var(--text-xs);margin:0 6px 8px}.customise{border-top:1px solid var(--line);padding-top:20px}.colours{gap:15px}.colours button{width:27px;height:27px}.category-tabs button{font-size:var(--text-control)}.section-line h3{font-size:var(--text-control)}.colour-heading,.material-label{font-size:var(--text-control)}.outfit-row strong{font-size:var(--text-control)}.outfit-row small{font-size:var(--text-sm)}.outfit-thumb{width:35px;height:39px}footer{font-size:var(--text-xs);gap:12px;padding:20px 0}footer>span:first-child{max-width:145px}footer>span:last-child{font-size:0;gap:0}.footer-divider{display:none}footer button{font-size:var(--text-xs)}.panel-title h1,.panel-title h2{font-size:20px}}

/* Keep the complete fitting view on screen while the two tool panels scroll. */
.stage{overflow:clip}
.stage.detail-focus .stage-heading,.stage.detail-focus .avatar-label{display:none}
.colours{flex-wrap:wrap}
.fabric-hint{font-size:var(--text-xs);line-height:1.5;color:#939d87;margin:11px 0 0}
.outfit-row>.outfit-edit{display:flex;align-items:center;gap:10px;flex:1;min-width:0;margin-left:0;padding:3px 0;text-align:left;color:inherit;font-size:inherit;border-radius:4px}
.outfit-edit:hover{background:#f5f7f0}
.outfit-edit .outfit-thumb{flex-shrink:0}
@media (min-width:901px){
  .workspace{height:calc(100vh - 160px);min-height:650px;align-items:stretch}
  .workspace>.panel{height:100%;min-height:0;overflow-y:auto;scrollbar-width:thin;scrollbar-color:#dce2d3 transparent}
  .workspace>.stage{height:100%;min-height:0}
  .measure-control{margin-bottom:21px}
  .measure-label{margin-bottom:10px}
}
.pattern-options{display:flex;gap:14px;align-items:start;margin-top:12px}.pattern-options label{font-size:var(--text-sm);color:#7e8972;display:flex;flex:1;flex-direction:column;gap:7px}.pattern-options input[type=color]{width:100%;height:30px;padding:3px;background:#fff;border:1px solid #e4e8dc;border-radius:5px;cursor:pointer}.pattern-options select{height:30px;width:100%;background:white;color:#6e795e;border:1px solid #e4e8dc;border-radius:5px;padding:3px 7px;font-size:var(--text-sm)}

.body-type-row {display:grid;grid-template-columns:1fr 1fr;align-items:center;gap:9px;margin:20px 0;font-size:var(--text-control);color:var(--ink)}
.body-type-row select {width:100%;border:1px solid #dfe3da;background:#f8f9f5;border-radius:7px;padding:9px 12px;font:inherit;color:inherit}
.body-type-row small {grid-column:1/-1;font-size:var(--text-sm);color:#8c9289;line-height:1.5}
.hair-options{margin:-4px 0 18px;padding-bottom:3px;border-bottom:1px solid var(--line)}
.hair-options .body-type-row{grid-template-columns:minmax(5rem,38%) minmax(0,1fr);margin:12px 0;font-size:var(--text-sm)}
.hair-options select{min-width:0;padding:9px 7px}
.bust-help{font-size:var(--text-sm);line-height:1.65;color:#7e8972;margin:0 0 18px}
.category-tabs{gap:0}.category-tabs button{padding-left:2px;padding-right:2px;font-size:var(--text-xs)}
@media(max-width:600px){.category-tabs button{font-size:var(--text-sm)}}
.bust-details{grid-column:1/-1;margin:-6px 0 22px;border:1px solid #e5e8df;border-radius:8px;background:#fafbf7}
.bust-details summary{display:flex;align-items:center;gap:8px;padding:12px;font-size:var(--text-control);font-weight:500;color:var(--ink);cursor:pointer;list-style:none}
.bust-details summary::-webkit-details-marker{display:none}.bust-details summary span{font-size:var(--text-xs);border-radius:5px;background:#edf0e6;padding:2px 5px}.bust-details summary b{margin-left:auto;font-size:14px;font-weight:400;transition:transform .2s}.bust-details[open] summary b{transform:rotate(180deg)}
.bust-details-content{padding:0 12px 1px;animation:bust-reveal .2s ease-out}.bust-details .measure-control{margin-bottom:16px}.bust-details .bust-help{font-size:var(--text-sm);margin-bottom:15px}
@keyframes bust-reveal{from{opacity:0;transform:translateY(-6px)}to{opacity:1;transform:translateY(0)}}
@media(prefers-reduced-motion:reduce){.bust-details-content{animation:none}.bust-details summary b{transition:none}}
.category-tabs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:1px 6px}.category-tabs button{font-size:var(--text-sm);padding:10px 2px}
.measurement-section-label{font-size:var(--text-xs);letter-spacing:1.2px;color:#91988a;margin:0 0 16px}#overallMeasurement .measure-control{margin-bottom:22px}
@media(max-width:600px){#overallMeasurement{display:block}}

.category-tabs{grid-template-columns:repeat(4,minmax(0,1fr))}.category-tabs button{font-size:var(--text-sm)}

.bra-size-inputs{display:grid;grid-template-columns:1fr 1fr;gap:12px}.bra-size-inputs label{font-size:var(--text-sm);color:#7c8871}.bra-size-inputs select{display:block;margin-top:7px;width:100%;border:1px solid #dfe4d7;border-radius:5px;padding:9px;background:white;color:#45563a}.bust-help{font-size:var(--text-sm);line-height:1.6;color:#939d88}

.custom-fabric{border-top:1px solid var(--line);margin-top:17px;padding-top:1px}.fabric-upload{width:100%;font:inherit;font-size:var(--text-sm);color:#77846b}.fabric-upload::file-selector-button{border:1px solid #dce3d3;border-radius:5px;background:#f2f5ed;color:#516345;font:inherit;padding:9px 10px;margin-right:9px;cursor:pointer}.fabric-image-preview{display:flex;gap:11px;align-items:center;margin:15px 0}.fabric-image-preview img{width:58px;height:58px;object-fit:contain;background:repeating-conic-gradient(#e9ece4 0% 25%,#fff 0% 50%) 0/12px 12px;border:1px solid #e3e8db;border-radius:6px}.fabric-image-preview div{min-width:0}.fabric-image-preview strong{font-size:var(--text-sm);font-weight:500;display:block;overflow-wrap:anywhere}.fabric-image-preview small{display:block;font-size:var(--text-sm);color:#929d87;margin-top:5px}.fabric-scale-label{display:flex;justify-content:space-between;font-size:var(--text-sm);color:#7e8972;margin:14px 0 9px}#customPatternScale{width:100%;accent-color:#889d76;cursor:pointer}.remove-fabric-image{border:1px solid #e2e6da;border-radius:5px;padding:9px 10px;margin-top:12px;width:100%;font-size:var(--text-sm);color:#7b6f60}.remove-fabric-image:hover{background:#f8f6f1}.custom-fabric .fabric-hint{font-size:var(--text-sm);line-height:1.65}

/* Category choices slide out over the wardrobe; styling controls stay in place. */
.wardrobe-picker{position:relative;z-index:20;grid-column:1;min-width:0}
.wardrobe-picker .category-tabs{margin-bottom:16px}
.wardrobe-choices{position:absolute;top:100%;right:0;width:100%;box-sizing:border-box;background:var(--paper);border:1px solid var(--line);border-radius:12px;padding:14px;box-shadow:0 14px 38px #292c2a26;max-height:min(58vh,560px);overflow:auto;overscroll-behavior:contain;opacity:0;visibility:hidden;pointer-events:none;transform:translateX(22px);transition:transform .24s ease,opacity .20s ease,visibility 0s linear .24s}
.wardrobe-choices.is-open{opacity:1;visibility:visible;pointer-events:auto;transform:translateX(0);transition-delay:0s}
.wardrobe-choices-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}
.wardrobe-choices-heading strong{font-size:var(--text-body)}
.wardrobe-choices-heading button{background:transparent;border:0;width:30px;height:30px;border-radius:6px;font-size:23px;line-height:1}
.wardrobe-choices-heading button:hover{background:var(--bg)}
.wardrobe-choices .clothing-grid{grid-template-columns:repeat(2,minmax(0,1fr));margin:0;gap:10px}
@media(max-width:900px) and (min-width:601px){.wardrobe-picker{grid-row:3}.wardrobe-choices{width:min(420px,calc(100vw - 80px));left:0;right:auto}.wardrobe-choices .clothing-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:600px){.wardrobe-choices{max-height:55vh}.wardrobe-choices .clothing-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(prefers-reduced-motion:reduce){.wardrobe-choices{transition:none;transform:none}}

/* Keep every colour on one row, including narrow wardrobe panels. */
.colours{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));gap:6px;align-items:center}
.colours button{width:100%;max-width:23px;height:auto;aspect-ratio:1;justify-self:center;padding:0;min-width:0}
.colours button.active{outline-offset:2px}
@media(max-width:600px){.colours{gap:7px}.colours button{max-width:27px}}

/* Make the currently edited garment easy to identify. */
.customise .section-line{flex-wrap:nowrap;gap:8px;align-items:center}
.customise .section-line h3{flex-shrink:0;font-size:var(--text-xs)}
#selectedName{display:block;min-width:0;font-size:var(--text-xs);font-weight:700;line-height:1.4;color:#70402f;background:#f8e9e2;border:1px solid #edcbbb;border-radius:5px;padding:3px 6px;max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

.outfit-heading{margin:0}
#outfitToggle{display:flex;align-items:center;gap:9px;width:100%;padding:8px 0;text-align:left;font-size:var(--text-body);font-weight:600}
.outfit-count{display:inline-grid;place-items:center;min-width:23px;height:23px;padding:0 5px;box-sizing:border-box;border-radius:12px;background:#f8e9e2;color:#70402f;font-size:var(--text-control);font-weight:700}
.outfit-chevron{margin-left:auto;transition:transform .24s ease;font-size:18px}
#outfitToggle[aria-expanded="true"] .outfit-chevron{transform:rotate(180deg)}
.outfit-contents{display:grid;grid-template-rows:0fr;opacity:0;visibility:hidden;transition:grid-template-rows .26s ease,opacity .2s ease,visibility 0s linear .26s}
.outfit-contents.is-open{grid-template-rows:1fr;opacity:1;visibility:visible;transition-delay:0s}
.outfit-contents-inner{min-height:0;overflow:hidden}
.outfit-actions{display:flex;justify-content:center;padding:12px 0 4px}
#clearOutfit{display:inline-flex;align-items:center;gap:7px;padding:8px 4px;border:0;border-radius:0;background:transparent;color:#df8db2;font-size:var(--text-sm);font-weight:700;transition:color .18s ease}
#clearOutfit svg{width:21px;height:21px;stroke-width:1.8}
#clearOutfit:hover,#clearOutfit:focus-visible{color:#c52332}
.outfit-row>.remove-garment{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;width:32px;height:36px;padding:6px;border:0;background:transparent;color:#df8db2;transition:color .18s ease}
.remove-garment svg{width:19px;height:19px;stroke-width:1.8;pointer-events:none}
.outfit-row>.remove-garment:hover,.outfit-row>.remove-garment:focus-visible{color:#c52332}
@media(prefers-reduced-motion:reduce){.outfit-contents,.outfit-chevron{transition:none}}

/* Give the wardrobe category picker a clear, prominent control surface. */
.wardrobe-picker .category-tabs{padding:8px;gap:6px;background:#f5eee8;border:1px solid #dfcec0;border-radius:10px;box-shadow:0 2px 5px #49372708}
.wardrobe-picker .category-tabs button{padding:9px 3px;border:1px solid transparent;border-radius:6px;font-size:var(--text-sm);font-weight:600;color:#62584e;line-height:1.3;transition:background .15s,color .15s,border-color .15s}
.wardrobe-picker .category-tabs button:hover{background:#fffaf5;border-color:#dfcec0;color:#49382b}
.wardrobe-picker .category-tabs button.active{background:#fff;border-color:#c89e83;color:#70402f;box-shadow:0 1px 3px #49372712}
.wardrobe-picker .category-tabs button::after{display:none}
.wardrobe-picker .category-tabs button[aria-expanded="true"]{background:#f2dcd0;border-color:#c18b6d;color:#633821}
@media(max-width:600px){.wardrobe-picker .category-tabs button{font-size:var(--text-control);padding:10px 4px}}

.wardrobe-panel .customise{border-top:1px solid var(--line)}
@media(min-width:601px) and (max-width:900px){.wardrobe-panel .customise{border-top:0}}

/* Keep category controls clear against the panel background. */
.wardrobe-picker .category-tabs{background:transparent;border:0;box-shadow:none;padding:0}
.wardrobe-picker .category-tabs button{border:0;box-shadow:none;background:transparent}
.wardrobe-picker .category-tabs button:hover{background:#f7f3ef;border-color:transparent}
.wardrobe-picker .category-tabs button.active{background:transparent;border-color:transparent;box-shadow:none;color:#70402f;font-weight:700}
.wardrobe-picker .category-tabs button[aria-expanded="true"]{background:#f8e9e2;border-color:transparent;box-shadow:none;color:#633821}

/* Hover feedback must also apply to the currently selected category. */
.wardrobe-picker .category-tabs button:hover,.wardrobe-picker .category-tabs button.active:hover{background:#f8e9e2;color:#633821}

.wardrobe-picker .category-tabs{margin-top:8px}

.wardrobe-panel>.panel-intro{margin-bottom:6px}

.wardrobe-panel>.panel-intro{font-size:var(--text-control);font-weight:600;color:#62685e;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}

.pattern-colour-control{display:flex;flex:1;min-width:0;flex-direction:column;gap:7px}
.pattern-colour-control label{flex:none}
.pattern-options>label{min-width:0}

.previous-pattern-colour{display:flex;align-items:center;gap:6px;padding:4px 0;font-size:var(--text-sm);color:#62685e;text-align:left}
.previous-pattern-colour[hidden]{display:none}
.previous-colour-swatch{width:19px;height:19px;flex-shrink:0;border-radius:4px;border:1px solid #0002;background:var(--previous-colour)}
.previous-pattern-colour:hover{color:#70402f;text-decoration:underline}

.pattern-colour-button{display:flex;align-items:center;gap:7px;width:100%;height:30px;padding:3px 6px;border:1px solid #e4e8dc;border-radius:5px;background:#fff;font-size:var(--text-sm);color:#62685e}
.pattern-colour-button>span:first-child{width:24px;height:20px;border:1px solid #0002;border-radius:3px;background:var(--pattern-colour)}
.pattern-colour-dialog{width:min(330px,calc(100vw - 40px));max-height:85vh;overflow:auto;border:1px solid var(--line);border-radius:12px;padding:22px;color:var(--ink);box-sizing:border-box}
.pattern-colour-dialog::backdrop{background:#18221c55}
.colour-dialog-heading{display:flex;align-items:center;justify-content:space-between;margin-bottom:14px}
.colour-dialog-heading h2{font-size:17px;margin:0}.colour-dialog-heading button{font-size:24px;padding:3px 6px}
.pattern-colour-preview{height:64px;border-radius:7px;border:1px solid #0002;margin-bottom:14px}
.pattern-colour-dialog label{display:flex;justify-content:space-between;font-size:var(--text-control);font-weight:600;margin:12px 0 6px}
#patternColourHex{box-sizing:border-box;width:100%;padding:9px;border:1px solid #dce1d5;border-radius:5px}
.pattern-colour-dialog input[type=range]{width:100%;accent-color:#a36f51}
.recent-colours-title{font-size:var(--text-control);font-weight:600;margin:17px 0 9px}
.pattern-colour-history{display:flex;gap:10px;min-height:32px;align-items:center}
.pattern-colour-history>span{font-size:var(--text-control);color:var(--muted)}
.recent-pattern-colour{width:32px;height:32px;border-radius:5px;border:1px solid #0003}
.colour-dialog-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:20px}
.colour-dialog-actions button{padding:9px 12px;border:1px solid #dce1d5;border-radius:6px}
#applyPatternColour{background:#70402f;color:white;border-color:#70402f}

.pattern-colour-spectrum{position:relative;height:170px;margin:14px 7px 16px;border-radius:7px;border:1px solid #0002;background:linear-gradient(to top,#000,transparent),linear-gradient(to right,#fff,transparent),var(--spectrum-hue,red);touch-action:none;cursor:crosshair}
#patternColourMarker{position:absolute;width:12px;height:12px;border:2px solid white;border-radius:50%;box-shadow:0 0 0 1px #0009;transform:translate(-50%,-50%);pointer-events:none}
.pattern-colour-dialog .pattern-colour-hue{appearance:none;-webkit-appearance:none;height:14px;border-radius:8px;background:linear-gradient(to right,red,#ff0,#0f0,#0ff,#00f,#f0f,red);cursor:pointer;margin:9px 0}
.pattern-colour-hue::-webkit-slider-thumb{-webkit-appearance:none;width:19px;height:19px;border:2px solid #fff;border-radius:50%;background:transparent;box-shadow:0 0 0 1px #555}
.pattern-colour-hue::-moz-range-thumb{width:16px;height:16px;border:2px solid #fff;border-radius:50%;background:transparent;box-shadow:0 0 0 1px #555}

.pattern-colour-history{display:grid;grid-template-columns:repeat(5,32px);gap:10px}
.pattern-colour-history>span{grid-column:1/-1}

.pattern-colour-history{display:flex;flex-wrap:nowrap;gap:8px;overflow-x:auto;padding:3px 2px 8px;overscroll-behavior-x:contain}
.pattern-colour-history .recent-pattern-colour{flex:0 0 28px;width:28px;height:28px}
.pattern-colour-history>span{flex-shrink:0}

.pattern-colour-history{display:grid;grid-template-columns:repeat(10,minmax(0,1fr));gap:4px;overflow:visible;padding:3px 0;min-width:0}
.pattern-colour-history .recent-pattern-colour{width:100%;height:auto;aspect-ratio:1;min-width:0;border-radius:4px;padding:0}

.colour-dialog-heading h2{display:flex;align-items:center;gap:8px}
.colour-dialog-heading .pattern-colour-preview{display:inline-block;width:26px;height:26px;flex:0 0 26px;box-sizing:border-box;margin:0;border:1px solid #0003;border-radius:3px}

.colour-dialog-heading h2{margin-left:7px}


/* Keep the hat option visually inside its card, with independent controls. */

/* Keep the studio name readable across desktop and compact headers. */
.brand-name{font-size:22px;letter-spacing:-.7px;line-height:1.15}
.brand-logo{width:42px;height:42px;margin-right:12px;flex-shrink:0}
@media(max-width:600px){.brand-name{font-size:17px;letter-spacing:-.4px}.brand-logo{width:32px;height:32px;margin-right:8px}}

.measurement-disclosure{margin:0 0 22px;border:1px solid #e3e7dd;border-radius:8px;background:#fafbf7}
.measurement-disclosure>summary{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px;cursor:pointer;list-style:none;font-size:var(--text-control);font-weight:500}
.measurement-disclosure>summary::-webkit-details-marker{display:none}
.measurement-disclosure>summary small{display:block;margin-top:4px;font-size:var(--text-sm);font-weight:400;color:#8c9289}
.measurement-disclosure>summary::after{content:'+';font-size:20px;font-weight:400;color:#7c896f}
.measurement-disclosure[open]>summary::after{content:'−'}
.measurement-disclosure>summary:focus-visible{outline:2px solid var(--accent);outline-offset:3px;border-radius:8px}
.measurement-disclosure>.measurements{padding:12px 14px 0}

/* Keep selector labels and controls aligned in the compact wardrobe panel. */
.select-row{display:grid;grid-template-columns:80px minmax(0,1fr);align-items:center;gap:10px;margin-top:16px}
.select-row>.material-label{margin:0;line-height:1.5}
.select-row>.select-wrap{min-width:0}
.pattern-options{flex-direction:column;gap:12px}
.pattern-options>.pattern-colour-control,.pattern-options>label[for=patternScale]{display:grid;grid-template-columns:80px minmax(0,1fr);align-items:center;gap:10px;width:100%}
.pattern-options label[for=patternColour]{display:block;margin:0;line-height:1.5}
.bra-size-inputs{grid-template-columns:1fr}
.bra-size-inputs label{display:grid;grid-template-columns:80px minmax(0,1fr);align-items:center;gap:10px}
.bra-size-inputs select{margin-top:0}

/* Fluid type uses CSS viewport size, so high-density screens and browser zoom
   keep their normal scaling. Rem bounds also respect browser text preferences. */
:root{
  --text-xs:clamp(.75rem,calc(.68rem + .24vw),.9375rem);
  --text-sm:clamp(.8125rem,calc(.72rem + .26vw),1rem);
  --text-control:clamp(.875rem,calc(.76rem + .28vw),1.0625rem);
  --text-body:clamp(.9375rem,calc(.82rem + .3vw),1.125rem);
}
body{font-size:var(--text-body)}
button,input,select{line-height:1.35}
.panel-intro,.measure-note p,.fabric-hint,.clothing-card p,.outfit-row small,.bust-help{line-height:1.5}
.clothing-card h4,.clothing-card p,.outfit-row strong,.outfit-row small{overflow-wrap:anywhere}
.measure-number{width:3.4rem;min-height:2rem}
.measure-label{gap:10px;align-items:center}
.number-wrap{flex-shrink:0}
.category-tabs button{line-height:1.35;min-height:2.75rem;overflow-wrap:anywhere}
.select-wrap select{min-height:2.65rem;line-height:1.35;padding:.65rem 1.75rem .65rem .65rem}
.select-row,.pattern-options>.pattern-colour-control,.pattern-options>label[for=patternScale],.bra-size-inputs label{grid-template-columns:minmax(5rem,38%) minmax(0,1fr)}
.select-row>.material-label{overflow-wrap:anywhere}
.scene-bottom{flex-wrap:wrap;row-gap:12px}
.scene-bottom .view-switch,.physics-button{flex-shrink:0}
.simulation-controls{flex-wrap:wrap;padding:0 16px;line-height:1.4}
footer{flex-wrap:wrap;gap:12px;line-height:1.5}
.saved-look{gap:12px}
@media(max-width:600px){
  .measure-number,.select-wrap select,.bra-size-inputs select,.pattern-options select{font-size:1rem}
  .wardrobe-choices .clothing-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .scene-bottom{bottom:5.5rem}
  .simulation-controls{gap:6px 10px}
}
.category-tabs{grid-template-columns:repeat(3,minmax(0,1fr))}
.category-tabs button{overflow-wrap:normal;word-break:normal}
.wardrobe-panel>.panel-intro{white-space:normal;overflow:visible;text-overflow:clip;line-height:1.5}
@media(max-width:600px){.stage-actions{top:8px;right:16px;left:auto}.scene-badge{letter-spacing:.1px;gap:4px}.stage-heading{top:25px}.stage-heading>.eyebrow{display:block;max-width:205px}}
/* A more compact header retains room for the larger, responsive controls. */
.header{height:clamp(3.75rem,calc(3rem + 1.5vw),4.5rem);padding-inline:clamp(15px,1.5vw,28px)}
.brand-logo{width:clamp(32px,2.8vw,38px);height:clamp(32px,2.8vw,38px);margin-right:10px}
@media(max-width:600px){.brand-logo{margin-right:8px}}
.wardrobe-panel>.panel-intro{font-size:clamp(.75rem,calc(.58rem + .25vw),.875rem);white-space:nowrap}

/* Compact wardrobe choices keep the larger interface text readable. */
.wardrobe-picker .category-tabs{display:flex;flex-wrap:wrap;justify-content:flex-start;gap:4px;margin-top:12px;margin-bottom:12px}
.wardrobe-picker .category-tabs button{flex:0 0 auto;min-height:0;padding:6px 8px;font-size:var(--text-xs);line-height:1.25;white-space:nowrap;overflow-wrap:normal}
.wardrobe-choices{padding:10px;max-height:min(48vh,420px)}
.wardrobe-choices-heading{margin-bottom:8px}
.wardrobe-choices .clothing-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-bottom:0}
.wardrobe-choices .garment-preview{height:56px}
.wardrobe-choices .garment-preview svg{height:48px;width:44px}
.wardrobe-choices .clothing-card h4{margin:7px 7px 8px;line-height:1.3}
.wardrobe-choices .clothing-card p{display:none}
@media(max-width:900px){.wardrobe-choices{width:min(360px,calc(100vw - 80px))}}

.fabric-upload-help{position:relative;margin-top:8px}
.fabric-upload-tooltip{position:absolute;left:0;bottom:calc(100% + 9px);z-index:80;width:100%;box-sizing:border-box;background:#2f3d34;color:#fff;padding:11px 12px;border-radius:7px;box-shadow:0 5px 18px #18221b26;font-size:var(--text-sm);font-weight:400;line-height:1.5;visibility:hidden;opacity:0;pointer-events:none}
.fabric-upload-tooltip::after{content:'';position:absolute;top:100%;left:18px;border:6px solid transparent;border-top-color:#2f3d34}
.fabric-upload-help:hover .fabric-upload-tooltip,.fabric-upload-help:focus-within .fabric-upload-tooltip{visibility:visible;opacity:1}
.height-equivalent{margin:10px 0 0;font-size:var(--text-sm);line-height:1.4;color:#74806a}
/* Keep garment choosers narrow, with vertical scrolling inside the viewport. */
.wardrobe-choices{position:fixed;z-index:80;transform:none;max-height:calc(100dvh - 24px)}
#selectedName{background:#17191a;color:#fff;border:0;box-shadow:none}
.wardrobe-choices{display:block;padding:0;scroll-padding-top:3.4rem;overflow-x:hidden;overflow-y:auto;scrollbar-gutter:stable;scrollbar-width:thin;scrollbar-color:#aeb4aa #f3f4ef}
.wardrobe-choices-heading{position:sticky;top:0;z-index:3;margin:0;padding:10px;background:var(--paper);border-bottom:1px solid var(--line);align-self:start}
.wardrobe-choices-heading button{min-width:28px;min-height:28px}
.wardrobe-choices .clothing-grid{padding:10px;margin:0;box-sizing:border-box}

/* Flush title bars make the two control panels easier to scan. */
.measure-panel>.panel-title,.wardrobe-panel>.panel-title{background:linear-gradient(180deg,#bcc1c7,#9da4ac);color:#fff;text-shadow:0 1px 2px #3336;margin:-25px -23px 20px;padding:14px 23px;border-radius:11px 11px 0 0;min-height:50px}
.panel>.panel-title h1,.panel>.panel-title h2{color:#fff;margin:0;line-height:1.3}
.panel>.panel-title>svg{color:#fff}
.wardrobe-panel>.panel-title{margin-inline:-20px;padding-inline:20px}
@media(max-width:1200px){.measure-panel>.panel-title,.wardrobe-panel>.panel-title{margin:-23px -17px 20px;padding-inline:17px}}
@media(min-width:601px) and (max-width:900px){.wardrobe-panel>.panel-title{grid-column:1/-1;grid-row:1}.wardrobe-panel>.customise{grid-row:2/6}}
@media(max-width:600px){.measure-panel>.panel-title,.wardrobe-panel>.panel-title{margin:-23px -23px 20px;padding-inline:23px}}

/* Keep the page anchored; only control panels and dialogues may scroll. */
html{height:100%;overflow:hidden;overscroll-behavior:none}
body{height:100vh;height:100dvh;overflow:hidden;overscroll-behavior:none;display:flex;flex-direction:column}
.header,body>footer{flex-shrink:0}
.workspace{flex:1;min-height:0;height:auto;min-width:0;margin-bottom:0;overflow:hidden}
.workspace>.stage{height:100%;min-height:0;min-width:0}
.workspace>.panel{height:100%;min-height:0;min-width:0;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin}
.compact-panel-tabs{display:none}
body>footer{padding-block:12px}
@media(max-width:900px){
 .workspace{display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1fr) auto minmax(0,.65fr);width:auto;margin:0 12px;gap:8px}
 .workspace>.stage{grid-column:1;grid-row:1;order:0;width:100%;height:100%;min-height:0}
 .compact-panel-tabs{display:flex;grid-column:1;grid-row:2;justify-content:center;gap:8px}
 .compact-panel-tabs button{border:1px solid var(--line);border-radius:6px;padding:6px 16px;background:var(--paper);font-size:var(--text-sm);font-weight:600}
 .compact-panel-tabs button[aria-pressed="true"]{background:var(--ink);color:#fff}
 .workspace>.panel{grid-column:1;grid-row:3;order:0;width:100%;height:100%;min-height:0;margin:0;display:block}
 .workspace[data-controls="wardrobe"]>.measure-panel,.workspace[data-controls="measurements"]>.wardrobe-panel{display:none}
 .stage-heading{top:12px}.stage-heading h2{font-size:21px}.stage-heading p{display:none}
 .stage-actions{top:10px}.scene-bottom{bottom:42px}.simulation-controls{bottom:8px}
 .simulation-controls>span{display:none}.view-tools{top:50%;transform:translateY(-50%);gap:0;padding:2px}
 .view-tools .tool{width:28px;height:28px}.view-tools>span{margin-block:2px}
 body>footer{padding-block:6px;font-size:var(--text-xs)}
}

/* Local progress feedback beside the control that started the update. */
.working-indicator{position:fixed;z-index:1000;width:20px;height:20px;pointer-events:none;border-radius:50%;background:var(--paper);box-shadow:0 0 0 3px var(--paper)}
.working-wheel{display:block;width:100%;height:100%;border:2px solid #dce0d8;border-top-color:var(--accent);border-right-color:var(--accent);border-radius:50%;animation:working-spin .75s linear infinite;will-change:transform}
.working-description{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
@keyframes working-spin{to{transform:rotate(360deg)}}
@media(prefers-reduced-motion:reduce){.working-wheel{animation:working-spin 2s linear infinite}}

/* Selector updates use the adjacent working indicator, without a red ring. */
select:focus-visible{outline:none}

/* Separate measurement sections with space, without divider lines. */
.measure-panel .unit-row,.measure-panel .hair-options{border:0}
.measure-panel .measurement-disclosure,.measure-panel .bust-details{border:0;background:transparent}
.measure-panel .measurement-disclosure>summary{padding:12px 0}
.measure-panel .measurement-disclosure>.measurements{padding:12px 0 0}
.measure-panel .measure-note{margin:0 0 22px}
.measure-panel .skin-row{margin:18px 0}
.hair-options{padding:0;margin:0 0 12px}
.hair-toggle{display:flex;align-items:center;gap:8px;width:100%;padding:10px 0;text-align:left;font-weight:600;font-size:var(--text-control)}
#hairSummary{margin-left:auto;font-size:var(--text-sm);font-weight:400;color:var(--muted)}
.hair-settings{position:fixed;z-index:95;padding:16px 18px;background:var(--paper);border-radius:10px;box-shadow:0 12px 36px #29352d26;overflow:auto;opacity:0;visibility:hidden;transform:translateX(-12px);transition:opacity .2s ease,transform .25s ease,visibility 0s linear .25s}
.hair-settings.is-open{opacity:1;visibility:visible;transform:translateX(0);transition-delay:0s}
.hair-settings-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:10px;font-size:var(--text-control)}
.hair-settings-heading button{font-size:24px;line-height:1;color:var(--muted);padding:2px 5px}
.hair-settings .body-type-row{margin:14px 0}
.pdf-export{background:linear-gradient(180deg,#bcc1c7,#9da4ac);color:#fff;font-weight:600;text-shadow:0 1px 2px #3336}
.pdf-export:hover{background:linear-gradient(180deg,#adb4bc,#8e97a1)}
@media(prefers-reduced-motion:reduce){.hair-settings{transition:none;transform:none}}

/* Slightly denser side columns, preserving control and type sizes. */
.measure-panel,.wardrobe-panel{line-height:1.4}
.measure-panel .measure-note p,.measure-panel .body-type-row small,.wardrobe-panel .panel-intro,.wardrobe-panel .fabric-hint,.wardrobe-panel .outfit-row small{line-height:1.4}
.measure-panel .body-type-row{margin-block:16px}
.measure-panel .skin-row{margin-block:14px}
.measure-panel .unit-row{padding-block:14px 18px}
.measure-panel .measure-control{margin-bottom:22px}
.measure-panel .measure-note{padding-block:13px;margin-bottom:18px}
.wardrobe-panel .outfit-row{margin-top:10px}
.wardrobe-panel .select-row{margin-block:14px}
.settings-chevron{margin-left:auto}
.measure-panel #otherMeasurements{margin-bottom:14px}
.measure-panel{overflow-x:hidden;scrollbar-gutter:stable;scroll-padding-top:4rem}
.measure-panel:has(.hair-settings.is-open){z-index:95}
.view-tools{z-index:3}
.measure-panel>.panel-title{position:sticky;top:-25px;z-index:4}
@media(max-width:1200px){.measure-panel>.panel-title{top:-23px}}
.measurement-settings{overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;scrollbar-gutter:stable;scrollbar-width:thin;scrollbar-color:#aeb4aa #f3f4ef;scroll-padding-top:4rem}
.measurement-settings>.hair-settings-heading{position:sticky;top:-16px;z-index:3;margin:-16px -18px 14px;padding:16px 18px 12px;background:var(--paper);border-bottom:1px solid var(--line)}
.measurement-settings .measurements{display:grid;grid-template-columns:minmax(0,1fr);gap:0}
.measurement-settings .bust-details{grid-column:1/-1}
@media(max-width:600px){.measurement-settings .measurements{grid-template-columns:1fr}}



/* Share the available studio width instead of overlapping absolute overlays. */
.stage-top{position:absolute;z-index:2;top:29px;left:32px;right:27px;display:flex;flex-wrap:wrap;align-items:flex-start;justify-content:space-between;gap:10px 18px;pointer-events:none}
.stage-top>.stage-heading,.stage-top>.stage-actions{position:static;min-width:0;max-width:100%}
.stage-top>.stage-heading{flex:0 1 auto}
.stage-top>.stage-actions{flex:0 0 auto;margin-left:auto;align-items:flex-end;pointer-events:auto}
@media(min-width:1500px){.stage-top{left:45px}}
@media(max-width:1200px){.stage-top{left:24px;right:15px}}
@media(max-width:900px){.stage-top{top:12px}}
@media(max-width:600px){.stage-top{left:12px;right:16px}}

/* Compact export controls and a cancellable GIF preview, without extra dividers. */
#exportGIF{gap:7px;white-space:nowrap}
.gif-export-dialog{width:min(400px,calc(100vw - 32px));border:0;border-radius:14px;padding:24px;background:#fff;color:#454746;box-shadow:0 18px 80px #25302733}
.gif-export-dialog::backdrop{background:#25302766}
.gif-export-dialog h2{font-size:19px;margin:0 0 12px}
.gif-export-dialog p{margin:0 0 18px;font-size:14px}
.gif-export-dialog progress{width:100%;accent-color:#a87566;height:10px;margin-bottom:20px}
.gif-export-dialog img{display:block;max-width:100%;max-height:45vh;margin:0 auto 18px;border-radius:8px}
.gif-export-dialog img[hidden],.gif-export-dialog [hidden]{display:none}
.gif-export-actions{display:flex;gap:12px;justify-content:center;align-items:center}
.gif-export-actions a{text-decoration:none;display:inline-flex;align-items:center}
@media(max-width:1100px){.header-actions{gap:7px}.header-actions .save-status{display:none}#exportGIF{padding:10px 12px}.header-actions .export{font-size:12px}}

.gif-export-actions .button{padding:10px 17px;border-radius:7px;font-size:14px;font-weight:600;line-height:1.3}
.gif-export-actions button{background:#eef0eb;color:#454746}
.gif-export-actions button:hover{background:#e2e6dd}

.wardrobe-random-tools{display:flex;align-items:center;gap:5px;margin-left:8px}
.wardrobe-random-tools button{display:inline-flex;align-items:center;justify-content:center;gap:5px;padding:6px 7px;border-radius:6px;background:#ffffff26;color:#fff;font-size:12px;font-weight:600;white-space:nowrap;text-shadow:0 1px 2px #3334}
.wardrobe-random-tools button:hover{background:#ffffff45}
.wardrobe-random-tools svg{width:16px;height:16px;flex:none}
#undoRandomOutfit{padding:6px 4px;background:transparent}
