*{box-sizing:border-box}html,body{margin:0;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;background:#eef5fb;color:#1d2a3c}.ambient{position:fixed;inset:0;background:url("./assets/adventure-bg.svg") center/cover fixed no-repeat;z-index:-1}.app{max-width:760px;margin:auto;padding:calc(12px + env(safe-area-inset-top)) 14px calc(80px + env(safe-area-inset-bottom))}
.kicker{font-size:10px;font-weight:1000;letter-spacing:.16em;color:#5679a2}.gameHeader{background:linear-gradient(135deg,rgba(255,255,255,.96),rgba(246,250,255,.9));border:2px solid rgba(81,123,166,.16);border-radius:30px;padding:22px;box-shadow:0 14px 30px rgba(67,100,140,.12);position:relative;overflow:hidden}.gameHeader:after{content:"";position:absolute;width:160px;height:160px;border:20px solid rgba(225,66,66,.06);border-radius:50%;right:-65px;top:-65px}.headerTop{display:flex;justify-content:space-between;gap:12px;align-items:flex-start}.gameHeader h1{margin:6px 0 10px;font-size:40px;line-height:.95;letter-spacing:-.04em;color:#1f3350}.gameHeader h1 span{color:#e54b4b}.gameHeader p{font-size:14px;margin:0;max-width:370px;color:#5f6f83;line-height:1.45}.dexRing{width:86px;height:86px;flex:0 0 86px;background:#fff;border-radius:50%;border:7px solid #e94d4d;box-shadow:inset 0 0 0 5px #fff,0 8px 18px rgba(233,77,77,.18);display:flex;align-items:center;justify-content:center;flex-direction:column}.dexRing b{font-size:30px;line-height:1;color:#24354d}.dexRing span{font-size:11px;font-weight:1000;color:#e54b4b}.missionBar{margin-top:18px;background:#203450;color:#fff;border-radius:18px;padding:13px 15px;display:grid;grid-template-columns:auto 1fr auto;gap:10px;align-items:center;font-size:12px}.missionBar span{color:#9fc4ef}.missionBar b{font-size:13px}.missionBar i{font-style:normal;font-size:18px}.tabs{display:flex;gap:9px;margin:13px 0}.tab{flex:1;border:0;border-radius:18px;background:rgba(255,255,255,.82);padding:13px 10px;font-weight:900;color:#738197;box-shadow:0 5px 14px rgba(61,93,126,.07)}.tab span{margin-right:5px}.tab.active{background:#e64b4b;color:#fff}.scannerCard,.panel{background:rgba(255,255,255,.94);border-radius:28px;padding:16px;box-shadow:0 12px 28px rgba(70,101,135,.10);border:1px solid rgba(78,117,158,.09)}.scannerTitle{display:flex;align-items:center;gap:8px;padding:2px 2px 13px}.scannerTitle b{font-size:15px}.scannerTitle small{margin-left:auto;font-size:9px;font-weight:1000;color:#7e92a9;letter-spacing:.12em}.statusDot{width:9px;height:9px;background:#37c873;border-radius:50%;box-shadow:0 0 0 5px rgba(55,200,115,.12)}.preview{min-height:330px;border-radius:24px;background:linear-gradient(180deg,#dcecff,#eff6ff);overflow:hidden;position:relative;border:2px solid #c9dcf0}.preview img{width:100%;height:100%;max-height:480px;min-height:330px;object-fit:cover}.preview.empty img{display:none}.emptyState{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:20px;color:#536b86}.emptyState>b{font-size:19px;color:#29415f}.emptyState p{font-size:13px;margin:7px 0 0}.scanFrame i{position:absolute;width:34px;height:34px;border-color:#fff;border-style:solid;z-index:3;filter:drop-shadow(0 1px 3px rgba(0,0,0,.15))}.scanFrame i:nth-child(1){top:18px;left:18px;border-width:4px 0 0 4px;border-radius:8px 0 0 0}.scanFrame i:nth-child(2){top:18px;right:18px;border-width:4px 4px 0 0;border-radius:0 8px 0 0}.scanFrame i:nth-child(3){bottom:18px;left:18px;border-width:0 0 4px 4px;border-radius:0 0 0 8px}.scanFrame i:nth-child(4){bottom:18px;right:18px;border-width:0 4px 4px 0;border-radius:0 0 8px 0}.radarBall{width:106px;height:106px;border-radius:50%;border:2px dashed #7aa1cb;position:relative;margin-bottom:16px;display:flex;align-items:center;justify-content:center;animation:spinSlow 8s linear infinite}.radarBall:before,.radarBall:after{content:"";position:absolute;border-radius:50%;border:1px solid rgba(81,132,180,.25)}.radarBall:before{inset:14px}.radarBall:after{inset:30px}.miniBall{width:40px;height:40px;border-radius:50%;background:linear-gradient(#ee5353 0 47%,#28384d 47% 54%,#fff 54%);border:3px solid #28384d;position:relative;z-index:2}.miniBall:after{content:"";position:absolute;left:50%;top:50%;width:10px;height:10px;background:#fff;border:3px solid #28384d;border-radius:50%;transform:translate(-50%,-50%)}@keyframes spinSlow{to{transform:rotate(360deg)}}.scanBeam{position:absolute;left:0;right:0;height:4px;background:linear-gradient(90deg,transparent,#71c5ff,#fff,#71c5ff,transparent);box-shadow:0 0 18px #64c7ff;top:14%;animation:beam 1.6s ease-in-out infinite;z-index:5}@keyframes beam{0%,100%{top:12%}50%{top:88%}}.buttons{display:flex;gap:10px;margin-top:14px}.captureBtn,.secondary,.tinyBtn{border:0;border-radius:18px;padding:15px 17px;font-weight:1000}.captureBtn{background:linear-gradient(180deg,#f15c5c,#dc4040);color:#fff;box-shadow:0 6px 0 #b92f2f,0 9px 16px rgba(221,64,64,.22);flex:1}.captureBtn:active{transform:translateY(3px);box-shadow:0 3px 0 #b92f2f}.secondary{background:#eef2f6;color:#50637b}.secondary:disabled{opacity:.4}.btnBall{display:inline-block;width:18px;height:18px;border-radius:50%;background:linear-gradient(#fff 0 44%,#21344d 44% 58%,#fff 58%);border:2px solid #fff;vertical-align:-4px;margin-right:8px}.statusPanel,.quality,.result{margin-top:16px;border-radius:23px}.statusPanel{padding:18px;background:#edf5ff;display:flex;align-items:center;gap:15px}.statusPanel b,.statusPanel span{display:block}.statusPanel span{font-size:12px;color:#6b7d92;margin-top:4px}.scanOrb{position:relative;width:56px;height:56px;flex:0 0 56px}.orbBall{position:absolute;inset:10px;border-radius:50%;background:linear-gradient(#eb5151 0 46%,#24354c 46% 56%,#fff 56%);border:3px solid #24354c;z-index:3}.pulse{position:absolute;inset:0;border:2px solid #70b8ff;border-radius:50%;animation:pulse 1.6s ease-out infinite}.p2{animation-delay:.8s}@keyframes pulse{0%{transform:scale(.55);opacity:.8}100%{transform:scale(1.35);opacity:0}}.quality{padding:14px;background:#edf7ee;color:#44664a;font-size:13px}.quality.warn{background:#fff3e9;color:#86572e}.result{padding:20px;text-align:center;background:linear-gradient(180deg,#fff,#f4f8fc);border:2px solid #e4ebf3}.resultIcon{font-size:46px}.resultLabel{font-size:9px;font-weight:1000;letter-spacing:.16em;color:#7990aa;margin-top:8px}.result h2{font-size:26px;margin:5px 0 8px;color:#233853}.result p{margin:0;color:#64778e;line-height:1.5}.confidence{display:inline-block;margin-top:11px;background:#eaf0f7;padding:7px 10px;border-radius:999px;font-size:11px;font-weight:900;color:#607790}.resultActions{display:flex;gap:9px;justify-content:center;margin-top:14px}.sectionHead{display:flex;justify-content:space-between;align-items:flex-end;padding:3px 2px 14px}.sectionHead h2{margin:3px 0 0;font-size:24px;color:#243850}.tinyBtn{padding:9px 11px;background:#edf1f5;color:#718196;font-size:11px}.dex{display:grid;grid-template-columns:repeat(2,1fr);gap:12px}.dexCard{background:linear-gradient(180deg,#f7fbff,#eef5fb);border-radius:22px;overflow:hidden;border:1px solid #dbe7f2;box-shadow:0 6px 14px rgba(60,98,136,.06);position:relative}.dexCard:before{content:"";position:absolute;right:9px;top:9px;width:27px;height:27px;border-radius:50%;background:linear-gradient(#ec5454 0 47%,#26384e 47% 56%,#fff 56%);border:2px solid #fff;box-shadow:0 2px 4px rgba(0,0,0,.12);z-index:2}.dexCard img{width:100%;height:150px;object-fit:cover}.dexMeta{padding:12px}.dexMeta b{display:block;font-size:17px;color:#233952}.dexMeta span{font-size:11px;color:#75869a}.map{height:390px;border-radius:22px;overflow:hidden}.mapHint{font-size:12px;color:#74869a}.hidden{display:none!important}dialog{border:0;border-radius:30px;padding:24px;width:min(90vw,430px);box-shadow:0 30px 90px rgba(28,43,64,.28);overflow:hidden}dialog::backdrop{background:rgba(22,34,50,.62);backdrop-filter:blur(5px)}.gotchaDialog{text-align:center;background:linear-gradient(180deg,#f8fbff,#fff7db)}.gotchaBg{position:absolute;inset:0;background:radial-gradient(circle at 50% 37%,rgba(255,217,73,.42),transparent 32%);pointer-events:none}.gotchaStars{font-size:27px;color:#efb91e;animation:twinkle .7s ease-in-out infinite alternate}@keyframes twinkle{to{transform:scale(1.15);filter:brightness(1.2)}}.bigBall{position:relative;width:112px;height:112px;border-radius:50%;margin:12px auto;background:linear-gradient(#ed5555 0 47%,#24354c 47% 55%,#fff 55%);border:7px solid #24354c;box-shadow:0 15px 25px rgba(45,59,80,.18);animation:catchShake .55s ease-in-out 3}.ballButton{position:absolute;width:31px;height:31px;background:#fff;border:6px solid #24354c;border-radius:50%;left:50%;top:51%;transform:translate(-50%,-50%)}@keyframes catchShake{0%,100%{transform:rotate(0)}25%{transform:rotate(-13deg) translateX(-4px)}75%{transform:rotate(13deg) translateX(4px)}}.shakeDots{display:flex;gap:7px;justify-content:center;margin:3px 0 8px}.shakeDots span{width:7px;height:7px;border-radius:50%;background:#efbd29;animation:dot .6s ease-in-out alternate infinite}.shakeDots span:nth-child(2){animation-delay:.15s}.shakeDots span:nth-child(3){animation-delay:.3s}@keyframes dot{to{transform:translateY(-6px)}}.gotchaWord{font-size:38px;font-weight:1000;letter-spacing:.04em;color:#e54848;text-shadow:0 3px 0 #fff}.gotchaDialog h2{font-size:24px;color:#263950;margin:8px 0}.gotchaDialog p{color:#6a7c90;font-size:13px}.detailImage{width:100%;height:240px;border-radius:22px;object-fit:cover}.detailDialog h2{font-size:26px;color:#233952}.detailDialog p{color:#6f8195}.detailMap{height:220px;border-radius:18px;overflow:hidden;margin:12px 0}.tabPage.hidden{display:none}@media(max-width:560px){.gameHeader h1{font-size:34px}.dexRing{width:76px;height:76px;flex-basis:76px}.preview{min-height:300px}.preview img{min-height:300px}.dex{grid-template-columns:1fr}.resultActions{flex-direction:column}.resultActions button{width:100%}}
.topMeta{display:flex;align-items:center;justify-content:space-between;gap:10px}
.versionBadge{display:inline-flex;align-items:center;justify-content:center;padding:6px 9px;border-radius:999px;background:#223a59;color:#fff;font-size:11px;font-weight:1000;letter-spacing:.04em;box-shadow:0 3px 8px rgba(35,58,89,.16)}

.dexProgress{margin-top:5px;font-size:12px;font-weight:900;color:#e54b4b}
.dex{grid-template-columns:repeat(3,1fr)}
.dexCard{min-width:0;cursor:pointer;transition:transform .18s ease,box-shadow .18s ease}
.dexCard:active{transform:scale(.98)}
.dexVisual{height:122px;display:flex;align-items:center;justify-content:center;position:relative;background:radial-gradient(circle at 50% 42%,#fff 0,#eef6ff 62%,#e7f0f8 100%);overflow:hidden}
.dexVisual img{width:104px;height:104px;object-fit:contain;image-rendering:auto}
.dexCard.locked .dexVisual img{filter:brightness(0) saturate(0);opacity:.68}
.dexCard.locked .dexVisual:after{content:"?";position:absolute;right:10px;bottom:5px;font-size:27px;font-weight:1000;color:rgba(40,61,85,.22)}
.dexCard.locked .dexMeta b{color:#697b8f}
.dexCard.locked .dexMeta span{color:#a0aab4}
.dexNo{font-size:10px;font-weight:1000;letter-spacing:.08em;color:#7c91a8;margin-bottom:3px}
.dexName{font-size:14px!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.dexMeta{padding:9px}
.dexMeta span{font-size:10px}
.newBadge{position:absolute;left:8px;top:8px;z-index:4;background:#ffd43b;color:#26384e;border:2px solid #fff;padding:4px 7px;border-radius:999px;font-size:9px;font-weight:1000;box-shadow:0 3px 8px rgba(0,0,0,.12);animation:newPop 1s ease-in-out infinite alternate}
@keyframes newPop{to{transform:scale(1.08) rotate(-3deg)}}
.dexCard.justUnlocked{animation:unlock .75s ease both}
@keyframes unlock{0%{transform:scale(.92);filter:brightness(1.8)}55%{transform:scale(1.05)}100%{transform:scale(1);filter:none}}
.detailSpriteWrap{height:240px;border-radius:22px;display:flex;align-items:center;justify-content:center;background:radial-gradient(circle,#fff,#e8f2fb);margin-bottom:12px}
.detailImage{width:190px!important;height:190px!important;object-fit:contain!important;border-radius:0!important}
@media(max-width:560px){
  .dex{grid-template-columns:repeat(3,1fr)!important;gap:8px}
  .dexVisual{height:100px}
  .dexVisual img{width:88px;height:88px}
  .dexMeta{padding:8px 7px}
  .dexName{font-size:12px!important}
  .dexMeta span{font-size:9px}
}


/* v5.2 */
.engineStatus{
  margin-top:9px;padding:9px 11px;border-radius:14px;
  background:#eef8ff;border:1px solid #cce7fa;
  display:flex;justify-content:space-between;align-items:center;gap:8px;
  font-size:10px;color:#537083
}
.engineStatus b{color:#2678a8}.engineStatus span{text-align:right}
.pokemonMarker{
  width:54px;height:54px;border-radius:50%;
  display:flex;align-items:center;justify-content:center;
  background:rgba(255,255,255,.94);
  border:3px solid #fff;
  box-shadow:0 3px 10px rgba(0,0,0,.26);
}
.pokemonMarker img{
  width:48px;height:48px;object-fit:contain;
  image-rendering:auto;
}
.leaflet-div-icon.pokemonMapDivIcon{
  background:transparent;border:none;
}

/* v5.3 rich Pokédex */
.cardTypeRow{display:flex;gap:4px;flex-wrap:wrap;margin-top:5px}
.typeBadge{display:inline-flex;align-items:center;justify-content:center;min-width:34px;padding:3px 7px;border-radius:999px;font-size:9px;font-weight:1000;color:#26384e;background:#edf2f6;border:1px solid rgba(0,0,0,.06)}
.type-fire{background:#ffd9cc}.type-water{background:#d6e8ff}.type-grass{background:#d8f2d1}.type-electric{background:#fff0a8}.type-psychic{background:#ffd6e7}.type-ice{background:#d9f4f6}.type-dragon{background:#e4dbff}.type-dark{background:#ded9d6}.type-fairy{background:#ffe1f1}.type-normal{background:#ecebea}.type-fighting{background:#ffd7d0}.type-flying{background:#e0e9ff}.type-poison{background:#ead8f2}.type-ground{background:#f4e1bf}.type-rock{background:#e7dfc1}.type-bug{background:#e8efbd}.type-ghost{background:#e1dcf1}.type-steel{background:#e1e7eb}
.dexDetailDialog{width:min(92vw,680px);max-height:88vh;overflow:auto}.dexDetailTop{display:grid;grid-template-columns:230px 1fr;gap:18px;align-items:center}.dexDetailTop .detailSpriteWrap{height:220px;margin:0}.detailIdentity h2{margin:6px 0 10px}.typeRow{display:flex;gap:7px;flex-wrap:wrap;margin-bottom:8px}.typeRow .typeBadge{font-size:11px;padding:5px 10px}.detailSpecies{margin:4px 0 0;color:#6b7b89;font-size:12px;font-weight:800}
.dexInfoGrid{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:16px 0}.dexInfoBox{background:#f5f8fb;border:1px solid #e2e9ef;border-radius:16px;padding:12px}.dexInfoBox.wide{grid-column:1/-1}.dexInfoBox span{display:block;font-size:10px;color:#8494a4;font-weight:900;margin-bottom:4px}.dexInfoBox b{font-size:14px;color:#26384e}.dexSection{margin-top:16px}.dexSectionTitle{font-size:12px;font-weight:1000;color:#26384e;margin-bottom:8px}.moveGrid{display:grid;grid-template-columns:repeat(2,1fr);gap:8px}.moveChip{background:#fff;border:1px solid #e4e9ed;border-radius:13px;padding:10px 11px;font-size:12px;font-weight:900;color:#415469}.dexFlavor{margin:0;background:#fff9e9;border:1px solid #f3e1a7;border-radius:14px;padding:12px;font-size:12px;line-height:1.55;color:#5d5848}.dexLoading{font-size:11px;color:#8795a2;padding:8px}
@media(max-width:600px){.dexDetailTop{grid-template-columns:1fr}.dexDetailTop .detailSpriteWrap{height:190px}.moveGrid{grid-template-columns:1fr 1fr}}

/* v5.4 lightweight capture animation - transform/opacity only */
.captureFx{
  position:fixed;inset:0;z-index:9999;
  display:flex;flex-direction:column;align-items:center;justify-content:center;
  pointer-events:none;background:rgba(17,28,38,.12);
  opacity:1;transition:opacity .16s linear;
}
.captureFx.hidden{display:none}
.captureBall{
  position:relative;width:94px;height:94px;border-radius:50%;
  background:linear-gradient(to bottom,#ef4b4b 0 48%,#202b35 48% 52%,#f8fbfd 52% 100%);
  border:5px solid #202b35;
  box-shadow:0 8px 18px rgba(0,0,0,.22);
  transform:translate3d(0,0,0);
  will-change:transform;
}
.captureBallLine{
  position:absolute;left:0;right:0;top:46%;
  height:8px;background:#202b35;
}
.captureBallButton{
  position:absolute;left:50%;top:50%;width:28px;height:28px;
  transform:translate(-50%,-50%);
  border-radius:50%;background:white;border:6px solid #202b35;
  box-sizing:border-box;z-index:2;
}
.captureBall.shake{
  animation:captureShake .34s ease-in-out 3;
}
@keyframes captureShake{
  0%,100%{transform:translate3d(0,0,0) rotate(0deg)}
  25%{transform:translate3d(-12px,0,0) rotate(-13deg)}
  75%{transform:translate3d(12px,0,0) rotate(13deg)}
}
.captureFlash{
  position:absolute;inset:0;background:white;opacity:0;
}
.captureFlash.flash{animation:captureFlash .24s ease-out 1}
@keyframes captureFlash{
  0%{opacity:0}
  35%{opacity:.82}
  100%{opacity:0}
}
.captureGotchaText{
  margin-top:24px;font-size:31px;font-weight:1000;letter-spacing:.05em;
  color:white;text-shadow:0 3px 10px rgba(0,0,0,.42);
  opacity:0;transform:scale(.86);will-change:transform,opacity;
}
.captureGotchaText.show{
  animation:gotchaPop .55s ease-out forwards;
}
@keyframes gotchaPop{
  0%{opacity:0;transform:scale(.82)}
  55%{opacity:1;transform:scale(1.08)}
  100%{opacity:1;transform:scale(1)}
}
@media (prefers-reduced-motion: reduce){
  .captureBall.shake,.captureFlash.flash,.captureGotchaText.show{animation-duration:.01ms!important;animation-iteration-count:1!important}
}

/* v5.6 growth */
.growthTitleRow{display:flex;justify-content:space-between;align-items:center;gap:10px}
.berryWallet{display:inline-flex;align-items:center;justify-content:center;min-width:62px;padding:5px 9px;border-radius:999px;background:#fff0f2;border:1px solid #f3cdd2;color:#9d4050;font-size:11px;font-weight:1000}
.growthBody{background:#f7fbf7;border:1px solid #dcebdc;border-radius:16px;padding:13px}
.growthPokemonRow{display:flex;align-items:center;gap:12px}.growthMiniSprite{width:70px;height:70px;object-fit:contain;border-radius:14px;background:white;border:1px solid #e5ece5}
.growthInfo{flex:1}.growthInfo b{display:block;font-size:13px;color:#2d4635;margin-bottom:4px}.growthInfo span{font-size:10px;color:#748379}
.growthBar{height:10px;border-radius:999px;background:#e2e8e3;overflow:hidden;margin:10px 0 8px}.growthBarFill{height:100%;background:linear-gradient(90deg,#83c58b,#56ab68);border-radius:inherit;transition:width .25s ease}
.growthActions{display:flex;gap:8px;flex-wrap:wrap}.feedBtn,.evolveBtn,.branchBtn{border:0;border-radius:12px;padding:10px 12px;font-size:11px;font-weight:1000;cursor:pointer}
.feedBtn{background:#fff0f2;color:#9d4050;border:1px solid #efc9d0}.feedBtn:disabled{opacity:.45}.evolveBtn{background:#3c9e5d;color:white}
.branchChoices{display:grid;grid-template-columns:repeat(3,1fr);gap:7px;margin-top:9px}.branchBtn{background:white;color:#3e5847;border:1px solid #d6e4d8;padding:8px}.branchBtn img{width:42px;height:42px;display:block;object-fit:contain;margin:0 auto 3px}
.growthHint{margin-top:8px;font-size:10px;line-height:1.45;color:#7b897f}.growthDone{display:flex;align-items:center;gap:10px;font-size:11px;color:#65766b}.growthDone b{color:#2d4635}
.growthToast{position:fixed;left:50%;bottom:86px;z-index:10000;transform:translateX(-50%);background:rgba(28,45,35,.94);color:white;padding:11px 16px;border-radius:999px;font-size:12px;font-weight:1000;box-shadow:0 5px 18px rgba(0,0,0,.22)}
.growthToast.hidden{display:none}

/* v5.8 navigation / dex / top3 */
.tabs{
  position:fixed!important;
  left:50%;bottom:calc(8px + env(safe-area-inset-bottom));
  transform:translateX(-50%);
  width:min(calc(100% - 20px),740px);
  z-index:1500;margin:0!important;padding:7px;
  border-radius:22px;background:rgba(244,249,253,.94);
  border:1px solid rgba(80,111,145,.16);
  box-shadow:0 8px 26px rgba(32,54,78,.22);
  backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px)
}
.tab{padding:11px 8px;border-radius:15px}
.app{padding-bottom:calc(100px + env(safe-area-inset-bottom))!important}

.dexDetailSticky{
  position:sticky;top:-1px;z-index:30;
  display:flex;align-items:center;justify-content:space-between;
  padding:10px 2px 12px;margin:-2px 0 10px;
  background:rgba(255,255,255,.97);
  border-bottom:1px solid #e8edf1;
  backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px)
}
.dexDetailSticky b{font-size:13px;color:#26384e}
.detailCloseBtn{
  border:0;background:#edf2f6;color:#445a70;border-radius:999px;
  padding:8px 12px;font-size:11px;font-weight:1000
}
.detailSpritePane{min-width:0}
.detailSpritePane .detailSpriteWrap{height:190px!important;margin:0 0 8px!important}
.growthInlineHead{display:flex;justify-content:space-between;align-items:center;margin:3px 0 6px;font-size:10px;font-weight:1000;color:#53695b}
.growthBodyCompact{padding:9px!important;border-radius:13px!important}
.growthBodyCompact .growthPokemonRow{display:block}
.growthBodyCompact .growthMiniSprite{display:none}
.growthBodyCompact .growthInfo b{font-size:11px;margin-bottom:2px}
.growthBodyCompact .growthBar{margin:7px 0 6px;height:8px}
.growthBodyCompact .growthHint{margin-top:5px;font-size:9px}
.growthBodyCompact .feedBtn,.growthBodyCompact .evolveBtn{padding:8px 10px;font-size:10px}
.compactInfo{margin:12px 0 0!important}
.dexCardGrowth{margin-top:6px}
.dexCardGrowthTop{display:flex;justify-content:space-between;gap:5px;font-size:9px;font-weight:900;color:#718171}
.dexCardGrowthBar{height:5px;border-radius:999px;background:#e3e9e4;overflow:hidden;margin-top:4px}
.dexCardGrowthBar i{display:block;height:100%;background:#65ae71;border-radius:inherit}
.dexCardGrowth.ready .dexCardGrowthTop{color:#2f9550}
.dexCardGrowth.done .dexCardGrowthTop{color:#8c98a3}

.top3Candidates{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-top:12px}
.top3Card{
  border:1px solid #dde6ee;background:#fff;border-radius:15px;
  padding:8px 6px;text-align:center;cursor:pointer;color:#31485e;
  box-shadow:0 4px 10px rgba(50,78,105,.08)
}
.top3Card:active{transform:scale(.97)}
.top3Card img{width:72px;height:72px;object-fit:contain;display:block;margin:0 auto 4px}
.top3Card b{display:block;font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.top3Card span{display:block;font-size:9px;color:#8593a0;margin-top:3px}
.top3Rank{display:inline-flex!important;align-items:center;justify-content:center;width:18px;height:18px;border-radius:50%;background:#edf3f7;color:#607487!important;font-weight:1000;margin:0 auto 3px!important}
@media(max-width:520px){
  .dexDetailTop{grid-template-columns:1fr!important}
  .detailSpritePane .detailSpriteWrap{height:175px!important}
  .top3Card img{width:62px;height:62px}
  .top3Card{padding:7px 4px}
}

/* v6.0 camera / photo-library actions */
.huntActionButtons{
  display:grid!important;
  grid-template-columns:1.35fr 1.35fr .8fr;
  gap:8px;
  align-items:stretch;
}
.huntActionButtons button{
  min-width:0;
  min-height:48px;
  padding:10px 8px;
  white-space:nowrap;
}
.huntActionButtons .galleryBtn{
  font-weight:900;
}
@media(max-width:430px){
  .huntActionButtons{
    grid-template-columns:1fr 1fr;
  }
  .huntActionButtons #resetBtn{
    grid-column:1 / -1;
    min-height:42px;
  }
}

#speakAgainBtn{margin-top:8px}

/* v6.3 top berry status */
.berryTopStatus{
  display:flex!important;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}
.berryTopStatus b{font-weight:1000}
.berryTopStatus span{font-size:15px;font-weight:1000}

/* v6.4 settings */
.settingsPanel{padding-bottom:22px}
.settingsIntro{margin:5px 0 0;color:#718092;font-size:12px}
.settingsGroup{
  margin-top:15px;padding:13px;border:1px solid #e3e9ef;
  border-radius:17px;background:#fbfcfe
}
.settingRow{
  display:flex;align-items:center;justify-content:space-between;
  gap:15px;padding:12px 2px;border-bottom:1px solid #e9edf1
}
.settingRow:last-child{border-bottom:0}
.settingRow>div{min-width:0}
.settingRow b{display:block;font-size:13px;color:#30465b}
.settingRow span{display:block;margin-top:3px;font-size:10px;color:#7d8c99}
.switch{position:relative;width:48px;height:28px;flex:0 0 auto}
.switch input{opacity:0;width:0;height:0}
.slider{
  position:absolute;inset:0;background:#cdd5dc;border-radius:999px;
  transition:.18s;cursor:pointer
}
.slider:before{
  content:"";position:absolute;width:22px;height:22px;left:3px;top:3px;
  background:#fff;border-radius:50%;box-shadow:0 2px 6px rgba(0,0,0,.18);
  transition:.18s
}
.switch input:checked + .slider{background:#5ca66d}
.switch input:checked + .slider:before{transform:translateX(20px)}
.voiceLabel b{display:block;font-size:13px;color:#30465b}
.voiceLabel span{display:block;font-size:10px;color:#7d8c99;margin:3px 0 9px}
.voiceSelect{
  width:100%;border:1px solid #dce4eb;border-radius:12px;
  background:#fff;padding:12px;font-size:13px;color:#324a60
}
.voiceTestBtn{width:100%;margin-top:9px}
.voiceStatus{margin:8px 2px 0;font-size:10px;color:#728192}

/* v6.5: display-only high-resolution Dex artwork */
.dexVisual{
  overflow:hidden;
  background:linear-gradient(180deg,#fcfdff 0%,#f2f6fa 100%);
}
.dexVisual img{
  image-rendering:auto!important;
  width:100%;
  height:100%;
  object-fit:contain;
  transform:translateZ(0);
}
.detailSpriteWrap{
  overflow:hidden;
  background:linear-gradient(180deg,#fcfdff 0%,#f2f6fa 100%);
}
.detailImage{
  image-rendering:auto!important;
  width:100%!important;
  height:100%!important;
  object-fit:contain!important;
  filter:none!important;
}

/* v6.6 home redesign: approved game-like visual direction */
:root{--ink:#17345b;--red:#ef4848;--blue:#4f8fd8;--soft:#f4f8fc}
html,body{background:#f5f9fd;color:var(--ink)}
.ambient{background:linear-gradient(180deg,#eef7ff 0%,#f7fbff 45%,#eef5f9 100%)}
.app{max-width:700px;padding:calc(12px + env(safe-area-inset-top)) 16px calc(108px + env(safe-area-inset-bottom))}
.gameHeader{
  min-height:356px;padding:28px 28px 25px;border-radius:34px;
  background-image:linear-gradient(90deg,rgba(255,255,255,.12),rgba(255,255,255,0)),url('./assets/header-landscape.svg');
  background-size:cover;background-position:center;border:2px solid rgba(255,255,255,.9);
  box-shadow:0 18px 44px rgba(58,103,146,.18);overflow:hidden
}
.gameHeader:after{display:none}
.gameHeader .headerTop{position:relative;z-index:2}
.gameHeader .kicker{color:#2c649f;font-size:10px;letter-spacing:.19em}
.topMeta{display:flex;align-items:center;gap:12px}
.versionBadge{display:inline-flex;align-items:center;justify-content:center;padding:7px 13px;background:linear-gradient(180deg,#4c92d9,#2570bd);border-radius:999px;color:#fff;font-weight:1000;font-size:11px;box-shadow:0 5px 12px rgba(39,112,189,.22)}
.gameHeader h1{margin:14px 0 15px;font-size:46px;line-height:.94;letter-spacing:-.055em;color:#18345b;text-shadow:0 2px 0 rgba(255,255,255,.85)}
.gameHeader h1 span{color:#ec4343}
.gameHeader p{font-size:15px;line-height:1.55;color:#375679;font-weight:700;max-width:350px;text-shadow:0 1px 0 rgba(255,255,255,.75)}
.dexRing{width:94px;height:94px;flex:0 0 94px;border:8px solid #f14c4c;box-shadow:0 10px 24px rgba(197,57,57,.22),inset 0 0 0 5px #fff;background:rgba(255,255,255,.96)}
.dexRing b{font-size:33px;color:#17345b}.dexRing span{font-size:12px;color:#ec4141;letter-spacing:.04em}
.homeStatusBar{
  position:absolute;z-index:4;left:28px;right:28px;bottom:23px;margin:0!important;
  min-height:82px;padding:10px 12px 10px 18px!important;border-radius:27px!important;
  background:rgba(255,255,255,.96)!important;color:#17345b!important;border:1px solid rgba(255,255,255,.98);
  box-shadow:0 11px 25px rgba(44,90,129,.14);display:flex!important
}
.berryStatusMain{display:flex;align-items:center;gap:8px;min-width:0;flex:1;white-space:nowrap}
.berryStatusMain .berryIcon{font-size:25px}.berryStatusMain b{font-size:13px;color:#294c70}.berryStatusMain strong{font-size:21px;color:#14569c;margin-left:3px}
.partnerStatus{display:flex;align-items:flex-end;gap:8px;flex:0 0 auto;margin-left:8px}
.avatarButton{border:0;background:transparent;padding:0;display:flex;flex-direction:column;align-items:center;color:#294563;font:inherit;cursor:pointer;min-width:56px}
.avatarButton small{font-size:9px;font-weight:1000;max-width:72px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-top:3px}
.avatarCircle{width:55px;height:55px;border-radius:50%;display:flex;align-items:center;justify-content:center;background:#fff;border:4px solid #fff;box-shadow:0 4px 13px rgba(37,75,113,.18);overflow:hidden;position:relative}
.avatarCircle img{display:none;width:100%;height:100%;object-fit:cover}.avatarCircle img.show{display:block}
.companionCircle img{object-fit:contain;background:linear-gradient(180deg,#dff2ff,#fff8d8)}
.avatarPlaceholder{font-size:24px;font-weight:900;color:#7094b6;background:linear-gradient(180deg,#e9f5ff,#f8fcff);width:100%;height:100%;display:flex;align-items:center;justify-content:center}
.ballPlaceholder{font-size:0}.ballPlaceholder:before{content:"";width:28px;height:28px;border-radius:50%;border:3px solid #27425e;background:linear-gradient(#ef4b4b 0 46%,#27425e 46% 55%,#fff 55%);box-shadow:inset 0 0 0 2px #fff}

.scannerCard{margin-top:18px;padding:18px;border-radius:32px;background:rgba(255,255,255,.97);border:1px solid rgba(255,255,255,.95);box-shadow:0 16px 38px rgba(46,82,119,.14)}
.scannerTitle{padding:3px 4px 16px}.scannerTitle b{font-size:18px;color:#18365d}.scannerTitle small{font-size:9px;color:#6f87a4;letter-spacing:.16em}.statusDot{width:11px;height:11px;background:#55cf87;box-shadow:0 0 0 7px rgba(85,207,135,.15)}
.preview{min-height:392px;border-radius:28px;border:2px solid #bcd9f5;background:linear-gradient(180deg,#dceeff 0%,#edf7ff 100%);box-shadow:inset 0 0 38px rgba(88,151,210,.10)}
.preview img{min-height:392px;max-height:530px}
.emptyState>b{font-size:23px;color:#193a62}.emptyState p{font-size:13px;color:#577291}
.radarBall{width:126px;height:126px;border-color:#6fa9dd;margin-bottom:24px}.miniBall{width:50px;height:50px}
.scanFrame i{width:42px;height:42px;border-width:0;filter:drop-shadow(0 2px 4px rgba(39,82,120,.15))}.scanFrame i:nth-child(1){border-width:6px 0 0 6px}.scanFrame i:nth-child(2){border-width:6px 6px 0 0}.scanFrame i:nth-child(3){border-width:0 0 6px 6px}.scanFrame i:nth-child(4){border-width:0 6px 6px 0}
.huntActionButtons{grid-template-columns:1.1fr 1fr .76fr!important;gap:11px!important;margin-top:17px}
.huntActionButtons button{min-height:58px!important;border-radius:20px!important;font-size:14px;padding:12px 10px!important}
.huntActionButtons .captureBtn{background:linear-gradient(180deg,#fb5b58,#e83e3e);box-shadow:0 7px 0 #c62f31,0 12px 21px rgba(220,62,62,.22)}
.huntActionButtons .galleryBtn{background:linear-gradient(180deg,#eaf4ff,#d9eaff);color:#255a91;box-shadow:0 5px 0 #c5d9ec}
.huntActionButtons #resetBtn{background:linear-gradient(180deg,#f5f7fa,#edf0f4);color:#667b94;box-shadow:0 5px 0 #e1e5ea}

.tabs{width:min(calc(100% - 24px),676px)!important;bottom:calc(8px + env(safe-area-inset-bottom));padding:8px!important;gap:5px!important;border-radius:27px!important;background:rgba(255,255,255,.94)!important;border:1px solid rgba(255,255,255,.95)!important;box-shadow:0 10px 28px rgba(35,67,100,.20)!important}
.tab{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;padding:8px 6px!important;border-radius:20px!important;background:transparent!important;box-shadow:none!important;color:#7188a5!important}
.tab .tabIcon{font-size:19px;line-height:1;margin:0!important}.tab em{font-style:normal;font-size:11px;font-weight:1000}
.tab.active{color:#e83f3f!important;background:linear-gradient(180deg,#fff3f3,#ffecec)!important;box-shadow:inset 0 0 0 1px rgba(239,72,72,.08)!important}

/* Trainer + companion selector */
.companionDialog{width:min(92vw,560px);max-height:78vh;padding:20px;background:#f8fbff}
.companionDialogHead{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}.companionDialogHead h2{margin:4px 0 5px;font-size:22px;color:#18365d}.companionDialogHead p{margin:0;color:#6d7f93;font-size:11px;line-height:1.45}
.companionGrid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin-top:16px;max-height:52vh;overflow:auto;padding:2px}
.companionChoice{border:1px solid #dce8f3;background:#fff;border-radius:18px;padding:9px 6px;color:#27445f;box-shadow:0 5px 12px rgba(41,80,114,.07)}
.companionChoice.selected{border:2px solid #ef5252;background:#fff7f7}.partnerPick{display:block;height:78px}.partnerPick img{width:100%;height:100%;object-fit:contain;image-rendering:auto}.companionChoice b{display:block;font-size:11px}.companionChoice small{display:block;margin-top:2px;color:#8998a8;font-size:9px}.companionEmpty{grid-column:1/-1;text-align:center;padding:34px 12px;color:#75879a;line-height:1.7}

/* Keep secondary pages clean while matching the new home visual language. */
.panel{border-radius:30px;box-shadow:0 15px 34px rgba(49,84,117,.12);border:1px solid rgba(255,255,255,.92)}

@media(max-width:560px){
  .app{padding-left:12px;padding-right:12px}
  .gameHeader{min-height:330px;padding:23px 20px 22px;border-radius:30px}
  .gameHeader h1{font-size:39px;margin-top:12px}.gameHeader p{font-size:13px;max-width:270px}
  .dexRing{width:78px;height:78px;flex-basis:78px;border-width:7px}.dexRing b{font-size:28px}
  .homeStatusBar{left:18px;right:18px;bottom:17px;min-height:75px;padding:8px 9px 8px 13px!important;border-radius:24px!important}
  .berryStatusMain{gap:5px}.berryStatusMain .berryIcon{font-size:22px}.berryStatusMain b{font-size:11px}.berryStatusMain strong{font-size:18px}
  .partnerStatus{gap:5px;margin-left:4px}.avatarButton{min-width:46px}.avatarCircle{width:47px;height:47px}.avatarButton small{font-size:8px;max-width:58px}
  .scannerCard{padding:13px;border-radius:28px}.scannerTitle b{font-size:16px}.preview{min-height:335px;border-radius:24px}.preview img{min-height:335px}.emptyState>b{font-size:20px}.radarBall{width:108px;height:108px;margin-bottom:18px}
  .huntActionButtons{grid-template-columns:1fr 1fr!important;gap:8px!important}.huntActionButtons #resetBtn{grid-column:1/-1}.huntActionButtons button{min-height:51px!important;font-size:12px}
  .companionGrid{grid-template-columns:repeat(3,1fr)}
}
@media(max-width:380px){
  .gameHeader h1{font-size:35px}.gameHeader p{font-size:12px}.dexRing{width:70px;height:70px;flex-basis:70px}
  .berryStatusMain b{display:none}.berryStatusMain strong{font-size:17px}.partnerStatus{gap:3px}.avatarCircle{width:44px;height:44px}
  .companionGrid{grid-template-columns:repeat(2,1fr)}
}
