/* Storybook theatre 3.0. Illustration stays quiet behind the exact game surface. */
body.arena-playing .arena{background-image:url('assets/hall-wide-v30.webp');background-position:center;background-size:cover}
.model-table{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;z-index:1;border-radius:24px}
.match-banner{position:absolute;top:27%;left:6%;right:6%;z-index:3;text-align:center;padding:10px 14px;border-radius:12px;background:#172235ed;color:#fff0bd;border:1px solid #ebce8d;font-size:clamp(16px,3vw,22px);font-weight:900;line-height:1.3;pointer-events:none}
.trophy-stage{display:grid;grid-template-columns:220px 1fr;gap:18px;align-items:center;margin:0 0 24px;padding:12px 0;border-block:1px solid #776987}
.trophy-display{position:relative;width:220px;height:210px;display:grid;place-items:center;background:linear-gradient(155deg,#344255,#182137);border-radius:18px;overflow:hidden}
.trophy-display canvas{width:100%;height:100%;touch-action:none;cursor:grab}.trophy-display canvas:active{cursor:grabbing}.trophy-display img{position:absolute;height:190px;width:auto;pointer-events:none}.trophy-stage h3{font-size:22px;line-height:1.25;color:#fff0bd;margin:0 0 8px}.trophy-stage p{font-size:14px;line-height:1.6;color:#e8e0f0;margin:0 0 10px}.trophy-stage button{min-height:44px;width:auto;margin:0}
#big-character{--idle-angle:4deg;position:relative;transform-origin:50% 85%;transition:transform .45s ease}
#big-character:has(.character-cat){--idle-angle:9deg}#big-character:has(.character-mother){--idle-angle:3deg}
#big-character[data-idle=dance]{animation:pawDance 1.3s ease-in-out infinite}
#big-character[data-idle=knock]{animation:glassKnock 1s ease-in-out 3}
#big-character[data-idle=yawn]{transform:rotate(-8deg) translateY(6px)}
#big-character[data-idle=sleep]{transform:rotate(-75deg) translateX(-12px) scale(.82)}
#big-character[data-idle=sleep]::after{content:'Z z z';position:absolute;top:10%;right:0;font:800 23px var(--font-body,Nunito,sans-serif);color:#e2faff;transform:rotate(75deg);animation:sleepBubble 3s ease-in-out infinite}
@keyframes pawDance{0%,100%{transform:rotate(calc(-1*var(--idle-angle))) translateY(0)}25%{transform:rotate(var(--idle-angle)) translateY(-10px)}50%{transform:rotate(0) translateY(0)}75%{transform:rotate(calc(-1*var(--idle-angle))) translateY(-7px)}}
@keyframes glassKnock{0%,45%,100%{transform:translateZ(0) scale(1)}20%,65%{transform:translateY(-4px) scale(1.045)}}
@keyframes sleepBubble{0%,100%{opacity:.55;translate:0 0}50%{opacity:1;translate:4px -8px}}
.crowd-fan .spectator-motion{filter:drop-shadow(0 9px 4px #090c2866)}
/* Keep the background still while the album or score dialog scrolls. */
html:has(dialog[open]){overflow:hidden;scrollbar-gutter:stable}
@media(max-width:600px) and (orientation:portrait){body.arena-playing .arena{background-image:url('assets/hall-portrait-v30.webp')}.trophy-stage{grid-template-columns:1fr;text-align:center;gap:12px}.trophy-display{width:100%;max-width:270px;justify-self:center;height:200px}.trophy-stage h3{font-size:21px}.match-banner{font-size:16px;padding:8px}}
@media(max-height:560px) and (orientation:landscape){.trophy-stage{grid-template-columns:160px 1fr}.trophy-display{width:160px;height:160px}.trophy-display img{height:150px}.match-banner{font-size:16px;padding:7px}}
@media(prefers-reduced-motion:reduce){#big-character{animation:none!important;transition:none!important;transform:none!important}#big-character[data-idle=sleep]::after{animation:none;transform:none}.crowd-fan .spectator-motion{filter:none}}
