*{box-sizing:border-box}html{background:#112c38;color:#153e45}body{margin:0;font-family:'Hiragino Maru Gothic ProN','Yu Gothic',Meiryo,sans-serif}button,input,select{font:inherit}button{cursor:pointer;color:inherit;-webkit-tap-highlight-color:transparent;touch-action:manipulation;border:0;background:none}button:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid #cf9b58;outline-offset:3px}button:active{transform:scale(.96)}button:disabled{opacity:.45}.app{max-width:480px;min-height:100dvh;margin:auto;background:#f4f5ed;padding:calc(env(safe-area-inset-top) + 15px) 18px calc(env(safe-area-inset-bottom) + 9px);overflow:hidden}header{display:flex;align-items:center;justify-content:space-between;margin:0 5px 18px}.wordmark{font-family:Georgia,serif;font-size:27px;font-weight:bold;letter-spacing:-1px}.wordmark span{display:block;font-family:sans-serif;font-size:11px;font-weight:400;letter-spacing:1.3px;margin-top:3px;color:#668080}header button{font-size:25px;width:44px;height:44px;background:#e6ebe2;border-radius:50%}.device-head{display:flex;justify-content:space-between;color:#6b8583;font-size:11px;letter-spacing:1px;margin:0 5px 10px}.device-head span:first-child:before{content:'◌ ';color:#658b82}.screen{position:relative;border-radius:26px;overflow:hidden;background:#b1dbcd;box-shadow:0 8px 25px #123f461b;border:1px solid #95bdb3}.screen-top{display:flex;align-items:center;justify-content:space-between;position:absolute;top:16px;left:18px;right:15px;z-index:2}.screen-top strong{font-size:20px;letter-spacing:2px}.screen-top #stage{display:block;font-size:11px;color:#4f7978;margin-top:4px}.screen-top button{font-size:11px;border:1px solid #487c6b38;background:#eef9df70;padding:9px 12px;border-radius:20px;backdrop-filter:blur(8px)}.quick-stats{position:absolute;top:78px;left:18px;right:18px;display:flex;justify-content:space-between;z-index:2;font-size:10px;color:#375e61}.quick-stats b{font-size:10px;letter-spacing:2px;margin-left:5px;color:#3a7774}.scene{position:relative;height:410px;overflow:hidden}.scene canvas{width:100%;height:100%;display:block;image-rendering:pixelated}#pet{position:absolute;top:28%;left:14%;width:72%;height:48%;border-radius:50%}#sceneState{position:absolute;bottom:22px;left:0;right:0;text-align:center;font-size:11px;color:#e4eee0;letter-spacing:1px;text-shadow:0 1px 4px #153e45}.pet-message{position:relative;display:flex;align-items:center;justify-content:center;gap:9px;background:#f6f6e9;border-top:1px solid #e5ecda;padding:6px 10px;min-height:49px}.message-dot{width:5px;height:5px;background:#6b9d91;border-radius:50%;flex-shrink:0}#speech{font-size:12px;line-height:1.7;margin:0;text-align:center}.sound-state{display:flex;align-items:center;justify-content:space-between;background:#e9efe2;color:#6d8480;padding:3px 12px 5px;font-size:10px}.sound-state button{font-size:10px;padding:7px 0}.sound-state.alert{background:#f1dfb7;color:#765d3e}.care-heading{display:flex;justify-content:space-between;align-items:center;font-size:11px;color:#86928b;margin:16px 2px 9px}.care-heading button{font-size:11px;text-decoration:underline;text-underline-offset:4px;color:#567d76}nav{display:grid;grid-template-columns:repeat(6,1fr);gap:5px}nav button{display:flex;flex-direction:column;align-items:center;gap:7px;border-radius:15px;font-size:10px;padding:10px 0 8px;color:#648078;background:#e8eee4;transition:background .2s}nav button.selected{background:#cfe1d3;color:#1d594f}nav svg{width:25px;height:25px;stroke:currentColor;stroke-width:1.6;fill:none;stroke-linecap:round;stroke-linejoin:round}.keypad{display:none;justify-content:center;gap:22px;margin-top:12px}.retro .keypad{display:flex}.keypad button{width:42px;height:42px;background:#d8e4d6;border-radius:50%;box-shadow:0 3px #aebfb1;font-size:12px}.music{display:flex;gap:12px;align-items:center;margin:20px 0 16px;padding:14px 13px;background:#173e49;border-radius:19px;color:#f7f4df;box-shadow:0 5px 15px #12323d15}.music>button:first-child{width:38px;height:38px;border:1px solid #739c98;border-radius:50%;font-size:20px;flex-shrink:0}.music>div{flex:1;min-width:0}.music small{font-size:8px;letter-spacing:1.7px;color:#9db9b5;display:block;margin-bottom:4px}.music select{background:none;border:0;color:#eff0d9;font-size:13px;width:100%;padding:0;appearance:none}.music option{background:#173e49}.music>button:last-child{width:30px;height:35px;font-size:23px}footer{display:flex;justify-content:space-around;align-items:center;border-top:1px solid #dce5d8;padding-top:7px}footer button{font-size:12px;color:#8b9d92;padding:10px 12px}footer .active{color:#285c54;font-weight:bold}.brand-copy{text-align:center;font-size:10px;color:#9ca89c;letter-spacing:1px;margin:9px 0 1px}dialog{position:fixed;inset:auto 0 0;width:100%;max-width:480px;max-height:88dvh;margin:auto auto 0;border:0;border-radius:28px 28px 0 0;background:#f7f7ed;color:#264e4a;padding:11px 24px calc(28px + env(safe-area-inset-bottom));box-shadow:0 -12px 70px #12334230;overflow-y:auto}dialog::backdrop{background:#0b2b4077;backdrop-filter:blur(5px)}.handle{width:32px;height:4px;border-radius:5px;background:#cbd7c8;margin:0 auto 19px}.panel-head{display:flex;align-items:center;justify-content:space-between}.panel-head h2{font-size:22px;letter-spacing:1px;margin:0;font-weight:500}.panel-head>button{width:44px;height:44px;font-size:28px}.note{font-size:13px;line-height:1.9;color:#6d8680}.danger-free{font-size:11px;line-height:1.9;color:#83948a}.stat{margin:20px 0}.stat>div{display:flex;justify-content:space-between;font-size:13px;margin-bottom:8px}.bar,.meter{height:7px;background:#dce6d7;border-radius:10px;overflow:hidden}.bar i,.meter i{display:block;height:100%;background:#7ea492;transition:width .4s}.meter{margin:15px 0}.primary,.secondary{border-radius:14px;padding:14px 16px;min-height:46px;font-size:13px;background:#2c625a;color:#f6f4e5}.secondary{background:#e4ecdd;color:#41695e}.row{display:flex;align-items:center;gap:10px;margin:18px 0}.row>*{flex:1}.entry{padding:16px 0;border-bottom:1px solid #dbe3d4;font-size:13px;line-height:1.8}.entry small{display:block;font-size:10px;color:#95a28e}.quote{font-size:21px;line-height:1.9;letter-spacing:1px;font-family:serif;border-left:2px solid #b3c5a8;padding-left:16px}label{display:block;font-size:13px;line-height:1.8}input[type=text]{width:100%;border:1px solid #bfcfba;border-radius:12px;padding:12px;background:#fffef6;margin:8px 0;color:#264e4a}input[type=range]{width:100%;accent-color:#527f70}select{border:1px solid #bbcdb6;border-radius:10px;background:#eaf0e0;color:#305b50;padding:9px}#noiseReading{font-size:12px}details{border-top:1px solid #dbe3d4;margin-top:20px;padding-top:16px}summary{font-size:12px;cursor:pointer}.badge{padding:5px 9px;border-radius:8px;background:#e4ebdb;font-size:11px}#bubbleGame{position:absolute;inset:0;background:#297b8922;z-index:3}#gameScore{position:absolute;top:115px;left:20px;padding:8px 12px;border-radius:20px;background:#eff5e9dd;font-size:12px}#catchBubble{position:absolute;width:55px;height:55px;background:#eef8ed44;border:2px solid #ecfff2;border-radius:50%;font-size:0;box-shadow:inset 4px 4px 0 #ffffff50,0 0 20px #d4f6e644}#exitGame{position:absolute;bottom:15px;right:14px;padding:10px 16px;color:#fff;background:#234e5eaa;border-radius:20px;font-size:12px}#toast{position:fixed;bottom:25px;left:50%;transform:translateX(-50%);padding:14px 20px;border-radius:15px;background:#17443eee;color:#f7f7e9;max-width:90vw;font-size:12px;z-index:9;opacity:0;pointer-events:none}#toast.show{opacity:1}.choices{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin:22px 0}.choice{border:1px solid #d4dfcb;border-radius:17px;min-height:110px;padding:15px 5px;background:#edf2e6;font-size:13px}.choice .symbol{display:block;font-size:30px;margin-bottom:12px}.choice small{display:block;font-size:10px;margin-top:7px;color:#829481}.habitat-card{display:block;width:100%;text-align:left;padding:20px;border-radius:17px;margin:12px 0;min-height:100px;color:#e6f5df;border:2px solid transparent;background:linear-gradient(120deg,#81c7bb,#245d72)}.habitat-card[data-room="moon"]{background:linear-gradient(120deg,#668b9c,#173951)}.habitat-card[data-room="garden"]{background:linear-gradient(120deg,#9abb88,#346b60)}.habitat-card strong{display:block;font-size:18px}.habitat-card small{display:block;margin-top:8px;font-size:11px}.habitat-card.chosen{border-color:#d1b578}.collection-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:12px;margin-top:20px}.collection-item{padding:22px 8px;background:#e8efe0;border-radius:16px;text-align:center;font-size:12px}.collection-item b{display:block;font-size:27px;margin-bottom:10px}.collection-item small{display:block;margin-top:6px;color:#7d9283;font-size:10px}.locked{opacity:.45}.audio-info{padding:18px;background:#e8eee0;border-radius:16px;line-height:1.9;font-size:13px}.audio-info strong{font-family:serif;display:block;font-size:22px;margin-bottom:5px}[hidden]{display:none!important}@media(max-height:810px){.scene{height:340px}.app{padding-top:calc(env(safe-area-inset-top) + 10px)}header{margin-bottom:12px}.music{margin:14px 0 11px;padding:11px 13px}.care-heading{margin-top:12px}.brand-copy{display:none}}@media(max-height:700px){.scene{height:285px}.wordmark{font-size:23px}.wordmark span{font-size:10px}header{margin-bottom:8px}.device-head{margin-bottom:6px}.quick-stats{top:65px}.screen-top{top:12px}nav button{padding:8px 0 6px}nav svg{width:22px;height:22px}.care-heading{margin-top:9px}.music{margin:11px 0 8px}footer button{padding:7px}}@media(prefers-reduced-motion:reduce){*{transition:none!important}}
/* Keep the living scene and controls together on a phone. */
.scene{height:clamp(250px,calc(100dvh - 500px),410px)}
.sleeping .screen-top,.sleeping .quick-stats{color:#203e56}
