/* Idle belongs to deployed and staged creatures, never the shop or collection. */
.pet-visual[data-idle],.combat-unit.active .pet-visual{animation:none!important}
.pet-visual[data-idle=bounce]{--idle-animation:idle-bounce;--idle-duration:6.7s}.pet-visual[data-idle=peek]{--idle-animation:idle-peek;--idle-duration:7.7s}.pet-visual[data-idle=stretch]{--idle-animation:idle-stretch;--idle-duration:8.9s}
.team-pasture .pet-visual[data-idle],.bench-pasture .pet-visual[data-idle],.combat-unit .pet-visual[data-idle]{animation:var(--idle-animation) var(--idle-duration) ease-in-out infinite!important;animation-delay:var(--phase,-1s)!important}
.combat-unit.dead .pet-visual[data-idle]{animation:none!important}.growth-pet .pet-motion{pointer-events:auto;cursor:pointer}
.pet-preview{position:fixed;z-index:1500;width:236px;pointer-events:none;max-height:calc(100svh - 16px);overflow:hidden;filter:drop-shadow(0 9px 15px #14253480)}.pet-preview[hidden]{display:none}
.pet-preview .collectible-card{animation:none;box-shadow:none;border-width:3px;border-radius:15px}.pet-preview .card-portrait{height:min(145px,22svh)}.pet-preview .card-portrait h2{position:absolute;bottom:6px;left:10px;font-size:22px;color:#fff6dd;line-height:1.1;text-shadow:0 2px #173447,1px 0 #173447,-1px 0 #173447;margin:0}
.pet-preview .card-topline{top:6px;left:7px;right:7px;gap:3px}.pet-preview .card-topline span{font-size:10px;padding:2px 5px}.pet-preview .card-creature{transform:rotate(-3deg);transition:none;animation:none}
.pet-preview .card-body{padding:8px 10px 10px}.pet-preview .card-values{padding-bottom:6px;gap:4px}.pet-preview .card-values small{font-size:9px!important}.pet-preview .card-values b{font-size:17px;line-height:21px}.pet-preview .card-body h3{font-size:15px;color:#274553;margin:7px 0 4px}.pet-preview .card-description{font-size:12px;line-height:1.55;margin:0}.pet-preview .mechanic{color:var(--term);font-weight:800;text-decoration:underline;text-underline-offset:2px}
.pet-preview .card-note{display:block;font-size:9px;line-height:1.4;color:#657367;border-top:1px solid #c5c8ac;margin-top:6px;padding-top:5px}
@media(prefers-reduced-motion:reduce){.team-pasture .pet-visual[data-idle],.bench-pasture .pet-visual[data-idle],.combat-unit .pet-visual[data-idle]{animation:none!important}}

/* Remove the legacy 80px reserve portrait cap; fill the available grass slot. */
.bench-pasture .pet-motion .pet-visual{max-height:none!important;height:100%!important}
.form-switcher{margin-top:12px;padding-top:10px;border-top:1px solid #c6c5a9}
.form-switcher>div{display:flex;gap:6px}
.pet-inspector .form-switcher button{flex:1;min-width:0;padding:8px 3px;border:1px solid #9f9b76;border-radius:9px;background:#e1e4cf;color:#344d4e;box-shadow:0 2px #b2b49a;font-size:13px;line-height:1.35}
.pet-inspector .form-switcher button[aria-pressed=true]{background:#214953;color:#fff0bd;border-color:#c59c47;box-shadow:0 2px #b18b43}
.form-switcher button span{display:block;font-size:10px;opacity:.8;margin-top:2px}

/* Stable card nodes preserve animation clocks; reserve scroll space without horizontal overflow. */
dialog.pet-inspector{overflow-x:hidden;scrollbar-gutter:stable both-edges}
.pet-inspector .mechanic-guide{scrollbar-gutter:stable}

/* Clip animated visual overflow locally, leaving the dialog's real content scrollable. */
.pet-inspector .card-stage{min-width:0;width:100%;overflow:hidden;border-radius:22px;box-shadow:0 0 0 2px #5b513c,0 0 0 5px #d8edeb33,0 16px 32px #0007}
.pet-inspector .collectible-card{animation:none;box-shadow:none}

.energy-icon{display:inline-block;width:1.15em;height:1.15em;vertical-align:-.22em;flex-shrink:0;filter:none}
.energy>.energy-icon{width:1em;height:1em;margin-right:5px}
.shop-controls .energy-icon,.sell-zone .energy-icon{margin-left:2px}
.shop-pasture{padding-bottom:32px}
.shop-purchase-cost{position:absolute;bottom:7px;left:0;right:0;display:flex;align-items:center;justify-content:center;gap:3px;font-size:13px;line-height:18px;color:#294534;font-weight:700;white-space:nowrap}
@media(max-width:900px){.shop-purchase-cost{font-size:11px}.shop-pasture{padding-bottom:29px}}
@media(orientation:landscape) and (max-height:500px){.shop-pasture{padding-bottom:24px}.shop-purchase-cost{bottom:3px;font-size:10px;line-height:16px}}
