/* Character Atelier: the portrait editor is its own layer; existing creator untouched. */
.exp-atelier{--at-line:#be8af83d;--at-cream:#fff1ff;--at-muted:#c4acd4}
.exp-atelier .atelier-shell{min-height:min(800px,89dvh);display:flex;flex-direction:column}
.exp-atelier .exp-topbar{padding:25px 31px 22px;border-bottom:1px solid var(--at-line)}
.exp-atelier .exp-topbar h2{font:normal clamp(31px,3vw,46px)/1.08 Georgia,'Times New Roman',serif;margin:7px 0;color:var(--at-cream);letter-spacing:-.045em}
.exp-atelier .exp-topbar h2 em{color:#cf9dff;font-weight:normal}
.exp-atelier .exp-topbar p{margin:8px 0 0;color:var(--at-muted);font-size:13px}
.atelier-grid{display:grid;grid-template-columns:minmax(295px,345px) minmax(0,1fr);min-height:0;flex:1}
.atelier-editor{padding:22px 24px;background:linear-gradient(160deg,#21102f,#110b20 70%);border-right:1px solid var(--at-line);overflow-y:auto;max-height:calc(89dvh - 113px);scrollbar-color:#82509b #191026}
.atelier-editor-top{display:flex;justify-content:space-between;gap:7px;align-items:center;margin-bottom:17px}
.atelier-editor .exp-step{color:#9984ab;font-size:10px;letter-spacing:.10em;font-weight:700}
.atelier-label{display:block;color:#e1cdef;font-size:11px;font-weight:760;letter-spacing:.08em;text-transform:uppercase;margin-bottom:7px}
.atelier-character{appearance:auto;width:100%;background:#261739;color:#f6e9ff;padding:12px;border:1px solid #9d6ec563;border-radius:12px;font-size:13px;margin-bottom:10px}
.atelier-upload-line{margin-bottom:19px}.atelier-upload-line .exp-button{width:100%;padding:11px}
.atelier-accordion{border-top:1px solid #b68dea30;padding:3px 0 12px}
.atelier-accordion>summary{list-style:none;display:flex;align-items:center;justify-content:space-between;cursor:pointer;padding:15px 0;color:#ecd6fc;font-size:12px;font-weight:780;letter-spacing:.06em}
.atelier-accordion>summary::-webkit-details-marker{display:none}
.atelier-accordion>summary span{font-size:18px;font-weight:300;color:#ca9bf2}
.atelier-preset-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-bottom:12px}
.atelier-swatch{border:1px solid #b886d748;border-radius:12px;background:#251635;padding:7px 4px 9px;display:flex;flex-direction:column;gap:6px;align-items:center;color:#dac4e7;font:inherit;cursor:pointer}
.atelier-swatch:hover,.atelier-swatch[aria-pressed="true"]{background:#46245a;border-color:#e3bcff;box-shadow:0 0 0 2px #a86de72a}
.atelier-swatch-art{height:43px;width:48px;border-radius:8px;background:linear-gradient(135deg,#cf8dff,#422b69 60%,#17102b);box-shadow:inset 0 0 0 1px #ffffff30}
.atelier-filter-noir{filter:grayscale(1) contrast(1.45)}.atelier-filter-moonlit{filter:hue-rotate(52deg) brightness(.9)}
.atelier-filter-rose{filter:hue-rotate(-44deg) saturate(1.2)}.atelier-filter-original{filter:brightness(1.13)}.atelier-filter-cinematic{filter:contrast(1.55) saturate(.8)}
.atelier-swatch small{font-size:10px;font-weight:700}
.atelier-controls{padding-bottom:10px}.atelier-slider{margin:10px 0 17px}
.atelier-slider label{display:flex;justify-content:space-between;gap:12px;color:#f0ddff;font-size:12px;font-weight:660;margin-bottom:8px}
.atelier-slider small{display:block;color:#9e8bac;font-size:10px;font-weight:normal;margin-top:2px}
.atelier-slider output{font:700 12px ui-monospace,monospace;color:#e9b7ff}
.atelier-slider input[type=range]{width:100%;cursor:pointer;accent-color:#bf7bff;height:5px}
.atelier-frame-row{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;padding-bottom:12px}
.atelier-frame{border:1px solid #996caf58;border-radius:10px;min-height:67px;padding:7px 3px;background:#25152f;color:#e9d6f5;cursor:pointer;font-size:10px;font-weight:650}
.atelier-frame[aria-pressed=true]{border-color:#efc4ff;background:#46225c}
.atelier-frame-icon{display:block;margin:0 auto 5px;display:grid;place-items:center;width:25px;height:25px;color:#d4a2f9;border:2px solid #c499ef;border-radius:4px}
.atelier-frame-gold{border-color:#ffd17c;color:#ffe2a7}.atelier-frame-moon{border-color:#93bff4;color:#d7eeff}.atelier-frame-eclipse{border-color:#603477;color:#a56cdd}.atelier-frame-none{border:1px dashed #8e749d}
.atelier-check{display:flex;align-items:center;gap:8px;color:#cfbce1;font-size:11px;padding-bottom:8px}.atelier-check input{accent-color:#c17af0}
.atelier-editor-actions{display:flex;justify-content:space-between;gap:9px;margin-top:17px}
.atelier-editor-actions button{border:0;background:transparent;color:#d4b1e9;font-size:11px;text-decoration:underline;cursor:pointer}
.atelier-editor-actions button.atelier-delete{color:#bbaac7}
.atelier-workbench{padding:22px clamp(20px,4vw,49px) 27px;background:radial-gradient(ellipse at 50% 10%,#30163d 0,#110a1f 68%,#0a0712 100%);display:flex;flex-direction:column;min-width:0;align-items:center;overflow-y:auto;max-height:calc(89dvh - 113px)}
.atelier-workbench-head{width:min(100%,510px);display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:17px}
.atelier-workbench-head h3{margin:4px 0 0;color:#f8e9ff;font:normal 25px Georgia,serif;overflow-wrap:anywhere}
.atelier-size{font-size:10px;white-space:nowrap;color:#baa4c9;letter-spacing:.08em}
.atelier-stage{position:relative;width:min(100%,min(49dvh,515px));min-width:210px;aspect-ratio:1;display:grid;place-items:center;box-shadow:0 32px 75px #0008;border-radius:9px;isolation:isolate}
.atelier-stage canvas{width:100%;height:100%;object-fit:contain;display:block;touch-action:none;border-radius:8px;cursor:grab;box-shadow:0 0 0 1px #b48ce477;z-index:1}
.atelier-stage canvas.dragging{cursor:grabbing}
.atelier-stage-orbit{position:absolute;inset:-25px;border-radius:50%;background:radial-gradient(closest-side,#bc57f738,transparent 80%);filter:blur(18px);pointer-events:none}
.atelier-stage.is-dropping:after{content:'DROP PHOTO TO LOAD';position:absolute;inset:6px;z-index:3;border:3px dashed #e6baff;background:#180f2bbd;display:grid;place-items:center;color:#fff;font-weight:800}
.atelier-upload-floating{position:absolute;z-index:2;bottom:24px;left:50%;transform:translateX(-50%);white-space:nowrap;background:#21132bea;border:1px solid #e3b6fc;border-radius:999px;color:#ffe3ff;padding:10px 18px;font-size:12px;font-weight:750;cursor:pointer;box-shadow:0 8px 24px #0008}
.atelier-stage.has-image .atelier-upload-floating{top:12px;right:12px;bottom:auto;left:auto;transform:none;opacity:.82;padding:8px 12px;background:#120a1bbd;font-size:10px}
.atelier-stage.has-image .atelier-upload-floating:hover,.atelier-stage.has-image .atelier-upload-floating:focus-visible{opacity:1}
.atelier-hint{color:#baa2c7;font-size:11px;margin:16px 0 9px;text-align:center;min-height:16px}
.atelier-workbench-tools{display:flex;flex-wrap:wrap;justify-content:center;gap:8px;margin-bottom:16px}
.atelier-workbench-tools button{cursor:pointer;background:#231332;border:1px solid #b384d053;border-radius:999px;color:#ead2f6;padding:8px 11px;font-size:11px}
.atelier-workbench-tools button:disabled{opacity:.4;cursor:not-allowed}
.atelier-workbench-tools button:not(:disabled):hover{background:#48255e;border-color:#d7a5ff}
.atelier-end-actions{display:flex;justify-content:center;gap:11px;flex-wrap:wrap;width:min(100%,510px)}
.atelier-end-actions .exp-button{flex:1;min-width:155px;padding:13px 16px}
.atelier-end-actions button:disabled{opacity:.4;cursor:not-allowed}
.atelier-privacy{max-width:520px;text-align:center;font-size:10px;line-height:1.6;color:#bca5cc;margin:14px 0 0}
.atelier-status{max-width:520px;margin:12px 0 0;text-align:center;color:#dac3e8;font-size:12px;line-height:1.45;min-height:18px}
.atelier-status[data-kind="success"]{color:#b8f6d0}.atelier-status[data-kind="error"]{color:#ffa8c3}
@media (max-width:810px){.atelier-grid{grid-template-columns:1fr}.atelier-editor{order:2;max-height:none;border-right:0;border-top:1px solid var(--at-line)}.atelier-workbench{order:1;max-height:none;padding:19px 17px}.atelier-stage{width:min(100%,min(49dvh,470px))}.atelier-preset-grid{grid-template-columns:repeat(6,minmax(0,1fr))}.atelier-frame-row{grid-template-columns:repeat(5,minmax(0,1fr))}}
@media (max-width:510px){.exp-atelier .exp-topbar{padding:18px 16px}.atelier-preset-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.atelier-frame-row{grid-template-columns:repeat(3,minmax(0,1fr))}.atelier-workbench-head h3{font-size:21px}.atelier-size{font-size:9px}.atelier-editor{padding:20px 18px}.atelier-stage{width:min(100%,370px)}.atelier-upload-floating{bottom:12px;font-size:11px}}
@media (prefers-reduced-motion:reduce){.atelier-stage-orbit{filter:none}}
