/* v3 companion: bounded stage, no floating overlay above classroom controls. */
.pet-actor,.pet-actor .puppet-art{user-select:none;-webkit-user-drag:none}.pet-actor .puppet-art{pointer-events:none}
.puppet-art{overflow:hidden;display:block;width:100%;height:100%;filter:drop-shadow(0 8px 7px #40200e18)}
.hero-guide>div{flex:0 0 112px!important;width:112px!important;height:148px}.hero-guide .puppet-art{max-height:none}
.puppet-studio{scroll-margin-top:110px;margin:36px 0;min-width:0}.puppet-title{display:flex;align-items:center;justify-content:space-between;gap:20px}.puppet-title p{max-width:720px}.puppet-title .badge{flex-shrink:0}
.puppet-console{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(280px,1fr);padding:0!important;overflow:hidden;margin-top:20px;gap:0}.pet-board{position:relative;height:438px;isolation:isolate;overflow:hidden;background:radial-gradient(ellipse at 50% 38%,#fff7df 0%,#f2e4c9 52%,#cfdbce 100%);color:#664938}
.pet-board::before,.pet-board::after{content:'';position:absolute;bottom:52px;width:78%;height:125px;background:#b8cdb957;clip-path:polygon(0 100%,23% 20%,40% 55%,60% 0,100% 100%);z-index:-1}.pet-board::before{left:-20%}.pet-board::after{right:-24%;height:155px;background:#b9c9bf55}
.pet-scenery{position:absolute;bottom:17px;left:8%;right:8%;display:flex;align-items:center;gap:16px;font-size:12px;letter-spacing:.15em}.pet-scenery i{flex:1;border-top:1px dashed #947b5655}.pet-ground{position:absolute;bottom:59px;left:10%;right:10%;height:1px;background:#b59b6755;z-index:-1}
.pet-speech{position:absolute;top:16px;left:12px;right:12px;text-align:center;margin:0;font-size:14px;pointer-events:none}.pet-position{position:absolute;width:248px;height:322.4px;bottom:40px;left:50%;transform:translateX(-50%);z-index:1}.pet-facing{height:100%;transform-origin:50% 94%}.pet-actor{display:block;border:0;background:none;padding:0;width:100%;height:100%;touch-action:none;cursor:grab;border-radius:30px;color:inherit}.pet-actor:active{cursor:grabbing}.pet-actor:focus-visible{outline:3px solid #297a79;outline-offset:-8px}.pet-motion{display:block;height:100%;transform-origin:50% 94%}.pet-action-caption{position:absolute;bottom:36px;right:14px;font-size:11px;opacity:.7;pointer-events:none}
.pet-controls{padding:28px;min-width:0;align-self:center}.pet-controls h3{margin:4px 0 18px}.pet-action-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}.pet-action-grid button{font:inherit;color:var(--ink);border:1px solid var(--line);background:var(--card-solid);border-radius:12px;min-height:44px;padding:9px 6px;cursor:pointer;font-size:14px;line-height:1.35}.pet-action-grid button[aria-pressed=true]{background:var(--teal);border-color:var(--teal);color:white;box-shadow:0 3px 0 var(--teal-side)}.pet-options{display:flex;gap:10px;flex-wrap:wrap;margin:20px 0 10px}.pet-options .btn{min-height:44px}.pet-pose-gallery{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;margin-top:20px}.pet-pose-gallery figure{margin:0;padding:12px 12px 16px!important;min-width:0}.pet-pose-gallery svg{height:220px;width:100%}.pet-pose-gallery figcaption{text-align:center;font-size:14px}.pet-pose-gallery figcaption span{font-size:11px;opacity:.5;margin-right:8px}.pet-production{padding:18px 0}.pet-production summary{cursor:pointer;font-weight:600;min-height:44px;padding:8px 0}.pet-production p{max-width:860px;font-size:14px;color:var(--ink-soft)}
.pet-motion[data-action=idle]{animation:pet-breathe 3.5s ease-in-out infinite}.pet-motion[data-action=walk]{animation:pet-step .72s ease-in-out infinite}.pet-motion[data-action=run]{animation:pet-run .4s ease-in-out infinite}.pet-motion[data-action=jump]{animation:pet-jump 1.05s cubic-bezier(.3,0,.25,1) both}.pet-motion[data-action=wave],.pet-motion[data-action=welcome]{animation:pet-wave .75s ease-in-out 2}.pet-motion[data-action=nod]{animation:pet-nod .55s ease-in-out 3}.pet-motion[data-action=think]{animation:pet-think 1.5s ease-in-out 2}.pet-motion[data-action=rest],.pet-motion[data-action=pray]{animation:pet-breathe 4s ease-in-out infinite}.pet-motion[data-action=point]{animation:pet-point .65s ease-out both}.pet-motion[data-action=turn]{animation:pet-turn .7s ease-out both}
@keyframes pet-breathe{50%{transform:translateY(-3px) scaleY(1.008)}}@keyframes pet-step{0%,100%{transform:rotate(-1deg)}50%{transform:translateY(-6px) rotate(1deg)}}@keyframes pet-run{0%,100%{transform:rotate(-3deg)}50%{transform:translateY(-12px) rotate(2deg)}}@keyframes pet-jump{0%,100%{transform:translateY(0)}12%{transform:scale(1.02,.95)}44%{transform:translateY(-58px) rotate(-3deg)}76%{transform:translateY(0) scale(1.04,.96)}90%{transform:translateY(-5px)}}@keyframes pet-wave{25%{transform:rotate(-3deg)}75%{transform:rotate(3deg)}}@keyframes pet-nod{50%{transform:translateY(5px) scaleY(.976)}}@keyframes pet-think{50%{transform:rotate(-4deg)}}@keyframes pet-point{from{transform:translateX(-10px)}to{transform:translateX(0)}}@keyframes pet-turn{from{transform:scaleX(.88)}to{transform:scaleX(1)}}
.pet-board[data-paused=true] .pet-motion{animation:none!important;transform:none!important}html[data-motion=off] .pet-motion{animation:none!important;transform:none!important}html[data-hidden=true] .pet-motion{animation-play-state:paused!important}
html[data-time=night] .pet-board{background:radial-gradient(ellipse at 50% 35%,#667378,#374a58 60%,#263744);color:#f4e1c1}html[data-time=night] .pet-scenery{color:#e6d0ae}.pet-board[data-paused=true] .pet-speech{opacity:.9}
@media(max-width:950px){.puppet-console{grid-template-columns:minmax(0,1fr)}.pet-controls{padding:22px}.puppet-title{display:block}.pet-board{height:426px}.pet-pose-gallery{gap:12px}.pet-pose-gallery svg{height:190px}}
@media(max-width:600px){.puppet-studio{scroll-margin-top:80px}.pet-board{height:367px}.pet-position{width:218px;height:283.4px;bottom:36px}.pet-speech{font-size:12px}.pet-controls{padding:16px}.pet-pose-gallery{grid-template-columns:repeat(2,minmax(0,1fr))}.pet-pose-gallery svg{height:205px}.pet-action-grid{gap:7px}.pet-action-grid button{font-size:13px}.hero-guide>div{flex-basis:94px!important;width:94px!important;height:124px}.pet-position .pet-motion[data-action=jump]{animation-name:pet-jump-small}}
@keyframes pet-jump-small{0%,100%{transform:translateY(0)}15%{transform:scaleY(.95)}44%{transform:translateY(-32px) rotate(-2deg)}78%{transform:scaleY(.97)}}
@media(prefers-reduced-motion:reduce){.pet-motion{animation:none!important;transform:none!important}}
/* 课堂里的小小行者（行路装）：探索册、关卡反馈、AI 向导、地图空结果 */
.passport-guide{flex:0 0 74px;height:96px}.passport-guide svg{width:74px;height:96px}.passport-copy{flex:1 1 220px;min-width:0}.passport-copy p{margin:2px 0 0;color:var(--ink-soft);font-size:.86rem}
.feedback-row{display:flex;align-items:center;gap:12px}.feedback-row .feedback{flex:1;min-width:0}.game-cheer{flex:0 0 auto;width:0;height:92px;transition:width .3s}.game-cheer:not(:empty){width:70px}.game-cheer svg{width:70px;height:92px;animation:pet-jump-small 1s ease-out 1}
.tutor-portrait svg.puppet-art{width:auto;max-width:100%}
.empty-guide{display:grid;justify-items:center;gap:4px}.empty-guide svg{width:84px;height:110px}.empty-guide p{margin:0}
@media(max-width:600px){.passport-guide{flex-basis:60px;height:78px}.passport-guide svg{width:60px;height:78px}.game-cheer:not(:empty){width:54px}.game-cheer svg{width:54px;height:72px}}
/* 3D 像素人偶 */
.pet-motion{position:relative}.voxel-canvas{position:absolute;inset:-6% -14% 0;width:128%!important;height:106%!important;display:block}
.is-voxel .pet-motion{animation:none!important;transform:none!important}
.pet-views{margin:16px 0 4px}.pet-views .kicker{display:block;margin-bottom:6px}.pet-views .segmented{flex-wrap:wrap}.puppet-studio:not(.is-voxel) .pet-views{display:none}
.pet-artwork{margin-top:22px}.pet-artwork summary,.pet-production summary{cursor:pointer;font-weight:600}.pet-artwork .pet-pose-gallery{margin-top:14px}
@media(min-width:951px){.is-voxel .pet-position{width:280px;height:364px;bottom:34px}}
/* 拼豆风：设计室舞台是一块拼豆板 */
.is-voxel .pet-board{background:radial-gradient(circle,rgba(255,255,255,.95) 0 2.1px,rgba(170,150,120,.22) 2.6px 3.4px,transparent 3.9px) 0 0/14px 14px,linear-gradient(180deg,#f7f1e4,#efe5d0)}
.is-voxel .pet-board::before,.is-voxel .pet-board::after{opacity:.55}
html[data-time=night] .is-voxel .pet-board{background:radial-gradient(circle,rgba(255,255,255,.22) 0 2.1px,rgba(0,0,0,.25) 2.6px 3.4px,transparent 3.9px) 0 0/14px 14px,linear-gradient(180deg,#3a4566,#2b3450)}
.figure-style{margin:0 10px 10px 0}
/* 潮玩：柔光摄影棚；手绘动画：手绘天空与草坡 */
.is-voxel[data-figure-style=vinyl] .pet-board{background:radial-gradient(ellipse at 50% 30%,#fffaf3 0%,#f9e9e4 45%,#e9dfef 100%)}
.is-voxel[data-figure-style=vinyl] .pet-board::before,.is-voxel[data-figure-style=vinyl] .pet-board::after{opacity:0}
.is-voxel[data-figure-style=toon] .pet-board{background:radial-gradient(ellipse 30% 12% at 22% 22%,#fff 60%,transparent 62%),radial-gradient(ellipse 22% 9% at 30% 18%,#fff 60%,transparent 62%),radial-gradient(ellipse 26% 10% at 78% 30%,#fffdf6 60%,transparent 62%),linear-gradient(180deg,#8fc3e6 0%,#c9e3ef 55%,#e8f0e2 100%)}
.is-voxel[data-figure-style=toon] .pet-board::before{background:#9cc47d;opacity:.9}.is-voxel[data-figure-style=toon] .pet-board::after{background:#7fb06a;opacity:.9}
html[data-time=night] .is-voxel[data-figure-style=vinyl] .pet-board{background:radial-gradient(ellipse at 50% 30%,#4b5072,#2d3150 70%)}
html[data-time=night] .is-voxel[data-figure-style=toon] .pet-board{background:radial-gradient(circle at 78% 20%,#fff6d0 0 3%,transparent 3.5%),linear-gradient(180deg,#22305a,#3e4f7a 60%,#3b5a52)}

/* atelier-v4: quiet paper studio, legible silhouette, matching hit-test bounds. */
#character-studio .pet-board{height:490px}
#character-studio.is-voxel .pet-position{width:320px;height:416px;bottom:24px;max-width:calc(100% - 20px)}
#character-studio .voxel-canvas{inset:0;width:100%!important;height:100%!important}
#character-studio[data-figure-style=vinyl] .pet-board{background:radial-gradient(ellipse at 44% 25%,#fffcf3 0%,#f1e8d9 64%,#dce2d5 100%)}
#character-studio[data-figure-style=toon] .pet-board{background:radial-gradient(ellipse at 65% 20%,#fff8e8 0%,#e9eee1 40%,#ccdccc 100%)}
#character-studio .pet-action-grid button{border-radius:15px;transition:background .2s,box-shadow .2s}
#character-studio .pet-speech{top:19px;letter-spacing:.04em;color:inherit}
#character-studio .pet-action-caption{bottom:45px}
html[data-time=night] #character-studio .pet-board{background:radial-gradient(ellipse at 50% 30%,#525d60,#303f4b 70%)}
@media(max-width:600px){#character-studio .pet-board{height:406px}#character-studio.is-voxel .pet-position{width:272px;height:354px;bottom:15px}}
