
:root{font-family:Inter,'Segoe UI','Malgun Gothic',sans-serif;color:#e4e8f1;background:#0d1016;font-size:13px;color-scheme:dark}*{box-sizing:border-box}body{margin:0}button,input,select{font:inherit}button{border:1px solid #343c4d;background:#222936;color:#e4e8f1;border-radius:7px;padding:9px 12px;cursor:pointer;transition:background .15s}button:hover{background:#343e50}button:disabled{opacity:.35;cursor:not-allowed}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible{outline:2px solid #b7a0ff;outline-offset:3px}button.primary{background:#aa91fa;color:#18102c;border-color:#aa91fa;font-weight:700}button.primary:hover{background:#beaaff}.full{width:100%;margin-top:9px}.quiet{background:transparent;color:#c4b1ff}.danger{color:#ffb2b2}header{height:78px;border-bottom:1px solid #282e3b;display:flex;align-items:center;justify-content:space-between;padding:0 32px;background:#12161e}.brand{display:flex;align-items:center;gap:12px;font-size:30px;color:#b69aff;text-decoration:none}.brand span{font-size:14px;font-weight:800;letter-spacing:2px;color:#f1edf9}.brand small{display:block;font-size:10px;font-weight:400;letter-spacing:0;color:#929aae;margin-top:5px}.header-actions{display:flex;align-items:center;gap:10px}.badge{background:#292f40;border:1px solid #394256;border-radius:20px;font-size:10px;padding:5px 9px;color:#afb9cf;white-space:nowrap}main{max-width:1800px;padding:30px 28px 70px;margin:auto}.intro{display:flex;align-items:center;justify-content:space-between;margin-bottom:24px}.eyebrow{font-size:10px;font-weight:700;letter-spacing:2px;color:#a38ecf;margin-bottom:10px}h1{font-size:29px;letter-spacing:-1px;margin:0 0 10px}p{line-height:1.65;color:#98a2b6;margin:8px 0}h2{font-size:13px;margin:0 0 17px;color:#a58cd9}h2 span{color:#e5e7ed;margin-left:7px}h3{font-size:18px}.steps{display:flex;align-items:center;gap:25px;padding:15px 22px;border:1px solid #2d3444;border-radius:10px;background:#171c27;margin-bottom:22px;color:#c8cede}.steps span{display:flex;gap:10px;align-items:center}.steps b{border:1px solid #665184;background:#302440;border-radius:50%;width:24px;height:24px;display:grid;place-items:center;color:#c9afff}.steps i{color:#525b6f;font-style:normal}.workspace{display:grid;grid-template-columns:240px minmax(400px,1fr) 240px;gap:18px;align-items:start}.panel{background:#171c25;border:1px solid #2d3441;border-radius:12px;overflow:hidden}.settings,.output{padding:20px}.drop{border:1px dashed #675184;border-radius:10px;background:#211d30;text-align:center;padding:20px 10px;display:flex;align-items:center;flex-direction:column;gap:7px;cursor:pointer}.drop:hover,.drop.drag{background:#332541}.drop strong{font-size:25px;color:#b69aff}.drop small{line-height:1.7;color:#a39ab7}label{display:block;color:#a9b2c4;font-size:11px;margin-top:12px}input[type=number],select{display:block;width:100%;background:#10151e;border:1px solid #343e50;border-radius:6px;color:#e0e5ef;padding:9px;margin-top:7px;min-width:0}.two{display:grid;grid-template-columns:1fr 1fr;gap:10px}.hint{font-size:11px;color:#8e99ad}.settings hr,.output hr{border:0;border-top:1px solid #303746;margin:22px 0}video{width:100%;margin-top:10px;border-radius:6px;max-height:140px}.panel-title{display:flex;align-items:center;justify-content:space-between;padding:17px 18px;border-bottom:1px solid #303746;gap:8px}.panel-title h2{color:#e8eaf0;margin:0}.muted{font-size:10px!important;color:#8e99ad!important;font-weight:400}.toolbar{display:flex;gap:8px;align-items:center;flex-wrap:wrap;padding:12px;background:#141923}.toolgroup{display:flex;gap:4px}.toolbar button{padding:8px;font-size:11px}.active{background:#3e3159!important;border-color:#a98ae8!important;color:#e0cfff!important}.brush{display:flex;align-items:center;gap:5px;margin:0;font-size:10px}.brush input{width:65px;accent-color:#ac8ee9}.brush output{width:22px}.checker{background-color:#242a36;background-image:linear-gradient(45deg,#2e3543 25%,transparent 25%),linear-gradient(-45deg,#2e3543 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#2e3543 75%),linear-gradient(-45deg,transparent 75%,#2e3543 75%);background-size:24px 24px;background-position:0 0,0 12px,12px -12px,-12px 0}.stage{height:440px;overflow:auto;display:grid;position:relative;align-items:safe center;justify-items:safe center;padding:24px;isolation:isolate}.stage.dark{background:#101115}.stage.light{background:#e7e8eb}.stage canvas{display:block;touch-action:none;cursor:crosshair;max-width:none;image-rendering:pixelated;box-shadow:0 8px 40px #0003}.stage canvas[hidden]{display:none}#empty{text-align:center;background:#171c25ed;padding:28px 36px;border:1px solid #3a4050;border-radius:14px}#empty p{font-size:12px}.empty-icon{font-size:45px;color:#a58bcf}.editor-bottom{padding:10px 14px;display:flex;justify-content:space-between;align-items:center;gap:8px;border-top:1px solid #303746;font-size:10px;color:#969fb2}.editor-bottom div{display:flex;gap:5px}.editor-bottom select{padding:6px;font-size:10px;margin:0;width:auto}.timeline-head{padding:18px 16px 8px;display:flex;align-items:center;justify-content:space-between}.timeline-head h2{color:#e3e8ef;margin:0}.timeline-head button{font-size:11px;padding:7px 9px}.timeline{display:flex;gap:9px;overflow-x:auto;min-height:100px;padding:10px 16px}.frame{position:relative;flex:0 0 76px;padding:4px;background:#10151d;border:2px solid #343c4a;border-radius:8px}.frame.selected{border-color:#ba99ff;background:#31283f}.frame canvas{width:64px;height:64px;display:block;object-fit:contain}.frame small{display:block;font-size:10px;margin:4px 0 1px;color:#acb6c9}.timeline-tip{padding:0 16px 10px}.preview{border:1px solid #394050;border-radius:9px;overflow:hidden;aspect-ratio:1;display:grid;place-items:center}.preview canvas{width:100%;height:100%;object-fit:contain}.sheet-preview{margin-top:16px;border:1px solid #343e50;border-radius:7px;overflow:hidden}.sheet-preview canvas{display:block;width:100%;height:110px;object-fit:contain}footer{display:flex;justify-content:space-between;gap:15px;font-size:10px;color:#7c879e;margin-top:22px}footer i{display:inline-block;width:5px;height:5px;background:#8bc8ad;border-radius:50%;margin:0 8px}#status{position:fixed;bottom:0;left:0;right:0;min-height:35px;padding:10px 28px;background:#202536;border-top:1px solid #363e50;font-size:11px;z-index:10}#status.error{color:#ffb8b8}#busy{position:fixed;inset:0;background:#090c15b8;z-index:20;display:grid;place-items:center}#busy[hidden]{display:none}#busy>div{width:min(420px,90vw);padding:30px;border:1px solid #665082;background:#202132;border-radius:14px;display:flex;flex-direction:column;gap:18px}#busy small{font-size:11px;color:#b1afc4;line-height:1.7}progress{width:100%;accent-color:#ae8bf2}@media(min-width:1550px){.workspace{grid-template-columns:260px minmax(450px,1fr) 270px}.stage{height:530px}}@media(max-width:1150px){main{padding:24px 16px 65px}.workspace{grid-template-columns:220px minmax(360px,1fr)}.output{grid-column:1/-1;display:grid;grid-template-columns:200px 1fr 1fr;gap:12px;align-items:center}.output h2,.output hr,.output .eyebrow{display:none}.output .preview{grid-row:span 3}.output .hint{margin:0}.header-actions .badge{display:none}}@media(max-width:680px){header{padding:0 14px}.brand small{display:none}.brand span{font-size:10px}.header-actions button{font-size:10px;padding:8px}.intro{align-items:start;gap:12px}h1{font-size:23px}.intro p{font-size:11px}.eyebrow{font-size:8px}.steps{gap:7px;padding:10px;font-size:9px}.steps b{width:18px;height:18px}.steps span{gap:5px}.workspace{display:flex;flex-direction:column}.panel{width:100%}.output{display:block}.preview{max-width:240px;margin:auto}.stage{height:360px}footer{flex-direction:column}}


.stage.pink{background:#ed88b1}

.view-controls{display:flex;flex-wrap:wrap;justify-content:space-between;gap:10px;align-items:center;padding:12px 14px;background:#1c2230;border-top:1px solid #303746}
.play-controls,.zoom-controls{display:flex;align-items:center;gap:7px}.play-controls label{display:flex;align-items:center;gap:6px;margin:0}.play-controls input{width:58px;margin:0;padding:7px}.zoom-controls select{width:103px;margin:0;padding:8px}.view-controls button{padding:8px 10px}.view-hint{font-size:10px;margin:0;padding:0 14px 10px;background:#1c2230;color:#aab5c8}#playPosition{font-size:10px;color:#c5aff7;min-width:72px}.pan-tool canvas,.space-pan canvas,.pan-tool,.space-pan{cursor:grab!important}.stage.dragging,.stage.dragging canvas{cursor:grabbing!important}.settings input[type=range]{display:block;width:100%;margin-top:10px;accent-color:#b69aff}.settings output{float:right;color:#ccb6ff}#tolerance:disabled{opacity:.35}
@media(max-width:1150px){.output{display:block}.output h2,.output .eyebrow{display:block}}

.sample-controls{border:1px solid #4c4264;border-radius:8px;padding:12px;margin-top:16px;background:#201d2c}.sample-controls summary{cursor:pointer;font-size:12px;color:#d1bafd}.sample-color{display:flex;align-items:center;gap:8px;font-size:10px}.sample-color span{width:24px;height:24px;border:1px solid #83859b;background:transparent;border-radius:4px}.sample-check{display:flex;gap:7px;align-items:center}.sample-check input{accent-color:#b69aff}

/* Editing workspace stays within the window; side panels scroll independently. */
html,body{height:100%;overflow:hidden}header{height:60px;padding:0 18px;flex-shrink:0}main{height:calc(100dvh - 94px);max-width:none;padding:10px 14px;display:flex;flex-direction:column;min-height:0}.intro,footer{display:none}.steps{flex:0 0 auto;margin:0 0 10px;padding:7px 14px;gap:20px;font-size:11px}.steps b{width:21px;height:21px}.workspace{flex:1;min-height:0;position:relative;grid-template-columns:220px minmax(0,1fr) 230px;gap:12px;align-items:stretch}.workspace .settings,.workspace .output{height:100%;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:14px;scrollbar-gutter:stable}.workspace .editor{height:100%;min-height:0;display:flex;flex-direction:column;overflow:visible}.panel-title{padding:10px 12px;border-radius:12px 12px 0 0}.toolbar{padding:7px 10px;gap:6px}.toolgroup{flex-wrap:wrap}.view-controls{padding:7px 10px;gap:6px}.view-controls button{padding:6px 8px}.view-hint{padding:0 10px 5px;font-size:9px}.workspace .editor .stage{height:auto;flex:1;min-height:90px;padding:18px;overflow:auto}.editor-bottom{padding:6px 10px}.timeline-head{padding:7px 10px 4px}.timeline{flex:0 0 auto;min-height:79px;padding:5px 10px;gap:7px}.frame{flex-basis:63px;padding:3px}.frame canvas{width:53px;height:48px}.frame small{margin:2px 0 0}.timeline-tip{font-size:9px;padding:0 10px 5px;margin:2px 0}.panel-toggle{display:none}#status{height:34px;overflow:auto;padding:8px 14px;min-height:34px}.settings .drop{padding:12px 8px}.settings hr{margin:15px 0}.settings h2{margin-bottom:10px}
.sample-dock{flex:0 0 auto;position:relative;z-index:3;background:#242036;border-top:1px solid #50405f;border-bottom:1px solid #50405f;padding:8px 10px}.sample-actions{display:flex;gap:6px;align-items:center;flex-wrap:wrap}.sample-actions strong{font-size:11px;color:#d2baff;margin-right:3px}.sample-actions button{font-size:10px;padding:6px 8px}.sample-options{margin-left:auto;position:relative;font-size:10px;color:#c3b4db}.sample-options summary{cursor:pointer;padding:6px}.sample-options-body{position:absolute;top:30px;right:0;width:255px;max-height:min(450px,60vh);overflow:auto;padding:14px;background:#1d2230;border:1px solid #6c588c;border-radius:8px;box-shadow:0 10px 35px #0008;z-index:20}.sample-options-body label{margin-top:9px}.sample-options-body input[type=range]{display:block;width:100%;accent-color:#b69aff}.sample-options-body output{float:right}.sample-palette{display:flex;gap:6px;overflow-x:auto;align-items:center;min-height:34px;max-height:90px;padding:6px 0;overscroll-behavior:contain}.sample-empty{font-size:10px;color:#a99dbc}.sample-chip{display:flex;align-items:center;gap:5px;flex:0 0 auto;padding:5px 6px;border:1px solid #5c4b75;border-radius:7px;background:#171b29}.sample-chip-swatch{width:25px;height:25px;border-radius:4px;border:1px solid #9291a0}.sample-chip-text{display:flex;flex-direction:column;gap:3px}.sample-chip-text b{font-size:9px;font-weight:500}.sample-chip-text small{font-size:8px;color:#9ca6bb}.sample-chip-text .sample-blocked{color:#ffc98e}.sample-chip button{padding:4px 5px;font-size:9px}.sample-remove{border:0;font-size:15px!important;padding:1px 4px!important}.sample-help{font-size:9px;line-height:1.4;color:#c0b0d6;margin:0;max-height:28px;overflow:auto}.sample-check{margin-top:8px}
@media(max-height:760px){.steps{display:none}.view-hint,.timeline-tip{display:none}.workspace .editor .stage{min-height:70px}.sample-dock{padding:5px 8px}.panel-title{padding:6px 10px}.toolbar{padding:5px 8px}.sample-palette{padding:4px 0}.timeline{min-height:67px}.frame canvas{height:40px}}
@media(max-width:1100px){.workspace{display:block}.workspace .editor{width:100%;height:100%}.workspace .settings,.workspace .output{display:none;position:absolute;top:0;bottom:0;width:270px;z-index:12;box-shadow:0 8px 35px #000a}.workspace .settings{left:0}.workspace .output{right:0}.show-settings .workspace .settings,.show-output .workspace .output{display:block}.panel-toggle{display:inline-block}.header-actions .badge{display:none}.steps{gap:8px}.header-actions{gap:5px}header{padding:0 10px}.sample-options{margin-left:0}}
@media(max-width:680px){main{padding:6px}.steps{display:none}.header-actions button{padding:7px 5px;font-size:9px}.brand{gap:5px}.brand span{font-size:8px}.view-controls,.sample-actions{gap:4px}.sample-options-body{right:auto;left:0}.sample-actions button{padding:5px;font-size:9px}.zoom-controls select{width:90px}.toolbar button{padding:5px;font-size:10px}.sample-chip-text b{font-size:8px}}

/* Canvas-first layout: controls never consume a stack above the picture. */
.steps{display:none}.panel-toggle{display:inline-block}.workspace{display:block}.workspace .editor{width:100%;height:100%;position:relative}.workspace .settings,.workspace .output{display:none;position:absolute;top:0;bottom:0;width:280px;z-index:14;box-shadow:0 8px 35px #000b}.workspace .settings{left:0}.workspace .output{right:0}.show-settings .workspace .settings,.show-output .workspace .output{display:block}.editor-window-actions{display:flex;gap:6px}.panel-title{padding:6px 10px}.panel-title button{padding:6px 9px}.view-hint,.timeline-tip{display:none}.toolbar{padding:5px 10px;flex-shrink:0}.view-controls{padding:5px 10px;flex-shrink:0}.workspace .editor .stage{min-height:0;flex:1;padding:16px}.editor-bottom{padding:4px 10px}.editor-bottom #toolHelp{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.timeline-head{padding:4px 10px}.timeline{min-height:62px;padding:3px 10px}.frame canvas{height:34px;width:48px}.frame{flex-basis:58px}.frame small{font-size:9px}.sample-dock{display:none;position:absolute;top:95px;right:10px;width:345px;max-height:calc(100% - 120px);overflow-y:auto;border:1px solid #6c568c;box-shadow:0 8px 35px #0009;border-radius:10px;padding:10px;z-index:9}.show-sample-dock .sample-dock{display:block}.sample-actions{gap:6px}.sample-palette{flex-direction:column;align-items:stretch;max-height:230px;overflow-y:auto}.sample-chip{width:100%}.sample-chip-text{flex:1}.sample-help{max-height:65px;margin-top:5px}.sample-options{margin-left:0;width:100%}.sample-options-body{position:static;width:100%;max-height:none;box-shadow:none;border:0;padding:8px 0}.sample-options summary{padding:5px 0}.sample-actions strong{width:100%}.sample-actions button{font-size:11px;padding:7px}.sample-palette:empty{min-height:0}.sample-empty{line-height:1.6}
.focus-editor header,.focus-editor #status{display:none}.focus-editor main{height:100dvh;padding:3px}.focus-editor .timeline-head,.focus-editor .timeline,.focus-editor .editor-bottom{display:none}.focus-editor .panel-title{padding:4px 8px}.focus-editor .workspace .editor .stage{flex:1}.focus-editor .sample-dock{top:90px}.focus-editor .panel-title h2{font-size:11px}.focus-editor .view-controls{padding:3px 8px}
@container studio (min-width:1280px){.toolbar{padding-right:610px;min-height:42px}.view-controls{position:absolute;top:44px;right:8px;border:0;background:transparent;padding:4px 0;z-index:4;gap:4px}.play-controls{gap:5px}.zoom-controls{gap:4px}.zoom-controls select{width:128px}.zoom-controls #zoomReset{display:none}.focus-editor .view-controls{top:36px}.focus-editor .toolbar{min-height:42px}}
@container studio (max-width:1279px){.view-controls{position:static}.sample-dock{top:135px;max-height:calc(100% - 150px)}.focus-editor .sample-dock{top:130px}.editor-window-actions button{font-size:10px}.brand span{font-size:9px}}

.editor-bottom{display:none}.timeline-head{height:30px;min-height:30px;padding:0 8px}.timeline-head h2{display:flex;align-items:center;gap:6px}.timeline-head #backdrop{font-size:10px;padding:4px;width:108px;margin:0}.timeline-head button{font-size:10px;padding:4px 8px}

.sample-result{font-size:11px;line-height:1.6;color:#dcf9e6;background:#19382d;border:1px solid #407d61;border-radius:6px;padding:8px;margin:8px 0}.sample-result.error{color:#ffe1df;background:#48252a;border-color:#a85460}.sample-result[hidden]{display:none}

.region-dock{display:none;position:absolute;right:10px;top:95px;width:335px;max-height:calc(100% - 110px);overflow:auto;background:#202735;border:1px solid #75829d;border-radius:10px;padding:12px;z-index:10;box-shadow:0 8px 35px #0009}.show-region-dock .region-dock{display:block}.region-dock strong{font-size:12px}.region-dock label{font-size:11px;margin:10px 0}.region-dock input[type=range]{width:100%;accent-color:#c29cff}.region-dock output{float:right}.region-actions{display:flex;flex-wrap:wrap;gap:6px}.region-actions button{font-size:11px;padding:7px}.region-dock .hint{font-size:10px;line-height:1.6}.region-warning{font-size:9px;color:#ffcf7b;display:block}.frame:has(.region-warning){border-color:#d7a04f}@container studio (max-width:1279px){.region-dock{top:135px;max-height:calc(100% - 145px)}}.focus-editor .region-dock{top:90px}@container studio (max-width:1279px){.focus-editor .region-dock{top:130px}}

.advanced-removal{margin-top:12px;border-top:1px solid #41485b;padding-top:12px}.advanced-removal summary{font-size:12px;color:#c6badc;cursor:pointer;margin-bottom:12px}#operationNotice{position:fixed;bottom:14px;left:50%;transform:translateX(-50%);z-index:100;background:#202d3b;border:1px solid #7892b4;border-radius:8px;padding:12px 16px;max-width:min(680px,90vw);max-height:140px;overflow:auto;font-size:12px;box-shadow:0 8px 30px #0009}#operationNotice.error{background:#46252d;border-color:#e17d8e}#operationNotice[hidden]{display:none}

/* The ad space is a separate site column, never layered over the editor. */
body{--ad-column-width:332px;display:grid;grid-template-columns:minmax(760px,1fr) var(--ad-column-width);grid-template-rows:minmax(0,1fr);height:100dvh;min-width:0;overflow-x:auto;overflow-y:hidden}
.app-shell{container-type:inline-size;container-name:studio;grid-column:1;grid-row:1;min-width:0;min-height:0;height:100%;position:relative;display:flex;flex-direction:column;overflow:hidden}
.app-shell header{min-width:0;flex-shrink:0}
.app-shell main,.focus-editor .app-shell main{height:auto;width:100%;max-width:none;min-width:0;min-height:0;flex:1;margin:0}
.app-shell #status{position:static;flex:0 0 34px;width:100%;min-width:0}
.app-shell #busy{position:absolute;inset:0}
.app-shell #operationNotice{position:absolute;max-width:min(680px,90%)}
.ad-rail{grid-column:2;grid-row:1;min-width:0;min-height:0;height:100%;padding:18px 15px;border-left:1px solid #2b3442;background:#10151e;overflow:auto;overscroll-behavior:contain;display:flex;justify-content:center;align-items:flex-start}
.ad-container{width:300px;flex:0 0 auto;max-width:100%}
.ad-label{display:block;margin:0 0 8px;text-align:center;color:#7f8b9d;font-size:10px;letter-spacing:.12em}
.ad-slot{width:300px;height:600px;max-width:100%;overflow:hidden;background:#141c28;border:1px solid #2b394d;border-radius:8px;display:grid;place-items:center}
.ad-placeholder{display:flex;align-items:center;flex-direction:column;gap:12px;color:#8796af;font-size:13px;user-select:none;pointer-events:none}
.ad-placeholder-icon{font-size:30px;line-height:1;color:#5b6f91}.ad-size{font-size:11px;color:#64758e}.ad-size::after{content:'300 × 600'}
@container studio (max-width:767px){
 .app-shell header{height:auto;min-height:60px;flex-wrap:wrap;gap:6px;padding:7px 10px}.header-actions{flex-wrap:wrap;gap:4px}.header-actions button{padding:6px;font-size:10px}
 .panel-title{flex-wrap:wrap;flex-shrink:0}.panel-title h2{font-size:11px}.editor-window-actions{flex-wrap:wrap;gap:4px}.editor-window-actions button{padding:5px 6px;font-size:10px}
 .view-controls{gap:5px}.play-controls,.zoom-controls{flex-wrap:wrap}.sample-dock,.region-dock{width:min(335px,calc(100% - 16px));right:8px}
}
@media(max-height:700px){.ad-slot{height:250px}.ad-size::after{content:'300 × 250'}}
.editor-site-links{display:flex;flex-wrap:wrap;justify-content:center;gap:8px 14px;margin-top:22px;padding-top:16px;border-top:1px solid #303b4d}.editor-site-links a{font-size:11px;color:#aab6cc;text-decoration:none;padding:3px 0}.editor-site-links a:hover{color:#d5c1ff;text-decoration:underline}.editor-links-hint{text-align:center;font-size:10px;color:#75869f;margin:9px 0 0}

.empty-actions{display:flex;flex-wrap:wrap;justify-content:center;gap:10px;margin-top:20px}

/* Supplied brand artwork is displayed unchanged. */
.brand{flex:0 0 auto;line-height:0}.brand-logo{display:block;width:206px;height:54px;object-fit:contain;background:#fff;border-radius:5px}
@container studio (max-width:767px){.brand-logo{width:175px;height:46px}}
