/* 微信小游戏竖屏场景模式：一帧只突出一只角色 */
html,body{min-height:100%;background:#f7f0e8}
body.scene-mode{overflow-x:hidden}
.scene-mode .app-shell{width:100%;max-width:480px;min-height:100vh;margin:0 auto;padding:0 0 18px;background:#fbf7f1;box-shadow:0 0 40px rgba(86,64,43,.12)}
.scene-mode .topbar{height:58px;padding:0 16px;margin:0;background:rgba(255,253,249,.94);position:relative;z-index:3}
.scene-mode .brand strong{font-size:15px}.scene-mode .brand small{font-size:10px}.scene-mode .streak{padding:6px 9px;font-size:10px}.scene-mode .streak b{font-size:16px}
.scene-mode .hero-card{display:none}
.scene-mode .garden-tabs{margin:0;padding:4px 12px 0;background:#fffdf9;gap:3px;position:relative;z-index:3}
.scene-mode .tab{flex:1;padding:8px 8px;font-size:13px}.scene-mode .tab small{font-size:9px}
.scene-mode .panel{padding:0 12px}.scene-mode .panel-heading{margin:10px 3px 10px}.scene-mode .panel-heading h2{font-size:20px}.scene-mode .panel-heading .treat-count{padding:7px 10px}
.scene-mode .tiger-layout,.scene-mode .leopard-layout{display:block}
.scene-mode .tiger-character,.scene-mode .leopard-character{height:48vh;min-height:330px;max-height:510px;border-radius:24px;border:0;box-shadow:none;background:#fff4e7}
.scene-mode .leopard-character{background:#f7f1fb}
.scene-mode .tiger-character img,.scene-mode .leopard-character img{width:100%!important;height:100%!important;left:0!important;top:0!important;object-fit:contain!important;object-position:center bottom!important}
.scene-mode .character-bubble{left:12px;right:12px;bottom:12px;padding:10px 12px;font-size:13px;background:rgba(255,255,255,.92);box-shadow:0 5px 18px rgba(91,67,45,.09)}
.scene-mode .action-card,.scene-mode .diary-card{margin-top:10px;padding:14px;border-radius:20px}.scene-mode .action-card label,.scene-mode .diary-card>label{font-size:12px}.scene-mode textarea{min-height:55px;font-size:13px}.scene-mode .quick-chips{margin:8px 0 10px}.scene-mode .quick-chips button{font-size:10px;padding:6px 8px}.scene-mode .primary-btn{padding:11px 12px;font-size:13px}
.scene-controls{position:absolute;right:12px;top:12px;display:flex;gap:6px;z-index:2}.scene-controls button{background:rgba(255,255,255,.88);color:#a66c3d;border:1px solid #f0d8bf;border-radius:10px;padding:7px 9px;font-size:10px}.leopard-controls button{color:#76618c;border-color:#dfd2ed}.state-think img{animation:tigerThink .8s ease-in-out 3}.state-celebrate img{animation:tigerCelebrate .55s ease-in-out 4}.state-nuzzle img{animation:leopardNuzzle .7s ease-in-out 4}.state-sleep img{animation:leopardSleep 1.1s ease-in-out 3}@keyframes tigerThink{0%,100%{transform:translate(0,0) rotate(0)}50%{transform:translate(-7px,-4px) rotate(-2deg)}}@keyframes tigerCelebrate{0%,100%{transform:translateY(0) scale(1)}50%{transform:translateY(-12px) scale(1.03)}}@keyframes leopardNuzzle{0%,100%{transform:translateX(0) rotate(0)}50%{transform:translateX(11px) rotate(2deg)}}@keyframes leopardSleep{0%,100%{transform:translateY(0) rotate(0)}50%{transform:translateY(7px) rotate(1deg)}}
.scene-mode .level-progress{margin-top:12px;padding-top:10px}.scene-mode .measure-result{margin-top:10px;padding:14px 15px}.scene-mode .measure-result h3{font-size:17px}.scene-mode .measure-result p{font-size:12px}.scene-mode .warehouse,.scene-mode .month-card{margin-top:10px;padding:14px}.scene-mode .warehouse{max-height:180px;overflow:auto}.scene-mode .measure-list{grid-template-columns:1fr 1fr}.scene-mode .month-card{max-height:205px;overflow:auto}.scene-mode footer{padding:14px 15px 0}
@media(min-width:481px){.scene-mode .app-shell{margin-top:18px;border-radius:28px;min-height:calc(100vh - 36px);overflow:hidden}.scene-mode .tiger-character,.scene-mode .leopard-character{height:50vh}}
.pet-spark{position:absolute;pointer-events:none;font-size:20px;z-index:4;animation:sparkUp 1s ease-out forwards}.character-tap{cursor:pointer}.character-tap:active{transform:scale(.99)}@keyframes sparkUp{0%{opacity:0;transform:translateY(8px) scale(.7)}20%{opacity:1}100%{opacity:0;transform:translateY(-56px) scale(1.25)}}
.frame-player>img{display:none!important}
.scene-mode .frame-player{height:48vh;min-height:280px;max-height:430px;overflow:hidden;background:#fff9ef}
.pet-sprite{position:absolute;width:min(100%,340px);aspect-ratio:1;left:50%;top:0;transform:translateX(-50%);background-image:url('assets/characters/pet-atlas-v1.png');background-size:400% 400%;background-repeat:no-repeat;touch-action:none;cursor:grab;outline-offset:-5px;user-select:none;-webkit-user-select:none}
.pet-sprite:active{cursor:grabbing}
.frame-player .character-bubble{pointer-events:none;bottom:10px;z-index:2}
.frame-player .scene-controls{top:auto;bottom:68px}
.frame-player[data-motion=feed] .scene-controls button{opacity:.6}
@media(max-height:700px){.pet-sprite{width:270px}.scene-mode .frame-player{min-height:290px}}
.grown-star{position:absolute;z-index:3;left:50%;top:25%;transform:translate(-50%,-8px) scale(.3) rotate(-22deg);opacity:0;color:#ffd35b;font-size:30px;line-height:1;text-shadow:0 2px 0 #c98a38,0 0 12px #ffe79a;transition:transform .6s cubic-bezier(.2,1.6,.4,1),opacity .3s;pointer-events:none}.grown-star.visible{opacity:1;transform:translate(-50%,0) scale(1) rotate(0);animation:starShine 2.5s ease-in-out infinite}.grown-form .pet-sprite{transform:translateX(-50%) scale(1.08);filter:saturate(1.06)}.grown-form .pet-sprite::after{content:"";position:absolute;inset:0;background:radial-gradient(ellipse at 50% 24%,rgba(255,220,107,.18),transparent 13%);pointer-events:none}.growth-card{margin-top:12px;padding:14px 16px;background:linear-gradient(130deg,#fffaf0,#fffdf9);border-color:#f0dfc6}.growth-head,.growth-foot{display:flex;align-items:center;justify-content:space-between}.growth-head h3{font-size:16px;margin:4px 0 0}.growth-stamp{width:34px;height:34px;display:grid;place-items:center;border-radius:12px;background:#fff0d3;font-size:19px}.growth-card>p{font-size:12px;line-height:1.6;color:#81756c;margin:9px 0}.growth-meter{height:6px;background:#f2e7d8;border-radius:9px;overflow:hidden}.growth-meter span{display:block;height:100%;width:0;background:linear-gradient(90deg,#eea15a,#ffd56b);border-radius:inherit;transition:width .7s ease}.growth-foot{margin-top:9px;font-size:11px;color:#998a7f}.exam-btn{padding:7px 11px;border-radius:10px;background:#ef9b4f;color:white;font-size:11px;font-weight:700}.exam-overlay{position:fixed;z-index:20;inset:0;background:rgba(55,43,39,.46);display:grid;place-items:center;padding:18px}.exam-overlay.hidden{display:none}.exam-card{position:relative;width:min(100%,360px);padding:25px 20px 20px;border-radius:24px;background:#fffdf8;text-align:center;box-shadow:0 18px 50px rgba(40,28,20,.2);animation:examPop .35s ease-out}.exam-close{position:absolute;right:13px;top:11px;background:transparent;color:#9a8b7d;font-size:23px}.exam-icon{font-size:34px}.exam-card h3{font-size:18px;line-height:1.55;margin:9px 0}.exam-subtitle{font-size:12px;color:#96877a}.exam-options{display:grid;gap:8px;margin-top:17px}.exam-options button{padding:11px 12px;border-radius:12px;background:#fff5e7;color:#6d5948;font-size:13px;border:1px solid #f3e2cc}.exam-options button:disabled{opacity:.55}.exam-feedback{min-height:21px;color:#b67437;font-size:12px;margin:12px 0 0}@keyframes examPop{from{opacity:0;transform:translateY(12px) scale(.95)}to{opacity:1;transform:none}}@keyframes starShine{0%,100%{filter:drop-shadow(0 0 1px #ffe9a4);scale:1}50%{filter:drop-shadow(0 0 8px #ffdc75);scale:1.12}}
