/* Camera-first character-creator layout; existing renderer and controls retained. */
.studio-mode:has(.welcome:not([hidden])) .controls-panel{display:none}
html:has(.studio-mode){background:#151b19;color:#fff7ef;overflow:hidden}.studio-mode{height:100dvh;overflow:hidden;--glass:rgba(27,33,30,.78);--border:rgba(255,248,235,.17);--highlight:#d8e0bd;color:#fff7ef}.studio-mode .intro{display:none}.studio-mode main,.studio-mode .workspace,.studio-mode .mirror-panel{display:contents}.studio-mode .mirror{position:fixed;inset:0;width:100%;height:100dvh;max-width:none;margin:0;border:0;border-radius:0;background:#212923}.studio-mode .preview-layers{inset:0}.studio-mode .mirror:after{content:'';position:absolute;inset:0;background:linear-gradient(180deg,#1018127a,transparent 25%,transparent 55%,#1018128a);pointer-events:none;z-index:2}.studio-mode .topbar{position:fixed;top:0;left:0;right:0;z-index:10;max-width:none;margin:0;padding:24px 30px;border:0;background:linear-gradient(#11191280,transparent);color:#fff7ef}.studio-mode .brand{font-size:26px;text-shadow:0 1px 10px #0005}.studio-mode .brand small{font-size:7px;letter-spacing:3px}.studio-mode .top-actions{display:flex;align-items:center;gap:12px}.studio-mode .top-actions button{color:#fff7ef;background:var(--glass);border:1px solid var(--border);border-radius:50px;padding:0 16px;font-size:12px;backdrop-filter:blur(15px)}.studio-mode #about{width:44px;padding:0;font-size:20px}.studio-mode .welcome{inset:auto;top:50%;left:50%;transform:translate(-50%,-60%);width:min(370px,calc(100% - 170px));padding:34px 30px;border:1px solid var(--border);border-radius:25px;background:linear-gradient(135deg,#29362de8,#1c2822e8);backdrop-filter:blur(20px);box-shadow:0 25px 100px #0003;color:#fff7ef;z-index:6}.studio-mode .welcome p{color:#d1d6c8;font-size:12px}.studio-mode .welcome h2{font-size:24px;line-height:1.3}.studio-mode .mirror-icon{border-color:#d8e0bd50;color:#d8e0bd;height:75px;width:75px;margin-bottom:22px}.studio-mode .primary{background:#d8e0bd;color:#283025}.studio-mode .photo-upload{font-size:12px;color:#e7ebdc;margin-top:12px}.studio-mode .sample-link{color:#b0bcab}.studio-mode .mirror-status{top:100px;bottom:auto;z-index:5;background:var(--glass);border:1px solid var(--border);color:#e3e9d8;padding:9px 15px;font-size:10px;max-width:calc(100% - 200px)}.studio-mode .mirror-status:before{content:'';display:inline-block;width:5px;height:5px;border-radius:50%;background:#d8e0bd;margin-inline-end:8px;vertical-align:middle}.studio-mode .mirror-status.error{background:#522f2de0;color:#ffe9e3}.studio-mode .treatment-rail{position:fixed;inset-inline-end:25px;top:50%;transform:translateY(-58%);z-index:12;display:flex;flex-direction:column;gap:9px;width:92px}.studio-mode .treatment-rail button{position:relative;border:1px solid var(--border);background:var(--glass);backdrop-filter:blur(20px);color:#eceee5;border-radius:17px;padding:13px 8px;min-height:78px;display:flex;flex-direction:column;gap:8px;align-items:center;justify-content:center}.studio-mode .treatment-rail button>span{font:26px Georgia;line-height:1}.studio-mode .treatment-rail button>b{font-size:10px;font-weight:400;line-height:1.25}.studio-mode .treatment-rail button.selected{background:#d8e0bd;color:#273126;border-color:#d8e0bd;box-shadow:0 0 30px #d8e0bd12}.studio-mode .treatment-rail button>i{position:absolute;top:9px;right:9px;width:5px;height:5px;border-radius:50%;background:#8a96844d}.studio-mode .treatment-rail button.is-enabled>i{background:#d8e0bd;box-shadow:0 0 5px #d8e0bd55}.studio-mode .treatment-rail button.selected.is-enabled>i{background:#40543e}.studio-mode .controls-panel{position:fixed;left:50%;bottom:106px;transform:translateX(-50%);z-index:10;padding:18px 22px;width:min(660px,calc(100% - 290px));border:1px solid var(--border);border-radius:22px;background:var(--glass);backdrop-filter:blur(24px);box-shadow:0 10px 40px #0002;max-height:42dvh;overflow:auto;scrollbar-width:thin;scrollbar-color:#d8e0bd55 transparent}.studio-mode .controls-heading{display:flex;align-items:center;justify-content:space-between;padding:0;gap:15px}.studio-mode .controls-heading .eyebrow{font-size:8px;letter-spacing:2px;margin:0;color:#d8e0bd}.studio-mode .controls-heading h2{display:none}.studio-mode .controls-heading>button{position:static;inset:auto;background:transparent;color:#d7ded0;font-size:10px;padding:0;min-height:28px}.studio-mode #collapse-controls{margin-inline-start:auto;order:2}.studio-mode .presets{margin:10px 0 16px;gap:7px}.studio-mode .presets button{background:transparent;border:1px solid var(--border);color:#e6ecde;font-size:11px;padding:7px 10px;min-height:34px;white-space:nowrap}.studio-mode .presets button.active{background:#d8e0bd;color:#273126;border-color:#d8e0bd}.studio-mode .effects{border-top:1px solid var(--border)}.studio-mode .effect{border:0;padding:13px 0 0}.studio-mode .effect[hidden]{display:none}.studio-mode .effect-head{gap:10px}.studio-mode .effect-mark{display:none}.studio-mode .effect h3{font-size:15px;color:#fff7ef}.studio-mode .effect p{font-size:10px;color:#b9c6b4;margin-top:5px}.studio-mode .toggle span{background:#ffffff26}.studio-mode .toggle span:after{background:#fff7ef}.studio-mode .toggle input:checked+span{background:#8d9b73}.studio-mode .effect-options{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px 24px;padding:10px 0 0}.studio-mode .effect-options>label{margin:0;grid-template-columns:45px 1fr 22px;gap:8px;font-size:10px;color:#d1d9c8}.studio-mode .effect-options output{font-size:9px;color:#aebb9e}.studio-mode input[type=range]{accent-color:#d8e0bd;height:28px}.studio-mode .swatches{grid-column:1/-1;gap:13px;margin:4px 0 2px}.studio-mode .swatches button{width:25px;height:25px;border-color:#29332b;outline-color:#fff6}.studio-mode .swatches button[aria-pressed=true]{outline-color:#d8e0bd}.studio-mode .controls-panel.collapsed{padding-block:12px}.studio-mode .controls-panel.collapsed .effects,.studio-mode .controls-panel.collapsed .presets{display:none}.studio-mode .mirror-actions{position:fixed;left:50%;bottom:max(22px,env(safe-area-inset-bottom));transform:translateX(-50%);z-index:12;display:flex;align-items:center;justify-content:center;gap:12px;width:auto;margin:0;white-space:nowrap}.studio-mode .mirror-actions button{flex:none;background:var(--glass);border:1px solid var(--border);color:#fff7ef;backdrop-filter:blur(20px);border-radius:30px;padding:11px 20px;font-size:11px;min-height:45px}.studio-mode #capture{order:1;background:transparent;border:0;padding:0;min-height:72px;display:flex;flex-direction:column;gap:5px;align-items:center;backdrop-filter:none}.studio-mode #stop{order:3}.studio-mode #compare{order:0}.studio-mode .studio-book{order:2}.studio-mode .shutter-icon{display:block;width:62px;height:62px;border-radius:50%;background:#edf0e4;border:5px solid #ffffff35;box-shadow:0 0 0 2px #e5ecd08a,inset 0 0 0 3px #34482e60}.studio-mode .capture-caption{font-size:8px;color:#e3ebd9}.studio-mode .split-control{position:fixed;left:25px;top:50%;transform:translateY(-50%);z-index:10;width:165px;padding:15px;display:flex;flex-direction:column;align-items:stretch;margin:0;gap:7px;border:1px solid var(--border);border-radius:17px;background:var(--glass);backdrop-filter:blur(20px);font-size:10px;color:#d8e0bd}.studio-mode .split-control[hidden]{display:none}.studio-mode .split-labels{top:150px;left:150px;right:150px;color:#fff7ef;font-size:11px;z-index:4}.studio-mode #split-line{z-index:3;border-left:1px solid #d8e0bd90}.studio-mode dialog{background:#202b23;color:#fff7ef;border-color:#d8e0bd40;max-width:480px;padding:30px}.studio-mode dialog p{color:#bcc9b6}.studio-mode dialog h2{font-size:23px}.studio-mode dialog .close{color:#fff7ef}.studio-mode #info-dialog{text-align:start;max-height:85dvh;overflow:auto}.studio-mode #info-dialog .privacy{text-align:start;color:#bcc9b6;font-size:12px;margin-top:20px}.studio-mode #info-dialog .simulation-note{color:#bcc9b6;font-size:12px;margin-top:15px}.studio-mode #info-dialog .diagnostics{color:#bcc9b6;border-color:var(--border)}.studio-mode #info-dialog footer{display:flex;border-color:var(--border);padding:20px 0 0;color:#bcc9b6;font-size:10px;margin-top:20px}.studio-mode #toast{background:#d8e0bd;color:#253126;bottom:115px;font-size:12px}.studio-mode button:focus-visible,.studio-mode input:focus-visible,.studio-mode a:focus-visible{outline-color:#d8e0bd}
@media(max-width:800px){.studio-mode .controls-panel{width:calc(100% - 180px);left:calc(50% - 35px);padding:16px}.studio-mode .treatment-rail{inset-inline-end:16px;width:75px}.studio-mode .treatment-rail button{min-height:70px;padding:11px 6px}.studio-mode .split-control{left:18px;top:120px;transform:none;width:140px}.studio-mode .split-labels{top:210px;left:40px;right:40px}.studio-mode .mirror-status{top:90px}.studio-mode .mirror-actions button{padding-inline:14px}.studio-mode .welcome{width:min(330px,calc(100% - 150px));padding:25px 20px}}
@media(max-width:600px){.studio-mode .topbar{padding:18px 20px}.studio-mode .brand{font-size:23px}.studio-mode .top-actions{gap:7px}.studio-mode .top-actions button{min-height:38px;padding:0 12px;font-size:10px}.studio-mode #about{width:38px;min-height:38px;font-size:18px}.studio-mode .mirror-status{top:82px;max-width:calc(100% - 60px);padding:7px 12px;font-size:9px}.studio-mode .treatment-rail{top:40%;inset-inline-end:12px;width:58px;gap:7px;transform:translateY(-40%)}.studio-mode .treatment-rail button{min-height:62px;padding:9px 4px;border-radius:13px;gap:5px}.studio-mode .treatment-rail button>span{font-size:23px}.studio-mode .treatment-rail button>b{font-size:8px}.studio-mode .treatment-rail button>i{top:7px;right:7px;width:4px;height:4px}.studio-mode .controls-panel{left:12px;right:12px;width:auto;transform:none;bottom:91px;padding:12px 14px;border-radius:18px;max-height:33dvh}.studio-mode .controls-heading .eyebrow{font-size:7px}.studio-mode .controls-heading>button{font-size:10px;min-height:25px}.studio-mode .presets{gap:5px;margin:8px 0 10px}.studio-mode .presets button{font-size:10px;min-height:31px;padding:5px 8px}.studio-mode .effect{padding-top:10px}.studio-mode .effect h3{font-size:14px}.studio-mode .effect p{font-size:9px}.studio-mode .effect-options{gap:4px 14px;padding-top:8px}.studio-mode .effect-options>label{grid-template-columns:35px 1fr 16px;gap:6px;font-size:9px}.studio-mode .mirror-actions{bottom:max(12px,env(safe-area-inset-bottom));gap:9px;width:calc(100% - 24px)}.studio-mode .mirror-actions button{font-size:9px;padding:9px 10px;min-height:39px;white-space:normal;max-width:90px}.studio-mode .shutter-icon{width:54px;height:54px}.studio-mode #capture{min-height:65px;flex:0 0 58px}.studio-mode .capture-caption{font-size:7px;white-space:nowrap}.studio-mode .welcome{top:38%;transform:translate(-50%,-50%);left:calc(50% - 25px);width:calc(100% - 110px);padding:20px 17px;border-radius:20px}.studio-mode .welcome h2{font-size:18px}.studio-mode .welcome p{font-size:10px;line-height:1.6}.studio-mode .welcome .primary{font-size:12px;min-width:0;width:100%;margin-top:17px;padding:10px;min-height:41px}.studio-mode .mirror-icon{height:55px;width:55px;margin-bottom:15px;gap:12px}.studio-mode .mirror-icon span{font-size:25px}.studio-mode .photo-upload{font-size:10px;margin-top:8px;padding:5px}.studio-mode .sample-link{font-size:9px;min-height:25px}.studio-mode .split-control{top:126px;left:12px;width:140px;padding:9px;font-size:9px;border-radius:12px}.studio-mode .split-control input{height:20px}.studio-mode .split-labels{top:195px;left:30px;right:82px;font-size:10px}}
@media(max-height:600px) and (min-width:601px){.studio-mode .topbar{padding-block:14px}.studio-mode .mirror-status{top:65px}.studio-mode .treatment-rail{flex-direction:row;width:auto;top:86px;inset-inline-end:20px;transform:none}.studio-mode .treatment-rail button{width:68px;min-height:60px}.studio-mode .controls-panel{max-height:36dvh;bottom:100px}.studio-mode .welcome{transform:translate(-50%,-65%);padding:20px;width:300px}.studio-mode .mirror-icon{display:none}}
@media(max-width:600px){.studio-mode .treatment-rail{top:118px;transform:none}.studio-mode .treatment-rail button{min-height:52px;padding-block:7px}.studio-mode .controls-panel{max-height:min(30dvh,230px)}.studio-mode .welcome{max-width:320px;top:43%}.studio-mode .treatment-rail button>span{font-size:20px}}
/* Physical right placement stays consistent in Hebrew and English. */
.studio-mode .controls-heading{display:grid;grid-template-columns:1fr 1fr;gap:5px 12px}
.studio-mode .controls-heading .eyebrow{grid-column:1/-1;margin-bottom:5px;white-space:nowrap}
.studio-mode .controls-heading>button{text-align:start}
.studio-mode #collapse-controls{text-align:end;margin-inline-start:0}
.studio-mode .controls-panel{left:auto;right:24px;top:50%;bottom:auto;transform:translateY(-50%);width:300px;max-height:calc(100dvh - 190px);padding:20px}
.studio-mode .presets{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-block:15px 20px}
.studio-mode .effect-options{grid-template-columns:1fr;gap:13px;padding-top:18px}
.studio-mode .effect-options>label{grid-template-columns:45px 1fr 22px;font-size:11px}
.studio-mode .treatment-rail{inset-inline-start:auto;inset-inline-end:auto;left:24px;right:auto}
.studio-mode .controls-panel.collapsed{width:210px}
.studio-mode .split-control{top:130px;left:24px;transform:none}
@media(max-width:800px){.studio-mode .controls-panel{right:16px;width:250px;padding:16px}.studio-mode .controls-panel.collapsed{width:200px}.studio-mode .treatment-rail{left:16px;right:auto}}
@media(max-width:600px){.studio-mode .controls-panel{right:12px;left:auto;top:50%;bottom:auto;width:190px;max-height:calc(100dvh - 240px);padding:12px;transform:translateY(-50%)}.studio-mode .controls-panel.collapsed{width:170px}.studio-mode .presets{gap:5px;margin-block:10px 14px}.studio-mode .presets button{font-size:9px;white-space:normal;min-height:34px;padding:6px}.studio-mode .effect-head{align-items:start;gap:6px}.studio-mode .effect h3{font-size:13px}.studio-mode .effect p{font-size:9px}.studio-mode .effect-options{gap:9px;padding-top:12px}.studio-mode .effect-options>label{grid-template-columns:1fr 18px;gap:2px;font-size:10px}.studio-mode .effect-options>label input{grid-row:2;grid-column:1/-1;height:25px}.studio-mode .effect-options output{grid-column:2;grid-row:1}.studio-mode .treatment-rail{left:12px;right:auto}.studio-mode .swatches{flex-wrap:wrap;gap:10px}.studio-mode .split-control{left:12px;top:auto;bottom:110px;width:150px}.studio-mode .welcome{left:50%;width:calc(100% - 150px);top:45%}.studio-mode .welcome h2{font-size:17px}}

/* Neutral illuminated mirror, with edge drawers. */
.studio-mode{--glass:rgba(23,23,24,.78);--border:rgba(255,255,255,.23);--highlight:#f5f5f3}
.studio-mode .mirror{background:radial-gradient(ellipse at 50% 40%,#1c1d20,#08090b 80%)}
.studio-mode .mirror:after{inset:10px;border:1px solid #aaa9a640;border-radius:22px;background:transparent;box-shadow:inset 0 0 0 5px #222326,0 0 0 9px #111214;transition:box-shadow 2.8s ease,border-color 2.8s ease;z-index:20}
.studio-mode.mirror-awake .mirror:after{border-color:#ffffffdc;box-shadow:inset 0 0 0 3px #f5f5f5,0 0 18px 4px #fff7,inset 0 0 24px #fff3,0 0 0 9px #161719}
.studio-mode .preview-layers{opacity:0;transition:opacity 2.8s ease;filter:none}
.studio-mode.mirror-awake .preview-layers{opacity:1}
.studio-mode.mirror-waking #start{animation:mirror-pulse 1.4s ease-in-out infinite}
@keyframes mirror-pulse{50%{box-shadow:0 0 35px #ffffff70}}
.studio-mode .welcome{width:min(470px,calc(100% - 70px));left:50%;top:48%;transform:translate(-50%,-50%);background:transparent;border:0;box-shadow:none;backdrop-filter:none;padding:30px;text-align:center}
.studio-mode .welcome h2{font:32px Georgia,serif;letter-spacing:.5px;color:#f7f6f4}
.studio-mode .welcome p{color:#babcc2;max-width:340px;margin:20px auto;line-height:1.9}
.studio-mode .mirror-icon{display:none}
.studio-mode .primary{background:#f2f2f0;color:#242426;border-radius:40px}
.studio-mode .welcome .primary{min-height:54px;padding-inline:30px}
.studio-mode .sample-link,.studio-mode .photo-upload{color:#bfc0c5}
.studio-mode .topbar{padding:30px 34px;background:transparent}
.studio-mode .mirror-status{background:rgba(18,18,20,.6);color:#ddd;top:100px}
.studio-mode .mirror-status:before{background:#eee}
.studio-mode .edge-menu{position:fixed;top:50%;transform:translateY(-50%);z-index:15;transition:transform .4s ease;width:300px;max-height:calc(100dvh - 220px)}
.studio-mode .edge-right{right:0;transform:translate(calc(100% - 14px),-50%)}
.studio-mode .edge-left{left:0;width:104px;transform:translate(calc(-100% + 14px),-50%)}
.studio-mode .edge-menu:hover,.studio-mode .edge-menu:focus-within,.studio-mode .edge-menu.pinned{transform:translate(0,-50%)}
.studio-mode .edge-menu .controls-panel,.studio-mode .edge-menu .treatment-rail{position:relative;inset:auto;transform:none;width:100%;max-height:calc(100dvh - 220px);margin:0;border-radius:18px 0 0 18px}
.studio-mode .edge-menu .treatment-rail{padding:12px;background:var(--glass);border-radius:0 18px 18px 0}
.studio-mode .edge-handle{position:absolute;top:50%;transform:translateY(-50%);background:#252527d9;border:1px solid #ffffff40;border-radius:10px;color:#eee;writing-mode:vertical-rl;padding:15px 9px;font-size:11px;letter-spacing:1px;min-height:100px;backdrop-filter:blur(15px)}
.studio-mode .edge-right .edge-handle{right:100%}
.studio-mode .edge-left .edge-handle{left:100%}
.studio-mode:has(.welcome:not([hidden])) .edge-menu,.studio-mode:has(.welcome:not([hidden])) .mirror-actions{display:none}
.studio-mode .presets button.active,.studio-mode .treatment-rail button.selected{background:#eeeeea;border-color:#eee;color:#202124}
.studio-mode .controls-heading .eyebrow,.studio-mode .controls-heading>button,.studio-mode .effect p{color:#ccc}
.studio-mode .effect-options>label,.studio-mode .split-control{display:none!important}
.studio-mode .swatches button[aria-pressed=true]{outline-color:#fff}
.studio-mode .mirror-actions{gap:8px;bottom:max(30px,env(safe-area-inset-bottom))}
.studio-mode #compare,.studio-mode #after-view{order:0;min-width:68px}
.studio-mode .mirror-actions button[aria-pressed=true]{background:#eee;color:#202124;border-color:#fff}
.studio-mode #live-view{order:2}
.studio-mode .shutter-icon{background:#f3f3f1;box-shadow:0 0 0 2px #fff9,inset 0 0 0 3px #5556}
.studio-mode .studio-book{display:none}
@media(max-width:600px){
 .studio-mode .edge-right{width:230px}.studio-mode .edge-left{width:85px}
 .studio-mode .edge-menu .controls-panel{padding:16px}
 .studio-mode .topbar{padding:30px 26px}.studio-mode .brand{font-size:21px}
 .studio-mode .welcome{width:calc(100% - 65px);padding:16px}.studio-mode .welcome h2{font-size:27px}.studio-mode .welcome p{font-size:12px}
 .studio-mode .mirror-actions{width:calc(100% - 44px);flex-wrap:wrap}.studio-mode .mirror-actions button{min-width:48px;font-size:10px;padding:9px}
 .studio-mode #stop{position:absolute;bottom:85px;right:0}.studio-mode #live-view{max-width:80px}
}
@media(prefers-reduced-motion:reduce){.studio-mode .preview-layers,.studio-mode .mirror:after,.studio-mode .edge-menu{transition:none}.studio-mode.mirror-waking #start{animation:none}}

.studio-mode #retake{order:2}.studio-mode #retake[hidden]{display:none}

/* Treatment switches on the left; both brow choices on the right. */
.studio-mode .edge-left{width:270px}
.studio-mode .edge-menu .treatment-rail{display:block;padding:22px;overflow:auto;scrollbar-width:thin}
.studio-mode .treatment-rail .effect{padding:18px 0}
.studio-mode .treatment-rail .effect+.effect{border-top:1px solid var(--border)}
.studio-mode .treatment-rail .effect-head{display:flex;align-items:center;justify-content:space-between}
.studio-mode .treatment-rail .effect-options{display:none!important}
.studio-mode .treatment-rail .effect h3{font-size:16px}
.studio-mode .treatment-rail .effect p{line-height:1.7;max-width:165px}
.studio-mode .controls-panel .effect{padding-block:18px;border-top:1px solid var(--border)}
.studio-mode .controls-panel .effects{border:0}
.studio-mode .controls-panel .presets{margin:0;grid-template-columns:1fr}
.studio-mode .controls-panel .effect-options{padding-top:14px}
.studio-mode .controls-panel .swatches{margin:0;gap:12px;flex-wrap:wrap}
.studio-mode .toggle{flex:0 0 auto}
.studio-mode .controls-heading .eyebrow{font-size:9px}
.studio-mode #capture-dialog{max-width:min(960px,94vw);padding:24px}
.studio-mode #capture-image{max-height:65dvh;object-fit:contain}
@media(max-width:600px){.studio-mode .edge-left{width:220px}.studio-mode .edge-menu .treatment-rail{padding:16px}.studio-mode .treatment-rail .effect h3{font-size:14px}.studio-mode .treatment-rail .effect p{max-width:130px}.studio-mode #capture-dialog{padding:18px}.studio-mode #capture-dialog h2{font-size:18px}}

.studio-mode dialog{background:#252527;border-color:#ffffff40;color:#f6f6f3}.studio-mode dialog p{color:#c5c5c8}

.studio-mode .mirror-status.approximate{color:#f2dba9;border-color:#d6b87770;background:rgba(35,31,24,.82)}.studio-mode .mirror-status.approximate:before{background:#dfbd77}

/* A storybook welcome, inside a mirror surrounded by pure black. */
html:has(.studio-mode),.studio-mode,.studio-mode .mirror{background:#000}
.studio-mode .preview-layers{inset:18px;border-radius:14px;overflow:hidden}
.studio-mode:after{content:'';position:fixed;inset:0;border:10px solid #000;z-index:50;pointer-events:none}
.studio-mode #mirror-greeting{position:absolute;z-index:18;top:29%;left:50%;transform:translate(-50%,-50%);width:min(570px,calc(100% - 100px));text-align:center;pointer-events:none;color:#f9ebc9;text-shadow:0 2px 18px #000,0 0 30px #d1ad6350}
.studio-mode #mirror-greeting[hidden]{display:none}
.studio-mode #mirror-greeting p{font-family:Gabriola,'Palatino Linotype','Book Antiqua','Noto Serif Hebrew',Georgia,serif;font-size:clamp(24px,4.3vw,43px);font-style:italic;line-height:1.45;letter-spacing:.3px;margin:18px 0;animation:story-reveal 1.6s ease both}
.studio-mode #mirror-greeting.queen p{animation:queen-reveal 1.5s ease both}
.studio-mode .story-spark{font-size:24px;color:#e7c78d;display:block;text-shadow:0 0 18px #ebc57b80}
.studio-mode .welcome{top:62%;max-width:410px;padding-top:10px}
.studio-mode .welcome h2[hidden]{display:none}
.studio-mode .welcome p{margin:12px auto 20px}
.studio-mode:has(.welcome:not([hidden])) .edge-menu{display:block;pointer-events:none}
.studio-mode:has(.welcome:not([hidden])) .edge-menu .controls-panel,.studio-mode:has(.welcome:not([hidden])) .edge-menu .treatment-rail{visibility:hidden}
.studio-mode:has(.welcome:not([hidden])) .edge-handle{opacity:.24}
.studio-mode.menu-beacon .edge-handle{opacity:1;border-color:#d7c6ff;background:#201528d9;color:#f6ecff;box-shadow:0 0 12px #b892ff88,0 0 32px #ae80ec55,inset 0 0 13px #cbaaff30;text-shadow:0 0 9px #e2baff;animation:menu-neon 2s ease-in-out infinite}
@keyframes story-reveal{from{opacity:0;filter:blur(7px);transform:translateY(14px)}to{opacity:1;filter:blur(0);transform:translateY(0)}}
@keyframes queen-reveal{from{opacity:0;filter:blur(5px);transform:translateY(10px)}to{opacity:1;filter:blur(0);transform:translateY(0)}}
@keyframes menu-neon{50%{box-shadow:0 0 18px #c9a6ffaa,0 0 42px #b88af777,inset 0 0 18px #cbaaff50}}
@media(max-width:600px){.studio-mode #mirror-greeting{top:29%;width:calc(100% - 100px)}.studio-mode #mirror-greeting p{font-size:27px;line-height:1.5}.studio-mode .welcome{top:64%;width:calc(100% - 85px)}.studio-mode .welcome p{font-size:11px}.studio-mode .story-spark{font-size:20px}}
@media(max-height:550px){.studio-mode #mirror-greeting{top:30%;width:55%}.studio-mode #mirror-greeting p{font-size:22px;margin:8px 0}.studio-mode .story-spark{display:none}.studio-mode .welcome{top:70%;padding:5px}.studio-mode .welcome p{font-size:10px;line-height:1.5;margin:5px}.studio-mode .welcome .primary{min-height:38px;margin-top:0}}
@media(prefers-reduced-motion:reduce){.studio-mode #mirror-greeting p,.studio-mode #mirror-greeting.queen p,.studio-mode.menu-beacon .edge-handle{animation:none}}

.studio-mode.menu-beacon:has(.welcome:not([hidden])) .edge-handle{opacity:1}

@font-face{font-family:'Mirror Story';src:url('/src/fonts/IMFeENit28P.ttf') format('truetype');font-style:italic;font-weight:400;font-display:swap}
@font-face{font-family:'Mirror Hebrew';src:url('/src/fonts/FrankRuhlLibre.ttf') format('truetype');font-style:normal;font-weight:300 900;font-display:swap}
@font-face{font-family:'Mirror Brush Hebrew';src:url('/src/fonts/GveretLevin-Regular.ttf') format('truetype');font-style:normal;font-weight:400;font-display:swap}
.studio-mode #mirror-greeting p{font-family:'Mirror Story',Gabriola,Georgia,serif;font-size:clamp(29px,5vw,46px)}
:lang(he) .studio-mode #mirror-greeting p{font-family:'Mirror Hebrew',Georgia,serif;font-style:normal;font-weight:500}
.studio-mode .edge-right.dismissed{transform:translate(calc(100% - 14px),-50%)!important}
.studio-mode .edge-left.dismissed{transform:translate(calc(-100% + 14px),-50%)!important}
@media(max-width:600px){.studio-mode #mirror-greeting p{font-size:29px}}

:lang(he) .studio-mode #mirror-greeting p[data-i18n=mirrorSpell]{font-family:'Mirror Story',Gabriola,Georgia,serif;font-style:italic;font-weight:400;direction:ltr}

.studio-mode #mirror-greeting{top:34%}
.studio-mode #mirror-greeting .queen-line{font-size:24px;line-height:1.45;margin-top:24px;animation:queen-reveal 1.5s ease both}
.studio-mode #mirror-greeting .queen-line[hidden]{display:none}
.studio-mode .welcome{top:73%}
@media(max-width:600px){.studio-mode #mirror-greeting{top:34%}.studio-mode #mirror-greeting p[data-i18n=mirrorSpell]{font-size:26px}.studio-mode #mirror-greeting .queen-line{font-size:24px;margin-top:18px}.studio-mode .welcome{top:73%}}
@media(max-height:550px){.studio-mode #mirror-greeting{top:31%}.studio-mode #mirror-greeting p[data-i18n=mirrorSpell]{font-size:20px}.studio-mode #mirror-greeting .queen-line{font-size:18px;margin-top:10px}.studio-mode .welcome{top:77%}}

/* Keep the decoding video in the rendered page; do not display:none it. */
#video{opacity:.001;pointer-events:none}

.tracking-help{position:absolute;z-index:7;top:160px;left:50%;transform:translateX(-50%);width:min(360px,calc(100% - 90px));padding:16px 18px;border:1px solid #d6b16d80;border-radius:18px;background:#24211bed;color:#f8e9cd;box-shadow:0 8px 30px #0005;font-size:12px;text-align:start;line-height:1.6}
.tracking-help strong{display:block;margin-bottom:6px}.tracking-help p{font-size:11px;line-height:1.65}.tracking-help[hidden]{display:none}

/* Slim controls live in their own gutters, outside the camera image. */
.slim-studio .preview-layers{inset:100px 70px 110px;background:#090909;border-radius:8px}
.slim-studio .edge-menu{width:48px;max-height:calc(100dvh - 190px);display:flex;flex-direction:column;gap:8px;transform:translateY(-50%);overflow:visible}
.slim-studio .edge-left{left:18px}.slim-studio .edge-right{right:18px}
.slim-studio .edge-menu.dismissed{transform:translateY(-50%)!important}
.slim-studio .edge-handle{position:relative;inset:auto!important;transform:none;writing-mode:horizontal-tb;width:48px;height:44px;min-height:44px;padding:10px;border-radius:14px;letter-spacing:0}
.slim-studio svg{display:block;width:28px;height:28px}
.slim-studio .edge-menu .controls-panel,.slim-studio .edge-menu .treatment-rail{display:block;width:48px;padding:2px;border-radius:16px;background:#18181ce8;max-height:calc(100dvh - 170px);overflow:auto;scrollbar-width:none;opacity:0;visibility:hidden;pointer-events:none;transition:opacity .2s,transform .25s;transform:translateX(60px)}
.slim-studio .edge-left .treatment-rail{transform:translateX(-60px)}
.slim-studio .edge-menu:hover>section,.slim-studio .edge-menu:focus-within>section,.slim-studio .edge-menu.pinned>section{opacity:1;visibility:visible;pointer-events:auto;transform:none}
.slim-studio .edge-menu.dismissed>section{opacity:0;visibility:hidden;pointer-events:none}
.slim-studio .controls-heading .eyebrow,.slim-studio .controls-heading h2,.slim-studio .effect-head>div,.slim-studio .effect-mark,.slim-studio .controls-panel .effect-head{display:none}
.slim-studio .controls-heading{justify-content:center;gap:0}
.slim-studio #reset{width:44px;height:44px;min-height:44px;padding:0;font-size:23px;border:0}
.slim-studio .effect,.slim-studio .controls-panel .effect,.slim-studio .treatment-rail .effect{padding:0;border:0!important}
.slim-studio .effect-head{display:flex;justify-content:center}
.slim-studio .toggle{position:relative;width:44px;height:48px;display:grid;place-items:center;cursor:pointer}
.slim-studio .toggle input{position:absolute;inset:0;width:100%;height:100%;margin:0;opacity:0;cursor:pointer}
.slim-studio .toggle span{display:grid;place-items:center;width:40px;height:44px;border-radius:12px;background:transparent;border:0;transition:background .2s}
.slim-studio .toggle span:after{display:none}
.slim-studio .toggle input:checked+span{background:#e3d5ba;color:#262228;box-shadow:0 0 16px #e3d5ba20}
.slim-studio .toggle input:focus-visible+span,.slim-studio button:focus-visible{outline:2px solid #e3d5ba;outline-offset:-3px}
.slim-studio .controls-panel .effect-options{padding:0;display:block!important}
.slim-studio .controls-panel .presets{display:grid;grid-template-columns:1fr;gap:2px;padding-bottom:6px}
.slim-studio .presets button{width:44px;height:44px;min-height:44px;padding:0;border:0;border-radius:12px;font-size:15px;font-variant-numeric:tabular-nums}
.slim-studio .controls-panel .swatches{display:flex;flex-direction:column;gap:0;padding-top:6px;border-top:1px solid #ffffff25}
.slim-studio .swatches button{position:relative;width:44px;height:44px;min-height:44px;margin:0;border:0;border-radius:12px;background:transparent;box-shadow:none}
.slim-studio .swatches button:before{content:'';position:absolute;inset:10px;border-radius:50%;background:var(--swatch);border:1px solid #ffffff45}
.slim-studio .swatches button[aria-pressed=true]:before{outline:2px solid #e3d5ba;outline-offset:3px}
.slim-studio .mirror-status{top:auto;bottom:80px;max-width:calc(100% - 140px);font-size:10px;padding:5px 9px;background:#18181ce8}
.slim-studio .mirror-actions{bottom:18px;gap:16px;width:auto}
.slim-studio #stop{position:static;width:44px;height:44px;min-width:44px;min-height:44px;padding:0;font-size:24px}
.slim-studio #capture{width:52px;height:52px;min-width:52px;padding:0}
.slim-studio .shutter-icon{width:48px;height:48px}
.slim-studio .capture-caption{display:none}
.slim-studio .topbar{padding:25px 24px}
@media(max-width:480px){.slim-studio .brand{font-size:20px}.slim-studio .brand small{letter-spacing:2px;font-size:6px}.slim-studio .top-actions{gap:5px}.slim-studio .top-actions button{padding:0 10px;font-size:10px}.slim-studio .preview-layers{inset:90px 70px 110px}}
@media(max-height:620px){.slim-studio .edge-menu{top:100px;transform:none!important;max-height:calc(100dvh - 190px)}.slim-studio .edge-menu .controls-panel,.slim-studio .edge-menu .treatment-rail{max-height:calc(100dvh - 240px)}.slim-studio .preview-layers{inset:85px 70px 100px}}
@media(prefers-reduced-motion:reduce){.slim-studio .edge-menu>section{transition:none}}

.slim-studio .swatches button{outline:none}
.slim-studio .swatches button:focus-visible{outline:2px solid #e3d5ba;outline-offset:-3px}

/* Four direct edge controls; choices only appear on request. */
.compact-studio .edge-menu{top:50%;width:48px;transform:translateY(-50%)!important;max-height:none;gap:8px}
.compact-studio .edge-left .treatment-rail{opacity:1!important;visibility:visible!important;pointer-events:auto!important;transform:none!important;overflow:visible;background:transparent;border:0;padding:0}
.compact-studio .toggle span{width:44px;height:44px;border:1px solid #ffffff35;background:#18181ce8;backdrop-filter:blur(14px);border-radius:14px}
.compact-studio .toggle{height:48px}
.compact-studio .choice-trigger{width:44px;height:44px;min-height:44px;display:grid;place-items:center;padding:8px;border:1px solid #ffffff35;background:#18181ce8;color:#eee;border-radius:14px;backdrop-filter:blur(14px)}
.compact-studio .choice-trigger.selected,.compact-studio .choice-trigger[aria-expanded=true]{background:#e3d5ba;color:#262228;border-color:#e3d5ba}
.compact-studio .choice-popover{position:absolute;right:0;bottom:110px;width:48px;padding:2px;border:1px solid #ffffff35;border-radius:14px;background:#18181cf5;box-shadow:0 8px 30px #0006;max-height:calc(50dvh - 135px);overflow:auto;scrollbar-width:thin}
.compact-studio .choice-popover[hidden],.compact-studio .compact-choices{display:none!important}
.compact-studio .choice-popover .presets{display:grid;grid-template-columns:1fr;gap:0;margin:0}
.compact-studio .choice-popover .swatches{display:flex;flex-direction:column;gap:0;margin:0}
.compact-studio .choice-popover button{flex-shrink:0}
.compact-studio:has(.welcome:not([hidden])) .edge-menu{opacity:0;pointer-events:none;visibility:hidden}
.compact-studio.menu-beacon:has(.welcome:not([hidden])) .edge-menu{opacity:.75;visibility:visible;pointer-events:none}
.compact-studio.menu-beacon .choice-trigger,.compact-studio.menu-beacon .toggle span{box-shadow:0 0 15px #d8b4ce55;border-color:#e4bdd8}
@media(max-height:620px){.compact-studio .choice-popover{bottom:auto;top:110px;max-height:calc(50dvh - 130px)}}

/* Fill the illuminated mirror; controls float on its outer edges. */
.studio-mode.compact-studio .preview-layers{inset:18px;border-radius:14px;background:#000}

/* Keep the shutter above notifications, with close in the lower-left corner. */
.compact-studio .mirror-bottom{position:fixed;left:24px;right:24px;bottom:max(24px,env(safe-area-inset-bottom));z-index:16;display:grid;grid-template-columns:48px minmax(0,1fr) 48px;gap:4px 8px;align-items:end;pointer-events:none}
.compact-studio .mirror-bottom .mirror-actions{display:contents;position:static;transform:none}
.compact-studio .mirror-bottom #capture{position:static;grid-column:2;grid-row:1;justify-self:center;pointer-events:auto;transform:none;margin:0}
.compact-studio .mirror-bottom #stop{position:static;grid-column:1;grid-row:2;justify-self:start;pointer-events:auto;margin:0;transform:none}
.compact-studio .mirror-bottom .mirror-status{position:static;grid-column:2;grid-row:2;justify-self:center;max-width:100%;width:max-content;margin:0;padding:7px 10px;transform:none;text-align:center;font-size:10px;line-height:1.5;pointer-events:auto}
.compact-studio .mirror-bottom #retake{grid-column:3;grid-row:1/3;justify-self:end;pointer-events:auto;max-width:48px;min-width:0;padding:8px 4px;font-size:9px;white-space:normal}
.compact-studio:has(.welcome:not([hidden])) .mirror-bottom{display:none}

.compact-studio .mirror-bottom{direction:ltr}
html[dir="rtl"] .compact-studio .mirror-bottom .mirror-status{direction:rtl}

html[lang=he] .studio-mode #mirror-greeting p[data-i18n=mirrorSpell]{font-family:'Mirror Brush Hebrew','Mirror Hebrew',serif;font-style:normal;font-weight:400;direction:rtl;letter-spacing:0;line-height:1.7}

