.mode-online .online-unit{isolation:isolate}
.mode-online .online-unit>.family-ribbon{position:absolute;left:0;top:5px;bottom:auto;right:auto;transform:none;width:auto;min-width:38px;height:44px;padding:5px 7px 11px;display:flex;gap:3px;align-items:flex-start;border:1px solid #dbc69388;border-radius:0;clip-path:polygon(0 0,100% 0,100% 100%,50% 84%,0 100%);z-index:1;box-shadow:0 2px 5px #0008}
.mode-online .online-unit>.family-ribbon img{width:23px!important;height:23px!important;object-fit:contain!important;padding:0;margin:0}
.mode-online .online-unit>.mini-portrait{position:relative;z-index:2;pointer-events:none}
.mode-online .champion-strip .online-unit:after{display:none}
.mode-online .champion-strip .online-unit>.family-ribbon{top:0;left:-7px;height:40px;min-width:30px;padding:4px 5px 9px}
.mode-online .equipped-grid .online-unit{background:linear-gradient(#263740,#182631)!important}
.mode-online .equipped-grid .online-unit>.slot-bonus{position:absolute;right:5px;left:auto;top:5px;bottom:auto;background:#285b3f;color:#d2ffcd;border-radius:7px;padding:3px 5px;z-index:4;font-size:12px}
.mode-online .online-unit>.mini-xp,.mode-online .online-unit>.mini-gold,.mode-online .online-unit>strong{z-index:3}
.champion-strip{cursor:grab;touch-action:pan-y}.champion-strip:active{cursor:grabbing}
.equip-choices{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}.equip-choices button{padding:8px;min-width:0}.equip-choices img{width:100%;height:80px;object-fit:contain}.equip-choices span{font-size:12px;display:block}
.objective-label.objective-health{width:76px;padding:3px;background:#15202ce8;border:1px solid #b7a685;border-radius:5px;box-shadow:0 2px 4px #0006}.objective-health .objective-fill{height:7px;display:block;background:#ddbc68;border-radius:2px}.objective-health.owned .objective-fill{background:#58b8eb}.objective-health.hostile .objective-fill{background:#e86562}.objective-health.capture .objective-fill{background:#edcc73}
.friend-army{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}.friend-army article{background:#192b36;border:1px solid #9e9474;border-radius:7px;padding:5px;text-align:center}.friend-army img{width:100%;height:95px;object-fit:contain}.friend-army small{display:block;font-size:11px}
.mode-online .online-unit>.family-ribbon,.mode-online .market-slot>.family-ribbon,.mode-online .daily-offer>.family-ribbon{min-width:19px;width:auto;height:36px;padding:4px 3px 9px;gap:1px;position:absolute;top:5px;left:3px;z-index:2;display:flex;clip-path:none;border-radius:2px 2px 5px 0;border:1px solid #c4b48c80}
.mode-online .online-unit>.family-ribbon img,.mode-online .market-slot>.family-ribbon img,.mode-online .daily-offer>.family-ribbon img{width:12px!important;height:17px!important;min-height:0!important;object-fit:contain!important;margin:0;padding:0}
.mode-online .champion-strip .online-unit>.family-ribbon{top:10px;left:13px;min-width:18px;height:32px;padding:3px 2px 7px}
.family-ribbon:after{content:'';position:absolute;bottom:-5px;left:-1px;right:-1px;height:8px;background:inherit;clip-path:polygon(0 0,100% 0,100% 100%,50% 55%,0 100%)}
.family-ribbon:hover:before{content:attr(data-tooltip);position:absolute;top:100%;left:0;background:#101e2ef5;color:#f8e6bb;border:1px solid #ad965f;padding:6px 9px;white-space:nowrap;border-radius:4px;font:12px Arial;z-index:25;pointer-events:none}
.mode-online .equipped-grid .online-unit{min-height:216px;padding-top:35px!important;aspect-ratio:auto}
.mode-online .equipped-grid .online-unit:first-child{min-height:444px}
.mode-online .equipped-grid .online-unit>.slot-role-icon{position:absolute!important;top:5px!important;left:calc(50% - 13px)!important;width:26px!important;height:26px!important;min-height:0!important;object-fit:contain!important;filter:grayscale(1);opacity:.55;z-index:1;margin:0;padding:0}
.mode-online .market-slot,.mode-online .daily-offer{position:relative;isolation:isolate}.mode-online .market-slot>img,.mode-online .daily-offer>img{position:relative;z-index:3;pointer-events:none}
@media(max-width:600px){.mode-online .equipped-grid .online-unit{min-height:166px}.mode-online .equipped-grid .online-unit:first-child{min-height:344px}}
.mode-online .equipped-grid .online-unit:first-child>.slot-role-icon{height:26px!important;min-height:0!important;max-height:26px!important}.mode-online .online-unit>.family-ribbon:hover,.mode-online .market-slot>.family-ribbon:hover{z-index:10}
.mode-online .equipped-grid .online-unit>.slot-role-holder{position:absolute;top:5px;left:calc(50% - 15px);width:30px;height:30px;padding:0;background:none;z-index:5;display:block}.slot-role-holder .slot-role-icon{width:26px!important;height:26px!important;min-height:0!important;object-fit:contain;filter:grayscale(1);opacity:.45}.slot-role-holder.matched .slot-role-icon{filter:drop-shadow(0 0 5px #8edaff) drop-shadow(0 0 10px #4aa6e8);opacity:1}.slot-role-holder:hover:after{content:attr(data-tooltip);position:absolute;left:50%;top:32px;transform:translateX(-50%);padding:8px 10px;width:180px;border:1px solid #ab9965;border-radius:5px;background:#102337f5;color:#f7e5bd;font:12px Arial;pointer-events:none}.atlas-node.unavailable{opacity:.22!important;width:8px!important;height:8px!important;pointer-events:none!important;border-color:#899795!important;background:#586b6d!important;box-shadow:none!important}
.mode-online .equipped-grid .online-unit .slot-role-holder>.slot-role-icon{width:26px!important;height:26px!important;min-height:0!important;max-height:26px!important;margin:0!important;padding:0!important}

/* Shared damage trail, without level badges or numeric labels. */
.unit-health.tower-health{width:76px;height:8px}.unit-health.tower-health .level,.unit-health.tower-health small{display:none}
/* The live arena uses the campaign health bars and the same card hierarchy. */
.server-deck{width:620px;display:grid;grid-template-columns:68px repeat(4,minmax(0,1fr));gap:8px;padding:16px;align-items:end;border-color:#65756f;background:linear-gradient(145deg,#21383f,#10222b);box-shadow:0 12px 35px #0007}
.live-economy{grid-column:1/-1;padding-bottom:6px}.live-economy strong{font-size:23px;color:#efd18d}.live-gold-track{height:6px;background:#07161e;margin-top:8px;border-radius:8px;overflow:hidden}.live-gold-track i{display:block;height:100%;background:linear-gradient(90deg,#e3b754,#ffe09c);transition:width .2s}
.server-deck .live-card{position:relative;width:100%;height:145px;min-height:0;margin:0;padding:5px 3px 23px;border:2px solid #526870;border-radius:9px;background:linear-gradient(#526773,#233e4b 65%,#0d1d29)}.server-deck .live-card img{width:100%;height:110px;object-fit:contain}.server-deck .live-card-name{position:absolute;bottom:6px;left:3px;right:3px;font-size:10px;font-weight:700;color:#fff}.server-deck .live-cost{position:absolute;left:-3px;top:-5px;display:grid;place-items:center;width:29px;height:31px;background:linear-gradient(135deg,#ffe8a6,#bd913e);clip-path:polygon(20% 0,80% 0,100% 30%,90% 85%,50% 100%,10% 85%,0 30%);color:#42311d;font-size:20px}.server-deck .live-key{position:absolute;right:4px;top:4px;background:#12222c;border-radius:3px;padding:2px 4px}.server-deck .live-card.selected{border-color:#9fe9ff;box-shadow:0 0 14px #59cdff77}.live-next{text-align:center;align-self:center;font-size:9px}.live-next small{display:block;letter-spacing:2px;color:#d6d2b8}.live-next img{width:62px;height:76px;object-fit:contain;border:2px solid #546871;border-radius:8px;background:#203743;margin:5px 0}.live-next span{display:block}.server-labels .unit-health{pointer-events:none}.server-battle-message{top:auto;bottom:225px;font-size:12px;max-width:80%;padding:7px 14px;white-space:normal}.server-battle-ui>header{border-bottom:0;background:linear-gradient(#162b31f0,#162b31c0);min-height:75px}.server-battle-ui>header>span{font-size:26px;color:#f4dfae;font-weight:bold}
@media(max-width:650px){.server-deck{grid-template-columns:46px repeat(4,minmax(0,1fr));gap:5px;padding:10px}.server-deck .live-card{height:117px}.server-deck .live-card img{height:83px}.live-next img{width:42px;height:57px}.server-battle-message{bottom:193px}.server-deck .live-card-name{font-size:8px}}
.live-base-summary{pointer-events:none;top:82px;padding:10px 12px;background:#12262dd9;border-radius:9px}.server-deck .live-card img{border:0}
.battle-start{position:fixed;z-index:30;left:50%;bottom:12%;transform:translateX(-50%);width:116px;height:116px;border-radius:50%;border:8px solid #77818a;outline:3px solid #e8c879;background:radial-gradient(circle at 40% 30%,#ffe382,#efb02f 65%,#a36514);box-shadow:0 0 25px #ffe18e77,inset 0 0 0 3px #fff3ba;color:#fff;font-size:28px;font-weight:900;text-shadow:0 2px 2px #442800;cursor:pointer}.battle-start[hidden]{display:none}.battle-awaiting #hud footer,.battle-awaiting #hint{display:none!important}.battle-countdown{position:absolute;inset:0;display:grid;place-items:center;color:#ffe3a0;font-size:110px;font-weight:900;text-shadow:0 4px 0 #53350f,0 0 35px #ffcb6588;pointer-events:none}.battle-countdown[hidden],.server-deck[hidden]{display:none!important}
@media(max-width:650px){
 body.battle .brand,body.battle>a[href="quality.html"],body.battle #mode-exit,body.battle #audio-settings{display:none!important}
 #hud>header{top:10px;height:25px;pointer-events:none}#hud>header small,#hud #exit{display:none}#hud>header>div{position:absolute;left:50%;transform:translateX(-50%)}#hud #timer{font-size:19px;margin:0}#hud #pause{position:fixed;right:0;top:32px;padding:5px 10px;min-height:30px;pointer-events:auto;font-size:11px}
 #hud .health,.server-battle .live-base-summary{top:8px;width:96%;gap:64px;padding:0;background:none}#hud .health label,.live-base-summary label{font-size:7px;letter-spacing:0}#hud .health progress,.live-base-summary progress{height:7px;margin-top:4px}
 #hud footer{bottom:4px;width:98%;padding:7px 8px;border-radius:10px}#hud .economy b{font-size:18px}#hud .economy small,#hud #income{font-size:7px}#goldtrack{margin:5px 0;height:4px}#hud .footnote{display:none}#hud .battle-deck{gap:5px;grid-template-columns:42px 1fr}#hud #hand{gap:4px}#hud .card{height:85px;min-height:0;padding:3px 2px 18px}#hud .card img{height:60px;max-width:100%}#hud .card strong{font-size:8px;line-height:1.1;white-space:normal}#hud .card .cost{font-size:17px}#next .next-portrait{height:55px;width:39px}#next img{height:49px!important;width:35px!important}#next>strong{display:none}#next small{font-size:7px}#hint{display:none!important}.camera-controls{top:68px!important;right:7px!important}.camera-controls button{padding:5px 8px;font-size:10px}.battle-start{width:104px;height:104px;bottom:13%;font-size:25px}
 .server-battle-ui>header{top:0;padding:0;background:none;border:0;min-height:0}.server-battle-ui>header>strong,.server-battle-ui>header>button:last-child{display:none}.server-battle-ui>header>span{position:absolute;left:50%;top:8px;transform:translateX(-50%);font-size:19px}.server-battle-ui>header>button{position:absolute;right:8px;top:40px;padding:5px 8px;font-size:10px}.server-battle-message{display:none}.server-deck{bottom:4px;width:98%;padding:7px 8px;gap:4px;grid-template-columns:40px repeat(4,minmax(0,1fr))}.live-economy{padding-bottom:0}.live-economy strong{font-size:18px}.live-gold-track{margin-top:4px;height:4px}.server-deck .live-card{height:84px;padding-bottom:19px}.server-deck .live-card img{height:59px}.server-deck .live-cost{width:23px;height:25px;font-size:17px}.server-deck .live-card-name{font-size:8px;line-height:1.05;white-space:normal;bottom:3px}.live-next img{width:34px;height:47px}.live-next span{display:none}
 .mode-online .champion-strip .online-unit{min-width:98px!important;min-height:144px!important;border-radius:45px 45px 12px 12px!important;padding-bottom:48px!important;overflow:visible!important}.mode-online .online-unit>strong{display:block!important;white-space:normal!important;overflow:visible!important;text-overflow:clip!important;font-size:11px!important;line-height:1.2!important;min-height:28px;max-height:none!important;word-break:normal;overflow-wrap:break-word;padding:3px!important;color:#fff!important;text-shadow:0 1px 3px #000;background:#122029d9;z-index:5}.mode-online .champion-strip .online-unit>strong{position:absolute!important;left:0;right:0;bottom:19px!important}.mode-online .collection-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:7px!important}.mode-online .equipped-grid .online-unit>strong{font-size:10px!important}.mode-online .online-unit .mini-portrait{max-width:100%}
}

/* Readable phone cards keep the miniature portraits round. */
.collection-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 14px;border:2px solid #827968;border-radius:9px;background:linear-gradient(#414653,#242d39);text-align:center;margin:18px 0 10px}.collection-heading h2{margin:0}.collection-heading>div{flex:1}.collection-heading button{font-size:22px}.collection-filters{display:flex;flex-wrap:wrap;justify-content:center;gap:8px;background:#222e3e;padding:14px;border:2px solid #626e7a;border-radius:10px;margin-bottom:14px}.collection-filters button{width:46px;height:46px;padding:7px;border-radius:50%;border:2px solid #819cad;background:linear-gradient(#3c7da5,#1b385f);color:#fff}.collection-filters button[aria-pressed=true]{border-color:#ffe4a0;box-shadow:0 0 12px #e8bc6977}.collection-filters img{width:100%;height:100%;object-fit:contain}
.presence-dot{display:inline-block;width:9px;height:9px;border-radius:50%;margin-left:9px;border:1px solid #fff6;box-shadow:0 0 6px currentColor}.presence-dot.online{background:#62c681;color:#62c681}.presence-dot.offline{background:#c86963;color:#c86963}.social-card{border:2px solid #83715a!important;background:linear-gradient(#384453,#222d3c)!important;border-radius:14px!important}.guild-card>h2{padding:16px;background:linear-gradient(#81603c,#4b382b);border-block:2px solid #bd9659;text-align:center;color:#ffdd8f}.chat-log{background:#19253080!important;padding:14px!important}.chat-bubble{position:relative;margin:10px 0 18px 40px;padding:10px 12px;background:linear-gradient(#f0e5c9,#cfc3a6);border:2px solid #a6987d;border-radius:3px 13px 13px 13px;color:#342e28;box-shadow:0 3px 5px #0003}.chat-bubble>strong{color:#493921}.chat-bubble>p{margin:6px 0 0;overflow-wrap:anywhere}.chat-bubble>time{float:right;font-size:10px;color:#665c4e;margin-left:8px}.chat-avatar{position:absolute;left:-42px;top:0;width:32px;height:36px;display:grid;place-items:center;border:2px solid #d4b56e;border-radius:45%;background:linear-gradient(#557984,#293a54);color:#ffde8d;font-weight:bold}
@media(max-width:650px){
.mode-online .brand{display:none!important}.mode-online #home-resources{height:50px;inset:5px 6px auto;padding:3px;gap:4px}.mode-online #home-profile{font-size:13px;padding:4px 6px}.mode-online #home-profile::before{font-size:18px}.mode-online #home-resources .resource-chip{padding:2px 5px;border-width:2px}.mode-online #home-resources .resource-chip b{font-size:16px}.mode-online #home-resources .resource-icon{width:23px;height:23px}.mode-online #lobby-panel,.mode-online #lobby-panel[data-page=map]{top:61px}
.mode-online .champion-strip{padding:8px 5px 53px;align-items:flex-start;gap:16px}.mode-online .champion-strip .online-unit{flex:0 0 84px!important;width:84px!important;height:84px!important;min-width:84px!important;min-height:84px!important;max-height:84px!important;border-radius:50%!important;padding:0!important}.mode-online .champion-strip .online-unit>.mini-portrait{width:76px!important;height:76px!important;border-radius:50%;object-fit:contain}.mode-online .champion-strip .online-unit>strong{top:96px!important;bottom:auto!important;left:-7px!important;right:-7px!important;font-size:10px!important;min-height:24px;background:none;padding:0!important;text-align:center}.mode-online .champion-strip .mini-xp{left:27px;bottom:-12px}.mode-online .champion-strip .online-unit>.family-ribbon{top:4px;left:5px;height:25px}
.mode-online .equipped-grid .mini-gold,.mode-online .collection-grid .mini-gold{width:20px;height:22px;line-height:20px;font-size:14px;border-width:1px;right:4px;bottom:76px;z-index:6}.mode-online .equipped-grid .online-unit>strong,.mode-online .collection-grid .online-unit>strong{height:32px;min-height:32px;padding:3px 1px!important;margin:0;line-height:1.15!important;display:flex!important;align-items:center;justify-content:center}.mode-online .collection-grid .online-unit,.mode-online .equipped-grid .online-unit{padding-bottom:4px!important}.mode-online .mini-xp>small{font-size:8px}.mode-online .mini-xp>.mini-level{font-size:13px;min-width:19px}.collection-heading{padding:7px}.collection-heading h2{font-size:19px}.collection-filters{gap:7px;padding:10px}.collection-filters button{width:39px;height:39px}.social-grid{grid-template-columns:1fr!important}.social-card{padding:12px!important}.chat-log{max-height:45vh}.chat-bubble{font-size:13px}
}

@media(max-width:650px){.mode-online .champion-strip .online-unit>strong{display:block!important}.mode-online #lobby-panel:not([data-page=map]){top:61px;padding:12px;left:5px;right:5px}.mode-online #home-tabs button{min-width:0;flex:1;padding:5px 8px}.mode-online #home-tabs{width:calc(100vw - 18px);max-width:420px}.mode-online .champion-strip .online-unit>.family-ribbon{transform:none!important}}

.mode-online #lobby-panel .collection-filters button{display:grid;place-items:center;border:2px solid #8097ad;border-radius:50%;padding:5px!important;background:linear-gradient(#448ab6,#203d67)}.mode-online #lobby-panel .collection-filters button[aria-pressed=true]{border-color:#ffe2a0;box-shadow:0 0 12px #e8bc6977}.mode-online #lobby-panel .collection-filters img{width:27px;height:27px;max-width:none;object-fit:contain;margin:0;padding:0}.guild-card{grid-column:1/-1;grid-row:1}.guild-card>h2:before{content:'⚑';margin-right:12px;color:#e9c77d}
#lobby-panel .chat-bubble>p{color:#342e28;font-size:14px;line-height:1.4;margin:6px 0 0}#lobby-panel .chat-bubble>time{color:#665c4e}

/* One transparent battle HUD shared by solo and live play. */
body.battle .brand,body.battle>a[href="quality.html"],#hud #exit{display:none!important}
#hud>header,.server-battle-ui>header{position:absolute;inset:8px 0 auto!important;height:38px!important;min-height:0!important;padding:0!important;background:none!important;border:0!important;pointer-events:none;z-index:12}
#hud>header small,.server-battle-ui>header>strong,.server-battle-ui>header>button:last-child{display:none!important}
#hud>header>div{position:absolute!important;top:0!important;left:calc(50% - 48px)!important;transform:none!important}
#hud #timer,.server-battle-ui>header>span{position:static!important;font-size:20px!important;line-height:34px;margin:0!important;padding:0 7px;color:#fff2d8;background:#182838cf;border:2px solid #6b7888;border-radius:5px;transform:none!important}
.server-battle-ui>header>span{position:absolute!important;left:calc(50% - 49px)!important;top:0!important}
#hud #pause,.server-battle-ui>header>.battle-pause{position:absolute!important;left:calc(50% + 14px)!important;right:auto!important;top:0!important;width:35px!important;height:36px!important;min-height:0!important;padding:0!important;display:grid;place-items:center;pointer-events:auto;font-size:21px!important;font-weight:900;color:#fff3c0;background:linear-gradient(#ce9d41,#815522);border:2px solid #b7a57d;border-radius:5px}
#hud .health,.server-battle .live-base-summary{position:absolute;top:12px!important;left:50%;transform:translateX(-50%);width:min(620px,96%)!important;gap:112px!important;background:none!important;border:0;padding:0!important;pointer-events:none}
#hud .health label,.live-base-summary label{font-size:8px;letter-spacing:0}#hud .health progress,.live-base-summary progress{height:10px;margin:3px 0 0}
.game-confirm.battle-dropdown{position:fixed;inset:51px auto auto 50%;transform:translateX(-50%);margin:0;width:min(340px,calc(100vw - 24px));max-height:calc(100dvh - 70px);padding:16px;border-radius:8px;background:linear-gradient(#344654,#152637)}.battle-dropdown::backdrop{background:#06101955;backdrop-filter:none}.battle-dropdown h2{font-size:21px;margin:3px 0}.battle-dropdown .audio-controls{min-width:0;padding:0}.battle-dropdown .audio-controls label{margin:10px 0}.battle-dropdown>button{padding:8px!important;margin:6px 0!important}.live-result>button{display:block;width:100%;padding:14px}.server-battle-message{z-index:20}
@media(max-width:650px){
#hud .camera-controls{display:none!important}#hud #hand .card{height:100px!important;padding:2px 2px 41px!important;position:relative}#hud #hand .card img{height:56px!important;width:100%;object-fit:contain}#hud #hand .card strong{position:absolute;left:2px;right:2px;bottom:3px;height:25px;display:flex;align-items:center;justify-content:center;font-size:8px!important;line-height:1.1!important;margin:0;padding:0}#hud #hand .card .card-level{position:absolute;left:3px;right:auto;top:auto;bottom:29px;font-size:8px;line-height:11px;background:#563176;padding:1px 3px;border-radius:3px}#hud #hand .card .cost{position:absolute;left:auto;right:3px;top:auto;bottom:28px;width:18px;height:18px;line-height:18px;font-size:14px}#hud #hand .card .key{display:none}#hud #next .next-portrait>span{position:static;display:block;font-size:8px;line-height:11px}#hud #next .next-portrait{height:68px!important}#hud #next .next-portrait>b{font-size:12px;width:16px;height:17px;line-height:17px}#hud footer{padding:5px 7px!important}#hud .health label,.live-base-summary label{font-size:6px}#hud .health progress,.live-base-summary progress{height:8px}.server-deck .live-card{height:100px!important}.server-deck .live-card img{height:64px!important}.server-deck .live-card-name{height:25px;display:flex;align-items:center;justify-content:center;bottom:3px}.server-deck .live-key{display:none}.server-battle-message{display:block;font-size:10px;bottom:145px;background:#15242be6}.server-battle-message:empty{display:none}
}

#hud>header,.server-battle-ui>header{width:100%!important;transform:none!important}

/* Battle meters and controls use geometry rather than font pause glyphs. */
#pause,.battle-pause{font-size:0!important;display:flex!important;align-items:center;justify-content:center;gap:5px}
#pause::before,#pause::after,.battle-pause::before,.battle-pause::after{content:'';display:block;width:6px;height:21px;background:#fff3cd;border:1px solid #604323;border-radius:1px;box-shadow:0 1px 1px #21170d}
#hud .health,.live-base-summary{align-items:center!important;top:17px!important}
#hud .health label,.live-base-summary label{font-size:0!important;position:relative}
#hud .health label b,.live-base-summary label b{display:none!important}
#hud .health progress,.live-base-summary progress{height:29px!important;width:100%;border:3px solid #8c899c;border-radius:6px;background:#211f2b;box-shadow:0 2px 3px #0008}
#hud .health progress::-webkit-progress-bar,.live-base-summary progress::-webkit-progress-bar{background:#211f2b;border-radius:2px}
#hud .health progress::-webkit-progress-value,.live-base-summary progress::-webkit-progress-value{background:linear-gradient(#6199ff,#2357d6);border-radius:2px}
#hud .health label:last-child progress::-webkit-progress-value,.live-base-summary label:last-child progress::-webkit-progress-value{background:linear-gradient(#ff666c,#bd202e)}
#goldtrack.gold-chunks,.live-gold-track.gold-chunks{display:flex!important;gap:4px;height:19px!important;background:none!important;margin:6px 0!important}
.gold-chunks>span{position:relative;flex:1;height:100%;overflow:hidden;background:#171b20;clip-path:polygon(20% 3%,75% 0,100% 35%,87% 84%,36% 100%,0 65%,3% 28%);box-shadow:inset 0 0 0 2px #786f59}
.gold-chunks>span>i{display:block!important;height:100%!important;background:linear-gradient(155deg,#fff2ac 0%,#f9d566 28%,#e7a52c 55%,#b97519 80%,#f5cd6d)!important;position:absolute;left:0;top:0}
#hud footer{display:flex;flex-direction:column}#hud footer .economy{order:0}#hud footer #goldtrack{order:3}#hud footer .footnote{display:none}#hud footer .battle-hand,#hud footer .hand-row{order:1}
@media(max-width:650px){#hud .health,.live-base-summary{top:18px!important}#hud .health progress,.live-base-summary progress{height:27px!important}.gold-chunks{gap:3px!important}}

#hud #pause,.server-battle-ui>header>.battle-pause{font-size:0!important;display:flex!important}#hud footer .battle-deck{order:1}.server-deck .live-wallet{order:3}

.server-deck .live-economy{order:3;grid-column:1/-1}.gold-chunks>span{max-width:38px}.gold-chunks{justify-content:space-between}

#hud footer .economy,.live-economy>strong{display:none!important}#goldtrack.gold-chunks,.live-gold-track.gold-chunks{height:24px!important;align-items:center}.gold-chunks::before{content:attr(data-gold);color:#ffdd7c;font:bold 24px/24px sans-serif;text-shadow:1px 2px #5e3f15;min-width:28px;text-align:center}.gold-chunks>span{height:19px!important}.live-economy{padding:0!important}

/* Aligned health assembly: numerical caption above the damage layers. */
#hud .health,.server-battle .live-base-summary{top:8px!important;height:36px;align-items:end!important}
#hud .health label,.live-base-summary label{height:36px;display:block!important}
#hud .health label b,.live-base-summary label b{display:block!important;position:absolute;top:-1px;left:0;right:0;text-align:center;font:bold 10px/11px sans-serif;color:#fff5dc;text-shadow:0 1px 2px #000}
#hud .health progress,.live-base-summary progress{opacity:0!important;height:25px!important;margin:11px 0 0!important}
.battle-meter-well{position:absolute;left:0;right:0;bottom:0;height:25px;overflow:hidden;border:3px solid #89869a;border-radius:5px;background:#211f2b;box-shadow:0 2px 3px #0008;box-sizing:border-box}
.battle-meter-well i{position:absolute;left:0;top:0;height:100%;display:block}.battle-meter-trail{background:linear-gradient(#ffe796,#e5ae24)}.battle-meter-fill{background:linear-gradient(#639dff,#2659db)}.health label:last-child .battle-meter-fill{background:linear-gradient(#ff6c76,#c02735)}
#hud #timer{display:block!important;box-sizing:border-box;height:36px!important;line-height:32px!important}
/* Gold belongs beneath the four playable cards, excluding Next. */
#hud footer{--next-width:66px;--hand-gap:12px}#hud .battle-deck{gap:var(--hand-gap)}#hud #next{width:var(--next-width)}
#hud footer #goldtrack{margin-left:calc(var(--next-width) + var(--hand-gap))!important;width:calc(100% - var(--next-width) - var(--hand-gap));box-sizing:border-box}
.server-deck .live-economy{grid-column:2/-1!important}
#goldtrack.gold-chunks,.live-gold-track.gold-chunks{height:30px!important;gap:4px!important;overflow:visible;background:#14151e!important;border:2px solid #666370;border-radius:4px;padding:3px 5px;box-shadow:inset 0 2px 4px #0009}
.gold-chunks::before{min-width:27px;width:27px;height:32px;flex:none;font:bold 25px/32px sans-serif;color:#fff8d4;background:linear-gradient(130deg,#fff0a0,#efb62d 42%,#a95f0d 80%,#f3c451);clip-path:polygon(27% 0,72% 4%,100% 36%,84% 86%,51% 100%,13% 86%,0 45%);text-shadow:-1px -1px #34220a,1px 1px #34220a,0 2px #34220a}
.gold-chunks>span{max-width:none;min-width:0;height:18px!important;background:linear-gradient(150deg,#090b10,#34333c);clip-path:polygon(24% 2%,72% 0,98% 26%,94% 66%,70% 94%,25% 100%,2% 70%,0 28%);box-shadow:inset 0 3px 3px #000,inset 0 -2px 2px #77717b}
.gold-chunks>span>i{background:conic-gradient(from 15deg at 48% 42%,#efbc3c,#fce38a,#df9b1a,#a8640b,#f3ba32,#fff0a0,#efbc3c)!important}
#hud .card .cost,.server-deck .live-cost,#hud .next-portrait>b{background:linear-gradient(130deg,#ffed89,#e9a623 55%,#9b560a)!important;clip-path:polygon(28% 0,72% 4%,100% 37%,82% 87%,48% 100%,12% 83%,0 40%);border:0!important;border-radius:0!important;color:#fff9dc!important;text-shadow:-1px -1px #392606,1px 1px #392606,0 2px #392606;box-shadow:none!important}
@media(max-width:650px){#hud footer{--next-width:40px;--hand-gap:6px}#hud .health label b,.live-base-summary label b{font-size:9px}#goldtrack.gold-chunks,.live-gold-track.gold-chunks{gap:2px!important;padding:3px}.gold-chunks::before{min-width:23px;width:23px;font-size:22px}.gold-chunks>span{height:15px!important}}

/* Partial gold is a clipped flat fill, never a resized nugget. */
.gold-chunks>span>i{background:#f4c348!important}.gold-chunks>span.full>i{background:conic-gradient(from 15deg at 48% 42%,#efbc3c,#fce38a,#df9b1a,#a8640b,#f3ba32,#fff0a0,#efbc3c)!important}
#goldtrack.gold-chunks,.live-gold-track.gold-chunks{column-gap:6px!important}.gold-chunks>span{flex-basis:0;flex-grow:.95}
.battle-avatar{position:absolute;left:-15px;top:-3px;width:43px;height:43px;object-fit:cover;border:3px solid #8196b3;border-radius:50%;background:#1c2636;box-shadow:0 2px 4px #0008;z-index:2}.health label:last-child .battle-avatar{left:auto;right:-15px;border-color:#b27c7f}.health label:has(.battle-avatar) .battle-meter-well{left:20px}.health label:last-child:has(.battle-avatar) .battle-meter-well{left:0;right:20px}
@media(max-width:650px){#goldtrack.gold-chunks,.live-gold-track.gold-chunks{column-gap:3px!important}.battle-avatar{width:36px;height:36px;left:-4px;top:1px}.health label:last-child .battle-avatar{right:-4px}}

/* Keep the online navigation separate from the page being loaded. */
.mode-online{min-height:100dvh}
.mode-online .screen-loading[data-scope="menu"]{inset:0;z-index:30}
.mode-online.menu-loading #home-resources,.mode-online.menu-loading #home-tabs{z-index:40}
.mode-online.menu-loading .header-popup{z-index:80}
@media(min-width:651px){
 .mode-online .brand,.mode-online #mode-exit{display:none!important}
 .mode-online #lobby-panel[data-page="map"]{inset:0}
 .mode-online #home-resources,.mode-online #home-tabs{background:none;border-color:transparent;box-shadow:none;backdrop-filter:none}
 .mode-online #home-resources{align-items:center}
 .mode-online #home-profile,.mode-online #home-resources .resource-chip{height:46px;min-height:46px;box-sizing:border-box}
 .mode-online #home-profile{padding:0 12px;font-size:20px;line-height:40px}
 .mode-online #home-profile::before{font-size:24px;vertical-align:middle;line-height:1}
 .mode-online #home-resources .resource-chip{display:flex;align-items:center;padding-block:0}
}


/* Account navigation replaces the old Welcome shortcut on every screen size. */
.mode-online #mode-exit{display:none!important}
/* Shop machine: a portrait 3x3 board with its controls attached below. */
.mode-online #lobby-panel .grid-machine{width:100%;max-width:540px;margin:0 auto;box-sizing:border-box}
.mode-online #lobby-panel .grid-machine .market-board{padding:20px 22px 24px;border:7px solid #737987;border-bottom-width:10px;border-radius:24px 24px 15px 15px;background:repeating-linear-gradient(90deg,#533823 0%,#795338 15%,#49301e 32%,#9b7850 33%,#533823 34%);box-shadow:inset 0 0 0 3px #b59b68,inset 0 0 30px #130d09,0 5px 0 #202533}
.mode-online #lobby-panel .grid-machine .market-grid{gap:26px 18px;position:relative}
.mode-online #lobby-panel .grid-machine .market-slot{min-height:0;aspect-ratio:0.7;padding:6px 4px;display:flex;flex-direction:column;justify-content:flex-end;align-items:center;overflow:visible;background:linear-gradient(140deg,#29231d,#101318);border-radius:8px;box-shadow:0 0 0 4px #3d2a1b,0 0 0 6px #92764e,inset 0 0 18px #000}
.mode-online #lobby-panel .grid-machine .market-slot::before{content:'';position:absolute;width:12px;height:26px;top:-32px;left:calc(50% - 6px);background:linear-gradient(90deg,#242723,#a39975,#34362e);z-index:-1}
.mode-online #lobby-panel .grid-machine .market-slot:nth-child(-n+3)::before{display:none}
.mode-online #lobby-panel .grid-machine .market-slot>img{height:58%;min-height:0;object-fit:contain;flex:1;width:100%}
.mode-online #lobby-panel .grid-machine .market-slot strong{font-size:11px;line-height:1.15;max-width:100%}
.mode-online #lobby-panel .grid-machine .market-slot small{font-size:10px}
.mode-online #lobby-panel .grid-machine .market-price{width:100%;box-sizing:border-box;margin-top:3px;display:flex;align-items:center;justify-content:center;gap:3px}
.mode-online #lobby-panel .grid-machine .market-slot.empty{opacity:1;background:linear-gradient(135deg,#65563a,#342d20);color:#9e8d61;justify-content:center}
.mode-online #lobby-panel .grid-machine .market-slot.empty strong{font-size:42px;text-shadow:2px 3px #201a10}
.mode-online #lobby-panel .grid-console{box-sizing:border-box;margin-top:9px;padding:13px 18px;border:5px solid #737987;border-radius:10px;background:linear-gradient(#434652,#242936);box-shadow:inset 0 0 0 2px #b39a65,0 5px #202533;text-align:center;min-height:126px}
.mode-online #lobby-panel .grid-console h2{margin:0;font-size:23px;color:#fff0d4;text-shadow:0 2px #171821}
.mode-online #lobby-panel .grid-console p{margin:5px 0 12px;font-size:13px}
.mode-online #lobby-panel .grid-console-actions{display:flex;align-items:center;justify-content:space-between;gap:14px}
.mode-online #lobby-panel .grid-console button{font-weight:900;color:#fff4dd;text-shadow:0 2px #332415;border:3px solid #a5a7ad;border-radius:9px;box-shadow:0 3px #111923;padding:7px 15px}
.mode-online #lobby-panel .grid-console .grid-info{background:linear-gradient(#42a7ef,#15519f)}
.mode-online #lobby-panel .grid-console .grid-recycle{background:linear-gradient(#efd45e,#a76d18);display:flex;align-items:center;gap:5px}
.mode-online #lobby-panel .grid-console .resource-icon{width:23px;height:23px;vertical-align:middle}
.mode-online #lobby-panel .grid-console.recycling{display:grid;grid-template-columns:1fr 108px 1fr;align-items:end;gap:8px;background:repeating-linear-gradient(55deg,#3d3022 0 38px,#17191b 39px 69px,#823f2b 70px 76px);padding:12px}
.mode-online #lobby-panel .grid-console .grid-red-trigger{align-self:center;width:100px;height:100px;padding:0;border-radius:50%;border:7px solid #b79c60;outline:4px solid #687386;background:radial-gradient(circle at 42% 25%,#ff6555,#e71922 58%,#820d19 80%);box-shadow:inset 0 0 0 3px #ffc677,inset 0 -8px 8px #6d1017,0 5px #141923;font-size:23px}
.mode-online #lobby-panel .grid-console .grid-cancel{background:linear-gradient(#db4c34,#84231c);padding:7px 8px}
.grid-remaining{font-size:13px;color:#fff4d7;text-shadow:0 2px #000;align-self:end;padding-bottom:8px}.grid-help{grid-column:1/-1;color:#ffe7b9}.grid-console button:disabled{filter:grayscale(.8);opacity:.6;cursor:default}
.grid-machine .market-inspect:empty{display:none}.grid-refreshing .market-slot{opacity:.3;transform:translateY(8px);transition:opacity .15s,transform .15s}
@media(max-width:650px){.mode-online #lobby-panel .grid-machine .market-board{padding:17px 13px 20px;border-width:5px}.mode-online #lobby-panel .grid-machine .market-grid{gap:23px 13px}.mode-online #lobby-panel .grid-machine .market-slot strong{font-size:9px}.mode-online #lobby-panel .grid-machine .market-slot small{font-size:9px}.mode-online #lobby-panel .grid-console{padding:10px;min-height:115px}.mode-online #lobby-panel .grid-console.recycling{grid-template-columns:1fr 87px 1fr}.mode-online #lobby-panel .grid-console .grid-red-trigger{width:82px;height:82px;font-size:19px}.grid-remaining{font-size:11px}.mode-online #lobby-panel .grid-console button{font-size:12px}.mode-online #lobby-panel .grid-console h2{font-size:20px}}

/* Champion portrait frames follow collection rarity. */
.mode-online .champion-strip .online-unit[data-rarity="1"]{border-color:#aeb8c3!important;box-shadow:0 0 0 2px #aeb8c355,inset 0 0 9px #aeb8c355!important}
.mode-online .champion-strip .online-unit[data-rarity="2"]{border-color:#69b949!important;box-shadow:0 0 0 2px #69b94955,inset 0 0 9px #69b94955!important}
.mode-online .champion-strip .online-unit[data-rarity="3"]{border-color:#449feb!important;box-shadow:0 0 0 2px #449feb55,inset 0 0 9px #449feb55!important}
.mode-online .champion-strip .online-unit[data-rarity="4"]{border-color:#bc62de!important;box-shadow:0 0 0 2px #bc62de55,inset 0 0 9px #bc62de55!important}
.mode-online .champion-strip .online-unit[data-rarity="5"]{border-color:#efa735!important;box-shadow:0 0 0 2px #efa73555,inset 0 0 9px #efa73555!important}
.mode-online .champion-strip .online-unit.selected{outline:2px solid #fff2bc;outline-offset:4px}
.equipped-grid .online-unit[data-slot-tier="1"]{box-shadow:inset 0 0 0 2px #ae743e}.equipped-grid .online-unit[data-slot-tier="2"]{box-shadow:inset 0 0 0 2px #bbc9d4}.equipped-grid .online-unit[data-slot-tier="3"]{box-shadow:inset 0 0 0 2px #efc34d}
