@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;450;500;550;600;650;700&family=Manrope:wght@400;500;600;650;700;750;800&display=swap');
@font-face{font-family:"Mostra Nuova Extra Heavy";src:url("fonts/MostraNuova-ExtraHeavy.otf") format("opentype");font-weight:400;font-display:swap}
:root{--paper:#f4f1e9;--panel:#faf8f2;--ink:#262820;--muted:#7c7c70;--line:#deded2;--accent:#c34830;--board:#e9e6dc}*{box-sizing:border-box}body{margin:0;background:var(--paper);color:var(--ink);font-family:'DM Sans',sans-serif;font-size:14px}button,input,select{font:inherit;color:inherit}button{cursor:pointer}button:disabled{cursor:default;opacity:.3}button{transition:background .15s,box-shadow .15s,transform .15s}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,summary:focus-visible{outline:2px solid var(--accent);outline-offset:4px}button:hover:not(:disabled){filter:brightness(.97)}button > svg:not(.tile-art){width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.5}.wordmark{font-family:'Manrope',sans-serif;font-size:31px;font-weight:800;letter-spacing:-1.5px;color:var(--ink);text-decoration:none;display:flex;align-items:center;gap:12px}.brand-period{font-size:12px;align-self:flex-start;margin:8px 0 0 -9px;letter-spacing:0}.brand-icon{display:grid;grid-template-columns:12px 12px;grid-template-rows:12px 12px;gap:2px;margin-right:1px}.brand-icon i:first-child{background:var(--accent);border-radius:100% 0 0 0;grid-row:1/3}.brand-icon i:nth-child(2){background:#e5b344;border-radius:50%}.brand-icon i:nth-child(3){background:#2a4b61}.text-button{border:0;background:none;padding:8px 0;display:inline-flex;align-items:center;justify-content:center;gap:10px;font-weight:500}.help-icon{width:20px;height:20px;display:grid;place-items:center;border:1px solid #aaa99d;border-radius:50%;font-size:12px}main{max-width:1536px;margin:auto;padding:0 3.9%}.intro{display:flex;align-items:center;justify-content:space-between;padding:36px 0 32px}.eyebrow{font-size:11px;letter-spacing:1.8px;font-weight:600;display:flex;align-items:center;gap:9px;margin:0 0 12px}.red-line{width:20px;height:2px;background:var(--accent)}h1{font-family:'Manrope',sans-serif;font-size:46px;letter-spacing:-2.3px;font-weight:600;margin:0;line-height:1.2}h1 em{font-style:normal;color:var(--accent)}.intro p:last-child{color:var(--muted);margin:10px 0 0;font-size:15px}.intro-mark{display:flex;gap:7px;align-items:center;margin-right:10px}.intro-mark i{width:39px;height:39px;background:#dcb047}.intro-mark i:first-child{background:var(--accent);border-radius:50%}.intro-mark i:nth-child(2){background:#254960;clip-path:polygon(0 100%,100% 0,100% 100%)}.studio{display:grid;grid-template-columns:260px minmax(300px,1fr) 244px;gap:30px;align-items:start}.panel{background:var(--panel);border:1px solid var(--line);border-radius:3px;padding:21px}.panel-heading{display:flex;justify-content:space-between;align-items:center;margin-bottom:21px}.panel-heading h2{font-size:16px;font-weight:600;margin:0;letter-spacing:-.3px}.count{background:#eeece3;border-radius:4px;color:var(--muted);padding:3px 7px;font-size:12px}.tabs{display:flex;border-bottom:1px solid var(--line);gap:17px;margin-bottom:20px}.tabs button{padding:0 0 11px;border:0;background:none;font-size:13px;color:#85857a;position:relative}.tabs button[aria-selected=true]{color:var(--ink);font-weight:600}.tabs button[aria-selected=true]:after{content:'';position:absolute;bottom:-1px;height:2px;left:0;right:0;background:var(--accent)}.library-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:9px;max-height:335px;overflow:auto;padding:3px;margin:-3px}.library-tile{aspect-ratio:1;border:1px solid #e0ded4;background:#efe9dc;padding:0;position:relative;border-radius:1px;box-shadow:0 2px 2px #28241b0b;touch-action:manipulation}.library-tile.active{outline:2px solid var(--accent);outline-offset:2px}.library-tile:hover{transform:translateY(-2px)}.tile-art{display:block;width:100%;height:100%;pointer-events:none}.library-hint{font-size:12px;line-height:1.65;color:#8b8a7e;margin:19px 0 18px}.outline-button{background:transparent;border:1px solid #d9d8cd;border-radius:3px;padding:10px 12px;display:flex;justify-content:center;align-items:center;gap:8px}.new-tile{font-size:13px;width:100%;padding:11px 5px}.new-tile span{font-size:19px;line-height:1}.palette-section{border-top:1px solid var(--line);margin-top:25px;padding-top:21px;position:relative}.section-label{font-size:10px;letter-spacing:1.35px;font-weight:600;display:flex;align-items:center;justify-content:space-between;gap:8px}.section-label>span{color:#929183;font-size:10px;font-weight:400;letter-spacing:0}.palette-picker{margin-top:13px;display:flex;align-items:center;gap:10px;width:100%;background:none;border:1px solid var(--line);padding:10px 9px;border-radius:3px;font-size:12px}.palette-picker>span:last-child{margin-left:auto}.palette-dots{display:flex;gap:0}.palette-dots i{width:13px;height:13px;border-radius:50%;border:1px solid #00000010;margin-left:-3px}.palette-dots i:first-child{margin-left:0}.palette-section p{font-size:10px;color:#929183;margin:12px 0 0;line-height:1.5}.palette-menu{position:absolute;top:84px;left:0;right:0;background:var(--panel);border:1px solid var(--line);padding:5px;box-shadow:0 10px 20px #0001;z-index:5}.palette-menu button{display:flex;gap:10px;width:100%;padding:12px 6px;border:0;background:none;font-size:12px;text-align:left}.workspace{min-width:0;padding:0 10px}.board-toolbar{display:flex;justify-content:space-between;align-items:center;margin-bottom:26px;height:28px}.board-toolbar>div{display:flex;align-items:center;gap:12px}.dimension{font-size:11px;color:var(--muted);border:1px solid #d4d3c7;border-radius:3px;padding:3px 6px}.icon-button{border:0;background:none;width:28px;height:28px;display:inline-flex;align-items:center;justify-content:center;font-size:25px}.board-toolbar .history-actions{gap:4px}.toolbar-divider{height:15px;border-right:1px solid #d5d3c9;margin:0 5px}.board-wrap{position:relative;margin-left:10px}.board{display:grid;grid-template-columns:repeat(6,1fr);aspect-ratio:1;background:#e4dfd1;border:1px solid #d4cfc1;box-shadow:0 12px 24px #463b2412;position:relative}.board-cell{aspect-ratio:1;min-width:0;position:relative;border:0;outline:none;background:#f0ecdf;padding:0;touch-action:manipulation}.board-cell:after{content:'';position:absolute;inset:0;box-shadow:inset -0.5px -0.5px #2d30151c;pointer-events:none}.board.no-grid .board-cell:after{box-shadow:none}.board-cell.empty{background:#eeebe1}.board-cell.empty:before{content:'+';position:absolute;inset:0;display:grid;place-items:center;color:#b5b3a6;font-size:18px;font-weight:400;opacity:.6}.board-cell.selected{z-index:1;outline:2px solid var(--accent);outline-offset:-3px}.board-cell.drag-over:after{box-shadow:inset 0 0 0 4px var(--accent)}.board-coordinates{display:grid;position:absolute;font-size:10px;color:#aaa797;pointer-events:none}.top-coordinates{grid-template-columns:repeat(6,1fr);top:-18px;width:100%;text-align:center}.side-coordinates{grid-template-rows:repeat(6,1fr);left:-19px;height:100%;align-items:center}.board-footer{display:flex;align-items:center;justify-content:space-between;color:#999587;font-size:11px;margin:12px 0 0 10px;gap:8px}.board-footer b{font-weight:500;color:#66675d}.board-footer .text-button{font-size:11px;padding:0;color:#77796b}.board-footer .text-button span{font-size:16px}.play-tip{display:flex;align-items:center;gap:14px;margin:32px 0 0 10px;padding-top:20px;border-top:1px solid var(--line)}.tip-symbol{font-size:32px;color:#aaae9a}.play-tip p{font-size:12px;line-height:1.6;color:var(--muted);margin:0}.play-tip strong{font-weight:500;color:#5e6156}.play-tip button{font-size:12px;margin-left:auto;white-space:nowrap}.selected-preview{width:144px;height:144px;margin:6px auto 23px;box-shadow:0 5px 9px #38312210;border:1px solid #e0dacc}.form-title{display:flex;flex-direction:column;align-items:center;gap:7px;margin-bottom:24px}h3{font-size:15px;font-weight:500;margin:0}.tiny-label{font-size:9px;letter-spacing:1.2px;color:#929183}.control-section{margin-top:22px}.rotation-controls{display:flex;gap:8px;margin-top:12px}.rotation-controls button{flex:1;padding:5px;font-size:26px;gap:12px}.rotation-controls span{font-size:12px}.swatches{display:flex;gap:10px;margin-top:13px;align-items:center}.swatch{width:27px;height:27px;border-radius:50%;border:1px solid #00000016;position:relative;padding:0}.swatch.active:after{content:'';position:absolute;inset:-4px;border:1px solid #6e7365;border-radius:50%}.inspector-actions{display:flex;flex-direction:column;gap:9px;margin-top:25px;border-top:1px solid var(--line);padding-top:20px}.inspector-actions .outline-button{justify-content:space-between;font-size:13px}.muted{color:#959488;font-size:12px}.keyboard-tip{font-size:9px;color:#a5a194;margin:14px -8px -4px;display:flex;justify-content:center;align-items:center;gap:5px;white-space:nowrap}kbd{font-family:inherit;display:inline-block;border:1px solid #d7d5ca;border-radius:3px;min-width:18px;padding:2px 4px;text-align:center;font-size:10px}.page-footer{display:flex;justify-content:space-between;align-items:center;border-top:1px solid var(--line);margin-top:38px;padding:20px 0;color:#929184;font-size:10px;letter-spacing:1.4px}.page-footer>span:nth-child(2){letter-spacing:0;font-size:12px}.page-footer button{font-size:12px;letter-spacing:0;color:#606457}.toast{position:fixed;bottom:25px;left:50%;transform:translate(-50%,20px);background:var(--ink);color:var(--paper);padding:14px 23px;border-radius:4px;box-shadow:0 6px 18px #0002;opacity:0;pointer-events:none;transition:.2s;z-index:20;max-width:90vw}.toast.visible{opacity:1;transform:translate(-50%,0)}dialog{background:var(--panel);border:1px solid var(--line);padding:30px;border-radius:5px;color:var(--ink);max-height:92vh;overflow:auto}dialog::backdrop{background:#25291f70;backdrop-filter:blur(4px)}.editor-dialog{width:760px;max-width:94vw}.dialog-heading{display:flex;justify-content:space-between;align-items:flex-start;gap:20px;margin-bottom:28px}.dialog-heading h2{font-family:Manrope,sans-serif;font-size:25px;letter-spacing:-1px;margin:0}.dialog-heading .eyebrow{font-size:10px;color:var(--accent)}.editor-layout{display:grid;grid-template-columns:1fr 1.25fr;gap:35px}.editor-preview{width:100%;aspect-ratio:1;border:1px solid #d7d1c4;box-shadow:0 8px 15px #0001}.editor-caption{font-size:12px;color:var(--muted);text-align:center;margin:15px 0}.editor-layout>div>.outline-button{width:100%}.editor-fields{display:flex;flex-direction:column;gap:18px}label{display:flex;flex-direction:column;gap:8px;font-size:13px}input:not([type=range]):not([type=file]),select{border:1px solid var(--line);background:var(--paper);border-radius:3px;padding:10px;width:100%}input[type=range]{accent-color:var(--accent);width:100%;min-width:0}.padding-controls{display:flex;flex-direction:column;gap:11px}.padding-controls label{display:grid;grid-template-columns:42px 1fr 34px;gap:8px;align-items:center;font-size:12px}.padding-controls output{color:var(--muted);text-align:right}.editor-colors{display:flex;gap:24px}.editor-colors .swatches{gap:8px}.editor-colors .swatch{width:22px;height:22px}.dialog-footer{display:flex;justify-content:flex-end;gap:23px;margin-top:30px;padding-top:20px;border-top:1px solid var(--line)}.primary-button{background:var(--ink);color:var(--paper);border:0;border-radius:3px;padding:13px 18px;display:flex;align-items:center;justify-content:center;gap:25px}.font-settings{border-top:1px solid var(--line);padding-top:15px;font-size:13px}.font-settings summary{cursor:pointer}.font-settings label{margin-top:15px}.font-settings p{font-size:11px;line-height:1.5;color:var(--muted)}.font-upload{border:1px dashed #bab9ac;padding:12px}.font-upload input{font-size:10px;width:100%}.help-dialog{width:510px;max-width:94vw;line-height:1.8}.help-dialog h2{font-size:24px;line-height:1.3;letter-spacing:-.6px}.help-dialog ol{padding-left:22px}.help-dialog li{padding:0 0 15px 6px}.help-dialog p{color:var(--muted)}.help-dialog>.primary-button{width:100%}.empty-library{grid-column:1/-1;padding:35px 5px;text-align:center;font-size:13px;line-height:1.7;color:var(--muted)}[hidden]{display:none!important}
@media(min-width:1500px){.studio{grid-template-columns:280px minmax(400px,1fr) 270px;gap:44px}.library-grid{gap:12px}.selected-preview{width:170px;height:170px}.panel{padding:24px}.tabs{gap:20px}.board-toolbar{margin-bottom:30px}}
@media(max-width:1150px){.studio{grid-template-columns:230px minmax(300px,1fr) 210px;gap:19px}.panel{padding:17px}.workspace{padding:0}.tabs{gap:13px}.swatches{gap:9px}.swatch{width:23px;height:23px}.play-tip{gap:8px}.play-tip button{font-size:11px}.intro{padding:30px 0}.board-footer #saveStatus{font-size:9px}.keyboard-tip{font-size:8px}.selected-preview{width:135px;height:135px}.library-grid{gap:8px}.palette-picker{gap:6px;font-size:11px}}
@media(max-width:950px){main{padding:0 25px}.studio{grid-template-columns:230px minmax(280px,1fr);gap:25px}.inspector{grid-column:1/-1;display:grid;grid-template-columns:110px 1fr 1fr 1fr;gap:15px;align-items:center}.inspector .panel-heading{grid-column:1/-1;margin-bottom:0}.selected-preview{width:100px;height:100px;margin:0;grid-row:2/4}.form-title{align-items:flex-start;margin:0;grid-column:2/4}.control-section{margin:0}.inspector-actions{margin:0;padding:0;border:0;grid-column:4;grid-row:2/4}.keyboard-tip{grid-column:1/-1;margin:0}.page-footer{margin-top:25px}.play-tip{margin-top:20px}.board-toolbar{margin-top:5px}}
@media(max-width:650px){.wordmark{font-size:27px}.intro{padding:26px 0 24px}.intro .eyebrow{font-size:9px}h1{font-size:36px}.intro p:last-child{font-size:13px}.intro-mark{gap:4px;margin:0}.intro-mark i{width:20px;height:20px}main{padding:0 18px}.studio{display:flex;flex-direction:column;gap:22px}.workspace{width:100%;order:0}.library{width:100%;order:1}.inspector{order:2;width:100%;display:grid;grid-template-columns:90px 1fr 1fr;gap:18px 14px}.inspector .selected-preview{width:90px;height:90px;grid-row:2/4}.form-title{grid-column:2/-1}.inspector .control-section:nth-of-type(5){grid-column:2}.inspector-actions{grid-column:1/-1;grid-row:auto;flex-direction:row;padding-top:10px;border-top:1px solid var(--line)}.inspector-actions .outline-button{flex:1}.keyboard-tip{font-size:10px}.library-grid{grid-template-columns:repeat(6,1fr);gap:12px;max-height:310px}.library .panel-heading{margin-bottom:18px}.tabs{gap:25px}.tabs button{font-size:14px}.library-hint{margin:16px 0}.library-hint br{display:none}.new-tile{font-size:14px}.palette-section{margin-top:20px}.palette-section p{font-size:12px}.palette-picker{font-size:14px;padding:13px}.palette-dots i{width:17px;height:17px}.board-toolbar{margin:0 0 24px}.board-footer #saveStatus{font-size:9px}.play-tip{margin:20px 0 0 10px;padding-top:15px}.play-tip button{font-size:12px}.page-footer{flex-wrap:wrap;gap:10px;font-size:9px}.page-footer>span:nth-child(2){display:none}.page-footer button{font-size:11px}.editor-layout{grid-template-columns:1fr;gap:25px}.editor-layout>div:first-child{max-width:190px;margin:auto;width:100%}.editor-dialog{padding:22px}.editor-fields{gap:16px}.editor-colors .swatch{width:26px;height:26px}.dialog-footer{gap:15px}.dialog-footer .primary-button{font-size:12px;gap:8px}.dialog-heading h2{font-size:22px}.selected-preview .tile-art{height:100%}.section-label{font-size:10px}.swatches{gap:11px}.swatch{width:25px;height:25px}}
@media(prefers-reduced-motion:reduce){*{transition:none!important}}

/* Board spacing and type can be explored independently of tile geometry. */
.board{gap:var(--gutter,0px);background:transparent;border-color:#d6d3c74d;box-shadow:0 7px 20px #463b2408}
.board-cell{overflow:visible;aspect-ratio:1}
.board.no-grid{border-color:transparent}
.board.allow-overflow .board-cell:has(text){z-index:2}
.board.allow-overflow .board-cell.selected{z-index:3}
.board.allow-overflow .tile-art,.selected-preview .tile-art,.editor-preview .tile-art{overflow:visible}
.board-cell.empty{background:transparent}
.board-options{display:flex;justify-content:space-between;align-items:center;gap:18px;margin:18px 0 0 10px;color:#73766a}
.gutter-control{display:flex;flex-direction:row;align-items:center;gap:10px;font-size:12px;flex:1;max-width:240px}
.gutter-control input{max-width:110px;flex:1}
.gutter-control output{font-size:12px;min-width:34px;text-align:right}
.eraser-button[aria-pressed=true]{background:var(--accent);color:white;border-radius:3px}
.board.erasing .board-cell:not(.empty){cursor:crosshair}
.board.erasing .board-cell:not(.empty):hover{opacity:.45}
.delete-tile{color:#a34735}
.palette-create{font-size:13px;margin-top:10px;justify-content:flex-start}
.palette-dialog{width:540px;max-width:94vw}
.palette-dialog p{color:var(--muted);font-size:13px;line-height:1.5}
.palette-color-fields{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:12px;margin:25px 0 18px}
.palette-color-fields label{font-size:12px;align-items:center}
.palette-color-fields input[type=color]{padding:0;border:0;width:100%;height:70px;background:none;cursor:pointer}
.palette-color-fields input[type=color]::-webkit-color-swatch-wrapper{padding:0}
.palette-color-fields input[type=color]::-webkit-color-swatch{border:1px solid #0001;border-radius:3px}
.palette-color-fields input[type=text]{font-size:11px;padding:7px 2px;text-align:center}
.custom-palette-preview{height:70px;display:flex;margin-bottom:22px}
.custom-palette-preview i{flex:1}
.palette-dialog #randomizePalette{width:100%;font-size:14px}
.section-label{font-size:11px;letter-spacing:1px}.tabs button{font-size:14px}.new-tile{font-size:14px}.palette-picker{font-size:12px}.library-hint{font-size:12px}.keyboard-tip{font-size:10px}.tiny-label{font-size:10px}.swatch{min-width:24px}
@media(max-width:1150px) and (min-width:951px){.board-options{flex-direction:column;align-items:flex-start;gap:8px}.keyboard-tip{font-size:9px}.tabs{gap:11px}}
@media(max-width:650px){.board-options{flex-wrap:wrap;gap:10px}.gutter-control{font-size:13px}.board-toolbar .section-label{font-size:10px}.palette-picker{font-size:14px}.palette-color-fields{gap:7px}.palette-dialog{padding:22px}.palette-color-fields input[type=text]{font-size:10px}.board-footer{flex-wrap:wrap}.board-footer #saveStatus{font-size:10px}.delete-tile{font-size:12px!important}.play-tip{margin-top:15px}.keyboard-tip{flex-wrap:wrap;white-space:normal}}

/* Enlarged tiles occupy real grid cells rather than stretching an overlay. */
.board{grid-template-rows:repeat(6,minmax(0,1fr))}
.board-cell{width:100%;height:100%;aspect-ratio:auto;min-height:0}
.board-cell .tile-art{width:100%;height:100%}
.size-section{border-top:1px solid var(--line);padding-top:19px}
.size-controls{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px;margin-top:12px}
.size-controls button{background:transparent;border:1px solid var(--line);border-radius:3px;font-size:12px;padding:9px 2px;white-space:nowrap}
.size-controls button[aria-pressed=true]{background:var(--ink);border-color:var(--ink);color:var(--paper)}
.inflate-button{margin-top:9px;padding:11px 12px;width:100%;display:flex;align-items:center;justify-content:space-between;border:0;border-radius:3px;color:white;background:var(--accent);font-size:13px}
.inflate-mark{font-size:20px;line-height:1}
.size-hint{font-size:11px;line-height:1.5;color:var(--muted);margin:9px 0 0}
@media(max-width:950px){.inspector .size-section{grid-column:2/4;grid-row:auto}.inspector .size-hint{font-size:10px}.inspector .inspector-actions{grid-row:auto}.inspector .selected-preview{grid-row:auto}.inspector .form-title{grid-column:2/4}}
@media(max-width:650px){.inspector .size-section{grid-column:1/-1}.inspector .inspector-actions{grid-column:1/-1}.size-controls button{font-size:13px}.inflate-button{font-size:14px}.size-hint{font-size:12px}}
.keyboard-tip{flex-wrap:wrap;white-space:normal;line-height:1.5}

/* Reset inherited icon strokes while allowing shapes to opt into an outline. */
.tile-art{stroke:none}

.recent-section{padding:0 0 16px;margin:-2px 0 16px;border-bottom:1px solid var(--line)}
.recent-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px;margin-top:11px}
.recent-grid .library-tile{width:100%}
@media(max-width:650px){.recent-grid{gap:12px}.recent-section{margin-bottom:18px}}

/* Quiet, full-composition overview in place of selected-tile metadata. */
.composition-preview{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));grid-template-rows:repeat(6,minmax(0,1fr));width:100%;aspect-ratio:1;background:#f4f1e9;overflow:visible;margin:0 0 24px}
.preview-cell{min-width:0;min-height:0;background:#f4f1e9;position:relative}
.preview-cell.empty{background:#eeeae1}
.preview-cell .tile-art{width:100%;height:100%}
.composition-preview.with-grid .preview-cell{box-shadow:inset -0.5px -0.5px #2d30151c}
.composition-preview.allow-overflow .preview-cell:has(text){z-index:2}
.composition-preview.allow-overflow .tile-art{overflow:visible}
@media(max-width:950px){.inspector{display:grid;grid-template-columns:minmax(150px,230px) repeat(2,minmax(0,1fr));gap:18px;align-items:start}.composition-preview{grid-column:1;grid-row:1/4;margin:0}.inspector .control-section,.inspector .size-section{grid-column:auto;grid-row:auto;margin:0}.inspector .inspector-actions{grid-column:2/4;grid-row:auto}.inspector .keyboard-tip{grid-column:1/-1}}
@media(max-width:650px){.inspector{display:block}.composition-preview{max-width:340px;margin:0 auto 24px}.inspector .control-section{margin-top:20px}.inspector .inspector-actions{margin-top:24px}.inspector .keyboard-tip{margin-top:14px}}

.grid-size{display:inline-flex;flex-direction:row;align-items:center;gap:5px;color:var(--muted);font-size:11px;white-space:nowrap;flex:none}
.grid-size label{display:inline-flex;flex-direction:row;align-items:center;gap:4px;font-size:11px;width:auto}
.grid-size label span{display:none}
.grid-size input[type=number]{width:38px!important;padding:3px 2px!important;text-align:center;background:transparent!important;border-color:#d4d3c7!important;font-size:11px;appearance:textfield}
.grid-size input::-webkit-inner-spin-button,.grid-size input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}
.board-toolbar{height:auto;min-height:32px;gap:8px}
.board-toolbar>div:first-child{flex-wrap:nowrap;gap:9px;min-width:0}
.board-cell{aspect-ratio:auto;min-height:0}
.board-coordinates{z-index:1}
.grid-guides{position:absolute;inset:0;pointer-events:none;z-index:3}
.grid-guide{position:absolute;display:block;border:0;background:transparent;padding:0;pointer-events:auto;touch-action:none;opacity:.55}
.grid-guide:hover,.grid-guide:focus-visible{opacity:1;filter:none!important}
.grid-guide::after{content:'';position:absolute;background:#979589}
.column-guide{top:-25px;bottom:auto;width:22px;height:27px;transform:translateX(-50%);cursor:col-resize}
.column-guide::after{width:1px;height:16px;left:50%;top:2px}
.row-guide{left:-25px;right:auto;width:27px;height:22px;transform:translateY(-50%);cursor:row-resize}
.row-guide::after{height:1px;width:16px;top:50%;left:2px}
@media(max-width:650px){.board-toolbar{gap:8px}.board-toolbar>div:first-child{gap:5px}.grid-size label span{display:none}}

.board-options{flex-wrap:wrap;justify-content:flex-start;gap:12px 18px}
.board-background-control{display:inline-flex;flex-direction:row;align-items:center;gap:7px;white-space:nowrap;font-size:12px}
.board-background-control input[type=color]{width:28px;height:28px;padding:2px;border:1px solid var(--line);background:transparent;cursor:pointer;flex:none}
.board-background-control input[type=text]{width:78px;padding:5px 6px;font-size:11px;font-family:monospace;text-transform:uppercase}
.board-cell.empty,.preview-cell.empty{background:transparent}
/* Keep artwork at the tile's exact size: overlap distorts joined arcs and lets
   the next tile's background cut off the circle at its tangent. */
.board-cell .tile-art,.preview-cell .tile-art{position:absolute;inset:0;width:100%;height:100%}
.board-actions{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:6px 16px;margin:7px 0 0 10px}
.board-actions .text-button{font-size:12px;padding:5px 0;gap:6px}
.history-actions .delete-selected{color:#a34735}
.board-actions .clear-all{color:#8e8c80}
.board-actions+.board-options{margin-top:13px}

/* Keep edge drag zones inside their tile so neighboring hover targets never overlap. */
.resize-handle{position:absolute;z-index:5;display:block;touch-action:none;background:transparent}
.resize-handle::after{content:'';position:absolute;display:block;background:var(--accent);border-radius:3px;opacity:0;box-shadow:0 1px 3px #251b1730}
.resize-left,.resize-right{top:15%;height:70%;width:min(14px,25%);cursor:ew-resize}
.resize-left{left:0}.resize-right{right:0}
.resize-top,.resize-bottom{left:15%;width:70%;height:min(14px,25%);cursor:ns-resize}
.resize-top{top:0}.resize-bottom{bottom:0}
.resize-left::after,.resize-right::after{width:4px;height:26px;top:50%;left:50%;transform:translate(-50%,-50%)}
.resize-top::after,.resize-bottom::after{width:26px;height:4px;top:50%;left:50%;transform:translate(-50%,-50%)}
.board-cell:hover .resize-handle::after,.board-cell.selected .resize-handle::after{opacity:.85}
.board-cell.selected:hover .resize-handle::after{opacity:1}
.board.erasing .resize-handle{display:none}
.board.paint-mode .board-cell{cursor:crosshair;touch-action:none}
.board.paint-mode .resize-handle{display:none}
.library-tile .paint-badge{position:absolute;right:3px;bottom:3px;left:3px;padding:3px 2px;border-radius:2px;background:var(--ink);color:#fff;font-size:8px;font-weight:700;letter-spacing:.9px;line-height:1;text-align:center;pointer-events:none}

.wfc-controls{margin:20px 0 0 10px;display:flex;align-items:center;gap:14px;flex-wrap:wrap}
.wfc-controls .outline-button{font-size:12px;flex-shrink:0}
.wfc-controls p{font-size:12px;line-height:1.6;color:var(--muted);margin:0;flex:1;min-width:170px}
.wfc-controls [aria-busy=true]{border-color:var(--accent);color:var(--accent)}

@keyframes wfc-reveal{from{opacity:0;transform:scale(.94)}to{opacity:1;transform:scale(1)}}
.board-cell.wfc-reveal .tile-art{animation:wfc-reveal 180ms ease-out both}
@media(prefers-reduced-motion:reduce){.board-cell.wfc-reveal .tile-art{animation:none}}

.board-coordinates span{display:flex;align-items:center;justify-content:center;white-space:nowrap}
.board-coordinates .track-measure{color:#4c4f44;font-weight:600;font-variant-numeric:tabular-nums}
.side-coordinates{width:16px}

@media(max-width:380px){.wordmark{font-size:23px;gap:7px}}

.composition-menu-wrap{position:relative;display:flex;align-items:center;flex:none}
.composition-menu-button{display:inline-flex;align-items:center;justify-content:center;gap:9px;height:42px;padding:8px 12px;border:1px solid var(--line);border-radius:3px;background:var(--panel);font-size:13px;font-weight:600;white-space:nowrap}
.composition-menu-button[aria-expanded=true]{border-color:var(--accent);color:var(--accent)}
.composition-menu-icon{display:none;font-size:21px;line-height:1}
.composition-menu-chevron{display:block;width:8px;height:8px;margin-left:2px;border-right:2px solid currentColor;border-bottom:2px solid currentColor;transform:translateY(-2px) rotate(45deg);font-size:0}
.compositions-menu{position:absolute;top:calc(100% + 13px);right:0;z-index:30;width:370px;max-width:calc(100vw - 32px);background:var(--panel);border:1px solid var(--line);border-radius:4px;box-shadow:0 18px 38px #28241b24}
.compositions-menu .compositions-panel{margin:0;padding:18px;border:0}
.compositions-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:10px}
.compositions-heading h2{margin:0;font-size:13px;font-weight:700;letter-spacing:.2px}
.compositions-heading .outline-button{padding:7px 11px;font-size:12px;white-space:nowrap}
.compositions-list{display:grid;gap:6px;max-height:290px;overflow:auto}
.composition-row{display:grid;grid-template-columns:minmax(0,1fr) 32px 32px;align-items:center;min-height:52px;border:1px solid var(--line);border-radius:3px;background:var(--panel)}
.composition-row.active{border-color:#c3483080;background:#f7eee6;box-shadow:inset 3px 0 var(--accent)}
.composition-open{display:flex;align-items:center;gap:11px;min-width:0;height:100%;padding:8px 11px;border:0;background:transparent;text-align:left}
.composition-index{display:grid;place-items:center;width:26px;height:26px;flex:none;border-radius:50%;background:#e9e4d8;color:#686b60;font-size:11px}
.composition-row.active .composition-index{background:var(--accent);color:white}
.composition-details{display:flex;flex-direction:column;gap:2px;min-width:0}
.composition-details strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px;font-weight:600}
.composition-details small{color:var(--muted);font-size:10px}
.composition-action{display:grid;place-items:center;width:28px;height:28px;padding:0;border:0;background:transparent;color:#76796e;font-size:18px}
.composition-delete{color:#a34735;font-size:21px}
@media(max-width:650px){.compositions-heading{align-items:flex-start}.compositions-heading .outline-button{font-size:11px}.composition-row{min-height:56px}}
@media(max-width:650px){.composition-menu-button{width:38px;height:38px;padding:6px}.composition-menu-label,.composition-menu-chevron{display:none}.composition-menu-icon{display:block}.compositions-menu{position:fixed;top:75px;left:16px;right:16px;width:auto;max-width:none;max-height:calc(100dvh - 90px);overflow:auto}.compositions-menu .compositions-panel{padding:16px}}
@media(max-width:380px){.composition-menu-button{width:34px}}

.play-tip .inspiration-actions{display:flex;flex-direction:column;align-items:stretch;gap:6px;min-width:230px;margin-left:auto}
.play-tip .inspiration-actions button{width:100%;min-height:35px;margin:0;padding:7px 9px;justify-content:space-between;text-align:left;white-space:normal;font-size:12px}
.play-tip .inspiration-actions .outline-button{padding:9px 11px;border-color:#c3483066;background:#c348300c;color:#a93b27;font-weight:700}
.play-tip .inspiration-actions [aria-busy=true]{background:var(--accent);border-color:var(--accent);color:#fff}
@media(max-width:650px){.play-tip{flex-wrap:wrap}.play-tip .inspiration-actions{flex-basis:100%;margin:8px 0 0;min-width:0}.play-tip .inspiration-actions button{font-size:13px}}

.studio{margin-top:32px}
@media(max-width:650px){.studio{margin-top:22px}}

.grid-preset{width:auto;max-width:170px;min-height:31px;padding:4px 24px 4px 8px;border-color:#d4d3c7;background:var(--panel);font-size:11px;white-space:nowrap}
.board-toolbar{flex-wrap:wrap;align-items:flex-start}
.board-toolbar>div:first-child{flex:1 1 300px;flex-wrap:wrap;align-items:center;gap:8px}
.board-toolbar .history-actions{margin-left:auto}
@media(max-width:650px){.board-toolbar{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center}.board-toolbar>div:first-child{display:contents}.board-toolbar .section-label{grid-column:1;grid-row:1}.board-toolbar .history-actions{grid-column:2;grid-row:1;justify-self:end}.grid-preset{grid-column:1;grid-row:2;max-width:156px;font-size:11px}.grid-size{grid-column:2;grid-row:2;justify-self:end}}

.studio{grid-template-columns:260px minmax(300px,1fr) 310px}
.inspector{display:block;min-width:0}
.inspector .composition-preview{width:100%;max-width:none;grid-column:auto;grid-row:auto;margin:0 0 23px}
.inspector-layout{display:grid;grid-template-columns:minmax(0,1fr) 38px;gap:11px;align-items:start}
.inspector-panels{min-width:0}
.inspector-tabs{display:flex;flex-direction:column;gap:6px;position:sticky;top:12px}
.inspector-tabs button{display:grid;place-items:center;width:38px;height:106px;padding:9px 7px;border:1px solid var(--line);border-radius:3px;background:#f0ede4;color:#6a6c61;font-size:11px;font-weight:700;letter-spacing:.4px;writing-mode:vertical-rl;transform:rotate(180deg)}
.inspector-tabs button[aria-selected=true]{background:var(--ink);border-color:var(--ink);color:#fff}
.inspector .inspector-tabpanel .control-section{margin:22px 0 0;grid-column:auto;grid-row:auto}
.inspector .inspector-tabpanel .control-section:first-child{margin-top:0}
.inspector .swatches{gap:7px;flex-wrap:wrap}
.inspector .swatch{width:24px;min-width:24px;height:24px}
.inspector .inspector-actions{grid-column:auto;grid-row:auto;flex-direction:column;margin:24px 0 0;padding-top:18px}
.inspector .keyboard-tip{grid-column:auto;margin:14px 0 0;white-space:normal}
.inspector .grid-control{margin-top:12px}
.inspector .board-options{display:flex;flex-direction:column;align-items:stretch;gap:18px;margin:14px 0 0;max-width:none}
.inspector .gutter-control{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;max-width:none}
.inspector .gutter-control span{grid-column:1/-1}
.inspector .gutter-control input{width:100%;max-width:none}
.inspector .board-background-control{display:grid;grid-template-columns:30px minmax(0,1fr);gap:8px;white-space:normal}
.inspector .board-background-control span{grid-column:1/-1}
.inspector .board-background-control input[type=color]{grid-column:1;width:30px;height:30px}
.inspector .board-background-control input[type=text]{grid-column:2;width:100%}
.inspector #resetTracks{width:100%;margin-top:18px;padding:10px 8px;font-size:12px}
.inspector .wfc-controls{display:flex;flex-direction:column;align-items:stretch;gap:9px;margin:12px 0 0}
.inspector .wfc-controls button{width:100%;white-space:normal}
.inspector .wfc-controls p{min-width:0;font-size:11px}
.inspector .board-danger{padding-top:18px;border-top:1px solid var(--line)}
.inspector #clearAll{width:100%;justify-content:center;color:#a34735;font-size:12px}
.inspector .inspiration-actions{display:grid;gap:9px;margin-top:14px}
.inspector .inspiration-actions button{width:100%;min-height:42px;padding:10px;justify-content:space-between;text-align:left;white-space:normal;font-size:12px}
.inspector .inspiration-actions .outline-button{border-color:#c3483066;background:#c348300c;color:#a93b27;font-weight:700}
.inspector .inspiration-actions [aria-busy=true]{background:var(--accent);border-color:var(--accent);color:#fff}
@media(min-width:1500px){.studio{grid-template-columns:280px minmax(400px,1fr) 330px}}
@media(max-width:1150px) and (min-width:951px){.studio{grid-template-columns:230px minmax(300px,1fr) 270px;gap:19px}}
@media(max-width:950px){.studio{grid-template-columns:230px minmax(280px,1fr)}.inspector{display:block;grid-column:1/-1}.inspector .composition-preview{max-width:320px;margin:0 auto 24px}.inspector-layout{max-width:520px;margin:0 auto}}
@media(max-width:650px){.studio{display:flex}.inspector{width:100%}.inspector .composition-preview{max-width:340px}.inspector-layout{width:100%}.inspector .inspector-tabpanel .control-section{margin-top:22px}.inspector .inspector-actions{margin-top:24px}.inspector .keyboard-tip{margin-top:14px}}

.library .tabs{display:flex;align-items:stretch;justify-content:space-between;gap:3px;border-bottom:1px solid var(--line)}
.library .tabs button{flex:0 1 auto;min-width:0;padding:8px 0 10px;border-bottom:0;font-size:11px;text-align:center;white-space:nowrap}
.library .tabs button[aria-selected=true]::after{display:block}
@media(max-width:1150px) and (min-width:651px){.library .tabs button{font-size:10px}}
@media(max-width:650px) and (min-width:381px){.library .tabs button{font-size:12px}}
@media(max-width:380px){.library .tabs button{font-size:10px}}

.outline-control{flex-direction:row;align-items:center;gap:10px;color:var(--ink);cursor:pointer}
.outline-control input[type=checkbox]{width:17px;height:17px;margin:0;padding:0;flex:none;accent-color:var(--accent)}
.outline-control span{white-space:nowrap}

.board-cell.routed,.preview-cell.routed{background:transparent}
.board-cell.routed:after,.composition-preview.with-grid .preview-cell.routed{box-shadow:none}
.board-cell.routed,.preview-cell.routed,.board.allow-overflow .board-cell.routed.selected,.board-cell.routed.selected{z-index:0}
.board-cell:not(.routed),.preview-cell:not(.routed){z-index:1}
/* Let only the straight artwork cross a corner; neighboring cells keep their
   click targets and backgrounds without clipping the edge of the stroke. */
.board .board-cell.straight-form,.board.allow-overflow .board-cell.straight-form.selected,.composition-preview .preview-cell.straight-form{z-index:auto;filter:none}
.straight-form>.tile-art{z-index:2}
.board-layer.active-layer>.board-cell.straight-form>.tile-art path{pointer-events:visiblePainted}


/* Navigation lives in the side panels, leaving the canvas at the top. */
main{max-width:none;padding:0 24px}
.studio{margin-top:24px;gap:28px}
.library-brand{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:24px;padding-bottom:20px;border-bottom:1px solid var(--line)}
.library-brand .wordmark{font-size:25px;gap:9px;white-space:nowrap}
.library-brand .brand-icon{grid-template-columns:10px 10px;grid-template-rows:10px 10px}
.library-brand .brand-period{font-size:9px;margin:6px 0 0 -7px}
.sidebar-help{flex:none;width:28px;height:32px;padding:0;color:var(--muted)}
.composition-actions{display:flex;align-items:center;gap:8px;margin-bottom:20px;padding-bottom:20px;border-bottom:1px solid var(--line)}
.composition-actions .composition-menu-wrap{flex:1;min-width:0}
.composition-actions .composition-menu-button{width:100%;justify-content:space-between;padding:9px 11px;font-size:12px}
.export-select-wrap{position:relative;flex:none}
.composition-actions .export-button{appearance:none;-webkit-appearance:none;display:block;width:105px;height:42px;padding:9px 30px 9px 12px;border:1px solid var(--accent);border-radius:3px;background:var(--accent);color:#fff;font-size:12px;font-weight:700;cursor:pointer}
.composition-actions .export-button option{background:var(--panel);color:var(--ink)}
.composition-actions .export-arrow{position:absolute;right:13px;top:16px;width:7px;height:7px;border-right:2px solid #fff;border-bottom:2px solid #fff;transform:rotate(45deg);pointer-events:none}
.composition-actions .export-button:disabled{opacity:.6;cursor:wait}
.composition-actions .export-button:hover:not(:disabled){background:#a93b27;border-color:#a93b27;filter:none}
.composition-actions .compositions-menu{top:calc(100% + 10px);right:0;max-height:calc(100dvh - 110px);overflow:auto}
@media(max-width:1150px) and (min-width:951px){
 main{padding:0 20px}
 .studio{gap:20px}
 .library-brand{gap:5px}
 .library-brand .wordmark{font-size:23px;gap:7px}
 .composition-actions{gap:6px}
 .composition-actions .composition-menu-button{padding:9px 8px}
 .composition-actions .export-button{width:98px;padding:9px 27px 9px 10px}
}
@media(max-width:950px){
 .studio{gap:24px}
 .library-brand .wordmark{font-size:23px;gap:7px}
 .composition-actions{max-width:520px;margin:0 auto 24px}
 .composition-actions .compositions-menu{left:0;right:auto}
}
@media(max-width:650px){
 main{padding:0 18px}
 .studio{margin-top:18px;gap:22px}
 .library-brand{margin-bottom:20px;padding-bottom:16px}
 .library-brand .wordmark{font-size:25px}
 .composition-actions .composition-menu-button{width:100%;height:42px}
 .composition-actions .composition-menu-label,.composition-actions .composition-menu-chevron{display:block}
 .composition-actions .composition-menu-icon{display:none}
 .composition-actions .compositions-menu{position:absolute;top:calc(100% + 10px);left:0;right:auto;width:min(370px,calc(100vw - 70px));max-height:60dvh}
}

/* Keep the empty-board action above the grid without blocking the other cells. */
.empty-board-action{position:absolute;inset:0;z-index:4;display:flex;align-items:center;justify-content:center;pointer-events:none}
.empty-board-action .primary-button{pointer-events:auto;max-width:calc(100% - 24px);min-height:48px;background:var(--accent);color:#fff;box-shadow:0 5px 18px #463b2424;font-weight:600;gap:16px}


/* Mobile panels reuse the desktop controls inside a native modal drawer. */
.mobile-header{display:none}
.mobile-drawer{padding:0;border:0;border-radius:0;background:var(--panel);color:var(--ink);max-height:none}
.mobile-drawer::backdrop{background:#26282066;backdrop-filter:blur(2px)}
.drawer-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;position:sticky;top:0;z-index:40;background:var(--panel);border-bottom:1px solid var(--line);padding:10px 16px 10px 22px}
.drawer-heading h2{margin:0;font-size:16px;font-weight:600}
.drawer-close,.drawer-toggle{display:grid;place-items:center;width:44px;height:44px;padding:0;border:0;border-radius:3px;background:transparent}
.drawer-close{font-size:28px;font-weight:400}
.drawer-content{padding:20px 22px max(24px,env(safe-area-inset-bottom))}
html.drawer-open,html.drawer-open body{overflow:hidden;overscroll-behavior:none}
@keyframes drawer-enter{from{transform:translateX(var(--drawer-offset))}to{transform:translateX(0)}}
@media(max-width:650px){
 .mobile-header{display:grid;grid-template-columns:44px minmax(0,1fr) 44px;align-items:center;gap:12px;padding:6px 12px;padding-top:max(6px,env(safe-area-inset-top));min-height:58px;border-bottom:1px solid var(--line);background:var(--paper);position:sticky;top:0;z-index:10}
 .mobile-header .wordmark{justify-self:center;font-size:25px;gap:9px;white-space:nowrap}
 .mobile-header .brand-icon{grid-template-columns:10px 10px;grid-template-rows:10px 10px}
 .mobile-header .brand-period{font-size:9px;margin:6px 0 0 -7px}
 .drawer-toggle svg{width:22px;height:22px;stroke-width:1.6}
 .drawer-toggle[aria-expanded=true]{background:#e8e4d9;color:var(--accent)}
 .studio>.library,.studio>.inspector{display:none}
 .studio{display:block;margin-top:16px}
 .mobile-drawer{position:fixed;inset:0 auto 0 0;margin:0;width:min(360px,calc(100vw - 44px));max-width:none;height:100dvh;overflow:auto;overscroll-behavior:contain;--drawer-offset:-100%;box-shadow:8px 0 32px #2628201a}
 .mobile-drawer[data-side=right]{inset:0 0 0 auto;--drawer-offset:100%;box-shadow:-8px 0 32px #2628201a}
 .mobile-drawer[open]{animation:drawer-enter .22s ease-out}
 .mobile-drawer .panel{display:block;width:100%;margin:0;padding:0;border:0;background:transparent;border-radius:0}
 .mobile-drawer .library-brand{margin:0 0 16px;padding:0;border:0;justify-content:flex-end}
 .mobile-drawer .library-brand .wordmark{display:none}
 .mobile-drawer .sidebar-help{width:auto;gap:8px}
 .mobile-drawer .sidebar-help::before{content:'Jak grać';font-size:12px}
 .mobile-drawer .library-grid{grid-template-columns:repeat(4,minmax(0,1fr));max-height:none;gap:10px}
 .mobile-drawer .library .tabs button{font-size:11px}
 .mobile-drawer .composition-actions{position:relative;margin-bottom:20px}
 .mobile-drawer .composition-menu-wrap{position:static}
 .mobile-drawer .compositions-menu{position:absolute;left:0;right:0;top:calc(100% + 8px);width:auto;max-height:calc(100dvh - 180px)}
 .mobile-drawer .compositions-heading{flex-wrap:wrap;gap:8px}
 .mobile-drawer .composition-preview{max-width:220px;margin:0 auto 22px}
 .mobile-drawer .inspector-tabs{top:84px}
 .mobile-drawer .palette-picker{font-size:12px}
 .mobile-drawer .palette-dots i{width:13px;height:13px}
}
@media(prefers-reduced-motion:reduce){.mobile-drawer[open]{animation:none}}

/* Each grid has its own stacking context. Inactive artwork never captures edits. */
.board,.composition-preview{isolation:isolate}
.composition-preview{position:relative}
.board-layer{position:absolute;inset:0;display:grid;pointer-events:none;isolation:isolate}
.board-layer.active-layer>.board-cell{pointer-events:auto}
.board-layer>.board-cell,.board-layer>.preview-cell{background:transparent}
.board .board-layer.with-grid>.board-cell::after{box-shadow:inset -0.5px -0.5px #2d30151c}
.board .board-layer.no-grid>.board-cell::after,.board .board-layer>.board-cell.routed::after{box-shadow:none}
.board-layer.with-grid>.preview-cell:not(.routed){box-shadow:inset -0.5px -0.5px #2d30151c}
.layers-panel{min-width:0}
.layers-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:10px}
.layers-heading h2{font-size:13px;font-weight:600;margin:0}
.layers-heading .text-button{font-size:12px;color:var(--accent);padding:5px 0}
.layers-list{display:grid;gap:6px;max-height:250px;overflow:auto;padding:3px;margin:-3px}
.layer-row{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:3px;min-height:54px;border:1px solid var(--line);border-radius:3px;background:var(--panel)}
.layer-row.active{border-color:#c3483080;background:#f7eee6;box-shadow:inset 3px 0 var(--accent)}
.layer-select{display:flex;align-items:center;gap:8px;min-width:0;align-self:stretch;border:0;background:transparent;padding:8px;text-align:left}
.layer-position{display:grid;place-items:center;width:23px;height:25px;flex:none;background:#e9e4d8;border-radius:2px;font-size:11px;font-variant-numeric:tabular-nums}
.layer-row.active .layer-position{background:var(--accent);color:#fff}
.layer-details{display:flex;flex-direction:column;gap:3px;min-width:0}
.layer-details strong{font-size:12px;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.layer-details small{font-size:9px;color:var(--muted);line-height:1.35}
.layer-actions{display:flex;align-items:center;padding-right:4px}
.layer-actions button{display:grid;place-items:center;width:22px;height:32px;padding:0;border:0;background:transparent;font-size:17px}
.layer-actions button:last-child{color:#a34735}
.layer-row.is-hidden .layer-select{opacity:.5}
.layer-actions .visibility-toggle svg{width:17px;height:17px}
.layer-actions .visibility-toggle[aria-pressed=false]{color:#939287}
.layers-hint,.transparent-hint{font-size:11px;line-height:1.6;color:var(--muted);margin:12px 0 0}
.transparent-hint{display:flex;align-items:center;gap:8px}
.transparency-chip{display:block;width:23px;height:23px;border:1px solid #d5d1c7;flex:none;background:repeating-conic-gradient(#e0dcd2 0% 25%,#faf8f2 0% 50%) 0 0/10px 10px}
.empty-board-action{z-index:10000}
@media(max-width:650px){.layer-actions button{width:25px;height:40px}.board-footer{align-items:flex-start;flex-wrap:wrap}.layers-list{max-height:300px}}
/* Public description stays below the working canvas and is readable without JS. */
.about-studio{max-width:760px;margin:48px 0 0;padding-top:24px;border-top:1px solid var(--line)}
.about-studio h1{font-family:'Manrope',sans-serif;font-size:20px;line-height:1.4;letter-spacing:-.5px;font-weight:650}
.about-studio p,.no-script{font-size:14px;line-height:1.75;color:#606457;margin:12px 0 0}
.library-brand .wordmark{font-size:22px;letter-spacing:-1px;gap:8px}
@media(max-width:650px){.mobile-header .wordmark{font-size:23px;letter-spacing:-1px;gap:8px}.about-studio{margin-top:32px}.about-studio h1{font-size:18px}}

/* Expanded palettes keep the generator's five base colors and wrap manual colors. */
.swatches{flex-wrap:wrap}
.swatch{flex-shrink:0}
.editor-colors>div{flex:1;min-width:0}
.palette-dots{align-items:center;flex-shrink:0}
.palette-extra-count{margin-left:5px;font-size:10px;color:var(--muted);white-space:nowrap}
#paletteName{min-width:0;flex:1;text-align:left;overflow-wrap:anywhere}
.palette-menu button{align-items:center;overflow-wrap:anywhere}
.palette-group-label{grid-column:1/-1;margin:5px 0 0;line-height:1.5}
.palette-color-fields label{min-width:0}
.palette-color-actions{display:flex;align-items:center;flex-wrap:wrap;gap:12px;margin-bottom:20px}
#paletteColorCount{margin-left:auto;color:var(--muted);font-size:12px;font-variant-numeric:tabular-nums}
@media(max-width:650px){.palette-color-fields{grid-template-columns:repeat(3,minmax(0,1fr))}.palette-color-actions{gap:10px}.palette-color-actions button{font-size:12px}}
