/* Home Dashboard v4 companion UI */
#pet-side-host{position:fixed;z-index:4;left:max(18px,calc((100vw - 1320px)/2 - 292px));top:50%;width:250px;transform:translateY(-50%);pointer-events:none}
#pet-bottom-host{min-height:0;position:relative;z-index:3}
#pet-lane{pointer-events:auto;display:flex;align-items:center;gap:12px;border-radius:16px;transition:background .25s,border-color .25s;will-change:transform}
#pet-lane[hidden]{display:none}
#pet-side-host #pet-lane{flex-direction:column;text-align:center;padding:15px 10px;background:transparent}
#pet-bottom-host #pet-lane{min-height:116px;margin-top:20px;padding:8px 13px 10px;background:linear-gradient(transparent,#11151df5 34%);align-items:flex-end}
#pet-actor{position:relative;padding:0;border:0;background:transparent;flex-shrink:0;overflow:visible}
#pet-side-host #pet-actor{width:230px;height:230px}
#pet-bottom-host #pet-actor{width:140px;height:140px}
.pet-visual{position:relative;display:block;width:100%;height:100%}
.pet-visual>.pet-main,.pet-visual>.pet-features{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;image-rendering:pixelated;transition:opacity .35s linear;pointer-events:none}
#pet-caption{display:flex;flex-direction:column;gap:4px;min-width:0;color:#aab6c5;font-size:11px}
#pet-caption strong{color:#eef2f8;font-size:13px;font-weight:600}
#pet-caption small{display:flex;align-items:center;justify-content:center;gap:4px}
#pet-bottom-host #pet-caption small{justify-content:flex-start}
.coin-spin{width:19px;height:19px;object-fit:contain;image-rendering:pixelated;vertical-align:middle}
.pet-lane-actions{display:flex;gap:6px}
#pet-side-host .pet-lane-actions{margin-top:5px}
#pet-bottom-host .pet-lane-actions{margin-left:auto;margin-bottom:8px}
#pet-toggle,#pet-admin-toggle{font-size:11px;padding:6px 9px;background:#171a21d9;border-color:#ffffff14}

#pet-panel{width:min(560px,calc(100vw - 24px));max-height:calc(100dvh - 24px);overflow:auto;padding:24px}
#pet-panel .dialog-head,#pet-admin-panel .dialog-head{margin-bottom:12px}
.pet-tabs{display:grid;grid-template-columns:repeat(3,1fr);gap:7px;margin:0 0 14px}
.pet-tabs button{font-size:12px;padding:9px}.pet-tabs button.active{background:#d7ddeb;color:#202938;border-color:#d7ddeb;font-weight:650}
.pet-stage{position:relative;width:132px;height:132px;margin:0 auto 4px;background:none;overflow:visible}
.pet-stage .pet-visual{width:132px;height:132px}.pet-stage .pet-portrait{width:132px;height:132px}
.pet-identity{text-align:center;display:flex;flex-direction:column;gap:3px;margin-bottom:11px}.pet-identity strong{font-size:14px}.pet-identity span{font-size:11px;color:#9ca7b7}
.pet-wallet{display:flex;align-items:center;gap:10px;padding:10px 12px;background:#e6bb6810;border:1px solid #e6bb6824;border-radius:12px;margin:10px 0 14px}.pet-wallet>.coin-spin{width:38px;height:38px}.pet-wallet>div{display:flex;flex-direction:column}.pet-wallet strong{color:#edce90}.pet-wallet span{font-size:10px;color:#aab6c5}
.pet-core-stats{display:grid;grid-template-columns:1fr 1fr;gap:10px}.pet-core-stats>div,.pet-bars label{background:#ffffff08;border:1px solid #ffffff10;border-radius:10px;padding:9px;font-size:11px}.pet-core-stats span{color:#94a1b5}.pet-core-stats strong{float:right}.pet-core-stats small{display:block;color:#8895a9;margin-top:4px}.pet-core-stats meter,.pet-bars meter{width:100%;height:10px;margin-top:7px;accent-color:#8eb8ed}.pet-bars{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin:8px 0 12px}.pet-bars strong{float:right}
.pet-environment{text-align:center;font-size:11px;margin:9px 0 13px}
#pet-body h3{font-size:12px;color:#b7c2d1;margin:15px 0 7px}
.pet-food{display:grid;grid-template-columns:repeat(4,1fr);gap:6px}.pet-food button,.pet-shop-grid button,.shop-item{display:flex;flex-direction:column;align-items:center;gap:4px;min-width:0;padding:8px 4px;text-align:center}.pet-food img,.pet-shop-grid img,.shop-item>img{width:40px;height:40px;object-fit:contain;image-rendering:pixelated}.pet-food b,.pet-shop-grid b,.shop-item b{font-size:10px}.pet-food span,.pet-shop-grid span,.shop-item span{font-size:9px;color:#9da8b8}.pet-food small,.pet-shop-grid small,.shop-item small{font-size:9px;color:#8290a4;line-height:1.35}
.pet-play-row{display:grid;grid-template-columns:1.5fr 1fr;gap:7px}.pet-play-row button{display:flex;align-items:center;justify-content:center;gap:7px;font-size:11px}.pet-play-row img{width:28px;height:28px;image-rendering:pixelated}
.shop-section{margin-top:8px}.pet-shop-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:7px}.shop-item{border:1px solid #383944;border-radius:10px;background:#24252e}.shop-item>div{display:flex;gap:3px}.shop-item button{padding:5px 7px;font-size:9px}
#pet-name-form,#pet-location-form{display:flex;align-items:flex-end;gap:8px;margin:12px 0}.setting-card{border:1px solid #ffffff14;border-radius:12px;padding:12px;margin:12px 0;background:#ffffff05}.setting-card h3{margin-top:0!important}.setting-card p{font-size:11px;color:#9da8b8;line-height:1.5}.setting-card label,#pet-name-form label,#pet-location-form label{font-size:11px;flex:1}.setting-card input,.setting-card select,#pet-name-form input,#pet-location-form input{display:block;width:100%;margin-top:5px}.gender-switch{display:grid;grid-template-columns:1fr 1fr;gap:6px;margin-bottom:10px}.gender-switch .active{background:#d7ddeb;color:#202938}.danger-zone{border-color:#7e4c4533}
.pet-thrown-item,.pet-toy-wave{position:absolute;width:30px;height:30px;object-fit:contain;image-rendering:pixelated;left:50%;top:50%;z-index:8;pointer-events:none}.pet-flying-item{position:fixed;width:36px;height:36px;object-fit:contain;image-rendering:pixelated;z-index:10000;pointer-events:none;filter:drop-shadow(0 3px 5px #0008)}
.evolution-overlay{position:fixed;inset:0;z-index:20000;background:#080a10e8;display:grid;place-items:center;opacity:0;transition:opacity .25s;pointer-events:none}.evolution-overlay.go{opacity:1}.evolution-overlay img{width:190px;height:190px;object-fit:contain;image-rendering:pixelated;filter:brightness(1);animation:evo-glow 1.4s ease-in-out}.evolution-overlay strong{position:absolute;top:72%;font-size:18px}.evo-flash{position:absolute;width:160px;height:160px;border-radius:50%;background:#fff;filter:blur(40px);opacity:.15;animation:evo-flash 1.4s ease-in-out}@keyframes evo-glow{45%{filter:brightness(10);transform:scale(1.08)}65%{filter:brightness(8);transform:scale(.93)}100%{filter:brightness(1);transform:scale(1)}}@keyframes evo-flash{50%{opacity:.8;transform:scale(1.6)}100%{opacity:0;transform:scale(2)}}

#pet-admin-panel{width:min(720px,calc(100vw - 24px));max-height:calc(100dvh - 24px);overflow:auto;padding:24px}#pet-admin-panel details{border:1px solid #ffffff14;border-radius:12px;padding:10px 12px;margin:10px 0;background:#ffffff05}#pet-admin-panel summary{cursor:pointer;font-weight:600;font-size:12px}.pet-admin-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;margin:9px 0}.pet-admin-grid button{font-size:10px;padding:8px 5px}.admin-fields{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:9px 0}.admin-fields label{font-size:10px;color:#a9b4c3}.admin-fields input,.admin-fields select{width:100%;display:block;margin-top:4px;min-height:34px}.admin-invite{display:flex;gap:6px}.admin-invite input{flex:1}.invite-code{margin:10px 0;padding:10px;border-radius:10px;background:#7ec9a110;border:1px solid #7ec9a128;display:flex;flex-direction:column;gap:4px}.invite-code strong{font-family:ui-monospace,monospace;font-size:16px;color:#b9efd4}.invite-code small{font-size:10px;color:#97a7b9}.companion-admin-row{display:grid;grid-template-columns:minmax(130px,1fr) auto auto auto;gap:5px;align-items:center;border-top:1px solid #ffffff0f;padding:7px 0}.companion-admin-row>div{display:flex;flex-direction:column}.companion-admin-row small{color:#8e9bad;font-size:9px}.companion-admin-row button{font-size:9px;padding:6px}

#remote-companions{position:fixed;z-index:4;right:max(18px,calc((100vw - 1320px)/2 - 292px));top:50%;width:250px;transform:translateY(-50%);background:#171920e8;border:1px solid #2e323d;border-radius:14px;padding:11px;box-shadow:0 12px 35px #0004;backdrop-filter:blur(6px)}.remote-head{display:grid;grid-template-columns:auto 1fr auto auto;gap:5px;align-items:center}.remote-head>div{display:flex;flex-direction:column;text-align:center}.remote-head strong{font-size:11px}.remote-head small{font-size:9px;color:#8390a2}.remote-head button{padding:4px 7px;font-size:12px}.remote-pet{display:flex;align-items:center;gap:8px;margin-top:8px}.remote-visual{position:relative;display:block;width:78px;height:78px;flex:0 0 78px}.remote-visual>.pet-main,.remote-visual>.pet-features{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;image-rendering:pixelated}.remote-pet>div{display:flex;flex-direction:column;gap:3px}.remote-pet strong{font-size:11px}.remote-pet span{font-size:9px;color:#93a0b1}.remote-hp{height:4px;background:#333842;border-radius:4px;overflow:hidden;margin-top:5px}.remote-hp i{display:block;height:100%;background:#83c99d}.remote-action{display:block;margin-top:7px;color:#9babc0;font-size:9px;text-align:center}.remote-event-item{position:absolute;width:24px;height:24px;left:0;bottom:4px;object-fit:contain;image-rendering:pixelated;animation:remote-item 1.6s ease-out}.remote-visual.event-play{animation:remote-hop .6s ease 2}.remote-visual.event-feed,.remote-visual.event-heal{animation:remote-pulse .7s ease 2}@keyframes remote-hop{50%{transform:translateY(-5px)}}@keyframes remote-pulse{50%{transform:scale(1.07)}}@keyframes remote-item{0%{transform:translate(-20px,10px);opacity:0}35%{opacity:1}100%{transform:translate(45px,-15px);opacity:0}}.remote-collapsed{width:100%;font-size:10px;padding:8px}

.mascot-anchor{position:relative!important}#gengar-mascot{position:absolute;z-index:7;right:5px;top:-34px;width:48px;height:48px;padding:0;border:0;background:transparent;filter:drop-shadow(0 4px 5px #0008)}#gengar-mascot .mascot-visual{position:relative;display:block;width:48px;height:48px}#gengar-mascot img{position:absolute;inset:0;width:48px;height:48px;object-fit:contain;image-rendering:pixelated}#mascot-dialog{max-width:430px}

.empty-pet{text-align:center}.empty-pet .primary{margin:12px auto}.empty-pet small{color:#8d99ab;font-size:10px}
@media(max-width:1699px){#pet-side-host{position:static;transform:none;width:auto;display:none}#remote-companions{display:none!important}#pet-bottom-host #pet-lane{display:flex}}
@media(min-width:1700px){#pet-bottom-host:empty{display:none}}
@media(max-width:600px){#pet-panel,#pet-admin-panel{padding:17px}.pet-tabs{gap:4px}.pet-tabs button{font-size:10px;padding:8px 3px}.pet-core-stats{grid-template-columns:1fr}.pet-bars{grid-template-columns:1fr}.pet-food{grid-template-columns:repeat(2,1fr)}.pet-play-row{grid-template-columns:1fr}.pet-shop-grid{grid-template-columns:repeat(2,1fr)}.admin-fields{grid-template-columns:1fr 1fr}.pet-admin-grid{grid-template-columns:1fr 1fr}.companion-admin-row{grid-template-columns:1fr 1fr}.companion-admin-row>div{grid-column:1/-1}.pet-stage,.pet-stage .pet-visual,.pet-stage .pet-portrait{width:118px;height:118px}#pet-bottom-host #pet-caption{max-width:115px}}
@media(prefers-reduced-motion:reduce){.evolution-overlay *,.remote-visual,.remote-event-item{animation:none!important}}



/* v4.1 stable companion docking: the bottom slot always keeps its space. */
#pet-bottom-host{min-height:136px;margin-top:18px;background:linear-gradient(180deg,transparent 0%,#11151d8f 42%,#11151df5 100%);border-radius:16px}
#pet-bottom-host #pet-lane{margin-top:0;background:transparent;transition:opacity .22s ease}
@media(min-width:1700px){
  #pet-side-host{display:none!important}
  #pet-bottom-host #pet-lane.side-mode{position:fixed;z-index:5;left:max(18px,calc((100vw - 1320px)/2 - 292px));top:50%;width:250px;min-height:0;margin:0;padding:15px 10px;transform:translateY(-50%);flex-direction:column;text-align:center;align-items:center;background:transparent}
  #pet-bottom-host #pet-lane.side-mode #pet-actor{width:230px;height:230px}
  #pet-bottom-host #pet-lane.side-mode #pet-caption small{justify-content:center}
  #pet-bottom-host #pet-lane.side-mode .pet-lane-actions{margin:5px 0 0}
  #pet-bottom-host #pet-lane.bottom-mode{position:relative;left:auto;top:auto;width:auto;min-height:116px;padding:8px 13px 10px;transform:none;flex-direction:row;text-align:left;align-items:flex-end}
  #pet-bottom-host #pet-lane.bottom-mode #pet-actor{width:140px;height:140px}
  #pet-bottom-host #pet-lane.bottom-mode .pet-lane-actions{margin-left:auto;margin-bottom:8px}
}
.admin-stage-switch{display:grid;grid-template-columns:repeat(3,1fr);gap:7px;margin:8px 0 12px}.admin-stage-switch button{font-size:13px;font-weight:700}.admin-stage-switch button.active{background:#d7ddeb;color:#202938;border-color:#d7ddeb}
.admin-slider-stack{display:grid;gap:10px;margin:10px 0}.admin-slider-stack label{display:block;padding:9px 10px;border:1px solid #ffffff12;background:#ffffff05;border-radius:10px;font-size:10px;color:#a9b4c3}.admin-slider-stack label span{display:flex;justify-content:space-between;margin-bottom:7px}.admin-slider-stack input[type=range]{width:100%;accent-color:#8eb8ed}

/* v4.2: bottom docking waits at the real page end; controls do not fly across the screen. */
#pet-toggle,#pet-admin-toggle{transition:none!important}
#pet-lane.dock-moving .pet-lane-actions{visibility:hidden}


/* v4.3: instant docking, readable bottom bar, always-visible app-user viewer. */
#pet-lane{transition:none!important;will-change:auto!important}
#pet-lane.dock-moving .pet-lane-actions{visibility:visible!important}
#pet-bottom-host{background:linear-gradient(180deg,rgba(15,17,23,.12) 0%,rgba(15,18,26,.94) 35%,rgba(13,16,23,.99) 100%);border:1px solid #ffffff0b;overflow:visible}
#pet-bottom-host #pet-lane{transition:none!important;color:#f3f6fb;align-items:center!important}
#pet-bottom-host #pet-caption{color:#c9d2df;font-size:12px;line-height:1.35;gap:3px}
#pet-bottom-host #pet-caption strong{color:#ffffff;font-size:14px;text-shadow:0 1px 2px #0009}
#pet-bottom-host #pet-caption small{color:#b8c3d2;font-size:11px;opacity:1}
#pet-bottom-host .coin-spin{width:18px;height:18px}
#pet-bottom-host .pet-lane-actions{align-self:center!important;margin-left:auto!important;margin-bottom:0!important}
#pet-toggle,#pet-admin-toggle{transition:none!important;background:#1d212a;border:1px solid #3a404c;color:#eef2f7;border-radius:9px;padding:7px 11px;font-size:10px;box-shadow:none}
#pet-toggle:hover,#pet-admin-toggle:hover{background:#272c36;border-color:#505865}
@media(min-width:1700px){
  #pet-bottom-host #pet-lane.bottom-mode{align-items:center!important;padding:10px 14px;min-height:116px}
  #pet-bottom-host #pet-lane.bottom-mode .pet-lane-actions{margin-left:auto!important;margin-bottom:0!important}
}
#remote-companions{right:18px;width:258px;background:#171a21f2;border-color:#343945;box-shadow:0 14px 36px #0005;color:#eef2f7}
.remote-empty-head{display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid #ffffff10;padding:2px 2px 9px}.remote-empty-head>div{display:flex;flex-direction:column}.remote-empty-head strong{font-size:12px}.remote-empty-head small{font-size:9px;color:#7f8da0;text-transform:uppercase;letter-spacing:.08em}.remote-empty{min-height:142px;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:14px 10px 8px;gap:5px}.remote-empty-icon{display:grid;place-items:center;width:34px;height:34px;border:1px solid #ffffff16;border-radius:10px;color:#8392a8;font-size:17px;margin-bottom:3px}.remote-empty strong{font-size:11px}.remote-empty small{font-size:9px;line-height:1.45;color:#8592a4;max-width:205px}.remote-no-pet{padding:16px 8px 8px;text-align:center;color:#8d9bad;font-size:10px}.remote-head button{background:#20242d;border-color:#3a404d;color:#eaf0f7}.remote-collapsed{background:#171a21f2;border-color:#343945;color:#e8edf4}
@media(max-width:1699px){#remote-companions{display:none!important}}
@media(min-width:1700px){#remote-companions{display:block!important}}

/* v4.4: manual docking only, no automatic scroll choreography. */
.remote-social{display:grid;grid-template-columns:1fr 1fr;gap:5px;margin-top:8px}.remote-social button{font-size:8px;padding:6px 5px;background:#20252f;border:1px solid #39414e;color:#e6edf6;border-radius:7px}.remote-social button:hover{background:#2a303c}
.admin-reset-card{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 0 12px}.admin-reset-card small{font-size:9px;color:#8f9bac;line-height:1.4}.admin-reset-card button{white-space:nowrap}
.remote-trades{margin-top:8px;padding-top:7px;border-top:1px solid #ffffff10;display:grid;gap:5px}.remote-trades>b{font-size:9px;color:#aab8c9}.remote-trades>div{display:grid;grid-template-columns:1fr auto auto;gap:4px;align-items:center}.remote-trades span{font-size:9px;color:#dce5ef}.remote-trades button{padding:3px 6px;font-size:9px}

/* final social + PokéBox pass */
.pet-box-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-top:12px}.pet-box-card{border:1px solid var(--line,#2c313b);border-radius:12px;padding:10px;text-align:center;background:#141820}.pet-box-card .pet-visual{display:grid;place-items:center;height:100px}.pet-box-card .pet-main{max-width:84px;max-height:84px;image-rendering:pixelated}.pet-box-card b,.pet-box-card small{display:block}.pet-box-card small{font-size:10px;color:#9da7b7;margin:3px 0 8px}.pet-box-card button{margin:3px}
#social-dialog{width:min(460px,92vw)}#social-body{display:grid;gap:10px}#social-body label{display:grid;gap:5px;font-size:11px;color:#aeb7c6}#social-body select,#social-body input{background:#11151c;color:#f3f5f8;border:1px solid #303641;border-radius:9px;padding:10px}
.remote-social{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px}.remote-social button{font-size:9px;padding:7px 4px}.remote-trades select{max-width:130px;background:#11151c;color:#f2f4f8;border:1px solid #303641;border-radius:7px;padding:5px}
#pet-social-overlay[hidden]{display:none}#pet-social-overlay{position:fixed;z-index:9999;inset:0;background:#090b10e8;display:grid;place-items:center;pointer-events:none}.social-title{position:absolute;top:16%;font-weight:800;font-size:22px}.social-stage{position:relative;width:min(650px,80vw);height:320px}.social-stage img{position:absolute;top:95px;width:145px;height:145px;object-fit:contain;image-rendering:pixelated;transition:transform 1.1s ease}.social-a{left:12%}.social-b{right:12%}.social-stage.swap .social-a{transform:translateX(300px) rotateY(360deg)}.social-stage.swap .social-b{transform:translateX(-300px) rotateY(-360deg)}.social-stage img.jump{animation:socialJump .65s ease}@keyframes socialJump{40%{transform:translateY(-55px) rotateY(180deg)}80%{transform:translateY(0)}}
.pet-eat-pixel{position:absolute;left:50%;top:50%;width:5px;height:5px;background:#ffd46b;z-index:25;animation:petEatPixel .8s ease-out forwards}@keyframes petEatPixel{to{transform:translate(var(--px),var(--py));opacity:0}}
/* v4.5 final: social animations preserve layered/environmental sprites. */
.social-stage>.social-pet{position:absolute;top:95px;width:145px;height:145px;display:block;transition:transform 1.1s ease;transform-style:preserve-3d}
.social-stage>.social-pet>img{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;image-rendering:pixelated;pointer-events:none}
.social-stage>.social-pet.social-a{left:12%}.social-stage>.social-pet.social-b{right:12%}
.social-stage.swap>.social-pet.social-a{transform:translateX(300px) rotateY(360deg)}.social-stage.swap>.social-pet.social-b{transform:translateX(-300px) rotateY(-360deg)}
.social-stage>.social-pet.jump{animation:socialJump .65s ease}


/* v4.5.3 hotfix: clearer panel animations */
.pet-thrown-item,.pet-toy-wave{width:44px;height:44px;z-index:12;filter:drop-shadow(0 4px 7px #0009)}
.pet-flying-item{width:44px;height:44px;filter:drop-shadow(0 4px 7px #0009)}


/* v4.5.5: centered item animations; toy pivots at the bottom of its handle */
.pet-flying-item{position:fixed!important;z-index:12000!important;object-fit:contain!important;max-width:none!important;max-height:none!important;pointer-events:none!important;image-rendering:pixelated;filter:drop-shadow(0 4px 7px #000a)!important;opacity:1!important}
.pet-toy-wave{position:absolute!important;left:50%!important;top:50%!important;width:50px!important;height:50px!important;max-width:none!important;max-height:none!important;z-index:15!important;object-fit:contain!important;transform-origin:50% 100%!important;pointer-events:none!important;image-rendering:pixelated;filter:drop-shadow(0 3px 5px #0009)!important}
.pet-eat-pixel{left:50%!important;top:50%!important}
\n\n/* v4.5.6 action geometry */
.pet-flying-item{z-index:10000!important;opacity:1!important}
.pet-thrown-item{opacity:1!important}
.pet-toy-wave{position:absolute!important;left:50%;top:50%;width:48px!important;height:48px!important;transform-origin:50% 100%!important;z-index:20!important;pointer-events:none!important;image-rendering:pixelated!important}

/* v4.5.7 */
#pet-panel .pet-stage{overflow:visible!important}.pet-flying-item{position:fixed!important;z-index:14000!important;object-fit:contain!important;pointer-events:none!important;image-rendering:pixelated!important;filter:drop-shadow(0 4px 7px #000b)!important;opacity:1!important}.pet-ball-flight{width:34px!important;height:34px!important}

/* v4.5.8 Eevee/special + synchronized visual effects */
.pet-tabs{grid-template-columns:repeat(5,minmax(0,1fr))}
.time-chip{display:inline-flex;align-self:center;padding:3px 8px;border:1px solid #ffffff18;border-radius:999px;background:#ffffff08;color:#cbd6e5!important;font-size:10px!important}
.eevee-items{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.eevee-items button{display:flex;flex-direction:column;align-items:center;gap:4px;padding:9px 6px}.eevee-items img{width:46px;height:46px;object-fit:contain;image-rendering:pixelated}.eevee-items small{font-size:9px;color:#94a1b5}.locked-path{padding:10px;border:1px solid #8db8ff2b;background:#6e9de80d;border-radius:10px}.orb-card{position:relative;text-align:center}.orb-card>img{width:64px;height:64px;object-fit:contain;image-rendering:pixelated;filter:drop-shadow(0 5px 12px #7057c688)}.orb-card.used{border-color:#7c2929;background:#4a101033}.orb-card.used>img{filter:grayscale(.7) brightness(.55) sepia(.3) hue-rotate(300deg)}
.full-evolution{opacity:1!important;transition:none!important}.full-evolution .evo-old,.full-evolution .evo-new{position:absolute;width:min(34vw,260px);height:min(34vw,260px);object-fit:contain;image-rendering:pixelated;z-index:2;animation:none!important}.full-evolution .evo-orb{position:absolute;width:260px;height:260px;border-radius:50%;background:radial-gradient(circle,#fff 0 23%,#dce9ffbb 34%,#bca6ff55 58%,transparent 72%);filter:blur(12px);z-index:1}.full-evolution .evo-flash{inset:0;width:auto;height:auto;border-radius:0;background:white;filter:none;animation:none!important;z-index:4}.full-evolution strong{z-index:5;top:auto;bottom:14%;letter-spacing:.04em}
.shiny-spark{position:fixed;z-index:22000;width:8px;height:8px;background:#fff6b0;box-shadow:0 0 8px #fff,0 0 15px #ffd966;clip-path:polygon(50% 0,61% 38%,100% 50%,61% 62%,50% 100%,39% 62%,0 50%,39% 38%);animation:shinyBurst 2.116s ease-out forwards;pointer-events:none}@keyframes shinyBurst{0%{transform:translate(-50%,-50%) scale(.2);opacity:0}15%{opacity:1}70%{transform:translate(calc(-50% + var(--sx)),calc(-50% + var(--sy))) rotate(160deg) scale(1)}100%{transform:translate(calc(-50% + var(--sx)),calc(-50% + var(--sy))) rotate(260deg) scale(.2);opacity:0}}
.orb-overlay{position:fixed;inset:0;z-index:21000;display:grid;place-items:center;background:#070812e8;pointer-events:none}.orb-flight{position:absolute;width:76px;height:76px;object-fit:contain;image-rendering:pixelated;z-index:3;filter:drop-shadow(0 0 18px #bb9cff)}.orb-pet{position:relative;width:240px;height:240px}.orb-pet img{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;image-rendering:pixelated}.orb-new{opacity:0}
.hatch-reveal-sprite{object-fit:contain;image-rendering:pixelated;filter:brightness(0) saturate(0)}
.companion-admin-row{grid-template-columns:minmax(180px,1fr) repeat(5,auto)}.companion-admin-row code{font-size:9px;color:#b9efd4;user-select:all;overflow-wrap:anywhere}.companion-admin-row>div{min-width:0}
@media(max-width:650px){.pet-tabs{grid-template-columns:repeat(5,1fr)}.pet-tabs button{padding:8px 3px;font-size:10px}.eevee-items{grid-template-columns:repeat(2,1fr)}}

#pet-social-overlay.complete{pointer-events:auto}.social-complete{position:absolute;bottom:11%;display:flex;flex-direction:column;align-items:center;gap:10px;padding:12px 18px;border:1px solid #ffffff25;border-radius:12px;background:#151923ee;box-shadow:0 12px 35px #0008}.social-complete strong{font-size:14px}.social-complete button{min-width:110px;background:#d9e3f5;color:#202a3a;border-color:#d9e3f5;font-weight:700}
/* v4.5.8 observer evolution/shiny feedback */
.remote-visual.event-toy,.remote-visual.event-social-play{animation:remote-hop .6s ease 2}.remote-visual.event-evolve{animation:remote-evolve 1.65s ease both}.remote-visual.event-shiny{animation:remote-shine 1.65s ease both}.remote-visual.event-evolve.event-shiny{animation:remote-evolve 1.65s ease both,remote-shine 1.65s ease both}@keyframes remote-evolve{0%,100%{transform:scale(1)}35%{transform:scale(.9)}62%{transform:scale(1.12)}78%{transform:scale(.96)}}@keyframes remote-shine{0%,100%{filter:brightness(1)}32%{filter:brightness(4) saturate(.2);box-shadow:0 0 0 transparent}58%{filter:brightness(1.4);box-shadow:0 0 18px #fff7b8aa}78%{filter:brightness(2.2)}}

/* v4.5.9 graphics/action hotfix */
.pet-stage-ball{position:absolute!important;z-index:45!important;pointer-events:none!important;object-fit:contain!important;image-rendering:pixelated!important;filter:drop-shadow(0 3px 5px #000b)!important;max-width:none!important;max-height:none!important}
.pet-food-burst{position:absolute!important;z-index:46!important;width:14px!important;height:14px!important;object-fit:contain!important;image-rendering:pixelated!important;pointer-events:none!important;transform:translate(-50%,-50%);animation:petFoodBurst .9s ease-out forwards}
@keyframes petFoodBurst{0%{transform:translate(-50%,-50%) scale(.45);opacity:1}75%{transform:translate(calc(-50% + var(--bx)),calc(-50% + var(--by))) rotate(140deg) scale(.72);opacity:1}100%{transform:translate(calc(-50% + var(--bx)),calc(-50% + var(--by) + 18px)) rotate(220deg) scale(.35);opacity:0}}
.ditto-special{margin-top:10px;padding:10px;border:1px solid #ffffff18;border-radius:10px;background:#ffffff05}.ditto-special h4{margin:0 0 5px}.ditto-special p{margin:0 0 9px;color:#aeb9c8;font-size:10px;line-height:1.45}.ditto-special .row{display:flex;gap:7px;flex-wrap:wrap}.ditto-shiny-toggle{display:flex!important;align-items:center;gap:7px}.ditto-shiny-toggle input{width:auto!important}

/* v4.6.3 base observer/admin polish */
.user-admin-section{margin-top:12px!important;border:1px solid #5b6e8d!important;border-radius:12px!important;background:#111722!important;padding:10px!important}.user-admin-section>summary{cursor:pointer;font-weight:800;color:#eaf2ff;font-size:13px}.user-admin-section[open]>summary{margin-bottom:9px}
#companion-admin-list{display:grid;gap:8px}.companion-admin-row{border:1px solid #ffffff16;border-radius:10px;padding:8px;background:#0d121a}.companion-admin-row button{white-space:nowrap}
.remote-event-item{position:absolute!important;z-index:40!important;width:28px!important;height:28px!important;object-fit:contain!important;image-rendering:pixelated!important;pointer-events:none!important;left:50%!important;top:58%!important;animation:remoteEventOnce 1.25s ease-out forwards!important}
@keyframes remoteEventOnce{0%{transform:translate(-120%,-10%) scale(.75);opacity:0}18%{opacity:1}70%{transform:translate(-50%,-75%) scale(1);opacity:1}100%{transform:translate(-50%,-110%) scale(.45);opacity:0}}


/* v4.6.3 base UX controls */
.rename-pencil{appearance:none!important;border:0!important;background:transparent!important;color:inherit!important;padding:2px 5px!important;margin:0 0 0 4px!important;min-width:0!important;width:auto!important;height:auto!important;font-size:.72em!important;line-height:1!important;vertical-align:middle!important;opacity:.72;cursor:pointer}.rename-pencil:hover{opacity:1}.rename-inline{width:min(190px,60vw)!important;display:inline-block!important;padding:5px 7px!important;margin:0!important;font:inherit!important}.rename-save,.rename-cancel{min-width:30px!important;width:30px!important;height:30px!important;padding:0!important;margin-left:4px!important}.special-toggle{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:12px!important;padding:10px!important;margin:8px 0 12px!important;border:1px solid #ffffff1c!important;border-radius:11px!important;background:#ffffff07!important}.special-toggle span{display:flex;flex-direction:column;gap:2px}.special-toggle small{color:#98a6b9;font-size:10px}.special-toggle input{width:22px!important;height:22px!important;min-width:22px!important;margin:0!important}

/* v4.6.3 stronger shiny/reveal feedback. */
.shiny-flash-layer{position:absolute!important;inset:8%!important;z-index:50!important;pointer-events:none!important;border-radius:50%!important;background:radial-gradient(circle,#fff 0 16%,#fff7b9cc 30%,#dce9ff77 54%,transparent 73%)!important;filter:blur(2px)!important;transform-origin:center!important}

/* v4.6.4 reveal privacy + larger centered reveal art */
.full-evolution .evo-old,.full-evolution .evo-new{
  width:min(50vw,380px)!important;
  height:min(56vh,380px)!important;
  max-width:88vw!important;
  max-height:58vh!important;
}
.full-evolution .evo-orb{width:min(46vw,360px)!important;height:min(46vw,360px)!important}
.hatch-overlay{
  position:fixed;inset:0;z-index:23000;display:grid;place-items:center;
  background:radial-gradient(circle at center,#303543 0,#11141bf2 34%,#080a0ff8 72%);
  overflow:hidden;pointer-events:none;
}
.hatch-overlay .hatch-reveal-sprite{
  position:relative!important;z-index:2!important;width:min(52vw,390px)!important;height:min(58vh,390px)!important;
  max-width:88vw!important;max-height:60vh!important;object-fit:contain!important;image-rendering:pixelated!important;
}
.hatch-overlay .hatch-glow{position:absolute;width:min(48vw,350px);height:min(48vw,350px);border-radius:50%;background:radial-gradient(circle,#fff 0 16%,#f7f0c6aa 34%,#cbd7ff55 55%,transparent 73%);filter:blur(4px)}
.hatch-overlay strong{position:absolute;bottom:12%;z-index:4;font-size:18px;letter-spacing:.04em;text-shadow:0 2px 12px #000}

/* v4.8 battle, sprite navigation and admin Pokémon manager */
.pet-tabs{grid-template-columns:repeat(6,minmax(0,1fr));gap:6px}
.pet-tabs button{display:flex;align-items:center;justify-content:center;gap:6px;min-width:0;white-space:nowrap}
.pet-tabs button img{width:24px;height:24px;object-fit:contain;image-rendering:pixelated;flex:0 0 24px}
.remote-empty-head strong:before,.remote-head>div strong:before{content:"";display:inline-block;width:18px;height:18px;margin-right:5px;vertical-align:-5px;background:url('/assets/ui/freunde.png') center/contain no-repeat;image-rendering:pixelated}
@media(max-width:760px){.pet-tabs{grid-template-columns:repeat(3,1fr)}.pet-tabs button{font-size:9px;padding:7px 3px;gap:3px}.pet-tabs button img{width:21px;height:21px}}

.battle-home>p,.battle-card>p{color:#aeb9ca;font-size:11px;line-height:1.45}
.battle-home details{margin-top:10px;border:1px solid #ffffff16;border-radius:11px;padding:9px;background:#ffffff04}
.battle-home details>summary{cursor:pointer;font-weight:750;font-size:12px;color:#edf3ff}
.battle-picker{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:10px 0}
.battle-picker label{display:flex;flex-direction:column;gap:4px;color:#95a2b5;font-size:9px}
.battle-picker select,.battle-home select,.battle-home input{width:100%;min-width:0;background:#10151e;border:1px solid #333b49;border-radius:8px;color:#edf2fa;padding:8px}
.battle-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}.battle-head h2{margin:0}.battle-head small{display:block;color:#8f9bad;font-size:9px;margin-bottom:3px}.battle-head>b{white-space:nowrap;color:#e4d092}
.battle-auras{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:10px 0}
.aura-chip{--aura:#d7ddeb;display:flex;flex-direction:column;padding:7px 9px;border:1px solid #ffffff1c;border-radius:10px;background:#ffffff05;box-shadow:inset 0 0 18px color-mix(in srgb,var(--aura) 8%,transparent)}
.aura-chip b{color:var(--aura);font-size:11px}.aura-chip small{font-size:8px;color:#9da9b9}.aura-chip.champion{border-color:color-mix(in srgb,var(--aura) 78%,white);box-shadow:0 0 14px color-mix(in srgb,var(--aura) 28%,transparent),inset 0 0 22px color-mix(in srgb,var(--aura) 12%,transparent)}.aura-chip.none{opacity:.5}
.battle-stage{position:relative;display:grid;grid-template-columns:1fr 1fr;gap:12px;align-items:end;min-height:330px;padding:18px 14px 14px;border:1px solid #ffffff12;border-radius:14px;background:radial-gradient(ellipse at 50% 88%,#2b3c2a55,transparent 53%),linear-gradient(180deg,#111722,#151a23);overflow:hidden}
.battle-mon{position:relative;z-index:3;display:flex;flex-direction:column;align-items:center;text-align:center;min-width:0}.battle-mon.foe{transform:none}.battle-mon.foe>b,.battle-mon.foe>small,.battle-mon.foe>progress,.battle-mon.foe>span{transform:none}
.battle-mon .pet-stage{width:min(16vw,190px);height:min(16vw,190px);min-width:130px;min-height:130px;margin:0 auto 5px;background:transparent;border:0;overflow:visible!important}.battle-mon .pet-stage>.pet-visual,.battle-mon .pet-stage>.pet-main,.battle-mon .pet-stage>.pet-features{max-width:100%;max-height:100%}
.battle-mon b{font-size:12px}.battle-mon small,.battle-mon span{font-size:9px;color:#9ca8b8}.battle-mon progress{width:min(94%,190px);height:8px;margin:5px 0;accent-color:#83d498}
.battle-moves{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-top:10px}.battle-moves button{display:flex;flex-direction:column;align-items:flex-start;justify-content:center;min-height:58px;text-align:left}.battle-moves b{font-size:11px}.battle-moves small{font-size:8px;color:#9ca7b8}
.battle-log{list-style:none;padding:0;margin:10px 0 0;display:grid;gap:4px}.battle-log li{padding:5px 7px;border-radius:7px;background:#ffffff05;color:#aeb9c9;font-size:9px}.battle-wait{color:#e7d084!important;text-align:center}.battle-request{margin:10px 0;padding:10px;border:1px solid #ffffff18;border-radius:11px;background:#ffffff04}.battle-result{display:flex;flex-direction:column;margin:10px 0;padding:10px;border:1px solid #ffffff16;border-radius:10px;background:#ffffff05}.battle-result b{font-size:15px}.battle-result small{font-size:9px;color:#a2adbd}
.battle-fx-layer{position:absolute;inset:0;z-index:6;pointer-events:none}.battle-fx{position:absolute;left:50%;top:45%;width:82px;height:82px;border-radius:50%;transform:translate(-50%,-50%);animation:webFxPop .8s ease-out forwards}@keyframes webFxPop{0%{opacity:0;transform:translate(-50%,-50%) scale(.2)}25%{opacity:1}100%{opacity:0;transform:translate(-50%,-50%) scale(1.55)}}
.aura-arrow{position:absolute;z-index:12;bottom:7%;width:11px;height:20px;opacity:0;background:var(--aura);clip-path:polygon(50% 0,100% 45%,72% 45%,72% 100%,28% 100%,28% 45%,0 45%);filter:drop-shadow(0 0 5px var(--aura));animation:webAuraRise 4.15s ease-out forwards}.aura-arrow.champion{width:13px;height:24px;filter:drop-shadow(0 0 6px #fff9) drop-shadow(0 0 11px var(--aura))}@keyframes webAuraRise{0%{transform:translateY(22px) scale(.72);opacity:0}20%{opacity:1}100%{transform:translateY(-125px) scale(1.22);opacity:0}}
/* Move effects are intentionally visually distinct, while staying lightweight. */
.fx-tackle,.fx-scratch,.fx-quick{background:radial-gradient(circle,#fff 0 14%,#cfd8e655 26%,transparent 64%);box-shadow:0 0 0 3px #fff6 inset}
.fx-leaf,.fx-grass,.fx-vine{background:conic-gradient(from 20deg,#8ee576,#2f9d58,#d8ff9e,#2f9d58,#8ee576);clip-path:polygon(50% 0,62% 35%,100% 45%,68% 60%,73% 100%,50% 74%,25% 100%,31% 61%,0 44%,38% 34%)}
.fx-fire,.fx-flame,.fx-burn{background:radial-gradient(circle at 50% 70%,#fff2a5 0 13%,#ff8f32 30%,#e83822 53%,transparent 72%);clip-path:polygon(50% 0,67% 28%,86% 50%,73% 90%,50% 100%,25% 88%,13% 54%,31% 31%)}
.fx-water,.fx-wave,.fx-bubble{background:radial-gradient(circle at 35% 30%,#e9fbff 0 9%,#69c7ff 20%,#2678df 53%,transparent 70%);box-shadow:20px 15px 0 -13px #73d9ff,-22px 19px 0 -15px #a6eaff}
.fx-electric,.fx-thunder,.fx-spark{background:#ffe95e;clip-path:polygon(46% 0,82% 0,59% 33%,87% 33%,28% 100%,42% 55%,14% 55%);filter:drop-shadow(0 0 10px #ffe44f)}
.fx-ghost,.fx-shadow,.fx-curse{background:radial-gradient(circle,#c27aff 0 13%,#6f35a9 32%,#241338 62%,transparent 73%);box-shadow:0 0 22px #8c45c9}
.fx-psychic,.fx-mind{background:repeating-radial-gradient(circle,#ffb3ff 0 5px,#b56ee8 6px 11px,#4d2b87 12px 17px,transparent 18px 22px)}
.fx-dark,.fx-bite{background:radial-gradient(circle,#983a7b 0 12%,#2a1938 40%,#050609 66%,transparent 72%);box-shadow:0 0 0 4px #71316c88 inset}
.fx-fairy,.fx-charm{background:conic-gradient(#fff,#ffbfe9,#b9dcff,#fff7bd,#fff);clip-path:polygon(50% 0,61% 37%,100% 50%,61% 63%,50% 100%,39% 63%,0 50%,39% 37%)}
.fx-ice,.fx-frost{background:linear-gradient(135deg,#e9ffff,#79dafa 43%,#9bcbff 58%,transparent 60%);clip-path:polygon(50% 0,61% 36%,86% 14%,68% 41%,100% 50%,68% 59%,86% 86%,61% 64%,50% 100%,39% 64%,14% 86%,32% 59%,0 50%,32% 41%,14% 14%,39% 36%)}
.fx-ground,.fx-earth,.fx-rock{background:radial-gradient(ellipse,#d4a46f 0 20%,#8d5e3e 45%,transparent 69%);box-shadow:-25px 14px 0 -20px #c08a56,24px 9px 0 -19px #9b6844}
.fx-dragon{background:conic-gradient(#73f0ca,#3f7de2,#9e47db,#73f0ca);clip-path:polygon(50% 0,64% 32%,100% 24%,72% 51%,93% 82%,58% 66%,50% 100%,42% 66%,7% 82%,28% 51%,0 24%,36% 32%)}
.fx-heal{background:radial-gradient(circle,#fff 0 12%,#7affad 22%,#26b36b55 52%,transparent 72%);box-shadow:0 0 20px #6fffa1}
.fx-normal{background:radial-gradient(circle,#fff 0 15%,#d7d7d7 32%,transparent 70%)}
.admin-pokemon-manager hr{border:0;border-top:1px solid #ffffff17;margin:14px 0}.admin-pokemon-manager h4{margin:0 0 8px}.admin-pokemon-manager .checkline{align-self:end;padding-bottom:7px}
.everstone-card>img{display:block;width:58px;height:58px;object-fit:contain;image-rendering:pixelated;margin:6px auto;filter:drop-shadow(0 5px 10px #0008)}
@media(max-width:620px){.battle-stage{min-height:250px;padding:10px 6px}.battle-mon .pet-stage{min-width:100px;min-height:100px;width:42vw;height:42vw}.battle-picker,.battle-auras{grid-template-columns:1fr}.battle-moves{grid-template-columns:1fr 1fr}}
/* Exact v4.7 move-FX names shared with mobile. */
.fx-tackle,.fx-quick,.fx-extreme{border:4px solid #fff8;box-shadow:0 0 22px #fff7}.fx-bite,.fx-foul{border:6px dashed #8d6aa5;box-shadow:inset 0 0 18px #4c285f}.fx-leaf,.fx-leafblade,.fx-seed,.fx-energy,.fx-drain,.fx-synthesis{background:radial-gradient(circle,#b9ff83 0 15%,#58d35c88 16% 45%,transparent 46%);box-shadow:0 0 20px #6cff6c}.fx-ember,.fx-firefang,.fx-flame,.fx-charge{background:radial-gradient(circle,#fff49a,#ff8a32 38%,#e13022aa 62%,transparent 65%);box-shadow:0 0 24px #ff643f}.fx-watergun,.fx-bubble,.fx-aquatail,.fx-hydro,.fx-pulse{background:radial-gradient(circle,#e3fbff,#55bfff88 42%,transparent 65%);border:3px solid #70d8ff}.fx-lick,.fx-hex,.fx-shadowball{background:radial-gradient(circle,#f09cff,#7139b988 45%,transparent 68%);box-shadow:0 0 25px #a35af7}.fx-sludge{background:radial-gradient(circle,#e5a1ff,#7b2b8f99 45%,transparent 70%)}.fx-spark,.fx-spark2,.fx-bolt,.fx-volt,.fx-discharge{background:repeating-conic-gradient(#fff57a 0 8deg,transparent 8deg 22deg);box-shadow:0 0 24px #ffea45}.fx-swift{background:conic-gradient(from 20deg,#fff3a8,transparent,#fff3a8,transparent,#fff3a8);clip-path:polygon(50% 0,61% 35%,98% 38%,68% 59%,79% 96%,50% 72%,20% 96%,31% 59%,2% 38%,39% 35%)}.fx-psychic,.fx-psybeam,.fx-confusion{border:5px double #ef8cff;box-shadow:0 0 25px #b45cff,inset 0 0 18px #ef8cff88}.fx-darkpulse{background:radial-gradient(circle,#7c6092,#261b36 50%,transparent 70%);box-shadow:0 0 22px #3d274f}.fx-moonlight,.fx-kiss,.fx-moonblast,.fx-gleam{background:radial-gradient(circle,#fff,#ffa9df99 35%,#ad8bff66 60%,transparent 68%);box-shadow:0 0 26px #ffc6ed}.fx-icywind,.fx-icebeam,.fx-freeze{background:conic-gradient(#eaffff,#64dbff,#eaffff,#64a8ff,#eaffff);clip-path:polygon(50% 0,62% 35%,100% 50%,62% 65%,50% 100%,38% 65%,0 50%,38% 35%)}.fx-transform{border:4px dotted #ff9dda;box-shadow:0 0 20px #ff7bc8}.fx-dragonpulse,.fx-ascent{background:conic-gradient(#d5a2ff,#7c4ce5,#3b244f,#d5a2ff);box-shadow:0 0 24px #9d60ff}.fx-air{border:4px solid #d9f7ff;border-left-color:transparent;border-right-color:transparent;box-shadow:0 0 20px #a9efff}
/* Per-move identity pass: every move FX key gets its own silhouette/detail. */
.fx-tackle{border-style:solid}.fx-quick{border-style:dashed;transform:translate(-50%,-50%) rotate(45deg)}.fx-extreme{border-width:7px;box-shadow:0 0 30px #fff,0 0 0 2px #aee7ff inset}
.fx-bite{clip-path:polygon(0 24%,35% 40%,50% 0,65% 40%,100% 24%,78% 55%,100% 76%,65% 60%,50% 100%,35% 60%,0 76%,22% 55%)}.fx-foul{border-radius:18%;transform:translate(-50%,-50%) rotate(18deg)}
.fx-leaf{clip-path:ellipse(32% 50% at 50% 50%)}.fx-leafblade{clip-path:polygon(46% 0,61% 0,54% 40%,90% 87%,78% 100%,49% 58%,22% 100%,10% 88%,44% 40%)}.fx-seed{background:radial-gradient(circle at 28% 30%,#eaff9d 0 8%,transparent 9%),radial-gradient(circle at 68% 64%,#d4ff74 0 10%,transparent 11%),radial-gradient(circle,#69ca4d 0 25%,transparent 55%)}.fx-energy{border-radius:50%;box-shadow:0 0 26px #79ff79,0 0 0 7px #adff8a55 inset}.fx-drain{background:repeating-radial-gradient(circle,#b8ff91 0 7px,#4fc76a 8px 12px,transparent 13px 18px)}.fx-synthesis{background:conic-gradient(from 0deg,#fff9a7,#88e86f,#fff9a7,#88e86f,#fff9a7);clip-path:polygon(50% 0,61% 38%,100% 50%,61% 62%,50% 100%,39% 62%,0 50%,39% 38%)}
.fx-ember{width:48px;height:48px}.fx-firefang{clip-path:polygon(0 15%,33% 36%,48% 0,55% 38%,100% 15%,72% 52%,100% 85%,58% 65%,50% 100%,41% 65%,0 85%,28% 52%)}.fx-flame{clip-path:polygon(50% 0,68% 29%,62% 46%,84% 35%,75% 74%,50% 100%,26% 74%,17% 38%,39% 49%,32% 28%)}.fx-charge{border:5px solid #ff8a32;border-left-color:transparent;border-radius:50%;background:#ff4d2233}
.fx-watergun{width:105px;height:28px;border-radius:999px;transform:translate(-50%,-50%) rotate(-12deg)}.fx-bubble{background:radial-gradient(circle at 28% 28%,#fff 0 8%,#6ed8ff88 10% 22%,transparent 24%),radial-gradient(circle at 70% 66%,#fff 0 6%,#70cfff88 8% 25%,transparent 27%)}.fx-aquatail{clip-path:ellipse(47% 20% at 50% 50%);transform:translate(-50%,-50%) rotate(-32deg)}.fx-hydro{width:96px;height:96px;box-shadow:0 0 35px #42baff,0 0 0 8px #a9eeff66 inset}.fx-pulse{background:repeating-radial-gradient(circle,#a8efff 0 4px,#4cbcff 5px 10px,transparent 11px 17px)}
.fx-lick{border-radius:65% 35% 70% 30%;transform:translate(-50%,-50%) rotate(28deg);background:linear-gradient(135deg,#f6a7ff,#7e3fb6)}.fx-hex{clip-path:polygon(50% 0,90% 25%,90% 75%,50% 100%,10% 75%,10% 25%);box-shadow:0 0 30px #9c51ff}.fx-shadowball{border-radius:50%;border:5px solid #d08cff;background:radial-gradient(circle,#160822,#4a1879 45%,#a551d455 70%)}.fx-sludge{border-radius:42% 58% 35% 65%;filter:drop-shadow(8px 8px 0 #5a246a55)}
.fx-spark{clip-path:polygon(45% 0,75% 0,58% 34%,88% 34%,25% 100%,39% 55%,10% 55%)}.fx-spark2{clip-path:polygon(20% 0,45% 0,34% 35%,58% 35%,4% 100%,18% 58%,0 58%,70% 0,95% 0,78% 38%,100% 38%,50% 100%,64% 58%,45% 58%)}.fx-bolt{width:48px;height:100px;clip-path:polygon(45% 0,78% 0,58% 36%,85% 36%,20% 100%,38% 56%,12% 56%)}.fx-volt{border:6px solid #fff56d;border-radius:50%;background:repeating-conic-gradient(#fff56d 0 5deg,transparent 6deg 19deg)}.fx-discharge{width:108px;height:108px;background:repeating-conic-gradient(#fff25f 0 4deg,transparent 5deg 20deg)}
.fx-swift{width:90px;height:90px}.fx-psychic{background:repeating-radial-gradient(circle,#ffdbff 0 4px,#d572ef 5px 10px,#6841b9 11px 15px,transparent 16px 20px)}.fx-psybeam{width:110px;height:24px;border-radius:999px;transform:translate(-50%,-50%) rotate(9deg);background:linear-gradient(90deg,#ff8cd9,#a777ff,#77d7ff)}.fx-confusion{border-radius:50%;border:5px dotted #ef8cff;background:#a25be844}
.fx-darkpulse{background:repeating-radial-gradient(circle,#6a4a7f 0 5px,#24132e 6px 11px,transparent 12px 18px)}.fx-moonlight{border-radius:50%;clip-path:circle(48%);box-shadow:-20px 0 0 -5px #171a21 inset,0 0 26px #fff4ca}.fx-kiss{clip-path:polygon(8% 40%,30% 15%,50% 34%,70% 15%,92% 40%,50% 88%);background:#ff83c7}.fx-moonblast{border-radius:50%;border:6px solid #ffd8f3;box-shadow:0 0 32px #c9a7ff,inset 0 0 20px #fff}.fx-gleam{width:95px;height:95px;background:repeating-conic-gradient(#fff 0 8deg,#ffbde5 9deg 15deg,transparent 16deg 28deg)}
.fx-icywind{width:110px;height:45px;clip-path:polygon(0 40%,20% 10%,38% 48%,58% 5%,78% 46%,100% 18%,100% 70%,77% 55%,57% 92%,37% 55%,18% 90%,0 65%)}.fx-icebeam{width:118px;height:20px;border-radius:999px;transform:translate(-50%,-50%) rotate(-8deg);background:linear-gradient(90deg,#fff,#7fe8ff,#7ba9ff)}.fx-freeze{width:92px;height:92px}
.fx-transform{border-radius:50%;background:conic-gradient(#ff8bd4,#ae7aff,#72d7ff,#ff8bd4);border:4px dotted #fff}.fx-dragonpulse{border-radius:42%;background:repeating-radial-gradient(circle,#d6a7ff 0 5px,#754de0 6px 12px,#272047 13px 17px,transparent 18px 24px)}.fx-ascent{width:100px;height:100px;clip-path:polygon(50% 0,64% 32%,100% 24%,72% 51%,93% 82%,58% 66%,50% 100%,42% 66%,7% 82%,28% 51%,0 24%,36% 32%)}.fx-air{width:115px;height:55px;border-radius:50%;transform:translate(-50%,-50%) rotate(-15deg)}

/* v4.8 battle/overlay cleanup */
#pet-panel{width:min(980px,calc(100vw - 32px))!important;max-height:calc(100dvh - 24px)!important;display:grid;grid-template-columns:170px minmax(0,1fr);grid-template-rows:auto minmax(0,1fr);column-gap:18px;overflow:hidden!important;padding:22px!important}
#pet-panel>.dialog-head{grid-column:1/-1;grid-row:1;margin-bottom:14px!important}
#pet-panel>.pet-tabs{grid-column:1;grid-row:2;display:flex!important;flex-direction:column;gap:7px;margin:0!important;align-self:start;position:sticky;top:0}
#pet-panel>.pet-tabs button{width:100%;justify-content:flex-start!important;padding:11px 12px!important;font-size:12px!important;gap:10px!important;min-height:48px;text-align:left}
#pet-panel>.pet-tabs button img{width:32px!important;height:32px!important;flex:0 0 32px!important;image-rendering:pixelated;object-fit:contain;transform:translateZ(0)}
#pet-panel>#pet-body{grid-column:2;grid-row:2;min-width:0;overflow:auto;padding-right:5px}
#battle-setup-dialog{width:min(900px,calc(100vw - 28px));max-height:calc(100dvh - 28px);overflow:auto;padding:22px}
.battle-hub{display:grid;gap:14px}.battle-hero{padding:18px;border:1px solid #ffffff14;border-radius:16px;background:radial-gradient(circle at 80% 20%,#4c5f8f22,transparent 42%),#ffffff05}.battle-hero h3{font-size:24px!important;margin:3px 0 5px!important}.battle-hero p{margin:0!important}
.battle-mode-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.battle-mode-card{display:flex;align-items:center;gap:13px;padding:16px;text-align:left;min-height:98px;border-radius:15px;background:linear-gradient(135deg,#222734,#171b23);border:1px solid #ffffff18}.battle-mode-card:hover{border-color:#91a8d255;transform:translateY(-1px)}.battle-mode-card img{width:54px;height:54px;object-fit:contain;image-rendering:pixelated;flex:0 0 54px}.battle-mode-card span{display:flex;flex-direction:column;gap:4px;flex:1}.battle-mode-card b{font-size:15px}.battle-mode-card small{font-size:10px;color:#9ca8ba;line-height:1.35}.battle-mode-card>strong{font-size:10px;color:#cfd9ea;letter-spacing:.08em}
.battle-choice-grid,.battle-difficulty-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.battle-choice,.battle-difficulty{display:flex;flex-direction:column;gap:4px;align-items:flex-start;text-align:left;padding:14px;border-radius:12px}.battle-difficulty.locked{opacity:.52;filter:saturate(.3)}
.battle-team-slots{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px;margin:12px 0}.battle-slot{min-height:108px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;padding:8px;text-align:center;border:1px dashed #ffffff24;background:#0f131a}.battle-slot.filled{border-style:solid;background:#ffffff06}.battle-slot.aura{border-color:#a278d755}.battle-slot img{width:58px;height:58px;object-fit:contain;image-rendering:pixelated}.battle-slot span{display:flex;flex-direction:column;gap:2px}.battle-slot small{font-size:9px;color:#95a2b5}.slot-plus{font-size:28px!important;line-height:1;color:#7d8ba0}.battle-picker-head{display:flex;justify-content:space-between;align-items:center;margin:14px 0 7px}.battle-picker-head small{font-size:9px;color:#8997aa}
.battle-roster-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;max-height:360px;overflow:auto;padding:2px}.battle-roster-card{display:flex;align-items:center;gap:8px;padding:8px;text-align:left}.battle-roster-card.selected{outline:2px solid #8fb7ff}.battle-roster-sprite{width:54px;height:54px;display:grid;place-items:center;flex:0 0 54px}.battle-roster-sprite img{max-width:54px;max-height:54px;image-rendering:pixelated;object-fit:contain}.battle-roster-card>span:last-child{display:flex;flex-direction:column}.battle-roster-card small{font-size:9px;color:#92a0b3}.battle-setup-footer{display:flex;gap:8px;justify-content:flex-end;margin-top:14px}.battle-setup-footer>*{min-width:120px}.battle-wager{display:flex;flex-direction:column;gap:5px;margin-top:12px}.battle-wager input{max-width:240px}.battle-wager small{color:#8f9bad;font-size:9px}
.battle-incoming{display:grid;gap:7px}.battle-incoming h4{margin:0}.battle-invite{display:flex;align-items:center;justify-content:space-between;gap:10px;text-align:left;padding:12px 14px}.battle-invite span{display:flex;flex-direction:column}.battle-invite small{font-size:9px;color:#94a0b1}.battle-invite strong{font-size:10px}.battle-wait-card{padding:10px 12px;border:1px solid #ffffff12;border-radius:10px;background:#ffffff05;color:#9eabba;font-size:10px}
.bot-progress-strip{display:grid;grid-template-columns:repeat(4,1fr);gap:6px}.bot-progress-strip span{display:flex;flex-direction:column;align-items:center;padding:8px;border-radius:9px;border:1px solid #ffffff10;background:#ffffff04}.bot-progress-strip .locked{opacity:.45}.bot-progress-strip b{font-size:10px}.bot-progress-strip small{font-size:8px;color:#8e9aaa}
.battle-arena{display:grid;gap:10px}.battle-topbar{display:flex;justify-content:space-between;align-items:center;padding:10px 12px;border:1px solid #ffffff12;border-radius:12px;background:#10151d}.battle-topbar>div:first-child{display:flex;flex-direction:column}.battle-topbar span{font-size:9px;color:#8f9cad}.battle-topbar b{font-size:15px}.battle-score{font-weight:700}.battle-auras{display:grid;grid-template-columns:1fr 1fr;gap:8px}.aura-chip{min-height:48px}
.battle-stage{position:relative;display:grid;grid-template-columns:1fr 1fr;align-items:end;min-height:340px;border-radius:18px;padding:18px 24px 48px;background:radial-gradient(ellipse at 25% 85%,#38583c55,transparent 35%),radial-gradient(ellipse at 75% 85%,#38583c55,transparent 35%),linear-gradient(#101720,#17211c);overflow:hidden}.battle-stage:before{content:"";position:absolute;left:3%;right:3%;bottom:38px;height:2px;background:linear-gradient(90deg,transparent,#8aaa7b44,transparent)}.battle-mon{position:relative;z-index:2;display:flex;flex-direction:column;gap:8px;align-items:center}.battle-mon .pet-stage{width:min(30vw,230px);height:min(30vw,230px);margin:0!important}.battle-mon .pet-stage img{width:100%;height:100%;object-fit:contain;image-rendering:pixelated}.battle-hud{width:min(100%,290px);display:grid;grid-template-columns:1fr auto;gap:2px 8px;align-items:center;padding:8px 10px;border:1px solid #ffffff12;border-radius:11px;background:#0c1118dd;backdrop-filter:blur(5px)}.battle-hud>div{display:flex;flex-direction:column}.battle-hud b{font-size:12px}.battle-hud small,.battle-hud span{font-size:9px;color:#9ba7b7}.battle-hud progress{grid-column:1/-1;height:8px;margin:4px 0 0}.battle-message{position:absolute;left:50%;bottom:10px;transform:translateX(-50%);z-index:8;padding:6px 12px;border-radius:999px;background:#0a0e14d9;border:1px solid #ffffff14;color:#dbe3ef;font-size:10px;white-space:nowrap}
.battle-command{display:grid;grid-template-columns:minmax(0,1.6fr) minmax(190px,.8fr);gap:10px}.battle-moves{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:0}.battle-moves button{--type:#8f97a6;display:grid;grid-template-columns:1fr auto auto;gap:8px;align-items:center;min-height:64px;text-align:left;padding:10px 12px;border-color:color-mix(in srgb,var(--type) 65%,#222);background:linear-gradient(135deg,color-mix(in srgb,var(--type) 22%,#171b22),#151922)}.battle-moves button>b{}.battle-moves button span{display:flex;flex-direction:column}.battle-moves button small{font-size:8px;color:#b7c1cf}.battle-moves button em{font-style:normal;font-size:13px;font-weight:700;text-align:center}.battle-moves button em small{display:block;font-size:6px;font-weight:500;letter-spacing:.06em}.type-normal{--type:#a8a8a8!important}.type-grass{--type:#64bd57!important}.type-fire{--type:#e7613c!important}.type-water{--type:#4f95e8!important}.type-electric{--type:#e8c73e!important}.type-ice{--type:#73d4db!important}.type-ghost{--type:#775c9b!important}.type-psychic{--type:#db5e8c!important}.type-dark{--type:#66574f!important}.type-fairy{--type:#df86b8!important}.type-poison{--type:#9d58ae!important}.type-dragon{--type:#7257d8!important}.type-flying{--type:#89a5df!important}.type-ground{--type:#c6a15a!important}.battle-log{list-style:none;padding:8px;margin:0;display:flex;flex-direction:column;gap:5px;max-height:136px;overflow:auto;border:1px solid #ffffff10;border-radius:10px;background:#0e1218}.battle-log li{font-size:9px;color:#aab4c2;padding:3px 4px}.battle-between{text-align:center;padding:32px 18px;border:1px solid #ffffff13;border-radius:14px;background:#ffffff05}.battle-between h3{font-size:22px!important}.battle-between .primary{min-width:180px}
.battle-result-screen{padding:16px;border:1px solid #ffffff18;border-radius:14px;background:linear-gradient(135deg,#1b222d,#11151c);text-align:center}.battle-result-screen.win{box-shadow:inset 0 0 35px #5ebc6a14}.battle-result-screen.lose{box-shadow:inset 0 0 35px #b85a5a12}.result-emblem{font-size:28px}.battle-result-screen h3{font-size:21px!important;margin:3px 0!important}.battle-result-screen p{margin:3px 0 10px!important}.battle-result-screen ul{list-style:none;padding:0;margin:8px auto;max-width:420px;display:grid;gap:5px}.battle-result-screen li{display:grid;grid-template-columns:1fr auto;gap:4px;text-align:left;padding:6px 8px;border-radius:8px;background:#ffffff06}.battle-result-screen li small{grid-column:1/-1}.unlock-banner{padding:8px;border-radius:8px;background:#d7b94a1c;border:1px solid #d7b94a45;color:#efd773;font-size:10px}
.battle-mon.intro-hidden{opacity:0;transform:translateY(20px) scale(.82)}.battle-mon.send-out{animation:battleSendOut .9s cubic-bezier(.2,.8,.2,1)}@keyframes battleSendOut{0%{opacity:0;transform:translateY(25px) scale(.45);filter:brightness(3)}55%{opacity:1;filter:brightness(2)}100%{transform:none;filter:brightness(1)}}.battle-stage.intro-running .battle-moves{pointer-events:none}.aura-arrow.champion{width:14px!important;height:25px!important;filter:drop-shadow(0 0 6px #fff) drop-shadow(0 0 13px var(--aura))!important}.champion-aura-ring{position:absolute;left:50%;top:52%;width:76%;aspect-ratio:1;border:3px solid var(--aura);border-radius:50%;transform:translate(-50%,-50%) scale(.3);opacity:0;box-shadow:0 0 22px var(--aura),inset 0 0 20px var(--aura);animation:champRing 4.75s ease-out forwards;pointer-events:none}@keyframes champRing{0%{opacity:0;transform:translate(-50%,-50%) scale(.3) rotate(0)}22%{opacity:.9}72%{opacity:.55}100%{opacity:0;transform:translate(-50%,-50%) scale(1.35) rotate(110deg)}}
@media(max-width:760px){#pet-panel[open]{display:block!important;width:min(96vw,720px)!important;padding:14px!important;overflow:auto!important}#pet-panel>.pet-tabs{position:static;display:flex!important;flex-direction:row!important;overflow-x:auto;scroll-snap-type:x mandatory;margin-bottom:10px!important}#pet-panel>.pet-tabs button{flex:0 0 118px;width:auto!important;scroll-snap-align:start;padding:8px!important}#pet-panel>.pet-tabs button img{width:28px!important;height:28px!important;flex-basis:28px!important}.battle-command{grid-template-columns:1fr}.battle-team-slots{grid-template-columns:1fr 1fr}.battle-roster-grid{grid-template-columns:1fr 1fr}.battle-stage{min-height:300px;padding-left:8px;padding-right:8px}.battle-mon .pet-stage{width:min(38vw,180px);height:min(38vw,180px)}}

/* v4.8 modal hardening: closed dynamic dialogs must never leak into page flow. */
dialog:not([open]){display:none!important}
dialog .dialog-head{position:relative;z-index:30}
dialog .dialog-head .close{position:relative;z-index:40;pointer-events:auto;touch-action:manipulation}
.battle-countdown{position:absolute;inset:0;z-index:25;display:grid;place-items:center;background:#080b10a8;backdrop-filter:blur(2px);font-size:clamp(64px,12vw,128px);font-weight:900;letter-spacing:-.06em;text-shadow:0 0 24px #fff8;pointer-events:auto}
.battle-aura-glow{position:absolute;inset:13%;border-radius:50%;pointer-events:none;z-index:-1;background:radial-gradient(circle,color-mix(in srgb,var(--aura) 38%,transparent),transparent 66%);filter:drop-shadow(0 0 18px var(--aura));animation:battleAuraGlow 1.7s ease-in-out infinite alternate}
@keyframes battleAuraGlow{from{opacity:.45;transform:scale(.9)}to{opacity:.9;transform:scale(1.08)}}
.aura-arrow{width:14px!important;height:28px!important;filter:drop-shadow(0 0 5px #fff) drop-shadow(0 0 11px var(--aura))!important}
.battle-between-actions{display:flex;gap:8px;justify-content:center;flex-wrap:wrap}

.battle-items{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;margin-bottom:7px}.battle-items button{display:flex;justify-content:space-between;align-items:center;gap:6px;padding:8px 9px;min-height:38px}.battle-items button b{font-size:9px}.battle-items button small{font-size:8px;color:#9da9b9}

/* Shared battle visuals: one authoritative visual layer. */
#pet-panel{
  --pet-theme:#667184;
  background:
    linear-gradient(145deg,color-mix(in srgb,var(--pet-theme) 13%,#171b22),#11151b 64%)!important;
  border-color:color-mix(in srgb,var(--pet-theme) 28%,#2b313a)!important;
}
#pet-panel .pet-portrait,.pet-identity,.setting-card,.care-card{
  border-color:color-mix(in srgb,var(--pet-theme) 20%,#2b313a)!important;
}
#battle-live-dialog{width:min(1500px,96vw)!important;max-width:none!important;height:min(920px,94dvh);max-height:94dvh;padding:18px!important;overflow:hidden!important}
#battle-live-dialog .dialog-head{margin-bottom:10px}#battle-live-body{height:calc(100% - 54px);overflow:auto;min-height:0}
#battle-live-body .battle-arena-live{min-height:100%;grid-template-rows:auto auto minmax(360px,1fr) auto}
#battle-live-body .battle-stage{min-height:420px}
#battle-live-body .battle-mon .pet-stage{width:min(25vw,300px)!important;height:min(25vw,300px)!important;transform:none!important}
/* Sprites face each other: player left faces right; opponent right faces left. */
.battle-mon{transform:none!important}.battle-mon .pet-stage{transform:none!important}.battle-mon .pet-main,.battle-mon .battle-event-sprite{transform:scaleX(-1)!important}.battle-mon.foe .pet-main,.battle-mon.foe .battle-event-sprite{transform:none!important}
.battle-event-sprite{position:absolute;inset:0;width:100%!important;height:100%!important;object-fit:contain;image-rendering:pixelated;z-index:20;pointer-events:none}
.battle-ball-flight{position:absolute;z-index:26;left:50%;top:58%;width:46px;height:46px;object-fit:contain;image-rendering:pixelated;pointer-events:none;filter:drop-shadow(0 5px 8px #000b)}
.aura-chip{display:grid;gap:2px}.aura-chip .aura-description{display:block!important;white-space:normal;line-height:1.25;opacity:.9;max-width:34ch}
/* Aura is deliberately readable instead of a near-instant flash. */
.aura-arrow{animation-duration:4.15s!important}.champion-aura-ring{animation-duration:4.75s!important}
.battle-aura-glow{animation-duration:2.4s!important}
.battle-mon.send-out{animation-duration:.9s!important}.battle-mon.switch-in{animation:battleSecondLife 1.05s ease both}@keyframes battleSecondLife{0%{opacity:.15;filter:brightness(3);transform:scale(.55)}55%{opacity:1;filter:brightness(1.8);transform:scale(1.08)}100%{filter:brightness(1);transform:scale(1)}}
.battle-transform-picker{position:fixed;inset:0;z-index:24000;display:grid;place-items:center;padding:22px;background:#05080dcc;backdrop-filter:blur(7px)}.battle-transform-picker>section{width:min(680px,94vw);max-height:86dvh;overflow:auto;background:#121821;border:1px solid #ffffff1f;border-radius:18px;padding:18px;box-shadow:0 24px 80px #000b}.battle-transform-picker .battle-roster-grid{margin:12px 0}.battle-transform-picker>section>button:last-child{width:100%}
@media(max-width:760px){#battle-live-dialog{width:98vw!important;height:96dvh;padding:10px!important}#battle-live-body .battle-stage{min-height:310px}#battle-live-body .battle-mon .pet-stage{width:min(38vw,210px)!important;height:min(38vw,210px)!important}}

/* v4.9.2 battle status feedback */
.battle-status-row{display:inline-flex;gap:4px;margin-left:6px;vertical-align:middle}.battle-status{display:inline-flex;align-items:center;justify-content:center;min-width:27px;height:16px;padding:0 5px;border-radius:5px;font-size:8px!important;font-weight:900;letter-spacing:.4px;color:#fff;box-shadow:0 1px 5px #0008}.status-burn{background:#d95630}.status-poison{background:#9250b9}.status-paralysis{background:#c7a900;color:#171300}.status-confusion{background:#e36aac}.battle-status-burst{position:absolute;z-index:34;left:50%;top:22%;transform:translate(-50%,-50%);padding:6px 10px;border-radius:9px;background:#10151ee8;border:1px solid #ffffff2c;font:900 10px/1 system-ui;color:#fff;white-space:nowrap;pointer-events:none;animation:battleStatusBurstW 1.35s ease-out forwards}.battle-status-burst.burn,.battle-status-burst.tick-burn{box-shadow:0 0 18px #ff653f}.battle-status-burst.poison,.battle-status-burst.tick-poison{box-shadow:0 0 18px #b06ce5}.battle-status-burst.paralysis{box-shadow:0 0 18px #ffe14e}.battle-status-burst.confusion{box-shadow:0 0 18px #ff78d1}.battle-status-burst.transform{box-shadow:0 0 18px #fff}@keyframes battleStatusBurstW{0%{opacity:0;transform:translate(-50%,-30%) scale(.75)}18%{opacity:1;transform:translate(-50%,-50%) scale(1.06)}72%{opacity:1}100%{opacity:0;transform:translate(-50%,-100%) scale(.95)}}
.health-name{color:color-mix(in srgb,#ff354d var(--hp-danger,0%),#f3f6fb);transition:color .3s ease}
.health-name-critical{animation:health-name-critical .7s ease-in-out infinite alternate}
@keyframes health-name-critical{from{text-shadow:0 0 2px #ff354d66}to{text-shadow:0 0 9px #ff354dcc,0 0 16px #ff354d66}}
@media(prefers-reduced-motion:reduce){.health-name-critical{animation:none;text-shadow:0 0 5px #ff354d99}}


/* Compact admin picker and read-only trainer profiles */
.admin-species-picker{grid-template-columns:minmax(130px,1fr) minmax(0,1.5fr)!important}.admin-species-picker label{min-width:0}
.peer-profile-dialog{width:min(760px,calc(100vw - 24px));max-height:min(88dvh,900px);overflow:auto;padding:20px;border:1px solid #ffffff20;border-radius:18px;background:#151922;color:#edf2fa;box-shadow:0 24px 80px #000c}.peer-profile-dialog::backdrop{background:#05070bd1;backdrop-filter:blur(5px)}.peer-profile-dialog>header{display:flex;justify-content:space-between;align-items:flex-start;gap:14px;margin-bottom:16px}.peer-profile-dialog>header h2{margin:3px 0;font-size:22px}.peer-profile-dialog>header small,.peer-profile-dialog>header span{color:#9ba9bb}.peer-profile-dialog>header button{font-size:24px;line-height:1;padding:6px 12px}.profile-pokemon-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:10px}.profile-pokemon-card{display:grid;grid-template-columns:100px minmax(0,1fr);align-items:center;gap:12px;min-width:0;padding:10px;border:1px solid #ffffff14;border-radius:14px;background:#ffffff06}.profile-pokemon-card .pet-stage{height:100px!important;width:100px!important;margin:0!important;background:#11151c!important;border-radius:12px!important}.profile-pokemon-card .pet-stage img{max-width:86px!important;max-height:86px!important}.profile-pokemon-info{display:grid;gap:5px;min-width:0;font-size:11px}.profile-pokemon-info>span{color:#aab5c4;line-height:1.35}.profile-hp{display:block;height:6px;border-radius:99px;background:#ffffff18;overflow:hidden}.profile-hp>i{display:block;height:100%;border-radius:inherit;background:linear-gradient(90deg,#ed6572,#9bdc98)}.profile-name{padding:0;border:0;background:transparent;color:inherit;font-size:inherit;font-weight:700;text-align:left;cursor:pointer}.profile-name:hover{color:#b9efd4;text-decoration:underline}.profile-hint{opacity:.75}
@media(max-width:600px){.admin-species-picker{grid-template-columns:1fr!important}.peer-profile-dialog{padding:14px}.profile-pokemon-grid{grid-template-columns:1fr}.profile-pokemon-card{grid-template-columns:86px minmax(0,1fr);padding:8px}.profile-pokemon-card .pet-stage{width:86px!important;height:86px!important}.profile-pokemon-card .pet-stage img{max-width:76px!important;max-height:76px!important}}

.profile-pokemon-card .pet-stage{display:flex!important;align-items:center!important;justify-content:center!important;overflow:hidden!important;position:relative!important}.profile-pokemon-card .pet-stage>.pet-main,.profile-pokemon-card .pet-stage>.pet-features{position:absolute!important;inset:0!important;width:100%!important;height:100%!important;max-width:none!important;max-height:none!important;object-fit:contain!important}


/* Home-only celestial backdrop behind the active Pokémon. */
#pet-bottom-host{position:relative;isolation:isolate;overflow:hidden;background:#101722}
#pet-celestial-sky{position:absolute;z-index:0;inset:0;overflow:hidden;border-radius:inherit;pointer-events:none;opacity:.94;--night-progress:0;--twilight-progress:0}
#pet-celestial-sky svg{display:block;width:100%;height:100%;min-height:136px}
.pet-sky-fill{fill:url(#pet-sky-day)}.pet-sky-twilight-overlay{fill:url(#pet-sky-twilight);opacity:var(--twilight-progress);transition:opacity 90s linear}.pet-sky-night-overlay{fill:url(#pet-sky-night);opacity:var(--night-progress);transition:opacity 90s linear}
.pet-sky-stars{fill:#e4ecff;opacity:var(--night-progress);transition:opacity 90s linear}.pet-sky-stars .pet-star-pixel{fill:#e4ecff;opacity:var(--twinkle-dim,.28);transform-box:fill-box;transform-origin:center;shape-rendering:crispEdges}.pet-sky-path{fill:none;stroke:#dbe7ff12;stroke-width:1;stroke-dasharray:2 7}.pet-sky-horizon{fill:none;stroke:#dbe3f018;stroke-width:1}
.pet-celestial{opacity:0;transition:transform 15s linear,opacity .7s ease}.pet-celestial.is-visible{opacity:1}.pet-sun-halo{fill:url(#pet-sun-halo)}.pet-sun-texture,.pet-moon-texture{image-rendering:pixelated;overflow:visible}.pet-sun-texture{filter:drop-shadow(0 0 4px #ffe284d9) drop-shadow(0 0 11px #ffc44d99)}.pet-moon-glow{fill:url(#pet-moon-halo)}.pet-moon-texture{filter:drop-shadow(0 0 2px #e6ecff55);mix-blend-mode:screen}.pet-celestial.no-illumination .pet-moon-texture{opacity:0}.pet-celestial.no-illumination .pet-moon-glow{opacity:0}
.pet-celestial.solar-eclipse .pet-moon-texture{opacity:1;filter:brightness(.12) saturate(.2) drop-shadow(0 0 1px #dbe5f566);mix-blend-mode:normal}.pet-celestial.solar-eclipse .pet-moon-glow{opacity:0}.pet-celestial.blood-moon .pet-moon-texture{opacity:1;filter:sepia(1) saturate(5) hue-rotate(320deg) brightness(.72) drop-shadow(0 0 5px #ff482655)}.pet-celestial.blood-moon .pet-moon-glow{fill:#b7252533;opacity:.8}
@media(prefers-reduced-motion:reduce){.pet-sky-stars .pet-star-pixel{animation:none}}
#pet-bottom-host #pet-lane{position:relative;z-index:1;background:transparent!important}#pet-bottom-host .widget-tools{z-index:3}

/* Animated weather layers for the Home-only pet backdrop. */
#pet-celestial-sky .pet-weather-clouds{opacity:var(--cloud-opacity,0);transition:opacity 1.8s ease}
#pet-celestial-sky .pet-cloud-plane{mix-blend-mode:normal;transition:opacity 1.8s ease;}
#pet-celestial-sky .pet-cloud-plane{filter:brightness(1.04);transition:opacity 1.8s ease,filter 3s ease}
#pet-celestial-sky[data-phase="twilight"] .pet-cloud-plane{filter:brightness(.72) saturate(.78)}
#pet-celestial-sky[data-phase="night"] .pet-cloud-plane{filter:brightness(.2) saturate(.5)}
#pet-celestial-sky .pet-cloud-plane image{image-rendering:pixelated}
#pet-celestial-sky .pet-cloud-drift{animation:none!important;will-change:transform}
#pet-celestial-sky .pet-weather-fog{opacity:var(--fog-opacity,0);transition:opacity 2.2s ease;mix-blend-mode:screen}
#pet-celestial-sky .pet-fog-horizon{fill:url(#pet-fog-horizon)}#pet-celestial-sky .pet-fog-veil{fill:url(#pet-fog-veil);animation:pet-fog-drift 32s ease-in-out infinite alternate}
#pet-celestial-sky .pet-weather-sheet{pointer-events:none;transition:opacity 1.4s ease}
#pet-celestial-sky .pet-weather-rain{opacity:var(--rain-opacity,0)}#pet-celestial-sky .pet-weather-rain-secondary{opacity:calc(var(--rain-opacity,0)*.34)}#pet-celestial-sky .pet-weather-rain-tertiary{opacity:calc(var(--rain-opacity,0)*.2)}
#pet-celestial-sky .pet-weather-snow{opacity:var(--snow-opacity,0)}#pet-celestial-sky .pet-weather-snow-secondary{opacity:calc(var(--snow-opacity,0)*.34)}#pet-celestial-sky .pet-weather-snow-tertiary{opacity:calc(var(--snow-opacity,0)*.22)}
@keyframes pet-cloud-drift{from{transform:translateX(0)}to{transform:translateX(-480px)}}
@keyframes pet-fog-drift{from{transform:translateX(-7px)}to{transform:translateX(8px)}}
@media(prefers-reduced-motion:reduce){#pet-celestial-sky .pet-fog-veil{animation:none}}

/* Season scenery, darker storm cloud cover, and lightning kept behind the clouds. */
.pet-sky-path,.pet-sky-horizon{display:none!important}
#pet-celestial-sky[data-phase="night"] .pet-cloud-plane{filter:brightness(.2) saturate(.38);mix-blend-mode:normal}
#pet-celestial-sky[data-weather="thunder"] .pet-cloud-plane{filter:brightness(calc(1 - var(--storm-strength,0)*.55)) saturate(.72)}
.pet-season-scene{image-rendering:pixelated;opacity:.98;transition:filter 4s ease,opacity 2s ease}
#pet-celestial-sky[data-phase="night"] .pet-season-scene{filter:brightness(.27) saturate(.72)}
#pet-celestial-sky[data-phase="twilight"] .pet-season-scene{filter:brightness(.72) saturate(.82)}
.pet-storm-flash{fill:#eef6ff;opacity:0;mix-blend-mode:screen;pointer-events:none}
.pet-lightning{fill:#f4f8ff;opacity:0;filter:drop-shadow(0 0 5px #d8eaff) drop-shadow(0 0 14px #c0d8ff);pointer-events:none}
#pet-celestial-sky.lightning-flash .pet-lightning{opacity:.9}
#pet-celestial-sky.lightning-flash .pet-storm-flash{animation:pet-lightning-flash .19s ease-out}
@keyframes pet-lightning-flash{0%,100%{opacity:0}24%{opacity:calc(.12 + var(--storm-strength,0)*.42)}55%{opacity:.02}72%{opacity:calc(.06 + var(--storm-strength,0)*.19)}}
@media(prefers-reduced-motion:reduce){.pet-season-scene{transition:none}}

/* Companion is centered on the hidden celestial arc; only close/reveal remains in the top-right. */
#pet-bottom-host{min-height:184px;margin-top:18px;position:relative;isolation:isolate;overflow:hidden}
#pet-bottom-host #pet-lane.bottom-mode{position:absolute!important;inset:0!important;top:0!important;right:0!important;bottom:0!important;left:0!important;display:block!important;width:auto!important;height:auto!important;min-width:0!important;min-height:0!important;margin:0!important;padding:0!important;transform:none!important;background:transparent!important;overflow:hidden!important}
#pet-bottom-host #pet-actor{position:absolute!important;left:50%!important;top:33.333%!important;width:140px;height:140px;transform:translate(-50%,-50%)!important;z-index:2}
#pet-bottom-host #pet-caption{position:absolute;left:14px;bottom:10px;z-index:2;max-width:min(45%,260px);text-align:left}
#pet-bottom-host #pet-lane .pet-lane-actions{position:absolute;top:9px;right:9px;z-index:5;display:flex;gap:6px;margin:0!important}
#pet-bottom-host #pet-toggle{display:grid;place-items:center;width:30px;height:30px;padding:0;border-radius:10px;font-size:19px;line-height:1;background:#121a25d9;border:1px solid #dbe7ff35;color:#f4f7ff}
#pet-bottom-host #pet-toggle:hover{background:#223143;border-color:#a8c5ec88}
#pet-bottom-host #pet-admin-toggle{min-height:30px;padding:0 10px}
#pet-bottom-host #pet-actor[hidden]{display:none}
#pet-bottom-host #pet-caption:empty{display:none}
#pet-bottom-host #pet-lane .pet-lane-actions{position:absolute!important;top:9px!important;right:9px!important;z-index:20!important;display:flex!important;visibility:visible!important;opacity:1!important;pointer-events:auto!important;margin:0!important}
#pet-bottom-host>.pet-overlay-controls{position:absolute!important;top:9px!important;right:9px!important;left:auto!important;bottom:auto!important;z-index:20!important;display:flex!important;align-items:center;gap:6px;visibility:visible!important;opacity:1!important;pointer-events:auto!important}
#pet-bottom-host>.pet-overlay-controls #pet-toggle{position:static!important;inset:auto!important;display:grid!important;place-items:center;width:30px;height:30px;padding:0;border-radius:10px;font-size:19px;line-height:1;background:#121a25d9;border:1px solid #dbe7ff35;color:#f4f7ff;visibility:visible!important;opacity:1!important;pointer-events:auto!important}
#pet-bottom-host>#pet-caption{position:absolute!important;left:14px!important;right:auto!important;top:auto!important;bottom:10px!important;z-index:3!important;display:flex;max-width:min(45%,260px);text-align:left!important;align-items:flex-start!important}
#pet-bottom-host>#pet-caption,#pet-bottom-host>#pet-caption small{color:var(--pet-caption-muted,#c9d2df)!important;text-shadow:var(--pet-caption-shadow,0 1px 2px #0009);transition:color .8s ease,text-shadow .8s ease}
#pet-bottom-host>#pet-caption strong{color:var(--pet-caption-ink,#fff)!important;text-shadow:var(--pet-caption-shadow,0 1px 2px #0009);transition:color .8s ease,text-shadow .8s ease}
#pet-celestial-sky .pet-precip-far{opacity:calc(var(--rain-opacity,0)*.2);transition:opacity 1.2s ease}
#pet-celestial-sky .pet-weather-snow.pet-precip-far{opacity:calc(var(--snow-opacity,0)*.32)}
#pet-celestial-sky .pet-weather-rain.pet-precip-mid{opacity:calc(var(--rain-opacity,0)*.58)}
#pet-celestial-sky .pet-weather-snow.pet-precip-mid{opacity:calc(var(--snow-opacity,0)*.68)}
#pet-celestial-sky .pet-weather-rain.pet-precip-near{opacity:var(--rain-opacity,0);filter:blur(.24px)}
#pet-celestial-sky .pet-weather-snow.pet-precip-near{opacity:var(--snow-opacity,0);filter:blur(.65px)}
#pet-celestial-sky[data-phase="night"] .pet-weather-sheet{filter:brightness(.72)}
#pet-celestial-sky[data-phase="night"][data-weather="thunder"] .pet-cloud-plane{filter:brightness(.06) saturate(.25);mix-blend-mode:normal}
.pet-lightning{transform-origin:240px 40px}
@media(max-width:600px){#pet-bottom-host{min-height:168px}#pet-bottom-host #pet-actor{top:33.333%!important;width:122px;height:122px}#pet-bottom-host #pet-caption{max-width:44%;font-size:10px}#pet-bottom-host #pet-caption strong{font-size:12px}}

#pet-celestial-sky[data-weather="thunder"] .pet-cloud-plane{mix-blend-mode:normal}
#pet-celestial-sky .pet-snow-tint{fill:#eaf4ff;opacity:calc(var(--snow-opacity,0)*.18);mix-blend-mode:screen;transition:opacity .9s ease;pointer-events:none}
#pet-celestial-sky[data-weather="snow"] .pet-sky-fill{filter:brightness(1.05) saturate(.82);transition:filter .9s ease}
#pet-celestial-sky[data-phase="night"] .pet-moon-glow{opacity:.4}
#pet-celestial-sky .pet-moon-glow{rx:44px}

/* Thunder darkens the open sky as well as the cloud deck; blocky bolts descend from the cloud edge. */
#pet-celestial-sky .pet-storm-tint{fill:url(#pet-storm-shade);opacity:calc(var(--storm-strength,0)*.92);mix-blend-mode:normal;transition:opacity .7s ease;pointer-events:none}
#pet-celestial-sky[data-weather="thunder"] .pet-sky-fill{filter:brightness(calc(1 - var(--storm-strength,0)*.46)) saturate(.78);transition:filter .7s ease}
#pet-celestial-sky .pet-lightning{fill:#f5f8ff;opacity:0;filter:drop-shadow(0 0 2px #e3efff) drop-shadow(0 0 7px #b9d2ff);shape-rendering:crispEdges;pointer-events:none;transition:opacity .04s linear}
#pet-celestial-sky.lightning-flash .pet-lightning{opacity:.96}
#pet-celestial-sky[data-weather="thunder"] .pet-cloud-plane{filter:brightness(calc(1 - var(--storm-strength,0)*.35)) saturate(.55);mix-blend-mode:normal}
#pet-celestial-sky[data-phase="night"][data-weather="thunder"] .pet-cloud-plane{filter:brightness(calc(.27 - var(--storm-strength,0)*.12)) saturate(.38);mix-blend-mode:normal}

/* Performance and legibility pass for the home-only sky scene. */
#pet-celestial-sky .pet-sky-stars{opacity:1;transition:none}
#pet-celestial-sky .pet-star{opacity:clamp(0,calc((var(--star-progress,0) - var(--star-threshold,.5))*5),1);transition:opacity 45s linear}
.pet-constellation{opacity:0;transition:opacity 2.2s ease}.pet-constellation-layer,.pet-constellation-lines{fill:none}.pet-constellation-lines path{stroke:#c7d9ff66;stroke-width:.7;stroke-dasharray:1.5 2.5;vector-effect:non-scaling-stroke}.pet-constellation-stars{fill:#f2f6ff;filter:drop-shadow(0 0 2px #bed4ff)}#pet-constellation-layer.is-visible .pet-constellation{opacity:.62}
.pet-shooting-star{opacity:0;fill:#fff}.pet-shooting-star .pet-shooting-trail{fill:url(#pet-meteor-trail);stroke:none;filter:drop-shadow(0 0 1.5px #ffb45d)}.pet-shooting-star .pet-shooting-hot-trail{fill:#fff2bd;opacity:.8}.pet-shooting-star .pet-magma-comet{image-rendering:pixelated;transform-box:fill-box;transform-origin:center;filter:brightness(1.65) saturate(1.48) contrast(1.12)}
.pet-sky-ufo{opacity:0;filter:drop-shadow(0 0 2px #cde4ff) drop-shadow(0 0 7px #91baff99)}.pet-ufo-body{transform-box:fill-box;transform-origin:center}.pet-sky-ufo[data-direction="left"] .pet-ufo-body{transform:scaleX(-1)}.pet-ufo-glow{fill:#8bbdff18}.pet-ufo-dome{fill:#c8e7fa;stroke:#f1fbff;stroke-width:.8}.pet-ufo-disc{fill:#879bb5;stroke:#e0ecf7;stroke-width:1}.pet-ufo-rim{fill:none;stroke:#f4f8ff;stroke-width:.75;opacity:.9}.pet-ufo-light{fill:#e8f6ff;filter:drop-shadow(0 0 2px #9bd6ff)}
@media(prefers-reduced-motion:reduce){#pet-celestial-sky .pet-sky-stars .pet-star-pixel{animation:none!important}.pet-shooting-star,.pet-sky-ufo{display:none!important}}
#pet-celestial-sky .pet-cloud-drift{will-change:transform}
#pet-celestial-sky .pet-storm-tint{mix-blend-mode:multiply;opacity:calc(var(--storm-strength,0)*.86);transition:opacity .7s ease}
#pet-celestial-sky .pet-storm-flash{mix-blend-mode:screen}
#pet-celestial-sky.lightning-flash .pet-storm-flash{animation:pet-lightning-flash .48s ease-out}
@keyframes pet-lightning-flash{0%,100%{opacity:0}10%{opacity:.88}32%{opacity:.08}}
#pet-celestial-sky .pet-sun-texture,#pet-celestial-sky .pet-moon-texture{image-rendering:auto}
#pet-celestial-sky .pet-moon-glow{rx:44px;opacity:.4}
#pet-celestial-sky .pet-lightning{fill:none;stroke:none;filter:none;shape-rendering:crispEdges;pointer-events:none}
#pet-celestial-sky .pet-lightning path{fill:none;stroke-linecap:square;stroke-linejoin:miter;vector-effect:non-scaling-stroke}
#pet-celestial-sky .pet-lightning .pet-lightning-glow{stroke:#b9d5ff;stroke-width:9;opacity:.34;filter:blur(2px)}
#pet-celestial-sky .pet-lightning .pet-lightning-core{stroke:#f7faff;stroke-width:5;opacity:1}
#pet-celestial-sky .pet-lightning .pet-lightning-branch{stroke:#e9f2ff;stroke-width:3;opacity:.92}
#pet-celestial-sky .pet-cloud-plane{mix-blend-mode:normal}
#pet-celestial-sky[data-phase="night"][data-weather="thunder"] .pet-cloud-plane{filter:brightness(calc(.28 - var(--storm-strength,0)*.09)) saturate(.42);mix-blend-mode:normal}

/* Saved PokéBox display roster on the Home sky card */
#pet-display-toggle,#pet-display-edit{font-size:11px;padding:6px 9px;background:#121a25e8;border:1px solid #dbe7ff35;color:#f4f7ff;border-radius:10px;white-space:nowrap}
#pet-bottom-host>.pet-overlay-controls{left:9px!important;right:9px!important;width:auto!important;justify-content:flex-end!important}
#pet-bottom-host>.pet-overlay-controls #pet-display-toggle{position:absolute!important;top:0!important;left:0!important;right:auto!important;display:grid!important;place-items:center;width:30px!important;height:30px!important;min-width:30px!important;min-height:30px!important;padding:0!important;font-size:17px!important}
#pet-bottom-host>.pet-overlay-controls #pet-display-edit{position:absolute!important;top:0!important;left:36px!important;right:auto!important;display:grid!important;place-items:center;width:30px;height:30px;padding:0;font-size:17px}
#pet-display-lineup{position:absolute;z-index:2;left:50%;top:58%;transform:translate(-50%,-50%);display:flex;align-items:flex-end;justify-content:center;gap:clamp(4px,2vw,24px);width:min(92%,900px);pointer-events:none}
#pet-display-lineup[hidden]{display:none}
.pet-display-member{width:var(--lineup-pet-size,104px);flex:0 0 var(--lineup-pet-size,104px);min-width:0;display:flex;flex-direction:column;align-items:center;gap:0;filter:drop-shadow(0 4px 5px #0008)}
.pet-display-member .pet-visual{width:100%;height:var(--lineup-pet-size,104px)}
.pet-display-member small{max-width:100%;padding:2px 7px;border-radius:999px;background:#101720c9;color:#f3f6fb;font-size:10px;line-height:1.2;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;text-shadow:0 1px 2px #000}
#pet-display-dialog{width:min(620px,calc(100vw - 24px));max-height:min(84dvh,760px);overflow:auto;padding:22px;background:#111720;color:#eef2f8;border:1px solid #dbe7ff28;border-radius:20px;box-shadow:0 24px 90px #000a}
#pet-display-dialog::backdrop{background:#05080dc4;backdrop-filter:blur(5px)}
#pet-display-dialog .pet-display-help{color:#b6c2d1;font-size:13px;line-height:1.55}
#pet-display-dialog section{margin-top:18px}
#pet-display-dialog h3{display:flex;align-items:center;gap:8px;margin:0 0 9px;font-size:13px}
#pet-display-dialog h3 small{color:#9eacbd;font-size:11px;font-weight:500}
.pet-display-box{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:8px;max-height:250px;overflow:auto;padding:2px}
.pet-display-choice{display:grid;grid-template-columns:48px 1fr 28px;align-items:center;gap:10px;min-width:0;padding:8px 10px;text-align:left;border:1px solid #ffffff17;border-radius:13px;background:#161f2a;color:#f2f5fb;cursor:pointer}
.pet-display-choice.selected{border-color:#91d7b2;background:#172b28;box-shadow:inset 0 0 0 1px #91d7b244}
.pet-display-choice-sprite{position:relative;width:46px;height:46px}.pet-display-choice-sprite img{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;image-rendering:pixelated}
.pet-display-choice b,.pet-display-order-item b{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px}.pet-display-choice small,.pet-display-order-item small{display:block;color:#aebaca;font-size:10px;margin-top:3px}
.pet-display-check{display:grid;place-items:center;width:24px;height:24px;border-radius:50%;background:#ffffff0b;color:#a6e4c3;font-size:16px}
.pet-display-order{display:flex;flex-direction:column;gap:6px}.pet-display-order-item{display:grid;grid-template-columns:26px minmax(0,1fr) 32px 32px 32px;align-items:center;gap:6px;padding:6px 8px;border:1px solid #ffffff12;border-radius:11px;background:#151c25}.pet-display-order-number{display:grid;place-items:center;width:22px;height:22px;border-radius:50%;background:#9dddc31c;color:#a9e3c5;font-size:11px}.pet-display-order-item button{min-width:30px;padding:5px;border-radius:8px}.pet-display-order-item button:disabled{opacity:.35;cursor:default}
#pet-display-error{min-height:16px;color:#ffaaa5;font-size:12px}
@media(max-width:600px){#pet-bottom-host>.pet-overlay-controls #pet-display-edit{left:36px!important}#pet-display-dialog{padding:17px}.pet-display-box{grid-template-columns:1fr;max-height:34dvh}#pet-display-lineup{top:57%;width:95%;gap:2px}.pet-display-member{width:min(var(--lineup-pet-size,74px),74px);flex-basis:min(var(--lineup-pet-size,74px),74px)}.pet-display-member .pet-visual{height:min(var(--lineup-pet-size,74px),74px)}.pet-display-member small{font-size:9px;max-width:72px}}

/* Keep the solo companion visibly larger than the celestial sprites. */
#pet-bottom-host #pet-lane.bottom-mode #pet-actor[aria-label="Pokémon öffnen"]{width:min(140px,38vw)!important;height:min(140px,38vw)!important}
@media(max-width:600px){#pet-bottom-host #pet-lane.bottom-mode #pet-actor[aria-label="Pokémon öffnen"]{width:min(122px,38vw)!important;height:min(122px,38vw)!important}}

/* Dense cloud cover turns the day sky into a muted gray overcast and veils the sun. */
#pet-celestial-sky:not([data-weather="snow"]) .pet-sky-fill{filter:brightness(calc(1 - var(--overcast-strength,0)*.42 - var(--storm-strength,0)*.24)) saturate(calc(.12 + (1 - var(--overcast-strength,0))*.78 - var(--storm-strength,0)*.08));transition:filter 1.4s ease}
#pet-celestial-sky[data-weather="snow"] .pet-sky-fill{filter:brightness(calc(1.05 - var(--overcast-strength,0)*.16)) saturate(calc(.82 - var(--overcast-strength,0)*.22));transition:filter 1.4s ease}
#pet-celestial-sky[data-phase="day"] .pet-cloud-plane{filter:brightness(calc(1.04 - var(--overcast-strength,0)*.34)) saturate(calc(1 - var(--overcast-strength,0)*.58))}
#pet-celestial-sky[data-phase="twilight"] .pet-cloud-plane{filter:brightness(calc(.72 - var(--overcast-strength,0)*.22)) saturate(calc(.78 - var(--overcast-strength,0)*.42))}
#pet-celestial-sky[data-phase="night"] .pet-cloud-plane{filter:brightness(calc(.2 - var(--overcast-strength,0)*.07)) saturate(calc(.38 - var(--overcast-strength,0)*.1))}

/* Keep the scene flush with the card despite later Companion styles. */
#pet-bottom-host{padding:0!important;background:#101722!important}
#pet-celestial-sky{inset:-1px!important;opacity:1}
.pet-sky-ufo{visibility:hidden;opacity:0;transform:translate(-1000px,-1000px)}
.pet-sky-ufo.is-flying{visibility:visible}

/* Borderless home sky: remove the container outline and radius as one unit. */
#pet-bottom-host{padding:0!important;background:transparent!important;border:0!important;border-radius:0!important;box-shadow:none!important}
#pet-bottom-host:hover{border:0!important;box-shadow:none!important}
#pet-celestial-sky{inset:0!important;border-radius:0!important;opacity:1}

/* A real, currently visible asterism stays in place; tapping it briefly names it. */
#pet-constellation-layer{pointer-events:none}
#pet-constellation-layer.is-visible{pointer-events:auto}
#pet-constellation-layer .pet-constellation{opacity:.84;cursor:pointer;outline:none}
#pet-constellation-layer .pet-constellation-lines path{stroke:#d9e7ffb8;stroke-width:1.05;stroke-dasharray:none;filter:drop-shadow(0 0 2px #b9d5ff66)}
#pet-constellation-layer .pet-constellation-stars{fill:#f5f8ff;filter:drop-shadow(0 0 3px #d4e3ff)}
#pet-constellation-layer .pet-constellation-hit{fill:transparent;pointer-events:all}
#pet-constellation-layer .pet-constellation-name{opacity:0;pointer-events:none;transform-box:fill-box;transform-origin:center}
#pet-constellation-layer .pet-constellation-name rect{fill:#0b1220ed;stroke:#c8dcffb8;stroke-width:.8}
#pet-constellation-layer .pet-constellation-name text{fill:#f5f8ff;font:6px system-ui,sans-serif;letter-spacing:.15px}
#pet-constellation-layer .pet-constellation.is-named .pet-constellation-name{animation:pet-constellation-label 2.8s ease both}
#pet-constellation-layer .pet-constellation.is-named .pet-constellation-lines path{animation:pet-constellation-pulse 1.1s ease-in-out 2 alternate}
@keyframes pet-constellation-label{0%{opacity:0;transform:translateY(3px) scale(.92)}15%,78%{opacity:1;transform:none}100%{opacity:0;transform:translateY(-2px) scale(.97)}}
@keyframes pet-constellation-pulse{from{stroke:#c5d9ff88;stroke-width:1}to{stroke:#ffffff;stroke-width:1.8;filter:drop-shadow(0 0 4px #d5e4ff)}}
@media(prefers-reduced-motion:reduce){#pet-constellation-layer .pet-constellation-name,#pet-constellation-layer .pet-constellation-lines path{animation-duration:.01ms!important}}

/* Let sky hit targets pass through the transparent companion layer. */
#pet-bottom-host #pet-lane.bottom-mode{pointer-events:none!important}
#pet-bottom-host #pet-lane.bottom-mode #pet-actor:not([hidden]),#pet-bottom-host #pet-lane.bottom-mode .pet-lane-actions{pointer-events:auto!important}
#pet-constellation-layer.is-visible{pointer-events:none}
#pet-constellation-layer.is-visible.is-interactive{pointer-events:auto}
#pet-constellation-layer:not(.is-interactive) .pet-constellation-hit{pointer-events:none}
#pet-constellation-layer.is-interactive .pet-constellation-hit{pointer-events:all}
#pet-celestial-sky.constellation-interactive{pointer-events:auto!important}
#pet-celestial-sky #pet-constellation-layer.is-interactive{pointer-events:auto!important;isolation:isolate}
#pet-celestial-sky #pet-constellation-layer.is-interactive .pet-constellation-hit{pointer-events:all!important;cursor:pointer;touch-action:manipulation}
#pet-constellation-layer.is-interactive .pet-constellation{cursor:pointer}
#pet-constellation-layer.is-visible .pet-constellation{animation:pet-constellation-arrive .45s ease-out both}
@keyframes pet-constellation-arrive{from{opacity:0;filter:brightness(1.8)}to{opacity:.84;filter:none}}
@media(prefers-reduced-motion:reduce){#pet-constellation-layer .pet-constellation{animation-duration:.01ms!important}}

/* Astronomical stars are present before their constellation lines are revealed. */
#pet-catalog-star-layer .pet-astronomy-star{fill:#edf3ff;shape-rendering:crispEdges;filter:drop-shadow(0 0 1.4px #cbdcff9c);transition:opacity 8s linear}
#pet-constellation-layer .pet-constellation-hit{pointer-events:none}
#pet-constellation-layer.is-interactive .pet-constellation-hit{pointer-events:all}

/* Rounded clipping for the Pokémon scene card, including the lower corners. */
#pet-bottom-host.dashboard-widget{border-radius:22px!important;overflow:hidden!important}
#pet-bottom-host.dashboard-widget,#remote-companions.dashboard-widget{min-height:max(288px,var(--widget-min-height,132px))!important}
#pet-celestial-sky.constellation-interactive{pointer-events:auto!important}
#pet-celestial-sky #pet-constellation-layer.is-interactive,#pet-celestial-sky #pet-constellation-layer.is-interactive .pet-constellation,#pet-celestial-sky #pet-constellation-layer.is-interactive .pet-constellation-hit{pointer-events:all!important;cursor:pointer;touch-action:manipulation}


/* Expand the live Pokémon sky over the dashboard without stopping its weather animation. */
#pet-bottom-host #pet-scene-expand{position:absolute!important;left:10px!important;right:auto!important;top:auto!important;bottom:10px!important;z-index:25!important;display:grid;place-items:center;width:38px;height:38px;padding:0;border:1px solid #dbe7ff44;border-radius:12px;background:#101722d9;color:#f4f7ff;box-shadow:0 4px 18px #0008;backdrop-filter:blur(8px);cursor:pointer;pointer-events:auto!important;transition:background .18s,border-color .18s,transform .18s}
#pet-bottom-host #pet-scene-expand svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
#pet-bottom-host #pet-scene-expand:hover{background:#223143;border-color:#a8c5ec99;transform:scale(1.06)}
#pet-bottom-host #pet-scene-expand:focus-visible{outline:2px solid #b8e5d1;outline-offset:2px}
#pet-bottom-host>#pet-caption{left:58px!important;max-width:min(45%,260px)}
#pet-bottom-host.dashboard-widget.pet-scene-expanded{position:fixed!important;top:var(--pet-fullscreen-top,0px)!important;left:var(--pet-fullscreen-left,0px)!important;right:auto!important;bottom:auto!important;width:var(--pet-fullscreen-width,100vw)!important;height:var(--pet-fullscreen-height,100dvh)!important;min-width:0!important;min-height:0!important;max-width:100vw!important;max-height:100dvh!important;grid-column:auto!important;grid-row:auto!important;margin:0!important;padding:0!important;border:0!important;border-radius:0!important;background:transparent!important;overflow:hidden!important;z-index:2147483000!important;box-shadow:none!important}
#pet-bottom-host.dashboard-widget.pet-scene-expanded #pet-lane.bottom-mode #pet-actor{top:50%!important;width:var(--pet-fullscreen-pet-size,280px)!important;height:var(--pet-fullscreen-pet-size,280px)!important}
#pet-bottom-host.pet-scene-expanded #pet-celestial-sky{position:absolute!important;inset:0!important;width:100%!important;height:100%!important}
#pet-bottom-host.pet-scene-expanded>#pet-caption{left:58px!important;bottom:14px!important;max-width:min(40vw,360px)!important}
body::after{content:"";position:fixed;inset:0;z-index:2147482999;background:#000;opacity:0;pointer-events:none;transition:opacity .42s ease}
body.pet-scene-expanded-open::after{opacity:1;pointer-events:auto}
body.pet-scene-expanded-open{overflow:hidden!important}
@media(max-width:600px){#pet-bottom-host.pet-scene-expanded>#pet-caption{max-width:calc(100% - 82px)!important}}
