@font-face{font-family:Inter;src:url(fonts/inter.woff2) format('woff2');font-weight:400 700;font-display:swap}
:root{--bg:#FAF9F6;--text:#202020;--text2:#858585;--accent:#AE5268;--on-accent:#fff;--accent-bg:#F5E8E9;--card:#fff;--border:#E9E7E4;--img-bg:#F0EEEA;--danger:#B3261E;--scrim:rgba(20,18,18,.36);
 --sat:env(safe-area-inset-top,0px);--sab:env(safe-area-inset-bottom,0px);--sys:0px;--nav:0px;--r:16px;--rs:12px}
[data-theme=dark]{--bg:#141313;--text:#F1EEEB;--text2:#9D9894;--accent:#D88C9E;--on-accent:#2A1218;--accent-bg:#3A242A;--card:#1E1C1C;--border:#2F2C2B;--img-bg:#232120;--danger:#F2B8B5;--scrim:rgba(0,0,0,.55)}
*{box-sizing:border-box;margin:0;padding:0;-webkit-tap-highlight-color:transparent}
html,body{height:100%;background:var(--bg);color:var(--text);font-family:Inter,system-ui,sans-serif;font-size:16px;line-height:1.45;-webkit-font-smoothing:antialiased}
body.outer{background:#E7E4DF}[data-theme=dark] body.outer{background:#0a0a0a}
button,input,textarea{font:inherit;color:inherit}
button{background:none;border:0;cursor:pointer}
img{display:block}
i[data-ic]{display:inline-flex;width:24px;height:24px;flex:none;font-style:normal}
i[data-ic] svg{width:100%;height:100%}
#app{position:relative;height:100dvh;max-width:480px;margin:0 auto;overflow:hidden;background:var(--bg);display:flex;flex-direction:column}
body.framed #app{width:412px;height:915px;max-width:none;margin:0;--sys:32px;--nav:24px;--sat:0px;--sab:0px}
body.framed{background:var(--bg);width:412px;height:915px;overflow:hidden}
.sysbar{display:none}
body.framed .sysbar{display:flex;height:32px;flex:none;align-items:center;justify-content:space-between;padding:0 20px 0 24px;font-size:14px;font-weight:500}
.sysicons{display:flex;gap:4px}.sysicons i{width:16px;height:16px}
.navbar{display:none}
body.framed .navbar{display:flex;height:24px;flex:none;align-items:center;justify-content:center}
.navbar span{width:108px;height:4px;border-radius:2px;background:var(--text);opacity:.75}
#screens{position:relative;flex:1;min-height:0}
.screen{position:absolute;inset:var(--sat) 0 0 0;display:none;flex-direction:column;background:var(--bg)}
.screen.active{display:flex;animation:fade .22s ease}
@keyframes fade{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}
.content{flex:1;min-height:0;overflow-y:auto;padding:8px 20px 24px;display:flex;flex-direction:column;gap:16px}
.content.center{align-items:center;justify-content:center;text-align:center;gap:12px}
.screen:not(.tabbed) .content{padding-bottom:calc(24px + var(--sab))}
.screen:has(.footer-actions) .content{padding-bottom:16px}
.footer-actions{padding:12px 20px calc(16px + var(--sab));display:flex;flex-direction:column;gap:10px;flex:none}
.topbar,.appbar{height:64px;flex:none;display:flex;align-items:center;justify-content:space-between;padding:0 8px}
.appbar{padding:0 12px 0 20px}
.topbar h2{font-size:18px;font-weight:600;flex:1;text-align:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.topbar>span:empty,.appbar>span:empty{width:48px}
.icon-btn{width:48px;height:48px;border-radius:50%;display:grid;place-items:center}
.icon-btn:active{background:var(--accent-bg)}
.brand{font-size:15px;font-weight:600;letter-spacing:.02em}
.title{font-size:28px;font-weight:600;letter-spacing:-.02em}
h1{font-size:34px;line-height:1.12;font-weight:600;letter-spacing:-.03em}
.lead{color:var(--text2);font-size:17px}.lead.small{font-size:15px}
.hint{color:var(--text2);font-size:14px;text-align:center}.hint.small{font-size:13px}.hint.left{text-align:left;display:flex;gap:8px;align-items:flex-start}
.hint.left i{width:18px;height:18px;margin-top:1px}
.label{font-size:13px;font-weight:600;color:var(--text2);text-transform:uppercase;letter-spacing:.06em}
.caption{font-size:14px;color:var(--text2)}
.muted{color:var(--text2);font-size:14px}
.fine{font-size:13px;color:var(--text2);text-align:center}
.stack{display:flex;flex-direction:column;gap:10px}
.btn{height:56px;border-radius:var(--r);font-size:16px;font-weight:600;display:flex;align-items:center;justify-content:center;gap:10px;width:100%;transition:transform .1s,opacity .15s}
.btn i{width:20px;height:20px}
.btn:active{transform:scale(.98)}
.btn.primary{background:var(--accent);color:var(--on-accent)}
.btn.tonal{background:var(--accent-bg);color:var(--accent)}
.btn.ghost{color:var(--text);height:48px}
.btn.danger{background:transparent;color:var(--danger);border:1px solid var(--border)}
.btn.narrow{width:auto;padding:0 28px;margin-top:8px}
.btn:disabled{opacity:.4;pointer-events:none}
.link{color:var(--accent);font-weight:600;font-size:14px;padding:8px 0}
/* welcome */
#welcome .welcome-hero{flex:1;min-height:0;margin:8px 16px 0;border-radius:24px;overflow:hidden;background:var(--img-bg)}
.welcome-hero img{width:100%;height:100%;object-fit:cover;object-position:50% 18%}
.welcome-body{padding:24px 24px calc(16px + var(--sab));display:flex;flex-direction:column;gap:12px}
.welcome-body .brand{color:var(--accent)}
.welcome-body .btn{margin-top:12px}
.note{display:flex;align-items:center;justify-content:center;gap:6px;color:var(--text2);font-size:14px}
.note i{width:16px;height:16px}
/* photo */
.guide{display:flex;gap:16px;align-items:flex-start;background:var(--card);border:1px solid var(--border);border-radius:var(--r);padding:16px}
.guide-img{position:relative;width:112px;flex:none;aspect-ratio:3/4;border-radius:var(--rs);overflow:hidden;background:var(--img-bg)}
.guide-img img{width:100%;height:100%;object-fit:cover}
.guide-img .tag{position:absolute;left:6px;bottom:6px;right:6px;background:rgba(255,255,255,.92);color:#202020;font-size:11px;font-weight:600;border-radius:8px;padding:3px 6px;display:flex;gap:3px;align-items:center}
.tag i{width:12px;height:12px;color:#2E7D4F}
.guide h3{font-size:16px;font-weight:600;line-height:1.3;margin-bottom:10px}
.tips{list-style:none;display:flex;flex-direction:column;gap:7px;font-size:14px;color:var(--text2)}
.tips li{display:flex;gap:8px;align-items:flex-start}.tips i{width:16px;height:16px;color:var(--accent);margin-top:2px}
.samples{display:flex;flex-direction:column;align-items:center;gap:10px;margin-top:4px}
.sample-row{display:flex;gap:12px}
.sample{width:64px;height:64px;border-radius:50%;overflow:hidden;border:1px solid var(--border);background:var(--img-bg)}
.sample img{width:100%;height:100%;object-fit:cover;object-position:50% 8%;transform:scale(1.6);transform-origin:50% 0}
.sample.sq{width:auto;flex:1;height:auto;aspect-ratio:3/4;border-radius:var(--rs);background:#fff}
.sample.sq img{transform:none;object-fit:contain}
.sample-row.g{width:100%}
/* editor */
.edit-content{gap:12px}
.stage{position:relative;width:100%;max-width:340px;margin:0 auto;aspect-ratio:3/4;border-radius:var(--r);overflow:hidden;background:var(--img-bg);touch-action:none;flex:none}
#stage{width:100%;height:100%;display:block;cursor:grab}
.frame-corners{position:absolute;inset:0;pointer-events:none;border-radius:var(--r);box-shadow:inset 0 0 0 1px rgba(255,255,255,.5);
 background:linear-gradient(rgba(255,255,255,.35),rgba(255,255,255,.35)) 33.33% 0/1px 100% no-repeat,linear-gradient(rgba(255,255,255,.35),rgba(255,255,255,.35)) 66.66% 0/1px 100% no-repeat,linear-gradient(rgba(255,255,255,.35),rgba(255,255,255,.35)) 0 33.33%/100% 1px no-repeat,linear-gradient(rgba(255,255,255,.35),rgba(255,255,255,.35)) 0 66.66%/100% 1px no-repeat}
.zoom-row{display:flex;align-items:center;gap:12px;max-width:340px;width:100%;margin:0 auto;color:var(--text2)}
.zoom-row i{width:20px;height:20px}
input[type=range]{flex:1;accent-color:var(--accent);height:32px}
.chips{display:flex;flex-wrap:wrap;gap:8px}
.chip{height:40px;padding:0 16px;border-radius:12px;border:1px solid var(--border);font-size:14px;font-weight:500;background:var(--card)}
.chip.on{background:var(--accent-bg);border-color:var(--accent);color:var(--accent);font-weight:600}
#catBlock{display:flex;flex-direction:column;gap:10px}#catBlock[hidden]{display:none}
#catHint{text-align:left;min-height:18px}
/* home */
.me{position:relative;border-radius:20px;overflow:hidden;background:var(--img-bg);height:clamp(260px,48dvh,440px);flex:none}
body.framed .me{height:372px}
.me>img{width:100%;height:100%;object-fit:cover;object-position:50% 15%}
.pill-btn{position:absolute;top:12px;right:12px;height:36px;padding:0 14px 0 10px;border-radius:18px;background:rgba(255,255,255,.9);color:#202020;font-size:13px;font-weight:600;display:flex;align-items:center;gap:6px}
.pill-btn i{width:16px;height:16px}
.garment-badge{position:absolute;right:12px;bottom:12px;width:92px;background:#fff;border-radius:14px;padding:6px;box-shadow:0 2px 10px rgba(0,0,0,.08)}
.garment-badge img{width:100%;aspect-ratio:3/4;object-fit:contain;border-radius:8px}
.garment-badge span{display:block;text-align:center;font-size:11px;font-weight:600;color:#202020;padding-top:4px}
.garment-badge .x{position:absolute;top:-8px;left:-8px;width:28px;height:28px;border-radius:50%;background:#202020;color:#fff;display:grid;place-items:center}
.garment-badge .x i{width:16px;height:16px}
.h-home{font-size:28px;margin-top:4px}
#home .lead{margin-top:-10px}
.row-head{display:flex;justify-content:space-between;align-items:center}
#recent{display:flex;flex-direction:column;gap:6px}#recent[hidden]{display:none}
.recent-row{display:flex;gap:10px;overflow-x:auto;padding-bottom:4px;scrollbar-width:none}
.recent-row button{flex:none;width:72px;aspect-ratio:3/4;border-radius:var(--rs);overflow:hidden;background:var(--img-bg)}
.recent-row img{width:100%;height:100%;object-fit:cover;object-position:50% 20%}
/* processing */
.proc-visual{position:relative;width:200px;height:200px;display:grid;place-items:center;margin-bottom:24px}
.proc-visual img{width:120px;height:160px;object-fit:contain;background:#fff;border-radius:16px;position:relative;z-index:1;border:1px solid var(--border);animation:float 3s ease-in-out infinite}
.ring{position:absolute;inset:0;border-radius:50%;background:var(--accent-bg);animation:breathe 2.6s ease-in-out infinite}
.ring.r2{inset:22px;background:transparent;border:1px solid var(--accent);opacity:.35;animation-delay:.6s}
@keyframes breathe{0%,100%{transform:scale(.9);opacity:.9}50%{transform:scale(1.04);opacity:.5}}
@keyframes float{0%,100%{transform:translateY(0)}50%{transform:translateY(-6px)}}
.proc-title{font-size:22px;font-weight:600}
.dots{display:flex;gap:6px;margin-top:12px}.dots span{width:6px;height:6px;border-radius:50%;background:var(--accent);animation:dot 1.2s infinite}
.dots span:nth-child(2){animation-delay:.2s}.dots span:nth-child(3){animation-delay:.4s}
@keyframes dot{0%,100%{opacity:.25}50%{opacity:1}}
/* result */
.demo-banner{display:flex;gap:8px;align-items:center;background:var(--accent-bg);color:var(--accent);font-size:13px;font-weight:600;border-radius:10px;padding:8px 12px}
.demo-banner i{width:16px;height:16px}
.demo-banner[hidden]{display:none}
.result-img{position:relative;border-radius:20px;overflow:hidden;background:var(--img-bg);flex:1;min-height:300px}
.result-img>img:first-child{width:100%;height:100%;object-fit:cover;object-position:50% 25%;animation:reveal .6s ease}
@keyframes reveal{from{opacity:0;filter:blur(8px)}to{opacity:1;filter:none}}
.ai-label{position:absolute;left:12px;bottom:12px;font-size:11px;font-weight:600;letter-spacing:.04em;color:#fff;background:rgba(32,32,32,.45);backdrop-filter:blur(6px);padding:4px 8px;border-radius:6px}
.mini-garment{position:absolute;right:12px;bottom:12px;width:52px;aspect-ratio:3/4;object-fit:contain;background:#fff;border-radius:8px;padding:3px}
.action-row{display:flex;gap:8px}
.act{flex:1;height:64px;border-radius:var(--r);border:1px solid var(--border);background:var(--card);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;font-size:13px;font-weight:500}
.act i{width:22px;height:22px}
.act:active{background:var(--accent-bg)}
#saveBtn.saved{background:var(--accent-bg);color:var(--accent)}
/* compare */
.cmp{position:relative;flex:1;min-height:320px;border-radius:20px;overflow:hidden;background:var(--img-bg);touch-action:none;user-select:none;-webkit-user-select:none}
.cmp img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:50% 25%;pointer-events:none}
.cmp .before{clip-path:inset(0 calc(100% - var(--x,50%)) 0 0)}
.cmp .bar{position:absolute;top:0;bottom:0;left:var(--x,50%);width:2px;margin-left:-1px;background:#fff}
.cmp .knob{position:absolute;top:50%;left:var(--x,50%);width:44px;height:44px;margin:-22px 0 0 -22px;border-radius:50%;background:#fff;color:#202020;display:grid;place-items:center;box-shadow:0 2px 8px rgba(0,0,0,.15)}
.cmp .knob i{width:22px;height:22px}
.cmp .lbl{position:absolute;top:12px;font-size:12px;font-weight:600;color:#fff;background:rgba(32,32,32,.45);padding:4px 10px;border-radius:6px}
.cmp .lbl.l{left:12px}.cmp .lbl.r{right:12px}
/* empty */
.empty{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;gap:10px;padding:0 24px}.empty[hidden]{display:none}
.empty-ic{width:96px;height:96px;border-radius:50%;background:var(--accent-bg);color:var(--accent);display:grid;place-items:center;margin-bottom:12px}
.empty-ic i{width:40px;height:40px}
.h-empty{font-size:20px;font-weight:600;max-width:300px;line-height:1.3}
#unavailable .lead{max-width:320px}
/* grid */
.grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.grid:empty{display:none}
.card{text-align:left;display:flex;flex-direction:column;gap:6px}
.card .im{position:relative;aspect-ratio:3/4;border-radius:var(--r);overflow:hidden;background:var(--img-bg)}
.card .im>img{width:100%;height:100%;object-fit:cover;object-position:50% 20%}
.card .im .g{height:auto;position:absolute;right:8px;bottom:8px;width:34px;aspect-ratio:3/4;object-fit:contain;background:#fff;border-radius:6px;padding:2px}
.card small{font-size:13px;color:var(--text2);padding-left:2px}
/* settings */
.me-row{display:flex;align-items:center;gap:14px;padding:12px;background:var(--card);border:1px solid var(--border);border-radius:var(--r);text-align:left}
.me-row img{width:56px;height:56px;border-radius:50%;object-fit:cover;object-position:50% 8%;background:var(--img-bg)}
.me-row span{flex:1;display:flex;flex-direction:column}.me-row small{color:var(--text2);font-size:14px}
.group{background:var(--card);border:1px solid var(--border);border-radius:var(--r);overflow:hidden}
.row{display:flex;align-items:center;gap:14px;min-height:56px;padding:0 16px;width:100%;text-align:left;font-size:16px}
.row+.row{border-top:1px solid var(--border)}
.row>span{flex:1}.row>i:first-child{width:22px;height:22px;color:var(--text2)}.row>i:last-child:not(:first-child){width:20px;height:20px;color:var(--text2)}
.row:active:not(.static){background:var(--accent-bg)}
.seg{display:flex;background:var(--bg);border:1px solid var(--border);border-radius:10px;padding:2px}
.seg button{height:32px;padding:0 10px;border-radius:8px;font-size:13px;font-weight:500;color:var(--text2)}
.seg button.on{background:var(--accent-bg);color:var(--accent);font-weight:600}
.footer-note{text-align:center;font-size:12px;color:var(--text2);padding:8px 0}
.me-row>i{width:20px;height:20px;color:var(--text2)}
/* prose */
.prose h3{font-size:16px;font-weight:600;margin-top:4px}
.prose p{color:var(--text2);font-size:15px;margin-top:-10px}
.sheet .prose p{margin-top:0}
.sheet .prose{display:flex;flex-direction:column;gap:10px}
.danger-card{border:1px solid var(--border);background:var(--card);border-radius:var(--r);padding:16px;display:flex;flex-direction:column;gap:6px;margin-top:8px}
.danger-card p{margin:0 0 8px}
/* report */
form.content{gap:14px}
.radios{display:flex;flex-direction:column;background:var(--card);border:1px solid var(--border);border-radius:var(--r);overflow:hidden}
.radios label{display:flex;align-items:center;gap:12px;min-height:52px;padding:0 16px;font-size:15px}
.radios label+label{border-top:1px solid var(--border)}
input[type=radio],input[type=checkbox]{accent-color:var(--accent);width:20px;height:20px}
textarea{width:100%;border:1px solid var(--border);background:var(--card);border-radius:var(--rs);padding:12px 14px;font-size:15px;resize:none}
textarea:focus{outline:2px solid var(--accent);border-color:transparent}
.check{display:flex;gap:10px;align-items:center;font-size:15px}
/* tabbar */
.tabbar{display:none;flex:none;height:calc(80px + var(--sab));padding-bottom:var(--sab);background:var(--bg);border-top:1px solid var(--border)}
.tabbar.show{display:flex}
.tabbar button{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;font-size:12px;font-weight:500;color:var(--text2)}
.tabbar .ind{width:64px;height:32px;border-radius:16px;display:grid;place-items:center}
.tabbar .on{color:var(--text);font-weight:600}.tabbar .on .ind{background:var(--accent-bg);color:var(--accent)}
/* sheets */
.scrim{position:absolute;inset:0;background:var(--scrim);opacity:0;pointer-events:none;transition:opacity .2s;z-index:20}
.scrim.show{opacity:1;pointer-events:auto}
.sheet{position:absolute;left:0;right:0;bottom:0;z-index:21;background:var(--card);border-radius:28px 28px 0 0;padding:8px 24px calc(20px + var(--sab) + var(--nav));display:flex;flex-direction:column;gap:14px;transform:translateY(105%);transition:transform .25s cubic-bezier(.2,.8,.2,1);max-height:88%;overflow-y:auto}
.sheet.open{transform:none}
.sheet .handle{width:32px;height:4px;border-radius:2px;background:var(--border);margin:6px auto 4px}
.sheet h2{font-size:22px;font-weight:600}
.sheet .group{background:var(--bg)}
.points{list-style:none;display:flex;flex-direction:column;gap:14px;margin-bottom:6px}
.points li{display:flex;gap:14px;font-size:15px;color:var(--text2);line-height:1.4}
.points b{color:var(--text);font-weight:600}
.points i{width:22px;height:22px;color:var(--accent);margin-top:1px}
.toast{position:absolute;left:50%;top:calc(76px + var(--sat) + var(--sys));transform:translate(-50%,-10px);background:#2a2828;color:#fff;font-size:14px;padding:12px 18px;border-radius:12px;opacity:0;pointer-events:none;transition:.2s;z-index:30;max-width:88%;text-align:center}
[data-theme=dark] .toast{background:#ECE7E3;color:#202020}
.toast.show{opacity:1;transform:translate(-50%,0)}
[hidden]{display:none!important}
