:root{font-family:Inter,"Segoe UI",Arial,sans-serif;color:#f8f7fb;background:#09090c;font-size:14px;--pink:#ff365f;--muted:#aaa2b0;--line:#2b2930;--panel:#151419;color-scheme:dark;--left:320px;--right:190px;--top:66px}
.color-applied-state{padding:9px 11px;background:#26212d;border:1px solid #42394c;border-radius:8px;color:#d9c8e7}.color-region-section{border-top:1px solid var(--line);margin-top:22px;padding-top:19px}.color-region-section[open]>summary>.chevron{transform:rotate(180deg)}.color-region-section .color-region-intro{margin:0 0 14px}.color-region-section .brush-tools button.selected{background:#3a2b52;border-color:#ba91ff}.color-region-section input[type=range],.color-region-section input[type=checkbox]{accent-color:#ba91ff}.color-region-dot{display:inline-block;width:7px;height:7px;border-radius:50%;background:#ba91ff}.color-region-swatches{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px}.color-region-swatches button{display:flex;align-items:center;flex-direction:column;gap:7px;padding:9px 2px;border:1px solid #453a4d;border-radius:8px;background:#28222e;font-size:10px;line-height:1.4}.color-region-swatches button.selected{border-color:#ba91ff;background:#3a2b52}.color-region-swatches i{display:block;width:25px;height:25px;background:var(--swatch);border-radius:50%;border:1px solid #ffffff40}.color-region-custom{display:flex;align-items:center;justify-content:space-between;gap:10px;font-size:12px;color:#c8b5d7;margin-top:12px}.color-region-custom input{width:48px;height:32px;padding:2px;border:1px solid #685376;border-radius:7px;background:#2b2231;cursor:pointer}.color-region-section .edit-action{background:#7651a7;border-color:#b18bdc}.image-frame[data-purpose=colorRegion] .brush-cursor{border-color:#d9bfff;box-shadow:0 0 0 1px #342047}
*{box-sizing:border-box}html,body{width:100%;height:100%;margin:0;overflow:hidden}body{height:100dvh}button,input,select{font:inherit}button,a{-webkit-tap-highlight-color:transparent}button{cursor:pointer;color:inherit;border:0}a{color:inherit;text-decoration:none}button:disabled{opacity:.4;cursor:not-allowed}[hidden]{display:none!important}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,summary:focus-visible,[tabindex]:focus-visible{outline:2px solid #ff93ab;outline-offset:3px}button{transition:background .15s,border-color .15s}button:hover:not(:disabled){filter:brightness(1.1)}
.topbar{height:var(--top);display:flex;align-items:center;gap:20px;border-bottom:1px solid #1e1c24;padding:0 18px}.brand{display:flex;align-items:center;gap:9px;white-space:nowrap}.brand strong{font-size:21px;letter-spacing:-.5px}.brand strong>span{font-weight:400;color:#c1bbc7}.brand-mark{position:relative;font-size:37px;line-height:1;font-weight:800;color:var(--pink);letter-spacing:-5px;width:36px}.brand-mark>span{position:absolute;right:-2px;top:-7px;font-size:19px;letter-spacing:0}.layout-controls{display:flex;gap:5px;margin-right:auto}.layout-controls button{padding:9px 10px;border-radius:8px;background:transparent;color:#c0b5c7;white-space:nowrap;font-size:13px}.layout-controls button[aria-expanded=true],.layout-controls button[aria-pressed=true]{background:#27212c;color:white}.topbar-right{display:flex;align-items:center;gap:20px}.local-status{display:flex;align-items:center;gap:7px;font-size:12px;color:#ac9fb6;white-space:nowrap}.local-status i{width:7px;height:7px;border-radius:50%;background:#8cbfa0}.download{display:flex;align-items:center;justify-content:center;gap:24px;border-radius:30px;background:var(--pink);font-weight:650;padding:12px 22px;white-space:nowrap}.download span{font-size:21px}.download[aria-disabled=true]{background:#29242d;color:#827989;pointer-events:none}
.studio-shell{height:calc(100dvh - var(--top));display:grid;grid-template-columns:var(--left) minmax(0,1fr) var(--right);grid-template-rows:minmax(0,1fr);gap:12px;padding:10px 12px 12px;position:relative}.settings-panel,.history-panel{background:var(--panel);border-radius:16px;min-width:0;min-height:0;overscroll-behavior:contain}.settings-panel{display:flex;flex-direction:column;overflow:hidden}.panel-heading{display:flex;align-items:center;justify-content:space-between;padding:20px 17px 16px;gap:10px;flex-shrink:0}.eyebrow{font-size:10px;letter-spacing:1.1px;color:#a596ad;font-weight:600}.panel-heading h1{font-size:17px;font-weight:600;margin:8px 0 0}.panel-close{background:transparent;font-size:25px;line-height:1;padding:8px;color:#b9abbf}.settings-scroll{padding:0 17px;min-height:0;overflow:auto;scrollbar-width:thin;scrollbar-color:#49414f transparent}.mode-options{display:flex;flex-direction:column;gap:9px;padding:0 0 18px}.mode{border:1px solid #37303d;border-radius:11px;display:flex;align-items:center;gap:12px;background:#211d25;padding:13px 12px;text-align:left}.mode.selected{border-color:#ff7c9b;background:#3b2330;box-shadow:inset 0 0 0 1px #ff7c9b40}.mode>span:last-child{font-weight:650;font-size:14px}.mode small{display:block;font-size:11px;font-weight:400;color:#bba8b8;margin-top:5px;line-height:1.4}.mode-icon,.section-icon{display:inline-grid;place-items:center;flex-shrink:0;width:34px;height:34px;background:#38313e;color:#eee1f7;border-radius:9px;font-size:25px}.color-icon{background:linear-gradient(135deg,#916f8c,#9e6d52);color:#fff}.setting-section{border-top:1px solid var(--line);padding:19px 0}.setting-section h2{display:flex;gap:10px;align-items:center;font-size:14px;margin:0 0 12px;font-weight:600}.flow-steps{list-style:none;margin:14px 0 0;padding:0;display:flex;flex-direction:column;gap:13px}.flow-steps li{display:flex;align-items:center;gap:11px;color:#d9cfdf;font-size:13px}.flow-steps li>span{font-size:11px;display:grid;place-items:center;width:23px;height:23px;background:#302530;border:1px solid #604050;border-radius:50%;color:#ffc8d7}.hint{font-size:12px;line-height:1.65;color:#a99bb2;margin:13px 0 0}.setting-section summary{display:flex;align-items:center;gap:10px;list-style:none;cursor:pointer;font-size:14px;font-weight:600}.setting-section summary::-webkit-details-marker{display:none}.setting-section summary small{display:block;color:#a397ad;font-size:11px;font-weight:400;margin-top:4px}.chevron{display:grid;place-items:center;align-self:center;flex:0 0 28px;width:28px;height:28px;margin-left:auto;border-radius:50%;background:#ffffff06;color:#b5a8bf;transition:transform .2s,background .15s,color .15s}.chevron svg{display:block;width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.setting-section summary:hover>.chevron,.setting-section summary:focus-visible>.chevron{background:#ffffff0d;color:#f1e5f8}.setting-section[open]>summary>.chevron{transform:rotate(180deg)}.section-body{padding-top:16px}.brush-tools{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}.brush-tools button{display:flex;flex-direction:column;gap:7px;align-items:center;justify-content:center;min-height:61px;border:1px solid #443a4c;border-radius:9px;background:#2b2631;font-size:20px}.brush-tools button span{font-size:12px}.brush-tools button.selected{background:#432333;border-color:#ff94af;color:#fff}.range-label{display:flex;justify-content:space-between;gap:10px;font-size:12px;color:#b3a6bd;margin:18px 0 10px}.range-label output{color:#e5d5ed}input[type=range]{width:100%;height:16px;accent-color:var(--pink);margin:0}.sub-actions{display:flex;justify-content:space-between;margin:10px 0 15px;gap:12px}.sub-actions button{background:transparent;padding:5px 0;font-size:12px;color:#c3b2ce}.checkbox-label{display:flex;align-items:center;gap:7px;font-size:12px;color:#b5a7c0}.checkbox-label input{accent-color:var(--pink);width:15px;height:15px}.secondary-action{display:block;width:100%;background:#3a2835;border:1px solid #6b455c;border-radius:9px;padding:12px 10px;margin-top:15px;font-size:13px;font-weight:550;color:#f6dbe8}.field-label{display:block;font-size:12px;color:#bcafc6;margin:14px 0 7px}.field-label:first-child{margin-top:0}select{width:100%;background:#2c2632;border:1px solid #494051;border-radius:8px;padding:10px 8px;color:#eee4f4;font-size:12px}.apply-area{padding:14px 16px 11px;background:#17131b;border-top:1px solid #2b2431;flex-shrink:0}.apply-area>p:first-child{font-size:12px;color:#c1b0cb;line-height:1.45;margin:0 0 10px}.primary-action{display:flex;align-items:center;justify-content:center;gap:20px;width:100%;border-radius:30px;background:var(--pink);padding:13px 10px;font-size:15px;font-weight:650}.primary-action span{font-size:21px}.upload-note{margin:9px 0 0;text-align:center;font-size:10px;color:#8f7b9c}
.workspace{min-width:0;min-height:0;display:flex;flex-direction:column}.canvas-toolbar{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-shrink:0;padding:4px 2px 12px;min-height:56px}.canvas-toolbar>div{min-width:0}.canvas-toolbar strong{display:block;font-size:13px;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.canvas-toolbar>div>span{display:block;font-size:11px;color:#9b8ba7;margin-top:5px}.canvas-toolbar>button{flex-shrink:0;font-size:11px;border:1px solid #413449;border-radius:24px;background:#17121c;color:#bdaacb;padding:8px 11px}.canvas-toolbar>button[aria-pressed=true]{background:#302434;color:#f1dcf8}.image-frame{position:relative;flex:1;min-height:0;overflow:hidden;border-radius:18px 0 0 18px;background:#111014;touch-action:none;isolation:isolate}.image-frame.dragover{outline:2px dashed var(--pink);outline-offset:-5px}.image-stage{position:absolute;left:0;top:0;transform-origin:0 0;will-change:transform;user-select:none;pointer-events:none}.image-stage img,.image-stage canvas{position:absolute;left:0;top:0;width:100%;height:100%;object-fit:fill;display:block;user-select:none;pointer-events:none}.image-stage canvas{opacity:.52}.image-frame[data-tool=pan]{cursor:grab}.image-frame.dragging{cursor:grabbing}.image-frame[data-tool=paint],.image-frame[data-tool=erase]{cursor:crosshair}.empty-state{height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:28px;background:radial-gradient(ellipse at 50% 45%,#36212d5e,transparent 65%)}.empty-symbol{font-size:43px;color:#fa567c;margin-bottom:23px}.empty-state .eyebrow{font-size:8px;color:#be8da4}.empty-state h2{font-size:clamp(21px,2.1vw,30px);font-weight:450;letter-spacing:-.7px;margin:16px 0 12px}.empty-state p{font-size:13px;color:#a695ad;line-height:1.8;margin:0 0 25px}.primary-upload{display:flex;align-items:center;gap:22px;background:#442a39;border:1px solid #74445d;color:#f4e3ec;border-radius:27px;padding:14px 22px;font-weight:600}.empty-state small{font-size:10px;color:#807087;margin-top:25px}.comparison-overlay{position:absolute;inset:0;pointer-events:none;overflow:hidden}.compare-label{position:absolute;top:22px;left:50%;white-space:nowrap;font-size:16px;line-height:1.3;font-weight:600;background:rgba(0,0,0,.43);color:#fff;border-radius:28px;padding:12px 21px;user-select:none}.before-label{transform:translateX(calc(-100% - 28px))}.after-label{transform:translateX(28px)}.compare-handle{position:absolute;top:0;bottom:0;left:50%;width:34px;transform:translateX(-50%);cursor:ew-resize;pointer-events:auto;touch-action:none}.compare-handle::before{content:"";position:absolute;width:3px;top:0;bottom:0;left:calc(50% - 1.5px);background:#fff}.compare-handle>span{position:absolute;left:50%;top:81%;transform:translate(-50%,-50%);border-radius:50%;width:42px;height:42px;background:white;color:#1d1622;display:grid;place-items:center;box-shadow:0 2px 9px #0003;font-size:23px;font-weight:700;user-select:none}.brush-cursor{position:absolute;border:1px solid #fff;box-shadow:0 0 0 1px #0009;border-radius:50%;transform:translate(-50%,-50%);pointer-events:none;z-index:5}.processing-overlay{position:absolute;inset:0;z-index:10;display:flex;flex-direction:column;align-items:center;justify-content:center;background:#0c0812b8;backdrop-filter:blur(3px);text-align:center;padding:25px}.processing-overlay strong{font-size:16px;font-weight:550;margin:20px 0 15px}.processing-overlay>span:not(.spinner){font-size:12px;color:#cbb5d6;margin-top:12px}.processing-overlay p{color:#a18bae;font-size:12px;line-height:1.5;max-width:270px;margin-top:18px}.processing-overlay .secondary-action{max-width:180px}.spinner{width:34px;height:34px;border:2px solid #603849;border-top-color:var(--pink);border-radius:50%;animation:spin 1s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}progress{height:6px;width:min(230px,80%);accent-color:var(--pink);border:0;border-radius:9px;overflow:hidden;background:#3c2935}progress::-webkit-progress-bar{background:#3c2935}progress::-webkit-progress-value{background:var(--pink);border-radius:9px}.view-toolbar{display:flex;justify-content:space-between;align-items:center;gap:8px;flex-wrap:wrap;padding:12px 2px 7px;flex-shrink:0}.view-info>span{display:block;font-size:11px;color:#a18eaf}.view-info>small{display:block;font-size:10px;color:#bba6ca;margin-top:5px}.zoom-controls{display:flex;align-items:center;gap:7px}.zoom-controls button{background:transparent;color:#dccce6;font-size:22px;padding:4px 8px;min-width:30px}.zoom-controls #fitButton{font-size:11px;background:#211827;border:1px solid #3b2d45;border-radius:6px;padding:8px 10px}.zoom-controls output{font-size:11px;color:#a790b5;min-width:36px;text-align:center}.result-note{color:#a28baa;font-size:11px;line-height:1.55;margin:5px 2px 0;max-height:48px;overflow:auto;flex-shrink:0}.error-message{background:#48202f;border:1px solid #9e4769;color:#ffd4e4;padding:10px 13px;border-radius:9px;font-size:12px;line-height:1.5;margin:0 0 10px;flex-shrink:0}
.history-panel{padding:19px 13px;overflow:auto;scrollbar-width:thin;scrollbar-color:#49394f transparent}.history-heading{display:flex;align-items:center;justify-content:space-between;gap:5px}.history-heading h2{font-size:14px;font-weight:600;margin:0}.source-card{margin-top:14px}.source-card img{display:block;width:100%;max-height:150px;aspect-ratio:1.25;object-fit:cover;border-radius:10px;border:1px solid #74637c}.source-card span{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:11px;color:#aa96b8;margin-top:8px}.add-photo{width:100%;margin-top:16px;border-radius:25px;background:#38303e;color:#e4d5eb;font-size:13px;padding:12px 8px}.history-divider{border-top:1px solid #3a2b41;padding-top:21px;margin:24px 0 13px;color:#9c83ac;font-size:9px;letter-spacing:1px;display:flex;justify-content:space-between;align-items:center;gap:8px}.history-divider span{font-size:11px}.history-list{display:flex;flex-direction:column;gap:13px}.history-empty,.history-note{font-size:11px;color:#9a80aa;line-height:1.75;margin:0}.history-note{margin-top:18px}.history-item{padding:0;border:2px solid transparent;border-radius:10px;background:#28202f;overflow:hidden;position:relative;text-align:left}.history-item.selected{border-color:#f8e6fc}.history-item img{display:block;width:100%;aspect-ratio:1.3;object-fit:cover}.history-item>span{display:block;font-size:12px;line-height:1.6;padding:8px;color:#e0cce9}.history-item small{display:block;font-size:10px;color:#a68ab7;margin-top:2px}.history-item.selected::after{content:'✓';position:absolute;top:8px;right:8px;background:#fff;color:#201329;width:21px;height:21px;border-radius:50%;display:grid;place-items:center;font-size:12px}.visually-hidden{position:fixed;top:0;left:0;width:1px;height:1px;clip:rect(0,0,0,0);overflow:hidden;white-space:nowrap}.panel-backdrop{position:absolute;inset:0;background:#0009;z-index:20}.studio-shell.settings-closed{grid-template-columns:minmax(0,1fr) var(--right)}.studio-shell.settings-closed .settings-panel{display:none}.studio-shell.history-closed{grid-template-columns:var(--left) minmax(0,1fr)}.studio-shell.history-closed .history-panel{display:none}.studio-shell.settings-closed.history-closed{grid-template-columns:minmax(0,1fr)}
@media(min-width:1550px){:root{--left:360px;--right:210px}.panel-heading{padding:23px 20px 18px}.settings-scroll{padding:0 20px}.mode>span:last-child{font-size:15px}.hint{font-size:13px}.flow-steps li{font-size:14px}.setting-section summary{font-size:15px}.canvas-toolbar strong{font-size:14px}.canvas-toolbar>div>span,.result-note{font-size:12px}}
@media(max-width:1100px){:root{--left:280px;--right:160px;--top:60px}.topbar{gap:12px;padding:0 12px}.brand strong{font-size:18px}.brand-mark{font-size:32px;width:30px}.layout-controls button{font-size:12px;padding:8px}.layout-controls #focusToggle span{display:none}.local-status{display:none}.topbar-right{gap:10px}.download{padding:10px 16px;gap:15px}.studio-shell{gap:9px;padding:9px}.panel-heading{padding:17px 13px 14px}.panel-heading h1{font-size:15px}.settings-scroll{padding:0 13px}.mode small{font-size:10px}.history-panel{padding:16px 10px}.history-heading h2{font-size:12px}.compare-label{font-size:14px;padding:10px 16px}}
@media(max-width:800px){:root{--top:58px}.topbar{gap:8px}.brand strong{font-size:16px}.brand-mark{font-size:28px;width:28px}.brand-mark>span{font-size:15px}.layout-controls{gap:2px}.layout-controls button{font-size:19px;padding:6px 9px}.layout-controls button span{display:none}.layout-controls #focusToggle{display:none}.topbar-right{margin-left:auto}.download{font-size:12px;padding:9px 13px;gap:10px}.download span{font-size:17px}.studio-shell,.studio-shell.settings-closed,.studio-shell.history-closed,.studio-shell.settings-closed.history-closed{grid-template-columns:minmax(0,1fr);padding:8px;gap:0}.settings-panel,.history-panel{display:none;position:absolute;top:8px;bottom:8px;z-index:21;box-shadow:0 12px 40px #0008}.settings-panel{left:8px;width:min(335px,calc(100vw - 45px))}.history-panel{right:8px;width:min(240px,calc(100vw - 45px))}.studio-shell.mobile-settings .settings-panel,.studio-shell.mobile-history .history-panel{display:flex}.studio-shell.mobile-history .history-panel{display:block}.canvas-toolbar{padding:3px 2px 10px;min-height:50px}.canvas-toolbar strong{font-size:12px}.canvas-toolbar>div>span{font-size:10px}.image-frame{border-radius:15px 0 0 15px}.empty-state{padding:20px}.empty-state h2{font-size:23px}.empty-state p{font-size:12px}.empty-symbol{font-size:37px;margin-bottom:20px}.compare-label{top:17px;padding:9px 13px;font-size:13px}.before-label{transform:translateX(calc(-100% - 16px))}.after-label{transform:translateX(16px)}.view-toolbar{padding-top:9px}.view-info>small{font-size:9px}.zoom-controls{gap:2px}.zoom-controls output{min-width:30px;font-size:10px}.zoom-controls #fitButton{padding:7px 8px}.result-note{font-size:10px}.history-item img{aspect-ratio:1.4}}
.skin-icon{background:#263c35;color:#b9f4d8}.skin-section .skin-intro{margin-top:0}.skin-section .brush-tools{margin-top:15px}.skin-section .brush-tools button.selected{background:#26483a;border-color:#71d5ab}.skin-section input[type=range],.skin-section input[type=checkbox]{accent-color:#77caa5}.skin-section .secondary-action{background:#263b32;border-color:#4d7b66;color:#daf8e8}.skin-section #skinSelectionNote{color:#b5d3c4}.image-frame[data-purpose=skin] .brush-cursor{border-color:#9ef0c8;box-shadow:0 0 0 1px #173628}
@media(prefers-reduced-motion:reduce){*{transition:none!important}.spinner{animation-duration:2s}}
@media(max-width:480px){.brand{gap:6px}.brand strong>span{display:none}.topbar{padding:0 10px;gap:5px}.layout-controls button{padding:6px 7px}.download{padding:8px 11px;gap:8px}.canvas-toolbar>button{padding:7px 9px;font-size:10px}.view-info{max-width:calc(100% - 155px)}.view-info>small{line-height:1.4}}

/* Upload stays beside the workspace controls, leaving the sidebar for edits. */
.topbar{gap:16px}
.header-upload{display:flex;align-items:center;gap:12px;padding:5px;background:#151419;border:1px solid #302a36;border-radius:11px;flex-shrink:0}
.choose-photo{display:flex;align-items:center;justify-content:center;gap:9px;min-height:38px;padding:9px 17px;border:1px solid #ff6384;border-radius:7px;background:var(--pink);font-size:13px;font-weight:650;white-space:nowrap}
.has-photo .choose-photo{background:#29232e;border-color:#4a3d50;color:#f5e8f2}
.choose-photo svg,.edit-action svg,.auto-select svg,.brush-tools svg,.section-icon svg{width:20px;height:20px;flex-shrink:0;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.header-upload-hint{padding-right:9px;font-size:11px;color:#b7a8bf;line-height:1.5;white-space:nowrap}
.header-upload-hint small{display:block;font-size:10px;color:#897d92}
.header-upload.dragover{border-color:#ff8faa;background:#38202d;outline:2px dashed #ff8faa;outline-offset:3px}
.apply-area{display:flex;align-items:flex-start;gap:8px;padding:13px 17px;background:#17141c}
.apply-area #applyStatus{margin:0;font-size:11px;line-height:1.6;color:#b9acbf}
.apply-area .status-dot{flex-shrink:0;width:6px;height:6px;margin-top:6px;border-radius:50%;background:#9cb7a5}
.is-processing .apply-area .status-dot{background:#ffb36c}
.tool-instruction{font-size:12px;line-height:1.65;color:#b9aebf;margin:0 0 14px}
.tool-instruction strong{font-weight:550;color:#e5dbe9}
.brush-tools button{min-height:65px;background:#231f29;border-color:#3a3241;gap:8px}
.brush-tools button span{font-size:11px;line-height:1.35}
.brush-tools button:hover:not(:disabled){border-color:#927487;background:#332731}
.brush-tools button.selected{background:#3d2431;border-color:#df7994;box-shadow:inset 0 0 0 1px #df799420}
.mask-dot{width:7px;height:7px;flex-shrink:0;border-radius:50%;margin-left:2px}
.damage-dot{background:#ff6387}.skin-dot{background:#5ad5a6}
.action-footer{margin-top:17px;padding-top:15px;border-top:1px solid #302834}
.secondary-action.edit-action,.skin-section .secondary-action.edit-action{display:flex;align-items:center;justify-content:center;gap:10px;min-height:45px;margin-top:0;padding:11px 14px;border:1px solid #ff6384;border-radius:10px;background:var(--pink);color:#fff;font-size:13px;font-weight:650}
.edit-action .action-arrow{margin-left:auto;font-size:18px;line-height:1}
.edit-action>span:not(.action-arrow){flex:1;text-align:left}
.secondary-action.edit-action:disabled{opacity:1;background:#28232d;border-color:#39303e;color:#928499;box-shadow:none}
.secondary-action.edit-action:hover:not(:disabled){filter:none;background:#ec2c54;border-color:#ff8aa5;box-shadow:0 3px 15px #ff365f15}
.action-hint{margin:9px 0 0;font-size:11px;line-height:1.6;color:#a595af;text-align:center}
.skin-section .secondary-action.auto-select{display:flex;align-items:center;gap:9px;min-height:42px;margin-top:13px;padding:10px 12px;background:#202c28;border:1px solid #466a59;border-radius:9px;color:#cfecde;text-align:left}
.auto-select>span{flex:1}.auto-select small{font-size:10px;font-weight:400;color:#98baa8;white-space:nowrap}
.skin-section #skinSelectionNote{font-size:11px;line-height:1.65;padding:10px 12px;border:1px solid #314338;border-radius:8px;background:#1b241f;color:#adc7b7}
.skin-section #skinResultNote{font-size:11px;margin:0 0 12px;line-height:1.65}
.skin-section .brush-tools button.selected{background:#264033;border-color:#71ba98;box-shadow:none}
@media(max-width:1500px){.header-upload-hint{display:none}.topbar{gap:12px}.topbar-right{gap:12px}}
@media(max-width:1200px){.local-status{display:none}.layout-controls #focusToggle span{display:none}}
@media(max-width:1000px) and (min-width:801px){.layout-controls button span{display:none}.layout-controls button{font-size:18px}.choose-photo{padding:9px 12px}}
@media(max-width:800px){
  :root{--top:110px}
  .topbar{display:grid;grid-template-columns:auto 1fr auto;grid-template-rows:48px 52px;gap:0 10px;padding:0 12px 10px}
  .brand{grid-column:1;grid-row:1}.layout-controls{grid-column:2;grid-row:1;justify-self:end;margin:0}.topbar-right{grid-column:3;grid-row:1;margin:0}
  .header-upload{grid-column:1/-1;grid-row:2;padding:5px;gap:10px;min-width:0;align-self:center}
  .choose-photo{min-height:34px;padding:7px 13px;font-size:12px}
  .header-upload-hint{display:block;white-space:normal;line-height:1.4;font-size:10px}.header-upload-hint small{font-size:9px}
  .layout-controls button{min-width:32px;min-height:34px;padding:6px}
  .download{padding:8px 11px;gap:8px}
  .apply-area{padding:12px 13px}
}
@media(max-width:360px){.topbar{gap:0 5px;padding-left:8px;padding-right:8px}.brand{gap:4px}.brand strong{font-size:14px}.brand-mark{width:24px;font-size:26px}.header-upload-hint{font-size:9px}.header-upload-hint small{font-size:8px}.download{padding:8px;gap:5px}}
.background-icon{background:#27354c;color:#bad2ff}.background-dot{background:#80aaff}
.background-section input[type=range],.background-section input[type=checkbox]{accent-color:#80aaff}
.background-section .brush-tools{margin-top:15px}
.background-section .brush-tools button.selected{background:#263b59;border-color:#80aaff;box-shadow:none}
.background-section .auto-select{display:flex;align-items:center;justify-content:center;gap:10px;min-height:52px;padding:13px 15px;background:linear-gradient(115deg,#225ed5,#427feb);border:1px solid #88b5ff;border-radius:11px;color:#fff;font-size:14px;font-weight:700;box-shadow:0 4px 16px #2665da33}
.background-section .auto-select:hover:not(:disabled){filter:none;background:linear-gradient(115deg,#2b6be9,#518df8);box-shadow:0 4px 20px #2665da55}
.background-section .auto-select:disabled{box-shadow:none}
.background-section .auto-select-arrow{flex:0 0 auto;margin-left:auto;font-size:20px;font-weight:400}
.background-section .edit-action.is-ready{box-shadow:0 3px 15px #ff365f30;border-color:#ff91aa}
.image-frame[data-purpose=background] #paintOverlay{opacity:.24}
.background-section .selection-note{padding:10px 12px;border:1px solid #35445a;border-radius:8px;background:#1d2430;color:#afc3e2;font-size:11px}
.image-frame[data-purpose=background] .brush-cursor{border-color:#bdd6ff;box-shadow:0 0 0 1px #172738}
.selection-refine{margin:14px 0;padding:11px 12px;border:1px solid #354052;border-radius:9px;background:#1c222d}
.selection-refine>summary{font-size:12px;font-weight:500;color:#c7d7ef;justify-content:space-between;gap:8px}
.selection-refine>summary>.chevron{color:#94acd0}.selection-refine[open]>summary>.chevron{transform:rotate(180deg)}
.selection-refine .sub-actions{margin-bottom:0}.selection-refine .brush-tools button span{font-size:10px}

/* Accordion layout is anchored by its visible heading, not by hidden siblings. */
.settings-scroll{overflow-anchor:none;scroll-behavior:auto}

/* Optional detail filters keep their draft levels separate from the saved image. */
.subject-detail-section .section-icon{background:#352b40;color:#e0c3f0}
.subject-detail-section .section-body>.range-label{margin-top:5px}
.detail-range-scale{display:flex;justify-content:space-between;gap:12px;margin:3px 0 14px;color:#aaa0af;font-size:11px;line-height:1.5}
.subject-detail-section .action-hint.has-pending-change{color:#ffc0d0}
.subject-detail-section output{font-variant-numeric:tabular-nums}
.subject-inherited-note{padding:10px 12px;margin:0 0 14px;border:1px solid #45404b;border-radius:8px;background:#242129;color:#c7bccf;font-size:11px;line-height:1.65}

/* Eye references are hollow guides, with text and line styles as well as color. */
.eye-direction-note{margin:0 0 14px;padding:10px 12px;border:1px solid #3a434b;border-radius:8px;background:#20262b;color:#bccbd5;font-size:11px;line-height:1.65}
.eye-direction-note strong{color:#edf6fa;font-weight:600}
.eye-route{display:grid;gap:10px;padding:12px;margin:12px 0;border:1px solid #3b3d43;border-radius:9px;background:#1d1d23}
.eye-route>div{display:flex;gap:10px;align-items:center;font-size:10px;color:#a7adb6;line-height:1.45}
.eye-route strong{display:block;margin-top:3px;font-size:12px;font-weight:600;color:#edf0f5}
.eye-key{flex:0 0 auto;width:20px;height:13px;border-radius:50%;background:transparent}
.eye-key-source{border:2px solid #68dfcc}.eye-key-target{border:2px dashed #f1cf7c}
.eye-last-result{padding:10px 12px;border-radius:8px;background:#24232c;color:#c2bbc9;font-size:11px;line-height:1.65}
#eyeOverlay{opacity:1}
.eye-position-controls{min-width:0;margin:14px 0 18px;padding:12px;border:1px solid #3b4851;border-radius:9px;background:#1d252a}
.eye-position-controls legend{padding:0 5px;color:#d3e3ec;font-size:11px;font-weight:600}
.eye-position-controls .range-label{margin:5px 0 4px;font-size:11px}.eye-position-controls output{color:#d5ede9;font-variant-numeric:tabular-nums}
.eye-position-controls input[type=range]{accent-color:#68dfcc;margin:3px 0 12px}
.eye-position-actions{display:flex;align-items:center;gap:8px}.eye-position-actions button{border:1px solid #527a72;border-radius:7px;padding:9px 10px;background:#29483f;color:#dcf8ed;font-size:11px;font-weight:600}
.eye-position-actions button:first-child{flex:1}.eye-position-actions button:last-child{padding:9px 5px;background:transparent;border-color:transparent;color:#b7c2c8;font-weight:400}
.eye-position-actions button:disabled{opacity:.45;cursor:default}
.eye-position-controls>p{margin:9px 0 0;font-size:10px;line-height:1.6;color:#a8bdc6}.eye-position-controls>p.has-pending-change{color:#ffe1a3}
.eye-balance-action{margin-top:13px;padding-top:13px}.eye-balance-action .secondary-action.edit-action{background:#29483f;border-color:#527e72;color:#e2f8ef}.eye-balance-action .secondary-action.edit-action:hover:not(:disabled){background:#335a4e;border-color:#78b49d;box-shadow:0 3px 15px #68dfcc14}.eye-balance-action .secondary-action.edit-action:disabled{background:#28232d;border-color:#39303e;color:#928499}
.secondary-action.damage-auto-select{display:flex;align-items:center;gap:10px;min-height:48px;padding:12px 13px;background:#553044;border:1px solid #bd6b8c;border-radius:10px;color:#fff0f6;font-weight:650;text-align:left}
.damage-auto-select>span:first-of-type{flex:1}.damage-auto-select>span:last-child{font-size:18px}.damage-auto-select:hover:not(:disabled){background:#6a3a51;border-color:#ec98b6}
.damage-selection-note{padding:10px 12px;border:1px solid #493442;border-radius:8px;background:#241c24;color:#cfb6c8;font-size:11px}
.damage-review-dot{background:#e8b554}.damage-review-toggle{color:#dfc69b}.damage-review-toggle input{accent-color:#e8b554}.damage-review-hint{color:#c7ad80;font-size:11px}
#damageReviewOverlay{opacity:.48}
.secondary-action.eye-redetect-action{display:flex;align-items:center;justify-content:center;gap:8px;min-height:38px;margin-top:9px;padding:9px 11px;border-color:#4b666e;background:#253238;color:#d5ebef;font-size:12px;line-height:1.5}.secondary-action.eye-redetect-action>svg{display:block;width:18px;height:18px;flex:0 0 18px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}.eye-redetect-action:hover:not(:disabled){background:#30434a;border-color:#81abb8}.eye-redetect-hint{margin:7px 0 12px;font-size:10px;line-height:1.6;color:#a9bec8}
.color-region-section .color-region-ai{display:flex;align-items:center;justify-content:center;gap:9px;margin:0;background:#32263e;border-color:#73568f;color:#e9d5ff}.color-region-section .color-region-ai.selected{background:#53386d;border-color:#ba91ff}.color-region-section .color-region-ai-hint{margin:8px 0 15px;font-size:11px}.image-frame[data-tool=ai],.image-frame[data-tool=ai-exclude]{cursor:crosshair}.color-region-section .secondary-action.edit-action{background:#7651a7;border-color:#b18bdc}.color-region-section .secondary-action.edit-action:disabled{background:#28232d;border-color:#39303e}
.color-region-ai-tools{display:grid;gap:8px}.color-region-section .color-region-step{font-weight:650;color:#ede3fa;margin:18px 0 12px}.color-region-section .color-region-manual-hint{font-size:11px;margin:10px 0;color:#aca1b7}
.color-region-swatches{grid-template-columns:repeat(3,minmax(0,1fr))}.color-region-section .color-region-pale-hint{font-size:11px;line-height:1.65;margin:10px 0 0;color:#c8b8d4}
.color-region-section .color-region-refine{background:#302b35;border-color:#746181;color:#ecdff6;font-size:12px;padding:10px;margin-top:12px}.color-region-section .color-region-refine-hint{font-size:10px;line-height:1.6;margin:7px 0 12px;color:#b7a7c2}
.color-region-refine-notice{margin:9px 0;padding:10px 11px;border:1px solid #5a466a;border-radius:8px;background:#2a2234;color:#dfc9f0;font-size:11px;line-height:1.65}.color-region-refine-notice.is-warning{background:#352d20;border-color:#8c7143;color:#f2d8a7}

#colorControls>.color-applied-state{margin-top:0}
@media(prefers-reduced-motion:reduce){.chevron{transition:none}}

/* Translation and direction support; image coordinates keep their physical orientation. */
.mode,.history-item{text-align:start}.section-body,.hint,.action-hint{overflow-wrap:break-word}#serviceStatus[data-ready=false] i{background:#d4ad70}.image-stage,.comparison-overlay{direction:ltr}html[dir=rtl] .layout-controls{margin-right:0;margin-left:auto}html[dir=rtl] .panel-heading,html[dir=rtl] .history-heading{direction:rtl}html[dir=rtl] .empty-state{direction:rtl}
