:root {
  --hud-text: #fff;
  --hud-shadow: 0 1px 2px #000, 0 0 4px #0008;
  --hp: #e0201a;
  --armor: #22a8f0;
  --panel: #0008;
}
html, body { margin: 0; height: 100%; overflow: hidden; background: #6fa8dc; font-family: system-ui, sans-serif; }
#view { display: block; width: 100vw; height: 100vh; }
#hud { position: fixed; inset: 0; pointer-events: none; color: var(--hud-text); text-shadow: var(--hud-shadow); }
#crosshair { position: absolute; left: 50%; top: 50%; width: 14px; height: 14px; margin: -7px 0 0 -7px; }
#crosshair::before, #crosshair::after { content: ""; position: absolute; background: #fff; box-shadow: 0 0 2px #000; }
#crosshair::before { left: 6px; top: 0; width: 2px; height: 14px; }
#crosshair::after { top: 6px; left: 0; width: 14px; height: 2px; }
#ammo { position: absolute; right: 30%; bottom: 120px; font-size: 26px; font-weight: 700; }
#bars { position: absolute; left: 50%; bottom: 18px; width: 420px; margin-left: -210px; }
.bar { position: relative; height: 10px; background: var(--panel); margin-top: 4px; }
.fill { height: 100%; width: 100%; }
.fill.hp { background: var(--hp); }
.fill.armor { background: var(--armor); width: 0; }
.bar span { position: absolute; right: 4px; top: -16px; font-size: 12px; }
#hotbar { position: absolute; left: 50%; bottom: 44px; transform: translateX(-50%); display: flex; gap: 6px; }
.slot { width: 64px; height: 56px; background: #c8782c; border-radius: 6px; display: grid; place-items: center; font-size: 12px; font-weight: 700; opacity: .85; }
.slot.active { outline: 3px solid #9fd8ff; background: #8a4dd6; }
.slot.melee { background: #d8862e; }
#status { position: absolute; left: 50%; top: 30%; transform: translateX(-50%); font-size: 22px; font-weight: 700; }
#debug { position: absolute; left: 8px; top: 8px; font: 12px/1.4 ui-monospace, monospace; background: var(--panel); padding: 6px 8px; white-space: pre; }
#res { white-space: pre; }
/* DamageCloud's DamageText (TextMeshPro): tf2build SDF, 20, colour (1, 0.831, 0.047); material outline 0.15 black at
   0.275 alpha, underlay black 0.314 offset (0.5, −0.5) softness 0.3 */
.dmg { position: fixed; color: rgb(255, 212, 12); font-family: 'tf2build', sans-serif; font-size: 20px; pointer-events: none;
  -webkit-text-stroke: 1.5px rgba(0, 0, 0, 0.275); paint-order: stroke fill;
  text-shadow: 2px 2px 3px rgba(0, 0, 0, 0.314); transform: translate(-50%, -50%); white-space: nowrap; }
#overlay { position: fixed; inset: 0; display: grid; place-content: center; text-align: center; background: #000a; color: #fff; cursor: pointer; padding: 16px; z-index: 50; }
#overlay h1 { font-size: 48px; color: #f5b623; margin: 0 0 12px; text-shadow: 0 3px 0 #7a4b00; }
#overlay .hint { opacity: .8; font-size: 14px; max-width: 640px; }
@media (max-width: 600px) { #bars { width: 90vw; margin-left: -45vw; } #overlay h1 { font-size: 32px; } }
#overlay[hidden], #hud[hidden], #debug[hidden] { display: none; }
#res { position: absolute; left: 16px; top: 206px; font-size: 18px; font-weight: 700; }
#topbar { position: absolute; left: 50%; top: 10px; transform: translateX(-50%); font-size: 20px; font-weight: 800; white-space: pre; }
#feed { position: absolute; left: 16px; top: 230px; font-size: 14px; font-weight: 700; display: flex; flex-direction: column; gap: 3px; max-width: 40vw; }
#feed div { background: var(--panel); padding: 2px 8px; border-radius: 4px; }
#banner { position: absolute; left: 50%; top: 18%; transform: translateX(-50%); font-size: 30px; font-weight: 900; color: #ffdf3a; text-align: center; }
#banner[hidden] { display: none; }
#hurt { position: fixed; inset: 0; pointer-events: none; opacity: 0; box-shadow: inset 0 0 120px 40px #d0101a; }
#open-settings { margin: 4px auto 10px; padding: 8px 22px; font: 700 15px system-ui, sans-serif; border: 0; border-radius: 6px; background: #f5b623; color: #3a2400; cursor: pointer; }
#settings { position: fixed; inset: 4vh 4vw; background: #14181fef; color: #fff; border-radius: 10px; padding: 16px 20px; overflow: auto; text-align: left; cursor: default; z-index: 55; }
#settings[hidden] { display: none; }
#settings .set-head { display: flex; justify-content: space-between; align-items: center; }
#settings h2 { margin: 0; color: #f5b623; }
#settings h3 { margin: 0 0 8px; }
#settings .set-msg { opacity: .8; font-size: 13px; min-height: 1.2em; }
#settings .set-body { display: flex; gap: 32px; flex-wrap: wrap; }
#settings table.binds { border-collapse: collapse; font-size: 14px; }
#settings .binds th { text-align: left; padding: 4px 8px; opacity: .7; font-weight: 600; }
#settings .binds tr.grp th { padding-top: 12px; color: #9fd8ff; opacity: 1; }
#settings .binds td { padding: 2px 8px; }
#settings button { font: 600 13px system-ui, sans-serif; border: 1px solid #fff3; background: #ffffff14; color: #fff; border-radius: 5px; padding: 4px 10px; cursor: pointer; }
#settings .bind-cell { min-width: 96px; }
#settings .bind-cell.listening { background: #f5b623; color: #222; }
#settings .mouse label { display: block; margin: 8px 0; font-size: 14px; }
#settings .set-close { background: #f5b623; color: #222; border: 0; padding: 6px 18px; }
@media (max-width: 600px) { #settings { inset: 2vh 2vw; padding: 12px; } #settings .bind-cell { min-width: 70px; } }
#blind { position: fixed; inset: 0; pointer-events: none; opacity: 0; background: #fff; }
#effects { position: absolute; left: 50%; bottom: 112px; transform: translateX(-50%); font-size: 15px; font-weight: 800; color: #ffcf6a; }
#minimap { position: absolute; left: 14px; top: 16px; width: 180px; height: 180px; }
#bigmap { position: absolute; left: 50%; top: 50%; width: min(80vmin, 640px); height: min(80vmin, 640px); transform: translate(-50%, -50%); border-radius: 8px; box-shadow: 0 0 0 3px #fff8, 0 8px 30px #000a; }
#bigmap[hidden] { display: none; }
#bigmap-close { position: fixed; z-index: 30; cursor: pointer; pointer-events: auto; touch-action: none; filter: hue-rotate(170deg) saturate(2.2) brightness(1.05) drop-shadow(0 2px 2px #0008); }
#bigmap-close[hidden] { display: none; }
#feed { top: 300px; }
#debug { top: auto; bottom: 8px; }

/* original main menu (menu.js) */
#menu { position: fixed; inset: 0; z-index: 40; overflow: hidden; user-select: none; }
/* only buttons take clicks: layout containers (e.g. BottomLeftButtons, whose rect spans over BATTLE) let them through */
#menu .ui-node { position: absolute; pointer-events: none; }
#menu .ui-node.ui-button { pointer-events: auto; }
#menu .ui-img { position: absolute; left: 0; top: 0; width: 100%; height: 100%; }
#menu .ui-text { position: absolute; inset: 0; display: flex; white-space: pre-wrap; overflow: visible; pointer-events: none; }
#menu .ui-text span { display: inline-block; max-width: 100%; }
#menu .ui-button { cursor: pointer; }
#menu .ui-button:active { filter: brightness(0.78); }

/* pre-match lobby label (InRoomRoundTimer) */
#lobby { position: fixed; left: 50%; top: 14%; transform: translateX(-50%); z-index: 30; white-space: pre; text-align: center;
  font-family: 'tf2build', sans-serif; font-size: 34px; line-height: 1.15; color: #fff; pointer-events: none;
  text-shadow: 2px 2px 0 #000, -2px 2px 0 #000, 2px -2px 0 #000, -2px -2px 0 #000; text-transform: uppercase; }
#lobby[hidden] { display: none; }

/* original battle HUD (hud.js / ui.js) */
#battle-hud { position: fixed; inset: 0; z-index: 5; pointer-events: none; overflow: hidden; }
#battle-hud .ui-node { position: absolute; }
#battle-hud .ui-img { position: absolute; left: 0; top: 0; width: 100%; height: 100%; }
#battle-hud .ui-text { position: absolute; inset: 0; display: flex; white-space: pre-wrap; overflow: visible; }
#battle-hud .ui-text span { display: inline-block; max-width: 100%; }
#battle-hud .hud-slot { position: absolute; }
#battle-hud .hud-slot img { position: absolute; left: 0; top: 0; width: 100%; height: 100%; }
#battle-hud .hud-slot .icon { left: 10%; top: 8%; width: 80%; height: 80%; object-fit: contain; }
#battle-hud .hud-slot .count { position: absolute; right: 6%; bottom: 2%; color: #fff; font-family: 'tf2build', sans-serif; text-shadow: 1px 1px 0 #000; }
#battle-hud .hud-slot.active { filter: drop-shadow(0 0 4px #ffe23a) brightness(1.15); transform: translateY(-6%); }
body.original-hud #topbar, body.original-hud #crosshair, body.original-hud #bars, body.original-hud #hotbar { display: none; }
body.original-hud #minimap { position: fixed; border-radius: 0; }
#battle-hud .ui-text { white-space: pre; }
#battle-hud img.item { position: absolute; left: 8%; top: 6%; width: 84%; height: 84%; object-fit: contain; }
body.original-hud #minimap { z-index: 6; }
/* the FPS / ping readout beside the minimap (Settings → Options → Show FPS and ping) */
#netstats { position: fixed; z-index: 6; pointer-events: none; color: #fff; font: 15px/1.3 'tf2build', sans-serif; text-shadow: 1px 1px 0 #000; white-space: pre; background: rgba(0,0,0,.35); padding: 2px 7px; border-radius: 5px; }
#netstats .good { color: #7dff6a; } #netstats .mid { color: #ffd23f; } #netstats .bad { color: #ff5a4a; }
body.paused-menu #netstats { display: none !important; }
/* teaming up on the island (party.js): the ask prompt (RequestPartyInvite), the request window (GroupJoinInviteWindow),
   your party's list (PartyRoot) and the teammates' tags (TeamMarker) */
#party-ui { position: fixed; inset: 0; z-index: 7; pointer-events: none; font-family: 'tf2build', sans-serif; color: #fff; text-shadow: 1px 1px 0 #000; }
#party-ui .party-prompt { position: absolute; left: 50%; bottom: 24%; transform: translateX(-50%); display: flex; align-items: center; gap: 10px; background: rgba(0,0,0,.45); border-radius: 8px; padding: 6px 10px; max-width: 92vw; }
#party-ui .party-prompt-text { font-size: 17px; color: #37bbff; text-align: center; }
#party-ui .party-prompt-text .sub { font-size: 13px; color: #e8e8e8; }
#party-ui .party-prompt-text .keys { font-size: 12px; color: #ffd23f; margin-top: 2px; }
#party-ui .party-btn { pointer-events: auto; cursor: pointer; display: flex; align-items: center; justify-content: center; border-radius: 8px; user-select: none; touch-action: manipulation; }
#party-ui .party-ask { width: 46px; height: 46px; font-size: 34px; background: #2f8fe0; box-shadow: 0 3px 0 #1b5d96; flex: none; }
#party-ui .party-ask.full { background: #777; box-shadow: 0 3px 0 #444; }
#party-ui .party-window { position: absolute; left: 50%; top: 16%; transform: translateX(-50%); background: rgba(10,20,40,.82); border: 2px solid #37bbff; border-radius: 10px; padding: 10px 14px; min-width: 280px; text-align: center; }
#party-ui .party-cap { font-size: 16px; color: #37bbff; margin-bottom: 8px; }
#party-ui .party-cards { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
#party-ui .party-card { position: relative; width: 130px; padding: 8px 6px 6px; background: rgba(255,255,255,.08); border-radius: 8px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
#party-ui .party-nick { font-size: 15px; max-width: 118px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#party-ui .party-accept { padding: 6px 12px; font-size: 15px; background: #3cb043; box-shadow: 0 3px 0 #23702a; }
#party-ui .party-decline { position: absolute; right: -8px; top: -8px; width: 26px; height: 26px; font-size: 15px; background: #d33; border-radius: 50%; }
#party-ui .party-foot { font-size: 12px; color: #cfd8e3; margin-top: 8px; }
#party-ui .party-list { position: absolute; left: 14px; top: 250px; display: flex; flex-direction: column; gap: 3px; }
#party-ui .party-row { display: flex; align-items: center; gap: 6px; background: rgba(0,0,0,.4); border-radius: 4px; padding: 2px 6px; font-size: 13px; color: #9dff8a; }
#party-ui .party-row.dead { color: #999; text-decoration: line-through; }
#party-ui .party-name { max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#party-ui .party-hp { width: 60px; height: 6px; background: rgba(255,255,255,.2); border-radius: 3px; overflow: hidden; }
#party-ui .party-hp i { display: block; height: 100%; background: #5dff5a; }
.party-tag { position: fixed; z-index: 4; transform: translate(-50%, -100%); pointer-events: none; display: flex; flex-direction: column; align-items: center; font: 12px 'tf2build', sans-serif; color: #5dff5a; text-shadow: 1px 1px 0 #000; white-space: nowrap; }
.party-tag b { font-size: 16px; line-height: 1; order: 2; }

#battle-hud .hud-log { position: relative; display: flex; align-items: center; color: #fff; font-family: 'tf2build', sans-serif; text-shadow: 1px 1px 0 #000; white-space: nowrap; }
#battle-hud .hud-log img { object-fit: contain; }
#battle-hud .hud-upper { position: absolute; left: 0; right: 0; top: 0; text-align: center; color: #f3b721; font-family: 'tf2build', sans-serif; text-shadow: 2px 2px 0 #000; white-space: nowrap; }
#end-layer { position: fixed; inset: 0; z-index: 60; cursor: pointer; }
#end-layer .ui-node { position: absolute; }
#end-layer .ui-img { position: absolute; left: 0; top: 0; width: 100%; height: 100%; }
#end-layer .ui-text { position: absolute; inset: 0; display: flex; white-space: pre-wrap; }
#end-layer .ui-text span { display: inline-block; max-width: 100%; }
#end-layer img.item { position: absolute; left: 0; top: 0; width: 100%; height: 100%; object-fit: contain; }
#spectate-layer { position: fixed; inset: 0; z-index: 55; pointer-events: none; }
#spectate-layer .ui-node { position: absolute; }
#spectate-layer .ui-img { position: absolute; left: 0; top: 0; width: 100%; height: 100%; }
#spectate-layer .ui-text { position: absolute; inset: 0; display: flex; white-space: pre-wrap; }
#spectate-layer .ui-text span { display: inline-block; max-width: 100%; }

/* meta windows (Armory, loading): original window trees drawn by ui.js over the menu */
.meta-window { position: fixed; inset: 0; z-index: 45; }
/* as in #menu: only buttons (and elements given pointer-events: auto) take clicks, so layout containers such as
   WindowArmory/FitToSafeArea don't swallow the CloseButton */
.meta-window .ui-node { position: absolute; pointer-events: none; }
.meta-window .ui-node.ui-button { pointer-events: auto; }
.meta-window .ui-img { position: absolute; left: 0; top: 0; width: 100%; height: 100%; }
.meta-window .ui-text { position: absolute; inset: 0; display: flex; white-space: pre-wrap; pointer-events: none; }
.meta-window .ui-text span { display: inline-block; max-width: 100%; }
.armory-cats { position: absolute; inset: 0; pointer-events: auto; overflow-y: auto; display: flex; flex-direction: column; align-items: center; gap: 4px; scrollbar-width: thin; scrollbar-color: #ffd23a55 transparent; }
.armory-cat { position: relative; flex: none; cursor: pointer; background: url(../assets_local/ui/sprites/b_controller_on_55.png) center / 100% 100%; opacity: .75; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.armory-cat.on { opacity: 1; filter: drop-shadow(0 0 6px #ffd23a); }
.armory-cat img, .armory-cat i { width: 56%; height: 56%; object-fit: contain; }
.armory-cat span { color: #fff; font-family: 'tf2build', sans-serif; text-align: center; line-height: 1; }
.armory-grid { position: absolute; inset: 0; overflow-y: auto; display: flex; flex-wrap: wrap; align-content: flex-start; gap: 6px; padding: 4px; pointer-events: auto; }
.armory-item { position: relative; flex: none; cursor: pointer; }
.armory-item .u { position: absolute; inset: 0; background: url(../assets_local/ui/sprites/button_com.png) center / 100% 100%; opacity: .55; }
.armory-item.owned .u { opacity: 1; }
.armory-item .glow { position: absolute; inset: 7%; width: 86%; height: 86%; opacity: .45; mix-blend-mode: screen; filter: drop-shadow(0 0 0 var(--rar)); }
.armory-item .ic { position: absolute; left: 7%; top: 18%; width: 86%; height: 62%; object-fit: contain; }
.armory-item .n { position: absolute; left: 4%; right: 4%; top: 3%; color: #fff; font-family: 'tf2build', sans-serif; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: 1px 1px 0 #000; }
.armory-item .chk { position: absolute; left: 4%; bottom: 4%; width: 22%; }
.armory-item .p { position: absolute; right: 6%; bottom: 4%; color: #fff; font-family: 'tf2build', sans-serif; text-shadow: 1px 1px 0 #000; padding-left: 1.3em; background: no-repeat left center / 1.1em; }
.armory-item .p.soft { background-image: url(../assets_local/ui/sprites/coin_b__2.png); }
.armory-item .p.hard { background-image: url(../assets_local/ui/sprites/coin_o_2.png); }
.armory-item .p.lock { width: 1.2em; height: 1.2em; background: url(../assets_local/ui/sprites/lock.png) center / contain no-repeat; padding: 0; }
.armory-item.sel { outline: 3px solid #ffd23a; outline-offset: -3px; }
.armory-item::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 5px; background: var(--rar); }

/* store + chest roulette */
.shop-tabs { position: absolute; inset: 0; display: flex; gap: 8px; align-items: center; justify-content: center; pointer-events: auto; }
.shop-tab { flex: none; display: flex; align-items: center; justify-content: center; color: #fff; font-family: 'tf2build', sans-serif; text-shadow: 1px 1px 0 #000; cursor: pointer; background: url(../assets_local/ui/sprites/b_controller_on_55.png) center / 100% 100%; opacity: .7; }
.shop-tab.on { opacity: 1; filter: drop-shadow(0 0 6px #ffd23a); }
.shop-row { position: absolute; inset: 0; display: flex; flex-wrap: wrap; align-content: center; gap: 12px 16px; align-items: center; justify-content: center; pointer-events: auto; }
.shop-el { position: relative; flex: none; display: flex; flex-direction: column; align-items: center; justify-content: space-between; padding: 3% 0; box-sizing: border-box; background: url(../assets_local/ui/sprites/frame_562.png) center / 100% 100%; color: #fff; font-family: 'tf2build', sans-serif; text-shadow: 1px 1px 0 #000; cursor: pointer; }
.shop-el b { font-weight: normal; text-align: center; }
.shop-el img { width: 70%; height: 55%; object-fit: contain; }
.shop-el i { display: inline-block; width: 1.1em; height: 1.1em; vertical-align: -0.15em; margin-right: 0.2em; background: center / contain no-repeat; }
.shop-el i.gear, .chest-window i.gear { background-image: url(../assets_local/ui/sprites/coin_o.png); }
.shop-el em.vip-left { position: absolute; left: 0; right: 0; bottom: -1.6em; font-style: normal; font-size: 0.75em; color: #ffe066; text-align: center; }
.shop-el i.coin { background-image: url(../assets_local/ui/sprites/coin_b_.png); }
.chest-strip { position: absolute; left: 0; top: 50%; display: flex; gap: 8px; transform-origin: left; translate: 0 -50%; will-change: transform; }
/* (a dark see-through tile: white emote / dance icons were lost on the white square, the user's call) */
.chest-tile { position: relative; flex: none; background: rgba(12, 14, 20, 0.62); border-radius: 8px; display: flex; flex-direction: column; align-items: center; justify-content: center; box-shadow: inset 0 -6px 0 var(--rar), inset 0 0 0 2px rgba(255,255,255,.12); }
.chest-reveal { position: fixed; inset: 0; z-index: 5; pointer-events: none; }
/* Settings → Anti-cheat (acreview.js) */
.acr .acr-tabs, .acr .acr-btns { display: flex; gap: 6px; flex-wrap: wrap; margin: 6px 0; }
.acr .wg-btn.on { filter: brightness(1.25); outline: 2px solid #ffd23f; }
.acr .acr-row { display: flex; flex-direction: column; gap: 2px; padding: 6px 8px; margin: 4px 0; background: rgba(0,0,0,.3); border-radius: 6px; cursor: pointer; }
.acr .acr-row:hover { background: rgba(255,255,255,.08); }
.acr .acr-row span, .acr .acr-moment span { font-size: 12px; color: #cfd8e3; }
.acr .acr-why { margin: 4px 0 6px 18px; color: #ffb86b; }
.acr .acr-evidence { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 8px; max-height: 46vh; overflow: auto; }
.acr .acr-moment { display: flex; flex-direction: column; gap: 3px; background: rgba(0,0,0,.25); padding: 6px; border-radius: 6px; }
.acr .acr-ban { background: #c0392b; }
/* the menu chests' floating labels (LabelsCanvas: NameValue, CurrencyValue): tap to open */
.chest3d-label { position: fixed; z-index: 41; transform: translate(-50%, -100%); display: flex; flex-direction: column; align-items: center; cursor: pointer; pointer-events: auto; font-family: 'tf2build', sans-serif; color: #fff; text-shadow: 1px 1px 0 #000, 0 0 4px #000; white-space: nowrap; user-select: none; }
.chest3d-label { text-align: center; line-height: 1.05; }
.chest3d-label b { font-size: clamp(10px, 2.5vh, 18px); font-weight: normal; color: #ffd84a; }
.chest3d-label span { font-size: clamp(9px, 2.2vh, 16px); display: flex; align-items: center; gap: 4px; }
.chest3d-label i.gear { display: inline-block; width: 1.1em; height: 1.1em; background: url(../assets_local/ui/sprites/coin_o.png) center / contain no-repeat; }
.chest-glow { position: fixed; transform: translate(-50%, -50%); }
/* (glow_star_2 in the Glow images' colour, 0.64 / 1 / 0.38) */
.chest-glow img { position: absolute; inset: 0; width: 100%; height: 100%; filter: brightness(0.9) sepia(1) hue-rotate(45deg) saturate(4) drop-shadow(0 0 10px rgba(164,254,96,.8)); }
.chest-reveal-name { position: fixed; left: 50%; transform: translate(-50%, -50%); color: #fff; font-family: 'tf2build', sans-serif; text-shadow: 1px -1px 0 rgba(0,0,0,.5), 0 2px 0 rgba(57,12,10,.3); white-space: nowrap; }
.chest-tile img { width: 70%; height: 65%; object-fit: contain; }
.chest-tile span { color: #fff; font-family: 'tf2build', sans-serif; text-shadow: 1px 1px 0 #000; text-align: center; max-width: 92%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.chest-tile.won { outline: 4px solid #ffd23a; outline-offset: -4px; filter: drop-shadow(0 0 12px #ffd23a); }

/* ☰ settings button (top-left) and the tabbed settings window */
#burger { position: fixed; left: 4px; top: 4px; z-index: 48; width: 34px; height: 34px; border: 0; border-radius: 6px; background: #14181fcc; color: #fff; font-size: 22px; line-height: 34px; padding: 0; cursor: pointer; }
#burger:hover { background: #f5b623; color: #222; }
#settings { z-index: 65; }
#settings .set-tabs { display: flex; gap: 6px; margin: 10px 0 14px; flex-wrap: wrap; }
#settings .set-tabs button, #settings .set-seg button { padding: 6px 14px; font-size: 14px; }
#settings .set-tabs button.on, #settings .set-seg button.on { background: #f5b623; color: #222; border-color: #f5b623; }
#settings .set-seg { display: flex; gap: 6px; margin: 6px 0 12px; }
#settings .set-cols { display: flex; gap: 48px; flex-wrap: wrap; }
#settings .set-code { font: 600 16px system-ui, sans-serif; padding: 6px 10px; border-radius: 5px; border: 1px solid #fff4; background: #0008; color: #fff; text-transform: uppercase; width: 260px; }
#settings .promo-msg { font-size: 14px; color: #9fd8ff; opacity: 1; }

.upg-rows { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; gap: 2px; pointer-events: none; }
.upg-rows div { display: flex; justify-content: space-between; align-items: center; color: #fff; font-family: 'tf2build', sans-serif; text-shadow: 1px 1px 0 #000; padding: 0 8px; }
.upg-rows b { font-weight: normal; color: #9dff6a; }

.camo-row { position: absolute; inset: 0; display: flex; align-items: center; gap: 6px; overflow-x: auto; pointer-events: auto; padding: 0 6px; scrollbar-width: thin; }
.camo { position: relative; flex: none; cursor: pointer; border-radius: 6px; overflow: hidden; background: #0006; display: flex; align-items: center; justify-content: center; outline: 2px solid #fff3; }
.camo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.camo span { color: #fff; font-size: 28px; font-family: 'tf2build', sans-serif; }
.camo b { position: absolute; left: 0; right: 0; bottom: 0; background: #000a; color: #fff; text-align: center; font-weight: normal; font-family: 'tf2build', sans-serif; }
.camo i { display: inline-block; width: 1em; height: 1em; vertical-align: -0.12em; margin-right: 2px; background: center / contain no-repeat; }
.camo i.coin { background-image: url(../assets_local/ui/sprites/coin_b_.png); }
.camo i.gear { background-image: url(../assets_local/ui/sprites/coin_o.png); }
.camo.on { outline: 3px solid #ffd23a; }
.camo.pick { outline: 3px dashed #9fd8ff; }

/* the original logo (LoadingWindow logo_2_) on the start overlay; the alt text shows without the local assets */
#overlay h1 img { display: block; width: min(440px, 80vw); height: auto; margin: 0 auto; }
/* original menu windows (OriginalWindow): buttons with no function in this build */
.meta-window .ui-node.na { cursor: not-allowed; }
.league-row { position: absolute; inset: 0; display: flex; gap: 14px; align-items: center; overflow-x: auto; padding: 0 16px; pointer-events: auto; scrollbar-width: thin; }
.league-card { flex: none; display: flex; flex-direction: column; align-items: center; justify-content: space-between; box-sizing: border-box; padding: 10px 6px; border-radius: 10px; background: #0005; color: #fff; font-family: 'tf2build', sans-serif; text-align: center; outline: 2px solid #fff2; }
.league-card.on { outline: 4px solid #ffd23a; background: #ffd23a33; }
.league-card img { width: 70%; height: auto; }
.league-card .ln { font-size: 1.1em; }
.league-card .lt { color: #ffd23a; }
.orig-window { background: rgba(0, 0, 0, 0.55); }
body:has(.meta-window) #burger { display: none; }

/* the battle emote window (ControllLayer/EmotesWindow): Left/RightGroupPrefab buttons and ResultPrefab cells */
.emote-col { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end; pointer-events: auto; }
.emote-col.left { align-items: flex-end; }
.emote-col.right { align-items: flex-start; }
.emote-btn { display: flex; align-items: center; cursor: pointer; color: #fff; font-family: 'tf2build', sans-serif; text-shadow: 0 1px 0 #000; }
.emote-btn.left { flex-direction: row-reverse; }
.emote-btn i { flex: none; align-self: stretch; display: flex; align-items: center; justify-content: center; background: url(../assets_local/ui/battle/sprites/button_2.png) center / 100% 100%; }
.emote-btn i img { width: 80%; height: 80%; object-fit: contain; }
.emote-btn span { flex: 1; padding: 0 6px; background: #0007; align-self: stretch; display: flex; align-items: center; }
.emote-btn.left span { justify-content: flex-end; }
.emote-btn:hover span { background: #000a; color: #ffd23a; }
.emote-grid { position: absolute; inset: 0; display: grid; justify-content: center; align-content: end; pointer-events: auto; }
.emote-cell { position: relative; cursor: pointer; background: url(../assets_local/ui/battle/sprites/button_2.png) center / 100% 100%; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; color: #fff; font-family: 'tf2build', sans-serif; text-align: center; }
.emote-cell img { position: absolute; left: 10%; top: 6%; width: 80%; height: 64%; object-fit: contain; }
.emote-cell:hover { filter: brightness(1.25); }

/* WindowAchievements rows (AchievementPrefab: frame, icon, title, description, progress, rewards) */
.ach-list { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; pointer-events: auto; }
.ach-row { position: relative; flex: none; box-sizing: border-box; cursor: default; color: #fff; font-family: 'tf2build', sans-serif;
  background: url(../assets_local/ui/sprites/frame_562.png) center / 100% 100%; }
.ach-row.can { cursor: pointer; filter: drop-shadow(0 0 6px #ffd23a); }
.ach-row.done { opacity: 0.7; }
.ach-row > i { position: absolute; left: 1.6%; top: 50%; transform: translateY(-50%); background: url(../assets_local/ui/sprites/unlocked.png) center / contain no-repeat; filter: grayscale(1) brightness(0.6); }
.ach-row > i.on { filter: none; }
.ach-row .t { position: absolute; left: 15%; top: 10%; right: 38%; }
.ach-row .d { position: absolute; left: 15%; top: 38%; right: 38%; color: #cfe6ff; }
.ach-row .bar { position: absolute; left: 15%; bottom: 14%; background: #0008; border-radius: 4px; overflow: hidden; }
.ach-row .bar b { position: absolute; left: 0; top: 0; bottom: 0; background: linear-gradient(#ffe066, #e2a400); }
.ach-row .bar span { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; text-shadow: 0 1px 0 #000; }
.ach-row .rw { position: absolute; right: 8%; bottom: 10%; text-align: right; white-space: nowrap; }
.ach-row .rw i { display: inline-block; width: 1em; height: 1em; vertical-align: -0.15em; background: center / contain no-repeat; }
.ach-row .rw i.coin { background-image: url(../assets_local/ui/sprites/coin_b__2.png); }
.ach-row .rw i.gear { background-image: url(../assets_local/ui/sprites/coin_o_2.png); }
.ach-row em { position: absolute; right: 18%; bottom: 30%; background: url(../assets_local/ui/sprites/hand_494.png) center / contain no-repeat; animation: achhand 0.8s ease-in-out infinite alternate; }
@keyframes achhand { to { transform: translateY(-8px); } }

/* WindowDailyQuests cards ("default" / "empty" / "Vip") */
.dq-row { position: absolute; inset: 0; display: flex; gap: 2%; align-items: center; justify-content: safe center; overflow-x: auto; padding: 0 2%; pointer-events: auto; scrollbar-width: thin; }
.dq-card { position: relative; flex: none; box-sizing: border-box; color: #fff; font-family: 'tf2build', sans-serif; text-align: center;
  background: url(../assets_local/ui/sprites/frame_562.png) center / 100% 100%; }
.dq-card .cap { position: absolute; left: 2%; right: 2%; top: 1%; height: 17%; display: flex; align-items: center; justify-content: center;
  background: url(../assets_local/ui/sprites/caption_53.png) center / 100% 100%; font-size: 0.9em; }
.dq-card > i { position: absolute; left: 50%; top: 22%; width: 27%; aspect-ratio: 1; transform: translateX(-50%); background: url(../assets_local/ui/sprites/button.png) center / contain no-repeat; }
.dq-card .desc { position: absolute; left: 5%; right: 5%; top: 47%; font-size: 0.85em; color: #cfe6ff; }
.dq-card .bar { position: absolute; left: 5%; right: 5%; top: 66%; height: 4%; background: #0008; border-radius: 4px; overflow: hidden; }
.dq-card .bar b { position: absolute; left: 0; top: 0; bottom: 0; background: linear-gradient(#ffe066, #e2a400); }
.dq-card .bar span { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 0.7em; text-shadow: 0 1px 0 #000; }
.dq-card .rw { position: absolute; left: 5%; right: 5%; top: 73%; }
.dq-card .rw i { display: inline-block; width: 1.2em; height: 1.2em; vertical-align: -0.25em; margin-right: 4px; background: url(../assets_local/ui/sprites/coin_b__2.png) center / contain no-repeat; }
.dq-card .claim { position: absolute; left: 5%; right: 5%; bottom: 4%; height: 12%; display: flex; align-items: center; justify-content: center;
  background: url(../assets_local/ui/sprites/b_controller_on_55.png) center / 100% 100%; filter: grayscale(1) brightness(0.7); }
.dq-card .claim.on { filter: none; cursor: pointer; }
.dq-card.done { filter: drop-shadow(0 0 6px #ffd23a); }
.dq-card .mid { position: absolute; left: 6%; right: 6%; top: 40%; }
.dq-card.vip { opacity: 0.8; }
.dq-card.vip::after { content: ''; position: absolute; left: 50%; top: 14%; width: 43%; height: 22%; transform: translateX(-50%); background: url(../assets_local/ui/sprites/b_money_x2_2.png) center / contain no-repeat; }

/* WindowPlayerProfile: the mode tab with its big tiles, the small stat rows */
.pp-big { position: absolute; inset: 0; display: flex; flex-direction: column; gap: 6px; pointer-events: auto; font-family: 'tf2build', sans-serif; color: #fff; }
.pp-big .tab { align-self: flex-start; padding: 0 24px; display: flex; align-items: center; background: url(../assets_local/ui/sprites/b_controller_on_55.png) center / 100% 100%; }
.pp-big .tiles { display: flex; gap: 10px; flex-wrap: wrap; }
.pp-big .tile { box-sizing: border-box; display: flex; flex-direction: column; align-items: center; justify-content: center; background: url(../assets_local/ui/sprites/frame_562.png) center / 100% 100%; text-align: center; }
.pp-big .tile b { font-weight: normal; color: #cfe6ff; }
.pp-small { position: absolute; inset: 0; overflow-y: auto; pointer-events: auto; font-family: 'tf2build', sans-serif; color: #fff; scrollbar-width: thin; }
.pp-small > div { display: flex; justify-content: space-between; align-items: center; padding: 0 12px; border-bottom: 1px solid #fff2; }
.pp-small b { font-weight: normal; color: #ffd23a; }

/* WindowSelectGameMode cards (GameModePrefab: the mode's art, caption, info, availability / enter price) */
.gm-row { position: absolute; inset: 0; display: flex; gap: 3%; align-items: center; justify-content: center; pointer-events: auto; }
.gm-card { position: relative; flex: none; box-sizing: border-box; cursor: pointer; color: #fff; font-family: 'tf2build', sans-serif; text-align: center;
  background: url(../assets_local/ui/sprites/frame_562.png) center / 100% 100%; padding: 2%; display: flex; flex-direction: column; gap: 3%; }
.gm-card:hover { filter: brightness(1.15) drop-shadow(0 0 8px #ffd23a); }
/* the Time limited mode while it's being built (meta.js fillGameModes): greyed out, a striped banner across its picture */
.gm-card.gm-building { cursor: not-allowed; }
.gm-card.gm-building:hover { filter: none; }
.gm-card.gm-building img, .gm-card.gm-building .t, .gm-card.gm-building .i { filter: grayscale(1) brightness(0.75); }
.gm-card.gm-building .f { color: #c9c9c9; }
.gm-band { position: absolute; left: -4%; right: -4%; top: 26%; transform: rotate(-8deg); padding: 0.35em 0; text-align: center; color: #1a1a1a;
  font-family: 'tf2build', sans-serif; letter-spacing: 0.04em; text-shadow: 0 1px 0 rgba(255,255,255,.35); box-shadow: 0 4px 10px rgba(0,0,0,.5);
  background: repeating-linear-gradient(-45deg, #ffcc1a 0 18px, #1a1a1a 18px 36px); }
.gm-band span { background: #ffcc1a; padding: 0.1em 0.6em; border-radius: 3px; }
.gm-card img { width: 100%; aspect-ratio: 1.3; object-fit: cover; border-radius: 6px; }
.gm-card .i { color: #cfe6ff; }
.gm-card .f { margin-top: auto; color: #ffd23a; }
.gm-card i.tk { display: inline-block; width: 1.3em; height: 1.3em; vertical-align: -0.3em; background: url(../assets_local/ui/sprites/b_ticket_2.png) center / contain no-repeat; }
/* launch splash (index.html): black, wordmark centred at ~75% of the width like unity_static_splash.png */
#splash { position: fixed; inset: 0; z-index: 1000; background: #000; display: grid; place-items: center; transition: opacity .5s; }
#splash img { width: min(75vw, 900px); height: auto; }
#splash.out { opacity: 0; pointer-events: none; }

/* the original start-up loading screen (src/boot.js): level0's camera colour under its gradient Image */
#boot { position: fixed; inset: 0; z-index: 900; background: rgb(49, 77, 121); pointer-events: none; transition: opacity .35s; }
#boot.out { opacity: 0; }
#boot .boot-ui { position: absolute; inset: 0; }
#boot .boot-art { position: absolute; inset: 0; background-size: 100% 100%; background-repeat: no-repeat; }
#boot .boot-label { position: absolute; left: 2.2vw; bottom: 3.5vh; color: #fff; font-family: 'tf2build', sans-serif; font-size: max(20px, 4.6vh); text-shadow: 0 2px 4px rgba(0, 0, 0, .45); }
#boot .ui-node { position: absolute; }
#boot .ui-img { position: absolute; left: 0; top: 0; width: 100%; height: 100%; }

/* Creative mode's own canvases (creative.js: BuildBarCanvas's Hotbar, the block catalog, the wood dialog) */
#creative-hud .ui-node { position: absolute; }
#creative-hud .ui-img { position: absolute; left: 0; top: 0; width: 100%; height: 100%; }
#creative-hud .ui-text { position: absolute; inset: 0; display: flex; white-space: pre; overflow: visible; pointer-events: none; }
#creative-hud .ui-text span { display: inline-block; max-width: 100%; }

/* Creative: the arena controller's Options window (creativegame.js; ArenaMode's WindowArenaSettings) */
/* the online arena's START BATTLE / ARENA SETTINGS buttons (netarena.js; ArenaControlButtons: bottom-left) */
#net-arena .ui-node { position: absolute; pointer-events: none; }
#net-arena .ui-img { position: absolute; left: 0; top: 0; width: 100%; height: 100%; }
#net-arena .ui-text { position: absolute; inset: 0; display: flex; white-space: pre-wrap; overflow: visible; pointer-events: none; }
#net-arena .ui-text span { display: inline-block; max-width: 100%; }
#cr-options .ui-node { position: absolute; pointer-events: none; }
#cr-options .ui-img { position: absolute; left: 0; top: 0; width: 100%; height: 100%; }
#cr-options .ui-text { position: absolute; inset: 0; display: flex; white-space: pre-wrap; overflow: visible; pointer-events: none; }
#cr-options .ui-text span { display: inline-block; max-width: 100%; }
#cr-options[hidden] { display: none; }
/* the weapon parts' PartAction row (CustomPartsGroup/PartAction: Remove + 70 px part buttons over the slot, pivot (0.5, -0.5)) */
.part-action { position: absolute; transform: translate(-50%, -100%); display: flex; flex-wrap: wrap; justify-content: center; pointer-events: auto; z-index: 3; max-width: 420px; }
.part-btn { position: relative; box-sizing: border-box; background: rgba(20, 24, 32, 0.85); border: 2px solid rgba(255, 255, 255, 0.25); border-radius: 6px; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.part-btn img { width: 100%; height: 100%; object-fit: contain; pointer-events: none; }
.part-btn.remove img { width: 64%; height: 64%; }
.part-btn.on { border-color: #ffd23c; }
.part-btn.locked img { opacity: 0.55; }
.part-desc { flex-basis: 100%; text-align: center; color: #fff; text-shadow: 0 1px 2px #000; padding: 4px 0; }
body.paused-menu #minimap, body.paused-menu #debug, body.paused-menu #burger { display: none !important; }

/* BATTLE: the CASUAL / WAGERS tabs and the WAGERS panel (wagers.js) */
.gm-tabs { position: absolute; left: 0; right: 0; display: flex; justify-content: center; pointer-events: auto; z-index: 2; font-family: 'tf2build', sans-serif; }
.gm-tab { cursor: pointer; color: #cfe6ff; background: rgba(20, 40, 70, .75); border: 2px solid #5fb7ff; border-radius: 10px; text-shadow: 1px 1px 0 #000; }
.gm-tab.on { color: #fff; background: linear-gradient(#3ecbff, #1777d4); border-color: #fff; }
.gm-tab[data-tab="wagers"].on { background: linear-gradient(#ffd23f, #e08a00); }
.gm-wagers { position: absolute; left: 4%; right: 4%; bottom: 2%; pointer-events: auto; overflow-y: auto; overflow-x: hidden; }
.wg { color: #fff; font-family: 'tf2build', sans-serif; text-shadow: 1px 1px 0 #000; display: flex; flex-direction: column; gap: .5em; padding: .4em; box-sizing: border-box; }
.wg-top { display: flex; gap: .8em; align-items: stretch; flex-wrap: wrap; }
.wg-bal { display: flex; align-items: center; gap: .3em; font-size: 1.8em; background: rgba(0, 0, 0, .55); border: 2px solid #ffd23f; border-radius: .4em; padding: .2em .6em; color: #ffd23f; }
.wg-bal small { font-size: .55em; color: #fff; }
.wg-coin { width: 1.1em; height: 1.1em; }
.wg-dep { flex: 1; min-width: 14em; display: flex; flex-direction: column; gap: .3em; background: rgba(0, 0, 0, .55); border-radius: .4em; padding: .4em .6em; }
.wg-addr { display: flex; gap: .4em; align-items: center; min-width: 0; }
.wg-addr code { flex: 1; min-width: 0; overflow-wrap: anywhere; font: .8em monospace; background: rgba(255, 255, 255, .1); padding: .2em .4em; border-radius: .3em; user-select: all; }
.wg-lbl { color: #9fd8ff; font-size: .8em; }
.wg-hint { color: #cfe6ff; font-size: .7em; }
.wg-note { color: #8dff6a; font-size: .8em; }
.wg-err { color: #ff6b5e; text-align: center; }
.wg-msg { text-align: center; padding: 2em; background: rgba(0, 0, 0, .55); border-radius: .4em; }
.wg-btn { cursor: pointer; align-self: flex-start; padding: .35em 1em; background: url(../assets_local/ui/sprites/b_controller_on_55.png) center / 100% 100%; white-space: nowrap; text-align: center; }
.wg-btn.small { font-size: .8em; padding: .3em .8em; }
.wg-btn.on { filter: brightness(1.35) drop-shadow(0 0 4px #ffd23f); }
.wg-btn:hover, .wg-card:hover { filter: brightness(1.15); }
.wg-stake { display: flex; gap: .4em; align-items: center; flex-wrap: wrap; background: rgba(0, 0, 0, .55); border-radius: .4em; padding: .4em .6em; }
.wg-stake input { width: 8em; font: inherit; color: #ffd23f; background: rgba(255, 255, 255, .1); border: 2px solid #ffd23f; border-radius: .3em; padding: .15em .4em; outline: 0; }
.wg-modes { display: flex; gap: .8em; flex-wrap: wrap; }
.wg-card { flex: 1; min-width: 12em; cursor: pointer; padding: .7em; border-radius: .5em; background: linear-gradient(#2a6fb8, #123a6b); border: 3px solid #fff; text-align: center; }
.wg-card:last-child { background: linear-gradient(#d88a10, #7a4300); }
.wg-title { font-size: 1.2em; color: #fff; }
.wg-info { font-size: .75em; color: #e6f3ff; margin-top: .3em; }
.wg-wait { display: flex; flex-direction: column; gap: .4em; align-items: center; background: rgba(0, 0, 0, .55); border-radius: .4em; padding: 1em; text-align: center; }
.wg-wait .wg-btn { align-self: center; }
.wg-open { display: flex; flex-direction: column; gap: .3em; background: rgba(0, 0, 0, .45); border-radius: .4em; padding: .4em .6em; }
.wg-acct { display: flex; flex-direction: column; gap: .5em; align-items: center; text-align: center; background: rgba(0, 0, 0, .6); border: 2px solid #ffd23f; border-radius: .5em; padding: 1em; }
.wg-form { display: flex; flex-direction: column; gap: .4em; align-items: center; width: min(22em, 100%); }
.wg-form .wg-btn { align-self: center; }
.wg-in { width: 100%; box-sizing: border-box; font: .9em 'tf2build', sans-serif; color: #fff; background: rgba(255, 255, 255, .1); border: 2px solid #5fb7ff; border-radius: .3em; padding: .35em .5em; outline: 0; }
.wg-in:focus { border-color: #ffd23f; }
.wg-in.mono { font-family: monospace; font-size: .8em; text-shadow: none; }
.wg-code { font: 1.4em monospace; color: #ffd23f; letter-spacing: .08em; background: rgba(255, 255, 255, .1); padding: .3em .6em; border-radius: .3em; user-select: all; }
.wg-acts { display: flex; gap: .4em; }
.wg-who { display: flex; justify-content: space-between; align-items: center; gap: .5em; font-size: .8em; color: #8dff6a; }
.wg-wd .wg-addr { width: 100%; }
.wg-wd .wg-addr .wg-in { flex: 1; }
.wg-link { color: #5fb7ff; font-size: .9em; }
.wg-row { display: flex; justify-content: space-between; align-items: center; gap: .5em; font-size: .85em; }

/* a low-gravity zone: a blue hue over the view (main.js gravTint) */
#gravity-tint { position: fixed; inset: 0; z-index: 4; pointer-events: none; opacity: 0; transition: opacity 0.6s; background: radial-gradient(ellipse at center, rgba(70, 140, 255, 0.10) 35%, rgba(40, 110, 255, 0.42) 100%); }
#gravity-tint.on { opacity: 1; }

/* SAVE YOUR PROGRESS (main.js): bottom of the main menu, between ACHIEVEMENTS and FRIEND INVITE, while there's no login */
#save-progress { position: fixed; left: 61%; bottom: 2.2vh; transform: translateX(-50%); z-index: 47; display: flex; align-items: center; gap: 0.5em;
  padding: 0.45em 1.1em 0.4em 0.8em; border: 3px solid #fff; border-radius: 10px; cursor: pointer; font-family: 'tf2build', sans-serif;
  font-size: clamp(13px, 2.3vh, 22px); color: #fff; text-shadow: 1px 2px 0 #0007; line-height: 1.05; text-align: left;
  background: linear-gradient(#ffcf3a, #f59a12); box-shadow: 0 4px 0 #a85d06, 0 6px 14px #0006; animation: sp-pulse 2.4s ease-in-out infinite; }
#save-progress[hidden] { display: none; }
#save-progress .sp-icon { font-size: 1.5em; filter: drop-shadow(1px 2px 0 #0006); }
#save-progress .sp-text small { display: block; font-family: system-ui, sans-serif; font-weight: 700; font-size: 0.62em; letter-spacing: 0.04em; text-shadow: none; color: #fff8e0; margin-top: 2px; }
#save-progress:hover { filter: brightness(1.08); }
#save-progress:active { transform: translateX(-50%) translateY(3px); box-shadow: 0 1px 0 #a85d06, 0 3px 8px #0006; }
@keyframes sp-pulse { 0%, 100% { scale: 1; } 50% { scale: 1.04; } }
body:has(.meta-window) #save-progress { display: none; }

/* Settings → Settings: the contact address, small at the bottom (the user's call: tucked away, for genuine concerns) */
#settings .set-contact { flex-basis: 100%; width: 100%; margin-top: 22px; padding-top: 10px; border-top: 1px solid #fff2; font-size: 12px; color: #fff9; }
#settings .set-contact a { color: #9fd8ff; text-decoration: none; }
#settings .set-contact a:hover { text-decoration: underline; }
