/* The three balances share the existing headquarters header. */
.hq-shell .campaign-head>div:first-child {min-width:0}
.economy-wallet {
 display:flex;
 align-items:center;
 gap:clamp(10px,1.6vw,18px);
 flex:none;
}
.economy-tile,.hq-shell .campaign-head .economy-tile {
 display:flex;
 flex:0 0 auto;
 justify-content:center;
 align-items:center;
 gap:3px;
 width:auto;
 height:auto;
 min-height:35px;
 padding:0;
 border:0;
 background:none;
 color:#f9d88a;
 line-height:1;
}
.economy-icon {
 display:block;
 width:27px;
 height:27px;
 flex:none;
}
.economy-label {
 position:absolute;
 width:1px;
 height:1px;
 padding:0;
 margin:-1px;
 overflow:hidden;
 clip-path:inset(50%);
 white-space:nowrap;
}
.economy-tile strong {
 font-size:18px;
 font-weight:800;
 font-variant-numeric:tabular-nums;
 white-space:nowrap;
}
.hq-shell .campaign-head .economy-stars {color:#ffdc87}
.hq-shell .campaign-head .economy-money {color:#a3e8c4}
.hq-shell .campaign-head button.economy-tile:hover {background:#22434d;color:#fff2d2}

#hq-economy-order {
 padding:5px 7px;
 min-width:0;
 border:1px solid #648a9275;
 border-radius:8px;
 background:#183640;
}
.order-choice {display:grid;grid-template-columns:auto 1fr 1fr;align-items:center;gap:5px}
.order-choice strong {font-size:10px;white-space:nowrap;color:#f0cd84}
.order-choice button {
 min-width:0;
 min-height:30px;
 padding:3px 5px;
 border:1px solid #63828b;
 border-radius:5px;
 background:#213c47;
 color:#e6efeb;
 line-height:1.2;
 font-family:inherit;
 font-size:10px;
 font-weight:700;
}
.order-choice button[aria-pressed="true"] {color:#172d33;background:#e0bd77;border-color:#f1d493}
.order-choice button:disabled {opacity:.62}
#hq-order-rule {display:block;margin-top:4px;color:#c1d3d4;font-size:10px;line-height:1.15}

.mission-hud {min-width:0}
.mission-title>#stage {min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.mission-hud:has(#battle-economy:not([hidden])) .progress-track {margin-top:4px}
#battle-economy {
 display:flex;
 justify-content:center;
 align-items:center;
 gap:7px;
 min-width:0;
 margin-top:3px;
 font-size:10px;
 line-height:1.25;
 text-shadow:0 1px 3px #000,0 0 4px #000;
}
#battle-economy[hidden] {display:none}
#battle-economy>span:first-child {flex:none;color:#f1d695;white-space:nowrap}
#battle-earned {font-variant-numeric:tabular-nums}
#battle-earn-event {overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#e0ebe5}
#battle-earn-event.is-reward {color:#bff5a0;font-weight:800}

#result-rewards {
 display:grid;
 grid-template-columns:1fr 1fr;
 gap:5px;
 margin:0 0 11px;
}
#result-rewards[hidden] {display:none}
#result-rewards>div {
 padding:7px 5px;
 border:1px solid #ad925d80;
 border-radius:8px;
 background:#21383c;
 text-align:center;
}
#result-rewards strong,#result-rewards small {display:block}
#result-rewards strong {font-size:23px;line-height:1.1;color:#ffda8d;font-variant-numeric:tabular-nums}
#result-rewards small {margin-top:2px;color:#d8e2dd;font-size:9px}
#result-card #result-star-summary {margin:0 0 10px;color:#f1daab;font-size:12px;line-height:1.4}
:is(#result-reward-parts,#result-star-goals) {margin:8px 0;padding:0;list-style:none;font-size:11px}
:is(#result-reward-parts,#result-star-goals) li {display:flex;justify-content:space-between;gap:8px;padding:4px 0}
:is(#result-reward-parts,#result-star-goals) strong {white-space:nowrap;color:#efcf8e}

/* Currency dialogs are scoped separately from the HQ and shop. */
.wallet-panel {
 --wallet-accent:#f7d28a;
 width:min(calc(100vw - 24px),448px);
 max-height:min(calc(100dvh - 28px),700px);
 margin:auto;
 padding:0;
 overflow:auto;
 overscroll-behavior:contain;
 border:1px solid #4d6871;
 border-radius:18px;
 background:#112730;
 color:#f2f6ee;
 box-shadow:0 24px 72px #050d14bb;
}
.wallet-panel::backdrop {background:#07141cdb}
.wallet-stars-panel {--wallet-accent:#ffdf92}
.wallet-premium {--wallet-accent:#a6eec3}
.wallet-panel .wallet-heading {
 position:sticky;
 top:0;
 z-index:1;
 display:grid;
 grid-template-columns:auto minmax(0,1fr) auto;
 align-items:center;
 gap:10px;
 padding:12px 14px;
 border-bottom:1px solid #3d5964;
 background:#18323d;
}
.wallet-heading svg {width:36px;height:36px}
.wallet-heading small,.wallet-kicker,.wallet-overview small {
 color:#bfd0d5;
 font-size:12px;
 line-height:1.25;
 font-weight:650;
}
.wallet-heading h2 {margin:2px 0 0;font-size:23px;line-height:1.12}
.wallet-heading h2:focus {outline:none}
.wallet-panel :is(.wallet-done,.wallet-button) {
 appearance:none;
 display:inline-flex;
 align-items:center;
 justify-content:center;
 gap:5px;
 min-height:44px;
 padding:7px 11px;
 border:1px solid #52727e;
 border-radius:9px;
 background:#203e49;
 color:#eef6f3;
 font-family:inherit;
 font-size:13px;
 font-weight:700;
 line-height:1.2;
}
.wallet-panel .wallet-done {
 padding-inline:13px;
 border-color:#ffdf99;
 background:#efd091;
 color:#212b2d;
}
.wallet-panel .wallet-button:hover {background:#294d59}
.wallet-panel .wallet-done:hover {background:#ffe0a5}
.wallet-content {display:grid;gap:10px;padding:12px 14px 16px}
.wallet-content [hidden] {display:none}
.wallet-overview {
 display:flex;
 align-items:center;
 justify-content:space-between;
 gap:10px;
 padding:12px 13px;
 border:1px solid #577783;
 border-radius:12px;
 background:linear-gradient(120deg,#234752,#1a3641);
}
.wallet-overview div {display:grid;gap:3px;min-width:0}
.wallet-overview strong {font-size:26px;line-height:1.1;color:var(--wallet-accent);font-variant-numeric:tabular-nums}
.wallet-overview div+div {text-align:right}
.wallet-overview div+div strong {font-size:21px}
.wallet-star-progress progress {
 appearance:none;
 width:46%;
 height:8px;
 border:0;
 border-radius:6px;
 background:#102730;
 color:var(--wallet-accent);
}
.wallet-star-progress progress::-webkit-progress-bar {border-radius:6px;background:#102730}
.wallet-star-progress progress::-webkit-progress-value {border-radius:6px;background:var(--wallet-accent)}
.wallet-star-progress progress::-moz-progress-bar {border-radius:6px;background:var(--wallet-accent)}
.wallet-actions {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
.wallet-panel .wallet-actions button {min-width:0;padding-inline:3px}
.wallet-card,.wallet-folds,.wallet-topup {
 min-width:0;
 border:1px solid #425e69;
 border-radius:11px;
 background:#19333e;
}
.wallet-card {padding:11px 12px}
.wallet-card-heading {display:flex;align-items:baseline;justify-content:space-between;flex-wrap:wrap;gap:4px 8px}
.wallet-kicker {display:block;margin-bottom:4px}
.wallet-card :is(h3,summary),.wallet-topup h3 {margin:0;font-size:15px;font-weight:750;color:#f4f6ef}
.wallet-card p,.wallet-topup p {margin:5px 0 0;color:#c9d9dd;font-size:13px;line-height:1.4}
.wallet-card-heading strong {color:var(--wallet-accent);font-size:13px;white-space:nowrap}
.wallet-folds .wallet-card {border:0;border-radius:0;background:none}
.wallet-folds .wallet-card+.wallet-card {border-top:1px solid #425e69}
details.wallet-card {padding:0 12px}
details.wallet-card[open] {padding-bottom:10px}
.wallet-panel summary {
 position:relative;
 display:flex;
 align-items:center;
 min-height:44px;
 padding:6px 20px 6px 0;
 list-style:none;
 cursor:pointer;
}
.wallet-panel summary::-webkit-details-marker {display:none}
.wallet-panel summary::after {
 content:"";
 position:absolute;
 right:3px;
 width:7px;
 height:7px;
 border:solid currentColor;
 border-width:0 1.5px 1.5px 0;
 transform:rotate(45deg);
}
.wallet-panel details[open]>summary::after {transform:rotate(225deg)}
.wallet-card>button {margin-top:8px}
.wallet-card ul:empty {display:none}
.wallet-list {margin:5px 0 0;padding:0;list-style:none;font-size:14px}
.wallet-list li {
 display:flex;
 align-items:center;
 justify-content:space-between;
 gap:8px;
 min-height:30px;
 padding:6px 0;
 border-bottom:1px solid #4a6d7755;
}
.wallet-list li:last-child {border-bottom:0}
.wallet-list small {display:block;margin-top:3px;color:#bed0d6;font-size:12px}
.wallet-list strong {flex:none;color:var(--wallet-accent);font-variant-numeric:tabular-nums}
.wallet-list .wallet-in {color:#b1edaa}
.wallet-list .wallet-out {color:#ffd0a4}
.wallet-list .wallet-stars {letter-spacing:.05em}
.wallet-goals {display:grid;gap:6px;margin:8px 0 0;padding:0;list-style:none;font-size:13px;line-height:1.25}
.wallet-goals li {display:flex;gap:7px;align-items:baseline}
.wallet-goals li>span {color:var(--wallet-accent)}
.wallet-goals strong {display:block;margin-top:2px;font-size:12px;color:#c9d9dd}
.wallet-panel #hq-economy-order {margin-top:10px;padding:8px}
.wallet-panel .order-choice {grid-template-columns:repeat(2,minmax(0,1fr))}
.wallet-panel .order-choice strong {grid-column:1/-1;font-size:12px}
.wallet-panel .order-choice button {min-height:44px;font-size:13px}
.wallet-panel #hq-order-rule {font-size:12px;line-height:1.3}
.wallet-store-badge {
 flex:none;
 padding:5px 7px;
 border:1px solid #629786;
 border-radius:6px;
 color:#c7efda;
 font-size:12px;
 font-weight:700;
}
.wallet-topup {border-color:#65967e;background:#1a3834}
.wallet-topup summary {
 gap:9px;
 min-height:48px;
 padding:7px 30px 7px 12px;
 border-radius:10px;
 background:var(--wallet-accent);
 color:#132e24;
 font-size:16px;
 font-weight:800;
}
.wallet-topup summary::after {right:13px}
.wallet-topup summary span {font-size:23px;line-height:1}
.wallet-topup[open]>summary {border-radius:10px 10px 0 0}
.wallet-topup-content {padding:10px 12px 12px}
.wallet-topup-content>button {margin-top:8px}
.wallet-points-link {display:flex;align-items:center;justify-content:space-between;gap:8px}
.wallet-points-link button {flex:none;margin:0}
#premium-packs {display:grid;gap:6px}
#premium-packs:not(:empty) {margin-top:8px}
.wallet-panel #premium-packs button {
 width:100%;
 justify-content:space-between;
 border-color:#679783;
 background:#284940;
 color:#eef8f0;
 text-align:left;
 font-variant-numeric:tabular-nums;
}
#premium-packs button strong {color:var(--wallet-accent)}
.wallet-panel :is(button,summary):focus-visible {outline:2px solid var(--wallet-accent);outline-offset:2px}
.wallet-panel .wallet-topup summary:focus-visible {outline-offset:-4px;outline-color:#173d2d}
.wallet-panel .wallet-folds summary:focus-visible {outline-offset:-2px}
.hq-shell .campaign-head button.economy-tile:focus-visible {outline:2px solid #f8d37a;outline-offset:2px}

@media(max-width:350px) {
 .wallet-panel .wallet-heading,.wallet-content {padding-inline:10px}
 .wallet-heading {gap:7px}
 .wallet-heading h2 {font-size:20px}
 .wallet-heading svg {width:30px;height:30px}
}
@media(max-width:700px) {
 .hq-shell .campaign-head {column-gap:5px}
 .economy-wallet {gap:9px}
 .economy-icon {width:23px;height:23px}
 .economy-tile strong {font-size:13px}
}
@media(min-width:351px) and (max-width:420px) {
 .hq-screen .campaign-head h2 {font-size:16px;letter-spacing:-.95px}
}
@media(max-width:390px) {
 .economy-wallet {gap:8px}
 .economy-icon {width:22px;height:22px}
}
@media(max-width:350px) {
 .economy-wallet {gap:7px}
 .economy-icon {width:20px;height:20px}
 .economy-tile strong {font-size:12px}
}
@media(max-width:360px) {
 #battle-economy {gap:4px;font-size:9px}
}
