:root{font-family:Inter,-apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei",sans-serif;color:#24332e;background:#f5f7f6;font-size:14px;--green:#23644d;--line:#e1e7e3}*{box-sizing:border-box}body{margin:0}button,input,select{font:inherit}button{cursor:pointer;border:1px solid var(--line);background:white;border-radius:8px;padding:10px 13px;color:#344b40;white-space:nowrap}button:hover{background:#edf4ef;border-color:#a7beb0}button:disabled{opacity:.4;cursor:default}button.primary{background:var(--green);color:white;border-color:var(--green)}button:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid #96c6ac;outline-offset:2px}header{height:82px;display:flex;align-items:center;padding:0 26px;gap:28px;background:white;border-bottom:1px solid var(--line)}.brand{display:flex;align-items:center;gap:12px;white-space:nowrap}.brand-icon{display:grid;place-items:center;background:var(--green);color:white;width:38px;height:38px;border-radius:10px;font-size:29px}.brand strong{font-size:21px}.brand small{font-size:14px;font-weight:400;margin-left:9px;color:#708177}#projectName{border:0;border-left:1px solid var(--line);border-radius:0;padding-left:24px;width:190px;background:white}.header-actions{display:flex;align-items:center;gap:10px;margin-left:auto}#saveState{font-size:12px;color:#7a8880;margin-right:6px}.workspace{display:grid;grid-template-columns:205px minmax(0,1fr) 275px;min-height:calc(100vh - 119px)}aside{background:white;padding:28px 20px}.layouts{border-right:1px solid var(--line);display:flex;flex-direction:column}.eyebrow{font-size:12px;letter-spacing:1.5px;color:#88998e;margin-bottom:8px}h1{font-size:26px;margin:0;font-weight:650}h2{font-size:18px;margin:0 0 25px}h3{font-size:14px;margin:0 0 18px}.layout-item{display:flex;text-align:left;width:100%;gap:12px;align-items:center;margin-bottom:8px;border-color:transparent;padding:14px 10px;background:transparent}.layout-item.active{background:#eaf3ed;border-color:#d2e5d7;color:#215a41}.layout-icon{font-size:23px;width:30px}.layout-item small{display:block;font-size:12px;color:#839389;margin-top:5px}.text-button{border:0;margin-top:15px}.sidebar-note{margin-top:auto;padding-top:60px;font-size:13px;line-height:1.8;color:#859289}.sidebar-note strong{color:#63796a}.sidebar-note span{font-size:12px}.inspector{border-left:1px solid var(--line)}main{padding:32px 28px;min-width:0}.canvas-heading{display:flex;justify-content:space-between;align-items:center;margin-bottom:28px}.toolbar{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-bottom:18px;flex-wrap:wrap}.segmented{display:flex;border:1px solid var(--line);padding:4px;border-radius:9px;background:#eaf0ec}.segmented button{background:transparent;border:0;padding:9px 12px}.segmented button.active{background:white;box-shadow:0 2px 5px #18362312;color:var(--green)}.tools-right{display:flex;align-items:center;gap:10px;font-size:12px}.tools-right button,.tools-right select{font-size:12px;padding:7px}.tools-right label{display:flex;gap:3px;align-items:center;margin:0;white-space:nowrap}#viewport{overflow:auto;padding:32px 22px;background-color:#eaf0ec;background-image:radial-gradient(#b8c9bf 1px,transparent 1px);background-size:18px 18px;border:1px solid #dce5de;border-radius:14px;min-height:360px;display:flex;align-items:center}#board{width:100%;aspect-ratio:1124/639;position:relative;flex-shrink:0;background:#fff;border-radius:4px;box-shadow:0 12px 32px #25493413;touch-action:none;user-select:none;overflow:hidden}#art{width:100%;height:100%;object-fit:contain;position:absolute;inset:0;pointer-events:none}#empty{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:12px}#empty h2{margin:10px 0;font-size:20px}#empty p{font-size:14px;color:#86958c;line-height:1.9;margin:0 0 20px}#empty>span:last-child{font-size:12px;color:#97a49c;margin-top:13px}.empty-icon{font-size:36px;color:#497a5c}#boxes{position:absolute;inset:0;pointer-events:none}.key-box{position:absolute;border:1px solid #23644d88;background:#2f875a12;pointer-events:auto;cursor:move}.key-box.selected{border:2px solid #1f8455;background:#239a5324}.key-box span{position:absolute;top:1px;left:1px;max-width:100%;overflow:hidden;white-space:nowrap;font-size:11px;background:#23644dcc;color:white;padding:2px 5px;border-radius:2px;pointer-events:none}.handle{position:absolute;width:16px;height:16px;right:-1px;bottom:-1px;background:white;border:2px solid var(--green);cursor:nwse-resize}.hide-boxes .key-box span{display:none}.hide-boxes .key-box{background:transparent;border-color:transparent}.canvas-footer{display:flex;justify-content:space-between;color:#8a9990;font-size:12px;padding:14px 0}.hint-bar{margin-top:20px;padding:16px 18px;background:white;border:1px solid var(--line);border-radius:9px;font-size:13px;color:#77877d;line-height:1.8}label{display:block;color:#6a7d71;font-size:13px;margin-bottom:18px}input:not([type=checkbox]),select{width:100%;padding:10px;border:1px solid var(--line);border-radius:7px;background:#fbfcfb;color:#344b40;margin-top:7px}input[type=checkbox]{accent-color:var(--green)}.coords{display:grid;grid-template-columns:1fr 1fr;gap:0 12px}.subtle,#noSelection p{font-size:13px;line-height:1.9;color:#86978c}hr{border:0;border-top:1px solid var(--line);margin:25px 0}.danger{color:#b66363;width:100%}.wide{width:100%;font-size:13px}.check{display:flex;align-items:center;gap:6px}.inspector select{font-size:13px}footer{display:flex;gap:30px;justify-content:space-between;padding:11px 24px;background:white;border-top:1px solid var(--line);font-size:12px;color:#85958a}[hidden]{display:none!important}@media(max-width:1200px){header{gap:12px;padding:0 16px}.brand small,#saveState{display:none}.workspace{grid-template-columns:160px minmax(0,1fr) 230px}main{padding:25px 18px}aside{padding:24px 14px}#viewport{padding:15px;min-height:290px}.tools-right{flex-wrap:wrap}#empty p{font-size:12px;margin-bottom:10px}.empty-icon{display:none}}@media(max-width:900px){header{height:auto;min-height:76px;flex-wrap:wrap;padding:12px}.header-actions{gap:6px}.header-actions button{padding:9px}.workspace{grid-template-columns:minmax(0,1fr) 230px}.layouts{grid-column:1/-1;padding:12px;border-bottom:1px solid var(--line);display:block}.layouts h2,.layouts .eyebrow,.sidebar-note,.text-button{display:none}#layouts{display:flex;gap:6px;overflow:auto}.layout-item{margin:0;min-width:100px;width:auto;flex:1;padding:9px}.layout-icon,.layout-item small{display:none}main{padding:20px 14px}.canvas-heading{margin-bottom:16px}h1{font-size:22px}}@media(max-width:620px){.workspace{display:block}.inspector{border-top:1px solid var(--line)}#projectName{width:150px}.header-actions{width:100%;justify-content:flex-end}.brand strong{font-size:18px}#viewport{min-height:245px}#empty h2{font-size:16px}#empty p{display:none}#empty button{padding:8px}footer{flex-wrap:wrap;gap:6px}#status{width:100%}.coords{grid-template-columns:repeat(4,1fr)}}
#featureNav{display:flex;align-items:center;gap:3px;overflow:auto;flex:1;min-width:0}#featureNav button{border:0;background:transparent;padding:12px 10px;font-size:14px}#featureNav button.active{color:var(--green);background:#eaf3ed}header{gap:16px}#projectName{width:130px;padding-left:14px}.header-actions{flex-shrink:0}#featurePage{min-height:calc(100vh - 119px);max-width:1250px;margin:auto;padding:38px 32px}.feature-heading{display:flex;justify-content:space-between;align-items:center;margin-bottom:28px}.feature-title{font-size:25px;font-weight:650}.feature-content{display:grid;gap:24px}.setting-card{padding:28px;background:white;border:1px solid var(--line);border-radius:14px}.setting-card h2{margin-bottom:14px}.setting-card>label{max-width:420px}.setting-card button{margin:5px 8px 5px 0}.color-row{display:flex;gap:22px;align-items:center;padding:18px 0;border-top:1px solid var(--line);flex-wrap:wrap}.color-row strong{width:130px}.color-row label{margin:0;width:90px}.color-row input[type=color]{height:42px;padding:3px}.type-sample{flex:1;min-width:140px}.asset-row{display:flex;gap:20px;align-items:center;padding:20px 0}.asset-row img{width:72px;height:72px;object-fit:contain;background:#edf1ef}.asset-row label{max-width:160px;margin:0}.export-row{display:flex;align-items:center;gap:25px;border-top:1px solid var(--line);padding:15px 0}.export-row strong{min-width:120px}.export-row img{width:140px;height:74px;object-fit:contain;margin-left:auto}.export-row span{color:#748779}.effect-demo{position:relative;overflow:visible;min-width:180px;min-height:85px;background:#eaf3ed!important;margin:24px!important}.particle{position:absolute;width:7px;height:7px;border-radius:50%;left:50%;top:50%;pointer-events:none}@media(max-width:1500px){header{flex-wrap:wrap;height:auto;padding-top:12px;padding-bottom:12px}#featureNav{order:4;flex-basis:100%}.workspace{min-height:calc(100vh - 170px)}}@media(max-width:650px){#featurePage{padding:24px 14px}.setting-card{padding:18px}.color-row{gap:12px}.export-row{flex-wrap:wrap}.header-actions{flex-wrap:wrap}}

/* Keep the editor comfortably bounded; auto margins center only when it fits. */
#viewport{height:420px;min-height:0;align-items:flex-start}
#board{width:min(100%,1124px);margin:auto}
#zoom{width:auto;margin-top:0}
#board{container-type:inline-size}
@container(max-width:480px){#empty .empty-icon,#empty p,#empty>span:last-child{display:none}#empty h2{font-size:16px;margin:0 0 14px}#empty button{padding:8px 12px}}
/* Persistent left navigation and a shared keyboard preview across all tools. */
#featureNav{display:flex;flex-direction:column;align-items:stretch;gap:5px;flex:none;overflow:visible;margin-bottom:20px}
#featureNav button{text-align:left;padding:12px 14px;font-size:14px}
#featureNav button.active{background:#eaf3ed;color:var(--green);font-weight:600}
.sidebar-divider{height:1px;background:var(--line);margin:0 0 24px}
.layouts{padding:24px 14px}.layouts .sidebar-note{padding-top:28px}
.layouts h2{font-size:15px;margin-bottom:14px}.layout-item{padding:10px 8px}
header{flex-wrap:nowrap;height:82px}header #projectName{width:170px}
.feature-active #featurePage{grid-column:2/-1;min-width:0;max-width:none;width:100%;margin:0;padding:28px;display:grid;grid-template-columns:minmax(320px,1fr) minmax(300px,380px);gap:28px;align-items:start;min-height:0}
.feature-controls{min-width:0}.feature-heading{margin-bottom:20px;gap:12px}.feature-title{font-size:22px}.feature-heading button{padding:8px 10px;font-size:12px}
.feature-content{gap:16px}.setting-card{padding:20px}.setting-card h2{font-size:16px;margin-bottom:10px}
.color-row{gap:10px;padding:14px 0}.color-row strong{width:100%;font-size:13px}.color-row label{width:90px}.type-sample{display:none}.color-row button{font-size:12px;padding:7px}
.asset-row{flex-wrap:wrap;gap:12px}.export-row{gap:12px;flex-wrap:wrap}.export-row img{width:100px}.export-row strong{min-width:80px}
.live-preview{position:sticky;top:24px;min-width:0;padding:24px;border:1px solid var(--line);border-radius:16px;background:#eaf0ec;text-align:center}
.preview-heading{display:flex;justify-content:space-between;align-items:center;margin-bottom:24px;text-align:left;gap:12px}.preview-heading h2{margin:0;font-size:17px}.preview-badge{font-size:12px;color:var(--green);white-space:nowrap}
.keyboard-device{container-type:inline-size;position:relative;width:100%;max-width:600px;margin:0 auto 18px;padding:12px;background:#fff;border:1px solid #d8e0db;border-radius:20px;box-shadow:0 12px 32px #25493413;text-align:left}
.keyboard-input{min-height:4em;padding:18px 12px;overflow-wrap:anywhere;border-bottom:1px solid var(--line)}
.keyboard-spelling{padding:12px 12px 4px}.keyboard-candidates{display:flex;align-items:center;gap:1.5em;padding:8px 12px}.keyboard-symbols{padding:5px 12px 10px}
.keyboard-stage{position:relative;width:100%;aspect-ratio:1124/639;isolation:isolate}
.motion-particle-canvas{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;z-index:6}
.motion-transform,.motion-key-surface{display:block;position:absolute;inset:0;width:100%;height:100%;pointer-events:none}.motion-foreground{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;pointer-events:none}.motion-foreground[hidden]{display:none}.motion-row.selected,.particle-preset.selected{background:#e1eee5;border-radius:8px}.motion-panel input[type=checkbox]{width:auto;min-width:16px}.motion-panel input[aria-invalid=true]{border-color:#bf3b31}.motion-panel .motion-actions button{margin:0}.motion-panel .motion-fields input{min-width:0;width:100%}.motion-panel .particle-range input{width:100%;min-width:0}
.motion-panel{display:flex;flex-direction:column;gap:12px}.motion-panel .sound-tabs{display:flex}.motion-panel .sound-tabs button{flex:1}.motion-list{display:flex;flex-direction:column;gap:6px;max-height:270px;overflow:auto}.motion-row{display:flex;align-items:center;gap:8px}.motion-row>button{display:flex;justify-content:space-between;align-items:center;flex:1;text-align:left}.motion-row small{color:var(--muted);font-size:11px}.motion-editor{display:flex;flex-direction:column;gap:10px;padding:14px;border:1px solid var(--line);border-radius:10px;background:#fbfdfb}.motion-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.motion-fields label,.particle-range{display:flex;flex-direction:column;gap:4px}.motion-child{display:flex;align-items:center;gap:8px;padding:6px 0;border-bottom:1px solid var(--line)}.motion-child span{flex:1}.motion-actions,.motion-apply{display:flex;flex-wrap:wrap;gap:8px;align-items:center}.motion-apply{border-top:1px solid var(--line);padding-top:12px}.motion-apply>label{flex:1;min-width:180px}.effect-image{max-width:120px;max-height:80px;object-fit:contain;background:#eef2ef;border-radius:6px}.particle-range{display:grid;grid-template-columns:1fr 80px 80px;align-items:center;margin:7px 0}.particle-preset{display:flex;justify-content:space-between;text-align:left}.effect-limit{padding:8px 10px;border-radius:8px;background:#fff4dd;color:#856021}
.keyboard-art{display:block;width:100%;height:100%;border-radius:5px}.keyboard-hit{position:absolute;border:0;background:transparent;padding:0;border-radius:0;touch-action:manipulation;overflow:visible}
.keyboard-hit:hover,.keyboard-hit:active,.keyboard-hit.key-is-pressed{background:transparent;box-shadow:none}.keyboard-hit{-webkit-tap-highlight-color:transparent}.keyboard-hit:focus-visible{z-index:2;outline-offset:-3px}.keyboard-key-art{width:100%;height:100%;display:block;pointer-events:none}
.keyboard-bubble{position:absolute;transform:translate(-50%,-100%);max-width:42%;padding:8px 14px;border:1px solid var(--line);border-radius:10px;background:white;box-shadow:0 4px 14px #0002;pointer-events:none;z-index:4;white-space:nowrap}
.keyboard-bubble:after{content:'';position:absolute;bottom:-6px;left:50%;transform:translateX(-50%);border-top:7px solid white;border-left:6px solid transparent;border-right:6px solid transparent}
.keyboard-home{width:24%;height:4px;margin:16px auto 2px;border-radius:4px;background:#42544a}.live-preview>.subtle{max-width:560px;margin:12px auto 0;text-align:left;font-size:12px}.preview-clear{font-size:12px;padding:8px 12px}
@media(max-width:1200px){.workspace{grid-template-columns:170px minmax(0,1fr) 230px}.feature-active #featurePage{padding:20px 16px;gap:16px;grid-template-columns:minmax(260px,1fr) 290px}.live-preview{padding:16px}.brand small{display:none}}
@media(max-width:1000px){.feature-active #featurePage{grid-template-columns:minmax(0,1fr)}.live-preview{position:static}.keyboard-device{max-width:500px}.feature-controls{width:100%}}
@media(max-width:900px){.workspace{grid-template-columns:155px minmax(0,1fr)}.layouts{grid-column:auto;grid-row:1/3;display:flex;padding:18px 10px}.layouts .eyebrow,.layouts h2{display:block}#layouts{display:flex;flex-direction:column;overflow:visible;gap:4px}.layout-item{width:100%;flex:none;min-width:0}.layout-item small{display:block}.layouts .text-button{display:block}.inspector{grid-column:2;border-top:1px solid var(--line)}#featureNav{flex-basis:auto}.header-actions{width:auto}header{height:auto;min-height:82px;flex-wrap:wrap}}
@media(max-width:620px){.workspace{display:grid;grid-template-columns:115px minmax(0,1fr)}.layouts{padding:16px 6px}#featureNav button{padding:10px 7px;font-size:12px}.layout-item{font-size:12px}.layout-item small{font-size:10px}#featurePage{padding:14px 10px!important}.live-preview{padding:12px}.preview-heading h2{font-size:14px}.preview-badge{display:none}.keyboard-device{padding:6px;border-radius:12px}.feature-title{font-size:18px}.feature-heading{flex-wrap:wrap}.setting-card{padding:14px}.header-actions{width:100%}.toolbar{gap:8px}.segmented button{padding:8px 6px;font-size:12px}.tools-right{flex-wrap:wrap}.canvas-footer{flex-wrap:wrap;gap:6px}.canvas-heading{flex-wrap:wrap;gap:10px}}
.layouts{position:sticky;top:0;align-self:start;max-height:calc(100dvh - 82px);overflow-y:auto}
.keyboard-device{max-width:clamp(260px,calc(100dvh - 340px),560px)}
@media(max-width:620px){.keyboard-device{max-width:100%}.layouts{max-height:100dvh}.live-preview{top:12px}}
#featureNav{order:0}

/* Layout selection belongs to the keyboard being edited or previewed. */
#layouts{display:flex;flex-direction:row;flex-wrap:wrap;gap:6px;overflow:visible;width:100%;margin:0 0 22px;text-align:left}
#layouts .layout-item{flex:1 1 90px;min-width:0;width:auto;margin:0;padding:10px 12px;justify-content:center;gap:0;border:1px solid var(--line);background:#fff;border-radius:9px;font-size:13px}
#layouts .layout-item.active{background:#dceee3;border-color:#98bca7;color:#215a41}
#layouts .layout-icon{display:none}
#layouts .layout-item small{display:block;font-size:11px;margin-top:4px;white-space:normal}
.live-preview #layouts{padding-bottom:18px;border-bottom:1px solid #d5e1d9;margin-bottom:20px}
@media(max-width:620px){#layouts{gap:5px}#layouts .layout-item{flex-basis:80px;padding:8px;font-size:12px}#layouts .layout-item small{font-size:10px}}
/* One shared shell for editing and every feature preview. */
.workspace{--nav-width:205px;--settings-width:400px;--panel-gap:28px;--panel-padding:24px;grid-template-columns:var(--nav-width) minmax(0,1fr) var(--settings-width);background:linear-gradient(to right,#fff var(--nav-width),#f5f7f6 var(--nav-width));align-items:start}
.layouts{min-height:calc(100dvh - 82px)}
.feature-active #featurePage{display:contents}
#editorMain,.feature-active .live-preview{grid-column:2;grid-row:1;margin:var(--panel-gap);padding:var(--panel-padding);min-width:0;background:#eaf0ec;border:1px solid var(--line);border-radius:16px;align-self:start}
.feature-active .live-preview{top:var(--panel-gap)}
.inspector,.feature-controls{grid-column:3;grid-row:1;margin:0;padding:28px 20px;background:#fff;border-left:1px solid var(--line);min-height:calc(100dvh - 82px);min-width:0}
#editorMain #layouts,.live-preview #layouts{padding-bottom:18px;border-bottom:1px solid #d5e1d9;margin-bottom:20px}
.canvas-heading,.preview-heading{min-height:44px;margin-bottom:20px}
.canvas-heading .eyebrow{display:none}
.canvas-heading h1,.preview-heading h2{font-size:18px;font-weight:650;margin:0}
.feature-title,.inspector h2{font-size:18px;font-weight:650}
.feature-controls .setting-card{padding:18px 0;border:0;border-top:1px solid var(--line);border-radius:0;background:transparent}
.feature-controls .feature-heading{min-height:44px;margin-bottom:20px}
#viewport{border-color:#d5e1d9}
@media(max-width:1200px){.workspace{--nav-width:170px;--settings-width:340px;--panel-gap:18px;--panel-padding:18px}.inspector,.feature-controls{padding:24px 16px}}
@media(max-width:1000px){.workspace{--nav-width:155px;grid-template-columns:var(--nav-width) minmax(0,1fr)}.layouts{grid-row:1/3}.inspector,.feature-controls{grid-column:2;grid-row:2;min-height:0;border-top:1px solid var(--line)}.feature-active .live-preview{position:static}}
@media(max-width:620px){.workspace{--nav-width:115px;--panel-gap:10px;--panel-padding:12px}.layouts{min-height:calc(100dvh - 82px)}.canvas-heading h1,.preview-heading h2{font-size:16px}}
.palette-row{display:grid;grid-template-columns:38px minmax(80px,1fr) auto;gap:10px;align-items:center;padding:16px 0;border-top:1px solid var(--line)}
.palette-row>label{grid-column:1/-1;margin:0;font-size:13px;color:#344b40;line-height:1.5}
.palette-row input[type=color]{width:38px;height:38px;padding:2px;margin:0;border-radius:8px;background:#fff}
.palette-row input[type=text]{width:100%;margin:0;text-transform:uppercase;font-family:ui-monospace,monospace;letter-spacing:1px;text-align:center}
.palette-row input[aria-invalid=true]{border-color:#b66363;outline-color:#b66363}
.palette-row button{padding:8px;font-size:12px;margin:0}.palette-note{grid-column:1/-1;color:#859289;font-size:11px;line-height:1.6}
.palette-preview-tools{display:flex;gap:6px;align-items:center;flex-wrap:wrap;margin-left:auto}.palette-preview-tools button{font-size:12px;padding:8px 10px}.palette-preview-tools .active{background:#23644d;color:#fff;border-color:#23644d}
.preview-heading:has(.palette-preview-tools){flex-wrap:wrap}.preview-heading:has(.palette-preview-tools) .preview-badge{display:none}
.night-preview{background:#262c30;border-color:#455057}.night-preview .keyboard-input{border-color:#455057}
.keyboard-spelling{position:relative}.preview-ai{float:right;background:#87918e44;border-radius:50%;padding:0 6px}
.preview-pinyin-list{position:absolute;left:1%;top:5%;width:14%;height:68%;display:flex;align-items:center;justify-content:center;white-space:pre-line;line-height:2;text-align:center;background:#fff;border-radius:8px;pointer-events:none}
.preview-color-examples{display:flex;align-items:center;justify-content:center;gap:16px;margin:14px 0}
.preview-swipe{display:flex;align-items:center;gap:10px;border-radius:14px;background:#959ba1;padding:8px 12px}.preview-swipe strong{background:#fff;border-radius:9px;padding:5px 9px;font-weight:400}
.preview-letter-bubble{border-radius:9px;background:#d3d6db;padding:8px 13px;position:relative}.preview-letter-bubble:after{content:'';position:absolute;bottom:-6px;left:50%;transform:translateX(-50%);border-top:7px solid #d3d6db;border-left:6px solid transparent;border-right:6px solid transparent}


@media(max-width:620px){.palette-preview-tools{margin-left:0}.palette-preview-tools button{padding:7px}.preview-swipe{gap:4px;padding:6px}.preview-color-examples{gap:8px}}
.color-preview .keyboard-device{max-width:clamp(240px,calc(100dvh - 440px),560px)}
.color-preview .keyboard-input{min-height:0;padding:10px 12px}
.color-preview .keyboard-candidates{gap:1em}
.night-preview{background:#fff}.night-preview .keyboard-input{border-color:var(--line)}
.night-preview{background:#262c30;border-color:#455057}.night-preview .keyboard-input{border-color:#455057}


.design-imports{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}
.design-theme-bar{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin-bottom:18px;font-size:12px;color:#6a7d71}
.design-theme-bar .segmented button{font-size:12px;padding:7px 12px}.design-theme-bar small{margin-left:auto;color:#859289}
.canvas-heading{gap:12px;flex-wrap:wrap}
@media(max-width:620px){.design-imports{justify-content:flex-start}.design-imports button{padding:8px;font-size:12px}.design-theme-bar small{margin-left:0}}

.canvas-heading>.design-theme-bar{margin:0 0 0 auto;justify-content:flex-end;gap:10px}
.canvas-heading>.design-theme-bar small{display:none}
.design-import-section{padding-bottom:18px;margin-bottom:24px;border-bottom:1px solid var(--line)}
.design-import-section h3{margin:0 0 14px}.design-import-section .design-imports{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.design-import-section .design-imports button{padding:10px 8px;font-size:13px}.design-import-section .subtle{margin-bottom:0}
@media(max-width:620px){.canvas-heading>.design-theme-bar{margin-left:0;justify-content:flex-start}}
.atlas-sheet{width:100%;height:auto;display:block;border:1px solid var(--line);border-radius:8px;background:repeating-conic-gradient(#e5e8e6 0% 25%,#fff 0% 50%) 0/16px 16px}
#board.atlas-board{background:repeating-conic-gradient(#e5e8e6 0% 25%,#fff 0% 50%) 0/16px 16px}
.atlas-tiles{display:grid;grid-template-columns:repeat(auto-fit,minmax(100px,1fr));gap:12px;margin-top:20px}.atlas-tile{min-width:0;background:#fff;border:1px solid var(--line);border-radius:8px;padding:10px}.atlas-tile canvas{display:block;width:100%;height:70px;object-fit:contain;background:#d3d6db}.atlas-tile span{display:block;font-size:11px;color:#63796a;margin-top:8px}

#atlasEditor .atlas-tiles{margin-top:16px}#atlasEditor .atlas-tile.active{outline:2px solid var(--accent,#23644d)}#atlasEditor .atlas-tile{color:inherit}.atlas-board #empty{min-width:300px;min-height:200px;background:white}.atlas-board .key-box>span{max-width:100%;overflow:hidden}

#atlasEditor .atlas-tiles{max-height:420px;overflow:auto;padding:4px}#atlasEditor{min-width:0}.atlas-board .key-box>span{font-size:9px;padding:0 2px}

#layoutNavigation{width:100%;min-width:0}#iconGroups{display:flex;width:fit-content;margin:0 0 20px;gap:4px}#iconGroups[hidden]{display:none}

.sound-tabs,.sound-categories,.sound-scopes{display:flex;gap:8px;flex-wrap:wrap}.sound-tabs{background:#edf3ef;padding:5px;border-radius:12px;margin-bottom:18px}.sound-tabs button{flex:1}.sound-tabs button.active{background:white;color:#24634f;box-shadow:0 2px 7px #234b4012}.sound-categories{margin:16px 0}.sound-categories button{border:0;padding:8px 12px}.sound-categories .active,.sound-scopes .active{background:#24634f;color:white}.sound-list{max-height:440px;min-height:180px;overflow:auto;border-top:1px solid #e3ebe6}.sound-row{display:flex;gap:10px;align-items:center;padding:12px 6px;border-bottom:1px solid #edf2ee;border-radius:8px}.sound-row.selected{background:#e4f1e9;box-shadow:inset 3px 0 #438672}.sound-tag{font-size:12px;background:#eaf4ee;color:#438672;padding:4px 6px;white-space:nowrap;border-radius:5px}.sound-name{flex:1;text-align:left;border:0;background:transparent;padding:8px 0;min-width:0;overflow-wrap:anywhere}.sound-row small{white-space:nowrap;color:#80968b}.sound-row>button:last-child{padding:7px 10px}.sound-apply{border-top:1px solid #dce6df;padding-top:14px;margin-top:10px}.sound-apply .primary{display:block;width:100%;margin:12px 0}.sound-apply select{margin-top:12px;width:100%}

.atlas-board .key-box{cursor:pointer}

/* Fixed atlas pages are edited directly through the icon gallery. */
#editorMain.atlas-editor #viewport,
#editorMain.atlas-editor .toolbar>.segmented,
#editorMain.atlas-editor .tools-right>label,
#editorMain.atlas-editor #zoom,
#editorMain.atlas-editor #dimensions{display:none}
#editorMain.atlas-editor .toolbar{justify-content:flex-end;margin-bottom:0}
#editorMain.atlas-editor .canvas-footer{justify-content:flex-end}
#atlasEditor>.atlas-sheet{border:0;margin-top:16px}

.atlas-sheet{width:auto;max-width:100%;height:auto;max-height:240px;margin-left:auto;margin-right:auto}
#atlasEditor .atlas-tiles{grid-template-columns:repeat(auto-fill,minmax(100px,120px))}
#atlasEditor .atlas-tile small{display:block;margin-top:5px;color:#86978c;font-size:11px}

.atlas-tile canvas{width:auto;height:auto;max-width:100%;max-height:88px;margin:0 auto}
.atlas-tile small{display:block;font-size:11px;color:#86978c;margin-top:5px}
.feature-controls.background-controls{grid-column:2 / -1;grid-row:1;width:100%;max-width:none!important}
.background-panel{padding:24px;background:white;border-radius:16px}
.background-panel>button{margin:8px 12px 20px 0}
.background-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(230px,1fr));gap:18px}
.background-tile{display:flex;flex-direction:column;align-items:center;gap:12px;padding:16px;min-width:0}
.background-tile img{display:block;width:100%;height:auto;max-height:260px;object-fit:contain;background:repeating-conic-gradient(#e2e7e5 0% 25%,white 0% 50%) 0 / 16px 16px}
.background-tile small{color:var(--muted,#789086)}
.complete-layout > :not(#layoutNavigation):not(#layoutViews):not(#layoutCompletePreview){display:none!important}
.background-inspector > :not(#layoutBackgroundSettings):not(#keyboardCover){display:none!important}
#layoutViews{margin:18px 0}
#layoutCompletePreview{position:static;padding:0;border:0;background:none}
#layoutBackgroundSettings{padding:0}
#layoutBackgroundSettings .background-grid{grid-template-columns:1fr 1fr;gap:10px}
#layoutBackgroundSettings .background-tile{padding:8px;font-size:12px}
#layoutBackgroundSettings h2{font-size:18px}
.preview-native-toolbar{display:flex;justify-content:space-around;align-items:center;min-height:54px;padding:8px 0}
.preview-native-toolbar canvas{width:7%;height:auto;aspect-ratio:1}
.complete-phone .preview-state-header{height:17.53cqw;background-size:100% auto;background-position:top;position:relative}
.complete-phone .keyboard-spelling{height:7.12cqw;padding:0 2cqw;box-sizing:border-box;background-image:none!important}
.complete-phone .keyboard-candidates{height:10.41cqw;padding:0 2cqw;gap:3cqw;box-sizing:border-box;background-image:none!important}
.complete-phone .keyboard-candidates>[data-color="1"]{font-size:inherit;background:none;padding:0}
.complete-phone .preview-native-toolbar{position:absolute;top:8.45cqw;height:7.65cqw;width:100%;min-height:0;box-sizing:border-box;padding:0}
.complete-phone .preview-native-toolbar .edge-icon{width:7.12%}
.complete-phone .candidate-expand{width:7.12%;height:auto;margin-left:auto}
.preview-native-list{position:absolute;left:.98%;top:4.54%;width:15.12%;height:68.08%;display:flex;flex-direction:column;align-items:center;overflow-y:auto;scrollbar-width:none;border-radius:10px 0 0 10px;box-sizing:border-box}
.preview-native-list button{padding:0;background:transparent;border:0;color:inherit;font:inherit;line-height:1.4;width:100%;min-height:25%;flex-shrink:0}
.complete-phone [hidden]{display:none!important}
.background-style-options{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:18px 0 8px}
.background-style-options button{display:grid;gap:10px;padding:10px;font-size:13px}
.background-style-options button[aria-pressed="true"]{border-color:#23644d;box-shadow:0 0 0 1px #23644d}
.background-style-sample{display:block;padding:12px 4px;background:#eaf3ee;color:#285b4b;border-radius:8px;white-space:nowrap}
.background-style-sample.bar{background:#d7e9e1;box-shadow:inset 0 0 0 1px #bad4c7}
.background-style-sample.dark{background:#1b302d;color:#d9e9df}
.background-style-sample.bar.dark{background:#29463f;box-shadow:inset 0 0 0 1px #3d5b51}
.background-style-full{width:100%;height:auto;display:block;border-radius:6px}
.design-theme-bar .design-imports{display:flex;gap:8px;margin-right:8px}
.design-theme-bar .design-imports button{font-size:12px;padding:8px 12px;white-space:nowrap}
.keyboard-pressed-art{position:absolute;inset:0;width:100%;height:100%;display:none;pointer-events:none}
.has-pressed-art.key-is-pressed .keyboard-pressed-art{display:block}
.has-pressed-art.key-is-pressed .keyboard-key-art{visibility:hidden}
.canvas-heading{align-items:center;gap:16px;margin:16px 0}
.canvas-heading>.design-theme-bar{gap:10px;display:flex;align-items:center}
.design-theme-bar .design-imports{flex-wrap:nowrap;margin:0}
.pressed-controls{display:flex;align-items:center;gap:10px;padding-left:12px;border-left:1px solid var(--line)}
.pressed-controls .pressed-toggle{display:flex;align-items:center;gap:6px;margin:0;white-space:nowrap;font-size:12px}
.pressed-toggle input{width:16px;height:16px;margin:0}
.pressed-controls button{font-size:12px;padding:8px 12px;white-space:nowrap}
.pressed-controls[hidden],.pressed-controls button[hidden]{display:none}
#layoutViews{width:fit-content;margin:14px 0}
#designStatus{font-size:12px}
@media(max-width:1100px){.canvas-heading{flex-wrap:wrap}.canvas-heading>.design-theme-bar{margin-left:0;justify-content:flex-start;width:100%}.pressed-controls{padding-left:0;border:0}}

/* Sample the theme surfaces without stretching rounded bitmap corners. */
.keyboard-device{--bubble-surface:#fffef9;--list-surface:#e3efe9;--swipe-surface:#438773}
.keyboard-device.night-preview{--bubble-surface:#29433c;--list-surface:#29433c;--swipe-surface:#88c3a8}
.preview-pinyin-list{background:var(--list-surface)}
.keyboard-device .native-preview-background{background-color:transparent;background-size:100% 100%;background-repeat:no-repeat;border:0;box-shadow:none}
.keyboard-bubble,.preview-letter-bubble{box-sizing:border-box;width:9cqw;height:10cqw;max-width:none;padding:0;display:flex;align-items:center;justify-content:center;border:0;border-radius:2cqw;background:var(--native-surface,var(--bubble-surface));box-shadow:0 1px 3px #0001;line-height:1;white-space:nowrap}
.keyboard-bubble[hidden]{display:none}
.keyboard-bubble:after,.preview-letter-bubble:after{display:block;content:'';position:absolute;left:50%;bottom:-1.3cqw;transform:translateX(-50%);width:0;height:0;border-top:1.5cqw solid var(--native-surface,var(--bubble-surface));border-left:1.4cqw solid transparent;border-right:1.4cqw solid transparent}
.preview-letter-bubble{position:absolute;left:70%;top:5%;transform:translate(-50%,-100%);z-index:5;pointer-events:none}
.preview-swipe{position:absolute;left:52%;top:40%;transform:translate(-50%,-50%);z-index:5;display:grid;grid-template-columns:repeat(7,1fr);gap:0;width:48cqw;height:11cqw;padding:1cqw;box-sizing:border-box;border-radius:3cqw;background:var(--native-surface,var(--swipe-surface));pointer-events:none}
.preview-swipe>span,.preview-swipe>strong{display:flex;align-items:center;justify-content:center;min-width:0;line-height:1;font-weight:400}
.preview-swipe>strong{height:100%;padding:0;border-radius:2.5cqw;background:var(--native-surface,var(--bubble-surface))}

.preview-swipe[hidden]{display:none}
.preview-swipe{transform:translate(-50%,-100%)}
.preview-swipe>span.selected{height:100%;padding:0;border-radius:2.5cqw;background:var(--native-surface,var(--bubble-surface))}
.keyboard-hit{touch-action:none;user-select:none;-webkit-touch-callout:none}
.motion-panel button{white-space:normal}.motion-row>button{min-width:0;gap:8px;flex-wrap:wrap}.motion-panel label{margin-bottom:8px}.motion-panel .sound-tabs{gap:5px}.motion-panel .particle-range{grid-template-columns:minmax(0,1fr) minmax(50px,72px) minmax(50px,72px)}
@media(max-width:620px){.workspace.feature-active{grid-template-columns:minmax(0,1fr);background:#f5f7f6}.workspace.feature-active>.layouts{grid-column:1;grid-row:auto;min-height:0;padding:8px}.feature-active #featureNav{flex-direction:row;overflow:auto;margin:0}.feature-active #featureNav button{flex-shrink:0}.feature-active .layouts>.sidebar-note,.feature-active .layouts>.sidebar-divider{display:none}.feature-active .live-preview,.feature-active .feature-controls{grid-column:1;grid-row:auto}.motion-panel .motion-apply>label{min-width:0;width:100%;flex-basis:100%}.motion-panel .motion-list{max-height:240px}.motion-panel .motion-fields{gap:8px}}

.sound-advanced{border-top:1px solid var(--line);margin:16px 0;padding-top:14px}.sound-advanced summary{cursor:pointer;font-weight:600}.sound-advanced .sound-scopes{margin-top:14px}

/* A single page scroll and a persistent, compact sound confirmation area. */
.sound-panel .sound-list{max-height:none;min-height:100px;overflow:visible;border-top:0}
.sound-guide{font-size:13px;color:#73867c;margin:0 0 16px}
.sound-panel button.sound-row{display:flex;width:100%;margin:0;padding:14px 10px;gap:12px;border:0;border-bottom:1px solid #edf2ee;background:transparent;text-align:left;align-items:center;border-radius:10px}
.sound-panel button.sound-row:hover{background:#f1f6f3}
.sound-panel button.sound-row.selected{background:#e4f1e9;box-shadow:inset 3px 0 #438672}
.sound-play-icon{display:grid;place-items:center;flex-shrink:0;width:30px;height:30px;border-radius:50%;background:#edf3ef;color:#438672;font-size:11px}
.sound-row-info{display:flex;flex-direction:column;gap:5px;flex:1;min-width:0}
.sound-row-title{font-size:14px;overflow-wrap:anywhere}
.sound-row-info small{font-size:12px;color:#80968b}
.sound-row-state{font-size:11px;color:#347761;white-space:nowrap}
.sound-panel .sound-apply{position:sticky;bottom:0;z-index:6;background:#fff;border-top:1px solid #dce6df;padding:14px 0 10px;margin-top:16px;box-shadow:0 -8px 12px #fff}
.sound-selection-status{display:grid;grid-template-columns:64px minmax(0,1fr);align-items:baseline;gap:6px 10px;font-size:13px}
.sound-selection-status small{color:#80968b;font-size:12px}
.sound-selection-status strong{font-weight:500;overflow-wrap:anywhere}
.sound-pending-name{color:#23644d}
.sound-panel .sound-apply .primary{margin:12px 0 8px}
.sound-apply-hint{font-size:12px;color:#80968b;line-height:1.5;margin:0}

.sound-apply .sound-advanced{border-top:0;border-bottom:1px solid var(--line);margin:0 0 12px;padding:0 0 12px}
.sound-advanced-body{max-height:32dvh;overflow-y:auto;overscroll-behavior:contain;padding-right:4px}
.sound-apply .sound-advanced summary{font-size:14px;padding:4px 0}

/* Motion editor: mode, library, parameters, then application. */
.motion-workflow{gap:18px}
.motion-workflow p{margin:0;font-size:12px;line-height:1.65}
.motion-workflow h3{margin:0;font-size:14px;font-weight:650;color:#294e40}
.motion-workflow button{margin:0;min-height:36px}
.motion-library{display:flex;flex-direction:column;gap:10px;border-top:1px solid var(--line);padding-top:16px;min-width:0}
.motion-workflow .motion-create{display:grid;grid-template-columns:1.1fr 1fr 1fr;gap:6px}
.motion-workflow .motion-create button{font-size:12px;padding:8px 5px}
.motion-workflow .motion-create button:first-child{color:#23644d;border-color:#a8c7b6;background:#edf6f0;font-weight:600}
.motion-workflow input[type=search]{margin:0}
.motion-workflow .motion-list{max-height:240px;gap:4px;scrollbar-gutter:stable}
.motion-workflow .motion-row{gap:8px;padding:2px 4px}
.motion-workflow .motion-row>button{border:0;background:transparent;padding:8px 6px;min-height:38px;gap:4px}
.motion-workflow .motion-row:hover{background:#f2f6f3;border-radius:8px}
.motion-workflow .motion-row.selected{background:#e1eee5;box-shadow:inset 3px 0 #438672}
.motion-workflow .motion-row small{font-size:11px;color:#7a8e82}
.motion-workflow .motion-row input{margin:0}
.motion-workflow .motion-empty{border:1px dashed #d5e2d9;padding:12px;border-radius:8px}
.motion-workflow .motion-editor{gap:12px;padding:14px;background:#f8faf8}
.motion-workflow .motion-editor label{margin:0;font-size:12px}
.motion-workflow .motion-editor input,.motion-workflow .motion-editor select{margin-top:4px}
.motion-workflow .motion-editor .motion-actions{padding-top:10px;border-top:1px solid var(--line)}
.motion-workflow .motion-apply{margin:0;gap:10px;padding:16px 0 0}
.motion-workflow .motion-apply h3{flex-basis:100%}
.motion-workflow .motion-apply label{margin:0;min-width:130px;font-size:12px}
.motion-workflow .motion-apply .primary{align-self:flex-end;padding:10px 16px}
.motion-workflow .motion-applied{border-top:1px solid var(--line);padding-top:12px;color:#7b8d83;font-size:12px}
.motion-workflow .motion-applied summary{cursor:pointer;line-height:1.6}
.motion-workflow .motion-applied p{margin-top:8px}

/* Shared segmented tabs across sound, key motion and particle editors. */
.feature-controls :is(.sound-tabs,.motion-mode-tabs){display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;padding:4px;margin:0;background:#eaf1ed;border:0;border-radius:10px}
.feature-controls :is(.sound-tabs,.motion-mode-tabs) button{min-width:0;min-height:42px;margin:0;padding:10px 8px;border:1px solid transparent;border-radius:8px;background:transparent;color:#344b40;font-size:14px;font-weight:600;line-height:1.4;box-shadow:none;white-space:normal}
.feature-controls :is(.sound-tabs,.motion-mode-tabs) button:hover{background:#dcebe2;border-color:transparent}
.feature-controls :is(.sound-tabs,.motion-mode-tabs) button.active{background:#23644d;border-color:#23644d;color:#fff;box-shadow:none}
.sound-panel .sound-tabs{margin-bottom:16px}
/* Library sources are secondary to the motion-mode switch. */
.feature-controls .motion-library .motion-library-tabs{display:flex;gap:18px;padding:0;background:transparent;border-bottom:1px solid var(--line);border-radius:0}
.feature-controls .motion-library .motion-library-tabs button{flex:0 1 auto;min-height:38px;padding:8px 0;border:0;border-bottom:2px solid transparent;border-radius:0;background:transparent;color:#7b8d83;font-weight:400;box-shadow:none}
.feature-controls .motion-library .motion-library-tabs button:hover{background:transparent;color:#23644d}
.feature-controls .motion-library .motion-library-tabs button.active{background:transparent;border-bottom-color:#23644d;color:#23644d;font-weight:600;box-shadow:none}

.particle-preset-row{display:flex;align-items:center;gap:8px}.particle-preset-row .particle-preset{flex:1;display:flex;align-items:center;gap:12px;text-align:left}.particle-thumb{width:52px;height:52px;object-fit:contain;border-radius:8px;background:repeating-conic-gradient(#e7e9e8 0% 25%,#fff 0% 50%) 0/12px 12px}.motion-panel .effect-image{background:repeating-conic-gradient(#e7e9e8 0% 25%,#fff 0% 50%) 0/12px 12px}

.keyboard-cover{margin-top:28px;padding-top:20px;border-top:1px solid #e4ebe7}.keyboard-cover>img{display:block;width:100%;height:auto;min-height:80px;object-fit:contain;border:1px solid #e4ebe7;border-radius:12px;margin-top:14px}.cover-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px}.cover-dialog{max-width:min(90vw,780px);border:0;border-radius:16px;padding:20px}.cover-dialog img{display:block;max-width:100%;max-height:75vh;object-fit:contain;margin-bottom:16px}.cover-dialog::backdrop{background:#132d2680}

/* Account and redemption */
#accountButton.member-active{border-color:#78ad94;background:#e9f5ed;color:#23644d}
.membership-lock-notice{display:flex;align-items:center;justify-content:center;gap:14px;padding:12px 22px;border-bottom:1px solid #ead9bd;background:#fff9ef;color:#53675d}.membership-lock-notice span{color:#74867d}.membership-lock-notice button{border-color:#23644d;background:#23644d;color:#fff}.membership-locked .workspace{filter:saturate(.55);opacity:.58}.membership-locked footer{color:#9aa59f}
.account-dialog{width:min(92vw,440px);border:0;border-radius:20px;padding:28px;box-shadow:0 24px 80px #12282055;color:#263b32}
.account-dialog::backdrop{background:#10241e99;backdrop-filter:blur(3px)}
.account-dialog .dialog-close{position:absolute;right:16px;top:14px;width:34px;height:34px;padding:0;border:0;background:transparent;font-size:25px;color:#71837a}
.account-dialog h2{margin:5px 0 10px;font-size:22px;overflow-wrap:anywhere}
.account-lead{margin:0 0 20px;color:#6f8177;line-height:1.65;font-size:14px}
.account-tabs{display:grid;grid-template-columns:1fr 1fr;gap:5px;padding:4px;margin-bottom:18px;border-radius:10px;background:#eaf1ed}
.account-tabs button{border:0;background:transparent;box-shadow:none}
.account-tabs button.active{background:#fff;color:#23644d;box-shadow:0 1px 5px #153d2d14}
.account-dialog form{display:grid;gap:14px}
.account-dialog label{display:grid;gap:7px;font-size:13px;color:#51675b}
.account-dialog input{box-sizing:border-box;width:100%;margin:0}.captcha-line{display:flex;align-items:stretch;gap:8px}.captcha-line input{flex:1;width:auto;min-width:0;margin:0}.captcha-box{position:relative;flex:none;align-self:stretch;aspect-ratio:152/65;border:1px solid var(--line);border-radius:7px;background:#fff;overflow:hidden;cursor:pointer}.captcha-box img{position:absolute;inset:0;width:100%;height:100%;object-fit:fill;display:block}.captcha-line button{align-self:center;margin:0;padding:0 2px;border:0;background:transparent;color:#5d7868;text-decoration:underline;white-space:nowrap}
.account-message{min-height:20px;margin:0;color:#337258;font-size:13px}
.account-message.error{color:#a34242}
.membership-card{display:grid;gap:6px;margin:18px 0;padding:17px;border:1px solid #ead9bd;border-radius:13px;background:#fff9ef}
.membership-card.active{border-color:#b6d8c4;background:#edf8f1}
.membership-card span{color:#65776d;font-size:13px}
.text-button{margin-top:18px;border:0;background:transparent;color:#76877e;text-decoration:underline;box-shadow:none}
@media(max-width:720px){.account-dialog{padding:24px 18px}.header-actions #accountButton{max-width:110px;overflow:hidden;text-overflow:ellipsis}}
/* Keep desktop settings scroll inside their column, including at scroll boundaries. */
@media(min-width:1001px){
 .inspector,.feature-controls{position:sticky;top:0;height:calc(100dvh - 82px);min-height:0;overflow-y:auto;overscroll-behavior-y:contain;scrollbar-gutter:stable}
}

.inspector-tabs{display:flex;gap:4px;position:sticky;top:-28px;z-index:3;background:white;padding:8px 0 14px;margin-bottom:20px;border-bottom:1px solid var(--line)}
.inspector-tabs button{flex:1;min-width:0;padding:10px 5px;font-size:13px;border:0;background:transparent}
.inspector-tabs button.active{background:#eaf3ed;color:var(--green);font-weight:600}
.software-setting-section+.software-setting-section{border-top:1px solid var(--line);margin-top:24px;padding-top:24px}
.software-setting-section button{margin:0 6px 8px 0;white-space:normal}
@media(max-width:1200px){.inspector-tabs{top:-24px}}

#exportNotice{position:fixed;right:24px;top:86px;z-index:1000;max-width:min(520px,calc(100vw - 48px));padding:14px 18px;border:1px solid #a9c9b8;border-radius:10px;background:#f2faf5;color:#23644d;box-shadow:0 4px 18px #18362320;font-size:14px;line-height:1.6;overflow-wrap:anywhere}#exportNotice.error{background:#fff3f1;color:#943b31;border-color:#e8b5ae}

.atlas-palette{background:white;border:1px solid var(--line);border-radius:12px;padding:18px;margin:16px 0}.atlas-palette-controls{display:flex;align-items:center;gap:12px;flex-wrap:wrap}.atlas-palette-controls select{width:min(260px,100%);margin:0}.atlas-palette-controls input[type=color]{width:58px;height:42px;padding:3px;margin:0}.atlas-palette-controls canvas{width:64px;height:64px;background:repeating-conic-gradient(#e2e7e5 0% 25%,white 0% 50%) 0/12px 12px}

.atlas-color-group{display:flex;align-items:center;gap:12px;flex-wrap:wrap;flex-basis:100%;padding:14px 0;border-top:1px solid var(--line)}.atlas-color-group strong{min-width:140px}.atlas-color-group small{flex:1;min-width:180px;color:#6a7d71;line-height:1.7}

/* Atlas color controls live in the inspector so the artwork stays visible. */
.atlas-settings > .atlas-palette{padding:16px 0;margin:16px 0 0;border:0;border-top:1px solid var(--line);border-radius:0;min-width:0}
.atlas-settings > hr,.atlas-settings > #seedKeys + p{display:none}
.atlas-settings .atlas-palette-controls{gap:10px}
.atlas-settings .atlas-palette-controls > select{width:100%;min-width:0}
.atlas-settings .atlas-palette-controls > button{width:100%}
.atlas-settings .atlas-palette-controls > canvas{width:48px;height:48px}
.atlas-settings details.atlas-color-group{display:block;width:100%;min-width:0;padding:0;border:1px solid var(--line);border-radius:8px;background:#fbfdfb}
.atlas-color-group summary{cursor:pointer;padding:12px 10px;font-size:13px;font-weight:600;line-height:1.5}
.atlas-color-group summary:focus-visible{outline:2px solid var(--green);outline-offset:2px}
.atlas-group-swatch{float:right;width:20px;height:20px;border:1px solid #0002;border-radius:5px}
.atlas-color-group-body{display:flex;align-items:center;gap:10px;flex-wrap:wrap;padding:0 10px 12px}
.atlas-color-group-body small{flex-basis:100%;min-width:0;font-size:12px}
.atlas-color-group-body button{flex:1;padding:9px 8px;font-size:12px}



.image-drop-hint{font-size:12px;color:#537564;margin:0 0 10px}#viewport{position:relative} .image-drop-active{outline:3px dashed #23644d;outline-offset:-4px}#viewport.image-drop-active::after{content:attr(data-drop-label);position:absolute;inset:0;z-index:20;display:grid;place-items:center;background:#e6f3ebe8;color:#23644d;font-size:22px;font-weight:600;pointer-events:none}

.particle-image-drop{display:flex;flex-direction:column;gap:10px;padding:12px;border:1px dashed #b7cbbf;border-radius:10px}.particle-image-drop small{color:#537564}.background-tile.image-drop-active,.particle-preset.image-drop-active,.particle-image-drop.image-drop-active{background-color:#e1f0e7}

.particle-preset-info{display:flex;flex-direction:column;gap:6px;min-width:0;white-space:normal}.particle-preset-info small{font-size:11px;line-height:1.5;color:#537564;font-weight:400}.particle-upload-guide{margin:0;padding:10px 12px;border-radius:8px;background:#eef5f0;color:#537564;font-size:12px;line-height:1.7}.particle-image-drop small{line-height:1.6}

.editor-tool-label{color:#537564;font-size:13px;padding:8px 0}

.atlas-tile.image-drop-active{background:#e1f0e7;box-shadow:0 0 0 3px #23644d33}.atlas-sheet.image-drop-active{outline-offset:4px}

.cover-theme-legend{margin:12px 0 0;padding:9px 10px;background:#e8f2eb;border-radius:8px;color:#315f4b;font-size:12px;line-height:1.7}

img.brand-icon{display:block;background:transparent;border-radius:0;flex-shrink:0}

