:root{--bg:#121615;--panel:#1a201e;--panel-2:#202725;--panel-3:#29322f;--border:#303a36;--border-2:#3d4943;--ink:#eff2ec;--muted:#a0ada5;--dim:#738077;--accent:#ab78ff;--accent-dark:#21162f;--danger:#ff9d95;--shadow:0 12px 48px rgba(0,0,0,.38);color-scheme:dark;font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}
*,*::before,*::after{box-sizing:border-box}html,body{margin:0;min-height:100%;background:var(--bg);color:var(--ink)}body{height:100dvh;overflow:hidden;font-size:13px;line-height:1.45}button,input,select{font:inherit}button{cursor:pointer}button:disabled{cursor:not-allowed;opacity:.38}button, input, select{outline-offset:2px}button:focus-visible,input:focus-visible,select:focus-visible{outline:2px solid var(--accent)}.svg-defs{position:absolute;width:0;height:0;overflow:hidden}svg{width:18px;height:18px;flex:none;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}button svg{pointer-events:none}kbd{display:inline-flex;min-width:17px;justify-content:center;padding:1px 3px;border:1px solid #536059;border-radius:4px;font-size:9px;line-height:1.2;color:#9dad9e;font-family:inherit;font-weight:600}button{border:0;color:inherit;background:none;transition:background .13s,border-color .13s,color .13s,transform .13s}button:active:not(:disabled){transform:scale(.97)}
.app-header{height:72px;display:flex;align-items:center;gap:17px;padding:0 23px;border-bottom:1px solid var(--border);background:#171c1a;flex-shrink:0;position:relative;z-index:5}.brandmark{width:39px;height:39px;display:grid;place-items:center;border-radius:11px;background:var(--accent);box-shadow:0 0 20px #ab78ff14}.brandmark-shape{width:22px;height:22px;border:4px solid #1d2817;border-radius:5px;position:relative;transform:rotate(-14deg)}.brandmark-shape::after{content:"";position:absolute;left:7px;top:-7px;width:6px;height:22px;border-left:3px solid #1d2817;border-right:3px solid #1d2817;transform:rotate(54deg)}.brand-copy{display:flex;flex-direction:column;gap:1px;white-space:nowrap}.brand-kicker{font-size:9px;letter-spacing:1.7px;color:#c3adf0;font-weight:800}.brand-kicker span{color:var(--dim);padding:0 3px}.brand-copy strong{font-size:19px;font-weight:700;letter-spacing:-.55px}.header-divider{height:27px;border-left:1px solid var(--border);margin:0 8px}.header-actions{margin-left:auto;display:flex;align-items:center;gap:6px}.quiet-btn{display:inline-flex;align-items:center;gap:7px;min-height:35px;padding:6px 11px;border-radius:7px;color:#c1c9c1}.quiet-btn:hover{background:#2a332f;color:white}.quiet-btn svg{width:16px;height:16px}.quiet-btn.icon-only{width:35px;min-width:35px;height:35px;justify-content:center;padding:0}.primary-btn{background:var(--accent);color:#1c2a13;border:1px solid var(--accent);border-radius:8px;padding:9px 15px;font-weight:750;display:inline-flex;align-items:center;justify-content:center;gap:8px;white-space:nowrap;min-height:37px}.primary-btn:hover{background:#c49bff;border-color:#c49bff}.primary-btn svg{width:17px;height:17px;stroke-width:2.2}.secondary-btn{border-radius:7px;background:#29312e;border:1px solid #3b4841;padding:9px 11px;color:#e0e7dc;font-weight:600;display:inline-flex;justify-content:center;align-items:center;gap:7px;min-height:34px}.secondary-btn:hover{background:#353f3a;border-color:#6b806d}.secondary-btn.full{width:100%}.secondary-btn svg{width:15px;height:15px}.text-btn{color:#caa9ff;font-size:12px;font-weight:600;padding:4px 6px}.text-btn:hover{color:#f0e8ff}
.app-layout{height:calc(100dvh - 72px);display:grid;grid-template-columns:266px minmax(0,1fr) 302px;min-width:0}.panel-scroll{overflow:auto;min-height:0;scrollbar-color:#435047 transparent;scrollbar-width:thin}.left-panel,.right-panel{background:var(--panel);min-width:0}.left-panel{border-right:1px solid var(--border)}.right-panel{border-left:1px solid var(--border)}.pane-section{padding:20px 19px;border-bottom:1px solid #303a352e}.pane-section:last-child{border-bottom:0;padding-bottom:28px}.section-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;color:#b7c8b9;font-size:10px;font-weight:800;letter-spacing:1.35px;margin-bottom:15px}.section-heading .subtle{color:#5e7065;font-size:10px}.tiny-dot{width:6px;height:6px;background:var(--accent);border-radius:50%;box-shadow:0 0 0 3px #ab78ff15}.section-intro{font-size:12px;color:#a2aea4;margin:-6px 0 13px}.tool-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}.tool-btn{display:flex;flex-direction:column;gap:7px;align-items:center;justify-content:center;padding:10px 4px 8px;border:1px solid #3a4640;background:#242b28;border-radius:9px;min-height:70px;min-width:0;color:#c2ccc2}.tool-btn svg{width:21px;height:21px}.tool-btn span{font-size:10.5px;display:flex;align-items:center;gap:3px}.tool-btn kbd{color:#829184;min-width:14px;border:0;padding:0}.tool-btn.active{border-color:#ab78ff;background:#293b21;color:#e4d5ff;box-shadow:inset 0 0 0 1px #ab78ff35}.tool-btn.active kbd{color:#dbc9ff}.tool-btn:hover:not(.active){background:#2f3a33;border-color:#627263}.tool-hint{font-size:11px;color:#89998c;line-height:1.55;margin-top:13px;min-height:47px}
.field-row{margin:0 0 15px}.field-row:last-child{margin-bottom:0}.field-row>label,.field-line label,.field-row label{font-size:11px;font-weight:600;color:#b4c0b5;display:block;margin-bottom:6px}.field-line{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:7px}.field-line label{margin:0}.field-line output{font-size:11px;color:#efe8ff;font-variant-numeric:tabular-nums}.color-field{display:flex;gap:7px;align-items:center}.color-field input[type=color]{padding:0;width:44px;height:34px;cursor:pointer;border:2px solid #4b5850;border-radius:7px;background:none}.color-field input[type=text]{flex:1;min-width:0}input[type=text],input[type=number],select{width:100%;height:35px;color:#e7ede5;background:#242d29;border:1px solid #425047;border-radius:7px;padding:0 9px;min-width:0}select{appearance:none;padding-right:26px;background-image:url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" width="12" height="8" viewBox="0 0 12 8"%3E%3Cpath stroke="%2399aa96" fill="none" stroke-width="1.5" d="m1 1 5 5 5-5"/%3E%3C/svg%3E');background-position:right 11px center;background-repeat:no-repeat}input[type=number]{font-variant-numeric:tabular-nums}input[type=range]{width:100%;height:6px;appearance:none;border-radius:30px;background:#414e42;cursor:pointer;margin:8px 0;accent-color:var(--accent)}input[type=range]::-webkit-slider-thumb{appearance:none;width:15px;height:15px;border-radius:50%;background:var(--accent);border:3px solid #23311e;box-shadow:0 0 0 1px #ab78ff}input[type=range]::-moz-range-thumb{width:12px;height:12px;border-radius:50%;background:var(--accent);border:2px solid #23311e}.swatch-row{display:flex;gap:5px;justify-content:space-between;padding:2px 0}.swatch-row button{width:23px;height:23px;border-radius:50%;background:var(--swatch);border:2px solid #252b28;outline:1px solid #4a554c}.swatch-row button:hover{outline:2px solid var(--accent)}.two-fields{display:grid;grid-template-columns:1fr 1fr;gap:10px}.two-fields .field-row{margin-bottom:12px}.canvas-bg{margin-top:15px}.check-row{display:flex;gap:9px;align-items:center;font-size:12px;color:#abb9ac;cursor:pointer}.check-row input{accent-color:var(--accent);width:15px;height:15px;margin:0}.check-row.tight{margin:0 0 16px}.add-row{width:100%;display:flex;align-items:center;gap:11px;text-align:left;padding:10px 9px;border-radius:8px;border:1px solid transparent;color:#cbd7cb}.add-row:hover{background:#29342c;border-color:#41523d}.add-row>svg:first-child{width:19px;height:19px;color:var(--accent)}.add-row span{display:flex;flex-direction:column;gap:1px;flex:1}.add-row strong{font-size:12px;font-weight:650}.add-row small{font-size:10.5px;color:#879789}.add-row .end-icon{width:13px;height:13px;color:#758678}.small-muted{font-size:10.5px;line-height:1.55;color:#829286;margin:12px 0 0}
.main-area{min-width:0;min-height:0;display:flex;flex-direction:column;position:relative;background:#131817}.workspace-topbar{height:57px;padding:0 17px;display:flex;align-items:center;gap:14px;border-bottom:1px solid #2e3733;background:#1a211e;flex:none}.segmented{display:inline-flex;gap:3px;background:#111713;border-radius:9px;padding:4px;border:1px solid #303b33}.segmented button{padding:7px 11px;border-radius:6px;display:inline-flex;align-items:center;gap:7px;color:#94a596;font-size:12px;font-weight:650;white-space:nowrap}.segmented button svg{width:14px;height:14px}.segmented button.on{background:#3a483c;color:#e7f9d4;box-shadow:0 1px 5px #0005}.segmented button:not(.on):hover{color:#d9e8d8}.workspace-meta{display:flex;align-items:center;gap:8px;color:#859987;font-size:9px;letter-spacing:1.1px;font-weight:700;white-space:nowrap}.status-led{width:7px;height:7px;border-radius:50%;background:var(--accent);box-shadow:0 0 12px #ab78ff70}.workspace-top-actions{margin-left:auto;display:flex;align-items:center;gap:9px;color:#819489;font-size:11px;white-space:nowrap}.viewport{flex:1;min-height:0;position:relative;overflow:hidden;touch-action:none;background:#151a18}.viewport-backdrop{pointer-events:none;position:absolute;inset:0;background-image:radial-gradient(#66746b2b 1px,transparent 1px),radial-gradient(circle at 50% 42%,#202b2245,transparent 70%);background-size:21px 21px,100% 100%;background-position:10px 10px,0}.tile-holder{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);display:flex;align-items:center;flex-direction:column;gap:15px;will-change:transform}.tile-shell{position:relative;width:512px;height:512px;background-color:#f4f3ee;background-image:linear-gradient(45deg,#ddd 25%,transparent 25%),linear-gradient(-45deg,#ddd 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#ddd 75%),linear-gradient(-45deg,transparent 75%,#ddd 75%);background-size:22px 22px;background-position:0 0,0 11px,11px -11px,-11px 0;box-shadow:0 18px 50px #0009,0 0 0 1px #89918a70;outline:5px solid #d9e9c40b}.tile-shell canvas{display:block;position:absolute;inset:0;width:100%;height:100%}#interactionCanvas{touch-action:none;cursor:move}.tile-caption{font-size:10px;letter-spacing:1.65px;color:#788b7c;font-weight:700;white-space:nowrap;text-shadow:0 1px 4px #000}.tile-caption span{padding:0 7px;color:#5d725b}.stage-preview{position:absolute;inset:0;width:100%;height:100%;object-fit:fill}.hidden{display:none!important}.stage-badge{position:absolute;bottom:17px;left:18px;display:flex;gap:8px;align-items:center;padding:7px 10px;border:1px solid #354337;border-radius:6px;background:#1b261ee5;font-size:9px;color:#9cac98;letter-spacing:.8px;font-weight:750;pointer-events:none}.stage-badge svg{width:13px;height:13px;color:var(--accent)}.empty-note{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);pointer-events:none;width:min(320px,80%);text-align:center;display:flex;flex-direction:column;align-items:center;gap:9px;text-shadow:0 2px 3px #0005}.empty-note .empty-icon{border:1px solid #e2e5db2a;background:#202c2588;width:44px;height:44px;border-radius:14px;display:grid;place-items:center;color:var(--accent)}.empty-note strong{font-size:19px;color:#2c4035;text-shadow:none}.empty-note span:not(.empty-icon){font-size:12px;max-width:280px;color:#375342;text-shadow:none}.empty-note button{margin-top:8px;pointer-events:auto;color:#d6e8cc;background:#29372d}.workspace-footer{height:54px;padding:0 15px;display:flex;justify-content:space-between;align-items:center;gap:12px;border-top:1px solid #2e3733;background:#1a211e;flex:none}.zoom-controls{display:flex;align-items:center;gap:8px}.zoom-controls input{width:110px}.zoom-controls output{color:#cbd6c9;min-width:43px;text-align:right;font-size:12px;font-variant-numeric:tabular-nums}.footer-right{display:flex;align-items:center;gap:12px;color:#708274;font-size:11px;white-space:nowrap}.footer-sep{font-size:10px}
.live-badge{display:inline-flex;align-items:center;gap:5px;color:var(--accent);font-size:9px;letter-spacing:1px}.live-badge span{width:5px;height:5px;background:var(--accent);border-radius:50%;box-shadow:0 0 8px #ab78ff}.mini-preview-frame{height:205px;position:relative;border-radius:9px;overflow:hidden;background:#404a41;border:1px solid #475348}.mini-preview-frame canvas{display:block;width:100%;height:100%}.mini-preview-frame>button{position:absolute;top:8px;right:8px;width:30px;height:30px;border-radius:6px;background:#1c251ddf;border:1px solid #77897577;display:grid;place-items:center}.mini-preview-frame>button:hover{background:#364a36}.mini-preview-frame>button svg{width:16px;height:16px}.preview-scale{margin:15px 0 6px}.preview-tip{font-size:11px;color:#879c89;line-height:1.5}.layer-actions{display:flex;align-items:center;gap:6px;margin-bottom:11px}.layer-actions button{border:1px solid #3a493e;background:#29332d;border-radius:7px;padding:7px 8px;display:inline-flex;gap:6px;justify-content:center;align-items:center;flex:1;font-size:11px;color:#d2dfd1}.layer-actions button:hover{background:#354539}.layer-actions button svg{width:14px;height:14px}.layer-actions button.icon-only{flex:none;width:34px}.layer-actions button.icon-only:hover{color:var(--danger)}.layers-list{display:flex;flex-direction:column;gap:5px;min-height:50px}.layer-item{display:flex;align-items:center;gap:8px;border:1px solid #334039;background:#232c27;border-radius:9px;padding:8px 7px;cursor:grab;min-width:0}.layer-item.active{border-color:#ab78ff;background:#2a382b;box-shadow:inset 0 0 0 1px #ab78ff1c}.layer-item.drag-over{border-color:var(--accent);border-style:dashed}.layer-item .mini{width:41px;height:41px;flex:none;border-radius:6px;border:1px solid #64746766;background:#e1e3d9;background-image:linear-gradient(45deg,#c6ccc6 25%,transparent 25%),linear-gradient(-45deg,#c6ccc6 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#c6ccc6 75%),linear-gradient(-45deg,transparent 75%,#c6ccc6 75%);background-size:12px 12px;background-position:0 0,0 6px,6px -6px,-6px 0}.layer-label{min-width:0;flex:1;display:flex;flex-direction:column;gap:2px}.layer-label strong{font-size:11.5px;font-weight:650;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.layer-label small{font-size:10px;color:#859b8a;white-space:nowrap}.layer-item .layer-ctrls{display:flex;flex-direction:column;gap:1px}.layer-ctrls button{width:23px;height:20px;display:grid;place-items:center;border-radius:4px;color:#91a493}.layer-ctrls button:hover{background:#445148;color:white}.layer-ctrls button svg{width:14px;height:14px}.layer-tip{margin-top:10px}.property-divider{border-top:1px solid #39443c;margin:18px 0 13px}.transform-heading{margin-bottom:10px;font-size:10px;color:#a3b1a2;letter-spacing:1px;font-weight:750}.transform-actions{display:grid;grid-template-columns:repeat(3,1fr);gap:6px}.transform-actions button{font-size:10.5px;padding:7px 4px;white-space:nowrap}.flip-vertical{transform:rotate(90deg)}
.toast{position:fixed;left:50%;bottom:22px;transform:translate(-50%,15px);border:1px solid #52674c;border-radius:9px;background:#293b2bf5;color:#e4f1da;padding:11px 17px;max-width:min(450px,90vw);text-align:center;box-shadow:var(--shadow);opacity:0;pointer-events:none;transition:opacity .2s,transform .2s;z-index:40;font-size:12px}.toast.show{opacity:1;transform:translate(-50%,0)}.drag-cover{display:none;position:fixed;inset:12px;border:3px dashed var(--accent);border-radius:17px;background:#101b15ee;z-index:30;align-items:center;justify-content:center;pointer-events:none}.drag-cover.visible{display:flex}.drag-cover>div{display:flex;flex-direction:column;gap:12px;align-items:center;color:#c9e1bf}.drag-cover svg{width:42px;height:42px;color:var(--accent)}.drag-cover strong{font-size:25px}.drag-cover span{color:#a6b4a7}
.app-dialog{width:min(440px,calc(100vw - 32px));padding:0;background:#1e2721;border:1px solid #4b5b4b;border-radius:15px;color:var(--ink);box-shadow:0 28px 100px #000b;max-height:min(750px,85dvh);overflow:auto}.app-dialog::backdrop{background:#080d0aca;backdrop-filter:blur(4px)}.dialog-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;padding:21px 22px 15px;border-bottom:1px solid #354239}.dialog-heading h2{font-size:20px;letter-spacing:-.5px;margin:3px 0 0}.dialog-kicker{font-size:10px;color:var(--accent);letter-spacing:1.4px;font-weight:800}#dialogBody{padding:20px 22px 12px}#dialogBody p{color:#9daea0;margin:0 0 15px;font-size:12px;line-height:1.6}.dialog-buttons{padding:15px 22px 22px;display:flex;justify-content:flex-end;gap:8px}.dialog-buttons button{min-width:100px}.dialog-presets{display:grid;grid-template-columns:repeat(3,1fr);gap:7px;margin-bottom:16px}.dialog-presets button{padding:9px 7px;border:1px solid #445548;border-radius:7px;background:#27352b;color:#c2d7c4;font-size:11px}.dialog-presets button.active{border-color:var(--accent);color:var(--accent);background:#2d4327}.dialog-note{padding:11px 12px;border:1px solid #435542;background:#263629;border-radius:7px;margin-bottom:14px!important}.dialog-warning{color:#e8caa4!important}.dialog-input{width:100%;height:38px;margin:4px 0 13px}.dialog-label{display:block;color:#d9e7d7;font-size:12px;font-weight:650;margin-bottom:6px}.dialog-radios{display:flex;flex-direction:column;gap:11px;margin:8px 0 15px}.dialog-radios label{display:flex;gap:9px;align-items:center;color:#ccd9cb}.dialog-radios input{accent-color:var(--accent)}
@media(max-width:1270px){.app-layout{grid-template-columns:232px minmax(0,1fr) 272px}.pane-section{padding:17px 14px}.workspace-meta{display:none}.brand-copy strong{font-size:17px}.header-divider:not(.narrow){display:none}.app-header{padding:0 14px}.layer-actions button{font-size:10px}}
@media(max-width:980px){.app-layout{grid-template-columns:216px minmax(0,1fr) 246px}.header-actions .label-btn{padding:7px}.brand-kicker{font-size:8px}.tool-grid{gap:5px}.tool-btn{min-height:64px}.pane-section{padding:15px 11px}.workspace-topbar{padding:0 10px}.workspace-top-actions #dimensionBadge{display:none}.footer-right .keyhint,.footer-sep{display:none}.mini-preview-frame{height:170px}}
@media(max-width:740px){body{overflow:auto;height:auto;min-height:100dvh}.app-header{height:auto;min-height:66px;flex-wrap:wrap;padding:11px;gap:9px}.brandmark{width:35px;height:35px}.brand-copy strong{font-size:17px}.header-actions{width:100%;margin:0;justify-content:space-between;gap:3px}.header-actions .narrow{display:none}.header-actions .label-btn{font-size:11px}.header-actions .primary-btn{padding:8px 10px;font-size:11px}.app-layout{height:auto;display:flex;flex-direction:column}.main-area{order:1;min-height:470px;height:min(76dvh,700px)}.left-panel{order:2;border:0;border-top:1px solid var(--border);overflow:visible;display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}.right-panel{order:3;border:0;border-top:1px solid var(--border);overflow:visible;display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}.pane-section{padding:18px;border-right:1px solid #303a352e}.tool-btn{min-height:60px}.tool-hint{min-height:auto}.preview-section{grid-column:1}.layers-section{grid-column:2}.properties-section{grid-column:1/-1}.mini-preview-frame{height:190px}.viewport{min-height:300px}.tile-caption{font-size:8px}.stage-badge{font-size:8px;left:9px;bottom:9px}.empty-note{width:min(250px,70%)}.empty-note strong{font-size:15px}.empty-note span:not(.empty-icon){font-size:11px}}
@media(max-width:480px){.left-panel{display:block}.right-panel{display:block}.tool-grid{grid-template-columns:repeat(6,1fr)}.tool-btn{min-height:62px;padding:9px 2px}.tool-btn span{font-size:9px;gap:0}.tool-btn kbd{display:none}.brand-kicker{font-size:8px}.brand-copy strong{font-size:17px}.header-actions .label-btn span{display:none}.header-actions .label-btn{width:36px;justify-content:center}.header-actions .primary-btn span{font-size:11px}.workspace-topbar{height:52px}.workspace-top-actions{gap:0}.workspace-footer{height:49px}.zoom-controls input{width:90px}.mini-preview-frame{height:240px}.pane-section{padding:16px 18px}.tool-hint{min-height:0}.empty-note{max-width:75%}}

/* V0.1.1: prominent import action, quick transforms, and clear editing states. */
.import-cta{display:inline-flex;align-items:center;justify-content:center;gap:8px;border:1px solid #ab78ffa3;background:#2c3e26;color:#e4d5ff;border-radius:8px;padding:8px 13px;min-height:37px;font-size:12px;font-weight:800;white-space:nowrap}
.import-cta:hover{background:#405833;border-color:var(--accent);color:#f4eeff}
.import-cta svg{width:17px;height:17px;stroke-width:2.1}
.quick-transform-section{padding-top:17px;padding-bottom:16px;background:#1d2620}
.quick-transform-section .section-heading{margin-bottom:12px}
.quick-transform-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:7px}
.quick-transform-grid button{display:flex;align-items:center;justify-content:center;flex-direction:column;gap:5px;min-width:0;min-height:58px;padding:7px 3px 6px;background:#27332b;border:1px solid #435145;border-radius:8px;color:#d4e4d4;font-weight:650;font-size:9.5px;line-height:1.1}
.quick-transform-grid button svg{width:18px;height:18px;color:#cdb5ff;stroke-width:1.9}
.quick-transform-grid button:hover:not(:disabled){background:#385036;border-color:#ad85ff;color:#fff}
.quick-transform-grid button:disabled{opacity:.35;background:#252d28;color:#a6b4a8}
.quick-transform-hint{margin:10px 0 0;color:#839487;font-size:10.5px;line-height:1.4}
.flip-horizontal{transform:scaleX(-1)}
.layer-ctrls button.locking.is-locked{background:var(--accent);color:#1b2d14;border:1px solid #f4eeff;box-shadow:0 0 0 1px #ab78ff4d,0 0 10px #ab78ff3d}
.layer-ctrls button.locking.is-locked:hover{background:#c49bff;color:#14200e}
.layer-item.is-locked .layer-label small{color:#beafe1}
.mini-preview-frame>button.is-open{background:#ab78ff;color:#1b2c16;border-color:#d2b7ff}
.mini-preview-frame>button.is-open:hover{background:#c49bff}
@media(max-width:1270px){.quick-transform-grid{gap:5px}.quick-transform-grid button{font-size:9px;min-height:54px}}
@media(max-width:980px){.import-cta{padding:8px 9px;font-size:11px}.quick-transform-grid button{min-height:52px}}
@media(max-width:740px){.quick-transform-section{grid-column:1/-1}.quick-transform-grid{grid-template-columns:repeat(8,minmax(0,1fr))}.quick-transform-grid button{min-height:57px}}
@media(max-width:480px){.import-cta{min-width:120px;padding:7px 9px}.import-cta span{font-size:11px}.quick-transform-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}.quick-transform-grid button{min-height:61px;font-size:10px}}
/* Phone layout: dedicate the first row to the two primary entry/exit actions. */
@media(max-width:480px){
  .header-actions{display:grid;grid-template-columns:repeat(10,minmax(0,1fr));gap:5px;align-items:center}
  #headerImportBtn{grid-column:1/6;grid-row:1;width:100%;min-width:0}
  #exportBtn{grid-column:6/11;grid-row:1;width:100%;min-width:0}
  #newBtn{grid-column:1/3;grid-row:2}
  #openBtn{grid-column:3/5;grid-row:2}
  #saveBtn{grid-column:5/7;grid-row:2}
  #undoBtn{grid-column:7/9;grid-row:2}
  #redoBtn{grid-column:9/11;grid-row:2}
  .header-actions .quiet-btn{width:100%;min-width:0;padding:0;justify-content:center}
  .header-actions .import-cta{padding:7px 5px;white-space:nowrap}
  .header-actions .primary-btn{padding:7px 5px;white-space:nowrap}
}
@media(max-width:360px){.workspace-footer{padding:0 9px;gap:4px}.zoom-controls{gap:4px}.zoom-controls input{width:64px}}

/* v0.1.2: optional, non-exporting tile boundary guides. */
.preview-boundary-toggle{display:flex;align-items:center;gap:8px;width:100%;min-height:35px;margin:9px 0 0;padding:7px 9px;border-radius:7px;background:#27312a;border:1px solid #3b4c3c;color:#bacdb7;font-size:11px;font-weight:650;text-align:left}
.preview-boundary-toggle svg{width:15px;height:15px;flex:none;color:#b89ce6}
.preview-boundary-toggle span{flex:1;min-width:0}
.preview-boundary-toggle small{flex:none;font-size:8px;letter-spacing:.55px;font-weight:750;color:#97979d}
.preview-boundary-toggle:hover{border-color:#ab78ff;background:#303d2e;color:#e5f1db}
.preview-boundary-toggle.active{border-color:#ab78ff;background:#30412b;color:#f0e8ff}
.preview-boundary-toggle.active svg,.preview-boundary-toggle.active small{color:#ab78ff}
.preview-boundary-toggle:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.preview-scale{margin-top:13px}

/* v0.2.0: playful pattern playground and repeat-style controls. */
.repeat-choice{margin:12px 0 10px}.repeat-choice .field-line{margin-bottom:7px}
.repeat-choice select{font-weight:650;color:#e6f5d8;cursor:pointer}
.style-tag{color:#ab78ff;font-size:9px;font-weight:800;letter-spacing:.8px}
.repeat-explainer{font-size:10.5px;color:#91a68f;line-height:1.55;margin:7px 0 0}
.playground-section{background:linear-gradient(150deg,#202a22,#1c2520 80%)}
.playground-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}
.playground-grid button{min-width:0;min-height:79px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;border:1px solid #445c3c;background:#2a392b;border-radius:9px;text-align:center;padding:8px 3px;color:#dcebd1}
.playground-grid button svg{width:19px;height:19px;color:#ab78ff;margin-bottom:3px}
.playground-grid button strong{font-size:10.5px;line-height:1.2}
.playground-grid button small{color:#96ad92;font-size:9px;line-height:1.3}
.playground-grid button:hover{background:#3a5337;border-color:#ab78ff}
.playground-note{margin-top:9px}
.seam-report{margin-top:12px;border:1px solid #59515f;border-radius:9px;padding:11px;background:#273a2c;color:#d9e8d1;font-size:10.5px}
.seam-report>strong{display:block;font-size:11px;color:#e1cfff;margin-bottom:8px}
.seam-report>div{display:grid;grid-template-columns:1fr auto;gap:0 8px;border-top:1px solid #486046;padding:7px 0}
.seam-report>div small{grid-column:1/-1;color:#aebfac}
.seam-report>div b{font-variant-numeric:tabular-nums;color:#e8eedb}
.seam-report p{font-size:10px;color:#9eb69c;line-height:1.45;margin:7px 0 0}
@media(max-width:980px){.playground-grid{gap:4px}.playground-grid button strong{font-size:9.5px}.playground-grid button small{font-size:8.5px}}
@media(max-width:740px){.playground-section{grid-column:1/-1}}
@media(max-width:480px){.playground-grid button{min-height:68px}.playground-grid button strong{font-size:11px}.playground-grid button small{font-size:10px}}

/* v0.2.1: Green Macaroni navigation, Guide, and companion apps. */
.brand-links{display:flex;align-items:center;gap:7px;margin-top:1px;font-size:10px;line-height:1.15;letter-spacing:.15px;white-space:nowrap}
.brand-links a{color:#bac8b5;text-decoration:none;font-weight:650;border-bottom:1px solid transparent;padding-bottom:1px}
.brand-links a.guide-link{color:#cdb5ff}
.brand-links a:hover,.brand-links a:focus-visible{color:#f4eeff;border-bottom-color:currentColor}
.brand-links span{color:#6f7e71}
.gm-brand-link{color:inherit;text-decoration:none;border-bottom:1px solid transparent}
.gm-brand-link:hover,.gm-brand-link:focus-visible{color:#e4d5ff;border-bottom-color:currentColor}
.companion-section{background:linear-gradient(165deg,#1d2920,#19211d)}
.companion-intro{margin:-4px 0 13px;color:#a9bbac;font-size:11px;line-height:1.55}
.companion-links{display:grid;gap:7px}
.companion-links a{display:flex;flex-direction:column;gap:4px;text-decoration:none;padding:10px 12px;background:#273229;border:1px solid #3f5141;border-radius:8px;transition:border-color .15s,background .15s}
.companion-links a:hover,.companion-links a:focus-visible{background:#334632;border-color:#ab78ff;outline:none}
.companion-links a strong{font-size:11.5px;display:flex;justify-content:space-between;align-items:center;color:#ddc9ff}
.companion-links a strong span{font-size:13px;color:#bea0ed}
.companion-links a small{font-size:10.25px;line-height:1.4;color:#a4b5a5}
.ecosystem-hub-link{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:12px 2px 0;color:#cdb5ff;font-weight:750;font-size:11px;text-decoration:none}
.ecosystem-hub-link:hover{text-decoration:underline}
#companionApps{scroll-margin-top:16px}
@media(max-width:740px){.companion-section{grid-column:1/-1}}
@media(max-width:480px){.brand-links{font-size:10px;gap:6px}.brand-copy{max-width:calc(100% - 54px)}.app-header{align-items:flex-start}.brandmark{margin-top:2px}}

/* Explicit layer-only fill; default empty-area fill updates the separate canvas backing. */
.fill-layer-choice{margin-top:10px;padding:8px 9px;border:1px solid #405043;border-radius:7px;background:#222d25;line-height:1.3}.fill-layer-choice small{font-size:10px;color:#93a793;font-weight:500}

/* Background: an independent, fixed bottom layer with the same visibility language
   as artwork layers. Only its colour and visibility are editable. */
.background-layer{cursor:default;border-color:#405248;background:#202a24}
.background-layer .layer-label{cursor:pointer}
.background-layer .layer-label:hover strong{color:var(--accent)}
.background-mini{width:41px;height:41px;flex:none;border:1px solid #84968a;border-radius:6px;cursor:pointer;
 background-color:#f3f3eb;
 background-image:linear-gradient(45deg,#cbd1c7 25%,transparent 25%),linear-gradient(-45deg,#cbd1c7 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#cbd1c7 75%),linear-gradient(-45deg,transparent 75%,#cbd1c7 75%);
 background-size:12px 12px;background-position:0 0,0 6px,6px -6px,-6px 0;
 position:relative;overflow:hidden}
.background-mini::after{content:"";position:absolute;inset:3px;border-radius:3px;background:var(--background-swatch,#f3f0e8);border:1px solid #10181238}
.background-layer.background-hidden .background-mini::after{inset:13px 3px 3px 13px;opacity:.65}
.background-layer.background-hidden .layer-label strong{color:#8ea092}
.background-locked{display:grid;place-items:center;width:23px;height:20px;color:#677a69}
.background-locked svg{width:13px;height:13px}
.background-visibility[aria-pressed="true"]{color:#d8c2ff}
.background-layer.background-hidden{border-style:dashed}

/* Explicit fill target: background versus a paint/image layer, never alpha guessing. */
.fill-target-choice{margin-top:12px;border:1px solid #405043;border-radius:9px;background:#222d25;padding:10px}
.fill-target-label{display:flex;align-items:center;justify-content:space-between;gap:4px;color:#b6c7b6;font-weight:800;font-size:10px;letter-spacing:.8px;margin-bottom:8px}
.fill-target-label span{font-size:9px;color:#88a08d;letter-spacing:0;font-weight:500}
.fill-target-buttons{display:grid;grid-template-columns:1fr 1fr;gap:5px}
.fill-target-buttons button{border:1px solid #48584a;background:#25322a;border-radius:7px;padding:9px 4px;color:#b9c8b9;font-size:11px;font-weight:700;min-width:0}
.fill-target-buttons button[aria-pressed="true"]{border-color:#ab78ff;color:#f0e8ff;background:#2e4427;box-shadow:inset 0 0 0 1px #ab78ff38}
.fill-target-buttons button:not([aria-pressed="true"]):hover{background:#344537;color:white}
.fill-target-hint{margin-top:8px;font-size:10.5px;line-height:1.45;color:#98ad9c}


/* v0.2.7 — Neutral Studio theme.
   Keep Green Macaroni's distinctive violet accents and selected/primary controls, but make all
   passive interface surfaces achromatic to avoid perceptual colour contamination
   while judging artwork. This section is visual-only; project/canvas colours are
   intentionally NOT touched. */
:root{
  --bg:#151517;
  --panel:#1c1c1e;
  --panel-2:#242426;
  --panel-3:#2d2d30;
  --border:#37373a;
  --border-2:#48484c;
  --ink:#f0f0f2;
  --muted:#b2b2b7;
  --dim:#85858b;
  /* --accent is #ab78ff */
}
html,body{background:var(--bg)}
.app-header{background:#19191b}
.left-panel,.right-panel{background:var(--panel)}
.panel-scroll{scrollbar-color:#505054 transparent}
.pane-section{border-bottom-color:#34343730}
.section-heading{color:#c5c5c8}
.section-heading .subtle{color:#79797e}
.section-intro,.tool-hint,.small-muted{color:#a7a7ac}
.brand-kicker{color:#a0a0a4}
.brand-kicker span,.brand-links span{color:#7b7b80}
.brand-links a:not(.guide-link){color:#b8b8bd}
.quiet-btn{color:#c7c7cb}
.quiet-btn:hover{background:#303033;color:#fff}
.secondary-btn{background:#2a2a2d;border-color:#47474b;color:#e4e4e6}
.secondary-btn:hover{background:#353539;border-color:#76767d}
.tool-btn{background:#28282b;border-color:#424247;color:#cbcbcf}
.tool-btn:hover:not(.active){background:#333337;border-color:#6e6e73}
.tool-btn.active{background:#303034;border-color:var(--accent);color:#e4d5ff}
.tool-btn kbd{color:#99999f}
.field-row>label,.field-line label,.field-row label{color:#c0c0c5}
.field-line output{color:#e4e4e6}
.color-field input[type=color]{border-color:#606065}
input[type=text],input[type=number],select{background:#28282b;border-color:#505055;color:#ededf0}
select{background-image:url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" width="12" height="8" viewBox="0 0 12 8"%3E%3Cpath stroke="%23a4a4a9" fill="none" stroke-width="1.5" d="m1 1 5 5 5-5"/%3E%3C/svg%3E');background-repeat:no-repeat;background-position:right 11px center}
input[type=range]{background:#505055}
input[type=range]::-webkit-slider-thumb{border-color:#303034}
input[type=range]::-moz-range-thumb{border-color:#303034}
.swatch-row button{border-color:#2b2b2e;outline-color:#5a5a60}
.check-row{color:#bcbcc1}
.add-row{color:#d5d5d8}
.add-row:hover{background:#303033;border-color:#56565b}
.add-row small,.add-row .end-icon{color:#a0a0a5}
.main-area{background:#151517}
.workspace-topbar,.workspace-footer{background:#1d1d20;border-color:#37373a}
.segmented{background:#151517;border-color:#3d3d41}
.segmented button{color:#a5a5ab}
.segmented button.on{background:#39393d;color:#f1f1f3}
.segmented button:not(.on):hover{color:#e8e8ea}
.workspace-meta,.workspace-top-actions{color:#a1a1a5}
.viewport{background:#171719}
.viewport-backdrop{background-image:radial-gradient(#77777f29 1px,transparent 1px),radial-gradient(circle at 50% 42%,#45454b24,transparent 70%)}
.tile-shell{box-shadow:0 18px 50px #0009,0 0 0 1px #99999d70;outline-color:#dddde00b}
.tile-caption{color:#96969c}
.tile-caption span{color:#74747a}
.stage-badge{background:#232326e5;border-color:#4a4a4d;color:#b7b7bd}
.empty-note .empty-icon{background:#28282b88}
.empty-note strong{color:#353538}
.empty-note span:not(.empty-icon){color:#59595e}
.empty-note button{background:#303034;color:#e3e3e5}
.zoom-controls output{color:#d0d0d4}
.footer-right{color:#8f8f96}
.mini-preview-frame{background:#444448;border-color:#55555b}
.mini-preview-frame>button{background:#202023e8;border-color:#70707577}
.mini-preview-frame>button:hover{background:#39393d}
.preview-tip,.repeat-explainer{color:#a2a2a7}
.layer-actions button{background:#2a2a2d;border-color:#49494e;color:#dddddf}
.layer-actions button:hover{background:#37373b}
.layer-item{background:#262629;border-color:#414146}
.layer-item.active{background:#303034;border-color:#ab78ff}
.layer-item .mini{border-color:#85858b66;background-color:#e3e3e3;background-image:linear-gradient(45deg,#c8c8c8 25%,transparent 25%),linear-gradient(-45deg,#c8c8c8 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#c8c8c8 75%),linear-gradient(-45deg,transparent 75%,#c8c8c8 75%)}
.layer-label small,.layer-ctrls button{color:#a4a4aa}
.layer-ctrls button:hover{background:#444448;color:#fff}
.property-divider{border-color:#424246}
.transform-heading{color:#babac0}
.toast{background:#29292df5;border-color:#5b5b60;color:#f0f0f2}
.drag-cover{background:#151519ee}
.drag-cover>div,.drag-cover span{color:#d1d1d6}
.app-dialog{background:#232326;border-color:#55555a}
.app-dialog::backdrop{background:#09090bcc}
.dialog-heading{border-color:#414146}
#dialogBody p{color:#b4b4ba}
.dialog-presets button{background:#2b2b2f;border-color:#515156;color:#d7d7dc}
.dialog-presets button.active{background:#333337;border-color:var(--accent);color:var(--accent)}
.dialog-note{background:#2a2a2e;border-color:#55555b}
.dialog-label,.dialog-radios label{color:#e3e3e6}
/* Keep prominent Import and Export controls in the Seamless Tile Builder violet. */
.quick-transform-section{background:#202023}
.quick-transform-grid button{background:#2b2b2f;border-color:#49494e;color:#dcdce0}
.quick-transform-grid button:hover:not(:disabled){background:#39393d;border-color:#ab78ff}
.quick-transform-grid button:disabled{background:#29292c;color:#a7a7ac}
.quick-transform-hint{color:#a0a0a6}
.preview-boundary-toggle{background:#2a2a2d;border-color:#4d4d52;color:#c9c9ce}
.preview-boundary-toggle svg,.preview-boundary-toggle small{color:#a2a2a9}
.preview-boundary-toggle:hover{background:#353539;border-color:#ad85ff;color:#f0f0f2}
.preview-boundary-toggle.active{background:#333337;border-color:var(--accent);color:#f0e8ff}
.repeat-choice select{color:#ededf0}
.playground-section{background:#202023}
.playground-grid button{background:#2d2d31;border-color:#505056;color:#e4e4e7}
.playground-grid button small{color:#a6a6ab}
.playground-grid button:hover{background:#3b3b40;border-color:var(--accent)}
.seam-report{background:#2b2b2f;border-color:#5a5a5f;color:#e0e0e4}
.seam-report>div{border-color:#4d4d52}
.seam-report>div small,.seam-report p{color:#b8b8be}
.seam-report>div b{color:#f0f0f2}
.companion-section{background:#212124}
.companion-intro{color:#b4b4b9}
.companion-links a{background:#2b2b2f;border-color:#505057}
.companion-links a:hover,.companion-links a:focus-visible{background:#38383d;border-color:#ab78ff}
.companion-links a small{color:#b5b5ba}
.fill-layer-choice,.fill-target-choice{background:#28282b;border-color:#4c4c51}
.background-layer{background:#29292d;border-color:#48484e}
.background-mini{border-color:#97979c;background-color:#f3f3f3;background-image:linear-gradient(45deg,#cecece 25%,transparent 25%),linear-gradient(-45deg,#cecece 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#cecece 75%),linear-gradient(-45deg,transparent 75%,#cecece 75%)}
.background-mini::after{border-color:#18181838}
.background-layer.background-hidden .layer-label strong{color:#aaaab0}
.background-locked{color:#919197}
.fill-target-label{color:#d0d0d5}
.fill-target-label span,.fill-target-hint{color:#aaaab0}
.fill-target-buttons button{background:#2c2c30;border-color:#525258;color:#c8c8ce}
.fill-target-buttons button[aria-pressed="true"]{background:#353539;border-color:var(--accent);color:#f0e8ff}
.fill-target-buttons button:not([aria-pressed="true"]):hover{background:#3b3b40}

/* v0.2.8 — Seamless Tile Builder signature violet (#ab78ff).
   Accent colours change; neutral workspace, artwork colours, swatches and rendering stay untouched. */
:root{--accent:#ab78ff;--accent-dark:#21162f}
.primary-btn{color:#170e24}
.primary-btn:hover{background:#c49bff;border-color:#c49bff}
.brandmark-shape,.brandmark-shape::after{border-color:#20132d}
.brandmark{box-shadow:0 0 20px #ab78ff29}
.tiny-dot{box-shadow:0 0 0 3px #ab78ff25}
.status-led,.live-badge span{box-shadow:0 0 12px #ab78ff80}
.import-cta{background:#30263e;border-color:#ab78ffb3;color:#e4d5ff}
.import-cta:hover{background:#423357;border-color:var(--accent);color:#f0e7ff}
.text-btn{color:#c6a8ff}
.text-btn:hover{color:#e0d0ff}
.tool-btn.active{background:#303034;border-color:var(--accent);color:#ebdfff;box-shadow:inset 0 0 0 1px #ab78ff3d}
.tool-btn.active kbd{color:#cdb5ff}
.layer-item.active{background:#303034;border-color:var(--accent);box-shadow:inset 0 0 0 1px #ab78ff26}
.layer-ctrls button.locking.is-locked{background:var(--accent);color:#170d26;border-color:#d5bdff;box-shadow:0 0 0 1px #ab78ff55,0 0 10px #ab78ff43}
.layer-ctrls button.locking.is-locked:hover{background:#c49bff;color:#170d26}
.mini-preview-frame>button.is-open{background:var(--accent);color:#170d26;border-color:#d5bdff}
.mini-preview-frame>button.is-open:hover{background:#c49bff}
.quick-transform-grid button svg,.playground-grid button svg{color:#b898ff}
.quick-transform-grid button:hover:not(:disabled){background:#39393d;border-color:var(--accent)}
.brand-links a.guide-link,.gm-brand-link:hover,.gm-brand-link:focus-visible{color:#c6a8ff}
.brand-links a:hover,.brand-links a:focus-visible{color:#e4d8ff}
.companion-links a strong,.companion-links a strong span,.ecosystem-hub-link{color:#cbb2ff}
.companion-links a:hover,.companion-links a:focus-visible{background:#38383d;border-color:var(--accent)}
.preview-boundary-toggle:hover{background:#353539;border-color:#ae8aff;color:#f0f0f2}
.preview-boundary-toggle.active{background:#333337;border-color:var(--accent);color:#e8dbff}
.preview-boundary-toggle.active svg,.preview-boundary-toggle.active small{color:var(--accent)}
.style-tag{color:var(--accent)}
.seam-report>strong{color:#d8c5ff}
.background-visibility[aria-pressed="true"]{color:#b898ff}
.fill-target-buttons button[aria-pressed="true"]{background:#353539;border-color:var(--accent);color:#eadfff;box-shadow:inset 0 0 0 1px #ab78ff35}


/* v0.2.9 — Contrast pass for the violet interface.
   Stronger contrast on the light empty tile; readable small labels on dark
   active controls. No artwork or brush colours are changed here. */
.empty-note .empty-icon{
  background:#292330;
  border:1px solid #8160b3;
  color:#decaff;
  box-shadow:0 2px 10px #00000025;
  text-shadow:none;
}
.empty-note .empty-icon svg{width:23px;height:23px;stroke-width:2.15}
/* #ab78ff works nicely for borders, but small lettering needs a lighter tint. */
.dialog-kicker,.dialog-presets button.active,.style-tag{color:#cbb2ff}
.preview-boundary-toggle.active svg,
.preview-boundary-toggle.active small{color:#d8c3ff}
/* Slightly stronger definition on small violet handles and slider thumbs. */
input[type=range]::-webkit-slider-thumb{border-color:#ccb4ff;box-shadow:0 0 0 1px #1c1a24}
input[type=range]::-moz-range-thumb{border-color:#ccb4ff}

/* Abstract Art starter playground */
.abstract-art-section .full{margin-bottom:10px}.abstract-art-section .small-muted{line-height:1.6}
.shape-picker{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:18px 0}
.shape-choice{display:flex;align-items:center;flex-direction:column;gap:9px;min-height:110px;padding:12px 8px;border:1px solid #46504e;border-radius:10px;background:#27302e;color:#f5f1e7;font:inherit;cursor:pointer}
.shape-choice canvas{width:62px;height:62px;object-fit:contain}.shape-choice:hover,.shape-choice:focus-visible,.shape-choice[aria-pressed="true"]{border-color:#c4f16e;outline:2px solid #c4f16e;outline-offset:2px}.shape-choice span{font-size:13px;line-height:1.35}
@media(max-width:420px){.shape-picker{grid-template-columns:repeat(2,minmax(0,1fr))}}
