*{box-sizing:border-box} :root{--ink:#36303d;--muted:#8a8290;--line:#e8e2ec;--purple:#795891;--soft:#f1eaf6;--pink:#e3abb9;--green:#548879}body{margin:0;background:#f9f7fa;color:var(--ink);font:14px/1.6 "Segoe UI","Malgun Gothic",sans-serif}button,input,select{font:inherit}button,select{cursor:pointer}button{border:1px solid var(--line);background:white;color:var(--ink);border-radius:9px;padding:9px 14px;transition:background .15s,border-color .15s}button:hover{background:var(--soft);border-color:#c9b8d8}button:disabled{opacity:.4;cursor:default}button:focus-visible,input:focus-visible,select:focus-visible,[tabindex]:focus-visible{outline:3px solid #cbb2df;outline-offset:2px}input,select{min-width:0;border:1px solid var(--line);border-radius:8px;background:white;color:var(--ink);padding:9px 11px}input[type=checkbox]{accent-color:var(--purple);width:16px;height:16px}button.primary{background:var(--purple);color:white;border-color:var(--purple)}button.primary:hover{background:#67457f}.topbar{height:86px;padding:0 4vw;display:flex;align-items:center;justify-content:space-between;background:#fff;border-bottom:1px solid var(--line);gap:20px}.wordmark{display:flex;align-items:center;gap:13px;font-size:18px;letter-spacing:-.5px;font-weight:650}.wordmark small{display:block;font-size:9px;letter-spacing:2.7px;color:var(--muted);font-weight:500;margin-top:1px}.logo{font-size:31px;display:grid;place-items:center;width:45px;height:45px;background:var(--soft);border-radius:15px;color:var(--purple)}.top-actions{display:flex;align-items:center;gap:9px}.local-tag{color:var(--green);font-size:12px;margin-right:12px;white-space:nowrap}.local-tag i{display:inline-block;border-radius:100%;background:#76ab98;width:6px;height:6px;margin-right:6px}main{max-width:1560px;padding:32px 4vw 16px;margin:auto}.intro{display:flex;align-items:center;justify-content:space-between;margin-bottom:27px}.eyebrow{font-size:10px;font-weight:700;letter-spacing:2px;color:var(--purple)}h1{font-size:29px;letter-spacing:-1px;font-weight:650;margin:5px 0}p{margin:6px 0;color:var(--muted)}.file-status{font-size:12px;text-align:right;color:var(--muted);line-height:1.8}.slots{display:grid;grid-template-columns:repeat(6,1fr);gap:10px;margin-bottom:22px}.slot{display:flex;align-items:center;gap:10px;text-align:left;padding:12px 15px;position:relative}.slot .slot-icon{border-radius:50%;background:#f4f1f6;width:33px;height:33px;display:grid;place-items:center;color:#b0a3bd}.slot small{display:block;font-size:9px;letter-spacing:1px;color:var(--muted)}.slot b{font-size:13px;font-weight:600}.slot.active{border-color:#b498c6;background:#f6f0fa}.slot.active .slot-icon{background:#e8daef;color:var(--purple)}.dirty-dot{position:absolute;right:10px;top:12px;width:6px;height:6px;background:#d092a5;border-radius:50%}.workspace{display:grid;grid-template-columns:300px minmax(0,1fr);gap:22px;align-items:start}.character-panel,.catalog-panel{background:white;border:1px solid var(--line);border-radius:17px;overflow:hidden}.character-panel{padding:22px}.panel-heading{display:flex;align-items:center;justify-content:space-between}.pill{background:var(--soft);padding:2px 9px;border-radius:6px;font-size:11px;color:var(--purple)}.name-label{font-size:11px;color:var(--muted);display:block;margin-top:17px}.name-row{display:flex;align-items:center;gap:8px;border-bottom:1px solid var(--line)}.name-row input{width:100%;border:0;padding:7px 0;font-size:20px;font-weight:600;border-radius:0}.name-row span{white-space:nowrap;font-size:10px;color:var(--muted)}.preview-stage{height:218px;margin-top:20px;border-radius:13px;background:radial-gradient(ellipse at 50% 48%,#fffeff 0,#f5f0fa 65%,#f2eaf5 100%);position:relative;display:grid;place-items:center;overflow:hidden}.preview-stage:before,.preview-stage:after{content:'✧';position:absolute;color:#c7b1d9;font-size:22px;top:25px;left:22px}.preview-stage:after{left:auto;right:24px;top:130px;font-size:15px}.stage-orbit{position:absolute;width:180px;height:180px;border-radius:50%;border:1px solid #e7ddef}.preview-stage canvas{position:relative;max-width:100%;max-height:190px;object-fit:contain;z-index:1}.preview-label{position:absolute;bottom:10px;font-size:8px;letter-spacing:2px;color:#a192ae}.preview-stage #preview-empty{position:absolute;font-size:52px;color:#bca3ce;text-align:center}.preview-stage #preview-empty span{display:block;font-size:11px;margin-top:0;color:#a394af}.fine-print{font-size:11px;line-height:1.7;color:var(--muted)}#preview-note{min-height:38px;margin:9px 0 15px}.appearance-summary{display:flex;gap:6px;flex-wrap:wrap}.appearance-chip{padding:4px 7px;font-size:10px;border-radius:5px;background:#f7f4f9;color:#796985;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.section-line{display:flex;align-items:center;justify-content:space-between;border-top:1px solid var(--line);padding-top:16px;margin-top:18px;gap:5px}h2{font-size:14px;margin:0}.text-button{border:0;background:none;padding:0;color:var(--muted);font-size:10px}.outfit-summary{display:grid;gap:8px;margin-top:12px}.outfit-row{display:flex;align-items:center;gap:10px;cursor:pointer}.outfit-row .mini{width:41px;height:41px;background:#f8f6fa;border-radius:7px;object-fit:contain}.outfit-row>div{min-width:0}.outfit-row small{color:var(--muted);font-size:9px;display:block}.outfit-row strong{font-size:11px;font-weight:500;display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:195px}.save-note{font-size:10px;color:var(--muted);line-height:1.8;border-top:1px dashed var(--line);margin-top:18px;padding-top:15px}.catalog-panel{min-height:695px}.main-tabs{display:flex;border-bottom:1px solid var(--line);padding:0 25px;gap:30px}.main-tabs button{padding:21px 0 17px;border:0;border-radius:0;background:none;color:var(--muted);font-weight:600;position:relative}.main-tabs button.active{color:var(--purple)}.main-tabs button.active:after{content:'';position:absolute;height:3px;border-radius:2px 2px 0 0;bottom:0;left:0;right:0;background:var(--purple)}#pending-count{font-size:10px;border-radius:5px;background:var(--soft);padding:1px 5px;margin-left:3px}#catalog-work,#sets-work{padding:23px 25px}.category-tabs{display:flex;gap:6px;flex-wrap:wrap;margin-bottom:19px}.category-tabs button{padding:6px 13px;border-radius:20px;font-size:12px;border-color:transparent;background:#f7f5f9;color:#8d7e97}.category-tabs button.active{background:#ece3f3;color:var(--purple);font-weight:600}.toolbar{display:flex;gap:8px;align-items:center}.toolbar>input{flex:1;min-width:70px}.search-box{display:flex;align-items:center;flex:1;border:1px solid var(--line);border-radius:8px;min-width:100px}.search-box span{font-size:23px;color:#b4a8bf;margin-left:10px;line-height:1}.search-box input{border:0;width:100%;font-size:12px;background:none}.toolbar select{font-size:11px;max-width:150px}.view-switch{display:flex;gap:0}.view-switch button{padding:5px 11px;font-size:22px;line-height:1.25;border-radius:7px 0 0 7px;color:#a397ad}.view-switch button:last-child{border-radius:0 7px 7px 0;border-left:0}.view-switch button[aria-pressed=true]{background:var(--soft);color:var(--purple)}.outfit-tools{display:flex;align-items:center;gap:14px;margin-top:12px}.outfit-tools>label:first-child{display:flex;align-items:center;gap:8px;flex:1;font-size:11px;white-space:nowrap}.outfit-tools select{width:100%;max-width:350px;font-size:11px}.toggle{display:flex;align-items:center;gap:5px;font-size:11px;white-space:nowrap}.results-bar{display:flex;justify-content:space-between;align-items:center;font-size:11px;color:var(--muted);margin:19px 0 13px}.scroll-button{padding:1px 9px;font-size:15px;margin-left:4px;border-radius:5px}.catalog{min-height:362px}.catalog.cards{display:grid;grid-template-rows:repeat(2,171px);grid-auto-flow:column;grid-auto-columns:calc((100% - 36px)/4);gap:12px;overflow-x:auto;scroll-snap-type:x proximity;padding-bottom:14px;scrollbar-width:thin;scrollbar-color:#d8c9e1 #f7f3fa}.item-card{padding:0;display:flex;flex-direction:column;text-align:left;border:1px solid var(--line);border-radius:10px;background:white;overflow:hidden;scroll-snap-align:start;position:relative;min-width:0}.item-card:hover{border-color:#b99fcd;background:white}.item-card.selected{border:2px solid var(--purple)}.item-card.selected:after{content:'✓';position:absolute;top:7px;right:7px;background:var(--purple);border-radius:50%;color:white;width:19px;height:19px;text-align:center;font-size:11px}.item-art{height:111px;background:#faf8fc;display:grid;place-items:center;position:relative;width:100%;flex-shrink:0}.item-art img{width:100%;height:100%;max-height:110px;object-fit:contain}.item-art .no-image{font-size:25px;color:#c2b4cb}.item-info{padding:7px 9px;min-width:0}.item-name{font-size:11px;line-height:1.5;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;font-weight:500}.item-id{font-size:9px;color:#a497ac;margin-top:1px}.item-card.unavailable{opacity:.55}.item-card.unavailable:before{content:'모델 미완';position:absolute;z-index:2;top:5px;left:5px;font-size:8px;padding:1px 5px;background:#fff4e4;color:#ac8348;border-radius:4px}.catalog.list{display:flex;flex-direction:column;max-height:420px;overflow-y:auto;gap:5px}.catalog.list .item-card{flex-direction:row;min-height:62px;flex-shrink:0;align-items:center}.catalog.list .item-art{width:68px;height:60px}.catalog.list .item-art img{max-height:60px}.catalog.list .item-name{-webkit-line-clamp:1}.catalog.list .item-info{padding:7px 14px}.catalog-footnote{margin-top:22px;padding-top:14px;border-top:1px solid var(--line);font-size:10px;color:var(--muted);display:flex;justify-content:space-between;gap:8px}.catalog-footnote span:first-child{color:var(--purple)}.paging{display:flex;align-items:center;justify-content:center;gap:12px;margin-top:10px;font-size:11px;color:var(--muted)}.paging button{padding:4px 10px;font-size:11px}.empty-state{padding:70px 15px;text-align:center;color:var(--muted);grid-column:1 / -1;min-width:200px}.review-intro p{font-size:11px;max-width:610px;margin:6px 0 18px}.set-layout{display:grid;grid-template-columns:190px 1fr;gap:18px;margin-top:19px;min-height:395px}.set-list{max-height:440px;overflow-y:auto;display:flex;flex-direction:column;gap:5px;padding-right:5px}.set-list button{flex-shrink:0;text-align:left;padding:10px;font-size:11px}.set-list button.active{background:var(--soft);border-color:#baa2cc}.set-list small{display:block;color:var(--muted);font-size:9px;margin-top:3px}.set-detail{min-width:0}.set-detail>input{width:100%;font-weight:600;margin-bottom:8px}.set-detail .evidence{font-size:10px;margin:3px 0 10px;color:var(--muted)}.set-pieces{display:grid;grid-template-columns:1fr 1fr;gap:9px}.set-piece{border:1px solid var(--line);border-radius:9px;padding:7px;min-width:0}.set-piece img{width:100%;height:85px;object-fit:contain;background:#faf8fc;border-radius:5px}.set-piece label{display:block;font-size:10px;margin:4px 0}.set-piece input{width:100%;font-size:10px;padding:5px;margin-bottom:5px}.set-piece select{width:100%;font-size:10px;padding:5px}.set-actions{display:flex;gap:6px;flex-wrap:wrap;margin-top:13px}.set-actions button{font-size:11px;padding:7px 10px}.set-files{border-top:1px solid var(--line);padding-top:16px;margin-top:20px;display:flex;align-items:center;gap:8px;flex-wrap:wrap}.set-files span{font-size:10px;color:var(--muted);margin-right:auto}.set-files button{font-size:10px;padding:5px 9px}footer{display:flex;gap:18px;font-size:9px;letter-spacing:1px;color:#b3a8ba;margin-top:25px}footer span{letter-spacing:0}footer #catalog-meta{margin-left:auto}#toast{position:fixed;bottom:30px;left:50%;transform:translate(-50%,20px);background:#42354e;color:white;box-shadow:0 6px 25px #32273b25;border-radius:10px;padding:12px 20px;z-index:20;opacity:0;pointer-events:none;font-size:12px;max-width:90vw;transition:all .2s}#toast.visible{opacity:1;transform:translate(-50%,0)}#drop-overlay{position:fixed;inset:15px;background:#f3eafaee;z-index:50;border:3px dashed #9a7aaf;border-radius:20px;display:grid;place-items:center;font-size:25px;color:var(--purple);pointer-events:none}dialog{border:1px solid var(--line);border-radius:15px;width:610px;max-width:90vw;padding:24px;box-shadow:0 30px 100px #25183144}dialog::backdrop{background:#30223c66}.dialog-heading{display:flex;align-items:center;justify-content:space-between}.dialog-heading button{border:0}.dialog-actions{text-align:right;margin-top:20px}.change-section{margin:16px 0;padding:12px;background:#faf7fc;border-radius:8px}.change-section h3{font-size:13px;margin:0 0 5px}.change-line{font-size:11px;margin:3px 0;overflow-wrap:anywhere}#changes-content{max-height:55vh;overflow-y:auto}[hidden]{display:none!important}
@media(min-width:1400px){.catalog.cards{grid-auto-columns:calc((100% - 48px)/5)}}
@media(max-width:1050px){main{padding:24px}.topbar{padding:0 24px}.workspace{grid-template-columns:255px minmax(0,1fr);gap:16px}.character-panel{padding:17px}.catalog.cards{grid-auto-columns:calc((100% - 24px)/3)}.main-tabs{gap:20px;padding:0 19px}#catalog-work,#sets-work{padding:19px}.local-tag{display:none}.slot{padding:10px}.slot .slot-icon{display:none}.outfit-tools{align-items:stretch;flex-direction:column;gap:5px}.toolbar{flex-wrap:wrap}.set-layout{grid-template-columns:145px 1fr}.set-pieces{grid-template-columns:1fr}.set-piece img{height:65px}}
@media(max-width:720px){.topbar{height:auto;min-height:95px;flex-wrap:wrap;padding:16px 18px;gap:12px}.wordmark{font-size:15px}.top-actions{width:100%;gap:6px}.top-actions button{flex:1;font-size:11px;padding:8px}.intro{align-items:flex-start}.intro h1{font-size:23px}.intro p{font-size:11px}.file-status{display:none}main{padding:23px 14px}.slots{grid-template-columns:repeat(3,1fr);gap:7px}.workspace{grid-template-columns:1fr}.character-panel{display:grid;grid-template-columns:1fr 1fr;column-gap:18px}.panel-heading,.name-label,.name-row{grid-column:1}.preview-stage{grid-column:1;height:170px;margin-top:14px}.preview-stage canvas{max-height:145px}#preview-note{grid-column:1}.appearance-summary,.section-line,.outfit-summary,.save-note{grid-column:2}.appearance-summary{grid-row:1 / 4;align-content:start}.section-line{grid-row:4;align-self:start;margin-top:0}.outfit-summary{grid-row:4 / 6;margin-top:43px;align-self:start}.save-note{grid-row:6;margin-top:0}.text-button{font-size:9px}.outfit-row strong{max-width:130px;font-size:10px}.catalog.cards{grid-auto-columns:calc((100% - 24px)/3)}.main-tabs{gap:22px}.set-layout{grid-template-columns:120px 1fr}.set-pieces{grid-template-columns:1fr 1fr}.catalog-footnote{flex-wrap:wrap}footer{flex-wrap:wrap}footer #catalog-meta{margin-left:0}}
.part-name-image{display:block;width:100%;max-width:150px;height:20px;object-fit:contain;object-position:left center}.catalog.list .part-name-image{width:160px;height:24px}
.catalog.face-choices{min-height:0}.catalog.face-choices.cards{grid-template-rows:auto;grid-auto-flow:row;grid-auto-columns:auto;grid-template-columns:repeat(auto-fit,minmax(140px,180px));align-content:start}.face-choices .item-art{display:grid;height:160px}.face-choices .item-art img{height:160px;max-height:160px}.face-choices .item-info{padding:10px 12px}.face-choices .item-name{font-size:14px}.catalog.face-choices.list .item-card{min-height:90px}.catalog.face-choices.list .item-art{width:80px;height:90px}.catalog.face-choices.list .item-art img{height:90px;max-height:90px}

/* Shared-device library and six character workbench. */
.login-screen{min-height:100vh;display:grid;place-items:center;padding:24px;background:radial-gradient(ellipse at 35% 20%,#f1e5f7,transparent 60%),#faf8fc}.login-card{width:390px;max-width:100%;padding:36px;background:#fff;border:1px solid var(--line);border-radius:24px;box-shadow:0 18px 80px #78618a12}.login-card .logo{margin-bottom:22px}.login-card h1{font-size:25px}.login-card p{font-size:12px}.login-card label{display:block;margin-top:25px;font-size:12px}.login-card input,.login-card button{width:100%;margin-top:8px}.login-card button{margin-top:14px}#login-error,#server-save-error{color:#a84562;font-size:12px;min-height:20px}.topbar{height:auto;min-height:86px;padding-top:15px;padding-bottom:15px;flex-wrap:wrap}.top-actions{flex-wrap:wrap}.top-actions button{font-size:12px}.save-library{display:flex;gap:9px;align-items:center;flex-wrap:wrap;padding:16px 18px;background:#f1ebf5;border:1px solid #e6ddec;border-radius:14px;margin-bottom:20px}.save-library>div{margin-right:auto}.save-library strong{font-size:13px;display:block}.save-library small{font-size:10px;color:var(--muted)}.save-library select{flex:1;max-width:300px;min-width:170px;font-size:12px}.save-library button{font-size:11px;padding:8px 11px}.workspace{grid-template-columns:minmax(0,1fr)}.character-panels{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:12px;margin-bottom:24px}.character-panels .character-panel{padding:14px;display:block;transition:border-color .15s,box-shadow .15s}.character-panels .character-panel.active{border-color:#ac8ac2;box-shadow:0 0 0 2px #ece2f3}.character-panels .eyebrow{font-size:8px;letter-spacing:1.1px}.character-panels .pill{border:0;padding:3px 8px}.character-panels .name-label{margin-top:10px;font-size:10px}.character-panels .name-row input{font-size:17px;padding:5px 0}.character-panels .name-row span{font-size:9px}.character-panels .preview-stage{height:140px;margin-top:12px;margin-bottom:12px}.character-panels .preview-stage canvas{max-height:135px}.character-panels .stage-orbit{height:115px;width:115px}.preview-empty{position:absolute;font-size:42px;color:#bca3ce}.character-panels .appearance-summary{gap:4px;min-height:75px;align-content:start}.character-panels .appearance-chip{font-size:9px;padding:2px 5px}.character-panels .section-line{padding-top:11px;margin-top:12px}.character-panels h2{font-size:11px}.character-panels .outfit-summary{margin-top:9px;gap:7px}.character-panels .outfit-row{gap:6px}.character-panels .outfit-row .mini{height:30px;width:30px;flex:0 0 30px}.character-panels .outfit-row strong{font-size:9px;max-width:145px}.character-panels .outfit-row small{font-size:8px}.panel-preset{font-size:10px;width:100%;margin-top:13px;padding:6px}.catalog-panel{min-height:610px}.catalog.cards{grid-auto-columns:calc((100% - 84px)/8)}.catalog.list{max-height:540px}.main-tabs{position:relative}#random-appearance{font-size:11px;padding:5px 10px;color:var(--purple);background:#f5eff8;margin-right:8px}.presets-dialog{width:1060px;max-height:92vh;overflow:auto}.presets-dialog>.dialog-heading{margin-bottom:10px}.presets-dialog>.dialog-heading h2{font-size:18px}.presets-dialog>p{font-size:12px}.preset-layout{display:grid;grid-template-columns:minmax(0,2fr) minmax(240px,1fr);gap:24px;margin-top:20px}.preset-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:7px;max-height:58vh;overflow-y:auto;padding:3px}.preset-grid button{min-width:0;padding:8px;text-align:left;border-radius:8px}.preset-grid button.active{border-color:var(--purple);background:var(--soft)}.preset-grid button.filled small{color:var(--purple)}.preset-grid small{display:block;font-size:9px;color:var(--muted)}.preset-grid b{display:block;font-weight:500;font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.preset-grid span{font-size:9px;color:var(--muted);display:block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.preset-detail{min-width:0;background:#faf7fc;border:1px solid var(--line);border-radius:12px;padding:18px}.preset-detail label{display:block;font-size:11px;margin:13px 0 5px}.preset-detail input,.preset-detail select,.preset-detail button{width:100%;font-size:12px;margin-bottom:8px}.preset-character{display:flex;align-items:center;gap:12px;margin:15px 0;min-height:65px}.preset-character img{width:80px;height:65px;object-fit:contain}.preset-character strong{font-size:14px}.preset-targets{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin:20px 0}.preset-target{display:grid;grid-template-columns:20px 1fr;gap:5px;padding:12px;border:1px solid var(--line);border-radius:10px;cursor:pointer}.preset-target:has(input:checked){border-color:var(--purple);background:var(--soft)}.preset-target input{accent-color:var(--purple);grid-column:1;align-self:center}.preset-target img{grid-column:2;height:65px;width:100%;object-fit:contain}.preset-target strong{grid-column:1 / -1;font-size:12px;text-align:center}#server-save-form>label{display:block;margin-top:16px;margin-bottom:5px;font-size:12px}#server-save-form>input,#server-save-form>select{width:100%}#server-save-note{font-size:12px;margin-top:10px}.set-layout{grid-template-columns:250px minmax(0,1fr)}.set-pieces{grid-template-columns:repeat(4,1fr)}.set-list{max-height:470px}.set-piece img{height:115px}
@media(max-width:1250px){.character-panels{grid-template-columns:repeat(3,minmax(0,1fr))}.character-panels .character-panel{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);column-gap:12px}.character-panels .panel-heading,.character-panels .name-label,.character-panels .name-row,.character-panels .preview-stage,.character-panels .panel-preset{grid-column:1}.character-panels .appearance-summary{grid-column:2;grid-row:1 / 4;min-height:0}.character-panels .section-line{grid-column:2;grid-row:4;margin-top:0;align-self:start}.character-panels .outfit-summary{grid-column:2;grid-row:4 / 7;align-self:start;margin-top:35px}.character-panels .preview-stage{height:128px}.character-panels .outfit-row strong{max-width:130px}.catalog.cards{grid-auto-columns:calc((100% - 60px)/6)}.set-pieces{grid-template-columns:repeat(4,1fr)}}
@media(max-width:900px){.character-panels{grid-template-columns:repeat(2,minmax(0,1fr))}.slots{grid-template-columns:repeat(3,1fr)}.catalog.cards{grid-auto-columns:calc((100% - 36px)/4)}.set-pieces{grid-template-columns:repeat(2,1fr)}.set-layout{grid-template-columns:190px minmax(0,1fr)}.preset-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.preset-layout{grid-template-columns:minmax(0,1fr) minmax(220px,1fr)}.local-tag{display:block}.save-library select{max-width:none}.save-library>div{width:100%}}
@media(max-width:580px){.character-panels{grid-template-columns:1fr}.character-panels .character-panel{grid-template-columns:minmax(0,1fr) minmax(0,1fr);padding:17px}.character-panels .outfit-row strong{max-width:180px}.character-panels .preview-stage{height:142px}.character-panels .appearance-chip{font-size:10px}.top-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));width:100%}.top-actions .local-tag{grid-column:1 / -1;margin:0}.top-actions button{padding:8px;font-size:11px}.catalog.cards{grid-auto-columns:calc((100% - 24px)/3)}.preset-layout{display:flex;flex-direction:column;gap:15px}.preset-grid{grid-template-columns:repeat(4,minmax(0,1fr));max-height:28vh}.preset-detail{padding:13px}.preset-targets{grid-template-columns:repeat(2,1fr)}.presets-dialog{padding:17px}.set-layout{grid-template-columns:115px minmax(0,1fr)}.set-pieces{grid-template-columns:1fr}.main-tabs{gap:18px;padding:0 15px}.main-tabs button{font-size:12px}#catalog-work,#sets-work{padding:17px}.save-library{padding:13px}.save-library select{flex-basis:60%}.save-library button{flex:1}.intro h1{font-size:22px}}

/* Keep mobile actions readable without squeezing native selects or dialogs. */
@media(max-width:580px){
 .save-library{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
 .save-library>div,.save-library>select{grid-column:1 / -1;width:100%;min-width:0;max-width:100%}
 .save-library>button{min-width:0;white-space:nowrap;padding:9px 6px}
 .save-library small{overflow-wrap:anywhere}
 .set-layout{grid-template-columns:minmax(0,1fr);gap:15px}
 .set-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));max-height:220px;align-content:start;padding-right:3px}
 .set-list button{min-width:0;overflow-wrap:anywhere}
 .set-pieces{grid-template-columns:repeat(2,minmax(0,1fr))}
 .set-detail,.set-detail .evidence,.set-files span{overflow-wrap:anywhere}
 #sets-work>.toolbar{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}
 #set-search{grid-column:1 / -1;width:100%}
 #set-status,#new-set{width:100%;max-width:none;min-width:0}
 #new-set,.set-actions button,.set-files button{white-space:nowrap}
 dialog{max-width:calc(100vw - 24px);max-height:calc(100vh - 24px);max-height:calc(100dvh - 24px);padding:17px;overflow:auto}
 .dialog-heading{gap:8px;align-items:flex-start}
 .dialog-heading h2{min-width:0;overflow-wrap:anywhere}
 .dialog-heading>button{flex:0 0 auto}
 .dialog-actions button{max-width:100%;white-space:normal}
 .preset-layout,.preset-grid,.preset-detail{min-width:0;max-width:100%}
 .preset-targets{grid-template-columns:repeat(2,minmax(0,1fr))}
 .preset-target{min-width:0;padding:10px}
 .preset-target strong,.preset-character strong,#preset-target-name,#preset-status{min-width:0;overflow-wrap:anywhere}
 .preset-character img{flex:0 0 65px;width:65px}
}

.character-panels .front-stage{height:260px;display:block;min-width:0}.front-stage:before,.front-stage:after{display:none}.character-panels .front-stage canvas{display:block;max-height:none;max-width:none;width:100%;height:100%}.front-stage[data-pending="true"]:after{content:"준비하고 있어요…";display:block;position:absolute;top:auto;bottom:8px;left:0;right:0;text-align:center;font-size:10px;color:#8a8290}.front-error{display:block;padding:16px;font-size:11px}.front-stage[data-error="true"]{border:1px dashed #c7b1d9}

.front-note{position:absolute;bottom:4px;left:4px;right:4px;text-align:center;color:#93667a;font-size:9px;background:#ffffffd9;border-radius:4px}

.front-enlarge{font-size:10px;padding:4px 8px;margin:-3px 0 10px;width:100%;grid-column:1}.front-large-dialog{width:620px;max-width:94vw;padding:18px}.front-large-dialog .front-stage{width:100%;height:min(75vh,760px);display:block;margin:0}.front-large-dialog .front-stage canvas{width:100%;height:100%;max-width:none;max-height:none}.front-large-dialog .dialog-heading{margin-bottom:8px}

/* Browse complete parts and collect outfits into freely named groups. */
.set-badge{position:absolute;top:6px;left:6px;background:#78548feF;border:1px solid #ffffffc9;border-radius:6px;color:white;font-size:10px;line-height:1;padding:4px 7px;box-shadow:0 1px 4px #452b5320;z-index:2}.catalog.list .set-badge{top:3px;left:3px;font-size:8px;padding:3px 5px}
.main-tabs{gap:0;overflow-x:auto;white-space:nowrap}.main-tabs button{flex:0 0 auto;margin-right:25px}.main-tabs button:not(:last-child):before{content:'|';position:absolute;right:-14px;top:21px;color:#d7ccdF;font-weight:400}
.category-line{display:flex;align-items:flex-start;gap:12px;margin-bottom:19px}.category-line .category-tabs{margin:0;flex:1;min-width:0}.category-divider{color:#c2b6cb;padding-top:5px}#random-appearance{flex:0 0 auto;border:1px solid #d8c8e4;border-radius:6px;margin:0;padding:7px 12px;font-size:12px;white-space:nowrap;background:#f1e9f7;color:#75548e}
.item-card.unavailable{display:none!important}.front-stage[data-front-enlarge]{cursor:zoom-in}.front-stage[data-front-enlarge]:focus-visible{outline:2px solid var(--purple);outline-offset:3px}.server-front-image{width:100%;height:100%;display:block;object-fit:contain}.front-error{position:absolute;bottom:4px;left:0;right:0;background:#fffdf4d9}.front-large-dialog .front-stage{cursor:default}
.library-work{padding:23px 25px}.library-heading{display:flex;gap:16px;align-items:flex-start;justify-content:space-between;margin-bottom:20px}.library-heading h2{font-size:18px}.library-heading p{font-size:12px;margin:6px 0 0;max-width:640px}.library-heading>button{flex:0 0 auto;font-size:12px}.outfit-sets.cards{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:14px;align-items:start}.outfit-set-card{border:1px solid var(--line);border-radius:12px;overflow:hidden;min-width:0;background:white}.wear-set{display:block;padding:13px;width:100%;border:0;border-radius:0;text-align:left;background:white}.wear-set:hover{background:#faf6fd}.wear-set:focus-visible{outline:2px solid var(--purple);outline-offset:-3px}.set-card-heading{display:block;min-height:48px;margin-bottom:10px}.set-card-heading strong{display:block;font-size:12px;line-height:1.6;overflow-wrap:anywhere}.set-card-heading>small{font-size:10px;color:var(--muted);display:block}.set-card-pieces{display:flex;flex-direction:column;gap:8px}.set-card-piece{display:flex;align-items:center;gap:8px;min-width:0}.set-card-piece>img,.set-card-piece>.no-image{width:62px;height:72px;flex:0 0 62px;object-fit:contain;background:#faf7fc;border-radius:7px}.set-card-piece>span:not(.no-image){min-width:0;font-size:10px;line-height:1.6;overflow-wrap:anywhere}.set-card-piece small{display:block;color:var(--muted);font-size:9px}.set-card-foot{border-top:1px solid var(--line);padding:8px 10px;display:flex;flex-wrap:wrap;gap:6px;align-items:center}.set-card-foot>button{padding:4px 7px;font-size:10px}.set-group-tags{display:flex;gap:4px;flex-wrap:wrap;min-width:0}.set-group-tags>span{background:#f1ebf6;color:var(--purple);padding:2px 5px;border-radius:4px;font-size:9px;max-width:130px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.set-group-check{font-size:11px;display:flex;align-items:center;gap:5px}.set-group-check input{accent-color:var(--purple)}.outfit-sets.list{display:flex;flex-direction:column;gap:12px}.outfit-sets.list .wear-set{display:grid;grid-template-columns:180px minmax(0,1fr);gap:14px;align-items:center}.outfit-sets.list .set-card-heading{margin:0;min-height:0}.outfit-sets.list .set-card-pieces{flex-direction:row;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}.outfit-sets.list .set-card-piece>img{width:66px;flex-basis:66px;height:80px}.outfit-sets.list .set-card-foot{justify-content:flex-end}.group-cards{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:15px;margin-top:20px}.set-group-card{border:1px solid var(--line);border-radius:13px;padding:14px;background:white;min-width:0}.open-set-group{display:block;border:0;padding:0;width:100%;text-align:left;background:none}.open-set-group:hover{background:none}.open-set-group>strong{font-size:15px;overflow-wrap:anywhere;display:block}.open-set-group>small{font-size:11px;color:var(--muted)}.group-cover{display:flex;min-height:100px;align-items:center;gap:3px;margin:12px 0;background:#faf7fc;border-radius:8px}.group-cover img{width:25%;height:90px;object-fit:contain;min-width:0}.group-cover>span{font-size:12px;padding:16px;color:var(--muted)}.set-group-card>button:last-child{font-size:11px;width:100%;margin-top:8px}.group-edit-dialog{width:780px}.group-edit-dialog label[for],#group-assign-form>label{display:block;font-size:12px;margin:14px 0 5px}.group-edit-dialog input:not([type=checkbox]),#group-assign-new{width:100%}.group-member-tools{display:flex;gap:8px;flex-wrap:wrap;align-items:center;margin:12px 0;font-size:11px}.group-member-tools>span{margin-right:auto}.group-member-tools button{font-size:10px;padding:5px 8px}.group-members{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;max-height:40vh;overflow:auto;border:1px solid var(--line);border-radius:10px;padding:9px}.group-member{display:flex;gap:8px;align-items:center;padding:7px;border-radius:7px;background:#faf8fc;min-width:0;cursor:pointer}.group-member:has(input:checked){background:#eee3f6}.group-member img{width:45px;height:52px;object-fit:contain}.group-member>span{font-size:11px;overflow-wrap:anywhere}.group-member small{display:block;color:var(--muted);font-size:9px}.group-member input{accent-color:var(--purple)}.group-assign-choices{display:flex;flex-direction:column;gap:6px;max-height:45vh;overflow:auto;margin:15px 0}.group-assign-choices>label{display:flex;gap:8px;align-items:center;font-size:13px;padding:9px;background:#faf7fc;border-radius:8px;overflow-wrap:anywhere}.group-assign-choices small{margin-left:auto;color:var(--muted)}#group-edit-error,#group-assign-error{font-size:12px;color:#a84562}#group-selection-tools{display:flex;gap:6px;align-items:center;flex-wrap:wrap}#group-selection-tools button{font-size:11px;padding:5px 8px}
@media(max-width:1200px){.outfit-sets.cards{grid-template-columns:repeat(4,minmax(0,1fr))}.group-cards{grid-template-columns:repeat(3,minmax(0,1fr))}.outfit-sets.list .wear-set{grid-template-columns:130px minmax(0,1fr)}.outfit-sets.list .set-card-piece{flex-direction:column;align-items:flex-start}.outfit-sets.list .set-card-piece>img{width:100%;height:72px;flex-basis:auto}}
@media(max-width:800px){.outfit-sets.cards{grid-template-columns:repeat(3,minmax(0,1fr))}.group-cards{grid-template-columns:repeat(2,minmax(0,1fr))}.set-card-piece{flex-direction:column;align-items:stretch}.set-card-piece>img{width:100%;height:78px;flex-basis:auto}.library-heading{flex-wrap:wrap}.outfit-sets.list .wear-set{display:block}.outfit-sets.list .set-card-heading{margin-bottom:12px}.set-card-heading{min-height:65px}}
@media(max-width:580px){.library-work{padding:17px}.outfit-sets.cards{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.group-cards{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.set-card-piece{flex-direction:row;align-items:center}.set-card-piece>img{width:48px;height:64px;flex-basis:48px}.wear-set{padding:10px}.set-card-piece>span:not(.no-image){font-size:9px}.outfit-sets.list .set-card-pieces{gap:7px}.outfit-sets.list .set-card-piece{flex-direction:column;align-items:stretch}.outfit-sets.list .set-card-piece>img{width:100%;height:66px;flex-basis:auto}.group-members{grid-template-columns:1fr}.category-line{gap:7px}.category-line .category-tabs{gap:5px}.category-line .category-tabs button{padding:6px 9px}.library-work .toolbar>input{flex-basis:100%}.results-bar:has(#group-selection-tools){flex-wrap:wrap;gap:10px}.set-group-card{padding:10px}.group-cover img{height:70px}.main-tabs button{margin-right:24px}}
.motion-controls{border-top:1px solid var(--line);padding-top:12px;margin-top:10px}.motion-choice-row{display:flex;align-items:end;gap:10px;flex-wrap:wrap}.motion-choice-row label{display:flex;flex-direction:column;gap:4px;font-size:10px;color:var(--muted)}.motion-choice-row select{min-width:100px;padding:7px 10px;font-size:12px}.motion-choice-row button{padding:8px 12px;font-size:12px}.motion-slider-row{display:flex;align-items:center;gap:14px;margin-top:14px}.motion-slider-row input{flex:1;min-width:0;accent-color:var(--purple)}.motion-slider-row output{font-size:12px;font-variant-numeric:tabular-nums;min-width:48px;text-align:right}.motion-caption{display:flex;justify-content:space-between;gap:10px;font-size:10px;color:var(--muted);margin-top:6px}#motion-status{font-size:11px;color:var(--purple);min-height:16px;margin:5px 0 0}.front-large-dialog .front-stage{height:min(58vh,540px)}
.workspace.has-selected-character{grid-template-columns:280px minmax(0,1fr)}
.selected-character{position:sticky;top:16px;padding:18px;border-color:#cbb5d8}
.selected-name{font-size:21px;margin:9px 0 0;overflow-wrap:anywhere}
.selected-name-edit,.selected-character .panel-preset,.character-panels-toggle{display:none}
.selected-details{min-width:0}
.selected-pose-label{font-size:10px;color:var(--muted);margin-top:1px}
.selected-character .front-stage{height:300px;margin:12px 0 9px;display:block;cursor:zoom-in}
.selected-character .front-stage canvas{max-width:none;max-height:none;width:100%;height:100%;display:block}
.selected-character .front-stage[data-ready="false"]>img,.selected-character .front-stage[data-ready="false"]>canvas{visibility:hidden}
.selected-character .appearance-summary{gap:5px}
.selected-character .appearance-chip{border:0;text-align:left;white-space:normal;line-height:1.5;overflow-wrap:anywhere}
.selected-character .section-line{margin-top:13px;padding-top:12px}
.selected-character .outfit-summary{gap:6px;margin-top:9px}
.selected-character .outfit-row{padding:3px;border:0;border-radius:6px;text-align:left;background:#faf8fc;width:100%}
.selected-character .outfit-row>span{min-width:0}.selected-character .outfit-row strong{max-width:175px}
.selected-character .mini{width:34px;height:34px;flex:0 0 34px}
.workspace.has-selected-character .catalog.cards{grid-auto-columns:calc((100% - 60px)/6)}
@media(max-width:1150px){.workspace.has-selected-character{grid-template-columns:250px minmax(0,1fr);gap:16px}.workspace.has-selected-character .catalog.cards{grid-auto-columns:calc((100% - 36px)/4)}.workspace.has-selected-character .toolbar{flex-wrap:wrap}.workspace.has-selected-character .main-tabs{gap:20px;padding:0 18px}}
@media(max-width:800px){
 .character-panels-toggle{display:block;width:100%;margin:0 0 16px;text-align:left;font-size:12px;color:var(--purple);background:var(--soft)}
 .character-panels[data-mobile-expanded="false"]{display:none}
 .workspace.has-selected-character{grid-template-columns:minmax(0,1fr)}
 .selected-character{position:static;display:grid;grid-template-columns:minmax(100px,.85fr) minmax(0,1.35fr);gap:0 12px;padding:14px}
 .selected-character .panel-heading{grid-column:1 / -1;grid-row:1}
 .selected-character .selected-name,.selected-character .selected-pose-label{display:none}
 .selected-character .selected-name-edit{display:flex;grid-column:1 / -1;grid-row:2;margin:4px 0 12px;padding-bottom:3px}
 .selected-name-edit input{font-size:18px;padding:4px 0}
 .selected-character .front-stage{grid-column:1;grid-row:3;height:100%;min-height:210px;max-height:320px;margin:0;align-self:start}
 .selected-character .selected-details{grid-column:2;grid-row:3;padding-left:10px;border-left:1px solid var(--line)}
 .selected-character .appearance-summary{display:flex;flex-direction:column;align-items:stretch;gap:2px;margin:0}
 .selected-character .appearance-chip{font-size:10px;padding:2px 3px;line-height:1.4;border-radius:3px;background:transparent}
 .selected-character .section-line{margin-top:7px;padding-top:7px}
 .selected-character .section-line h2{font-size:10px}
 .selected-character .outfit-summary{margin-top:5px;gap:3px}
 .selected-character .outfit-row{gap:4px;padding:2px;background:transparent}
 .selected-character .outfit-row strong{max-width:100%;font-size:10px;line-height:1.4}
 .selected-character .outfit-row small{font-size:8px;line-height:1.3}
 .selected-character .mini{width:24px;height:28px;flex-basis:24px}
 .selected-character .front-enlarge{grid-column:1 / -1;grid-row:4;margin-top:12px;padding:7px;border-top:1px solid var(--line)}
 .selected-character .panel-preset{display:block;grid-column:1 / -1;grid-row:5;margin-top:6px;padding:7px;font-size:11px}
 .catalog.face-choices.cards{grid-template-rows:repeat(2,171px);grid-auto-flow:column;grid-template-columns:none}
 .face-choices .item-art{height:111px}.face-choices .item-art img{height:110px;max-height:110px}
 .face-choices .item-info{padding:9px 10px}.face-choices .item-name{font-size:11px}
 .catalog.face-choices.list .item-card{min-height:62px}.catalog.face-choices.list .item-art{width:68px;height:60px}.catalog.face-choices.list .item-art img{height:60px;max-height:60px}
}
.catalog.outfit-choices.cards{grid-template-rows:repeat(3,171px)}
@media(max-width:580px){.workspace.has-selected-character .catalog.cards{grid-auto-columns:calc((100% - 24px)/3)}}
@media(max-width:600px){.motion-choice-row{display:grid;grid-template-columns:1fr 1fr;gap:8px}.motion-choice-row label{min-width:0}.motion-choice-row select{width:100%;min-width:0}.motion-choice-row button{height:35px}.front-large-dialog .front-stage{height:min(44vh,430px)}.motion-caption{font-size:9px}}
/* Four independent wardrobe rows share search and brand filters. */
.front-stage>img,.front-stage>canvas{transform:scaleX(-1)}
.login-card>small{display:block;font-size:11px;color:var(--muted);margin:8px 0 20px;line-height:1.6}
.workspace-save-bar{display:flex;align-items:center;justify-content:flex-end;gap:10px;flex-wrap:wrap;margin:-8px 0 18px;font-size:11px;color:var(--muted)}
.workspace-save-bar button{padding:4px 8px;font-size:11px}.workspace-save-bar [data-state=conflict],.workspace-save-bar [data-state=error]{color:#a84562}
#front-large-content{overflow:hidden;touch-action:none;overscroll-behavior:contain;border-radius:14px;background:#f7f4fa;cursor:grab;user-select:none}
#front-large-content:active{cursor:grabbing}#front-large-content .front-stage{margin:0;overflow:visible;will-change:transform;transform-origin:center center;touch-action:none;cursor:inherit}
#front-large-content img,#front-large-content canvas{pointer-events:none;user-select:none;-webkit-user-drag:none}
.preview-zoom-tools{display:flex;align-items:center;justify-content:flex-end;gap:10px;font-size:10px;color:var(--muted);margin-top:7px}
.preview-zoom-tools>span{margin-right:auto}.preview-zoom-tools button{padding:4px 8px;font-size:10px}.preview-zoom-tools output{min-width:35px;text-align:right}
.front-large-dialog #front-large-content{height:min(52vh,calc(94dvh - 300px));min-height:160px}
.front-large-dialog #front-large-content .front-stage{height:100%}
.motion-number-heart{display:flex;align-items:center;gap:5px}.motion-number-heart select{min-width:155px;max-width:230px}
#motion-heart{font-size:25px;line-height:1;padding:5px 8px;border-color:transparent;background:none;color:#93889b;min-width:38px}
#motion-heart[aria-pressed=true]{color:#e84870}#motion-heart.pop,#motion-heart.heart-pop{animation:heart-pop .35s ease-out}
@keyframes heart-pop{0%{transform:scale(1)}40%{transform:scale(1.55) rotate(-10deg)}75%{transform:scale(.9)}100%{transform:scale(1)}}
.motion-transport{display:flex;align-items:center;gap:8px;margin-top:13px}.motion-transport button{padding:7px 15px;font-size:12px}.motion-transport #motion-play{min-width:105px}.motion-transport span{margin-left:auto;color:var(--muted);font-size:10px}
.motion-playlist-bar .motion-slider-row{margin-top:10px}.motion-playlist-bar input[type=range]{appearance:none;-webkit-appearance:none;height:10px;border:1px solid #d3cbd9;border-radius:8px;margin:8px 0;cursor:pointer}
.motion-playlist-bar input::-webkit-slider-thumb{appearance:none;-webkit-appearance:none;width:18px;height:18px;border-radius:50%;background:var(--purple);border:2px solid white;box-shadow:0 1px 4px #77648588}
.motion-playlist-bar input::-moz-range-thumb{width:15px;height:15px;border-radius:50%;background:var(--purple);border:2px solid white}
.timeline-legend{display:flex;gap:14px;color:var(--muted);font-size:9px}.timeline-legend span{display:flex;align-items:center;gap:4px}.timeline-legend i{width:15px;height:6px;background:white;border:1px solid #d3cbd9;border-radius:3px}.timeline-legend i.ready{background:#aaa4b1}
[hidden]{display:none!important}
@media(max-width:600px){.motion-choice-row{grid-template-columns:1fr 1fr}.motion-number-label{grid-column:1/-1}.motion-number-heart select{max-width:none;flex:1}.preview-zoom-tools{flex-wrap:wrap}.preview-zoom-tools>span{font-size:9px}.front-large-dialog{padding:15px}.motion-transport button{padding:7px 12px}.front-large-dialog #front-large-content{height:min(44vh,calc(94dvh - 370px))}}
.catalog.wardrobe-overview{display:flex;flex-direction:column;gap:22px;min-height:0;max-width:100%;overflow:visible}
.wardrobe-shelf{min-width:0;max-width:100%}
.wardrobe-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin:0 0 10px}
.wardrobe-heading h3{font-size:13px;font-weight:600;margin:0;color:var(--ink)}
.wardrobe-heading h3 small{font-size:10px;font-weight:400;color:var(--muted);margin-left:7px}
.shelf-controls{display:flex;align-items:center;gap:6px;flex-wrap:wrap;font-size:10px;color:var(--muted)}
.shelf-controls button{padding:4px 8px;font-size:10px;white-space:nowrap}
.shelf-controls .scroll-button{margin-left:0;font-size:14px;line-height:1.2}
.wardrobe-items{display:grid;grid-template-rows:180px;grid-auto-flow:column;grid-auto-columns:minmax(130px,calc((100% - 48px)/5));gap:12px;overflow-x:auto;overflow-y:hidden;max-width:100%;min-width:0;scroll-snap-type:x proximity;scrollbar-width:thin;scrollbar-color:#d8c9e1 #f7f3fa;padding:0 0 12px;overscroll-behavior-x:contain}
.wardrobe-items .item-card{height:180px;min-width:0}
.wardrobe-items .item-art{height:118px}.wardrobe-items .item-art img{max-height:118px}
.wardrobe-items img[data-src]{visibility:hidden}
.shelf-empty{grid-column:1 / -1;min-width:0;padding:40px 12px;font-size:12px;color:var(--muted)}
.category-tabs .wardrobe-divider{align-self:center;padding:0 3px}
@media(max-width:1150px){.wardrobe-items{grid-auto-columns:minmax(130px,calc((100% - 24px)/3))}}
@media(max-width:580px){.wardrobe-heading{gap:8px}.shelf-controls{width:100%;justify-content:flex-end}.wardrobe-items{grid-auto-columns:minmax(122px,calc((100% - 12px)/2));gap:12px}.catalog.wardrobe-overview{gap:17px}}
.preview-mode-switch{display:flex;gap:5px;margin:8px 0 10px;padding:3px;background:#f0eaf5;border-radius:10px;width:fit-content}
.preview-mode-switch button{border:0;background:transparent;padding:7px 15px;font-size:11px;white-space:nowrap;border-radius:7px}
.preview-mode-switch button[aria-pressed=true]{background:white;color:var(--purple);box-shadow:0 1px 4px #34234318;font-weight:700}
.selected-character>.preview-mode-switch{width:100%}.selected-character>.preview-mode-switch button{flex:1}
.interactive-stage{position:relative;isolation:isolate;cursor:grab}.interactive-stage:active{cursor:grabbing}
#interactive-preview-canvas{position:absolute;inset:0;overflow:hidden;border-radius:inherit}
#interactive-preview-canvas canvas{display:block;width:100%;height:100%;max-width:none;max-height:none;touch-action:none;outline-offset:-3px}
.interactive-stage[data-pending=true]:after{display:none}.selected-character .interactive-stage{cursor:grab}
.interactive-preview-message{position:absolute;z-index:2;bottom:12px;left:10px;right:10px;display:flex;flex-direction:column;align-items:center;gap:8px;pointer-events:none;color:var(--muted);font-size:11px;text-align:center}
.interactive-preview-message span:not(:empty){padding:7px 10px;border-radius:8px;background:#fffffff0;box-shadow:0 2px 10px #3423430d}
.interactive-preview-message button{pointer-events:auto;padding:7px 12px;font-size:11px}
.interactive-hint{font-size:10px;text-align:center;color:var(--muted);line-height:1.7;margin:8px 0}
.hair-physics-control{display:flex;flex-wrap:wrap;align-items:center;gap:8px;width:100%;max-width:340px;min-width:0;min-height:32px;margin:4px auto 8px;padding:3px 8px;font-size:11px;color:var(--purple);user-select:none}
.hair-physics-control .hair-physics-toggle{display:flex;align-items:center;gap:7px;margin:0;font-size:11px;cursor:pointer}
.hair-physics-control input[type=checkbox]{width:16px;height:16px;margin:0;padding:0;accent-color:var(--purple);cursor:pointer}
.hair-strength-control{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:2px 6px;flex-basis:100%;width:100%;min-width:0}
.hair-strength-control label{font-size:10px;margin:0;line-height:1.5}.hair-strength-control output{font-size:10px;line-height:1.5;font-variant-numeric:tabular-nums}
.hair-strength-control input[type=range]{grid-column:1/-1;width:100%;min-width:0;height:24px;padding:0;margin:0;accent-color:var(--purple);cursor:pointer;touch-action:pan-y}
.hair-strength-control input:disabled{opacity:.45;cursor:default}
.hair-strength-labels{grid-column:1/-1;display:flex;justify-content:space-between;font-size:9px;line-height:1.3;color:var(--muted)}
.hair-physics-control small{flex-basis:100%;font-size:10px;line-height:1.5;color:var(--muted);font-weight:400}
.hair-physics-control:focus-within{outline:2px solid #b498c6;outline-offset:2px;border-radius:6px}
.interactive-camera-tools>div{display:flex;gap:6px;flex-wrap:wrap;justify-content:center}
.interactive-camera-tools button{padding:6px 12px;font-size:11px}.interactive-camera-tools p{font-size:10px;line-height:1.6;text-align:center;color:var(--muted);margin:8px 0}
.front-large-dialog.is-3d #front-large-content{overflow:hidden;touch-action:none;cursor:grab}
.front-large-dialog.is-3d #interactive-preview{height:100%;width:100%;margin:0;transform:none}
.front-large-dialog.is-3d #interactive-preview-canvas canvas{pointer-events:auto}
.immersive-open{font-size:11px}.front-large-dialog>.immersive-open{display:block;margin:0 0 10px auto;padding:6px 12px}
.continuous-motion-controls .motion-choice-row{display:flex}.continuous-motion-controls .motion-number-label{flex:1;min-width:120px}
.continuous-motion-controls .motion-number-heart select{width:100%;max-width:none}
#continuous-motion-status{min-height:16px;margin:5px 0 0;font-size:11px;color:var(--purple)}
#immersive-close{position:absolute;right:max(12px,env(safe-area-inset-right));top:max(12px,env(safe-area-inset-top));z-index:20;width:44px;height:44px;padding:0;border-radius:50%;background:#ffffffdb;color:#504259;font-size:22px;line-height:1;box-shadow:0 2px 12px #24182e22}
.front-large-dialog.is-immersive{position:fixed;inset:auto;top:var(--immersive-top,0);left:var(--immersive-left,0);margin:0;padding:0;border:0;border-radius:0;width:var(--immersive-width,100vw);height:var(--immersive-height,100dvh);max-width:none;max-height:none;overflow:hidden;background:#f7f4fa;overscroll-behavior:none}
.front-large-dialog.is-immersive::backdrop{background:#f7f4fa}
.save-library[data-file-dragover="true"]{outline:2px dashed var(--purple);outline-offset:3px;background:var(--soft)}
.preview-output-actions{display:flex;gap:7px;align-items:center;justify-content:flex-end;margin:8px 0 10px}
.preview-output-actions button{font-size:11px;padding:7px 12px;white-space:nowrap}
.selected-character>.preview-output-actions{width:100%;margin-top:4px}.selected-character>.preview-output-actions button{flex:1;padding:7px 5px}
.preview-export-dialog{width:min(430px,calc(100vw - 28px));max-height:calc(100dvh - 28px);overflow:auto}
.preview-export-dialog label{display:block;font-size:12px;margin:15px 0 6px}.preview-export-dialog select{width:100%}
.preview-export-description{font-size:12px;line-height:1.7}.preview-export-dialog progress{width:100%;height:13px;accent-color:var(--purple);margin-top:12px}
#preview-export-status{min-height:1.6em;font-size:12px}#preview-export-error{color:#a33d50;font-size:12px;white-space:pre-line}#preview-export-support{white-space:pre-line}
@media(max-width:800px){.selected-character>.preview-output-actions{grid-column:1/-1;grid-row:6;margin:5px 0 0}}
.front-large-dialog.is-immersive>:not(#front-large-content):not(#immersive-close):not(#expanded-hair-physics-control){display:none!important}
.front-large-dialog.is-immersive #expanded-hair-physics-control{position:absolute;z-index:20;left:max(12px,env(safe-area-inset-left));bottom:max(12px,env(safe-area-inset-bottom));width:min(260px,calc(100% - 24px));margin:0;padding:8px 12px;border-radius:10px;background:#fffffff0;box-shadow:0 2px 12px #24182e22}
.front-large-dialog.is-immersive #front-large-content,.front-large-dialog.is-3d.is-immersive #front-large-content{position:absolute;inset:0;width:100%;height:100%;min-height:0;max-height:none;border-radius:0}
.front-large-dialog.is-immersive #front-large-content .front-stage{width:100%;height:100%;min-height:0;max-height:none;margin:0;border:0;border-radius:0;background:transparent}
.front-large-dialog.is-immersive #front-large-content img{width:100%;height:100%;max-width:none;max-height:none;object-fit:contain}
.front-large-dialog.is-immersive .interactive-preview-message,.front-large-dialog.is-immersive .front-error,.front-large-dialog.is-immersive .front-note,.front-large-dialog.is-immersive .front-stage:before,.front-large-dialog.is-immersive .front-stage:after{display:none!important}
@media(max-width:800px){.selected-character>#selected-enlarge{grid-row:5}.selected-character>#selected-immersive{grid-row:6;grid-column:1/-1}.selected-character>.panel-preset{grid-row:7}}
@media(max-width:600px){.front-large-dialog>.preview-mode-switch{margin-top:0;margin-bottom:7px}.interactive-camera-tools>div{gap:4px}.interactive-camera-tools button{padding:5px 9px;font-size:10px}.interactive-camera-tools p{font-size:9px;margin:6px 0}.front-large-dialog.is-3d #front-large-content{height:min(42vh,calc(94dvh - 400px));min-height:150px}}
@media(max-width:800px){.selected-character>.preview-mode-switch{grid-column:1 / -1;grid-row:3;margin:0 0 10px}.selected-character>#selected-front-preview,.selected-character>#selected-3d-home{grid-column:1;grid-row:4;min-width:0}.selected-character .selected-details{grid-row:4}.selected-character .front-enlarge{grid-row:5}.selected-character>#selected-3d-home .front-stage{height:245px;min-height:210px;max-height:320px}.interactive-hint{font-size:9px;line-height:1.4;margin:5px 0}.selected-character>.panel-preset{grid-row:7}}

/* Mirror pixels only: the host keeps its normal drag and zoom coordinates. */
body[data-preview-mirrored="true"] .front-stage:not(.interactive-stage)>:is(img,canvas){transform:scaleX(-1)!important}
body[data-preview-mirrored="false"] .front-stage:not(.interactive-stage)>:is(img,canvas){transform:none!important}

/* Let Japanese part metadata wrap without clipping the card footer. */
#catalog.cards:not(.outfit-choices):not(.face-choices):has(.part-name-ja){grid-template-rows:repeat(2,minmax(171px,max-content))}
@media(max-width:800px){#catalog.cards.face-choices:has(.part-name-ja){grid-template-rows:repeat(2,minmax(171px,max-content))}}

.arcade-qr-open{font-size:11px;padding:7px 8px;margin:0 0 10px;width:100%;grid-column:1}
.arcade-qr-dialog{width:min(430px,calc(100vw - 28px));max-height:calc(100dvh - 28px);overflow:auto}
.arcade-qr-dialog .dialog-heading h2{font-size:20px}.arcade-qr-character{font-size:13px;margin:8px 0;color:var(--purple);overflow-wrap:anywhere}
#arcade-qr-status{font-size:12px;min-height:1.6em}#arcade-qr-errors{font-size:12px;color:#a33d50}#arcade-qr-error-message{white-space:pre-line}
#arcade-qr-issues{padding-left:20px}#arcade-qr-issues li{margin:10px 0;overflow-wrap:anywhere}#arcade-qr-issues strong,#arcade-qr-issues span{display:block}
.arcade-qr-image{display:grid;place-items:center;background:#fff;padding:12px;margin:14px 0;border:1px solid var(--line);border-radius:8px}
.arcade-qr-image img{display:block;width:min(100%,320px);height:auto;image-rendering:pixelated}
.arcade-qr-metadata{margin:12px 0;font-size:12px}.arcade-qr-metadata>div{display:flex;gap:12px;justify-content:space-between;padding:5px 0}.arcade-qr-metadata dt{color:var(--muted)}.arcade-qr-metadata dd{margin:0;text-align:right;overflow-wrap:anywhere}
#arcade-qr-player-code-row dd{font-variant-numeric:tabular-nums}
@media(max-width:800px){.selected-character>#selected-arcade-qr{grid-column:1/-1;grid-row:6;margin:5px 0 0}.selected-character>.preview-output-actions{grid-row:7}.selected-character>.panel-preset{grid-row:8}}
