:root{color-scheme:dark;--bg:#101015;--panel:#191923;--line:#30303d;--text:#f7f4fc;--muted:#aaa7bb;--accent:#b9a6ff;font-family:"Geist",Inter,system-ui,sans-serif}
*{box-sizing:border-box}
body{margin:0;background:radial-gradient(ellipse at 50% 0%,#231932 0%,#101015 68%);color:var(--text);min-height:100dvh}
button,a{-webkit-tap-highlight-color:transparent;font:inherit}
button:focus-visible,a:focus-visible{outline:2px solid white;outline-offset:4px}
button:disabled{opacity:.42;cursor:default}
.studio{max-width:1320px;margin:auto;padding:clamp(12px,3vw,36px) clamp(10px,3vw,36px) 18px}
.toolbar,.footer,.exports{display:flex;justify-content:space-between;align-items:center;gap:12px}
.toolbar{margin:0 0 16px}
.identity,.actions{display:flex;align-items:center;gap:10px}
.identity{gap:13px;min-width:0}
.brand{width:42px;height:42px;border-radius:13px;display:flex;flex:none;justify-content:center;align-items:center;gap:3px;background:#2f2444;border:1px solid #49365f}
.brand i{width:6px;height:6px;background:var(--accent);border-radius:50%}
.brand i:nth-child(2){transform:translateY(-5px)}
h1{font-size:clamp(16px,2.6vw,26px);letter-spacing:-.045em;margin:0;font-weight:750;line-height:1.05}
.identity p{color:var(--muted);margin:5px 0 0;font-size:12px}
.quiet,.record{border:1px solid #3b3749;border-radius:11px;background:#201d2a;color:var(--text);display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:42px;padding:8px 13px;font-size:13px;font-weight:650;white-space:nowrap;cursor:pointer;text-decoration:none}
.quiet:hover{background:#312a3d}
.quiet svg{width:16px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.record{background:#c3adff;color:#1a1226;border-color:#c3adff}
.record:hover{background:#dacaff}
.record-dot{background:#8b254f;width:9px;height:9px;border-radius:50%}
.record.is-recording{background:#532841;color:#ffe8f4;border-color:#88526e}
.record.is-recording .record-dot{background:#ff85a8;border-radius:2px}
.stage{width:100%;aspect-ratio:16/9;position:relative;overflow:hidden;border-radius:18px;background:#191421;box-shadow:0 0 0 1px #40364d,0 20px 56px #0005;isolation:isolate}
canvas{width:100%;height:100%;display:block}
#loading{position:absolute;inset:0;display:grid;place-content:center;margin:0;padding:20px;text-align:center;color:var(--muted);pointer-events:none}
#loading[hidden]{display:none}
.controls{display:flex;justify-content:center;align-items:center;gap:clamp(7px,2vw,20px);margin-top:9px;pointer-events:none}
.pad{--color:#e8c78a;pointer-events:auto;touch-action:none;user-select:none;appearance:none;border:1px solid color-mix(in srgb,var(--color) 70%,transparent);border-radius:50%;width:clamp(46px,7vw,76px);aspect-ratio:1;background:#15111de0;color:var(--color);box-shadow:0 4px 16px #0009,inset 0 0 0 4px #ffffff12;display:grid;place-items:center;cursor:pointer;font-size:clamp(16px,2.3vw,25px);font-weight:780;line-height:1;transition:background .12s,color .12s,box-shadow .12s}
.pad.center{--color:#c3adff}.pad.right{--color:#a5e0dd}
.pad.active{background:var(--color);color:#15111d;box-shadow:0 0 18px color-mix(in srgb,var(--color) 72%,transparent)}
.footer{margin:13px 1px 0;color:var(--muted);font-size:12px;flex-wrap:wrap}
.footer p{margin:0}
.exports{margin-top:15px;border:1px solid var(--line);border-radius:12px;padding:10px 12px;background:var(--panel);flex-wrap:wrap;font-size:13px}
.exports span{color:var(--muted);margin-left:8px}
[hidden]{display:none!important}
#exit-zone{display:none}
body.clean-mode{overflow:hidden;background:#000;overscroll-behavior:none}
.clean-mode .studio{position:fixed;inset:0;display:grid;place-items:center;max-width:none;margin:0;padding:0}
.clean-mode .toolbar,.clean-mode .footer,.clean-mode .exports{display:none}
.clean-mode .stage{width:min(100vw,177.778dvh);border-radius:0;box-shadow:none}
.clean-mode .pad{opacity:0;width:clamp(54px,12vw,122px);outline:none}
.clean-mode #exit-zone{position:absolute;top:8px;right:8px;display:inline-flex;touch-action:manipulation}
.hidden-mode #exit-zone{top:0;right:0;width:min(26%,150px);height:min(34%,112px);opacity:0}
#clean-dialog .actions,#record-dialog .actions{flex-wrap:wrap}
dialog{background:#211c2d;color:var(--text);border:1px solid #55456c;border-radius:16px;padding:20px;max-width:min(90vw,450px)}
dialog::backdrop{background:#09070bc9}
dialog h2{margin:0 0 12px;font-size:20px}
dialog p{color:#d3cadd;font-size:14px;line-height:1.5}
dialog .actions{margin-top:20px;justify-content:flex-end}
#video-dialog{max-width:min(94vw,920px)}
#video-dialog form{margin-bottom:10px;display:flex;justify-content:flex-end}
#video{display:block;max-width:100%;max-height:70dvh}
@media(max-width:620px){.brand{display:none}.actions{gap:6px}.quiet,.record{padding:7px 9px;min-height:38px;font-size:12px}.toolbar{margin-bottom:10px}.stage{border-radius:11px}}
@media(orientation:landscape) and (max-height:560px){.studio{max-width:calc((100dvh - 78px)*1.778 + 20px);padding:7px 10px}.toolbar{margin-bottom:7px}.brand,.identity p{display:none}.footer{margin-top:6px;font-size:10px}.quiet,.record{min-height:30px;padding:5px 8px}.pad{width:clamp(43px,10dvh,64px)}}

.scene-picker{display:flex;gap:7px;margin:0 0 10px}
.scene-picker .quiet{min-height:34px}
.scene-picker [aria-pressed="true"]{background:#38294d;border-color:#9277bf;color:#f2e8ff}
.clean-mode .scene-picker{display:none}
@media(orientation:landscape) and (max-height:560px){
  .studio{max-width:calc((100dvh - 108px)*1.778 + 20px)}
  .scene-picker{margin-bottom:6px}
  .scene-picker .quiet{min-height:24px;padding:3px 8px}
}


.scene-picker{flex-wrap:wrap}
#instagram{margin-left:auto}
.stage[data-format="post"]{aspect-ratio:4/5;width:min(100%,48dvh);margin-inline:auto}
.stage[data-format="reels"]{aspect-ratio:9/16;width:min(100%,35dvh);margin-inline:auto}
.stage[data-format]:not([data-format="wide"]) canvas:not(#export-frame){
  position:absolute;width:1px;height:1px;opacity:0;pointer-events:none
}
.clean-mode .stage[data-format="post"]{width:min(100vw,80dvh)}
.clean-mode .stage[data-format="reels"]{width:min(100vw,56.25dvh)}
.clean-mode .controls{position:fixed;inset:auto 0 max(8px,env(safe-area-inset-bottom));z-index:2}
.studio:has(#car-scene:not([hidden])) .pad:nth-child(1){order:3}
.studio:has(#car-scene:not([hidden])) .pad:nth-child(2){order:1}
.studio:has(#car-scene:not([hidden])) .pad:nth-child(3){order:2}
.studio:has(#car-scene:not([hidden])) .walk{order:4}
.walk{pointer-events:auto;min-width:70px;min-height:42px;touch-action:manipulation}
.walk[aria-pressed="true"],.format-options [aria-pressed="true"]{background:#38294d;border-color:#a68cdb;color:#f2e8ff}
.clean-mode .walk{opacity:0;min-height:54px}
.format-options{display:grid;gap:8px}
.format-options .quiet{justify-content:flex-start}
.exports .actions{flex-wrap:wrap}
#club-credit a{color:inherit}
@media(orientation:landscape) and (max-height:560px){
  body:not(.clean-mode) .studio{max-width:calc((100dvh - 155px)*1.778 + 20px)}
}
