:root{color-scheme:dark;font-family:"Trebuchet MS",Arial,sans-serif;background:#070211;color:#fff;--purple:#ca43ff;--shine:#f477ff;--gold:#ffbf43;--panel:rgba(16,5,31,.96);--border:2px solid #b85aff}*{box-sizing:border-box}body{margin:0;background:radial-gradient(ellipse at center,#311250,#090112 75%);overflow:hidden;touch-action:manipulation}button,input{font:inherit}button{cursor:pointer;color:inherit}button:disabled{cursor:not-allowed;opacity:.44;filter:grayscale(.6)}#game{position:absolute;top:0;left:0;width:720px;height:1280px;transform-origin:top left;overflow:hidden;background:radial-gradient(ellipse at 40% 25%,#3f0b66 0,#140721 56%,#070112 100%);border:3px solid #a943ef;box-shadow:inset 0 0 22px #c443ff,0 0 55px #8d2add}#game:before{content:'';position:absolute;inset:0;pointer-events:none;background:radial-gradient(ellipse at 50% 37%,transparent 35%,rgba(6,0,13,.45) 100%);z-index:1}#game>*{isolation:isolate}p{line-height:1.4}h1,h2,h3,p{margin:0 0 10px}h1{font-size:35px;text-shadow:0 0 12px #b446ff}h2{font-size:28px}h3{font-size:24px;color:#fff;text-shadow:0 0 7px #d75dfb}small{font-size:16px}.subtext{font-size:18px;color:#d1b3e6;margin:8px 0 14px}.center{text-align:center}.gold-text{color:#ffd24f}.xpbar,.progress{height:13px;background:#180920;border:1px solid #bd82e8;border-radius:15px;overflow:hidden}.xpbar span,.progress span{display:block;height:100%;background:linear-gradient(90deg,#13d97d,#6aff2a);box-shadow:0 0 12px #44ff94;border-radius:15px}.hud{position:absolute;left:0;right:0;top:0;height:218px;background:linear-gradient(#0b031e 83%,transparent);z-index:3}.player-card{position:absolute;left:12px;top:13px;display:flex;align-items:flex-start;width:247px;height:109px;border:2px solid #c95fff;border-radius:14px;background:#130620;padding:7px;box-shadow:inset 0 0 15px #682a9e,0 0 10px #bb35fa;text-align:left}.p-avatar{width:80px;height:91px;border:3px solid #bc4dff;border-radius:9px;display:flex;align-items:center;justify-content:center;background:radial-gradient(circle,#8633af,#1b063b);flex-shrink:0;overflow:hidden}.small-av{height:92px;max-width:92px;object-fit:contain}.p-details{padding-left:8px;min-width:0;display:flex;flex-direction:column;gap:5px}.p-details strong{font-size:21px;white-space:nowrap}.p-details em{font-style:normal;font-size:18px;color:#ffc34e}.p-details small{font-size:13px}.p-details .xpbar{width:125px;height:10px}.res-row{position:absolute;left:266px;right:11px;top:13px;height:89px;display:flex;gap:7px}.res{display:flex;position:relative;align-items:flex-start;gap:4px;flex:1;padding:9px 5px;border:2px solid #bc5ded;border-radius:12px;box-shadow:inset 0 0 8px #8039b3;background:#140722;font-size:23px}.res label{font-size:15px;font-weight:bold;text-align:center;flex:1;line-height:1.3}.res strong{font-size:25px;color:#f6e4ff;display:block}.ui-btn{position:relative;display:inline-flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;min-height:42px;padding:9px 13px;border:2px solid #c159f9;border-radius:12px;background:linear-gradient(155deg,#26053b,#0e071f);color:white;font-weight:800;box-shadow:inset 0 0 10px rgba(227,94,255,.29),0 0 7px rgba(186,68,251,.4);text-shadow:0 0 6px #9b46e2;transition:filter .12s,transform .12s}.ui-btn:active{transform:scale(.97);filter:brightness(1.35)}.ui-btn.gold,.ui-btn.gold.large{border-color:#ffe06b;background:linear-gradient(#ffb133,#903700);box-shadow:0 0 12px #ffa530,inset 0 0 12px #ffe85a;text-shadow:0 1px 1px #74300a}.ui-btn.purple{background:linear-gradient(#783dbf,#250453)}.ui-btn.muted{opacity:.75}.ui-btn.danger{border-color:#e76078;background:linear-gradient(#772335,#270619)}.ui-btn.large{font-size:24px;min-height:70px;padding:11px 22px}.ui-btn.plus{position:absolute;right:3px;bottom:3px;min-width:31px;height:31px;min-height:31px;padding:0;font-size:22px;border-radius:8px}.header-links{position:absolute;left:290px;right:12px;top:114px;height:94px;display:flex;gap:9px}.ui-btn.quicklink{flex:1;min-width:0;height:86px;padding:5px 3px;border-radius:11px}.quicklink .ico{font-size:39px}.quicklink small{font-size:14px;font-weight:900;white-space:nowrap}.ico{font-size:30px;display:block;line-height:1.2;filter:drop-shadow(0 0 5px #cb4dff)}.bottom-nav{position:absolute;z-index:6;left:2px;right:2px;bottom:3px;height:116px;padding:8px 7px;display:flex;gap:8px;border:2px solid #c35eff;border-radius:12px;background:linear-gradient(#12051e,#090211);box-shadow:0 0 13px #b441ff}.ui-btn.nav-btn{flex:1;min-width:0;padding:5px 2px;border-radius:12px}.nav-btn .ico{font-size:43px}.nav-btn small{font-size:18px;white-space:nowrap}.ui-btn.selected,.nav-btn.selected,.side-btn:hover{border-color:#ffc4ff;background:linear-gradient(#8e27c7,#390b6e);box-shadow:0 0 19px #e245ff,inset 0 0 12px #b14cfd}.page-title{position:absolute;z-index:4;left:10px;right:10px;top:217px;height:77px;display:flex;align-items:center;justify-content:space-between;border:2px solid #c55aff;border-radius:18px;background:linear-gradient(90deg,#20072c,#480a78,#180421);box-shadow:0 0 15px #b333fa}.page-title h1{text-align:center;flex:1;margin:0;white-space:nowrap}.ui-btn.back-btn,.ui-btn.help-btn{width:62px;height:58px;min-height:58px;font-size:33px}.page-content{position:absolute;left:8px;right:8px;top:301px;bottom:129px;padding:10px;overflow:auto;scrollbar-color:#6e299e transparent;scrollbar-width:thin;z-index:3}.page-content::-webkit-scrollbar{width:6px}.page-content::-webkit-scrollbar-thumb{background:#a139bd;border-radius:8px}.neon-box{padding:14px;margin:5px 0 14px;border:2px solid #c257f7;border-radius:15px;background:linear-gradient(135deg,rgba(34,8,61,.94),rgba(12,4,27,.94));box-shadow:inset 0 0 18px #43136b,0 0 9px rgba(175,77,254,.48)}.neon-box h3{padding-bottom:9px;border-bottom:1px solid #5f2a84}.neon-box p{font-size:19px;margin:9px 0}.tabs{display:flex;gap:6px;overflow-x:auto;padding:5px 0 12px;scrollbar-width:none}.tabs .ui-btn{flex:1;min-width:100px;font-size:18px;padding:9px}.tab.active,.floor.active,.summontype.selected,.farm-tab.selected,.map-node.current,.chapter-choice.selected{border-color:#ffdb69!important;background:linear-gradient(#d4791c,#5f1d14)!important;box-shadow:0 0 14px #ffb337!important}.prize-row{display:flex;gap:9px;flex-wrap:wrap;margin:12px 0}.prize{min-width:84px;flex:1;padding:11px 7px;display:flex;flex-direction:column;align-items:center;justify-content:center;border:2px solid #a953ec;border-radius:12px;background:#210a38;white-space:nowrap}.prize .ico{font-size:34px}.prize b{color:#fff;font-size:19px}.buttons-center{display:flex;justify-content:center;align-items:center;gap:18px;margin:17px 0}.four-actions{display:grid;grid-template-columns:repeat(2,1fr);gap:10px;margin:11px 0}.four-actions .ui-btn{min-height:65px;font-size:19px}.toast{position:absolute;z-index:99;bottom:168px;left:50%;transform:translateX(-50%);padding:14px 25px;max-width:600px;border-radius:30px;text-align:center;border:2px solid #ffca52;background:#2c123f;box-shadow:0 0 16px #be57ff;font-size:21px}.modal-screen{position:absolute;inset:0;z-index:80;display:flex;align-items:center;justify-content:center;background:rgba(0,0,0,.68);backdrop-filter:blur(2px)}.dialog{width:610px;padding:30px;text-align:center;background:linear-gradient(#2d0b48,#10031d);border:3px solid #d16bff;border-radius:20px;box-shadow:0 0 50px #8435c9}.dialog h2{font-size:32px}.dialog p{font-size:23px;margin:22px 0}.modal-buttons{display:flex;justify-content:center;gap:20px}.modal-buttons .ui-btn{min-width:190px;font-size:24px}.settings-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:13px;margin:25px 0}.settings-grid .ui-btn{min-height:90px;font-size:21px}.pause-menu{width:630px}
/* CAMPFIRE LOBBY: native clickable UI around the user-provided central illustration */
.lobby-area{position:absolute;z-index:2;left:0;right:0;top:204px;bottom:123px;overflow:hidden;background:radial-gradient(ellipse at 50% 40%,#34105e 0,#140622 64%,#080314 100%)}.moon-back{position:absolute;top:30px;left:0;right:0;height:550px;background:linear-gradient(to bottom,transparent,#100319a0),url('/assets/scenes/night_sky.webp') center top/cover;opacity:.78}.camp-art{position:absolute;left:105px;top:338px;width:515px;height:540px;background:url('/assets/scenes/lobby_art.webp') center/cover no-repeat;border-radius:25px;box-shadow:inset 0 0 30px 12px #180527;mask-image:linear-gradient(transparent 0,#000 7%,#000 85%,transparent 100%)}.event-banner{position:absolute;top:36px;left:257px;width:332px;height:109px;z-index:3;display:flex;align-items:center;justify-content:space-around;border:3px solid #d376ff;border-radius:13px;box-shadow:0 0 20px #7c25d6;background:radial-gradient(ellipse,#652d93,#1b092c);font-size:23px;text-shadow:0 0 8px #ffd4ff}.event-banner span{font-size:26px;color:#ffd865}.lobby-side{position:absolute;top:124px;display:flex;flex-direction:column;gap:13px;z-index:4}.lobby-side.left{left:8px}.lobby-side.right{right:8px}.ui-btn.side-btn{width:101px;height:89px;gap:1px;padding:3px 3px}.side-btn .ico{font-size:36px}.side-btn small{font-size:16px;white-space:nowrap}.timer-pill{border:1px solid #24dba6;border-radius:7px;background:#141523;color:#4dffba;padding:7px;font-size:18px;text-align:center}.home-features{position:absolute;left:7px;right:7px;bottom:13px;display:flex;gap:7px;z-index:5}.ui-btn.feat-btn{width:calc(100% / 6);height:99px;gap:1px;padding:4px}.feat-btn .ico{font-size:40px}.feat-btn small{font-size:15px}
/* FORMATION AND HERO PAGES */
.hero-list{display:grid;grid-template-columns:repeat(4,1fr);gap:11px;margin:8px 0 20px}.hero-card{border:2px solid #a855ed;background:linear-gradient(#170820,#080710);border-radius:12px;min-height:226px;display:flex;flex-direction:column;align-items:center;justify-content:space-between;gap:4px;padding:6px 3px;color:#fff;overflow:hidden}.hero-card img{width:100%;height:144px;object-fit:contain;image-rendering:auto}.hero-card strong{font-size:14px;line-height:1.15;min-height:18px;max-width:100%;overflow:hidden}.hero-card small{font-size:12px}.hero-card.unowned{filter:grayscale(.76);opacity:.66}.unowned-lbl{font-size:12px}.rarity{color:#bc8dfa;font-weight:900;text-shadow:0 0 9px #ef70ff}.rarity.ssr{color:#ffb42a;text-shadow:0 0 14px #f70}.detail-select{display:flex;gap:12px;height:425px}.vertical-mini{width:75px;display:flex;flex-direction:column;gap:4px;overflow-y:auto}.portrait{display:flex;align-items:center;justify-content:center;width:60px;height:69px;min-width:60px;border:2px solid #c879fa;border-radius:8px;background:#18072e;overflow:hidden}.portrait img{height:62px;width:50px;object-fit:cover;object-position:top}.portrait.now{border:3px solid #ffde5e;box-shadow:0 0 10px #ffaa12}.hero-feature{position:relative;flex:1;display:flex;flex-direction:column;align-items:center;justify-content:flex-end;border:2px solid #6f278c;border-radius:18px;background:radial-gradient(#6119a2,#25033c 65%,#090218);box-shadow:inset 0 0 25px #a82fea}.hero-feature>img{object-fit:contain;max-height:340px;width:92%}.hero-feature-text{display:flex;align-items:center;gap:10px;font-size:18px;padding:9px;text-align:center}.stat-panel{width:240px}.stat-panel h2{margin:8px}.stat-panel p{font-size:17px;margin:6px}.skill-list,.gear-items{display:flex;gap:8px;justify-content:space-around}.skill-list span{padding:9px 4px;border:2px solid #943ad1;border-radius:9px;font-size:16px;flex:1;text-align:center}.skill-list small{display:block;color:#e1bffa}.gear-slot{min-width:100px;min-height:70px}.gear-stage{position:relative;min-height:465px;text-align:center;border-radius:15px;background:radial-gradient(#481078,#12051e 65%);padding-top:10px}.gear-stage .gear-hero{position:absolute;left:50%;top:38px;transform:translateX(-50%);height:360px;width:270px;object-fit:contain}.gear-slot-grid{position:absolute;z-index:2;inset:20px 15px 80px;display:grid;grid-template-columns:1fr 1fr;grid-template-rows:1fr 1fr;justify-items:space-between;align-content:space-between;column-gap:330px}.large-slot{height:95px;width:120px;font-size:29px}.large-slot small{font-size:15px}.gear-stage h3{position:absolute;bottom:8px;left:0;right:0}.item-feature{display:flex;gap:19px;align-items:center;font-size:21px}.item-feature .ico,.big-item{font-size:92px}.inventory-container{display:flex;gap:12px;align-items:stretch;margin-top:12px}.inventory-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:9px;width:310px;align-content:start}.ui-btn.inventory-item{height:105px;padding:6px}.inventory-item .ico{font-size:58px}.inventory-info{flex:1}.inventory-info .four-actions .ui-btn{font-size:15px;padding:8px}.capacity{text-align:right;font-size:19px}.formation-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:14px;justify-content:center}.formation-slot{height:184px;border:2px solid #944ade;border-radius:12px;background:radial-gradient(#43116a,#160725);color:#fff;display:flex;align-items:center;justify-content:center;flex-direction:column;overflow:hidden}.formation-slot img{height:150px;width:100%;object-fit:contain}.formation-slot small{font-size:14px}.formation-grid .big-plus{font-size:80px}.versus{font-size:48px;color:#ffc135;text-align:center;font-weight:bold;text-shadow:0 0 20px #ffc400}.hero-list.compact{grid-template-columns:repeat(6,1fr)}.small-hero-card{height:140px;border:2px solid #aa5ce4;background:#180721;border-radius:8px;display:flex;flex-direction:column;align-items:center}.small-hero-card img{width:90%;height:108px;object-fit:contain}.small-hero-card small{font-size:11px}
/* STORY MAP */
.page-content.map-page{padding:0;overflow:hidden}.map-side{position:absolute;top:0;bottom:0;left:0;width:195px;overflow-y:auto;padding:4px}.chapter-choice{display:flex;gap:5px;align-items:center;text-align:left;width:100%;height:84px;border:2px solid #9145d2;border-radius:12px;background:#130621;margin:0 0 6px;padding:4px;color:#fff}.chapter-choice .portrait{width:54px;min-width:54px;height:65px}.chapter-choice span{font-size:15px;line-height:1.1;flex:1}.chapter-choice small{display:block;font-size:12px;color:#dfc8ef}.map-main{position:absolute;top:0;right:0;bottom:0;width:501px;display:flex;flex-direction:column}.map-heading{height:53px;border:2px solid #b550fe;border-radius:12px;background:#240745;padding:7px 12px;font-size:21px;font-weight:bold;display:flex;justify-content:space-between;align-items:center}.map-heading span{font-size:16px}.map-art{position:relative;height:474px;flex-shrink:0;margin:4px 0;background:url('/assets/scenes/map_art.webp') center center/cover;border:2px solid #c657ff;border-radius:12px;overflow:hidden;box-shadow:inset 0 0 20px #21102a}.route{position:absolute;inset:0;width:100%;height:100%;filter:drop-shadow(0 0 9px #d152ff)}.ui-btn.map-node{position:absolute;padding:2px;min-height:50px;width:65px;font-size:22px;border-radius:30px;display:flex;flex-direction:column;gap:0;background:linear-gradient(#481286,#160625)}.map-node small{font-size:12px;color:#ffeb7a}.map-node.locked{opacity:.6}.map-detail{overflow-y:auto;flex:1}.map-detail .neon-box{margin:0;padding:10px}.map-detail h3{font-size:20px}.map-detail p{font-size:16px}.map-detail .prize-row{margin:5px}.map-detail .prize{padding:3px}.map-detail .ui-btn.large{min-height:50px;font-size:22px}
/* TOWER / FARM */
.tower-content{height:100%;display:flex;flex-direction:column}.tower-image{position:relative;flex:1;min-height:480px;background:radial-gradient(ellipse at 50% 24%,#6432ac,#190628 60%,#08031c 100%);overflow:hidden;border:2px solid #bc42f6;border-radius:18px}.tower-moon{position:absolute;top:35px;right:130px;font-size:115px;opacity:.7;filter:drop-shadow(0 0 24px #b386ff)}.pagoda{position:absolute;top:0;left:185px;font-size:350px;filter:drop-shadow(0 0 24px #ae33ff)}.tower-floors{position:absolute;bottom:30px;left:150px;right:150px;display:flex;flex-direction:column;gap:8px}.floor{flex:1;min-height:40px}.floorgrid{display:grid;grid-template-columns:repeat(5,1fr);gap:8px}.farm-wrap{display:flex;gap:10px;height:100%}.farm-types{display:flex;flex-direction:column;gap:11px;width:185px}.farm-types .ui-btn{min-height:80px}.farm-main{flex:1;overflow-y:auto}.farm-splash{height:160px;display:flex;align-items:center;gap:22px;background:radial-gradient(circle,#68258c,#1c0a2b);border-radius:14px;font-size:20px}.farm-splash .ico{font-size:105px}.farm-splash span{flex:1}.arena-stand{display:flex;justify-content:space-around;align-items:center}.arena-stand strong{font-size:54px;color:#ffcb49}.arena-stand span{font-size:22px}.boss-menu{display:flex;gap:10px;max-height:163px}.boss-choice{height:133px;flex:1}.boss-choice img{height:90px;object-fit:contain}.boss-choice small{font-size:13px}.boss-choice.selected{border-color:#ffd154}.boss-showcase{display:flex;gap:35px;align-items:center;background:radial-gradient(ellipse,#672f87,#180426);border-radius:13px;padding:8px}.boss-showcase img{height:290px;width:260px;object-fit:contain}.boss-showcase div{font-size:23px}.boss-showcase p{font-size:19px}
/* SUMMONING */
.summon-page{display:flex;gap:10px;height:100%}.summon-types{display:flex;flex-direction:column;gap:12px;width:156px}.ui-btn.summontype{height:121px;padding:5px 6px;font-size:15px}.summontype .ico{font-size:37px}.summontype small{font-size:17px}.summon-main{flex:1;overflow-y:auto}.summon-arts{display:flex;justify-content:center;align-items:end;gap:0;height:260px;overflow:hidden;background:radial-gradient(circle,#922edc 0,#1c083e 65%,transparent 75%)}.summon-arts img{width:30%;height:250px;object-fit:contain;filter:drop-shadow(0 0 12px #d948e8)}.summon-arts img:first-child{height:260px;width:43%}.summon-prices{display:flex;gap:9px}.summon-prices .ui-btn{flex:1;font-size:21px}.summon-prices small{display:block;font-size:15px}.rates{color:#ffcf50;font-size:30px;text-align:center}.rewards-grid{grid-template-columns:repeat(5,1fr)}.rewards-grid .hero-card{min-height:210px}.rewards-grid .hero-card img{height:130px}
/* MISSIONS, SHOP, SOCIAL AND OTHER MENUS */
.mission-list{display:flex;flex-direction:column;gap:10px}.mission-row,.rank-line{display:flex;align-items:center;gap:11px;padding:13px 10px;border:2px solid #9142cc;border-radius:14px;margin:8px 0;background:linear-gradient(90deg,#240834,#110620)}.mission-ico{display:flex;align-items:center;justify-content:center;font-size:43px;min-width:70px}.mission-row>div:nth-child(2){flex:1}.mission-row strong,.rank-line strong{font-size:19px}.mission-row small,.rank-line small{display:block;font-size:16px;color:#e4c1ef}.mission-row .progress{margin-top:8px}.mission-prize{min-width:75px;text-align:center}.mission-row .ui-btn{min-width:93px}.rank-line>.portrait{flex-shrink:0}.rank-line>div{flex:1}.rank-items{display:flex;flex-direction:column}.rank-podium{display:flex;align-items:end;justify-content:space-around;min-height:255px}.podium{display:flex;flex-direction:column;align-items:center;gap:4px;width:30%;background:linear-gradient(#481e80,#170929);border:2px solid #944ce2;border-radius:14px;padding:12px}.podium img{height:152px;width:100%;object-fit:contain}.podium strong{font-size:32px;color:#ffce35}.checkin-grid{display:grid;grid-template-columns:repeat(5,1fr);gap:9px}.checkin-card{min-height:153px;border:2px solid #a856db;border-radius:12px;display:flex;align-items:center;justify-content:space-around;flex-direction:column;background:#1b0834}.checkin-card.today{border-color:#f4c049;box-shadow:0 0 12px #ffb52a}.checkin-card.done{opacity:.7}.checkin-card span{font-size:46px}.checkin-card small{font-size:18px}.wheel-ring{width:520px;height:520px;margin:20px auto;border:16px solid #ffcc35;border-radius:50%;background:conic-gradient(#66198d 0 45deg,#af3fcc 45deg 90deg,#48117a 90deg 135deg,#9b2ec4 135deg 180deg,#4b1087 180deg 225deg,#ae2cce 225deg 270deg,#45107c 270deg 315deg,#8e37c4 315deg);box-shadow:0 0 30px #ffc540,inset 0 0 28px #ff75ef;position:relative}.wheel-grid{position:absolute;inset:27px;display:grid;grid-template-columns:repeat(4,1fr);grid-template-rows:repeat(2,1fr);gap:8px}.wheel-grid div{border:1px solid #b561ce;text-align:center;padding-top:44px;font-size:38px}.wheel-grid small{display:block}.wheel-centre{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:136px;height:136px;border-radius:50%;background:radial-gradient(#ffcc49,#ac4808);display:grid;place-items:center;font-size:30px;font-weight:bold;border:6px solid #ffdf6f}.reward-ladder{display:flex;flex-direction:column;gap:9px}.reward-ladder .prize{min-width:110px}.shop-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}.shop-card{border:2px solid #9751e5;border-radius:13px;background:#210a36;display:flex;flex-direction:column;align-items:center;gap:10px;padding:15px 7px;min-height:200px;text-align:center}.shop-card .ico{font-size:61px}.shop-card strong{font-size:19px}.shop-card small{font-size:18px;color:#ffdb53}.guild-emblem{font-size:135px;text-align:center;filter:drop-shadow(0 0 25px #f70)}.guild-actions{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}.guild-actions .ui-btn{height:110px}.guild-actions small{font-size:15px}.chat-messages{height:560px;overflow-y:auto;border:2px solid #813cb9;border-radius:16px;padding:14px;background:rgba(11,2,26,.85)}.bubble{padding:14px;margin:10px;background:#4d2279;border:1px solid #b379ee;border-radius:20px;width:fit-content;max-width:90%;font-size:18px}.bubble b{display:block;color:#ffdd62;font-size:17px}.chat-compose{display:flex;gap:9px;margin-top:12px}.chat-compose input{border:2px solid #aa51e4;background:#0e031c;color:#fff;border-radius:9px;padding:14px;font-size:20px;flex:1;min-width:0}.monthly-banner{padding:18px;text-align:center;font-size:30px;background:linear-gradient(90deg,#4514a0,#c54a13);border-radius:13px}.profile-header{display:flex;gap:15px}.profile-header img{height:260px;min-width:180px;object-fit:contain}.profile-header div{flex:1}.profile-header p{font-size:22px}.result-hero{text-align:center;min-height:345px;background:radial-gradient(ellipse,#7e3bb1,#1b0b36 70%);border-radius:20px;padding:10px}.result-hero img{height:255px;max-width:60%;object-fit:contain}.result-hero h1{font-size:44px;color:#ffcf46}.stars{font-size:39px}.reward-big{text-align:center;font-size:80px;padding:20px}.reward-big h2{font-size:40px;color:#ffdc5d}
/* BATTLE SCENE. Invariant: two 3-row x 2-column teams, never six vertical single-column. */
.battle-view{position:absolute;inset:0;z-index:4;background:#10051d}.battle-head{position:absolute;top:0;left:0;right:0;height:146px;z-index:10;background:linear-gradient(#19052e,#29104d 70%,transparent)}.battle-top{height:72px;display:flex;align-items:center;justify-content:center;gap:6px;padding:5px}.b-toptitle{border:2px solid #cb54ff;border-radius:13px;padding:10px 7px;font-size:19px;font-weight:bold;background:#1b0535;white-space:nowrap}.ui-btn.b-small{height:53px;min-height:53px;padding:4px 8px;font-size:18px}.battle-stage-label{margin:6px 11px;display:flex;align-items:center;justify-content:center;position:relative}.battle-stage-label b{min-width:310px;background:#290740;border:2px solid #cf65f7;border-radius:15px;text-align:center;font-size:26px;padding:6px}.battle-stage-label b em{font-size:18px;color:#ff5858;font-style:normal}.battle-stage-label small{position:absolute;right:0;font-size:18px;background:#1a0839;padding:10px;border:2px solid #b85be5;border-radius:9px}.battle-field{position:absolute;top:139px;left:0;right:0;height:875px;background:url('/assets/scenes/battle_bg.webp') center/100% 100% no-repeat;overflow:hidden}.battle-field:after{content:'';position:absolute;left:0;right:0;bottom:0;height:85px;pointer-events:none;background:linear-gradient(transparent,#10091a66)}.conditions{position:absolute;top:14px;left:11px;z-index:3;background:rgba(24,7,51,.85);border:2px solid #cf74ff;border-radius:13px;padding:12px;font-size:18px;box-shadow:0 0 14px #6923b4}.conditions b{font-size:22px;color:#ffc534}.conditions p{font-size:15px;margin:4px}.fighter{position:absolute;width:155px;height:198px;z-index:5;display:flex;flex-direction:column;align-items:center;transition:filter .2s;cursor:pointer}.fighter.ko{opacity:.25;filter:grayscale(1)}.fighter.hit{filter:drop-shadow(0 0 24px #ff6000) saturate(1.5)}.fighter.attacking .fighter-sprite{animation:punch .52s ease-in-out}.fighter.enemy.attacking .fighter-sprite{animation:enemyPunch .52s ease-in-out}.hp-label{position:absolute;top:0;left:0;right:0;height:28px;color:white;text-align:center;font-size:20px;font-weight:900;text-shadow:2px 2px #130a11;background:#0007;border-radius:8px}.element{position:absolute;left:0;top:0;font-size:23px}.small-hp{display:block;margin:1px 3px 0 23px;height:8px;border-radius:8px;background:#390e24;border:1px solid #10000b;overflow:hidden}.small-hp i{display:block;height:100%;background:linear-gradient(#8cff31,#16b73c);border-radius:9px}.enemy .small-hp i{background:linear-gradient(#ff8e9e,#fe163e)}.fighter-visual{position:absolute;top:30px;bottom:19px;left:0;right:0;display:flex;align-items:flex-end;justify-content:center}.fighter-sprite{height:157px;width:151px;object-fit:contain;object-position:center bottom;filter:drop-shadow(0 3px 2px #1d001b)}.fighter-ring{position:absolute;bottom:2px;width:135px;height:22px;border:3px solid #4cdbff;border-radius:50%;background:#62b2ffa1;box-shadow:0 0 16px #45cbff}.enemy .fighter-ring{border-color:#ff4f73;background:#ff487c7a;box-shadow:0 0 15px #ff3a5c}.boss-tag{position:absolute;top:-20px;background:#b42b28;color:#ffeb77;padding:2px 5px;border-radius:7px;z-index:10;font-size:16px;font-weight:bold;white-space:nowrap}.damage{position:absolute;top:-35px;left:-24px;z-index:20;color:#ffcc17;text-shadow:2px 3px #9b1e0b,-2px 0 #ae2500,0 0 16px #ff4c00;font-weight:1000;font-size:35px;animation:floatDamage .56s ease-out}.damage.healing{color:#4aff83}.battle-log{position:absolute;left:50%;bottom:20px;transform:translateX(-50%);font-size:18px;border-radius:30px;padding:8px 20px;background:#28053caa;border:1px solid #d37af1;white-space:nowrap;color:#fff6fb;max-width:90%;overflow:hidden;text-overflow:ellipsis}.skills-bar{position:absolute;top:1012px;left:7px;right:7px;height:143px;border:3px solid #c54bff;border-radius:17px;background:linear-gradient(#280b47,#0a0417);display:flex;align-items:center;gap:10px;padding:7px;box-shadow:0 0 12px #b630fa}.hero-bio{width:310px;height:119px;border:2px solid #a746f5;background:#17052f;display:flex;align-items:center;overflow:hidden;border-radius:12px}.bio-sprite{width:114px;height:119px;object-fit:contain;object-position:center top}.hero-bio>div{flex:1}.hero-bio strong{font-size:18px;display:block}.hero-bio small{display:block;color:#ffdc5c}.bio-hp{border:1px solid #57ff53;background:linear-gradient(#28f34e,#0c8727);font-size:17px;font-weight:bold;text-align:center;border-radius:18px;padding:6px}.skills-buttons{flex:1;display:flex;gap:8px;justify-content:space-around}.ui-btn.skill-btn{height:94px;width:92px;padding:3px;background:#240539;border-radius:13px}.skill-btn .ico{font-size:48px}.skill-btn.highlight{border-color:#ffd452;box-shadow:0 0 18px #ffac2b}.skill-btn sup{font-size:22px;background:#000d;position:absolute;right:4px;top:4px}.turn-queue{position:absolute;bottom:4px;left:7px;right:7px;height:118px;border:3px solid #aa4bef;border-radius:12px;background:linear-gradient(#270b45,#090519);display:flex;align-items:center;padding:8px;gap:6px}.queue-label{font-size:18px;min-width:91px;text-align:center}.turn-icons{display:flex;overflow:hidden;gap:5px;align-items:center}.turn-icons .portrait{width:47px;min-width:47px;height:64px}.turn-icons .portrait img{width:45px;height:62px}.turn-icons .portrait.enemy{border-color:#fb4a74}.skill-flash{pointer-events:none;position:absolute;z-index:25;left:80px;top:380px;padding:15px 30px;font-size:36px;font-weight:bold;color:#fff2a0;text-shadow:0 0 25px #ff5f1e;border:3px solid #ffbc47;border-radius:20px;background:#730f25c0;animation:flash .6s}.dim{position:absolute;inset:0;background:#0005;z-index:15}@keyframes punch{35%{transform:translateX(140px) scale(1.18)}100%{transform:translateX(0) scale(1)}}@keyframes enemyPunch{35%{transform:translateX(-140px) scale(1.12)}100%{transform:translateX(0)}}@keyframes floatDamage{0%{opacity:0;transform:translateY(30px) scale(.6)}25%{opacity:1;transform:translateY(0) scale(1.2)}100%{opacity:1;transform:translateY(-35px) scale(1)}}@keyframes flash{0%{opacity:0;transform:scale(.7)}30%{opacity:1;transform:scale(1.1)}100%{opacity:0;transform:scale(1)}}
.chapter-mini{width:55px;height:74px;object-fit:contain;flex-shrink:0}.map-art{background-image:linear-gradient(30deg,#22154355,#0f044111),url('/assets/scenes/map_soft.webp')}.player-card .p-avatar{background:url('/assets/scenes/avatar.webp') center/cover}.player-card .p-avatar .small-av{opacity:0}
.login-screen{position:absolute;inset:0;z-index:6;background:radial-gradient(ellipse at center,#65258e,#190627 62%,#070211);display:flex;align-items:center;justify-content:flex-start;flex-direction:column;padding:120px 15px}.login-logo{text-align:center;color:#ffdd5c;font-size:44px;font-weight:1000;text-shadow:0 0 18px #ce53ff;margin:55px 0 90px}.login-logo span{font-size:31px;color:#fff;letter-spacing:3px}.login-heroes{display:flex;width:690px;height:350px;justify-content:center;align-items:flex-end;gap:0;background:radial-gradient(ellipse,#8634d5,#1b0637 70%,transparent);border-bottom:3px solid #ce71ff}.login-heroes img{width:19%;height:310px;object-fit:contain;filter:drop-shadow(0 0 15px #d05fff)}.login-panel{margin-top:65px;border:3px solid #a84df1;box-shadow:0 0 28px #b037d0;border-radius:18px;background:#1b0831;padding:22px;text-align:center;width:610px}.login-panel p{font-size:23px}

/* ===============================================================
   VERSION 0.2: SOFT PIXEL PALETTE & PORTRAIT FULL BLEED
   No purple neon glare. Borders remain crisp on small phones.
   =============================================================== */
:root{--purple:#698d97;--shine:#9fbfc0;--gold:#e5bb68;--panel:#162633ee;--border:2px solid #5d7f88;color:#f5efdb;background:#17202a;font-family:system-ui,"Trebuchet MS",Arial,sans-serif}
body{background:#131d25;overscroll-behavior:none}
#game{border:0;box-shadow:none;background:linear-gradient(175deg,#182b36,#15202b 58%,#1a2530)}
#game:before{background:none}
h1,h3,.ui-btn,.rarity,.ico,.versus,.page-title h1{text-shadow:none!important}
.ui-btn,.neon-box,.res,.player-card,.page-title,.bottom-nav,.portrait,.hero-card,.formation-slot,.chapter-choice,.prize,.tower-image,.rank-line,.shop-card,.dialog{box-shadow:none!important}
.ui-btn{border:2px solid #637d85;background:linear-gradient(#293844,#1b2934);color:#faf2df;border-radius:7px;text-shadow:none;transition:filter .12s,background .12s,transform .12s}
.ui-btn:focus-visible{outline:3px solid #ffe3a2;outline-offset:2px}
.ui-btn:active{filter:brightness(1.2);transform:translateY(2px)}
.ui-btn.gold,.ui-btn.gold.large{border-color:#e4bc72;background:linear-gradient(#dbac59,#946d35);color:#231c17;text-shadow:none}
.ui-btn.purple{background:linear-gradient(#547b85,#304953)}
.ui-btn.selected,.nav-btn.selected,.side-btn:hover,.tab.active,.floor.active,.summontype.selected,.farm-tab.selected{border-color:#e6c379!important;background:linear-gradient(#647e7b,#344d52)!important;box-shadow:inset 0 0 0 1px #e1c982!important;color:#fff6dc}
.ui-btn.muted{opacity:.6}
.ui-btn.danger{border-color:#a86a6e;background:#55343e}
.ui-btn.plus{border-color:#b3b0a0;background:#314a54;color:#fff1cc}
.ico{filter:none}
.hud{background:linear-gradient(#182531 75%,transparent)}
.player-card{background:#263441;border-color:#7f9494}
.p-avatar{background:#334e5a;border-color:#b4a57e}
.p-details em,.gold-text{color:#ffe1a2}
.res{background:#243745;border-color:#657f89}
.res strong{color:#fff7e2}
.header-links .ui-btn{background:#283d48;border-color:#68848d}
.bottom-nav{background:linear-gradient(#253644,#17232e);border-color:#68828a}
.page-title{border-color:#80949a;background:linear-gradient(90deg,#223440,#38525a,#223440)}
.page-content{scrollbar-color:#728f8c transparent}
.neon-box{border-color:#677f86;border-radius:7px;background:linear-gradient(#2a3b48ef,#1d303cee)}
.neon-box h3{color:#f4e9ce;border-color:#597078}
.subtext{color:#bfd0cf}
.prize{background:#293b46;border-color:#68818a;border-radius:7px}
.toast{background:#2c3b48;border-color:#d6b377}
.modal-screen{background:#111c23bb}
.dialog{background:linear-gradient(#324a56,#1b2e39);border-color:#8da6a4}
.dialog .ui-btn{border-radius:7px}
.lobby-area{background:radial-gradient(ellipse at 45% 38%,#355369 0,#1b2c42 54%,#18232e 95%)}
.moon-back{opacity:.72;filter:saturate(.70)}
.camp-art{box-shadow:none;filter:saturate(.89) brightness(1.04);mask-image:linear-gradient(transparent 0,#000 5%,#000 89%,transparent 100%);overflow:hidden;isolation:isolate}
#campFlames{position:absolute;left:186px;top:305px;width:144px;height:140px;pointer-events:none;z-index:3;image-rendering:pixelated;mix-blend-mode:screen}
.firelight{position:absolute;left:184px;top:329px;width:160px;height:115px;background:radial-gradient(ellipse,#ffc34c55 0%,#f9903322 39%,transparent 72%);pointer-events:none;z-index:2;animation:campGlow 1.1s ease-in-out infinite alternate}
@keyframes campGlow{0%{opacity:.35;transform:scale(.93)}100%{opacity:1;transform:scale(1.07)}}
.event-banner{background:linear-gradient(100deg,#3a4855,#314351);border-color:#92a7a4;box-shadow:none;text-shadow:none}
.event-banner span{color:#efd4a2}
.ui-btn.side-btn,.ui-btn.feat-btn{background:linear-gradient(#314955,#20333e);border-color:#72888e}
.timer-pill{background:#263a40;border-color:#6b9792;color:#9ce5cc}
.hero-list{gap:8px}
.hero-card{border:2px solid #748b92;background:linear-gradient(#314350,#1d2b34);border-radius:6px;position:relative}
.hero-card img,.fighter-sprite,.formation-slot img,.small-hero-card img,.portrait img{image-rendering:pixelated}
.hero-card.unowned{filter:grayscale(.45);opacity:.83}
.hero-card.unowned img{opacity:.56}
.hero-card strong{color:#fcf5e9}
.hero-card .rarity{font-size:15px;letter-spacing:.4px}
.hero-card small{color:#deebe7}
.rarity{display:inline-block;border-radius:5px;padding:1px 6px;font-size:16px;font-weight:900;letter-spacing:.5px;text-shadow:none!important}
.rarity.grade-r{color:#e3e4e1;border:1px solid #819196;background:#3d4c56}
.rarity.grade-sr{color:#d7f8ff;border:1px solid #5cbbc4;background:linear-gradient(#376c80,#27465c)}
.rarity.grade-ssr{color:#fff0ad;border:1px solid #ffd26e;background:linear-gradient(#966c26,#493b22)}
.rarity.grade-ur{color:#fff9d6;border:2px solid #ffdf83;background:linear-gradient(115deg,#557a88,#8c6e37,#675284);box-shadow:0 0 5px #e2c77b!important}
.tier-r{border-color:#84949b!important;background:linear-gradient(#354451,#27323b)!important}
.tier-sr{border-color:#65b7c2!important;background:linear-gradient(#284b5b,#203441)!important}
.tier-ssr{border-color:#deb466!important;background:linear-gradient(#554934,#283641)!important}
.tier-ur{border:3px double #f1db83!important;background:linear-gradient(150deg,#35536b,#425451 50%,#5f4d65)!important;box-shadow:inset 0 0 0 2px #8abcc0!important}
.element-chip{font-size:16px;color:#e7ecde;display:inline-block;background:#36545c;padding:2px 6px;border:1px solid #66898f;border-radius:4px}
.portrait{background:#263a43;border-color:#72848a}
.portrait.now{border-color:#e0b767;box-shadow:0 0 4px #ba9547!important}
.formation-slot{border-color:#708995;background:#273a48;border-radius:6px}
.hero-feature{border-color:#657e87;background:radial-gradient(#486278,#273742 74%)}
.versus{color:#dfb76a}
.skill-list span,.gear-slot-grid .ui-btn,.gear-items .ui-btn{border-color:#748d8b;background:#304451}
.summon-arts{background:radial-gradient(ellipse,#4b6870,#223341 75%,transparent)}
.summon-arts img{filter:drop-shadow(0 0 5px #5a8696)}
.summon-page .neon-box{border-color:#82979a}
.rates{color:#f0d49b}
.summontype.selected{border-color:#d8ae63}
.rewards-grid .hero-card{background:#2c3e49}
.map-art{filter:saturate(.84) brightness(.97);border-color:#7b908c}
.route{filter:none;opacity:.85}
.battle-view{background:#253744}
.battle-head{background:linear-gradient(#243c4a,#243c4aec 72%,transparent)}
.b-toptitle,.battle-stage-label b,.battle-stage-label small{background:#2a4350;border-color:#8a9fa1;text-shadow:none}
.battle-stage-label b em{color:#ffd284}
.battle-field{filter:saturate(.90)}
.conditions{background:#233b4be8;border-color:#8fa19b;box-shadow:none}
.conditions b{color:#f2d28e}
.fighter-ring{box-shadow:none!important;border-color:#80c8c3;background:#56afc255}
.enemy .fighter-ring{border-color:#f08a7d;background:#b84f5966}
.boss-tag{background:#a65c45}
.skills-bar,.turn-queue{background:linear-gradient(#2d4754,#1c2c38);border-color:#66888e;box-shadow:none}
.hero-bio{background:#2a3c48;border-color:#778f92}
.ui-btn.skill-btn{background:#344c54;border-color:#779398}
.skill-btn.highlight{border-color:#e0bb66;box-shadow:inset 0 0 0 2px #e9bd72!important}
.battle-log{background:#273b45dd;border-color:#667e83}
.skill-flash{background:#79522dcc;border-color:#ffd37f;text-shadow:none}
/* Screen that was taller than the viewport: scale the two 3x2 team grids without scrolling. */
.page-content.prepare-page{overflow:hidden;padding:5px 9px;display:flex;flex-direction:column;gap:2px}
.prepare-page .neon-box{padding:6px 10px;margin:2px 0 5px;flex:0 0 auto}
.prepare-page .neon-box h3{font-size:20px;padding:0 0 4px;margin:0 0 5px}
.prepare-page .formation-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
.prepare-page .formation-slot{height:123px;min-height:123px;max-height:123px}
.prepare-page .formation-slot img{height:101px;max-height:101px;object-fit:contain}
.prepare-page .formation-slot small{height:16px;font-size:13px;white-space:nowrap}
.prepare-page .center{font-size:18px;margin-top:4px}
.prepare-page .versus{font-size:28px;line-height:30px;margin:0}
.prepare-page .buttons-center{margin:5px 0 0;gap:8px;flex-shrink:0}
.prepare-page .buttons-center .ui-btn{height:54px;min-height:54px;font-size:19px;padding:3px 8px}
/* Dedicated team-management screen has its own compact internal hero gallery. */
.page-content.formation-page .neon-box{padding:7px;margin:3px 0 8px}
.formation-page .formation-slot{height:106px}
.formation-page .formation-slot img{height:80px}
.formation-page .formation-grid{gap:6px}
.formation-page .hero-list.compact{max-height:145px;overflow:auto;gap:6px}
.formation-page .small-hero-card{height:116px}
.formation-page .small-hero-card img{height:84px}
.formation-page .versus{font-size:25px}
.formation-page .buttons-center{margin:8px}
/* Sound panel - all controls genuine and labels readable. */
.audio-page .setting-row{display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid #59707d;padding:8px 0;font-size:20px}
.audio-page .setting-row .ui-btn{width:95px;min-height:40px}
.setting-on{background:#38634b;border-color:#82b893}
.setting-off{background:#4d4044;border-color:#987a79}
.volume-setting{display:flex;flex-direction:column;gap:8px;margin:13px 0;font-size:19px}
.volume-setting .volume-value{float:right;color:#dfc38a}
.volume-setting input{width:100%;accent-color:#73b7b0;min-height:28px;cursor:pointer}
.sound-samples{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
.sound-samples .ui-btn{min-height:53px;font-size:17px;padding:6px}
/* Reduce movement on accessibility settings or slower devices. */
@media(prefers-reduced-motion:reduce){.firelight,.fighter.attacking .fighter-sprite,.fighter.enemy.attacking .fighter-sprite{animation:none!important}}

.fighter.attacking.ultimate .fighter-sprite{animation-duration:1.5s}.fighter.hit.ultimate .fighter-sprite{animation:ultimateRecoil 1.5s ease-out}@keyframes ultimateRecoil{0%{transform:translateX(0)}85%{transform:translateX(-12px)}100%{transform:translateX(0)}}
/* =========================== V3 CINEMATIC COMBAT =========================== */
.battle-effects{position:absolute;inset:0;width:100%;height:100%;z-index:7;pointer-events:none;image-rendering:auto}
.fighter{transform-origin:50% 90%;will-change:transform,filter;isolation:isolate}
.fighter-visual{transform-origin:center bottom;filter:drop-shadow(0 4px 4px #102d39a9)}
.fighter-sprite{max-width:98%;height:152px;object-position:bottom center;filter:none!important}
.fighter:not(.ko):not(.attacking):not(.hit) .fighter-visual{animation:heroIdle 2.4s ease-in-out infinite alternate}
.fighter:nth-of-type(3n) .fighter-visual{animation-delay:-1.2s}
.fighter.attacking{z-index:8}
.fighter.attacking .fighter-visual,.fighter.enemy.attacking .fighter-visual{animation:heroRush var(--action-ms) cubic-bezier(.2,.6,.25,1) both!important}
.fighter.attacking.ultimate .fighter-visual{animation:heroUltimate var(--action-ms) ease-in-out both!important}
.fighter.hit .fighter-visual,.fighter.hit.ultimate .fighter-visual{animation:heroImpact var(--action-ms) ease both!important}
.damage{top:22px;left:-6px;z-index:15;opacity:0;color:#fff4b8;font-weight:1000;font-size:29px;letter-spacing:-1px;white-space:nowrap;text-shadow:-2px -2px #703d16,2px 2px #703d16,0 0 10px #ee7e32;animation:hitNumbers var(--action-ms) linear both!important;animation-delay:0ms!important}
.damage.healing{color:#91fac7;text-shadow:1px 2px #154c3b}
.skill-flash{left:50%;top:44%;transform:translateX(-50%);z-index:16;border:2px solid #f4cb8c;background:#2c4050e8;font-size:30px;padding:9px 19px;box-shadow:0 4px 22px #0a1b27;animation:skillTitle var(--action-ms,1050ms) ease-out both!important;white-space:nowrap}
.skill-flash.special{font-size:38px;color:#fff1b7;border:3px solid #ffe1a0;background:linear-gradient(110deg,#354a5b,#715d49,#304856)}
.fighter.ko{opacity:.3;filter:grayscale(.85);transition:filter .4s,opacity .4s}
.hp-label{background:linear-gradient(#101f2aba,#111d23d9);border:1px solid #b7d0c0;border-radius:6px;height:34px;padding-top:0;font-size:19px}
.small-hp{height:9px;background:#20323b;border:1px solid #a5b4aa}
.fighter-ring{height:17px;bottom:7px;box-shadow:none;background:#62cad044}
.battle-field{background-size:cover;background-position:center center}
@keyframes heroIdle{0%{transform:translateY(0) rotate(-.5deg)}100%{transform:translateY(-4px) rotate(.5deg)}}
@keyframes heroRush{0%,16%{transform:translate(0,0) scale(1)}25%{transform:translate(-12px,5px) scale(.95)}51%{transform:translate(calc(var(--rush-x) * .77),calc(var(--rush-y) * .77)) scale(1.09)}63%{transform:translate(var(--rush-x),var(--rush-y)) scale(1.13)}78%{transform:translate(calc(var(--rush-x) * .8),calc(var(--rush-y) * .8)) scale(1.06)}100%{transform:translate(0,0) scale(1)}}
@keyframes heroUltimate{0%,18%{transform:translateY(0) scale(1);filter:brightness(1)}29%{transform:translateY(-25px) scale(1.13);filter:brightness(1.4)}37%{transform:translateY(-8px) scale(1.05)}58%{transform:translate(calc(var(--rush-x) * .7),calc(var(--rush-y) * .7)) scale(1.18)}67%{transform:translate(var(--rush-x),var(--rush-y)) scale(1.26);filter:brightness(1.5)}80%{transform:translate(calc(var(--rush-x) * .66),calc(var(--rush-y) * .66)) scale(1.1)}100%{transform:translate(0,0) scale(1);filter:brightness(1)}}
@keyframes heroImpact{0%,61%{transform:translate(0,0);filter:brightness(1)}64%{transform:translate(-18px,3px) rotate(-5deg);filter:brightness(2.3)}71%{transform:translate(12px,-3px) rotate(3deg)}77%{transform:translate(-6px,2px)}100%{transform:translate(0,0);filter:brightness(1)}}
@keyframes hitNumbers{0%,59%{opacity:0;transform:translateY(20px) scale(.6)}63%{opacity:1;transform:translateY(-12px) scale(1.25)}84%{opacity:1;transform:translateY(-40px) scale(1)}100%{opacity:0;transform:translateY(-67px) scale(.92)}}
@keyframes skillTitle{0%{opacity:0;transform:translateX(-50%) scale(.65)}18%{opacity:1;transform:translateX(-50%) scale(1.12)}48%{opacity:1;transform:translateX(-50%) scale(1)}67%{opacity:0;transform:translateX(-50%) scale(1.05)}100%{opacity:0}}
@media(prefers-reduced-motion:reduce){.fighter-visual{animation:none!important}.battle-effects{display:none}.skill-flash{animation:none!important;opacity:.8}}
/* Responsive portrait: never distort chibi art on tall phones. Add vertical world space instead. */
html,body,#app{width:100%;height:100%;overflow:hidden;margin:0;padding:0;background:#1c303a}
#app{position:fixed;inset:0;overflow:hidden}
#game{width:720px;min-height:1280px;transform-origin:top left;overflow:hidden}
.battle-field{height:calc(875px + var(--stage-extra,0px))}
.battle-view .skills-bar{top:auto;bottom:122px}
.camp-art{top:calc(338px + var(--camp-shift,0px))}
.moon-back{height:calc(550px + var(--stage-extra,0px))}
/* Clean source artwork: keeps all 12 fighters legible and removes screenshot artifacts. */
.battle-field{background-image:url('/assets/scenes/battle_bg_v3.webp');background-position:50% 45%;background-size:100% 100%;image-rendering:auto}
.fighter{height:230px}
.fighter-visual{top:29px;bottom:14px}
.fighter-sprite{height:184px;width:154px}
.fighter-ring{bottom:3px}
.ultimate-cutin{position:absolute;z-index:24;top:220px;left:35px;right:35px;height:260px;pointer-events:none;display:flex;align-items:center;gap:18px;overflow:hidden;border-top:4px solid #fde5b1;border-bottom:4px solid #9acedc;background:linear-gradient(110deg,#152d45f7,#395b6bee 49%,#171e34f8);box-shadow:0 12px 35px #0a1b25bb;animation:cutin .95s ease both;transform:skew(-6deg)}
.ultimate-hero{width:230px;min-width:230px;align-self:stretch;position:relative;background:radial-gradient(circle at 40% 60%,#aecede66,transparent 70%)}
.ultimate-hero img{position:absolute;bottom:-65px;left:15px;max-height:295px;max-width:210px;width:100%;height:100%;object-fit:contain;filter:drop-shadow(6px 7px 0 #162a3b)}
.ultimate-copy{display:flex;flex-direction:column;gap:10px;align-items:flex-start;min-width:0;transform:skew(6deg)}
.ultimate-copy span{font-size:33px;color:#fff0b9;font-weight:1000;text-shadow:0 2px 0 #6a4e24}
.ultimate-copy strong{font-size:26px;max-width:365px;line-height:1.25;color:#f7feff;text-shadow:0 2px 0 #234d58}
@keyframes cutin{0%{opacity:0;transform:translateX(750px) skew(-6deg)}20%{opacity:1;transform:translateX(0) skew(-6deg)}60%{opacity:1;transform:translateX(0) skew(-6deg)}100%{opacity:0;transform:translateX(-750px) skew(-6deg)}}

/* Camera reaction happens precisely when the attack lands, not while choosing a skill. */
.battle-field.combat-active{animation:stageJolt var(--fx-ms,1050ms) ease-in-out both}
.damage{top:53px}
@keyframes stageJolt{0%,60%{transform:translate(0,0)}64%{transform:translate(-3px,1px)}66%{transform:translate(4px,-2px)}68%{transform:translate(-4px,1px)}71%{transform:translate(2px,0)}75%,100%{transform:translate(0,0)}}
@media(prefers-reduced-motion:reduce){.battle-field.combat-active{animation:none!important}}

/* V4: native Canvas character animation and input hitboxes. */
.battle-actors{position:absolute;inset:0;width:100%;height:100%;z-index:8;pointer-events:none;image-rendering:pixelated}
.battle-field .fighter{z-index:9;background:transparent!important;opacity:0!important;filter:none!important;box-shadow:none!important;transform:none!important;animation:none!important;cursor:crosshair}
.battle-field .fighter *{pointer-events:none}
.battle-field .conditions{z-index:11;pointer-events:none}
.battle-field .battle-log{z-index:12;pointer-events:none}
.battle-field.combat-active{animation:none!important;transform:none!important}
.ultimate-cutin{top:235px;z-index:26;animation:cutin 1s ease both}
.ultimate-cutin .cutin-skip{pointer-events:auto;align-self:flex-end;min-height:38px;font-size:19px;border-color:#ffe1a0;margin-top:12px}
/* No purple fringing or large shadow filters on the actual sprite art. */
.battle-actors img{filter:none}

/* V5 combat clarity and touch targeting. Keep the original 3x2 formation. */
.battle-actors{image-rendering:auto;contain:layout paint;touch-action:manipulation}
.battle-view .fighter{touch-action:manipulation}
.battle-view .fighter:not(.targetable){cursor:default}
.battle-view .fighter.targetable{cursor:pointer}
.target-help{position:absolute;z-index:22;left:152px;right:152px;top:40px;min-height:66px;display:flex;align-items:center;justify-content:center;gap:12px;padding:8px 14px;border:2px solid #d5d59f;background:#18323ced;color:#fff2c6;font-size:21px;font-weight:900;text-align:center;border-radius:8px;box-shadow:0 5px 12px #0008;pointer-events:auto}
.target-help .target-cancel{border-color:#cf9996;min-height:42px;padding:4px 10px;flex-shrink:0}
.skills-buttons .skill-btn{position:relative;height:100px;min-height:100px;max-width:96px;border-radius:9px;gap:0}
.skills-buttons .skill-btn .ico{font-size:43px;line-height:1.1}
.skills-buttons .skill-btn small{font-size:15px;line-height:1.1;white-space:nowrap;color:#f4ebd9}
.skills-buttons .skill-btn .skill-cost{position:absolute;top:1px;left:2px;font-size:14px;padding:0 2px;border-radius:3px;background:#254958;border:1px solid #6f9b8c}
.skills-buttons .skill-btn sup{z-index:2;top:2px;right:2px}
.skills-buttons .skill-btn:focus-visible,.battle-view .target-cancel:focus-visible{outline:4px solid #ffe6a8;outline-offset:-3px}
.hero-bio{min-width:276px;width:276px}
.skills-buttons{min-width:0;flex:1;gap:5px;justify-content:space-between}
.battle-head .b-small{min-width:58px}
@media (prefers-reduced-motion:reduce){.battle-view .battle-actors{image-rendering:auto}}

.bio-energy{font-size:17px;color:#ffde83;font-weight:900;margin-top:3px}.skills-buttons .skill-btn[disabled] small{color:#999!important}

/* V6: pixel navigation, chapter/dungeon separation, swipeable six-button sidebar. */
.lobby-side.left.collapsible-menu{max-height:calc(100% - 240px);width:111px;overflow-y:auto;overflow-x:hidden;scrollbar-width:thin;scrollbar-color:#849b92 transparent;overscroll-behavior:contain;touch-action:pan-y;transition:transform .29s cubic-bezier(.22,.82,.24,1),opacity .25s ease;will-change:transform}
.lobby-side.left.collapsible-menu.is-closed{transform:translateX(-124px);opacity:0;pointer-events:none}
.lobby-side.left.collapsible-menu.is-open{transform:translateX(0);opacity:1;pointer-events:auto}
.menu-edge-toggle{position:absolute;z-index:12;top:435px;left:1px;min-width:44px;height:83px;border:3px solid #99c8bc;border-left:0;border-radius:0 9px 9px 0;color:#f7eac8;background:linear-gradient(#36545c,#20343f);box-shadow:inset 0 0 0 2px #24323e,3px 3px 0 #0c212a;font-size:29px;font-weight:1000;cursor:pointer;transition:left .29s cubic-bezier(.22,.82,.24,1)}
.menu-edge-toggle.open{left:111px}
.menu-edge-toggle:focus-visible{outline:3px solid #f9dd92;outline-offset:3px}
.menu-alert-dot{position:absolute;right:2px;top:5px;width:15px;height:15px;background:#ec4c4b;border:2px solid #ffe4a9;border-radius:2px;box-shadow:1px 2px 0 #321d2c;animation:menuPulse 1.8s ease-in-out infinite}
@keyframes menuPulse{50%{filter:brightness(1.45)}}
.home-features{justify-content:center;gap:13px;left:6px;right:6px;bottom:13px}
.ui-btn.feat-btn{width:auto;max-width:226px;flex:1 1 0;min-width:0;height:100px;background:linear-gradient(#304956,#1e353e);border-color:#9bb5ad;box-shadow:inset 0 0 0 2px #152832!important}
.feat-btn small{font-size:19px;white-space:normal;text-align:center;line-height:1.12}
.feat-btn .ico{font-size:39px}
.bottom-nav .nav-btn:last-child small{font-size:16px;white-space:normal;line-height:1.05;text-align:center}
.bottom-nav .nav-btn:last-child .ico{font-size:40px}
.dungeon-hub-page{overflow-y:auto}
.dungeon-card-grid{display:grid;grid-template-columns:1fr;gap:14px;margin-top:19px}
.dungeon-card{width:100%;display:flex;align-items:center;gap:18px;min-height:135px;border:3px solid #88b3a9;background:linear-gradient(125deg,#2b4b56,#1b3542 82%);border-radius:6px;color:#faf0d6;padding:13px 18px;text-align:left;box-shadow:inset 0 0 0 3px #20313d,4px 5px 0 #0a1922;cursor:pointer}
.dungeon-card:active{transform:translateY(2px);filter:brightness(1.2)}
.dungeon-card:focus-visible{outline:4px solid #f0c871;outline-offset:2px}
.dungeon-card-icon{width:92px;min-width:92px;text-align:center;font-size:60px;line-height:1.3;image-rendering:pixelated;filter:drop-shadow(3px 4px #12272c)}
.dungeon-card-details{flex:1;display:flex;flex-direction:column;gap:7px;min-width:0}
.dungeon-card-details strong{font-size:29px;color:#ffe3a2;line-height:1.16}
.dungeon-card-details small{font-size:19px;color:#e0ebe6;line-height:1.25}
.dungeon-card-details em{font-size:17px;font-style:normal;color:#b8e1ca}
.dungeon-card-arrow{font-size:35px;color:#eaca83}
.hub-return{margin:1px 0 13px}
.ui-btn.hub-return-btn{width:100%;min-height:53px;flex-direction:row;justify-content:center;font-size:21px;font-weight:900;border-color:#d1bc8e;color:#fff4cf;background:linear-gradient(#405d5d,#304750)}
.dungeon-mode-page .floorgrid{gap:7px}
.dungeon-mode-page .floorgrid .ui-btn{min-height:54px;font-size:18px}
.dungeon-mode-page .tabs .ui-btn{min-width:0;white-space:nowrap}
/* Pixel rarity identity, no purple neon applied indiscriminately. */
:root{--rarity-r:#77c76e;--rarity-sr:#64b8e6;--rarity-ssr:#ba82ef;--rarity-ur:#ffb957}
.hero-card,.portrait,.small-hero-card{border-radius:3px!important;box-shadow:inset 0 0 0 2px #101b24!important}
.hero-card.tier-r,.portrait.tier-r,.small-hero-card.tier-r{border:3px solid var(--rarity-r)!important;background:linear-gradient(#244439,#1d3033)!important}
.hero-card.tier-sr,.portrait.tier-sr,.small-hero-card.tier-sr{border:3px solid var(--rarity-sr)!important;background:linear-gradient(#25485d,#1b3144)!important}
.hero-card.tier-ssr,.portrait.tier-ssr,.small-hero-card.tier-ssr{border:3px solid var(--rarity-ssr)!important;background:linear-gradient(#423d5a,#293145)!important;box-shadow:inset 0 0 0 2px #282539,0 0 5px #b487e466!important}
.hero-card.tier-ur,.portrait.tier-ur,.small-hero-card.tier-ur{border:4px solid var(--rarity-ur)!important;background:linear-gradient(145deg,#675337,#39394b 64%,#413a35)!important;box-shadow:inset 0 0 0 2px #ffdd8b,0 0 8px #ffc46a88!important}
.hero-card{position:relative;isolation:isolate}
.hero-card.tier-ur::after{content:'✦';position:absolute;top:5px;right:7px;color:#fff3b7;font-size:25px;pointer-events:none;text-shadow:0 0 4px #ffbf44;animation:raritySpark 2.5s ease-in-out infinite}
@keyframes raritySpark{0%,100%{opacity:.4;transform:scale(.85)}50%{opacity:1;transform:scale(1.15)}}
.rarity.grade-r{color:#d9ffca;border:2px solid var(--rarity-r);background:#254d35}
.rarity.grade-sr{color:#d4f3ff;border:2px solid var(--rarity-sr);background:#22415b}
.rarity.grade-ssr{color:#f8e4ff;border:2px solid var(--rarity-ssr);background:#493261;box-shadow:0 0 5px #c78bf855!important}
.rarity.grade-ur{color:#fff4d7;border:2px solid var(--rarity-ur);background:linear-gradient(100deg,#85501e,#ad762c,#694322);box-shadow:0 0 8px #eeb955!important}
.hero-card.unowned{filter:none!important;opacity:1!important}
.hero-card.unowned img{filter:grayscale(.55) brightness(.66)!important;opacity:.84!important}
.hero-card.unowned strong,.hero-card.unowned small{opacity:.76}
.hero-card.unowned .unowned-lbl{color:#e0dddc}
.grade-filter{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:7px;margin:8px 0 5px}
.grade-filter .ui-btn{min-width:0;height:54px;min-height:54px;padding:5px 2px;font-size:20px;font-weight:900;border-radius:3px}
.grade-filter-btn.grade-choice-r{border-color:var(--rarity-r)}
.grade-filter-btn.grade-choice-sr{border-color:var(--rarity-sr)}
.grade-filter-btn.grade-choice-ssr{border-color:var(--rarity-ssr)}
.grade-filter-btn.grade-choice-ur{border-color:var(--rarity-ur)}
.grade-filter-btn.active{color:#fff4d6;background:#49615a!important;box-shadow:inset 0 0 0 2px #b3be97!important}
.role-filter .tabs{padding:5px 0 8px}
.role-filter .tabs .ui-btn{font-size:16px;min-width:90px;min-height:44px}
@media(prefers-reduced-motion:reduce){.menu-alert-dot,.hero-card.tier-ur::after{animation:none!important}.lobby-side.left.collapsible-menu,.menu-edge-toggle{transition:none!important}}
/* Keep chapter/level selectors entirely inside the sub-page on narrow phones. */
.dungeon-mode-page .floorgrid{grid-template-columns:repeat(4,minmax(0,1fr));gap:7px;max-width:100%;min-width:0}
.dungeon-mode-page .floorgrid .ui-btn{min-width:0;white-space:normal;overflow-wrap:anywhere;padding:5px 2px;font-size:17px}
.dungeon-mode-page .farm-main{min-width:0;overscroll-behavior:contain}
.dungeon-mode-page .farm-types{flex-shrink:0}

/* ================================================================
   Anime Multiverse 6v6 | V7 Unified Pixel Skin
   Shared visual layer only. The battle mechanics, storage and data
   still come from the existing V5/V6 project.
   ================================================================ */
:root {
  --px-ink:#0b1420;
  --px-dark:#162837;
  --px-panel:#263b4b;
  --px-panel2:#354d5c;
  --px-hi:#a9c2ba;
  --px-edge:#718f91;
  --px-gold:#eac37a;
  --px-cream:#fff5d8;
  --px-red:#e17c71;
  --px-blue:#7ac2d8;
  --px-green:#89d49d;
  --px-purple:#ba84e6;
  --rarity-r:#7fda77;
  --rarity-sr:#67b9f7;
  --rarity-ssr:#bb83f9;
  --rarity-ur:#ffb65e;
  --purple:#7a9da7;
  --shine:#bdd7ca;
  --gold:#f2c579;
  --panel:#1b2e3d;
  color-scheme:dark;
  font-family:"Courier New","Liberation Mono",monospace;
}
body,#app{background:#132331!important;image-rendering:pixelated}
#game{border:0!important;box-shadow:none!important;background:#182d3b!important}
#game:before{display:none!important}
h1,h2,h3,strong,b,.page-title,.ui-btn,.res label,.p-details {font-family:"Courier New","Liberation Mono",monospace!important;font-weight:900!important;letter-spacing:-.4px;text-shadow:1px 1px 0 #091822!important}
p,small,.subtext,.dungeon-card-details small {font-family:"Trebuchet MS",Verdana,Arial,sans-serif!important;letter-spacing:0}
h1{font-size:31px!important;line-height:1.18}
h2{font-size:27px!important}
h3{font-size:22px!important;color:var(--px-cream)!important}
button{touch-action:manipulation;-webkit-tap-highlight-color:transparent}
/* Stable rectangular pixel borders and offset one-pixel shadows. */
.ui-btn,.neon-box,.res,.player-card,.page-title,.bottom-nav,.portrait,.hero-card,
.formation-slot,.chapter-choice,.prize,.tower-image,.rank-line,.shop-card,.dialog,
.summontype,.farm-tab,.map-node,.tabs button,.inventory-item,.inventory-info,
.battle-head .b-toptitle,.battle-stage-label b,.battle-stage-label small,
.skills-bar,.turn-queue,.skill-btn,.hero-bio,.arena-stand,.dungeon-card,
.menu-edge-toggle,.event-banner,.timer-pill,.boss-choice,.setting-row,.toast,
.small-hero-card,.floor,.quest-item,.gear-item,.boss-showcase,.dungeon-card-icon,
.rewards-grid,.map-detail,.map-heading {border-radius:0!important;backdrop-filter:none!important}
.ui-btn,.neon-box,.res,.player-card,.page-title,.bottom-nav,.portrait,.hero-card,
.formation-slot,.prize,.dialog,.dungeon-card,.inventory-item,.shop-card{
  box-shadow:inset 2px 2px 0 #a7c4c1,inset -2px -2px 0 #0e1c2a,4px 4px 0 #0c1a24!important;
}
.ui-btn{color:var(--px-cream)!important; border:3px solid var(--px-edge)!important;
  background:linear-gradient(to bottom,#415d6b 0%,#415d6b 13%,#2e4454 13%,#2e4454 77%,#20313f 77%)!important;
  min-height:48px;text-shadow:1px 1px #121f29!important;white-space:normal;word-break:normal;
  transition:transform 80ms linear,filter 80ms linear!important;
}
.ui-btn:focus-visible,.dungeon-card:focus-visible{outline:3px dashed #f5d88f!important;outline-offset:2px}
.ui-btn:active,.dungeon-card:active{transform:translate(2px,2px)!important;box-shadow:inset 2px 2px 0 #0c1922!important;filter:brightness(1.18)}
.ui-btn:disabled{opacity:.55;filter:grayscale(.68);border-style:dashed!important}
.ui-btn.gold,.ui-btn.gold.large{
  background:linear-gradient(#ffdf8d 0 20%,#e2af60 20% 78%,#ab713b 78%)!important;
  border-color:#ffeab0!important;color:#291b18!important;text-shadow:1px 1px #fff1b6!important;
  box-shadow:inset 2px 2px 0 #fff4bf,inset -3px -3px 0 #845027,4px 4px 0 #15202a!important;
}
.ui-btn.purple{background:linear-gradient(#668b91 0 28%,#355d70 28% 82%,#284556 82%)!important}
.ui-btn.danger{background:#6c3944!important;border-color:#e1877a!important}
.ui-btn.selected,.ui-btn.active,.tab.active,.floor.active,.summontype.selected,
.farm-tab.selected,.map-node.current,.chapter-choice.selected,.skill-btn.highlight{
  background:linear-gradient(#caa866 0 20%,#7d6a48 20% 80%,#58523c 80%)!important;
  border-color:#ffe39d!important;color:#fff5da!important;
  box-shadow:inset 2px 2px 0 #fff0bd,inset -2px -2px 0 #473e2f,3px 3px #0b1a25!important;
}
.ico.px-icon{display:inline-block!important;flex:none!important;width:1em;height:1em;
  background-size:100% 100%;background-repeat:no-repeat;background-position:center;
  image-rendering:pixelated!important;filter:none!important;
  font-weight:normal!important;line-height:1;
}
.pxi-label{font-size:18px}
/* Artboard typography and HUD */
.hud{background:linear-gradient(#182c3c 0 82%,transparent)!important}
.player-card{background:#293f4d!important;border:3px solid #8db3af!important;padding:6px!important}
.p-avatar{border:3px solid #ebbd75!important;border-radius:0!important;background:#425864!important}
.res{background:#294456!important;border:3px solid #83aab0!important;align-items:flex-start!important}
.res label{font-size:15px!important}
.res strong{color:#f2e7ce!important;font-size:24px!important}
.ui-btn.plus{background:#3c5e65!important;border-color:#a2c3b2!important;box-shadow:none!important}
.header-links .ui-btn.quicklink{border-color:#849c9c!important;background:#324c5b!important}
.quicklink .ico{font-size:38px!important}
.quicklink small{font-size:14px!important;line-height:1.12!important}
.bottom-nav{background:#192f3d!important;border:3px solid #829d9b!important;box-shadow:inset 2px 2px #b3c5b4!important;
 gap:6px!important;padding:6px!important}
.ui-btn.nav-btn{padding:5px 2px!important;min-height:90px!important;border-color:#789aa0!important}
.nav-btn .ico{font-size:41px!important}
.nav-btn small{font-size:17px!important;line-height:1.08!important;white-space:normal!important;text-align:center!important}
.ui-btn.nav-btn.selected{border-color:#ffd68a!important}
.page-title{background:#2a4855!important;border:4px solid #9cb9ae!important;box-shadow:inset 3px 3px 0 #dae5c9,4px 4px 0 #0d2230!important}
.page-title .ui-btn{min-height:55px!important}
.page-title h1{font-size:29px!important}
.page-content{scrollbar-color:#d1ab65 #263c48;scrollbar-width:thin;background:repeating-linear-gradient(0deg,#1c2d3a,#1c2d3a 6px,#20313c 6px,#20313c 7px);padding:12px}
.page-content::-webkit-scrollbar{width:9px}
.page-content::-webkit-scrollbar-thumb{border:2px solid #1d303b;background:#d3a65b}
.neon-box{border:3px solid #739394!important;background:#293e4d!important;padding:12px;margin:4px 1px 13px!important}
.neon-box h3{border-bottom:3px solid #526e78!important;padding-bottom:7px!important}
.neon-box p{line-height:1.4;color:#e4ebdf}
.prize{min-width:76px;min-height:65px;background:#304656!important;border:3px solid #75949b!important}
.prize .ico{font-size:29px!important}
.prize b{font-size:17px!important}
.tabs{padding-top:5px!important;gap:7px!important}
.tabs .ui-btn{border-width:3px!important;padding:7px!important;font-size:17px!important;min-width:90px}
.toast{border:3px solid #f1c47f!important;background:#314b55!important;box-shadow:3px 4px #111e27!important}
.dialog{background:#253c4c!important;border:5px solid #d6ba85!important;box-shadow:inset 3px 3px #b7d2bd,6px 6px #071721!important}
.modal-screen{backdrop-filter:none!important;background:#06131abf!important}
/* Lobby: keep original camp artwork but pixelize its display, buttons and side menus */
.lobby-area{background:#1c2e43!important}
.moon-back{filter:none!important;image-rendering:pixelated!important;opacity:.86!important}
.camp-art{filter:none!important;image-rendering:pixelated!important;border-radius:0!important;mask-image:linear-gradient(transparent 0%,#000 6%,#000 88%,transparent 100%)!important}
.event-banner{border:4px solid #c3a3e1!important;background:linear-gradient(to bottom,#405469 0 26%,#313b5b 26% 76%,#263451 76%)!important;box-shadow:inset 3px 3px #f1d4ff,4px 4px #111e2b!important;text-shadow:2px 2px #142234!important}
.event-banner b{font-family:"Courier New",monospace!important}
.event-banner span{color:#f5c975!important}
.lobby-side{gap:10px!important}
.ui-btn.side-btn,.ui-btn.feat-btn{background:#2e4654!important;border:3px solid #94acaa!important;border-radius:0!important;box-shadow:inset 2px 2px #aec8b7,3px 3px #0c1c26!important}
.side-btn .ico{font-size:37px!important}
.side-btn small{line-height:1.05;font-size:16px!important}
.ui-btn.feat-btn{height:97px!important;min-width:0!important;max-width:226px!important}
.feat-btn small{font-size:18px!important}
.feat-btn .ico{font-size:38px!important}
.menu-edge-toggle{background:#365565!important;border:3px solid #b3c9aa!important;color:#f8e4b2!important;box-shadow:inset 3px 3px #e3e7b3,3px 3px #0b1c25!important}
.timer-pill{border:2px solid #8fd0ae!important;background:#172f37!important;color:#b8f4c6!important;border-radius:0!important}
/* Rarity cards: exact R green, SR blue, SSR violet, UR golden orange. */
.hero-list{gap:9px!important}
.hero-card,.portrait,.small-hero-card,.formation-slot{border-radius:0!important}
.hero-card{min-height:228px!important;background:#253a48!important;border:4px solid #82979b!important;padding:5px 3px!important;isolation:isolate}
.hero-card img,.portrait img,.formation-slot img,.small-hero-card img,.fighter-sprite,.bio-sprite,
.hero-feature img,.boss-showcase img,.chapter-mini{image-rendering:pixelated!important;object-fit:contain!important}
.hero-card strong{font-size:14px!important;white-space:normal!important;line-height:1.1!important;max-width:100%}
.hero-card small{font-size:12px!important;line-height:1.1!important;color:#e6e7d9!important}
.hero-card.unowned{filter:none!important;opacity:1!important}
.hero-card.unowned img{filter:grayscale(.65) brightness(.62)!important;opacity:.85!important}
.hero-card.unowned .rarity{opacity:.8}
.hero-card.unowned strong{opacity:.85}
.hero-card .rarity{border-radius:0!important;font-size:15px!important}
.hero-card.tier-r,.portrait.tier-r,.small-hero-card.tier-r{border-color:#7dd577!important;background:#274537!important}
.hero-card.tier-sr,.portrait.tier-sr,.small-hero-card.tier-sr{border-color:#66b7f0!important;background:#28465f!important}
.hero-card.tier-ssr,.portrait.tier-ssr,.small-hero-card.tier-ssr{border-color:#b688f3!important;background:#45375c!important;box-shadow:inset 2px 2px #edc9ff,inset -2px -2px #281b43,4px 4px #151726!important}
.hero-card.tier-ur,.portrait.tier-ur,.small-hero-card.tier-ur{border-color:#ffb95e!important;background:repeating-linear-gradient(0deg,#5c452e,#5c452e 8px,#65492d 8px,#65492d 10px)!important;box-shadow:inset 2px 2px #ffe5a7,inset -2px -2px #6b3e26,4px 4px #251d18!important}
.hero-card.tier-ur::after{content:'✦'!important;color:#ffe9a9!important;text-shadow:none!important;top:4px!important;right:5px!important;animation:raritySpark 2.5s steps(3,end) infinite}
.rarity{border-radius:0!important;text-shadow:none!important}
.rarity.grade-r{color:#caffc1!important;background:#31583c!important;border:2px solid #7bd96d!important}
.rarity.grade-sr{color:#d5f4ff!important;background:#295374!important;border:2px solid #68c7f9!important}
.rarity.grade-ssr{color:#ffe5ff!important;background:#5b3c76!important;border:2px solid #c794fc!important}
.rarity.grade-ur{color:#fff3c9!important;background:#835321!important;border:2px solid #ffd48c!important}
.grade-filter-btn{min-height:51px!important}
.grade-filter-btn.grade-choice-r{border-color:#7bd96d!important}
.grade-filter-btn.grade-choice-sr{border-color:#68c7f9!important}
.grade-filter-btn.grade-choice-ssr{border-color:#c794fc!important}
.grade-filter-btn.grade-choice-ur{border-color:#ffd48c!important}
.grade-filter-btn.active{background:#6a5a42!important;border-color:#f8da9e!important}
.hero-feature{border:4px solid #91b2ae!important;background:#2c4653!important}
.formation-slot{background:#2b4656!important;border:3px solid #86a5a5!important}
/* Inventory, gear, shops, quests, progression. */
.inventory-grid{gap:8px!important}
.inventory-item,.shop-card,.gear-slot-grid .ui-btn,.gear-items .ui-btn,.skill-list span{
  border:3px solid #759a9a!important;background:#304958!important;border-radius:0!important;box-shadow:inset 2px 2px #abc4bd,3px 3px #152531!important;
}
.inventory-item.current{border-color:#f4c977!important;background:#695439!important}
.inventory-info{background:#2b4655!important;border:3px solid #799d9a!important}
.item-feature .big-item{font-size:48px}
.capacity,.setting-row,.rank-line{border-bottom:2px dashed #72959b!important}
.setting-row{background:#2f4553!important;padding:10px!important}
.volume-setting input{accent-color:#f0c777!important}
.ui-btn.setting-on{background:#2b6448!important;border-color:#7ed8a1!important}
.ui-btn.setting-off{background:#654147!important;border-color:#cf857b!important}
/* Gacha and campaign: pixel frames, discrete progress bars, solid icons. */
.summon-arts{background:repeating-linear-gradient(45deg,#2f485e,#2f485e 13px,#345069 13px,#345069 17px)!important;border:4px solid #9cb1a3!important;border-radius:0!important}
.summon-arts img{image-rendering:pixelated!important;filter:none!important}
.summontype{border:3px solid #86aaa4!important;box-shadow:inset 2px 2px #a6bdb4,3px 3px #142531!important}
.summontype.selected{border-color:#eec876!important}
.summon-prices .ui-btn{min-height:75px!important}
.rates{color:#f7d79a!important}
.map-art{border:4px solid #b1c9ac!important;image-rendering:pixelated!important;background-size:cover!important;filter:none!important}
.map-art .route{filter:none!important}
.map-heading{background:#294556!important;border:3px solid #83a6a2!important}
.map-node{min-width:55px!important;background:#2f5361!important;border:4px solid #7cc4ba!important;box-shadow:inset 2px 2px #a6f1da,3px 3px #16313b!important}
.map-node.locked{filter:grayscale(.7)!important}
.chapter-choice{border:3px solid #77989d!important;background:#2d4554!important;box-shadow:inset 2px 2px #9bbab9,3px 3px #122230!important}
.chapter-choice.selected{border-color:#e4c478!important}
.xpbar,.progress,.small-hp{border:2px solid #90b4a1!important;border-radius:0!important;background:#13272e!important;box-shadow:inset 1px 1px #081720!important}
.xpbar span,.progress span,.small-hp i{border-radius:0!important;background:repeating-linear-gradient(90deg,#4fac80 0 9px,#85d9a2 9px 11px)!important;box-shadow:none!important}
/* Battle HUD: sharp HP bars and controls. Canvas is rendered in low-res pixel buffer. */
.battle-view{background:#183a46!important}
.battle-head{background:linear-gradient(#263e50 0 75%,transparent)!important}
.b-toptitle,.battle-stage-label b,.battle-stage-label small{background:#2a4856!important;border:3px solid #99b8a5!important;box-shadow:inset 2px 2px #d7dfbe,3px 3px #18232e!important;text-shadow:none!important}
.battle-stage-label b em{color:#ffd782!important}
.conditions{background:#263d4edb!important;border:3px solid #afc5a3!important;box-shadow:3px 3px #172430!important;border-radius:0!important}
.conditions b{color:#f5da9e!important}
.battle-actors,.battle-effects{image-rendering:pixelated!important}
.battle-field{image-rendering:pixelated!important;filter:none!important}
.battle-view .skills-bar,.battle-view .turn-queue{background:#203b4b!important;border:4px solid #7fa3a0!important;border-radius:0!important;box-shadow:inset 3px 3px #bfd3b3,4px 4px #142430!important}
.hero-bio{background:#2d4656!important;border:3px solid #94aba7!important}
.ui-btn.skill-btn{border:3px solid #82a4a3!important;background:#344e5f!important;border-radius:0!important}
.ui-btn.skill-btn.highlight{border-color:#ffd478!important;background:#76532f!important}
.turn-icons .portrait{border:3px solid #7dbcb3!important}
.turn-icons .portrait.enemy{border-color:#e69c80!important}
.battle-log,.skill-flash{background:#263e4de8!important;border:2px solid #afbb9b!important;border-radius:0!important;text-shadow:none!important}
.target-help{border-radius:0!important}
.boss-tag{background:#9c553b!important;border-radius:0!important}
.bio-hp{border:2px solid #83dd9d!important;border-radius:0!important;background:#29674b!important}
.dungeon-card{background:#294658!important;border:4px solid #94b0a5!important;box-shadow:inset 3px 3px #d2e6c2,5px 5px #10212d!important}
.dungeon-card-icon{font-size:59px;filter:none!important}
.dungeon-card-details strong{color:#ffe2a2!important}
.hub-return .ui-btn{min-height:53px}
.tower-image{border:4px solid #91a9aa!important;background:#263b4d!important}
.menu-edge-toggle{font-family:"Courier New",monospace!important}
/* No motion blur/soft focus. Limit expensive filters for mobile. */
.ultimate-cutin{backdrop-filter:none!important}
.ultimate-hero img{filter:none!important;image-rendering:pixelated!important}
@media(prefers-reduced-motion:reduce){.hero-card.tier-ur::after{animation:none!important}}
.px-backpack{background-image:url('/assets/ui/backpack.png')!important}
.px-bag{background-image:url('/assets/ui/bag.png')!important}
.px-bolt{background-image:url('/assets/ui/bolt.png')!important}
.px-book{background-image:url('/assets/ui/book.png')!important}
.px-boss{background-image:url('/assets/ui/boss.png')!important}
.px-calendar{background-image:url('/assets/ui/calendar.png')!important}
.px-chat{background-image:url('/assets/ui/chat.png')!important}
.px-coin{background-image:url('/assets/ui/coin.png')!important}
.px-crown{background-image:url('/assets/ui/crown.png')!important}
.px-crystal{background-image:url('/assets/ui/crystal.png')!important}
.px-dagger{background-image:url('/assets/ui/dagger.png')!important}
.px-fire{background-image:url('/assets/ui/fire.png')!important}
.px-friends{background-image:url('/assets/ui/friends.png')!important}
.px-gem{background-image:url('/assets/ui/gem.png')!important}
.px-ghost{background-image:url('/assets/ui/ghost.png')!important}
.px-gift{background-image:url('/assets/ui/gift.png')!important}
.px-home{background-image:url('/assets/ui/home.png')!important}
.px-hourglass{background-image:url('/assets/ui/hourglass.png')!important}
.px-mail{background-image:url('/assets/ui/mail.png')!important}
.px-map{background-image:url('/assets/ui/map.png')!important}
.px-potion{background-image:url('/assets/ui/potion.png')!important}
.px-scroll{background-image:url('/assets/ui/scroll.png')!important}
.px-scroll_magic{background-image:url('/assets/ui/scroll_magic.png')!important}
.px-shield{background-image:url('/assets/ui/shield.png')!important}
.px-shop{background-image:url('/assets/ui/shop.png')!important}
.px-star{background-image:url('/assets/ui/star.png')!important}
.px-sword{background-image:url('/assets/ui/sword.png')!important}
.px-sword1{background-image:url('/assets/ui/sword1.png')!important}
.px-ticket{background-image:url('/assets/ui/ticket.png')!important}
.px-tower{background-image:url('/assets/ui/tower.png')!important}
.px-trophy{background-image:url('/assets/ui/trophy.png')!important}
.px-wheel{background-image:url('/assets/ui/wheel.png')!important}

/* Pixel scene variants and readability fixes discovered in mobile screenshots. */
.p-avatar{background-image:url('/assets/scenes/avatar_pixel.webp')!important;background-size:cover!important;background-position:center!important;background-color:#425864!important}
.camp-art{background-image:url('/assets/scenes/lobby_art_pixel.webp')!important;background-size:cover!important;background-position:center!important}
.moon-back{background-image:linear-gradient(to bottom,transparent 5%,#101c2e88 100%),url('/assets/scenes/night_sky_pixel.webp')!important;background-size:cover!important;background-position:center top!important}
.map-art{background-image:url('/assets/scenes/map_soft_pixel.webp')!important;background-size:cover!important;background-position:center!important}
.page-title h1 .ico.px-icon{display:inline-block!important;vertical-align:-.15em;font-size:.9em!important}
.dungeon-card-icon .ico.px-icon{font-size:64px!important;display:block!important;margin:auto}
.conditions{top:7px!important;padding:6px 10px!important;font-size:16px!important;line-height:1.12!important}
.conditions p{margin:3px 0!important;font-size:16px!important;line-height:1.16!important}

.px-punch{background-image:url('/assets/ui/punch.png')!important}

.px-burst{background-image:url('/assets/ui/burst.png')!important}
.res .ico.px-icon{font-size:27px!important;margin-top:2px}
/* Replaces the blurry legacy campaign composite with a clean label-free pixel landscape. */
.map-art{background-image:url('/assets/scenes/map_world_pixel.webp')!important;background-color:#4f98b2!important;background-size:cover!important;background-position:center!important}

/* V8: 900-stage campaign. No changes to battle layout / legacy menus. */
.page-content.story-map{overflow:hidden!important;padding:0!important;--story-color:#51bf72}
.story-map.story--elite{--story-color:#af80e3}
.story-map.story--hard{--story-color:#d96561}
.story-mode-tabs{position:absolute;top:0;left:0;right:0;height:68px;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));padding:7px;gap:8px;background:#1c303b;z-index:2;border-bottom:3px solid #516b70}
.ui-btn.story-tab{border-radius:0!important;min-width:0;min-height:45px;font-size:21px!important;padding:3px 2px!important;white-space:nowrap;box-shadow:inset -4px -4px #132631!important;background:#2a3c48!important;border:3px solid #557981!important;color:#e5ecea!important}
.ui-btn.story-tab-normal{border-color:#459c65!important}.ui-btn.story-tab-elite{border-color:#8e6dc8!important}.ui-btn.story-tab-hard{border-color:#bf5655!important}
.ui-btn.story-tab.selected{background:var(--story-color)!important;color:#111b28!important;box-shadow:inset 3px 3px #ecf5db,inset -4px -4px #26353b!important;text-shadow:none!important}
.story-map .map-side{top:68px!important;scrollbar-width:thin;scrollbar-color:var(--story-color) #1d313c;overscroll-behavior:contain}
.story-map .map-main{top:68px!important}
.story-map .map-heading{border-color:var(--story-color)!important;font-size:18px!important;line-height:1.13;gap:9px;min-height:53px;flex-shrink:0}
.story-map .map-heading span{flex-shrink:0}
.story-map .chapter-choice{border-left:6px solid var(--story-color)!important;min-height:88px;height:88px;box-shadow:inset -3px -3px #172733!important}
.story-map .chapter-choice.locked{opacity:.51;filter:grayscale(.65)}
.story-map .map-art{border-color:var(--story-color)!important}
.story-map.story--elite .map-art{background-color:#35275a!important;background-blend-mode:multiply;}
.story-map.story--hard .map-art{background-color:#5b3031!important;background-blend-mode:multiply;}
.story-map .map-node{font-size:19px!important;border-color:var(--story-color)!important;background:#294250!important;white-space:nowrap}
.story-map .map-node.current{outline:4px solid #f0c86b;outline-offset:1px}
.story-map .map-node.locked{filter:grayscale(.8);opacity:.6}
.story-map .map-detail{min-height:0;overflow-y:auto;padding-bottom:5px;scrollbar-width:thin}
.story-map .map-detail .neon-box{margin:0!important;padding:6px 9px!important}
.story-map .map-detail p{font-size:16px!important;line-height:1.2!important;margin:4px 0!important}
.story-map .map-detail .ui-btn.large{min-height:48px!important}
.result-page-v8{overflow-y:auto!important;overscroll-behavior:contain}
.result-scroll{min-height:100%;display:flex;flex-direction:column;gap:6px;padding-bottom:22px}
.result-scroll .neon-box{margin:4px 0!important;padding:10px!important}
.result-summary{display:flex;align-items:center;gap:20px;min-height:192px;background:#203d4e;border:4px solid #b09b65;padding:8px 15px;box-shadow:inset -5px -5px #142b38}
.result-summary img{width:150px;height:175px;object-fit:contain;image-rendering:pixelated}
.result-summary h2{color:#f5c56b;text-shadow:2px 2px #583d24;font-size:30px;margin:2px 0}
.result-summary .stars{font-size:32px;white-space:nowrap}
.result-summary b{font-size:17px}
.reward-chips{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;margin:7px 0}
.receipt-chip{background:#294354;border:2px solid #739996;padding:5px;font-size:15px;min-width:0;word-break:break-word;line-height:1.15}
.result-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:10px 0}
.result-actions .ui-btn{font-size:19px;min-height:66px!important;padding:6px!important;white-space:normal}
.levelup-label{color:#f4d078;font-size:23px!important;font-weight:bold;text-shadow:2px 2px #473322}
.exp-books{display:flex;flex-direction:column;gap:7px}
.exp-book-row{display:flex;align-items:center;justify-content:space-between;background:#243c4c;border:2px solid #657e83;padding:5px 10px;gap:8px}
.exp-book-row>span{font-size:20px}.exp-book-row small{display:block;color:#c7d8dd;font-size:15px}
.exp-book-row .ui-btn{min-height:46px}
.hero-xp{min-height:13px;margin:5px 0}
.energy-clock{font-size:11px!important;color:#8ce0af!important;white-space:nowrap;display:block}
/* Keep long chapter names readable even on a 360-pixel phone. */
.story-map .chapter-choice span{overflow:hidden}
.story-map .chapter-choice small{white-space:normal;overflow-wrap:anywhere}

.story-map.chapter-1 .map-art{background-image:url('/assets/scenes/chapters/chapter_01.webp')!important;background-size:cover!important}
.story-map.chapter-2 .map-art{background-image:url('/assets/scenes/chapters/chapter_02.webp')!important;background-size:cover!important}
.story-map.chapter-3 .map-art{background-image:url('/assets/scenes/chapters/chapter_03.webp')!important;background-size:cover!important}
.story-map.chapter-4 .map-art{background-image:url('/assets/scenes/chapters/chapter_04.webp')!important;background-size:cover!important}
.story-map.chapter-5 .map-art{background-image:url('/assets/scenes/chapters/chapter_05.webp')!important;background-size:cover!important}
.story-map.chapter-6 .map-art{background-image:url('/assets/scenes/chapters/chapter_06.webp')!important;background-size:cover!important}
.story-map.chapter-7 .map-art{background-image:url('/assets/scenes/chapters/chapter_07.webp')!important;background-size:cover!important}
.story-map.chapter-8 .map-art{background-image:url('/assets/scenes/chapters/chapter_08.webp')!important;background-size:cover!important}
.story-map.chapter-9 .map-art{background-image:url('/assets/scenes/chapters/chapter_09.webp')!important;background-size:cover!important}
.story-map.chapter-10 .map-art{background-image:url('/assets/scenes/chapters/chapter_10.webp')!important;background-size:cover!important}
.story-map.chapter-11 .map-art{background-image:url('/assets/scenes/chapters/chapter_11.webp')!important;background-size:cover!important}
.story-map.chapter-12 .map-art{background-image:url('/assets/scenes/chapters/chapter_12.webp')!important;background-size:cover!important}
.story-map.chapter-13 .map-art{background-image:url('/assets/scenes/chapters/chapter_13.webp')!important;background-size:cover!important}
.story-map.chapter-14 .map-art{background-image:url('/assets/scenes/chapters/chapter_14.webp')!important;background-size:cover!important}
.story-map.chapter-15 .map-art{background-image:url('/assets/scenes/chapters/chapter_15.webp')!important;background-size:cover!important}
.story-map.chapter-16 .map-art{background-image:url('/assets/scenes/chapters/chapter_16.webp')!important;background-size:cover!important}
.story-map.chapter-17 .map-art{background-image:url('/assets/scenes/chapters/chapter_17.webp')!important;background-size:cover!important}
.story-map.chapter-18 .map-art{background-image:url('/assets/scenes/chapters/chapter_18.webp')!important;background-size:cover!important}
.story-map.chapter-19 .map-art{background-image:url('/assets/scenes/chapters/chapter_19.webp')!important;background-size:cover!important}
.story-map.chapter-20 .map-art{background-image:url('/assets/scenes/chapters/chapter_20.webp')!important;background-size:cover!important}
.story-map.chapter-21 .map-art{background-image:url('/assets/scenes/chapters/chapter_21.webp')!important;background-size:cover!important}
.story-map.chapter-22 .map-art{background-image:url('/assets/scenes/chapters/chapter_22.webp')!important;background-size:cover!important}
.story-map.chapter-23 .map-art{background-image:url('/assets/scenes/chapters/chapter_23.webp')!important;background-size:cover!important}
.story-map.chapter-24 .map-art{background-image:url('/assets/scenes/chapters/chapter_24.webp')!important;background-size:cover!important}
.story-map.chapter-25 .map-art{background-image:url('/assets/scenes/chapters/chapter_25.webp')!important;background-size:cover!important}
.story-map.chapter-26 .map-art{background-image:url('/assets/scenes/chapters/chapter_26.webp')!important;background-size:cover!important}
.story-map.chapter-27 .map-art{background-image:url('/assets/scenes/chapters/chapter_27.webp')!important;background-size:cover!important}
.story-map.chapter-28 .map-art{background-image:url('/assets/scenes/chapters/chapter_28.webp')!important;background-size:cover!important}
.story-map.chapter-29 .map-art{background-image:url('/assets/scenes/chapters/chapter_29.webp')!important;background-size:cover!important}
.story-map.chapter-30 .map-art{background-image:url('/assets/scenes/chapters/chapter_30.webp')!important;background-size:cover!important}
.book-qty{width:68px;height:45px;border:3px solid #819da0;border-radius:0;background:#152935;color:#fff;font:700 21px monospace;text-align:center;flex-shrink:0;}
.exp-book-row{gap:7px}.exp-book-row>span{flex:1;min-width:0}.exp-book-row .ui-btn{padding:4px 7px!important}
.levelup-label{animation:levelBlink .55s steps(3,end) 3}
@keyframes levelBlink{0%,100%{color:#ffe6ad}50%{color:#fc9e37}}

.player-card .p-avatar{background:url('/assets/scenes/avatar_v8.webp') center/cover no-repeat!important}.player-card .p-avatar .small-av{display:none!important}
/* ==================================================================
   V9 | AZURE FORGE premium pixel UI system
   Presentation-only extension, retains all V8 data and battle logic.
   Palette based on player's hero-detail reference.
   ================================================================== */
:root{
 --ui-bg:#101C2B;--ui-surface:#1B3345;--ui-surface-hi:#23495d;
 --ui-border:#36BFFF;--ui-muted:#527B98;--ui-text:#fff;
 --ui-subtext:#B8CEDD;--ui-gold:#FFD166;--ui-green:#34CC78;
 --ui-danger:#F05252;--ui-purple:#B65CFF;--ui-shadow:#06131f;
 --px-ink:#101C2B;--px-dark:#102334;--px-panel:#1B3345;
 --px-panel2:#294e64;--px-hi:#36BFFF;--px-edge:#527B98;
 --px-gold:#FFD166;--px-cream:#fff;--px-red:#F05252;
 --px-blue:#36BFFF;--px-green:#34CC78;--px-purple:#B65CFF;
 --purple:#36BFFF;--shine:#72dafb;--gold:#FFD166;
 --panel:#1B3345;
 font-family:'Trebuchet MS',Verdana,'DejaVu Sans',sans-serif;
}
body,#app,#game{background:#101C2B!important;color:#fff!important}
#game{border:0!important;box-shadow:none!important}
#game:before{display:none!important}
h1,h2,h3,.px-button,.hero-card strong,.p-details,.res label,.detail-skill-row strong,.detail-name strong{
 font-family:'Trebuchet MS',Verdana,'DejaVu Sans',sans-serif!important;
 text-shadow:1px 2px 0 #09131f!important;
 letter-spacing:0!important;
}
h1{font-size:32px!important}h2{font-size:28px!important}
h3{font-size:24px!important;color:#fff!important}
.subtext,small{color:#B8CEDD}
.px-button,.ui-btn{background:linear-gradient(180deg,#32566b 0 18%,#224056 18% 83%,#162f43 83%)!important;
 color:#fff!important;border:3px solid #527B98!important;border-radius:0!important;
 box-shadow:inset 3px 3px #6a99af,inset -3px -3px #112334,4px 4px 0 #071724!important;
 text-shadow:1px 1px #071724!important;min-height:46px;}
.px-button:hover,.ui-btn:hover{filter:brightness(1.09)}
.px-button:active,.ui-btn:active{transform:translate(2px,2px)!important;box-shadow:inset 2px 2px #091621!important}
.px-button:focus-visible,.ui-btn:focus-visible{outline:4px solid #FFD166!important;outline-offset:2px}
.px-button:disabled,.ui-btn:disabled{opacity:.5!important;filter:grayscale(.55)!important}
.ui-btn.gold,.ui-btn.gold.large{background:linear-gradient(#ffe29c 0 17%,#ecb959 17% 82%,#b57130 82%)!important;
 border-color:#ffe59e!important;color:#281b17!important;
 box-shadow:inset 3px 3px #fff5c9,inset -3px -3px #855128,4px 4px #061724!important;
 text-shadow:1px 1px #fff5bc!important}
.ui-btn.purple{background:linear-gradient(#8b72d1,#463c86)!important;border-color:#c6a2ff!important}
.ui-btn.action-green,.ui-btn.setting-on{background:linear-gradient(#42d77c,#167047)!important;border-color:#94f7b2!important;color:#072e21!important}
.ui-btn.action-blue{background:linear-gradient(#45ccfa,#146ca1)!important;border-color:#9ee8ff!important}
.ui-btn.danger{background:linear-gradient(#fb7672,#ac303d)!important;border-color:#ffc1aa!important}
.ui-btn.active,.ui-btn.selected,.ui-btn.tab.active,.ui-btn.summontype.selected,
 .ui-btn.farm-tab.selected,.map-node.current,.chapter-choice.selected,.floor.active{
 background:linear-gradient(#1b839c,#0a475e)!important;border-color:#78e5ff!important;
 box-shadow:inset 3px 3px #b7faff,3px 3px #061824!important;color:#fff!important}
.px-panel,.neon-box,.dialog,.inventory-info,.stat-panel,.detail-stats,.detail-character,
 .dungeon-card,.shop-card,.chapter-choice,.hero-card,.formation-slot,.rank-line,.mission-row,
 .result-summary,.prize,.summon-arts,.map-heading,.tower-image,
 .page-title,.bottom-nav,.player-card,.res,.event-banner,
 .ui-btn.feat-btn,.ui-btn.side-btn,.inventory-item{
 border-radius:0!important;border-color:#527B98!important;
 box-shadow:inset 3px 3px 0 #7bbad1,inset -3px -3px 0 #12293a,4px 4px 0 #081725!important;
}
.px-panel,.neon-box{background:linear-gradient(180deg,#22465c 0 8px,#1B3345 8px 100%)!important;
 border:4px solid #527B98!important;padding:14px!important;margin:5px 0 15px!important}
.px-panel h3,.neon-box h3{color:#fff!important;text-shadow:1px 2px #071722!important;
 border-bottom:3px solid #527B98!important;padding-bottom:10px!important;margin-bottom:12px!important}
.page-content{background-color:#101C2B!important;
 background-image:repeating-linear-gradient(0deg,transparent 0 27px,#15293b 27px 28px),
 repeating-linear-gradient(90deg,transparent 0 27px,#15293b 27px 28px)!important;
 scrollbar-color:#36BFFF #142b3b;}
.page-content::-webkit-scrollbar-thumb{background:#36BFFF!important;border:2px solid #142a3e}
.hud{background:linear-gradient(#0d2030 82%,transparent)!important}
.player-card,.res{background:#1B3345!important;border:3px solid #527B98!important}
.res strong{color:#fff!important}.res label{color:#B8CEDD!important}.p-avatar{border:3px solid #FFD166!important}
.p-details strong{color:#fff}.p-details em{color:#FFD166!important}
.header-links .ui-btn.quicklink{background:linear-gradient(#23495e,#19354b)!important;border-color:#527B98!important}
.header-links .ui-btn.quicklink .ico{filter:none!important}
.page-title{background:linear-gradient(#286b84 0 8px,#1B4259 8px 90%,#10263a 90%)!important;
 border:4px solid #36BFFF!important;box-shadow:inset 4px 4px 0 #94e2ff,4px 4px #071724!important}
.page-title h1{font-size:31px!important;color:#fff!important}
.bottom-nav{background:#0d2435!important;border:4px solid #527B98!important;box-shadow:inset 4px 4px #3a7892!important}
.ui-btn.nav-btn{background:#1B3345!important;border:3px solid #527B98!important}
.ui-btn.nav-btn.selected{background:#13485e!important;border:3px solid #36BFFF!important;
 box-shadow:inset 3px 3px #8ce1fa,4px 4px #071824!important}
.xpbar,.px-progress,.progress,.small-hp{border:2px solid #527B98!important;border-radius:0!important;background:#0d2030!important;height:17px;overflow:hidden}
.xpbar>span,.px-progress>span,.progress>span,.small-hp>i{background:repeating-linear-gradient(90deg,#2dc77a 0 12px,#54efaa 12px 15px)!important;box-shadow:none!important;border-radius:0!important}
.tabs,.px-tabs{gap:8px!important}.tabs .ui-btn{min-width:105px;max-width:none;min-height:52px;font-size:19px!important}
.prize{background:#1b394b!important;border:3px solid #527B98!important}
.toast{background:#1b394b!important;border:3px solid #FFD166!important;color:white}
.dialog{background:#142c40!important;border:4px solid #36BFFF!important}
.modal-screen{backdrop-filter:none!important;background:#041623ce!important}
.settings-grid .ui-btn{min-height:92px}
/* LOBBY: the same Azure Forge frame language without hiding original art */
.lobby-area{background:#101C2B!important}
.moon-back{opacity:.97!important;filter:none!important}
.camp-art{border-radius:0!important;box-shadow:none!important;filter:none!important}
.event-banner{border:4px solid #36BFFF!important;background:linear-gradient(#226283,#132d50)!important;
 box-shadow:inset 3px 3px #b4efff,5px 5px #061a2b!important;color:#fff!important}
.event-banner span{color:#FFD166!important}
.ui-btn.side-btn,.ui-btn.feat-btn{background:#18384f!important;border:3px solid #527B98!important}
.menu-edge-toggle{border-color:#36BFFF!important;background:#1e475f!important;color:#FFD166!important}
.timer-pill{background:#103249!important;border:2px solid #34CC78!important;color:#a3f8c7!important}
/* COLLECTION: less density, larger art, real data chips */
.collection-intro{display:flex;justify-content:space-between;align-items:center;gap:15px;
 border:3px solid #527B98;background:#1B3345;padding:13px 15px;margin:3px 0 10px}
.collection-intro>div{display:flex;flex-direction:column;gap:5px}.collection-intro b{font-size:22px;color:#FFD166}
.collection-intro small{font-size:17px}.collection-intro>span{font-size:17px;white-space:nowrap;color:#9fe5f9}
.grade-filter{gap:8px!important}.grade-filter-btn{border-width:3px!important;font-size:22px!important}
.grade-filter-btn.grade-choice-r{border-color:#34CC78!important}.grade-filter-btn.grade-choice-sr{border-color:#36BFFF!important}
.grade-filter-btn.grade-choice-ssr{border-color:#B65CFF!important}.grade-filter-btn.grade-choice-ur{border-color:#FFD166!important}
.grade-filter-btn.active{background:#1b5975!important;border-color:#FFD166!important}
.hero-list{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:13px!important}
.hero-card.px-character-card{min-height:288px!important;padding:5px!important;gap:0!important;justify-content:start!important;
 background:#1B3345!important;border:4px solid #527B98!important;overflow:hidden!important;color:white;}
.hero-card-art{display:flex;align-items:end;justify-content:center;height:175px;width:100%;
 background:linear-gradient(145deg,#32647a,#182c42 68%);position:relative;overflow:hidden}
.hero-card-art img{max-width:99%;width:auto!important;height:170px!important;object-fit:contain!important;image-rendering:pixelated!important;filter:none!important}
.hero-card-caption{display:flex;flex-direction:column;gap:3px;align-items:center;width:100%;padding:6px 2px 4px;background:#11283b;flex:1;}
.hero-card-caption strong{min-height:37px!important;line-height:1.16!important;font-size:18px!important;
 text-align:center;overflow-wrap:anywhere;display:flex;align-items:center;justify-content:center}
.hero-card-grade{display:flex;justify-content:space-between;gap:5px;align-items:center;width:100%}
.hero-card-grade .rarity{font-size:16px!important;padding:2px 5px!important}
.hero-card-grade small{font-size:17px!important;color:#fff!important}
.hero-card-caption>small{font-size:15px!important;line-height:1.2!important}
.hero-stars{font-size:19px!important;color:#FFD166;letter-spacing:1px}
.hero-card.unowned{opacity:.82!important;filter:none!important}
.hero-card.unowned .hero-card-art img{filter:grayscale(.68) brightness(.6)!important}
.hero-card.unowned .hero-card-caption{background:#0b2333}
.hero-card.unowned .unowned-lbl{color:#d3e2f2;font-size:13px!important}
.hero-card.tier-r,.portrait.tier-r,.small-hero-card.tier-r{border-color:#34CC78!important}
.hero-card.tier-sr,.portrait.tier-sr,.small-hero-card.tier-sr{border-color:#36BFFF!important}
.hero-card.tier-ssr,.portrait.tier-ssr,.small-hero-card.tier-ssr{border-color:#B65CFF!important}
.hero-card.tier-ur,.portrait.tier-ur,.small-hero-card.tier-ur{border-color:#FFD166!important;box-shadow:inset 3px 3px #ffe9a6,4px 4px #091824!important}
.hero-card.tier-ur .hero-card-art{background:linear-gradient(#84612d,#29394b 78%)}
.rarity.grade-r{border-color:#34CC78!important;background:#153e2f!important;color:#baf9d3!important}
.rarity.grade-sr{border-color:#36BFFF!important;background:#11354a!important;color:#c8f2ff!important}
.rarity.grade-ssr{border-color:#B65CFF!important;background:#41285b!important;color:#fff!important}
.rarity.grade-ur{border-color:#FFD166!important;background:#6b421c!important;color:#fff5bb!important}
/* CHARACTER DETAIL: no microtext or overlapping sections */
.hero-detail-page .detail-hero-layout{display:grid;grid-template-columns:61px minmax(0,1.08fr) minmax(0,.95fr);gap:10px;min-height:430px}
.detail-rail{display:flex;flex-direction:column;gap:6px;overflow:auto;max-height:432px;scrollbar-width:thin;scrollbar-color:#36BFFF #122637}
.detail-rail .portrait{width:55px!important;min-width:55px!important;height:59px!important;min-height:59px!important;padding:0!important;border:3px solid #527B98!important}
.detail-rail .portrait img{width:48px!important;height:54px!important;object-fit:contain!important;image-rendering:pixelated!important}
.detail-rail .portrait.now{border-color:#FFD166!important}
.detail-character{background:linear-gradient(165deg,#366b94 0%,#1e425f 48%,#132738 100%)!important;
 border:4px solid #FFD166!important;position:relative;display:flex;flex-direction:column;justify-content:flex-end;align-items:center;
 min-width:0;min-height:430px;overflow:hidden}
.detail-character:before{content:'';position:absolute;inset:38px 5px 94px;
 background:linear-gradient(180deg,#ffffff16 0 1px,transparent 1px 100%),
 repeating-linear-gradient(90deg,transparent 0 20px,#90c8e510 20px 22px);
 pointer-events:none}
.detail-character.tier-r{border-color:#34CC78!important}.detail-character.tier-sr{border-color:#36BFFF!important}
.detail-character.tier-ssr{border-color:#B65CFF!important}.detail-character.tier-ur{border-color:#FFD166!important}
.detail-quality{position:absolute;top:8px;left:8px;right:8px;display:flex;align-items:center;justify-content:space-between;z-index:2}
.detail-quality>span{color:#FFD166;font-size:24px;font-weight:900}
.detail-fullhero{width:96%;height:329px;object-fit:contain;object-position:center bottom;
 image-rendering:pixelated!important;filter:none!important;z-index:1}
.detail-name{width:100%;min-height:83px;background:#0e2538e9;border-top:3px solid #FFD166;
 display:flex;flex-direction:column;align-items:center;justify-content:center;gap:7px;padding:8px;text-align:center;z-index:2}
.detail-name strong{font-size:23px!important;line-height:1.05}.detail-name small{font-size:17px!important;display:flex;gap:5px;align-items:center;color:#f1d5a9}
.detail-name .element-chip{white-space:nowrap;font-size:15px}
.detail-stats{background:#1B3345!important;border:4px solid #527B98!important;min-width:0;min-height:430px;
 display:flex;flex-direction:column;padding:12px;gap:5px}
.stat-power{display:flex;flex-direction:column;align-items:center;gap:3px;border-bottom:3px solid #527B98;padding-bottom:10px}
.stat-power small{font-weight:900;font-size:20px;color:#B8CEDD!important}.stat-power strong{font-size:38px;color:#FFD166;text-shadow:1px 2px #3c2c17}
.stat-level{display:flex;flex-direction:column;gap:4px;margin:6px 0 8px}.stat-level b{font-size:21px;color:#fff}.stat-level small{font-size:16px!important}
.detail-progress{width:100%;height:17px!important}.stat-line{display:flex;justify-content:space-between;gap:8px;align-items:center;
 border-bottom:2px solid #34566b;padding:6px 0;font-size:17px;min-height:37px}
.stat-line span{white-space:nowrap;color:#d4e8f5}.stat-line b{font-size:19px;color:#fff;text-align:right}
.stat-footnote{font-size:14px!important;line-height:1.25;margin-top:4px}
.hero-detail-page .px-panel{margin-top:13px!important}
.detail-skill-list{display:flex;flex-direction:column;gap:8px}
.detail-skill-row{display:grid;grid-template-columns:77px minmax(0,1fr) 116px;gap:12px;align-items:center;
 min-height:94px;background:#142c3d;border:3px solid #527B98;padding:7px 11px}
.skill-glyph{width:67px;height:67px;background:#30546a;border:3px solid #36BFFF;display:flex;justify-content:center;align-items:center}
.skill-glyph .ico{font-size:42px!important}.skill-glyph.area{border-color:#ff9368;background:#593624}
.skill-glyph.heal{border-color:#65eb9f;background:#1d5e4d}.skill-glyph.guard{border-color:#9ce6ff;background:#23526f}
.skill-glyph.ultimate{border-color:#FFD166;background:#76512f}
.skill-copy{min-width:0}.skill-head{display:flex;justify-content:space-between;gap:8px;align-items:center}
.skill-head strong{font-size:21px!important;color:#FFD166;line-height:1.18;min-width:0;overflow-wrap:anywhere}
.skill-head small{font-size:17px!important;color:#a3e6fc!important;flex:none}
.skill-copy p{font-size:17px!important;line-height:1.25!important;margin:5px 0 0!important;color:#edf6ff!important}
.skill-kind{padding:5px;border:2px solid #527B98;background:#244859;font-size:16px;text-align:center;font-weight:900}
.skill-kind.ultimate{background:#74512a;border-color:#FFD166;color:#fff2d5}
.detail-equipment{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:10px}
.detail-gear-slot{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;
 min-width:0;min-height:120px;padding:7px 4px;background:#182b49;border:3px solid #FFD166;color:#fff;
 box-shadow:inset 2px 2px #ffe0a2,3px 3px #081827}
.detail-gear-slot>span,.detail-gear-slot>.ico{font-size:45px!important}.detail-gear-slot .ico{font-size:45px!important}
.detail-gear-slot b{font-size:16px;line-height:1.1;text-align:center}.detail-gear-slot small{font-size:15px;color:#ffe3a5!important}
.detail-gear-slot.locked{opacity:.56;border-color:#527B98;box-shadow:none;background:#132a3a}
.detail-inline-actions{display:flex;align-items:center;justify-content:flex-end;gap:10px;margin-top:12px}
.detail-inline-actions .ui-btn{min-width:170px;font-size:19px}
.detail-actions{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:18px 2px 20px}
.detail-actions .ui-btn{min-height:70px;font-size:19px!important;padding:8px 4px!important}
.detail-books-panel .exp-book-row{background:#152d40;border:2px solid #527B98}
/* BACKPACK: large pixel slots and an actual item description */
.inventory-container{gap:14px!important;align-items:flex-start!important}
.inventory-grid{width:360px!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:9px!important}
.ui-btn.px-item-card{min-width:0;width:100%!important;min-height:102px;height:auto!important;padding:7px 3px!important;gap:1px!important;
 background:#19334c!important;border:3px solid #527B98!important;position:relative}
.px-item-card .ico{font-size:42px!important;margin-bottom:3px}
.px-item-card .item-stack{position:absolute;top:2px;right:3px;background:#091b2c;padding:1px 3px;color:#FFD166!important;font-size:15px!important}
.px-item-card .item-label{font-size:13px!important;line-height:1.08!important;white-space:normal;color:#fff!important;max-width:100%;min-height:26px}
.ui-btn.px-item-card.current{background:#355471!important;border-color:#FFD166!important}
.inventory-info{flex:1;min-width:0;border:3px solid #527B98!important;background:#1B3345!important}
.inventory-info .px-panel{margin:0!important;border:0!important;box-shadow:none!important}
.inventory-info .item-feature{display:flex;gap:10px;align-items:center}.inventory-info .big-item .ico{font-size:68px!important}
.inventory-info .item-feature strong{display:block;font-size:21px}.inventory-info .item-feature small{font-size:16px;display:block;margin-top:7px}
.item-description{margin:18px 0!important;font-size:18px!important;line-height:1.36!important}
.capacity{color:#B8CEDD!important}
/* HERO GEAR and summons */
.gear-stage{background:#1B3345!important;border:4px solid #527B98!important;border-radius:0!important}
.gear-slot-grid .ui-btn,.gear-items .ui-btn{background:#21475e!important;border-color:#527B98!important}
.summon-arts{background:repeating-linear-gradient(135deg,#1c435b 0 18px,#1a364d 18px 28px)!important;border:4px solid #527B98!important}
.summon-arts img{image-rendering:pixelated!important;filter:none!important}
.summontype.selected{border-color:#FFD166!important;background:#235972!important}
.summon-prices .ui-btn{min-height:88px!important}
.rates{color:#FFD166!important}
/* Campaign + multi-mode dungeon */
.story-tab.active,.chapter-choice.selected,.map-node.current{border-color:#FFD166!important}
.map-heading,.map-detail,.chapter-choice,.dungeon-card{background:#1B3345!important;border-color:#527B98!important}
.map-node{background:#1a4f66!important;border-color:#36BFFF!important}
.map-node.locked{filter:grayscale(.65)!important}
.map-art{border:4px solid #527B98!important;image-rendering:pixelated!important}
.story-map.mode-elite .map-heading{border-color:#B65CFF!important}
.story-map.mode-hard .map-heading{border-color:#F05252!important}
.dungeon-card-details strong{color:#FFD166!important}
/* BATTLE: preserve coordinate and visual system, unify chrome only */
.battle-view{background:#101C2B!important}
.battle-head{background:linear-gradient(#102b3f 85%,transparent)!important}
.b-toptitle,.battle-stage-label b,.battle-stage-label small,.conditions,
.battle-view .skills-bar,.battle-view .turn-queue,.hero-bio,.skill-btn{
 background:#1B3345!important;border-color:#527B98!important;border-radius:0!important;
 box-shadow:inset 2px 2px #7fbed7,3px 3px #071724!important}
.battle-view .skills-bar,.battle-view .turn-queue{border:4px solid #36BFFF!important}
.ui-btn.skill-btn.highlight{border-color:#FFD166!important;background:#245e79!important}
.bio-hp{background:#166747!important;border-color:#34CC78!important}
.battle-log,.skill-flash{background:#153b52e9!important;border:2px solid #36BFFF!important}
/* Result and secondary pages */
.result-summary{background:#1B3345;border:3px solid #36BFFF}
.result-actions .ui-btn{min-height:70px!important}
.mission-row,.rank-line,.setting-row,.checkin-card,.shop-card,.gear-stage,.boss-showcase,.farm-main .neon-box{
 background-color:#1B3345!important;border-color:#527B98!important}
.progress{background:#102636!important}.progress>span{background:#34CC78!important}
.volume-setting input{accent-color:#36BFFF!important}
/* Ensure the game keeps touch safety for cutout devices through wrapper scaling. */
.ui-btn{touch-action:manipulation!important}
button,input,textarea{max-width:100%}
.hero-detail-page p,.bag-page-v9 p{overflow-wrap:break-word}
@media(prefers-reduced-motion:reduce){.hero-card.tier-ur::after{animation:none!important}}

/* V9 final polish */
.detail-inline-actions{flex-wrap:wrap;justify-content:stretch}
.detail-inline-actions .ui-btn{min-width:0;flex:1 1 125px;font-size:17px!important;padding:7px 5px!important}
.detail-skill-row .skill-kind{cursor:pointer;color:#fff;min-width:0}
.skill-kind small{display:block;margin-top:6px;color:#9fe6ff!important;font-size:14px!important}
.skill-kind:hover{border-color:#FFD166;background:#27607a}
.collection-intro.px-card{margin:3px 0 10px}
.px-modal.skill-info-modal h2{color:#FFD166!important}
.px-modal.skill-info-modal p{line-height:1.45;font-size:22px}
/* Do not make stock icons look inactive at zero count; the numeric overlay communicates availability. */
.px-item-card .ico{filter:none!important}
/* V10: 200 skills, Japanese speech labels and live 6v6 UI. */
.battle-view .skill-btn{display:flex!important;flex-direction:column;align-items:center;justify-content:center;gap:1px;overflow:hidden;min-width:0;padding:11px 3px 3px!important;}
.battle-view .skill-btn .skill-sign{font-size:32px;line-height:1;filter:drop-shadow(0 1px #14212f);}
.battle-view .skill-btn small{display:-webkit-box!important;-webkit-box-orient:vertical;-webkit-line-clamp:2;white-space:normal!important;overflow:hidden;text-overflow:ellipsis;overflow-wrap:anywhere;max-width:100%;font-size:12px!important;line-height:1.1!important;min-height:28px;text-align:center;color:#fff!important;}
.battle-view .skill-btn .skill-cost{font-size:14px!important;top:1px;left:2px;background:#172f46;border:1px solid #72c2e7;color:#ffe7a2;}
.battle-view .skill-btn[disabled]{opacity:.56;filter:saturate(.48)}
.battle-view .skill-btn.skill-ultimate,.battle-view .skill-btn.skill-ultimate_aoe,.battle-view .skill-btn.skill-ultimate_heal{border-color:#f2c772!important;}
.battle-view .skill-btn.skill-heal,.battle-view .skill-btn.skill-shield{border-color:#62ca96!important;}
.battle-view .bio-energy{font-size:18px;color:#ffde90}
.battle-japanese{position:absolute;z-index:15;left:15%;right:15%;bottom:61px;text-align:center;font-size:20px;font-weight:800;letter-spacing:1px;white-space:normal;max-height:54px;overflow:hidden;color:#fff3bf;text-shadow:2px 2px #132d47,-1px -1px #102333;background:#0d2a43ca;border:2px solid #36bfff;padding:4px 8px;pointer-events:none;}
.battle-view .skill-flash{white-space:normal!important;text-align:center;max-width:84%;font-size:24px!important;line-height:1.25;overflow-wrap:anywhere;}
.battle-view .ultimate-copy{max-width:58%;min-width:0;}
.battle-view .ultimate-copy strong{font-size:27px;overflow-wrap:anywhere;}
.battle-view .ultimate-copy .jp-cutin{font-size:17px;display:block;color:#ffe5a4;margin-top:5px;line-height:1.2;}
.battle-view .cutin-portrait{object-fit:contain;image-rendering:pixelated;max-height:245px;width:100%;height:100%;filter:drop-shadow(4px 4px #061a35);}
.battle-view .ultimate-cutin .ultimate-hero{width:39%;min-width:39%;}
.combat-status{position:absolute;top:-18px;font-size:16px;color:#fff;z-index:8;padding:0 2px;background:#183345;border:1px solid #9bb8c5;}
.combat-status.buff{left:22px;border-color:#e9c778}.combat-status.stun{left:54px;border-color:#d8a0ff}.combat-status.burn{left:87px;border-color:#ef9b67}
.detail-skill-list .skill-voice{color:#ffd98a!important;font-size:15px!important;line-height:1.35;}
.detail-skill-list .skill-meta{color:#9ad4e8!important;font-size:14px!important;line-height:1.25;margin:2px 0!important;}
.detail-skill-row .skill-row-actions{display:flex;flex-direction:column;gap:5px;align-items:stretch;justify-content:center;min-width:96px;}
.detail-skill-row .skill-row-actions .ui-btn{font-size:16px!important;min-height:35px!important;padding:4px!important;white-space:nowrap;}
.detail-skill-row .skill-copy{min-width:0;overflow-wrap:anywhere;}
.detail-skill-row .skill-copy p{overflow-wrap:anywhere;}
.detail-skill-row .skill-glyph{font-size:29px;color:#fff1bd;}
.detail-skill-row .skill-glyph.shield,.detail-skill-row .skill-glyph.heal{color:#97ebad;}
.detail-skill-row .skill-glyph.ultimate,.detail-skill-row .skill-glyph.ultimate_aoe,.detail-skill-row .skill-glyph.ultimate_heal{color:#ffe08a;}
.skill-explained{white-space:pre-line;line-height:1.55;overflow-wrap:anywhere;}
.battle-view .fighter .hp-label{z-index:6;}
/* Sliding cut-in stays inside the 9:16 battle viewport while entering. */
.battle-view{overflow:hidden!important;}
/* V10 Ultimate cut-in stays visible through cast/energy charge; disappears before impact. */
@keyframes cutinV10{0%{opacity:0;transform:translateX(710px) skew(-6deg)}13%,74%{opacity:1;transform:translateX(0) skew(-6deg)}100%{opacity:0;transform:translateX(-710px) skew(-6deg)}}
.battle-view .ultimate-cutin{animation:cutinV10 2.7s ease-out both!important;}

/* V11: Tower of Eternity. Matches Azure Forge's crisp pixel UI. */
.tower-v11{display:flex;flex-direction:column;gap:12px;padding:0 2px 22px}
.tower-v11 .neon-box{margin:2px 0 7px;padding:12px;border:3px solid #527B98;box-shadow:inset 3px 3px #30536a,4px 4px #091a29;background:#1B3345}
.tower-v11 .neon-box h3{font-size:25px;color:#ffd166;border-bottom:2px dashed #527B98;padding-bottom:6px}
.tower-hero-banner{display:flex;position:relative;align-items:center;gap:18px;min-height:190px;padding:16px;border:4px solid #36BFFF;background:repeating-linear-gradient(90deg,#11283c 0 9px,#17344b 9px 18px);box-shadow:inset 4px 4px #527b98,5px 5px #081522}
.tower-pixel-tower{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;flex:0 0 145px;height:160px;filter:drop-shadow(6px 6px #050f1c)}
.tower-spire{height:24px;width:15px;background:#ffd166;box-shadow:inset 4px 0 #d69a4a}
.tower-roof{height:20px;width:120px;background:#b65cff;clip-path:polygon(0 100%,25% 8%,75% 8%,100% 100%);box-shadow:inset 0 -6px #4e2c83}
.tower-building{width:100px;height:110px;background:repeating-linear-gradient(0deg,#395e7b 0 22px,#17354d 22px 28px);border:5px solid #ffd166;border-top:0;display:flex;align-items:center;justify-content:center;font-size:53px}
.tower-banner-copy{display:flex;flex-direction:column;gap:8px;min-width:0;flex:1}
.tower-banner-copy>b{color:#ffd166;font-size:23px}
.tower-banner-copy strong{font-size:26px;color:#fff}
.tower-banner-copy small{font-size:17px;line-height:1.35;color:#B8CEDD}
.tower-countdown{color:#fbd18a;font-family:monospace}
.tower-page-nav{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:6px 0 12px}
.tower-page-nav .ui-btn{flex:1;min-width:0;font-size:18px;padding:7px 5px}
.tower-page-nav b{font-size:20px;color:#ffd166;white-space:nowrap}
.tower-floors-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px;margin:7px 0 12px}
.tower-v11 .tower-floor-tile{height:92px;min-height:92px;min-width:0;border:3px solid #36bfff!important;background:#173448!important;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;padding:5px 2px!important;box-shadow:inset 2px 2px #527b98,3px 3px #081927!important}
.tower-floor-tile span{font-size:19px;line-height:1}.tower-floor-tile strong{font-size:24px;color:#fff}.tower-floor-tile small{font-size:13px!important;line-height:1.1}
.tower-floor-tile.tower-boss{border-color:#ffd166!important}.tower-floor-tile.tower-elite{border-color:#b65cff!important}.tower-floor-tile.tower-legendary{border-color:#f05252!important;background:#493145!important}
.tower-floor-tile.cleared{background:#1c494a!important}
.tower-floor-tile.active{background:#235873!important;outline:3px solid #ffd166!important;outline-offset:-3px;filter:none!important}
.tower-floor-tile.locked{opacity:.43;filter:grayscale(1)}
.tower-actions-row{display:flex;gap:10px;justify-content:center;flex-wrap:wrap;margin:9px 0}
.tower-actions-row>.ui-btn{flex:1 1 155px;min-width:0;font-size:18px;min-height:57px;text-align:center}
.tower-type-label{color:#b8cedd}.tower-type-label.tower-boss{color:#ffd166}.tower-type-label.tower-elite{color:#d79cff}.tower-type-label.tower-legendary{color:#ff847a}
.tower-foes{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:7px;margin:12px 0;padding:10px 5px;background:#102436;border:2px solid #527b98}
.tower-foes>div{position:relative;display:flex;flex-direction:column;gap:3px;align-items:center;min-width:0;justify-content:flex-end;padding:4px;background:#1d3b50;border:2px solid #5287a2;min-height:114px}
.tower-foes .tower-boss-enemy{border-color:#ffd166;box-shadow:inset 0 0 0 2px #7b5127}
.tower-foes img{display:block;max-width:100%;width:auto;height:76px;object-fit:contain;image-rendering:pixelated}
.tower-foes small{max-width:100%;font-size:12px;color:#d8ecf6;text-align:center;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tower-team>div{border-color:#34cc78}
.tower-reward-list{display:flex;flex-wrap:wrap;gap:6px;margin:12px 0}
.tower-reward-item{font-size:17px;padding:6px 9px;border:2px solid #7a9da9;background:#102b3d;color:#ffd166}
.tower-milestones{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}
.tower-milestone{min-width:0;padding:8px 5px;display:flex;gap:6px;align-items:center;flex-direction:column;background:#142d40;border:2px solid #527b98}
.tower-milestone strong{font-size:21px;color:#ffd166}.tower-milestone small{font-size:16px}
.tower-milestone .ui-btn{min-height:43px;width:100%;font-size:15px;padding:3px}
.tower-achievements{display:flex;flex-direction:column;gap:8px}
.tower-achievement{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:9px;border:2px solid #527b98;background:#142e42}
.tower-achievement span{flex:1;min-width:0;display:flex;flex-direction:column;gap:4px}
.tower-achievement b{font-size:20px;color:#ffd166}.tower-achievement small{font-size:15px}
.tower-achievement .ui-btn{min-width:90px;min-height:44px;font-size:17px}
.tower-v11 .neon-box .ui-btn.gold{border-color:#ffd166!important}
.tower-v11-page .hub-return{margin-bottom:9px}

.tower-window-grid{display:grid;grid-template-columns:repeat(2,1fr);grid-template-rows:repeat(3,1fr);gap:7px;width:64px;height:81px}
.tower-window-grid i{display:block;background:#0c2030;border:3px solid #d8aa63;box-shadow:inset 2px 2px #405d65}

/* V13 – mobile start button cannot hide behind the navigation bar. */
.page-content.prepare-page{
 display:flex!important;flex-direction:column!important;overflow:hidden!important;
 padding:8px 11px 11px!important;gap:5px!important;
}
.prepare-page .prepare-scroll{
 flex:1 1 auto;min-height:0;overflow-y:auto;overflow-x:hidden;
 touch-action:pan-y!important;overscroll-behavior-y:contain;
 scrollbar-width:thin;scrollbar-color:#36bfff #102333;
 padding:1px 2px 12px;
}
.prepare-page .prepare-scroll .neon-box{margin:2px 0 8px!important;}
.prepare-page .prepare-actions{
 flex:0 0 auto;display:grid;grid-template-columns:1fr 1.5fr;
 gap:10px;padding:8px 2px 2px;
 background:#101c2b;border-top:3px solid #36bfff;
 z-index:9;position:relative;
}
.prepare-page .prepare-actions .ui-btn{
 min-height:65px;line-height:1.2;padding:8px 5px!important;
 font-size:19px!important;white-space:normal;text-align:center;
}
.prepare-page .formation-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;}
.prepare-page .formation-slot{height:120px!important;min-height:120px!important;max-height:120px!important;}
.prepare-page .formation-slot img{height:95px!important;max-height:95px!important;}
/* V13 – original user-supplied high resolution illustration, no stretched sprites. */
.lobby-area{
 background:#07182c url('/assets/scenes/lobby_user_new.webp') center center / cover no-repeat!important;
}
.lobby-area .moon-back{display:none!important;}
.lobby-area .camp-art{
 left:0!important;right:0!important;top:0!important;bottom:0!important;
 width:100%!important;height:100%!important;min-height:0!important;
 border:0!important;box-shadow:none!important;border-radius:0!important;
 background:none!important;background-image:none!important;
 mask-image:none!important;-webkit-mask-image:none!important;
 pointer-events:none!important;overflow:hidden!important;
}
#lobbyMotion{position:absolute;inset:0;width:100%;height:100%;z-index:2;pointer-events:none;}
#campFlames{position:absolute;z-index:4;pointer-events:none;mix-blend-mode:screen;image-rendering:pixelated;}
.camp-art .firelight{position:absolute;z-index:3;pointer-events:none;}
@media(prefers-reduced-motion:reduce){#lobbyMotion{display:none!important;}}

/* ============================================================
   V15 MOBILE READABILITY / LAYOUT SYSTEM (VISUAL ONLY)
   Virtual design grid is 720 CSS px and is scaled to device width.
   26 virtual px ≈ 13 physical px at 360-wide phones.
   No changes to combat mechanics, storage or action routing.
   ============================================================ */
:root{
 --font-xs:23px;--font-sm:25px;--font-md:28px;
 --font-lg:31px;--font-xl:39px;
 --btn-h:82px;--touch-size:88px;--panel-gap:17px;
 --ui-bg:#101c2b;--ui-panel:#1b3345;--ui-stroke:#36bfff;
 --ui-text:#f7fbff;--ui-muted:#c0d9e7;--ui-gold:#ffd166;
}
#game{color:var(--ui-text);font-family:system-ui,"Trebuchet MS",Arial,sans-serif;}
#game .page-content{overflow-x:hidden!important;overscroll-behavior-y:contain;padding:14px 15px 23px!important;scrollbar-width:thin;}
#game .page-content:not(.prepare-page){touch-action:pan-y;}
#game .page-title{height:82px;}
#game .page-title h1{font-size:36px!important;line-height:1.08!important;white-space:normal!important;min-width:0;padding:0 5px;overflow-wrap:anywhere;}
#game .page-content{top:304px;bottom:139px;}
#game .bottom-nav{height:126px;padding:7px 6px;gap:5px;}
#game .ui-btn.nav-btn{min-width:0;min-height:104px;padding:5px 1px!important;gap:2px;}
#game .nav-btn .ico{font-size:43px!important;flex:0 0 auto;}
#game .nav-btn small{font-size:22px!important;line-height:1.04!important;font-weight:900!important;white-space:normal!important;overflow-wrap:anywhere;text-align:center;max-width:100%;}
#game .ui-btn.back-btn,#game .ui-btn.help-btn{min-width:70px;min-height:68px;font-size:39px;}
#game .hud .player-card{width:258px;min-height:117px;}
#game .hud .p-details strong{font-size:25px!important;}
#game .hud .p-details em{font-size:21px!important;}
#game .hud .p-details small{font-size:18px!important;}
#game .hud .res-row{left:272px;right:10px;}
#game .hud .res{padding:8px 3px;gap:1px;}
#game .hud .res label{font-size:19px!important;line-height:1.14!important;overflow:hidden;}
#game .hud .res strong{font-size:26px!important;letter-spacing:-.8px;}
#game .hud .res .ico{font-size:26px!important;}
#game .hud .res .energy-clock{font-size:15px!important;}
#game .hud .ui-btn.plus{min-width:34px;min-height:34px;height:34px;font-size:25px;}
#game .hud .header-links{left:276px;gap:6px;top:118px;height:90px;}
#game .hud .quicklink .ico{font-size:39px!important;}
#game .hud .quicklink small{font-size:20px!important;line-height:1.04;white-space:normal!important;overflow-wrap:anywhere;}
#game .ui-btn{font-size:var(--font-sm);line-height:1.13;min-height:67px;overflow-wrap:anywhere;}
#game .ui-btn.large{font-size:var(--font-lg)!important;min-height:98px;}
#game .neon-box,#game .px-card,#game .px-panel{margin-bottom:var(--panel-gap);}
#game .neon-box{padding:17px 17px 19px;}
#game .neon-box h3{font-size:var(--font-lg)!important;line-height:1.16!important;margin:0 0 12px!important;padding-bottom:10px;}
#game .neon-box p,#game .px-panel p,#game .subtext,#game .item-description{font-size:var(--font-md)!important;line-height:1.35!important;overflow-wrap:anywhere;}
#game small{line-height:1.22;}
#game .ui-btn small{font-size:var(--font-xs);line-height:1.15;}
#game .tabs,#game .grade-filter,#game .role-filter{gap:8px;scrollbar-width:none;}
#game .tabs .ui-btn,#game .grade-filter-btn{min-height:70px;font-size:25px!important;padding:9px 7px!important;white-space:normal;}
#game .tabs{padding-bottom:11px;}
#game .four-actions .ui-btn,#game .buttons-center .ui-btn,#game .result-actions .ui-btn{min-height:88px!important;font-size:28px!important;padding:11px 8px!important;}
#game .buttons-center{flex-wrap:wrap;gap:12px;}
#game .prize b,#game .reward-chips,#game .receipt-chip{font-size:26px!important;}
#game .prize{min-height:95px;min-width:122px;}
#game .toast{font-size:26px;max-width:620px;line-height:1.25;}
#game .dialog{max-width:calc(100% - 34px);max-height:calc(100% - 110px);overflow-y:auto;padding:23px;}
#game .dialog h2{font-size:36px!important;}
#game .dialog p{font-size:28px!important;line-height:1.32;}
#game .modal-buttons{flex-wrap:wrap;gap:12px;}
#game .modal-buttons .ui-btn{min-width:0;flex:1;min-height:85px;font-size:27px!important;}

/* LOBBY: legible buttons, keep campfire illustration unobstructed. */
#game .lobby-area{bottom:135px;}
#game .ui-btn.feat-btn{min-width:0;flex:1;height:114px;padding:6px 2px!important;}
#game .feat-btn .ico{font-size:46px!important;}
#game .feat-btn small{font-size:22px!important;line-height:1.07!important;white-space:normal!important;}
#game .home-features{gap:9px;bottom:15px;}
#game .ui-btn.side-btn{width:119px;min-height:97px;height:97px;}
#game .side-btn .ico{font-size:41px!important;}
#game .side-btn small{font-size:21px!important;line-height:1.03;white-space:normal!important;}
#game .lobby-side.right{right:8px;}
#game .event-banner{font-size:28px;line-height:1.15;}

/* HERO COLLECTION: two readable columns instead of three miniature cards. */
#game .hero-list:not(.compact):not(.rewards-grid){grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:17px!important;}
#game .hero-card.px-character-card{min-height:415px!important;padding:7px!important;}
#game .hero-card.px-character-card .hero-card-art{height:270px!important;}
#game .hero-card.px-character-card .hero-card-art img{height:258px!important;max-height:258px!important;width:auto!important;}
#game .hero-card.px-character-card .hero-card-caption{padding:9px 5px!important;gap:6px;}
#game .hero-card.px-character-card .hero-card-caption strong{font-size:27px!important;line-height:1.13!important;min-height:34px!important;}
#game .hero-card.px-character-card .hero-card-caption small{font-size:23px!important;}
#game .hero-card.px-character-card .rarity{font-size:24px!important;}
#game .hero-card.px-character-card .hero-stars{font-size:26px!important;}
#game .collection-intro{font-size:26px;gap:12px;}
#game .collection-intro small{font-size:23px!important;line-height:1.25;}

/* HERO DETAIL: horizontal hero picker, large art and two clean columns. */
#game .hero-detail-page .detail-hero-layout{grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;gap:13px!important;min-height:0!important;}
#game .hero-detail-page .detail-rail{grid-column:1 / -1;grid-row:1;display:flex!important;flex-direction:row!important;align-items:center;gap:10px;overflow-x:auto!important;overflow-y:hidden!important;max-height:98px;min-height:92px;padding:5px 2px;}
#game .hero-detail-page .detail-rail .portrait{flex:0 0 78px!important;width:78px!important;height:80px!important;min-width:78px!important;min-height:80px!important;}
#game .hero-detail-page .detail-rail .portrait img{width:70px!important;height:72px!important;}
#game .hero-detail-page .detail-character,#game .hero-detail-page .detail-stats{min-height:485px!important;}
#game .hero-detail-page .detail-fullhero{height:360px!important;max-height:360px!important;}
#game .hero-detail-page .detail-name{min-height:102px;padding:9px 5px;}
#game .hero-detail-page .detail-name strong{font-size:28px!important;overflow-wrap:anywhere;}
#game .hero-detail-page .detail-name small{font-size:22px!important;display:block;line-height:1.2;}
#game .hero-detail-page .detail-stats{padding:12px 9px!important;gap:3px;}
#game .hero-detail-page .stat-power small{font-size:23px!important;}
#game .hero-detail-page .stat-power strong{font-size:39px!important;}
#game .hero-detail-page .stat-level b{font-size:25px!important;}
#game .hero-detail-page .stat-level small{font-size:20px!important;}
#game .hero-detail-page .stat-line{min-height:48px!important;font-size:23px!important;gap:5px;padding:7px 0!important;}
#game .hero-detail-page .stat-line span{white-space:normal!important;}
#game .hero-detail-page .stat-line b{font-size:26px!important;}
#game .hero-detail-page .stat-footnote{font-size:20px!important;}
#game .detail-skill-row{grid-template-columns:84px minmax(0,1fr);gap:12px;min-height:144px;padding:12px!important;}
#game .detail-skill-row .skill-glyph{width:82px;height:82px;font-size:34px;}
#game .detail-skill-row .skill-head{align-items:start;}
#game .detail-skill-row .skill-head strong{font-size:29px!important;}
#game .detail-skill-row .skill-head small{font-size:23px!important;}
#game .detail-skill-row .skill-copy p{font-size:25px!important;line-height:1.3!important;}
#game .detail-skill-row .skill-meta,#game .detail-skill-row .skill-voice{font-size:21px!important;}
#game .detail-skill-row .skill-row-actions{grid-column:2;display:flex;flex-direction:row;min-width:0;gap:10px;}
#game .detail-skill-row .skill-row-actions .ui-btn{font-size:25px!important;min-height:58px!important;flex:1;}
#game .detail-equipment{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:12px;}
#game .detail-gear-slot{min-height:142px!important;}
#game .detail-gear-slot b{font-size:25px!important;}
#game .detail-gear-slot small{font-size:21px!important;}
#game .detail-actions{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;}
#game .detail-actions .ui-btn{min-height:98px!important;font-size:30px!important;}
#game .exp-book-row{gap:9px;flex-wrap:wrap;}
#game .exp-book-row small{font-size:22px;}
#game .exp-book-row input{font-size:27px;min-height:57px;}

/* BACKPACK: large item tiles and a full-width description panel. */
#game .inventory-container{display:flex!important;flex-direction:column!important;gap:12px!important;align-items:stretch!important;}
#game .inventory-grid{width:100%!important;max-width:none!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:11px!important;}
#game .inventory-info{width:100%!important;min-width:0;flex:auto!important;}
#game .ui-btn.px-item-card{min-height:145px!important;padding:10px 4px!important;}
#game .px-item-card .ico{font-size:52px!important;}
#game .px-item-card .item-stack{font-size:22px!important;}
#game .px-item-card .item-label{font-size:21px!important;line-height:1.1!important;min-height:44px!important;}
#game .inventory-info .item-feature strong{font-size:32px!important;}
#game .inventory-info .item-feature small{font-size:24px!important;}
#game .inventory-info .ui-btn{min-height:86px;font-size:27px!important;}

/* SUMMON: horizontal scrollable types, keeping ample room for the banner. */
#game .summon-page{display:flex!important;flex-direction:column!important;height:auto!important;gap:11px;}
#game .summon-types{display:flex!important;flex-direction:row!important;width:100%!important;min-height:111px;gap:9px;overflow-x:auto;scrollbar-width:thin;flex:0 0 auto;padding:3px 1px 8px;}
#game .ui-btn.summontype{min-width:145px;height:105px;min-height:105px;padding:5px!important;flex:0 0 145px;}
#game .summontype small{font-size:23px!important;white-space:normal;}
#game .summon-main{overflow:visible!important;flex:1;min-width:0;}
#game .summon-arts{height:300px!important;}
#game .summon-arts img{height:295px!important;}
#game .summon-prices .ui-btn{font-size:27px!important;min-height:104px!important;flex:1;}
#game .summon-prices .ui-btn small{font-size:22px!important;}
#game .summon-page .rates{font-size:31px!important;line-height:1.26;}

/* CAMPAIGN, TOWER, FARM, SHOP AND OTHER INFORMATION-DENSE MENUS. */
#game .story-map .chapter-choice{min-height:105px;height:auto!important;padding:8px!important;}
#game .story-map .chapter-choice small{font-size:22px!important;line-height:1.16!important;}
#game .story-map .map-heading{font-size:26px!important;min-height:73px;}
#game .story-map .map-node{font-size:26px!important;}
#game .story-map .map-detail p{font-size:24px!important;line-height:1.25!important;}
#game .story-map .map-detail .ui-btn.large{min-height:77px!important;}
#game .tower-page-nav .ui-btn{font-size:27px!important;min-height:72px;}
#game .tower-v11 .tower-floor-tile{min-height:105px!important;height:105px!important;}
#game .tower-floor-tile small{font-size:20px!important;}
#game .tower-actions-row .ui-btn{font-size:27px!important;min-height:83px;}
#game .tower-reward-item,#game .tower-banner-copy small{font-size:25px!important;}
#game .tower-milestone small,#game .tower-achievement small{font-size:22px!important;}
#game .tower-milestone .ui-btn{font-size:22px!important;min-height:70px;}
#game .mission-row strong,#game .rank-line strong,#game .shop-card strong,#game .setting-row{font-size:27px!important;}
#game .mission-row small,#game .rank-line small,#game .shop-card small{font-size:23px!important;}
#game .mission-row .ui-btn{min-height:78px;font-size:25px!important;}
#game .shop-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;}
#game .checkin-grid{grid-template-columns:repeat(3,minmax(0,1fr));}
#game .checkin-card small{font-size:23px!important;}
#game .chat-compose input{font-size:28px!important;}
#game .bubble{font-size:25px!important;line-height:1.3;}

/* PREPARATION: large readable slots, fixed action bar above bottom nav. */
#game .page-content.prepare-page{bottom:140px!important;padding:9px 12px 8px!important;}
#game .prepare-page .prepare-scroll{min-height:0;flex:1 1 auto;overflow-y:auto;overflow-x:hidden;padding:4px 0 12px;}
#game .prepare-page .neon-box{padding:13px!important;margin:4px 0 11px!important;}
#game .prepare-page .neon-box h3{font-size:30px!important;}
#game .prepare-page .neon-box p{font-size:25px!important;}
#game .prepare-page .formation-grid{gap:10px!important;}
#game .prepare-page .formation-slot{height:158px!important;min-height:158px!important;max-height:158px!important;}
#game .prepare-page .formation-slot img{height:129px!important;max-height:129px!important;object-fit:contain!important;}
#game .prepare-page .formation-slot small{font-size:22px!important;height:23px;}
#game .prepare-page .center{font-size:28px!important;margin-top:8px;}
#game .prepare-page .versus{font-size:38px!important;margin:13px 0;}
#game .prepare-page .prepare-actions{flex:0 0 auto;grid-template-columns:1fr 1.35fr;padding:10px 0 2px;gap:10px;}
#game .prepare-page .prepare-actions .ui-btn{min-height:95px!important;height:95px!important;font-size:28px!important;line-height:1.13!important;}
#game .formation-page .formation-slot{min-height:162px;height:162px;}
#game .formation-page .formation-slot img{height:128px;}
#game .formation-page .formation-slot small{font-size:21px!important;}
#game .formation-page .hero-list.compact .small-hero-card{min-height:155px;}

/* BATTLE: maintain 12 actors and Canvas coordinates, improve control readability. */
#game .battle-top{gap:5px!important;}
#game .battle-head .b-toptitle{font-size:21px!important;white-space:normal!important;line-height:1.1;}
#game .battle-head .ui-btn.b-small{min-height:59px;height:59px;padding:4px 6px;font-size:21px!important;}
#game .battle-stage-label b{font-size:29px!important;}
#game .battle-stage-label small{font-size:23px!important;}
#game .conditions{padding:11px!important;}
#game .conditions b{font-size:24px!important;}
#game .conditions p{font-size:21px!important;line-height:1.15;}
#game .battle-view .hp-label{font-size:23px!important;}
#game .battle-view .skills-bar{padding:7px 6px!important;}
#game .battle-view .skill-btn{min-height:102px!important;padding:7px 4px!important;gap:3px;}
#game .battle-view .skill-btn .skill-sign{font-size:41px!important;}
#game .battle-view .skill-btn small{font-size:19px!important;line-height:1.08!important;min-height:41px!important;}
#game .battle-view .skill-btn .skill-cost{font-size:19px!important;}
#game .battle-view .hero-bio strong{font-size:25px!important;}
#game .battle-view .bio-hp,#game .battle-view .bio-energy{font-size:22px!important;}
#game .battle-view .turn-queue{padding:5px!important;}
#game .battle-view .queue-label{font-size:22px!important;}
#game .battle-view .skill-flash{font-size:31px!important;}
#game .result-page-v8 .result-summary h2{font-size:39px!important;}
#game .result-page-v8 .result-summary b{font-size:25px!important;}
#game .result-actions{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;}
#game .result-actions .ui-btn{min-height:94px!important;}

/* Protect text from clipping on narrow devices and touch zones from shrinking. */
#game .page-content button{white-space:normal;}
#game .page-content .neon-box, #game .page-content .px-card {min-width:0;}
#game img{max-width:100%;}
#game .page-content .ui-btn:focus-visible,#game .bottom-nav .ui-btn:focus-visible{outline:4px solid #ffd166;outline-offset:-5px;}
@media(prefers-reduced-motion:reduce){#game .ui-btn{transition:none!important}}

/* =============== V16: approved cyan/gold character equipment design =============== */
#game .page-content.equipment-page-content{padding:12px 12px 22px!important;overflow-x:hidden!important;overflow-y:auto!important;background:#0c1d2e!important;scrollbar-width:thin;}
#game .equipment-page-v16{color:#fff;display:flex;flex-direction:column;gap:13px;padding-bottom:8px;}
#game .eq-top-layout{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:12px;align-items:stretch;}
#game .eq-character-card,#game .eq-warehouse,#game .eq-bonus-panel{border:4px solid #36bfff;background:linear-gradient(180deg,#12334d,#071e31);box-shadow:inset 0 0 0 3px #0d283a,0 0 0 2px #315d79;min-width:0;position:relative;padding:9px;}
#game .eq-character-card{border-color:#ffd166;box-shadow:inset 0 0 0 3px #694f1a,0 0 0 2px #a98131;display:flex;flex-direction:column;}
#game .eq-rarity-line{display:flex;justify-content:space-between;align-items:center;min-height:50px;gap:3px;}
#game .eq-rarity-line>span:last-child{font-size:26px;color:#ffd166;white-space:nowrap;}
#game .eq-portrait-wrap{height:312px;min-height:250px;position:relative;overflow:hidden;display:flex;align-items:center;justify-content:center;background:radial-gradient(circle at 50% 70%,#195e86 0,#0f3255 45%,#081a30 80%);border:2px solid #6289a4;}
#game .eq-portrait-wrap:after{content:'';position:absolute;left:15%;right:15%;bottom:6px;height:14px;border:3px solid #efbb4b;border-radius:50%;box-shadow:0 0 16px #edba4a;pointer-events:none;}
#game .eq-character-art{display:block;width:100%;height:98%;max-height:302px;object-fit:contain;image-rendering:pixelated;z-index:1;filter:none!important;}
#game .eq-hero-name{text-align:center;font-size:23px;line-height:1.2;font-weight:900;padding:10px 0 7px;border-bottom:2px solid #bc9637;color:#fff;overflow-wrap:anywhere;}
#game .eq-hero-name small{display:block;color:#ffd166;font-size:17px;margin-top:5px;}
#game .eq-worn-title{color:#ffd166;text-align:center;font-size:21px;font-weight:900;padding:8px 0 4px;}
#game .eq-worn-title small{float:right;color:#b8cedd;font-size:17px;}
#game .eq-worn-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;}
#game .eq-worn-slot{min-width:0;height:100px;position:relative;border:3px solid #527b98;background:#102739;color:#eef8ff;padding:4px 0 0;display:flex;flex-direction:column;align-items:center;justify-content:flex-start;overflow:hidden;cursor:pointer;}
#game .eq-worn-slot.filled{border-color:#c576ff;background:#231340;}
#game .eq-worn-slot.empty{border-style:dashed;background:#13293b;}
#game .eq-worn-slot.locked{pointer-events:none;opacity:.7;color:#aec0d2;font-size:27px;justify-content:center;}
#game .eq-worn-slot small{font-size:13px;max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:#eaf0f8;}
#game .eq-worn-slot b{font-size:15px;position:absolute;top:4px;right:3px;color:#ffde7c;text-shadow:1px 1px #000;}
#game .gear-stars{display:block;font-size:13px;color:#ffd166;letter-spacing:-1px;line-height:1;white-space:nowrap;}
#game .gear-art{display:block;width:62px;height:62px;flex:0 0 auto;image-rendering:pixelated;background-position:center;background-size:contain;background-repeat:no-repeat;}
#game .gear-art-weapon{background-image:url('/assets/ui/gear_weapon.png');}
#game .gear-art-armor{background-image:url('/assets/ui/gear_armor.png');}
#game .gear-art-boots{background-image:url('/assets/ui/gear_boots.png');}
#game .gear-art-amulet{background-image:url('/assets/ui/gear_amulet.png');}
#game .eq-worn-slot .gear-art{width:54px;height:60px;}
#game .eq-warehouse{display:flex;flex-direction:column;overflow:hidden;}
#game .eq-warehouse h3{margin:0 0 8px;font-size:25px;text-shadow:none;border-bottom:2px solid #527b98;padding-bottom:7px;white-space:nowrap;}
#game .eq-filter{display:flex;gap:4px;overflow-x:auto;padding-bottom:4px;scrollbar-width:thin;flex:0 0 auto;}
#game .eq-filter .ui-btn{flex:0 0 auto;min-width:61px;min-height:52px;font-size:18px;padding:7px 9px;border:2px solid #527b98;box-shadow:none;background:#173548;}
#game .eq-filter .ui-btn.on{background:#725220;border-color:#ffcf61;color:#fff;}
#game .eq-count{font-size:15px;color:#b8cedd;margin:4px 0 7px;}
#game .eq-bag-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;align-content:start;overflow-y:auto;min-height:280px;max-height:475px;scrollbar-width:thin;overscroll-behavior:contain;padding:2px 3px 5px 0;}
#game .eq-bag-item{position:relative;min-width:0;min-height:118px;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:1px;padding:4px;background:#1a3150;border:3px solid #527b98;color:#f5f7ff;box-shadow:inset 0 0 0 2px #071b30;}
#game .eq-bag-item .gear-art{width:73px;height:73px;}
#game .eq-bag-item .eq-item-level{position:absolute;left:4px;top:3px;font-size:15px;color:#ffcf63;text-shadow:1px 1px #000;}
#game .eq-bag-item small{font-size:14px;line-height:1.1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%;}
#game .eq-worn-slot.eq-grade-r,#game .eq-bag-item.eq-grade-r{border-color:#34cc78;}
#game .eq-worn-slot.eq-grade-sr,#game .eq-bag-item.eq-grade-sr{border-color:#339bff;}
#game .eq-worn-slot.eq-grade-ssr,#game .eq-bag-item.eq-grade-ssr{border-color:#b65cff;box-shadow:0 0 7px #b65cff;}
#game .eq-worn-slot.eq-grade-ur,#game .eq-bag-item.eq-grade-ur{border-color:#ffd166;box-shadow:0 0 9px #ffd166;}
#game .eq-empty{font-size:17px;grid-column:1/-1;color:#b8cedd;padding:19px 7px;text-align:center;border:2px dashed #527b98;}
#game .eq-warehouse-note{font-size:15px;color:#a8c0d0;margin-top:auto;padding-top:10px;line-height:1.35;}
#game .eq-bonus-panel{padding:11px 14px!important;margin:0!important;}
#game .eq-bonus-panel h3{margin:0 0 9px;font-size:23px;color:#fff;border-bottom:2px solid #527b98;}
#game .eq-bonus-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:4px 17px;}
#game .eq-bonus-grid>div{display:flex;align-items:center;justify-content:space-between;gap:6px;font-size:19px;border-bottom:1px solid #345771;padding:7px 1px;}
#game .eq-bonus-grid strong{color:#34cc78;white-space:nowrap;font-size:21px;}
#game .eq-bonus-panel .eq-subnote{font-size:16px!important;margin:9px 0 2px;color:#b8cedd;}
#game .eq-quick-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:5px 0 12px;}
#game .eq-quick-actions .ui-btn,#game .eq-popup-actions .ui-btn{min-height:83px;font-size:21px;line-height:1.14;border-radius:0!important;box-shadow:inset 0 -5px #0007,0 0 0 2px #ffffff17!important;padding:9px 7px;white-space:normal;}
#game .eq-act-green{border-color:#9bfbc2!important;background:#19894e!important;color:#fff!important;}
#game .eq-act-gold{border-color:#ffe598!important;background:#a87217!important;color:#fff!important;}
#game .eq-act-purple{border-color:#d3a0ff!important;background:#6935a5!important;color:#fff!important;}
#game .eq-act-red{border-color:#ff99a1!important;background:#9e3041!important;color:#fff!important;}
#game .equipment-modal-v16{padding:0!important;width:638px;max-height:calc(100% - 135px);display:flex;flex-direction:column;overflow:hidden;box-shadow:0 0 0 5px #061a2a,0 0 0 8px #36bfff!important;border:3px solid #36bfff!important;border-radius:0!important;background:#102a40!important;}
#game .eq-popup-head{display:flex;align-items:center;gap:12px;justify-content:space-between;padding:8px;border-bottom:4px solid #36bfff;background:#0b3149;flex:0 0 auto;}
#game .eq-popup-head h2{margin:0;font-size:26px;white-space:nowrap;}
#game .eq-popup-head button{width:54px;height:55px;font-size:28px;min-width:54px;background:#133e5d;color:#fff;border:3px solid #36bfff;}
#game .eq-popup-head button:last-child{background:#852a3c;border-color:#ff7f90;}
#game .eq-popup-scroll{overflow:auto;padding:15px;overscroll-behavior:contain;flex:1;min-height:0;}
#game .eq-popup-feature{display:grid;grid-template-columns:130px minmax(0,1fr);gap:12px;align-items:center;text-align:left;border-bottom:2px solid #527b98;padding:5px 0 16px;}
#game .eq-popup-feature .eq-giant-icon{width:126px;height:136px;border:3px solid #d5aa52;background-color:#17364c;}
#game .eq-popup-feature strong{display:block;font-size:27px;line-height:1.15;color:#ffd166;overflow-wrap:anywhere;}
#game .eq-popup-feature small{font-size:18px;display:block;margin-top:8px;}
#game .eq-popup-feature p{font-size:18px;margin:8px 0;}
#game .eq-popup-scroll h3{color:#fff;text-align:left;font-size:22px;margin:14px 0 7px;text-shadow:none;border-bottom:1px solid #527b98;padding-bottom:5px;}
#game .eq-popup-scroll p{font-size:18px;line-height:1.38;text-align:left;margin:7px 0;}
#game .eq-popup-scroll .eq-note-real{color:#9ec8df;font-size:16px;}
#game .eq-popup-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;padding:13px;border-top:3px solid #36bfff;flex:0 0 auto;}
@media (prefers-reduced-motion:reduce){#game .eq-bag-item,#game .eq-worn-slot{transition:none!important}}
#game .eq-compare-head,#game .eq-compare-row{display:grid;grid-template-columns:1fr 1fr 1.15fr;gap:5px;align-items:center;text-align:left;padding:8px 2px;font-size:17px;border-bottom:1px solid #335a73;}
#game .eq-compare-head{color:#b8cedd;border-bottom:2px solid #527b98;font-size:16px;}
#game .eq-compare-row b{text-align:center;font-size:18px;}
#game .eq-compare-row .eq-up{color:#34cc78;}
#game .eq-quick-actions .ui-btn:active,#game .eq-popup-actions .ui-btn:active{transform:translateY(3px)!important;}

/* V17 • HERO + SKILL SHOWCASE, modeled on approved two-column cyan/gold reference.
   One visual system, real catalog and current equipment data, 200 skill art tiles. */
#game .page-content.hero-detail-v17{background:#091b2b!important;padding:12px 10px 18px!important;overflow:auto!important;scrollbar-color:#36bfff #122d40;}
#game .hero-showcase-v17{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.02fr);gap:13px;align-items:stretch;width:100%;}
#game .hero-left-v17{display:flex;flex-direction:column;gap:12px;min-width:0;}
#game .hero-card-v17{border:4px solid #d6ae44;box-shadow:inset 0 0 0 3px #4c3b16,0 0 0 2px #b7882c;min-width:0;background:#062137;position:relative;padding:7px 8px 10px;}
#game .hero-card-v17.tier-ssr{border-color:#ba72e7;box-shadow:inset 0 0 0 2px #51266b,0 0 0 2px #a56dd8;}
#game .hero-card-v17.tier-sr{border-color:#53aeff;box-shadow:inset 0 0 0 2px #174d86,0 0 0 2px #53aeff;}
#game .hero-card-v17.tier-r{border-color:#45da8c;box-shadow:inset 0 0 0 2px #1f6842,0 0 0 2px #45da8c;}
#game .hero-card-title-v17{display:flex;justify-content:space-between;align-items:center;gap:4px;min-height:51px;color:#ffd166;font-size:28px;white-space:nowrap;position:relative;z-index:2;}
#game .hero-card-title-v17 .rarity{font-size:27px!important;padding:5px 7px;}
#game .hero-world-v17{height:382px;overflow:hidden;position:relative;display:flex;justify-content:center;align-items:end;border:2px solid #347fb6;background:linear-gradient(#0f355c 0%,#2764a1 42%,#5a89aa 58%,#05253e 88%);}
#game .hero-world-v17:before{content:'';position:absolute;inset:0;background:linear-gradient(170deg,transparent 45%,#fff2 47%,transparent 49%),linear-gradient(25deg,transparent 51%,#9dd8fc34 52%,transparent 54%),url('/assets/scenes/map_world_pixel.webp') center/cover;opacity:.56;image-rendering:pixelated;}
#game .hero-world-v17:after{content:'';position:absolute;bottom:0;left:0;right:0;height:45px;background:linear-gradient(transparent,#041e2b 84%);pointer-events:none;}
#game .hero-main-v17{position:relative;z-index:2;width:94%;height:93%;object-fit:contain;object-position:bottom center;image-rendering:pixelated;filter:drop-shadow(0 6px 2px #001322)!important;}
#game .hero-floor-v17{position:absolute;z-index:1;bottom:14px;width:70%;height:16px;box-shadow:0 0 18px 9px #f9cc6a;background:#ffcf67;border:3px solid #ffe7a6;transform:skewX(20deg);}
#game .hero-name-v17{text-align:center;background:#08233c;position:relative;padding:11px 5px 8px;border-top:3px solid #c7962d;border-bottom:3px solid #c7962d;}
#game .hero-name-v17 strong{display:block;font-size:25px;line-height:1.18;overflow-wrap:anywhere;color:#fff;text-shadow:2px 2px #031420;}
#game .hero-name-v17 small{font-size:19px;color:#ffe7a4;line-height:1.2;display:flex;flex-wrap:wrap;gap:4px;justify-content:center;align-items:center;}
#game .hero-card-equipment-v17{padding:9px 0 0;}
#game .hero-card-equipment-v17 h3{margin:0 auto 9px;text-align:center;font-size:23px!important;color:#fff3c8;border:2px solid #d4a54c;background:#071b2a;width:max-content;min-width:56%;padding:4px 10px;}
#game .v17-six-gear{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;}
#game .v17-gear-tile{display:flex;flex-direction:column;align-items:center;justify-content:flex-end;gap:0;height:102px;padding:5px 1px 4px;min-width:0;border:3px solid #8066a8;background:linear-gradient(#2b1b4f,#111a35);position:relative;color:white;cursor:pointer;box-shadow:inset 0 0 0 2px #12142d;}
#game .v17-gear-tile.equipped{border-color:#ad63ff;box-shadow:inset 0 0 0 2px #3e266e,0 0 8px #6631a8;}
#game .v17-gear-tile:active{transform:translateY(2px);}
#game .v17-gear-tile .gear-art{width:56px;height:57px;flex:none;margin:auto auto 0;}
#game .v17-gearlvl{font-size:16px;color:#ffd166;font-weight:900;text-shadow:1px 1px #000;line-height:1.1;}
#game .v17-gear-tile small{font-size:13px!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%;}
#game .v17-gear-locked{opacity:.65;pointer-events:none;font-size:29px;justify-content:center;}
#game .hero-stats-v17,#game .hero-skills-v17{min-width:0;border:4px solid #36bfff;background:#0a2a41;box-shadow:inset 0 0 0 2px #0b3f59,0 0 0 2px #166988;padding:10px;}
#game .hero-stats-v17 header{display:flex;align-items:center;justify-content:space-between;gap:6px;border-bottom:2px solid #4a839e;padding-bottom:10px;margin-bottom:6px;font-size:26px;font-weight:900;}
#game .hero-stats-v17 header strong{font-size:19px;color:#ffd166;white-space:nowrap;}
#game .hero-exp-line-v17{padding:6px 0 8px;font-size:18px;color:#b8cedd;}
#game .hero-exp-line-v17 .xpbar{margin-top:5px;height:15px!important;}
#game .hero-stat-v17{display:flex;align-items:center;justify-content:space-between;gap:5px;min-height:49px;border-bottom:2px solid #2c556f;font-size:22px;}
#game .hero-stat-v17 span{min-width:0;line-height:1.1;}
#game .hero-stat-v17 strong{white-space:nowrap;font-size:25px;color:#f6f8ff;}
#game .hero-skills-v17{padding:10px;}
#game .hero-skills-v17>h2{display:flex;align-items:center;justify-content:space-between;margin:0 0 11px;padding:4px 4px 12px;border-bottom:3px solid #377c9d;font-size:30px!important;color:#fff;}
#game .hero-skills-v17>h2 small{font-size:17px;color:#ffe29c;}
#game .skill-stack-v17{display:flex;flex-direction:column;gap:14px;}
#game .skill-feature-v17{display:grid;grid-template-columns:108px minmax(0,1fr);gap:10px;min-height:183px;padding:9px;border:3px solid #36bfff;background:linear-gradient(125deg,#062941,#051d30);box-shadow:inset 0 0 0 2px #0c4a63;color:white;}
#game .skill-feature-v17.ultimate-skill{border-color:#ffd166;box-shadow:inset 0 0 0 2px #69512a,0 0 11px #d7a73366;}
#game .skill-art-v17{display:block;image-rendering:pixelated;flex:none;background-image:url('/assets/ui/skill_atlas.png');background-size:1000% 2000%;background-repeat:no-repeat;background-color:#172746;}
#game .skill-poster-v17{width:106px;height:106px;border:3px solid #9cddff;box-shadow:inset 0 0 0 2px #092d50,0 0 7px #1171a0;align-self:center;}
#game .skill-feature-text{min-width:0;display:flex;flex-direction:column;justify-content:center;gap:5px;}
#game .skill-feature-title{display:flex;justify-content:space-between;align-items:flex-start;gap:2px;}
#game .skill-feature-title strong{color:#ffe087;font-size:24px;line-height:1.14;overflow-wrap:anywhere;}
#game .skill-feature-title span{font-size:26px;color:#fff;}
#game .skill-feature-meta{display:flex;flex-wrap:wrap;gap:3px;align-items:center;font-size:16px;color:#c9e4f5;}
#game .skill-feature-meta b{padding:3px 8px;background:#154d73;border:2px solid #36bfff;color:white;font-size:19px;}
#game .skill-feature-text p{font-size:20px!important;line-height:1.24!important;margin:4px 0!important;overflow-wrap:anywhere;}
#game .skill-feature-end{display:flex;gap:6px;margin-top:auto;justify-content:flex-end;}
#game .skill-feature-end .ui-btn{border:2px solid #65d5ff!important;box-shadow:none!important;background:#114360!important;min-height:36px!important;font-size:17px!important;padding:3px 8px!important;white-space:nowrap;}
#game .hero-actions-v17{margin:17px 2px 12px;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;border:4px solid #2288b0;background:#0c2940;padding:12px;box-shadow:inset 0 0 0 2px #07314e;}
#game .hero-actions-v17 .ui-btn{font-size:25px!important;min-height:100px!important;border-width:4px!important;border-radius:0!important;white-space:normal;box-shadow:inset 0 -8px #0005,0 3px #071321!important;}
#game .hero-actions-v17 .action-green{background:#219a58!important;border-color:#8ff7ae!important;}
#game .hero-actions-v17 .gold{background:#ba8b18!important;border-color:#ffe6a4!important;color:#fff!important;}
#game .hero-actions-v17 .action-blue{background:#1674aa!important;border-color:#89dbff!important;}
#game .hero-actions-v17 .danger{background:#a93246!important;border-color:#ffa4ad!important;}
#game .v17-exp-books{margin:0 5px 20px;padding:10px 14px;border:2px solid #427a92;background:#10293b;}
#game .v17-exp-books summary{cursor:pointer;color:#d4e7f4;font-size:21px;font-weight:bold;}
#game .v17-exp-books .exp-books{margin-top:10px;}
#game .battle-view .skill-btn{overflow:hidden;}
#game .battle-view .battle-skill-art{width:66px;height:66px;margin:1px auto 3px;border:2px solid #36bfff;}
#game .battle-view .skill-btn small{max-height:42px;overflow:hidden;}
/* Equipment: bring the old page closer to the source image while keeping every action hooked to real state. */
#game .eq-character-card{background:linear-gradient(#0d3656,#041e30)!important;}
#game .eq-character-card .eq-portrait-wrap{background-image:url('/assets/scenes/map_world_pixel.webp')!important;background-size:cover!important;image-rendering:pixelated;}
#game .eq-portrait-wrap .eq-character-art{object-fit:contain!important;object-position:center bottom!important;}
#game .eq-worn-slot.filled{background:#231239!important;}
#game .eq-worn-slot .gear-art,#game .eq-bag-item .gear-art{filter:none!important;}
#game .equipment-modal-v16{max-height:calc(100% - 70px)!important;}
#game .eq-quick-actions .ui-btn{border-radius:0!important;}
#game .eq-bag-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:6px!important;}
#game .eq-bag-item{min-height:104px!important;}
#game .eq-bag-item .gear-art{width:61px!important;height:62px!important;}
#game .eq-filter .ui-btn{min-width:53px!important;padding:5px!important;}
@media (max-height:650px){#game .hero-world-v17{height:300px}#game .skill-feature-v17{min-height:165px}}
@media(prefers-reduced-motion:reduce){#game .hero-main-v17{animation:none!important}}
#game .v17-skill-modal-heading{display:flex;gap:18px;align-items:center;text-align:left;}
#game .v17-skill-modal-heading .skill-art-v17{width:115px;height:115px;border:3px solid #36bfff;}
#game .v17-skill-modal-heading h2{min-width:0;overflow-wrap:anywhere;color:#ffd166;}
#game .skill-info-modal .modal-buttons .ui-btn{min-height:60px;font-size:23px;}
/* Primary four actions stay visible even when hero's four skill descriptions are long. */
#game .hero-actions-v17{position:fixed!important;bottom:122px!important;left:10px!important;right:10px!important;margin:0!important;z-index:11!important;min-height:106px;background:#0c2940f7!important;box-shadow:0 -4px 14px #031927bb,inset 0 0 0 2px #07314e!important;}
#game .page-content.hero-detail-v17{padding-bottom:155px!important;}
#game .hero-actions-v17 .ui-btn{font-size:21px!important;white-space:nowrap!important;line-height:1.14!important;padding:8px 3px!important;}

/* V18: Every feature is its own FULL-SCREEN page. Lobby HUD and navigation
   only render on lobby; avoid keeping the lobby behind any feature. */
#game.feature-fullscreen{background:#101c2b!important;}
#game.feature-fullscreen:before{display:none!important;}
#game.feature-fullscreen .page-title{
 position:absolute!important;top:8px!important;left:8px!important;right:8px!important;
 height:86px!important;z-index:20!important;margin:0!important;
}
#game.feature-fullscreen .page-content{
 position:absolute!important;top:104px!important;bottom:7px!important;
 left:8px!important;right:8px!important;
 max-height:none!important;min-height:0!important;
 overflow-y:auto!important;overflow-x:hidden!important;
 overscroll-behavior:contain!important;scrollbar-width:thin;
 padding-bottom:22px!important;
}
/* Preparation has its own pinned fight buttons and internal scroll area. */
#game.feature-fullscreen .page-content.prepare-page{
 bottom:7px!important;overflow:hidden!important;
 display:flex!important;flex-direction:column!important;padding-bottom:8px!important;
}
#game.feature-fullscreen .prepare-page .prepare-scroll{
 min-height:0!important;flex:1 1 auto!important;overflow-y:auto!important;
}
#game.feature-fullscreen .prepare-page .prepare-actions{flex-shrink:0!important;}
/* Full-screen panels shouldn't inherit fixed hero-page bottom gutters from V17. */
#game.feature-fullscreen .page-content.hero-detail-v17{padding-bottom:24px!important;}
/* The page can be opened from any feature, without a background HUD tap target. */
#game.feature-fullscreen .hud,#game.feature-fullscreen .bottom-nav{display:none!important;}



/* V21 lobby-only UI hotfix. Functional actions are untouched. */
#game[data-view="lobby"] .lobby-area{background:#07182c url('/assets/scenes/lobby_user_new.webp') center center/cover no-repeat!important;}
#game[data-view="lobby"] .hud{
  border:0!important;background:linear-gradient(180deg,#07192cf5 0%,#07192ce2 77%,#07192c00 100%)!important;
  box-shadow:none!important;
}
/* Maintain a readable resource HUD rather than floating tiny numbers. */
#game[data-view="lobby"] .hud .player-card{border:2px solid #63869b!important;background:#0b243ab0!important;box-shadow:none!important;}
#game[data-view="lobby"] .hud .res{background:#0d2a3cbd!important;border:2px solid #527b98!important;box-shadow:none!important;border-radius:3px!important;}
#game[data-view="lobby"] .hud .p-avatar{background:#163149 url('/assets/scenes/avatar_v8.webp') center/cover no-repeat!important;}
#game[data-view="lobby"] .hud .header-links{top:115px!important;left:273px!important;gap:7px!important;height:91px!important;}
#game[data-view="lobby"] .hud .header-links .ui-btn.quicklink{
  min-height:84px!important;height:84px!important;
  background:none!important;border:0!important;box-shadow:none!important;
  padding:2px 0!important;display:flex!important;flex-direction:column!important;gap:1px!important;
}
#game[data-view="lobby"] .quicklink .ico{font-size:64px!important;width:64px!important;height:64px!important;filter:drop-shadow(2px 3px 0 #06121e)!important;}
#game[data-view="lobby"] .quicklink small{font-size:19px!important;color:#fff6dc!important;line-height:1.12!important;text-shadow:2px 2px #03131d!important;}
#game[data-view="lobby"] .lobby-side{z-index:8;top:170px!important;gap:8px!important;}
#game[data-view="lobby"] .lobby-side.left{left:2px!important;}
#game[data-view="lobby"] .lobby-side.right{right:2px!important;}
#game[data-view="lobby"] .ui-btn.side-btn{
 width:112px!important;height:103px!important;min-height:103px!important;
 background:linear-gradient(90deg,#061626a8,#06162642)!important;
 border:0!important;box-shadow:none!important;border-radius:0!important;
 display:flex!important;flex-direction:column!important;justify-content:center!important;
 padding:3px!important;gap:3px!important;
}
#game[data-view="lobby"] .side-btn .ico{font-size:70px!important;width:70px!important;height:70px!important;filter:drop-shadow(2px 3px 0 #06121e)!important;}
#game[data-view="lobby"] .side-btn small{font-size:21px!important;color:#fff7dd!important;line-height:1.1!important;white-space:normal!important;text-shadow:2px 2px #06121e!important;}
#game[data-view="lobby"] .event-banner{
  z-index:6!important;left:230px!important;top:9px!important;width:280px!important;
  height:95px!important;min-height:95px!important;
  background:#081b30c9!important;border:1px solid #9cd5e1!important;
  box-shadow:none!important;border-radius:2px!important;
  padding:7px!important;display:flex!important;flex-direction:row!important;
  justify-content:space-around!important;align-items:center!important;gap:6px!important;
}
#game[data-view="lobby"] .event-banner b{font-size:23px!important;line-height:1.09!important;}
#game[data-view="lobby"] .event-banner span{font-size:20px!important;white-space:nowrap!important;color:#ffdb7d!important;}
#game[data-view="lobby"] .timer-pill{background:#0b2932da!important;border:1px solid #46bc9b!important;border-radius:2px!important;font-size:17px!important;padding:4px 1px!important;}
#game[data-view="lobby"] .home-features{
  z-index:9!important;bottom:6px!important;left:12px!important;right:12px!important;
  gap:13px!important;justify-content:space-evenly!important;
}
#game[data-view="lobby"] .ui-btn.feat-btn{
  min-height:94px!important;height:94px!important;max-width:199px!important;
  flex:1!important;background:#061626a5!important;border:0!important;border-radius:2px!important;
  box-shadow:none!important;display:flex!important;flex-direction:column!important;
  gap:1px!important;justify-content:center!important;
}
#game[data-view="lobby"] .feat-btn .ico{font-size:65px!important;width:65px!important;height:65px!important;filter:drop-shadow(2px 2px 0 #06121e)!important;}
#game[data-view="lobby"] .feat-btn small{font-size:21px!important;line-height:1.06!important;color:#fff3d9!important;text-shadow:2px 2px #06121e!important;}
#game[data-view="lobby"] .bottom-nav{
  border:0!important;background:linear-gradient(0deg,#061724fa 7%,#092038ed 100%)!important;
  box-shadow:none!important;gap:1px!important;padding:5px 5px 3px!important;
}
#game[data-view="lobby"] .bottom-nav .ui-btn.nav-btn{
  border:0!important;border-radius:0!important;min-height:108px!important;
  background:transparent!important;box-shadow:none!important;
  display:flex!important;flex-direction:column!important;gap:3px!important;padding:4px 1px!important;
}
#game[data-view="lobby"] .bottom-nav .nav-btn .ico{font-size:64px!important;width:64px!important;height:64px!important;filter:drop-shadow(2px 3px 0 #06121e)!important;}
#game[data-view="lobby"] .bottom-nav .nav-btn small{font-size:21px!important;line-height:1.08!important;color:#fbefda!important;text-shadow:1px 2px #06101b!important;}
#game[data-view="lobby"] .bottom-nav .nav-btn.selected{background:#2b536e5a!important;}
#game[data-view="lobby"] .bottom-nav .nav-btn.selected small{color:#ffda7b!important;}
#game[data-view="lobby"] .menu-edge-toggle{z-index:12!important;top:480px!important;background:#0b2736e8!important;border-color:#87c8d9!important;}
#game[data-view="lobby"] .ui-btn.side-btn:active,
#game[data-view="lobby"] .ui-btn.feat-btn:active,
#game[data-view="lobby"] .hud .ui-btn.quicklink:active,
#game[data-view="lobby"] .bottom-nav .ui-btn.nav-btn:active{background:#285a72b5!important;transform:translateY(2px)!important;}
#game[data-view="lobby"] button:focus-visible{outline:3px solid #ffcd62!important;outline-offset:1px!important;}
/* V22: REFERENCE-GROUNDED PIXEL FANTASY DESIGN SYSTEM.
   Functional logic and player data remain V21. Only independently cropped
   interactive button art and scenic reference fragments are used. */
#game{--v22-navy:#07172e;--v22-blue:#07558f;--v22-cyan:#35d5ff;--v22-gold:#ffd363;--v22-purple:#aa5df7;--v22-ink:#061228;font-family:Tahoma,"Trebuchet MS",Arial,sans-serif!important}
#game .px-icon{filter:drop-shadow(1px 2px 0 #07142a)!important}
#game .ui-btn:focus-visible,#game button:focus-visible{outline:4px solid #fff1a1!important;outline-offset:2px!important}
#game button:active{transform:translateY(2px)!important;filter:brightness(1.15)!important}
/* Cinematic full-function pages; the backdrop is made from empty sky/ground,
   not screenshots of controls. All controls here are real DOM elements. */
#game.feature-fullscreen{background:#081b39 url('/assets/scenes/v22_page_scenery.webp') center center / 100% 100% no-repeat!important;border:0!important;box-shadow:none!important}
#game.feature-fullscreen .page-content{background:transparent!important;top:117px!important;left:12px!important;right:12px!important;bottom:7px!important;padding:11px 9px 32px!important;scrollbar-color:#3bbfff #0c2746!important}
#game.feature-fullscreen .page-title{top:20px!important;left:13px!important;right:13px!important;height:85px!important;background:linear-gradient(180deg,#17236a 0%,#0f4481 13%,#081a45 62%,#0a1734 100%)!important;border:5px solid #ffc75a!important;border-radius:5px!important;box-shadow:0 0 0 4px #071126,inset 0 0 0 3px #3ae1ff,0 7px 0 #0a1029,0 0 16px #009cf7!important}
#game.feature-fullscreen .page-title:before,#game.feature-fullscreen .page-title:after{content:'✦';position:absolute;top:8px;color:#ffdb78;font-size:29px;text-shadow:1px 2px #66462d;pointer-events:none}
#game.feature-fullscreen .page-title:before{left:79px}#game.feature-fullscreen .page-title:after{right:79px}
#game.feature-fullscreen .page-title h1{font-family:Tahoma,Arial,sans-serif!important;font-size:35px!important;font-weight:900!important;letter-spacing:.1px!important;color:#fff6d8!important;text-shadow:2px 3px #111733,0 0 8px #ba5b16!important;overflow:hidden;text-overflow:ellipsis}
#game.feature-fullscreen .page-title .ui-btn{border:3px solid #56e1ff!important;border-radius:3px!important;background:linear-gradient(#0966ab,#09285b)!important;box-shadow:inset 0 0 0 2px #e4c884,3px 3px #090e2b!important;min-height:62px!important;height:62px!important;width:63px!important;font-size:36px!important;color:#fff!important;text-shadow:2px 2px #052440!important;padding:0!important}
#game.feature-fullscreen .neon-box,
#game.feature-fullscreen .px-panel{background:linear-gradient(135deg,rgba(11,39,80,.96),rgba(16,16,55,.98))!important;border:3px solid #33d8ff!important;border-radius:4px!important;box-shadow:inset 0 0 0 3px #0a2261,0 0 0 2px #07152e,0 5px 0 #07152e,0 0 8px #0b6cb9!important;margin:8px 0 18px!important;padding:16px!important;position:relative}
#game.feature-fullscreen .neon-box::before,#game.feature-fullscreen .px-panel::before{content:'◆';position:absolute;left:-5px;top:-9px;color:#ffce6f;font-size:17px;line-height:1;pointer-events:none;text-shadow:1px 1px #382039}
#game.feature-fullscreen .neon-box::after,#game.feature-fullscreen .px-panel::after{content:'◆';position:absolute;right:-5px;bottom:-7px;color:#ffce6f;font-size:17px;line-height:1;pointer-events:none}
#game.feature-fullscreen .neon-box>h3,#game.feature-fullscreen .px-panel>h3{font-size:28px!important;font-weight:900!important;color:#fff4d9!important;text-shadow:2px 2px #4b2457!important;border-bottom:3px solid #159fdb!important;margin:0 0 13px!important;padding:1px 3px 9px!important;line-height:1.24}
#game.feature-fullscreen h2{font-size:31px!important;color:#ffd36f!important}
#game.feature-fullscreen .ui-btn,#game.feature-fullscreen .px-button{background:linear-gradient(180deg,#1871b2 0%,#0a417a 45%,#0a285b 100%)!important;border:3px solid #59bdf1!important;border-radius:3px!important;box-shadow:inset 0 0 0 2px #153f86,3px 4px 0 #050e24!important;text-shadow:1px 2px #0b2042!important;min-height:55px;line-height:1.15}
#game.feature-fullscreen .ui-btn.gold,#game.feature-fullscreen .ui-btn.gold.large{color:#25130a!important;background:linear-gradient(180deg,#fff2a6 0%,#ffbb22 37%,#ec7a08 100%)!important;border:4px solid #ffe193!important;box-shadow:inset 0 0 0 2px #ffe896,0 4px 0 #713f13,0 0 9px #ffc13eaa!important;text-shadow:0 1px 0 #fff4c5!important;font-weight:900!important}
#game.feature-fullscreen .ui-btn.purple{background:linear-gradient(#ad72ee,#6428b3 65%,#3b176a)!important;border-color:#c6a2ff!important}
#game.feature-fullscreen .ui-btn.danger{background:linear-gradient(#f97a7b,#b52e4a 60%,#761831)!important;border-color:#ffabb8!important}
#game.feature-fullscreen .ui-btn.muted,#game.feature-fullscreen .ui-btn:disabled{filter:saturate(.65);opacity:.56!important}
#game.feature-fullscreen .ui-btn.selected,#game.feature-fullscreen .ui-btn.active,#game.feature-fullscreen .tab.active{background:linear-gradient(#2bbdf9,#1172c0,#084775)!important;border-color:#ffe47a!important;box-shadow:inset 0 0 0 2px #cdf8ff,0 0 11px #47e3fd!important}
#game.feature-fullscreen .tabs{gap:9px!important;margin:5px 0 13px!important}
#game.feature-fullscreen .tabs>.ui-btn{font-size:23px!important;min-height:67px!important;white-space:normal!important;padding:9px 7px!important;min-width:120px}
#game.feature-fullscreen .xpbar,#game.feature-fullscreen .progress{border:3px solid #99ddff!important;height:20px!important;border-radius:3px!important;background:#102548!important;box-shadow:inset 2px 2px #050d24!important}
#game.feature-fullscreen .progress span,#game.feature-fullscreen .xpbar span{border-radius:0!important;background:repeating-linear-gradient(90deg,#2fd84d 0,#5cf579 12px,#43d654 12px,#43d654 16px)!important;box-shadow:none!important}
#game.feature-fullscreen .prize{border:3px solid #5088e8!important;border-radius:4px!important;background:linear-gradient(#142b64,#0c1c43)!important;box-shadow:inset 2px 2px #64c7ff,2px 3px #07152f!important}
#game.feature-fullscreen .prize b{color:#ffd56f!important}
#game.feature-fullscreen .subtext{color:#c9e6fa!important;font-size:23px!important}
#game.feature-fullscreen .mission-row,#game.feature-fullscreen .rank-line,#game.feature-fullscreen .shop-card,#game.feature-fullscreen .checkin-card,#game.feature-fullscreen .inventory-item,#game.feature-fullscreen .formation-slot,#game.feature-fullscreen .tower-floor-tile{border:3px solid #83a8ff!important;border-radius:3px!important;background:linear-gradient(135deg,#142c67,#0d1a3e)!important;box-shadow:inset 2px 2px #8dbdff,3px 4px #080e2d!important}
#game.feature-fullscreen .inventory-item.current,#game.feature-fullscreen .checkin-card.today,#game.feature-fullscreen .tower-floor-tile.active{border-color:#ffd46f!important;box-shadow:inset 0 0 0 2px #ffe393,0 0 10px #ffbc46!important}
#game.feature-fullscreen .inventory-info,#game.feature-fullscreen .item-feature{background:transparent!important}
#game.feature-fullscreen .item-feature strong{color:#ffe57c!important;font-size:28px!important}
#game.feature-fullscreen .item-description{font-size:25px!important;line-height:1.42!important}
/* 4 large pictorial destination banners, all independently functional. */
#game[data-view="dungeonHub"] .dungeon-card-grid{display:grid!important;grid-template-columns:1fr!important;gap:18px!important;padding:3px 2px 21px!important}
#game[data-view="dungeonHub"] .dungeon-card{position:relative;overflow:hidden;min-height:194px!important;display:flex!important;gap:8px!important;align-items:center!important;text-align:left!important;border:4px solid #ffcf6c!important;border-radius:4px!important;box-shadow:inset 0 0 0 3px #57c6ff,0 4px 0 #061630,0 0 12px #a752ff80!important;background-color:#0c2557!important;background-size:100% 100%!important;background-repeat:no-repeat!important;padding:9px 12px!important}
#game[data-view="dungeonHub"] .dungeon-card:nth-child(1){background-image:url('/assets/scenes/v22_card_farm.webp')!important}
#game[data-view="dungeonHub"] .dungeon-card:nth-child(2){background-image:url('/assets/scenes/v22_card_arena.webp')!important}
#game[data-view="dungeonHub"] .dungeon-card:nth-child(3){background-image:url('/assets/scenes/v22_card_tower.webp')!important}
#game[data-view="dungeonHub"] .dungeon-card:nth-child(4){background-image:url('/assets/scenes/v22_card_worldboss.webp')!important}
#game[data-view="dungeonHub"] .dungeon-card-icon{flex:0 0 164px!important;opacity:0!important;pointer-events:none}
#game[data-view="dungeonHub"] .dungeon-card-details{position:relative!important;z-index:2!important;max-width:390px!important;min-width:0!important;background:linear-gradient(90deg,#0b1448b0,#0a1753b2)!important;padding:10px 12px!important;display:flex!important;flex-direction:column!important;gap:8px!important}
#game[data-view="dungeonHub"] .dungeon-card-details strong{color:#fff0a2!important;font-size:31px!important;text-shadow:2px 2px #251337!important}
#game[data-view="dungeonHub"] .dungeon-card-details small,#game[data-view="dungeonHub"] .dungeon-card-details em{color:#eef5ff!important;font-size:19px!important;line-height:1.25!important}
#game[data-view="dungeonHub"] .dungeon-card-arrow{position:absolute;right:9px;color:#ffe273!important;font-size:52px!important;text-shadow:2px 2px #9e5a16!important;z-index:2}
/* Balo: crisp generous item slots and prize detail matching reference palette. */
#game[data-view="bag"] .inventory-grid{grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:9px!important}
#game[data-view="bag"] .inventory-item{min-height:170px!important;position:relative!important;gap:2px!important;padding:9px 4px!important}
#game[data-view="bag"] .inventory-item .ico{font-size:63px!important;width:72px!important;height:72px!important;display:block!important}
#game[data-view="bag"] .inventory-item .item-label{font-size:22px!important;line-height:1.15!important;white-space:normal!important;word-break:normal!important}
#game[data-view="bag"] .item-stack{position:absolute!important;top:2px;right:4px;font-size:21px!important;color:#ffe87e!important;background:#10101e;padding:2px 4px;border:1px solid #ffd978}
#game[data-view="bag"] .inventory-info{margin-top:12px!important}
/* Time-bound modes and battle result match the spacious cyan/gold panels. */
#game[data-view="tower"] .tower-hero-banner{border:4px solid #30c9ff!important;background:linear-gradient(125deg,#101c59,#083567)!important;box-shadow:inset 0 0 0 3px #14488c,0 4px #071427!important}
#game[data-view="tower"] .tower-banner-copy b,#game[data-view="tower"] .tower-banner-copy strong{color:#ffdb79!important;font-size:27px!important}
#game[data-view="tower"] .tower-foes .tower-enemy,#game[data-view="tower"] .tower-foes .tower-ally{border:3px solid #26d4fa!important;background:#0e2552!important}
#game[data-view="result"] .result-summary{border:4px solid #42dfff!important;border-radius:4px!important;background:linear-gradient(120deg,#082d5b,#1f1650)!important;box-shadow:inset 0 0 0 2px #a1e2ff,0 4px 0 #081b32!important}
#game[data-view="result"] .result-summary h2{color:#ffe17c!important;text-shadow:2px 3px #6f3729!important;font-size:43px!important}
#game[data-view="result"] .result-actions{gap:11px!important}
#game[data-view="result"] .result-actions .ui-btn{font-size:25px!important;min-height:80px!important}
/* Specific meaningful visual accents across secondary screens. */
#game[data-view="missions"] .mission-row{margin:13px 0!important;gap:13px!important;min-height:150px!important;padding:13px!important}
#game[data-view="missions"] .mission-ico{font-size:67px!important;min-width:76px!important}
#game[data-view="checkin"] .checkin-card{min-height:155px!important;font-size:24px!important}
#game[data-view="checkin"] .checkin-card>span{font-size:48px!important}
#game[data-view="wheel"] .wheel-ring{border:8px solid #ffd56e!important;box-shadow:0 0 0 5px #ac35d7,0 0 20px #e543f3,inset 0 0 18px #c52dff!important;background:conic-gradient(#60139e,#b22ddd,#721ea1,#d54fff,#451281,#9f28bf,#70189f,#b83cdb,#60139e)!important}
#game[data-view="wheel"] .wheel-centre{border:5px solid #ffe487!important;background:radial-gradient(#ffd76f,#df7c0c)!important;color:#401300!important;box-shadow:0 0 9px #ffdc64!important}
#game[data-view="summon"] .summon-main .neon-box{border-color:#d38aff!important;background:linear-gradient(150deg,#11194c,#39145f)!important}
#game[data-view="summon"] .summon-arts{background:radial-gradient(ellipse,#2c2078,#090f36)!important;border:3px solid #b86ffa!important;box-shadow:inset 0 0 14px #9b57e9!important}
#game[data-view="shop"] .shop-card{min-height:190px!important}
#game[data-view="shop"] .shop-card .ico{font-size:54px!important}
#game[data-view="heroDetail"] .detail-skill-row,#game[data-view="heroDetail"] .hero-card-v17{border-color:#57d8ff!important}
/* Every modal floats over real game DOM, keeping its actions accessible. */
#game .modal-screen{background:#04091aca!important;backdrop-filter:none!important}
#game .dialog{max-height:92%;overflow-y:auto;border:5px solid #ffce62!important;border-radius:4px!important;box-shadow:inset 0 0 0 4px #2bbfff,0 0 0 3px #10123b,0 0 30px #35afff8c!important;background:linear-gradient(#113b73,#101a45)!important;color:#fff!important}
/* LOBBY: independent, clickable art crops from the reference, NOT a flat UI screenshot. */
#game[data-view="lobby"]{border:0!important;background:#061731!important;box-shadow:none!important}
#game[data-view="lobby"] .lobby-area{background:#051833 url('/assets/scenes/lobby_user_new.webp') center 40%/cover no-repeat!important}
#game[data-view="lobby"] .hud{background:linear-gradient(#07112efc 62%,#06173100)!important;z-index:9!important}
#game[data-view="lobby"] .hud .player-card{border:3px solid #f5bf61!important;background:#0a1b45cc!important;box-shadow:inset 0 0 0 3px #7350b0,0 0 0 2px #553687!important}
#game[data-view="lobby"] .hud .res{border:3px solid #7f74c3!important;background:#0c2147!important;box-shadow:inset 0 0 0 2px #273a92!important;border-radius:0!important}
#game[data-view="lobby"] .hud .res strong{color:#fff9ec!important}
#game[data-view="lobby"] .hud .header-links{top:117px!important;left:170px!important;right:138px!important;gap:2px!important;height:108px!important}
#game[data-view="lobby"] .header-links .ui-btn.quicklink{flex:1!important;min-width:0!important;width:auto!important;height:104px!important;min-height:104px!important;border:0!important;border-radius:0!important;background:transparent!important;background-size:100% 100%!important;background-repeat:no-repeat!important;box-shadow:none!important;padding:0!important}
#game[data-view="lobby"] .header-links .ui-btn.quicklink .ico,#game[data-view="lobby"] .header-links .ui-btn.quicklink small{visibility:hidden!important}
#game[data-view="lobby"] .header-links .ui-btn:nth-child(1){background-image:url('/assets/ui/v22_events.png')!important}
#game[data-view="lobby"] .header-links .ui-btn:nth-child(2){background-image:url('/assets/ui/v22_monthly.png')!important}
#game[data-view="lobby"] .header-links .ui-btn:nth-child(3){background-image:url('/assets/ui/v22_rankings.png')!important}
#game[data-view="lobby"] .header-links .ui-btn:nth-child(4){background-image:url('/assets/ui/v22_vip.png')!important}
#game[data-view="lobby"] .header-links .ui-btn:nth-child(5){background-image:url('/assets/ui/v22_shop.png')!important}
#game[data-view="lobby"] .event-banner{left:575px!important;top:-82px!important;width:136px!important;height:129px!important;border:none!important;background:transparent url('/assets/ui/v22_summon_special.png') center/100% 100% no-repeat!important;box-shadow:none!important;border-radius:0!important;z-index:9!important}
#game[data-view="lobby"] .event-banner>*{visibility:hidden!important}
#game[data-view="lobby"] .lobby-side{top:175px!important;gap:1px!important;max-height:calc(100% - 225px)!important;overflow-y:auto!important;overflow-x:hidden!important;scrollbar-width:none!important}
#game[data-view="lobby"] .lobby-side.left{left:0!important}
#game[data-view="lobby"] .lobby-side.right{right:0!important}
#game[data-view="lobby"] .ui-btn.side-btn{width:105px!important;min-width:105px!important;height:112px!important;min-height:112px!important;border:0!important;background:transparent!important;background-size:100% 100%!important;background-position:center!important;box-shadow:none!important;padding:0!important;display:block!important;border-radius:0!important}
#game[data-view="lobby"] .ui-btn.side-btn .ico,#game[data-view="lobby"] .ui-btn.side-btn small{visibility:hidden!important}
#game[data-view="lobby"] .lobby-side.left>.ui-btn:nth-child(1){background-image:url('/assets/ui/v22_missions.png')!important}
#game[data-view="lobby"] .lobby-side.left>.ui-btn:nth-child(2){background-image:url('/assets/ui/v22_achievements.png')!important}
#game[data-view="lobby"] .lobby-side.left>.ui-btn:nth-child(3){background-image:url('/assets/ui/v22_mail.png')!important}
#game[data-view="lobby"] .lobby-side.left>.ui-btn:nth-child(4){background-image:url('/assets/ui/v22_friends.png')!important}
#game[data-view="lobby"] .lobby-side.left>.ui-btn:nth-child(5){background-image:url('/assets/ui/v22_guild.png')!important}
#game[data-view="lobby"] .lobby-side.left>.ui-btn:nth-child(6){background-image:url('/assets/ui/v22_handbook.png')!important}
#game[data-view="lobby"] .lobby-side.left>.ui-btn:nth-child(7){background-image:url('/assets/ui/v22_mail.png')!important}
#game[data-view="lobby"] .lobby-side.right>.ui-btn:nth-child(1){background-image:url('/assets/ui/v22_wheel.png')!important}
#game[data-view="lobby"] .lobby-side.right>.ui-btn:nth-child(2){background-image:url('/assets/ui/v22_checkin.png')!important}
#game[data-view="lobby"] .lobby-side.right>.ui-btn:nth-child(3){background-image:url('/assets/ui/v22_online.png')!important}
#game[data-view="lobby"] .lobby-side.right>.ui-btn:nth-child(4){background-image:url('/assets/ui/v22_dungeon.png')!important}
#game[data-view="lobby"] .timer-pill{position:relative;order:4;margin-top:-18px!important;z-index:2;font-size:17px!important;pointer-events:none!important}
#game[data-view="lobby"] .home-features{display:none!important}
#game[data-view="lobby"] .bottom-nav{height:142px!important;background:linear-gradient(#170e3e,#111132)!important;border:4px solid #f3c769!important;box-shadow:inset 0 0 0 3px #5a5ea8!important;padding:6px!important;gap:3px!important;border-radius:0!important}
#game[data-view="lobby"] .bottom-nav .ui-btn.nav-btn{height:125px!important;min-height:125px!important;background:transparent!important;background-size:100% 100%!important;border:0!important;box-shadow:none!important;border-radius:0!important;gap:0!important;padding:0!important}
#game[data-view="lobby"] .bottom-nav .ui-btn.nav-btn .ico,#game[data-view="lobby"] .bottom-nav .ui-btn.nav-btn small{visibility:hidden!important}
#game[data-view="lobby"] .bottom-nav .ui-btn.nav-btn:nth-child(1){background-image:url('/assets/ui/v22_nav_lobby.png')!important}
#game[data-view="lobby"] .bottom-nav .ui-btn.nav-btn:nth-child(2){background-image:url('/assets/ui/v22_nav_heroes.png')!important}
#game[data-view="lobby"] .bottom-nav .ui-btn.nav-btn:nth-child(3){background-image:url('/assets/ui/v22_nav_bag.png')!important}
#game[data-view="lobby"] .bottom-nav .ui-btn.nav-btn:nth-child(4){background-image:url('/assets/ui/v22_nav_summon.png')!important}
#game[data-view="lobby"] .bottom-nav .ui-btn.nav-btn:nth-child(5){background-image:url('/assets/ui/v22_nav_missions.png')!important}
#game[data-view="lobby"] .bottom-nav .ui-btn.nav-btn:nth-child(6){background-image:url('/assets/ui/v22_nav_map.png')!important}
#game[data-view="lobby"] .bottom-nav .ui-btn.nav-btn.selected{filter:brightness(1.12)!important;background-color:transparent!important}
#game[data-view="lobby"] .menu-edge-toggle{border:3px solid #ffe0a2!important;background:#0a3176!important;color:white!important}
@media(prefers-reduced-motion:reduce){#game .ui-btn{transition:none!important}}
/* High-detail bag item miniatures cut from the supplied reference, not static screen tiles. */
#game[data-view="bag"] .v22-item-art{width:95px!important;height:88px!important;object-fit:contain!important;image-rendering:pixelated!important;display:block!important;margin:auto!important}
#game[data-view="bag"] .big-item .v22-item-art{width:126px!important;height:116px!important}
/* Win the cascade over V21 .hud shorthand, which previously hid the new top icons. */
#game[data-view="lobby"] .hud .header-links .ui-btn:nth-child(1){background-image:url('/assets/ui/v22_events.png')!important}
#game[data-view="lobby"] .hud .header-links .ui-btn:nth-child(2){background-image:url('/assets/ui/v22_monthly.png')!important}
#game[data-view="lobby"] .hud .header-links .ui-btn:nth-child(3){background-image:url('/assets/ui/v22_rankings.png')!important}
#game[data-view="lobby"] .hud .header-links .ui-btn:nth-child(4){background-image:url('/assets/ui/v22_vip.png')!important}
#game[data-view="lobby"] .hud .header-links .ui-btn:nth-child(5){background-image:url('/assets/ui/v22_shop.png')!important}
#game[data-view="dungeonHub"] .dungeon-card-details strong{font-size:35px!important}
#game[data-view="dungeonHub"] .dungeon-card-details small,#game[data-view="dungeonHub"] .dungeon-card-details em{font-size:23px!important}

/* V22 readability corrections after browser screenshots. */
#game[data-view="lobby"] .hud{overflow:visible!important}
#game[data-view="lobby"] .hud .header-links{height:116px!important}
#game[data-view="lobby"] .hud .header-links .ui-btn.quicklink{height:116px!important;min-height:116px!important}
#game[data-view="lobby"] .lobby-side.left>.ui-btn:nth-child(7){background-image:url('/assets/ui/v22_chat.png')!important}
#game[data-view="shop"] .shop-card .v22-item-art{width:90px;height:86px;object-fit:contain;image-rendering:pixelated;margin:0 auto 3px;display:block}
#game[data-view="shop"] .shop-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important}
#game[data-view="shop"] .shop-card{min-height:202px!important}
/* V22 battle: polished action HUD without altering turn/animation state machine. */
#game[data-view="battle"] .battle-head .battle-top .ui-btn,
#game[data-view="battle"] .battle-head .b-toptitle{background:linear-gradient(#184479,#0a244d)!important;border:3px solid #39d8ff!important;border-radius:2px!important;color:#f8f4ec!important;text-shadow:1px 2px #03132e!important;box-shadow:inset 0 0 0 2px #226db1!important}
#game[data-view="battle"] .battle-stage-label{background:#0e2a56e8!important;color:#fff5d2!important;border:3px solid #39cdf7!important;box-shadow:inset 0 0 0 1px #76bfff!important}
#game[data-view="battle"] .conditions{background:#0a2058dc!important;border:3px solid #4dd3fb!important;border-radius:3px!important;color:#f7e7b2!important;box-shadow:inset 0 0 0 2px #113879!important}
#game[data-view="battle"] .battle-view .skills-bar,#game[data-view="battle"] .battle-view .turn-queue{background:linear-gradient(#12346b,#091a45)!important;border:3px solid #3de1ff!important;box-shadow:inset 0 0 0 3px #164a86,0 3px 0 #070d24!important;border-radius:0!important}
#game[data-view="battle"] .skills-bar .ui-btn.skill-btn{border:3px solid #37bcff!important;background:linear-gradient(#19417b,#0b1c4a)!important;box-shadow:inset 0 0 0 2px #1b67aa!important;border-radius:3px!important}
#game[data-view="battle"] .skills-bar .ui-btn.skill-btn.highlight{border-color:#ffdc70!important;box-shadow:inset 0 0 0 2px #f9bc5d,0 0 10px #ffc13b!important}
#game[data-view="battle"] .fighter-ring{border-color:#8bceff!important}
#game[data-view="battle"] .fighter.enemy .fighter-ring{border-color:#ff7386!important}
#game[data-view="battle"] .battle-view .hp-label{color:white!important;text-shadow:1px 1px #071a2e!important}

/* V22-R: shared acquisition dungeon UX; pixel-native, no modern blur. */
.farm-acquisition{display:flex;flex-direction:column;gap:12px;padding-bottom:24px}
.farm-collection-tabs,.farm-difficulty-tabs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
.farm-collection-tab{min-height:72px;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:4px;font-size:20px}
.farm-collection-tab span{font-size:15px;font-weight:800}
.farm-collection-tab.selected,.farm-difficulty.selected,.farm-chapter.active,.farm-stage.active{border-color:#ffd166!important;box-shadow:inset 0 0 0 2px #fff1a0,0 0 0 2px #8a5a14!important;color:#fff0bc}
.farm-difficulty{min-height:48px;font-weight:800}.farm-difficulty.diff-normal{border-color:#34cc78}.farm-difficulty.diff-elite{border-color:#b65cff}.farm-difficulty.diff-hard{border-color:#f05252}
.farm-chapter-list{display:flex;gap:8px;overflow-x:auto;padding:6px 2px;scrollbar-width:thin}
.farm-chapter{flex:0 0 142px;min-height:48px}
.farm-stage-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:6px}
.farm-stage{min-width:0;min-height:62px;padding:4px 2px!important;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px}
.farm-stage strong{font-size:18px}.farm-stage small{font-size:11px;line-height:1.15}.farm-stage.locked{opacity:.55}.farm-stage.cleared{border-color:#34cc78}
.farm-loot-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:10px 0}
.farm-loot-card{background:#142939;border:2px solid #527b98;display:flex;gap:8px;align-items:center;padding:7px;min-width:0;overflow:hidden}
.farm-loot-card .v22-item-art{width:38px;height:38px;flex-shrink:0;image-rendering:pixelated}.farm-loot-card strong{display:block;font-size:13px;line-height:1.3}.farm-loot-card small{color:#ffd166}
.farm-material-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
.farm-material-chip{font-size:13px!important;min-height:52px;text-align:left;white-space:normal!important;padding:6px!important;display:flex;flex-direction:column;gap:3px}
.farm-material-chip small{color:#b8cedd;font-size:10px}
.farm-grade{padding:2px 8px;border:2px solid currentColor}.farm-grade-r{color:#34cc78}.farm-grade-sr{color:#3c98ec}.farm-grade-ssr{color:#b65cff}.farm-grade-ur{color:#ffd166}
.farm-source-link{margin-bottom:8px}
/* V22-R Reference UI: real DOM controls, based on five user-supplied pixel RPG references.
   Does not change combat, awards, saved progress, or hero databases. */
#game{--ref-blue:#30caff;--ref-gold:#ffd364;--ref-ink:#071735;--ref-purple:#b55cf9}
#game.feature-fullscreen .page-title{height:82px!important}
#game.feature-fullscreen .page-content{scroll-padding-top:12px!important;padding-bottom:52px!important;overscroll-behavior:contain}
#game.feature-fullscreen .hub-return{margin:6px auto 15px!important;text-align:center}
#game.feature-fullscreen .hub-return .ui-btn{width:83%;background:linear-gradient(#8533d0,#461381 53%,#22094d)!important;border:3px solid #eb87ff!important;color:white!important;box-shadow:inset 0 0 0 3px #913cf2,0 5px 0 #16092b!important;font-size:24px!important;min-height:53px!important}
.reference-mode{position:relative;z-index:1;padding:0 4px 35px;color:#f8f5ff}
.reference-frame{position:relative;padding:17px;border:3px solid #42d5ff;background:linear-gradient(140deg,#0d285aef,#07132dec 75%,#160d32e9);box-shadow:inset 0 0 0 3px #102867,0 0 0 2px #04112b,0 5px 0 #03152e!important;margin-bottom:20px}
.reference-frame::before,.reference-frame::after{content:'◆';position:absolute;color:#ffce65;text-shadow:1px 1px #7644af;pointer-events:none;font-size:20px;z-index:3}
.reference-frame::before{top:-12px;left:-8px}.reference-frame::after{right:-9px;bottom:-12px}
.gold-outline{border-color:#ffcd60;box-shadow:inset 0 0 0 3px #c23ce1,0 0 0 2px #21114d,0 5px 0 #d17e20!important}
.reference-mode h2{color:#ffe9a2;font-size:29px;line-height:1.17;margin:0 0 12px;text-shadow:2px 2px #250c3c;font-weight:900}
.reference-mode p{font-size:20px;line-height:1.35;margin:8px 0;color:#eaf5ff}
.reference-mode .ui-btn{font-weight:900}
#game.feature-fullscreen[data-view="tower"]{background:linear-gradient(#080f30dc,#0a1442cc),url('/assets/scenes/ref_tower_footer.webp') center bottom / 100% 260px no-repeat,#071b44!important}
#game.feature-fullscreen[data-view="farm"]{background:linear-gradient(#080e37dc,#101847cc),url('/assets/scenes/ref_farm_footer.webp') center bottom / 100% 230px no-repeat,#07163c!important}
#game.feature-fullscreen[data-view="arena"]{background:linear-gradient(#03234be9,#071332c7),url('/assets/scenes/ref_arena_footer.webp') center bottom /100% 130px no-repeat,#08142d!important}
#game.feature-fullscreen[data-view="worldboss"]{background:linear-gradient(#062849df,#0b133aca),url('/assets/scenes/ref_boss_footer.webp') center bottom /100% 125px no-repeat,#071733!important}
/* Sảnh: user reference has four top quick links, six left buttons, three right buttons. */
#game[data-view="lobby"] .hud .header-links{right:140px!important;left:165px!important;gap:6px!important}
#game[data-view="lobby"] .hud .header-links>.ui-btn:nth-child(3){background-image:url('/assets/ui/v22_vip.png')!important}
#game[data-view="lobby"] .hud .header-links>.ui-btn:nth-child(4){background-image:url('/assets/ui/v22_shop.png')!important}
#game[data-view="lobby"] .lobby-side.left>.ui-btn:nth-child(6){background-image:url('/assets/ui/v22_chat.png')!important}
#game[data-view="lobby"] .lobby-side.left>.ui-btn:nth-child(7){display:none!important}
#game[data-view="lobby"] .lobby-side.right .timer-pill{order:3!important}
#game[data-view="lobby"] .lobby-dungeon-access{position:absolute;top:245px;left:216px;width:310px;height:63px;z-index:8}
#game[data-view="lobby"] .lobby-dungeon-btn{width:100%;height:100%;min-height:63px;border:4px solid #ffd46e!important;background:linear-gradient(180deg,#1c5386,#092653 65%,#170c4b)!important;box-shadow:inset 0 0 0 3px #49cfff,0 3px #061329!important;color:#fff4c9!important;text-shadow:2px 2px #031c3b!important;font-size:19px;letter-spacing:.3px;white-space:nowrap}
#game[data-view="lobby"] .lobby-dungeon-btn .ico{display:inline-block!important;width:28px;height:28px;margin-right:5px;vertical-align:middle}
#game[data-view="lobby"] .lobby-dungeon-access:has(.lobby-dungeon-btn:active){filter:brightness(1.15)}
/* Hub cards use existing separate scenic card assets and original router. */
#game[data-view="dungeonHub"] .reference-hub-caption{text-align:center;font-size:18px;color:#ffe4a3;letter-spacing:1px;margin:12px 0 22px}
#game[data-view="dungeonHub"] .reference-hub-tools{display:flex;gap:14px;margin-top:15px;padding-bottom:10px}
#game[data-view="dungeonHub"] .reference-hub-tools .ui-btn{flex:1}
/* Tower reference screen: current floor and the battle button are above fold. */
.rt-banner{display:flex;gap:20px;align-items:center;min-height:176px}
.rt-art{flex:0 0 160px;position:relative;transform:scale(.85);transform-origin:center}
.rt-copy{flex:1;min-width:0}
.rt-copy h2{font-size:30px!important}
.rt-copy strong,.rt-copy b{color:#ffd975}
.rt-copy p{margin:5px 0!important;font-size:20px}
.rt-current{margin-top:25px;padding-top:34px}
.rt-ribbon{width:75%;margin:-56px auto 23px!important;text-align:center;border:3px solid #ed8cff;background:linear-gradient(#a03bf0,#51109d 66%,#2c0a5a);box-shadow:inset 0 0 0 3px #c98dff,0 4px #1b0c4f;padding:10px;color:#fff6b7!important;white-space:nowrap;font-size:29px!important}
.rt-ribbon b{font-size:39px;color:#ffcf49}
.rt-reward-line{border:3px solid #e295fb;background:linear-gradient(90deg,#391669,#171443);padding:11px 9px;display:flex;align-items:center;gap:13px;flex-wrap:wrap;font-size:19px;margin-bottom:17px}
.rt-reward-line>b{color:#ffcde9}.rt-reward-line .tower-reward-item{display:inline-block;color:#ffe18c;font-weight:800}
.rt-party{border:3px solid #3cbffa;background:linear-gradient(#0e3b78,#06142e);box-shadow:inset 0 0 0 2px #1d7cb7;padding:10px}
.rt-party-head{display:flex;justify-content:space-between;align-items:center;border-bottom:2px solid #54c6ff;padding-bottom:8px;margin-bottom:12px;font-size:22px}
.rt-party-head span{color:#ffe38c}
.rt-party-row{display:flex;gap:10px;align-items:stretch}
.rt-team{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:4px;flex:1;min-width:0}
.rt-team .tower-ally{min-width:0;height:113px;border:2px solid #39d1ff;background:#06274d;overflow:hidden;display:flex;flex-direction:column;align-items:center;padding:3px}
.rt-team .tower-ally img{height:79px;width:100%;object-fit:contain;image-rendering:pixelated}
.rt-team .tower-ally small{display:block;width:100%;font-size:12px;color:#fff;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:center}
#game.feature-fullscreen .rt-fight{width:137px;min-width:137px;min-height:111px!important;font-size:24px!important;white-space:normal;padding:3px!important;line-height:1.3}
.rt-next{margin-top:15px;padding:10px;background:linear-gradient(#491a70,#1a124c);border:3px solid #db80ff;font-size:20px;color:#fff1c4}
.rt-next b{color:#ffe37a}
/* Farm reference: ten individually actionable rows with real generated loot. */
.rf-hero{display:flex;align-items:center;gap:14px;min-height:160px}
.rf-hero-symbol{width:197px;flex:0 0 197px;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:8px;color:#ffd87b;font-size:20px;background:radial-gradient(ellipse,#6530b5,#221153 65%,transparent);min-height:126px}
.rf-hero-symbol .ico{width:72px;height:72px;filter:drop-shadow(0 0 8px #ed8bff)}
.rf-hero-copy{flex:1;min-width:0}.rf-hero-copy p{font-size:18px}.rf-hero-copy small{color:#b9dfff;font-size:17px}
.rf-tabs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;margin-bottom:13px}
#game.feature-fullscreen .rf-tabs .ui-btn{font-size:24px!important;min-width:0;padding:5px;min-height:62px}
#game.feature-fullscreen .rf-tabs .selected{border-color:#ffe480!important;background:linear-gradient(#a433ed,#3d116f)!important;color:#fff!important}
.rf-controls{display:grid;gap:7px;margin-bottom:13px}
.rf-difficulties{display:flex;gap:7px}
#game.feature-fullscreen .rf-difficulties .ui-btn{flex:1;font-size:19px!important;min-height:46px!important}
#game.feature-fullscreen .rf-difficulties .rf-normal{border-color:#48de95!important}#game.feature-fullscreen .rf-difficulties .rf-elite{border-color:#bd88fd!important}#game.feature-fullscreen .rf-difficulties .rf-hard{border-color:#ff7891!important}
.rf-chapters{display:flex;overflow-x:auto;gap:6px;padding:3px;scrollbar-width:thin}
#game.feature-fullscreen .rf-chapter{min-width:88px;min-height:47px!important;font-size:18px!important}
.rf-stage-panel{padding:14px 10px}
.rf-heading{text-align:center;font-size:29px;border-bottom:2px solid #a856f4;padding:8px;margin-bottom:12px}
.rf-rows{display:flex;flex-direction:column;gap:5px}
.rf-row{display:grid;grid-template-columns:116px minmax(0,1fr) 146px;min-height:72px;border:2px solid #913aef;background:linear-gradient(#301156,#13153a);align-items:center;gap:6px;padding:4px}
.rf-row.focused{outline:2px solid #ffe18b;outline-offset:-4px}
.rf-row.locked{opacity:.65}
.rf-stage{height:59px;padding:2px;border:2px solid #cf8aff;background:#32105e;color:white;cursor:pointer;display:flex;flex-direction:column;justify-content:center;align-items:center}
.rf-stage b{font-size:19px}.rf-stage small{font-size:13px;color:#d7c3ee}.rf-stage:disabled{cursor:not-allowed}
.rf-drops{display:flex;flex-wrap:wrap;align-items:center;gap:4px;min-width:0}
.rf-item{display:flex;align-items:center;gap:3px;padding:2px;border:1px solid #9a62ef;background:#221449;max-width:32%;overflow:hidden}
.rf-item .v22-item-art{width:26px;height:26px;object-fit:contain;flex-shrink:0;image-rendering:pixelated}
.rf-item span{font-size:10px;max-width:56px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.rf-gold{display:none;color:#ffca66;font-size:15px}
#game.feature-fullscreen .rf-row-fight{min-height:52px!important;font-size:17px!important;line-height:1.12;padding:3px!important}
.rf-bottom{padding:14px}.rf-bottom h3{font-size:23px;color:#ffe1a7;margin:0 0 9px}
.rf-selected-loot{display:flex;flex-wrap:wrap;gap:8px}
.rf-loot{display:flex;gap:4px;align-items:center;background:#1b2655;border:2px solid #7a69b8;padding:3px}
.rf-loot img{width:29px;height:29px;object-fit:contain}
.rf-loot span{font-size:16px}
/* Arena reference cyan edges, three real opponent choice actions. */
#game[data-view="arena"] .reference-frame{margin-bottom:20px}
.reference-arena h2{border-bottom:2px solid #38baf1;padding:6px 2px;color:#f2faff}
.ra-score-data{display:grid;grid-template-columns:1fr 1fr;gap:9px}
.ra-rating{min-height:155px;display:flex;flex-direction:column;justify-content:center;align-items:center;border-right:3px solid #42c8fb;color:#ffd45a}
.ra-rating strong{font-size:76px;line-height:1.03;text-shadow:3px 3px #38233b}.ra-rating span{font-size:29px;font-weight:900}
.ra-stats{display:flex;flex-direction:column;justify-content:center}.ra-stats p{border-bottom:2px solid #428bc7;padding:5px 2px;font-size:21px;margin:0}
.ra-opponents{padding:12px}.ra-opponent{display:grid;grid-template-columns:82px minmax(0,1fr) 186px;gap:11px;align-items:center;padding:9px;background:linear-gradient(#10417f,#0b2855);border:3px solid #459fe1;margin:8px 0}
.ra-avatar{width:76px;height:91px;border:3px solid #cc8aff;background:#19255a;display:flex;justify-content:center;align-items:end}
.ra-avatar img{width:100%;height:100%;object-fit:contain;image-rendering:pixelated}
.ra-opponent-meta{min-width:0;display:flex;flex-direction:column;gap:2px}.ra-opponent-meta b{font-size:25px}.ra-opponent-meta span{font-size:19px}.ra-opponent-meta small{font-size:17px;color:#b8e0fa}
#game.feature-fullscreen .ra-fight{font-size:23px!important;min-height:60px!important;white-space:normal}
.ra-history-item{display:flex;gap:11px;padding:9px;border:2px solid #4fbfff;margin-top:6px;font-size:20px}
.ra-history-item b{color:#ffe46a}.ra-history-item small{margin-left:auto;color:#aed8e9;font-size:16px}
.ra-rank{text-align:center}.ra-rank h2{text-align:left}
/* Boss reference hero, real selected boss ID and player data. */
.rb-choices{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin:2px 0 18px}
#game.feature-fullscreen .rb-choices .boss-choice{display:flex;flex-direction:column;align-items:center;justify-content:end;min-width:0;height:151px;padding:8px 3px!important;border:3px solid #4bd4ff!important;background:linear-gradient(#07649f,#082951)!important}
.rb-choices .boss-choice img{height:96px!important;max-width:98%;min-width:0;object-fit:contain;image-rendering:pixelated}
.rb-choices .boss-choice small{font-size:16px;line-height:1.06;white-space:normal;text-align:center;min-height:35px}
#game.feature-fullscreen .rb-choices .selected{border-color:#ffe36b!important;background:linear-gradient(#1590d5,#0d3d79)!important;box-shadow:0 0 0 3px #dca951,inset 0 0 0 3px #64eaff!important}
.rb-main{padding:18px 16px 23px}.rb-main h2{text-align:center;font-size:32px;border-bottom:2px solid #dcc26a;padding-bottom:10px}
.rb-showcase{display:grid;grid-template-columns:52% minmax(0,1fr);min-height:270px;gap:10px}
.rb-figure{height:280px;position:relative;display:flex;align-items:center;justify-content:center;background:radial-gradient(ellipse,var(--boss-color) 0,transparent 64%)}
.rb-figure img{position:relative;z-index:2;width:100%;height:270px;object-fit:contain;image-rendering:pixelated;filter:drop-shadow(0 0 10px var(--boss-color))}
.rb-aura{pointer-events:none;position:absolute;inset:15px;background:radial-gradient(ellipse,var(--boss-color),transparent 65%);opacity:.25;animation:bossPulse 2.4s ease-in-out infinite alternate}
@keyframes bossPulse{from{opacity:.15;transform:scale(.88)}to{opacity:.36;transform:scale(1.09)}}
.rb-info{background:linear-gradient(#0b3665e8,#0a1c42ea);border:3px solid #53c9ff;align-self:center;padding:11px 7px;min-width:0}
.rb-info strong{display:block;text-align:center;color:#ffd77e;font-size:29px}.rb-info p{border-bottom:2px solid #3777ab;padding:7px 1px;font-size:20px;margin:3px 0;line-height:1.25}.rb-info small{font-size:16px}
.rb-prizes .prize-row{display:grid;grid-template-columns:repeat(3,1fr);margin:20px 0 13px;gap:10px}.rb-prizes .prize{min-height:83px}
#game.feature-fullscreen .rb-fight{display:block;width:85%;margin:13px auto 6px;font-size:32px!important;min-height:89px!important}
.rb-rank{font-size:19px}
@media(prefers-reduced-motion:reduce){.rb-aura{animation:none}}
