/* B0X3 v126 - gym: the online lobby as a boxing gym you walk in (js/Gym.js).
   Without the class .gym on #mp-lobby (?gym=0, no WebGL) nothing here shows and the v125 lobby is unchanged.
   Layers inside #mp-lobby.gym: the floor (taps, stick) < name tags < header, panels < buttons and cards. */

.gym-floor, .gym-tags, .gym-hud { display: none; }
.lb:not(.gym) .gym-people-card, .lb:not(.gym) .gym-sheet-close { display: none !important; }

#mp-lobby.lb.gym {
    background: none; -webkit-backdrop-filter: none; backdrop-filter: none;
    overflow: hidden; justify-content: flex-start; padding-bottom: 0;
}
.lb.gym .gym-floor { display: block; position: absolute; inset: 0; z-index: 0; width: auto; touch-action: none; cursor: pointer; outline: none; -webkit-tap-highlight-color: transparent; }
.lb.gym .gym-floor:focus-visible { box-shadow: inset 0 0 0 3px var(--gold); }
.lb.gym .gym-tags { display: block; position: absolute; inset: 0; z-index: 1; width: auto; pointer-events: none; overflow: hidden; }
.lb.gym .gym-hud { display: block; position: absolute; inset: 0; z-index: 3; width: auto; pointer-events: none; }
.lb.gym .gym-hud > * { pointer-events: auto; }
.lb.gym .gym-hud > .gym-note, .lb.gym .gym-hud > .gym-zone, .lb.gym .gym-hud > .gym-crowd { pointer-events: none; }

/* header over the gym: a dark fade at the top, so the title and buttons read on any part of the room */
.lb.gym > .lb-head { position: relative; z-index: 4; width: calc(100% + 28px); max-width: none; margin: -10px -14px 0; padding: max(10px, env(safe-area-inset-top)) max(14px, env(safe-area-inset-right)) 18px max(14px, env(safe-area-inset-left));
    background: linear-gradient(rgba(6, 7, 11, .78), rgba(6, 7, 11, .45) 60%, rgba(6, 7, 11, 0)); pointer-events: none; }
.lb.gym > .lb-head > * { pointer-events: auto; }
.lb.gym .lb-title { text-shadow: 0 2px 10px rgba(0, 0, 0, .7); }
.lb.gym .lb-online { background: rgba(8, 10, 14, .7); }

/* ---- name tags ---- */
.gym-tag {
    position: absolute; left: 0; top: 0; pointer-events: auto; will-change: transform;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; min-width: 44px; min-height: 34px; margin: 0; padding: 3px 10px;
    border-radius: 999px; border: 1px solid rgba(255, 255, 255, .2); background: rgba(8, 10, 14, .74); color: #fff;
    font-family: "Oswald", sans-serif; font-size: 13px; font-weight: 500; line-height: 1.1; letter-spacing: .06em; white-space: nowrap; cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
.gym-tag:hover { border-color: rgba(240, 192, 64, .7); }
.gym-tag:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.gym-tag.me { border-color: var(--gold); color: var(--gold); font-weight: 600; }
.gym-tag.friend .gym-tag-name { color: #ffd35a; }
.gym-tag-chip { font-size: 10px; letter-spacing: .12em; color: rgba(255, 255, 255, .7); }
.gym-tag.waiting { border-color: rgba(60, 220, 130, .7); }
.gym-tag.waiting .gym-tag-chip { color: #9ff0bf; }
.gym-tag[hidden], .gym-tag-chip[hidden] { display: none !important; }
.gym-bubble { position: absolute; bottom: calc(100% + 4px); left: 50%; transform: translateX(-50%); font-size: 26px; line-height: 1; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .5)); }
.gym-bubble:empty { display: none; }
.gym-bubble:not(:empty) { animation: gymPop .3s cubic-bezier(.2, 1.6, .4, 1) both; }
@keyframes gymPop { from { transform: translateX(-50%) scale(.3); opacity: 0; } to { transform: translateX(-50%) scale(1); opacity: 1; } }

/* ---- lines of text over the gym ---- */
.gym-note, .gym-zone, .gym-crowd { position: absolute; margin: 0; font-family: "Oswald", sans-serif; letter-spacing: .03em; }
.gym-note { top: calc(max(10px, env(safe-area-inset-top)) + 56px); left: 50%; transform: translateX(-50%); width: max-content; max-width: min(560px, calc(100% - 32px));
    padding: 8px 14px; border-radius: 12px; background: rgba(8, 10, 14, .8); border: 1px solid rgba(255, 255, 255, .14); color: #fff; font-size: 15px; line-height: 1.35; text-align: center; }
.gym-zone { bottom: calc(max(12px, env(safe-area-inset-bottom)) + 76px); left: 50%; transform: translateX(-50%); width: max-content; max-width: calc(100% - 32px);
    padding: 6px 14px; border-radius: 999px; background: rgba(240, 192, 64, .92); color: #141414; font-size: 15px; font-weight: 500; text-align: center; }
.gym-crowd { top: calc(max(10px, env(safe-area-inset-top)) + 54px); right: max(14px, env(safe-area-inset-right)); padding: 4px 10px; border-radius: 999px; background: rgba(8, 10, 14, .7); color: rgba(255, 255, 255, .8); font-size: 13px; }
.gym-note[hidden], .gym-zone[hidden], .gym-crowd[hidden] { display: none !important; }

/* ---- the plain buttons: find a fight, friends and open fights ---- */
.gym-dock { position: absolute; right: max(14px, env(safe-area-inset-right)); bottom: max(12px, env(safe-area-inset-bottom)); display: flex; flex-direction: column; align-items: stretch; gap: 8px; }
.gym-quick { min-height: 58px; padding: 8px 22px; border: 0; border-radius: 16px; color: #fff; font-family: "Teko", sans-serif !important; font-weight: 700; font-size: 30px; line-height: 1; letter-spacing: .1em;
    background: linear-gradient(100deg, #e8242a 0%, #c0181e 55%, #1a5fff 140%); box-shadow: 0 8px 26px rgba(232, 36, 42, .4), inset 0 1px 0 rgba(255, 255, 255, .25); }
.gym-quick:hover { filter: brightness(1.08); }
.gym-quick:active { transform: scale(.98); }
.gym-quick[hidden] { display: none !important; }
.gym-more { min-height: 44px; padding: 6px 14px; border-radius: 12px; border: 1px solid rgba(255, 255, 255, .25); background: rgba(8, 10, 14, .78); color: #fff; font-family: "Oswald", sans-serif; font-size: 14px; letter-spacing: .08em; }
.gym-more:hover { border-color: var(--gold); }

/* ---- emotes ---- */
.gym-emotes { position: absolute; left: 50%; bottom: max(12px, env(safe-area-inset-bottom)); transform: translateX(-50%); display: flex; gap: 4px; padding: 4px; border-radius: 999px; background: rgba(8, 10, 14, .72); border: 1px solid rgba(255, 255, 255, .14); }
.gym-emote { width: 46px; height: 46px; padding: 0; border: 0; border-radius: 50%; background: transparent; font-size: 24px; line-height: 1; transition: transform .12s, background .12s; }
.gym-emote:hover { background: rgba(255, 255, 255, .12); transform: translateY(-2px); }
.gym-emote:active { transform: scale(.9); }

/* ---- another boxer's card ---- */
.gym-card { position: absolute; left: 50%; bottom: calc(max(12px, env(safe-area-inset-bottom)) + 66px); transform: translateX(-50%); width: min(380px, calc(100% - 24px));
    display: flex; flex-direction: column; gap: 6px; padding: 14px 14px 12px; border-radius: 16px; background: rgba(10, 12, 18, .94); border: 1px solid rgba(240, 192, 64, .4); box-shadow: 0 16px 40px rgba(0, 0, 0, .5);
    animation: gymCard .2s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes gymCard { from { opacity: 0; transform: translate(-50%, 10px); } to { opacity: 1; transform: translate(-50%, 0); } }
.gym-card[hidden] { display: none !important; }
.gym-card-name { padding-right: 36px; font-family: "Teko", sans-serif; font-weight: 600; font-size: 30px; line-height: 1; letter-spacing: .1em; color: #fff; }
.gym-card-state { font-size: 14px; color: rgba(255, 255, 255, .65); }
.gym-card-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 4px; }
.gym-card-actions .lb-btn { min-height: 46px; font-size: 20px; }
.gym-card-actions .lb-btn[hidden] { display: none !important; }
.gym-card-actions .lb-btn:disabled { opacity: .45; }
.gym-block { color: #ff9a9d !important; border-color: rgba(255, 154, 157, .4) !important; }
.gym-card-x { position: absolute; top: 6px; right: 6px; width: 44px; height: 44px; border: 0; border-radius: 50%; background: transparent; color: rgba(255, 255, 255, .7); font-size: 28px; line-height: 1; }
.gym-card-x:hover { background: rgba(255, 255, 255, .1); color: #fff; }

/* ---- thumb stick (appears where the thumb lands) ---- */
.gym-stick { position: fixed; left: 0; top: 0; width: 100px; height: 100px; border-radius: 50%; background: rgba(255, 255, 255, .08); border: 2px solid rgba(255, 255, 255, .35); pointer-events: none !important; }
.gym-stick i { position: absolute; left: 28px; top: 28px; width: 44px; height: 44px; border-radius: 50%; background: rgba(240, 192, 64, .85); box-shadow: 0 2px 10px rgba(0, 0, 0, .4); }
.gym-stick[hidden] { display: none !important; }

/* ---- the v125 screens over the gym ---- */
/* home: on a phone a sheet opened with FRIENDS & OPEN FIGHTS; on a big screen a panel on the right, always there */
.lb.gym:not(.sheet) #lb-home { display: none !important; }
.lb.gym.sheet #lb-home { position: absolute; inset: 0; z-index: 5; width: auto; overflow-y: auto; overscroll-behavior: contain;
    padding: max(10px, env(safe-area-inset-top)) max(14px, env(safe-area-inset-right)) max(14px, env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left));
    background: radial-gradient(120% 90% at 50% 0%, rgba(26, 40, 80, .75), rgba(6, 7, 11, .95) 70%); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.lb.gym.sheet #lb-home > * { width: min(880px, 100%); margin-left: auto; margin-right: auto; }
.gym-sheet-close { align-self: center; min-height: 44px; padding: 6px 18px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .25); background: rgba(255, 255, 255, .06); color: #fff; font-size: 15px; letter-spacing: .12em; }
.lb.gym .lb-grid { grid-template-columns: 1fr 1fr; }
.lb.gym .gym-people-card { grid-column: 1 / -1; }
.gym-people { display: flex; flex-wrap: wrap; gap: 8px; max-height: 160px; overflow-y: auto; }
.gym-person { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; min-height: 48px; padding: 6px 12px; border-radius: 10px; border: 1px solid rgba(255, 255, 255, .14); background: rgba(255, 255, 255, .05); color: #fff; text-align: left; }
.gym-person:hover { border-color: rgba(240, 192, 64, .6); }
.gym-person-name { font-size: 15px; letter-spacing: .05em; }
.gym-person-state { font-size: 12px; color: rgba(255, 255, 255, .6); }

/* waiting for an opponent: a compact card at the top; the gym stays in view and you can keep walking */
.lb.gym #lb-wait { position: absolute; z-index: 4; top: calc(max(10px, env(safe-area-inset-top)) + 54px); left: 50%; transform: translateX(-50%);
    width: min(540px, calc(100% - 24px)); padding: 10px 14px 6px; gap: 4px; border-radius: 16px; background: rgba(8, 10, 14, .88); border: 1px solid rgba(60, 220, 130, .4); box-shadow: 0 14px 40px rgba(0, 0, 0, .45); }
.lb.gym #lb-wait[hidden] { display: none !important; }
.lb.gym .lb-radar { display: none; }
.lb.gym .lb-wait-title { font-size: 26px; }
.lb.gym .lb-wait-time { font-size: 22px; }
.lb.gym .lb-wait-sub { font-size: 14px; }
.lb.gym .lb-code-box { flex-direction: row; align-items: baseline; gap: 12px; padding: 4px 16px; }
.lb.gym .lb-code-big.mp-room-code { font-size: 34px; }
.lb.gym:has(#lb-wait:not([hidden])) .gym-note { display: none !important; }

/* phone held upright: the dock is a row along the bottom, emotes above it */
@media (orientation: portrait) {
    .gym-dock { left: max(12px, env(safe-area-inset-left)); right: max(12px, env(safe-area-inset-right)); flex-direction: row; }
    .gym-quick { flex: 1 1 auto; min-height: 56px; font-size: 28px; padding: 6px 10px; }
    .gym-more { flex: 0 1 120px; font-size: 13px; line-height: 1.15; }
    .gym-emotes { bottom: calc(max(12px, env(safe-area-inset-bottom)) + 68px); }
    .gym-zone { bottom: calc(max(12px, env(safe-area-inset-bottom)) + 130px); }
    .gym-card { bottom: calc(max(12px, env(safe-area-inset-bottom)) + 128px); }
    .lb.gym .lb-grid { grid-template-columns: 1fr; }
}
/* phone held sideways: the emotes go to the left corner, out of the way of the dock */
@media (orientation: landscape) and (max-height: 500px) {
    .gym-emotes { left: max(12px, env(safe-area-inset-left)); transform: none; }
    .gym-emote { width: 44px; height: 40px; font-size: 22px; }
    .gym-zone { bottom: calc(max(10px, env(safe-area-inset-bottom)) + 4px); }
    .gym-card { bottom: max(10px, env(safe-area-inset-bottom)); left: 50%; width: min(340px, calc(100% - 420px)); min-width: 260px; padding: 10px; }
    .gym-card-name { font-size: 24px; }
    .gym-card-actions .lb-btn { min-height: 40px; font-size: 18px; }
    .gym-note, .lb.gym #lb-wait { top: calc(max(6px, env(safe-area-inset-top)) + 44px); }
    .gym-crowd { top: calc(max(6px, env(safe-area-inset-top)) + 44px); }
    .gym-quick { min-height: 50px; font-size: 26px; padding: 6px 16px; }
    .gym-more { min-height: 40px; }
    .lb.gym #lb-wait { padding: 6px 12px 2px; }
    .lb.gym .lb-wait-title { font-size: 22px; } .lb.gym .lb-wait-time { font-size: 18px; }
    .lb.gym .lb-wait-sub { display: none; }
    .lb.gym > .lb-head { padding-bottom: 10px; }
}
@media (orientation: landscape) and (max-height: 350px) {
    .gym-emote { width: 44px; height: 36px; font-size: 20px; }
    .gym-tag { font-size: 12px; padding: 2px 8px; }
    .lb.gym .lb-wait-foot .lb-link { min-height: 34px; }
}
/* a big screen: the v125 home sits on the right as a panel, always open */
@media (min-width: 1100px) and (min-height: 600px) {
    .lb.gym:not(.sheet) #lb-home, .lb.gym.sheet #lb-home {
        display: flex !important; position: absolute; z-index: 4; inset: auto; top: 76px; right: max(16px, env(safe-area-inset-right)); bottom: 16px; width: 400px;
        overflow-y: auto; padding: 12px; border-radius: 18px; background: rgba(8, 10, 14, .82); border: 1px solid rgba(255, 255, 255, .1); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
    }
    .lb.gym #lb-home > * { width: 100%; }
    .lb.gym #lb-home[hidden] { display: none !important; }
    .lb.gym .lb-grid { grid-template-columns: 1fr; }
    .lb.gym .lb-quick { min-height: 74px; }
    .lb.gym .gym-sheet-close, .lb.gym .gym-dock { display: none !important; }
    .lb.gym .gym-emotes { left: calc(50% - 210px); }
    .lb.gym .gym-card, .lb.gym .gym-zone { left: calc(50% - 210px); }
    .lb.gym .gym-note, .lb.gym #lb-wait { left: calc(50% - 210px); }
    .gym-crowd { right: 432px; }
}
@media (prefers-reduced-motion: reduce) {
    .gym-bubble:not(:empty), .gym-card { animation: none; }
}

/* the home panel on a big screen is 400 px wide: the big button's words fit on one line */
@media (min-width: 1100px) and (min-height: 600px) {
    .lb.gym #lb-home .lb-quick { gap: 10px; padding: 10px 14px; }
    .lb.gym #lb-home .lb-quick-icon { font-size: 30px; }
    .lb.gym #lb-home .lb-quick-main { font-size: 36px; white-space: nowrap; }
    .lb.gym #lb-home .lb-quick-sub { font-size: 14px; }
    .lb.gym #lb-home .lb-quick-go { font-size: 40px; }
}
/* the small version button in the corner would sit under the emotes */
body:has(#mp-lobby.gym) #version-btn { visibility: hidden; }

/* phone held sideways, searching: a slim strip at the top instead of a card, the gym stays in view
   (the code is still one tap away: COPY CODE and INVITE A FRIEND carry it) */
@media (orientation: landscape) and (max-height: 500px) {
    .lb.gym #lb-wait { display: grid; grid-template-columns: auto auto 1fr; grid-template-areas: "title time foot" "acts acts acts"; align-items: center; column-gap: 12px; row-gap: 4px; width: min(680px, calc(100% - 24px)); padding: 6px 12px; text-align: left; }
    .lb.gym .lb-wait-title { grid-area: title; font-size: 22px; }
    .lb.gym .lb-wait-time { grid-area: time; font-size: 20px; }
    .lb.gym .lb-wait-foot { grid-area: foot; justify-content: flex-end; gap: 14px; margin: 0; }
    .lb.gym .lb-code-box { display: none !important; }
    .lb.gym .lb-wait-actions.mp-invite-row { grid-area: acts; margin: 0; justify-content: flex-start; }
    .lb.gym .lb-wait-actions.mp-invite-row:not(.v) { display: none; }
    .lb.gym .lb-wait-actions .lb-btn { min-width: 0; min-height: 38px; padding: 4px 14px; font-size: 18px; }
    .lb.gym .lb-link { font-size: 13px; min-height: 36px; }
}

/* ======================= v129: the gym is the home (js/gym/home.js) =======================
   body.home-gym: the site opens in the gym. One obvious action (FIGHT), MAP for every place, the profile chip, the
   gear. The v125 lobby panel is the FRIENDS DESK sheet; the v128 button menu stays for ?gym=0 only. */
.gym-tl, .gym-gear, .gym-fight, .gym-sh, .gym-place { display: none; }
body.home-gym #mp-lobby .lb-back { display: none !important; }
body.home-gym .lb.gym > .lb-head { display: flex; align-items: center; gap: 8px; }
body.home-gym .lb.gym .lb-title { flex: 1 1 auto; text-align: center; font-size: clamp(22px, 3.4vw, 34px); }
body.home-gym .lb.gym .gym-tl { display: flex; align-items: center; gap: 8px; min-width: 0; }
body.home-gym .lb.gym .gym-gear { display: grid; }
.gym-map-btn, .gym-me, .gym-gear {
    min-height: 44px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .25); background: rgba(8, 10, 14, .78); color: #fff;
    font-family: "Teko", sans-serif !important; font-weight: 600; letter-spacing: .12em; line-height: 1; -webkit-tap-highlight-color: transparent; }
.gym-map-btn { display: inline-flex; align-items: center; gap: 8px; padding: 6px 16px 4px 12px; font-size: 22px; }
.gym-burger { display: grid; gap: 3px; width: 16px; margin-top: -2px; }
.gym-burger i { display: block; height: 2px; border-radius: 1px; background: currentColor; }
.gym-me { display: inline-flex; align-items: center; gap: 8px; max-width: 230px; padding: 4px 14px 4px 5px; font-size: 19px; }
.gym-me b { flex: none; padding: 6px 9px 4px; border-radius: 999px; background: var(--gold); color: #141414; font-size: 17px; }
.gym-me span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gym-gear { place-items: center; width: 44px; padding: 0; font-size: 22px; }
.gym-map-btn:hover, .gym-me:hover, .gym-gear:hover { border-color: var(--gold); }
.gym-map-btn:focus-visible, .gym-me:focus-visible, .gym-gear:focus-visible, .gym-fight:focus-visible, .gym-opt:focus-visible, .gym-lv:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

/* the dock: only FIGHT (the friends desk, training and the rest are places, in FIGHT and in MAP) */
body.home-gym .lb.gym .gym-quick, body.home-gym .lb.gym .gym-train, body.home-gym .lb.gym .gym-more { display: none !important; }
body.home-gym .lb.gym .gym-fight { display: inline-flex; }
.gym-fight { align-items: center; justify-content: center; gap: 12px; min-width: 230px; min-height: 66px; padding: 8px 30px 6px; border: 0; border-radius: 18px; color: #fff;
    font-family: "Teko", sans-serif !important; font-weight: 700; font-size: 42px; line-height: 1; letter-spacing: .14em;
    background: linear-gradient(100deg, #e8242a 0%, #c0181e 60%, #8a0f14 100%); box-shadow: 0 10px 30px rgba(232, 36, 42, .45), inset 0 1px 0 rgba(255, 255, 255, .28);
    animation: gymFightGlow 2.4s ease-in-out infinite; -webkit-tap-highlight-color: transparent; }
.gym-fight-i { font-size: 32px; }
.gym-fight:hover { filter: brightness(1.08); }
.gym-fight:active { transform: scale(.98); }
@keyframes gymFightGlow { 0%, 100% { box-shadow: 0 10px 30px rgba(232, 36, 42, .45), inset 0 1px 0 rgba(255, 255, 255, .28); } 50% { box-shadow: 0 10px 40px rgba(255, 70, 70, .75), 0 0 0 4px rgba(255, 90, 90, .18), inset 0 1px 0 rgba(255, 255, 255, .28); } }
body.home-gym .lb.gym.panel .gym-fight { animation: none; }

/* the friends desk (the v125 lobby): a sheet on every screen size, never a panel that stays open */
@media (min-width: 1100px) and (min-height: 600px) {
    body.home-gym .lb.gym:not(.sheet) #lb-home { display: none !important; }
    body.home-gym .lb.gym.sheet #lb-home { inset: auto; top: 70px; left: 50%; right: auto; bottom: auto; transform: translateX(-50%); width: min(720px, calc(100% - 32px)); max-height: calc(100% - 90px); }
    body.home-gym .lb.gym.sheet .lb-grid { grid-template-columns: 1fr 1fr; }
    body.home-gym .lb.gym .gym-sheet-close { display: inline-flex !important; }
    body.home-gym .lb.gym .gym-dock { display: flex !important; }
    body.home-gym .lb.gym .gym-emotes, body.home-gym .lb.gym .gym-card, body.home-gym .lb.gym .gym-zone, body.home-gym .lb.gym .gym-note, body.home-gym .lb.gym #lb-wait { left: 50%; }
    body.home-gym .gym-crowd { right: max(14px, env(safe-area-inset-right)); }
}

/* sheets: FIGHT and MAP */
body.home-gym .lb.gym .gym-sh:not([hidden]) { display: flex; position: absolute; inset: 0; z-index: 6; align-items: center; justify-content: center;
    padding: max(10px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) max(10px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
    background: rgba(4, 5, 9, .62); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); animation: gymShIn .18s ease-out both; }
@keyframes gymShIn { from { opacity: 0; } to { opacity: 1; } }
.gym-sh-box { display: flex; flex-direction: column; gap: 8px; width: min(440px, 100%); max-height: 100%; overflow-y: auto; overscroll-behavior: contain; padding: 14px;
    border-radius: 18px; background: linear-gradient(160deg, #1d2130, #0b0c12); border: 1px solid rgba(255, 255, 255, .14); box-shadow: 0 24px 60px rgba(0, 0, 0, .6); }
.gym-sh-head { display: flex; align-items: center; justify-content: space-between; }
.gym-sh-head h2 { margin: 0; font-family: "Teko", sans-serif; font-weight: 600; font-size: 38px; line-height: 1; letter-spacing: .14em; color: var(--gold); }
.gym-sh-x { width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: rgba(255, 255, 255, .75); font-size: 30px; line-height: 1; }
.gym-sh-x:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.gym-opt { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; width: 100%; min-height: 58px; padding: 8px 14px; text-align: left;
    border-radius: 13px; border: 1px solid rgba(255, 255, 255, .16); background: rgba(255, 255, 255, .06); color: #fff; font-family: "Oswald", sans-serif; -webkit-tap-highlight-color: transparent; }
.gym-opt:hover { border-color: var(--gold); background: rgba(255, 255, 255, .1); }
.gym-opt-hot { background: linear-gradient(100deg, rgba(232, 36, 42, .9), rgba(150, 16, 22, .9)); border-color: transparent; }
.gym-opt-hot:hover { background: linear-gradient(100deg, #f0383e, #a8141b); }
.gym-opt-i { font-size: 26px; line-height: 1; }
.gym-opt-t { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.gym-opt-t b { font-family: "Teko", sans-serif; font-weight: 600; font-size: 25px; line-height: 1; letter-spacing: .1em; }
.gym-opt-t small { font-size: 13px; line-height: 1.25; color: rgba(255, 255, 255, .72); }
.gym-opt-go { font-size: 30px; line-height: 1; color: rgba(255, 255, 255, .6); }
.gym-opt-group { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; border-radius: 13px; border: 1px solid rgba(255, 154, 60, .35); background: rgba(255, 140, 40, .07); }
.gym-opt-gh { font-family: "Teko", sans-serif; font-weight: 600; font-size: 22px; letter-spacing: .12em; color: #ffbf80; }
.gym-lv-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.gym-spar-row { grid-template-columns: 1fr 1fr; }
.gym-lv { min-height: 46px; padding: 6px 4px 4px; border-radius: 10px; border: 1px solid rgba(255, 154, 60, .45); background: rgba(255, 154, 60, .1); color: #fff;
    font-family: "Teko", sans-serif !important; font-weight: 600; font-size: 21px; line-height: 1; letter-spacing: .08em; }
.gym-lv:hover { background: rgba(255, 154, 60, .25); }
.gym-lv.cur { background: #ff9a3c; color: #141414; border-color: #ff9a3c; }
.gym-spar-row .gym-lv { border-color: rgba(255, 255, 255, .2); background: rgba(255, 255, 255, .05); font-size: 19px; }
.gym-map-list { display: flex; flex-direction: column; gap: 6px; }
.gym-place-opt { min-height: 54px; }
.gym-map-foot { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px 4px; padding-top: 6px; border-top: 1px solid rgba(255, 255, 255, .1); }
.gym-map-foot a, .gym-map-foot button { display: inline-flex; align-items: center; min-height: 44px; padding: 4px 8px; border: 0; background: none; color: rgba(255, 255, 255, .7);
    font-family: "Oswald", sans-serif; font-size: 13px; letter-spacing: .04em; text-decoration: underline; text-underline-offset: 3px; }
.gym-map-foot a:hover, .gym-map-foot button:hover { color: #fff; }

/* the card of a place */
body.home-gym .lb.gym .gym-place:not([hidden]) { display: flex; z-index: 5; }
.gym-place { max-height: calc(100% - 150px); overflow-y: auto; }
.gym-place[data-kind="ai"], .gym-place[data-kind="aihub"] { border-color: rgba(255, 154, 60, .6); }
.gym-place-b { font-size: 15px; line-height: 1.4; color: rgba(255, 255, 255, .85); }
.gym-place-b[hidden] { display: none; }
.gym-place-b p { margin: 4px 0; }
.gym-place .gym-card-actions { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); }
.gym-place .gym-card-actions a.lb-btn { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.gym-dots { color: #ff9a3c; letter-spacing: .2em; font-size: 15px; }
.gym-lv-list { display: flex; flex-direction: column; gap: 6px; }
.gym-lv-opt { display: grid; grid-template-columns: auto auto 1fr; grid-template-areas: "n d go" "s s go"; align-items: center; gap: 2px 10px; min-height: 52px; padding: 6px 12px; text-align: left;
    border-radius: 11px; border: 1px solid rgba(255, 154, 60, .35); background: rgba(255, 154, 60, .08); color: #fff; font-family: "Oswald", sans-serif; }
.gym-lv-opt:hover { background: rgba(255, 154, 60, .2); }
.gym-lv-opt b { grid-area: n; font-family: "Teko", sans-serif; font-weight: 600; font-size: 22px; letter-spacing: .1em; line-height: 1; }
.gym-lv-opt .gym-dots { grid-area: d; }
.gym-lv-opt small { grid-area: s; font-size: 12.5px; color: rgba(255, 255, 255, .7); line-height: 1.25; }
.gym-lv-opt .gym-opt-go { grid-area: go; justify-self: end; }
.gym-goals { display: flex; flex-direction: column; gap: 6px; }
.gym-goal { position: relative; display: flex; justify-content: space-between; gap: 10px; padding: 6px 10px 8px; border-radius: 9px; background: rgba(255, 255, 255, .06); overflow: hidden; }
.gym-goal b { color: var(--gold); }
.gym-goal.done { opacity: .7; }
.gym-goal.done b { color: #3cdc82; }
.gym-goal i { position: absolute; left: 0; bottom: 0; height: 3px; width: var(--p); background: #3cdc82; }
.gym-coach, .gym-streak { font-size: 14px; letter-spacing: .04em; }
.gym-coach b { color: #9ff0bf; }
.gym-rank { margin: 4px 0; padding: 0 0 0 26px; }
.gym-rank li { padding: 2px 0; }
.gym-rank li span { display: inline-block; min-width: 60%; }
.gym-rank b, .gym-rank-me b { color: var(--gold); }
.gym-qr { display: flex; flex-direction: column; align-items: center; gap: 4px; margin-top: 6px; }
.gym-qr[hidden] { display: none; }
.gym-qr canvas { width: 140px; height: 140px; background: #fff; border-radius: 8px; padding: 6px; }
.gym-qr small { font-size: 12px; color: rgba(255, 255, 255, .7); word-break: break-all; text-align: center; }

/* the computer's sparring partners: never dressed like a player's tag (dashed orange, a robot, COMPUTER) */
.gym-tag.npc { min-height: 30px; padding: 2px 9px; border: 1px dashed rgba(255, 154, 60, .85); background: rgba(40, 22, 6, .78); color: #ffd2a6; font-size: 12px; border-radius: 8px; }
.gym-tag.npc .gym-tag-chip { color: #ffbf80; font-size: 9px; }

/* loading: the gym is coming (never the old lobby for a second) */
body.home-gym #mp-lobby.lb.v:not(.gym) { background: radial-gradient(120% 90% at 50% 30%, #2a1c14, #0b0c10 70%); -webkit-backdrop-filter: none; backdrop-filter: none; justify-content: center; }
body.home-gym #mp-lobby.lb.v:not(.gym) > * { visibility: hidden; }
body.home-gym #mp-lobby.lb.v:not(.gym)::after { content: "OPENING THE GYM"; position: absolute; left: 0; right: 0; top: 46%; text-align: center;
    font-family: "Teko", sans-serif; font-size: 34px; letter-spacing: .16em; color: var(--gold); }

/* phone held upright: MAP and the chip on the left, the title gives way; FIGHT full width */
@media (orientation: portrait) {
    body.home-gym .lb.gym .lb-title { display: none; }
    body.home-gym .lb.gym .lb-online { margin-left: auto; }
    body.home-gym .lb.gym .gym-me { max-width: 150px; font-size: 17px; }
    body.home-gym .lb.gym .gym-map-btn { padding: 6px 12px 4px 10px; font-size: 20px; }
    body.home-gym .lb.gym .gym-fight { flex: 1 1 auto; min-width: 0; min-height: 62px; font-size: 38px; }
    body.home-gym .lb.gym .gym-emotes { bottom: calc(max(12px, env(safe-area-inset-bottom)) + 74px); }
    body.home-gym .lb.gym .gym-card { bottom: calc(max(12px, env(safe-area-inset-bottom)) + 136px); }
    body.home-gym .lb.gym .gym-zone { bottom: calc(max(12px, env(safe-area-inset-bottom)) + 136px); }
    .gym-place { max-height: calc(100% - 230px); }
}
/* phone held sideways */
@media (orientation: landscape) and (max-height: 500px) {
    body.home-gym .lb.gym .gym-fight { min-width: 190px; min-height: 56px; font-size: 36px; padding: 6px 22px 4px; }
    body.home-gym .lb.gym .gym-card { left: 50%; transform: translateX(-50%); width: min(360px, calc(100% - 460px)); min-width: 280px; max-height: calc(100% - 64px); }
    .gym-sh-box { padding: 10px 12px; gap: 6px; width: min(520px, 100%); }
    .gym-sh-head h2 { font-size: 30px; }
    .gym-opt { min-height: 48px; padding: 5px 12px; }
    .gym-opt-t b { font-size: 22px; }
    body.home-gym .lb.gym .gym-me { max-width: 170px; }
}
@media (orientation: landscape) and (max-height: 350px) {
    body.home-gym .lb.gym .gym-fight { min-width: 150px; min-height: 50px; font-size: 30px; }
    body.home-gym .lb.gym .lb-title { display: none; }
    body.home-gym .lb.gym .lb-online { margin-left: auto; }
    .gym-me span { display: none; }
    .gym-me { padding-right: 5px; }
    body.home-gym .lb.gym .gym-card { width: min(320px, calc(100% - 300px)); min-width: 250px; }
}
@media (prefers-reduced-motion: reduce) { .gym-fight { animation: none; } body.home-gym .lb.gym .gym-sh:not([hidden]) { animation: none; } }

/* v129: the training camp's dock rule (css/training.css, big screens) must not hide FIGHT nor move the dock */
@media (min-width: 1100px) and (min-height: 600px) {
    body.home-gym .lb.gym .gym-dock.has-train { left: auto; right: max(16px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom)); }
    body.home-gym .lb.gym .gym-dock.has-train > .gym-fight { display: inline-flex !important; }
}
.gym-tag.npc { min-height: 34px; }
/* phone held upright: the chip shows the level only, the online count is compact */
@media (orientation: portrait) {
    body.home-gym .lb.gym .gym-me span { display: none; }
    body.home-gym .lb.gym .gym-me { padding-right: 5px; }
    body.home-gym .lb.gym .gym-gear, body.home-gym .lb.gym .gym-map-btn { flex: none; }
    body.home-gym .lb.gym .lb-online { padding: 6px 10px; font-size: 13px; }
}
/* phone held sideways: FIGHT and MAP in two columns, so they fit without scrolling */
@media (orientation: landscape) and (max-height: 500px) {
    body.home-gym .lb.gym #gym-fight-sheet .gym-sh-box { display: grid; grid-template-columns: 1fr 1fr; grid-template-areas: "h h" "on ai" "fr ai" "tr sp"; align-items: stretch; width: min(700px, 100%); }
    #gym-fight-sheet .gym-sh-head { grid-area: h; }
    #gf-online { grid-area: on; } #gf-friend { grid-area: fr; } #gf-train { grid-area: tr; }
    #gym-fight-sheet .gym-opt-group { grid-area: ai; justify-content: center; }
    #gym-fight-sheet .gym-spar-row { grid-area: sp; }
    #gym-fight-sheet .gym-opt-group .gym-lv-row { grid-template-columns: 1fr 1fr; }
    body.home-gym .lb.gym #gym-map .gym-sh-box { width: min(700px, 100%); }
    .gym-map-list { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
    .gym-place-opt { min-height: 50px; }
    .gym-place-opt .gym-opt-t small { display: none; }
    .gym-map-foot a, .gym-map-foot button { min-height: 36px; }
    .gym-lv-list { display: grid; grid-template-columns: 1fr 1fr; }
    .gym-lv-opt small { display: none; }
}
@media (orientation: landscape) and (max-height: 350px) {
    .gym-sh-head h2 { font-size: 26px; }
    .gym-sh-x { height: 36px; }
    .gym-opt { min-height: 44px; }
    .gym-opt-i { font-size: 22px; }
    .gym-opt-t small { display: none; }
    .gym-opt-gh { font-size: 18px; }
    .gym-lv { min-height: 40px; font-size: 19px; }
    .gym-place-opt { min-height: 44px; }
}

/* a partner's row of the AI ring card: the name and the dots on the left, the arrow on the right (never cut off) */
.gym-lv-list { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
@media not all and (orientation: landscape) and (max-height: 500px) { .gym-lv-list { grid-template-columns: minmax(0, 1fr); } }
.gym-lv-opt { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "n go" "d go" "s go"; min-width: 0; }
.gym-lv-opt b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* v129 (lead): the daily comeback card (.lg-toast, top centre, 6 s) must not sit on the welcome line */
body:has(.lg-toast) .lb.gym .gym-note { top: calc(max(10px, env(safe-area-inset-top)) + 116px) !important; }

/* ======================= v130 (fork L): the two fights on the home screen, one tap each =======================
   js/gym/home.js adds ONLINE (#gym-go-online) and VS AI (#gym-go-ai) before the FIGHT button, which becomes MORE
   (the computer levels, a friend, training, pads, the dummy). One row at the bottom right; on a short phone held
   sideways, a column at the right. */
.gym-go { display: none; }
body.home-gym .lb.gym .gym-go { display: inline-flex; }
body.home-gym .lb.gym .gym-dock { flex-direction: column; align-items: stretch; gap: 8px; }    /* a column at the right: the boxer in the middle stays clear */
.gym-go { align-items: center; gap: 10px; min-width: 230px; min-height: 64px; padding: 6px 20px 4px 14px; border: 0; border-radius: 16px; color: #fff; text-align: left;
    font-family: "Teko", sans-serif !important; cursor: pointer; -webkit-tap-highlight-color: transparent; transition: transform .1s, filter .15s; }
.gym-go:hover { filter: brightness(1.08); }
.gym-go:active { transform: scale(.97); }
.gym-go:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.gym-go-i { flex: none; font-size: 28px; line-height: 1; }
.gym-go-t { display: flex; flex-direction: column; min-width: 0; }
.gym-go-t small { font-family: "Oswald", sans-serif; font-size: 12px; font-weight: 500; letter-spacing: .12em; line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: .9; }
.gym-go-t b { font-weight: 700; font-size: 38px; line-height: .92; letter-spacing: .1em; white-space: nowrap; }
.gym-go-on { background: linear-gradient(100deg, #e8242a 0%, #c0181e 60%, #8a0f14 100%); box-shadow: 0 10px 30px rgba(232, 36, 42, .45), inset 0 1px 0 rgba(255, 255, 255, .28);
    animation: gymFightGlow 2.4s ease-in-out infinite; }
.gym-go-ai { background: linear-gradient(100deg, #ffae52 0%, #f08a2a 55%, #c4620f 100%); color: #1c1004; box-shadow: 0 10px 28px rgba(240, 138, 42, .38), inset 0 1px 0 rgba(255, 255, 255, .35); }
body.home-gym .lb.gym.panel .gym-go-on { animation: none; }
/* MORE (was FIGHT): quiet, next to the two fights */
body.home-gym .lb.gym .gym-fight.gym-more2 { min-width: 0; min-height: 50px; padding: 4px 16px 2px; gap: 8px; font-size: 26px; letter-spacing: .1em; border-radius: 16px;
    background: rgba(8, 10, 14, .82); border: 1px solid rgba(255, 255, 255, .3); box-shadow: 0 6px 18px rgba(0, 0, 0, .35); animation: none; }
body.home-gym .lb.gym .gym-fight.gym-more2 .gym-fight-i { font-size: 20px; }
body.home-gym .lb.gym .gym-fight.gym-more2:hover { border-color: var(--gold); }
@media (orientation: portrait) {
    body.home-gym .lb.gym .gym-dock { flex-direction: row; }
    body.home-gym .lb.gym .gym-go { flex: 1 1 0; min-width: 0; min-height: 62px; padding: 6px 10px 4px 12px; gap: 7px; }
    body.home-gym .lb.gym .gym-go-i { display: none; }
    body.home-gym .lb.gym .gym-go-t b { font-size: 32px; }
    body.home-gym .lb.gym .gym-go-t small { font-size: 10.5px; letter-spacing: .08em; }
    body.home-gym .lb.gym .gym-fight.gym-more2 { flex: none; width: 56px; min-height: 62px; padding: 0; }
    body.home-gym .lb.gym .gym-fight.gym-more2 .gym-fight-t { display: none; }
    body.home-gym .lb.gym .gym-fight.gym-more2 .gym-fight-i { font-size: 24px; }
}
@media (orientation: landscape) and (max-height: 500px) {
    body.home-gym .lb.gym .gym-go { min-width: 210px; min-height: 54px; padding: 5px 16px 3px 12px; }
    body.home-gym .lb.gym .gym-go-t b { font-size: 34px; }
    body.home-gym .lb.gym .gym-fight.gym-more2 { min-width: 0; min-height: 46px; padding: 4px 12px 2px; font-size: 22px; }
}
@media (orientation: landscape) and (max-height: 350px) {
    body.home-gym .lb.gym .gym-dock { gap: 6px; }
    body.home-gym .lb.gym .gym-go { min-height: 48px; min-width: 168px; padding: 3px 14px 2px 10px; }
    body.home-gym .lb.gym .gym-go-i { font-size: 22px; }
    body.home-gym .lb.gym .gym-go-t b { font-size: 28px; }
    body.home-gym .lb.gym .gym-go-t small { font-size: 10px; }
    body.home-gym .lb.gym .gym-fight.gym-more2 { min-width: 0; min-height: 44px; font-size: 20px; }
}
@media (prefers-reduced-motion: reduce) { .gym-go-on { animation: none; } }
/* (big screens: css/training.css keeps only TRAIN in the old dock; the gym home shows its two fights there too) */
@media (min-width: 1100px) and (min-height: 600px) {
    body.home-gym .lb.gym .gym-dock.has-train > .gym-go { display: inline-flex !important; }
}

/* v130: CHALLENGE A BOXER (js/gym/home.js): above the two fights when real players are in the gym, and its list */
.gym-here { display: none; }
body.home-gym .lb.gym .gym-here:not([hidden]) { display: inline-flex; }
.gym-here { align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 4px 14px 2px; border-radius: 14px; color: #fff; cursor: pointer;
    border: 1px solid rgba(80, 170, 255, .7); background: rgba(14, 40, 72, .88); box-shadow: 0 6px 18px rgba(0, 0, 0, .35);
    font-family: "Teko", sans-serif !important; font-weight: 600; font-size: 23px; line-height: 1; letter-spacing: .1em; white-space: nowrap; -webkit-tap-highlight-color: transparent; }
.gym-here b { min-width: 26px; padding: 3px 7px 1px; border-radius: 999px; background: #50aaff; color: #08121e; font-size: 18px; }
.gym-here:hover { border-color: #9fd0ff; }
.gym-here:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.gym-here-list { display: flex; flex-direction: column; gap: 6px; }
.gym-here-row { display: flex; align-items: center; gap: 10px; padding: 6px 6px 6px 12px; border-radius: 11px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .1); }
.gym-here-n { display: flex; flex-direction: column; gap: 2px; flex: 1 1 auto; min-width: 0; }
.gym-here-n b { font-family: "Teko", sans-serif; font-weight: 600; font-size: 22px; letter-spacing: .08em; line-height: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gym-here-n small { font-size: 12.5px; color: rgba(255, 255, 255, .7); }
.gym-here-go { flex: none; min-height: 44px; min-width: 112px; }
.gym-here-go:disabled { opacity: .45; cursor: default; }
@media (orientation: portrait) {
    body.home-gym .lb.gym .gym-dock.has-here { flex-wrap: wrap; }
    body.home-gym .lb.gym .gym-dock.has-here .gym-here { flex: 1 1 100%; order: -1; }
    body.home-gym .lb.gym .gym-dock.has-here ~ .gym-emotes, body:has(.gym-dock.has-here) .lb.gym .gym-emotes { bottom: calc(max(12px, env(safe-area-inset-bottom)) + 128px); }
}
@media (orientation: landscape) and (max-height: 350px) {
    body.home-gym .lb.gym .gym-here { min-height: 44px; font-size: 19px; padding: 3px 10px 1px; }
}
@media (min-width: 1100px) and (min-height: 600px) {
    body.home-gym .lb.gym .gym-dock.has-train > .gym-here:not([hidden]) { display: inline-flex !important; }
}

/* v130: YOUR BOXER NAME (js/gym/home.js), asked once on arrival */
body.home-gym .lb.gym .gym-name-sh:not([hidden]) { z-index: 8; }
.gym-name-box { width: min(420px, 100%); gap: 10px; }
.gym-name-l { font-family: "Oswald", sans-serif; font-size: 14px; color: rgba(255, 255, 255, .8); }
.gym-name-row { display: flex; gap: 8px; }
#gym-name-in { flex: 1 1 auto; min-width: 0; min-height: 52px; padding: 6px 14px 2px; border-radius: 12px; border: 2px solid rgba(240, 192, 64, .7); background: rgba(0, 0, 0, .45); color: #fff;
    font-family: "Teko", sans-serif; font-weight: 600; font-size: 30px; letter-spacing: .1em; text-transform: uppercase; outline: none; }
#gym-name-in:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(240, 192, 64, .25); }
.gym-name-dice { flex: none; width: 52px; min-height: 52px; border-radius: 12px; border: 1px solid rgba(255, 255, 255, .25); background: rgba(255, 255, 255, .08); color: #fff; font-size: 24px; }
.gym-name-hint { margin: 0; min-height: 1.3em; font-family: "Oswald", sans-serif; font-size: 13px; color: rgba(255, 255, 255, .7); }
.gym-name-hint.bad { color: #ff9a8a; }
.gym-name-ok { min-height: 52px; font-size: 24px; }
.gym-name-ok:disabled { opacity: .5; }
@media (orientation: landscape) and (max-height: 500px) {
    .gym-name-box { gap: 6px; }
    #gym-name-in, .gym-name-dice, .gym-name-ok { min-height: 46px; }
}
/* v130: an incoming challenge (js/Social.js card) comes first in the notice stack, above the toasts, never down on the fight buttons */
body.home-gym .sc-stack .sc-card { order: -1; }

/* v139: the chip carries the boxer's portrait; FOLLOW US under the MENU sheet */
.gym-me .gym-me-av { display: block; flex: none; width: 30px; height: 30px; border-radius: 50%; background: #1c2233 center / cover no-repeat; }
.gym-follow { margin-top: 8px; }
