:root{--ink: #1f2328;--muted: #5e6672;--line: #dde1e6;--panel: #ffffff;--page: #eceff3;--brand: #69b814;--brand-hover: #5aa010;--brand-ink: #4b840e;--on-brand: #12200a;--brand-soft: #eaf6de;--bar: linear-gradient(90deg, #4f9a12 0%, #3a8a1f 55%, #2c7a2a 100%);--rail: #1d2127;--drawer: #272c33;--card: #323840;--on-dark: #e9edf2;--on-dark-muted: #a7b0bc;--select: var(--brand);--guide: #e5267e;--accent: var(--brand);--on-accent: var(--on-brand);--warn: #8a4b00;--warn-bg: #fff4e5;--error: #b42318;color-scheme:light}*{box-sizing:border-box}[hidden]{display:none!important}html,body{margin:0;background:var(--page);color:var(--ink);font:16px/1.45 -apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif}#share-app{max-width:1200px;margin:0 auto;padding:16px;padding-bottom:calc(24px + env(safe-area-inset-bottom))}#share-app.editing{max-width:none;padding:0}h1{font-size:1.15rem;margin:0;overflow-wrap:anywhere}h2{font-size:1rem;margin:0}.boot{color:var(--muted)}.note{color:var(--muted);font-size:.85rem;margin:2px 0}.warn{color:var(--warn);background:var(--warn-bg);padding:8px 10px;border-radius:8px;font-size:.88rem;margin:4px 0}.error{color:var(--error);font-size:.92rem;margin:6px 0}.hint{color:var(--muted);font-size:.88rem;margin:4px 0 8px}.privacy{color:var(--muted);font-size:.8rem;margin:14px 0 0}.unlock{max-width:420px;margin:12vh auto 0;background:var(--panel);border:1px solid var(--line);border-radius:14px;padding:20px;box-shadow:0 10px 30px #10182814}.unlock h1{margin-bottom:12px;font-size:1.3rem}.unlock input{width:100%;font-size:1.15rem;letter-spacing:.08em;text-transform:uppercase}label{display:block;font-weight:600;font-size:.9rem;margin-bottom:4px}input[type=text],input:not([type]),textarea,select,#code{width:100%;font:inherit;font-size:16px;padding:9px 11px;border:1px solid var(--line);border-radius:6px;background:#fff;color:var(--ink)}textarea{resize:vertical}input:focus-visible,textarea:focus-visible,select:focus-visible,button:focus-visible,.button:focus-within{outline:3px solid rgba(105,184,20,.55);outline-offset:1px}button,.button{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:40px;padding:0 14px;font:inherit;font-size:.92rem;font-weight:600;border-radius:6px;border:1px solid var(--line);background:#fff;color:var(--ink);cursor:pointer}button:hover,.button:hover{border-color:#c4cbd3}button.primary,.button.primary{background:var(--brand);border-color:var(--brand);color:var(--on-brand)}button.primary:hover,.button.primary:hover{background:var(--brand-hover);border-color:var(--brand-hover)}button.quiet{background:transparent;border-color:transparent;color:var(--muted);text-decoration:underline}button.danger{color:var(--error)}button:disabled{opacity:.45;cursor:default}button[aria-pressed=true]{border-color:var(--brand-ink);color:var(--brand-ink);box-shadow:inset 0 0 0 1px var(--brand-ink)}.unlock button{width:100%;margin-top:6px}.visually-hidden{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}.bar{display:flex;align-items:center;gap:16px;min-height:58px;padding:6px 16px;background:var(--bar);color:#fff}.bar-title{min-width:0;flex:1}.bar h1{color:#fff;font-size:1.05rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.bar .note{color:#ffffffd9;font-size:.78rem;margin:0}.bar .warn{margin:2px 0 0;padding:4px 8px;font-size:.78rem}.actionbar{display:flex;align-items:center;gap:6px}.act{min-height:38px;padding:0 12px;border:0;border-radius:6px;background:#ffffff29;color:#fff;font-weight:600}.act:hover{background:#ffffff42;border:0}.act:disabled{opacity:.4}.act svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}.act.download-toggle{background:#0a143c47}.download-wrap{position:relative}.download-menu{position:absolute;right:0;top:calc(100% + 8px);z-index:30;width:max-content;min-width:260px;max-width:min(380px,calc(100vw - 24px));box-sizing:border-box;padding:12px;border-radius:8px;background:#fff;color:var(--ink);box-shadow:0 16px 40px #10182838}.download-title{margin:0 0 8px;font-size:.78rem;font-weight:600;letter-spacing:.04em;text-transform:uppercase;color:var(--muted)}div.downloads,.download-row{display:flex;flex-wrap:wrap;gap:8px}div.downloads button,.download-row button{flex:1 1 0;min-width:72px;min-height:40px;font-weight:600}.download-menu .privacy{margin-top:10px}.out{position:fixed;z-index:40;left:50%;top:66px;transform:translate(-50%);display:grid;gap:6px;width:min(420px,calc(100vw - 24px))}.out .busy:not([hidden]){margin:0;padding:8px 12px;border-radius:8px;background:#fff;color:var(--ink);box-shadow:0 8px 24px #10182829;text-align:center}.ready{display:grid;gap:8px}.ready .save-file{width:100%}.workspace{display:grid;grid-template-columns:76px 280px minmax(0,1fr) 320px;min-height:calc(100vh - 58px)}.rail{background:var(--rail);display:flex;flex-direction:column;padding-top:8px}.rail button{flex-direction:column;gap:4px;min-height:66px;padding:6px 4px;border:0;border-radius:0;background:none;color:var(--on-dark-muted);font-size:.72rem;font-weight:600}.rail button:hover{color:#fff;background:#ffffff0f}.rail svg,.tools svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.drawer{background:var(--drawer);color:var(--on-dark);padding:14px 12px;overflow-y:auto;max-height:calc(100vh - 58px);position:sticky;top:0}.item-list{display:grid;gap:10px}.list-title{margin:6px 2px 0;font-size:.72rem;letter-spacing:.08em;text-transform:uppercase;color:var(--on-dark-muted)}.item{display:grid;gap:8px;padding:10px;border-radius:8px;background:var(--card);border:1px solid transparent}.item.current{border-color:var(--select);box-shadow:0 0 0 1px var(--select)}.item-head{display:flex;align-items:center;justify-content:space-between;gap:10px}.item-name{min-height:28px;padding:0;border:none;background:none;color:var(--on-dark);font-weight:600;text-align:left;justify-content:flex-start;overflow-wrap:anywhere}.item-name:hover{color:#fff}.item-name[aria-pressed=true]{box-shadow:none;color:var(--select)}.item .thumb{flex:none;width:48px;height:48px;border-radius:5px;border:1px solid rgba(255,255,255,.12);background:repeating-conic-gradient(#e8e8e8 0 25%,#fff 0 50%) 0 0 / 12px 12px}.item input,.item textarea{border-color:transparent}.item .button.choose{width:100%;background:#ffffff14;color:var(--on-dark);border-color:#ffffff24}.item .button.choose:hover{background:#ffffff24}.item .hint{color:var(--on-dark-muted)}.item .restore{background:#ffffff14;color:var(--on-dark);border-color:#ffffff24}.long{margin:0}.center{min-width:0;display:flex;flex-direction:column}.stage-bar{display:flex;align-items:center;justify-content:center;gap:10px;flex-wrap:wrap;padding:8px 12px;background:#fff;border-bottom:1px solid var(--line)}.page-title{display:grid;text-align:center;min-width:0}.page-title strong{font-size:.95rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:40vw}.page-of{color:var(--muted);font-size:.8rem}.page-step{min-width:40px;min-height:36px;padding:0;border:0;background:var(--brand);color:var(--on-brand);font-size:1.4rem;line-height:1}.page-step:hover{background:var(--brand-hover);border:0}.pager{display:flex;gap:6px}.pager button{min-height:36px;padding:0 10px 0 6px;font-size:.85rem}.page-thumb{height:26px;width:auto;border-radius:2px;border:1px solid var(--line);background:#fff}.stage{flex:1;display:grid;place-items:center;padding:24px}.canvas-wrap{position:relative;margin:0 auto;touch-action:none;user-select:none;-webkit-user-select:none}canvas.preview{display:block;width:100%;height:100%;background:#fff;box-shadow:0 2px 14px #10182829}.overlay{position:absolute;inset:0;pointer-events:none;overflow:visible}.hints,.guides{position:absolute;inset:0}.edit-hint{position:absolute;transform-origin:50% 50%;border:1px dashed rgba(1,217,225,.75);border-radius:1px}@media (hover: hover){.canvas-wrap:not(:hover) .edit-hint{border-color:transparent}}.sel{position:absolute;transform-origin:50% 50%;outline:1.5px solid var(--select)}.sel.movable{cursor:move}.sel.adjusting{outline-style:dashed}.sel .h{position:absolute;width:11px;height:11px;margin:-5.5px 0 0 -5.5px;border-radius:50%;background:#fff;border:1px solid #b8b8b8;box-shadow:0 1px 2px #0003;pointer-events:auto;touch-action:none}.sel .h:before{content:"";position:absolute;inset:-10px}.h-tl{left:0;top:0;cursor:nwse-resize}.h-tr{left:100%;top:0;cursor:nesw-resize}.h-br{left:100%;top:100%;cursor:nwse-resize}.h-bl{left:0;top:100%;cursor:nesw-resize}.h-ml{left:0;top:50%;cursor:ew-resize}.h-mr{left:100%;top:50%;cursor:ew-resize}.h-mt{left:50%;top:0;cursor:ns-resize}.h-mb{left:50%;top:100%;cursor:ns-resize}.h-rot{left:50%;top:-28px;cursor:grab;width:16px;height:16px;margin:-8px 0 0 -8px;background:#fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M20 12a8 8 0 11-3-6.2M20 4v5h-5' fill='none' stroke='%23555' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 11px no-repeat}.h[hidden]{display:none}.guide{position:absolute;background:var(--guide)}.guide-x{top:-6px;bottom:-6px;width:1px}.guide-y{left:-6px;right:-6px;height:1px}@media (pointer: coarse){.sel .h{width:24px;height:24px;margin:-12px 0 0 -12px}.sel .h:before{inset:-10px}.h-rot{top:-40px;background-size:15px}}.inline-edit{position:absolute;z-index:2;min-height:64px;box-shadow:0 6px 24px #00000040}.panel{background:#fff;border-left:1px solid var(--line);padding:0 16px 20px;overflow-y:auto;max-height:calc(100vh - 58px);position:sticky;top:0}.panel-tabs{display:flex;gap:18px;margin:0 -16px 12px;padding:0 16px;border-bottom:1px solid var(--line)}.panel-tabs span{padding:12px 0 10px;font-weight:600;font-size:.92rem;color:var(--muted)}.panel-tabs .on{color:var(--brand-ink);box-shadow:inset 0 -2px 0 var(--brand)}.info{display:grid;gap:4px}.info-empty{padding:12px 0}.info-lead{font-weight:600;margin:0 0 6px}.info-head{display:flex;align-items:baseline;gap:8px;margin-bottom:4px}.info-kind{font-size:.72rem;text-transform:uppercase;letter-spacing:.08em;color:var(--muted)}.info-name{font-size:1rem;overflow-wrap:anywhere}.tool{display:grid;gap:8px;padding:12px 0;border-top:1px solid var(--line)}.tool:first-of-type{border-top:0}.prop-label{margin:0;font-size:.75rem;text-transform:uppercase;letter-spacing:.07em;color:var(--muted);font-weight:600}.inline{display:flex;gap:6px;align-items:center;flex-wrap:wrap}.inline input[type=range]{flex:1;min-width:80px}.step,.toggle{min-width:44px;padding:0 12px}.toggle.bold{font-weight:800}.toggle.italic{font-style:italic;font-family:Georgia,serif}.seg{gap:4px}.swatches{display:flex;gap:8px;flex-wrap:wrap;align-items:center}.swatch{min-height:30px;width:30px;padding:0;border-radius:50%;border:2px solid var(--line)}.swatch[aria-pressed=true]{border-color:#fff;box-shadow:0 0 0 2px var(--brand-ink)}.any-colour{margin:0}input[type=color]{width:36px;height:32px;padding:2px;border:1px solid var(--line);border-radius:6px;background:#fff;cursor:pointer}.range{display:grid;gap:2px}.range label{font-weight:500;font-size:.85rem;color:var(--muted)}input[type=range]{width:100%;min-height:30px;accent-color:var(--brand)}.photo-row{display:flex;align-items:center;gap:10px}.photo-row .thumb{flex:none;width:56px;height:56px;border-radius:6px;border:1px solid var(--line);background:repeating-conic-gradient(#eee 0 25%,#fff 0 50%) 0 0 / 12px 12px}.photo-row .choose{flex:1}.row{display:flex;gap:8px;flex-wrap:wrap;align-items:center}.actions-row button{flex:1}.file-inputs{position:absolute;width:1px;height:1px;overflow:hidden}.tools,.sheet{display:none}@media (max-width: 1100px) and (min-width: 761px){.workspace{grid-template-columns:64px 220px minmax(0,1fr) 260px}.rail button{min-height:58px;font-size:.7rem}.actionbar .act-label{display:none}}@media (max-width: 760px){.bar{flex-wrap:wrap;gap:0;padding:0;min-height:0}.bar-title{padding:10px 14px 8px;flex-basis:100%}.actionbar{flex-basis:100%;justify-content:space-around;gap:0;padding:4px 4px 2px;background:#fff;border-bottom:1px solid var(--line)}.act{flex-direction:column;gap:2px;min-height:52px;min-width:64px;padding:2px 6px;background:none;color:var(--ink);font-size:.66rem;text-transform:uppercase;letter-spacing:.03em}.act:hover,.act.download-toggle{background:none}.act svg{width:22px;height:22px}.download-wrap{position:static}.download-menu{position:fixed;left:12px;right:12px;top:auto;bottom:calc(80px + env(safe-area-inset-bottom));width:auto}.out{top:auto;bottom:calc(84px + env(safe-area-inset-bottom))}.workspace{display:block;min-height:0}.rail,.drawer,.panel{display:none}.stage-bar{position:sticky;top:0;z-index:3;gap:8px;padding:6px 8px}.stage-bar .pager{display:none}.page-step{min-width:46px;min-height:40px;border-radius:6px}.page-title strong{max-width:60vw}.stage{padding:10px 8px calc(96px + env(safe-area-inset-bottom));place-items:start center}.tools{display:flex;position:fixed;z-index:20;left:0;right:0;bottom:0;overflow-x:auto;gap:0;padding:4px 4px calc(4px + env(safe-area-inset-bottom));background:#fff;border-top:1px solid var(--line);box-shadow:0 -4px 16px #1018280f}.tool-btn{flex:1 0 auto;flex-direction:column;gap:2px;min-width:66px;min-height:56px;padding:4px 6px;border:0;background:none;color:var(--ink);font-size:.72rem;font-weight:600;border-radius:6px}.tool-btn[aria-pressed=true]{color:var(--brand-ink);box-shadow:none;background:var(--brand-soft)}.sheet{display:block;position:fixed;z-index:15;left:0;right:0;bottom:calc(64px + env(safe-area-inset-bottom));max-height:36vh;overflow-y:auto;background:#fff;border-radius:14px 14px 0 0;box-shadow:0 -10px 30px #10182829;padding:0 14px 14px}.sheet[hidden]{display:none}.sheet-head{position:sticky;top:0;z-index:1;display:flex;align-items:center;gap:8px;margin:0 -14px 6px;padding:8px 10px;background:#fff;border-bottom:1px solid var(--line)}.sheet-title{flex:1;text-align:center;font-size:.95rem}.sheet-head button{min-height:38px;padding:0 10px}.sheet-head .prev,.sheet-head .next{background:var(--brand);border-color:var(--brand);color:var(--on-brand)}.sheet .item{background:#f6f8fa}.sheet .item-name{color:var(--ink)}.sheet .list-title{color:var(--muted)}.sheet .item .button.choose,.sheet .item .restore{background:#fff;color:var(--ink);border-color:var(--line)}.sheet .item .hint{color:var(--muted)}.sheet .item input,.sheet .item textarea{border-color:var(--line)}.sheet .info-head{display:none}.sheet .tool{border-top:0;padding-top:6px}}.engine-stage{flex:1;display:flex;justify-content:center;align-items:flex-start;padding:24px;min-width:0;overflow:hidden}.engine-stage .canvas-container{box-shadow:0 2px 14px #0000002e;background:#fff}.player{position:fixed;inset:0;z-index:60;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;padding:16px;background:#000000d1}.player-screen .canvas-container{box-shadow:0 4px 24px #00000080;background:#fff}.player-bar{display:flex;align-items:center;gap:16px;color:#fff}.player-bar .clock{font-variant-numeric:tabular-nums;min-width:96px}.sound-now .sound-name{margin:4px 0 12px;overflow-wrap:anywhere}.drawer .add .button+.button,.sheet .add .button+.button{margin-top:8px}.add-list{display:grid;gap:14px;margin-bottom:18px}.add-list .add{display:grid;gap:8px}.add-list .button{width:100%}.shape-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:6px}.shape-grid .shape{aspect-ratio:1;min-height:0;padding:9px;border:0;border-radius:8px;background:var(--card);cursor:pointer}.shape-grid .shape:hover{background:#3c434c}.shape-grid svg{width:100%;height:100%;fill:#cdd5df}.item-pick{display:block;width:100%;text-align:left;padding:10px 12px;border:1px solid transparent;border-radius:8px;background:var(--card);color:var(--on-dark);cursor:pointer;font:inherit}.item-pick:hover{border-color:var(--select)}.info .kind{font-size:.72rem;text-transform:uppercase;letter-spacing:.08em;color:var(--muted)}.info .row{display:flex;gap:6px;flex-wrap:wrap}.info .pick{width:34px;height:30px;padding:0;border:0;background:none}.info .hint{margin:10px 0 0;font-size:.8rem;color:var(--muted)}.info .edit-text{width:100%;font:inherit;font-size:16px;padding:8px 10px;border:1px solid var(--line);border-radius:8px;resize:vertical}.info select.font,.info input.size{width:100%}.stage-bar.single .prev-page,.stage-bar.single .next-page,.stage-bar.single .pager{visibility:hidden}@media (max-width: 760px){.engine-stage{padding:10px 8px calc(96px + env(safe-area-inset-bottom))}.sheet .add-list,.sheet .item-list{margin:0}.sheet .shape-grid{grid-template-columns:repeat(6,1fr)}.sheet .shape-grid .shape{background:#eef1f4;padding:7px}.sheet .shape-grid svg{fill:#56606c}.sheet .item-pick{background:#f6f8fa;color:var(--ink)}}.tab-pane{display:grid;gap:14px}.tab-title{margin:2px 2px 0;font-size:1rem;color:var(--on-dark)}.tab-pane .item-list{gap:6px}.item-pick{display:flex;align-items:center;gap:10px}.item-pick .thumb{width:40px;height:40px;object-fit:cover;border-radius:6px;flex:none;background:#fff}.item-pick .item-label{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.item-pick .item-page{flex:none;font-size:.72rem;color:var(--on-dark-muted)}.item-pick.current{border-color:var(--select);box-shadow:0 0 0 1px var(--select)}.tab-pane .empty{margin:0 2px;font-size:.85rem;color:var(--on-dark-muted)}.tab-pane .add{display:grid;gap:8px}.tab-pane .add .button{width:100%}#share-app .rail button.on,#share-app .rail button[aria-selected=true]{color:#fff;background:var(--drawer);box-shadow:inset 3px 0 0 var(--brand)}#share-app.engine .tools .tool-btn.on{color:var(--brand-ink)}@media (max-width: 760px){.sheet .tab-title{display:none}.sheet .item-pick .item-page,.sheet .tab-pane .empty{color:var(--muted)}}
