:root{color-scheme:light;--ink:#263f50;--muted:#687881;--paper:#f9f6f0;--white:#fffdfa;--blue:#284a60;--line:#e0e4e1;--orange:#b95332;--gold:#eac27c;--softblue:#e8f0f3;--radius:20px;font-family:ui-sans-serif,system-ui,-apple-system,"Noto Sans TC","Microsoft JhengHei",sans-serif;font-size:16px;color:var(--ink);background:var(--paper)}
*{box-sizing:border-box}body{margin:0}button,input,select{font:inherit}button,a,input{touch-action:manipulation}button{cursor:pointer}button:disabled{cursor:not-allowed;opacity:.55}button,a{ -webkit-tap-highlight-color:transparent}a{color:var(--blue)}button:focus-visible,a:focus-visible,input:focus-visible,summary:focus-visible{outline:3px solid #d99746;outline-offset:4px}button{color:inherit}h1,h2,h3,p{margin:0}h1,h2,.serif{font-family:"Iowan Old Style","Noto Serif TC","Songti TC","PMingLiU",serif}h1{font-size:2rem;font-weight:600;line-height:1.4}h2{font-size:1.6rem;line-height:1.5}h3{font-size:1rem;font-weight:650}p{line-height:1.7}.muted{color:var(--muted)}.small{font-size:.875rem}.eyebrow{font-size:.75rem;letter-spacing:.16em;color:var(--muted)}.icon{width:21px;height:21px;flex-shrink:0;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}.shell{max-width:1620px;min-height:100vh;margin:auto;display:grid;grid-template-columns:218px 1fr}.rail{border-right:1px solid var(--line);padding:38px 24px 26px;display:flex;flex-direction:column;gap:38px;position:sticky;top:0;height:100vh;min-height:620px}.brand{display:flex;gap:11px;align-items:center;text-decoration:none;color:var(--ink)}.brand-mark{background:var(--blue);color:#fbe8c6;width:45px;height:45px;border-radius:13px;display:grid;place-items:center}.brand-mark .icon{height:26px;width:26px}.brand-title{font-family:"Noto Serif TC","PMingLiU",serif;font-weight:700;font-size:1.6rem;letter-spacing:.08em}.brand small{display:block;font-size:.75rem;letter-spacing:.12em;margin-top:4px}.nav{display:flex;flex-direction:column;gap:7px}.nav button{border:0;background:none;text-align:left;padding:14px 15px;border-radius:13px;display:flex;align-items:center;gap:13px;font-size:.94rem;white-space:nowrap}.nav button.active{background:var(--blue);color:white;box-shadow:0 5px 14px #263f5018}.nav button:hover:not(.active){background:#e9eeeb}.rail-bottom{margin-top:auto;display:flex;flex-direction:column;gap:14px}.edition{border-top:1px solid var(--line);padding-top:19px;font-size:.75rem;color:var(--muted);line-height:1.8}.edition span{font-size:.875rem;display:block;color:var(--ink)}.main{min-width:0;padding:30px 40px}.topbar{display:flex;align-items:center;justify-content:space-between;gap:16px;padding-bottom:25px;border-bottom:1px solid var(--line);min-height:70px}.top-title{display:flex;align-items:center;gap:10px;font-size:.875rem;color:var(--muted)}.top-title .tag{font-size:.75rem}.wallet{display:flex;align-items:center;gap:11px;padding:9px 15px;background:#f7e8cb;border:1px solid #ecd7b2;border-radius:999px;font-size:.875rem;color:#6c4a18}.wallet strong{font-size:1.25rem;font-variant-numeric:tabular-nums;color:#523d1d}.coin{display:inline-grid;place-items:center;flex-shrink:0;background:#e8bc64;color:#63441a;border-radius:50%;height:24px;width:24px;font:700 .875rem Georgia,serif;border:1px solid #cfa251;box-shadow:inset 0 0 0 3px #f2dba5}.page-heading{display:flex;justify-content:space-between;align-items:center;gap:15px;margin:27px 0 24px}.page-heading p{font-size:.875rem;color:var(--muted);margin-top:7px}.pill{display:inline-flex;align-items:center;gap:6px;font-size:.8125rem;padding:6px 10px;border-radius:7px;background:var(--softblue);color:var(--blue);white-space:nowrap}.workspace{display:grid;grid-template-columns:minmax(275px, .88fr) minmax(390px,1.12fr);gap:24px;align-items:start}.portrait-panel{position:sticky;top:24px;background:#e8eef0;border:1px solid #d8e1e4;border-radius:22px;overflow:hidden}.portrait-top{display:flex;justify-content:space-between;align-items:center;padding:19px 23px;font-size:.8125rem;color:#4c687a}.portrait-top .icon{width:17px;height:17px}.portrait-stage{position:relative;min-height:370px;aspect-ratio:4/4.8;display:grid;place-items:center;background:radial-gradient(ellipse at 50% 50%,#f5f7f5 0 53%,transparent 53.3%);margin:0 18px}.portrait-stage:after{content:"";position:absolute;bottom:11%;width:45%;height:18px;filter:blur(7px);background:#4c71851c;border-radius:50%;z-index:0}.avatar-canvas{position:relative;z-index:1;width:100%;height:100%;object-fit:contain;max-height:540px;display:block}.portrait-bottom{display:flex;flex-direction:column;align-items:center;padding:0 20px 21px;gap:7px}.portrait-name{font-size:1.4rem;font-family:"Noto Serif TC","PMingLiU",serif;font-weight:600}.portrait-note{font-size:.8125rem;color:#5e7380}.portrait-actions{display:flex;gap:8px;padding:15px 18px;border-top:1px solid #d6e0e4;background:#f3f6f6}.portrait-actions .btn{flex:1;font-size:.875rem;padding:10px 7px}.editor-panel{border:1px solid var(--line);border-radius:22px;background:var(--white);min-width:0;overflow:hidden}.editor-tabs{display:flex;gap:3px;border-bottom:1px solid var(--line);padding:10px 13px 0;overflow:auto}.editor-tabs button{background:none;border:0;border-bottom:3px solid transparent;padding:13px 15px 15px;white-space:nowrap;font-size:.875rem;color:var(--muted)}.editor-tabs button.active{color:var(--blue);border-color:var(--blue);font-weight:650}.editor-body{padding:25px}.field-block+.field-block{margin-top:27px}.field-label{display:flex;justify-content:space-between;gap:12px;align-items:center;margin-bottom:13px;font-size:.875rem;font-weight:650}.field-label span{font-size:.8125rem;color:var(--muted);font-weight:400}.choice-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:10px}.choice-grid.three{grid-template-columns:repeat(3,1fr)}.choice{background:#f7f7f2;border:1px solid #e6e8df;min-height:86px;border-radius:13px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;padding:9px 5px;transition:background .15s,border-color .15s,transform .15s;position:relative;font-size:.8125rem}.choice:hover{transform:translateY(-2px);border-color:#abc0cd}.choice.selected{background:#eaf0f1;border:2px solid #32576e;padding:8px 4px}.choice.selected:after{content:'✓';background:var(--blue);color:white;position:absolute;right:-4px;top:-5px;border-radius:50%;width:20px;height:20px;display:grid;place-items:center;font-size:.75rem}.choice canvas{width:56px;height:50px;object-fit:contain}.choice.hair{min-height:110px}.choice.hair canvas{width:63px;height:70px}.swatches{display:flex;flex-wrap:wrap;gap:13px}.swatch{height:34px;width:34px;border:1px solid #0002;border-radius:50%;box-shadow:inset 0 0 0 3px #fff7;position:relative}.swatch.selected{outline:2px solid var(--ink);outline-offset:4px}.swatch.selected:after{content:'✓';position:absolute;right:-5px;bottom:-3px;width:15px;height:15px;background:var(--ink);color:white;font-size:10px;border-radius:50%;display:grid;place-items:center}.slider-row{display:grid;grid-template-columns:90px 1fr 35px;gap:12px;align-items:center;margin-top:17px;font-size:.875rem}.slider-row output{text-align:right;color:var(--muted);font-size:.8125rem}.slider-row input{width:100%;accent-color:var(--blue);min-height:24px}.edit-tip{padding:17px 22px;background:#f7f6ef;border-top:1px solid var(--line);font-size:.8125rem;color:#6e746d;line-height:1.6;display:flex;gap:9px;align-items:flex-start}.edit-tip .icon{width:17px;height:17px;margin-top:2px}.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;background:var(--white);border:1px solid #d5dedf;border-radius:10px;padding:11px 16px;font-size:.875rem;text-decoration:none;line-height:1.5;font-weight:550}.btn:hover{background:#f0f3ef}.btn.primary{background:var(--blue);border-color:var(--blue);color:white}.btn.primary:hover{background:#1c3a4f}.btn.warm{color:#714915;background:#f5e4c4;border-color:#e8cfaa}.btn.text{border:0;background:transparent;padding:6px 0;font-weight:400}.btn.danger{background:#fff1eb;color:#9d3d29;border-color:#edc5b7}.btn.full{width:100%}.btn .icon{height:18px;width:18px}.notice{padding:14px 17px;background:#fff2db;border:1px solid #ead0a7;border-radius:12px;margin:15px 0;font-size:.875rem;line-height:1.7;color:#785021}.error-text{color:#a03924;font-size:.875rem;min-height:21px;margin-top:7px}.form-card{border:1px solid var(--line);background:var(--white);border-radius:20px;padding:27px}.form-card h2{margin-bottom:22px}.form-row{margin-bottom:19px}.form-row label:not(.check-label){display:block;font-size:.875rem;font-weight:600;margin-bottom:8px}.input{width:100%;background:white;border:1px solid #d4dedf;border-radius:9px;padding:11px 13px;color:var(--ink);font-size:1rem;line-height:1.5;min-height:46px}.input:focus{border-color:#3d6982;outline:2px solid #8fabb533;outline-offset:0}.input::placeholder{color:#849195}.help{font-size:.8125rem;color:var(--muted);line-height:1.6;margin-top:7px}.check-label{display:flex;gap:10px;align-items:flex-start;line-height:1.5;font-size:.875rem;cursor:pointer}.check-label input{width:18px;height:18px;accent-color:var(--blue);flex-shrink:0;margin-top:3px}.award-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}.award-option{background:#f6f5ef;border:1px solid #e2e3d9;border-radius:12px;padding:14px}.award-option strong{display:block;color:#8b5c21;font-size:.875rem;margin-top:3px}.reward-box{display:flex;align-items:center;justify-content:space-between;background:#f9ecd3;border:1px solid #ebd3a7;border-radius:13px;padding:15px 18px;margin:20px 0}.reward-box strong{font-size:1.6rem;color:#825817;display:flex;align-items:center;gap:9px}.register-layout{display:grid;grid-template-columns:minmax(340px,1.1fr) minmax(280px,.9fr);gap:24px;align-items:start}.ledger{display:flex;flex-direction:column;gap:12px}.ledger-item{padding:17px;background:var(--white);border:1px solid var(--line);border-radius:13px}.ledger-header{display:flex;justify-content:space-between;gap:12px;align-items:start}.ledger-header a{font-size:.9375rem;line-height:1.6;text-decoration:none;overflow-wrap:anywhere}.ledger-header a:hover{text-decoration:underline}.ledger-value{font-weight:700;color:#91611c;white-space:nowrap}.ledger-meta{display:flex;flex-wrap:wrap;align-items:center;gap:6px;margin-top:10px}.tag{background:#eef1ed;border:1px solid #e1e6df;border-radius:5px;padding:3px 7px;font-size:.75rem;line-height:1.5;color:#546459}.tag.gold{background:#f7ead3;border-color:#ead4ae;color:#8a6025}.tag.blue{background:#e8eff3;color:#3d647b;border-color:#d4e1e8}.section-label{display:flex;justify-content:space-between;gap:12px;margin-bottom:17px;align-items:center}.empty{padding:36px 20px;border:1px dashed #c9d6d7;border-radius:16px;text-align:center;color:var(--muted);background:#f7f9f7}.empty>.icon{width:39px;height:39px;margin-bottom:13px;color:#87a0ac}.empty h3{color:var(--ink);margin-bottom:8px}.empty p{font-size:.875rem}.rules{margin-top:20px;font-size:.875rem;color:var(--muted);line-height:1.8}.rules summary{cursor:pointer;color:var(--ink);margin-bottom:10px}.rules ul{padding-left:21px;margin:0}.shop-layout{display:grid;grid-template-columns:minmax(250px,.74fr) minmax(430px,1.26fr);gap:24px;align-items:start}.shop-filters{display:flex;gap:7px;flex-wrap:wrap;margin-bottom:19px}.filter{background:none;border:1px solid #d6dedd;border-radius:999px;padding:8px 14px;font-size:.875rem}.filter.active{background:var(--blue);color:white;border-color:var(--blue)}.shop-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}.product{border:1px solid var(--line);border-radius:15px;background:var(--white);padding:10px;min-width:0}.product-art{aspect-ratio:1;display:grid;place-items:center;border-radius:10px;background:#f1f2ec;position:relative;overflow:hidden}.product:nth-child(3n+2) .product-art{background:#eaf0f3}.product:nth-child(3n) .product-art{background:#f5eae0}.product-art canvas{height:100%;width:100%;object-fit:contain}.product-badge{position:absolute;right:6px;top:6px;background:#fffffff2;color:#527060;font-size:.75rem;padding:3px 6px;border-radius:5px}.product-name{font-size:.875rem;font-weight:600;margin:11px 1px 8px;line-height:1.5}.product-actions{display:flex;justify-content:space-between;gap:6px;align-items:center}.product-actions button{font-size:.8125rem;border:0;background:none;padding:6px 2px;display:flex;align-items:center;gap:4px;color:#456576}.product-actions button.price{border:1px solid #e6d7b7;background:#fcf4e5;border-radius:7px;padding:5px 7px;color:#79571e}.product-actions .coin{height:17px;width:17px;font-size:.65rem;box-shadow:none}.trybar{padding:12px 18px;border-top:1px solid #d8d7c6;background:#faf0d6;text-align:center;color:#775d2c;font-size:.875rem;line-height:1.6}.trybar .btn{margin:7px 3px 0;font-size:.8125rem}.wardrobe-count{font-size:.875rem;color:var(--muted);margin-bottom:16px}.settings-layout{display:grid;grid-template-columns:1fr 1fr;gap:24px;align-items:start}.settings-layout .form-card{min-height:100%}.stack{display:flex;flex-direction:column;gap:11px}.backup-info{border-top:1px solid var(--line);margin-top:20px;padding-top:19px}.backup-info p{font-size:.875rem;margin-bottom:13px;color:var(--muted)}.account-top{display:flex;gap:14px;align-items:center;padding-bottom:20px;border-bottom:1px solid var(--line);margin-bottom:20px}.initial{font-family:serif;font-size:1.8rem;background:#e9eff0;border:1px solid #d5e0e0;border-radius:50%;height:57px;width:57px;display:grid;place-items:center}.account-top p{font-size:.8125rem;color:var(--muted)}.stat-row{display:flex;justify-content:space-between;gap:12px;padding:10px 0;border-bottom:1px solid #edf0ec;font-size:.875rem}.stat-row strong{font-size:1rem}.mobile-brand{display:none}.boot{min-height:100vh;display:grid;place-content:center;justify-items:center;gap:15px;color:var(--muted)}.boot-mark{width:60px;height:60px;background:var(--blue);color:white;border-radius:18px;font-family:serif;font-size:2rem;display:grid;place-items:center}.art-error{margin:16px;padding:15px;background:#fff5e1;color:#715523;border:1px solid #e4cf9e;border-radius:10px;font-size:.875rem;line-height:1.6}.no-scroll{overflow:hidden}dialog{border:1px solid #dbe0dc;border-radius:21px;padding:0;width:min(460px,calc(100% - 28px));color:var(--ink);background:var(--white);box-shadow:0 30px 100px #172c4040}dialog::backdrop{background:#18324566;backdrop-filter:blur(3px)}.modal-inner{padding:27px}.modal-top{display:flex;justify-content:space-between;align-items:start;gap:15px;margin-bottom:17px}.modal-top h2{font-size:1.4rem}.close{border:0;background:transparent;padding:3px;font-size:1.4rem;color:var(--muted)}.modal-buttons{display:flex;gap:10px;justify-content:flex-end;margin-top:25px}.modal-copy{font-size:.9375rem;line-height:1.8}.modal-product{width:120px;height:140px;display:block;margin:5px auto 20px;background:#f3f2e9;border-radius:15px}#toast{position:fixed;bottom:24px;left:50%;transform:translate(-50%,20px);padding:13px 20px;background:var(--ink);color:white;border-radius:12px;box-shadow:0 8px 35px #0002;opacity:0;pointer-events:none;transition:opacity .2s,transform .2s;z-index:999;max-width:calc(100% - 30px);font-size:.875rem;line-height:1.6;text-align:center}#toast.show{opacity:1;transform:translate(-50%,0)}.save-status{font-size:.75rem;color:var(--muted);min-height:20px}.subtle-sep{height:1px;background:var(--line);margin:24px 0}.feature-list{display:flex;gap:9px;flex-wrap:wrap;font-size:.8125rem;color:var(--muted);margin-top:15px}.feature-list span{background:#f0f2ed;padding:4px 9px;border-radius:5px}
@media(min-width:1450px){.main{padding:32px 50px}.workspace{gap:32px}.editor-body{padding:30px}.choice{min-height:96px}.portrait-stage{min-height:430px}}
@media(max-width:1180px){.shell{grid-template-columns:175px 1fr}.rail{padding:30px 17px}.brand-title{font-size:1.35rem}.brand small{font-size:.65rem}.brand-mark{width:37px;height:37px}.main{padding:24px}.workspace{grid-template-columns:minmax(240px,.85fr) minmax(320px,1.15fr);gap:18px}.editor-body{padding:20px}.editor-tabs button{padding:11px 10px 14px}.choice-grid{gap:8px}.shop-layout{grid-template-columns:minmax(220px,.8fr) minmax(330px,1.2fr);gap:19px}.shop-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.portrait-stage{min-height:300px}.register-layout{grid-template-columns:1fr}.register-layout .ledger{display:grid;grid-template-columns:1fr 1fr}.settings-layout{grid-template-columns:1fr}}
@media(max-width:880px){.shell{display:block;padding-bottom:83px}.rail{height:auto;min-height:0;padding:0;position:fixed;bottom:0;top:auto;left:0;right:0;z-index:50;border-right:0;border-top:1px solid #d9e0dd;background:#fffef9f7;backdrop-filter:blur(10px);display:block}.rail>.brand,.rail-bottom{display:none}.nav{display:grid;grid-template-columns:repeat(5,1fr);gap:0;max-width:600px;margin:auto}.nav button{flex-direction:column;gap:5px;justify-content:center;padding:12px 2px 13px;border-radius:0;font-size:.75rem}.nav button.active{background:none;color:var(--blue);box-shadow:inset 0 3px var(--blue);font-weight:700}.nav button:not(.active){color:#78848b}.nav .icon{height:22px;width:22px}.main{padding:19px 22px}.mobile-brand{display:flex;align-items:center;gap:8px;font-family:serif;font-weight:700;font-size:1.3rem}.mobile-brand .brand-mark{width:33px;height:33px;border-radius:10px}.top-title{display:none}.topbar{padding-bottom:15px}.wallet{padding:7px 12px}.wallet .wallet-label{display:none}.wallet strong{font-size:1.12rem}.page-heading{margin:22px 0 20px}.workspace{grid-template-columns:minmax(240px,.85fr) minmax(315px,1.15fr)}.portrait-top{padding:15px}.portrait-panel{top:16px}.portrait-stage{margin:0 5px}.portrait-actions{padding:12px 9px}#toast{bottom:94px}}
@media(max-width:650px){h1{font-size:1.65rem}.main{padding:15px}.workspace,.shop-layout{grid-template-columns:1fr}.page-heading{align-items:flex-start}.page-heading p{font-size:.8125rem}.page-heading>.pill{display:none}.portrait-panel{position:static}.portrait-stage{min-height:0;height:300px;aspect-ratio:auto;margin:0 30px;background-size:contain}.portrait-stage .avatar-canvas{max-width:270px}.portrait-top{padding:13px 18px}.portrait-bottom{padding-bottom:15px;gap:4px}.portrait-name{font-size:1.25rem}.portrait-actions{padding:11px 14px}.editor-body{padding:21px}.editor-tabs{justify-content:space-around}.editor-tabs button{flex:1;padding-left:6px;padding-right:6px}.choice.hair{min-height:106px}.shop-layout .portrait-stage{height:235px}.shop-layout .portrait-stage .avatar-canvas{max-width:220px}.shop-layout .portrait-bottom{padding-bottom:13px}.shop-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.product{padding:8px}.product-name{font-size:.8125rem;min-height:40px;margin-bottom:3px}.product-actions{gap:3px;flex-wrap:wrap}.product-actions button{font-size:.75rem}.product-actions button.price{padding:4px 5px}.register-layout .ledger{grid-template-columns:1fr}.form-card{padding:22px 19px}.register-layout{display:block}.register-layout>section+section{margin-top:28px}.award-grid{gap:9px}.award-option{padding:12px 10px}.settings-layout{gap:18px}.pill{font-size:.75rem}.slider-row{grid-template-columns:75px 1fr 30px}.portrait-note{font-size:.75rem}.shop-filters{gap:7px}.filter{padding:7px 12px;font-size:.8125rem}.modal-inner{padding:23px}.modal-buttons{flex-wrap:wrap}.form-card h2{font-size:1.4rem}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}

/* Collection shelving keeps all three budgets visible alongside the live fitting room. */
.product{display:flex;flex-direction:column}
.product[data-collection="couture"]{border-color:#cfc1a6}
.product[data-collection="couture"] .product-art{background:#eee9df}
.product[data-collection="atelier"] .product-art{background:#e9eef0}
.product-note{font-size:.875rem;line-height:1.55;color:var(--muted);margin:0 1px 12px}
.product-actions{margin-top:auto}
@media(max-width:650px){.product-name{font-size:.875rem;min-height:0}.product-note{font-size:.875rem}.product-actions button{font-size:.875rem;min-height:36px}.filter{font-size:.875rem}}
@media(max-width:430px){.shop-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}}
.portrait-stage.tall-body:after{bottom:6.5%}

/* Fine tuning keeps the face visible while edits remain reversible. */
.portrait-top{gap:10px;flex-wrap:wrap}
.portrait-switch{display:flex;gap:3px;padding:3px;background:#f5f8f7;border:1px solid #d3dee1;border-radius:10px}
.portrait-switch button{border:0;border-radius:7px;background:transparent;padding:8px 10px;font-size:.875rem;min-height:38px}
.portrait-switch button[aria-pressed="true"]{background:var(--blue);color:white}
.portrait-stage.close-view{min-height:0;height:330px;aspect-ratio:auto;margin:0 12px}
.portrait-stage.close-view:after{display:none}
.editor-history{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 20px;background:#f4f7f6;border-bottom:1px solid var(--line)}
.editor-history>div{display:flex;gap:7px}
.editor-history .btn{padding:8px 14px;min-height:40px}
.editor-history [data-edit-save]{font-size:.875rem;color:#5e746e;line-height:1.5}
.tune-title{color:var(--ink)!important;font-weight:650!important;font-size:1rem!important}
.detail-groups{display:flex;gap:7px;margin:18px 0 8px}
.detail-groups button{flex:1;min-width:0;min-height:44px;border:1px solid #d6dfde;background:#f6f7f2;border-radius:9px;font-size:.875rem}
.detail-groups button[aria-pressed="true"]{background:var(--blue);border-color:var(--blue);color:white}
.tune-control{padding:18px 0 13px;border-bottom:1px solid #e9ece6}
.tune-label{display:flex;justify-content:space-between;align-items:center;gap:12px;font-size:.9375rem;margin-bottom:5px}
.tune-label output{font-variant-numeric:tabular-nums;color:var(--blue);font-size:.875rem}
.tune-track{display:grid;grid-template-columns:44px minmax(0,1fr) 44px;gap:12px;align-items:center}
.tune-track button{width:44px;height:44px;border:1px solid #d6dfde;background:#f7f9f6;border-radius:9px;font-size:1.25rem;line-height:1}
.tune-track input{width:100%;min-width:0;height:44px;accent-color:var(--blue);cursor:pointer}
.tune-track button:hover:not(:disabled){background:#e7efef}
.tune-ends{display:flex;justify-content:space-between;padding:0 56px;color:var(--muted);font-size:.875rem;line-height:1.5}
.detail-resets{display:flex;flex-wrap:wrap;gap:10px;align-items:center;margin-top:20px}
.detail-resets .btn{min-height:44px}
@media(max-width:650px){
 .portrait-stage.close-view{height:245px;margin:0 12px}
 .portrait-stage.close-view .avatar-canvas{max-width:none}
 .detail-workspace .portrait-panel{position:sticky;top:8px;z-index:5;box-shadow:0 5px 14px #243e5018}
 .detail-workspace .portrait-top{padding:8px 12px;gap:6px}
 .detail-workspace .portrait-top>span{font-size:.875rem}
 .detail-workspace .portrait-stage{height:180px;margin:0 10px}
 .detail-workspace .portrait-stage .avatar-canvas{max-height:180px}
 .detail-workspace .portrait-bottom,.detail-workspace .portrait-actions{display:none}
 .editor-history{padding:10px 14px;gap:8px}
 .editor-history .btn{min-height:44px;padding:8px 12px}
 .editor-body{padding:18px}
 .tune-track{gap:8px}
 .tune-ends{padding:0 52px}
 .portrait-switch button{min-height:40px;padding:8px}
}
@media(max-width:650px) and (max-height:640px){.detail-workspace .portrait-stage{height:120px}.detail-workspace .portrait-stage .avatar-canvas{max-height:120px}}
@media(max-width:880px){.rail{padding-bottom:env(safe-area-inset-bottom,0px)}.shell{padding-bottom:calc(83px + env(safe-area-inset-bottom,0px))}#toast{bottom:calc(94px + env(safe-area-inset-bottom,0px))}}
@media(max-width:650px){.detail-workspace [data-slider],.detail-workspace [data-detail-step]{scroll-margin-top:250px;scroll-margin-bottom:100px}}

/* Purchase controls come before the preview and fit the current viewport. */
.trybar{border-bottom:1px solid #e4d6b7;text-align:left}
.trybar p{line-height:1.5}
.product-actions{align-items:stretch;flex-wrap:wrap;gap:6px}
.product-actions button{min-height:44px;font-size:.875rem;justify-content:center;flex:1}
.product-actions button.price{gap:6px;flex-wrap:wrap;padding:6px 8px}
.price-value{display:inline-flex;align-items:center;gap:4px;white-space:nowrap}
.shop-layout .portrait-panel{scroll-margin-top:16px}
@media(min-width:651px){
 .shop-layout .portrait-panel{--panel-space:48px;max-height:calc(100vh - var(--panel-space));max-height:calc(100dvh - var(--panel-space));overflow-y:auto}
 .shop-layout .portrait-stage{min-height:0;height:clamp(150px,calc(100vh - 340px),440px);height:clamp(150px,calc(100dvh - 340px),440px);aspect-ratio:auto}
 .shop-layout .portrait-stage .avatar-canvas{max-height:100%;min-height:0}
 .shop-layout .portrait-bottom{padding-bottom:12px}
 .shop-layout .portrait-actions{padding:10px}
}
@media(min-width:651px) and (max-width:880px){
 .shop-layout .portrait-panel{--panel-space:calc(115px + env(safe-area-inset-bottom,0px))}
 .shop-layout .portrait-stage{height:clamp(150px,calc(100dvh - 410px),360px)}
}
#modal{position:fixed;inset:0;margin:auto;max-height:calc(100vh - 28px);max-height:calc(100dvh - 28px);overflow:hidden}
#modal .modal-inner{display:flex;flex-direction:column;padding:0;max-height:calc(100vh - 30px);max-height:calc(100dvh - 30px)}
#modal .modal-top{flex-shrink:0;margin:0;padding:18px 22px 12px;align-items:center;border-bottom:1px solid var(--line)}
#modal .close{width:44px;min-height:44px;flex-shrink:0}
#modal .modal-body{min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:18px 22px}
#modal .modal-buttons{flex-shrink:0;flex-wrap:wrap;margin:0;padding:14px 22px max(14px,env(safe-area-inset-bottom,0px));border-top:1px solid var(--line);background:var(--white)}
#modal .modal-buttons .btn{min-height:44px;flex:1}
@media(max-width:650px){#modal .modal-top,#modal .modal-body,#modal .modal-buttons{padding-left:16px;padding-right:16px}}

/* Shop and wardrobe share the same wearable categories. */
.category-group+.category-group{margin-top:28px;padding-top:22px;border-top:1px solid var(--line)}
.category-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:14px}
.category-heading h2{font-size:1.4rem}
.product-type{font-size:.875rem;color:#5e7380;margin:10px 1px 0}
.product-type+.product-name{margin-top:4px}
.try-list{max-height:190px;overflow-y:auto;overscroll-behavior:contain;margin:8px -3px 0;padding:0 3px}
.try-item{display:grid;grid-template-columns:minmax(0,1fr) auto auto;align-items:center;gap:7px;padding:8px 0;border-bottom:1px solid #e3d5b4}
.try-item>span{font-size:.875rem;line-height:1.5;overflow-wrap:anywhere}
.try-item small{display:block;font-size:.8125rem;color:#7c6b48}
.try-item .btn{min-height:44px;margin:0;font-size:.875rem;padding:8px}
.try-item .btn.text{padding:8px 3px}
.trybar>.btn{min-height:44px;margin:4px 0 0;font-size:.875rem}

button.portrait-name{max-width:100%;overflow-wrap:anywhere;text-align:center;display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:44px;padding:5px 12px;background:transparent;border:1px solid transparent;border-radius:10px;color:var(--ink)}
button.portrait-name .icon{width:16px;height:16px;color:var(--muted)}
button.portrait-name:hover{background:#ffffff80;border-color:#b9cbd3}
