/* B3.20.1: bounded, centered choices with a content-sized action row. */
.lobbyAux{gap:12px;margin-top:16px}
#lobbyActions .modeTabs{gap:12px;align-items:stretch}
#lobbyActions .modeTabs button{white-space:nowrap;line-height:1.3;min-height:44px}
body.compactUi #lobbyActions{display:flex;flex-direction:column;gap:10px}
body.compactUi #lobbyActions>*{margin-top:0;margin-bottom:0}
body.compactUi #homeAux,body.compactUi #lobbyActions .modeTabs{gap:10px}
body[data-phase="prep"]:is([data-stage="upgrade"],[data-stage="shop"]) #prep:not(.hidden){
 --choice-width:var(--prep-choice-width,600px);--choice-height:var(--prep-choice-height,248px);
 box-sizing:border-box;width:min(var(--choice-width),calc(var(--ui-width,var(--vvw,100vw)) - 24px))!important;
 height:min(var(--choice-height),calc(var(--ui-height,var(--vvh,100dvh)) - 24px))!important;
 max-height:calc(var(--ui-height,var(--vvh,100dvh)) - 24px)!important;
 left:var(--vvcenterx,50vw)!important;top:var(--vvcentery,50dvh)!important;bottom:auto!important;transform:translate(-50%,-50%)!important;
 padding:10px!important;overflow:hidden!important;display:flex;flex-direction:column;gap:8px;
 border:1px solid #52604b!important;border-radius:12px!important;background:rgba(22,29,24,.98)!important;box-shadow:0 16px 50px #0008;
}
body[data-phase="prep"]:is([data-stage="upgrade"],[data-stage="shop"]) #prep .prepTitle{position:static!important;flex:0 0 44px;min-height:44px;height:44px;max-height:44px;padding:0!important;margin:0!important;display:flex;align-items:center;gap:10px;border:0}
body[data-phase="prep"]:is([data-stage="upgrade"],[data-stage="shop"]) #prep .prepTitle>div:first-child{max-width:none;min-width:0;flex:1}
body[data-stage="upgrade"] #prepEyebrow,body[data-stage="shop"] #prepEyebrow{display:none}
body[data-stage="upgrade"] #prepStageTitle,body[data-stage="shop"] #prepStageTitle{font-size:17px;line-height:1.3;white-space:nowrap;letter-spacing:0}
body[data-stage="upgrade"] #prepTime,body[data-stage="shop"] #prepTime{font-size:12px;margin-left:6px;color:#a3b294}
body[data-stage="upgrade"] #foldPrep,body[data-stage="shop"] #foldPrep{width:44px;min-width:44px;height:44px;min-height:44px;padding:0!important;font-size:12px;margin:0!important}
.shopHeader{display:none!important}
body[data-stage="shop"] .prepTitle .shopHeader{display:flex!important;position:relative;align-items:center;gap:6px;padding:0!important;margin:0!important;border:0;background:none;min-width:0;white-space:nowrap}
.shopHeader small{font-size:12px;color:#acb99b}.shopHeader strong{font-size:17px!important;color:#d9e9ac}
#ticketAward{position:absolute;top:40px;right:0;z-index:4;pointer-events:none;opacity:0;padding:5px 8px;background:#34402b;border-radius:6px;font-size:12px;transition:opacity .15s;white-space:nowrap}
#ticketAward.visible{opacity:1}
body[data-phase="prep"]:is([data-stage="upgrade"],[data-stage="shop"]) #prepBody{min-height:0;flex:1;overflow:hidden;display:flex;flex-direction:column;gap:0}
body[data-phase="prep"]:is([data-stage="upgrade"],[data-stage="shop"]) .prepStage:not(.hidden){min-height:0!important;flex:1;display:flex;flex-direction:column;gap:8px;padding:0!important;margin:0!important}
#waveSummary,#shopReady{display:none!important}
body #offers,body #shopOffers{display:grid;min-height:0;min-width:0;flex:1;overflow:auto;grid-template-columns:repeat(3,minmax(0,1fr))!important;grid-auto-rows:minmax(0,1fr);gap:10px!important;align-items:stretch;margin:0!important;padding:0!important}
body #offers .upgradeChoice,body #shopOffers .shopChoice{min-width:0;min-height:0;display:flex;margin:0;padding:0}
body[data-phase="prep"] :is(#offers,#shopOffers) :is(.upgradeCard,.shopCard){position:relative;box-sizing:border-box;min-width:0;min-height:44px!important;width:100%;height:100%!important;margin:0!important;padding:8px!important;display:flex;flex-direction:column;gap:0;overflow:hidden;text-align:left;background:#242d26!important;border:1px solid #46513f!important;border-radius:8px!important;box-shadow:none!important;transition:border-color .14s,background-color .14s}
body[data-phase="prep"] :is(#offers,#shopOffers) :is(.upgradeCard,.shopCard):hover{transform:none!important;background:#2b362b!important;border-color:#7a9265!important}
body[data-phase="prep"] :is(#offers,#shopOffers) :is(.upgradeCard,.shopCard).selected{border-color:#b7d590!important;outline:1px solid #b7d590;outline-offset:-2px;background:#303d2c!important}
body[data-phase="prep"] :is(#offers,#shopOffers) :is(.upgradeCard,.shopCard).selected:after{content:'✓';position:absolute;right:6px;top:2px;font-size:11px;color:#bed995}
body[data-phase="prep"] :is(#offers,#shopOffers) .cardArt{display:flex!important;position:absolute!important;left:8px;top:8px;width:26px!important;height:26px!important;min-height:26px!important;padding:0!important;align-items:center;justify-content:center;background:none!important;border:0!important;color:#cfdfc8}
body[data-phase="prep"] :is(#offers,#shopOffers) .cardArt:after,body #shopOffers .shopCard:before{display:none!important}
.prepIcon{display:block;width:26px;height:26px}
body[data-phase="prep"] :is(#offers,#shopOffers) .epic .cardArt{border-bottom:2px solid #b49bcb!important}
body[data-phase="prep"] :is(#offers,#shopOffers) .ultimate .cardArt{border-bottom:2px solid #d6bc78!important}
body[data-phase="prep"] :is(#offers,#shopOffers) .cardBody{display:flex;flex:1;flex-direction:column;gap:4px;padding:0!important;min-height:0;min-width:0}
body[data-phase="prep"] :is(#offers,#shopOffers) .cardBody b{box-sizing:border-box;min-height:26px;padding-left:34px;font-size:14px;line-height:1.25;color:#edf0df;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;font-weight:650}
body[data-phase="prep"] :is(#offers,#shopOffers) .rarity{padding:0!important;font-size:12px!important;line-height:16px;letter-spacing:0;white-space:nowrap;color:#afbea3}
body[data-phase="prep"] :is(#offers,#shopOffers) .cardBody small{font-size:12px!important;line-height:16px!important;color:#bbc7ae;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin:0!important}
body #shopOffers .shopPrice{font-size:13px!important;line-height:18px!important;margin:0!important;color:#d7e8a8;white-space:nowrap}
body #offers .cardInfo,body #offers .cardInlineDetail,body[data-phase="prep"] :is(#offers,#shopOffers) .cardSerial,body[data-phase="prep"] :is(#offers,#shopOffers) .buildTag{display:none!important}
body #stageUpgrade .rerollRow,body #stageShop .shopActions{position:static!important;flex:0 0 44px;display:flex;align-items:center;justify-content:flex-end;gap:10px;margin:0!important;padding:0!important;border:0!important;background:none!important;box-shadow:none!important}
body #stageUpgrade .rerollRow button,body #stageShop .shopActions button,body #shopDetail :is(#shopDetailBuy,#shopDetailBack){box-sizing:border-box;flex:0 0 auto;width:auto!important;min-width:88px;min-height:44px;height:44px;margin:0!important;padding:0 12px!important;font-size:13px!important;line-height:1.2;white-space:nowrap;letter-spacing:0;border-radius:7px!important}
body #confirmUpgrade,body #shopDone,body #shopDetailBuy{display:block!important;min-width:108px!important;max-width:128px!important}
body #stageUpgrade #upgradeReportToggle{display:block!important;min-width:44px!important;width:44px!important;margin-right:auto!important;padding:0!important;font-size:12px!important}
body #stageUpgrade #upgradeDetailBack{display:none!important;min-width:64px!important;margin-right:auto!important}
body #stageUpgrade.showDetail #upgradeDetailBack{display:block!important}
body #stageUpgrade.showDetail :is(#offers,#upgradeReportToggle,#reroll){display:none!important}
body #upgradeDetail:not(.hidden){flex:1;min-height:0;display:flex;overflow:hidden;animation:prepDetailIn .14s ease-out}
#upgradeDetailBody{width:100%;overflow:auto;min-height:0;flex:1;font-size:13px;line-height:1.6;white-space:pre-line;overscroll-behavior:contain;touch-action:pan-y;padding:0 4px}
#upgradeDetailBody h3{font-size:15px;margin:0 0 4px;color:#edf0df}#upgradeDetailBody small{font-size:12px;color:#afbea3}#upgradeDetailBody p{margin:6px 0 0}
body #stageShop .shopWorkspace{flex:1;min-height:0;display:flex!important;overflow:hidden;margin:0!important;align-items:stretch!important}
body #stageShop .shopWorkspace.hasSelection #shopOffers{display:none!important}
body #stageShop #shopDetail:not(.hidden){min-height:0;flex:1;display:grid!important;grid-template-columns:minmax(0,1fr) auto;grid-template-rows:minmax(0,1fr) 44px;gap:8px;padding:0!important;margin:0!important;border:0!important;background:none!important;animation:prepDetailIn .14s ease-out}
body #stageShop .shopDetailBody{grid-column:1/-1;grid-row:1;min-height:0;overflow:auto;padding:0 4px!important;display:flex;flex-direction:column;gap:4px;overscroll-behavior:contain;touch-action:pan-y}
body #shopDetailName{font-size:15px!important}body #shopDetailLevel,body #shopDetailReason{font-size:12px!important;color:#afbea3}
body #shopDetailDesc{margin:2px 0!important;white-space:pre-line;font-size:13px!important;line-height:1.6!important}
body #shopDetailPrice{font-size:13px!important;color:#d7e8a8}
body #shopDetailBack{display:block!important;grid-column:1;grid-row:2;justify-self:start;min-width:64px!important}
body #shopDetailBuy{grid-column:2;grid-row:2;justify-self:end}
body #stageShop:has(.hasSelection) .shopActions{display:none!important}
body[data-phase="prep"]:is([data-stage="upgrade"],[data-stage="shop"]) #nudgeTeam:not(.hidden){position:absolute!important;top:10px;right:64px;width:44px;min-width:44px;min-height:44px;height:44px;padding:0!important;margin:0!important;font-size:0!important;overflow:hidden}
body[data-phase="prep"]:is([data-stage="upgrade"],[data-stage="shop"]) #nudgeTeam:after{content:'催促';font-size:12px}
body[data-phase="prep"]:is([data-stage="upgrade"],[data-stage="shop"]) #prep:has(#nudgeTeam:not(.hidden)) .prepTitle{padding-right:54px!important}
body[data-phase="prep"]:is([data-stage="upgrade"],[data-stage="shop"]) #prep:has(#prepBody.hidden){height:auto!important}
body[data-phase="prep"]:is([data-stage="upgrade"],[data-stage="shop"]) #prep.prepWaiting:not(.hidden){width:220px!important;height:52px!important;padding:4px 8px!important;gap:0}
body #prep.prepWaiting .prepTitle,body #prep.prepWaiting #prepBody{display:none!important}
#prepWaiting:not(.hidden){display:flex;align-items:center;justify-content:space-between;gap:8px;height:44px;font-size:12px;color:#d6e4c5;white-space:nowrap}
#waitingNudge{width:44px;min-width:44px;height:44px;min-height:44px;padding:0;font-size:12px}
@keyframes prepDetailIn{from{opacity:.65;transform:translateY(3px)}to{opacity:1;transform:none}}
body[data-prep-short="true"] #offers .shortEffect{display:none!important}
body[data-prep-short="true"][data-phase="prep"]:is([data-stage="upgrade"],[data-stage="shop"]) #prep:not(.hidden){padding:8px!important;gap:6px}
body[data-prep-short="true"]:is([data-stage="upgrade"],[data-stage="shop"]) .prepStage:not(.hidden){gap:6px}
body[data-prep-short="true"][data-phase="prep"] :is(#offers,#shopOffers) :is(.upgradeCard,.shopCard){padding:6px!important}
body[data-prep-short="true"][data-phase="prep"] :is(#offers,#shopOffers) .cardBody{gap:2px}
body[data-prep-short="true"][data-phase="prep"] :is(#offers,#shopOffers) .cardArt{top:6px;left:6px}
@media(prefers-reduced-motion:reduce){#upgradeDetail,#shopDetail{animation:none!important}body[data-phase="prep"] :is(#offers,#shopOffers) :is(.upgradeCard,.shopCard){transition:none}}

body[data-phase="prep"] :is(#offers,#shopOffers) .cardBody small{white-space:nowrap!important;overflow:hidden!important;display:block!important;-webkit-line-clamp:1!important;max-height:16px!important}
body[data-phase="prep"] #shopOffers .shopPrice{padding:0!important;border:0!important}
body[data-phase="prep"]:is([data-stage="upgrade"],[data-stage="shop"]) .prepTitle>div:first-child{width:auto!important;text-align:left!important}
body[data-phase="prep"]:is([data-stage="upgrade"],[data-stage="shop"]) #foldPrep{position:static!important}
body #stageUpgrade #reroll{width:96px!important;min-width:96px!important;max-width:100px!important}
body[data-phase="prep"] #shopOffers .shopCard:not(.selected):after{display:none!important}
body[data-prep-short="true"][data-phase="prep"] #stageUpgrade #offers .shortEffect{display:none!important}
/* Long names use the optional summary space. Short shops put level and cost together. */
body[data-phase="prep"] #offers .upgradeCard.longName .shortEffect{display:none!important}
body[data-prep-short="true"][data-phase="prep"] #shopOffers .cardBody{display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-rows:minmax(26px,1fr) 18px;column-gap:4px;row-gap:2px}
body[data-prep-short="true"][data-phase="prep"] #shopOffers .cardBody b{grid-column:1/-1;grid-row:1}
body[data-prep-short="true"][data-phase="prep"] #shopOffers .rarity{grid-column:1;grid-row:2;font-size:12px!important;line-height:18px}
body[data-prep-short="true"][data-phase="prep"] #shopOffers .shopPrice{grid-column:2;grid-row:2;font-size:12px!important;line-height:18px!important}

#bladeSharpenHud{font-size:11px;line-height:16px;color:#cddd9f}

#corrosionHud{font-size:11px;line-height:16px;color:#cbdc83;white-space:nowrap}

/* On short screens the selected item needs the same reading space as before. */
body #stageShop:has(.hasSelection) .grenadeEquipment{display:none}
