/* Storybook scene adapted from the user's 星芽宠物屋 project. */
.pet-world-dialog{position:fixed;inset:0;width:100vw;height:100dvh;max-width:none;max-height:none;border:0;padding:0;margin:0;overflow:hidden;background:#e0ebd2;color:#513e2c;font-family:system-ui,-apple-system,'PingFang SC',sans-serif;isolation:isolate}.pet-world-dialog::backdrop{background:#192c20}.pet-world-dialog button{font-family:inherit;cursor:pointer;touch-action:manipulation}.pet-world-dialog button:focus-visible{outline:3px solid #e7a33a;outline-offset:3px}.pet-world-dialog button:disabled{opacity:.48;cursor:default}.pet-world-dialog button:active:not(:disabled){transform:translateY(2px)}#pet-world-canvas{position:absolute;inset:0;width:100%;height:100%;display:block;touch-action:none;outline:0}.pet-world-hud{position:absolute;inset:20px 22px auto;display:flex;align-items:flex-start;justify-content:space-between;gap:20px;pointer-events:none}.pet-world-hud>*{pointer-events:auto}.pet-world-identity{width:300px;max-width:calc(100vw - 48px);padding:16px 18px;border:2px solid #cfb48b;border-radius:19px;background:#fffaf0f0;box-shadow:0 5px 0 #8864352b,0 8px 25px #4c4f2d12}.pet-world-eyebrow{font-size:10px;font-weight:750;letter-spacing:.13em;color:#9b8865}.pet-world-identity-row{display:flex;justify-content:space-between;align-items:center;gap:10px;margin:8px 0}.pet-world-identity-row>button{display:flex;align-items:center;gap:8px;text-align:left;min-width:0}.pet-world-identity-row b{font-size:23px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.pet-world-identity-row>button>span{color:#b79a6e}.pet-world-identity-row>strong{font-size:15px;color:#cc872c;white-space:nowrap}.pet-world-meta{display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:12px;line-height:1.8;color:#978365}.pet-world-meta>button{font-size:12px;text-decoration:underline;text-underline-offset:3px;color:#71875c}.pet-world-meta>span{white-space:nowrap}.pet-world-growth-track{height:10px;background:#ded9bca0;border-radius:20px;overflow:hidden;margin:8px 0 6px}.pet-world-growth-track>i{display:block;height:100%;background:linear-gradient(90deg,#f4bd5d,#f39676);border-radius:20px;transition:width .3s}.pet-world-utilities{display:flex;gap:9px;flex-wrap:wrap;justify-content:flex-end;margin-right:48px}.pet-world-utilities button{background:#fffaf1ed;border:2px solid #d2b48a;box-shadow:0 3px 0 #8864352b;border-radius:12px;padding:10px 14px;font-size:14px;color:#806947;white-space:nowrap}#close-pet-world{position:absolute;right:0;top:0;width:36px;height:36px;border:2px solid #d3b88f;border-radius:50%;background:#fff9eeed;color:#9c805d;font-size:23px;line-height:1}.pet-world-bottom{position:absolute;left:20px;right:20px;bottom:max(17px,env(safe-area-inset-bottom));display:flex;flex-direction:column;align-items:center;gap:11px;pointer-events:none}.pet-world-bottom>*{pointer-events:auto}.pet-world-status{max-width:min(650px,100%);background:#fffbf0eb;border:1px solid #e5d6b7;border-radius:15px;padding:9px 17px;font-size:14px;line-height:1.7;text-align:center;color:#937a50;box-shadow:0 3px 12px #5a5d2a0c}.pet-world-actions{display:flex;justify-content:center;gap:12px;flex-wrap:wrap}.pet-world-actions button{font-weight:650;font-size:15px;padding:14px 20px;min-height:48px;border:2px solid #775335;border-radius:15px;box-shadow:0 4px 0 #775335;color:white;white-space:nowrap}.pet-world-actions .world-feed{background:#ee9d59}.pet-world-actions .world-bath{background:#62b9d1}.pet-world-actions .world-play{background:#db879e}.pet-world-actions .world-sleep{background:#8d88bd}.pet-world-actions .world-chat{background:#7eaa79}.pet-world-footer{display:flex;align-items:center;gap:22px;font-size:12px;color:#6e774f;background:#fff9e8cd;border-radius:20px;padding:5px 15px}.pet-world-footer button{color:#7b8662;font-size:12px;text-decoration:underline;text-underline-offset:3px}.pet-world-score{position:absolute;left:50%;top:24%;transform:translateX(-50%);display:flex;gap:18px;align-items:center;font-size:16px;background:#fff8e9ed;border:2px solid #d3b58b;border-radius:14px;padding:12px 22px;color:#a27740;white-space:nowrap}.pet-world-score b{font-size:21px;color:#d28435}.pet-world-game-controls{display:flex;align-items:center;gap:12px;background:#fff8e9e6;border:1px solid #dbc5a6;border-radius:12px;padding:5px 9px;color:#8c7c59;font-size:12px}.pet-world-game-controls button{padding:7px 12px;background:#f2e6cc;border-radius:8px;color:#9a7e50;white-space:nowrap}.pet-world-celebration{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);width:min(340px,calc(100vw - 36px));text-align:center;background:#fff9edf5;box-shadow:0 15px 80px #57402640;border:3px solid #e1bf81;border-radius:26px;padding:19px 22px 22px;color:#947143}.pet-world-celebration>span{font-size:29px;letter-spacing:10px;color:#e1b85d}.pet-world-celebration h2{font-size:31px;margin:9px 0}.pet-world-celebration>div{width:170px;height:185px;margin:0 auto}.pet-world-celebration .buddy-art{width:100%;height:100%}.pet-world-celebration p{font-size:14px;line-height:1.8;margin:9px 0 13px}.pet-world-celebration button{padding:10px 24px;background:#8eae70;border:1px solid #729158;border-radius:12px;color:white;font-size:15px}.pet-return-world{background:#e8f1de;color:#738c57;border:1px solid #c8d9b4;border-radius:10px;padding:11px 20px;margin:15px auto;font-size:15px}.pet-world-ready #pet-home>.pet-garden,.pet-world-ready #pet-home>.pet-care{display:none}.pet-world-dialog [hidden]{display:none!important}
@media(max-width:760px){.pet-world-hud{inset:14px 14px auto;display:block}.pet-world-identity{width:265px;padding:12px 14px;max-width:calc(100vw - 70px)}.pet-world-identity-row b{font-size:21px}.pet-world-identity-row>strong{font-size:13px}.pet-world-eyebrow{font-size:9px}.pet-world-utilities{margin:11px 0 0;justify-content:flex-start;gap:7px}.pet-world-utilities button{font-size:12px;padding:8px 11px;border-radius:10px}.pet-world-bottom{left:12px;right:12px;bottom:max(12px,env(safe-area-inset-bottom));gap:9px}.pet-world-actions{gap:9px;width:100%;max-width:470px}.pet-world-actions button{padding:10px 8px;min-height:42px;font-size:13px;border-radius:12px;flex:1 1 28%;box-shadow:0 3px 0 #775335}.pet-world-status{font-size:12px;padding:7px 10px;line-height:1.7;border-radius:12px}.pet-world-footer{font-size:11px;gap:12px;padding:4px 10px}.pet-world-footer button{font-size:11px}.pet-world-score{top:30%;padding:8px 14px;font-size:13px}.pet-world-score b{font-size:18px}.pet-world-game-controls{font-size:10px;gap:6px;padding:4px}.pet-world-game-controls button{padding:6px 10px}.pet-world-celebration{width:290px;max-width:calc(100vw - 30px);padding:14px 18px}.pet-world-celebration h2{font-size:27px;margin:5px 0}.pet-world-celebration>div{width:140px;height:155px}.pet-world-celebration p{font-size:13px}}
@media(max-height:600px) and (min-width:600px){.pet-world-identity{width:250px;padding:9px 14px}.pet-world-eyebrow{display:none}.pet-world-hud{inset:12px}.pet-world-bottom{gap:6px;bottom:10px}.pet-world-actions button{padding:9px 14px;min-height:40px;font-size:13px}.pet-world-status{font-size:12px;padding:5px 12px}.pet-world-score{top:27%}}
@media(prefers-reduced-motion:reduce){.pet-world-growth-track>i{transition:none}}
.pet-sync-row{flex-wrap:wrap}

html:has(#pet-world-dialog[open]){overflow:hidden}
.pet-world-learning-target{position:absolute;left:50%;top:32%;transform:translateX(-50%);width:min(360px,calc(100% - 30px));border:2px solid #c7ad77;border-radius:17px;background:#fffcf0f2;padding:10px 14px;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:5px 10px;color:#76592d}.pet-world-learning-target>span{font-size:18px;font-weight:700}.pet-world-learning-target>small{font-size:15px;line-height:1.5;grid-column:1}.pet-world-learning-target>button{grid-column:2;grid-row:1/3;min-height:44px;padding:8px 12px;border-radius:12px;background:#8d995c;color:#fff;font-size:15px}.pet-world-dialog:has(#pet-world-learning-target:not([hidden])) .pet-world-utilities{visibility:hidden}
@media(max-width:760px){.pet-world-learning-target{top:29%;padding:8px 12px}.pet-world-score{top:21%;left:auto;right:14px;transform:none;flex-direction:column;gap:0;padding:5px 8px;font-size:12px}.pet-world-score b{font-size:16px}.pet-world-learning-target>span{font-size:16px}.pet-world-learning-target>small{font-size:14px}.pet-world-learning-target>button{font-size:14px}}
@media(max-height:600px) and (min-width:600px){.pet-world-learning-target{top:13px;left:auto;right:60px;transform:none;width:270px}.pet-world-score{top:105px;left:auto;right:70px;transform:none}}
.pet-world-dialog:has(#pet-world-learning-target:not([hidden])) .pet-world-actions{display:none}
