/* Standalone shell. Editor selectors are scoped for embedding in the game. */
.studio-page{margin:0;background:#070b14;color:#f4f7ff;font-family:system-ui,'Malgun Gothic',sans-serif}
.studio-shell{max-width:1160px;margin:auto;padding:28px 32px 40px}
.studio-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:24px}
.studio-header h1{font-size:24px;letter-spacing:-1px;margin:0}
.studio-header [role=status]{font-size:12px;color:#94a3c7}
.character-editor{--editor-surface:#101a2c;--ink:#f4f7ff;--line:#293751;--editor-accent:#8e9eff;--editor-on-accent:#10182a;color:var(--ink);font-size:14px;font-family:inherit;color-scheme:dark;display:grid;grid-template-columns:320px minmax(0,1fr);gap:22px;align-items:start}
.character-editor *{box-sizing:border-box}
.character-editor h2,.character-editor h3{margin:0;font-size:14px;font-weight:700}
.character-editor button,.character-editor input{font:inherit;color:inherit}
.character-editor button{cursor:pointer;border:0;-webkit-tap-highlight-color:transparent}
.character-editor button:disabled{opacity:.35;cursor:default}
.character-editor :is(button,input,[tabindex]):focus-visible{outline:3px solid #ffd166;outline-offset:3px}
.character-editor canvas{image-rendering:pixelated}
.character-editor [hidden]{display:none!important}
.character-editor .preview-panel,.character-editor .wardrobe-panel{background:var(--editor-surface);border:1px solid var(--line);border-radius:16px;min-width:0;overflow:hidden}
.character-editor .preview-panel{padding:18px;position:sticky;top:20px}
.character-editor .preview-panel h2{margin-bottom:16px}
.character-editor .stage{height:340px;display:flex;align-items:center;justify-content:center;overflow:hidden;border-radius:10px;background-color:#14243b;background-image:linear-gradient(45deg,#182a44 25%,transparent 25%),linear-gradient(-45deg,#182a44 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#182a44 75%),linear-gradient(-45deg,transparent 75%,#182a44 75%);background-size:32px 32px;background-position:0 0,0 16px,16px -16px,-16px 0}
.character-editor [data-avatar]{width:256px;height:320px;max-width:100%;object-fit:contain}
.character-editor .preview-toolbar{display:flex;justify-content:space-between;gap:12px;padding-top:16px}
.character-editor .preview-toolbar button{font-size:12px;background:#1c2c47;padding:10px 14px;border-radius:8px}
.character-editor .role-section{padding:20px}
.character-editor .role-section h2{margin-bottom:12px}
.character-editor .role-looks{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.character-editor .role-look{position:relative;display:flex;align-items:center;justify-content:center;gap:6px;padding:4px 8px;background:#231e31;border:1px solid #443553;border-radius:10px;min-width:0}
.character-editor .role-look-doctor{background:#152f33;border-color:#2a5056}
.character-editor .role-look-police{background:#182b49;border-color:#324d75}
.character-editor .role-look canvas{width:56px;height:70px;flex-shrink:0}
.character-editor .role-look strong{font-size:12px;white-space:nowrap}
.character-editor .role-look[aria-pressed=true]{outline:2px solid var(--editor-accent);outline-offset:1px}
.character-editor .category-tabs{display:grid;grid-template-columns:repeat(5,1fr);border-top:1px solid var(--line);border-bottom:1px solid var(--line);padding:0 16px}
.character-editor .category-tab{background:transparent;color:#a6b4d2;padding:16px 4px;border-bottom:3px solid transparent;font-size:13px;min-width:0}
.character-editor .category-tab[aria-selected=true]{color:var(--editor-accent);font-weight:700;border-bottom-color:var(--editor-accent)}
.character-editor .selection-area{padding:20px}
.character-editor .item-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}
.character-editor .item-card{position:relative;background:var(--editor-surface);border:1px solid #2a3852;border-radius:9px;padding:0;min-width:0;overflow:hidden}
.character-editor .item-card:hover{border-color:#8e9eff}
.character-editor .item-card[aria-pressed=true]{outline:2px solid var(--editor-accent);outline-offset:0}
.character-editor .item-thumb{height:96px;display:flex;align-items:center;justify-content:center;background:#17243a;overflow:hidden}
.character-editor .item-card[aria-pressed=true] .item-thumb{background:#293b62}
.character-editor .item-thumb canvas{width:88px;height:88px;object-fit:contain}
.character-editor .item-name{display:block;font-size:11px;text-align:center;padding:10px 2px;white-space:nowrap}
.character-editor .selected-mark{display:none;position:absolute;right:5px;top:5px;width:16px;height:16px;background:var(--editor-accent);color:var(--editor-on-accent);font-size:11px;line-height:16px;border-radius:4px}
.character-editor .item-card[aria-pressed=true] .selected-mark{display:block}
.character-editor .skin-disc{width:44px;height:44px;border-radius:10px;box-shadow:inset 0 -5px #0001}
.character-editor .color-area{margin-top:22px;border-top:1px solid var(--line);padding-top:18px}
.character-editor .color-area h3{font-size:12px;margin-bottom:14px}
.character-editor .palette-row{display:flex;align-items:flex-start;justify-content:space-between;gap:14px}
.character-editor .swatches{display:flex;flex-wrap:wrap;gap:8px}
.character-editor .swatch{width:26px;height:26px;border:3px solid var(--editor-surface);outline:1px solid #0002;border-radius:5px;background:var(--swatch)}
.character-editor .swatch[aria-pressed=true]{outline:2px solid var(--editor-accent)}
.character-editor .custom-color{display:flex;align-items:center;gap:8px;white-space:nowrap;font-size:11px;color:#94a3c7;cursor:pointer}
.character-editor .custom-color input{width:30px;height:28px;cursor:pointer;padding:2px;background:transparent;border:1px solid var(--line);border-radius:5px}
@media(max-width:950px){.character-editor{grid-template-columns:280px minmax(0,1fr);gap:16px}.character-editor .role-look{flex-direction:column;gap:0;padding:4px 4px 12px}.character-editor .item-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:700px){.studio-shell{padding:20px 16px 28px}.studio-header{margin-bottom:16px}.studio-header h1{font-size:21px}.character-editor{grid-template-columns:1fr;gap:16px}.character-editor .preview-panel{position:static;padding:14px}.character-editor .stage{height:230px}.character-editor [data-avatar]{width:176px;height:220px}.character-editor .preview-panel h2{margin-bottom:12px}.character-editor .preview-toolbar{padding-top:12px}.character-editor .role-look{flex-direction:row;padding:4px}.character-editor .role-look canvas{width:44px;height:55px}.character-editor .role-look strong{font-size:11px}.character-editor .role-section,.character-editor .selection-area{padding:16px}.character-editor .role-looks{gap:8px}.character-editor .item-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.character-editor .item-thumb{height:86px}.character-editor .item-name{font-size:10px}.character-editor .category-tabs{padding:0 10px}}


.studio-page{color-scheme:dark;background:radial-gradient(ellipse at top,#18223b,transparent 65%),#070b14}
.character-editor .swatch{outline-color:#637392}.character-editor .skin-disc{box-shadow:inset 0 -5px #0003}

