/* v8 PC web client polish (desktop only, never body.mobile). Loaded LAST on games/ and play/ pages.
   1. Lobby footer buttons: bigger, grouped in the centre of each frame's bottom strip.
   2. Scroll columns sit INSIDE each frame's glass window (small arrows, slim track).
   3. Lobby chat colours: dark names, own name blue, message text coloured by account type.
   4. Settings (lobby + game) and Connection popups use the chrome art
      icons/chrome-settings.webp (822x1122, 9-slice 150 80 80 80) and
      icons/chrome-connection.webp (1500x602, fixed size; Reconnect sits on the art's pill slot).
      Change the art and these numbers together. */

@media (min-width: 761px) {

  /* ---------- 1. Footer buttons ---------- */
        html:not(#_p1):not(#_p2):not(#_p3):not(#_p4):not(#_p5) body.game-page:not(.mobile):not(#_p6):not(#_p7) #lobby-grid#lobby-grid#lobby-grid#lobby-grid .pane .tools .round-btn.round-btn {
    width: 40px !important; height: 40px !important; min-width: 40px !important; min-height: 40px !important;
    flex: 0 0 40px !important; margin: 0 !important; padding: 2px !important;
    position: relative !important; left: auto !important; right: auto !important; top: auto !important; bottom: auto !important;
  }
  html:not(#_p1):not(#_p2):not(#_p3):not(#_p4):not(#_p5) body.game-page:not(.mobile):not(#_p6):not(#_p7) #lobby-grid#lobby-grid#lobby-grid#lobby-grid :is(#btn-watch, #btn-invite) {
    height: 38px !important; min-width: 160px !important; max-width: none !important; flex: 0 0 auto !important;
    padding: 0 26px !important; margin: 0 !important; font-size: 14px !important; letter-spacing: .1em !important;
    position: static !important;
  }
  html:not(#_p1):not(#_p2):not(#_p3):not(#_p4):not(#_p5) body.game-page:not(.mobile):not(#_p6):not(#_p7) #lobby-grid#lobby-grid#lobby-grid#lobby-grid #players-pane #btn-invite { min-width: 140px !important; padding: 0 18px !important; }
    
  /* ---------- 2. Scroll columns inside the glass ---------- */
          /* buttons placed directly (no slot wrappers yet) */
  html:not(#_p1):not(#_p2):not(#_p3):not(#_p4):not(#_p5) body.game-page:not(.mobile):not(#_p6):not(#_p7) #lobby-grid#lobby-grid#lobby-grid#lobby-grid .pane > .sb-col > .sb-btn.sb-up { position: absolute !important; left: 1px !important; top: 0 !important; bottom: auto !important; }
  html:not(#_p1):not(#_p2):not(#_p3):not(#_p4):not(#_p5) body.game-page:not(.mobile):not(#_p6):not(#_p7) #lobby-grid#lobby-grid#lobby-grid#lobby-grid .pane > .sb-col > .sb-btn.sb-down { position: absolute !important; left: 1px !important; top: auto !important; bottom: 0 !important; }
      /* list keeps clear of the scroll column */
  
  /* ---------- 3. Lobby chat colours ---------- */
  html:not(#_p1):not(#_p2):not(#_p3):not(#_p4):not(#_p5) body.game-page:not(.mobile):not(#_p6):not(#_p7) #view-lobby #chat-log#chat-log .line { color: #1f2c3f !important; text-shadow: none !important; }
    html:not(#_p1):not(#_p2):not(#_p3):not(#_p4):not(#_p5) body.game-page:not(.mobile):not(#_p6):not(#_p7) #view-lobby #chat-log#chat-log .nm { color: #2a3038 !important; font-weight: 800 !important; text-shadow: 0 1px 0 rgba(255,255,255,.6) !important; cursor: pointer; }
  html:not(#_p1):not(#_p2):not(#_p3):not(#_p4):not(#_p5) body.game-page:not(.mobile):not(#_p6):not(#_p7) #view-lobby #chat-log#chat-log .nm.me { color: #1f5fd1 !important; }
  html:not(#_p1):not(#_p2):not(#_p3):not(#_p4):not(#_p5) body.game-page:not(.mobile):not(#_p6):not(#_p7) #view-lobby #chat-log#chat-log .tx.free  { color: #0b5f8f !important; font-weight: 600 !important; }
  html:not(#_p1):not(#_p2):not(#_p3):not(#_p4):not(#_p5) body.game-page:not(.mobile):not(#_p6):not(#_p7) #view-lobby #chat-log#chat-log .tx.sub   { color: #0a7a4f !important; font-weight: 600 !important; }
  html:not(#_p1):not(#_p2):not(#_p3):not(#_p4):not(#_p5) body.game-page:not(.mobile):not(#_p6):not(#_p7) #view-lobby #chat-log#chat-log .tx.vip   { color: #6a25a8 !important; font-weight: 700 !important; }
  html:not(#_p1):not(#_p2):not(#_p3):not(#_p4):not(#_p5) body.game-page:not(.mobile):not(#_p6):not(#_p7) #view-lobby #chat-log#chat-log .tx.mod   { color: #c24a00 !important; font-weight: 700 !important; }
      html:not(#_p1):not(#_p2):not(#_p3):not(#_p4):not(#_p5) body.game-page:not(.mobile):not(#_p6):not(#_p7) #view-lobby #chat-log#chat-log .line.pm :is(.pm-tag, .pm-tx, .pm-tx *) { color: #8a1c1c !important; font-weight: 700 !important; }
  html:not(#_p1):not(#_p2):not(#_p3):not(#_p4):not(#_p5) body.game-page:not(.mobile):not(#_p6):not(#_p7) #view-lobby #chat-log#chat-log .chat-link { color: #1f5fd1 !important; }

  /* ---------- 4a. Settings popups (lobby #set-back, game #game-set-back) ---------- */
  html:not(#_p1):not(#_p2):not(#_p3):not(#_p4):not(#_p5) body:not(.mobile):not(#_p6):not(#_p7) :is(#set-back, #game-set-back) .set-panel.set-panel {
    box-sizing: border-box !important;
    width: 380px !important; max-width: calc(100vw - 24px) !important;
    height: auto !important; min-height: 0 !important; max-height: calc(100vh - 24px) !important;
    padding: 6px 14px 12px !important;
    background: none !important; box-shadow: none !important; outline: 0 !important;
    border-style: solid !important; border-color: transparent !important;
    border-width: 62px 33px 33px 33px !important;
    border-image: url("/icons/chrome-settings.webp") 150 80 80 80 fill / 62px 33px 33px 33px stretch !important;
    filter: drop-shadow(0 10px 22px rgba(0,0,0,.45)) !important;
    border-radius: 0 !important;
    color: #1f2c3f !important; text-shadow: none !important;
    overflow: visible !important;
  }
  html:not(#_p1):not(#_p2):not(#_p3):not(#_p4):not(#_p5) body:not(.mobile):not(#_p6):not(#_p7) :is(#set-back, #game-set-back) .set-panel.set-panel::before,
  html:not(#_p1):not(#_p2):not(#_p3):not(#_p4):not(#_p5) body:not(.mobile):not(#_p6):not(#_p7) :is(#set-back, #game-set-back) .set-panel.set-panel::after { content: none !important; display: none !important; }
  html:not(#_p1):not(#_p2):not(#_p3):not(#_p4):not(#_p5) body:not(.mobile):not(#_p6):not(#_p7) :is(#set-back, #game-set-back) .set-panel.set-panel > h2 {
    margin: -58px 0 10px !important; padding: 0 !important; height: 50px !important;
    display: flex !important; align-items: center !important; justify-content: center !important;
    background: none !important; border: 0 !important; box-shadow: none !important;
    font: 800 15px/1 "Outfit", "Figtree", sans-serif !important; letter-spacing: .16em !important; text-transform: uppercase !important;
    color: #2a3442 !important; text-shadow: 0 1px 0 rgba(255,255,255,.9) !important;
  }
  html:not(#_p1):not(#_p2):not(#_p3):not(#_p4):not(#_p5) body:not(.mobile):not(#_p6):not(#_p7) :is(#set-back, #game-set-back) .set-panel.set-panel > h2 .ttl { color: inherit !important; text-shadow: inherit !important; font: inherit !important; background: none !important; }
  html:not(#_p1):not(#_p2):not(#_p3):not(#_p4):not(#_p5) body:not(.mobile):not(#_p6):not(#_p7) :is(#set-back, #game-set-back) .set-panel .set-body {
    background: none !important; border: 0 !important; box-shadow: none !important;
    padding: 4px 4px 2px !important; margin: 0 !important; text-align: left !important;
    max-height: calc(100vh - 190px) !important; overflow-y: auto !important;
  }
  html:not(#_p1):not(#_p2):not(#_p3):not(#_p4):not(#_p5) body:not(.mobile):not(#_p6):not(#_p7) :is(#set-back, #game-set-back) .set-panel :is(.set-sec, .set-sec *) {
    color: #1d4f86 !important; text-shadow: 0 1px 0 rgba(255,255,255,.8) !important; font-weight: 800 !important;
  }
  html:not(#_p1):not(#_p2):not(#_p3):not(#_p4):not(#_p5) body:not(.mobile):not(#_p6):not(#_p7) :is(#set-back, #game-set-back) .set-panel :is(.set-opt, .sc-rlabel, label) {
    color: #1f2c3f !important; text-shadow: 0 1px 0 rgba(255,255,255,.6) !important;
  }
  html:not(#_p1):not(#_p2):not(#_p3):not(#_p4):not(#_p5) body:not(.mobile):not(#_p6):not(#_p7) :is(#set-back, #game-set-back) .set-panel :is(#set-close, #game-set-close) {
    display: block !important; margin: 12px auto 0 !important;
    height: 32px !important; min-width: 130px !important; padding: 0 24px !important;
    border-radius: 999px !important; border: 1px solid #154a72 !important;
    background: linear-gradient(180deg, #bfe4fb 0%, #5aaee3 42%, #2b7fbf 52%, #1d5f95 100%) !important;
    color: #fff !important; font: 800 13px/1 "Outfit", "Figtree", sans-serif !important;
    letter-spacing: .12em !important; text-transform: uppercase !important;
    text-shadow: 0 -1px 0 rgba(10,40,70,.7) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.8), 0 2px 0 #123c5e, 0 4px 10px rgba(15,35,60,.35) !important;
  }
  html:not(#_p1):not(#_p2):not(#_p3):not(#_p4):not(#_p5) body:not(.mobile):not(#_p6):not(#_p7) :is(#set-back, #game-set-back) .set-panel :is(#set-close, #game-set-close):hover { filter: brightness(1.1) !important; }

  /* ---------- 4b. Connection / disconnect popup ---------- */
  html:not(#_p1):not(#_p2):not(#_p3):not(#_p4):not(#_p5) body:not(.mobile):not(#_p6):not(#_p7) #conn-back #conn-box#conn-box {
    position: relative !important; box-sizing: border-box !important;
    width: 560px !important; height: 225px !important; min-height: 0 !important; max-width: calc(100vw - 24px) !important;
    padding: 48px 34px 54px !important; margin: 0 !important;
    display: flex !important; flex-direction: column !important; align-items: center !important; justify-content: center !important;
    background: url("/icons/chrome-connection.webp") center / 100% 100% no-repeat !important;
    border: 0 !important; border-radius: 0 !important; box-shadow: none !important; outline: 0 !important;
    border-image: none !important;
    filter: drop-shadow(0 10px 22px rgba(0,0,0,.45)) !important;
    color: #1f2c3f !important; text-shadow: none !important;
  }
        html:not(#_p1):not(#_p2):not(#_p3):not(#_p4):not(#_p5) body:not(.mobile):not(#_p6):not(#_p7) #conn-back #conn-box#conn-box > .inner {
    background: none !important; border: 0 !important; box-shadow: none !important;
    width: 100% !important; height: auto !important; margin: 0 !important; padding: 0 12px !important;
    text-align: center !important; overflow: auto !important; max-height: 100% !important;
  }
  html:not(#_p1):not(#_p2):not(#_p3):not(#_p4):not(#_p5) body:not(.mobile):not(#_p6):not(#_p7) #conn-back #conn-box#conn-box > .inner,
  html:not(#_p1):not(#_p2):not(#_p3):not(#_p4):not(#_p5) body:not(.mobile):not(#_p6):not(#_p7) #conn-back #conn-box#conn-box > .inner * {
    color: #1f2c3f !important; text-shadow: 0 1px 0 rgba(255,255,255,.6) !important;
    font-family: "Figtree", "Nunito", sans-serif !important;
  }
  html:not(#_p1):not(#_p2):not(#_p3):not(#_p4):not(#_p5) body:not(.mobile):not(#_p6):not(#_p7) #conn-back #conn-box#conn-box #conn-msg { font-size: 17px !important; font-weight: 700 !important; }
  /* Reconnect sits exactly on the art's pill slot (centre 89.2% down, 21.9% wide) */
  html:not(#_p1):not(#_p2):not(#_p3):not(#_p4):not(#_p5) body:not(.mobile):not(#_p6):not(#_p7) #conn-back #conn-box#conn-box > #conn-go {
    position: absolute !important; left: 50% !important; top: 89.2% !important; right: auto !important; bottom: auto !important;
    transform: translate(-50%, -50%) !important;
    width: 23% !important; min-width: 0 !important; height: 22px !important; margin: 0 !important; padding: 0 !important;
    border-radius: 999px !important; border: 1px solid #154a72 !important;
    background: linear-gradient(180deg, #bfe4fb 0%, #5aaee3 42%, #2b7fbf 52%, #1d5f95 100%) !important;
    color: #fff !important; font: 800 12px/1 "Outfit", "Figtree", sans-serif !important;
    letter-spacing: .1em !important; text-transform: uppercase !important;
    text-shadow: 0 -1px 0 rgba(10,40,70,.7) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.8), 0 1px 3px rgba(15,35,60,.45) !important;
  }
  html:not(#_p1):not(#_p2):not(#_p3):not(#_p4):not(#_p5) body:not(.mobile):not(#_p6):not(#_p7) #conn-back #conn-box#conn-box > #conn-go:hover { filter: brightness(1.1) !important; }
  html:not(#_p1):not(#_p2):not(#_p3):not(#_p4):not(#_p5) body:not(.mobile):not(#_p6):not(#_p7) #conn-back #conn-box#conn-box > #conn-go[style*="display: none"],
  html:not(#_p1):not(#_p2):not(#_p3):not(#_p4):not(#_p5) body:not(.mobile):not(#_p6):not(#_p7) #conn-back #conn-box#conn-box > #conn-go[hidden] { display: none !important; }
}
