@font-face{font-family:DM;src:url('/assets/fonts/dm-sans.ttf') format('truetype');font-weight:100 1000;font-display:swap}
@font-face{font-family:Space;src:url('/assets/fonts/space-grotesk.ttf') format('truetype');font-weight:300 700;font-display:swap}
:root{color-scheme:dark;--bg:#151b18;--surface:#202a22;--raised:#2b372a;--ink:#f4f4e8;--muted:#b0bbae;--line:#3e4d3f;--accent:#d5f99a;--dark:#233326;--coral:#f7b297;--gold:#e4c77a;--ease-out:cubic-bezier(.23,1,.32,1);--ease-drawer:cubic-bezier(.32,.72,0,1);font:16px DM,system-ui,sans-serif;background:var(--bg);color:var(--ink);font-synthesis:none}
*{box-sizing:border-box}html,body{margin:0;width:100%;height:100%;overflow:hidden;overscroll-behavior:none}html{-webkit-tap-highlight-color:transparent;scrollbar-color:#6c8061 var(--surface)}body{min-width:280px}::selection{background:var(--accent);color:var(--dark)}button,a,input,select{font:inherit;touch-action:manipulation}button{cursor:pointer;user-select:none;color:inherit}button,a{transition:background .15s ease,transform .15s var(--ease-out)}button:active:not(:disabled),a:active{transform:scale(.98)}button:disabled{opacity:.45;cursor:default}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid var(--accent);outline-offset:3px}button svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0}svg{display:block}h1,h2,h3,p{margin:0}h1,h2,h3,.wordmark{font-family:Space,DM,sans-serif;letter-spacing:-.035em;font-weight:500}p{line-height:1.5}a{color:inherit}button{border:0}h1{font-size:clamp(28px,5vw,42px);line-height:1.12}h2{font-size:27px;line-height:1.15}h3{font-size:22px}input,select{font-size:16px;accent-color:var(--accent)}[hidden]{display:none!important}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.toy{height:100svh;height:100dvh;width:min(100%,1040px);margin:auto;display:flex;flex-direction:column;padding:max(8px,env(safe-area-inset-top)) max(20px,env(safe-area-inset-right)) max(8px,env(safe-area-inset-bottom)) max(20px,env(safe-area-inset-left));overflow:hidden}.topbar{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:60px;border-bottom:1px solid var(--line);flex-shrink:0}.wordmark{font-weight:700;display:flex;align-items:center;text-decoration:none;font-size:30px;white-space:nowrap}.wordmark span{color:var(--accent)}.wordmark>svg{width:26px;height:26px;stroke:var(--accent);fill:none;stroke-width:1.8;margin-left:9px}.top-actions{display:flex;align-items:center;gap:6px}.icon-button{width:44px;height:44px;border-radius:50%;display:grid;place-items:center;background:none;flex-shrink:0}.collection-button{display:flex;align-items:center;gap:8px;min-height:44px;padding:6px 9px;background:none;border-radius:9px;font-size:13px}.collection-button svg{width:19px}.play-space{flex:1;min-height:0;display:flex;flex-direction:column;width:min(100%,620px);margin:auto}.creature-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-shrink:0;padding-top:22px}.creature-heading>div{min-width:0}.creature-heading h1{overflow-wrap:anywhere}.creature-heading p{color:var(--muted);font-size:13px;margin-top:6px}.generation-button{background:none;text-align:right;flex-shrink:0;display:flex;flex-direction:column;gap:5px;padding:7px 0 7px 10px;min-height:56px}.generation-button>span:first-child{font:500 21px Space,sans-serif;font-variant-numeric:tabular-nums}.generation-button>span:first-child>span{color:var(--muted);font-size:14px}.generation-button>span:last-child{display:flex;align-items:center;gap:5px;font-size:12px;color:var(--muted)}.generation-button svg{width:14px;height:14px}.snapshot-notice{font-size:12px;background:#2e3b2a;color:#dfeacb;border-radius:8px;padding:9px 12px;margin-top:12px;flex-shrink:0;line-height:1.5}.stage{position:relative;flex:1;min-height:0;container-type:size;display:grid;place-items:center;isolation:isolate}.stage-ground{position:absolute;inset:0;display:grid;place-items:center;pointer-events:none;z-index:-2}.stage-ground:before{content:'';width:min(84cqw,84cqh,420px);aspect-ratio:1;border-radius:50%;background:#233023}.stage-orbit{position:absolute;width:min(91cqw,91cqh,456px);aspect-ratio:1;border:1px dashed #41523b;border-radius:50%;z-index:-1}.creature-art,.egg-wrap{width:min(118cqw,118cqh,650px);height:min(118cqw,118cqh,650px);position:absolute;display:grid;place-items:center;transform-origin:50% 70%}.creature-art>svg,.egg-wrap>svg{width:100%;height:100%;overflow:visible}.creature-art.idle{animation:breathe 4s ease-in-out infinite}.egg-wrap{z-index:3}.motion-button{position:absolute;right:0;bottom:4px;color:var(--muted)}.skip-button{position:absolute;bottom:0;left:50%;transform:translateX(-50%);z-index:5;background:var(--bg)!important;white-space:nowrap;border:1px solid var(--line)!important}.skip-button:active:not(:disabled){transform:translateX(-50%) scale(.98)}.burst{position:absolute;inset:0;pointer-events:none;z-index:4}.burst i{position:absolute;width:6px;height:6px;background:var(--accent);border-radius:2px;left:50%;top:50%}.play-bottom{flex-shrink:0;padding:12px 0 0}.turn-message{min-height:64px;text-align:center;padding:0 5px 12px}.turn-message h2{font-size:23px}.turn-message p{font-size:13px;color:var(--muted);margin-top:6px;max-width:45ch;margin-inline:auto}.primary-button,.secondary-button{width:100%;display:flex;align-items:center;justify-content:center;gap:12px;min-height:54px;border-radius:12px;padding:14px 18px;font-size:16px;font-weight:600}.primary-button{background:var(--accent);color:var(--dark)}.primary-button svg{margin-left:auto}.primary-button>span:first-child{margin-right:auto}.secondary-button{background:var(--raised);color:var(--ink);border:1px solid var(--line);font-size:14px}.secondary-line{min-height:40px;display:flex;align-items:center;justify-content:center;gap:8px}.secondary-line>span{font-size:12px;color:var(--muted)}.text-button{min-height:44px;padding:8px 10px;background:none;color:var(--muted);font-size:13px;text-underline-offset:4px;display:inline-flex;align-items:center;justify-content:center;text-align:center;gap:8px}.small-button{min-height:44px;min-width:44px;padding:8px 12px;border-radius:8px;background:none;font-size:13px;display:inline-flex;align-items:center;justify-content:center;gap:8px}.error-message{padding:10px 12px;border-radius:8px;background:#51382d;color:#ffe2cf;font-size:13px;line-height:1.5;margin-bottom:10px}.error-message button{background:none;min-height:44px;padding:7px;color:var(--ink);text-decoration:underline}.complete .stage-orbit{border-color:var(--gold)}.complete .stage-ground:before{background:#303327}.complete .creature-heading h1{color:#f4e7bf}
.sheet{position:fixed;inset:auto 0 0;margin:0 auto;width:min(100%,540px);max-height:90svh;max-height:90dvh;border:0;border-top:1px solid #54624a;border-radius:22px 22px 0 0;padding:0;color:var(--ink);background:var(--surface);overflow:hidden;box-shadow:none}.sheet[open]{display:flex;flex-direction:column}.sheet::backdrop{background:#081009a6}.sheet:focus{outline:none}.sheet-header{padding:23px 20px 14px;display:flex;align-items:center;justify-content:space-between;gap:12px;flex-shrink:0}.sheet-header h2{font-size:27px}.sheet-header h2 span{color:var(--accent)}.sheet-header p{font-size:13px;color:var(--muted);margin-top:7px}.sheet-body{overflow:auto;overscroll-behavior:contain;padding:0 20px max(20px,env(safe-area-inset-bottom));min-height:0}.sheet-note{font-size:12px;color:var(--muted);margin:10px 0 0;line-height:1.6}.category-line,.share-mode{display:flex;align-items:center;gap:12px;margin:5px 0 12px}.category-line label,.share-mode label{font-size:13px;color:var(--muted);white-space:nowrap}select{flex:1;min-width:0;background:var(--raised);color:var(--ink);border:1px solid #607055;border-radius:9px;padding:11px;min-height:46px}.mutation-tools{display:flex;align-items:center;justify-content:space-between;gap:7px}.mutation-tools p{font-size:12px;color:var(--muted)}.mutation-tools .small-button{padding-right:0;font-size:12px}.mutation-tools svg{width:16px}.choices{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-top:7px}.choice{background:#2b372a;position:relative;border:1px solid #4a5946;border-radius:12px;min-width:0;padding:0 8px 12px;overflow:hidden;display:flex;flex-direction:column;align-items:center}.choice .preview{height:106px;width:100%;display:grid;place-items:center;overflow:hidden}.choice .preview svg{width:145px;height:145px;flex-shrink:0}.choice strong{font-size:13px;font-weight:500;line-height:1.4}.choice[aria-pressed=true]{border-color:var(--accent);background:#3a4a30}.choice[aria-pressed=true]:after{content:'✓';position:absolute;top:8px;right:10px;color:var(--accent)}.option-pager{display:flex;justify-content:space-between;align-items:center;gap:7px;color:var(--muted);font-size:12px;margin-top:3px}.option-pager .small-button{padding:8px 0}.full-sheet{height:96svh;height:96dvh;max-height:96dvh}.collection-controls{flex-shrink:0;padding:0 20px 12px}.tabs{display:flex;gap:8px;border-bottom:1px solid var(--line);padding-bottom:5px}.tabs button{flex:1;padding:12px 6px;background:none;font-size:14px;color:var(--muted);min-height:46px;border-radius:7px}.tabs button[aria-selected=true]{color:var(--accent);background:#2b3828}.collection-controls>.small-button{margin-top:8px;color:var(--accent);padding-left:0}.collection-list{flex:1;padding-top:0}.collection-entry{border-bottom:1px solid var(--line);padding:16px 0;display:grid;grid-template-columns:100px minmax(0,1fr);gap:12px}.collection-thumb{width:100px;height:108px;border-radius:12px;overflow:hidden;background:#2a3828;display:grid;place-items:center}.collection-thumb svg{width:135px;height:135px}.collection-info{min-width:0}.collection-info h3{font-size:24px}.collection-info p{font-size:12px;color:var(--muted);margin-top:5px;line-height:1.5}.collection-info .new-changes{color:var(--accent);font-weight:500}.collection-info .small-button{padding-left:0;color:var(--ink);font-size:13px;text-align:left;justify-content:flex-start}.empty-state{padding:45px 10px;text-align:center;max-width:34ch;margin:auto}.empty-state h3{font-size:26px}.empty-state p{color:var(--muted);font-size:14px;margin-top:14px}.sheet-footer{display:flex;justify-content:space-between;align-items:center;gap:10px;flex-shrink:0;border-top:1px solid var(--line);padding:8px 20px max(8px,env(safe-area-inset-bottom));font-size:12px;color:var(--muted)}.sheet-footer p{max-width:24ch}.sheet-footer .text-button{font-size:12px}.history-feature{flex-shrink:0;padding:0 20px 12px;text-align:center}.history-feature>div:first-child{height:190px;display:grid;place-items:center;background:#263324;border-radius:12px;overflow:hidden}.history-feature svg{width:245px;height:245px}.history-feature>p{font-size:13px;margin-top:12px;min-height:40px;line-height:1.5}.history-feature time{font-size:12px;color:var(--muted);display:block;margin-top:5px}.history-playback{display:flex;align-items:center;gap:12px;margin-top:6px}.history-playback .small-button{white-space:nowrap;padding-left:0}.history-playback input{min-height:44px;width:100%;min-width:0}.history-gallery{flex:1;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;align-content:start;padding-top:6px}.history-item{padding:0 0 10px;background:#2b3829;border:1px solid transparent;border-radius:10px;min-width:0;overflow:hidden}.history-item[aria-pressed=true]{border-color:var(--accent)}.history-item .history-thumb{height:88px;display:grid;place-items:center;overflow:hidden}.history-thumb svg{width:120px;height:120px}.history-item span{display:block;font-size:12px;color:var(--muted)}.history-item strong{display:block;font-size:12px;font-weight:500;padding:6px 7px 0;line-height:1.4}.history-item .you-mark{color:var(--accent);margin-top:5px}.share-preview{display:block;width:100%;height:auto;border-radius:12px;margin:13px 0;background:var(--bg)}#shareURL{width:100%;color:var(--ink);background:var(--bg);border:1px solid var(--line);border-radius:8px;padding:12px;min-height:46px}.share-notice{font-size:12px;color:var(--muted);margin-top:12px}.share-actions{flex-shrink:0;padding:12px 20px max(20px,env(safe-area-inset-bottom))}.share-actions>div{display:flex;gap:10px;margin-top:10px}.share-actions>div>*{width:50%}.share-actions .primary-button svg{margin-left:0}.share-mode select{font-size:14px}.share-mode label{font-size:13px}.check-row{display:flex;align-items:center;justify-content:space-between;gap:16px;min-height:64px;border-bottom:1px solid var(--line);padding:12px 0}.check-row small{display:block;font-size:12px;color:var(--muted);line-height:1.5;margin-top:5px}.check-row input{width:22px;height:22px;flex-shrink:0}.settings-body>p{margin:18px 0;color:var(--muted);font-size:14px}.settings-body>.small-note{font-size:12px;line-height:1.65}.settings-body>a{display:flex;margin-top:10px}.toast{position:fixed;bottom:max(22px,env(safe-area-inset-bottom));left:50%;transform:translate(-50%,8px);padding:13px 18px;opacity:0;max-width:calc(100% - 32px);width:max-content;background:var(--ink);color:var(--dark);border-radius:10px;z-index:15;pointer-events:none;font-size:13px;font-weight:500;line-height:1.5;transition:opacity .16s,transform .2s var(--ease-out);box-shadow:0 8px 24px #0003}.toast.show{opacity:1;transform:translate(-50%,0)}
@keyframes breathe{0%,100%{transform:translateY(1px) rotate(-1deg)}50%{transform:translateY(-4px) rotate(1deg)}}
@media(hover:hover) and (pointer:fine){button:hover:not(:disabled){background-color:#344530}.primary-button:hover:not(:disabled){background-color:#e7ffbf}.choice:hover:not(:disabled){transform:translateY(-2px);border-color:#a4bb8a}.text-button:hover{color:var(--accent);background:transparent!important}.wordmark:hover{transform:translateX(2px)}}
@media(min-width:768px) and (min-height:600px){.toy{padding:16px 40px}.topbar{min-height:76px}.wordmark{font-size:36px}.collection-button{font-size:14px}.play-space{width:min(100%,640px)}.creature-heading{padding-top:28px}.creature-heading p{font-size:14px}.turn-message{min-height:76px}.turn-message h2{font-size:27px}.turn-message p{font-size:14px}.play-bottom{width:min(100%,460px);margin-inline:auto}.sheet{inset:50% auto auto 50%;transform:translate(-50%,-50%);border-radius:20px;max-height:90dvh;border:1px solid var(--line)}.full-sheet{height:min(900px,90dvh)}.mutation-sheet{max-height:87dvh}.choice .preview{height:126px}}
@media(max-width:374px){.toy{padding-inline:16px}.wordmark{font-size:28px}.wordmark>svg{display:none}.top-actions{gap:1px}.collection-button{font-size:12px;gap:6px;padding-inline:7px}.collection-button svg{width:17px}.creature-heading h1{font-size:29px}.creature-heading p{font-size:12px}.turn-message h2{font-size:22px}.sheet-header h2{font-size:25px}.share-mode{gap:8px}.sheet-header,.sheet-body,.share-actions{padding-inline:16px}.generation-button>span:last-child{font-size:12px}}
@media(max-height:650px) and (orientation:portrait){.topbar{min-height:52px}.creature-heading{padding-top:14px}.creature-heading h1{font-size:30px}.creature-heading p{margin-top:4px;font-size:12px}.turn-message{min-height:58px;padding-bottom:8px}.turn-message h2{font-size:21px}.turn-message p{font-size:12px}.primary-button{min-height:50px}.secondary-line{min-height:32px}.play-bottom{padding-top:7px}.snapshot-notice{padding:6px 9px;font-size:12px;margin-top:7px}.sheet-header{padding-top:15px;padding-bottom:10px}.history-feature>div:first-child{height:125px}.history-feature svg{width:180px;height:180px}.choice .preview{height:90px}.sheet-note{font-size:12px}.history-feature>p{font-size:12px;min-height:35px}}
@media(max-height:480px) and (orientation:landscape){.toy{padding-top:4px;padding-bottom:4px}.topbar{min-height:48px}.wordmark{font-size:26px}.play-space{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);grid-template-rows:auto minmax(0,1fr);column-gap:18px;width:min(100%,900px)}.creature-heading{grid-column:1;grid-row:1;padding-top:14px;align-items:flex-start}.creature-heading h1{font-size:28px}.creature-heading p{font-size:12px}.generation-button>span:last-child{display:none}.stage{grid-column:2;grid-row:1 / span 2;height:100%;width:100%}.stage-ground:before{width:min(82cqw,82cqh)}.stage-orbit{width:min(90cqw,90cqh)}.play-bottom{grid-column:1;grid-row:2;align-self:end;padding-top:7px}.turn-message{min-height:55px;padding-bottom:8px}.turn-message h2{font-size:20px}.turn-message p{font-size:12px}.secondary-line{min-height:30px}.primary-button{min-height:48px}.snapshot-notice{position:absolute;top:70px;right:24px;max-width:36%;font-size:12px;z-index:4;padding:6px}.sheet{width:min(100%,650px);max-height:97dvh}.sheet-header{padding-top:12px;padding-bottom:8px}.sheet-header h2{font-size:23px}.sheet-header p{font-size:12px}.choices{grid-template-columns:repeat(4,minmax(0,1fr))}.choice .preview{height:95px}.category-line{margin:0}.mutation-tools{min-height:44px}.sheet-note{display:none}.history-feature{display:none}.full-sheet{height:97dvh}.history-gallery{grid-template-columns:repeat(5,minmax(0,1fr))}.collection-entry{grid-template-columns:80px minmax(0,1fr)}.share-preview{width:240px;float:left;margin:0 14px 8px 0}.share-actions{padding-top:6px;padding-bottom:10px}.share-mode{margin-bottom:10px}.share-notice{font-size:12px}.share-actions>div{margin-top:6px}.settings-body .check-row{min-height:50px}.settings-body>p{font-size:13px}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}
.choice .preview,.collection-thumb,.history-thumb{position:relative}.choice .preview svg,.collection-thumb svg,.history-thumb svg{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%)}.final-hatch .stage-ground:before{background:#353929}.final-hatch .stage-orbit{border-color:var(--gold)}
.primary-button{font-size:1rem}.collection-button{font-size:.8125rem}.creature-heading h1{font-size:clamp(1.75rem,5vw,2.625rem)}.turn-message h2{font-size:1.4375rem}.turn-message p{font-size:.8125rem}.sheet-header h2{font-size:1.6875rem}.sheet-header p,.sheet-note{font-size:.8125rem}
.collection-thumb svg{width:124px;height:124px}.history-feature>div:first-child{position:relative}.history-feature>div:first-child svg{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%)}
@media(max-height:480px) and (orientation:landscape){.history-feature{display:grid;grid-template-columns:100px minmax(0,1fr);gap:0 15px;text-align:left}.history-feature>div:first-child{grid-row:1 / span 2;height:100px}.history-feature>div:first-child svg{width:135px;height:135px}.history-feature>p{margin-top:4px;min-height:0}.history-playback{margin-top:0}.history-gallery{min-height:80px}}
