:root{color-scheme:light;--ink:#333b20;--paper:#f7f0e1;--coral:#e58a72;--lcd:#b4bf74;--line:#d9cbb1;font-family:system-ui,-apple-system,sans-serif;color:var(--ink);background:var(--paper)}*{box-sizing:border-box}body{margin:0;background:var(--paper);min-height:100dvh;display:flex;flex-direction:column}button,input,select{font:inherit;color:inherit}button,a,select{touch-action:manipulation}button{cursor:pointer;background:#fcf4e1;border:1px solid #b6a889;border-radius:14px;padding:12px 16px;min-height:44px;box-shadow:0 3px 0 #b8a68630}button:hover:not(:disabled){background:#fff9ec}button:active:not(:disabled){transform:translateY(2px);box-shadow:none}button:disabled{opacity:.48;cursor:default}button:focus-visible,a:focus-visible,select:focus-visible,input:focus-visible,summary:focus-visible{outline:3px solid #47734d;outline-offset:4px}a{color:inherit;text-decoration:none}main{flex:1;width:100%;margin:0 auto;padding:18px max(24px,env(safe-area-inset-right)) 10px max(24px,env(safe-area-inset-left));display:grid;grid-template-columns:max-content minmax(240px,300px);gap:36px;align-items:center;justify-content:center}.eyebrow{font-size:11px;letter-spacing:2px;line-height:1.6;font-weight:700;color:#656848}h1{font-family:inherit;letter-spacing:-1px;font-weight:750;font-size:clamp(28px,3vw,38px);line-height:1.1;margin:20px 0 8px;overflow-wrap:anywhere}h2{line-height:1.15}.age{font-family:ui-monospace,monospace;color:#656848;margin:0 0 24px}.meters{border-top:1px solid var(--line);border-bottom:1px solid var(--line);padding:14px 0}.meter-row{display:grid;grid-template-columns:1fr auto;gap:8px;padding:8px 0;font-size:14px}.meter-track{grid-column:1/-1;display:flex;gap:4px}.meter-track i{display:block;flex:1;height:8px;border-radius:2px;background:#e1d8c6}.meter-track i.on{background:#718a65}.meter-row.low .meter-track i.on{background:#bc8950}.meter-row b{font:13px ui-monospace,monospace}.memory{display:flex;gap:14px;padding:18px 0;margin-top:15px;font-size:13px}.memory>span{font-size:34px;color:#ba6c50}.memory p{line-height:1.5;margin:5px 0}.gentle{font-size:12px;line-height:1.7;color:#66694f}.device-area{position:relative;padding-top:22px;width:max-content;max-width:100%;justify-self:center}.loop{position:absolute;left:calc(50% - 26px);top:0;width:52px;height:50px;border:13px solid #d97660;border-radius:50%;box-shadow:inset 0 3px 4px #61372550,0 -2px 3px #fff5}.device{position:relative;border-radius:43% 43% 25% 25% / 23% 23% 20% 20%;padding:42px 36px 22px;background:radial-gradient(ellipse at 25% 10%,#ffc1a6aa,transparent 55%),linear-gradient(135deg,#ee9a80,#d87560 80%);border:2px solid #d57a64;box-shadow:inset 4px 5px 5px #ffe2be90,inset -4px -7px 5px #8e493e50,0 18px 30px #8a5b3733,0 5px 0 #b55e4b;isolation:isolate}.device:before{content:'';position:absolute;inset:0;border-radius:inherit;background:radial-gradient(#fff5 .65px,transparent .9px);background-size:4px 4px;opacity:.28;pointer-events:none;z-index:-1}.shell-top{display:flex;align-items:center;justify-content:space-between;margin:5px 16px 18px;font-size:9px;letter-spacing:2px;color:#6a3b2e}.flower{font-size:28px;color:#ffe9cf}.light{width:9px;height:9px;border-radius:50%;background:#a8bf70;box-shadow:0 0 0 3px #9a574f70}.bezel{background:#54523c;padding:12px;border-radius:26% 26% 15% 15% / 14% 14% 9% 9%;box-shadow:0 2px 0 #f2b294,inset 0 5px 7px #272a1f,0 0 0 3px #a15e47}.lcd{position:relative;overflow:hidden;background:var(--lcd);border-radius:20% 20% 11% 11% / 11% 11% 8% 8%;box-shadow:inset 0 0 16px #4e602980}.lcd:after{content:'';position:absolute;inset:0;background:repeating-linear-gradient(0deg,#25331806 0 1px,transparent 1px 3px);pointer-events:none}.lcd-top{position:absolute;top:23px;left:30px;right:30px;display:flex;justify-content:space-between;gap:10px;font:11px ui-monospace,monospace;z-index:2;pointer-events:none}.lcd-top span:first-child{max-width:65%;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}canvas{display:block;width:100%;height:auto;image-rendering:pixelated;touch-action:pan-y}.playing canvas{touch-action:none}.screen-overlay{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:flex-end;padding:14px;gap:7px;background:linear-gradient(transparent 30%,#b4bf7499);z-index:3}.screen-overlay p{font:12px ui-monospace,monospace;text-align:center;margin:0;max-width:80%}.screen-overlay button{font:700 12px ui-monospace,monospace;border:2px solid #3a461e;background:#d4db9b;min-height:44px;padding:8px 16px;border-radius:6px}.screen-overlay .quiet{background:transparent;border:0;min-height:44px;padding:4px;box-shadow:none}.actions{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-top:22px}.actions button{padding:10px 3px 9px;border:2px solid #9b6248;border-radius:22px;background:linear-gradient(#fff3d8,#e7d7b5);box-shadow:inset 2px 3px 3px #fff8,0 4px 0 #96523f,0 5px 7px #713b3c44;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;font-size:12px;min-height:74px}.icon{width:30px;height:30px;image-rendering:pixelated}.shell-bottom{display:flex;align-items:center;justify-content:space-between;margin:18px 15px 0;font-size:9px;color:#713b30;letter-spacing:1px}.shell-bottom>span:last-child{font-size:20px;color:#f7dcc0}.message{min-height:44px;text-align:center;font-size:14px;line-height:1.5;margin:20px 10px 0}.game-hud{position:absolute;top:34px;left:10px;right:10px;display:flex;justify-content:space-between;align-items:center;z-index:4;font:11px ui-monospace,monospace}.game-hud button{font-size:10px;padding:5px 7px;min-height:44px;border-radius:5px;background:#d4db9b}.game-controls{display:flex;align-items:center;gap:10px;margin-top:16px}.game-controls button{font-size:21px;padding:7px 15px}.game-controls span{font-size:11px;text-align:center;flex:1}.playing .actions{display:none}footer{margin:18px 0 0;padding:4px 0;border-top:1px solid var(--line);display:flex;justify-content:center;gap:12px;font-size:12px;color:#66634e;line-height:1.6}footer a{display:inline-block;padding:13px 2px}footer p{margin:4px 0}footer details{max-width:420px}summary{cursor:pointer;padding:13px 0;font-weight:700}details button{font-size:12px;margin:5px 5px 5px 0}dialog{border:1px solid #cdbd9b;border-radius:25px;padding:30px;background:#fff8e9;color:var(--ink);max-width:min(420px,calc(100vw - 36px));box-shadow:0 20px 70px #2c312344}dialog::backdrop{background:#24301c88;backdrop-filter:blur(5px)}dialog form{display:flex;flex-direction:column;gap:16px}dialog input{width:100%;padding:14px;background:white;border:1px solid #b6a889;border-radius:10px}dialog h2{margin:0 0 12px}.dialog-actions{display:flex;gap:10px;flex-wrap:wrap}[hidden]{display:none!important}.message.error{color:#843728;font-weight:700}.device.locked{filter:saturate(.5)}@media(max-width:800px){main{display:flex;flex-direction:column;gap:4px;max-width:520px;padding:6px max(10px,env(safe-area-inset-right)) calc(6px + env(safe-area-inset-bottom,0px)) max(10px,env(safe-area-inset-left))}.pet-info{width:100%;max-width:500px}.eyebrow{margin:0;font-size:9px}h1{margin:10px 0 3px;font-size:30px}.age{margin-bottom:12px;font-size:12px}.meters{display:grid;grid-template-columns:1fr 1fr;gap:0 18px;padding:5px 0}.meter-row{font-size:12px;padding:6px 0}.meter-row b{font-size:11px}.meter-track{gap:3px}.meter-track i{height:6px}.memory{margin:8px 0 0;padding:0;font-size:11px;align-items:center}.memory>span{font-size:25px}.memory p{margin:2px 0}.gentle{display:none}.device-area{width:100%;max-width:500px;margin-top:12px;padding-top:16px}.loop{width:40px;height:38px;left:calc(50% - 20px);border-width:10px}.device{padding:22px 18px 15px}.shell-top{margin:6px 12px 11px;font-size:7px;letter-spacing:1px}.flower{font-size:21px}.bezel{padding:8px}.actions{gap:7px;margin-top:15px}.actions button{min-height:63px;font-size:11px;border-radius:16px}.icon{width:25px;height:25px}.shell-bottom{margin:12px 9px 0;font-size:7px}.message{margin-top:12px;font-size:12px;min-height:34px}.lcd-top{font-size:9px;top:16px;left:22px;right:22px}}@media(max-width:360px){.device{padding:20px 12px 12px}.actions{gap:5px}.screen-overlay p{font-size:10px}.lcd-top{font-size:8px}}@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important}}

@media(max-width:800px){.pet-info .memory{display:flex}.device-area{margin-top:8px}.age{margin-bottom:8px}.shell-top{letter-spacing:.5px}.screen-overlay p{max-width:100%}}

dialog{max-height:90dvh;overflow:auto}#activity-picker,#activity-dialog{width:min(480px,calc(100% - 24px))}.activity-choices{display:grid;gap:10px;margin:20px 0}.activity-choices button{display:grid;grid-template-columns:38px 1fr;text-align:left;gap:4px 10px}.activity-choices span{grid-row:1/3;font-size:28px}.activity-choices small{font-size:12px;line-height:1.5}.activity-board{display:grid;gap:10px;margin:18px 0}.activity-board.pairs{grid-template-columns:repeat(4,1fr)}.activity-board.melody{grid-template-columns:repeat(2,1fr)}.activity-board button{aspect-ratio:1;font-size:28px;padding:8px;border:2px solid #7a8056;box-shadow:0 4px 0 #bbb397}.activity-board button.revealed,.activity-board button.lit{background:#bfce87;opacity:1;color:#293b1b}.activity-board button.matched{border-color:#56804a;background:#d4e0b0;opacity:1}.activity-board button.lit{outline:4px solid #47734d;outline-offset:-7px}.activity-bottom{display:flex;gap:8px;flex-wrap:wrap}#activity-status{min-height:3em;line-height:1.5}#update-note{position:fixed;bottom:12px;left:12px;right:12px;max-width:650px;margin:auto;padding:12px 16px;background:#fff9e9;border:2px solid #47734d;border-radius:16px;z-index:20;box-shadow:0 4px 20px #0003;font-size:13px}#update-note button{margin:8px}@keyframes hello-bubble{from{opacity:0;transform:translateY(5px)}to{opacity:1;transform:none}}@media(max-width:420px){.activity-board{gap:7px}.activity-board button{font-size:24px}}

.buddy-speech{position:absolute;top:38px;left:14px;right:14px;z-index:3;margin:0;padding:10px 12px;background:#ecf4ce;color:#2b3d21;border:2px solid #5e7843;border-radius:12px;font:600 11px/1.4 ui-monospace,monospace;text-align:center;pointer-events:none;box-shadow:0 3px 0 #40532122;animation:hello-bubble .25s ease-out}.buddy-speech:after{content:'';position:absolute;bottom:-7px;left:50%;width:10px;height:10px;background:inherit;border-right:2px solid #5e7843;border-bottom:2px solid #5e7843;transform:rotate(45deg)}.buddy-speech[data-mood=grumpy]{background:#ffe2c7;border-color:#92533b;color:#6a3525}.buddy-speech[data-mood=hungry]{background:#fff1b9;border-color:#8d7331;color:#5d4b1e}.buddy-speech[data-mood=sleepy]{background:#dce8f1;border-color:#567489;color:#344d65}.buddy-speech[data-mood=bath]{background:#d9f1ed;border-color:#4d827a;color:#2c5b53}.buddy-speech:after{border-color:inherit}.message:empty{display:none}#game-fullscreen{display:none}html.game-expanded body{overflow:hidden}html.game-expanded main{padding:0;margin:0;display:block;flex:none}html.game-expanded .pet-info{position:fixed;top:calc(var(--bar) + 4px);left:12px;right:12px;width:auto;max-width:none}html.game-expanded .pet-info>:not(.meters){display:none}html.game-expanded .meters{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;padding:2px 0;border:0}html.game-expanded .meter-row{font-size:10px;gap:4px;padding:5px 0}html.game-expanded .meter-row b{font-size:10px}html.game-expanded .meter-track{gap:2px}html.game-expanded .meter-track i{height:5px}html.game-expanded .device-area{position:fixed;top:calc(var(--bar) + 60px);bottom:12px;left:0;right:0;width:100%;max-width:none;padding:0;display:flex;align-items:center;justify-content:center}html.game-expanded .device{width:min(95vw,calc((100dvh - 225px)*1.4545));max-width:950px;border-radius:20px;padding:12px;flex:none}html.game-expanded .loop,html.game-expanded .shell-top,html.game-expanded .shell-bottom{display:none}html.game-expanded .bezel{padding:8px;border-radius:12px}html.game-expanded .lcd{border-radius:7px}html.game-expanded .lcd-top{top:12px;left:14px;right:14px}html.game-expanded .actions{margin-top:12px;gap:8px}html.game-expanded .actions button{min-height:54px;border-radius:12px;padding:5px;font-size:11px}html.game-expanded .icon{width:21px;height:21px}html.game-expanded .game-controls{margin-top:10px}html.game-expanded .message:not(:empty){position:fixed;bottom:5px;background:var(--paper);z-index:6}html.game-expanded .game-hud{top:23px}html.game-expanded #game-privacy{display:none}@media(max-height:520px) and (min-width:600px){html.game-expanded .pet-info{top:calc(var(--bar) + 12px);left:14px;width:175px;right:auto}html.game-expanded .meters{grid-template-columns:1fr;gap:9px}html.game-expanded .meter-row{font-size:12px}html.game-expanded .device-area{top:calc(var(--bar) + 4px);left:205px;right:10px;width:auto;bottom:8px}html.game-expanded .device{width:min(100%,calc((100dvh - 145px)*1.4545));padding:8px}html.game-expanded .actions button{min-height:45px}html.game-expanded .actions{margin-top:8px}html.game-expanded .icon{height:17px;width:17px}html.game-expanded .buddy-speech{font-size:10px;top:31px;padding:7px}}@media(prefers-reduced-motion:reduce){.buddy-speech{animation:none}}

#care-progress{position:absolute;bottom:8px;left:15px;right:15px;z-index:2;display:flex;justify-content:space-between;align-items:center;gap:8px;background:#dce6aeee;color:#34431d;border-radius:5px;padding:5px 7px;font:9px ui-monospace,monospace}#care-progress progress{height:5px;width:27%;accent-color:#526638}#care-label{white-space:nowrap}

/* Case shape and colour are independent; the screen keeps its original pixels. */
[data-colour]{--case-light:#c1d4c3;--case-main:#8da994;--case-dark:#607e6b;--case-ink:#263e32;--case-button:#edf2e5;--case-edge:#4e6957}
[data-colour=sky]{--case-light:#b6d2e5;--case-main:#80a8c5;--case-dark:#557c99;--case-ink:#223d53;--case-button:#e8f0f5;--case-edge:#466881}
[data-colour=sand]{--case-light:#eee1c8;--case-main:#cbbb98;--case-dark:#998662;--case-ink:#403722;--case-button:#fff6e1;--case-edge:#806e4e}
[data-colour=graphite]{--case-light:#687581;--case-main:#3e4b57;--case-dark:#26313d;--case-ink:#f3f5f4;--case-button:#e0e5e8;--case-edge:#1d2933}
[data-colour=coral]{--case-light:#ffc1a6;--case-main:#ee9a80;--case-dark:#d87560;--case-ink:#593125;--case-button:#fff3d8;--case-edge:#9b6248}
[data-colour=lavender]{--case-light:#d7cde8;--case-main:#b3a1cf;--case-dark:#8a77a5;--case-ink:#3c2e53;--case-button:#f1eaf8;--case-edge:#716089}
.device-area[data-case] .device{background:radial-gradient(ellipse at 25% 10%,var(--case-light),transparent 65%),var(--case-main);border-color:var(--case-dark);box-shadow:inset 3px 4px 4px #fff6,inset -3px -5px 4px #0002,0 14px 25px #3c443022,0 5px 0 var(--case-edge)}
.device-area[data-case] .loop{border-color:var(--case-dark)}
.device-area[data-case] .shell-top,.device-area[data-case] .shell-bottom{color:var(--case-ink)}
.device-area[data-case] .bezel{box-shadow:0 2px 0 var(--case-light),inset 0 5px 7px #272a1f,0 0 0 3px var(--case-edge)}
.device-area[data-case] .actions button{background:linear-gradient(#fff,var(--case-button));border-color:var(--case-edge);box-shadow:inset 2px 3px 3px #fff8,0 4px 0 var(--case-edge),0 5px 7px #0002}
.device-area:not([data-case=pocket]) .flower,.device-area:not([data-case=pocket]) .shell-bottom>span:last-child{visibility:hidden}
html:not(.game-expanded) .device-area:not([data-case=pocket]) .loop{display:none}
html:not(.game-expanded) .device-area[data-case=standard] .device{border-radius:26px;padding:28px 28px 18px}
html:not(.game-expanded) .device-area[data-case=standard] .bezel{border-radius:15px}
html:not(.game-expanded) .device-area[data-case=standard] .lcd{border-radius:8px}
html:not(.game-expanded) .device-area[data-case=retro] .device{border-radius:7px 7px 45px 7px;padding:32px 28px 24px;border-width:4px;background:var(--case-main)}
html:not(.game-expanded) .device-area[data-case=retro] .bezel{border-radius:5px 5px 23px 5px;padding:16px}
html:not(.game-expanded) .device-area[data-case=retro] .lcd{border-radius:2px}
.device-area[data-case=retro] .actions button{border-radius:5px;font-family:ui-monospace,monospace}
.device-area[data-case=retro] .shell-top{font-family:ui-monospace,monospace;font-weight:700}
html:not(.game-expanded) .device-area[data-case=modern] .device{border-radius:32px;padding:20px 20px 16px;background:linear-gradient(150deg,var(--case-main),var(--case-dark));box-shadow:inset 0 1px 0 #fff8,0 15px 30px #22332f33}
html:not(.game-expanded) .device-area[data-case=modern] .bezel{border-radius:16px;padding:7px;background:#25332c;box-shadow:0 0 0 1px #fff4}
html:not(.game-expanded) .device-area[data-case=modern] .lcd{border-radius:10px}
.device-area[data-case=modern] .device:before{display:none}
.device-area[data-case=modern] .actions button{border-radius:16px;box-shadow:0 2px 0 var(--case-edge)}
.device-area[data-case=modern] .shell-bottom{letter-spacing:2px}
#appearance-dialog{width:min(490px,calc(100% - 24px));max-width:490px;padding:24px}#appearance-dialog>p{font-size:13px;line-height:1.5}#appearance-dialog fieldset{border:0;padding:0;margin:20px 0}#appearance-dialog legend{font-weight:750;margin-bottom:10px}
.case-options,.colour-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.colour-options{grid-template-columns:repeat(3,minmax(0,1fr))}.case-options label,.colour-options label{position:relative;cursor:pointer}.case-options input,.colour-options input{position:absolute;opacity:0;width:1px;height:1px}.case-options label>span,.colour-options label>span{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:9px;padding:12px 5px;border:2px solid #d7d5bf;border-radius:12px;font-size:12px;min-height:65px;background:#f9f6e9}.case-options input:checked+span,.colour-options input:checked+span{border-color:#42674c;background:#e9efda;box-shadow:inset 0 0 0 1px #42674c}.case-options input:focus-visible+span,.colour-options input:focus-visible+span{outline:3px solid #42674c;outline-offset:3px}.case-sample{display:block;width:56px;height:55px;border:3px solid var(--case-edge);border-radius:8px;background:var(--case-main);position:relative;box-shadow:0 3px 0 var(--case-dark)}.case-sample:before{content:'';position:absolute;inset:8px 6px 17px;background:#bcc97b;border:3px solid #515a3d;border-radius:3px}.case-sample:after{content:'▪ ▪ ▪';position:absolute;bottom:0;left:0;right:0;text-align:center;color:var(--case-ink);font-style:normal}.sample-retro{border-radius:2px 2px 15px 2px}.sample-modern{border-radius:12px;border-width:1px}.sample-modern:before{inset:5px 4px 16px}.sample-pocket{border-radius:46% 46% 28% 28%;width:52px}.swatch{width:25px;height:25px;border:2px solid #0003;border-radius:50%;background:var(--swatch)}.swatch-sage{--swatch:#8da994}.swatch-sky{--swatch:#80a8c5}.swatch-sand{--swatch:#cbbb98}.swatch-graphite{--swatch:#3e4b57}.swatch-coral{--swatch:#ee9a80}.swatch-lavender{--swatch:#b3a1cf}#appearance-status{min-height:3em}#appearance-done{width:100%}
@media(max-width:800px){html:not(.game-expanded) .device-area[data-case=standard] .device,html:not(.game-expanded) .device-area[data-case=retro] .device{padding:20px 16px 15px}html:not(.game-expanded) .device-area[data-case=modern] .device{padding:16px 12px 12px}html:not(.game-expanded) .device-area[data-case=retro] .bezel{padding:10px}#appearance-dialog{padding:18px}}
@media(max-width:420px){html.game-expanded .meter-row{grid-template-columns:minmax(0,1fr);gap:2px}html.game-expanded .meter-row b{font-size:9px}html.game-expanded .meters{gap:8px}}

.activity-board.garden{grid-template-columns:repeat(2,minmax(0,1fr))}.activity-board.garden button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;aspect-ratio:1.2}.activity-board.garden small{font-size:13px}.garden-plant{position:relative;display:block;width:64px;height:58px;background:linear-gradient(#7d6139,#7d6139) 8px 42px/48px 8px no-repeat,linear-gradient(#ac8050,#ac8050) 14px 50px/36px 8px no-repeat}.garden-plant:before{content:'';position:absolute;left:30px;top:38px;width:5px;height:4px;background:#d7b17a}.plant-1:before{top:29px;height:13px;background:#557438;box-shadow:-7px -2px 0 1px #78964e}.plant-2:before,.plant-3:before,.plant-4:before{top:12px;height:30px;background:#557438;box-shadow:-8px 3px 0 1px #78964e,8px -3px 0 1px #78964e}.plant-3:after{content:'';position:absolute;left:17px;top:14px;width:9px;height:9px;background:#b85b4e;box-shadow:24px -8px 0 #bd714e}.plant-4{opacity:.65}.activity-board.puzzle{grid-template-columns:repeat(3,minmax(0,1fr));gap:5px}.activity-board .puzzle-tile{background-size:300% 300%;image-rendering:pixelated;position:relative;border-radius:6px}.activity-board .puzzle-tile:disabled{opacity:1;color:#253c21}.puzzle-tile small{position:absolute;bottom:3px;right:3px;background:#f5f1d9;color:#253c21;border-radius:3px;padding:1px 5px;font-size:13px}.activity-board .puzzle-empty{background:#d7ddc2;border:1px dashed #849267;box-shadow:none}.puzzle-goal{grid-column:1/-1;width:120px;justify-self:center;image-rendering:pixelated}.activity-board .puzzle-tile:focus-visible{outline:3px solid #1d492b;outline-offset:1px}

#journey-panel{margin:10px 0;padding:8px 0;border-top:1px solid var(--line);font-size:12px;line-height:1.6}html.game-expanded #journey-panel{display:none}

/* The game is the entry point; secondary information lives alongside it or in settings. */
.pet-info{grid-column:2;grid-row:1;padding-top:28px}.device-area{grid-column:1;grid-row:1}.connection-notice{text-align:center}.connection-notice button{margin-top:8px}.connection-notice:has(.message:empty){display:none}
#settings-dialog{width:min(480px,calc(100% - 24px));max-width:480px;padding:24px}.settings-heading{display:flex;align-items:center;justify-content:space-between;gap:16px}.settings-heading h2{margin:0}.settings-tools{display:flex;gap:10px;margin:20px 0}.save-options{border-top:1px solid var(--line);margin-top:18px;padding-top:10px}#settings-dialog p{font-size:13px;line-height:1.65}#settings-dialog h3{font-size:15px}#privacy-settings #game-privacy{margin:20px 0 0!important;padding:12px!important;font-size:12px!important}#settings-dialog #new-pet{margin-top:10px}
@media(max-width:800px){.pet-info{padding-top:0;display:grid;grid-template-columns:1fr auto;gap:0 12px}.pet-info h1{font-size:25px;margin:0}.pet-info .age{align-self:center;margin:0}.pet-info .meters{grid-column:1/-1;margin-top:10px}.pet-info .memory{grid-column:1/-1;margin-top:8px}.pet-info #journey-panel{grid-column:1/-1;margin:4px 0}.pet-info .memory>span{display:none}.pet-info .memory p{margin:4px 0}}
html.game-expanded .pet-info{display:block;padding:0}html.game-expanded .connection-notice button{position:fixed;bottom:5px;right:10px;z-index:7}



/* One companion workspace, with optional collections behind their own controls. */
.greenhouse-open{width:100%;display:flex;gap:12px;align-items:center;text-align:left;margin-top:18px;padding:14px;border-radius:12px;background:#edf0e0;border-color:#c0ccb1;box-shadow:none}.greenhouse-open>span:first-child{font-size:30px;color:#536e42}.greenhouse-open>span:nth-child(2){flex:1}.greenhouse-open strong,.greenhouse-open small{display:block}.greenhouse-open strong{font-size:15px}.greenhouse-open small{font-size:12px;margin-top:5px;font-weight:400}.pet-info .memory{padding:4px 0;margin:0}.pet-info .memory>span{display:none}.memory strong{font-size:12px}.memory p{color:#5c644c}.connection-notice:has(.message:empty){display:none}#journey-panel{margin-top:12px}#journey-panel summary{font-size:13px;color:#556245}
#greenhouse-dialog{width:min(640px,calc(100% - 24px));max-width:640px;padding:24px}.greenhouse-intro{font-size:13px;line-height:1.6;max-width:54ch;color:#5c644c}#greenhouse-scene{width:100%;border:1px solid #a9b99c;border-radius:10px;image-rendering:pixelated}#greenhouse-message:empty{display:none}#greenhouse-message{font-size:13px;line-height:1.5}#greenhouse-pots{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-top:18px}.greenhouse-pot{display:flex;flex-direction:column;align-items:stretch;min-width:0;padding:12px;border:1px solid #cdd4bd;border-radius:10px;background:#f6f7ed}.greenhouse-pot h3{font-size:13px;margin:0 0 8px;color:#626a55}.greenhouse-pot select{max-width:100%;width:100%;padding:8px 3px;border:1px solid #bbc6ab;border-radius:6px;font-size:12px;background:#fffdf6;min-height:44px}.greenhouse-pot button{padding:10px 5px;min-height:44px;border-radius:8px;font-size:12px;margin-top:auto;box-shadow:none;background:#e4ead4;border-color:#a9ba92}.greenhouse-pot button:disabled{opacity:1;color:#65705a;background:#f0f1e7;border-color:#d6dac8}.pot-status{font-size:12px;line-height:1.5;min-height:4.5em}.pot-locked{background:transparent;border-style:dashed;justify-content:center}.pot-locked .pot-status{margin-bottom:auto}.plant-name{font-size:13px;font-weight:600}.plant-icon{position:relative;width:48px;height:60px;margin:2px auto 10px;--flower:#d9c25e}.plant-icon:after{content:'';position:absolute;bottom:0;left:10px;width:28px;height:15px;background:#ad7752;box-shadow:0 -4px 0 2px #855a3b}.plant-icon i{position:absolute;bottom:17px;left:22px;width:5px;height:28px;background:#5e804f}.plant-icon i:after{content:'';position:absolute;top:5px;left:-8px;width:8px;height:5px;background:#7c9b66;box-shadow:13px -5px 0 #6d8d57}.plant-icon.stage-0 i{height:10px}.plant-icon.stage-2 i:before{content:'';position:absolute;top:-10px;left:-6px;width:17px;height:12px;background:var(--flower);box-shadow:0 0 0 3px var(--flower)}.plant-empty i{display:none}.plant-fern{--flower:#74975a}.plant-daisy{--flower:#ece7ca}.plant-sunflower{--flower:#dcb958}.plant-lavender{--flower:#a18abd}.plant-moonflower{--flower:#c7dbe4}.plant-orchid{--flower:#c08da6}.plant-album{margin-top:16px;border-top:1px solid var(--line);font-size:13px}#plant-album{display:grid;grid-template-columns:repeat(2,1fr);gap:8px}#plant-album p{margin:4px 0;font-size:12px;color:#59634c}
.activity-board.trail{grid-template-columns:repeat(5,minmax(0,1fr));gap:5px;background:#cddab5;border-radius:10px;padding:8px}.activity-board.trail button{position:relative;aspect-ratio:1;min-height:38px;border:2px solid #72964c;border-radius:5px;background:#d3e5a9;box-shadow:none;padding:2px;font-size:25px;color:#344b29}.activity-board.trail button:disabled{opacity:1;background:#e9edce;border-color:#e9edce;color:#9ca782}.activity-board.trail .trail-rock:disabled{background:#a9b29c;border-color:#a9b29c;color:#65735c}.activity-board.trail .trail-light{color:#85591d;background:#f3e5a6}.activity-board.trail .trail-light:disabled{color:#85591d;background:#f5e8ba;border-color:#f5e8ba}.activity-board.trail .trail-home{font-size:32px;color:#5a6b46}.activity-board.trail .trail-buddy:disabled{background:#7c9357;border-color:#7c9357;color:#f5f2d0}.activity-board.trail .trail-hint{outline:3px solid #77522b;outline-offset:-5px}.activity-board.trail .trail-buddy{font-size:0}.trail-buddy:before{content:'';position:absolute;left:calc(50% - 9px);top:calc(50% - 7px);width:18px;height:15px;background:#ecedbd;box-shadow:0 -3px 0 -1px #ecedbd}.trail-buddy:after{content:'';position:absolute;left:calc(50% - 5px);top:calc(50% - 3px);width:3px;height:3px;background:#3f552e;box-shadow:7px 0 0 #3f552e}
@media(max-width:800px){.greenhouse-open{grid-column:1/-1;margin-top:12px}.pet-info{max-width:590px}.pet-info #journey-panel{margin-top:8px}.device-area{padding-top:0}.pet-info h1{font-size:24px}.greenhouse-open small{font-size:11px}}
@media(max-width:420px){#greenhouse-dialog{padding:17px}#greenhouse-pots{grid-template-columns:1fr;gap:10px}.greenhouse-pot{display:grid;grid-template-columns:58px 1fr;column-gap:12px;padding:12px}.greenhouse-pot h3{grid-column:1/-1}.greenhouse-pot .plant-icon{grid-column:1;grid-row:2/5;align-self:center}.greenhouse-pot select,.greenhouse-pot .plant-name,.greenhouse-pot .pot-status,.greenhouse-pot button{grid-column:2}.greenhouse-pot .pot-status{min-height:0;margin:7px 0}.greenhouse-pot button{width:100%;min-height:44px}.greenhouse-pot.pot-locked{grid-template-columns:1fr}.greenhouse-pot.pot-locked .pot-status{grid-column:1}.activity-board.trail{padding:5px;gap:4px}.activity-board.trail button{min-height:34px}.settings-heading{gap:8px}.settings-heading h2{font-size:22px}}

.plant-fern.stage-2 i:before{width:18px;height:4px;top:1px;left:-7px;background:#64844e;box-shadow:0 7px 0 2px #73945b,0 15px 0 3px #64844e}.plant-lavender.stage-2 i:before{width:9px;left:-2px;top:-13px;height:20px;box-shadow:0 0 0 2px var(--flower)}.plant-orchid.stage-2 i:before{box-shadow:-5px -4px 0 -3px var(--flower),5px -4px 0 -3px var(--flower)}

/* A quiet life summary; the book holds the calendar, chapters and earlier friends. */
.pet-info .age{font:14px system-ui,sans-serif;margin-bottom:12px}.life-panel{margin:0 0 18px;padding-bottom:14px;border-bottom:1px solid var(--line)}.life-panel>strong{font-size:14px;color:#536547}.life-panel>p{font-size:12px;line-height:1.5;margin:7px 0 10px;color:#58634c}.life-panel>button{min-height:44px;font-size:12px;padding:8px 13px;box-shadow:none;background:#edf0e0;border-color:#bdc8ab}.settings-tools{flex-wrap:wrap}
#life-dialog{width:min(640px,calc(100% - 24px));max-width:640px;padding:24px;max-height:calc(100dvh - 32px);overflow:auto}#life-dialog p{font-size:13px;line-height:1.6}#life-dialog h3{font-size:18px}.life-pace{font-weight:650;color:#56674a;margin:12px 0 20px}.life-current{padding:16px 18px;border:1px solid #cad3bb;border-radius:12px;background:#eff2e4}.life-current h3{margin:0 0 5px;overflow-wrap:anywhere}#life-book-age{color:#536647;margin:5px 0}#life-book-story{margin:12px 0 5px}#life-book-goal{margin:8px 0 0;font-weight:650}#life-finale{border-left:3px solid #869869;padding-left:14px}#life-selector{display:grid;gap:7px;font-size:12px;margin:0 0 16px}#life-companion{width:100%;min-height:44px;border:1px solid #bcc8ad;border-radius:8px;padding:8px;background:#fffdf5}#life-memories{list-style:none;padding:0;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}#life-memories li{padding:12px;background:#f0ecdc;border-radius:8px}#life-memories strong,#life-memories small{display:block}#life-memories strong{font-size:13px}#life-memories small{font-size:11px;line-height:1.5;margin-top:5px;color:#5e674e}.life-explainer,.life-backup{margin-top:18px;border-top:1px solid var(--line);padding-top:8px;font-size:13px}#life-road{list-style:none;padding:0;display:grid;gap:12px}#life-road li{border-left:3px solid #d6d9c7;padding:8px 0 8px 14px;color:#666f59}#life-road li.reached{border-color:#879a6c}#life-road li[aria-current]{background:#edf1e1}#life-road p{margin:5px 0}#life-road small{display:block;line-height:1.5}#life-download-status:empty{display:none}
@media(max-width:800px){.pet-info .age{margin:0;text-align:right;font-size:12px}.life-panel{grid-column:1/-1;margin:12px 0 0;padding-bottom:12px;display:grid;grid-template-columns:1fr auto;gap:5px 12px;align-items:center}.life-panel>strong{grid-column:1}.life-panel>p{grid-column:1;margin:0}.life-panel>button{grid-column:2;grid-row:1/3;max-width:130px}.pet-info .meters{margin-top:0;border-top:0}}
@media(max-width:420px){#life-dialog{padding:18px}#life-memories{grid-template-columns:1fr}.life-panel>button{max-width:100px}.life-panel>p{font-size:11px}.life-current{padding:14px}}

#restore-dialog{width:min(560px,calc(100vw - 32px));max-height:calc(100dvh - 32px);overflow:auto}#restore-dialog label{display:grid;gap:12px}#restore-file{max-width:100%;min-width:0}#restore-preview{font-weight:700;overflow-wrap:anywhere}#restore-note{line-height:1.6}#restore-status{min-height:1.5em;line-height:1.5}.save-options>button{margin:6px 6px 0 0}
#restore-dialog .settings-heading{flex-wrap:wrap;align-items:flex-start}#restore-dialog .settings-heading h2{min-width:0;max-width:100%;overflow-wrap:anywhere}#restore-dialog button{max-width:100%;white-space:normal;overflow-wrap:anywhere}#restore-dialog input{width:100%;box-sizing:border-box}#restore-dialog p{overflow-wrap:anywhere}

#restore-filename{overflow-wrap:anywhere;font-size:13px;color:#58634c}#restore-filename:empty{display:none}

/* Screen fit. Computers: the pet screen is scaled by a whole number (data-px, set by app.js) and the status column sits beside it. Phones: nothing scrolls, the pet screen sits at the bottom within thumb reach. */
:root{--bar:calc(48px + env(safe-area-inset-top,0px));--px:1;--ui:1}
html[data-px="2"]{--px:2;--ui:1.5}
html[data-px="3"]{--px:3;--ui:2}
html[data-px="4"]{--px:4;--ui:2.5}
.game-controls{min-height:74px;align-items:stretch;margin-top:22px}
.game-controls span{display:flex;align-items:center;justify-content:center}
@media(min-width:801px){
.lcd{width:calc(var(--px)*320px)}
.lcd-top{top:calc(15px*var(--px));left:calc(19px*var(--px));right:calc(19px*var(--px));font-size:calc(11px*var(--ui))}
.buddy-speech{top:calc(22px*var(--px) + 12px*var(--ui));left:calc(9px*var(--px));right:calc(9px*var(--px));font-size:calc(11px*var(--ui));padding:calc(7px*var(--px)) calc(9px*var(--px))}
.screen-overlay{padding:calc(9px*var(--px));gap:calc(5px*var(--px))}
.screen-overlay p{font-size:calc(12px*var(--ui))}
.screen-overlay button{font-size:calc(12px*var(--ui))}
.game-hud{top:calc(22px*var(--px) + 10px*var(--ui));left:calc(6px*var(--px));right:calc(6px*var(--px));font-size:calc(11px*var(--ui))}
.game-hud button{font-size:calc(10px*var(--ui))}
#care-progress{bottom:calc(5px*var(--px));left:calc(10px*var(--px));right:calc(10px*var(--px));font-size:calc(9px*var(--ui))}
html.game-expanded .device{width:max-content;max-width:none}
.actions button,.game-controls span{font-size:calc(12px*var(--ui))}
.shell-top,.shell-bottom{font-size:calc(9px*var(--ui))}
html.game-expanded .lcd-top{top:calc(8px*var(--px))}
}
@media(min-width:801px) and (max-height:820px){
.shell-bottom{display:none}
.shell-top{margin-bottom:10px}
.actions,.game-controls{margin-top:12px}
}
@media(max-width:800px){
.pet-info{max-width:none}
.pet-info h1{font-size:24px;line-height:1.1}
.pet-info .age{margin:0}
.pet-info .meters{grid-template-columns:repeat(4,minmax(0,1fr));gap:0 8px;padding:0;margin:0}
.meter-row{grid-template-columns:minmax(0,1fr);gap:1px;padding:1px 0;font-size:11px}
.meter-row b{display:none}
.meter-row span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.life-panel{margin:0;padding-bottom:2px}
.greenhouse-open{margin-top:0;padding:4px 12px;min-height:44px}
.greenhouse-open small{display:none}
.pet-info #journey-panel{margin:0;padding:0}
.device-area{margin-top:auto;width:100%;max-width:none}
.device-area[data-case] .device,html:not(.game-expanded) .device-area[data-case] .device{padding:12px 10px 10px}
.shell-top{margin:0 8px 6px}
.flower{font-size:12px;line-height:1}
.actions{margin-top:10px;gap:7px}
.actions button{min-height:56px;padding:6px 2px}
.game-controls{min-height:60px;margin-top:10px}
.shell-bottom{margin:8px 9px 0}
}
@media(max-width:800px) and (max-height:700px){
.shell-bottom{display:none}
}
@media(max-width:800px) and (min-height:760px){
.pet-info .meters{grid-template-columns:1fr 1fr;gap:0 18px;padding:4px 0}
.meter-row{grid-template-columns:1fr auto;gap:2px 8px;padding:3px 0}
.meter-row b{display:inline}
.greenhouse-open small{display:block;margin-top:2px}
}
@media(max-width:600px){
html:not(.game-expanded) .device{min-height:55dvh;display:flex;flex-direction:column;justify-content:space-between}
}
#feedback-settings #game-feedback{margin:20px 0 0;width:100%}
#feedback-settings #game-feedback summary{min-height:44px;padding:10px 0}
