/* Fit the lobby into the visible window and keep its controls reachable. */
body.authenticated:has(#lobby:not([hidden])) main{padding-top:12px;padding-bottom:0}
.authenticated #lobby{min-height:0}
.authenticated #lobby .lobby-stage{
  width:100%;max-width:100%;min-width:0;min-height:0;
  height:calc(100dvh - 82px);margin:0;padding:24px clamp(16px,2vw,32px);
  box-sizing:border-box;gap:14px;
}
.authenticated #lobby .lobby-slots{
  min-width:0;max-width:100%;width:100%;
  display:grid;grid-template-columns:repeat(2,minmax(0,1fr)) minmax(0,1.14fr) repeat(2,minmax(0,1fr));
  align-items:center;gap:clamp(8px,1vw,18px);
}
.authenticated #lobby .lobby-slot{
  min-width:0;width:100%;height:clamp(350px,49dvh,500px);
}
.authenticated #lobby .lobby-slot:nth-child(2),
.authenticated #lobby .lobby-slot:nth-child(4){height:clamp(380px,52dvh,530px)}
.authenticated #lobby .lobby-slot-main{height:clamp(420px,55dvh,560px)}
.authenticated #lobby .lobby-start,
.authenticated #lobby .lobby-ready{justify-self:center;min-height:46px;margin:0}
.authenticated #lobby .lobby-slot-main{cursor:pointer}
.authenticated #lobby .lobby-slot-main:focus-visible{outline:2px solid #fff;outline-offset:3px}
.authenticated .tb-profile{cursor:pointer;transition:border-color .2s ease,background-color .2s ease,transform .25s ease}
.authenticated .tb-profile:hover,.authenticated .tb-profile:focus-visible{border-color:#ddd;background:#242424;transform:translateY(-2px)}
.authenticated #lobby .lobby-start,.authenticated #lobby .lobby-ready{animation:m-rise .35s var(--ease) both}
.authenticated #lobby .lobby-ready{animation-delay:.08s}
.authenticated #lobby .mode-card{transition:filter .25s ease,transform .25s ease}
.authenticated #lobby .mode-card:hover{filter:brightness(1.13)}

@media(min-width:1700px){
  .authenticated #lobby .lobby-stage{grid-template-columns:230px minmax(0,1fr) 230px;column-gap:20px}
  .authenticated #lobby .mode-dock{position:relative;grid-column:1;grid-row:1/4;align-self:start;justify-self:start;top:auto;left:auto;width:230px}
  .authenticated #lobby .lobby-slots{grid-column:2;grid-row:1}
  .authenticated #lobby .lobby-start{grid-column:2;grid-row:2}
  .authenticated #lobby .lobby-ready{grid-column:2;grid-row:3}
  .authenticated #lobby .queue-stage{grid-column:2;grid-row:1/4;max-width:100%}
  .authenticated #lobby .mode-card{height:170px}
}
@media(max-width:1699px){
  .authenticated #lobby .lobby-stage{grid-template-columns:minmax(0,1fr)}
  .authenticated #lobby .mode-dock{position:relative;grid-column:1;top:auto;left:auto;justify-self:start;width:min(300px,100%)}
  .authenticated #lobby .lobby-slots,
  .authenticated #lobby .lobby-start,
  .authenticated #lobby .lobby-ready,
  .authenticated #lobby .queue-stage{grid-column:1}
  .authenticated #lobby .mode-panel{top:calc(100% + 8px);left:0;max-width:calc(100vw - 48px)}
}
@media(max-width:700px){
  .authenticated #lobby .lobby-stage{padding:20px 10px 28px;gap:12px}
  .authenticated #lobby .lobby-slots{gap:5px}
  .authenticated #lobby .lobby-slot{height:clamp(250px,46dvh,380px)}
  .authenticated #lobby .lobby-slot:nth-child(2),
  .authenticated #lobby .lobby-slot:nth-child(4){height:clamp(270px,49dvh,410px)}
  .authenticated #lobby .lobby-slot-main{height:clamp(310px,53dvh,450px);padding:10px 4px 28px}
  .authenticated #lobby .lobby-slot-main .slot-name{font-size:clamp(14px,3vw,22px)}
}
@media(max-height:720px){
  .authenticated #lobby .lobby-stage{padding-block:12px;gap:8px}
  .authenticated #lobby .lobby-slot{height:clamp(240px,44dvh,350px)}
  .authenticated #lobby .lobby-slot:nth-child(2),
  .authenticated #lobby .lobby-slot:nth-child(4){height:clamp(260px,47dvh,370px)}
  .authenticated #lobby .lobby-slot-main{height:clamp(280px,50dvh,390px)}
  .authenticated #lobby .mode-card{height:130px}
}
@media(prefers-reduced-motion:reduce){
  .authenticated #lobby .lobby-start,.authenticated #lobby .lobby-ready{animation:none}
  .authenticated .tb-profile,.authenticated #lobby .mode-card{transition:none}
}
.sidebar .quick-search .quick-recent{position:absolute;top:calc(100% + 6px);left:0;right:0;z-index:90;background:#111;border:1px solid #444;box-shadow:0 12px 30px #000b;padding:5px}
.quick-recent-title{display:block;color:#a8a8a8;font:700 10px var(--vf-body);letter-spacing:.13em;padding:8px 10px}
.sidebar .quick-search .quick-recent-item{position:static;display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;height:auto;margin:0;padding:10px 11px;text-align:left;background:#1a1a1a!important;border:0!important;border-top:1px solid #333!important;border-radius:0;color:#eee!important;font:600 12px var(--vf-body);letter-spacing:0;white-space:nowrap;overflow:hidden;transform:none}
.sidebar .quick-search .quick-recent-item strong{overflow:hidden;text-overflow:ellipsis;font-weight:700}
.sidebar .quick-search .quick-recent-item small{flex:none;color:#a6a6a6;font-size:10px;letter-spacing:.08em}
.sidebar .quick-search .quick-recent-item:hover,.sidebar .quick-search .quick-recent-item:focus-visible{background:#303030!important;color:#fff!important;outline:1px solid #aaa;outline-offset:-1px}
.authenticated #lobby .lobby-slot-main{border:1px solid #d6d6d6!important;clip-path:none!important}
.lobby-slot-main .lobby-card-outline{display:none}
.lobby-slot .slot-name{display:flex;align-items:center;justify-content:center;gap:4px;text-align:center}
.lobby-slot .slot-name .slot-leader{position:relative;inset:auto;z-index:auto;display:inline-flex;align-items:center;justify-content:center;flex:none;width:16px;height:20px;padding:0;background:none;border:0;border-radius:0;box-shadow:none;color:#d5ab58}
.lobby-slot .slot-leader .moon-icon,.lobby-slot .slot-leader svg{width:16px;height:20px}
.lobby-slot .slot-leader .moon-icon-img{width:16px;height:20px;filter:none}
.lobby-slot .party-career-link{color:#fff;text-decoration:none;cursor:pointer}
.lobby-slot .party-career-link:hover,.lobby-slot .party-career-link:focus-visible{color:#fff;text-decoration:underline;text-underline-offset:4px;text-decoration-thickness:1px}
.tb-profile{position:relative;isolation:isolate;min-width:170px}
.tb-profile .tb-rank{position:relative;z-index:1;flex:none}
.tb-profile .tb-name{position:relative;z-index:1;min-width:120px;text-shadow:0 1px 5px #000,0 0 8px #000}
.tb-profile .tb-banner{display:block;position:absolute;inset:0 0 0 44px;width:auto;border:0;filter:none;background-color:#181818;background-position:center right;background-size:cover;pointer-events:none;z-index:0}
.tb-profile .tb-name small{color:#ddd}
@media(max-width:1280px){.tb-profile{min-width:145px}.tb-profile .tb-name{min-width:96px}}
.queue-radar::before{content:none!important;animation:none!important}
#live.is-pregame #live-match-players .live-player.is-locked{border-color:#388b60!important;border-left-color:#48d989!important;box-shadow:0 0 0 1px #48d98955,0 10px 24px #0007!important}
#live.is-pregame #live-match-players .live-player.is-hovering{border-color:#356789!important;border-left-color:#64b7f4!important}
#live.is-pregame #live-match-players .live-player.is-picking{border-color:#74434a!important;border-left-color:#db7f8a!important}
#live.is-pregame #live-match-players .live-player.is-locked .score-agent{border-color:#48d989!important}
#live.is-pregame #live-match-players .live-player.is-hovering .score-agent{border-color:#64b7f4!important}
#live.is-pregame .live-badge.badge-locked{border-color:#48d989!important;color:#6af0a3!important;background:#143524dd!important}
#live.is-pregame .live-badge.badge-hovering{border-color:#64b7f4!important;color:#90d0ff!important;background:#122a3add!important}
#live.is-pregame .live-badge.badge-picking{border-color:#db7f8a!important;color:#f0a2ab!important;background:#361a20dd!important}
#live #live-match-players .live-player.in-party{border-left:6px solid var(--party-color)!important;border-top-color:color-mix(in srgb,var(--party-color) 45%,#262626)!important;border-right-color:color-mix(in srgb,var(--party-color) 45%,#262626)!important;border-bottom-color:color-mix(in srgb,var(--party-color) 45%,#262626)!important;background:linear-gradient(90deg,color-mix(in srgb,var(--party-color) 25%,#151515),#151515 62%)!important;box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--party-color) 32%,transparent)!important}
#live #live-match-players .live-player.in-party .score-agent{border-color:var(--party-color)!important}
#live .live-badge.badge-party{border-color:var(--party-color);color:#fff;background:color-mix(in srgb,var(--party-color) 60%,#090909);box-shadow:0 0 10px color-mix(in srgb,var(--party-color) 35%,transparent)}
#live .live-badge.badge-solo{border-color:#666;color:#bbb;background:#080808d9}
#live .live-party-summary{display:inline-block;margin-left:12px;padding-left:12px;border-left:1px solid #777;color:#e5e5e5;font:600 11px var(--vf-body);letter-spacing:.02em;text-transform:none}
@media(max-width:600px){#live .live-party-summary{display:block;margin:6px 0 0;padding:0;border:0}}
/* In-game roster rows use a plain border unless a real party has a colour. */
#live:not(.is-pregame) #live-match-players .live-player:not(.in-party),
#live:not(.is-pregame) #live-match-players .live-player:not(.in-party):hover,
#live:not(.is-pregame) #live-match-players .live-player.is-own:not(.in-party){border-left:1px solid #4d4d4d!important}
#career .current-rank-line{display:grid;grid-template-columns:42px minmax(0,1fr);grid-template-rows:auto auto;column-gap:12px;row-gap:2px;align-items:center;justify-content:start}
#career .current-rank-line #rank{display:contents}
#career .current-rank-line #rank .stat-rank-icon{grid-column:1;grid-row:1 / 3}
#career .current-rank-line #rank span{grid-column:2;grid-row:1;font-size:15px;line-height:1.2;white-space:nowrap}
#career .current-rank-line #rr{grid-column:2;grid-row:2;padding:0;border:0;font-size:20px;line-height:1.1;white-space:nowrap}
.match-rr-summary{display:inline-block;margin-left:10px;padding:2px 6px;border:1px solid #555;background:#151515d9;font:700 11px var(--vf-body);letter-spacing:.03em;vertical-align:middle;white-space:nowrap}
.match-rr-detail{font:800 18px var(--vf-body)}
.match-rr.rr-gain{color:#39df91!important;border-color:#358c60}
.match-rr.rr-loss{color:#fa6970!important;border-color:#8f4348}
.match-rr.rr-unknown{color:#aaa!important}
.moon-drawer .moon-drawer-game>.drawer-result-line{grid-area:result;display:flex;align-items:center;justify-self:end;gap:8px;white-space:nowrap}
.moon-drawer .moon-drawer-game .drawer-result-line>.match-rr-summary{margin-left:0}
.moon-drawer .moon-drawer-game .drawer-result-line>.drawer-result{font-size:12px}
.moon-drawer .drawer-career-link{color:inherit;text-decoration:none}
.moon-drawer .drawer-career-link:hover,.moon-drawer .drawer-career-link:focus-visible{text-decoration:underline;text-underline-offset:4px}
