/* Six companions and persistent progression */
.team{grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}.card{min-height:132px;overflow:hidden;gap:7px}.card>div{min-width:0;flex:1;padding-right:5px}.card img{width:108px;height:112px;align-self:center}.card:before{top:17px;width:97px;height:97px}.card h3{font-size:23px}.card small{display:block;white-space:nowrap;font-size:7px}.card .tag{display:block;font-size:8px;margin:4px 0}.card.selected:after{top:3px;right:5px;font-size:13px;width:19px;line-height:17px}.xp-track{display:block;position:relative;overflow:hidden;height:8px;background:#b39a6c;border:1px solid #907349;border-radius:9px;box-shadow:0 1px #fff0c2;min-width:45px;margin-top:7px}.xp-track>i{height:100%;display:block;border-radius:8px;background:linear-gradient(#b8f2fc,#58b4da);box-shadow:inset 0 1px #e3fbff;transition:width .6s}.xp-label{display:block;text-align:right;font-size:7px!important;color:#947443!important;font-weight:900;margin-top:3px;letter-spacing:.3px}.locked-card{min-height:132px}.region-level{display:inline-block;font:800 10px 'Nunito';background:#b5ce80;border:2px solid #82934e;color:#5c6a34;border-radius:7px;padding:3px 7px;vertical-align:middle;margin-left:5px}.starter-lineup{flex-wrap:wrap;gap:0}.starter-lineup img{width:16.66%;height:115px}.welcome-card{width:min(760px,100%)}#battle-xp{max-width:170px;margin:8px auto 0}#battle-xp .xp-track{height:7px;margin-top:0}#battle-xp .xp-label{font-size:6px!important}.command{padding-top:80px}.command>img{height:118px;top:-30px}.command h2{font-size:21px}.command p{min-height:0;font-size:8px}.controls{min-height:232px}.status .hp-track{height:13px}.status b{min-width:42px;text-align:center}.result{padding:15px}.result>span{font-size:37px}.result h2{font-size:31px}.result p{margin:7px 0 13px;max-width:530px;font-size:12px}.result .gold-btn{margin-top:12px;padding:9px 20px}#xp-summary{display:flex;gap:9px;max-width:90%;flex-wrap:wrap;justify-content:center;max-height:180px;overflow:auto}.xp-reward{display:flex;align-items:center;gap:9px;background:linear-gradient(#f5e6b4,#d9bc82);border:2px solid #b58f4f;border-radius:12px;padding:7px 11px;color:#775433;text-align:left;min-width:220px;max-width:300px}.xp-reward img{width:50px;height:50px;object-fit:contain}.xp-reward>div{flex:1}.xp-reward b{display:block;font-size:11px}.xp-reward small{display:block;font-size:8px;color:#96713c;margin-top:3px}.xp-reward.grew{border-color:#ffe187;box-shadow:0 0 12px #ffe69155}.xp-reward.grew small{color:#96712d}.detail-stats{display:flex;gap:12px;justify-content:center;margin:12px 0;font-size:14px;color:#986f3c}.creature-detail>.xp-track{max-width:340px;margin:12px auto 0}.creature-detail>.xp-label{text-align:center;font-size:10px!important}.creature-detail>small{font-size:10px;color:#a17f4b}.dex-grid .xp-label{font-size:7px!important}.dex-grid h3{font-size:18px}
/* Sprite rigs: movement is layered separately from facing direction. */
.fighter{transform-origin:50% 90%;will-change:transform,filter,opacity}.sprite-rig{width:100%;height:100%;display:flex;align-items:center;justify-content:center;transform-origin:50% 88%;animation:creatureIdle var(--idle-rate,2.8s) ease-in-out infinite}.fighter img{animation:none;width:100%;height:100%;object-fit:contain;transform-origin:50% 90%}.fighter[data-species="koz"]{--idle-rate:2.5s;--idle-lift:-6px;--idle-tilt:1.1deg}.fighter[data-species="pupa"]{--idle-rate:3.1s;--idle-lift:-9px;--idle-tilt:-1.4deg}.fighter[data-species="filiz"]{--idle-rate:3.5s;--idle-lift:-3px;--idle-tilt:.5deg}.fighter[data-species="nova"]{--idle-rate:2.9s;--idle-lift:-13px;--idle-tilt:1.5deg}.fighter[data-species="voltik"]{--idle-rate:1.7s;--idle-lift:-12px;--idle-tilt:-2deg}.fighter[data-species="kiragi"]{--idle-rate:2.7s;--idle-lift:-10px;--idle-tilt:1.3deg}.fighter.enter{animation:walkInLeft 1s cubic-bezier(.2,.7,.3,1) both}.fighter.enemy.enter{animation:walkInRight 1s cubic-bezier(.2,.7,.3,1) both}.enter .sprite-rig{animation:walkBob .18s ease-in-out 5}.fighter.strike{animation:meleeLeft .65s cubic-bezier(.3,0,.2,1)}.fighter.enemy.strike{animation:meleeRight .65s cubic-bezier(.3,0,.2,1)}.strike .sprite-rig{animation:attackPose .65s ease-in-out}.fighter.hit{animation:recoilLeft .56s ease-out}.fighter.enemy.hit{animation:recoilRight .56s ease-out}.hit img{animation:hitFlash .56s ease-out}.fighter.special-cast .sprite-rig{animation:castCharge .9s ease-in-out}.fighter.special-cast:after{content:'';position:absolute;inset:14% 10%;border:3px solid #e7f8faaa;border-radius:50%;box-shadow:0 0 30px #acf0ff77,inset 0 0 25px #d8f8ff66;animation:chargeRing .9s ease-out;pointer-events:none}.fighter.faint{animation:faintLeft .85s ease-in forwards!important}.fighter.enemy.faint{animation:faintRight .85s ease-in forwards!important}.faint .sprite-rig,.captured .sprite-rig{animation:none}.fighter.captured{animation:capturedSpiral 1s ease-in forwards!important}.fighter.levelup .sprite-rig{animation:levelGlow 1.6s ease-out}.fighter.victory .sprite-rig{animation:victoryHop .5s ease-in-out 3}.fighter.shielded:before{content:'';position:absolute;inset:2% -4%;border:4px solid #c5f9ff99;background:radial-gradient(ellipse,transparent 60%,#8de4ff55);border-radius:50%;box-shadow:0 0 20px #8de4ff77;pointer-events:none;animation:shieldPulse 1.4s infinite}.fighter.down{opacity:1;transform:none}.battle-note{z-index:6}#fx{z-index:5}
@keyframes creatureIdle{0%,100%{transform:translateY(0) rotate(0) scale(1)}50%{transform:translateY(var(--idle-lift,-7px)) rotate(var(--idle-tilt,1deg)) scale(1.018,.986)}}@keyframes walkInLeft{0%{transform:translateX(-140px);opacity:0}20%{opacity:1}85%{transform:translateX(6px)}100%{transform:translateX(0)}}@keyframes walkInRight{0%{transform:translateX(140px);opacity:0}20%{opacity:1}85%{transform:translateX(-6px)}100%{transform:translateX(0)}}@keyframes walkBob{0%,100%{transform:translateY(0) rotate(-2deg) scale(1.04,.97)}50%{transform:translateY(-9px) rotate(2deg) scale(.98,1.03)}}@keyframes meleeLeft{0%,100%{transform:translate(0)}18%{transform:translate(-18px,3px) rotate(-5deg)}48%{transform:translate(100px,-18px) rotate(11deg)}66%{transform:translate(68px,-8px) rotate(5deg)}}@keyframes meleeRight{0%,100%{transform:translate(0)}18%{transform:translate(18px,3px) rotate(5deg)}48%{transform:translate(-100px,-18px) rotate(-11deg)}66%{transform:translate(-68px,-8px) rotate(-5deg)}}@keyframes attackPose{20%{transform:scale(1.12,.87)}48%{transform:scale(1.1,.94)}80%{transform:scale(.98,1.03)}}@keyframes recoilLeft{15%{transform:translate(-14px,2px) rotate(-7deg)}40%{transform:translate(8px,-3px) rotate(4deg)}65%{transform:translate(-4px) rotate(-2deg)}}@keyframes recoilRight{15%{transform:translate(14px,2px) rotate(7deg)}40%{transform:translate(-8px,-3px) rotate(-4deg)}65%{transform:translate(4px) rotate(2deg)}}@keyframes hitFlash{15%,45%{filter:brightness(2) sepia(.3) saturate(.4)}28%,60%{filter:none}}@keyframes castCharge{0%,100%{transform:translateY(0) scale(1);filter:none}30%{transform:translateY(5px) scale(1.08,.88);filter:brightness(1.3)}65%{transform:translateY(-24px) scale(1.06);filter:brightness(1.4) drop-shadow(0 0 12px #d8ecff)}}@keyframes chargeRing{0%{transform:scale(.3);opacity:0}40%{opacity:1}100%{transform:scale(1.5);opacity:0}}@keyframes faintLeft{0%{opacity:1;transform:translateY(0)}50%{opacity:.7;transform:translate(-10px,25px) rotate(-22deg) scale(.95,.8)}100%{opacity:0;transform:translate(-17px,65px) rotate(-35deg) scale(.75,.55)}}@keyframes faintRight{0%{opacity:1;transform:translateY(0)}50%{opacity:.7;transform:translate(10px,25px) rotate(22deg) scale(.95,.8)}100%{opacity:0;transform:translate(17px,65px) rotate(35deg) scale(.75,.55)}}@keyframes capturedSpiral{25%{filter:brightness(2) drop-shadow(0 0 20px #ffe6a4);transform:scale(1.06)}100%{opacity:0;transform:translateY(-20px) rotate(150deg) scale(.02)}}@keyframes levelGlow{15%,50%,85%{filter:brightness(1.5) drop-shadow(0 0 22px #ffe582);transform:translateY(-20px) scale(1.05)}100%{filter:none;transform:translateY(0)}}@keyframes victoryHop{0%,100%{transform:translateY(0) scale(1.05,.95)}50%{transform:translateY(-22px) rotate(-3deg) scale(.98,1.04)}}@keyframes shieldPulse{50%{opacity:.6;transform:scale(1.04)}}
@media(max-width:1000px){.card img{width:93px;height:104px}.card:before{width:85px;height:90px;top:19px}.card small{font-size:6px}.card h3{font-size:21px}.card .tag{font-size:7px}.card .xp-label{font-size:6px!important}.card{gap:2px}.xp-reward{min-width:200px}.command h2{font-size:19px}}
@media(max-width:700px){.team{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.card{min-height:120px;gap:1px;padding:7px 3px}.card img{width:72px;height:90px}.card:before{width:65px;height:73px;top:23px}.card h3{font-size:19px}.card small{font-size:5px}.card .tag{font-size:6px;line-height:1.5}.card>div{padding-right:3px}.xp-track{height:6px;margin-top:6px}.card .xp-label{font-size:5px!important}.locked-card{min-height:120px}.starter-lineup img{width:33.333%;height:85px}.welcome-card{padding:33px 22px 24px}.welcome-card h1{font-size:31px}.welcome-card p{font-size:10px}.starter-lineup{max-width:300px;margin:10px auto}.controls{min-height:230px}.command{padding-top:65px;width:84px}.command>img{height:95px;top:-24px}.command h2{font-size:13px}#battle-xp{max-width:78px;margin-top:8px}#battle-xp .xp-label{font-size:5px!important}.status b{min-width:30px}.result>span{font-size:27px}.result h2{font-size:24px}.result p{font-size:9px;max-width:90%;margin:6px 0 9px}#xp-summary{max-width:94%;max-height:150px;gap:5px}.xp-reward{padding:5px 8px;min-width:190px;max-width:230px;gap:6px}.xp-reward img{width:37px;height:37px}.xp-reward b{font-size:9px}.xp-reward small{font-size:6px}.result .gold-btn{font-size:10px;margin-top:9px;padding:7px 14px}.region-level{font-size:8px;padding:2px 5px}.dex-grid h3{font-size:16px}}
@media(prefers-reduced-motion:reduce){.fighter,.sprite-rig,.fighter img,.fighter:after,.fighter:before{animation:none!important;transition:none!important}.fighter.faint,.fighter.captured{opacity:0}.xp-track>i{transition:none}}
.region-species{display:block;font-size:9px;font-weight:900;color:#967541;margin:4px 0}.region-panel p{margin:4px 0}@media(max-width:700px){.region-species{font-size:7px}.region-panel p{font-size:8px}}

.creature-preview{position:fixed;z-index:10000;pointer-events:none;background:linear-gradient(145deg,#f8e8bc,#e8ca87);color:#49341e;border:3px solid #92713e;border-radius:18px;box-shadow:0 12px 40px #0009;padding:16px;max-height:calc(100dvh - 24px);overflow:auto;box-sizing:border-box}.creature-preview .creature-detail>img{width:88px;height:88px;object-fit:contain}.creature-preview .creature-detail h2{margin:3px 0 10px}.creature-preview .creature-detail p{font-size:12px;margin:9px 0}.creature-preview .eyebrow{color:#6b4a28}.creature-preview small,.creature-preview .xp-label{color:#654c32}.creature-preview .detail-stats{display:flex;justify-content:center;gap:12px;flex-wrap:wrap}.growth-total{color:#785018;font-weight:700}.dex-grid [data-preview]{cursor:pointer}.dex-grid [data-preview]:focus-visible{outline:3px solid #dca54e;outline-offset:3px}
/* A bounded catalogue keeps future residents from stretching the region panel. */
.region-panel>.encounter-catalog{flex:1 1 100%;min-width:0;width:100%;margin-top:14px;border-top:1px solid #ac834b66;padding-top:12px}.encounter-heading{display:flex;justify-content:space-between;gap:10px;align-items:center;font-size:10px;color:#75532e;margin-bottom:9px}.encounter-heading span{font-size:9px;color:#896c41}.encounter-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px;max-height:220px;overflow-y:auto;overscroll-behavior:contain;scrollbar-color:#aa8145 #ead39a;padding:3px 6px 5px 2px}.encounter-resident{display:flex;align-items:center;gap:9px;min-width:0;background:#fff0c6b8;border:2px solid #b49158;border-radius:12px;padding:8px;color:#6d4b2c}.encounter-resident>img{width:54px;height:54px;object-fit:contain;flex-shrink:0}.encounter-resident>div{flex:1;min-width:0}.encounter-resident b{display:block;font-size:13px;overflow-wrap:anywhere}.encounter-resident small{font-size:9px;display:block}.encounter-resident>strong{font-size:17px;color:#8b6329;flex-shrink:0}.encounter-weight{display:block;background:#bba27266;height:4px;border-radius:8px;margin-top:7px;overflow:hidden}.encounter-weight i{display:block;height:100%;background:#648f63;border-radius:8px}.recovery-badge{display:block;font-size:11px!important;color:#946232!important;margin:7px 0 0;font-weight:800}.camp-dialog>p,.evolution-menu>p{line-height:1.65}.camp-list{display:grid;gap:12px}.camp-list article{display:flex;align-items:center;gap:12px;border:2px solid #c1a169;border-radius:14px;background:#f7e5b4;padding:12px;color:#6d4c2d}.camp-list img{width:65px;height:65px;object-fit:contain}.camp-list article>div{flex:1}.camp-list p{margin:5px 0}.evolution-grid{display:grid;gap:18px}.evolution-card{background:linear-gradient(140deg,#fff0c9,#d9bb7b);border:3px solid #ab8448;border-radius:20px;padding:20px;color:#69482d;text-align:center}.evolution-pair{display:grid;grid-template-columns:minmax(0,1fr) 30px minmax(0,1fr);align-items:center;gap:5px}.evolution-pair img{width:100%;height:170px;object-fit:contain;filter:drop-shadow(0 8px 6px #66532222)}.evolution-pair>span{font-size:30px;color:#9c7734}.evolution-card h3{font:500 25px 'Fredoka';margin:10px 0}.evolution-card p{font-size:12px}.evolution-card>small{font-size:11px}.evolution-card .gold-btn{margin-top:10px}nav{flex-wrap:wrap}nav .nav{white-space:nowrap}#modal:has(.evolution-menu){max-width:760px;width:calc(100% - 28px)}
@media(max-width:900px){.encounter-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:600px){.encounter-grid{grid-template-columns:1fr;max-height:235px}.encounter-heading{align-items:flex-start;flex-direction:column;gap:3px}.encounter-resident>img{width:48px;height:48px}.camp-list article{flex-wrap:wrap}.camp-list article .gold-btn{width:100%}.evolution-pair img{height:125px}.evolution-card{padding:15px}.evolution-card h3{font-size:21px}#giftTab{flex:1 1 25%;max-width:none}nav .nav{flex:1 1 28%;max-width:none}}
