:root{color-scheme:dark;--bg:#151719;--panel:#1c1e21;--line:#303237;--muted:#8d9299;--text:#ecece8;--accent:#c8ed94;--accent-dark:#243020;--font:-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}
*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--text);font-family:var(--font);font-size:13px;overflow:hidden}button,a,input,select{-webkit-tap-highlight-color:transparent}button{font:inherit;color:inherit;cursor:pointer;background:transparent;border:0}button:disabled{opacity:.35;cursor:not-allowed}button:focus-visible,a:focus-visible,select:focus-visible{outline:2px solid var(--accent);outline-offset:3px}button:not(:disabled),select{transition:background .16s,color .16s,border-color .16s}button:not(:disabled):active{transform:translateY(1px)}svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0}.symbols{position:absolute;width:0;height:0;overflow:hidden}[hidden]{display:none!important}a{color:inherit;text-decoration:none}.topbar{height:78px;display:flex;align-items:center;justify-content:space-between;padding:0 28px;border-bottom:1px solid var(--line);background:#1a1c1f;gap:20px}.brand{display:flex;align-items:center;gap:12px;font-size:25px;font-weight:600;letter-spacing:-1px}.brand-mark{height:39px;width:39px;display:grid;place-items:center;background:var(--accent);border-radius:11px;color:#1d2318;font-family:Georgia,serif;font-style:italic;font-size:36px;line-height:30px;position:relative;padding-bottom:6px}.brand-mark span{font-size:20px;position:absolute;right:4px;bottom:4px}.brand-sub{display:block;font-size:8px;font-weight:500;letter-spacing:2.4px;color:var(--muted);margin-top:2px}.project-title{display:flex;align-items:center;gap:8px;color:#b4b8bd;font-size:12px;position:absolute;left:50%;transform:translateX(-50%)}.live-dot{display:inline-block;width:5px;height:5px;background:var(--accent);border-radius:50%;flex-shrink:0}.version{font-size:8px;letter-spacing:1px;border:1px solid #3a3d40;border-radius:4px;padding:4px 5px;margin-left:12px;color:#7f858c}.top-actions{display:flex;align-items:center;gap:18px}.primary{display:flex;align-items:center;justify-content:center;gap:10px;background:var(--accent);color:#20271b;border:1px solid var(--accent);border-radius:7px;padding:11px 17px;font-weight:600;font-size:12px}.primary:hover{background:#d8f7b1}.quiet{font-size:11px;color:#aaafb6;display:flex;align-items:center;justify-content:center;gap:8px;padding:8px 9px;border-radius:5px}.quiet:hover{background:#2a2d31;color:#f0f1ed}.workspace{height:calc(100dvh - 78px);display:grid;grid-template-columns:206px minmax(300px,1fr) 304px}.library{border-right:1px solid var(--line);padding:26px 16px 0;display:flex;flex-direction:column;min-height:0;background:#1a1c1f}.section-title{font-size:9px;letter-spacing:1.7px;color:#969ba2;display:flex;justify-content:space-between;align-items:center;font-weight:600;margin-bottom:20px}.section-title span{font:10px ui-monospace,monospace;color:#656b74}.import-button{border:1px solid #393c41;border-radius:6px;display:flex;gap:6px;align-items:center;width:100%;padding:10px 8px;font-size:11px;white-space:nowrap}.import-button:hover{border-color:#777e87;background:#23262a}.import-button svg{width:16px;height:16px}.import-button>span{margin-left:auto;font-size:9px;color:#737a83}.photo-list{flex:1;overflow:auto;margin:18px -7px 0;padding:0 7px}.photo-card{width:100%;display:flex;align-items:center;gap:9px;border:1px solid transparent;border-radius:7px;padding:6px;margin-bottom:8px;text-align:left}.photo-card:hover{background:#25282c}.photo-card.selected{border-color:#566644;background:#252c22}.photo-card img{width:43px;height:57px;object-fit:cover;border-radius:3px;background:#303238}.photo-card>span{min-width:0}.photo-card strong{font-size:10px;font-weight:500;display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:105px}.photo-card small{font-size:9px;color:var(--muted);display:block;margin-top:7px;line-height:1.5}.library-bottom{border-top:1px solid var(--line);padding:17px 0}.library-bottom>.quiet{width:100%;padding:9px 0;border:1px solid #32363a}.library-bottom p{font-size:9px;color:#797f87;display:flex;align-items:center;gap:6px;line-height:1.6;margin:15px 0 0}.library-bottom p svg{width:12px;height:12px}.editor{display:flex;flex-direction:column;min-width:0;min-height:0;background:#111315;position:relative}.editor-bar{height:63px;border-bottom:1px solid #24272b;display:flex;align-items:center;justify-content:space-between;padding:0 24px;gap:16px;background:#181a1d}.file-label{min-width:0;display:flex;gap:12px;align-items:center;flex-wrap:wrap}.file-label>span:first-child{font-size:11px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;max-width:220px}.file-label>span:last-child{font-size:9px;color:#727b84;white-space:nowrap}.view-controls{display:flex;gap:3px;background:#101215;border:1px solid #2d3035;border-radius:6px;padding:3px}.view-button{font-size:10px;color:#858c94;display:flex;align-items:center;gap:5px;padding:7px 9px;border-radius:4px}.view-button svg{width:13px;height:13px}.view-button:hover{color:#d9dddf}.view-button.active{color:#dde6d3;background:#30352d;box-shadow:0 1px 3px #0003}.viewport{flex:1;min-height:0;overflow:auto;position:relative;display:flex;justify-content:center;align-items:center;background:radial-gradient(ellipse at 50% 45%,#1c1f23 0,#141619 60%,#111315 100%)}.empty-state{text-align:center;margin:auto;padding:35px 20px;max-width:540px}.empty-symbol{width:85px;height:78px;margin:0 auto 25px;position:relative;display:grid;place-items:center}.empty-symbol span{position:absolute;width:51px;height:68px;border:1px solid #4f5748;background:#252c21;border-radius:7px;transform:rotate(-13deg) translateX(-12px)}.empty-symbol span:nth-child(2){transform:rotate(11deg) translateX(11px);background:#283022;border-color:#6c7e5a}.empty-symbol span:nth-child(3){transform:rotate(-2deg);background:#313c28;border-color:#a1bc80}.empty-symbol svg{position:relative;color:var(--accent);width:25px;height:25px}.eyebrow{font-size:8px;font-weight:600;letter-spacing:1.8px;color:#969d91}.empty-state>.eyebrow{font-size:9px;color:#a3b48f;letter-spacing:2px}.empty-state h1{font-family:Georgia,"Times New Roman",serif;font-size:47px;line-height:1.13;font-weight:400;letter-spacing:-1.4px;margin:18px 0 20px;color:#e5e6df}.empty-state h1 em{font-weight:400;color:#b7c8a5}.empty-state>p{font-size:12px;line-height:1.9;color:#808891;margin-bottom:24px}.empty-state>.primary{margin:0 auto;min-width:150px;gap:23px}.empty-state>.primary svg{width:16px;height:16px}.demo-button{font-size:10px;color:#969f8f;padding:16px 8px}.demo-button:hover{color:var(--accent)}.demo-button span{margin-left:9px;color:#afc990}.format-tags{display:flex;gap:8px;justify-content:center;margin-top:20px}.format-tags span{color:#59616a;border:1px solid #2d3238;border-radius:3px;font-size:8px;letter-spacing:1px;padding:4px 7px}.image-stage{position:relative;display:flex;align-items:center;justify-content:center;padding:26px;min-width:100%;min-height:100%;height:100%;width:100%;overflow:hidden}.photo-frame{position:relative;overflow:hidden;box-shadow:0 15px 60px #0006;flex-shrink:0;user-select:none;background:#202326}.base-image{display:block;max-width:none;max-height:none;width:100%;height:100%;object-fit:contain}.result-clip{position:absolute;inset:0;overflow:hidden;clip-path:inset(0 0 0 0)}.result-clip>img{display:block;width:100%;height:100%;object-fit:contain}.mask-image,.difference-image{position:absolute;inset:0;display:block;width:100%;height:100%;object-fit:contain;pointer-events:none}.wipe-line{position:absolute;top:0;bottom:0;left:50%;width:1px;background:#ffffffe6;box-shadow:0 0 10px #0006;pointer-events:none}.wipe-line>span{position:absolute;top:50%;left:0;transform:translate(-50%,-50%);border-radius:50%;width:30px;height:30px;display:grid;place-items:center;background:#ebeee6;color:#333c2b;border:2px solid #fff;font-size:16px;box-shadow:0 2px 10px #0005}.comparison-labels{position:absolute;top:40px;left:40px;right:40px;display:flex;justify-content:space-between;pointer-events:none}.comparison-labels span{background:#111c;font-size:8px;letter-spacing:1px;padding:6px 9px;border-radius:3px;color:#e7e7e4}#wipeRange{position:absolute;inset:26px;opacity:0;width:calc(100% - 52px);height:calc(100% - 52px);cursor:ew-resize;z-index:5;margin:0}.drop-overlay{position:absolute;inset:16px;border:1px dashed var(--accent);border-radius:10px;background:#1d271ff5;display:flex;align-items:center;justify-content:center;gap:12px;color:var(--accent);font-size:16px;z-index:20;pointer-events:none}.drop-overlay svg{width:28px;height:28px}.processing{position:absolute;bottom:20px;left:50%;transform:translateX(-50%);background:#24282bee;border:1px solid #464d55;border-radius:22px;box-shadow:0 5px 20px #0005;padding:9px 14px;display:flex;gap:9px;align-items:center;font-size:10px;color:#d9ded6;z-index:12;pointer-events:none}.spinner{height:12px;width:12px;border:1.5px solid #728661;border-top-color:var(--accent);border-radius:50%;animation:spin .8s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}.hold-badge{position:absolute;top:20px;left:50%;transform:translateX(-50%);background:#0d0e11dd;color:#e2e8d9;letter-spacing:2px;font-size:9px;padding:7px 13px;border-radius:4px;z-index:10}.canvas-bottom{height:48px;padding:0 21px;display:flex;align-items:center;justify-content:space-between;border-top:1px solid #24272c;background:#181a1d;color:#7a838b;gap:12px}#imageStatus{display:flex;align-items:center;gap:7px;font-size:9px}.zoom-controls{display:flex;align-items:center;gap:3px}.zoom-controls .quiet{font-size:10px;padding:7px 8px}.zoom-controls .active{background:#292f25;color:#cad9bc}kbd{font:9px var(--font);border:1px solid #3b4149;border-radius:3px;padding:0 5px;margin-left:6px;color:#686f79}.divider{height:14px;width:1px;background:#333840;margin:0 9px}.quality-strip{height:42px;display:flex;align-items:center;gap:25px;padding:0 24px;border-top:1px solid var(--line);background:#1b1e21;font-size:9px;color:#7e878f}.quality-strip>div{display:flex;align-items:center;gap:7px}.quality-strip strong{font-size:10px;font-weight:500;color:#c7d0bd;font-variant-numeric:tabular-nums}.metric-dot{height:4px;width:4px;background:var(--accent);border-radius:50%}.quality-strip>button{margin-left:auto;font-size:9px;color:#a9b59e;padding:7px 0}.quality-strip>button span{margin-left:9px}.controls{background:var(--panel);border-left:1px solid var(--line);display:flex;flex-direction:column;min-height:0}.control-heading{display:flex;align-items:center;justify-content:space-between;padding:26px 24px 20px}.control-heading h2{font-size:19px;letter-spacing:-.4px;font-weight:500;margin:7px 0 0}.icon-button{display:grid;place-items:center;border:1px solid #3a3e44;border-radius:6px;width:28px;height:28px;color:#838c96}.icon-button:hover{color:#eef2e8;background:#30352c}.icon-button svg{width:14px;height:14px}.preset-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:6px;padding:0 22px 23px;border-bottom:1px solid var(--line)}.preset{text-align:left;border:1px solid #363a41;border-radius:7px;font-size:10px;padding:7px 6px 8px;position:relative}.preset.active{border-color:#a0bf7c;background:#283023}.preset:hover{background:#2a2e27}.preset small{font-size:7px;color:#7f8a79;display:block;margin-top:4px;white-space:nowrap}.preset-swatch{display:block;width:100%;height:24px;border-radius:3px;margin-bottom:8px;background:linear-gradient(120deg,#dcb79a,#8a9b78)}.preset-swatch.natural{background:linear-gradient(115deg,#c29e7d 10%,#e4cfb7 55%,#799285)}.preset-swatch.studio{background:linear-gradient(110deg,#9b7866,#dbc4ae 50%,#707e7d)}.preset-swatch.editorial{background:linear-gradient(110deg,#574d48,#a18f81 50%,#c7c4b4)}.control-scroll{overflow:auto;flex:1;min-height:0;padding:0 24px 20px;scrollbar-width:thin;scrollbar-color:#3a4145 transparent}.control-group{border-bottom:1px solid var(--line);padding:21px 0 7px}.group-title{display:flex;align-items:center;gap:9px;font-size:11px;color:#d9ddd5;margin-bottom:23px}.group-title>span{font:8px ui-monospace,monospace;color:#626e76;letter-spacing:1px}.group-title>svg{margin-left:auto;color:#839e68;width:13px;height:13px}.control{margin-bottom:21px}.control label{display:flex;align-items:center;justify-content:space-between;gap:10px;color:#aeb4ba;font-size:10px}.control-value{color:#c9d2c1;font:9px ui-monospace,monospace;background:#272b2f;min-width:30px;text-align:center;padding:3px 5px;border-radius:4px;font-variant-numeric:tabular-nums}.control p{font-size:8px;color:#656f79;margin:7px 0 0;line-height:1.6}input[type=range]{appearance:none;-webkit-appearance:none;width:100%;height:3px;background:linear-gradient(to right,#a4bd8a 0%,#a4bd8a var(--fill,32%),#3b4148 var(--fill,32%),#3b4148 100%);border-radius:3px;outline:none;display:block;cursor:pointer;margin:13px 0 0}input[type=range]::-webkit-slider-thumb{appearance:none;-webkit-appearance:none;width:10px;height:10px;border-radius:50%;background:#c5dbaf;border:2px solid #d8e9c8;box-shadow:0 0 0 3px #c5dbaf08}input[type=range]::-moz-range-thumb{width:8px;height:8px;border-radius:50%;background:#c5dbaf;border:1px solid #d8e9c8}input[type=range]:focus-visible{outline:1px solid #b6d394;outline-offset:6px}.note-card{display:flex;gap:10px;padding:13px 11px;background:#242a22;border:1px solid #343f2d;border-radius:7px;margin-top:21px}.note-card>svg{color:#82996a;width:15px;height:15px}.note-card strong{font-size:9px;font-weight:500;color:#b5c5a3}.note-card p{font-size:8px;line-height:1.8;color:#7c8b72;margin:5px 0 0}.controls-footer{height:42px;display:flex;align-items:center;gap:7px;padding:0 24px;font-size:9px;color:#75836a;border-top:1px solid var(--line)}.controls-footer .live-dot{width:4px;height:4px;background:#849e6e}.mask-selector{margin-top:20px}.mask-selector label,dialog label{display:block;font-size:11px;color:#aeb6bd}.mask-selector select,dialog select{display:block;margin-top:9px;width:100%;font:12px var(--font);color:#e0e6dc;background:#202428;border:1px solid #41474d;border-radius:6px;padding:10px}.toast{position:fixed;bottom:25px;left:50%;transform:translateX(-50%);background:#d9e6ce;color:#242b1e;border:1px solid #c5ddb1;border-radius:7px;padding:12px 19px;box-shadow:0 8px 40px #0007;font-size:12px;z-index:100;max-width:min(650px,90vw)}.toast.error{background:#e3c2b9;color:#51291f;border-color:#c79688}dialog{border:1px solid #41474c;border-radius:15px;background:#202327;color:var(--text);padding:29px;width:min(440px,90vw);box-shadow:0 25px 100px #0009}dialog::backdrop{background:#080a0cbf;backdrop-filter:blur(6px)}.dialog-heading{display:flex;justify-content:space-between;align-items:flex-start;gap:20px}.dialog-heading h2{font-family:Georgia,serif;font-weight:400;font-size:28px;margin:9px 0 15px;letter-spacing:-.5px}.close-button{font-size:25px;color:#808a91;line-height:20px;border-radius:4px;padding:0 4px}.close-button:hover{color:#e6ecdf;background:#323a31}dialog>form>p{color:#8c969e;font-size:11px;margin:2px 0 28px}.export-note{display:flex;align-items:center;gap:8px;color:#7c8a72;font-size:10px;line-height:1.6;margin:24px 0}.export-note svg{width:14px;height:14px}.wide{width:100%}#insightContent{font-size:12px;color:#9ca7ae;line-height:1.8}#insightContent dl{display:grid;grid-template-columns:1fr 1fr;gap:9px;margin:12px 0 20px}#insightContent dt{color:#79888d}#insightContent dd{margin:0;color:#d2deca;text-align:right}#insightContent p{font-size:10px;color:#84917e;border-top:1px solid #384035;padding-top:14px}
@media(min-width:1700px){.workspace{grid-template-columns:235px minmax(400px,1fr) 340px}.controls .control-scroll{padding-left:28px;padding-right:28px}.control-heading{padding-left:28px;padding-right:28px}.control label{font-size:12px}.control p,.note-card p{font-size:10px}.group-title{font-size:13px}.preset{font-size:12px}.preset small{font-size:8px}.control{margin-bottom:25px}.control-group{padding-top:27px}.project-title{font-size:13px}.empty-state h1{font-size:58px}.empty-state p{font-size:14px}}
@media(max-width:1200px){.workspace{grid-template-columns:165px minmax(300px,1fr) 270px}.library{padding-left:12px;padding-right:12px}.project-title{display:none}.editor-bar{padding:0 15px}.fileDimensions{display:none}.view-controls{gap:1px}.view-button{padding:7px;font-size:9px}.file-label>span:first-child{max-width:130px}.control-heading,.control-scroll{padding-left:19px;padding-right:19px}.preset-grid{padding-left:17px;padding-right:17px}.photo-card strong{max-width:76px}.quality-strip{gap:12px;padding:0 16px}.quality-strip>button{display:none}.photo-card img{width:35px;height:47px}.import-button{font-size:10px}.import-button>span{display:none}}
@media(max-width:900px){.workspace{grid-template-columns:minmax(300px,1fr) 260px}.library{display:none}.topbar{padding:0 20px;height:66px}.workspace{height:calc(100dvh - 66px)}.top-actions{gap:9px}.top-actions .quiet{font-size:10px}.editor-bar{flex-direction:column;justify-content:center;gap:7px;height:80px}.file-label>span:first-child{max-width:200px}.view-controls{padding:2px}.view-button{font-size:9px}.control-heading h2{font-size:17px}.quality-strip>div:last-of-type{display:none}.canvas-bottom{padding:0 10px}.canvas-bottom #imageStatus{display:none}.zoom-controls{margin-left:auto}.image-stage{padding:17px}.empty-state h1{font-size:37px}.empty-state .eyebrow{font-size:7px}.preset small{font-size:6px}}
@media(max-width:620px){body{overflow:auto}.topbar{height:64px;padding:0 16px}.brand{font-size:21px;gap:8px}.brand-mark{width:33px;height:33px;font-size:31px}.top-actions #recipeButton{display:none}.top-actions .primary{padding:9px 11px;font-size:11px}.workspace{display:flex;flex-direction:column;height:auto;min-height:calc(100dvh - 64px)}.editor{height:calc(100dvh - 64px);min-height:480px}.editor-bar{height:68px}.controls{border-left:0;border-top:1px solid var(--line);overflow:visible}.control-scroll{overflow:visible;display:grid;grid-template-columns:1fr 1fr;gap:0 22px}.preset-grid{padding-bottom:16px}.control-heading{padding:20px}.preset-swatch{height:20px}.preset small{font-size:9px}.preset{font-size:12px}.control-group{padding-top:22px}.control label{font-size:11px}.control p{font-size:9px}.note-card{margin-bottom:20px;align-self:start}.controls-footer{justify-content:center}.empty-state h1{font-size:42px}.quality-strip{justify-content:space-between}.quality-strip>div:last-of-type{display:flex}.zoom-controls{margin-left:0;width:100%;justify-content:space-between}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important}}
.library-bottom>.quiet+.quiet{margin-top:7px}.detail-dialog{width:min(980px,96vw);max-height:94dvh;overflow:auto}.detail-help{font-size:11px;color:#8b989f;margin:0 0 14px}.detail-navigation{display:flex;align-items:center;gap:5px;margin-bottom:10px}.detail-navigation .quiet{border:1px solid #3a4346;min-width:30px}.detail-navigation>span{margin-left:auto;color:#87977c;font:10px ui-monospace,monospace}.detail-viewport{width:100%;max-height:64dvh;overflow:auto;position:relative;background:#141618;border:1px solid #3a4044}.detail-frame{position:relative;overflow:hidden;margin:auto;flex-shrink:0;user-select:none}.detail-frame>img,.detail-frame>div>img{width:100%;height:100%;display:block;max-width:none;image-rendering:auto}.detail-frame>#detailClip{position:absolute;inset:0;clip-path:inset(0 0 0 50%)}.detail-frame>#detailLine{left:50%}.detail-frame>input{position:absolute;inset:0;width:100%;height:100%;margin:0;opacity:0;z-index:4;cursor:ew-resize}.detail-caption{display:flex;justify-content:space-between;font-size:9px;letter-spacing:1px;color:#8e9a87;padding-top:12px}
.brush-bar{height:43px;display:flex;align-items:center;gap:5px;padding:0 17px;background:#202527;border-bottom:1px solid #363e42;flex-shrink:0;overflow-x:auto;white-space:nowrap}.brush-bar .quiet{font-size:9px;padding:6px 8px}.brush-bar .quiet.active{background:#3a405b;color:#c2cafa}.brush-bar>label{display:flex;align-items:center;gap:7px;color:#9da8ad;font-size:9px;margin:0 9px}.brush-bar input{width:70px;margin:0}.brush-bar label>span{width:15px;font:9px ui-monospace,monospace}.brush-help{font-size:8px;color:#687b83;margin-left:auto}#protectionCanvas{position:absolute;inset:0;width:100%;height:100%;z-index:6;cursor:none;touch-action:none;outline-offset:-3px}#protectionCanvas:focus-visible{outline:1px solid #b3c6fa}.view-button.brush-active{background:#3b405d;color:#d5dcff}.brush-bar+#viewport{min-height:0}
.brush-count{font:9px ui-monospace,monospace;color:#9aa9cf;padding:3px 5px;border:1px solid #3c4654;border-radius:4px}

#detailProtectionCanvas{position:absolute;inset:0;width:100%;height:100%;z-index:6;cursor:none;touch-action:none;outline-offset:-2px}#detailProtectionCanvas:focus-visible{outline:1px solid #b3c6fa}.detail-brush-bar{display:flex;align-items:center;gap:7px;margin-bottom:10px;flex-wrap:wrap;color:#9aa5ab;font-size:10px}.detail-brush-bar .quiet{padding:6px 9px;border:1px solid #3a4346;font-size:10px}.detail-brush-bar .active,#detailBrushToggle.active{background:#3a405b;color:#c2cafa}.detail-brush-bar label{display:flex;align-items:center;gap:8px}.detail-brush-bar input{width:85px}.detail-navigation{flex-wrap:wrap}

.detail-dialog{height:min(1040px,94dvh);overflow:hidden}.detail-dialog[open]{display:flex;flex-direction:column}.detail-dialog>.dialog-heading,.detail-dialog>.detail-help,.detail-dialog>.detail-navigation,.detail-dialog>.detail-brush-bar,.detail-dialog>.detail-caption{flex-shrink:0}.detail-dialog>.detail-viewport{min-height:0;flex:1;max-height:none}

.mask-empty{position:absolute;bottom:16px;left:50%;transform:translateX(-50%);max-width:90%;width:max-content;padding:9px 12px;background:#10171ee8;border:1px solid #4b5c64;border-radius:5px;color:#d3dfe4;font-size:11px;z-index:5;pointer-events:none}

.editor>.mask-selector{margin:0;padding:8px 18px;border-bottom:1px solid #363e42;background:#202527;flex-shrink:0}.editor>.mask-selector label{display:flex;align-items:center;gap:13px;font-size:10px}.editor>.mask-selector select{display:inline-block;margin:0;width:220px;max-width:65%;padding:6px 9px;font-size:11px}

.batch-progress{display:flex;align-items:center;gap:12px;padding:11px 18px;border-top:1px solid #414d41;background:#242c24;flex-shrink:0;min-width:0}.batch-copy{display:flex;flex-direction:column;gap:4px;flex:1;min-width:0}.batch-copy strong{font-size:11px;font-weight:500;color:#d8e8ce}.batch-copy span{font-size:9px;color:#9aa994;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.batch-progress progress{width:100px;height:6px;accent-color:#cfe6a2;flex-shrink:0}.batch-progress .quiet{font-size:10px;white-space:nowrap}.batch-progress a.quiet{color:#cfe6a2;text-decoration:none;padding:6px;border:1px solid #536449;border-radius:4px}@media(max-width:620px){.batch-progress{gap:8px;padding:10px}.batch-progress progress{width:60px}}

/* The photo itself owns comparison coordinates; the stage remains scrollable. */
.viewport{display:block;overscroll-behavior:contain}.empty-state{margin:8vh auto 0}.image-stage{overflow:visible;box-sizing:border-box}.comparison-labels{top:14px;left:14px;right:14px;z-index:3}.wipe-line{z-index:4}.wipe-handle{position:absolute;top:0;bottom:0;left:50%;width:24px;transform:translateX(-50%);background:transparent;border:0;padding:0;z-index:5;cursor:ew-resize;touch-action:none}.wipe-handle:focus-visible{outline:2px solid var(--accent);outline-offset:-3px}.can-pan .photo-frame{cursor:grab;touch-action:none}.panning .photo-frame{cursor:grabbing}.canvas-bottom{height:auto;min-height:48px;gap:8px;flex-wrap:wrap;padding-top:6px;padding-bottom:6px}.zoom-controls{flex-wrap:wrap;margin-left:auto;gap:2px}.zoom-controls .zoom-step{font-size:17px;padding:3px 9px}.zoom-controls select{font:10px var(--font);color:#d1d8ca;background:#272d30;border:1px solid #444d4d;border-radius:4px;padding:5px 2px;max-width:65px}.wipe-control{display:flex;align-items:center;gap:4px;font-size:9px;color:#a8b4b3}.wipe-control input#wipeRange{position:static;opacity:1;width:64px;height:16px;cursor:ew-resize;z-index:auto;margin:0;accent-color:var(--accent)}.preview-notice{padding:8px 16px;background:#403222;color:#ffe0b4;font-size:11px;flex-shrink:0}#imageStatus{font-size:10px}.zoom-controls .divider{margin:0 4px}
@media(max-width:1200px){.canvas-bottom #imageStatus{width:100%;font-size:9px}.zoom-controls{margin-left:0}.zoom-controls .quiet{padding:5px 6px;font-size:9px}}

.preset-grid .intensive{grid-column:1/-1;display:flex;justify-content:center;align-items:center;gap:10px;padding:8px}.preset-grid .intensive small{margin:0;color:#a4ada6}.preset-grid .intensive.active small{color:#d0dabc}

.photo-frame.pick-region{cursor:crosshair!important}.pick-region:after{content:'Karşılaştırmak için bölge seç';position:absolute;top:12px;left:50%;transform:translateX(-50%);padding:7px 12px;background:#18251ee8;color:#d5e4c7;font-size:11px;pointer-events:none;white-space:nowrap;z-index:8}.pair-dialog{width:min(880px,96vw);max-height:94dvh;overflow:auto}.pair-scroll{overflow:auto}.pair-images{display:grid;grid-template-columns:repeat(2,max-content);gap:18px;justify-content:center}.pair-images figure{margin:0}.pair-images figcaption{font-size:10px;letter-spacing:1px;color:#c2cdbb;margin:0 0 9px}.pair-images img{display:block;max-width:none;max-height:none;object-fit:contain}.pair-dialog #pairRecipe{margin-top:15px}.pair-dialog #pairMessage{color:#ffd3a4}.pair-dialog .detail-navigation{flex-wrap:wrap}
@media(max-width:900px){.pair-images{justify-content:start}.view-button{padding:6px;font-size:9px}}

.pair-size{font-size:10px;color:#a1afa8;display:flex;align-items:center;gap:6px;margin-left:auto}.pair-size select{font:10px var(--font);padding:5px;background:#252d2b;color:#dbe5d3;border:1px solid #48584a;border-radius:4px}@media(max-width:700px){.pair-dialog{width:98vw;padding:18px}.pair-images{gap:14px}.pair-dialog h2{font-size:20px}.pair-dialog .detail-help{font-size:10px}}

.pair-dialog.has-reference{width:min(1340px,98vw)}.pair-images.has-reference{grid-template-columns:repeat(3,max-content);justify-content:start}.pair-regions{display:flex;gap:6px;flex-wrap:wrap;margin:0 0 12px}.pair-regions .quiet{border:1px solid #52634c;padding:6px 12px}.reference-button{color:#d2e6b8;border:1px solid #52634c}.pair-dialog #pairReferenceRecipe{line-height:1.6;overflow-wrap:anywhere}.pair-images figure[hidden],.pair-regions[hidden],.reference-button[hidden]{display:none!important}

.pair-display-bar{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;margin:0 0 12px}.pair-display-bar>div{display:flex;gap:6px}.pair-display-bar .quiet{border:1px solid #52634c;padding:6px 10px}.pair-display-bar .active{background:#3b4a32;color:#dfefce}.pair-display-bar>span{font:10px ui-monospace,monospace;color:#c2cdbb}.pair-images figure{min-width:0}.pair-images figcaption{white-space:normal;line-height:1.4;min-height:2.8em;overflow-wrap:anywhere}.pair-display-bar[hidden]{display:none!important}

/* Additional tools stay grouped, searchable and usable in the narrow editor. */
.workspace-tools,.advanced-tools,.tool-section{grid-column:1/-1;border-bottom:1px solid var(--line);padding:16px 0}.workspace-tools label,.tool-section label{display:block;color:#aeb8bd;font-size:10px;line-height:1.5;margin-bottom:10px}.workspace-tools select,.workspace-tools input,.tool-section select,.tool-section input[type=number],.advanced-tools input[type=search]{display:block;width:100%;max-width:100%;font:11px var(--font);padding:8px;color:#e2e9dc;background:#23292b;border:1px solid #46504c;border-radius:5px;margin-top:5px}.selection-meta{display:grid;grid-template-columns:80px minmax(0,1fr);gap:8px}.tools-heading{display:flex;justify-content:space-between;align-items:center}.tools-heading h3{font-size:12px;font-weight:500;margin:0 0 10px}.tools-heading span{font-size:9px;color:#8da382}.advanced-tools input[type=search]{margin:0 0 12px}.advanced-group{border:1px solid #3a4440;border-radius:5px;margin-bottom:8px;padding:0 10px}.advanced-group>summary,.tool-section>summary{font-size:11px;color:#cfdfc3;cursor:pointer;padding:12px 0;line-height:1.5}.advanced-group[open]>summary{border-bottom:1px solid #36403a;margin-bottom:14px}.advanced-group .control{margin:16px 0}.advanced-group .control label{font-size:11px}.advanced-group .control p{font-size:10px;line-height:1.5;color:#89968d}.tool-section p{font-size:10px;color:#8d9c92;line-height:1.7}.tool-section .quiet,.workspace-tools .quiet{width:100%;border:1px solid #43533d;margin:8px 0;color:#c4d7b6}.crop-fields{display:grid;grid-template-columns:1fr 1fr;gap:8px}.brush-bar{height:auto;min-height:43px;flex-wrap:wrap;overflow:visible;padding-top:6px;padding-bottom:6px}.brush-bar>label{margin:3px;gap:5px}.brush-bar input[type=range],.detail-brush-bar input[type=range]{width:55px;min-width:45px}.brush-bar select,.detail-brush-bar select{display:inline-block;width:auto;max-width:125px;background:#20292b;color:#d2dfca;border:1px solid #4b5752;border-radius:4px;font:10px var(--font);padding:5px;margin:0}.detail-brush-bar label{font-size:9px;margin:0}.detail-brush-bar .quiet{font-size:9px}.detail-brush-bar select{max-width:110px}.brush-bar .brush-help{width:100%;font-size:9px}.detail-brush-bar{max-height:130px;overflow:auto;flex-shrink:0}.view-controls{flex-wrap:wrap;max-width:100%}.editor-bar{height:auto;min-height:72px;padding-top:8px;padding-bottom:8px}.photo-card small{white-space:normal;overflow-wrap:anywhere}.workspace-tools #clearFaceOverrides[hidden]{display:none!important}.advanced-tools #noTools{font-size:11px;color:#9eaea1}.tool-section output{float:right;color:#c6dcad}
@media(max-width:620px){.control-scroll{display:block}.advanced-tools,.workspace-tools,.tool-section{width:100%}.editor{min-height:540px}.brush-bar label{font-size:10px}.brush-bar .quiet{font-size:10px}.view-button{font-size:9px;padding:5px}.detail-dialog .dialog-heading h2{font-size:22px}.detail-navigation>span{width:100%;margin:4px 0 0}.top-actions #recipeImportButton{max-width:86px;font-size:9px}.advanced-group .control p{font-size:10px}}
.sample-notice{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:9px 15px;background:#34412a;border-bottom:1px solid #596a45;color:#e2edce;font-size:11px;line-height:1.6;flex-shrink:0}.sample-notice .quiet{border:1px solid #72815e;white-space:nowrap;color:#e3ebd7}.photo-frame.pick-color{cursor:crosshair!important}.photo-frame.pick-color:after{content:'Rötuşsuz kaynak rengini seç';position:absolute;top:10px;left:50%;transform:translateX(-50%);padding:6px 9px;color:#e8efd8;background:#1d2c1ee8;font-size:10px;z-index:8;pointer-events:none;white-space:nowrap}
.automatic-tools{padding:0 22px 14px;flex-shrink:0;min-width:0}.automatic-button{display:flex;align-items:center;justify-content:center;gap:9px;width:100%;padding:11px 10px;border:1px solid #72895d;border-radius:7px;background:#293522;color:#d8ebc4;font-size:12px;font-weight:600}.automatic-button:not(:disabled):hover,.automatic-button.active{background:#3b4c2d;border-color:#c2e695;color:#eff8e6}.automatic-tools p{font-size:9px;line-height:1.6;color:#91a087;margin:7px 1px 0;overflow-wrap:anywhere}@media(max-width:1200px){.automatic-tools{padding-left:17px;padding-right:17px}}@media(max-width:620px){.automatic-tools{padding:0 20px 14px}.automatic-tools p{font-size:10px}}

@media(max-width:620px){.quality-strip{height:auto;min-height:41px;flex-wrap:wrap;gap:8px;padding-top:8px;padding-bottom:8px}.quality-strip>button{display:block;font-size:10px;white-space:nowrap}}

.control select{width:100%;padding:9px 10px;color:var(--text,#e8e8ec);background:var(--panel,#202127);border:1px solid #41434d;border-radius:6px;font:inherit}
.config-dialog{width:min(960px,94vw);max-height:88vh;overflow:auto}.config-dialog p{font-size:12px;line-height:1.7;color:#bdc7bb}.config-dialog details{margin:14px 0;padding:14px;border:1px solid #3e4840;border-radius:8px}.config-dialog summary{cursor:pointer;color:#dce8cf}.config-dialog label{display:block;font-size:12px;margin:12px 0}.config-dialog select{display:block;width:100%;margin-top:7px;padding:9px;background:#222a25;color:#e3ecdd;border:1px solid #52614b;border-radius:6px}.config-code{max-height:270px;overflow:auto;background:#151c18;border:1px solid #354333;border-radius:6px;padding:12px;font-size:11px;line-height:1.6;white-space:pre-wrap;overflow-wrap:anywhere}.config-bindings{display:grid;grid-template-columns:1fr 1fr;gap:0 20px}.config-bindings p{font-size:11px;overflow-wrap:anywhere}.config-dialog .config-receipt{color:#d3e7b9}.top-actions #configButton{font-size:11px}@media(max-width:800px){.config-bindings{display:block}.top-actions #configButton{font-size:9px;max-width:90px;white-space:normal}}
.source-material-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;max-height:340px;overflow:auto}.material-choice{background:#283128;color:#d8e4d0;border:1px solid #526249;border-radius:6px;font:10px var(--font);min-height:46px;padding:7px;overflow-wrap:anywhere;cursor:pointer}.material-choice:hover:not(:disabled){background:#3a4c30;border-color:#a1bf7e}.material-choice:disabled{opacity:.4;cursor:not-allowed}.material-choice img{display:block;width:100%;height:80px;object-fit:cover;border-radius:4px;margin-bottom:5px}.source-material-tools input[type=range]{width:100%}
.material-choice.active{background:#405335;border-color:#c5e69b;box-shadow:inset 0 0 0 1px #c5e69b;color:#f0f8e9}

/* One category at a time; the photograph and the active person stay in view. */
.workspace{grid-template-columns:184px minmax(300px,1fr) 336px}
.control-heading{padding:21px 20px 15px}.control-heading h2{font-size:18px;letter-spacing:-.35px;margin-top:6px}
.scope-strip{padding:0 20px 15px;flex-shrink:0}.scope-strip>label{display:block;font-size:10px;color:#8f9a96;line-height:1.6}
.scope-strip select{display:block;width:100%;padding:8px 10px;margin-top:5px;border:1px solid #404944;border-radius:6px;background:#242a27;color:#dce6d6;font:11px var(--font)}
.scope-strip .selection-meta{display:flex;gap:6px;margin-top:8px}.scope-strip .selection-meta .quiet{flex:1;padding:6px;font-size:10px;border:1px solid #343d36}
.scope-strip>#clearFaceOverrides{width:100%;font-size:9px;padding:6px 2px;color:#b9ccaa}
.tool-tabs{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:3px;padding:5px 12px 8px;border-top:1px solid #30382f;border-bottom:1px solid #30382f;background:#191d19;flex-shrink:0}
.tool-tab{font-size:10px;min-width:0;padding:11px 2px 10px;color:#8d988a;border-radius:5px;position:relative}
.tool-tab:hover{background:#272e25;color:#d5e2cc}.tool-tab.active{background:#303f27;color:#e1f2d1;box-shadow:inset 0 -2px #b7d691}
.tool-tabs:focus-within{position:relative;z-index:1}.tool-tab:focus-visible{outline-offset:-2px}
.controls .control-scroll{padding:0 20px 24px;display:block}.category-intro{padding:23px 0 10px}.category-intro h3{font-size:15px;font-weight:500;color:#e0e8db;margin:0 0 7px;letter-spacing:-.2px}
.category-intro p,.section-help{font-size:10px!important;color:#8b9986!important;line-height:1.75!important;margin:0 0 17px;overflow-wrap:anywhere}
.category-panel .automatic-tools{padding:2px 0 15px}.category-panel .automatic-tools p{font-size:10px;line-height:1.7;margin-top:9px}.category-panel .automatic-button{padding:13px 10px;font-size:12px;background:linear-gradient(115deg,#344629,#283724);border-color:#768d5f}
.retouch-presets{border-top:1px solid #343e31;border-bottom:1px solid #343e31}.retouch-presets>summary{cursor:pointer;padding:13px 0;color:#bacbb0;font-size:10px}.retouch-presets>.preset-grid{padding:3px 0 15px;border:0}.retouch-presets .preset{font-size:10px}.retouch-presets .preset small{font-size:8px;white-space:normal}
.category-panel .control-group{padding-top:20px}.category-panel .group-title{font-size:11px;margin-bottom:19px}.category-panel .group-title>span{display:none}
.control label{font-size:11px;line-height:1.5;color:#b6c1b0}.control p{font-size:9px;line-height:1.65;color:#7d8b78}.control{margin-bottom:23px}.control-value{font-size:10px;color:#cedfc0;background:#293225}
.material-heading{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:3px 0 14px}.material-heading strong{font-size:12px;font-weight:500;color:#d6e4cb}.material-heading>span{font-size:9px;color:#b3cc99;text-align:right}
.source-material-tools{padding:0;border:0}.source-material-tools>label{display:block;font-size:10px;color:#9fab98;line-height:1.7;margin:13px 0 17px}.source-material-tools select{display:block;width:100%;padding:10px;color:#e3ecd9;background:#242c22;border:1px solid #47563e;border-radius:6px;font:11px var(--font);margin-top:5px}
.source-material-tools output{float:right;font:10px ui-monospace,monospace;color:#c5dba8}.source-material-tools>.quiet{width:100%;border:1px solid #3d4b35;margin:13px 0;font-size:10px;padding:9px}
.source-material-grid{max-height:none;overflow:visible;gap:7px;margin:19px 0 11px}.material-choice{font-size:10px;line-height:1.5;padding:8px 5px;border-radius:7px;border-color:#3f4e37;min-height:47px;background:#252e22;color:#bccfb0}
.material-choice img{height:70px;object-fit:cover;object-position:center;border-radius:4px;margin-bottom:7px}.makeup-preset-grid .material-choice{padding:5px 5px 8px}.makeup-preset-grid .material-choice.active{box-shadow:0 0 0 1px #bddf91,inset 0 0 0 1px #bddf91}
.hair-profile-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;margin:0 0 23px}.hair-choice{min-height:46px;letter-spacing:.2px}.hair-actions{display:grid;gap:7px;margin:0 0 16px}.hair-actions .quiet{border:1px solid #4d5e41;color:#c3d8b0;padding:10px;font-size:10px}.hair-actions .quiet.active{background:#394b2d;border-color:#bddf91;color:#ecf6e4}
.advanced-tools{padding-top:22px;border-bottom:0}.tools-heading h3{font-size:11px;color:#a3b498;line-height:1.5;margin-bottom:12px}.tools-heading span{font-size:9px;white-space:nowrap}.advanced-tools input[type=search]{font-size:10px;background:#1b211a;border-color:#36432f;padding:10px;margin-bottom:13px}.advanced-group{border-radius:7px;border-color:#35412f;padding:0 11px;margin-bottom:8px}.advanced-group>summary{font-size:10px;line-height:1.6;color:#b4c8a7;padding:13px 0}.advanced-group .control label{font-size:10px}.advanced-group .control p{font-size:9px;color:#81937b}
.tool-section{padding:10px 0}.tool-section>summary{font-size:11px;padding:13px 0;color:#bdd1af}.tool-section .quiet{font-size:10px}.tool-section p{font-size:10px}.tool-section #configButton{font-size:10px}.selection-meta{grid-template-columns:1fr 1fr}.tool-section #photoFilter{margin:8px 0 13px}
.workflow-hint{font-size:10px;color:#727e6b;display:flex;gap:9px;align-items:center}.workflow-hint>span{color:#a2b98b}.top-actions{gap:18px}.project-title{position:static;transform:none;margin-left:auto;margin-right:auto}.version{margin-left:7px}.controls-footer{font-size:9px;padding:0 20px;height:36px;flex-shrink:0}
@media(min-width:1700px){.workspace{grid-template-columns:215px minmax(400px,1fr) 360px}.controls .control-scroll{padding-left:23px;padding-right:23px}.control-heading,.scope-strip{padding-left:23px;padding-right:23px}.material-choice img{height:80px}.tool-tab{font-size:11px}}
@media(max-width:1200px){.workspace{grid-template-columns:152px minmax(280px,1fr) 304px}.control-heading,.scope-strip{padding-left:16px;padding-right:16px}.controls .control-scroll{padding-left:16px;padding-right:16px}.tool-tabs{padding-left:8px;padding-right:8px}.material-choice img{height:62px}.workflow-hint{display:none}}
@media(max-width:900px){.workspace{grid-template-columns:minmax(280px,1fr) 292px}.project-title{display:none}.control-heading h2{font-size:17px}.material-choice img{height:58px}}
@media(max-width:620px){.workspace{display:flex;grid-template-columns:none}.controls{min-height:560px}.control-heading,.scope-strip{padding-left:20px;padding-right:20px}.controls .control-scroll{padding:0 20px 24px;overflow:visible}.tool-tabs{position:sticky;top:0;z-index:15;padding:7px 16px;background:#1b2119}.tool-tab{font-size:12px;padding:13px 2px}.scope-strip{padding-bottom:12px}.scope-strip .selection-meta .quiet{font-size:11px}.category-intro h3{font-size:17px}.material-choice img{height:105px}.material-choice{font-size:12px}.control label{font-size:12px}.section-help,.category-intro p{font-size:11px!important}.top-actions #recipeButton{display:flex}.source-material-grid{gap:9px}.hair-profile-grid{grid-template-columns:repeat(4,minmax(0,1fr))}.category-panel .automatic-tools{padding-left:0;padding-right:0}.retouch-presets .preset{font-size:12px}.retouch-presets .preset small{font-size:9px}}

/* Saved choices remain independent while one category is visible. */
.material-category-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;margin:2px 0 10px}
.material-category-choice{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;min-height:49px;padding:7px 4px;border:1px solid #46563c;border-radius:7px;background:#20291e;color:#c7d7ba;font:10px var(--font);cursor:pointer}
.material-category-choice:hover:not(:disabled),.material-category-choice:focus-visible{border-color:#a8ca84;background:#33442b;outline:2px solid transparent;outline-offset:2px}
.material-category-choice.active{border-color:#c0df96;background:#405534;color:#f2f9e9;box-shadow:inset 0 0 0 1px #b4d98c}
.material-category-choice.has-selection:not(.active){border-color:#8ca66c;color:#e6f2d8}
.material-category-badge{font:8px var(--font);color:#98ae88;line-height:1.4}
.material-category-choice.active .material-category-badge{color:#d4e8bb}
.material-active-summary{margin:8px 0 15px;color:#a8be98;font:9px/1.7 var(--font);overflow-wrap:anywhere}
.source-material-tools>label[hidden]{display:none!important}
@media(max-width:620px){.material-category-choice{font-size:12px;min-height:57px}.material-category-badge{font-size:10px}.material-active-summary{font-size:11px}}

.individual-material-tools{display:grid;gap:9px;margin:8px 0 22px}
.individual-material-card{border:1px solid #46563c;border-radius:8px;padding:0 11px;background:#20271d}
.individual-material-card>summary{display:flex;align-items:flex-start;justify-content:space-between;gap:8px;cursor:pointer;padding:12px 0;color:#d5e5c6;font:11px/1.5 var(--font)}
.individual-material-card>summary strong{font-weight:600;white-space:nowrap}
.individual-material-selected{font-size:9px;color:#a1ba8d;text-align:right;overflow-wrap:anywhere}
.individual-material-card label{display:block;margin:10px 0 14px;color:#b0c19f;font:10px/1.6 var(--font)}
.individual-material-card select{display:block;width:100%;max-width:100%;margin-top:5px;padding:8px;color:#e1ecd5;background:#293323;border:1px solid #506344;border-radius:5px;font:10px var(--font)}
.individual-material-card input[type=range]{display:block;width:100%;margin-top:7px}
.individual-material-card output{float:right;color:#d3e6bb;font:10px ui-monospace,monospace}
.individual-material-card .quiet{width:100%;margin:0 0 11px;padding:7px;border:1px solid #46563c;color:#b4cba1;font-size:9px}
@media(max-width:620px){.individual-material-card>summary{font-size:13px}.individual-material-selected,.individual-material-card label,.individual-material-card select,.individual-material-card .quiet{font-size:11px}}
.individual-material-card>summary::before{content:'▸';color:#99b57e;flex:0 0 10px}
.individual-material-card[open]>summary::before{transform:rotate(90deg)}

/* Keep each saved model independent; photographs show the model before applying it. */
.material-preview-note{font-size:10px;line-height:1.7;color:#a6b39b;background:#242d20;border:1px solid #3b4932;border-radius:6px;padding:10px 11px;margin:0 0 12px}
.individual-material-gallery{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;margin:8px 0 7px}
.individual-material-choice{min-width:0;padding:4px 4px 6px;font-size:9px;line-height:1.45}
.individual-material-choice img{height:75px;object-fit:cover;margin-bottom:5px;background:#182015}
.material-choice[data-preview-kind=rendered] img{object-fit:contain;aspect-ratio:auto;background:#182015}
.material-choice.preview-unavailable{min-height:65px}
.individual-gallery-pager{display:flex;justify-content:space-between;align-items:center;gap:7px;margin-bottom:12px}
.individual-material-card .individual-gallery-pager .quiet{width:auto;margin:0;padding:6px;font-size:9px;min-width:57px}
.individual-gallery-status{font-size:9px;color:#b1c39f;white-space:nowrap;font-variant-numeric:tabular-nums}
.individual-material-card>summary{align-items:center;scroll-margin-top:10px}
.individual-material-card:focus-within{border-color:#9dba7d}
.individual-material-card .individual-material-model:focus-visible{outline-offset:2px}
.healing-card{border:1px solid #637c4b;border-radius:8px;background:#283422;padding:13px 12px;margin:0 0 13px}
.healing-heading{display:flex;align-items:center;gap:8px;color:#c4dfa7}
.healing-heading svg{width:17px;height:17px}
.healing-heading h4{margin:0;font-size:12px;font-weight:600;color:#e4efd9}
.healing-card p{font-size:10px;line-height:1.75;color:#b1c3a2;margin:8px 0 12px}
.healing-start{width:100%;padding:10px 8px;border:1px solid #8aa36b;border-radius:6px;background:#3a4c2e;color:#edf5e4;font-size:11px;font-weight:500}
.healing-start:hover,.healing-start.active{background:#4b6239;border-color:#d4edae}
.healing-card>.quiet{width:100%;padding:9px 4px;font-size:10px;color:#d3e2c3}
.healing-card .healing-hint{font-size:9px;color:#94a986;margin:2px 0 0}
.mask-refinement{border:1px solid #3f4d35;border-radius:7px;padding:0 10px;margin:0 0 15px;background:#20271d}
.mask-refinement>summary{padding:11px 0;cursor:pointer;color:#c6d7b6;font-size:10px}
.mask-refinement p{font-size:10px;line-height:1.75;color:#93a586;margin:0 0 12px}
.mask-refinement-actions{display:grid;grid-template-columns:1fr 1fr;gap:6px;margin-bottom:11px}
.mask-refinement-actions .quiet{border:1px solid #495d3b;border-radius:5px;font-size:10px;padding:8px 4px;color:#c5d8b2}
.brush-bar label output,.detail-brush-bar label output{font:9px ui-monospace,monospace;color:#c3d8ac;float:right;margin-left:6px}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;transition:none!important;animation-duration:.01ms!important;animation-iteration-count:1!important}}
@media(max-width:620px){.material-preview-note,.healing-card p,.healing-card>.quiet,.mask-refinement>summary,.mask-refinement p,.mask-refinement-actions .quiet{font-size:11px}.individual-material-choice{font-size:11px}.individual-material-choice img{height:105px}.individual-material-card .individual-gallery-pager .quiet,.individual-gallery-status{font-size:10px}.healing-heading h4{font-size:14px}.healing-start{font-size:12px;padding:12px 8px}}
.material-preview-kind{display:block;margin-top:5px;color:#9aaf88;font:8px/1.4 var(--font)}
.material-choice[data-preview-kind=source] .material-preview-kind{color:#b9ad88}
.hair-color-name{display:block;margin-top:4px;font:9px/1.5 var(--font);color:#d0dfc3;letter-spacing:0}
.individual-material-help{font-size:9px;line-height:1.7;color:#9cad8e;margin:0 0 11px}
@media(max-width:620px){.material-preview-kind{font-size:9px}.hair-color-name,.individual-material-help{font-size:10px}}

/* Five workflow areas; detailed controls stay behind native disclosures. */
.tool-tabs{grid-template-columns:repeat(2,minmax(0,1fr));gap:5px;padding:8px 12px}
.tool-tab{font-size:11px;line-height:1.4;padding:9px 6px}
.tool-tab:last-child:nth-child(odd){grid-column:1/-1}
.workflow-details{border:1px solid #3d4c35;border-radius:8px;padding:0 11px;margin:0 0 12px;background:#1e251c}
.workflow-details>summary{padding:13px 0;cursor:pointer;color:#c6d7b7;font-size:11px;line-height:1.5}
.workflow-details[open]>summary{border-bottom:1px solid #35412f;margin-bottom:12px}
.workflow-details>.control-group{padding-top:8px}
.workflow-details .advanced-tools{padding-top:10px}
.workflow-details .tool-section{padding-top:0}
.source-material-tools.workflow-details>summary{display:list-item;font-size:12px}
.source-material-tools.workflow-details>summary strong{font-weight:500}
.source-material-tools.workflow-details>summary span{float:right;font-size:10px;color:#b3cc99}
.unavailable-feature{display:flex;align-items:center;justify-content:space-between;gap:10px;border:1px dashed #3e4a37;border-radius:6px;padding:11px;margin-bottom:13px;color:#9cae90;font-size:10px}
.unavailable-feature button{font-size:9px;padding:5px}
#healingAutomaticButton{margin-bottom:9px}
.workflow-details>summary:focus-visible{outline:2px solid var(--accent);outline-offset:3px;border-radius:3px}
@media(max-width:620px){.tool-tabs{padding:8px 16px}.tool-tab{font-size:12px}.workflow-details>summary{font-size:12px}}

.healing-mask-overlay{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;z-index:3;object-fit:fill}.healing-selection-controls{display:grid;gap:10px;padding:12px 0}.healing-selection-controls label{font-size:11px;line-height:1.6}.healing-selection-controls input[type="range"]{width:100%;margin-top:7px}.healing-selection-controls output{float:right;color:var(--accent)}.healing-selection-controls p{font-size:11px;line-height:1.7;color:var(--muted);margin:0}.healing-enable{display:flex;align-items:center;gap:7px}.healing-selection-controls .quiet{border:1px solid var(--line)}

.retouch-healing-authority{margin:10px 0 14px;padding:10px 12px;border:1px solid #53604a;border-radius:6px;background:#263022}.retouch-healing-authority p{margin:0;color:#d2dfc5;font-size:11px;line-height:1.65}.retouch-healing-authority .quiet{margin-top:5px;padding-left:0;color:var(--accent)}

.healing-draft-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px;border-top:1px solid var(--line);padding-top:12px}.healing-draft-actions .automatic-button{grid-column:1/-1}.healing-draft-actions[hidden]{display:none}

.material-pigment{display:flex;align-items:center;gap:6px;margin-top:6px;text-align:left;overflow-wrap:anywhere}
.material-pigment-chip{display:block;flex:0 0 22px;width:22px;height:22px;border:1px solid #d8d8d866;border-radius:5px;box-shadow:inset 0 0 0 1px #0002}
.material-pigment small{font:9px/1.35 var(--font);color:inherit}

.retouch-subtabs{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:4px;margin:0 0 14px;padding:3px;border:1px solid #30382f;border-radius:7px;background:#191d19}
.retouch-subtab{font-size:11px;min-width:0;padding:8px 4px;color:#8d988a;border-radius:5px}
.retouch-subtab:hover{background:#272e25;color:#d5e2cc}.retouch-subtab.active{background:#303f27;color:#e1f2d1;box-shadow:inset 0 -2px #b7d691}
.retouch-subtab:focus-visible{outline-offset:-2px}
.photo-entry{position:relative}.photo-entry>.photo-card{padding-right:24px}.photo-remove{position:absolute;top:5px;right:4px;width:20px;height:20px;display:grid;place-items:center;border-radius:4px;color:#8a929b;font-size:15px;line-height:1;opacity:0}.photo-entry:hover>.photo-remove,.photo-remove:focus-visible{opacity:1}.photo-remove:hover{color:#f0d4cc;background:#3a2b29}.library-manage{display:flex;flex-direction:column;gap:4px;padding:6px 0}.library-manage>.quiet{width:100%;padding:7px 0;font-size:10px}
.subject-control{margin:4px 0 14px}.subject-control select{display:block;width:100%;margin-top:8px;font:11px var(--font);color:#e0e6dc;background:#202428;border:1px solid #41474d;border-radius:6px;padding:8px}

/* V66 — ambient workspace. The photograph is never filtered; only these two
   independent low-resolution background layers receive the ambient treatment. */
:root{--bg:#242427;--panel:#eeeadf;--text:#f5f2eb;--muted:#c7c4bd;--accent:#f0eadd;--accent-dark:#292825;--line:#ffffff21;--font:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;--header-height:64px;--dock-height:72px;--dock-bottom:24px;--ivory:#f1ece2;--ink:#302e29;--ink-muted:#746f65;--glass:#202024d9;color-scheme:dark}
html,body{width:100%;height:100%;height:100dvh;overflow:hidden;overscroll-behavior:none}
body{isolation:isolate;background:#28282b;font-size:14px;-webkit-font-smoothing:antialiased}
.ambient-backdrop{position:fixed;inset:0;z-index:-2;overflow:hidden;pointer-events:none;background:#303033}
.ambient-backdrop>img{position:absolute;inset:-14%;width:128%;height:128%;object-fit:cover;filter:blur(84px);transform:scale(1.08);opacity:0;transition:opacity .22s ease;will-change:opacity}
.ambient-backdrop>img.visible{opacity:1}
.ambient-shade{position:absolute;inset:0;background:linear-gradient(180deg,#10101466 0%,#1313184d 38%,#10101480 100%)}
button,input,select,summary{touch-action:manipulation}
button,summary,select,input:not([type=range]):not([type=checkbox]):not([type=file]){min-height:44px}
button:focus-visible,a:focus-visible,summary:focus-visible,input:focus-visible,select:focus-visible{outline:2px solid currentColor;outline-offset:3px}
button:not(:disabled):active{transform:none}
button:disabled{opacity:.36}
svg{width:20px;height:20px;stroke-width:1.5}
.sr-only{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}
.topbar{position:relative;z-index:30;height:var(--header-height);padding:0 30px;gap:18px;background:#17171c3d;border-bottom:1px solid #ffffff17;backdrop-filter:blur(24px);-webkit-backdrop-filter:blur(24px)}
.header-brand{display:flex;align-items:center;gap:22px;min-width:0}
.brand{font-size:31px;font-weight:750;letter-spacing:-1.7px;gap:18px;line-height:1;color:#f3efe5}
.brand-sub{display:inline-block;font-size:9px;font-weight:500;letter-spacing:3.6px;color:#e7e1d3a6;margin:4px 0 0}
.top-actions{gap:7px;flex-shrink:0}
.top-actions .quiet,.header-icon,.header-compare{min-width:44px;height:44px;border:0;border-radius:8px;color:#f1ece2;display:flex;align-items:center;justify-content:center;gap:8px;padding:0 11px;font-size:13px}
.header-icon:hover,.header-compare:hover,.top-actions .quiet:hover{background:#ffffff10}
.header-compare[aria-pressed=true]{background:#f1ece226}
.header-icon{color:#e9e3d6ba;padding:0}
.top-actions .primary{height:40px;min-height:44px;padding:0 17px;gap:8px;border-radius:8px;background:var(--ivory);border:1px solid #fff5;color:var(--ink);font-size:13px;font-weight:550;margin-left:6px}
.top-actions .primary:hover{background:#fffaf0}
.project-title{position:absolute;left:50%;transform:translateX(-50%);display:flex;flex-direction:column;align-items:center;gap:3px;max-width:30%;pointer-events:none}
.project-title .file-label{display:flex;justify-content:center;gap:0;flex-wrap:nowrap;min-width:0;width:100%}
.project-title #fileName{font-size:12px;color:#f1ece2bd;max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-weight:450}
.project-title #fileDimensions{display:none}
.project-title #saveStatus{font-size:10px;color:#f1ece26b;max-width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.workspace{position:relative;display:block;height:calc(100dvh - var(--header-height));min-height:0;width:100%;overflow:hidden}
.editor{position:absolute;inset:0;display:flex;flex-direction:column;min-height:0;height:auto;padding:0 158px;background:transparent}
.editor-bar{position:absolute;top:14px;right:22px;z-index:12;height:auto;display:block;padding:0;border:0;background:transparent}
.viewport{display:block;flex:1;position:relative;min-height:0;margin:0 0 106px;overflow:auto;background:transparent;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#ffffff29 transparent;touch-action:none}
.image-stage{padding:26px;min-height:100%;min-width:100%;overflow:visible}
.photo-frame{border-radius:2px;background:#222;box-shadow:0 18px 65px #0005,0 0 0 1px #ffffff0d;filter:none;opacity:1}
.base-image,.result-clip>img{filter:none;opacity:1;image-rendering:auto}
.original-preview{position:absolute;left:36px;top:34%;width:124px;display:flex;flex-direction:column;align-items:center;gap:14px;padding:0;color:#f1ece2cc;font-size:12px;letter-spacing:.3px;z-index:6}
.original-preview-frame{width:120px;height:142px;border:1px solid #f4edd657;border-radius:7px;overflow:hidden;box-shadow:0 10px 24px #0002;display:block;background:#ffffff08}
.original-preview img{display:block;width:100%;height:100%;object-fit:cover}
.original-preview:hover .original-preview-frame,.original-preview[aria-pressed=true] .original-preview-frame{border-color:#f4edd6c9;box-shadow:0 0 0 2px #fff2}
.intensity-rail{position:absolute;right:34px;top:26%;width:92px;z-index:6;color:#eee7dc}
.intensity-control{display:flex;flex-direction:column;align-items:center;gap:17px}
.intensity-control label{font-size:12px;letter-spacing:.1px;color:inherit;text-align:center;max-width:100%;line-height:1.4}
.intensity-control output{font-size:13px;font-variant-numeric:tabular-nums;min-width:38px;text-align:center;color:#eee7dcd9;padding:6px 8px;border:1px solid #ffffff1c;border-radius:6px;background:#ffffff08}
.intensity-rail input[type=range]{writing-mode:vertical-lr;direction:rtl;width:44px;height:250px;margin:0;padding:0;background:transparent}
.intensity-rail input[type=range]::-webkit-slider-runnable-track{width:4px;height:100%;background:#eee7dc18;border:1px solid #eee7dc45;border-radius:4px}
.intensity-rail input[type=range]::-webkit-slider-thumb{width:16px;height:16px;margin:0 0 0 -7px;border:1px solid #ffffffbd;background:#f3ecdf;box-shadow:0 2px 6px #0003}
.intensity-rail input[type=range]::-moz-range-track{width:3px;height:100%;background:#eee7dc30;border:1px solid #eee7dc45;border-radius:4px}
.intensity-rail input[type=range]::-moz-range-thumb{width:14px;height:14px;background:#f3ecdf;border:1px solid #ffffffbd}
.tool-dock{position:absolute;left:50%;bottom:calc(var(--dock-bottom) + env(safe-area-inset-bottom,0px));transform:translateX(-50%);height:var(--dock-height);width:max-content;max-width:calc(100% - 32px);display:flex;align-items:center;gap:9px;padding:10px 13px;border:1px solid #ffffff24;border-radius:17px;background:#28272bb8;box-shadow:0 12px 36px #0003;backdrop-filter:blur(26px);-webkit-backdrop-filter:blur(26px);z-index:22}
.tool-dock .automatic-button{display:flex;align-items:center;justify-content:center;gap:9px;flex-shrink:0;min-width:158px;width:auto;height:48px;padding:0 17px;border:1px solid #fff5;border-radius:9px;background:var(--ivory);color:#302d29;box-shadow:0 2px 8px #0001;font-size:14px;font-weight:550;white-space:nowrap;margin:0}
.tool-dock .automatic-button:hover:not(:disabled){background:#fffaf0;border-color:#fff8}
.tool-dock .automatic-button.active{background:#f6f0e5;color:#302d29;border-color:#fff9}
.tool-dock .automatic-button svg{width:17px;height:17px}
.tool-tabs{position:static;display:flex;align-items:stretch;gap:2px;height:50px;margin:0;padding:0;background:transparent;border:0;flex:1;min-width:0}
.tool-tab,.tool-tab:last-child:nth-child(odd){position:relative;flex:1;grid-column:auto;min-width:91px;min-height:44px;font-size:14px;font-weight:450;line-height:1.2;color:#eee8dcb8;background:transparent;border:0;border-radius:8px;padding:0 18px;white-space:nowrap}
.tool-tab:hover{background:#ffffff08;color:#fff7ea}
.tool-tab.active{background:transparent;color:#f5eee2;box-shadow:none;border:0}
.tool-tab.active::after{content:"";position:absolute;left:50%;bottom:3px;transform:translateX(-50%);width:20px;height:2px;border-radius:2px;background:#f0e8d5}
.controls{position:absolute;z-index:23;left:var(--context-x,50%);bottom:calc(var(--dock-bottom) + var(--dock-height) + 14px + env(safe-area-inset-bottom,0px));transform:translateX(-50%);display:flex;flex-direction:column;width:384px;max-width:calc(100vw - 32px);max-height:min(620px,calc(100dvh - var(--header-height) - 142px));min-height:0;border:1px solid #ffffff65;border-radius:14px;background:var(--ivory);color:var(--ink);box-shadow:0 15px 50px #0003;overflow:visible;color-scheme:light;animation:ambient-panel-in .17s ease-out}
.controls::after{content:"";position:absolute;bottom:-7px;left:var(--context-pointer,50%);width:13px;height:13px;transform:translateX(-50%) rotate(45deg);background:var(--ivory);border-right:1px solid #ffffff65;border-bottom:1px solid #ffffff65;z-index:-1}
@keyframes ambient-panel-in{from{opacity:0;translate:0 5px}to{opacity:1;translate:0 0}}
.control-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:9px 12px 3px 20px;flex-shrink:0;border:0}
.control-heading h2{font-size:14px;font-weight:600;letter-spacing:0;line-height:1.2;margin:0;color:var(--ink)}
.context-actions{display:flex;gap:0;align-items:center}
.context-actions>.icon-button,.person-options>summary{width:44px;height:44px;min-width:44px;border:0;border-radius:8px;background:transparent;color:#6e685e;display:grid;place-items:center;padding:0;cursor:pointer}
.context-actions>.icon-button:hover,.person-options>summary:hover{background:#2923170b;color:#302b24}
.context-actions svg{width:17px;height:17px}
.person-options{position:relative;margin:0;border:0}
.person-options>summary{list-style:none}
.person-options>summary::-webkit-details-marker{display:none}
.person-options .scope-strip{position:absolute;right:-80px;top:47px;width:280px;background:#faf7ef;color:var(--ink);z-index:30;border:1px solid #d4ccbe;border-radius:10px;box-shadow:0 8px 25px #0003;padding:14px;display:flex;flex-direction:column;gap:10px}
.scope-strip label{display:flex;gap:8px;align-items:center;flex-wrap:wrap;font-size:12px;color:#696356}
.scope-strip select{min-width:0;flex:1;width:100%;margin:0;font-size:13px;background:#fffdf6;color:var(--ink);border:1px solid #d5cec0;padding:8px;border-radius:6px}
.scope-strip .selection-meta:empty{display:none}
.controls .control-scroll{overflow:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#bcb3a1 transparent;flex:1;min-height:0;padding:0 20px 13px;display:block;border-radius:0 0 14px 14px}
.category-panel{min-width:0}
.category-intro{display:none}
.retouch-subtabs{display:flex;background:#26201808;padding:3px;border:0;border-radius:7px;margin:5px 0 12px;gap:3px}
.retouch-subtab{flex:1;min-height:44px;font-size:12px;padding:0 12px;color:#756d5e;border-radius:5px;background:transparent;border:0}
.retouch-subtab.active{background:#fffdf7;color:#383126;box-shadow:0 1px 4px #30271b0d}
.quick-adjustments{padding:0 0 3px}
.quick-adjustments .control{display:grid;grid-template-columns:60px minmax(0,1fr) 30px;align-items:center;column-gap:12px;position:relative;min-height:46px;margin:0}
.quick-adjustments .control label{display:contents;font-size:13px;color:#4f493e}
.quick-adjustments .control-value{grid-column:3;grid-row:1;justify-self:end;background:transparent;padding:0;color:#5e574c;font:12px var(--font)}
.quick-adjustments .control input{grid-column:2;grid-row:1;margin:0}
.controls .control{margin-bottom:12px}
.controls .quick-adjustments .control{margin-bottom:0}
.controls .control label,.controls label{font-size:13px;color:#5f584b}
.controls .control-value,.controls output{font-size:12px;font-family:var(--font);font-variant-numeric:tabular-nums;color:#6d6353;background:#62533a0b}
.controls p,.controls .section-help,.controls .individual-material-help{font-size:12px!important;line-height:1.6;color:#83796a}
.controls .control p{margin-top:0}
.controls .control-group{padding:13px 0 4px;border-color:#d9d0c0}
.controls .group-title{font-size:12px;margin-bottom:13px;color:#4d463a}
input[type=range]{width:100%;height:44px;margin:0;padding:0;background:transparent;border:0;border-radius:0;cursor:pointer;appearance:none;-webkit-appearance:none;touch-action:pan-x}
input[type=range]::-webkit-slider-runnable-track{height:3px;border-radius:4px;background:linear-gradient(to right,#8c7e65 0%,#8c7e65 var(--fill,0%),#cfc5b2 var(--fill,0%),#cfc5b2 100%)}
input[type=range]::-webkit-slider-thumb{appearance:none;-webkit-appearance:none;width:13px;height:13px;border-radius:50%;background:#756a57;border:1px solid #6c604d;box-shadow:0 1px 2px #0001;margin-top:-5px}
input[type=range]::-moz-range-track{height:3px;border-radius:4px;background:#cfc5b2}
input[type=range]::-moz-range-progress{height:3px;border-radius:4px;background:#8c7e65}
input[type=range]::-moz-range-thumb{width:12px;height:12px;background:#756a57;border:1px solid #6c604d;box-shadow:none}
.controls .quiet,.controls .automatic-button,.controls .healing-start,.controls .preset{font-size:12px;border:1px solid #d1c7b5;color:#564d3e;background:#faf6ed;min-height:44px;border-radius:7px;padding:9px 12px;white-space:normal;line-height:1.45}
.controls .quiet:hover,.controls .automatic-button:hover,.controls .healing-start:hover{background:#e5dccb;border-color:#bfb095;color:#30291f}
.controls .automatic-button,.controls .healing-start{width:100%;font-size:13px;font-weight:550;background:#39342d;color:#f7f1e6;border-color:#39342d}
.controls .automatic-button:hover,.controls .healing-start:hover{background:#514a3f;color:#fff8e9}
.controls .workflow-details,.controls .tool-section,.controls .automatic-info,.controls .mask-refinement,.controls .retouch-presets{border:0;border-top:1px solid #d7cdbd;margin:6px 0 0;padding:0;background:transparent;border-radius:0}
.controls details>summary{cursor:pointer;min-height:44px;display:flex;align-items:center;gap:8px;color:#6e6455;font-size:12px;font-weight:500;padding:10px 0;list-style:none}
.controls details>summary::-webkit-details-marker{display:none}
.controls details:not(.person-options)>summary::after{content:"+";margin-left:auto;font-size:17px;color:#998d79;font-weight:400}
.controls details:not(.person-options)[open]>summary::after{content:"−"}
.controls details[open]>summary{color:#3b3327}
.controls .automatic-info{border-top:0;margin-top:2px}
.controls .automatic-info>summary{min-height:44px;font-size:11px;color:#968a78}
.controls .automatic-info p{margin:0 0 10px}
.controls .healing-card,.controls .healing-selection-controls,.controls .retouch-healing-authority{background:#e6dece55;color:#564d3f;border:1px solid #d9ceba;border-radius:8px;padding:12px;margin:8px 0}
.controls .healing-heading h4{color:#544a39;font-size:13px}
.controls .healing-enable{min-height:44px;align-items:center}
.controls input[type=checkbox]{width:18px;height:18px;accent-color:#6f644e}
.controls .material-heading{font-size:12px;color:#625643;gap:10px;align-items:center}
.controls .material-heading strong{font-weight:550;color:#4b4234}
.controls .material-heading>span,.controls .material-active-summary,.controls .material-preview-note{font-size:11px;color:#928470}
.controls .material-category-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;margin:8px 0 10px}
.controls .material-category-choice{min-height:50px;border:1px solid #d4c9b5;border-radius:7px;background:#fbf7ee;color:#73664f;font-size:12px;padding:7px 5px;white-space:normal}
.controls .material-category-choice.active,.controls .material-category-choice[aria-pressed=true]{background:#daceb7;border-color:#b4a284;color:#453b2a}
.controls .material-category-badge{font-size:10px;color:#91816a}
.controls .individual-material-card,.controls .source-material-tools{border:0;border-top:1px solid #d7cdbd;border-radius:0;background:transparent;margin:8px 0 0;padding:0}
.controls .individual-material-card>summary{font-size:13px;color:#514635}
.controls .individual-material-selected{font-size:11px;color:#92826c}
.controls select,.controls input[type=search],.controls input[type=number],.controls input[type=text],.controls input:not([type]){color:#4c4233;background:#fffaf0;border:1px solid #d5cbb9;border-radius:6px;font:13px var(--font);padding:9px;max-width:100%;min-width:0}
.controls .individual-material-card select{font-size:13px}
.controls .material-choice,.controls .individual-material-choice,.controls .hair-profile-choice{border:1px solid #d1c6b3;border-radius:7px;background:#e6dece;color:#62533d;font-size:12px;overflow:hidden}
.controls .material-choice.active,.controls .individual-material-choice.active,.controls .hair-profile-choice.active,.controls .hair-profile-choice[aria-pressed=true]{border-color:#6d604a;box-shadow:0 0 0 1px #6d604a;background:#d5c7ad;color:#3f3423}
.controls .material-choice img,.controls .individual-material-choice img{height:90px;object-fit:cover}
.controls .source-material-grid,.controls .individual-material-grid{gap:7px}
.controls .hair-profile-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;margin:10px 0}
.controls .hair-color-name{color:#756650;font-size:10px}
.controls .material-preview-kind{font-size:9px;color:#7e6d51;background:#efe5d1}
.controls .individual-gallery-status{color:#84745c;font-size:11px}
.controls .individual-gallery-pager{gap:6px}
.controls .advanced-tools{border:0;margin:8px 0 0;padding:0}
.controls .tools-heading h3{font-size:13px;color:#504632}
.controls .tools-heading span{color:#97866a;font-size:11px}
.controls .advanced-group{background:transparent;border-color:#d6c9b4}
.controls .preset-grid{padding:0 0 12px;gap:7px;border:0}
.controls .preset small{white-space:normal;font-size:11px;color:#8b7c65}
.controls .preset.active{border-color:#a08c68;background:#ded1b8}
.controls .unavailable-feature{padding:8px 0;color:#9f937f;gap:8px}
.controls .unavailable-feature button{font-size:11px;color:#8a7d66}
#contextIntensityMount:empty{display:none}
#contextIntensityMount{padding:0 20px;flex-shrink:0}
#contextIntensityMount .intensity-control{display:grid;grid-template-columns:82px minmax(0,1fr) 32px;gap:10px;align-items:center;border-bottom:1px solid #d7cdbd;padding:0 0 5px;color:#6e6352}
#contextIntensityMount .intensity-control label{text-align:left;font-size:12px}
#contextIntensityMount .intensity-control output{background:transparent;color:#6d6353;border:0;font-size:12px;padding:0}
#contextIntensityMount input{writing-mode:horizontal-tb;direction:ltr;width:100%;height:44px;touch-action:pan-x}
.canvas-menu{position:relative;color:#eee8dc;background:#252429a8;border:1px solid #ffffff1f;border-radius:8px;backdrop-filter:blur(20px);-webkit-backdrop-filter:blur(20px)}
.canvas-menu>summary{display:flex;align-items:center;justify-content:center;gap:8px;min-height:44px;padding:0 12px;list-style:none;font-size:11px;cursor:pointer;color:#eee8dcb8}
.canvas-menu>summary::-webkit-details-marker{display:none}
.canvas-menu>summary:hover,.canvas-menu[open]>summary{color:#fff4e0;background:#ffffff0a;border-radius:7px}
.canvas-menu>summary svg{width:16px;height:16px}
.canvas-menu .view-controls,.canvas-menu-content{position:absolute;right:0;top:52px;display:flex;flex-direction:column;align-items:stretch;width:250px;padding:7px;background:#29282df5;border:1px solid #ffffff26;border-radius:10px;box-shadow:0 8px 25px #0004;gap:4px}
.view-button{min-height:44px;font-size:12px;color:#d8d1c5;padding:8px 11px;border-radius:6px;justify-content:flex-start}
.view-button.active{background:#ffffff14;color:#fff5e2;box-shadow:none}
.view-button:hover{background:#ffffff09;color:#fff8ea}
.canvas-bottom{position:absolute;left:20px;right:20px;bottom:24px;height:auto;min-height:44px;padding:0;display:flex;align-items:center;justify-content:space-between;pointer-events:none;background:transparent;border:0;gap:12px;color:#eee5d680;z-index:12}
.canvas-bottom #imageStatus{max-width:160px;font-size:10px;line-height:1.5;width:auto;display:flex;pointer-events:auto}
.canvas-bottom .canvas-menu{pointer-events:auto;position:relative;margin-left:auto}
.canvas-bottom .canvas-menu-content{top:auto;bottom:52px;width:300px;gap:8px}
.zoom-controls{display:flex;flex-wrap:wrap;gap:5px;width:100%;margin:0;justify-content:flex-start}
.zoom-controls .quiet{min-height:44px;min-width:44px;font-size:12px;color:#e4dccf;padding:6px 9px;background:#ffffff08;border-radius:5px}
.zoom-controls select{min-height:44px;max-width:none;min-width:68px;padding:7px;font-size:12px;color:#eae2d5;background:#ffffff0c;border:1px solid #ffffff1d}
.zoom-controls .divider{display:none}
.zoom-controls .active{color:#fff4df;background:#ffffff16}
.zoom-controls .wipe-control{width:100%;min-height:44px;font-size:12px;color:#e5dbc8}
.zoom-controls .wipe-control input#wipeRange{height:44px;width:auto;flex:1;background:none}
.quality-strip{display:flex;flex-wrap:wrap;min-height:44px;height:auto;padding:8px 2px;gap:10px;border-top:1px solid #ffffff19;background:transparent;font-size:11px;color:#c5bba8}
.quality-strip strong{color:#e9dec8;font-size:11px}
.quality-strip>button{min-height:44px;display:block;font-size:12px;color:#e9dec8}
.quality-strip>div:last-of-type{display:flex}
.library{position:absolute;left:14px;top:14px;bottom:116px;width:282px;max-width:calc(100vw - 28px);padding:12px 14px 0;background:#232227f2;border:1px solid #ffffff28;border-radius:13px;display:flex;z-index:28;box-shadow:0 12px 45px #0004;backdrop-filter:blur(25px);-webkit-backdrop-filter:blur(25px)}
.library .section-title{font-size:13px;color:#e7ddcb;letter-spacing:0;margin:0 0 8px;min-height:44px}
.library .section-title>span{font-size:13px;font-family:var(--font);color:#e7ddcb}
.library #photoCount{font-size:11px;color:#9d927e;margin-left:8px}
.library .icon-button{width:44px;min-width:44px;height:44px;border:0;color:#c6baa4}
.library .import-button{min-height:44px;font-size:12px;color:#e7dbc6;border:1px solid #ffffff29;background:#ffffff05}
.library .import-button>span{display:block;color:#a69b86;font-size:10px}
.library .photo-list{margin-top:12px}
.library .photo-card{min-height:72px;padding:7px;gap:10px;background:transparent;border-color:transparent}
.library .photo-card.selected{background:#e7d6b314;border-color:#e4ceb14d}
.library .photo-card img{width:44px;height:56px;object-fit:cover}
.library .photo-card strong{font-size:12px;max-width:150px;color:#e5d9c5}
.library .photo-card small{font-size:10px;color:#a19785}
.library .photo-remove{min-width:44px;min-height:44px;width:44px;height:44px;opacity:1;color:#c6b99f;background:#252329b8}
.library .library-bottom{border-color:#ffffff18;padding:12px 0}
.library .library-bottom .quiet,.library .library-manage .quiet{font-size:12px;color:#d9ccb5;min-height:44px;border-color:#ffffff1b}
.library-bottom p{font-size:10px;color:#a2957d}
.empty-state{margin:auto;min-height:100%;max-width:440px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;padding:36px 20px 20px;color:#e9e2d6}
.empty-state .empty-photo{width:42px;height:42px;stroke-width:1;color:#ddd3c073;margin-bottom:8px}
.empty-state h1{font:500 26px var(--font);letter-spacing:-.6px;line-height:1.2;color:#f0e7d6;margin:0}
.empty-state p{font-size:13px;color:#e0d5c09e;line-height:1.6;margin:0 0 13px}
.empty-state>.primary{background:var(--ivory);color:#312a1d;border-color:#fffb;min-height:46px;font-size:13px;border-radius:8px}
.empty-state>.demo-button{min-height:44px;color:#e8dcc599;font-size:12px;padding:7px 10px}
.empty-state>.demo-button span{color:inherit}
.editor>.brush-bar{position:absolute;left:18px;right:18px;top:67px;width:auto;z-index:15;min-height:58px;height:auto;padding:7px 10px;background:#26242bf2;border:1px solid #ffffff26;border-radius:10px;gap:8px;box-shadow:0 8px 30px #0004}
.brush-bar .quiet{min-height:44px;font-size:12px;color:#e4dac8}
.brush-bar label{font-size:11px;gap:6px;color:#cfc2aa;margin:0}
.brush-bar input[type=range]{width:80px;height:44px}
.brush-bar select,.detail-brush-bar select{min-height:44px;font-size:12px}
.brush-help{display:none}
.editor>.mask-selector{position:absolute;left:20px;top:16px;z-index:14;padding:7px 12px;border:1px solid #ffffff26;border-radius:8px;background:#24222bd9}
.editor>.mask-selector label{font-size:12px;gap:10px;color:#e8dcc7}
.editor>.mask-selector select{min-height:44px;padding:8px;font-size:12px;width:180px;background:#37333c;color:#f2e7d2;border-color:#ffffff2c}
.sample-notice,.preview-notice{position:absolute;left:50%;transform:translateX(-50%);top:16px;z-index:16;width:max-content;max-width:calc(100% - 64px);font-size:12px;line-height:1.5;padding:10px 14px;border-radius:8px;border:1px solid #e6bc6e59;background:#3e322bef;color:#f4dfb9;box-shadow:0 6px 20px #0003}
.preview-notice{top:auto;bottom:110px;max-width:min(560px,calc(100% - 32px));text-align:center}
.processing{bottom:18px;background:#28252bd9;border:1px solid #ffffff2c;color:#eee3ce;font-size:12px;padding:11px 15px;backdrop-filter:blur(15px);-webkit-backdrop-filter:blur(15px)}
.spinner{border-color:#eee3ce33;border-top-color:#eee3ce}
.hold-badge{background:#26222bcf;color:#f5e9d1;border:1px solid #fff2;font-size:10px}
.drop-overlay{background:#28252bf2;border-color:#e6d3ae;color:#f4e8ce}
.batch-progress{position:absolute;z-index:18;left:50%;transform:translateX(-50%);bottom:110px;width:min(600px,calc(100% - 32px));border:1px solid #ffffff25;border-radius:10px;background:#29262fee;color:#e5d8bc;box-shadow:0 5px 22px #0004}
.batch-copy strong,.batch-copy span{color:inherit;font-size:12px}
.toast{bottom:calc(var(--dock-bottom) + var(--dock-height) + 20px + env(safe-area-inset-bottom,0px));background:#f1e8d6;color:#3e3424;border-color:#fff9;border-radius:10px;font-size:13px;line-height:1.5;max-width:min(620px,calc(100vw - 32px));z-index:100}
.toast.error{background:#f1d4ca;border-color:#e1b3a3;color:#713e31}
dialog{background:#f0eadf;color:#3c3427;border:1px solid #ffffff7a;max-width:calc(100vw - 24px);max-height:calc(100dvh - 24px);border-radius:14px;padding:24px;color-scheme:light}
dialog::backdrop{background:#17151b99;backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px)}
dialog .dialog-heading h2{font-family:var(--font);font-size:23px;font-weight:550;color:#3c3427;letter-spacing:-.5px}
dialog .eyebrow{color:#98876a;font-size:10px}
dialog .close-button{min-width:44px;min-height:44px;color:#80715b;border-radius:8px}
dialog .close-button:hover{background:#e0d5c2;color:#463925}
dialog label,dialog>form>p,dialog .detail-help,dialog .pair-size,dialog .detail-caption{font-size:12px;color:#837258}
dialog select,dialog input:not([type=range]){background:#fff8ea;border:1px solid #ccbea5;color:#54452f;font-size:13px;border-radius:6px}
dialog .primary{background:#3e3529;border-color:#3e3529;color:#fff4de;min-height:46px}
dialog .quiet{font-size:12px;color:#6e5c40;border:1px solid #cfc0a6;min-height:44px;min-width:44px}
dialog .quiet:hover{background:#ded0b6;color:#3e321f}
dialog .detail-caption,dialog .export-note{color:#8c7a5c;font-size:11px}
dialog .detail-viewport{background:#342f2a;border-color:#ac9b7f}
#insightContent,#insightContent dd{color:#6e5d42}
#insightContent dt,#insightContent p{color:#8b795b}
dialog .detail-navigation>span,dialog .pair-images figcaption,dialog #pairMessage{color:#8b795b;font-size:11px}
/* Glass fallback remains readable on bright source photos. */
@supports not (backdrop-filter:blur(1px)){.topbar{background:#222126ed}.tool-dock,.canvas-menu,.library{background:#29282cf2}}
@media(min-width:1600px){.original-preview{left:46px}.intensity-rail{right:48px}.tool-dock{gap:14px;padding-left:17px;padding-right:17px}.tool-tab{min-width:108px}.editor{padding-left:180px;padding-right:180px}}
@media(max-width:1199px){
 :root{--dock-bottom:20px;--dock-height:70px}
 .topbar{padding:0 22px}.brand-sub{display:none}.header-brand{gap:16px}.project-title{max-width:27%}
 .editor{padding:0 44px}.viewport{margin-bottom:100px}.original-preview,.intensity-rail{display:none}
 .tool-dock{gap:7px}.tool-tab{min-width:88px;padding:0 15px}.tool-dock .automatic-button{min-width:150px;font-size:13px}
 .controls{max-height:min(560px,calc(100dvh - 200px))}.canvas-bottom #imageStatus{display:none}
 .editor-bar{right:16px}.canvas-bottom{right:16px;left:16px;bottom:20px}
 .canvas-bottom .canvas-menu>summary span{display:none}.canvas-bottom .canvas-menu>summary{padding:0 12px}
}
@media(max-width:767px){
 :root{--header-height:56px;--dock-height:66px;--dock-bottom:10px}
 .topbar{padding:0 12px;gap:8px}.brand{font-size:27px;letter-spacing:-1.5px}.header-brand{gap:4px}.brand-sub{display:none}
 .project-title{display:none}.top-actions{gap:1px}.top-actions .quiet,.header-compare{padding:0;min-width:40px;width:40px;height:44px}
 .top-actions .primary{min-width:44px;width:44px;padding:0;margin-left:3px}.top-actions .primary span,.header-compare span{display:none}.top-actions svg{width:18px;height:18px}
 .header-icon{min-width:40px;width:40px}.workspace{height:calc(100dvh - var(--header-height));min-height:0;display:block}
 .editor{padding:0;min-height:0;height:auto}.viewport{margin-bottom:88px;transition:margin-bottom .18s ease}.image-stage{padding:17px}
 .context-open .viewport{margin-bottom:calc(88px + min(42dvh,360px));transition:none}
 .original-preview,.intensity-rail{display:none}.tool-dock{width:calc(100% - 20px);max-width:550px;gap:4px;padding:8px;bottom:calc(10px + env(safe-area-inset-bottom,0px));border-radius:14px;z-index:25}
 .tool-dock .automatic-button{min-width:0;width:104px;flex:0 0 104px;height:48px;padding:0 8px;font-size:11px;gap:5px;white-space:normal;line-height:1.3;border-radius:8px}
 .tool-dock .automatic-button svg{width:15px;height:15px}.tool-tabs{flex:1;height:48px;gap:0;padding:0;position:static;background:transparent;min-width:0}
 .tool-tab,.tool-tab:last-child:nth-child(odd){min-width:0;min-height:44px;flex:1;padding:0 5px;font-size:11px;white-space:nowrap}
 .tool-tab.active::after{bottom:2px;width:16px}
 .controls{left:10px!important;right:10px;bottom:calc(84px + env(safe-area-inset-bottom,0px));transform:none;width:auto;max-width:550px;margin:0 auto;max-height:min(42dvh,360px);min-height:0;border-radius:14px;overflow:hidden;z-index:24}
 .controls::after{display:none}.control-heading{padding:7px 9px 0 17px}.control-heading h2{font-size:13px}.context-actions>.icon-button,.person-options>summary{width:44px;height:44px}
 .controls .control-scroll{padding:0 16px 14px;overflow:auto;display:block}.controls .category-panel{width:100%}
 #contextIntensityMount{padding:0 16px}.controls .material-category-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
 .controls .material-choice img,.controls .individual-material-choice img{height:80px}.controls .hair-profile-grid{grid-template-columns:repeat(4,minmax(0,1fr))}
 .editor-bar{top:9px;right:10px}.editor-bar .canvas-menu>summary span{display:none}.editor-bar .canvas-menu>summary{padding:0 12px}
 .canvas-bottom{right:auto;left:10px;bottom:calc(88px + env(safe-area-inset-bottom,0px));z-index:12}
 .canvas-bottom .canvas-menu{margin:0}.canvas-bottom .canvas-menu-content{left:0;right:auto;max-width:calc(100vw - 20px)}
 .context-open .canvas-bottom{bottom:calc(94px + min(42dvh,360px) + env(safe-area-inset-bottom,0px))}
 .library{left:10px;top:10px;bottom:calc(88px + env(safe-area-inset-bottom,0px));width:calc(100% - 20px);max-width:340px;z-index:29}
 .empty-state h1{font-size:24px}.empty-state p{font-size:12px}.empty-state{padding:25px 16px 15px}.empty-state .empty-photo{width:36px;height:36px}
 .editor>.brush-bar{left:10px;right:10px;top:61px;min-height:58px;padding:6px 8px;overflow-x:auto}
 .editor>.mask-selector{left:10px;top:9px;max-width:calc(100% - 72px);padding:0 8px}.editor>.mask-selector label{font-size:11px;gap:8px}.editor>.mask-selector select{max-width:140px;font-size:11px}
 .preview-notice,.batch-progress{bottom:calc(90px + env(safe-area-inset-bottom,0px));font-size:11px;padding:8px 10px}
 .context-open .preview-notice,.context-open .batch-progress{bottom:calc(94px + min(42dvh,360px) + env(safe-area-inset-bottom,0px))}
 .sample-notice{top:8px;max-width:calc(100% - 20px);font-size:11px}.processing{font-size:11px;max-width:90%;bottom:14px}
 dialog{padding:18px;width:calc(100vw - 20px);max-width:calc(100vw - 20px);max-height:calc(100dvh - 20px)}
 dialog .dialog-heading h2{font-size:20px}.detail-dialog{height:calc(100dvh - 20px)}.detail-navigation>span{width:100%;margin:0}.pair-dialog{padding:16px}
 .toast{bottom:calc(90px + env(safe-area-inset-bottom,0px));font-size:12px}.person-options .scope-strip{position:fixed;right:12px;top:auto;width:min(280px,calc(100vw - 32px));z-index:32}
}
@media(max-width:389px){.brand{font-size:25px}.topbar{padding:0 9px}.header-brand{gap:2px}.top-actions .quiet,.header-compare{min-width:36px;width:36px}.header-icon{width:36px;min-width:36px}.tool-dock{gap:2px;padding:7px;width:calc(100% - 16px)}.tool-dock .automatic-button{flex-basis:96px;width:96px;font-size:10px;padding:0 6px;gap:4px}.tool-tab,.tool-tab:last-child:nth-child(odd){font-size:11px;padding:0 4px}.controls{left:8px!important;right:8px}}
@media(max-height:650px) and (min-width:768px){
 :root{--header-height:56px;--dock-bottom:12px;--dock-height:62px}
 .tool-dock{padding:6px 10px;border-radius:13px}.tool-dock .automatic-button{height:46px}.tool-tabs{height:46px}.viewport{margin-bottom:82px}
 .controls{max-height:calc(100dvh - 155px);bottom:88px}.original-preview{top:28%;width:98px;left:25px}.original-preview-frame{width:96px;height:110px}.intensity-rail{top:18%;right:20px}.intensity-rail input[type=range]{height:170px}
 .canvas-bottom{bottom:12px}.editor{padding:0 126px}.editor-bar{top:9px;right:15px}
}
@media(max-height:500px) and (orientation:landscape){
 :root{--header-height:52px;--dock-height:58px;--dock-bottom:6px}
 .topbar{height:52px}.top-actions .primary{height:44px}.workspace{height:calc(100dvh - 52px)}.editor{padding:0 62px}.viewport{margin-bottom:68px}
 .tool-dock{height:58px;bottom:calc(6px + env(safe-area-inset-bottom,0px));padding:5px 8px;max-width:600px;width:max-content;gap:5px}.tool-dock .automatic-button{height:46px;min-width:120px;font-size:12px}.tool-tabs{height:46px}.tool-tab,.tool-tab:last-child:nth-child(odd){min-width:65px;font-size:12px}
 .controls{left:auto!important;right:12px;bottom:74px;transform:none;width:320px;max-height:calc(100dvh - 140px);max-width:calc(100vw - 24px)}
 .controls::after{display:none}.context-open .viewport{margin-bottom:68px;margin-right:330px}.context-open .canvas-bottom{bottom:74px}.context-open .editor{padding-left:8px;padding-right:0}
 .original-preview,.intensity-rail{display:none}.editor-bar{top:7px}.canvas-bottom{bottom:74px;left:10px;right:auto}.library{bottom:74px;top:7px}.empty-state{padding:12px}.empty-state .empty-photo{display:none}.empty-state h1{font-size:20px}.empty-state p{margin:0}.empty-state{gap:3px}.empty-state .demo-button{padding:0}
}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}.ambient-backdrop>img{will-change:auto}}

/* Canvas gestures stay local; every visible action retains a 44px hit area. */
.photo-frame{touch-action:none}
.top-actions .quiet,.header-compare,.header-icon{min-width:44px;width:44px}
@media(min-width:768px){.header-compare{width:auto}}
.tool-tab,.tool-tab:last-child:nth-child(odd){min-width:44px}
.category-panel>p.section-help:not([id]){display:none}

.intensity-control{--fill:var(--intensity-fill,0%)}
.wipe-handle{width:44px}
#detailWipe{height:100%;margin:0}

/* Routine status stays out of the photographic workspace; failures remain visible. */
.canvas-bottom #imageStatus{display:none}
.project-title #saveStatus:not(.save-error){display:none}
#savedEditNotice>p{display:none}
@media(min-width:1200px){
 .tool-dock{width:min(760px,calc(100vw - 320px))}
 .tool-dock .automatic-button{width:180px;min-width:180px;flex:0 0 180px}
 .tool-tabs{flex:1}.tool-tab,.tool-tab:last-child:nth-child(odd){min-width:44px;flex:1}
}
button{min-width:44px}
/* Secondary panel copy remains readable on the fixed ivory surface. */
.controls p,.controls .section-help,.controls .individual-material-help,
.controls .material-heading>span,.controls .material-active-summary,.controls .material-preview-note,
.controls .material-category-badge,.controls .individual-material-selected,
.controls .individual-gallery-status,.controls .automatic-info>summary,
.controls .tools-heading span,.controls .preset small{color:#71695b}
/* Keep routine prose out of the tool sheet; actionable statuses keep their
   semantic role/class and remain visible. */
#materialPreviewNote,#sourceMaterialActive,#sourceMaterialNote,#hairPreviewNote,
.controls .individual-material-help,
.controls .section-help:not([role=status]):not([role=alert]):not(#healingCapabilityNote):not(.actionable):not(.error):not(.warning){display:none}
.controls .individual-material-card[data-material-category="Silkworm"] .individual-material-help,
.controls .individual-material-help.actionable,.controls .section-help.actionable,
.controls .section-help.error,.controls .section-help.warning{display:block}
/* In a shallow tablet workspace a side sheet keeps face features uncovered. */
@media(min-width:768px) and (max-width:1199px) and (min-height:501px) and (max-height:850px) and (min-aspect-ratio:1/1){
 .context-open .viewport{margin-right:350px}
 .controls{left:auto!important;right:16px;transform:none;width:334px;max-height:calc(100dvh - 188px)}
 .controls::after{display:none}
 .context-open .editor-bar{right:16px}
}
.controls .material-category-choice.active .material-category-badge,
.controls .material-category-choice[aria-pressed=true] .material-category-badge{color:#625744}
.library .photo-entry>.photo-card{padding-right:52px}
.library .photo-entry>.photo-remove{top:14px;right:4px}
@media(min-width:1200px){
 .controls{max-height:min(380px,38dvh)}
}
.library-bottom>p{display:none}

/* V67: stable photo coordinates, a light source-derived atmosphere, and a
   physical left gallery / right inspector independent of text direction. */
:root{--font:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;--gallery-space:164px;--inspector-space:324px;--viewer-bottom:154px;--sheet-height:min(340px,42dvh)}
body{font-family:var(--font);font-weight:400;background:#888485}
.ambient-backdrop{background:linear-gradient(140deg,#9a9297,#777c8b)}
.ambient-shade{background:linear-gradient(180deg,#19151a26 0%,#f2e8dc0c 42%,#15171d36 100%)}
.topbar{background:#2421272b;border-bottom-color:#ffffff23;backdrop-filter:blur(24px);-webkit-backdrop-filter:blur(24px)}
.project-title{display:none!important}
.brand{font-family:var(--font);font-weight:750}.brand-sub{font-weight:500}
.workspace,.editor,.viewport,.image-stage,.photo-frame,.gallery-arc,.tool-dock,.canvas-bottom{direction:ltr}
.controls,.language-control{direction:inherit}
.workspace .editor,.context-open .workspace .editor{padding:0 var(--inspector-space) 0 var(--gallery-space)}
.workspace .editor .viewport,.context-open .workspace .editor .viewport{margin:0 0 var(--viewer-bottom);transition:none}
#originalPreviewButton,#intensityRail{display:none!important}
.workspace #contextPanel{left:auto!important;right:24px;top:50%;bottom:auto;transform:translateY(-50%);width:288px;max-width:288px;max-height:min(660px,calc(100dvh - var(--header-height) - 54px));margin:0;border-radius:16px;background:#f3eee3d9;border:1px solid #ffffff7a;box-shadow:0 15px 45px #27242c1c;backdrop-filter:blur(28px) saturate(1.12);-webkit-backdrop-filter:blur(28px) saturate(1.12);animation:inspector-appear .18s ease-out}
#contextPanel::after{display:none!important}
@keyframes inspector-appear{from{opacity:0;translate:6px 0}to{opacity:1;translate:0 0}}
.control-heading{padding:8px 8px 2px 14px}.control-heading h2{font-weight:550;font-size:13px;min-width:0}
.context-actions{gap:0}.context-actions>.icon-button,.person-options>summary{width:44px;min-width:44px}
.controls .control-scroll{padding:0 14px 14px;border-radius:0 0 15px 15px}
#contextIntensityMount{padding:0 14px}
#contextIntensityMount .intensity-control{grid-template-columns:66px minmax(0,1fr) 27px;gap:7px;padding-bottom:3px}
#contextIntensityMount .intensity-control label{font-size:11px;line-height:1.4}
.controls .control label,.controls label{font-size:12px}.controls .control-value,.controls output{font-size:11px}
.controls .quick-adjustments .control{grid-template-columns:48px minmax(0,1fr) 26px;column-gap:8px}
.controls .material-category-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:5px}
.controls .material-category-choice{font-size:11px;min-height:50px;padding:6px 3px}
.controls .material-category-badge{font-size:10px}
.controls .material-choice img,.controls .individual-material-choice img{height:72px}
.controls .hair-profile-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
.controls .material-choice,.controls .individual-material-choice{font-size:11px}
.controls .retouch-subtab{font-size:11px}.controls .person-options .scope-strip{right:0;width:258px}
.tool-tab.active::after{display:none}
.context-open .tool-tab[aria-expanded=true]::after{display:block}
.context-open .tool-tab[aria-expanded=true]{color:#fff5e6}
body:not(.context-open) .tool-tab.active{color:#eee8dcb8}
.workspace .canvas-bottom,.context-open .workspace .canvas-bottom{left:var(--gallery-space);right:var(--inspector-space);bottom:calc(var(--dock-bottom) + var(--dock-height) + 12px + env(safe-area-inset-bottom,0px));height:44px;min-height:44px;justify-content:center;gap:10px}
.quick-zoom-bar{display:flex;align-items:center;gap:1px;padding:0 4px;height:44px;border-radius:10px;background:#2e2c32a3;border:1px solid #ffffff2b;box-shadow:0 4px 16px #00000012;backdrop-filter:blur(18px);-webkit-backdrop-filter:blur(18px);pointer-events:auto;color:#f8f2e8}
.quick-zoom-bar .quiet{height:44px;min-height:44px;min-width:44px;padding:0 9px;font-size:12px;color:#f8f2e8}
.quick-zoom-bar .zoom-step{font-size:20px;font-weight:400}
.quick-zoom-bar select{min-width:66px;height:44px;padding:0 3px;border:0;background:transparent;color:#f8f2e8;font:12px var(--font);text-align:center;cursor:pointer;max-width:78px}
.quick-zoom-bar option{color:#322c26;background:#eee9df}
.quick-zoom-bar #fitButton{background:transparent;font-size:11px}.quick-zoom-bar #fitButton.active{color:#fffaf0;background:#ffffff12}
.quick-zoom-bar #zoom100Button{font-size:11px;min-width:46px}
.canvas-bottom>.canvas-menu{position:absolute;right:0;bottom:0;margin:0}
.canvas-bottom>.canvas-menu>summary span{display:none}
.canvas-bottom>.canvas-menu-content{bottom:52px}
.workspace .editor-bar{right:calc(var(--inspector-space) + 12px);top:12px}
.workspace .editor-bar .canvas-menu>summary span{display:none}
.workspace .editor-bar .canvas-menu>summary{padding:0 12px}
#galleryArc{position:absolute;left:10px;top:26px;bottom:134px;width:146px;z-index:8;outline-offset:-2px;touch-action:none;user-select:none;-webkit-user-select:none}
.gallery-arc-track{position:absolute;inset:0 0 48px;overflow:hidden;mask-image:linear-gradient(to bottom,transparent 0%,#000 13%,#000 87%,transparent 100%);-webkit-mask-image:linear-gradient(to bottom,transparent 0%,#000 13%,#000 87%,transparent 100%)}
.arc-photo{position:absolute;left:88px;top:50%;width:104px;height:128px;transform-origin:center;will-change:transform,opacity}
.arc-photo-open{display:block;width:100%;height:100%;padding:4px;border:1px solid #ffffff42;border-radius:10px;background:#ffffff13;box-shadow:0 8px 20px #25232b16;overflow:hidden;outline-offset:3px;cursor:grab}
.arc-photo-open img{display:block;width:100%;height:100%;object-fit:cover;border-radius:6px;pointer-events:none;filter:none}
.arc-photo.is-centered .arc-photo-open{border-color:#fff5dcdf;box-shadow:0 0 0 1px #ffffff38,0 10px 24px #00000024;background:#fffaed35}
.arc-photo.is-selected:not(.is-centered) .arc-photo-open{border-color:#ffffff78}
.arc-photo-open:active{cursor:grabbing}
.gallery-arc-navigation{position:absolute;left:0;right:0;bottom:0;height:44px;display:flex;align-items:center;justify-content:center;gap:0;color:#fff4e5}
.gallery-arc-navigation button{height:44px;min-height:44px;min-width:44px;padding:0;background:transparent;border-radius:8px;color:#fff5e7;display:flex;justify-content:center;align-items:center;text-shadow:0 1px 4px #2226}
.gallery-arc-navigation button:hover{background:#ffffff12}.gallery-arc-navigation svg{width:14px;height:14px}
#galleryArcPrev svg{transform:rotate(-90deg)}#galleryArcNext svg{transform:rotate(90deg)}
#galleryArcCounter{font:11px var(--font);font-variant-numeric:tabular-nums;min-width:52px;white-space:nowrap}
.gallery-arc.is-single .gallery-arc-navigation>button:not(#galleryArcCounter){visibility:hidden}
.arc-export-select{position:absolute;right:-2px;top:-2px;width:44px;height:44px;display:grid;place-items:center;cursor:pointer;z-index:3}
.arc-export-select input{position:absolute;opacity:0;width:44px;height:44px;margin:0;cursor:pointer}
.arc-export-select span{width:21px;height:21px;border:1px solid #fff9;border-radius:6px;background:#2e2c34a8;backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);display:grid;place-items:center}
.arc-export-select input:checked+span{background:#f6eddd;color:#3f3528;border-color:#fff9}
.arc-export-select input:checked+span::after{content:"✓";font-size:14px;font-weight:600}
.arc-export-select input:focus-visible+span{outline:2px solid #fff7e8;outline-offset:4px}
.empty-state{position:relative;isolation:isolate;width:100%;height:100%;min-height:100%;max-width:none;margin:0;padding:0;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:18px;overflow:visible}
.empty-import{position:relative;z-index:2;width:124px;min-width:124px;height:124px;border:1px solid #ffffff78;border-radius:30px;background:#fff8f023;box-shadow:inset 0 1px 0 #ffffff47,0 15px 45px #30304115;backdrop-filter:blur(26px);-webkit-backdrop-filter:blur(26px);display:grid;place-items:center;color:#fff9f0;transition:background .2s,box-shadow .2s}
.empty-import:hover{background:#fff8f03b;box-shadow:inset 0 1px 0 #ffffff70,0 18px 50px #30304120}
.empty-import>svg{width:46px;height:46px;stroke-width:1.1}
.empty-import-label{position:relative;z-index:2;color:#fff7eecc;font-size:13px;font-weight:450;letter-spacing:.1px;text-shadow:0 1px 10px #1d21343b}
.empty-light{position:absolute;left:50%;top:50%;width:330px;height:420px;transform:translate(-50%,-60%);z-index:0;pointer-events:none;filter:blur(34px);opacity:.78}
.empty-light i{position:absolute;display:block;left:28%;bottom:45px;width:45%;height:58%;border-radius:55% 45% 40% 60%;background:radial-gradient(ellipse at 50% 80%,#f7798bc4,#b9234c6e 54%,transparent 73%);transform:rotate(9deg);animation:none}
.empty-light i:nth-child(2){left:8%;bottom:28px;width:63%;height:72%;background:radial-gradient(ellipse at 55% 85%,#9c79ffbf,#6748cb7d 46%,transparent 74%);transform:rotate(-14deg)}
.empty-light i:nth-child(3){left:36%;bottom:20px;width:58%;height:66%;background:radial-gradient(ellipse at 40% 75%,#6cbaffbe,#436dd27c 45%,transparent 75%);transform:rotate(17deg)}
body:not(.has-photo) #emptyState:not([hidden]) .empty-light i{animation:ambient-light-rise 16s ease-in-out infinite alternate}
body:not(.has-photo) #emptyState:not([hidden]) .empty-light i:nth-child(2){animation-delay:-6s;animation-duration:18s}
body:not(.has-photo) #emptyState:not([hidden]) .empty-light i:nth-child(3){animation-delay:-10s;animation-duration:15s}
.has-photo .empty-light i,#emptyState[hidden] .empty-light i{animation:none!important}
@keyframes ambient-light-rise{0%{translate:0 20px;scale:.92 1;opacity:.68}45%{translate:8px -8px;scale:1.08 1.07;opacity:.9}100%{translate:-8px -32px;scale:.95 1.16;opacity:.7}}
body:not(.has-photo) .workspace .editor{padding:0!important}
body:not(.has-photo) .workspace .editor .viewport{margin:0!important}
body:not(.has-photo) #toolDock,body:not(.has-photo) .canvas-bottom,body:not(.has-photo) .editor-bar{display:none}
.language-control{position:relative;flex-shrink:0}
#languageButton{width:44px;height:44px;padding:0;border-radius:8px;display:grid;place-items:center}
#languageFlag{display:flex;align-items:center;justify-content:center;pointer-events:none}
#languageFlag svg,#languageButton img{width:24px;height:17px;fill:none;stroke:none;border-radius:3px;box-shadow:0 0 0 1px #ffffff35;object-fit:cover}
.language-menu{position:absolute;right:0;top:calc(100% + 9px);width:202px;padding:6px;background:#f7f3e7e8;color:#3a3329;border:1px solid #ffffffb0;border-radius:12px;box-shadow:0 12px 38px #25232a26;backdrop-filter:blur(22px);-webkit-backdrop-filter:blur(22px);z-index:70;color-scheme:light;overflow:hidden}
.language-list{height:198px;max-height:198px;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#ad9f8a5c transparent;mask-image:linear-gradient(#000 0%,#000 93%,transparent 100%);-webkit-mask-image:linear-gradient(#000 0%,#000 93%,transparent 100%)}
.language-option{width:100%;height:44px;min-height:44px;display:flex;align-items:center;gap:10px;padding:0 9px;border-radius:6px;font:400 13px var(--font);color:#473e32;text-align:start;background:transparent;white-space:nowrap}
.language-option:hover,.language-option:focus-visible{background:#d2c6b438;outline-offset:-2px}
.language-option img{width:24px;height:16px;object-fit:cover;border-radius:2px;flex-shrink:0}
.language-check{margin-inline-start:auto;font-size:13px;color:#74634a}
.archived-photos{border-top:1px solid #ffffff26;padding-top:6px;margin-top:8px}
.archived-photos summary{font-size:12px;color:#e4d8c6;cursor:pointer;display:flex;align-items:center;min-height:44px}
.archived-photos select{width:100%;max-height:176px;min-height:88px;background:#ffffff0b;border:1px solid #ffffff23;border-radius:6px;color:#eadfcd;padding:6px;font:12px var(--font)}
.archived-photos .quiet{width:100%;color:#e4d8c6;font-size:12px;margin-top:6px}
#exportScope{margin-bottom:8px}#exportSelectButton{margin-bottom:14px;width:100%}
.export-progress{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:16px 0;font-size:12px;color:#79674b}
html[dir=rtl] .controls,html[dir=rtl] .language-menu,html[dir=rtl] dialog{direction:rtl;text-align:right}
html[dir=rtl] .controls .control label{direction:rtl}
html[dir=rtl] .tool-tab,html[dir=rtl] .automatic-button{direction:rtl}
html[dir=rtl] .controls .quick-adjustments .control{direction:rtl}
html[dir=rtl] .controls .quick-adjustments .control-value{grid-column:3}
html[dir=rtl] .topbar{direction:ltr}
@media(min-width:1600px){:root{--gallery-space:188px;--inspector-space:340px}#galleryArc{left:24px;width:154px}.workspace #contextPanel{right:30px}}
@media(min-width:768px) and (max-width:1199px){
 :root{--gallery-space:132px;--inspector-space:294px;--viewer-bottom:144px}
 .workspace #contextPanel{right:15px;width:264px;max-width:264px;max-height:calc(100dvh - var(--header-height) - 40px)}
 #galleryArc{left:0;width:128px;top:15px;bottom:130px}.arc-photo{left:77px;width:96px;height:116px}
 .gallery-arc-navigation button{min-width:40px}.gallery-arc-navigation #galleryArcCounter{min-width:48px}
 .canvas-bottom>.canvas-menu{right:-40px}.quick-zoom-bar .quiet{padding:0 6px}
 .controls .context-actions>.icon-button,.controls .person-options>summary{width:44px;min-width:44px}.control-heading{gap:3px}
}
@media(min-width:768px) and (max-width:1199px) and (orientation:portrait){
 :root{--inspector-space:24px;--gallery-space:132px;--viewer-bottom:212px}
 .workspace #contextPanel{top:auto;left:auto!important;right:18px;bottom:calc(94px + env(safe-area-inset-bottom,0px));transform:none;width:360px;max-width:calc(100vw - 170px);max-height:min(380px,39dvh)}
 .canvas-bottom>.canvas-menu{right:0}.workspace .editor-bar{right:20px}
}
@media(max-width:767px){
 :root{--gallery-space:10px;--inspector-space:10px;--viewer-bottom:250px;--header-height:56px;--sheet-height:min(340px,42dvh)}
 .topbar{padding:0 8px;gap:4px}.header-brand{gap:0}.brand{font-size:24px;letter-spacing:-1.5px}.brand-sub{display:none}
 .top-actions{gap:0}.top-actions .quiet,.header-compare,.header-icon,.top-actions .primary{width:44px;min-width:44px;height:44px;padding:0;margin:0}
 .top-actions .primary{border-radius:8px}.top-actions .primary span,.header-compare span{display:none}
 .workspace #contextPanel{top:auto;right:10px;left:10px!important;bottom:calc(84px + env(safe-area-inset-bottom,0px));transform:none;width:auto;max-width:550px;max-height:var(--sheet-height);margin:0 auto;overflow:hidden;border-radius:15px}
 .workspace .editor,.context-open .workspace .editor{padding-left:10px;padding-right:10px}
 .workspace .editor .viewport,.context-open .workspace .editor .viewport{margin-bottom:var(--viewer-bottom);margin-right:0}
 .workspace .editor-bar{right:10px;top:9px}
 .workspace .canvas-bottom,.context-open .workspace .canvas-bottom{left:10px;right:10px;bottom:calc(204px + env(safe-area-inset-bottom,0px));justify-content:center}
 .quick-zoom-bar{height:40px}.quick-zoom-bar .quiet,.quick-zoom-bar select{height:44px;min-height:44px}.quick-zoom-bar .quiet{padding:0 5px}.quick-zoom-bar select{min-width:58px;max-width:67px}.canvas-bottom>.canvas-menu{right:0;bottom:0}
 #galleryArc{left:10px;right:10px;top:auto;bottom:calc(82px + env(safe-area-inset-bottom,0px));height:118px;width:auto;max-width:600px;margin:auto}
 .gallery-arc-track{inset:0 0 30px;mask-image:linear-gradient(to right,transparent 0%,#000 12%,#000 88%,transparent 100%);-webkit-mask-image:linear-gradient(to right,transparent 0%,#000 12%,#000 88%,transparent 100%)}
 .arc-photo{left:50%;top:46%;width:76px;height:86px}.arc-photo-open{padding:3px;border-radius:8px}.arc-photo-open img{border-radius:5px}
 .gallery-arc-navigation{height:44px;bottom:-9px}.gallery-arc-navigation button{min-width:44px;height:44px}.gallery-arc-navigation #galleryArcCounter{min-width:60px;font-size:10px}
 #galleryArcPrev svg{transform:rotate(180deg)}#galleryArcNext svg{transform:none}
 .context-open #galleryArc{height:44px;bottom:calc(92px + var(--sheet-height) + env(safe-area-inset-bottom,0px));width:156px;left:auto;right:14px;z-index:25}
 .context-open #galleryArcTrack{visibility:hidden;pointer-events:none}.context-open .gallery-arc-navigation{bottom:0;background:#312e35a1;border:1px solid #ffffff2b;border-radius:10px;backdrop-filter:blur(18px);-webkit-backdrop-filter:blur(18px)}
 .tool-dock{width:calc(100% - 16px);max-width:550px;gap:2px;padding:7px}.tool-dock .automatic-button{flex-basis:100px;width:100px;min-width:100px;font-size:11px;line-height:1.25;white-space:normal}.tool-tab,.tool-tab:last-child:nth-child(odd){font-size:11px;padding:0 3px;white-space:normal;overflow-wrap:anywhere;line-height:1.2}
 .controls .control-scroll{padding:0 15px 14px}.control-heading{padding-left:15px}.controls .material-category-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.controls .hair-profile-grid{grid-template-columns:repeat(4,minmax(0,1fr))}
 .controls .material-choice img,.controls .individual-material-choice img{height:78px}
 .language-menu{right:-4px;max-width:calc(100vw - 20px)}
 .empty-import{width:112px;min-width:112px;height:112px;border-radius:28px}.empty-light{width:280px;height:370px}
 .workspace .preview-notice,.context-open .workspace .preview-notice,.workspace .batch-progress,.context-open .workspace .batch-progress{bottom:calc(250px + env(safe-area-inset-bottom,0px))}
 .person-options .scope-strip{right:10px!important;max-width:calc(100vw - 32px)}
}
@media(max-height:520px) and (orientation:landscape){
 :root{--header-height:52px;--gallery-space:110px;--inspector-space:274px;--viewer-bottom:112px}
 .workspace .editor,.context-open .workspace .editor{padding:0 var(--inspector-space) 0 var(--gallery-space)}
 .workspace .editor .viewport,.context-open .workspace .editor .viewport{margin:0 0 var(--viewer-bottom)}
 .workspace #contextPanel{top:10px;bottom:auto;left:auto!important;right:10px;transform:none;width:254px;max-width:254px;max-height:calc(100dvh - 128px)}
 #galleryArc{left:0;right:auto;top:10px;bottom:90px;width:110px;height:auto;margin:0}.gallery-arc-track{inset:0 0 44px;mask-image:linear-gradient(transparent,#000 15%,#000 85%,transparent);-webkit-mask-image:linear-gradient(transparent,#000 15%,#000 85%,transparent)}
 .arc-photo{left:66px;top:50%;width:80px;height:94px}.gallery-arc-navigation{height:44px;bottom:0}.gallery-arc-navigation button{min-width:34px}.gallery-arc-navigation #galleryArcCounter{min-width:42px}
 .workspace .canvas-bottom,.context-open .workspace .canvas-bottom{left:var(--gallery-space);right:var(--inspector-space);bottom:calc(66px + env(safe-area-inset-bottom,0px));height:44px}
 .quick-zoom-bar .quiet{min-width:36px;padding:0 5px}.quick-zoom-bar #zoom100Button{display:none}.canvas-bottom>.canvas-menu{right:-44px}.workspace .editor-bar{right:calc(var(--inspector-space) + 8px)}
 .empty-light{height:240px;width:260px;transform:translate(-50%,-54%)}.empty-import{width:90px;min-width:90px;height:90px;border-radius:24px}.empty-state{gap:10px}.empty-import-label{font-size:12px}
 .language-menu{max-height:calc(100dvh - 65px)}
}
@media(prefers-reduced-motion:reduce){body:not(.has-photo) #emptyState:not([hidden]) .empty-light i{animation:none!important}.arc-photo{will-change:auto}}

.gallery-arc-navigation button,.quick-zoom-bar .quiet{min-width:44px}
@media(max-height:520px) and (orientation:landscape){.gallery-arc-navigation #galleryArcPrev,.gallery-arc-navigation #galleryArcNext{display:none}}

/* Effect bypass keeps the saved recipe intact. The hit box is 44×44. */
.controls .effect-switch{appearance:none;-webkit-appearance:none;flex:0 0 44px;width:44px;height:44px;margin:0;cursor:pointer;border:0;background:radial-gradient(circle at 14px 22px,#fdf9f3 0 7px,transparent 7.5px),linear-gradient(#8a8580,#8a8580) center/34px 20px no-repeat;border-radius:14px}
.controls .effect-switch:checked{background:radial-gradient(circle at 30px 22px,#fffdf7 0 7px,transparent 7.5px),linear-gradient(#5d6951,#5d6951) center/34px 20px no-repeat}
.controls .effect-switch:focus-visible{outline:2px solid #746751;outline-offset:2px}
.controls .effect-switch:disabled{opacity:.45;cursor:default}
.controls .effect-disabled>summary{opacity:.7}
#photoFrame.space-pan,#photoFrame.space-pan canvas{cursor:grab!important}
.device-unavailable{opacity:.5}
.export-progress{padding:12px 0;white-space:pre-line}

/* Export hit targets never inherit the thumbnail rotation/scale or stacking. */
.gallery-arc-selection-layer{position:absolute;inset:0 0 48px;z-index:50;pointer-events:none;overflow:hidden}
.gallery-arc-selection-layer .arc-export-select{right:auto;width:44px;height:44px;transform:translate(-50%,-50%);pointer-events:auto;touch-action:manipulation}
.arc-export-select input{z-index:2;inset:0}.arc-export-select span{pointer-events:none}
@media(max-width:767px){.gallery-arc-selection-layer{inset:0 0 26px}.context-open .gallery-arc-selection-layer{visibility:hidden;pointer-events:none}}

/* Ambient revision: a brighter atmosphere with readable glass, and a calm
   light that rises behind the frosted add button. Only backdrop layers are
   tinted; the photograph, text and controls never inherit an opacity. */
.ambient-backdrop{background:radial-gradient(120% 95% at 50% 38%,#c3bbbb 0%,#a29da6 48%,#81879a 100%)}
.ambient-backdrop>img{filter:blur(80px) saturate(1.18);inset:-12%;width:124%;height:124%}
.ambient-shade{background:linear-gradient(180deg,#1b181f1f 0%,#fff6ea14 40%,#171a2129 100%)}
.topbar{background:#211f2647;border-bottom-color:#ffffff26;backdrop-filter:blur(26px) saturate(1.35);-webkit-backdrop-filter:blur(26px) saturate(1.35)}
.brand,.top-actions .quiet,.header-icon,.header-compare,.gallery-arc-navigation button{text-shadow:0 1px 8px #19171f33}
.tool-dock{background:#29272dbd;backdrop-filter:blur(28px) saturate(1.3);-webkit-backdrop-filter:blur(28px) saturate(1.3)}
.empty-import{border-color:#ffffff8c;background:linear-gradient(160deg,#ffffff38,#fff4ec17 60%,#ffffff24);box-shadow:inset 0 1px 0 #ffffff6b,inset 0 -1px 0 #ffffff1f,0 18px 50px #2a283a1f;backdrop-filter:blur(22px) saturate(1.6);-webkit-backdrop-filter:blur(22px) saturate(1.6)}
.empty-import:hover{background:linear-gradient(160deg,#ffffff4d,#fff4ec26 60%,#ffffff33)}
.empty-import-label{color:#fffaf2e6;text-shadow:0 1px 12px #2a23384d}
/* Three soft flames share one slow cycle a third apart: each rises from the
   centre, swells and fades, so red, then violet, then blue lead in turn. The
   resting styles are the static composition used for reduced motion. */
.empty-light{width:360px;height:500px;transform:translate(-50%,-90%);filter:blur(30px) saturate(1.12);opacity:1}
.empty-light::before{content:"";position:absolute;inset:-18% -40%;border-radius:50%;background:radial-gradient(closest-side,#ffd8d02e,#c8a2e01f 50%,transparent 76%)}
.empty-light::after{content:"";position:absolute;left:20%;right:20%;bottom:0;height:34%;border-radius:50%;background:radial-gradient(ellipse at 50% 62%,#ff83748c,#c1529c4d 52%,transparent 76%)}
.empty-light i{left:25%;right:25%;width:auto;bottom:4%;height:50%;border-radius:48% 52% 44% 56%/62% 58% 42% 38%;transform-origin:50% 100%;will-change:transform,opacity;animation:none}
.empty-light i:nth-child(1){background:radial-gradient(ellipse 52% 60% at 50% 68%,#ff7c70c7,#e2497078 52%,transparent 78%);transform:translate3d(0,4%,0) scale(.92,.86);opacity:.92}
.empty-light i:nth-child(2){background:radial-gradient(ellipse 52% 60% at 50% 64%,#b97cffb3,#8752e478 52%,transparent 78%);transform:translate3d(-2%,-24%,0) scale(1,1.06);opacity:.8}
.empty-light i:nth-child(3){background:radial-gradient(ellipse 52% 60% at 50% 60%,#6cb0ffb8,#4670e278 52%,transparent 78%);transform:translate3d(2%,-50%,0) scale(.84,1.16);opacity:.62}
body:not(.has-photo) #emptyState:not([hidden]) .empty-light i{animation:light-rise 16s cubic-bezier(.42,0,.58,1) infinite}
body:not(.has-photo) #emptyState:not([hidden]) .empty-light i:nth-child(2){animation-delay:-5.33s;animation-duration:16s}
body:not(.has-photo) #emptyState:not([hidden]) .empty-light i:nth-child(3){animation-delay:-10.67s;animation-duration:16s}
body:not(.has-photo) #emptyState:not([hidden]) .empty-light::after{animation:light-ember 12s ease-in-out infinite alternate}
body:not(.has-photo) #emptyState:not([hidden]) .empty-light::before{animation:light-halo 14s ease-in-out infinite alternate}
@keyframes light-rise{0%{transform:translate3d(0,16%,0) scale(.8,.66);opacity:0}16%{opacity:.86}52%{transform:translate3d(3%,-26%,0) scale(1.02,1.1);opacity:.78}100%{transform:translate3d(-3%,-66%,0) scale(.72,1.24);opacity:0}}
@keyframes light-ember{from{transform:scale(.94);opacity:.72}to{transform:scale(1.06);opacity:1}}
@keyframes light-halo{from{transform:scale(.96);opacity:.7}to{transform:scale(1.04);opacity:1}}
.has-photo .empty-light i,.has-photo .empty-light::before,.has-photo .empty-light::after,#emptyState[hidden] .empty-light i,#emptyState[hidden] .empty-light::before,#emptyState[hidden] .empty-light::after{animation:none!important}
@media(prefers-reduced-motion:reduce){body:not(.has-photo) #emptyState:not([hidden]) .empty-light i,body:not(.has-photo) #emptyState:not([hidden]) .empty-light::before,body:not(.has-photo) #emptyState:not([hidden]) .empty-light::after{animation:none!important}}
@media(max-width:767px){.empty-light{width:300px;height:420px}}
@media(max-height:520px) and (orientation:landscape){.empty-light{width:260px;height:300px;transform:translate(-50%,-86%)}}

/* Remove control on the centred photo: 44px hit area, a small glass circle. */
.arc-photo-remove{position:absolute;top:-16px;right:-16px;width:44px;height:44px;min-height:44px;padding:0;border:0;background:transparent;display:grid;place-items:center;opacity:0;pointer-events:none;transition:opacity .15s;z-index:4;color:#fff8ee}
.arc-photo-remove::before{content:"";position:absolute;width:24px;height:24px;border-radius:50%;background:#2c2a31c4;border:1px solid #ffffff59;box-shadow:0 2px 8px #0003;backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px)}
.arc-photo-remove svg{position:relative;width:12px;height:12px;stroke-width:2}
.arc-photo.is-centered:hover .arc-photo-remove,.arc-photo.is-centered:focus-within .arc-photo-remove{opacity:1;pointer-events:auto}
@media(hover:none){.arc-photo.is-centered .arc-photo-remove{opacity:1;pointer-events:auto}}
@media(max-width:767px){.arc-photo-remove{top:-14px;right:-14px}}

/* Parametric makeup effects: a title row with its switch above the controls. */
.controls .effect-row{display:flex;align-items:center;justify-content:space-between;gap:10px;min-height:44px;margin:8px 0 2px;padding-top:4px;border-top:1px solid #d7cdbd}
.controls .effect-row strong{font-size:12px;font-weight:550;color:#4b4234}
.controls .control.effect-off{opacity:.5}

/* Full-resolution region over a stretched preview (both compare layers). */
.photo-frame .zoom-detail{position:absolute;max-width:none;pointer-events:none;user-select:none;image-rendering:auto;z-index:1}
.result-clip .zoom-detail{z-index:1}

/* A simple inspector: title, controls, values. Per-slider technical footnotes
   and category intros stay in the DOM for tool search but are not shown. */
.controls .control>p,.controls .category-intro p{display:none}
.controls .category-intro{padding-top:12px}
.controls .automatic-info{display:none}

/* Short slider labels size to their text and never break inside a word (CJK, Thai). */
.controls .quick-adjustments .control{grid-template-columns:minmax(48px,max-content) minmax(0,1fr) 28px}
.controls .quick-adjustments .control label,#contextIntensityMount .intensity-control label{white-space:nowrap}
#contextIntensityMount .intensity-control{grid-template-columns:minmax(66px,max-content) minmax(0,1fr) 28px}
.i18n-pending body{visibility:hidden}
.export-parts{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 12px}
#exportQuality{margin-top:6px}

/* With the panel closed the photo sits in the middle of the screen: the
   right inset mirrors the gallery on the left. The open panel reserves its room. */
body:not(.context-open) .workspace .editor{padding-right:var(--gallery-space)}
body:not(.context-open) .workspace .canvas-bottom{right:var(--gallery-space)}
body:not(.context-open) .workspace .editor-bar{right:calc(var(--gallery-space) + 12px)}

/* Colour cards: a small swatch with its colour name underneath. */
.colour-card-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin:10px 0 14px}
.colour-card{display:flex;flex-direction:column;align-items:center;gap:5px;min-width:0;min-height:44px;padding:5px 2px 6px;border:1px solid transparent;border-radius:9px;background:transparent;color:inherit;font-size:11px;line-height:1.25;cursor:pointer}
.colour-card-swatch{display:block;width:100%;max-width:46px;aspect-ratio:1;border-radius:8px;box-shadow:inset 0 0 0 1px rgba(0,0,0,.14),0 1px 2px rgba(0,0,0,.12)}
.colour-card small{display:block;max-width:100%;font-size:11px;text-align:center;overflow-wrap:anywhere}
.colour-card:hover:not(:disabled){border-color:rgba(127,112,90,.35)}
.colour-card.active{border-color:currentColor;box-shadow:0 0 0 1px currentColor;font-weight:600}
.colour-card:disabled{opacity:.45;cursor:not-allowed}
.colour-card-label{display:block;margin:6px 0 6px;font-size:12px;opacity:.8}
.finish-choices{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;margin:0 0 12px}
.finish-choice{min-height:36px;border:1px solid rgba(127,112,90,.4);border-radius:8px;background:transparent;color:inherit;font-size:12px}
.finish-choice.active{background:rgba(127,112,90,.22);border-color:currentColor;font-weight:600}
#hairProfileSection .hair-profile-grid{margin-bottom:12px}
#hairProfileSection .hair-choice{min-height:40px}
@media(max-width:767px){.colour-card-grid{grid-template-columns:repeat(6,minmax(0,1fr))}}
@media(max-width:420px){.colour-card-grid{grid-template-columns:repeat(4,minmax(0,1fr))}}
/* Wide screens keep the photo centred with the panel open too: the left
   inset mirrors the panel's room instead of only the gallery's. */
@media(min-width:1200px){
 .context-open .workspace .editor{padding-left:var(--inspector-space)}
 .context-open .workspace .canvas-bottom{left:var(--inspector-space)}
}
.colour-card small{overflow-wrap:normal;hyphens:auto}

/* Skin panel: Healing only. The automatic cleaner and its Detay button sit
   side by side. */
#panel-retouch .retouch-subtabs,#panel-retouch #retouchMainView{display:none!important}
body[data-active-tool="retouch"] #contextIntensityMount{display:none}
.healing-primary-actions{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;align-items:stretch;margin:4px 0 8px}
.healing-primary-actions .automatic-button{margin:0;min-height:44px}
.controls .healing-primary-actions .healing-detail-button{min-width:84px;min-height:44px;padding:0 14px;border:1px solid #b9ab92;border-radius:10px;font-weight:600}
.controls .healing-primary-actions .healing-detail-button:not(:disabled){background:#fbf7ee;color:#3f3423}

/* On/off switch: a rounded track with a sliding knob, fully inside its row. */
.controls .effect-switch{appearance:none;-webkit-appearance:none;position:relative;flex:0 0 auto;align-self:center;width:40px;height:24px;min-width:40px;margin:0 2px;padding:0;border:0;border-radius:12px;cursor:pointer;
  background:radial-gradient(circle at 12px 12px,#fff 0 8.5px,transparent 9px) no-repeat,#b8b0a4;box-shadow:inset 0 0 0 1px rgba(0,0,0,.08);transition:background-position .18s ease,background-color .18s ease}
.controls .effect-switch:checked{background:radial-gradient(circle at 28px 12px,#fff 0 8.5px,transparent 9px) no-repeat,#5d7a4a}
.controls .effect-switch:focus-visible{outline:2px solid #746751;outline-offset:3px}
.controls .effect-switch:disabled{opacity:.4;cursor:default}
.controls .individual-material-card>summary{align-items:center}
.controls .individual-material-card>summary .individual-material-selected{margin-left:auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

/* Person choice: an inline row under the panel title, shown for group photos. */
.controls .person-row{padding:0 14px 6px}
.controls .person-row .scope-strip{display:flex;flex-direction:column;gap:6px;padding:0;margin:0;border:0;background:none}
.controls .person-row label{display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;gap:8px;margin:0;font-size:12px}
.controls .person-row select{width:100%;min-height:36px;padding:0 8px;border:1px solid #d4c9b5;border-radius:8px;background:#fbf7ee;color:inherit;font-size:12px}
.controls .person-row .selection-meta:empty{display:none}

/* Brush controls inside the right panel: stacked rows, not a bar over the
   photo. Healing add/remove shows the brush size only. */
.brush-bar-mount:empty{display:none}
.controls .brush-bar.in-panel{position:static;display:flex;flex-direction:column;align-items:stretch;gap:8px;width:auto;min-height:0;margin:0 0 12px;padding:10px 12px;border:1px solid #d7cdbd;border-radius:10px;background:#fbf7ee;color:#514635;box-shadow:none;overflow:visible}
.controls .brush-bar.in-panel[hidden]{display:none}
.controls .brush-bar.in-panel label{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:8px;color:#514635;font-size:12px}
.controls .brush-bar.in-panel label output{float:none;color:#7a6c57}
.controls .brush-bar.in-panel input[type=range]{width:100%;height:32px}
.controls .brush-bar.in-panel select{width:100%}
.controls .brush-bar.in-panel .quiet{min-height:36px;color:#514635;border:1px solid #d4c9b5;border-radius:8px}
.controls .brush-bar.in-panel .brush-help{display:none}
.brush-bar.compact>:not(label:has(#brushSize)){display:none!important}

/* Contextual tools and a readable inspector at each screen size. */
:root{--control-font:clamp(13px,.82vw + 3px,16px);--control-small:clamp(12px,.7vw + 3px,14px)}
.controls{font-size:var(--control-font)}
.controls .control-heading h2{font-size:calc(var(--control-font) + 2px)}
.controls .control label,.controls label,.controls .individual-material-card>summary,.controls .source-material-tools>summary{font-size:var(--control-font);line-height:1.45}
.controls .control-value,.controls output,.controls .individual-material-selected,.controls .individual-gallery-status{font-size:var(--control-small);font-variant-numeric:tabular-nums}
.controls .material-category-choice,.controls .colour-card,.controls .colour-card small,.controls .material-choice,.controls .individual-material-choice,.controls .finish-choice,.controls .quiet,.controls .automatic-button{font-size:var(--control-small);line-height:1.35}
.controls .material-category-choice{min-height:54px}
.controls .quiet,.controls .finish-choice,.controls .individual-material-clear,.controls select{min-height:44px}
.controls select{font-size:var(--control-font);max-width:100%}
.controls input[type=range]{min-height:36px}
.controls .category-intro h3,.controls .group-title,.controls .tools-heading h3{font-size:var(--control-font)}
.controls .individual-material-card,.controls .native-material-card,.controls .source-material-tools,.controls .individual-material-grid,.controls .source-material-grid{min-width:0;max-width:100%}
.controls .individual-material-card>summary{gap:8px}
.controls .individual-material-card>summary strong{min-width:0;overflow-wrap:anywhere}
.controls .individual-material-card>summary .individual-material-selected{margin-left:0;margin-inline-start:auto;flex:1 1 0;max-width:45%;text-align:end}
.controls .colour-card-grid{grid-template-columns:repeat(auto-fit,minmax(58px,1fr));gap:8px;min-width:0;max-width:100%}
.controls .colour-card{min-width:0;max-width:100%;padding:6px 3px;overflow:hidden;justify-content:flex-start}
.controls .colour-card small{width:100%;min-width:0;max-width:100%;white-space:normal;overflow-wrap:anywhere;hyphens:auto}
.controls .colour-card-swatch{flex:0 0 auto;max-width:50px}
.controls .finish-choices{grid-template-columns:repeat(3,minmax(0,1fr))}
.controls .finish-choice{min-width:0;padding:7px 4px;white-space:normal;overflow-wrap:anywhere}
.controls .material-pigment{min-width:0;max-width:100%}
.controls .material-pigment small{min-width:0;white-space:normal;overflow-wrap:anywhere}
.controls .context-view-tools{margin-top:12px;border-top:1px solid #d7cdbd}
.controls .context-view-tools>summary{min-height:44px;font-size:var(--control-font);cursor:pointer}
.controls .context-view-tools .view-controls{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;margin:4px 0 10px;padding:0}
.controls .context-view-tools .view-button{min-width:0;min-height:44px;padding:8px;white-space:normal;overflow-wrap:anywhere;font-size:var(--control-small);color:inherit;border:1px solid #d7cdbd;border-radius:8px;background:#fff8}
.controls .context-view-tools .view-button.active,.controls .context-view-tools .view-button.brush-active{border-color:#80725b;background:#e0d5c1}
.controls .context-view-tools .mask-selector{position:static;max-width:100%;padding:0 0 8px;background:none;border:0}
.controls .context-view-tools .mask-selector label{display:grid;gap:6px}
.controls .context-view-tools .mask-selector select{width:100%;max-width:100%}
.controls .brush-bar.in-panel{max-width:100%;box-sizing:border-box;margin-top:8px}
.controls .brush-bar.in-panel label{font-size:var(--control-small)}
.language-option{font-size:14px}
@media(min-width:1200px){
 :root{--inspector-width:clamp(306px,24vw,384px);--inspector-space:calc(var(--inspector-width) + 42px)}
 .workspace #contextPanel{width:var(--inspector-width);max-width:var(--inspector-width);right:24px}
 .controls .control-scroll{padding:0 18px 18px}
 #contextIntensityMount{padding-inline:18px}
 .controls .control-heading{padding-inline-start:18px}
}
@media(min-width:1600px){:root{--inspector-space:calc(var(--inspector-width) + 54px)}.workspace #contextPanel{right:30px}}
@media(min-width:768px) and (max-width:1199px) and (orientation:landscape){
 :root{--inspector-space:326px}
 .workspace #contextPanel{width:296px;max-width:296px}
}
@media(max-width:767px){
 :root{--control-font:14px;--control-small:13px}
 .controls .colour-card-grid{grid-template-columns:repeat(auto-fit,minmax(60px,1fr))}
 .controls .material-category-choice{font-size:13px}
 .tool-dock .automatic-button,.tool-tab,.tool-tab:last-child:nth-child(odd){font-size:12px}
 .controls .person-row select,.controls select{font-size:16px}
}
@media(max-height:520px) and (orientation:landscape){
 :root{--inspector-space:300px;--control-font:13px;--control-small:12px}
 .workspace #contextPanel{width:280px;max-width:280px}
}
