:root{font-family:Arial,Helvetica,sans-serif;color:#191919;background:#f5f5f3;font-synthesis:none;--line:#dededb;--accent:#e5ff45;--muted:#747471}*{box-sizing:border-box}body{margin:0}button,input{font:inherit}button,a,input{-webkit-tap-highlight-color:transparent}button{color:inherit;cursor:pointer}button{border:0;background:none}button:disabled{opacity:.3;cursor:default}button:focus-visible,a:focus-visible,input:focus-visible{outline:2px solid #2948f5;outline-offset:4px}a{color:inherit;text-decoration:none}button,input{accent-color:#202020}input[type=range]{width:100%;height:16px;cursor:ew-resize;margin:8px 0 0;background:transparent}input[type=range]::-webkit-slider-runnable-track{height:2px;background:#c9c9c6}input[type=range]::-webkit-slider-thumb{appearance:none;-webkit-appearance:none;width:12px;height:12px;border-radius:50%;background:#202020;margin-top:-5px}input[type=range]{appearance:none;-webkit-appearance:none}input[type=range]::-moz-range-track{height:2px;background:#c9c9c6}input[type=range]::-moz-range-thumb{width:12px;height:12px;border:0;background:#202020;border-radius:50%}input[type=color]{height:29px;width:36px;border:1px solid #c6c6c2;padding:2px;background:#fff;cursor:pointer}input[type=color]::-webkit-color-swatch-wrapper{padding:0}input[type=color]::-webkit-color-swatch{border:0}input[type=checkbox]{width:15px;height:15px;margin:0}#app{height:100dvh;min-height:620px;display:flex;flex-direction:column}.topbar{height:76px;flex:none;border-bottom:1px solid var(--line);display:flex;align-items:center;padding:0 27px;background:#fff;gap:30px}.brand{display:flex;align-items:center;font-size:36px;font-weight:700;letter-spacing:-2px;gap:13px;line-height:1}.brand-dot{color:#171717}.brandmark{display:flex;width:40px;position:relative;align-items:center;height:30px}.brandmark i{position:absolute;background:var(--accent);width:28px;height:28px;border:1px solid #1a1a1a;border-radius:50%;left:0}.brandmark i+i{left:14px;mix-blend-mode:multiply}.app-kind{font-family:monospace;font-size:12px;letter-spacing:1.5px;margin-left:6px}.export-actions{margin-left:auto;display:flex;align-items:center;gap:9px}.button{height:40px;padding:0 17px;border:1px solid #242424;display:inline-flex;align-items:center;justify-content:center;gap:9px;font-size:14px;font-weight:500;border-radius:4px}.button.primary{background:var(--accent);border-color:var(--accent)}.button.primary:hover{background:#d4ee34}.button.outline:hover{background:#f2f2ef}.iconbutton{width:32px;height:34px;display:grid;place-items:center}.iconbutton:hover:not(:disabled){background:#eee}.iconbutton svg{height:17px;width:17px}.separator{height:22px;width:1px;background:var(--line);margin:0 12px}.editor{flex:1;min-height:0;display:flex}.settings{width:274px;flex:none;overflow:auto;background:#fafaf8;border-right:1px solid var(--line);padding:0 23px 20px;scrollbar-width:thin}.settings-title{display:flex;align-items:center;justify-content:space-between;height:71px}.settings-title h1{font-size:17px;font-weight:500;margin:0;letter-spacing:-.25px}.edition{font:12px monospace;color:var(--muted)}section{padding:21px 0 23px;border-top:1px solid var(--line)}h2{font-size:14px;font-weight:600;display:flex;align-items:center;gap:10px;margin:0 0 20px}h2>span{font:12px monospace;color:#90908a}.two-columns{display:flex;gap:12px;margin-bottom:18px}.number-label{width:50%;font-size:14px;color:#555}.number-label input{display:block;background:#fff;border:1px solid #d8d8d3;border-radius:3px;width:100%;height:38px;margin-top:8px;padding:0 10px;color:#171717;font-size:16px;font-variant-numeric:tabular-nums}.control{margin-top:16px}.control label{font-size:14px;display:flex;justify-content:space-between;gap:8px;align-items:center}.control output{font:12px monospace;white-space:nowrap;color:#4f4f4a}.segment{display:flex;padding:3px;border:1px solid #d8d8d3;border-radius:4px;margin-top:17px;gap:2px;background:#eeeee9}.segment button{flex:1;border-radius:2px;font-size:14px;padding:7px 4px;color:#65655f;white-space:nowrap}.segment button.active{background:#fff;color:#171717;box-shadow:0 1px 3px #0000000b}.segment button:hover{color:#171717}.range-captions{display:flex;justify-content:space-between;font-size:12px;color:#858580;margin-top:5px}.fusion-sample{margin:15px 0 -5px;color:#1c1c1c;background:#eeeEEa;border-radius:3px;height:47px;padding:2px 8px}.fusion-sample svg{height:100%;width:100%;fill:currentColor}.palette{display:flex;gap:6px;align-items:center;margin-bottom:17px}.swatch{width:25px;height:25px;flex:0 0 25px;border-radius:50%;background:var(--swatch);border:1px solid #00000012;position:relative}.swatch.active:after{content:'';position:absolute;inset:-4px;border:1px solid #222;border-radius:50%}.custom-color{height:25px;width:25px;display:grid;place-items:center;border:1px solid #cececa;border-radius:50%;font-size:19px;position:relative;overflow:hidden;cursor:pointer}.custom-color input{position:absolute;inset:0;width:100%;height:100%;opacity:0;cursor:pointer}.help{font-size:12px;line-height:1.5;color:#74746e;margin:12px 0 0}.color-row{display:flex;align-items:center;justify-content:space-between;font-size:14px}.background-section{padding-top:18px;padding-bottom:18px}.check-row{display:flex;align-items:center;gap:8px;font-size:12px;color:#66665f;cursor:pointer;line-height:1.4}.background-section .check-row{margin-top:14px}.aside-bottom{display:flex;justify-content:space-between;gap:10px;border-top:1px solid var(--line);padding-top:18px}.text-button{font-size:12px;padding:0;text-align:left;text-decoration:underline;text-underline-offset:3px}.text-button:hover{color:#2948f5}.muted{color:#81817a}.selection-name{font-size:12px;color:#74746e}.workspace{flex:1;min-width:0;display:flex;flex-direction:column;background:#eeeeeb}.workspace-top{min-height:71px;display:flex;align-items:center;justify-content:space-between;padding:15px 28px;gap:16px;flex-wrap:wrap}.toolbox{display:flex;background:#fff;border:1px solid #d8d8d3;border-radius:5px;padding:3px;gap:3px}.toolbox button{height:34px;display:flex;gap:7px;align-items:center;padding:0 11px;border-radius:3px;font-size:14px;color:#74746e}.toolbox button.active{background:#232323;color:white}.toolbox button:hover:not(.active){background:#f0f0ec;color:#222}.view-toggle{display:flex;gap:4px;align-items:center}.view-toggle button{display:flex;align-items:center;gap:6px;font-size:12px;color:#85857d;padding:8px}.view-toggle button.active{color:#202020}.view-toggle button.active svg{stroke-width:2}.view-toggle button:hover{color:#202020}.canvas-area{flex:1;min-height:0;overflow:auto;display:flex;flex-direction:column;align-items:center;padding:0 38px 12px;scrollbar-width:thin}.canvas-caption,.canvas-bottom{width:min(100%,760px);display:flex;align-items:center;justify-content:space-between;flex:none;color:#83837b;font:11px monospace;letter-spacing:.5px}.canvas-caption{height:27px;margin-bottom:7px}.paper{flex:none;width:min(100%,calc((100dvh - 320px)*var(--ratio,1)),760px);max-height:none;border:1px solid #deded7;background:white;box-shadow:0 2px 8px #00000004;position:relative;transition:background .15s}#drawing{display:block;width:100%;height:100%;outline-offset:3px;touch-action:none;cursor:crosshair}#art-layer,#grid-layer,#feedback-layer{pointer-events:none}.canvas-bottom{min-height:43px;gap:12px;font-size:11px;letter-spacing:0}.zoom-controls{display:flex;align-items:center;gap:3px}.zoom-controls button{height:28px;min-width:28px;font-size:15px;display:grid;place-items:center}.zoom-controls button:nth-child(2){font:11px monospace;width:56px}.zoom-controls button:hover{background:#dfdfda}.workspace-bottom{height:49px;flex:none;display:flex;align-items:center;justify-content:space-between;padding:0 27px;border-top:1px solid #deded6;gap:18px}.workspace-bottom p{font-size:12px;color:#777770;margin:0;line-height:1.4}.workspace-bottom label{white-space:nowrap}.footer{height:34px;flex:none;border-top:1px solid var(--line);background:#fff;display:flex;justify-content:space-between;align-items:center;padding:0 25px;font-size:11px;color:#7a7a74}.footer a:hover{color:#222}#notice{position:fixed;bottom:52px;left:50%;transform:translate(-50%,15px);background:#222;color:white;padding:13px 20px;border-radius:5px;font-size:14px;max-width:90%;opacity:0;pointer-events:none;transition:opacity .2s,transform .2s;z-index:10}#notice.visible{opacity:1;transform:translate(-50%,0)}[hidden]{display:none!important}#gradient-controls{padding-top:16px}
@media(min-width:1500px){.settings{width:290px;padding-left:28px;padding-right:28px}.paper{width:min(100%,calc((100dvh - 320px)*var(--ratio,1)),1000px)}.canvas-caption,.canvas-bottom{width:min(100%,1000px)}.workspace-top{padding-left:38px;padding-right:38px}}
@media(max-width:1100px){.app-kind{display:none}.settings{width:255px;padding-left:19px;padding-right:19px}.workspace-top{padding:13px 18px;gap:8px}.toolbox button{padding:0 9px}.toolbox button span{display:none}.view-toggle button{font-size:12px;padding:6px}.canvas-area{padding-left:24px;padding-right:24px}.workspace-bottom{padding:0 18px}.workspace-bottom p{max-width:65%}.palette{gap:5px}.swatch{width:24px;height:24px;flex-basis:24px}}
@media(max-width:700px){#app{height:auto;min-height:100dvh}.topbar{height:66px;padding:0 16px;gap:12px}.brand{font-size:29px;gap:9px}.brandmark{transform:scale(.85);transform-origin:left center;width:35px}.export-actions{gap:4px}.separator{margin:0 3px}.button{height:36px;padding:0 10px;font-size:12px}.button.primary svg{display:none}.iconbutton{width:25px}.editor{flex-direction:column;min-height:0}.settings{order:2;width:100%;border-right:0;border-top:1px solid var(--line);display:grid;grid-template-columns:1fr 1fr;gap:0 24px;padding:0 20px 24px;overflow:visible}.settings-title{grid-column:1/-1;height:59px}section{padding:20px 0}.aside-bottom{grid-column:1/-1}.workspace{min-height:530px;order:1}.workspace-top{min-height:60px;padding:12px 16px}.toolbox button{padding:0 9px}.view-toggle button span{display:none}.view-toggle button{padding:7px 10px}.canvas-area{overflow:visible;min-height:370px;padding:0 20px 10px}.paper{width:min(100%,440px);max-height:none}.canvas-caption,.canvas-bottom{width:min(100%,440px)}.canvas-caption{font-size:11px}.workspace-bottom{height:auto;min-height:48px;padding:9px 16px}.workspace-bottom p{font-size:12px}.footer{height:auto;min-height:45px;padding:12px 20px;gap:15px;font-size:11px}.footer>span{display:none}.footer>a{margin-left:auto}.palette{gap:7px;flex-wrap:wrap}.swatch{width:24px;height:24px;flex-basis:24px}.segment button{font-size:12px}.background-section .check-row{font-size:12px}.canvas-bottom{font-size:10px;gap:4px}}
@media(max-width:380px){.topbar{padding:0 10px}.brand{font-size:25px;gap:3px}.brandmark{width:31px;transform:scale(.7)}.export-actions{gap:2px}.button{padding:0 8px}.export-actions .separator{display:none}.settings{grid-template-columns:1fr;padding-left:24px;padding-right:24px}.settings-title,.aside-bottom{grid-column:1}.palette{gap:9px}.swatch{width:27px;height:27px;flex-basis:27px}}
.about-symbol{display:none}.about-button{white-space:nowrap}#about-dialog{width:min(560px,calc(100vw - 32px));padding:26px}#about-dialog .about-name{margin:24px 0 14px;font-size:25px;font-weight:700;color:var(--accent)}#about-dialog .about-description{max-width:48em;font-size:14px;line-height:1.65}#about-dialog .about-credit{display:grid;grid-template-columns:1fr auto;gap:8px 20px;margin-top:30px;padding-top:18px;border-top:1px solid #111;font-size:13px}#about-dialog .about-credit span{grid-column:1/-1;color:var(--muted);text-transform:uppercase}#about-dialog .about-credit a{text-decoration:underline;text-underline-offset:3px}@media(max-width:1100px){.about-button{width:36px;padding:0}.about-label{display:none}.about-symbol{display:inline}}@media(max-width:500px){#about-dialog{padding:20px}#about-dialog .about-credit{grid-template-columns:1fr}}@media(prefers-reduced-motion:reduce){*{transition:none!important}}

.view-toggle button{font-size:14px}.check-row{font-size:14px}.text-button{font-size:14px}.aside-bottom{flex-wrap:wrap;gap:12px}.workspace-bottom .check-row{font-size:12px}@media(max-width:1100px){.view-toggle button{font-size:12px}}

#drawing.resizing{cursor:crosshair}#drawing{user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}

#localSize{display:block;width:100%;height:38px;margin:10px 0 17px;padding:0 10px;border:1px solid #d8d8d3;border-radius:3px;background:#fff;font:16px Arial,sans-serif}

.layer-section{padding-top:17px}.layer-section h2{margin-bottom:12px}.grid-row{display:flex;align-items:center;gap:9px;margin:0 -6px 4px;padding:5px 6px;border-radius:4px}.grid-row.active{background:#e7e7e1}.grid-row>input{flex:none;width:15px;height:15px;accent-color:#202020}.grid-row>button{display:flex;align-items:center;gap:8px;text-align:left;flex:1;min-height:30px;padding:0;font-size:14px}.grid-symbol{width:17px;height:17px;border:1px solid #555;border-radius:50%;flex:none}.grid-symbol.small{width:9px;height:9px;margin:4px}.layer-section>.text-button{margin-top:12px;font-size:13px}#grid-placement-row{margin:0 0 18px}#grid-placement{width:100%;height:37px;margin-top:8px;padding:0 8px;border:1px solid #d8d8d3;border-radius:3px;background:white;font-size:14px}

.grid-link{margin-top:16px;padding-top:14px;border-top:1px solid var(--line)}.grid-link .check-row{color:#191919;font-weight:500}.grid-link .help{margin-top:8px}.grid-link input{flex:none}

.layers-panel{width:236px;flex:none;border-left:1px solid var(--line);background:#fafaf8;padding:0 15px 20px;overflow:auto;scrollbar-width:thin}.layers-heading{height:71px;display:flex;align-items:center;justify-content:space-between}.layers-heading h2{margin:0;font-size:17px;font-weight:500}.layers-heading>span{font:12px monospace;color:var(--muted)}.layers-intro{margin:0 0 15px}.layer-row{display:flex;align-items:center;gap:3px;border:1px solid transparent;border-radius:4px;min-height:65px;position:relative;cursor:grab}.layer-row.active{background:#eaf6b6;border-color:#cedb98}.layer-row.dragging{opacity:.45}.drag-grip{font-size:17px;color:#92928a;width:12px;flex:none}.layer-eye{padding:5px 2px;flex:none;display:grid;place-items:center}.hidden-layer .layer-eye{opacity:.3}.layer-select{display:flex;align-items:center;gap:9px;min-width:0;flex:1;text-align:left;padding:7px 5px;cursor:inherit}.layer-select>span{font-size:14px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.layer-thumbnail{width:41px;height:45px;flex:none;border:1px solid #d9d9d2;background:white;pointer-events:none}.hidden-layer .layer-thumbnail{opacity:.4}.layer-row.drop-above:before,.layer-row.drop-below:after{content:'';position:absolute;left:0;right:0;height:3px;background:#2948f5;z-index:1}.layer-row.drop-above:before{top:-2px}.layer-row.drop-below:after{bottom:-2px}.layer-actions{margin-top:15px;padding-top:16px;border-top:1px solid var(--line)}.layer-actions>.button{width:100%;font-size:14px}.layer-order{display:flex;align-items:center;gap:5px;margin-top:10px}.layer-order .text-button{margin-left:auto;font-size:13px}.layer-details{margin-top:23px;padding-top:18px;border-top:1px solid var(--line)}.layer-details label{font-size:14px}.layer-details input{display:block;width:100%;height:36px;border:1px solid #d8d8d3;background:white;border-radius:3px;padding:0 8px;margin-top:8px;font-size:14px}.grid-row.focused{box-shadow:inset 2px 0 #74746e}.canvas-caption{gap:12px}.canvas-caption>span:last-child{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.workspace-bottom p{font-size:12px}.workspace-bottom{height:auto;min-height:49px;padding-top:8px;padding-bottom:8px}.canvas-bottom{flex-wrap:wrap}.settings .help,.layers-panel .help{font-size:12px}
@media(max-width:1250px) and (min-width:901px){.layers-panel{width:204px;padding-left:10px;padding-right:10px}.settings{width:235px;padding-left:16px;padding-right:16px}.workspace-top{padding:12px;gap:5px}.toolbox button span,.view-toggle button span{display:none}.canvas-area{padding-left:16px;padding-right:16px}.layer-thumbnail{width:32px}.layer-select{gap:6px}.workspace-bottom{padding-left:12px;padding-right:12px}.workspace-bottom .check-row{white-space:normal}.workspace-bottom p{max-width:none}}
@media(max-width:900px) and (min-width:701px){.editor{display:grid;grid-template-columns:235px minmax(0,1fr);grid-template-rows:minmax(0,1fr) auto}.settings{grid-row:1/3;width:235px}.workspace{grid-column:2;grid-row:1;min-height:0}.layers-panel{grid-column:2;grid-row:2;width:auto;max-height:225px;border-left:0;border-top:1px solid var(--line);padding-bottom:12px}.layers-heading{height:42px}.layers-intro{display:none}.layer-actions{margin-top:8px;padding-top:8px;display:flex;gap:12px}.layer-actions>.button{width:auto}.layer-order{margin:0;flex:1}.layer-row{min-height:51px}.layer-thumbnail{height:35px}.workspace-top{padding:10px}.view-toggle button span{display:none}.canvas-area{padding-left:16px;padding-right:16px}.canvas-bottom{gap:3px}.workspace-bottom .check-row{white-space:normal}.paper{width:min(100%,calc((100dvh - 470px)*var(--ratio,1)))}}
@media(max-width:700px){.layers-panel{order:2;width:100%;border-left:0;border-top:1px solid var(--line);padding:0 20px 20px;overflow:visible}.settings{order:3}.layers-heading{height:54px}.layer-actions{display:flex;gap:15px}.layer-actions>.button{width:auto}.layer-order{margin:0;flex:1}.layer-details{margin-top:15px}.layer-thumbnail{width:42px}.layers-intro{margin-bottom:10px}}

.shape-picker{display:flex;gap:4px;margin:-4px 0 18px}.shape-picker button{height:40px;flex:1;min-width:0;border:1px solid #d8d8d3;border-radius:4px;display:grid;place-items:center;background:white}.shape-picker button.active{background:var(--accent);border-color:#a5b822}.shape-picker svg{width:28px;height:28px;fill:#252525}#grid-layer path,#grid-layer circle,#feedback-layer>g>path,#feedback-layer>g>circle{vector-effect:non-scaling-stroke}.export-menu{position:relative}.export-menu summary{list-style:none;cursor:pointer;user-select:none}.export-menu summary::-webkit-details-marker{display:none}.export-dropdown{position:absolute;right:0;top:47px;width:230px;padding:6px;background:#fff;border:1px solid #d8d8d3;box-shadow:0 8px 25px #0002;border-radius:5px;z-index:25}.export-dropdown button{display:block;width:100%;text-align:left;padding:13px 12px;font-size:14px;border-radius:3px}.export-dropdown button:hover{background:#f0f2e5}.document-strip{display:flex;align-items:center;gap:8px;height:49px;flex:none;padding:0 20px;background:#fafaf8;border-bottom:1px solid var(--line)}#drawing-tabs{display:flex;align-items:center;gap:3px;flex:1;min-width:0;overflow:auto;scrollbar-width:thin}#drawing-tabs button{flex:none;min-width:44px;max-width:160px;height:36px;padding:0 15px;border-radius:4px;font-size:15px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}#drawing-tabs button.active{background:#222;color:#fff}#drawing-tabs button:hover:not(.active){background:#e9e9e1}.new-drawing{height:40px;width:38px;font-size:24px;flex:none}.drawing-identity{display:flex;align-items:center;gap:7px;padding-left:12px;border-left:1px solid var(--line)}.drawing-identity label{font-size:12px;color:var(--muted)}#drawing-name{width:100px;height:32px;padding:0 8px;background:white;border:1px solid #d8d8d3;border-radius:3px;font-size:14px}#delete-drawing{font-size:20px;width:30px;height:36px}#save-state{font-size:12px;color:#73736b;min-width:86px;text-align:right}#storage-error{padding:12px 20px;background:#fff2c0;font-size:14px;display:flex;gap:12px;align-items:center}#storage-error button{font-size:14px;text-decoration:underline;white-space:nowrap}.paper{width:min(100%,calc((100dvh - 369px)*var(--ratio,1)),1000px)}dialog{border:1px solid #d0d0c9;border-radius:7px;background:#fafaf8;padding:24px;width:520px;max-width:calc(100% - 24px);max-height:85dvh;overflow:auto;color:#191919}dialog::backdrop{background:#0005}.dialog-heading{display:flex;align-items:center;justify-content:space-between;margin-bottom:22px}.dialog-heading h2{margin:0;font-size:18px}.dialog-heading button{width:36px;height:36px;display:grid;place-items:center}.font-name-label{display:block;font-size:14px}.font-name-label input{display:block;width:100%;height:42px;padding:0 10px;margin-top:8px;border:1px solid #d5d5ce;background:white;border-radius:3px;font-size:16px}.collection-selection{display:flex;justify-content:space-between;gap:12px;margin:24px 0 12px;font-size:14px}.collection-selection .text-button{font-size:13px}#export-drawings{display:grid;grid-template-columns:repeat(auto-fill,minmax(92px,1fr));gap:5px;max-height:230px;overflow:auto}#export-drawings label{display:flex;align-items:center;gap:8px;background:#fff;padding:10px;border:1px solid #e0e0d8;border-radius:3px;min-height:42px;font-size:14px}#export-drawings label span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}#export-drawings input{flex:none}.collection-buttons{display:flex;gap:10px;margin-top:22px}.collection-buttons button{flex:1;min-height:44px}#collection-status{font-size:13px;line-height:1.5;margin:14px 0 0;min-height:20px}.collection-buttons+small{display:block}.export-menu .button{min-width:44px}
@media(max-width:900px) and (min-width:701px){.paper{width:min(100%,calc((100dvh - 519px)*var(--ratio,1)))}.document-strip{padding:0 12px}.drawing-identity label{display:none}#drawing-name{width:75px}#save-state{min-width:75px}}
@media(max-width:700px){.document-strip{padding:0 10px;gap:4px}.drawing-identity{gap:2px;padding-left:6px}.drawing-identity label,#save-state{display:none}#drawing-name{width:65px}#delete-drawing{width:25px}.paper{width:min(100%,440px)}.export-actions .separator{display:none}.topbar{padding:0 12px;gap:8px}.export-menu summary span{display:none}.export-menu summary{padding:0 10px}.export-menu summary svg{display:block}.export-actions #save-project{font-size:12px;padding:0 10px}.shape-picker button{height:44px}dialog{padding:18px}.collection-buttons{flex-wrap:wrap}.font-name-label input{font-size:16px}.export-dropdown{top:42px}.layer-select,.layer-eye,.layer-order button,.grid-row button,.grid-row input{min-height:32px}.settings input[type=range]{height:28px}}

/* Fit against the drawing viewport, independently of the paper dimensions. */
.canvas-area{align-items:safe center;overflow:auto}
@media(max-width:700px){.canvas-area{flex:none;height:clamp(320px,60dvh,600px);min-height:0;overflow:auto}}

.mobile-drawer{display:none}
html.mobile-editor,html.mobile-editor body{height:100%;overflow:hidden;overscroll-behavior:none}
#app.mobile-ui{position:fixed;inset:0;height:var(--mobile-height,100dvh);min-height:0;padding:env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);overflow:hidden}
.mobile-ui .topbar{height:48px;min-height:48px;padding:0 10px;gap:4px}
.mobile-ui .brand{font-size:24px;letter-spacing:-1px;gap:0}.mobile-ui .brandmark,.mobile-ui .app-kind,.mobile-ui .separator{display:none}
.mobile-ui .export-actions{gap:2px}.mobile-ui .iconbutton{width:40px;height:44px}.mobile-ui .export-actions #save-project{font-size:12px;padding:0 8px;height:40px}.mobile-ui .export-menu summary{height:40px;padding:0 10px}.mobile-ui .export-menu summary span{display:none}.mobile-ui .export-menu summary svg{display:block}
.mobile-ui .document-strip{height:44px;padding:0 8px;gap:2px}.mobile-ui #drawing-tabs button{height:40px}.mobile-ui #drawing-name{font-size:16px;width:54px}.mobile-ui .drawing-identity label,.mobile-ui #save-state{display:none}.mobile-ui #delete-drawing{width:32px;height:40px}.mobile-ui .drawing-identity{padding-left:5px;gap:0}
.mobile-ui .editor{display:flex;flex-direction:column;min-height:0;overflow:hidden}.mobile-ui .workspace{order:0;flex:1;min-height:0;overflow:hidden}
.mobile-ui .workspace-top{flex:none;min-height:46px;height:46px;padding:1px 10px;gap:4px;flex-wrap:nowrap}.mobile-ui .toolbox{padding:0;gap:0}.mobile-ui .toolbox button{height:42px;min-width:44px;padding:0 12px}.mobile-ui .toolbox button span,.mobile-ui .view-toggle button span{display:none}.mobile-ui .view-toggle button{height:44px;min-width:44px;justify-content:center;padding:0 10px}
.mobile-ui .canvas-area{flex:1;height:auto;min-height:0;overflow:auto;padding:0 10px 4px;overscroll-behavior:contain}.mobile-ui .canvas-caption{height:20px;margin-bottom:3px;width:100%;font-size:10px}.mobile-ui .canvas-caption>span:first-child{display:none}.mobile-ui .canvas-bottom{width:100%;min-height:40px;flex-wrap:nowrap;gap:4px}.mobile-ui #count{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-size:10px;flex:1}.mobile-ui #dimensions{display:none}.mobile-ui .zoom-controls button{height:40px;min-width:40px}.mobile-ui .workspace-bottom,.mobile-ui .footer{display:none}
.mobile-ui .mobile-drawer{display:flex;flex-direction:column;order:1;flex:0 0 calc(var(--drawer-fraction,.38) * 100%);min-height:64px;overflow:hidden;background:#fafaf8;border-top:1px solid #c7c7be;border-radius:14px 14px 0 0}.mobile-ui .mobile-drawer.collapsed{flex-basis:64px}
.drawer-handle{height:20px;flex:none;width:100%;display:grid;place-items:center;touch-action:none;cursor:ns-resize}.drawer-handle i{width:38px;height:4px;border-radius:3px;background:#aaa99e}.mobile-tabs{height:44px;flex:none;display:flex;gap:3px;padding:0 8px 4px;border-bottom:1px solid var(--line)}.mobile-tabs button{flex:1;min-width:0;border-radius:5px;font-size:14px;height:40px}.mobile-tabs button[aria-pressed=true]{background:var(--accent);color:#171717}.mobile-tabs .drawer-toggle{flex:0 0 38px;font-size:23px}
.mobile-scroll{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;scrollbar-width:thin}.collapsed .mobile-scroll{display:none}
.mobile-ui .settings,.mobile-ui .layers-panel{display:block;width:100%;height:auto;max-height:none;padding:0 18px 24px;border:0;overflow:visible}.mobile-ui .settings-title{display:none}.mobile-ui .settings>section{padding:16px 0;border-top:0}.mobile-ui .settings h2{margin-bottom:12px}.mobile-ui .settings .help{font-size:13px}.mobile-ui .settings input:not([type=checkbox]):not([type=range]),.mobile-ui .layers-panel input,.mobile-ui select{font-size:16px;min-height:40px}.mobile-ui .settings input[type=range]{height:36px}.mobile-ui input[type=range]::-webkit-slider-thumb{width:24px;height:24px;margin-top:-11px}.mobile-ui input[type=range]::-moz-range-thumb{width:24px;height:24px}.mobile-ui .swatch,.mobile-ui .custom-color{width:34px;height:34px;flex-basis:34px}.mobile-ui .palette{gap:12px;flex-wrap:wrap}.mobile-ui .grid-row>button,.mobile-ui .layer-eye,.mobile-ui .layer-select,.mobile-ui .layer-order button,.mobile-ui .text-button{min-height:44px}.mobile-ui .grid-row>input{width:22px;height:22px;min-height:22px}.mobile-ui .layer-actions{flex-wrap:wrap}.mobile-ui .layer-actions>.button{height:44px}.mobile-ui .layers-heading{height:48px}.mobile-ui .layers-intro{display:none}
.mobile-ui .mobile-drawer:not([data-panel=layers]) .layers-panel,.mobile-ui .mobile-drawer[data-panel=layers] .settings{display:none}
.mobile-ui .mobile-drawer:not([data-panel=grid]) [data-mobile-section=grid],.mobile-ui .mobile-drawer:not([data-panel=shape]) [data-mobile-section=shape],.mobile-ui .mobile-drawer:not([data-panel=color]) [data-mobile-section=color]{display:none}
.mobile-ui #storage-error{flex:none;max-height:70px;overflow:auto;padding:6px 10px;font-size:12px}.mobile-ui .export-dropdown{top:44px;max-height:55dvh;overflow:auto}.mobile-ui #notice{bottom:80px}
@media(max-height:500px){.mobile-ui .topbar{height:44px;min-height:44px}.mobile-ui .document-strip{height:40px}.mobile-ui .workspace-top{height:44px;min-height:44px}.mobile-ui .canvas-caption{display:none}.mobile-ui .canvas-bottom{min-height:32px}.mobile-ui .zoom-controls button{height:32px}}
.file-delivery .file-name{overflow-wrap:anywhere;font-size:16px}.file-delivery>.button{display:flex;width:100%;min-height:44px;margin-top:14px}.file-delivery .help{font-size:14px}.file-delivery .dialog-heading button{font-size:24px}

/* Monochrome instrument panels with one signal colour. */
:root{font-family:'SFMono-Regular',Consolas,'Liberation Mono',Menlo,monospace;--accent:#5bff4b;--line:#c2c2c2;--muted:#656565;color:#080808;background:#fff}
body,.topbar,.document-strip,.settings,.layers-panel,.footer{background:#fff}
button,input,select,output,.control output,.canvas-caption,.canvas-bottom,.zoom-controls button:nth-child(2),#localSize,.edition,.app-kind,.layers-heading>span,h2>span{font-family:inherit}
.brand{font-size:32px;letter-spacing:-1.5px;text-transform:uppercase;font-weight:700;gap:0}.brandmark{display:none}.brand-dot{color:#168a0c}.app-kind{letter-spacing:0;font-size:12px;color:#666}
.topbar{border-color:#141414}.document-strip{border-bottom:1px dotted #777}.settings,.layers-panel{border-color:#a0a0a0}
.settings-title h1,.layers-heading h2{font-size:17px;font-weight:600;text-transform:uppercase;letter-spacing:-.4px}h2{font-size:14px;text-transform:uppercase;letter-spacing:-.25px;font-weight:600;gap:6px}h2:before{content:'/';color:#111}h2>span{display:none}
.settings section{border-top:1px dotted #999;padding:18px 0}.settings-title,.layers-heading{height:60px}.grid-link,.layer-actions,.layer-details,.aside-bottom{border-color:#999;border-top-style:dotted}.grid-link{margin-top:12px;padding-top:12px}.layer-details{margin-top:16px}.layer-section>.text-button{margin-top:4px}
.button,.segment,.segment button,.toolbox,.toolbox button,.shape-picker button,.grid-row,.layer-row,.export-dropdown,.export-dropdown button,#drawing-tabs button,dialog,#export-drawings label,.number-label input,#localSize,#drawing-name,.layer-details input,.font-name-label input{border-radius:0;box-shadow:none}
.button{text-transform:uppercase;letter-spacing:-.3px;font-size:13px;border-color:#111}.button.primary{background:#080808;color:#fff;border-color:#080808}.button.primary:hover{background:#252525;color:var(--accent)}.button.outline:hover{background:#f0f0f0}.iconbutton:hover:not(:disabled){background:var(--accent)}
#save-project{border-bottom:3px solid var(--accent)}.segment{padding:0;gap:0;background:#fff;border-color:#aaa}.segment button{padding:9px 3px;font-size:13px;letter-spacing:-.5px;color:#333}.segment button+button{border-left:1px solid #aaa}.segment button.active{background:#080808;color:#fff;box-shadow:none}
.shape-picker{gap:5px}.shape-picker button{border-color:#888;background:white}.shape-picker button.active{background:var(--accent);border-color:#111}.shape-picker svg{fill:#080808}
.toolbox{background:white;border-color:#888;padding:0;gap:0}.toolbox button.active{background:#080808;color:var(--accent)}.toolbox button{height:40px}.view-toggle button.active{color:#080808;background:var(--accent)}
.workspace{background:#f2f2f2}.paper{border-color:#a0a0a0;box-shadow:0 0 0 2px var(--accent);transition:none}.workspace-bottom{border-top:1px dotted #999}.workspace-bottom #instruction:empty{display:none}.workspace-bottom{justify-content:flex-end}.canvas-caption,.canvas-bottom{color:#535353}.canvas-caption{letter-spacing:0}.canvas-caption>span:first-child{font-size:11px}
.grid-row.active{background:#ededed}.grid-row.focused{box-shadow:inset 2px 0 #080808}.layer-row.active{background:#f2f2f2;border-color:#111;border-left:4px solid var(--accent)}.layer-thumbnail{border-color:#b0b0b0}.grid-symbol{border-color:#111}
#drawing-tabs button{font-size:14px;border-right:1px solid #ddd}#drawing-tabs button.active{background:#080808;color:var(--accent)}#drawing-tabs button:hover:not(.active){background:#ededed}.document-strip{gap:4px}.drawing-identity{border-color:#aaa}
input[type=range]::-webkit-slider-runnable-track{background:#bbb;height:1px}input[type=range]::-webkit-slider-thumb{width:7px;height:22px;border-radius:0;background:#111;margin-top:-10px}input[type=range]::-moz-range-track{background:#bbb;height:1px}input[type=range]::-moz-range-thumb{width:7px;height:22px;border-radius:0;background:#111}.control:focus-within input[type=range]::-webkit-slider-thumb{background:var(--accent)}.control:focus-within input[type=range]::-moz-range-thumb{background:var(--accent)}
input[type=checkbox]{accent-color:#111}.number-label,.color-row,.check-row{color:#222}.control output{font-size:13px;color:#080808}.range-captions{font-size:12px;color:#666}.fusion-sample{display:none}.text-button{font-size:13px;color:#222;text-decoration:none}.text-button:hover{text-decoration:underline;color:#111}.muted{color:#666}.swatch.active:after{border:2px solid #111}
.export-dropdown{background:white;border:1px solid #111;box-shadow:4px 4px 0 #0001}.export-dropdown button:hover{background:var(--accent)}dialog{background:#fff;border-color:#111}dialog::backdrop{background:#0005}#export-drawings label{border-color:#aaa}#notice{border-radius:0;background:#080808;border-left:4px solid var(--accent)}
.mobile-ui .mobile-drawer{background:#fff;border-radius:0;border-top:1px solid #111}.drawer-handle i{width:44px;height:3px;border-radius:0;background:#111}.mobile-tabs{gap:0;padding:0 6px 4px;border-bottom:1px dotted #888}.mobile-tabs button{border-radius:0;font-size:13px;letter-spacing:-.5px}.mobile-tabs button[aria-pressed=true]{background:#080808;color:var(--accent)}.mobile-ui .settings>section{border-top:1px dotted #999}.mobile-ui .settings>section:first-child{border-top:0}.mobile-ui .workspace-top{background:#fff;border-bottom:1px dotted #aaa;margin-bottom:5px}.mobile-ui .settings,.mobile-ui .layers-panel{background:#fff}.mobile-ui .brand{font-size:23px;letter-spacing:-1px}.mobile-ui .export-actions #save-project{font-size:12px;letter-spacing:-.8px;padding:0 7px}.mobile-ui input[type=range]::-webkit-slider-thumb{width:12px;height:26px;margin-top:-12px}.mobile-ui input[type=range]::-moz-range-thumb{width:12px;height:26px}.mobile-ui .segment button{font-size:13px}.mobile-ui .canvas-area{padding-top:3px}.mobile-ui .paper{box-shadow:0 0 0 1px var(--accent)}
@media(max-width:380px){.mobile-ui .brand{font-size:20px}.mobile-ui .iconbutton{width:35px}.mobile-ui .export-actions{gap:0}.mobile-tabs button{font-size:12px}}
.workspace,.mobile-ui .workspace,.canvas-area{background:#fff}

/* Compact bilingual controls. Case changes are visual, never applied to glyph data. */
body{font-size:12px;text-transform:uppercase}input,select,textarea,button{font-family:inherit}button,select,option,label,output{text-transform:uppercase}input[type=text],#drawing-name,#font-name,#layer-name,[data-user-text],#drawing-tabs,#export-drawings,.file-name,#grid-caption{ text-transform:none }
.topbar{height:60px;padding:0 18px;gap:18px}.brand{font-size:28px}.app-kind{display:none}.export-actions{gap:6px}.button{height:34px;font-size:12px;padding:0 12px}.export-dropdown{top:39px}.export-dropdown button{font-size:12px;padding:11px 9px}.interface-preferences{display:flex;gap:4px;flex:none}.interface-preferences button{height:34px;min-width:34px;display:grid;place-items:center;border:1px solid #111;font-size:12px;background:#fff;color:#111}.interface-preferences button[aria-pressed=true]{background:#111;color:#fff}.interface-preferences button:hover{box-shadow:inset 0 -3px 0 var(--accent)}
.settings{width:235px;padding:0 16px 16px}.layers-panel{width:210px;padding:0 12px 16px}.settings-title,.layers-heading{height:46px}.settings-title h1,.layers-heading h2{font-size:14px}h2{font-size:13px;margin-bottom:12px}.settings section{padding:14px 0}.settings .control{margin-top:12px}.control label,.number-label,.color-row,.check-row,.layer-details label,.font-name-label,.collection-selection{font-size:12px}.control output{font-size:12px}.number-label input{height:32px;margin-top:5px;font-size:14px}.two-columns{gap:8px;margin-bottom:12px}.shape-picker{margin:0 0 12px}.shape-picker button{height:34px}.shape-picker svg{width:24px;height:24px}.segment{margin-top:12px}.segment button{font-size:12px;padding:7px 2px}.palette{margin-bottom:12px}.grid-row{margin-bottom:2px}.grid-row>button,.layer-select>span,.layer-actions>.button,.text-button,.layer-section>.text-button{font-size:12px}.layer-row{min-height:52px}.layer-thumbnail{height:36px;width:32px}.layer-details{margin-top:12px;padding-top:12px}.layer-actions{margin-top:10px;padding-top:10px}.layer-details input{font-size:14px;height:32px}#localSize{height:32px;font-size:14px;margin:6px 0 10px}.range-captions{font-size:11px}.workspace-top{min-height:54px;padding:8px 16px}.toolbox button{height:34px;font-size:12px}.view-toggle button{font-size:12px}.workspace-bottom{min-height:34px;padding:4px 16px}.workspace-bottom p,.workspace-bottom .check-row{font-size:11px}.document-strip{height:40px;padding:0 14px}#drawing-tabs button{height:32px;font-size:13px;padding:0 11px}#drawing-name{height:30px;font-size:14px}#save-state,.selection-name{font-size:11px}.footer{height:26px;font-size:10px}.help,.settings .help,.file-delivery .help,#collection-status{font-size:12px;line-height:1.5}.dialog-heading h2{font-size:15px}.font-name-label input{height:36px;font-size:16px}#export-drawings label{font-size:13px}#notice{font-size:12px}
.mobile-ui .topbar{height:80px;min-height:80px;display:grid;grid-template-columns:auto 1fr;grid-template-rows:40px 40px;gap:0;padding:0 10px}.mobile-ui .brand{grid-column:1;grid-row:1;font-size:22px}.mobile-ui .interface-preferences{grid-column:2;grid-row:1;justify-self:end;gap:4px}.mobile-ui .interface-preferences button{height:38px;min-width:40px}.mobile-ui .export-actions{grid-column:1/-1;grid-row:2;width:100%;margin:0;gap:4px}.mobile-ui #save-project{margin-left:auto}.mobile-ui .iconbutton{height:40px;width:40px}.mobile-ui .document-strip{height:40px}.mobile-ui .workspace-top{height:44px;min-height:44px;margin-bottom:2px}.mobile-ui .settings{padding:0 14px 18px}.mobile-ui .settings>section{padding:12px 0}.mobile-ui .mobile-tabs button{font-size:12px}.mobile-ui .settings .control label,.mobile-ui .number-label,.mobile-ui .color-row,.mobile-ui .check-row{font-size:12px}.mobile-ui .settings input:not([type=checkbox]):not([type=range]),.mobile-ui .layers-panel input{font-size:16px}.mobile-ui .grid-row>button,.mobile-ui .layer-select>span,.mobile-ui .text-button{font-size:12px}.mobile-ui .shape-picker button{height:44px}.mobile-ui .segment button{min-height:38px;font-size:12px}.mobile-ui .settings .help{font-size:12px}.mobile-ui .layers-heading{height:40px}.mobile-ui .button{min-height:40px}
:root[data-theme=dark]{color-scheme:dark;color:#eee;background:#161616;--line:#505050;--muted:#b3b3b3}
html[data-theme=dark] body,html[data-theme=dark] .topbar,html[data-theme=dark] .document-strip,html[data-theme=dark] .settings,html[data-theme=dark] .layers-panel,html[data-theme=dark] .footer,html[data-theme=dark] .mobile-ui .mobile-drawer,html[data-theme=dark] .mobile-ui .workspace-top{background:#161616;color:#eee;border-color:#555}
html[data-theme=dark] .workspace,html[data-theme=dark] .canvas-area,html[data-theme=dark] .mobile-ui .workspace{background:#222}
html[data-theme=dark] h2:before,html[data-theme=dark] h2,html[data-theme=dark] .number-label,html[data-theme=dark] .color-row,html[data-theme=dark] .check-row,html[data-theme=dark] .control output,html[data-theme=dark] .text-button,html[data-theme=dark] .view-toggle button,html[data-theme=dark] .canvas-caption,html[data-theme=dark] .canvas-bottom{color:#e2e2e2}
html[data-theme=dark] .help,html[data-theme=dark] .range-captions,html[data-theme=dark] .selection-name,html[data-theme=dark] #save-state,html[data-theme=dark] .footer,html[data-theme=dark] .workspace-bottom p{color:#b8b8b8}
html[data-theme=dark] .brand-dot{color:var(--accent)}
html[data-theme=dark] input:not([type=range]):not([type=checkbox]):not([type=color]),html[data-theme=dark] select,html[data-theme=dark] .segment,html[data-theme=dark] .shape-picker button,html[data-theme=dark] .toolbox,html[data-theme=dark] .interface-preferences button,html[data-theme=dark] .button.outline{background:#202020;color:#eee;border-color:#888}
html[data-theme=dark] .shape-picker svg{fill:currentColor}html[data-theme=dark] .segment button,html[data-theme=dark] .toolbox button{color:#ddd}
html[data-theme=dark] .button.primary,html[data-theme=dark] .shape-picker button.active,html[data-theme=dark] .segment button.active,html[data-theme=dark] .toolbox button.active,html[data-theme=dark] .view-toggle button.active,html[data-theme=dark] .interface-preferences button[aria-pressed=true],html[data-theme=dark] .mobile-tabs button[aria-pressed=true],html[data-theme=dark] #drawing-tabs button.active{background:var(--accent);color:#080808;border-color:var(--accent)}
html[data-theme=dark] .grid-row.active,html[data-theme=dark] .layer-row.active{background:#2b2b2b;color:#fff}html[data-theme=dark] .layer-row.active{border-color:#888;border-left-color:var(--accent)}html[data-theme=dark] .grid-row.focused{box-shadow:inset 2px 0 var(--accent)}html[data-theme=dark] .grid-symbol{border-color:#ccc}
html[data-theme=dark] .iconbutton:hover:not(:disabled),html[data-theme=dark] .toolbox button:hover:not(.active),html[data-theme=dark] #drawing-tabs button:hover:not(.active){background:#383838;color:#fff}
html[data-theme=dark] .drawer-handle i{background:#bbb}html[data-theme=dark] .export-dropdown,html[data-theme=dark] dialog,html[data-theme=dark] #export-drawings label{background:#202020;color:#eee;border-color:#888}html[data-theme=dark] .export-dropdown button:hover{background:var(--accent);color:#080808}html[data-theme=dark] #storage-error{background:#463c16;color:#fff}
html[data-theme=dark] input[type=range]::-webkit-slider-thumb{background:var(--accent)}html[data-theme=dark] input[type=range]::-moz-range-thumb{background:var(--accent)}html[data-theme=dark] input[type=checkbox]{accent-color:var(--accent)}html[data-theme=dark] .paper,html[data-theme=dark] .layer-thumbnail{color-scheme:light;background:#fff}
/* The grid is a reference, not a clipping frame. Extra drawing space scrolls at the same scale. */
.canvas-area,.mobile-ui .canvas-area{overflow:hidden}
.drawing-viewport{flex:1;min-height:0;width:100%;display:flex;align-items:safe center;justify-content:safe center;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin}
.paper,.mobile-ui .paper,html[data-theme=dark] .paper{border:0;box-shadow:none;outline:0;flex:none}
#drawing{overflow:visible}

@font-face{font-family:'Space Mono';src:url('./Resources/Fonts/SpaceMono-Regular.ttf') format('truetype');font-style:normal;font-weight:400;font-display:swap}
@font-face{font-family:'Space Mono';src:url('./Resources/Fonts/SpaceMono-Bold.ttf') format('truetype');font-style:normal;font-weight:700;font-display:swap}
:root{font-family:'Space Mono',monospace;font-synthesis:none}
body,button,input,select,textarea,output,.control output,.canvas-caption,.canvas-bottom,.zoom-controls button:nth-child(2),#localSize,.edition,.app-kind,.layers-heading>span,h2>span{font-family:'Space Mono',monospace}
h1,h2,.settings-title h1,.layers-heading h2,.brand,.button.primary,.interface-preferences button[aria-pressed=true],.mobile-tabs button[aria-pressed=true]{font-weight:700}

/* Base shapes are marks, not framed controls. */
.shape-picker button,.mobile-ui .shape-picker button,html[data-theme=dark] .shape-picker button{border:0;background:transparent;box-shadow:none;padding:0}
.shape-picker button:not(.active) svg{fill:none;stroke:#777;stroke-width:1.35;stroke-linejoin:round;vector-effect:non-scaling-stroke}
.shape-picker button.active svg{fill:#080808;stroke:#080808;stroke-width:1.35;stroke-linejoin:round;vector-effect:non-scaling-stroke}
.shape-picker button:hover:not(.active) svg{stroke:#080808}
.shape-picker button:focus-visible{outline:1px dotted #080808;outline-offset:1px}
.canvas-area,.drawing-viewport,.paper,.mobile-ui .canvas-area,.mobile-ui .paper,html[data-theme=dark] .paper{border:0;box-shadow:none;outline:0}

/* A control answers the click across its whole label area, never only on the
   glyph or the text. Thin text controls and small icons get an invisible,
   transparent target that stays inside the surrounding row spacing, so the
   expansion never steals a click from a neighbour. */
.text-button,.row-delete,.zoom-controls button,.iconbutton,.layer-eye,.check-row,.grid-row>button,.mobile-tabs button{position:relative}
.text-button::before,.row-delete::before,.zoom-controls button::before,.iconbutton::before,.layer-eye::before,.check-row::before,.grid-row>button::before{content:'';position:absolute;inset:-6px -2px;border-radius:inherit}
.mobile-ui .text-button::before,.mobile-ui .iconbutton::before,.mobile-ui .check-row::before,.mobile-ui .zoom-controls button::before,.mobile-ui .layer-eye::before{inset:-9px -4px}

.grid-row>.row-delete,.layer-row>.row-delete{flex:0 0 32px;width:32px;height:36px;padding:6px;display:flex;align-items:center;justify-content:center;color:inherit;background:transparent;border:0}.row-delete svg{width:16px;height:16px}.row-delete:hover{color:#ff304f}.row-delete:focus-visible{outline:2px solid var(--accent)}.mobile-ui .grid-row>.row-delete,.mobile-ui .layer-row>.row-delete{min-width:44px;min-height:44px;flex-basis:44px}
/* Collection and living text share the editor's glyphs. */
#alphabet-tab,#text-tab{height:32px;flex:none;padding:0 10px;font-size:12px;border:1px solid var(--line);white-space:nowrap}
#alphabet-tab.active,#text-tab.active{background:#080808;color:#fff;border-color:#080808}
.alphabet-open .editor,.text-open .editor{display:none!important}
#specimen-pane,#text-pane{flex:1;min-height:0;min-width:0;display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:auto minmax(0,1fr);gap:16px;padding:16px 20px;border:0;overflow:hidden;background:#f7f7f5}
#specimen-pane[hidden],#text-pane[hidden],#live-text-strip[hidden],.drawing-identity[hidden]{display:none!important}
.specimen-heading{grid-column:1/-1;display:flex;align-items:center;justify-content:space-between;gap:12px}
.specimen-heading h1{margin:0;font-size:16px}.specimen-heading .button,.type-heading .button{font-size:12px;height:34px}
#alphabet-gallery{min-height:0;display:grid;grid-template-columns:repeat(auto-fill,minmax(84px,1fr));grid-auto-rows:118px;align-content:start;gap:8px;overflow:auto;padding:2px}
.glyph-card{min-width:0;display:flex;flex-direction:column;border:1px solid var(--line);padding:0;background:#fff;color:#111;text-align:center}
.glyph-card:hover,.glyph-card:focus-visible{border-color:#111;outline:2px solid var(--accent);outline-offset:0}
.glyph-image{flex:1;min-height:0;display:flex;padding:8px;justify-content:center}.glyph-image svg{display:block;width:100%;height:100%}
.glyph-name{display:block;padding:4px 6px;font-size:12px;border-top:1px solid var(--line);text-transform:none;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.type-section{min-height:0;min-width:0;padding:0;border:0;display:flex;flex-direction:column;gap:10px}
.type-heading{display:flex;align-items:center;justify-content:space-between;font-size:13px;gap:12px}
#specimen-input{width:100%;min-height:72px;max-height:160px;resize:vertical;padding:10px;border:1px solid #999;border-radius:0;background:#fff;color:#111;font:14px/1.5 'Space Mono',monospace;text-transform:none}
#specimen-input:focus-visible{outline:2px solid var(--accent);outline-offset:1px}
.type-controls{display:flex;gap:12px;align-items:center;font-size:12px}.type-controls label{white-space:nowrap}.type-controls input{margin:0;max-width:220px;min-width:40px}.type-controls>span{margin-left:auto;color:var(--muted)}
#missing-glyphs{margin:0;font-size:12px;color:inherit}#missing-glyphs [data-user-text]{text-transform:none}
.text-preview{flex:1;min-height:90px;overflow:auto;padding:10px;background:#fff;border:1px solid #bbb}.text-preview>svg{display:block;max-width:100%;height:auto;text-transform:none}
#live-text-strip{display:flex;align-items:center;gap:8px;flex:none;min-width:0;padding:4px 16px;background:#fff;color:#111;border-top:1px solid var(--line)}
#live-text-strip>button{flex:none;font-size:11px}#live-text-preview{flex:1;min-width:0;max-height:84px;overflow:auto}#live-text-preview>svg{display:block;max-width:none;height:auto;text-transform:none}
html[data-theme=dark] #specimen-pane,html[data-theme=dark] #text-pane{background:#222}html[data-theme=dark] #alphabet-tab.active,html[data-theme=dark] #text-tab.active{background:var(--accent);color:#080808}
html[data-theme=dark] #specimen-input{background:#151515;color:#fff;border-color:#777}
.mobile-ui #alphabet-tab,.mobile-ui #text-tab{font-size:11px;padding:0 7px;min-height:36px}.mobile-ui .document-strip{gap:4px}
.mobile-ui #specimen-pane,.mobile-ui #text-pane{grid-template-columns:minmax(0,1fr);grid-template-rows:auto minmax(0,1fr);padding:10px;gap:10px}
.mobile-ui #alphabet-gallery{grid-template-columns:repeat(auto-fill,minmax(64px,1fr));grid-auto-rows:86px;gap:6px}
.mobile-ui .specimen-heading h1{font-size:14px}.mobile-ui #specimen-input{font-size:16px;min-height:58px;max-height:92px;height:58px}
.mobile-ui .type-section{gap:6px}.mobile-ui .type-controls>span{display:none}.mobile-ui .type-controls input{height:28px}.mobile-ui .text-preview{min-height:50px}
.mobile-ui #live-text-strip{padding:2px 10px}.mobile-ui #live-text-preview{max-height:70px}
#animation-tab{height:32px;flex:none;padding:0 10px;font-size:12px;border:1px solid var(--line);white-space:nowrap}
#animation-tab.active{background:#080808;color:#fff;border-color:#080808}
.animation-open .editor{display:none!important}
#animation-pane{flex:1;min-height:0;min-width:0;display:grid;grid-template-columns:minmax(0,1fr) minmax(260px,340px);grid-template-rows:auto minmax(0,1fr);gap:16px;padding:16px 20px;border:0;overflow:hidden;background:#f7f7f5}
#animation-pane[hidden],#animation-empty[hidden],#animation-sequence-label[hidden]{display:none!important}
.animation-heading{grid-column:1/-1;display:flex;align-items:center;justify-content:space-between;gap:12px}.animation-heading h1{margin:0;font-size:16px}.animation-heading .button{font-size:12px;height:34px}
.animation-view{display:flex;flex-direction:column;min-width:0;min-height:0;gap:8px}
.animation-stage{position:relative;flex:1;min-height:0;display:flex;align-items:center;justify-content:center;background:#fff;border:1px solid #bbb;padding:12px}
#animation-stage{display:block;width:100%;height:100%;min-height:0;overflow:visible}
#animation-empty{position:absolute;max-width:80%;padding:12px;margin:0;background:#fffffff2;color:#333;font-size:12px;text-align:center;pointer-events:none}
.animation-transport{display:flex;align-items:center;gap:8px;min-width:0}.animation-transport .button{height:34px;font-size:12px;padding:0 12px}.animation-transport input{margin:0;min-width:30px}.animation-transport>span{white-space:nowrap;font-size:11px}
.animation-current{height:22px;text-align:center;font-size:14px;text-transform:none;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.animation-settings{overflow:auto;min-height:0;min-width:0;padding:0 2px 16px;display:flex;flex-direction:column;gap:16px}
.animation-source{display:flex;flex-direction:column;gap:8px}.animation-source .segment button{font-size:12px;min-height:38px}.animation-order{margin:0}.animation-order button{font-size:12px;min-height:38px}
.animation-sequence-label{display:flex;flex-direction:column;gap:8px;font-size:12px}#animation-sequence{width:100%;min-height:64px;max-height:140px;resize:vertical;padding:10px;border:1px solid #999;border-radius:0;background:#fff;color:#111;font:14px/1.5 'Space Mono',monospace;text-transform:none}
#animation-sequence:focus-visible{outline:2px solid var(--accent);outline-offset:1px}
#animation-sequence-list{display:flex;gap:4px;overflow:auto;padding:3px 1px;min-height:40px;flex:none}
#animation-sequence-list button{flex:none;min-width:32px;height:32px;border:1px solid var(--line);font-size:12px;text-transform:none}
#animation-sequence-list button:hover{border-color:var(--accent)}
#animation-missing{margin:0;font-size:12px}#animation-missing [data-user-text]{text-transform:none}
.animation-fields{display:flex;flex-direction:column;gap:20px}.animation-fields label{font-size:12px;display:block}.animation-fields output{float:right;white-space:nowrap}
.animation-fields select{display:block;width:100%;height:36px;margin-top:8px;padding:0 8px;background:#fff;color:#111;border:1px solid #999;font:inherit}
.animation-actions{display:flex;align-items:center;justify-content:space-between;gap:12px}.animation-actions .button{font-size:12px;height:36px}
html[data-theme=dark] #animation-pane{background:#222}html[data-theme=dark] #animation-tab.active{background:var(--accent);color:#080808}html[data-theme=dark] #animation-sequence,html[data-theme=dark] .animation-fields select{background:#151515;color:#fff;border-color:#777}
.mobile-ui #animation-tab{font-size:11px;padding:0 7px;min-height:36px}.mobile-ui #alphabet-tab{max-width:107px;white-space:normal;line-height:1.15}
.mobile-ui #animation-pane{grid-template-columns:minmax(0,1fr);grid-template-rows:auto minmax(0,1fr) minmax(110px,38%);padding:10px;gap:10px}
.mobile-ui .animation-heading h1{font-size:14px}.mobile-ui .animation-settings{padding-bottom:20px;gap:10px}.mobile-ui .animation-fields{gap:14px}
.mobile-ui #animation-sequence,.mobile-ui .animation-fields select{font-size:16px}.mobile-ui .animation-fields input{height:28px}
.mobile-ui .animation-transport{gap:4px}.mobile-ui .animation-transport>span{font-size:10px}.mobile-ui .animation-current{height:18px;font-size:12px}.mobile-ui .animation-stage{padding:6px}
.mobile-ui #animation-sequence-list button{min-width:40px;height:40px}.mobile-ui .animation-actions .button{height:44px}
.animation-morph-label{font-size:12px;border-bottom:1px solid var(--line);padding-bottom:10px}
#morph-status{margin:0;font-size:12px;line-height:1.5}

.random-actions{display:flex;gap:6px;margin-top:10px}.random-button{flex:1;min-width:0;min-height:36px;font-size:12px}#reset-random[hidden]{display:none!important}.mobile-ui .random-button{min-height:44px}

.view-tabs{display:flex;flex:none;gap:4px}.text-actions{display:flex;gap:8px;align-items:center}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.mobile-ui .document-strip{display:grid;grid-template-columns:minmax(0,1fr) 36px auto;grid-template-rows:44px 40px;height:88px;padding:2px 8px;gap:0 4px}
.mobile-ui .view-tabs{grid-column:1/-1;grid-row:1;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:4px}
.mobile-ui .view-tabs button{height:44px;min-height:44px;max-width:none;white-space:nowrap}
.mobile-ui #drawing-tabs{grid-column:1;grid-row:2}.mobile-ui #add-drawing{grid-column:2;grid-row:2}.mobile-ui .drawing-identity{grid-column:3;grid-row:2}
.mobile-ui #text-pane .specimen-heading{flex-wrap:wrap;gap:6px}.mobile-ui .text-actions{gap:4px}.mobile-ui .text-actions .button{padding:0 8px}

.animation-actions{flex-wrap:wrap;gap:8px}.animation-actions .check-row{flex:1 0 100%}.animation-actions .button{flex:1;min-width:0;padding:0 10px}

.glyph-identity{display:block;flex:none;min-width:0}.glyph-name{width:100%;height:32px;min-width:0;margin:0;border:0;border-top:1px solid var(--line);border-radius:0;background:#fff;color:#111;text-align:center;font-family:inherit;text-transform:none}.glyph-name:focus{outline:2px solid var(--accent);outline-offset:-2px}.glyph-image{width:100%;cursor:pointer}.glyph-image:focus-visible{outline:2px solid var(--accent);outline-offset:-2px}
.mobile-ui #alphabet-gallery{grid-auto-rows:108px}.mobile-ui .glyph-name{height:44px;font-size:16px}.mobile-ui .glyph-image{min-height:44px}

#gallery-dialog{width:min(740px,calc(100vw - 24px));max-height:85dvh;overflow:auto}
.gallery-actions{display:flex;flex-wrap:wrap;gap:8px;margin:16px 0}
.saved-gallery{display:flex;align-items:center;gap:8px;padding:14px 0;border-top:1px solid var(--line)}
.saved-gallery>div:first-child{flex:1;min-width:0}.saved-gallery strong{display:block;overflow-wrap:anywhere;text-transform:none}.saved-gallery small{display:block;margin-top:6px}
.saved-gallery-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.saved-gallery-actions .button{white-space:nowrap}.gallery-delete.danger{border-color:#111;background:#111;color:#fff}.gallery-delete.danger:hover,.gallery-delete.danger:focus-visible{background:#ff304f;border-color:#111;color:#111}
.approach-control{max-width:520px;margin-bottom:18px;gap:12px}
@media(max-width:600px){.saved-gallery{flex-wrap:wrap}.saved-gallery>div{flex-basis:100%}.gallery-actions .button{flex:1 1 140px}#gallery-dialog input{font-size:16px}.topbar .export-actions{gap:4px}}
#alphabet-spacing-preview{max-height:140px;overflow:auto;margin-bottom:18px}
@media(max-width:380px){.mobile-ui .export-actions .button{font-size:10px;padding:0 6px}.mobile-ui .export-actions #save-project{font-size:10px}.mobile-ui .export-actions .iconbutton{width:34px;flex-shrink:0}}

/* Two compact rows on phones. Original controls keep their listeners. */
.compact-save{display:none}
.mobile-ui .topbar{display:flex;height:36px;min-height:36px;padding:0 5px;gap:3px;flex-wrap:nowrap}
.mobile-ui .brand{font-size:15px;letter-spacing:-.8px;flex:none;margin-right:auto}
.mobile-ui .export-actions{display:contents}
.mobile-ui .topbar .separator{display:none}
.mobile-ui .topbar .iconbutton,.mobile-ui .topbar .button,.mobile-ui .interface-preferences button{height:30px;min-height:30px;min-width:26px;padding:0 4px;font-size:10px;letter-spacing:0;flex:none}
.mobile-ui .topbar .iconbutton{width:26px}
.mobile-ui .topbar svg{width:16px;height:16px}
.mobile-ui .topbar #save-project{margin:0;width:28px;padding:0;display:grid;place-items:center}
.mobile-ui #save-project>span{display:none}.mobile-ui .compact-save{display:block}
.mobile-ui .interface-preferences{gap:2px;justify-self:auto}
.mobile-ui .interface-preferences button{width:26px}
.mobile-ui .export-menu summary{width:28px;display:grid;place-items:center}
.mobile-ui .export-menu summary>span{display:none}
.mobile-ui .export-dropdown{position:fixed;top:calc(36px + env(safe-area-inset-top,0px));right:6px;width:min(300px,calc(100vw - 12px));max-height:70dvh;overflow:auto;z-index:100}
.mobile-ui .export-dropdown .drawing-identity{display:flex;gap:8px;padding:8px;border-top:1px solid var(--line);width:100%}
.mobile-ui .export-dropdown .drawing-identity input{width:100%;min-width:0;font-size:16px}
.mobile-ui .export-dropdown #delete-drawing{flex:none;width:36px}
.mobile-ui .document-strip{display:flex;flex-wrap:nowrap;height:36px;min-height:36px;padding:2px 5px;gap:3px;overflow:visible}
.mobile-ui .view-tabs{display:flex;gap:2px;flex:none}
.mobile-ui .view-tabs button{height:30px;min-height:30px;padding:0 4px;font-size:9px;line-height:1;max-width:none;white-space:nowrap}
.mobile-ui #drawing-tabs{flex:1;min-width:24px;overflow-x:auto;scrollbar-width:none;height:30px}
.mobile-ui #drawing-tabs button{min-width:24px;height:30px;padding:0 5px;font-size:11px}
.mobile-ui #add-drawing{flex:none;width:24px;min-width:24px;height:30px;font-size:20px;padding:0}
.mobile-ui .document-strip .workspace-top{display:flex;flex:none;height:30px;min-height:30px;padding:0;margin:0;gap:3px;border:0;background:transparent}
.mobile-ui .document-strip .toolbox,.mobile-ui .document-strip .view-toggle{display:flex;gap:0;padding:0}
.mobile-ui .document-strip .workspace-top button{width:24px;min-width:24px;height:28px;min-height:28px;padding:3px;border-radius:0}
.mobile-ui .document-strip .workspace-top svg{width:16px;height:16px}
.mobile-ui .document-strip .workspace-top button span,.mobile-ui .canvas-caption{display:none}
.mobile-ui.alphabet-open .document-strip .workspace-top,.mobile-ui.text-open .document-strip .workspace-top,.mobile-ui.animation-open .document-strip .workspace-top{display:none}
@media(max-width:350px){.mobile-ui .brand{font-size:12px}.mobile-ui .topbar{gap:2px}.mobile-ui .view-tabs button{font-size:8px;padding:0 3px}.mobile-ui .document-strip{gap:2px}.mobile-ui .document-strip .workspace-top button{width:22px;min-width:22px}}
@media(max-width:350px){.mobile-ui .topbar .brand{font-size:11px}.mobile-ui .topbar #open-gallery{font-size:9px;padding:0 3px}.mobile-ui .interface-preferences button{width:24px;min-width:24px}.mobile-ui .topbar .iconbutton{width:24px;min-width:24px}}
.mobile-ui :is(#alphabet-tab,#text-tab,#animation-tab){height:30px;min-height:30px;font-size:9px;padding:0 4px;max-width:none;white-space:nowrap;line-height:1}
@media(max-width:350px){.mobile-ui :is(#alphabet-tab,#text-tab,#animation-tab){font-size:8px;padding:0 3px}}

.tab-character{flex:none;width:84px;min-width:48px;height:34px;padding:0 6px;border:1px solid var(--accent);background:#fff;color:#111;font:16px 'Space Mono',monospace;text-transform:none;text-align:center}
#drawing-tabs{touch-action:pan-x}#drawing-tabs button{touch-action:manipulation}
.mobile-ui .tab-character{height:30px;width:54px;min-width:54px}
/* The alphabet has a header, spacing control, sample and scrollable cards. */
#specimen-pane,.mobile-ui #specimen-pane{grid-template-rows:auto auto auto minmax(0,1fr)}

.glyph-image{touch-action:manipulation}

.brand,html[data-theme=dark] .brand{color:var(--accent)}

/* « Ajouter à la palette » : le même gabarit que le sélecteur, mais bordure en
   pointillés pour distinguer l'action d'ajout du sélecteur de couleur. */
#add-palette-color{border-style:dashed!important;background:transparent!important}
#add-palette-color:hover{border-style:solid!important}
