/* Bright, compact interface inspired by the supplied screen references.
   All icons and scene art remain Forge Stars assets. */
:root{
  --ref-blue:#079be9;--ref-blue-dark:#075c8c;--ref-red:#ff5c6a;
  --ref-slate:#41495b;--ref-edge:#111722;--ref-paper:#fff;
}
body{background:#11151e;font-family:'Work Sans',system-ui,sans-serif;font-weight:600}
h1,h2,h3{font-family:'Work Sans',system-ui,sans-serif;font-weight:800;letter-spacing:0}
#app{background:#fff;background-image:none;box-shadow:0 0 0 1px #11151e}
button:focus-visible{outline-color:#079be9}
.top{height:58px;gap:6px;padding:7px 8px;background:#087b16;border:0;box-shadow:none;color:#fff}
/* The player card carries both identity and battle power, as it does in the
   reference.  That leaves the two adjacent framed pills for currencies. */
.top .profileBar{max-width:none;flex:0 1 43%;min-width:0;border:2px solid #050806;border-radius:8px;padding:2px 7px 2px 2px;background:#132217;box-shadow:inset 0 1px 0 #456045;text-align:left}
.top .profileBar .avatar{width:42px;height:42px;border-radius:6px;border:2px solid #050806;background:#fff}
.top .profileCopy{display:flex;min-width:0;flex:1;flex-direction:column;justify-content:center;gap:1px}
.top .profileBar .pname{font-size:12px;font-weight:900;color:white;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-shadow:-1px -1px #111722,1px 1px #111722,1px -1px #111722,-1px 1px #111722}
.top .profilePower{display:flex;align-items:center;gap:3px;min-width:0;color:#f7c84b;font-size:15px;font-weight:900;line-height:1;text-shadow:-1px -1px #111722,1px 1px #111722,1px -1px #111722,-1px 1px #111722}
.top .profilePower .ic{display:grid;place-items:center;width:18px;height:18px;flex:none;border-radius:50%;background:#3e4853;border:1px solid #080b0b}
.top .profilePower .ic .aicon{width:14px;height:14px}
.top .profilePower .v{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.top .res{min-width:0;flex:1 1 0;padding:5px 6px 5px 29px;border:2px solid #080b0b;border-radius:9px;background:#111c14;box-shadow:inset 0 1px 0 #506459}
.top .res .ic{width:29px;height:29px;left:-3px;margin-top:-15px;border-radius:50%;border:2px solid #080b0b;background:#4a5360}
.top .res.coin .ic{background:#d5a82d}.top .res.gem .ic{background:#cc5b9c}
.top .res .ic .aicon{width:19px;height:19px}
.top .res .v{font-size:13px;font-weight:900;color:#fff;text-shadow:-1px -1px #111722,1px 1px #111722,1px -1px #111722,-1px 1px #111722}
.top .res::after{content:"+";position:absolute;z-index:2;left:17px;bottom:1px;width:15px;height:15px;border:2px solid #111722;border-radius:50%;background:#44df32;color:#111722;font:900 17px/11px system-ui;text-align:center;text-shadow:none}

.page.pad{--parch1:#151922;--parch2:#4e5662;--ink:#11151e;--ink2:#46505b;
  color:#11151e;background:#fff;min-height:calc(100dvh - var(--topH) - var(--tabH));padding:16px 14px calc(90px + var(--safe-b))}
.page.pad .mini,.page.pad .t2{color:#4e5662}
.page.pad .lock{background:#f1f2f4;border:2px dashed #bfc4cc;color:#55606d}
.page.pad .tt{color:#131820;font-size:14px;font-weight:800;border-bottom:1px solid #d8dce2;padding:8px 0;margin:12px 0 8px}
.panel{margin-bottom:12px;background:#fff;border:0;border-radius:4px;box-shadow:none;overflow:visible}
.panel>.ph{background:#fff!important;color:#11151e!important;text-shadow:none;border:0;padding:8px 2px}
.panel>.ph::before,.pb::before,.row::before{display:none!important}
.panel>.ph h2{font-size:23px;color:#10151b;text-shadow:1px 2px #d7dce0}
.panel>.ph h2::before{display:none!important}
.panel>.ph{position:relative}
.pb{padding:8px 0;background:#fff}
.row{background:#f4f5f7;border:1px solid #dce0e5;border-radius:6px;box-shadow:none;margin-bottom:6px;padding:9px}
.row .t1{color:#10151b;font-size:14px;font-weight:800}
.row .t2{color:#535d69;font-size:12px}
.row.me{outline:3px solid #079be9;outline-offset:-3px;background:#dff5ff}
.pageTitle{text-align:center;margin:8px 0 18px}.pageTitle h1{font-size:26px}.pageTitle p{margin:2px 0 0;color:#505b67;font-size:13px}
.pageBack{display:inline-flex;align-items:center;gap:6px;background:#ff5c6a;border:2px solid #10151b;border-radius:7px;
  box-shadow:0 3px 0 #85282f;color:#fff;padding:6px 9px;font-size:12px;margin:0 0 12px}
.battleMenu{display:grid;gap:10px}.battleMenu button{display:flex;align-items:center;gap:12px;text-align:left;padding:12px;
  background:#f2f5f8;border:2px solid #131820;border-radius:8px;box-shadow:0 4px 0 #a8adb5;color:#10151b}
.battleMenu img{width:42px;height:42px}.battleMenu span{flex:1}.battleMenu b,.battleMenu small{display:block}.battleMenu b{font-size:18px}.battleMenu small{font-size:11px;color:#59636e;font-weight:600}
.battleMenu strong{background:#079be9;border:2px solid #111722;border-radius:6px;padding:6px;color:#fff;font-size:12px}
.dungeonIntro{text-align:center;margin:0 0 14px}.dungeonIntro h2{font-size:25px}.dungeonIntro p{max-width:380px;margin:2px auto;font-size:12px;line-height:1.25}
.dungeonCard,.dungeonPreview{position:relative;display:block;width:100%;overflow:hidden;border:3px solid #111722;border-radius:10px;
  background:linear-gradient(160deg,#d9f9d5 0%,#a9e7c0 42%,#5ca989 43%,#48866d 100%);box-shadow:0 5px 0 #a7aab0}
.dungeonCard{height:105px;margin:0 0 13px;text-align:left}.dungeonCard img,.dungeonPreview img{position:absolute;right:20%;bottom:-20px;height:110%;max-width:40%;object-fit:contain;filter:drop-shadow(2px 3px 0 #142025)}
.dungeonCard .dungeonName{position:absolute;left:8px;top:7px;color:#fff;font-size:19px;font-weight:900;text-shadow:-2px -2px #111722,2px -2px #111722,-2px 2px #111722,2px 2px #111722}
.dungeonKeys{position:absolute;right:11px;top:8px;display:flex;align-items:center;color:#fff;text-shadow:2px 2px #111722;font-size:15px;font-weight:900}
.dungeonOpen{position:absolute;right:9px;bottom:8px;background:#079be9;color:#fff;border:2px solid #111722;border-radius:6px;padding:5px 13px;box-shadow:0 3px 0 #075c8c;font-size:13px}
.dungeonCard.locked{filter:saturate(.68)}.dungeonCard.locked .dungeonOpen{background:#747b84;box-shadow:0 3px 0 #424951}
.dungeon-ghost{background:linear-gradient(150deg,#263933,#50665b 42%,#787990 43%,#454967 100%)}
.dungeon-inv{background:linear-gradient(150deg,#f8e9cf,#cbb9a4 42%,#9f8b90 43%,#756576 100%)}
.dungeon-zomb{background:linear-gradient(150deg,#e9ddfa,#bdb1dc 45%,#a282a8 46%,#665777 100%)}
.dungeonPreview{height:135px;margin:0 0 14px;box-shadow:none}.dungeonPreview img{right:30%;height:125%}
.dungeonDetail{text-align:center;margin:9px 0 16px}.dungeonDetail b,.dungeonDetail span{display:block}.dungeonDetail b{font-size:18px}.dungeonDetail span{font-size:12px;color:#535d69}
#pShop.page.pad{background:#5c1f59;color:#fff}
#pShop .panel,#pShop .panel .pb,#pShop .panel>.ph{background:transparent!important;color:#fff!important}
#pShop .panel>.ph h2{color:#f7e74b;text-shadow:2px 2px #241525;font-size:24px;margin:0 auto}
#pShop .seg{background:#3d193f;border-color:#1b1025}#pShop .seg button{background:#3d193f}#pShop .seg button.on{background:#079be9}
.shopBalance{display:flex;align-items:center;gap:4px;font-weight:900;font-size:13px;margin-bottom:12px}.shopBalance span{display:flex;align-items:center;gap:4px;margin-left:auto}
.shopRibbon{background:#f5d329;color:#231718;border:2px solid #24131b;clip-path:polygon(0 0,100% 0,96% 50%,100% 100%,0 100%,4% 50%);text-align:center;font-size:19px;font-weight:900;padding:5px;margin:13px 0 7px;text-shadow:0 1px #fff}
.shopIntro{text-align:center;font-size:11px;color:#fff;margin:2px 0 12px}.shopDealGrid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.shopDeal{display:flex;flex-direction:column;align-items:center;justify-content:flex-end;gap:5px;background:#fff;color:#141923;border:2px solid #161321;border-radius:7px;padding:8px;min-height:115px;text-align:center}
.shopDeal>.aicon{height:42px;width:42px;object-fit:contain}.shopDeal b{font-size:12px;line-height:1.1}.shopDeal .btn{font-size:11px;padding:5px 7px}

.btn,.page.pad .btn{color:#fff;border:2px solid #121923;border-radius:7px;background:#dde0e4;box-shadow:0 4px 0 #969ca4;
  text-shadow:1px 1px #17202b;font-size:14px;padding:9px 14px}
.btn::before{display:none}.btn:disabled{color:#545c67;text-shadow:none}
.btn.pri,.btn.info,.btn.go,.page.pad .btn.pri,.page.pad .btn.info,.page.pad .btn.go{background:#079be9;color:#fff;box-shadow:0 4px 0 #075c8c}
.btn.bad,.page.pad .btn.bad{background:#ff5c6a;color:#fff;box-shadow:0 4px 0 #9b3139}
.btn.sm{padding:5px 9px;font-size:12px;box-shadow:0 3px 0 #969ca4}
.btn.sm.pri,.btn.sm.info,.btn.sm.go{box-shadow:0 3px 0 #075c8c}
.seg{position:sticky;top:var(--topH);z-index:20;background:#d9dce0;border:2px solid #111722;border-radius:9px;padding:3px;gap:2px;margin:0 0 14px}
.seg button{background:var(--ref-slate);color:#fff;border:0;border-radius:5px;padding:9px 4px;box-shadow:none;font-weight:800;font-size:13px}
.seg button.on{background:#079be9;box-shadow:0 3px 0 #075c8c;color:#fff}

/* Reference home: arena on top, compact collection and forge controls below. */
#pHome.on{background:#f8fbff;padding:0 7px 0;overflow:hidden}
/* Home is one phone screen.  The scene is deliberately capped so a short
   portrait viewport still shows the forge, chat preview, and navigation. */
#pHome.on .arena{margin:0 -7px 5px;min-height:155px;height:auto;max-height:none;flex:1 1 auto;border-bottom:3px solid #141924;background:#078b18}
/* The live SVG supplies the islands and combat lane; the base remains the
   saturated green field used by the supplied main-screen reference. */
#pHome.on .arena{isolation:isolate;background:#10931c}
/* Extra islands live above the compact SVG's combat lane on tall phones, so
   the green map stays illustrated from the header down to the fighters. */
#pHome.on .arena::before,#pHome.on .arena::after{content:"";position:absolute;z-index:0;width:31%;height:15%;background:#402b49;filter:drop-shadow(0 3px 0 #51c941) drop-shadow(0 5px 0 #111722);clip-path:polygon(10% 10%,72% 0,100% 28%,76% 47%,87% 93%,42% 100%,0 62%,20% 42%)}
#pHome.on .arena::before{left:-4%;top:18%;transform:rotate(-5deg)}
#pHome.on .arena::after{right:5%;top:27%;transform:scaleX(-1) rotate(-7deg)}
.stagehead{top:17px}.stagemid{background:transparent;box-shadow:none;padding:1px 8px}
.stagemid b{font-family:'Work Sans',sans-serif;font-size:18px;color:#fff;text-shadow:-2px -2px #10151b,2px 2px #10151b,2px -2px #10151b,-2px 2px #10151b}
.stagemid span{display:none}
.hpstrip{top:42px;left:38%;right:38%;gap:3px;overflow:visible}.hpseg{position:relative;height:7px;border:1px solid #121923;border-radius:2px;background:#525b66;overflow:visible}.hpseg.me>i{background:#079be9;box-shadow:none}.hpseg.foe>i{background:#fff;box-shadow:none}.hpseg.me::before,.hpseg.me::after,.hpseg.foe::after{content:"";position:absolute;z-index:2;top:50%;width:15px;height:15px;transform:translateY(-50%);border:2px solid #111722;border-radius:50%;background:#079be9}.hpseg.me::before{left:-9px}.hpseg.me::after{right:-9px}.hpseg.foe::after{right:-9px;background:#9edaff}
.mountShortcut{position:absolute;z-index:3;right:42px;bottom:8px;display:flex;align-items:center;gap:3px;border:2px solid #111722;border-radius:6px;background:#079be9;color:#fff;padding:3px 5px;box-shadow:0 3px 0 #075c8c;font-size:10px;text-shadow:1px 1px #111722}
.mountShortcut img{width:16px;height:16px;filter:brightness(0) invert(1)}
.skillrow{position:relative;z-index:2;max-width:90%;margin:-56px 8px 9px auto;justify-content:flex-end;gap:5px;min-height:46px}
.skillrow .lock{max-width:190px;opacity:.78;font-size:10px;padding:5px}
.sk{flex:0 1 46px;height:46px;border:2px solid #111722;border-radius:50%;background:#ffdf48;box-shadow:0 3px 0 #30323b}
.sk .nm{font-size:8px;color:#111722;font-weight:800}.sk.locked{background:#343b4a}.sk.empty{background:#d8dde3}
.eqwrap{background:#fff;margin:0 -7px 0;padding:7px 10px 24px;box-shadow:0 -3px 0 #111722}
.gearwrap{grid-template-columns:repeat(5,minmax(0,1fr));grid-auto-rows:clamp(48px,15vw,66px);gap:5px}
.slot{border:2px solid #111722;border-radius:6px;background:#b8a6ff;box-shadow:0 2px 0 #535b67;min-height:0;aspect-ratio:auto;padding:2px}
.slot.f0{background:#d7d9df}.slot.f1{background:#5bd5fc}.slot.f2{background:repeating-radial-gradient(circle at 50% 42%,#a17eff 0 13px,#8d6cf1 14px 16px,#a17eff 17px 27px)}.slot.f3{background:#f8c758}.slot.f4{background:#ff9365}.slot.f5{background:#fb75cf}
/* Equipment cards take their era background from css/era-bg.css. */
.slot::before,.slot .band,.slot .role{display:none}.slot .aicon{width:86%;height:80%}
.slot .val{background:transparent;color:#fff;text-shadow:-1px -1px #111722,1px 1px #111722,1px -1px #111722,-1px 1px #111722;font-size:11px;line-height:1;padding:0 0 3px}
.slot .lv{top:auto;right:auto;left:3px;bottom:1px;background:none;border:0;color:#fff;text-shadow:1px 1px #111722;font-size:9px;padding:0}
.slot .sn{color:#222936;font-size:9px;font-weight:800}.slot.dim{background:#e5e7eb}
.slot .ghost{opacity:.54}
.slot.mountslot{grid-column:auto;background:#59ef89;display:flex;flex-direction:column;align-items:center;justify-content:center;position:relative;cursor:pointer;aspect-ratio:auto;height:auto}
.slot.mountslot .aicon{width:34px;height:34px;object-fit:contain}.slot.mountslot .sn{margin-top:1px}.slot.mountslot .lv{left:auto;right:3px}
.eraLegend{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px;margin-top:12px}.eraLegend div{display:flex;align-items:center;gap:6px;padding:5px;border:1px solid #aeb6c0;border-radius:5px;font-size:10px;font-weight:800}.eraLegend i{width:20px;height:20px;flex:none;border:2px solid #111722;border-radius:4px;background:var(--era)}
.gearShelf{grid-template-columns:repeat(3,minmax(0,1fr));margin-top:12px}
.forgerow .foundrow{position:absolute;z-index:6;left:85px;bottom:43px;display:flex;align-items:flex-end;gap:0;max-width:195px;min-height:0;max-height:none;margin:0;padding:0;overflow:visible}.forgerow .foundrow:empty{display:none}.forgerow .foundrow:empty::before{content:none}.anvilwrap:has(.foundrow:not(:empty)) .anvilbtn{visibility:hidden}
.forgerow .foundrow .fitem{width:48px;height:60px;margin-right:-27px;border:3px solid #111722;border-radius:8px;box-shadow:0 3px 0 #242b35;transform-origin:bottom center}.forgerow .foundrow .fitem:nth-child(2n){transform:translateY(-2px)}.forgerow .foundrow .fitem img{width:31px;height:31px}.forgerow .foundrow .fitem .fa{right:-4px;bottom:-4px}
.forgerow{background:#fff;margin:0 -7px;padding:5px 10px 7px;min-height:148px;border-top:1px solid #e0e5e9;align-items:center;gap:8px}
.anvilwrap{flex:1;min-width:0;min-height:129px;padding-right:114px;position:relative;align-self:stretch}.anvilbtn{background:transparent!important;border:0!important;box-shadow:none!important;overflow:visible!important;padding:0!important}.anvil{filter:drop-shadow(2px 3px 0 #202633)}
.anvilbtn .anvil{background:transparent;box-shadow:none;height:106px;overflow:visible;transform:translateX(62px)}.anvilbtn .anvil svg{overflow:visible}.anvilbtn .cdfill{display:none}
.hamcount{position:absolute;left:80%;bottom:2px;z-index:3;transform:translateX(-50%);min-width:128px;height:31px;display:flex;align-items:center;justify-content:center;gap:4px;margin:0;padding:2px 9px;background:#d9dde2;border:2px solid #111722;border-radius:6px;box-shadow:0 3px 0 #8b929b;color:#111722;font-size:14px}
.hamcount .ic{width:19px;height:19px}.hamcount b{color:#111722;font-size:17px;text-shadow:1px 1px #fff}
.forgelvl{position:absolute;top:6px;right:0;z-index:2;width:90px;min-height:70px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1px;padding:5px 4px;background:#079be9!important;border:2px solid #111722!important;border-radius:7px!important;box-shadow:0 4px 0 #075c8c!important;color:#fff!important;text-shadow:1px 2px #075c8c!important}
.forgelvl b{font-size:14px;line-height:1.05}.forgelvl .bar{display:none}.forgelvl .dot{top:-5px;right:-5px}.forgelvl #fbTimer{position:absolute;left:0;right:0;top:calc(100% + 8px);color:#111722;font-size:10px;font-weight:900;line-height:1;text-shadow:none}
.autobtn{width:55px;min-height:70px;padding:4px;gap:1px;border:2px solid #111722!important;background:#079be9!important;border-radius:7px!important;box-shadow:0 4px 0 #075c8c!important;color:#fff!important;font-size:11px!important;font-weight:900;text-shadow:1px 2px #075c8c}.autobtn .glyph{width:26px!important;height:26px!important}
.homeChat{display:flex;align-items:center;gap:9px;background:#d4d8dc;color:#3d4651;padding:5px 10px;text-align:left;margin:0 -7px -6px;min-height:39px}
.homeChatIcon{flex:none;width:27px;height:27px;background:#fff;-webkit-mask:url(../assets/resources/tabchat.svg) center/contain no-repeat;mask:url(../assets/resources/tabchat.svg) center/contain no-repeat;filter:drop-shadow(1px 1px 0 #3d4651)}.homeChat span:nth-child(2){flex:1;min-width:0}.homeChat b,.homeChat small{display:block;line-height:1.1}.homeChat b{font-size:11px}.homeChat small{font-size:10px}.homeChat i{font-size:20px;font-style:normal}

.tabs{background:#41495b;border-top:3px solid #111722;box-shadow:none;padding:4px 5px calc(5px + var(--safe-b));gap:0;min-height:66px}
.tabs button{color:#fff;font-size:10px;font-weight:800;border:0;border-radius:0;padding:5px 2px}
.tabs button .glyph{width:35px!important;height:35px!important;filter:drop-shadow(1px 2px 0 #10151b)}
.tabs button>.aicon{width:38px;height:38px;object-fit:contain;filter:drop-shadow(1px 2px 0 #10151b)}
.tabs button.on{color:#fff;background:transparent;border:0;box-shadow:none}
.tabs button.on:not(.centerClose)>span:last-of-type{color:#8edcff}
.tabs button.centerClose{color:#fff}
.tabs .navClose{display:grid;place-items:center;width:39px;height:39px;border:2px solid #111722;border-radius:50%;background:#ff5c6a;box-shadow:0 4px 0 #8e2835;font-size:30px;line-height:1;color:#fff;text-shadow:1px 2px #111722;margin:-4px 0 -1px}
.tabs .dot{background:#ff5c6a;border:2px solid #fff}

.veil{background:rgba(0,0,0,.72);backdrop-filter:none;align-items:center;padding:16px 16px calc(72px + var(--safe-b))}
.sheetWrap{width:100%;max-width:480px;display:flex;flex-direction:column;align-items:center}
.sheet{width:100%;max-width:480px;max-height:min(76dvh,780px);overflow:auto;background:#fff;border:3px solid #111722;border-radius:9px;color:#111722;padding:17px 13px 20px;box-shadow:0 5px 0 #232936;animation:none}
.sheet h3{font-size:23px;text-align:center;color:#111722;line-height:1.1;margin:3px 26px 12px}
.sheetClose{flex:none;width:40px;height:40px;border:2px solid #111722;border-radius:50%;background:#ff5c6a;color:#fff;box-shadow:0 3px 0 #9b3139;font-size:24px;line-height:1;margin-top:-2px;z-index:65}
.profileIdentity{display:flex;align-items:center;gap:10px;padding:8px 5px 10px;border-bottom:1px solid #d5dbe1}.profileIdentity .avatar{width:62px;height:62px;flex:none;overflow:hidden;border:2px solid #111722;border-radius:7px;background:#fff}.profileIdentity .avatar img{width:100%;height:100%;object-fit:contain}.profileIdentity span,.profileIdentity small{display:block;color:#59636e;font-size:10px;line-height:1.2}.profileIdentity b{font-size:17px}.profileIdentity a{color:#079be9;font-size:11px;font-weight:900}.profileActions{display:grid;grid-template-columns:1fr 1fr;gap:7px;margin:11px 0}.profileActions button{min-height:52px;border:2px solid #111722;border-radius:7px;background:#f1f3f6;color:#111722;box-shadow:0 3px 0 #a4abb4;font-weight:900;font-size:12px}.profileActions button::before{content:"";display:block;width:22px;height:18px;margin:0 auto 2px;background:currentColor;-webkit-mask:url(../assets/resources/tabranking.svg) center/contain no-repeat;mask:url(../assets/resources/tabranking.svg) center/contain no-repeat}.profileActions button+button::before{-webkit-mask-image:url(../assets/resources/tabclan.svg);mask-image:url(../assets/resources/tabclan.svg)}.profileTabs{display:flex;gap:4px;border-bottom:2px solid #111722;margin:0 -13px 10px;padding:0 13px}.profileTabs button{flex:1;padding:7px 3px;color:#59636e;font-size:12px;font-weight:900}.profileTabs button.on{color:#111722;border-bottom:4px solid #079be9;margin-bottom:-2px}.profileCustomize{margin:8px 0}.profileCustomize summary{cursor:pointer;color:#079be9;font-size:12px;font-weight:900}.profileCustomize .avatarGrid{margin-top:8px}
.sheet .row{background:#f1f3f6;border:1px solid #d1d7de;box-shadow:none}
.sheet .mini{color:#4b5560}.sheet .tt{color:#141a21;font-weight:800}
.sheet .erarow{background:#edf0f4;border-color:#abb2ba;border-radius:6px}
.sheet .statgrid div{border-bottom-color:#d6dce2}.sheet .statgrid span{color:#414955}.sheet .statgrid b{color:#111722}
.sheet .mat,.sheet .chip,.sheet .tag{background:#e5e8ec;color:#252d37;border-color:#c3c9d2}
.sheet .lock{background:#eff1f4;color:#4b5560;border-color:#c1c7ce}
.sheet .ipt{background:#fff;color:#111722;border-color:#9199a5}
.sheet .eraOdds{background:var(--era);border:0;border-radius:7px;margin-bottom:5px;box-shadow:none;overflow:hidden}
.sheet .eraOdds summary{font-size:15px;font-weight:900;color:#10151b;padding:8px 10px;align-items:center}
.sheet .eraOdds summary::after{color:#111722}.eraValues{display:flex;gap:8px;margin-left:auto}.eraValues b{min-width:44px;text-align:right}
.eraValues b+b{background:#ffffff75;margin:-8px -3px -8px 0;padding:8px 2px}
.sheet .eraOdds .pb2{background:#f4f5f8;padding:9px}.potentialGrid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:5px;margin:7px 0}
.potentialItem{display:flex;flex-direction:column;align-items:center;gap:2px;min-width:0;min-height:67px;padding:5px 2px;border:1px solid #9ba3ad;border-radius:4px;background:#eceef3;color:#111722;text-align:center}
.potentialItem img{width:29px;height:29px}.potentialItem span{font-size:8px;line-height:1;max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.potentialItem b{font-size:8px}
.rarityOdds div,.potentialSubs div{display:flex;justify-content:space-between;padding:4px 6px;background:#e8ebef;margin:2px 0;border-radius:3px;font-size:11px}
.rarityOdds em{color:#68717e;font-style:normal}.potentialHero{display:flex;gap:12px;align-items:center;border:2px solid #111722;border-radius:6px;padding:10px;margin:0 0 12px}
.potentialHero .aicon{width:62px;height:62px}.potentialHero div>*{display:block}.potentialHero b{font-size:12px}.potentialHero span{font-size:16px;font-weight:900}.potentialHero small{font-size:11px;color:#4e5964}
.rarityChooser{display:grid;grid-template-columns:repeat(3,1fr);gap:5px}.rarityChooser button{background:var(--rar);border:2px solid #111722;border-radius:5px;font-size:10px;padding:5px 2px;opacity:.55;color:#111722}
.rarityChooser button.on{opacity:1;box-shadow:0 3px 0 #111722}.potentialSubs{margin-top:8px}
.oddsLink{color:#079be9;font-size:11px;font-weight:800;text-decoration:underline;margin-left:5px}
.summonOddsNav{display:flex;align-items:center;justify-content:space-between;margin:8px 0 16px;text-transform:capitalize;font-size:12px}
.summonOddsNav button{font-size:22px;color:#079be9}.summonOddsNav button:disabled{color:#aeb4bd}
.summonOddsRows div{display:flex;justify-content:space-between;padding:6px 9px;margin-bottom:5px;border-radius:3px;color:#111722;font-size:12px}
.mountResource{display:flex;align-items:center;justify-content:center;gap:5px;font-size:14px;margin-bottom:12px}
.mountCollection{display:grid;grid-template-columns:repeat(3,1fr);gap:7px;min-height:100px;margin-bottom:14px}
.mountTile{display:flex;flex-direction:column;align-items:center;gap:2px;background:color-mix(in srgb,var(--rar) 27%,white);border:2px solid #111722;border-radius:7px;padding:6px 2px;color:#111722}
.mountTile img{height:47px;width:55px;object-fit:contain}.mountTile b{font-size:10px}.mountTile span,.mountTile small{font-size:9px}
.mountActions{display:flex;justify-content:center;gap:6px}.mountActions .btn:first-child{min-width:140px}

/* Collection pages keep the same airy white canvas and colorful item art. */
#pHero .panel,#pTech .panel,#pDungeons .panel,#pClan .panel,#pChat .panel{background:#fff}
#pChat.page.pad{background:#1d2028;color:#fff;padding:9px 9px calc(78px + var(--safe-b))}
#pChat .panel.chat,#pChat .panel.chat .pb{background:#1d2028;color:#fff}
/* Block, not flex: a flex .pb shrinks its whole height beside the floated
   close button. Only the channel tabs share its row; the rest runs full width. */
#pChat .panel.chat .pb{display:block;padding:0}
.chatChannels{display:flex;gap:2px;background:#424b5c;border:2px solid #111722;border-radius:7px;padding:2px;margin:2px 0 10px}
.chatChannels button{flex:1;color:#fff;font-size:11px;padding:7px 3px;border-radius:5px}.chatChannels button.on{background:#079be9;box-shadow:0 2px 0 #075c8c}
#pChat .chatbox{clear:both;height:calc(100dvh - var(--topH) - var(--tabH) - 165px);min-height:230px;max-height:none;gap:4px}
#pChat .chatbox .row{background:#41495b;border:0;border-radius:5px;padding:7px;align-items:flex-start;margin:0;color:#fff}
#pChat .chatbox .row.me{background:#2d6275;outline:none}
#pChat .chatbox .chatname{color:#f6d973;font-weight:900}.chatbox .chattime{color:#b6bec9;margin-left:auto}
#pChat .chatbox .chatbody{color:#fff;font-size:12px;line-height:1.25}
#pChat .rankAvatar{background:#fff;border-radius:4px;width:25px;height:25px}
#pChat .ipt{background:#41495b;color:#fff;border:2px solid #111722;border-radius:5px}#pChat .ipt::placeholder{color:#d0d6de}
#pHero .gearwrap{grid-template-columns:repeat(4,1fr)}
#pHero .slot{min-height:62px}
.collectionTitle{text-align:center;font-size:24px;font-weight:900;margin:2px 0 10px}.skillCollection{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px 7px;margin:15px 0}
.skillTile{position:relative;display:flex;flex-direction:column;align-items:center;gap:4px;min-width:0;color:#111722;text-align:center}
.skillArt{display:grid;place-items:center;width:58px;height:58px;border:3px solid #111722;border-radius:50%;background:var(--skill);box-shadow:0 3px 0 #999}.skillArt .glyph{width:38px!important;height:38px!important}
.skillTile b{font-size:10px;line-height:1}.skillTile span:not(.glyph):not(.equippedTag):not(.skillMergeTag){font-size:9px;color:#58616c}.skillTile.unknown{opacity:.55}
.equippedTag{position:absolute;top:21px;left:-5px;right:-5px;background:#111722bb;border-radius:8px;color:#fff;font-size:9px;z-index:2}
.skillInfoIcon{width:86px;height:86px;background:var(--skill);border:3px solid #111722;border-radius:50%;display:grid;place-items:center;margin:0 auto 12px}
.skillEquipSlots{display:grid;grid-template-columns:repeat(2,1fr);gap:8px;margin-top:12px}.skillEquipSlots .btn{white-space:normal}
.petCatalog{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:7px;margin:13px 0 18px}
.petCatalogTile{display:flex;flex-direction:column;align-items:center;justify-content:center;min-width:0;min-height:83px;padding:4px 2px;background:color-mix(in srgb,var(--pet) 26%,white);border:2px solid #111722;border-radius:5px;color:#111722;box-shadow:0 2px 0 #9299a3;text-align:center}
.petCatalogTile:not(.owned){filter:saturate(.65)}.petCatalogTile img{width:55px;height:50px;object-fit:contain}.petCatalogTile b{font-size:9px;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.petCatalogTile span{font-size:8px;color:#434d57}
.petInfoArt{display:grid;place-items:center;height:190px;margin:0 0 12px;border:1px solid color-mix(in srgb,var(--pet) 50%,#687093);border-radius:17px;background:radial-gradient(circle,color-mix(in srgb,var(--pet) 28%,#28304e),#171d33 72%)}.petInfoArt img{max-width:90%;max-height:180px;object-fit:contain}
.techOverview{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;padding:4px 2px 15px}
.techOverview button{display:flex;min-width:0;min-height:155px;flex-direction:column;align-items:center;gap:7px;padding:12px 5px;background:#f1f3f6;border:2px solid #111722;border-radius:8px;box-shadow:0 4px 0 #a4aab3;color:#111722;text-align:center}
.techOverview button img{height:48px}.techOverview b{font-size:13px}.techOverview span{flex:1;color:#596370;font-size:10px;line-height:1.2}.techOverview strong{font-size:11px;color:#079be9}
.techOverview button.roadmap{background:repeating-linear-gradient(135deg,#edf0f4,#edf0f4 9px,#e3e7ec 9px,#e3e7ec 18px);opacity:.72}.techOverview button.roadmap strong{color:#697482}.roadmapNote{text-align:center;margin:-5px 0 12px}
.ipt{background:#f5f6f8;color:#111722;border:1px solid #b6bec8}
.authgate{background:#f7fafc}.authcard{background:#fff;color:#111722;border:3px solid #111722;box-shadow:0 5px 0 #aeb5be;border-radius:9px}
.authcard h1{color:#111722}.authcard .mini,.authswitch{color:#4e5964}.authcard .ipt{background:#fff;color:#111722}
.bootsplash{background:#fff}.boottitle{color:#111722;text-shadow:none}.boottitle span{color:#079be9}.bootbar{background:#dce2e8}.bootbar i{background:#079be9}

@media(max-height:620px){#pHome.on .arena{min-height:125px}.skillrow{margin-top:-48px}.gearwrap{grid-auto-rows:42px}.homeChat{min-height:30px}}
@media(min-width:440px) and (max-height:820px){#pHome .slot{min-height:65px}#pHome.on .arena{min-height:150px}.forgerow{min-height:104px}}
/* The unread count sits on the chat icon's corner, not at the row's far end. */
.homeChatIconWrap{position:relative;flex:none;display:grid}
.homeChatUnread{position:absolute;top:-5px;left:15px;min-width:18px;height:18px;padding:0 4px;border:2px solid #111722;border-radius:9px;background:#ff5c6a;color:#fff;font-size:10px;font-style:normal;font-weight:900;line-height:14px;text-align:center;text-shadow:1px 1px #8e2835}
