#kingdom{position:fixed;inset:0;z-index:46;overflow:auto;overscroll-behavior:contain;touch-action:pan-y;background:radial-gradient(ellipse at 20% 0,#fff3d5,transparent 60%),linear-gradient(135deg,#eaf8ec,#e5f3fa);color:#2c4d4a;padding:max(12px,env(safe-area-inset-top)) max(16px,env(safe-area-inset-right)) max(12px,env(safe-area-inset-bottom)) max(16px,env(safe-area-inset-left))}
#kingdom button{min-height:44px;touch-action:manipulation}#kingdom button:disabled{cursor:default;opacity:.55}#kingdom button:focus-visible{outline:3px solid #164e77;outline-offset:3px}.kingdomTop{display:flex;align-items:center;gap:13px;max-width:1240px;margin:0 auto 16px}.kingdomTop>div{flex:1}.kingdomTop small{font-size:10px;letter-spacing:2px;color:#617d68}.kingdomTop h1{font:800 clamp(20px,2.8vw,32px)/1.15 var(--display);margin:3px 0}.kingdomBack{background:#fffdf3;border:1px solid #d8dfc9;box-shadow:0 3px #bacbb4;border-radius:17px;width:50px;flex:none;font-size:28px}.kingdomWallet{padding:9px 16px;border:1px solid #e7cf87;border-radius:17px;background:#fff0b8;color:#77541a;white-space:nowrap}.kingdomWallet b{font-size:22px}.kingdomLobby{max-width:1120px;margin:auto}.kingdomHero{display:grid;grid-template-columns:1.25fr 1fr;overflow:hidden;border:3px solid #fff;border-radius:30px;background:#235f55;box-shadow:0 7px 0 #b8d5c1,0 15px 35px #35634f15;min-height:255px}.kingdomHero>img{width:100%;height:100%;max-height:315px;object-fit:cover;object-position:70% 45%}.kingdomHero>div{align-self:center;padding:30px;color:#fff8e4}.kingdomHero span{font-size:10px;letter-spacing:2px;color:#f6d693}.kingdomHero h2{font:800 clamp(25px,3vw,38px)/1.18 var(--display);margin:12px 0}.kingdomHero p{font-size:15px;line-height:1.6;max-width:370px;color:#e0f3e8;margin:0}.kingdomTabs{display:flex;gap:10px;margin:24px 0 0}.kingdomTabs button{padding:10px 22px;border:2px solid #b3cebf;border-radius:18px;background:#fafff7;color:#426559}.kingdomTabs [aria-pressed=true]{background:#286d5d;border-color:#286d5d;color:white;box-shadow:0 4px #184f42}.kingdomNotice{font-size:14px;line-height:1.5;min-height:22px;color:#3e5e58;margin:15px 0 6px}.kingdomCaption{font-size:13px;line-height:1.6;color:#546959;margin:8px 0 20px}.kingdomLevels{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:14px 0 24px}.kingdomLevel{display:flex;align-items:center;gap:14px;text-align:left;background:#fffef5;border:2px solid #d7e0c9;box-shadow:0 4px #bfd0b5;border-radius:20px;padding:16px;min-height:96px!important}.kingdomLevel>span{width:42px;height:42px;display:grid;place-items:center;flex:none;background:#e7efda;border-radius:15px;font-family:var(--display);font-size:23px;color:#617548}.kingdomLevel.current{border-color:#e4b75c;background:#fffae4;box-shadow:0 4px #c39a43}.kingdomLevel.current>span{background:#f2c55f;color:#694b1f}.kingdomLevel b{font-size:17px;display:block}.kingdomLevel small{display:block;font-size:14px;color:#9b742a;margin-top:5px;letter-spacing:1px}.kingdomShop{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px;margin-bottom:25px}.kingdomWeapon{border-radius:26px;border:2px solid #fff;box-shadow:0 5px #c4d5c4;background:#fffef5;text-align:center;overflow:hidden;padding:12px 16px 18px}.kingdomWeaponArt{background:radial-gradient(ellipse,#fff1dc,transparent 70%);aspect-ratio:1.3;max-height:230px;display:grid;place-items:center}.kingdomWeaponArt img{width:100%;height:100%;max-height:225px;object-fit:contain;filter:drop-shadow(0 8px 5px #705e3020)}.kingdomWeapon h3{font:800 25px var(--display);margin:0 0 2px}.kingdomWeapon p{font-size:13px;min-height:22px;margin:0 0 5px}.kingdomWeapon small{font-size:12px;color:#64785c}.kingdomWeapon button{display:block;margin:13px auto 0;width:100%;border-radius:15px;padding:8px 15px;background:#f9cf72;box-shadow:0 4px #ce9f3c;color:#684915}.kingdomWeapon button:disabled{background:#e0ecda;box-shadow:0 3px #c3d5ba;color:#406741;opacity:1!important}.kingdomBattle{max-width:1180px;margin:auto}.kingdomArena{position:relative;width:min(100%,calc((100dvh - 270px)*1.5));margin:0 auto;aspect-ratio:3/2;isolation:isolate;border:3px solid #fff;border-radius:25px;overflow:hidden;box-shadow:0 5px #a8c598;background:#99c95c}.kingdomLandscape{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}.kingdomArenaHud{position:absolute;top:12px;left:12px;right:12px;display:flex;gap:8px;pointer-events:none}.kingdomArenaHud>span{background:#fffdf0f5;border:1px solid #f3e4ad;box-shadow:0 2px 0 #6e885c44;padding:6px 12px;border-radius:14px;font-size:14px;white-space:nowrap}.kingdomHealth{color:#b24667}.kingdomEnergy{margin-left:auto;color:#756018}.kingdomPads,.kingdomEnemies,.kingdomShots{position:absolute;inset:0;pointer-events:none}.kingdomPad{position:absolute;width:8%;min-width:44px;aspect-ratio:1;height:auto;transform:translate(-50%,-50%);border:2px dashed #436932;background:#ffefd3d9;border-radius:50%;box-shadow:0 3px #6f873d55;pointer-events:auto;display:grid;place-items:center;overflow:visible}.kingdomPad>span{font-size:28px;color:#527342;line-height:1}.kingdomPad>small{position:absolute;bottom:-9px;background:#315d48;color:#fff9e3;border-radius:8px;font-size:10px;line-height:17px;min-width:18px;padding:0 3px}.kingdomPad.built{background:transparent;border-color:transparent;box-shadow:none}.kingdomPad.built>img{position:absolute;left:-30%;top:-65%;width:160%;height:160%;object-fit:contain;pointer-events:none;filter:drop-shadow(0 4px 2px #39652933)}.kingdomPad.built>small{bottom:-6px;background:#fff3bd;color:#99711e;border:1px solid #d2ae57}.kingdomMonster{position:absolute;transform:translate(-50%,-70%);width:7.5%;min-width:28px;aspect-ratio:1;filter:drop-shadow(0 3px 2px #315f3433)}.kingdomMonster img{width:100%;height:100%;object-fit:contain;transform-origin:50% 85%;animation:kingdomWaddle .6s var(--walk-phase) infinite ease-in-out}.kingdomMonster>i{position:absolute;left:24%;bottom:0;width:52%;height:4px;border-radius:4px;background:#753c5899;overflow:hidden}.kingdomMonster>i>b{display:block;height:100%;background:#b1f16d}.kingdomMonster.slowed{filter:drop-shadow(0 0 5px #a0efff)}.kingdomShots{width:100%;height:100%;z-index:2;overflow:visible}.kingdomShots path{fill:none;stroke-linecap:round;stroke-dasharray:3 10;filter:drop-shadow(0 1px 1px #fff)}.kingdomPauseCurtain{position:absolute;inset:0;z-index:5;background:#184c3bb0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:20px;color:white}.kingdomPauseCurtain b{font-size:26px}.kingdomPauseCurtain button{background:#fff2bf;border-radius:15px;padding:10px 30px;color:#365b41}.kingdomControls{max-width:1020px;margin:12px auto 0}.kingdomBattleTools{display:flex;justify-content:center;gap:10px}.kingdomBattleTools button{border-radius:15px;padding:8px 20px;box-shadow:0 4px #245a4c;background:#357e69;color:#fff8e5;font-size:16px;white-space:nowrap}.kingdomBattleTools .kingdomMath{background:#ffe099;color:#735020;box-shadow:0 4px #cba85c}.kingdomBattleTools .kingdomPause{padding:8px;width:46px;flex:none;background:#fffdf4;color:#3b6c5b;box-shadow:0 4px #bbceb9}.kingdomLoadout{display:flex;gap:9px;justify-content:center;margin:14px auto 0;overflow-x:auto;padding:4px 4px 6px}.kingdomLoadout button{display:grid;grid-template-columns:48px auto;grid-template-rows:1fr 1fr;gap:0 7px;background:#fffdf2;border:2px solid #d7dec9;border-radius:16px;padding:5px 12px 5px 4px;flex:none;min-width:130px;text-align:left}.kingdomLoadout img{grid-row:span 2;height:48px;width:48px;object-fit:contain}.kingdomLoadout b{align-self:end;font-size:12px;white-space:nowrap}.kingdomLoadout small{align-self:start;color:#947129;font-size:12px}.kingdomLoadout [aria-pressed=true]{background:#fff1c2;border-color:#bc8f2e;box-shadow:0 2px #c39a43}.kingdomControls .kingdomNotice{text-align:center;margin:6px 0 0;font-size:13px}.kingdomDialog{position:fixed;inset:0;z-index:60;background:#193e40b8;display:grid;place-items:center;padding:16px;overflow:auto;touch-action:pan-y}.kingdomDialogCard{position:relative;text-align:center;width:min(100%,490px);max-height:100%;overflow:auto;background:#fffdf0;border:3px solid #fff;border-radius:28px;padding:24px;box-shadow:0 8px #17483866;color:#385b4e}.kingdomDialogCard h2{font:800 28px/1.2 var(--display);margin:8px 0 14px}.kingdomDialogCard p{font-size:15px;line-height:1.5;margin:10px 0}.kingdomDialogCard>small{font-size:10px;letter-spacing:1.4px;color:#6b7b5b}.kingdomPurchaseArt{width:145px;height:145px;object-fit:contain}.kingdomPrice{display:block;font-size:30px;color:#936723}.kingdomDialogActions{display:flex;gap:10px;flex-wrap:wrap;justify-content:center;margin-top:18px}.kingdomDialogActions button,.kingdomQuizClose{background:#e6eedb;color:#3c5c45;border-radius:15px;padding:10px 15px;min-height:48px}.kingdomDialogActions button[data-confirm],.kingdomDialogActions button[data-upgrade],.kingdomDialogActions button[data-next]{background:#337c68;color:white;box-shadow:0 3px #205944}.kingdomQuizIcon{font-size:36px}.kingdomEquation{display:block;font:800 40px var(--display);margin:15px}.kingdomRead{position:absolute;top:16px;right:16px;border-radius:15px;width:44px;background:#ffe8a6;font-size:20px}.kingdomProof{display:flex;justify-content:center;align-items:center;gap:15px;padding:7px 0 18px}.kingdomProof>span{display:grid;grid-template-columns:repeat(5,12px);gap:4px;align-content:center;min-height:28px}.kingdomProof i{width:12px;height:12px;border-radius:50%;background:#efb143;box-shadow:inset 0 -2px #c58b23}.kingdomProof>span:last-child i{background:#67bba0;box-shadow:inset 0 -2px #398875}.kingdomAnswers{display:flex;justify-content:center;gap:15px}.kingdomAnswers button{width:78px;height:70px;border-radius:20px;background:#e3f1e2;border:2px solid #b3d0ad;box-shadow:0 4px #9bbd94;font:800 32px var(--display)}.kingdomAnswers button.wrong{border-color:#df927e;background:#ffe7d6}.kingdomAnswers button.right{background:#387e69;color:white;border-color:#235e4e;opacity:1!important}.kingdomQuizClose{width:100%;margin-top:12px;background:#ffdf8c;color:#755321;box-shadow:0 4px #c8a450}.kingdomVictory{font-size:66px;line-height:1.2;color:#b88929}.kingdomStars{font-size:43px;color:#db9f23;letter-spacing:6px}.kingdomPauseCurtain:not([hidden])~*{animation-play-state:paused}.kingdomBattle:has(.kingdomPauseCurtain:not([hidden])) .kingdomMonster img,.guidePaused .kingdomMonster img{animation-play-state:paused}.kingdomDialog~*{animation-play-state:paused}
#hub #kingdomBtn{gap:5px}#kingdomBtn img{height:36px;width:36px;object-fit:contain}.onlineLauncher:has(~#kingdom){display:none}
@keyframes kingdomWaddle{0%,100%{transform:rotate(-5deg) scale(.96,1.04)}50%{transform:rotate(5deg) scale(1.04,.96)}}
@media(max-width:700px){#kingdom{padding:10px}.kingdomTop{gap:8px;margin-bottom:12px;flex-wrap:wrap}.kingdomTop h1{font-size:23px}.kingdomTop small{font-size:8px;letter-spacing:1px}.kingdomWallet{padding:5px 10px}.kingdomWallet b{font-size:18px}.kingdomBack{width:44px}.kingdomTop .gameHelp{font-size:12px;min-height:44px}.kingdomTop .gameHelp span{display:none}.kingdomHero{grid-template-columns:1fr;border-radius:22px}.kingdomHero>img{max-height:205px;object-position:80% 40%}.kingdomHero>div{padding:20px 22px}.kingdomHero h2{font-size:28px;margin:9px 0}.kingdomHero p{font-size:13px}.kingdomHero br{display:none}.kingdomTabs{margin-top:20px}.kingdomTabs button{padding:9px 14px;font-size:13px;flex:1}.kingdomLevels{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.kingdomLevel{padding:12px;gap:9px;min-height:88px!important}.kingdomLevel b{font-size:14px}.kingdomLevel>span{height:32px;width:32px;font-size:18px}.kingdomShop{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.kingdomWeapon{padding:8px 10px 15px;border-radius:20px}.kingdomWeapon h3{font-size:21px;line-height:1.15}.kingdomWeapon p{font-size:11px;min-height:32px;margin-top:5px}.kingdomWeapon small{font-size:10px}.kingdomWeapon button{padding:7px 3px;font-size:12px}.kingdomArena{width:100%;border-radius:20px}.kingdomArenaHud{top:7px;left:7px;right:7px;gap:5px}.kingdomArenaHud>span{padding:4px 8px;font-size:11px;border-radius:11px}.kingdomPad{min-width:40px;min-height:40px!important}.kingdomPad.built>img{left:-14%;top:-40%;width:128%;height:128%}.kingdomPad>span{font-size:24px}.kingdomPad>small{bottom:-6px}.kingdomBattleTools{gap:7px}.kingdomBattleTools button{padding:8px 12px;font-size:13px;flex:1}.kingdomBattleTools .kingdomPause{flex:0 0 44px}.kingdomLoadout{justify-content:flex-start;scroll-padding:4px}.kingdomLoadout button{min-width:140px}.kingdomDialogCard{padding:20px}.kingdomCaption{font-size:12px}.kingdomNotice{font-size:12px}#hub .hubBot .big{font-size:12px}#hub #kingdomBtn img{height:27px;width:27px}}
@media(max-width:360px){.kingdomTop h1{font-size:19px}.kingdomTop{gap:6px}.kingdomWallet{font-size:12px;padding:4px 7px}.kingdomShop{gap:9px}.kingdomWeapon h3{font-size:18px}.kingdomBattleTools button{font-size:12px;padding:7px}.kingdomLevel{padding:9px;gap:6px}.kingdomLevel b{font-size:12px}.kingdomPad{min-width:37px;min-height:37px!important}}
@media(max-height:560px) and (min-width:701px){.kingdomTop{margin-bottom:10px}.kingdomTop h1{font-size:22px}.kingdomBattle{display:grid;grid-template-columns:minmax(0,1fr) 230px;gap:12px}.kingdomArena{width:100%;height:calc(100dvh - 100px);min-height:240px}.kingdomControls{margin:0}.kingdomBattleTools{flex-wrap:wrap}.kingdomBattleTools button{padding:8px 10px;font-size:13px}.kingdomMath{flex:1}.kingdomLoadout{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));max-height:150px;overflow:auto;margin:10px 0;gap:6px}.kingdomLoadout button{display:flex;flex-direction:column;min-width:0;padding:5px;align-items:center;text-align:center}.kingdomLoadout img{height:40px}.kingdomLoadout b{align-self:center;font-size:10px}.kingdomLoadout small{align-self:center}.kingdomDialogCard{max-width:560px;padding:12px 20px}.kingdomPurchaseArt{width:80px;height:80px}.kingdomDialogCard h2{font-size:23px;margin:6px}.kingdomDialogCard p{font-size:13px;margin:6px}.kingdomQuizIcon{display:none}.kingdomEquation{margin:7px;font-size:33px}.kingdomProof{padding:5px}.kingdomAnswers button{height:48px;width:65px}.kingdomVictory{font-size:40px}.kingdomStars{font-size:30px}}
@media(prefers-reduced-motion:reduce){.kingdomMonster img{animation:none}}
#kingdom{display:block}.kingdomLobby,.kingdomBattle{width:100%;margin:0 auto}.kingdomPad{min-width:44px!important;min-height:44px!important}
#kingdom:has(.kingdomDialog) .kingdomMonster img{animation-play-state:paused}
.kingdomPad.built>img{transition:transform .13s;transform-origin:50% 90%}.kingdomPad.firing>img{transform:translate(-2px,1px) scale(.96,1.02)}
/* Chiến trường rộng giữ đúng tranh; màn nhỏ kéo được, không co bệ thành điểm khó chạm. */
.kingdomField{position:relative;isolation:isolate;width:min(100%,calc((100dvh - 325px)*1.5));aspect-ratio:3/2;margin:0 auto;border:3px solid white;border-radius:25px;overflow:hidden;box-shadow:0 5px #a8c598;background:#98c96a}
.kingdomViewport{position:absolute;inset:0;overflow:auto;overscroll-behavior:contain;touch-action:pan-x pan-y;scrollbar-width:thin;scrollbar-color:#86a85d #d8edb9}
.kingdomArena{width:100%;min-width:650px;aspect-ratio:3/2;height:auto!important;min-height:0!important;border:0;border-radius:0;box-shadow:none;margin:0}
.kingdomPad{width:6.1%;min-width:44px!important;min-height:44px!important;background:#fff3cfb8;border-color:#617f38;border-width:1.5px;box-shadow:0 2px #70884955}
.kingdomPad>span{font-size:23px}.kingdomPad>small{font-size:9px;bottom:-6px;min-width:16px;line-height:15px}
.kingdomPad.built>.kingdomTurret{position:absolute;left:-28%;bottom:43%;top:auto;width:156%;height:156%;object-fit:contain;transform:translate(0,0);transform-origin:50% 90%;filter:drop-shadow(0 3px 2px #304d292a)}
.kingdomPad.firing>.kingdomTurret{transform:translate(var(--recoil-x),var(--recoil-y)) scale(.97,1.01);filter:drop-shadow(0 0 3px #fff7c0)}
.kingdomMonster{width:5.4%;min-width:28px;transform:translate(-50%,-70%) scale(var(--monster-scale,1));transform-origin:50% 80%}.kingdomMonster.boss{filter:drop-shadow(0 2px 4px #f0805066)}
.kingdomMonster.flying img{animation:kingdomFly .65s var(--walk-phase) infinite ease-in-out}.kingdomMonster.shielded .monsterShield{display:block;position:absolute;inset:4% 7%;border:2px solid #a9e7ff;border-radius:50%;box-shadow:inset 0 0 6px #faffff99,0 0 4px #56d7ff88;background:#9de7ff18}.monsterShield{display:none}
.kingdomShots{overflow:visible}.kingdomShots path{stroke-dasharray:none;filter:none;}.kingdomShots .spellLaser{filter:drop-shadow(0 0 4px #00eeff)}.kingdomShots .spellLaser path{stroke-linecap:round;fill:none}.kingdomShots .spellChain path,.kingdomShots .spellMagic path{fill:none;stroke-linecap:round}
.kingdomCamera{position:absolute;bottom:8px;left:8px;right:8px;z-index:3;display:none;justify-content:space-between;pointer-events:none}.kingdomField[data-pannable=true] .kingdomCamera{display:flex}.kingdomCamera button{pointer-events:auto;min-height:44px!important;padding:5px 10px;background:#fff9e7ef;border:1px solid #d8c996;border-radius:12px;box-shadow:0 2px #78974e66;color:#3e694f;font-size:11px}
.kingdomWavePreview{display:flex;align-items:center;gap:10px;margin:7px auto 0;max-width:640px;background:#fffff2d9;padding:5px 12px;border-radius:14px;border:1px solid #c4dbb6;min-height:40px}.kingdomWavePreview>b{font-size:12px;white-space:nowrap;color:#4b6c47}.kingdomWavePreview>span{display:flex;flex:1;gap:3px;overflow:hidden}.kingdomWavePreview img{height:28px;width:28px;object-fit:contain;flex:none}
.kingdomBestiary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin:15px 0 25px}.kingdomBestiary article{background:#fffdf2;border:2px solid white;border-radius:23px;text-align:center;padding:12px;box-shadow:0 4px #cad8b9}.kingdomBestiary img{width:100%;height:160px;object-fit:contain}.kingdomBestiary h3{font:800 23px var(--display);line-height:1.1;margin:4px 0}.kingdomBestiary p{font-size:12px;margin:9px 0}.kingdomBestiary small{font-size:10px;color:#69805d}
.kingdomTabs{overflow-x:auto;scrollbar-width:none;white-space:nowrap}.kingdomTabs button{flex:none}.kingdomPad.built:focus-visible{outline-offset:2px}.kingdomLoadout{max-width:100%;scrollbar-width:thin}
@keyframes kingdomFly{0%,100%{transform:translateY(-4px) rotate(-4deg) scaleX(.96)}50%{transform:translateY(-11px) rotate(4deg) scaleX(1.05)}}
@media(max-width:700px){.kingdomField{width:100%;height:min(45dvh,340px);aspect-ratio:auto;border-radius:20px}.kingdomArena{min-width:650px}.kingdomArenaHud>span{padding:4px 7px;font-size:11px}.kingdomControls{margin-top:10px}.kingdomTabs{gap:7px}.kingdomTabs button{font-size:12px;padding:9px 11px}.kingdomBestiary{grid-template-columns:repeat(2,minmax(0,1fr));gap:11px}.kingdomBestiary img{height:135px}.kingdomBestiary h3{font-size:20px}.kingdomWavePreview{padding:4px 8px;gap:6px}.kingdomWavePreview>b{font-size:11px}.kingdomWavePreview img{height:24px;width:24px}}
@media(max-height:560px) and (min-width:701px){.kingdomField{width:100%;height:calc(100dvh - 100px);min-height:240px;aspect-ratio:auto}.kingdomArena{min-width:650px}.kingdomWavePreview{flex-direction:column;align-items:flex-start;margin-top:5px;gap:3px}.kingdomWavePreview img{height:22px;width:22px}.kingdomControls .kingdomNotice{font-size:11px}.kingdomLoadout{max-height:125px}.kingdomBestiary img{height:115px}}
@media(prefers-reduced-motion:reduce){.kingdomMonster.flying img{animation:none}.kingdomPad.built>.kingdomTurret{transition:none}}
.kingdomLoadout{justify-content:flex-start;width:max-content;max-width:100%;margin-inline:auto}
.kingdomCamera{z-index:6}.kingdomPauseCurtain{pointer-events:none;background:#184c3b99}.kingdomPauseCurtain button{pointer-events:auto}
/* Máu/kỹ năng và ba cấp dùng đúng chỉ số trong luật trận. */
#kingdom{animation:none;transform:none}
.kingdomDismissBar{position:sticky;top:0;height:0;display:flex;justify-content:flex-end;margin:-10px -10px 0;z-index:5;pointer-events:none}.kingdomDismissBar button{width:44px;height:44px;flex:none;border-radius:50%;background:#fff4d6f0;border:1px solid #ddc88e;color:#74612e;font-size:27px;line-height:1;pointer-events:auto;box-shadow:0 2px #b8c5a855}
.kingdomLevel em{display:block;font-size:10px;font-style:normal;color:#687c5f;margin-top:7px;letter-spacing:0}
.kingdomWeapon .kingdomBasePower{min-height:0;font-size:12px;font-weight:800;color:#516c4a;margin:8px 0 0}.kingdomWeapon .kingdomDetails{margin:8px auto 0;background:#eaf2dd;color:#456744;box-shadow:0 2px #c9d9bc;font-size:12px}
.kingdomTierList{display:grid;gap:9px;text-align:left}.kingdomStatCard{border:1px solid #c9dbb9;border-radius:16px;background:#f3f8e8;padding:12px;text-align:left}.kingdomStatCard h3{font-size:15px;color:#476442;margin:0 0 8px}.kingdomStatCard dl{margin:0}.kingdomStatCard dl>div{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:7px 0;font-size:12px}.kingdomStatCard dd{margin:0;font-weight:800;color:#2d6252;white-space:nowrap}.kingdomStatCard p{font-size:12px!important;line-height:1.4!important;margin:10px 0 0!important;color:#63724a}.kingdomStatCard meter{width:70px;height:12px;accent-color:#579a69}.kingdomUpgradeCompare{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.kingdomUpgradeCompare:has(>.kingdomStatCard:only-child){grid-template-columns:1fr}.kingdomUpgradeCompare .kingdomStatCard:last-child{background:#fff2cb;border-color:#e6ca78}.kingdomUpgradeCompare .kingdomStatCard dl>div{flex-wrap:wrap;gap:3px}
.kingdomBestiary .kingdomBestiaryHp{font-weight:800;font-size:14px;color:#b04a69;margin:8px 0}.kingdomSkillTag{display:inline-block;color:#557141;background:#e7efcc;border-radius:9px;padding:5px 9px;font-size:12px}.kingdomBestiary button{background:#fff0bc;border:1px solid #e6d08b;color:#6c582b;border-radius:13px;padding:7px 14px;margin-top:4px;width:100%;font-size:12px}.kingdomBestiary article>p:not(.kingdomBestiaryHp){min-height:54px;line-height:1.5}.kingdomMonsterFacts{display:flex;flex-wrap:wrap;justify-content:center;gap:8px}.kingdomMonsterFacts span{background:#eef4de;border-radius:11px;padding:8px 12px;font-size:14px}.kingdomMonsterFacts span:first-child{color:#ad4964;background:#ffebdf}.kingdomSkillName{font-size:19px;color:#52733e;margin:18px 0 5px}.kingdomCounter{background:#fff0c6;padding:12px;border-radius:13px;color:#735d2d}.kingdomWavePreview>b>small{display:block;white-space:normal;font-size:10px;color:#69805c;margin-top:2px;font-weight:500}
.kingdomMonster .kingdomInspect{position:absolute;left:50%;top:40%;width:max(100%,44px);height:max(100%,44px);transform:translate(-50%,-50%);padding:0;border:0;border-radius:50%;background:transparent;box-shadow:none;z-index:3;pointer-events:auto;cursor:pointer}.kingdomMonster .kingdomHp{position:absolute;left:50%;bottom:100%;transform:translateX(-50%);white-space:nowrap;background:#fffcefef;color:#a4455f;border:1px solid #dbcfa1;border-radius:7px;padding:1px 4px;font-size:9px;line-height:12px;font-weight:800;box-shadow:0 1px #647c4944;pointer-events:none}.monsterSkillFx{display:none}.kingdomMonster[data-skill=heal] .monsterSkillFx,.kingdomMonster[data-skill=cheer] .monsterSkillFx,.kingdomMonster[data-skill=harden] .monsterSkillFx{display:block;position:absolute;inset:0;border:2px solid #b1fa94;border-radius:50%;box-shadow:0 0 8px #9ae9aa77;animation:kingdomSkillPulse .8s infinite;pointer-events:none}.kingdomMonster[data-skill=harden] .monsterSkillFx{border-color:#e4c6ff;background:#a47aca22}.kingdomMonster[data-skill=cheer] .monsterSkillFx{border-color:#ffe69a}.kingdomMonster.dashing img{animation-duration:.3s}.kingdomPad[data-tier="2"]>small{background:#ffe391;border-color:#b88824}.kingdomPad[data-tier="3"]>small{background:#ecd4ff;color:#76508b;border-color:#b085cf}
@keyframes kingdomSkillPulse{0%,100%{transform:scale(.95);opacity:.5}50%{transform:scale(1.12);opacity:1}}
@media(max-width:360px){.kingdomUpgradeCompare{grid-template-columns:1fr}.kingdomBestiary article>p:not(.kingdomBestiaryHp){min-height:0}.kingdomBestiary .kingdomSkillTag{font-size:10px}.kingdomStatCard{padding:10px}.kingdomBestiary button{font-size:11px}}
@media(max-height:560px) and (min-width:701px){.kingdomTierList{grid-template-columns:repeat(3,minmax(0,1fr))}.kingdomStatCard{padding:8px}.kingdomStatCard dl>div{flex-wrap:wrap}}
@media(prefers-reduced-motion:reduce){.monsterSkillFx{animation:none!important}}
#kingdom:has(.kingdomDialog) .monsterSkillFx,.kingdomBattle:has(.kingdomPauseCurtain:not([hidden])) .monsterSkillFx,.guidePaused .monsterSkillFx{animation-play-state:paused}

/* Lời thoại: chặng còn khoá để chạm xuyên qua (nút disabled không nhận sự kiện), vùng chứa nghe được và đọc "Chặng này chưa mở". */
#kingdom .kingdomLevel:disabled{pointer-events:none}
#kingdom .kingdomWeapon,#kingdom .kingdomBestiary article{position:relative}
#kingdom .kingdomAnswers button{position:relative}

/* Hiệu ứng nhận giờ từ trận đấu, kể cả khi đang tạm dừng. */
.kingdomPad.built.firing>.kingdomTurret{transform:translate(var(--recoil-x),var(--recoil-y));filter:drop-shadow(0 0 calc(var(--cast-glow,0)*9px) #fff5ab)}
.kingdomPad.built::after{content:"";position:absolute;inset:-24% 12% 47%;border-radius:50%;background:radial-gradient(ellipse,#fffde8,#ffd97e9c 38%,transparent 70%);opacity:var(--cast-glow,0);pointer-events:none}
.kingdomMonster{scale:calc(1 + var(--hit,0)*.1) calc(1 - var(--hit,0)*.13)}
.kingdomMonster :is(img,canvas){filter:brightness(calc(1 + var(--hit,0)*.55))}
.kingdomShots path{stroke-dasharray:none}
.kingdomVictory{width:clamp(52px,14vw,90px);aspect-ratio:1;margin:auto;position:relative}
.kingdomVictory img{display:block;width:100%;height:100%;object-fit:contain}
.kingdomPad>.turretMotion{display:none;pointer-events:none}
.kingdomPad[data-atlas=heading]>.turretMotion{display:block;transform:none;filter:drop-shadow(0 3px 2px #304d292a)}
.kingdomPad[data-atlas=heading]>img.kingdomTurret{visibility:hidden}
@media(prefers-reduced-motion:reduce){
  .kingdomPad[data-atlas=heading]>.turretMotion{display:none}
  .kingdomPad[data-atlas=heading]>img.kingdomTurret{visibility:visible}
}
