:root{--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light;--ink:#20242c;--line:#d8dde4;--muted:#5c6572;--surface:#fff;--page:#e8ebef;--soft:#f4f6f8;--divider:#e8ebef;--gutter:20px;--edge:clamp(12px, 3vw, 32px);--edge-top:max(var(--edge), env(safe-area-inset-top));--edge-left:max(var(--edge), env(safe-area-inset-left))}*{box-sizing:border-box}html{scrollbar-gutter:stable}html,body{min-height:100%}body{cursor:default;-webkit-user-select:none;user-select:none;background-color:var(--page);min-height:100dvh;color:var(--ink);margin:0;font:400 16px/1.45 system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif}.background-preview{z-index:0;pointer-events:none;width:100%;height:100%;position:fixed;inset:0}.app{z-index:1;min-height:100dvh;padding:var(--edge);padding-top:calc(var(--edge-top) + 44px + 12px);padding-left:var(--edge-left);align-content:start;justify-items:start;display:grid;position:relative}[hidden]{display:none!important}.sr-only{clip:rect(0, 0, 0, 0);white-space:nowrap;border:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.corner-actions{top:var(--edge-top);left:var(--edge-left);z-index:100;gap:8px;display:flex;position:sticky}.corner-button{border-radius:50%;width:44px;height:44px;padding:10px;box-shadow:0 2px 12px #0002}.corner-button svg{fill:none;stroke:currentColor;stroke-width:1.8px;stroke-linecap:round;stroke-linejoin:round;width:22px;height:22px;display:block}button,select,input{font:inherit;color:inherit}input[type=number],input[type=text],input:not([type]),textarea,[contenteditable=true]{cursor:text;-webkit-user-select:text;user-select:text}button,select,input[type=number]{border:1px solid var(--line);background:var(--surface);border-radius:6px;min-height:42px}button{cursor:pointer;padding:.5rem .75rem;font-size:.875rem;font-weight:500}button:hover:not(:disabled){background:var(--soft)}button:disabled{color:#858c97;cursor:default;opacity:.65}button:focus-visible,input:focus-visible,select:focus-visible,summary:focus-visible,canvas:focus-visible{outline-offset:3px;outline:3px solid #2563eb}input[type=number]{padding:.35rem .4rem}select{padding:.35rem}.window{background:var(--surface);border:1px solid var(--line);border-radius:12px;width:min(460px,100%);display:grid;overflow:hidden;box-shadow:0 8px 32px #0002}.shared-notice{padding:10px var(--gutter);border-bottom:1px solid var(--line);background:var(--soft);grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:8px;font-size:.8rem;display:grid}.shared-notice button{white-space:normal;min-height:36px}.storage-notice{grid-template-columns:minmax(0,1fr)}.storage-actions{flex-wrap:wrap;gap:8px;display:flex}.panel-section{min-width:0;padding:14px var(--gutter);gap:10px;display:grid}.panel-section+.panel-section{border-top:1px solid var(--divider)}.panel-section h2,.disclosure-toggle{letter-spacing:.06em;text-transform:uppercase;color:var(--muted);margin:0;font-size:.75rem;font-weight:600;line-height:1.3}.section-head{justify-content:space-between;align-items:center;gap:8px;min-height:32px;display:flex}.section-action{min-height:32px;color:var(--muted);background:0 0;border-color:#0000;align-items:center;gap:6px;padding:.25rem .6rem;font-size:.8rem;display:inline-flex}.section-action svg{fill:none;stroke:currentColor;stroke-width:1.8px;stroke-linecap:round;stroke-linejoin:round;width:18px;height:18px}#editColor{position:relative}.subgroup,.field{align-content:start;gap:4px;min-width:0;display:grid}.field label,.group-label{overflow-wrap:anywhere;font-size:.875rem;font-weight:500}.meta{color:var(--muted);font:.875rem/1.3 ui-monospace,SFMono-Regular,Menlo,monospace}.field select{width:100%;height:40px;min-height:40px}.icon-row{flex-wrap:wrap;align-items:center;gap:8px;display:flex}.icon-button,.choice-row button{border-radius:50%;flex:none;place-items:center;width:44px;height:44px;min-height:0;padding:0;display:grid}.icon-button svg,.choice-row button svg{fill:none;stroke:currentColor;stroke-width:1.8px;stroke-linecap:round;stroke-linejoin:round;width:24px;height:24px}.choice-row button[aria-pressed=true],#handTool[aria-pressed=true]{background:var(--ink);color:var(--surface);border-color:var(--ink)}.tile-head{grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);display:grid}.tile-head #newPattern{justify-self:end}.size-row{align-items:center;gap:6px;display:flex}.size-row input{width:4rem;height:36px;min-height:36px}.editor-viewport{background:var(--soft);border:1px solid var(--line);border-radius:6px;min-width:0;min-height:96px;max-height:400px;padding:8px;overflow:auto}.editor-wrap{width:max-content;margin:auto}#editor{image-rendering:pixelated;touch-action:none;cursor:crosshair;outline:1px solid #9aa3af;display:block}.zoom-row{grid-template-columns:auto minmax(0,1fr) auto auto;align-items:center;gap:12px;display:grid}.zoom-row label{font-size:.875rem;font-weight:500}.zoom-row input{width:100%;min-width:0;accent-color:var(--ink)}.zoom-readout{text-align:right;min-width:4ch;color:var(--ink)}.tool-row{flex-wrap:wrap;justify-content:space-between;align-items:end;gap:8px;display:flex}.history-row{grid-template-columns:1fr auto 1fr;align-items:center;gap:8px;display:grid}.history-row .history-actions{grid-column:1;justify-self:start}.history-row #handTool{grid-column:2;justify-self:center}.history-row #clear{grid-column:3;justify-self:end}.small-label{color:var(--muted);font-size:.75rem}.tool-choices .tool-action{margin-left:12px}.symmetry-field{margin-left:auto}.symmetry-choices button:disabled{opacity:.35}.palette-size-field{align-items:center;gap:10px;display:flex}.palette-size-field select{min-height:32px;padding:.15rem 1.4rem .15rem .4rem}.palette{grid-template-columns:repeat(9,minmax(0,40px));gap:8px;display:grid}.swatch{aspect-ratio:1;border:1px solid #9aa3af;border-radius:4px;width:100%;height:auto;min-height:0;padding:0;position:relative}.preset-swatch{image-rendering:pixelated;background-size:100% 100%}.swatch.selected{outline-offset:2px;outline:2px solid #2563eb}.swatch.second-row-start{grid-column:2}.swatch.selected:after{content:"";pointer-events:none;border:1px solid #fff;position:absolute;inset:4px;box-shadow:0 0 0 1px #0008}.swatch.transparent{background-color:#fff;background-image:linear-gradient(45deg,#bbb 25%,#0000 25%),linear-gradient(-45deg,#bbb 25%,#0000 25%),linear-gradient(45deg,#0000 75%,#bbb 75%),linear-gradient(-45deg,#0000 75%,#bbb 75%);background-position:0 0,0 6px,6px -6px,-6px 0;background-size:12px 12px}.color-picker{opacity:0;cursor:pointer;width:100%;height:100%;position:absolute;inset:0}.background-choices{gap:8px;display:flex}.background-choices .swatch,.background-color-swatch{border:1px solid #9aa3af;border-radius:4px;width:40px;height:40px;min-height:40px;padding:0}.background-color-swatch{appearance:none;cursor:pointer;background:#fff}.background-color-swatch::-webkit-color-swatch-wrapper{padding:0}.background-color-swatch::-webkit-color-swatch{border:0;border-radius:3px}.background-color-swatch::-moz-color-swatch{border:0;border-radius:3px}.background-color-swatch.selected,.background-choices .swatch[aria-pressed=true]{outline-offset:2px;outline:2px solid #2563eb}.disclosure-section{gap:0;padding:0}.disclosure-section>h2{margin:0}.disclosure-toggle{width:100%;min-height:44px;padding:14px var(--gutter);cursor:pointer;background:0 0;border:0;border-radius:0;justify-content:space-between;align-items:center;gap:8px;list-style:none;display:flex}.disclosure-toggle:hover{background:var(--soft)}.disclosure-toggle::-webkit-details-marker{display:none}.disclosure-toggle h2{font:inherit;letter-spacing:inherit;color:inherit}.disclosure-toggle:focus-visible{outline-offset:-3px}.disclosure-toggle svg{fill:none;stroke:currentColor;stroke-width:1.8px;stroke-linecap:round;stroke-linejoin:round;flex:none;width:16px;height:16px}.disclosure-toggle[aria-expanded=true] svg,details[open]>.disclosure-toggle svg{transform:rotate(90deg)}.disclosure-body{padding:0 var(--gutter) 14px;gap:10px;display:grid}.generator-controls{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px 16px;display:grid}.generator-controls input[type=range]{width:100%;accent-color:var(--ink)}.seed-row{grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:8px;display:grid}.seed-row input{appearance:textfield;min-width:0;height:40px;min-height:40px}.seed-row input::-webkit-inner-spin-button{appearance:none;margin:0}.seed-row input::-webkit-outer-spin-button{appearance:none;margin:0}#randomizeGenerator .pip{fill:currentColor;stroke:none}.generator-status{color:var(--ink)}.export-actions{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;display:grid}.export-actions button{white-space:nowrap;min-width:0}.export-actions #copyCss{grid-column:1/-1}.pattern-row{flex-wrap:wrap;justify-content:space-between;align-items:end;gap:12px 24px;display:flex}.repeat-choices button svg{width:28px;height:28px}.scale-field select{width:6rem}.utility-row{align-items:center;gap:8px;display:flex}.utility-row .explain-toggle{margin-left:auto}.explain-toggle{width:32px;height:32px;min-height:32px;color:var(--muted);border-radius:50%;padding:0;font-size:.9rem;font-weight:700}.control-help{background:var(--soft);border-radius:6px;padding:8px 10px;font-size:.8rem}.control-help p{margin:0 0 .4rem}.control-help p:last-child{margin-bottom:0}.status{min-height:1.45em;color:var(--muted);margin:0;font-size:.875rem}.status:empty{display:none}.primary{color:#fff;background:#20242c;border-color:#20242c}.primary:hover:not(:disabled){background:#363e4a}@media (width<=420px){:root{--gutter:12px}.icon-row{gap:6px}.icon-button,.choice-row button{width:40px;height:40px}.palette{gap:6px}.tile-head{column-gap:4px}.size-row input{width:3rem}.generator-controls{column-gap:12px}.rule-field,.seed-field{grid-column:1/-1}}@media (width<=360px){.icon-button,.choice-row button{width:38px;height:38px}.tool-choices .tool-action{margin-left:6px}}@media (prefers-color-scheme:dark){:root{--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark;--ink:#e8edf3;--line:#525c69;--muted:#bdc5d0;--surface:#252c35;--page:#161d26;--soft:#333d49;--divider:#3a4552}.primary{color:#20242c;background:#e8edf3;border-color:#e8edf3}.primary:hover:not(:disabled){background:#d0d9e4}}@media (prefers-reduced-motion:reduce){*{scroll-behavior:auto!important}}.editor-viewport.pan-ready,.editor-viewport.pan-ready #editor{cursor:grab}.editor-viewport.panning,.editor-viewport.panning #editor{cursor:grabbing;-webkit-user-select:none;user-select:none}
