:root{font-family:ui-sans-serif,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif;color:#203a32;background:#f5f5ee;font-synthesis:none;--paper: #f5f5ee;--panel: #fffefa;--ink: #203a32;--muted: #607065;--line: #dadfd4;--accent: #285c45;--mint: #b5efd0}*{box-sizing:border-box}body{margin:0}button,input,select,textarea{font:inherit}button,a,input,select,textarea{-webkit-tap-highlight-color:transparent}button{cursor:pointer;color:inherit}button:disabled{opacity:.35;cursor:default}button{transition:background .15s ease-out,color .15s ease-out}button:hover:not(:disabled){background:#e8eddf}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:3px solid #548d63;outline-offset:3px}button svg{flex:none}button{display:inline-flex;align-items:center;justify-content:center;gap:8px}a{color:inherit;text-underline-offset:4px}::selection{background:#cce5af;color:#163b2c}input,textarea{caret-color:var(--accent)}[hidden]{display:none!important}h1,h2,h3,p{margin:0}button{border:0}button:active:not(:disabled){transform:translateY(1px)}.site-header{height:88px;padding:0 4.2%;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--line);gap:24px}.brand{display:flex;align-items:center;gap:11px;text-decoration:none;font-family:Georgia,Times New Roman,serif;font-size:32px;font-weight:700;letter-spacing:-1.3px}.brand>svg{width:31px;height:31px}.brand-dot{color:#799445}.header-note{font-size:13px;color:var(--muted);margin-left:25px}.header-actions{display:flex;align-items:center;gap:27px}.local-note{display:flex;align-items:center;gap:8px;font-size:11px;color:var(--muted)}.local-note>span{width:6px;height:6px;background:#7c9658;border-radius:50%}.quiet-button{background:transparent;font-size:12px;padding:9px 0;border-radius:5px}main{max-width:1600px;margin:auto;padding:36px 4.2% 0}.intro{display:flex;justify-content:space-between;align-items:center;padding-bottom:30px}.intro h1{font-family:Georgia,Times New Roman,serif;font-weight:400;font-size:35px;letter-spacing:-1.1px;line-height:1.25;text-wrap:balance}.intro h1 em{font-weight:400;color:#617d53}.intro p{font-size:13px;color:var(--muted);margin-top:9px}.intro-art{display:flex;gap:12px;align-items:center;padding-right:8px;color:#718667}.intro-art>svg{width:22px;height:22px;transform:rotate(-8deg)}.intro-art>span{font-family:Georgia,serif;font-style:italic;font-size:15px}.lab-layout{display:grid;grid-template-columns:276px minmax(0,1fr);gap:26px;align-items:start}.sidebar{display:flex;flex-direction:column;gap:22px}.library{min-width:0}.section-heading{display:flex;align-items:center;justify-content:space-between;margin-bottom:16px}.section-heading h2{font-size:15px;font-weight:650;letter-spacing:-.25px}.count{font-family:ui-monospace,monospace;font-size:10px;color:var(--muted);border:1px solid var(--line);padding:3px 7px;border-radius:5px}.tabs{display:flex;gap:5px;border-bottom:1px solid var(--line);margin-bottom:15px}.tabs button{font-size:11px;background:transparent;color:var(--muted);padding:0 9px 11px;position:relative;white-space:nowrap}.tabs button:first-child{padding-left:0;padding-right:18px}.tabs button.active{color:var(--ink);font-weight:650}.tabs button.active:after{position:absolute;content:"";height:2px;bottom:-1px;left:0;right:0;background:var(--accent)}#saved-count{background:#e5eadf;padding:1px 5px;border-radius:4px;font-size:10px}.search{display:flex;align-items:center;gap:8px;border:1px solid var(--line);background:var(--panel);padding:0 11px;border-radius:7px;color:#6e7e6e}.search input{font-size:11px;background:transparent;border:0;height:37px;min-width:0;width:100%;color:var(--ink)}.search:focus-within{outline:2px solid #548d63;outline-offset:2px}.search input:focus-visible{outline:0}.search input::placeholder{color:#6b7769}.filter-label{display:flex;align-items:center;justify-content:space-between;padding:11px 0 8px;gap:5px}.filter-label select{width:135px;border:0;padding:4px 0;background:transparent;font-size:11px;color:var(--ink);cursor:pointer}.filter-label>span:not(.sr-only){font-size:10px;color:var(--muted);white-space:nowrap}.pattern-list{height:342px;overflow:auto;padding-right:4px;scrollbar-width:thin;scrollbar-color:#bcc8b4 transparent}.pattern-item{width:100%;text-align:left;background:transparent;justify-content:flex-start;gap:11px;padding:10px 7px;border-radius:8px;position:relative;margin-bottom:4px;min-height:79px}.pattern-item.selected{background:#e7eddf}.pattern-item.selected:after{content:"";position:absolute;width:5px;height:5px;background:#547642;right:11px;top:13px;border-radius:50%}.pattern-preview{width:66px;height:58px;flex:none;background:#edf0e6;border-radius:6px;display:grid;place-items:center;color:#466a4f}.pattern-item.selected .pattern-preview{background:#dce6d0}.pattern-preview svg{width:66px;height:54px;fill:currentColor}.pattern-info{display:flex;flex-direction:column;gap:4px;min-width:0;flex:1}.pattern-info b{font-size:11px;font-weight:650;letter-spacing:-.1px}.pattern-info small{font-size:10px;line-height:1.45;color:#63715c}.pattern-category{font-size:8px;color:#526e46;letter-spacing:.6px;text-transform:uppercase}.pattern-item>svg{margin-left:auto;opacity:.6}.library-hint{border-top:1px solid var(--line);margin-top:10px;padding-top:13px;display:flex;align-items:center;gap:7px;font-size:10px;color:#6b7b60}.rule-panel{padding:18px 0 0;border-top:1px solid var(--line)}.rule-panel>.section-heading{margin-bottom:13px}.rule-panel select{width:100%;border:1px solid var(--line);background:var(--panel);border-radius:6px;font-size:11px;padding:10px;color:var(--ink)}#rule-form{display:flex;gap:7px;margin-top:9px}#rule-input{width:100%;min-width:0;flex:1;font-family:ui-monospace,monospace;font-size:12px;letter-spacing:.5px;padding:9px 11px;border:1px solid var(--line);background:var(--panel);border-radius:6px;color:var(--ink)}.apply-button{font-size:11px;border-radius:6px;background:#e1e9d9;padding:0 14px;font-weight:600}#rule-help{font-size:11px;line-height:1.8;color:var(--muted);margin-top:11px}#rule-help b{color:var(--ink)}.text-button{padding:0;background:transparent;font-size:10px;color:#4a6747;gap:7px}.text-button:hover{background:transparent!important;text-decoration:underline;text-underline-offset:3px}.rule-panel>.text-button{margin-top:10px}.workspace{min-width:0}.board-heading{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:0 0 15px;min-height:37px}.world-title{display:flex;align-items:center;gap:9px;min-width:0}.world-title h2{font-size:13px;font-weight:600;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.live-dot{width:7px;height:7px;flex:none;border-radius:2px;background:#6b8e50}.rule-badge{padding:4px 6px;font-family:ui-monospace,monospace;font-size:9px;border:1px solid var(--line);border-radius:4px;color:#5f6f5e;white-space:nowrap}.world-actions{display:flex;align-items:center;gap:8px;flex:none}.icon-button{width:34px;height:34px;padding:0;background:transparent;border-radius:6px;flex:none}.icon-button svg{width:17px;height:17px}.save-button{font-size:10px;border:1px solid #d3daca;border-radius:6px;padding:8px 10px;background:transparent;font-weight:600}.canvas-wrap{height:clamp(340px,46.2vw,510px);position:relative;background:#142d29;border-radius:12px 12px 0 0;overflow:hidden}#board{display:block;width:100%;height:100%;touch-action:none;outline:0;cursor:grab}#board:focus-visible{box-shadow:inset 0 0 0 3px var(--mint)}.board-top{position:absolute;top:16px;left:16px;right:18px;display:flex;justify-content:space-between;align-items:center;pointer-events:none}.tools{display:flex;gap:3px;padding:4px;background:#243e36;border:1px solid #3b5145;border-radius:8px;pointer-events:auto}.tools .icon-button{color:#bfcfb9;width:32px;height:32px}.tools .icon-button:hover{background:#3d5647}.tools .icon-button.active{color:#f1f7df;background:#526b50}.board-status{color:#b7cbb6;font-size:10px;display:flex;align-items:center;gap:7px}.board-status:before{content:"";width:5px;height:5px;background:#a8ba91;border-radius:50%}.board-bottom{position:absolute;bottom:16px;left:18px;right:16px;display:flex;justify-content:space-between;align-items:center;pointer-events:none;gap:8px}.canvas-tip{font-size:10px;color:#b7cbb6;background:#142d29;padding:5px 0}.zoom-tools{pointer-events:auto;display:flex;align-items:center;padding:3px;border-radius:7px;background:#243e36;border:1px solid #3b5145;color:#dce8ce;gap:1px}.zoom-tools .icon-button{width:28px;height:28px}.zoom-tools .icon-button:hover{background:#3d5647}.zoom-tools output{font-family:ui-monospace,monospace;font-size:9px;min-width:39px;text-align:center}.tool-divider{height:17px;width:1px;background:#475c4c;margin:0 3px}.stats{display:flex;align-items:center;gap:30px;padding:15px 19px;background:#1c352e;border-radius:0 0 12px 12px;color:#b9c9b3;min-height:47px}.stats>div{display:flex;align-items:center;gap:9px;font-size:10px;white-space:nowrap}.stats output{font-size:12px;font-family:ui-monospace,monospace;color:#f1f6de;font-variant-numeric:tabular-nums}.stat-dot{width:5px;height:5px;background:#a4b98b;border-radius:50%;margin-right:0}.stat-dot.running{background:#d7f3a8}.stats .infinite-label{margin-left:auto;font-family:Georgia,serif;font-style:italic;font-size:11px;color:#b8c9ad;gap:7px}.transport{display:flex;align-items:center;justify-content:space-between;padding:17px 0 18px;border-bottom:1px solid var(--line);gap:10px}.play-controls{display:flex;gap:4px;align-items:center}.play-button{background:var(--accent);color:#fffcec;padding:11px 14px;border-radius:7px;font-size:11px;font-weight:600;min-width:131px;gap:8px}.play-button:hover{background:#1d4635!important}.play-button svg{fill:currentColor;stroke-width:1}.play-button kbd{font-size:8px;font-family:inherit;font-weight:400;color:#e0e9cf;border:1px solid #67826a;padding:2px 4px;border-radius:3px;margin-left:6px}.play-button[aria-pressed=true] svg{fill:none;stroke-width:3}.speed-control{display:flex;align-items:center;gap:9px;font-size:10px;color:var(--muted);margin-left:auto;margin-right:auto}.speed-control input{width:88px;accent-color:#487142;height:4px;cursor:pointer}.speed-control output{width:56px;color:var(--ink);font-family:ui-monospace,monospace;font-size:9px;font-variant-numeric:tabular-nums}.edit-controls{display:flex;gap:3px}.edit-controls .active{background:#e4eadc;color:#46633a}.pattern-story{display:flex;gap:16px;align-items:center;padding:22px 0 17px}.story-preview{width:64px;height:64px;flex:none;display:grid;place-items:center;background:#e9edde;border-radius:10px}.story-preview svg{width:61px;height:54px;fill:#5c7e4c}.story-copy{flex:1;min-width:0}.story-title{display:flex;align-items:center;gap:10px;margin-bottom:7px}.story-title h3{font-size:12px;letter-spacing:-.2px;font-weight:650}.story-title>span{font-size:8px;text-transform:uppercase;letter-spacing:.6px;color:#607752;background:#e7ebdd;border-radius:4px;padding:3px 5px}.story-copy>p{font-size:11px;color:var(--muted);line-height:1.7;max-width:65ch}.outline-button{font-size:10px;border:1px solid #cdd7c3;background:transparent;padding:10px 11px;border-radius:6px;white-space:nowrap;align-self:center}.workspace-footer{display:flex;justify-content:space-between;gap:12px;align-items:center;font-size:9px;color:#63735e;padding:5px 0 12px}.workspace-footer>span{display:flex;align-items:center;gap:6px}.site-footer{border-top:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;gap:20px;margin-top:30px;padding:18px 0 24px;color:#6c7a62;font-size:10px}.site-footer>span:first-child{font-family:Georgia,serif;font-style:italic;font-size:12px}.stamp-banner{position:absolute;top:73px;left:16px;display:flex;align-items:center;gap:8px;background:#ecf1d5;color:#243b2c;border-radius:6px;padding:6px 9px;font-size:10px;max-width:calc(100% - 32px)}.stamp-banner button{padding:4px;background:transparent;border-radius:4px}.stamp-banner span{margin-right:5px}.empty-hint{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);text-align:center;color:#c5d8b6;width:240px;pointer-events:none}.empty-hint>svg{color:#8cae7c;margin-bottom:12px}.empty-hint h3{font-family:Georgia,serif;font-size:26px;font-weight:400;color:#e5f0d3}.empty-hint p{font-size:12px;line-height:1.8;margin-top:9px}.empty-hint button{background:#b5efd0;color:#163b2c;padding:9px 14px;border-radius:6px;font-size:11px;margin-top:15px;pointer-events:auto}.sheet{border:0;background:var(--panel);color:var(--ink);border-radius:14px;padding:28px;max-width:590px;width:calc(100% - 32px);max-height:85dvh;box-shadow:0 16px 60px #0b20164d;scrollbar-width:thin;scrollbar-color:#b4c4a8 transparent}.sheet::backdrop{background:#10251dd1}.dialog-heading{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:21px}.dialog-heading h2{font-family:Georgia,serif;font-size:25px;font-weight:400;letter-spacing:-.6px}.dialog-heading .icon-button{margin-right:-6px}.about-body{font-size:13px;line-height:1.9;color:#5a6b5e}.about-body p{margin-bottom:17px}.about-body .about-lead{font-size:18px;font-family:Georgia,serif;color:var(--ink)}.about-body h3{font-size:14px;color:var(--ink);margin:24px 0 7px}.about-body ol{padding-left:21px}.shortcuts{display:grid;grid-template-columns:1fr 1fr;gap:9px;margin:18px 0 23px}.shortcuts>span{display:flex;align-items:center;gap:12px;font-size:11px}.shortcuts kbd{font-family:inherit;border:1px solid var(--line);border-radius:4px;padding:1px 5px;font-size:10px;min-width:48px;text-align:center;background:var(--paper)}.about-foot{padding-top:18px;border-top:1px solid var(--line);font-family:Georgia,serif;font-style:italic}.small-sheet{max-width:460px}.small-sheet form>p{font-size:12px;line-height:1.8;color:var(--muted);margin:0 0 16px}.small-sheet form>label{display:block;font-size:12px;font-weight:600;margin-bottom:8px}.small-sheet input,.small-sheet textarea{width:100%;border:1px solid #cad3bf;color:var(--ink);background:#fff;border-radius:7px;padding:11px;font-size:13px}.small-sheet textarea{font-family:ui-monospace,monospace;font-size:12px;resize:vertical}.primary-button{background:var(--accent);color:#fffcec;font-size:12px;border-radius:7px;padding:12px 16px;margin-top:15px;min-height:44px}.primary-button:hover{background:#1d4635!important}.error{font-size:11px!important;color:#a03b29!important;line-height:1.6!important;margin-top:8px!important}.error:empty{display:none}.toast{position:fixed;bottom:25px;left:50%;transform:translate(-50%,15px);border-radius:8px;background:#254834;color:#f5f7e6;box-shadow:0 6px 20px #102d2a33;padding:13px 20px;max-width:calc(100% - 30px);width:max-content;font-size:12px;opacity:0;pointer-events:none;transition:opacity .18s ease-out,transform .18s ease-out;z-index:10;line-height:1.6}.toast.visible{opacity:1;transform:translate(-50%)}.library-empty{padding:35px 17px;text-align:center}.library-empty h3{font-size:13px;font-weight:600}.library-empty p{font-size:11px;color:var(--muted);line-height:1.8;margin-top:8px}.saved-row{display:flex;align-items:center;position:relative;border-bottom:1px solid var(--line)}.saved-item{padding-right:28px;margin:0;min-width:0}.saved-item b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.delete-saved{position:absolute;right:0;width:28px;height:32px;background:var(--paper)}.canvas-fallback{padding:50px 30px;color:#d2e7c3;line-height:1.8}.canvas-fallback p{margin-top:12px}.sr-only{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}@media(min-width:1450px){main{padding-top:43px}.intro{padding-bottom:38px}.canvas-wrap{height:540px}.pattern-list{height:382px}.lab-layout{gap:32px;grid-template-columns:292px minmax(0,1fr)}}@media(max-width:1150px){.site-header{padding:0 3%}.header-note{display:none}main{padding-left:3%;padding-right:3%}.lab-layout{grid-template-columns:242px minmax(0,1fr);gap:20px}.intro h1{font-size:31px}.stats{gap:20px}.stats .infinite-label{display:none}.pattern-item{gap:8px}.pattern-preview{width:56px}.pattern-preview svg{width:55px}.pattern-info b{font-size:10px}.pattern-info small{font-size:9px}.transport{flex-wrap:wrap;gap:10px}.speed-control{margin-left:0;margin-right:0}.speed-control input{width:65px}.play-button{min-width:110px;padding:11px}.play-button kbd{display:none}.play-controls{gap:1px}.transport .icon-button{width:29px}.edit-controls{margin-left:auto}.pattern-story{flex-wrap:wrap;gap:12px}.pattern-story .outline-button{margin-left:76px;margin-top:-2px}.pattern-list{height:352px}.workspace-footer{align-items:flex-start}.workspace-footer>span{max-width:70%;line-height:1.6}.canvas-tip{font-size:9px}}@media(max-width:850px)and (min-width:701px){.speed-control{order:3;width:100%;justify-content:flex-end}.speed-control input{width:140px}.transport{padding:13px 0}.intro-art,.canvas-tip{display:none}.stats{gap:15px;padding:15px 12px}.stats>div{gap:5px;font-size:9px}}@media(max-width:700px){.site-header{height:71px;padding:0 20px}.brand{font-size:28px;gap:8px}.brand>svg{width:27px;height:27px}.header-actions{gap:0}.local-note{display:none}.quiet-button{font-size:11px;padding:8px}.quiet-button svg{width:16px}.intro{padding-bottom:23px}.intro h1{font-size:30px;line-height:1.16;max-width:450px}.intro h1 em{display:block}.intro p{font-size:11px;margin-top:10px}.intro-art{display:none}main{padding:25px 18px 0}.lab-layout{display:flex;flex-direction:column;gap:27px}.workspace{order:0;width:100%}.sidebar{order:1;width:100%;display:grid;grid-template-columns:1fr 1fr;gap:23px}.board-heading{gap:5px;padding-bottom:12px;min-height:39px}.world-title{gap:6px}.world-title h2{font-size:11px;max-width:180px}.rule-badge{font-size:8px;padding:3px 4px}.live-dot{width:5px;height:5px}.world-actions{gap:1px}.save-button{padding:7px;font-size:9px;gap:5px;min-height:34px}.save-button svg{width:14px}.world-actions .icon-button{width:30px}.canvas-wrap{height:370px;border-radius:9px 9px 0 0}.board-top{top:12px;left:12px;right:13px}.board-status{font-size:8px}.board-bottom{bottom:12px;left:12px;right:12px}.canvas-tip{font-size:8px;max-width:160px;line-height:1.7}.tools{padding:3px;gap:2px}.tools .icon-button{width:31px;height:31px}.zoom-tools .icon-button{width:27px;height:30px}.stats{padding:14px 12px;gap:18px;border-radius:0 0 9px 9px}.stats>div{font-size:9px;gap:6px}.stats output{font-size:10px}.stats .infinite-label{display:none}.transport{padding:14px 0;gap:13px}.play-button{min-width:107px;font-size:10px}.play-controls .icon-button{width:31px;height:35px}.edit-controls .icon-button{width:29px;height:35px}.speed-control{order:3;width:100%;justify-content:flex-start;gap:12px}.speed-control input{width:auto;flex:1;margin:0}.speed-control output{text-align:right;width:61px}.speed-control>span{min-width:38px}.edit-controls{margin-left:auto}.pattern-story{padding:19px 0 12px;gap:12px}.story-preview{width:50px;height:54px;border-radius:8px}.story-preview svg{width:48px}.story-title{gap:7px;margin-bottom:5px}.story-title h3{font-size:11px}.story-copy>p{font-size:10px;line-height:1.75}.story-title>span{font-size:7px}.pattern-story .outline-button{margin-left:62px;font-size:9px;padding:8px 10px;margin-top:0}.workspace-footer{font-size:8px;padding:7px 0 0;gap:8px}.workspace-footer .text-button{font-size:9px;white-space:nowrap}.workspace-footer>span{max-width:70%}.section-heading h2{font-size:14px}.rule-panel{padding-top:0;border-top:0}.rule-panel>.section-heading{margin-bottom:16px}.pattern-list{height:323px}.pattern-info b{font-size:11px}.pattern-info small{font-size:10px}.site-footer{margin-top:25px;flex-direction:column;gap:9px;align-items:flex-start;padding:18px 0 22px;font-size:9px}.site-footer>span:first-child{font-size:11px}.library-hint{font-size:9px}.stamp-banner{top:66px;font-size:9px;left:12px}.sheet{padding:21px}.dialog-heading h2{font-size:23px}.about-body{font-size:12px}.toast{bottom:15px;font-size:11px;padding:12px 15px}}@media(max-width:500px){.sidebar{display:flex;flex-direction:column;gap:24px}.pattern-list{display:grid;grid-template-columns:1fr 1fr;gap:4px;height:290px;align-content:start}.pattern-item{padding:8px 6px;gap:7px;min-height:91px;align-items:center;flex-direction:column;justify-content:center;text-align:center}.pattern-preview{height:40px;width:100%;background:transparent!important}.pattern-preview svg{height:40px;width:66px}.pattern-info{gap:3px;flex:none}.pattern-info small{display:none}.pattern-item>.pattern-category{font-size:8px}.pattern-info b{font-size:10px}.pattern-category{font-size:7px}.pattern-item>svg{display:none}.filter-label{padding-top:9px}.pattern-list .saved-row{min-height:100px}.saved-item{padding-right:20px;min-height:100px;width:100%}.saved-item .pattern-info{max-width:100%}.delete-saved{right:1px;top:2px;width:25px}.rule-panel{padding-top:19px;border-top:1px solid var(--line)}.rule-panel select{font-size:12px;padding:12px}#rule-input{font-size:13px;padding:11px}#rule-help,.apply-button{font-size:12px}.rule-panel>.text-button{font-size:11px}.board-heading .save-button span{display:none}.save-button{padding:7px 8px}.world-title h2{max-width:174px}.world-actions{gap:4px}.canvas-tip{max-width:130px}.canvas-wrap{height:348px}.stats{gap:19px}.stats .bounds-stat{margin-left:auto}.stats .bounds-stat>span{display:none}.intro h1{font-size:30px}.intro p{font-size:10px}.shortcuts{gap:8px}.shortcuts>span{font-size:10px;gap:7px}}@media(prefers-reduced-motion:reduce){*,*:before,*:after{transition:none!important;animation:none!important;scroll-behavior:auto!important}}@media(max-width:700px){.pattern-story{display:grid;grid-template-columns:50px minmax(0,1fr);align-items:start}.story-copy{min-width:0}.pattern-story .outline-button{grid-column:2;margin:0;justify-self:start}.story-preview{align-self:start}.story-copy>p{font-size:11px}.story-title h3{font-size:12px}}@media(pointer:coarse){.tools .icon-button{width:36px;height:36px}.zoom-tools .icon-button{width:32px;height:34px}.transport .icon-button{width:34px;height:40px}.play-button{min-height:42px}.world-actions .icon-button,.save-button{min-width:38px;min-height:38px}.canvas-tip{max-width:115px}}
