/* ===== v5 點綴：小棲位（perch）。只動 transform／opacity；class 一律 cr-／pc-／pl- 前綴，避免和 v3 小仙女的全域 class 撞名 ===== */
.pc{position:relative;display:block;pointer-events:none;--cs:1;contain:layout style}
.pc .gb-cr{position:absolute;inset:0;pointer-events:none;z-index:2}
.pc .pc-ground{position:absolute;left:0;right:0;bottom:var(--gb,0);height:0;border-top:2px dashed rgba(138,90,20,.28);pointer-events:none}
/* ① 卡片上緣：棲在卡片頂邊（格線要留 row-gap） */
.pc-edge{position:absolute;left:var(--pl,16px);right:var(--pr,16px);bottom:100%;height:var(--ph,58px);margin-bottom:-2px}
/* ② 標題旁邊：桌機在左右留白；手機只留右側小格 */
.sec-h{position:relative;text-align:center;padding:0 calc(var(--side,150px) + 10px);min-height:60px}
.sec-h .pc-side{position:absolute;top:50%;width:var(--side,150px);height:68px;margin-top:-34px}
.sec-h .pc-side.l{left:0}.sec-h .pc-side.r{right:0}
/* ③ 標題行內：版面保留，flex 子項 */
.pg-h{display:flex;align-items:flex-end;gap:12px}
.pg-h>:first-child{flex:1;min-width:0}
.pc-inline{flex:none;width:var(--iw,132px);height:var(--ih,66px)}
/* ④ 小花園帶：全站只有一條（頁尾上方，高 84px） */
.pc-band{height:84px;margin:0 auto;max-width:1160px}
.pc-band .pc-ground{border-top-style:dotted}
/* 植物（點綴用，靜態圖，微微搖） */
.tc-pl{position:absolute;display:block;pointer-events:none;height:var(--ph,56px);bottom:var(--b,0)}
.tc-pl img{display:block;height:100%;width:auto;transform-origin:50% 100%}
html:not(.reduce) .tc-pl img{animation:plsway 4.6s ease-in-out infinite alternate}
html:not(.reduce) .tc-pl:nth-of-type(2n) img{animation-duration:5.6s;animation-delay:-1.4s}
@keyframes plsway{from{transform:rotate(-1.8deg)}to{transform:rotate(1.8deg)}}
html:not(.reduce) .tc-pl.wob img{animation:plwob .8s ease-out}
@keyframes plwob{0%{transform:rotate(0)}20%{transform:rotate(9deg)}45%{transform:rotate(-7deg)}70%{transform:rotate(3deg)}100%{transform:rotate(0)}}
.cast-img{display:block;height:100%;width:auto}
/* 靜態道具圖（相機／野餐籃／水壺）：標題旁點綴，微微晃 */
.pc-prop{position:absolute;bottom:var(--b,3px);display:block;height:var(--ph,46px);pointer-events:none}
.pc-prop .cast-img{height:100%}
html:not(.reduce) .pc-prop .cast-img{animation:propbob 3.4s ease-in-out infinite alternate;transform-origin:50% 100%}
@keyframes propbob{from{transform:rotate(-4deg)}to{transform:rotate(3deg) translateY(-2px)}}
@media (max-width:700px){
 .sec-h{text-align:left;padding:0 calc(var(--sidem,92px) + 8px) 0 0;min-height:56px}
 .sec-h .pc-side{width:var(--sidem,92px);height:60px;margin-top:-30px}.sec-h .pc-side.l{display:none}
 .pc-inline{--iw:92px;--ih:58px}
 .pc-edge{--ph:50px}
}
/* 角色 */
.cr{position:absolute;left:0;top:0;width:calc(var(--w,50px) * var(--cs,1));pointer-events:none;will-change:transform;--dir:1;--rot:0deg}
.cr::after{content:"";position:absolute;left:14%;right:14%;bottom:-3px;height:5px;border-radius:50%;background:rgba(80,50,20,.2);z-index:-1}
.cr-butterfly::after,.cr-bee::after{display:none}
.cr-ladybug .cr-in,.cr-butterfly .cr-in{transform-origin:50% 50%}
.cr-in{display:block;width:100%;transform:scaleX(var(--dir,1)) rotate(var(--rot,0deg));transform-origin:50% 100%}
.cr-bd{display:block;width:100%;transform-origin:50% 100%}
.cr-img{display:block;width:100%;height:auto;user-select:none}
.cr .cr-sw{position:absolute;right:-1px;top:-5px;width:7px;height:10px;border-radius:50% 50% 50% 50%/65% 65% 35% 35%;background:#8fd3f4;border:1px solid #fff;opacity:0}
.cr-say{position:absolute;left:50%;bottom:100%;margin-bottom:0;transform:translate(-50%,6px) scale(.6);opacity:0;white-space:nowrap;background:#fff;border:2px solid #ead9bd;border-radius:12px;padding:2px 8px;font:800 12px/1.3 var(--font,inherit);color:#2b1d16;transition:opacity .15s,transform .2s;z-index:3}
.cr.talk .cr-say{opacity:1;transform:translate(-50%,0) scale(1)}
/* 凍結立正（裝沒事） */
.cr.stiff .cr-in{transform:scaleX(var(--dir,1)) rotate(var(--rot,0deg)) scale(.97,1.07)}
.cr.stiff *{animation-play-state:paused!important}
.cr.stiff .cr-sw{opacity:1}
.cr.hide .cr-bd{transform:scale(.9,.82)}
.cr-bd{transition:transform .25s}
/* 被戳：嚇一跳 */
html:not(.reduce) .cr.cr-hop .cr-bd{animation:crhop .55s cubic-bezier(.3,.7,.4,1)}
@keyframes crhop{0%{transform:translateY(0)}35%{transform:translateY(-12px) scale(.95,1.08)}70%{transform:translateY(0) scale(1.08,.9)}100%{transform:none}}
/* 鴨 */
html:not(.reduce) .cr-duck.walk .cr-bd,html:not(.reduce) .cr-windup.walk .cr-bd{animation:crwaddle .5s ease-in-out infinite alternate}
html:not(.reduce) .cr-duck.happy .cr-bd{animation:crwaddle .24s ease-in-out infinite alternate}
@keyframes crwaddle{from{transform:rotate(-4deg) translateY(0)}to{transform:rotate(4deg) translateY(-2px)}}
html:not(.reduce) .cr-duck.peck .cr-bd{animation:crpeck 1.1s ease-in-out infinite}
@keyframes crpeck{0%,100%{transform:rotate(0)}30%,50%{transform:rotate(20deg) translateY(3px)}}
.cr-duck.swim .cr-in{clip-path:inset(-20% -20% 24% -20%);transform:scaleX(var(--dir,1)) translateY(7px)}
html:not(.reduce) .cr-duck.swim .cr-bd{animation:crbob 1.8s ease-in-out infinite}
@keyframes crbob{50%{transform:translateY(-3px)}}
/* 蝸牛 */
html:not(.reduce) .cr-snail.walk .cr-bd{animation:crcrawl 1.7s ease-in-out infinite;transform-origin:30% 100%}
@keyframes crcrawl{50%{transform:scaleX(1.06) skewX(-2deg)}}
/* 蜜蜂 */
html:not(.reduce) .cr-bee .cr-bd{animation:crbuzz .12s linear infinite alternate}
@keyframes crbuzz{from{transform:translate(-.6px,0) rotate(-2deg)}to{transform:translate(.6px,-1px) rotate(2deg)}}
html:not(.reduce) .cr-bee.rest .cr-in{animation:crhover .6s ease-in-out infinite alternate}
@keyframes crhover{to{transform:scaleX(var(--dir,1)) translateY(-2px)}}
/* 蝴蝶：左右半邊翅膀各自縮放 */
.cr-butterfly .bwl,.cr-butterfly .bwr{display:block}
.cr-butterfly .bwr{position:absolute;inset:0;clip-path:inset(0 0 0 50%)}
.cr-butterfly .bwl{clip-path:inset(0 50% 0 0)}
html:not(.reduce) .cr-butterfly .bwl{animation:crflapl .22s ease-in-out infinite alternate;transform-origin:100% 50%}
html:not(.reduce) .cr-butterfly .bwr{animation:crflapr .22s ease-in-out infinite alternate;transform-origin:0 50%}
html:not(.reduce) .cr-butterfly.rest .bwl,html:not(.reduce) .cr-butterfly.rest .bwr{animation-duration:1.4s}
/* 蝶B 是斜向單翅構圖，不能左右對切；整隻做收翅脈動 */
.cr-butterfly .bwh{display:block;transform-origin:45% 60%}
html:not(.reduce) .cr-butterfly .bwh{animation:crflapw .26s ease-in-out infinite alternate}
html:not(.reduce) .cr-butterfly.rest .bwh{animation-duration:1.6s}
@keyframes crflapw{from{transform:scaleX(1)}to{transform:scaleX(.62)}}
@keyframes crflapl{from{transform:scaleX(1)}to{transform:scaleX(.28)}}
@keyframes crflapr{from{transform:scaleX(1)}to{transform:scaleX(.28)}}
/* 瓢蟲：俯視圖，朝行進方向轉 */
html:not(.reduce) .cr-ladybug.walk .cr-bd{animation:crlegs .28s linear infinite alternate}
@keyframes crlegs{from{transform:translateY(-1px) rotate(-4deg)}to{transform:translateY(1px) rotate(4deg)}}
.cr-ladybug.up .cr-in{transform:scaleX(1) rotate(0deg)}
/* 離屏停動畫、reduced-motion 全靜止 */
.pc:not(.on) *{animation-play-state:paused!important}
html.reduce .pc *,html.reduce .pc-prop *{animation:none!important;transition:none!important}
@media (prefers-reduced-motion:reduce){.pc *,.pc-prop *{animation:none!important;transition:none!important}}
