/* mobile-game-glass.css
 * Mobile in-game overlays only. Matches the Nov 8 mobile lobby glass.
 * NEVER applies at desktop/PC widths: the whole file is wrapped in the
 * same phone media queries the play pages use to set body.mobile, every
 * selector also requires body.mobile / :has(body.mobile.gameplay-page),
 * and play/*.html loads this file with a matching media attribute.
 * Visual properties only (paint, border, shadow, colour, blur, radius).
 * Does not change lobby or desktop/PC layout.
 */
@media (max-width: 820px) and (hover: none),
       (pointer: coarse) and (hover: none) and (max-width: 1024px) {
  html.v7m:root:has(body.mobile.gameplay-page) #mchat#mchat,
  html:has(body.mobile.gameplay-page) #mchat#mchat,
  html.v7m:root:has(body.mobile.gameplay-page) #mhud#mhud,
  html.v7m:root:has(body.mobile.gameplay-page) #mmenu#mmenu,
  html.v7m:root:has(body.mobile.gameplay-page) #mhelp#mhelp,
  html:has(body.mobile.gameplay-page) body.mobile.gameplay-page #mob-extra,
  html:has(body.mobile.gameplay-page) body.mobile.gameplay-page #play-nav,
  html:has(body.mobile.gameplay-page) body.mobile.gameplay-page #side-chat,
  html:has(body.mobile.gameplay-page) body.mobile.gameplay-page #side-players,
  html:has(body.mobile.gameplay-page) body.mobile.gameplay-page #side-controls {
    --lobby-ink: #edfff6;
    --lobby-muted: #b7d4c8;
    --lobby-surface: rgba(16, 35, 43, .9);
    --lobby-panel-fill: linear-gradient(180deg, rgba(195, 244, 228, .16) 0%, rgba(34, 57, 68, .94) 32%, #10232b 100%);
    --lobby-bezel: linear-gradient(150deg, rgba(173, 240, 217, .55), #07171f, rgba(173, 240, 217, .28));
    --lobby-panel-face: #16313b;
    --lobby-panel-bottom: #10232b;
    --lobby-panel-edge: rgba(173, 240, 217, .48);
    --lobby-panel-bevel-light: rgba(239, 255, 248, .8);
    --lobby-panel-bevel-mid: rgba(22, 50, 42, .85);
    --lobby-panel-bevel-dark: #07171f;
    --lobby-panel-shine: rgba(222, 255, 245, .34);
    --lobby-panel-shadow: rgba(0, 0, 0, .45);
    --lobby-rim: rgba(239, 255, 248, .72);
    --lobby-line: rgba(173, 240, 217, .28);
    --lobby-footer: rgba(8, 20, 26, .42);
    --lobby-chrome-mid: rgba(112, 155, 153, .65);
    --mg-head: linear-gradient(180deg, rgba(222, 255, 245, .34) 0, rgba(170, 225, 212, .16) 46%, rgba(255, 255, 255, 0) 54%, rgba(0, 0, 0, .2) calc(100% - 2px), rgba(3, 12, 17, .85) calc(100% - 2px)), #10232b;
    --mg-foot: linear-gradient(180deg, rgba(0, 0, 0, 0) 0, rgba(0, 0, 0, .26) 4px, rgba(0, 0, 0, 0) 10px, rgba(0, 0, 0, 0) calc(100% - 3px), rgba(170, 230, 212, .12) 100%), #10232b;
    --mg-pane-shadow: inset 0 2px 1px rgba(239, 255, 248, .55), inset 0 -2px 2px rgba(0, 0, 0, .65), inset 1px 0 0 rgba(216, 255, 239, .18), 0 2px 8px rgba(0, 0, 0, .45);
    --chat-player-ink: #edfff6;
    --chat-system-ink: #9ce8a2;
    --chat-self-name-ink: #ffec99;
    --chat-member-ink: #99eef5;
    --chat-whisper-ink: #9fd3ff;
    color: var(--lobby-ink);
  }

  /* Page chrome behind mobile game overlays: dark teal, not v7 light grey */
  html.v7m body.mobile.gameplay-page,
  html:root:root:root:not(#v7a):not(#v7b) body.mobile.gameplay-page,
  html:root:root:root:not(#v7a):not(#v7b) body.mobile.gameplay-page #app {
    background-color: #0b1c24 !important;
    background-image: none !important;
    color: var(--lobby-ink, #edfff6) !important;
  }

  /* ========== #mchat (Players + chat sheet, "back to table" tab) ========== */
  html.v7m:root:has(body.mobile.gameplay-page) #mchat#mchat,
  html:has(body.mobile.gameplay-page) #mchat#mchat {
    background:
      linear-gradient(180deg, rgba(16, 35, 43, .78) 0%, rgba(10, 22, 30, .92) 100%) !important;
    color: var(--lobby-ink) !important;
    backdrop-filter: blur(18px) saturate(1.25) !important;
    -webkit-backdrop-filter: blur(18px) saturate(1.25) !important;
  }

  html.v7m:root:has(body.mobile.gameplay-page) #mchat#mchat .tabs,
  html:has(body.mobile.gameplay-page) #mchat#mchat .tabs {
    background: linear-gradient(180deg, #2c3a4e, #1e2a3a) !important;
    border-bottom: 1px solid rgba(160, 180, 205, .28) !important;
    box-shadow: inset 0 1px 0 rgba(230, 255, 246, .18), inset 0 -1px 0 rgba(0, 0, 0, .45) !important;
  }

  html.v7m:root:has(body.mobile.gameplay-page) #mchat#mchat .tabs button,
  html:has(body.mobile.gameplay-page) #mchat#mchat .tabs button {
    color: #b4c0d3 !important;
    text-shadow: none !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
  }

  html.v7m:root:has(body.mobile.gameplay-page) #mchat#mchat .tabs .game,
  html:has(body.mobile.gameplay-page) #mchat#mchat .tabs .game {
    border-right: 1px solid rgba(160, 180, 205, .28) !important;
    color: #edfff6 !important;
  }

  html.v7m:root:has(body.mobile.gameplay-page) #mchat#mchat .tabs .game svg,
  html:has(body.mobile.gameplay-page) #mchat#mchat .tabs .game svg {
    stroke: #edfff6;
    fill: #edfff6;
    color: #edfff6;
    filter: drop-shadow(0 1px 0 rgba(0, 0, 0, .45));
  }

  html.v7m:root:has(body.mobile.gameplay-page) #mchat#mchat .tabs .pl,
  html:has(body.mobile.gameplay-page) #mchat#mchat .tabs .pl {
    background: linear-gradient(180deg, #6b6440, #3b3826) !important;
    color: #f0d27a !important;
    border: 1px solid #c8b06a !important;
    border-bottom: 0 !important;
    border-radius: 8px 8px 0 0 !important;
    box-shadow: inset 0 1px 0 rgba(255, 236, 180, .45), inset 0 -2px 2px rgba(0, 0, 0, .35) !important;
  }

  html.v7m:root:has(body.mobile.gameplay-page) #mchat#mchat .glass,
  html:has(body.mobile.gameplay-page) #mchat#mchat .glass {
    background: var(--lobby-panel-fill) !important;
    background-color: #10232b !important;
    border: 1px solid rgba(173, 240, 217, .48) !important;
    border-top-color: #c6ffe9 !important;
    border-bottom-color: #06131c !important;
    border-radius: 16px !important;
    box-shadow: var(--mg-pane-shadow) !important;
    backdrop-filter: blur(12px) saturate(1.15) !important;
    -webkit-backdrop-filter: blur(12px) saturate(1.15) !important;
    color: var(--lobby-ink) !important;
    scrollbar-width: thin !important;
    scrollbar-color: #84bca0 #0a1c16 !important;
  }

  html.v7m:root:has(body.mobile.gameplay-page) #mchat#mchat .glass::-webkit-scrollbar,
  html:has(body.mobile.gameplay-page) #mchat#mchat .glass::-webkit-scrollbar {
    width: 8px !important;
    height: 8px !important;
    display: block !important;
  }

  html.v7m:root:has(body.mobile.gameplay-page) #mchat#mchat .glass::-webkit-scrollbar-track,
  html:has(body.mobile.gameplay-page) #mchat#mchat .glass::-webkit-scrollbar-track {
    background: linear-gradient(90deg, #051b13, #133e2c 55%, #061e15) !important;
    border-radius: 8px !important;
  }

  html.v7m:root:has(body.mobile.gameplay-page) #mchat#mchat .glass::-webkit-scrollbar-thumb,
  html:has(body.mobile.gameplay-page) #mchat#mchat .glass::-webkit-scrollbar-thumb {
    background: linear-gradient(90deg, #376a54, #84bca0 48%, #487f64) !important;
    border-radius: 8px !important;
    box-shadow: inset 0 1px 0 rgba(220, 255, 235, .34) !important;
  }

  html.v7m:root:has(body.mobile.gameplay-page) #mchat#mchat #chat-log,
  html.v7m:root:has(body.mobile.gameplay-page) #mchat#mchat #roster-scroll,
  html.v7m:root:has(body.mobile.gameplay-page) #mchat#mchat #roster-play,
  html.v7m:root:has(body.mobile.gameplay-page) #mchat#mchat #roster-watch,
  html:has(body.mobile.gameplay-page) #mchat#mchat #chat-log,
  html:has(body.mobile.gameplay-page) #mchat#mchat #roster-scroll,
  html:has(body.mobile.gameplay-page) #mchat#mchat #roster-play,
  html:has(body.mobile.gameplay-page) #mchat#mchat #roster-watch {
    background: transparent !important;
    color: var(--lobby-ink) !important;
  }

  html.v7m:root:has(body.mobile.gameplay-page) #mchat#mchat .plist-row,
  html:has(body.mobile.gameplay-page) #mchat#mchat .plist-row,
  html.v7m:root:has(body.mobile.gameplay-page) #mchat#mchat .user-row,
  html:has(body.mobile.gameplay-page) #mchat#mchat .user-row {
    background: rgba(255, 255, 255, .035) !important;
    border-bottom: 1px solid rgba(170, 215, 225, .22) !important;
    color: var(--lobby-ink) !important;
  }

  html.v7m:root:has(body.mobile.gameplay-page) #mchat#mchat .plist-row :is(.nm, .nm-txt, .sc, span, div),
  html:has(body.mobile.gameplay-page) #mchat#mchat .plist-row :is(.nm, .nm-txt, .sc, span, div),
  html.v7m:root:has(body.mobile.gameplay-page) #mchat#mchat .user-row :is(.nm, .who, .rt, span, div),
  html:has(body.mobile.gameplay-page) #mchat#mchat .user-row :is(.nm, .who, .rt, span, div) {
    color: var(--lobby-ink) !important;
    text-shadow: 0 1px 1px rgba(0, 0, 0, .55) !important;
  }

  html.v7m:root:has(body.mobile.gameplay-page) #mchat#mchat .plist-row .rt,
  html:has(body.mobile.gameplay-page) #mchat#mchat .plist-row .rt,
  html.v7m:root:has(body.mobile.gameplay-page) #mchat#mchat .user-row .rt,
  html:has(body.mobile.gameplay-page) #mchat#mchat .user-row .rt {
    color: #ffd77a !important;
  }

  html.v7m:root:has(body.mobile.gameplay-page) #mchat#mchat .plist-row.sel,
  html.v7m:root:has(body.mobile.gameplay-page) #mchat#mchat .plist-row.turn.sel,
  html:has(body.mobile.gameplay-page) #mchat#mchat .plist-row.sel {
    background: rgba(100, 180, 140, .18) !important;
    box-shadow: inset 0 0 0 1px rgba(173, 240, 217, .28) !important;
  }

  /* Chat copy: keep lobby/ui-fixes palette, readable on dark glass */
  html.v7m:root:has(body.mobile.gameplay-page) #mchat#mchat #chat-log#chat-log :is(.tx, .tx *, .nm, .nm *),
  html:has(body.mobile.gameplay-page) #mchat#mchat #chat-log#chat-log :is(.tx, .tx *, .nm, .nm *) {
    color: var(--chat-player-ink) !important;
  }

  html.v7m:root:has(body.mobile.gameplay-page) #mchat#mchat #chat-log#chat-log :is(.sys, .sys *, .line.sys, .line.sys *),
  html:has(body.mobile.gameplay-page) #mchat#mchat #chat-log#chat-log :is(.sys, .sys *, .line.sys, .line.sys *),
  html:root:root:root:not(#v7a):not(#v7b) body.mobile.gameplay-page #chat-log#chat-log :is(.sys, .sys *, .line.sys, .line.sys *) {
    color: var(--chat-system-ink, #9ce8a2) !important;
    font-weight: 700 !important;
  }

  html.v7m:root:has(body.mobile.gameplay-page) #mchat#mchat #chat-log#chat-log :is(.nm.me, .nm.me *),
  html:has(body.mobile.gameplay-page) #mchat#mchat #chat-log#chat-log :is(.nm.me, .nm.me *) {
    color: var(--chat-self-name-ink) !important;
  }

  html.v7m:root:has(body.mobile.gameplay-page) #mchat#mchat #chat-log#chat-log :is(.tx.sub, .tx.sub *, .tx.vip, .tx.vip *),
  html:has(body.mobile.gameplay-page) #mchat#mchat #chat-log#chat-log :is(.tx.sub, .tx.sub *, .tx.vip, .tx.vip *) {
    color: var(--chat-member-ink) !important;
  }

  html.v7m:root:has(body.mobile.gameplay-page) #mchat#mchat #chat-log#chat-log :is(.pm-tag, .pm-tag *, .pm-tx, .pm-tx *),
  html:has(body.mobile.gameplay-page) #mchat#mchat #chat-log#chat-log :is(.pm-tag, .pm-tag *, .pm-tx, .pm-tx *) {
    color: var(--chat-whisper-ink) !important;
  }

  html.v7m:root:has(body.mobile.gameplay-page) #mchat#mchat .bar,
  html:has(body.mobile.gameplay-page) #mchat#mchat .bar {
    background: var(--mg-foot) !important;
    border-radius: 16px !important;
    box-shadow: inset 0 1px 0 rgba(180, 235, 220, .12) !important;
  }

  html.v7m:root:has(body.mobile.gameplay-page) #mchat#mchat .bar form,
  html:has(body.mobile.gameplay-page) #mchat#mchat .bar form,
  html.v7m:root:has(body.mobile.gameplay-page) #mchat#mchat #chat-form,
  html:has(body.mobile.gameplay-page) #mchat#mchat #chat-form {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
  }

  html.v7m:root:has(body.mobile.gameplay-page) #mchat#mchat .bar input,
  html.v7m:root:has(body.mobile.gameplay-page) #mchat#mchat #chat-form input,
  html:has(body.mobile.gameplay-page) #mchat#mchat .bar input,
  html:has(body.mobile.gameplay-page) #mchat#mchat #chat-form input {
    background: linear-gradient(180deg, #08141c, #0e222b) !important;
    color: #edfff6 !important;
    border: 1px solid rgba(165, 237, 206, .55) !important;
    border-right-width: 0 !important;
    border-radius: 25px 0 0 25px !important;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, .65) !important;
    caret-color: #edfff6 !important;
  }

  html.v7m:root:has(body.mobile.gameplay-page) #mchat#mchat .bar input::placeholder,
  html:has(body.mobile.gameplay-page) #mchat#mchat .bar input::placeholder {
    color: rgba(183, 212, 200, .72) !important;
    opacity: 1 !important;
  }

  html.v7m:root:has(body.mobile.gameplay-page) #mchat#mchat .bar button,
  html.v7m:root:has(body.mobile.gameplay-page) #mchat#mchat #chat-form button,
  html:has(body.mobile.gameplay-page) #mchat#mchat .bar button,
  html:has(body.mobile.gameplay-page) #mchat#mchat #chat-form button {
    background: linear-gradient(180deg, #314f42, #183227 60%, #11271e) !important;
    color: #c9dfd3 !important;
    border: 1px solid #416b59 !important;
    border-radius: 0 25px 25px 0 !important;
    box-shadow: inset 0 1px 0 rgba(215, 255, 232, .23), inset 0 -2px 2px rgba(0, 0, 0, .38) !important;
    text-shadow: none !important;
    font-weight: 700 !important;
  }

  html.v7m:root:has(body.mobile.gameplay-page) #mchat#mchat #chat-form[data-glass-message="ready"]:not(.locked) button:not(:disabled),
  html.v7m:root:has(body.mobile.gameplay-page) #mchat#mchat .bar form[data-glass-message="ready"]:not(.locked) button:not(:disabled),
  html:has(body.mobile.gameplay-page) #mchat#mchat #chat-form[data-glass-message="ready"]:not(.locked) button:not(:disabled) {
    background: linear-gradient(180deg, #b0f7cd 0%, #6dd89b 22%, #37ac70 64%, #1b7952 100%) !important;
    border-color: #a4f7c3 !important;
    color: #062b1d !important;
    box-shadow: inset 0 2px 1px rgba(236, 255, 243, .9), inset 0 -2px 2px rgba(7, 63, 38, .5), 0 0 8px rgba(55, 222, 132, .55) !important;
  }

  /* ========== Fallback Chat tab: #mob-extra side panels ========== */
  html:root:root:root:not(#v7a):not(#v7b) body.mobile.gameplay-page #mob-extra #side-players,
  html:root:root:root:not(#v7a):not(#v7b) body.mobile.gameplay-page #mob-extra #side-chat,
  html:has(body.mobile.gameplay-page) body.mobile.gameplay-page #mob-extra #side-players,
  html:has(body.mobile.gameplay-page) body.mobile.gameplay-page #mob-extra #side-chat {
    background: var(--lobby-panel-fill) !important;
    background-color: #10232b !important;
    color: var(--lobby-ink) !important;
    border: 1px solid rgba(173, 240, 217, .48) !important;
    border-top-color: #c6ffe9 !important;
    border-bottom-color: #06131c !important;
    border-radius: 16px !important;
    box-shadow: var(--mg-pane-shadow) !important;
    backdrop-filter: blur(12px) saturate(1.15) !important;
    -webkit-backdrop-filter: blur(12px) saturate(1.15) !important;
  }

  html:root:root:root:not(#v7a):not(#v7b) body.mobile.gameplay-page #mob-extra :is(.panel-head, .players-head),
  html:has(body.mobile.gameplay-page) body.mobile.gameplay-page #mob-extra :is(.panel-head, .players-head) {
    background: var(--mg-head) !important;
    color: var(--lobby-ink) !important;
    border: 0 !important;
    box-shadow: none !important;
  }

  html:root:root:root:not(#v7a):not(#v7b) body.mobile.gameplay-page #mob-extra :is(#chat-log, #roster-scroll, #roster-play, #roster-watch, .pane-main),
  html:has(body.mobile.gameplay-page) body.mobile.gameplay-page #mob-extra :is(#chat-log, #roster-scroll, #roster-play, #roster-watch, .pane-main) {
    background: transparent !important;
    color: var(--lobby-ink) !important;
    scrollbar-width: thin !important;
    scrollbar-color: #84bca0 #0a1c16 !important;
  }

  html:root:root:root:not(#v7a):not(#v7b) body.mobile.gameplay-page #mob-extra .plist-row,
  html:has(body.mobile.gameplay-page) body.mobile.gameplay-page #mob-extra .plist-row {
    background: rgba(255, 255, 255, .035) !important;
    border-bottom-color: rgba(170, 215, 225, .22) !important;
    color: var(--lobby-ink) !important;
  }

  html:root:root:root:not(#v7a):not(#v7b) body.mobile.gameplay-page #mob-extra .plist-row :is(.nm, .nm-txt, .sc, .rt, span, div),
  html:has(body.mobile.gameplay-page) body.mobile.gameplay-page #mob-extra .plist-row :is(.nm, .nm-txt, .sc, .rt, span, div) {
    color: var(--lobby-ink) !important;
    text-shadow: 0 1px 1px rgba(0, 0, 0, .55) !important;
  }

  html:root:root:root:not(#v7a):not(#v7b) body.mobile.gameplay-page #mob-extra .plist-row .rt,
  html:has(body.mobile.gameplay-page) body.mobile.gameplay-page #mob-extra .plist-row .rt {
    color: #ffd77a !important;
  }

  html:root:root:root:not(#v7a):not(#v7b) body.mobile.gameplay-page #mob-extra #side-players .dock,
  html:has(body.mobile.gameplay-page) body.mobile.gameplay-page #mob-extra #side-players .dock,
  html:root:root:root:not(#v7a):not(#v7b) body.mobile.gameplay-page #mob-extra #chat-form,
  html:has(body.mobile.gameplay-page) body.mobile.gameplay-page #mob-extra #chat-form {
    background: var(--mg-foot) !important;
    border: 0 !important;
    border-top: 0 !important;
    box-shadow: none !important;
  }

  html:root:root:root:not(#v7a):not(#v7b) body.mobile.gameplay-page #mob-extra #chat-form input,
  html:has(body.mobile.gameplay-page) body.mobile.gameplay-page #mob-extra #chat-form input {
    background: linear-gradient(180deg, #08141c, #0e222b) !important;
    color: #edfff6 !important;
    border: 1px solid rgba(165, 237, 206, .55) !important;
    border-right-width: 0 !important;
    border-radius: 25px 0 0 25px !important;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, .65) !important;
    caret-color: #edfff6 !important;
  }

  html:root:root:root:not(#v7a):not(#v7b) body.mobile.gameplay-page #mob-extra #chat-form button,
  html:has(body.mobile.gameplay-page) body.mobile.gameplay-page #mob-extra #chat-form button {
    background: linear-gradient(180deg, #314f42, #183227 60%, #11271e) !important;
    color: #c9dfd3 !important;
    border: 1px solid #416b59 !important;
    border-radius: 0 25px 25px 0 !important;
    box-shadow: inset 0 1px 0 rgba(215, 255, 232, .23), inset 0 -2px 2px rgba(0, 0, 0, .38) !important;
    text-shadow: none !important;
    font-weight: 700 !important;
  }

  html:root:root:root:not(#v7a):not(#v7b) body.mobile.gameplay-page #mob-extra #chat-log :is(.sys, .sys *, .line.sys, .line.sys *),
  html:has(body.mobile.gameplay-page) body.mobile.gameplay-page #mob-extra #chat-log :is(.sys, .sys *, .line.sys, .line.sys *) {
    color: var(--chat-system-ink, #9ce8a2) !important;
    font-weight: 700 !important;
  }

  /* Play-nav Game / Scores / Chat tabs: lobby olive/slate language */
  html:has(body.mobile.gameplay-page) body.mobile.gameplay-page #play-nav .play-tab,
  html:root:root:root:not(#v7a):not(#v7b) body.mobile.gameplay-page #play-nav .play-tab {
    background: transparent !important;
    color: #b4c0d3 !important;
    border: 0 !important;
    box-shadow: none !important;
    font-weight: 600 !important;
  }

  html:has(body.mobile.gameplay-page) body.mobile.gameplay-page #play-nav .play-tab.on,
  html:root:root:root:not(#v7a):not(#v7b) body.mobile.gameplay-page #play-nav .play-tab.on {
    background: linear-gradient(180deg, #6b6440, #3b3826) !important;
    color: #f0d27a !important;
    border: 1px solid #c8b06a !important;
    box-shadow: inset 0 1px 0 rgba(255, 236, 180, .45) !important;
    font-weight: 800 !important;
  }

  html:has(body.mobile.gameplay-page) body.mobile.gameplay-page #play-nav,
  html:root:root:root:not(#v7a):not(#v7b) body.mobile.gameplay-page #play-nav {
    background: linear-gradient(180deg, #2c3a4e, #1e2a3a) !important;
    border: 1px solid rgba(160, 180, 205, .28) !important;
    border-radius: 12px !important;
    box-shadow: inset 0 1px 0 rgba(230, 255, 246, .14), 0 2px 8px rgba(0, 0, 0, .35) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
  }

  /* Scores / controls sheet */
  html:root:root:root:not(#v7a):not(#v7b) body.mobile.gameplay-page.mp1 #side-controls,
  html:has(body.mobile.gameplay-page) body.mobile.gameplay-page.mp1 #side-controls {
    background: var(--lobby-panel-fill) !important;
    background-color: #10232b !important;
    color: var(--lobby-ink) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
  }

  html:root:root:root:not(#v7a):not(#v7b) body.mobile.gameplay-page.mp1 #side-controls .scorecard,
  html:has(body.mobile.gameplay-page) body.mobile.gameplay-page.mp1 #side-controls .scorecard {
    background: var(--lobby-panel-fill) !important;
    border: 1px solid rgba(173, 240, 217, .4) !important;
    color: var(--lobby-ink) !important;
    box-shadow: var(--mg-pane-shadow) !important;
  }

  /* ========== HUD, corner buttons, menu sheet ========== */
  html.v7m:root:has(body.mobile.gameplay-page) #mhud#mhud {
    color: var(--lobby-ink) !important;
  }

  html.v7m:root:has(body.mobile.gameplay-page) #mhud#mhud .names {
    background: var(--mg-head) !important;
    box-shadow: none !important;
    border-bottom: 1px solid rgba(173, 240, 217, .28) !important;
  }

  html.v7m:root:has(body.mobile.gameplay-page) #mhud#mhud .names span {
    color: var(--lobby-ink) !important;
    text-shadow: 0 1px 1px rgba(0, 0, 0, .55) !important;
  }

  html.v7m:root:has(body.mobile.gameplay-page) #mhud#mhud .names span.on {
    color: #f0d27a !important;
  }

  html.v7m:root:has(body.mobile.gameplay-page) #mhud#mhud .pill {
    background: linear-gradient(180deg, #08141c, #0e222b) !important;
    border: 1px solid rgba(173, 240, 217, .48) !important;
    color: #edfff6 !important;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, .65) !important;
  }

  html.v7m:root:has(body.mobile.gameplay-page) #mhud#mhud .panels {
    background: linear-gradient(180deg, rgba(16, 35, 43, .92), rgba(10, 22, 30, .94)) !important;
    border-bottom: 1px solid rgba(173, 240, 217, .35) !important;
    box-shadow: none !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
  }

  html.v7m:root:has(body.mobile.gameplay-page) #mhud#mhud .pp {
    background: var(--lobby-panel-fill) !important;
    border: 1px solid rgba(173, 240, 217, .4) !important;
    color: var(--lobby-muted) !important;
    box-shadow: inset 0 1px 0 rgba(239, 255, 248, .28), inset 0 -2px 2px rgba(0, 0, 0, .45) !important;
  }

  html.v7m:root:has(body.mobile.gameplay-page) #mhud#mhud .pp.on {
    background: linear-gradient(180deg, #6b6440, #3b3826) !important;
    border-color: #c8b06a !important;
    color: #f0d27a !important;
    text-shadow: 0 1px 1px rgba(0, 0, 0, .45) !important;
    box-shadow: inset 0 1px 0 rgba(255, 236, 180, .45), 0 0 0 1px rgba(200, 176, 106, .35) !important;
  }

  html.v7m:root:has(body.mobile.gameplay-page) #mhud#mhud .pp .st { color: inherit !important; }
  html.v7m:root:has(body.mobile.gameplay-page) #mhud#mhud .pp.on .st { color: #f0d27a !important; }

  html.v7m:root:has(body.mobile.gameplay-page) #mhud#mhud .chip {
    background: var(--lobby-panel-fill) !important;
    border: 1px solid rgba(173, 240, 217, .4) !important;
    border-left: 0 !important;
    color: var(--lobby-ink) !important;
    box-shadow: inset 0 1px 0 rgba(239, 255, 248, .28) !important;
  }

  html.v7m:root:has(body.mobile.gameplay-page) #mhud#mhud .act {
    background: linear-gradient(180deg, #b0f7cd 0%, #6dd89b 22%, #37ac70 64%, #1b7952 100%) !important;
    color: #062b1d !important;
    border: 1px solid #a4f7c3 !important;
    text-shadow: none !important;
    box-shadow: inset 0 2px 1px rgba(236, 255, 243, .9), inset 0 -2px 2px rgba(7, 63, 38, .5) !important;
  }

  html.v7m:root:has(body.mobile.gameplay-page) .mcorner {
    color: #edfff6 !important;
  }

  html.v7m:root:has(body.mobile.gameplay-page) #mc-left {
    background: radial-gradient(circle at 0 100%, rgba(47, 120, 90, .55), rgba(16, 35, 43, .55) 62%, transparent 63%) !important;
  }

  html.v7m:root:has(body.mobile.gameplay-page) #mc-right {
    background: radial-gradient(circle at 100% 100%, rgba(47, 120, 90, .55), rgba(16, 35, 43, .55) 62%, transparent 63%) !important;
  }

  html.v7m:root:has(body.mobile.gameplay-page) #mc-left .wico { color: #edfff6 !important; }

  html.v7m:root:has(body.mobile.gameplay-page) #mc-right .badge {
    box-shadow: 0 0 0 2px #10232b !important;
  }

  html.v7m:root:has(body.mobile.gameplay-page) #mmenu#mmenu {
    background: linear-gradient(180deg, rgba(30, 48, 56, .96), rgba(16, 35, 43, .98)) !important;
    border-top: 2px solid rgba(173, 240, 217, .45) !important;
    color: var(--lobby-ink) !important;
    box-shadow: 0 -8px 24px rgba(0, 0, 0, .45) !important;
    backdrop-filter: blur(16px) saturate(1.15) !important;
    -webkit-backdrop-filter: blur(16px) saturate(1.15) !important;
  }

  html.v7m:root:has(body.mobile.gameplay-page) #mmenu#mmenu button,
  html.v7m:root:has(body.mobile.gameplay-page) #mmenu#mmenu button.w3,
  html.v7m:root:has(body.mobile.gameplay-page) #mmenu#mmenu button.w6 {
    background: var(--lobby-panel-fill) !important;
    color: var(--lobby-ink) !important;
    border-right: 1px solid rgba(173, 240, 217, .22) !important;
    border-bottom: 1px solid rgba(173, 240, 217, .22) !important;
    box-shadow: inset 0 1px 0 rgba(239, 255, 248, .2) !important;
    text-shadow: 0 1px 1px rgba(0, 0, 0, .45) !important;
  }

  html.v7m:root:has(body.mobile.gameplay-page) #mmenu#mmenu button:active {
    background: linear-gradient(180deg, #0e222b, #16313b) !important;
  }

  html.v7m:root:has(body.mobile.gameplay-page) #mmenu#mmenu button:disabled { color: rgba(237, 255, 246, .38) !important; }

  html.v7m:root:has(body.mobile.gameplay-page) #mmenu#mmenu .mh-rrow {
    background: var(--mg-foot) !important;
    color: var(--lobby-ink) !important;
    border-right: 1px solid rgba(173, 240, 217, .22) !important;
    border-bottom: 1px solid rgba(173, 240, 217, .22) !important;
  }

  html.v7m:root:has(body.mobile.gameplay-page) #mhelp#mhelp {
    background: var(--lobby-panel-fill) !important;
    border: 1px solid rgba(173, 240, 217, .5) !important;
    color: var(--lobby-ink) !important;
    box-shadow: var(--mg-pane-shadow) !important;
    backdrop-filter: blur(16px) !important;
    -webkit-backdrop-filter: blur(16px) !important;
  }

  html.v7m:root:has(body.mobile.gameplay-page) #toast {
    background: var(--lobby-panel-fill) !important;
    color: var(--lobby-ink) !important;
    border: 1px solid rgba(173, 240, 217, .48) !important;
    box-shadow: var(--mg-pane-shadow) !important;
  }

  /* ========== In-game Players + Chat: exact mobile lobby pane chrome ==========
   * Ports the final olive-tabs / lobby-glass-screenshot.css paint (Nov 8, 21:21)
   * onto #mchat panes. Visual tokens, box-shadows, frames, gold scrollbar and
   * green arrow buttons are copied, not approximated. Layout only: two half-
   * height panes stacked under the existing tab bar. Desktop is excluded by
   * the file media query and body.mobile.gameplay-page + #mchat.
   */
  /* 20261110m: never force the players/chat sheet visible. display:flex !important
     was beating #mchat[hidden]{display:none} (no !important, lower specificity),
     so the empty overlay covered the table on every mobile game load and blocked join. */
  html:not(#_mg1):not(#_mg2):not(#_mg3):has(body.mobile.gameplay-page) #mchat#mchat:not([hidden]) {
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
    inset: 0 !important;
  }
  html:not(#_mg1):not(#_mg2):not(#_mg3):has(body.mobile.gameplay-page) #mchat#mchat[hidden] {
    display: none !important;
  }
  html:not(#_mg1):not(#_mg2):not(#_mg3):has(body.mobile.gameplay-page) #mchat#mchat .mg-stack {
    flex: 1 1 0 !important;
    height: 0 !important;
    min-height: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    padding: 8px !important;
    box-sizing: border-box !important;
  }
  html:not(#_mg1):not(#_mg2):not(#_mg3):has(body.mobile.gameplay-page) #mchat#mchat .pane {
    position: relative !important;
    flex: 1 1 0 !important;
    height: 0 !important;
    min-height: 0 !important;
    display: flex !important;
    flex-direction: row !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    background: #10232b !important;
    background-image: none !important;
    border: 0 !important;
    border-radius: 16px !important;
    box-shadow: none !important;
    color: #edfff6 !important;
  }
  html:not(#_mg1):not(#_mg2):not(#_mg3):has(body.mobile.gameplay-page) #mchat#mchat .pane > .pane-main {
    display: flex !important;
    flex-direction: column !important;
    flex: 0 0 calc(100% - 18px) !important;
    width: calc(100% - 18px) !important;
    max-width: calc(100% - 18px) !important;
    min-width: 0 !important;
    height: 100% !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 0 0 18px !important;
    gap: 0 !important;
    box-sizing: border-box !important;
    border: 0 !important;
    border-radius: 16px 0 0 16px !important;
    overflow: hidden !important;
    background: linear-gradient(180deg, rgba(222,255,245,.34) 0, rgba(170,225,212,.16) 20.24px, rgba(255,255,255,0) 23.76px, rgba(0,0,0,.156) 38px, rgba(0,0,0,0) 44px) left top / 18px 44px no-repeat, linear-gradient(180deg, rgba(0,0,0,0) 0, rgba(0,0,0,.26) 4px, rgba(0,0,0,0) 10px, rgba(0,0,0,0) calc(100% - 3px), rgba(170,230,212,.12) 100%) left bottom / 18px 56px no-repeat, linear-gradient(#10232b, #10232b) left top / 18px 100% no-repeat !important;
    box-shadow: none !important;
  }
  html:not(#_mg1):not(#_mg2):not(#_mg3):has(body.mobile.gameplay-page) #mchat#mchat .pane > .pane-main > :is(.pane-head, .glass, .tools, .bar, #chat-form, #roster-scroll, #chat-log) {
    margin: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    align-self: stretch !important;
  }
  html:not(#_mg1):not(#_mg2):not(#_mg3):has(body.mobile.gameplay-page) #mchat#mchat .pane .pane-head {
    height: 44px !important;
    min-height: 44px !important;
    flex: 0 0 44px !important;
    margin: 0 !important;
    padding: 0 8px !important;
    display: grid !important;
    align-items: center !important;
    background: linear-gradient(180deg, rgba(222,255,245,.34) 0, rgba(170,225,212,.16) 46%, rgba(255,255,255,0) 54%, rgba(0,0,0,.2) calc(100% - 2px), rgba(3,12,17,.85) calc(100% - 2px)), #10232b !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: inset 0 2px 0 rgba(226,255,246,.62) !important;
    color: #ffd877 !important;
    text-shadow: 0 1px 0 rgba(0, 36, 64, .55) !important;
    z-index: 2 !important;
  }
  html:not(#_mg1):not(#_mg2):not(#_mg3):has(body.mobile.gameplay-page) #mchat#mchat .pane .pane-head :is(.ttl, .sort-h) {
    color: #ffd877 !important;
    font: 700 13px/1.2 Tahoma, "Segoe UI", sans-serif !important;
    text-shadow: 0 1px 0 rgba(0, 36, 64, .55) !important;
    text-decoration: none !important;
  }
  html:not(#_mg1):not(#_mg2):not(#_mg3):has(body.mobile.gameplay-page) #mchat#mchat #mg-players-pane .pane-head.players-head {
    grid-template-columns: 36px 30px minmax(0, 1fr) 52px !important;
    gap: 0 4px !important;
    padding-left: 8px !important;
    padding-right: 8px !important;
  }
  html:not(#_mg1):not(#_mg2):not(#_mg3):has(body.mobile.gameplay-page) #mchat#mchat #mg-players-pane .players-head .sort-h[data-label="Rating"],
  html:not(#_mg1):not(#_mg2):not(#_mg3):has(body.mobile.gameplay-page) #mchat#mchat #mg-players-pane .players-head .sort-h:last-child {
    justify-self: stretch !important;
    text-align: center !important;
    grid-column: 4 !important;
  }
  html:not(#_mg1):not(#_mg2):not(#_mg3):has(body.mobile.gameplay-page) #mchat#mchat .pane .glass {
    flex: 1 1 0 !important;
    min-height: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    background: transparent !important;
    background-image: none !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
  html:not(#_mg1):not(#_mg2):not(#_mg3):has(body.mobile.gameplay-page) #mchat#mchat .pane :is(#roster-scroll, #chat-log, #roster-play, #roster-watch) {
    flex: 1 1 0 !important;
    min-height: 0 !important;
    height: auto !important;
    max-height: none !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    padding: 0 !important;
    margin: 0 !important;
    background: radial-gradient(circle at 50% 0%, #16313b 0%, #10232b 55%, #0b1c24 100%) !important;
    background-image: none !important;
    background-color: #10232b !important;
    border: 1px solid rgba(170,215,225,.3) !important;
    border-top: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    color: #edfff6 !important;
    scrollbar-width: none !important;
  }
  html:not(#_mg1):not(#_mg2):not(#_mg3):has(body.mobile.gameplay-page) #mchat#mchat .pane :is(#roster-scroll, #chat-log)::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
  }
  html:not(#_mg1):not(#_mg2):not(#_mg3):has(body.mobile.gameplay-page) #mchat#mchat .pane .plist-row {
    display: grid !important;
    grid-template-columns: 36px 30px minmax(0, 1fr) 52px !important;
    gap: 0 4px !important;
    align-items: center !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 6px 8px !important;
    box-sizing: border-box !important;
    background: transparent !important;
    border: 0 !important;
    border-bottom: 1px solid rgba(190, 225, 245, .38) !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    color: #edfff6 !important;
    min-height: 36px !important;
  }
  html:not(#_mg1):not(#_mg2):not(#_mg3):has(body.mobile.gameplay-page) #mchat#mchat .pane .plist-row :is(.nm, .nm-txt, .sc, .rt) {
    color: #edfff6 !important;
    text-shadow: none !important;
  }
  html:not(#_mg1):not(#_mg2):not(#_mg3):has(body.mobile.gameplay-page) #mchat#mchat .pane .plist-row .rt {
    color: #ffd877 !important;
    font-weight: 700 !important;
    text-align: center !important;
    justify-self: stretch !important;
  }
  html:not(#_mg1):not(#_mg2):not(#_mg3):has(body.mobile.gameplay-page) #mchat#mchat .pane .plist-row.sel {
    background: rgba(6, 28, 48, .55) !important;
  }
  html:not(#_mg1):not(#_mg2):not(#_mg3):has(body.mobile.gameplay-page) #mchat#mchat .pane #chat-log,
  html:not(#_mg1):not(#_mg2):not(#_mg3):has(body.mobile.gameplay-page) #mchat#mchat .pane #chat-log * {
    color: #edfff6 !important;
  }
  html:not(#_mg1):not(#_mg2):not(#_mg3):has(body.mobile.gameplay-page) #mchat#mchat .pane #chat-log :is(.sys, .sys *) {
    color: #9ce8a2 !important;
  }
  html:not(#_mg1):not(#_mg2):not(#_mg3):has(body.mobile.gameplay-page) #mchat#mchat .pane #chat-log :is(.nm.me, .nm.me *) {
    color: #ffec99 !important;
  }

  /* Footer bars */
  html:not(#_mg1):not(#_mg2):not(#_mg3):has(body.mobile.gameplay-page) #mchat#mchat .pane :is(.tools, .bar, #chat-form) {
    height: 56px !important;
    min-height: 56px !important;
    flex: 0 0 56px !important;
    margin: 0 !important;
    padding: 3px 8px 5px !important;
    display: flex !important;
    align-items: center !important;
    box-sizing: border-box !important;
    background: linear-gradient(180deg, rgba(0,0,0,0) 0, rgba(0,0,0,.26) 4px, rgba(0,0,0,0) 10px, rgba(0,0,0,0) calc(100% - 3px), rgba(170,230,212,.12) 100%), #10232b !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    color: #edfff6 !important;
  }
  html:not(#_mg1):not(#_mg2):not(#_mg3):has(body.mobile.gameplay-page) #mchat#mchat #mg-players-pane .tools {
    justify-content: flex-start !important;
    gap: 6px !important;
    column-gap: 6px !important;
    margin-left: -18px !important;
    width: calc(100% + 18px) !important;
    max-width: calc(100% + 18px) !important;
    padding-left: 6px !important;
  }
  html:not(#_mg1):not(#_mg2):not(#_mg3):has(body.mobile.gameplay-page) #mchat#mchat #mg-players-pane .tools :is(.dock-carve, .tool-carve) {
    display: none !important;
  }
  html:not(#_mg1):not(#_mg2):not(#_mg3):has(body.mobile.gameplay-page) #mchat#mchat #mg-players-pane .tools .dock,
  html:not(#_mg1):not(#_mg2):not(#_mg3):has(body.mobile.gameplay-page) #mchat#mchat #mg-players-pane .tools .dock-pair {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    background: none !important;
    border: 0 !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
  }
  html:not(#_mg1):not(#_mg2):not(#_mg3):has(body.mobile.gameplay-page) #mchat#mchat #mg-players-pane .tools :is(button, .round, .round-btn) {
    flex: 0 0 auto !important;
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    min-height: 36px !important;
    margin: 0 !important;
    padding: 0 !important;
    border-radius: 50% !important;
    background: linear-gradient(180deg, rgba(255,255,255,.42) 0, rgba(255,255,255,.1) 46%, rgba(255,255,255,0) 52%), linear-gradient(180deg, #5fbf8a 0%, #2b8a5a 55%, #155c3b 100%) !important;
    border: 1px solid rgba(150,230,190,.55) !important;
    box-shadow: inset 0 1px 0 rgba(240,255,248,.6), inset 0 -2px 2px rgba(0,28,16,.45), 0 1px 2px rgba(0,0,0,.45) !important;
    color: #effff6 !important;
  }
  html:not(#_mg1):not(#_mg2):not(#_mg3):has(body.mobile.gameplay-page) #mchat#mchat #mg-players-pane .tools :is(button, .round, .round-btn) img {
    width: 22px !important;
    height: 22px !important;
    object-fit: contain !important;
  }
  html:not(#_mg1):not(#_mg2):not(#_mg3):has(body.mobile.gameplay-page) #mchat#mchat #mg-chat-pane .bar,
  html:not(#_mg1):not(#_mg2):not(#_mg3):has(body.mobile.gameplay-page) #mchat#mchat #mg-chat-pane #chat-form {
    justify-content: flex-start !important;
    gap: 0 !important;
    column-gap: 0 !important;
  }
  html:not(#_mg1):not(#_mg2):not(#_mg3):has(body.mobile.gameplay-page) #mchat#mchat #mg-chat-pane #chat-form {
    width: 100% !important;
    background: transparent !important;
    padding: 0 !important;
    border: 0 !important;
    box-shadow: none !important;
    height: 38px !important;
    min-height: 38px !important;
    flex: 1 1 auto !important;
    position: static !important;
  }
  html:not(#_mg1):not(#_mg2):not(#_mg3):has(body.mobile.gameplay-page) #mchat#mchat #mg-chat-pane :is(.bar input, #chat-form input, #game-chat-input) {
    flex: 1 1 0 !important;
    min-width: 0 !important;
    width: auto !important;
    height: 38px !important;
    min-height: 38px !important;
    max-height: 38px !important;
    margin: 0 !important;
    padding: 0 12px !important;
    box-sizing: border-box !important;
    border: 1px solid rgba(150,230,190,.55) !important;
    border-right-width: 0 !important;
    border-radius: 25px 0 0 25px !important;
    background: linear-gradient(180deg, #08141c, #0e222b) !important;
    color: #edfff6 !important;
    box-shadow: inset 0 2px 4px rgba(0,0,0,.65) !important;
    outline: 0 !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    font-size: 15px !important;
  }
  html:not(#_mg1):not(#_mg2):not(#_mg3):has(body.mobile.gameplay-page) #mchat#mchat #mg-chat-pane :is(.bar button, #chat-form button) {
    flex: 0 0 auto !important;
    min-width: 68px !important;
    width: auto !important;
    height: 38px !important;
    min-height: 38px !important;
    max-height: 38px !important;
    margin: 0 !important;
    padding: 0 14px !important;
    position: static !important;
    border: 1px solid rgba(150,230,190,.55) !important;
    border-radius: 0 25px 25px 0 !important;
    background: linear-gradient(180deg, rgba(255,255,255,.42) 0, rgba(255,255,255,.1) 46%, rgba(255,255,255,0) 52%), linear-gradient(180deg, #5fbf8a 0%, #2b8a5a 55%, #155c3b 100%) !important;
    color: #effff6 !important;
    text-shadow: 0 1px 1px rgba(0,30,16,.6) !important;
    box-shadow: inset 0 1px 0 rgba(240,255,248,.6), inset 0 -2px 2px rgba(0,28,16,.45), 0 1px 2px rgba(0,0,0,.45) !important;
    font-weight: 700 !important;
    filter: none !important;
    opacity: 1 !important;
  }
  html:not(#_mg1):not(#_mg2):not(#_mg3):has(body.mobile.gameplay-page) #mchat#mchat #mg-chat-pane #chat-form[data-glass-message="ready"]:not(.locked) button:not(:disabled) {
    background: linear-gradient(180deg, rgba(255,255,255,.42) 0, rgba(255,255,255,.1) 46%, rgba(255,255,255,0) 52%), linear-gradient(180deg, #ffe58a 0%, #f4c430 55%, #d99a12 100%) !important;
    border-color: #ffe9a6 !important;
    color: #3a2600 !important;
    text-shadow: 0 1px 0 rgba(255,245,210,.6) !important;
    box-shadow: inset 0 1px 0 rgba(255,250,225,.75), inset 0 -2px 2px rgba(110,70,0,.45), 0 0 6px rgba(244,196,48,.45) !important;
  }

  /* Right scroll rail — same 26px column, 18px painted strip, 23px green arrows, gold track */
  html:not(#_mg1):not(#_mg2):not(#_mg3):has(body.mobile.gameplay-page) #mchat#mchat .pane > .sb-col {
    position: absolute !important;
    inset: auto !important;
    left: auto !important;
    right: 0 !important;
    top: 0 !important;
    bottom: 0 !important;
    width: 26px !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    z-index: 4 !important;
    display: block !important;
    --sb-up-center: 22px !important;
    --sb-down-center: calc(100% - 28px) !important;
    --sb-track-top: 44px !important;
    --sb-track-bottom: 56px !important;
    background: linear-gradient(180deg, rgba(222,255,245,.34) 0, rgba(170,225,212,.16) 20.24px, rgba(255,255,255,0) 23.76px, rgba(0,0,0,.156) 38px, rgba(0,0,0,0) 44px) right top / 18px 44px no-repeat, linear-gradient(180deg, rgba(0,0,0,0) 0, rgba(0,0,0,.26) 4px, rgba(0,0,0,0) 10px, rgba(0,0,0,0) calc(100% - 3px), rgba(170,230,212,.12) 100%) right bottom / 18px 56px no-repeat, linear-gradient(#10232b, #10232b) right top / 18px 100% no-repeat !important;
    border: 0 !important;
    border-left: 0 !important;
    border-radius: 0 16px 16px 0 !important;
    box-shadow: none !important;
    pointer-events: none !important;
  }
  html:not(#_mg1):not(#_mg2):not(#_mg3):has(body.mobile.gameplay-page) #mchat#mchat .pane > .sb-col :is(.sb-slot, .sb-btn, .sb-track, .sb-thumb) {
    pointer-events: auto !important;
  }
  html:not(#_mg1):not(#_mg2):not(#_mg3):has(body.mobile.gameplay-page) #mchat#mchat .pane .sb-col .sb-slot {
    position: absolute !important;
    left: 1px !important;
    right: auto !important;
    width: 25px !important;
    height: 25px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 50% !important;
    background: radial-gradient(circle at 50% 60%, #050c10 0%, #08151b 70%, #0d1e25 100%) !important;
    box-shadow: inset 0 2px 3px rgba(0,0,0,.8), inset 0 -1px 0 rgba(170,230,212,.2) !important;
    display: block !important;
    transform: none !important;
  }
  html:not(#_mg1):not(#_mg2):not(#_mg3):has(body.mobile.gameplay-page) #mchat#mchat .pane .sb-col .sb-slot-up {
    top: calc(var(--sb-up-center) - 12.5px) !important;
    bottom: auto !important;
  }
  html:not(#_mg1):not(#_mg2):not(#_mg3):has(body.mobile.gameplay-page) #mchat#mchat .pane .sb-col .sb-slot-down {
    top: calc(var(--sb-down-center) - 12.5px) !important;
    bottom: auto !important;
  }
  html:not(#_mg1):not(#_mg2):not(#_mg3):has(body.mobile.gameplay-page) #mchat#mchat .pane .sb-col .sb-btn,
  html:not(#_mg1):not(#_mg2):not(#_mg3):has(body.mobile.gameplay-page) #mchat#mchat .pane .sb-col .sb-slot > .sb-btn {
    position: absolute !important;
    inset: auto !important;
    left: 1px !important;
    top: 1px !important;
    width: 23px !important;
    height: 23px !important;
    min-width: 23px !important;
    min-height: 23px !important;
    margin: 0 !important;
    padding: 0 !important;
    border-radius: 50% !important;
    background: radial-gradient(circle at 50% 22%, rgba(255,255,255,.55) 0, rgba(255,255,255,0) 45%), radial-gradient(circle at 50% 35%, #5fbf8a 0%, #2b8a5a 55%, #155c3b 100%) !important;
    border: 1px solid rgba(150,230,190,.6) !important;
    box-shadow: inset 0 1px 0 rgba(240,255,248,.6), inset 0 -1px 1px rgba(0,28,16,.55), 0 1px 1px rgba(0,0,0,.6) !important;
    color: transparent !important;
    font-size: 0 !important;
    filter: none !important;
    display: block !important;
  }
  html:not(#_mg1):not(#_mg2):not(#_mg3):has(body.mobile.gameplay-page) #mchat#mchat .pane .sb-col > .sb-up {
    left: 2px !important;
    top: calc(var(--sb-up-center) - 11.5px) !important;
  }
  html:not(#_mg1):not(#_mg2):not(#_mg3):has(body.mobile.gameplay-page) #mchat#mchat .pane .sb-col > .sb-down {
    left: 2px !important;
    top: calc(var(--sb-down-center) - 11.5px) !important;
  }
  html:not(#_mg1):not(#_mg2):not(#_mg3):has(body.mobile.gameplay-page) #mchat#mchat .pane .sb-col .sb-btn::before {
    content: "" !important;
    display: block !important;
    position: absolute !important;
    left: 50% !important;
    top: 50% !important;
    width: 7px !important;
    height: 7px !important;
    margin: 0 !important;
    background: none !important;
    border: solid #ffd75e !important;
    border-width: 2px 0 0 2px !important;
    box-shadow: none !important;
    filter: drop-shadow(0 1px 0 rgba(0,0,0,.6)) !important;
  }
  html:not(#_mg1):not(#_mg2):not(#_mg3):has(body.mobile.gameplay-page) #mchat#mchat .pane .sb-col .sb-up::before,
  html:not(#_mg1):not(#_mg2):not(#_mg3):has(body.mobile.gameplay-page) #mchat#mchat .pane .sb-col .sb-slot-up .sb-btn::before {
    transform: translate(-50%, -25%) rotate(45deg) !important;
  }
  html:not(#_mg1):not(#_mg2):not(#_mg3):has(body.mobile.gameplay-page) #mchat#mchat .pane .sb-col .sb-down::before,
  html:not(#_mg1):not(#_mg2):not(#_mg3):has(body.mobile.gameplay-page) #mchat#mchat .pane .sb-col .sb-slot-down .sb-btn::before {
    transform: translate(-50%, -75%) rotate(225deg) !important;
  }
  html:not(#_mg1):not(#_mg2):not(#_mg3):has(body.mobile.gameplay-page) #mchat#mchat .pane .sb-col .sb-btn::after {
    content: none !important;
    display: none !important;
  }
  html:not(#_mg1):not(#_mg2):not(#_mg3):has(body.mobile.gameplay-page) #mchat#mchat .pane .sb-col .sb-btn.sb-pressed:not(:disabled),
  html:not(#_mg1):not(#_mg2):not(#_mg3):has(body.mobile.gameplay-page) #mchat#mchat .pane .sb-col .sb-btn:active:not(:disabled) {
    background: radial-gradient(circle at 50% 22%, rgba(255,255,255,.5) 0, rgba(255,255,255,0) 45%), radial-gradient(circle at 50% 35%, #ffe58a 0%, #f4c430 55%, #d99a12 100%) !important;
    border-color: #ffe9a6 !important;
    box-shadow: inset 0 1px 2px rgba(110,70,0,.5), 0 0 4px rgba(244,196,48,.5) !important;
    filter: none !important;
  }
  html:not(#_mg1):not(#_mg2):not(#_mg3):has(body.mobile.gameplay-page) #mchat#mchat .pane .sb-col .sb-btn.sb-pressed:not(:disabled)::before,
  html:not(#_mg1):not(#_mg2):not(#_mg3):has(body.mobile.gameplay-page) #mchat#mchat .pane .sb-col .sb-btn:active:not(:disabled)::before {
    border-color: #4a3000 !important;
    filter: none !important;
  }
  html:not(#_mg1):not(#_mg2):not(#_mg3):has(body.mobile.gameplay-page) #mchat#mchat .pane .sb-col .sb-track {
    position: absolute !important;
    left: 14px !important;
    right: auto !important;
    width: 6px !important;
    top: var(--sb-track-top, 44px) !important;
    bottom: var(--sb-track-bottom, 56px) !important;
    height: auto !important;
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
    border-radius: 6px !important;
    background: linear-gradient(90deg, #050e12, #0b1a20 55%, #050e12) !important;
    border: 1px solid rgba(217,154,18,.6) !important;
    box-shadow: inset 0 1px 2px rgba(0,0,0,.7) !important;
  }
  html:not(#_mg1):not(#_mg2):not(#_mg3):has(body.mobile.gameplay-page) #mchat#mchat .pane .sb-col .sb-thumb {
    position: absolute !important;
    left: 0 !important;
    right: 0 !important;
    width: auto !important;
    margin: 0 !important;
    border: 0 !important;
    border-radius: 5px !important;
    background: linear-gradient(90deg, #d99a12, #ffe58a 45%, #f4c430 70%, #d99a12) !important;
    box-shadow: inset 0 1px 0 rgba(255,250,225,.7), 0 0 3px rgba(244,196,48,.45) !important;
  }

  /* Frame corner / side highlights — same ::before/::after as the lobby pane */
  html:not(#_mg1):not(#_mg2):not(#_mg3):has(body.mobile.gameplay-page) #mchat#mchat .pane::before {
    content: "" !important;
    display: block !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: auto !important;
    width: 18px !important;
    height: 44px !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    background: none !important;
    box-shadow: none !important;
    border-top: 2px solid rgba(226,255,246,.62) !important;
    border-left: 2px solid rgba(226,255,246,.62) !important;
    border-right: 0 !important;
    border-bottom: 0 !important;
    border-radius: 16px 0 0 0 !important;
    pointer-events: none !important;
    z-index: 3 !important;
  }
  html:not(#_mg1):not(#_mg2):not(#_mg3):has(body.mobile.gameplay-page) #mchat#mchat .pane::after {
    content: "" !important;
    display: block !important;
    position: absolute !important;
    top: 44px !important;
    bottom: 0 !important;
    left: 0 !important;
    right: auto !important;
    width: 18px !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    background: none !important;
    box-shadow: none !important;
    border-top: 0 !important;
    border-bottom: 0 !important;
    border-left: 1px solid rgba(226,255,246,.45) !important;
    border-right: 0 !important;
    border-radius: 0 0 0 16px !important;
    pointer-events: none !important;
    z-index: 3 !important;
  }
  html:not(#_mg1):not(#_mg2):not(#_mg3):has(body.mobile.gameplay-page) #mchat#mchat .pane > .sb-col::before {
    content: "" !important;
    display: block !important;
    position: absolute !important;
    top: 0 !important;
    right: 0 !important;
    left: auto !important;
    width: 18px !important;
    height: 44px !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    background: none !important;
    box-shadow: none !important;
    border-top: 2px solid rgba(226,255,246,.62) !important;
    border-right: 2px solid rgba(226,255,246,.62) !important;
    border-left: 0 !important;
    border-bottom: 0 !important;
    border-radius: 0 16px 0 0 !important;
    pointer-events: none !important;
    z-index: 0 !important;
  }
  html:not(#_mg1):not(#_mg2):not(#_mg3):has(body.mobile.gameplay-page) #mchat#mchat .pane > .sb-col::after {
    content: "" !important;
    display: block !important;
    position: absolute !important;
    top: 44px !important;
    bottom: 0 !important;
    right: 0 !important;
    left: auto !important;
    width: 18px !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    background: none !important;
    box-shadow: none !important;
    border-top: 0 !important;
    border-bottom: 0 !important;
    border-right: 1px solid rgba(226,255,246,.45) !important;
    border-left: 0 !important;
    border-radius: 0 0 16px 0 !important;
    pointer-events: none !important;
    z-index: -1 !important;
  }

  /* Keep the existing tab bar (rack / Snookaball table + Players), olive/gold like lobby nav */
  html:not(#_mg1):not(#_mg2):not(#_mg3):has(body.mobile.gameplay-page) #mchat#mchat .tabs {
    background: linear-gradient(180deg, #2c3a4e, #1e2a3a) !important;
    border-bottom: 1px solid rgba(160,180,205,.28) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 4px 10px -6px rgba(0,0,0,.5) !important;
  }
  html:not(#_mg1):not(#_mg2):not(#_mg3):has(body.mobile.gameplay-page) #mchat#mchat .tabs .pl {
    background: linear-gradient(180deg, #6b6440 0%, #4f4a30 52%, #3b3826 100%) !important;
    border: 1px solid #c8b06a !important;
    color: #f0d27a !important;
    box-shadow: inset 0 1px 0 rgba(255,240,190,.25), 0 1px 2px rgba(0,0,0,.45) !important;
    text-shadow: 0 1px 1px rgba(0,0,0,.5) !important;
    border-radius: 999px !important;
    margin: 6px 8px 6px 0 !important;
  }
  html:not(#_mg1):not(#_mg2):not(#_mg3):has(body.mobile.gameplay-page) #mchat#mchat .tabs .game {
    color: #b4c0d3 !important;
    background: transparent !important;
    box-shadow: none !important;
    text-shadow: none !important;
  }


  /* Nov 10 mobile pane tweaks: chat inset, arrows 4px left, Send gap,
     Rating 4px left, lobby username icons, even footer + lobby button art */
  html:not(#_mg1):not(#_mg2):not(#_mg3):has(body.mobile.gameplay-page) #mchat#mchat #mg-chat-pane :is(#chat-log, #chat-log.clog) {
    padding: 8px 8px 7px !important;
    box-sizing: border-box !important;
  }
  html:not(#_mg1):not(#_mg2):not(#_mg3):has(body.mobile.gameplay-page) #mchat#mchat #mg-chat-pane #chat-log > * {
    margin: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    text-indent: 0 !important;
  }
  html:not(#_mg1):not(#_mg2):not(#_mg3):has(body.mobile.gameplay-page) #mchat#mchat #mg-chat-pane #chat-log > * + * {
    margin-top: 2px !important;
  }

  html:not(#_mg1):not(#_mg2):not(#_mg3):has(body.mobile.gameplay-page) #mchat#mchat .pane .sb-col .sb-slot {
    left: -3px !important;
  }
  html:not(#_mg1):not(#_mg2):not(#_mg3):has(body.mobile.gameplay-page) #mchat#mchat .pane .sb-col > .sb-up,
  html:not(#_mg1):not(#_mg2):not(#_mg3):has(body.mobile.gameplay-page) #mchat#mchat .pane .sb-col > .sb-down {
    left: -2px !important;
  }

  html:not(#_mg1):not(#_mg2):not(#_mg3):has(body.mobile.gameplay-page) #mchat#mchat #mg-chat-pane .bar {
    padding-right: 14px !important;
  }

  html:not(#_mg1):not(#_mg2):not(#_mg3):has(body.mobile.gameplay-page) #mchat#mchat #mg-players-pane .players-head .sort-h[data-label="Rating"],
  html:not(#_mg1):not(#_mg2):not(#_mg3):has(body.mobile.gameplay-page) #mchat#mchat #mg-players-pane .players-head .sort-h:last-child,
  html:not(#_mg1):not(#_mg2):not(#_mg3):has(body.mobile.gameplay-page) #mchat#mchat #mg-players-pane .plist-row .rt {
    transform: translateX(-4px) !important;
  }

  html:not(#_mg1):not(#_mg2):not(#_mg3):has(body.mobile.gameplay-page) #mchat#mchat #mg-players-pane .pane-head.players-head,
  html:not(#_mg1):not(#_mg2):not(#_mg3):has(body.mobile.gameplay-page) #mchat#mchat #mg-players-pane .plist-row {
    grid-template-columns: 44px 30px minmax(0, 1fr) 52px !important;
  }
  html:not(#_mg1):not(#_mg2):not(#_mg3):has(body.mobile.gameplay-page) #mchat#mchat #mg-players-pane .plist-row {
    overflow: visible !important;
  }
  html:not(#_mg1):not(#_mg2):not(#_mg3):has(body.mobile.gameplay-page) #mchat#mchat #mg-players-pane .plist-row .client-cell {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    overflow: visible !important;
    min-width: 0 !important;
  }
  html:not(#_mg1):not(#_mg2):not(#_mg3):has(body.mobile.gameplay-page) #mchat#mchat #mg-players-pane .plist-row .client {
    position: relative !important;
    display: block !important;
    width: 23px !important;
    height: 23px !important;
    margin: 0 0 0 12px !important;
    overflow: visible !important;
    flex: 0 0 23px !important;
  }
  html:not(#_mg1):not(#_mg2):not(#_mg3):has(body.mobile.gameplay-page) #mchat#mchat #mg-players-pane .plist-row .client .face {
    display: block !important;
    width: 23px !important;
    height: 23px !important;
    object-fit: contain !important;
  }
  html:not(#_mg1):not(#_mg2):not(#_mg3):has(body.mobile.gameplay-page) #mchat#mchat #mg-players-pane .plist-row .client :is(img.rk, .rk):is(.rk-admin, .rk-mod, .rk-vip, .rk-sub) {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    margin: 0 !important;
    transform: translate(-40%, -35%) !important;
    z-index: 3 !important;
    object-fit: contain !important;
    display: block !important;
  }
  html:not(#_mg1):not(#_mg2):not(#_mg3):has(body.mobile.gameplay-page) #mchat#mchat #mg-players-pane .plist-row .client :is(img.rk, .rk):is(.rk-vip, .rk-sub) {
    width: 15px !important;
    height: 15px !important;
    min-width: 0 !important;
    min-height: 0 !important;
    max-width: 15px !important;
    max-height: 15px !important;
  }
  html:not(#_mg1):not(#_mg2):not(#_mg3):has(body.mobile.gameplay-page) #mchat#mchat #mg-players-pane .plist-row .client :is(img.rk, .rk):is(.rk-admin, .rk-mod) {
    width: 13.5px !important;
    height: 13.5px !important;
    min-width: 0 !important;
    min-height: 0 !important;
    max-width: 13.5px !important;
    max-height: 13.5px !important;
  }
  html:not(#_mg1):not(#_mg2):not(#_mg3):has(body.mobile.gameplay-page) #mchat#mchat #mg-players-pane .plist-row .client .dnd-mark {
    position: absolute !important;
    left: 100% !important;
    top: 50% !important;
    width: 16px !important;
    height: 16px !important;
    transform: translate(-50%, -50%) !important;
    z-index: 4 !important;
    object-fit: contain !important;
  }
  html:not(#_mg1):not(#_mg2):not(#_mg3):has(body.mobile.gameplay-page) #mchat#mchat #mg-players-pane .plist-row .client .corner-badge {
    position: absolute !important;
    top: 100% !important;
    width: 13px !important;
    height: 13px !important;
    z-index: 4 !important;
    transform: translate(-50%, -60%) !important;
    object-fit: contain !important;
  }
  html:not(#_mg1):not(#_mg2):not(#_mg3):has(body.mobile.gameplay-page) #mchat#mchat #mg-players-pane .plist-row .client .corner-badge.is-mute {
    left: 100% !important;
    width: 15px !important;
    height: 15px !important;
  }
  html:not(#_mg1):not(#_mg2):not(#_mg3):has(body.mobile.gameplay-page) #mchat#mchat #mg-players-pane .plist-row .client .corner-badge.is-demerit {
    left: 0 !important;
    width: 24px !important;
    height: 24px !important;
  }
  html:not(#_mg1):not(#_mg2):not(#_mg3):has(body.mobile.gameplay-page) #mchat#mchat #mg-players-pane .plist-row .ball {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: visible !important;
  }
  html:not(#_mg1):not(#_mg2):not(#_mg3):has(body.mobile.gameplay-page) #mchat#mchat #mg-players-pane .plist-row .rb {
    display: block !important;
    width: 20px !important;
    height: 20px !important;
    object-fit: contain !important;
  }
  html:not(#_mg1):not(#_mg2):not(#_mg3):has(body.mobile.gameplay-page) #mchat#mchat #mg-players-pane .plist-row .nm {
    display: flex !important;
    align-items: center !important;
    min-width: 0 !important;
    overflow: hidden !important;
    padding-left: 2px !important;
  }

  html:not(#_mg1):not(#_mg2):not(#_mg3):has(body.mobile.gameplay-page) #mchat#mchat #mg-players-pane .tools {
    justify-content: space-between !important;
    gap: 0 !important;
    column-gap: 0 !important;
    padding-left: 8px !important;
    padding-right: 34px !important;
  }
  html:not(#_mg1):not(#_mg2):not(#_mg3):has(body.mobile.gameplay-page) #mchat#mchat #mg-players-pane .tools .dock,
  html:not(#_mg1):not(#_mg2):not(#_mg3):has(body.mobile.gameplay-page) #mchat#mchat #mg-players-pane .tools .dock-pair {
    display: contents !important;
  }
  html:not(#_mg1):not(#_mg2):not(#_mg3):has(body.mobile.gameplay-page) #mchat#mchat #mg-players-pane .tools :is(#lobby-return, .js-settings, #btn-gmute, #btn-ginfo) {
    background-color: transparent !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-size: 100% 100% !important;
    border: 0 !important;
    box-shadow: 0 2px 4px rgba(0,0,0,.35) !important;
  }
  html:not(#_mg1):not(#_mg2):not(#_mg3):has(body.mobile.gameplay-page) #mchat#mchat #mg-players-pane .tools #lobby-return {
    background-image: url("/assets/ui/lobby/btn-exit.svg") !important;
  }
  html:not(#_mg1):not(#_mg2):not(#_mg3):has(body.mobile.gameplay-page) #mchat#mchat #mg-players-pane .tools .js-settings {
    background-image: url("/assets/ui/lobby/btn-settings.svg") !important;
  }
  html:not(#_mg1):not(#_mg2):not(#_mg3):has(body.mobile.gameplay-page) #mchat#mchat #mg-players-pane .tools #btn-gmute {
    background-image: url("/assets/ui/lobby/btn-mute.svg") !important;
  }
  html:not(#_mg1):not(#_mg2):not(#_mg3):has(body.mobile.gameplay-page) #mchat#mchat #mg-players-pane .tools #btn-ginfo {
    background-image: url("/assets/ui/lobby/btn-info.svg") !important;
  }
  html:not(#_mg1):not(#_mg2):not(#_mg3):has(body.mobile.gameplay-page) #mchat#mchat #mg-players-pane .tools :is(#lobby-return, .js-settings, #btn-gmute, #btn-ginfo) img {
    opacity: 0 !important;
  }
  html:not(#_mg1):not(#_mg2):not(#_mg3):has(body.mobile.gameplay-page) #mchat#mchat #mg-players-pane .tools :is(#lobby-return, .js-settings, .js-sound, #btn-gmute, #btn-ginfo):not(:disabled) {
    filter: none !important;
    opacity: 1 !important;
  }
  /* Grey out footer tools unless syncGameTools (or the button itself) has them enabled. */
  html:not(#_mg1):not(#_mg2):not(#_mg3):has(body.mobile.gameplay-page) #mchat#mchat #mg-players-pane .tools :is(#lobby-return, .js-settings, .js-sound, #btn-gmute, #btn-ginfo):disabled {
    filter: grayscale(1) brightness(0.9) !important;
    opacity: 0.42 !important;
    cursor: default !important;
  }


  /* Nov 10 20:06: copy lobby pane / list / page backgrounds exactly
     (pc-game-glass mobile glass + view-lobby page gradient). */
  html:not(#_mg1):not(#_mg2):not(#_mg3):has(body.mobile.gameplay-page) #mchat#mchat {
    background: linear-gradient(160deg, #10263c, #06111e) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
  html:not(#_mg1):not(#_mg2):not(#_mg3):has(body.mobile.gameplay-page) #mchat#mchat .mg-stack {
    background: transparent !important;
  }
  html:not(#_mg1):not(#_mg2):not(#_mg3):has(body.mobile.gameplay-page) #mchat#mchat .pane {
    background: radial-gradient(120% 160% at 18% -12%, rgba(255,255,255,.16), transparent 55%), linear-gradient(165deg, rgba(30,48,74,.60), rgba(8,15,27,.82)) !important;
    backdrop-filter: blur(20px) saturate(1.65) !important;
    -webkit-backdrop-filter: blur(20px) saturate(1.65) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.42), inset 0 0 0 1px rgba(255,255,255,.05), inset 0 -60px 80px -60px rgba(0,0,0,.55), 0 26px 54px -14px rgba(1,6,16,.70), 0 2px 0 rgba(255,255,255,.05) inset !important;
  }
  html:not(#_mg1):not(#_mg2):not(#_mg3):has(body.mobile.gameplay-page) #mchat#mchat .pane :is(#roster-scroll, #chat-log, #roster-play, #roster-watch) {
    background-color: transparent !important;
    background-image: radial-gradient(90% 60% at 50% 0%, rgba(255,255,255,.05), transparent 70%) !important;
    background-size: 100% 100% !important;
    background-repeat: no-repeat !important;
    background-position: 0 0 !important;
    box-shadow: inset 0 2px 8px rgba(0,0,0,.55), inset 0 -1px 0 rgba(255,255,255,.12) !important;
  }
  html:not(#_mg1):not(#_mg2):not(#_mg3):has(body.mobile.gameplay-page) #mchat#mchat .pane .plist-row {
    background-color: rgba(255,255,255,.035) !important;
  }


  /* Nov 10 20:28: fill the whole Players tab cell gold, edge to edge
     (same lobby active-tab gold gradient/bevel), no pill margin. Rack cell unchanged. */
  html:not(#_mg1):not(#_mg2):not(#_mg3):has(body.mobile.gameplay-page) #mchat#mchat .tabs .pl {
    margin: 0 !important;
    border-radius: 0 !important;
    height: 100% !important;
    min-height: 100% !important;
    align-self: stretch !important;
    flex: 1 1 auto !important;
    width: auto !important;
    box-sizing: border-box !important;
    background: linear-gradient(180deg, #6b6440 0%, #4f4a30 52%, #3b3826 100%) !important;
    border: 1px solid #c8b06a !important;
    color: #f0d27a !important;
    box-shadow: inset 0 1px 0 rgba(255,240,190,.25), inset 0 -2px 2px rgba(0,0,0,.35), 0 1px 2px rgba(0,0,0,.45) !important;
    text-shadow: 0 1px 1px rgba(0,0,0,.5) !important;
  }
  html:not(#_mg1):not(#_mg2):not(#_mg3):has(body.mobile.gameplay-page) #mchat#mchat .tabs .pl svg {
    color: #f0d27a !important;
    fill: currentColor !important;
    stroke: currentColor !important;
    filter: drop-shadow(0 1px 1px rgba(0,0,0,.5)) !important;
  }


  /* Nov 10 20:34: 3px left on chat input+Send (sizes kept), 3px left on Rating,
     2px left on rating-level ball (name unmoved). */
  html:not(#_mg1):not(#_mg2):not(#_mg3):has(body.mobile.gameplay-page) #mchat#mchat #mg-chat-pane .bar {
    padding-right: 19px !important;
    padding-left: 3px !important;
  }
  html:not(#_mg1):not(#_mg2):not(#_mg3):has(body.mobile.gameplay-page) #mchat#mchat #mg-players-pane .players-head .sort-h[data-label="Rating"],
  html:not(#_mg1):not(#_mg2):not(#_mg3):has(body.mobile.gameplay-page) #mchat#mchat #mg-players-pane .players-head .sort-h:last-child,
  html:not(#_mg1):not(#_mg2):not(#_mg3):has(body.mobile.gameplay-page) #mchat#mchat #mg-players-pane .plist-row .rt {
    transform: translateX(-9px) !important;
  }
  html:not(#_mg1):not(#_mg2):not(#_mg3):has(body.mobile.gameplay-page) #mchat#mchat #mg-players-pane .plist-row .rb {
    transform: translateX(-4px) !important;
  }


  /* Nov 10 20:59: Send visible top/bottom align with the input (drop outer
     shadow so painted edges match the 38px input). Gap to scroll-down kept. */
  html:not(#_mg1):not(#_mg2):not(#_mg3):has(body.mobile.gameplay-page) #mchat#mchat #mg-chat-pane :is(.bar button, #chat-form button) {
    height: 38px !important;
    min-height: 38px !important;
    max-height: 38px !important;
    box-sizing: border-box !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    align-self: center !important;
    box-shadow: inset 0 1px 0 rgba(240,255,248,.6), inset 0 -2px 2px rgba(0,28,16,.45) !important;
  }


  /* 20261110n: Game Settings etc. are shown in a <dialog> top layer (mobile-hud.js)
     because #mchat lives on <html> at z 2147483004 and beats any z-index inside <body>. */
  html:not(#_mg1):not(#_mg2):not(#_mg3):has(body.mobile.gameplay-page) dialog.mg-top-dialog {
    position: fixed !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    overflow: visible !important;
    outline: none !important;
  }
  html:not(#_mg1):not(#_mg2):not(#_mg3):has(body.mobile.gameplay-page) dialog.mg-top-dialog::backdrop {
    background: transparent !important;
  }
  html:not(#_mg1):not(#_mg2):not(#_mg3):has(body.mobile.gameplay-page) body.mobile.gameplay-page :is(#game-set-back, #leave-back, #gprofile-back, #dc-back, #warn-back, #concede-back).on,
  html:not(#_mg1):not(#_mg2):not(#_mg3):has(body.mobile.gameplay-page) body.mobile.gameplay-page #game-set-back.on {
    z-index: 2147483010 !important;
  }

  /* 20261110n: Path Mode in the settings sheet is admin-only on live games.
     mobile-v7.css and set-controls.js (.sc-rrow{display:grid}) otherwise un-hide #opt-path-row
     for every mobile player. Practice still shows it, matching canUsePath() / PC practice. */
  html:root:root:root:not(#v7a):not(#v7b):not(.practice) body.mobile.gameplay-page:not(.admin) :is(#game-set-back#game-set-back#game-set-back#game-set-back#game-set-back) :is(#opt-path-row, .path-opt, .path-radios) {
    display: none !important;
  }
}
