:root{--paper:#f6f3ee;--paper-deep:#ece6dc;--card:#fffdf9;--ink:#1d1b18;--muted:#5f594f;--line:#ddd5c8;--accent:#b44a24;--accent-ink:#fff;--focus:#1f5fbf;--radius:14px;--serif:"Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;--sans:system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light}*{box-sizing:border-box}html,body{margin:0}body{font-family:var(--sans);color:var(--ink);background:var(--paper);flex-direction:column;min-height:100vh;line-height:1.45;display:flex}h1,h2{font-family:var(--serif);letter-spacing:-.01em;margin:0;font-weight:600}h2{font-size:1.2rem}button,select,input{font:inherit;color:inherit}:focus-visible{outline:3px solid var(--focus);outline-offset:2px}.visually-hidden{clip-path:inset(50%);white-space:nowrap;width:1px;height:1px;overflow:hidden;position:absolute!important}[hidden]{display:none!important}.masthead{border-bottom:1px solid var(--line);justify-content:space-between;align-items:center;gap:1rem;padding:1.25rem clamp(1rem,3vw,2.5rem);display:flex}.brand{flex-wrap:wrap;align-items:baseline;gap:.25rem 1rem;display:flex}.brand h1{font-size:clamp(1.8rem,4vw,2.4rem);font-style:italic}.brand p{color:var(--muted);margin:0}.lang{border:1px solid var(--line);background:var(--card);cursor:pointer;border-radius:999px;padding:.35rem .9rem;font-size:.9rem}.lang:hover{border-color:var(--ink)}.workspace{flex:1;grid-template-columns:minmax(300px,380px) 1fr;align-items:start;gap:clamp(1rem,2.5vw,2rem);padding:clamp(1rem,2.5vw,2rem) clamp(1rem,3vw,2.5rem);display:grid}@media (max-width:860px){.workspace{grid-template-columns:1fr}.has-images .stage{order:-1}}.panel{flex-direction:column;gap:1rem;display:flex}.block{background:var(--card);border:1px solid var(--line);border-radius:var(--radius);flex-direction:column;gap:.9rem;padding:1.1rem 1.1rem 1.25rem;display:flex}.block-head{justify-content:space-between;align-items:baseline;display:flex}.count{color:var(--muted);font-size:.9rem}.hint{color:var(--muted);margin:0;font-size:.85rem}.status{color:var(--muted);margin:0;font-size:.9rem}.status:empty{display:none}.status.error{color:#9b1c1c}.dropzone{border:2px dashed var(--line);border-radius:var(--radius);text-align:center;cursor:pointer;flex-direction:column;align-items:center;gap:.35rem;padding:1.4rem 1rem;transition:border-color .15s,background .15s;display:flex}.dropzone:hover,.dropzone.is-over{border-color:var(--accent);background:#fbf3ec}.dropzone:focus-within{outline:3px solid var(--focus);outline-offset:2px}.dropzone-title{font-family:var(--serif);font-size:1.15rem}.dropzone-or{color:var(--muted);font-size:.85rem}.dropzone-hint{color:var(--muted);max-width:28ch;font-size:.8rem}.dropzone.is-compact{flex-direction:row;justify-content:center;padding:.7rem}.dropzone.is-compact .dropzone-or,.dropzone.is-compact .dropzone-hint,.dropzone.is-compact .button{display:none}.dropzone.is-compact .dropzone-title{font-size:1rem}.thumbs{grid-template-columns:repeat(auto-fill,minmax(76px,1fr));gap:.5rem;margin:0;padding:0;list-style:none;display:grid}.thumbs:empty{display:none}.thumb{aspect-ratio:1;background:var(--paper-deep);cursor:grab;border-radius:10px;position:relative;overflow:hidden}.thumb img{object-fit:cover;pointer-events:none;width:100%;height:100%;display:block}.thumb.is-dragging{opacity:.35}.thumb.is-target{outline:3px solid var(--accent);outline-offset:1px}.thumb-index{color:#fff;text-align:center;background:#1d1b18bf;border-radius:999px;min-width:1.3rem;padding:0 .3rem;font-size:.72rem;line-height:1.3rem;position:absolute;top:4px;left:4px}.thumb-actions{opacity:0;background:linear-gradient(#0000,#0000008c);justify-content:space-between;padding:3px;transition:opacity .15s;display:flex;position:absolute;inset:auto 0 0}.thumb:hover .thumb-actions,.thumb:focus-within .thumb-actions{opacity:1}@media (hover:none),(pointer:coarse){.thumb-actions{opacity:1}}.icon-button{width:24px;height:24px;color:var(--ink);cursor:pointer;background:#ffffffeb;border:none;border-radius:6px;place-items:center;padding:0;font-size:.85rem;line-height:1;display:grid}.icon-button:disabled{opacity:.35;cursor:default}.thumbs-footer{justify-content:space-between;align-items:center;gap:.5rem;display:flex}.link{color:var(--accent);cursor:pointer;white-space:nowrap;background:0 0;border:none;padding:0;font-size:.85rem;text-decoration:underline}.field{border:none;flex-direction:column;gap:.45rem;margin:0;padding:0;display:flex}.field legend,.field-label{margin-bottom:.45rem;padding:0;font-size:.9rem;font-weight:600}.field-label{justify-content:space-between;margin-bottom:0;display:flex}.field-label output{color:var(--muted);font-variant-numeric:tabular-nums;font-weight:400}input[type=range]{accent-color:var(--accent);width:100%}.segmented{grid-auto-columns:1fr;grid-auto-flow:column;gap:.4rem;display:grid}.segmented label{position:relative}.segmented input{opacity:0;cursor:pointer;position:absolute;inset:0}.segmented span{border:1px solid var(--line);text-align:center;border-radius:10px;flex-direction:column;align-items:center;gap:.35rem;padding:.55rem .3rem;font-size:.82rem;transition:border-color .15s,background .15s;display:flex}.segmented b{font-weight:500}.segmented input:checked+span{border-color:var(--ink);background:var(--paper);box-shadow:inset 0 0 0 1px var(--ink)}.segmented input:focus-visible+span{outline:3px solid var(--focus);outline-offset:2px}.shape{border:2px solid;border-radius:3px;display:block}.shape-square{width:20px;height:20px}.shape-portrait{width:17px;height:21px}.shape-landscape{width:26px;height:17px}.corner{border-top:3px solid;border-left:3px solid;width:20px;height:20px;margin:2px 0 -2px 4px;display:block}.corner-rounded{border-top-left-radius:12px}.swatch-group{flex-direction:column;gap:.35rem;display:flex}.swatch-label{color:var(--muted);margin:0;font-size:.8rem}.swatches{flex-wrap:wrap;gap:.45rem;display:flex}.swatch{cursor:pointer;align-items:center;gap:.4rem;display:inline-flex;position:relative}.swatch input{opacity:0;cursor:pointer;z-index:1;width:100%;height:100%;margin:0;position:absolute;inset:0}.swatch-dot{width:34px;height:34px;box-shadow:inset 0 0 0 3px var(--card);border:1px solid #0000002e;border-radius:50%;transition:transform .12s}.swatch:hover .swatch-dot{transform:scale(1.07)}.swatch input:checked+.swatch-dot{border:2px solid var(--ink)}.swatch input:focus-visible+.swatch-dot{outline:3px solid var(--focus);outline-offset:2px}.swatches-suggested .swatch{border:1px solid var(--line);border-radius:999px;padding:.2rem .6rem .2rem .2rem;font-size:.8rem}.swatches-suggested .swatch:has(input:checked){border-color:var(--ink)}.swatches-suggested .swatch-dot{width:26px;height:26px;box-shadow:none}.custom-color{flex-flow:wrap;align-items:center;gap:.55rem;font-size:.85rem}.custom-color label{cursor:pointer;padding:.35rem 0}.custom-color input[type=color]{border:1px solid var(--line);cursor:pointer;background:0 0;border-radius:50%;width:34px;height:34px;padding:0}.custom-color input[type=color]::-webkit-color-swatch-wrapper{padding:2px}.custom-color input[type=color]::-webkit-color-swatch{border:none;border-radius:50%}.custom-color input[type=color]::-moz-color-swatch{border:none;border-radius:50%}.custom-color:has(#custom-radio:checked) input[type=color]{border:2px solid var(--ink)}.custom-color:has(#custom-radio:focus-visible) input[type=color]{outline:3px solid var(--focus);outline-offset:2px}.hex-input{border:1px solid var(--line);background:var(--card);border-radius:8px;width:6.5rem;margin-left:auto;padding:.35rem .5rem;font-family:ui-monospace,SF Mono,Menlo,Consolas,monospace;font-size:.85rem}.hex-input[aria-invalid=true]{border-color:#9b1c1c}.swatch-text{white-space:nowrap}.stage{flex-direction:column;gap:.9rem;display:flex;position:sticky;top:1rem}@media (max-width:860px){.stage{position:static}}.stage-canvas{border-radius:var(--radius);background:radial-gradient(circle at 1px 1px, #1d1b1817 1px, transparent 0) 0 0 / 18px 18px, var(--paper-deep);place-items:center;height:min(72vh,820px);min-height:280px;padding:clamp(.75rem,3vw,2rem);display:grid;position:relative}@media (max-width:860px){.stage-canvas{aspect-ratio:1;height:auto;max-height:75vh}.has-images .stage{display:contents}.has-images .stage-canvas{z-index:5;aspect-ratio:auto;height:40vh;border-radius:0 0 var(--radius) var(--radius);order:-3;height:40svh;min-height:220px;margin:calc(-1*clamp(1rem,2.5vw,2rem)) calc(-1*clamp(1rem,3vw,2.5rem)) 0;padding:.6rem;position:sticky;top:0;box-shadow:0 10px 18px -14px #281e1480}.has-images .toolbar{order:-2}.has-images #export-status{order:-1}.has-images .masthead{padding-block:.75rem}}.stage-canvas canvas{max-width:100%;max-height:100%;display:block;box-shadow:0 1px 2px #00000014,0 18px 40px -12px #281e1459}.stage-empty{color:var(--muted);font-family:var(--serif);margin:0;font-size:1.15rem;font-style:italic;position:absolute}.toolbar{flex-wrap:wrap;justify-content:space-between;align-items:end;gap:.75rem;display:flex}.export{flex-wrap:wrap;align-items:end;gap:.6rem;display:flex}.compact{color:var(--muted);flex-direction:column;gap:.2rem;font-size:.75rem;display:flex}select{border:1px solid var(--line);background:var(--card);color:var(--ink);border-radius:10px;padding:.5rem .6rem;font-size:.9rem}.button{cursor:pointer;border:1px solid #0000;border-radius:10px;justify-content:center;align-items:center;gap:.45rem;padding:.6rem 1.1rem;font-size:.92rem;font-weight:600;transition:background .15s,border-color .15s;display:inline-flex}.button:disabled{opacity:.45;cursor:not-allowed}.button-primary{background:var(--ink);color:var(--paper)}.button-primary:not(:disabled):hover{background:var(--accent)}.button-secondary{background:var(--card);border-color:var(--line)}.button-secondary:not(:disabled):hover{border-color:var(--ink)}.footer{color:var(--muted);padding:1rem clamp(1rem,3vw,2.5rem) 1.5rem;font-size:.85rem}.footer p{margin:0}.drop-overlay{border:4px dashed var(--accent);font-family:var(--serif);pointer-events:none;opacity:0;z-index:10;background:#f6f3eee0;place-items:center;font-size:2rem;transition:opacity .12s;display:grid;position:fixed;inset:0}.drop-overlay.is-visible{opacity:1}@media (prefers-reduced-motion:reduce){*{transition:none!important}}@media (pointer:coarse){.thumbs{grid-template-columns:repeat(auto-fill,minmax(100px,1fr))}.icon-button{width:32px;height:32px;font-size:1rem}.button,select{min-height:44px}.swatch-dot,.custom-color input[type=color]{width:40px;height:40px}.hex-input{min-height:40px;font-size:1rem}.link{min-height:44px;padding:0 .5rem}}@media (max-width:860px){.toolbar,.export{grid-template-columns:1fr 1fr;align-items:end;gap:.6rem;display:grid}.toolbar>#shuffle,.toolbar>.export{grid-column:1/-1}.export .compact select{width:100%}.export .button{white-space:nowrap;align-self:stretch;padding-inline:.5rem}.export #download:has(+#share[hidden]){grid-column:1/-1}}
