:root{
  --safe-top:calc(max(env(safe-area-inset-top,0px),var(--tg-safe-area-inset-top,0px)) + var(--tg-content-safe-area-inset-top,0px));
  --safe-right:max(env(safe-area-inset-right,0px),var(--tg-safe-area-inset-right,0px),var(--tg-content-safe-area-inset-right,0px));
  --safe-bottom:max(env(safe-area-inset-bottom,0px),var(--tg-safe-area-inset-bottom,0px),var(--tg-content-safe-area-inset-bottom,0px));
  --safe-left:max(env(safe-area-inset-left,0px),var(--tg-safe-area-inset-left,0px),var(--tg-content-safe-area-inset-left,0px));
}
*{box-sizing:border-box}
.session-loading>header,.session-loading>main,.session-loading>dialog{visibility:hidden}.session-loading #entryLoading{position:fixed;inset:0;display:grid;place-items:center;color:#b7a7ff;font-weight:750;letter-spacing:.06em;z-index:20}
.telegram-landing{min-height:100dvh;height:auto;overflow:auto;display:grid;place-items:center;background:radial-gradient(ellipse at 50% 10%,#282045 0,transparent 60%),#090b10;padding:72px 20px 30px}.entry-language{position:absolute;right:20px;top:18px}.entry-card{display:flex;flex-direction:column;align-items:center;gap:0;max-width:460px;width:100%;text-align:center;margin:auto;padding:0;height:auto;overflow:visible}.entry-brand{display:flex;align-items:center;gap:10px;color:#c3b7ff;font-weight:850;letter-spacing:.08em;font-size:14px;margin-bottom:22px}.entry-brand img{width:42px;height:42px;border-radius:12px;animation:entry-float 5s ease-in-out infinite}.entry-art{width:100%;border:1px solid #343046;border-radius:22px;overflow:hidden;box-shadow:0 18px 60px #0006}.entry-art img{width:100%;display:block}.entry-card h1{font-size:26px;line-height:1.15;margin:10px 0;max-width:330px}.entry-card>p{font-size:14px;line-height:1.6;color:#a8a8bd;max-width:340px;margin:8px 0 20px}.entry-card .entry-tag{font-size:11px;letter-spacing:.08em;color:#c1aaff;margin:24px 0 0}.entry-button{display:flex;align-items:center;justify-content:center;gap:12px;width:100%;max-width:340px;padding:15px 18px;background:#7355e8;color:white;text-decoration:none;font-weight:750;border-radius:14px;box-shadow:0 6px 25px #7355e833}.entry-button svg{width:21px;height:21px;fill:currentColor}.entry-card .entry-hint{font-size:11px;margin-top:13px;color:#838399}@keyframes entry-float{50%{transform:translateY(-4px)}}@media(prefers-reduced-motion:reduce){.entry-brand img{animation:none}}
html,body{margin:0;min-height:100%;background:#090b10;color:#f5f7fb;font-family:Inter,system-ui,-apple-system,Segoe UI,sans-serif;overscroll-behavior-y:none}
html{background:#0d1017}
body{padding:0 var(--safe-right) max(12px,var(--safe-bottom)) var(--safe-left);touch-action:pan-x pan-y}
header{min-height:58px;display:flex;align-items:center;justify-content:space-between;padding:calc(10px + var(--safe-top)) 20px 10px;border-bottom:1px solid #242a36;background:#0d1017;position:sticky;top:0;z-index:3}
.brand{font-weight:900;letter-spacing:.06em;display:flex;gap:10px;align-items:center}.brand span{color:#b7a7ff}.brand-logo{display:block;width:38px;height:38px;border-radius:11px;overflow:hidden;background:#000}.brand-logo img{width:100%;height:100%;transform:scale(1.65);object-fit:cover}
.badge{font-size:11px;padding:6px 9px;border:1px solid #383f50;border-radius:999px;color:#aeb7c9}
main{display:grid;grid-template-columns:minmax(0,1.7fr) minmax(280px,.65fr);gap:14px;padding:14px;max-width:1450px;margin:auto}
.card{background:#10141d;border:1px solid #242a36;border-radius:18px;overflow:hidden}
.stage{padding:16px}.stage-head{display:flex;justify-content:space-between;align-items:center}.stage-head h1{margin:2px 0 10px;font-size:24px}
.eyebrow{margin:0;color:#8f7cff;font-size:11px;font-weight:800;letter-spacing:.16em}
#viewport{height:min(64vh,720px);min-height:380px;border-radius:14px;background:radial-gradient(circle at 50% 36%,#202838,#0b0e14 64%);overflow:hidden}
#viewport canvas{display:block;width:100%;height:100%}
#status{min-height:21px;color:#adb7ca;font-size:13px}
.actions{display:grid;grid-template-columns:auto minmax(160px,1fr) auto;gap:8px}
button,select,input{font:inherit}
button,select{background:#171c27;color:#eef2fa;border:1px solid #303849;border-radius:10px;padding:10px 11px}
button{cursor:pointer}button:hover{border-color:#7764dc}button:active{transform:translateY(1px)}
.primary{background:#6e57e8;border-color:#806bf0;font-weight:800;width:100%;margin-top:8px;padding:13px}
.primary:disabled{opacity:.55;cursor:not-allowed;transform:none}
.secondary{width:100%;background:#121722;color:#bdc6d8}
.settings-actions{display:grid;grid-template-columns:1fr;gap:8px;margin-top:2px}
.icon{font-size:20px;padding:6px 11px}
.stage-tools{display:flex;gap:6px}.stage-tools #resetAll{color:#b7a7ff}.editor-tabs .pack-tab{border-color:#6650c3;color:#c9bbff}
.stage-tools svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}.stage-tools #resetCamera{display:grid;place-items:center;color:#b8c5d9}
#outfitPreviewControls{display:flex;align-items:center;justify-content:flex-end;gap:12px;flex-wrap:wrap;margin-top:10px;padding-top:8px;border-top:1px solid #272d3c}#outfitPreviewControls>span{margin-right:auto;font-size:11px}#outfitPreviewControls label{font-size:11px;gap:4px}#outfitPreviewControls input{accent-color:#8e7bf6}#outfitPreviewControls button{font-size:11px;padding:5px 9px}
#outfitPreviewControls select{width:auto;max-width:220px;font-size:11px;padding:5px 8px}#outfitPreviewControls #interactionMagnet[aria-pressed=true]{background:#21455a;border-color:#89dbff;color:#cdf3ff}
#outfitRandom{display:grid;place-items:center;color:#c2b3ff}#outfitRandom svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.5}#outfitRandom circle{fill:currentColor;stroke:none}#outfitRandom:disabled{opacity:.5;cursor:wait}#outfitRandom[aria-busy=true] svg{animation:outfit-loading 1.2s linear infinite}@keyframes outfit-loading{to{transform:rotate(360deg)}}
aside{padding:16px;display:flex;flex-direction:column;gap:11px}
label{display:flex;flex-direction:column;gap:6px;font-size:13px;color:#c5ccda}
label select{width:100%}.check{flex-direction:row;align-items:center}.check input{width:auto}
details{border-top:1px solid #262c39;padding-top:10px}summary{cursor:pointer;color:#cfd6e4}
.muted{color:#8791a5;font-size:12px;line-height:1.4}.small{margin:0}
.pack-result{margin-top:2px;padding:11px 12px;border:1px solid #303849;border-radius:12px;background:#0d1119;display:flex;align-items:center;justify-content:space-between;gap:10px;font-size:13px}
.pack-result a{color:#b8a9ff;text-decoration:none;font-weight:800;white-space:nowrap}
.pack-result a:not([href]){opacity:.35;pointer-events:none}
.pack-result a[hidden]{display:none}
.pack-mode-switch{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:4px;margin:0;padding:4px;min-width:0;border:1px solid #303849;border-radius:11px;background:#0d1119}
.pack-mode-switch legend{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.pack-mode-switch label{position:relative;display:flex;justify-content:center;align-items:center;min-width:0;min-height:38px;padding:7px 5px;cursor:pointer;border:1px solid transparent;border-radius:8px;color:#a6b2c6;font-size:11px;font-weight:650;line-height:1.2;text-align:center}
.pack-mode-switch input{position:absolute;opacity:0;width:1px;height:1px;margin:0}
.pack-mode-switch label:has(input:checked){background:#3a3166;border-color:#806bf066;color:#efebff}
.pack-mode-switch label:has(input:focus-visible){outline:2px solid #a594ff;outline-offset:2px}
.pack-mode-switch label:has(input:disabled){opacity:.4;cursor:not-allowed}
.pack-mode-hint,.pack-presence-note{margin:0;color:#8791a5;font-size:11px;line-height:1.35}
.pack-presence-note{color:#bfad83}.pack-presence-note[hidden]{display:none}
.profile-sync-status{flex:none;font-size:10px;color:#8e89a4;margin:0;text-align:center}.profile-sync-status[data-state=offline]{color:#c9a772}.profile-sync-status[hidden]{display:none}
.language-switch{display:flex;gap:2px;padding:3px;border:1px solid #303849;border-radius:11px;background:#111520}
.language-switch button{border:0;padding:7px 11px;font-size:12px;font-weight:750;background:transparent;color:#929bad}
.language-switch button[aria-pressed=true]{background:#6e57e8;color:#fff;border-radius:7px}
.pack-dance label{display:flex;flex-direction:row;align-items:center;gap:5px;flex:1;min-width:0;cursor:pointer}
.pack-dance.selected{outline:1px solid #8e7bf6;background:#242038}
.dance-preview{padding:4px;flex:none;width:25px;height:30px;font-size:10px;color:#b7a7ff;background:transparent;border-color:transparent}
.pack-result[hidden],.actions[hidden]{display:none!important}
#packFooter{display:flex;flex-direction:column;gap:8px;flex:none;min-width:0}#packFooter[hidden]{display:none}
.pack-heading{display:flex;align-items:center;justify-content:space-between;gap:8px}.pack-heading strong{font-size:14px}.pack-heading #packCount{white-space:nowrap}
.pack-dance-hint{margin:0;font-size:11px;line-height:1.35}
.pack-limit-note{margin:0;font-size:12px;color:#e5bf86}.pack-limit-note[hidden]{display:none}.pack-dance:has(input:checked){background:#252039;box-shadow:inset 0 0 0 1px #7962d9}
#resetDialog{width:min(380px,calc(100vw - 36px));max-height:calc(100dvh - var(--safe-top) - var(--safe-bottom) - 40px);background:#141824;color:#eef2fa;border:1px solid #404657;border-radius:18px;padding:22px;box-shadow:0 18px 70px #0008}#resetDialog::backdrop{background:#000a;backdrop-filter:blur(4px)}#resetDialog h2{font-size:19px;margin:0 0 12px}#resetDialog p{font-size:14px;line-height:1.5;color:#adb7ca}.dialog-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:20px}.confirm-reset{background:#6e57e8;border-color:#806bf0}
.pack-update-notice{box-sizing:border-box;width:min(390px,calc(100vw - 28px));max-height:calc(100dvh - var(--safe-top,0px) - var(--safe-bottom,0px) - 36px);margin:auto;padding:22px;border:1px solid #8ba5bf40;border-radius:20px;background:linear-gradient(145deg,#24334af5,#172338fa);color:#e3eef8;box-shadow:0 20px 80px #0009;overflow:auto}
.pack-update-notice::backdrop{background:#07101c99;backdrop-filter:blur(5px)}
.pack-update-notice h2{margin:0 0 12px;font-size:18px;line-height:1.25;letter-spacing:-.02em}
.pack-update-notice p,.pack-update-notice li{font-size:12px;line-height:1.55;color:#b8cde0}
.pack-update-notice p{margin:0 0 12px}.pack-update-notice .pack-update-hint{margin-bottom:7px;color:#d8e8f5}
.pack-update-notice ol{margin:0 0 14px;padding-left:19px;display:grid;gap:8px}.pack-update-notice li{padding-left:2px}.pack-update-notice li::marker{color:#79bfff;font-weight:750}.pack-update-notice strong{color:#eef7ff}
.pack-update-notice .pack-update-note{margin:0;padding:9px 11px;border-radius:10px;background:#a8c5e012;color:#aac3d9;font-size:11px}
.pack-update-notice .dialog-actions{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.9fr);gap:8px;margin-top:17px}.pack-update-notice button{min-width:0;min-height:41px;padding:8px 10px;border:1px solid #8ba5bf38;border-radius:11px;background:#162438;color:#afc4d8;font-size:12px;font-weight:650;line-height:1.2}
.pack-update-notice button.pack-update-proceed{background:linear-gradient(115deg,#287ce0,#1684a8);border-color:#65b2ec65;color:#f3faff}.pack-update-notice button:focus-visible{outline:2px solid #8ed0ff;outline-offset:3px}
@media(max-width:820px){
  header{min-height:52px;padding:calc(8px + var(--safe-top)) 12px 8px}
  main{grid-template-columns:1fr;padding:8px;gap:8px}
  .stage{padding:10px}
  #viewport{height:46vh;min-height:290px}
  .actions{grid-template-columns:1fr 1fr}
  .actions select{grid-column:1/-1;grid-row:1}
  .stage-head h1{font-size:20px}
  aside{padding:12px}
  .primary{position:sticky;bottom:calc(8px + var(--safe-bottom));z-index:4;box-shadow:0 8px 30px rgba(0,0,0,.42)}
}

.visual-native{display:none!important}
.visual-picker-button{width:100%;display:grid;grid-template-columns:46px 1fr auto;align-items:center;gap:10px;text-align:left;padding:7px 10px;min-height:54px}
.visual-picker-button:disabled{opacity:.45;cursor:not-allowed}
.picker-current-thumb,.picker-thumb{display:flex;align-items:center;justify-content:center;overflow:hidden;background:#0a0d13;border:1px solid #282f3c;border-radius:9px;color:#697386}
.picker-current-thumb{width:40px;height:40px}.picker-current-thumb img,.picker-thumb img{width:100%;height:100%;object-fit:contain;image-rendering:pixelated}
.picker-current-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.picker-arrow{color:#8791a5;display:flex;align-items:center;justify-content:center;width:20px;height:20px}
.picker-arrow svg,.picker-clear svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.visual-picker-control{position:relative;min-width:0;width:100%}.visual-picker-control:has(.picker-clear:not([hidden])) .visual-picker-button{padding-right:44px}
.picker-clear{position:absolute;right:6px;top:50%;transform:translateY(-50%);display:flex;align-items:center;justify-content:center;width:32px;height:32px;padding:0;border:0;background:transparent;color:#9ca6ba;border-radius:8px}.picker-clear:hover{color:#fff;background:#292c3c}.picker-clear[hidden]{display:none}
.picker-clear:active{transform:translateY(calc(-50% + 1px))}
@media(max-width:820px){.actions .visual-picker-control{grid-column:2;grid-row:1}}
.picker-sheet[hidden]{display:none}.picker-sheet{position:fixed;inset:0;z-index:50;display:flex;align-items:flex-end;justify-content:center}
.picker-backdrop{position:absolute;inset:0;background:rgba(0,0,0,.66);backdrop-filter:blur(3px)}
.picker-panel{position:relative;width:min(720px,100%);max-height:min(82vh,760px);background:#10141d;border:1px solid #303849;border-radius:20px 20px 0 0;padding:14px max(14px,var(--safe-right)) max(16px,var(--safe-bottom)) max(14px,var(--safe-left));display:flex;flex-direction:column;gap:10px;box-shadow:0 -20px 70px rgba(0,0,0,.35)}
.picker-head{display:flex;align-items:center;justify-content:space-between;gap:10px}.picker-head strong{font-size:17px}.picker-head button{padding:7px 10px}
.picker-search{width:100%;background:#171c27;color:#eef2fa;border:1px solid #303849;border-radius:10px;padding:11px}
.picker-grid{overflow:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;padding-bottom:6px}
.picker-item{min-width:0;display:flex;align-items:center;gap:9px;text-align:left;padding:8px;background:#121722}.picker-item.selected{border-color:#8e7bf6;background:#19172a}
.picker-thumb{width:54px;height:54px;flex:none}.picker-item span{font-size:12px;line-height:1.2;overflow:hidden;text-overflow:ellipsis}
@media(max-width:600px){.picker-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.picker-panel{max-height:78vh}.picker-thumb{width:58px;height:58px}}

.picker-sheet{padding-top:calc(var(--safe-top) + 8px)}
.picker-panel{max-height:min(82dvh,calc(100dvh - var(--safe-top) - 16px))}
.picker-current-thumb img,.picker-thumb img{image-rendering:auto}
#language{margin-left:auto;margin-right:8px;font-size:12px}
@media(max-width:820px){.actions .visual-picker-button{grid-column:1/-1;grid-row:1}.picker-panel{max-height:calc(100dvh - var(--safe-top) - 12px)}}

#viewport{position:relative}#viewport canvas{position:relative;z-index:1}.clan-backdrop{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:min(70%,46vh);aspect-ratio:1;object-fit:cover;pointer-events:none}
.editor-tabs{display:grid;grid-template-columns:repeat(4,1fr);gap:4px;position:sticky;top:0;background:#10141d;z-index:2;padding-bottom:6px}.editor-tabs button{padding:9px 3px;font-size:12px;border-color:transparent}.editor-tabs [aria-pressed=true]{background:#6e57e8;color:white}.editor-panel{display:grid;gap:10px}.editor-panel[hidden],#clanOptions[hidden]{display:none}#clanOptions{display:grid;gap:10px}.pack-select-actions{display:flex;gap:6px}.pack-select-actions button{font-size:12px;padding:7px}.pack-dances{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}.pack-dance{display:flex;flex-direction:row;align-items:center;padding:8px;background:#171c27;border-radius:10px}.pack-dance img{width:30px;height:30px;object-fit:contain}.pack-dance span{font-size:12px}.pack-dance input{accent-color:#8e7bf6}#status[hidden]{display:none}
@media(max-width:820px){body{height:var(--app-height,100dvh);overflow:hidden}header{z-index:5}main{height:calc(var(--app-height,100dvh) - var(--header-height,58px) - var(--safe-bottom));display:flex;flex-direction:column;overflow:hidden}.stage{flex:none}.stage-head h1{font-size:18px;margin-bottom:6px}#viewport{height:clamp(190px,31dvh,360px);min-height:190px}.actions{margin-top:8px;grid-template-columns:74px 1fr auto;gap:6px}.actions .visual-picker-button{grid-column:2;grid-row:1;min-height:42px;grid-template-columns:28px 1fr auto;padding:4px 6px;gap:4px}.actions .picker-current-thumb{width:26px;height:30px}.actions .picker-current-name{font-size:11px}#play,#png{font-size:11px;padding:7px}#png{grid-column:3}aside{flex:1;min-height:130px;overflow:auto;gap:8px}.settings-actions{margin-top:8px}.secondary,.primary{font-size:12px;padding:10px}.brand{font-size:12px}.brand-logo{width:32px;height:32px}#language{margin-right:0;padding:8px;font-size:11px}}
@media(max-width:820px){aside{overflow:hidden}.editor-panel{flex:1;min-height:0;overflow:auto;align-content:start}.editor-panel[data-panel=look]{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.editor-panel[data-panel=look] .visual-picker-button{grid-template-columns:32px 1fr auto;gap:5px;min-height:44px;padding:5px}.editor-panel[data-panel=look] .picker-current-thumb{width:30px;height:32px}.editor-panel[data-panel=look] .picker-current-name{font-size:11px}.primary{position:static;box-shadow:none;margin-top:0}.editor-tabs,.settings-actions,.primary,.pack-result{flex:none}aside>.small{display:none}.editor-tabs{position:static}}
@media(max-width:820px) and (max-height:640px){#viewport{height:24dvh;min-height:110px}.stage-head h1{font-size:15px}.stage{padding:7px}aside{min-height:0}.editor-tabs button{padding:7px 2px}.settings-actions{margin-top:0}.secondary,.primary{padding:7px}}
@media(max-width:820px){.stage-head{min-height:32px;margin-bottom:5px}.stage-head h1{font-size:14px;margin:0}.stage-tools .icon{padding:3px 9px;font-size:19px}.editor-panel[data-panel=pack]{display:flex;flex-direction:column;overflow:hidden}.editor-panel[data-panel=pack][hidden]{display:none}.pack-dances{flex:1;min-height:0;overflow:auto;align-content:start}.pack-select-actions,.editor-panel[data-panel=pack]>.primary,.editor-panel[data-panel=pack]>.pack-result{flex:none}.editor-panel[data-panel=pack]>.small{display:none}#packCount{margin:0}.pack-dance{padding:6px}.editor-panel[data-panel=pack]{gap:6px}#viewport{height:clamp(180px,30dvh,340px);min-height:180px}}
@media(max-width:820px){body.pack-mode #viewport{height:110px;min-height:110px}body.pack-mode .stage .actions{display:none}body.pack-mode .stage{padding:8px 12px}.pack-dance{min-height:46px;gap:5px}.pack-dance input{margin:0;width:16px;height:16px;flex:none}.pack-dance img{width:28px;height:32px;flex:none}.pack-dance span{line-height:1.25;min-width:0}.pack-heading strong{font-size:13px}}
@media(max-width:820px) and (max-height:640px){#viewport{height:24dvh;min-height:110px}}
@media(max-width:820px){.actions{grid-template-columns:90px minmax(0,1fr) auto}#play{white-space:nowrap;padding:7px 4px;font-size:11px;min-width:0}#language.language-switch{padding:3px}.language-switch button{min-height:32px;padding:5px 9px}.pack-dance{gap:2px}.pack-dance img{width:22px}.pack-dance span{font-size:11px}}
@media(max-width:820px){#packFooter>.small{display:none}#packFooter .primary{margin:0;min-height:40px}body.pack-mode .editor-panel[data-panel=pack]{flex:1 1 0;min-height:0}body.pack-mode .profile-sync-status{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}}

/* The phone scrolls one natural document, rather than a flex card clipped to a
   Telegram-reported viewport. Settings can occupy the screen as preview moves
   away, and the last control always has room above the native bottom toolbar. */
@media(max-width:820px){
  html{height:auto;overflow-y:auto;scroll-padding-top:calc(var(--header-height,58px) + 8px)}
  body{height:auto;min-height:var(--app-height,100dvh);overflow:visible;padding-bottom:max(24px,var(--safe-bottom))}
  main{height:auto;min-height:0;overflow:visible;display:block}
  .stage{margin-bottom:8px}
  aside.card,body.pack-mode aside.card{display:block;flex:none;min-height:0;overflow:visible;overflow-anchor:none;padding-bottom:calc(72px + var(--safe-bottom) + var(--viewport-bottom-occlusion,0px))}
  .editor-tabs{position:sticky;top:calc(var(--header-height,58px) + 8px);z-index:3;margin-bottom:8px;background:#10141d;box-shadow:0 6px 0 #10141d}
  .editor-panel{flex:none;min-width:0;min-height:0;overflow:visible;padding-bottom:12px;scroll-padding-bottom:0}
  .editor-panel[data-panel=pack]{display:block;overflow:visible;padding-bottom:0}
  #packFooter{position:sticky;top:calc(var(--header-height,58px) + var(--editor-tabs-height,40px) + 12px);z-index:2;background:#10141d;padding:4px 0 10px;margin-bottom:8px;box-shadow:0 5px 0 #10141d}
  .pack-dances{flex:none;min-width:0;min-height:0;overflow:visible;padding:1px 2px 16px}
  .pack-dance{align-self:start}
  #viewport{height:clamp(180px,calc(var(--app-height,100dvh) * .30),340px);min-height:180px}
}
body.preview-expanded{overflow:hidden}
html:has(body.preview-expanded){overflow:hidden}
html:has(.picker-sheet:not([hidden]),dialog[open]),body:has(.picker-sheet:not([hidden]),dialog[open]){overflow:hidden}
@media(max-width:820px) and (max-height:640px){#viewport{height:calc(var(--app-height,100dvh) * .24);min-height:110px}}

.picker-label-row{display:flex;align-items:center;justify-content:space-between;gap:6px;min-width:0;height:30px}.picker-label-title{min-width:0;line-height:20px}
.random-lock{display:grid;place-items:center;flex:none;width:30px;height:30px;padding:4px;background:#171c27;color:#8c97a9;border-color:#303849}.random-lock svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}.random-lock[aria-pressed=true]{color:#c9b8ff;background:#2c2344;border-color:#6e54a9}
@media(hover:none){.random-lock:hover{border-color:#303849}.random-lock[aria-pressed=true]:hover{border-color:#6e54a9}}
#previewExpand{display:grid;place-items:center;color:#c0b3ff}#previewExpand svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}#previewExpand[aria-pressed=true]{background:#302645;border-color:#836bd5}
body.preview-expanded .stage{position:fixed;z-index:25;top:var(--safe-top);height:calc(var(--app-height,100dvh) - var(--safe-top) - max(12px,var(--safe-bottom)));left:var(--safe-left);right:var(--safe-right);display:flex;flex-direction:column;gap:8px;padding:12px;border-radius:16px;max-width:1450px;margin:0 auto}
body.preview-expanded .stage-head{flex:none;min-width:0;gap:8px}body.preview-expanded .stage-head h1{min-width:0;flex:1;margin:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
body.preview-expanded .stage #viewport{flex:1;min-height:0;height:auto;max-height:none}
body.preview-expanded .stage .actions,body.preview-expanded #outfitPreviewControls{display:grid;flex:none;margin-top:0}
body.preview-expanded #outfitPreviewControls{display:flex}
body.preview-expanded header,body.preview-expanded aside{visibility:hidden;pointer-events:none}
body header[hidden],body aside.card[hidden]{display:none}
@media(max-width:820px){.stage-head{min-width:0;gap:6px}.stage-head h1{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.stage-tools{flex:none}.stage-tools .icon{width:32px;height:32px;padding:3px;font-size:19px}body.preview-expanded .stage-head h1{font-size:14px}}
