/* BJPVP — мобильный редизайн 3 экранов по согласованным мокапам v7.110.13
   (design-previews/mobile-game-v711013.html, mobile-lobby-v711013.html,
    mobile-global-lobby-v711013.html + MOBILE_V711013_HANDOFF.md).
   ПОСЛЕДНИЙ в каскаде (после mobile-shell.css). Десктоп не трогаем:
   всё под @media (max-width:760px). DOM не меняется — только раскладка. */

/* ═════════════════════ M1. ИГРОВОЙ СТОЛ (портрет) ═════════════════════
   Мокап: фетр-прямоугольник; дилер прижат к верху (компакт-пилюля);
   боковые игроки слева/справа узкими карточками, боксы вертикально;
   нижний игрок прижат к нижнему краю, боксы горизонтально; башмак
   справа сверху, параметры слева; чат — попап справа ~2/3 ширины. */
@media (max-width:760px) and (orientation:portrait){

  /* фетр: прямоугольник со скруглением вместо овала */
  body.screen-game .poker-table{
    border-radius:26px 26px 20px 20px !important;
    padding-bottom:146% !important;
    box-shadow:
      0 0 0 3px var(--brass-2),
      0 0 0 9px var(--wood-1),
      0 0 0 11px var(--wood-3),
      0 0 0 13px rgba(0,0,0,.4),
      0 12px 44px rgba(0,0,0,.8),
      inset 0 0 52px rgba(0,0,0,.45),
      inset 0 0 24px rgba(0,0,0,.25) !important;
  }
  body.screen-game .poker-table::before{ border-radius:inherit !important; }
  body.screen-game .table-logo{ font-size:17px; letter-spacing:4px; top:46%; width:100%; }
  body.screen-game .table-logo::before{ font-size:22px; letter-spacing:10px; }

  /* mobile: сами карты компактнее, но достоинства/масти крупнее для читаемости */
  body.screen-game .card{
    width:50px;
    height:70px;
  }
  body.screen-game .card-tl,
  body.screen-game .card-br{
    font-size:24px;
    font-weight:900;
  }
  body.screen-game .card-tr,
  body.screen-game .card-bl{
    font-size:24px;
  }
  body.screen-game .card-tl.card-rank-10,
  body.screen-game .card-br.card-rank-10{
    display:inline-block;
    overflow:hidden;
    letter-spacing:-2px;
    white-space:nowrap;
  }
  body.screen-game .card-tl.card-rank-q,
  body.screen-game .card-br.card-rank-q{
    display:inline-block;
    overflow:visible;
    letter-spacing:0;
    white-space:nowrap;
  }
  body.screen-game .card-tl.card-rank-10{
    left:1px;
    transform:scaleX(.72);
    transform-origin:left center;
  }
  body.screen-game .card-br.card-rank-10{
    right:1px;
    transform:rotate(180deg) scaleX(.72);
    transform-origin:center;
  }
  body.screen-game .card-tl.card-rank-q{
    left:1px;
    transform:scaleX(.9);
    transform-origin:left center;
  }
  body.screen-game .card-br.card-rank-q{
    right:1px;
    transform:rotate(180deg) scaleX(.9);
    transform-origin:center;
  }

  /* места = компактные карточки (кресло-графика скрыта, как в мокапе) */
  body.screen-game .seat .chair{ display:none !important; }
  body.screen-game .seat .chair::before{ display:none !important; }
  /* Only actual controls participate in mobile hit-testing. Card/field layers
     can cross a neighbouring plaque in dense 5-seat layouts, but must never
     steal its tap. Betting and pre-action buttons opt back in explicitly. */
  body.screen-game .seat{ pointer-events:none; }
  body.screen-game .seat .pf-name,
  body.screen-game .seat button{ pointer-events:auto; }
  body.screen-game .seat{
    background:rgba(4,9,8,.58);
    border:1px solid rgba(255,255,255,.14);
    border-radius:12px;
    padding:5px 6px;
    box-shadow:0 4px 12px rgba(0,0,0,.30);
  }
  body.screen-game .seat-me{
    border-color:rgba(232,200,115,.78);
    background:linear-gradient(180deg,rgba(232,200,115,.13),rgba(0,0,0,.34));
  }
  /* мокап: шапка места (имя+баланс) СВЕРХУ карточки, боксы под ней */
  body.screen-game .seat:not(.seat-top) .chair-wrap{ order:-1; }
  body.screen-game .seat:not(.seat-top) .seat-chips{ order:3; }
  /* шапка места: ник сверху, баланс строго под ним. Без наложения при старте стола. */
  body.screen-game .seat .chair-wrap{
    width:auto; min-width:0; max-width:100%;
    display:flex !important; flex-direction:column !important; flex-wrap:nowrap !important;
    gap:2px; align-items:center; justify-content:flex-start;
  }
  body.screen-game .seat .chair-wrap .pf-name{
    position:static !important; transform:none !important;
    font-size:10.5px; white-space:nowrap; overflow:visible; text-overflow:clip;
    max-width:none !important; line-height:1.05;
  }
  body.screen-game .seat .seat-balance{
    position:static !important; transform:none !important;
    font-size:9px; padding:0 4px; white-space:nowrap; line-height:1.05;
  }
  body.screen-game .seat .chair-label{ font-size:8px; }
  body.screen-game .seat .seat-status{
    position:static !important;
    order:4;
    min-height:0;
    margin-top:3px;
  }

  /* ── дилер: компакт-пилюля у верхнего края ── */
  body.screen-game .seat-top{
    flex-direction:column; /* имя сверху, карты под ним */
    border-color:rgba(232,200,115,.30);
    background:rgba(0,0,0,.30);
    min-width:140px; max-width:78vw;
  }
  body.screen-game .seat-top .chair-wrap{ justify-content:center; }
  body.screen-game .seat-top .chair-label{
    position:absolute !important; left:-22px !important; top:2px !important;
    transform:none !important; margin:0 !important; z-index:15;
  }
  body.screen-game .seat-top .dealer-seat-tag{
    display:flex; align-items:center; justify-content:center;
    width:30px; height:28px; padding:0 !important; border-radius:999px;
    font-size:17px !important; color:#2a1f08 !important;
  }
  body.screen-game .seat-top .dealer-seat-tag::before{
    content:none;
  }
  /* поле дилера: карты и счёт В РЯД (мокап), бейдж рядом; карты компактные */
  body.screen-game .seat-top .player-field{
    display:flex; flex-direction:row; align-items:center; justify-content:center;
    gap:6px; width:auto; min-width:0; padding:2px 4px;
  }
  body.screen-game .seat-top .card{ width:50px; height:70px; }
  body.screen-game .seat-top .pf-score{ position:static !important; margin:0 !important; font-size:14px; }
  body.screen-game .seat-top .sbadge{ position:static !important; font-size:9px; }
  /* карты дилера: рядом, новые перекрывают примерно половину предыдущей карты */
  body.screen-game .seat-top .cards-row .card:not(:first-child){ margin-left:-25px !important; }

  /* ── боковые места: узкие, боксы вертикально ── */
  body.screen-game .seat-lefthalf, body.screen-game .seat-righthalf,
  body.screen-game .seat[data-visual-slot^="left"], body.screen-game .seat[data-visual-slot^="right"]{
    width:124px !important; max-width:124px;
  }
  body.screen-game .seat-lefthalf .player-field > *,
  body.screen-game .seat-righthalf .player-field > *,
  body.screen-game .seat[data-visual-slot^="left"] .player-field > *,
  body.screen-game .seat[data-visual-slot^="right"] .player-field > *{ max-width:100%; }
  body.screen-game .seat-lefthalf .player-field,
  body.screen-game .seat-righthalf .player-field,
  body.screen-game .seat[data-visual-slot^="left"] .player-field,
  body.screen-game .seat[data-visual-slot^="right"] .player-field{
    width:100%; min-width:0; padding:2px;
  }
  body.screen-game .seat-lefthalf .player-field > .cards-row,
  body.screen-game .seat-righthalf .player-field > .cards-row,
  body.screen-game .seat[data-visual-slot^="left"] .player-field > .cards-row,
  body.screen-game .seat[data-visual-slot^="right"] .player-field > .cards-row{
    flex-direction:column; align-items:center; gap:3px; flex-wrap:nowrap;
  }
  /* ПРАВЫЙ игрок: верхний бокс = бокс, по которому ХОДЯТ ПЕРВЫМ (сплит играется справа
     налево → первый по ходу = hands[N-1]; append hands[0]-first, поэтому column кладёт
     наверх hands[0]=второй по ходу → нужен column-reverse). Левый остаётся column. Реверс
     только визуальный (DOM hands[0]-first сохраняем). */
  body.screen-game .seat-righthalf .player-field > .cards-row,
  body.screen-game .seat[data-visual-slot^="right"] .player-field > .cards-row{
    flex-direction:column-reverse;
  }
  /* боксы-обёртки в узкой колонке (НЕ сами карты!): по ширине карточки */
  body.screen-game .seat-lefthalf .cards-row > div:not(.card),
  body.screen-game .seat-righthalf .cards-row > div:not(.card),
  body.screen-game .seat[data-visual-slot^="left"] .cards-row > div:not(.card),
  body.screen-game .seat[data-visual-slot^="right"] .cards-row > div:not(.card){
    width:104px !important; margin:3px 0 !important;
  }
  body.screen-game .seat-lefthalf .hand-inner-box > .cards-row,
  body.screen-game .seat-righthalf .hand-inner-box > .cards-row,
  body.screen-game .seat[data-visual-slot^="left"] .hand-inner-box > .cards-row,
  body.screen-game .seat[data-visual-slot^="right"] .hand-inner-box > .cards-row{
    flex-direction:row !important;
    align-items:flex-end !important;
    justify-content:center !important;
    flex-wrap:nowrap !important;
  }
  body.screen-game .seat-lefthalf .card,
  body.screen-game .seat-righthalf .card,
  body.screen-game .seat[data-visual-slot^="left"] .card,
  body.screen-game .seat[data-visual-slot^="right"] .card{
    max-width:50px !important; max-height:70px !important;
  }
  /* наложение карт внутри бокса считает JS applyCardOverlap; не перебиваем inline margins */

  body.screen-game .seat .hand-inner-box{
    position:relative !important;
    min-height:118px !important;
    padding:18px 5px 28px !important;
    overflow:visible !important;
  }
  body.screen-game .seat .hand-score{
    position:absolute !important; right:7px; bottom:4px;
    font-family:var(--f-mono); font-size:19px !important; font-weight:900;
    color:var(--ink); min-height:0 !important; margin:0 !important;
    text-shadow:0 2px 4px rgba(0,0,0,.75); letter-spacing:0;
    z-index:20;
  }
  body.screen-game .seat .hand-result-score{ font-size:22px !important; }
  body.screen-game .seat:not(.seat-top) .player-field{ position:relative; }
  body.screen-game .seat:not(.seat-top) .pf-score{
    position:absolute !important; right:8px; bottom:4px;
    font-size:19px !important; min-height:0 !important; margin:0 !important;
    z-index:20;
  }

  /* ставочные бокс-кнопки (betting) на боковых местах: компактные строки,
     а не колонна 78×110; фон поля прозрачный — синий столб не нужен */
  body.screen-game .seat-lefthalf .cards-row > button,
  body.screen-game .seat-righthalf .cards-row > button,
  body.screen-game .seat[data-visual-slot^="left"] .cards-row > button,
  body.screen-game .seat[data-visual-slot^="right"] .cards-row > button{
    width:100% !important; height:44px !important; min-height:44px;
    flex-direction:row !important; justify-content:center !important;
    align-items:center !important; gap:5px !important; padding:2px 4px !important;
  }
  /* дилер в фазе ставок: поле руки скрыто (мокап — компакт-пилюля без бокса);
     убирает гигантский dashed и наезд на имя дилера */
  #screen-game[data-phase="betting"] .seat-top .player-field{ display:none !important; }
  #screen-game[data-phase="betting"] .seat-top{ min-width:0; }

  /* в МОЕЙ фазе ставок бейдж статуса («Ждёт хода») лишний — высоту экономим */
  #screen-game[data-phase="betting"] .seat-me .sbadge{ display:none !important; }
  body.screen-game .seat .player-field.me-field{ background:transparent !important; box-shadow:none !important; }
  body.screen-game .seat .player-field{ background:transparent !important; }
  /* фишки ставки соседа не должны нырять под чужие поля */
  body.screen-game .seat .seat-chips{ z-index:7; }
  /* ставка (фишки) — со стороны центра стола: у левого справа, у правого слева */
  body.screen-game .seat-lefthalf, body.screen-game .seat-righthalf,
  body.screen-game .seat[data-visual-slot^="left"], body.screen-game .seat[data-visual-slot^="right"]{ position:absolute; }
  body.screen-game .seat-lefthalf .seat-chips,
  body.screen-game .seat[data-visual-slot^="left"] .seat-chips{
    position:absolute; right:-28px; top:50%; transform:translateY(-50%); margin:0;
    flex-direction:column; min-height:0;
  }
  body.screen-game .seat-righthalf .seat-chips,
  body.screen-game .seat[data-visual-slot^="right"] .seat-chips{
    position:absolute; left:-28px; top:50%; transform:translateY(-50%); margin:0;
    flex-direction:column; min-height:0;
  }

  /* ── нижнее место (по центру): на всю ширину, боксы горизонтально ── */
  body.screen-game .seat:not(.seat-top):not(.seat-lefthalf):not(.seat-righthalf){
    width:calc(100% - 26px); max-width:330px;
  }
  body.screen-game .seat:not(.seat-top):not(.seat-lefthalf):not(.seat-righthalf) .cards-row{
    flex-wrap:nowrap; justify-content:center;
  }
  body.screen-game .seat:not(.seat-top):not(.seat-lefthalf):not(.seat-righthalf) .seat-chips{
    position:absolute; left:50%; top:-28px; transform:translateX(-50%);
    margin:0; min-height:0; z-index:14;
  }

  /* масштаб мест: на портрете карточки и так компактные — не ужимать сильнее */
  body.screen-game #seats-container.seats-3{--seat-scale:.97}
  body.screen-game #seats-container.seats-4{--seat-scale:.9}
  body.screen-game #seats-container.seats-5{--seat-scale:.84}

  /* пустые dashed-боксы (ставка ещё не сделана): компактные; игровые боксы
     держат высоту, чтобы 4-6 карт и счёт не налезали друг на друга */
  #screen-game[data-phase="betting"] .seat .hand-inner-box{ min-height:46px !important; padding:8px 5px !important; }
  #screen-game:not([data-phase="betting"]) .seat-lefthalf .hand-inner-box,
  #screen-game:not([data-phase="betting"]) .seat-righthalf .hand-inner-box{ min-height:120px !important; }
  #screen-game:not([data-phase="betting"]) .seat:not(.seat-top):not(.seat-lefthalf):not(.seat-righthalf) .hand-inner-box{ min-height:104px !important; }
  body.screen-game .seat-top .hand-inner-box{ min-height:40px !important; }
  body.screen-game .seat .player-field{ min-height:0 !important; }

  /* v7.112.x: mobile follows the slot sketch.
     The seat coordinate is now the table-edge anchor, not the center of a
     full player card. Boxes grow onto the felt; the player plaque stays below
     them and does not move when cards/statuses change. */
  body.screen-game .seat:not(.seat-top){
    width:0 !important; height:0 !important;
    min-width:0 !important; max-width:none !important;
    padding:0 !important; margin:0 !important;
    background:transparent !important;
    border:0 !important; border-radius:0 !important;
    box-shadow:none !important;
    overflow:visible !important;
  }
  body.screen-game .seat-me:not(.seat-top){
    background:transparent !important;
    border:0 !important;
  }
  body.screen-game .seat:not(.seat-top) .chair-wrap{
    position:absolute !important;
    width:112px !important; min-width:112px !important; max-width:112px !important;
    padding:5px 6px;
    background:rgba(3,9,8,.72);
    border:1px solid rgba(255,255,255,.15);
    border-radius:12px;
    box-shadow:0 8px 16px rgba(0,0,0,.48);
    z-index:24;
    align-items:center;
  }
  body.screen-game .seat-me:not(.seat-top) .chair-wrap{
    border-color:rgba(232,200,115,.78);
    background:linear-gradient(180deg,rgba(232,200,115,.16),rgba(3,9,8,.74));
  }
  body.screen-game .seat:not(.seat-top) .chair-wrap .pf-name{
    font-size:10px !important;
    max-width:100% !important;
    justify-content:center;
  }
  body.screen-game .seat:not(.seat-top) .player-nick{ font-size:10px !important; }
  body.screen-game .seat:not(.seat-top) .seat-balance{
    font-size:8px !important;
    padding:0 !important;
  }

  body.screen-game .seat-lefthalf .player-field,
  body.screen-game .seat[data-visual-slot^="left"] .player-field,
  body.screen-game .seat-righthalf .player-field,
  body.screen-game .seat[data-visual-slot^="right"] .player-field{
    position:absolute !important;
    top:auto !important;
    bottom:var(--mobile-side-field-lift, 40px) !important;
    width:104px !important; min-width:104px !important; max-width:104px !important;
    padding:0 !important; margin:0 !important;
    transform:none !important;
    z-index:12;
  }
  body.screen-game .seat-lefthalf .player-field,
  body.screen-game .seat[data-visual-slot^="left"] .player-field{ left:6px !important; }
  body.screen-game .seat-righthalf .player-field,
  body.screen-game .seat[data-visual-slot^="right"] .player-field{ right:6px !important; }

  body.screen-game .seat-lefthalf .chair-wrap,
  body.screen-game .seat[data-visual-slot^="left"] .chair-wrap,
  body.screen-game .seat-righthalf .chair-wrap,
  body.screen-game .seat[data-visual-slot^="right"] .chair-wrap{
    width:96px !important;
    min-width:96px !important;
    max-width:96px !important;
  }
  body.screen-game .seat-lefthalf .chair-wrap .pf-name,
  body.screen-game .seat[data-visual-slot^="left"] .chair-wrap .pf-name,
  body.screen-game .seat-righthalf .chair-wrap .pf-name,
  body.screen-game .seat[data-visual-slot^="right"] .chair-wrap .pf-name{
    gap:3px !important;
  }

  body.screen-game .seat-lefthalf .chair-wrap,
  body.screen-game .seat[data-visual-slot^="left"] .chair-wrap{
    left:6px !important;
    top:0 !important;
  }
  body.screen-game .seat-righthalf .chair-wrap,
  body.screen-game .seat[data-visual-slot^="right"] .chair-wrap{
    right:6px !important;
    top:0 !important;
  }

  body.screen-game .seat:not(.seat-top):not(.seat-lefthalf):not(.seat-righthalf) .player-field{
    position:absolute !important;
    left:50% !important; bottom:-14px !important;
    width:max-content !important; max-width:330px !important;
    padding:0 !important; margin:0 !important;
    transform:translateX(-50%) !important;
    z-index:12;
  }
  body.screen-game .seat:not(.seat-top):not(.seat-lefthalf):not(.seat-righthalf) .chair-wrap{
    left:50% !important; top:7px !important;
    transform:translateX(-50%) !important;
  }

  body.screen-game .seat-lefthalf .seat-chips,
  body.screen-game .seat[data-visual-slot^="left"] .seat-chips{
    position:absolute !important;
    left:118px !important; right:auto !important;
    top:var(--mobile-side-chip-top, -82px) !important;
    height:var(--mobile-side-chip-lane-height, 126px) !important;
    transform:translateY(-50%) !important;
    flex-direction:column !important;
    align-items:center !important;
    justify-content:center !important;
    gap:0 !important;
    margin:0 !important;
  }
  body.screen-game .seat-righthalf .seat-chips,
  body.screen-game .seat[data-visual-slot^="right"] .seat-chips{
    position:absolute !important;
    right:118px !important; left:auto !important;
    top:var(--mobile-side-chip-top, -82px) !important;
    height:var(--mobile-side-chip-lane-height, 126px) !important;
    transform:translateY(-50%) !important;
    flex-direction:column !important;
    align-items:center !important;
    justify-content:center !important;
    gap:0 !important;
    margin:0 !important;
  }
  body.screen-game .seat:not(.seat-top):not(.seat-lefthalf):not(.seat-righthalf) .seat-chips{
    position:absolute !important;
    left:50% !important; top:calc(var(--mobile-bottom-chip-lift, 178px) * -1) !important;
    transform:translateX(-50%) !important;
    margin:0 !important; z-index:18;
  }

  body.screen-game .seat:not(.seat-top) .seat-status,
  body.screen-game .seat:not(.seat-top) .chair-label{
    position:absolute !important;
    margin:0 !important;
    z-index:26;
    pointer-events:none;
  }
  body.screen-game .seat-lefthalf .seat-status,
  body.screen-game .seat[data-visual-slot^="left"] .seat-status,
  body.screen-game .seat-righthalf .seat-status,
  body.screen-game .seat[data-visual-slot^="right"] .seat-status{
    top:50px !important;
    width:96px;
  }
  body.screen-game .seat-lefthalf .seat-status,
  body.screen-game .seat[data-visual-slot^="left"] .seat-status{ left:6px !important; }
  body.screen-game .seat-righthalf .seat-status,
  body.screen-game .seat[data-visual-slot^="right"] .seat-status{ right:6px !important; }
  body.screen-game .seat:not(.seat-top):not(.seat-lefthalf):not(.seat-righthalf) .seat-status{
    left:50% !important; top:58px !important;
    transform:translateX(-50%) !important;
  }
  body.screen-game .seat-lefthalf .chair-label,
  body.screen-game .seat[data-visual-slot^="left"] .chair-label,
  body.screen-game .seat-righthalf .chair-label,
  body.screen-game .seat[data-visual-slot^="right"] .chair-label{
    top:32px !important;
    width:96px;
  }
  body.screen-game .seat-lefthalf .chair-label,
  body.screen-game .seat[data-visual-slot^="left"] .chair-label{ left:6px !important; }
  body.screen-game .seat-righthalf .chair-label,
  body.screen-game .seat[data-visual-slot^="right"] .chair-label{ right:6px !important; }
  body.screen-game .seat:not(.seat-top):not(.seat-lefthalf):not(.seat-righthalf) .chair-label{
    left:50% !important; top:-18px !important;
    transform:translateX(-50%) !important;
  }

  /* round-info («Круг N · Раунд M из K»): центр стола, отдельно от поля дилера */
  body.screen-game .round-info{
    top:48% !important;
    left:50% !important;
    transform:translate(-50%,-50%) !important;
    font-size:10px !important;
    padding:4px 11px !important;
    letter-spacing:.8px !important;
    max-width:72vw;
    white-space:nowrap;
    border-radius:999px !important;
    background:rgba(4,9,8,.62) !important;
    border:1px solid rgba(232,200,115,.32) !important;
    box-shadow:0 8px 22px rgba(0,0,0,.38) !important;
  }

  /* ── башмак/параметры: верхние углы, выровнены по дилеру, «Срезка» без переносов ── */
  body.screen-game #shoe-hud{
    display:flex; gap:3px; padding:4px 4px;
    top:52px !important; right:8px !important; left:auto !important; bottom:auto !important;
  }
  body.screen-game #shoe-hud-visual{ width:22px !important; height:34px !important; }
  body.screen-game #shoe-hud-stats{ font-size:7.4px; line-height:1.32; white-space:nowrap; }
  body.screen-game #table-stakes{
    top:52px !important; left:8px !important; right:auto !important; bottom:auto !important;
    font-size:9px; line-height:1.5; padding:5px 7px;
  }

  /* ── чат: полупрозрачный попап СПРАВА на ~2/3 ширины стола (мокап) ── */
  body.screen-game.chat-open #chat-panel{
    top:calc(env(safe-area-inset-top) + 96px) !important;
    bottom:calc(170px + env(safe-area-inset-bottom)) !important;
    left:auto !important; right:10px !important;
    width:66vw !important; height:auto !important;
    border-radius:14px !important;
    background:rgba(13,18,24,.82) !important;
    backdrop-filter:blur(9px) !important;
    border:1px solid rgba(232,200,115,.25) !important;
    box-shadow:-18px 0 42px rgba(0,0,0,.48) !important;
    z-index:260 !important;
  }
  /* значок чата — правый нижний угол зоны стола (над HUD) */
  body.screen-game #chat-toggle-btn{
    bottom:calc(170px + env(safe-area-inset-bottom)) !important;
    right:10px !important; width:38px !important; height:38px !important;
    font-size:16px !important; z-index:250 !important;
  }
  body.screen-game.chat-open #chat-toggle-btn{
    right:calc(66vw + 14px) !important;
    z-index:261 !important;
  }

  /* нижний HUD: компактнее, кнопки крупные во всю ширину */
  body.screen-game .bottom-hud{ min-height:128px; padding:4px 8px calc(8px + env(safe-area-inset-bottom)); }
  body.screen-game .action-panel{ padding:8px 9px; }
  body.screen-game #action-msg{ font-size:12.5px; min-height:18px; margin-bottom:7px; }

  /* верхние фикс-кнопки: компакт (мокап — маленькие иконки в topbar) */
  #personal-to-lobby-btn, #global-to-lobby-btn{
    top:calc(8px + env(safe-area-inset-top)) !important;
    left:8px !important;
    width:38px !important;
    height:38px !important;
    min-width:38px !important;
    min-height:38px !important;
    box-sizing:border-box !important;
    padding:0 !important;
    border-radius:10px !important;
  }
  #global-leave-btn,
  #personal-leave-seat-btn{
    top:calc(52px + env(safe-area-inset-top)) !important;
    left:8px !important;
    width:38px !important;
    height:38px !important;
    min-width:38px !important;
    min-height:38px !important;
    box-sizing:border-box !important;
    padding:0 !important;
    border-radius:10px !important;
  }
  #personal-table-invite-btn{
    width:38px !important;
    height:38px !important;
    min-width:38px !important;
    min-height:38px !important;
    box-sizing:border-box !important;
    padding:0 !important;
    border-radius:10px !important;
    transform:none !important;
  }
  .table-icon-btn svg{
    width:21px !important;
    height:21px !important;
  }
  .table-icon-btn::after{
    display:block !important;
  }
  #host-controls{
    top:calc(42px + env(safe-area-inset-top)) !important;
    left:8px !important;
    gap:4px !important;
  }
  #host-controls #btn-stop-game{
    width:118px !important;
    min-height:30px !important;
    box-sizing:border-box !important;
    padding:6px 6px !important;
    font-size:10.5px !important;
    line-height:1.1 !important;
    white-space:nowrap !important;
    overflow:hidden !important;
    text-overflow:ellipsis !important;
  }
  #table-rules-btn{ padding:5px 9px !important; font-size:10.5px !important; }
  body.screen-game #mute-btn{ transform:scale(.85); transform-origin:top right; }
  #last-hand-btn{ padding:5px 8px !important; font-size:10px !important; }
  /* стол начинается ниже компактных кнопок */
  #screen-game{ padding-top:calc(env(safe-area-inset-top) + 112px) !important; }
}

/* ═════════════════════ M2. СВОЁ ЛОББИ (один экран, без скролла) ═════════════════════
   Мокап: шапка-профиль; герой-ряд (код лобби + вход по коду + «Общее»);
   быстрый ряд (Настройки/Правила/Отчёт); сетка 2 колонки (Настройки|Игроки);
   «Начать стол» по центру; «Столы в моём лобби» (5 слотов). */
@media (max-width:760px){

  /* Fixed iOS install hint gets its own clearance instead of covering lobby controls. */
  body.pwa-ios-hint-visible .screen.active:not(#screen-game){
    height:calc(100vh - var(--pwa-ios-hint-clearance, 156px)) !important;
    max-height:calc(100vh - var(--pwa-ios-hint-clearance, 156px)) !important;
  }

  /* экран не скроллится: всё помещается; внутренняя сетка управляет высотой */
  body.lobby-my #screen-lobby{
    overflow-y:auto !important; /* запас: если не влезло на очень низких экранах */
    gap:7px !important;
    padding:calc(6px + env(safe-area-inset-top)) 8px calc(10px + env(safe-area-inset-bottom)) 8px !important;
  }

  /* ── шапка-профиль: компактная строка ── */
  #screen-lobby .user-badge{ padding:6px 8px !important; gap:8px !important; }
  #screen-lobby .user-badge .avatar{ width:34px; height:34px; }
  #screen-lobby #lobby-username{ font-size:13px; }
  /* ник СТРОКОЙ сверху, балансы в ряд ПОД ним (мокап: .nick затем .balances) */
  #screen-lobby .user-badge > div:nth-child(2){ min-width:0; }
  #screen-lobby .user-badge .uname{ white-space:nowrap; overflow:visible; }
  #screen-lobby .user-badge > div:nth-child(2) > div:nth-child(2),
  #screen-lobby .user-badge > div:nth-child(2) > div:nth-child(3){ display:inline-block; margin-right:10px; }

  /* ── язык-свитчер не занимает строку (поверх правого края бейджа) ── */
  #lobby-left-col > [data-lang-switch]{
    position:absolute !important; top:calc(2px + env(safe-area-inset-top)) !important;
    right:56px !important; z-index:6; margin:0 !important; transform:scale(.82);
    transform-origin:top right;
  }
  #lobby-left-col{ position:relative; gap:7px !important; }

  /* ── ГЕРОЙ-РЯД мокапа: [код лобби | вход по коду | «Общее»] в одну строку ──
     #lobby-left-personal-extras растворяется (display:contents), его карточки и
     toggle-кнопка раскладываются грид-ячейками левой колонки. */
  body.lobby-my #lobby-left-col{
    display:grid !important;
    grid-template-columns:minmax(0,1.5fr) minmax(0,1fr) 76px;
    grid-auto-rows:auto; align-items:stretch;
  }
  body.lobby-my #lobby-left-col > .user-badge{ grid-column:1 / -1; grid-row:1; }
  body.lobby-my #lobby-left-col > #btn-get-chips{ grid-column:1 / -1; }
  body.lobby-my #lobby-left-col > #lobby-nav-buttons{ grid-column:1 / -1; grid-row:2; }
  body.lobby-my #lobby-left-personal-extras{ display:contents !important; }
  body.lobby-my #lobby-left-personal-extras > div:nth-child(1){ grid-column:1; grid-row:3; }
  body.lobby-my #lobby-left-personal-extras > div:nth-child(2){ grid-column:2; grid-row:3; }
  body.lobby-my #lobby-toggle-btn{
    grid-column:3; grid-row:3;
    margin-top:0 !important; padding:6px 4px !important; font-size:10px !important;
    letter-spacing:.3px !important; white-space:normal; line-height:1.25;
  }
  /* карточки героя — компактные, как в мокапе */
  body.lobby-my #lobby-left-personal-extras > div{ padding:7px 8px !important; }
  body.lobby-my #my-lobby-code-compact{ font-size:18px !important; letter-spacing:3px !important; padding:5px 4px !important; }
  body.lobby-my #lobby-left-personal-extras > div > div:first-child{ font-size:8.5px !important; margin-bottom:3px !important; }
  body.lobby-my #lobby-left-personal-extras input{ font-size:14px !important; letter-spacing:2px !important; padding:5px 4px !important; }
  body.lobby-my #lobby-left-personal-extras button{ font-size:10px !important; padding:5px !important; }
  /* подсказки-«мини» внутри карточек героя (3-я строка: «код-приглашение…», «6-знач. код…»)
     прячем — заголовок и код остаются, высота экономится */
  body.lobby-my #lobby-left-personal-extras > div > div:nth-child(3){ display:none !important; }

  /* заголовок «🏠 Моё лобби» панели — дублирует всё вокруг, в мокапе его нет */
  body.lobby-my #lobby-main-panel > div:first-child{ display:none !important; }

  /* ── быстрый ряд: Настройки/Правила/Отчёт/Мои игры — компактная сетка 2×2 ── */
  body.lobby-my #lobby-nav-buttons{
    display:grid !important;
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
    gap:5px !important;
  }
  body.lobby-my #lobby-nav-buttons > button{
    width:100% !important;
    min-width:0 !important;
    padding:8px 6px !important;
    font-size:11px !important;
    text-align:center !important;
  }
  body.lobby-my #btn-global-report{ display:block !important; }

  /* ── сетка: Настройки | Игроки в 2 колонки (как в мокапе) ── */
  body.lobby-my #lobby-top-row{ flex-direction:row !important; gap:7px !important; }
  body.lobby-my #lobby-top-row .lobby-box{ flex:1 1 0 !important; min-width:0 !important; padding:8px !important; }
  body.lobby-my #table-settings .section-title,
  body.lobby-my #lobby-box-main .section-title{ font-size:10px !important; }
  /* настройки: компактные строки */
  body.lobby-my #table-settings span, body.lobby-my #table-settings select{ font-size:10.5px !important; }
  body.lobby-my #table-name-input{ font-size:11px !important; padding:4px 6px !important; max-width:110px !important; }
  body.lobby-my #bet-limits-block select{ font-size:10.5px !important; }
  /* игроки: строки компактнее; раскладка мокапа — ник СТРОКОЙ, баланс ПОД ником,
     кнопки справа (ник не исчезает в узкой колонке) */
  body.lobby-my #lobby-players{ min-height:150px !important; gap:3px !important; }
  body.lobby-my #lobby-players.mylobby-limit-box{
    min-height:58px !important;
    gap:0 !important;
  }
  body.lobby-my #lobby-players .mylobby-limit-state{
    min-height:42px !important;
    padding:6px 8px !important;
    gap:3px 6px;
    flex-wrap:wrap;
    font-size:11px;
    line-height:1.15;
  }
  body.lobby-my #lobby-players .mylobby-limit-title{
    font-size:11px;
  }
  body.lobby-my #lobby-players .mylobby-limit-hint{
    flex:1 1 100%;
    max-width:100%;
    font-size:10px;
    line-height:1.25;
    white-space:normal;
    display:-webkit-box;
    -webkit-line-clamp:2;
    -webkit-box-orient:vertical;
  }
  /* v7.110.42: НИК на ОТДЕЛЬНОЙ полной строке (row1), баланс+кнопки — row2.
     В 2-колоночной раскладке (настройки|игроки) колонка узкая (~180px); раньше
     кнопки (+/−/Удалить) делили ширину с ником и зажимали его до ~28px → ник был
     невидим (репорт юзера). Теперь ник получает ВСЮ ширину строки. */
  body.lobby-my .player-item-lobby{
    display:grid !important;
    grid-template-columns:1fr auto !important;
    grid-template-rows:auto auto !important;
    column-gap:6px !important; row-gap:2px !important;
    padding:5px 7px !important; align-items:center !important;
    overflow:hidden !important;
  }
  body.lobby-my .player-item-lobby .col-nick{
    grid-column:1 / -1 !important; grid-row:1 !important;       /* НИК — на всю ширину строки */
    min-width:0 !important; max-width:100% !important; overflow:hidden !important;
    font-size:11px !important; white-space:nowrap !important; text-overflow:ellipsis !important;
    display:flex !important; align-items:center !important; gap:4px !important;
  }
  body.lobby-my .player-item-lobby .col-nick > span:not(.player-ava):not(.me-seat-tag):not(.bot-badge):not(.guest-badge):not(.dealer-badge){
    min-width:0 !important; overflow:hidden !important; text-overflow:ellipsis !important;
  }
  body.lobby-my .player-item-lobby .col-balance{
    grid-column:1 !important; grid-row:2 !important;
    font-size:10px !important; text-align:left !important; padding-left:30px !important;
    min-width:0 !important; overflow:hidden !important; white-space:nowrap !important;
  }
  body.lobby-my .player-item-lobby .col-actions{
    grid-column:2 !important; grid-row:2 !important; justify-self:end !important;
  }
  body.lobby-my .player-item-lobby .col-actions > div{ flex-wrap:nowrap !important; }
  body.lobby-my .player-item-lobby > button[data-ready-btn]{
    grid-column:2 !important; grid-row:2 !important; justify-self:end !important;
    align-self:center !important; min-width:34px !important;
  }
  body.lobby-my .player-item-lobby .col-actions button{ font-size:9.5px !important; }
  body.lobby-my .player-item-lobby .me-seat-tag{ font-size:8px !important; padding:1px 4px !important; }
  body.lobby-my #lobby-players > *{ padding-top:4px !important; padding-bottom:4px !important; min-height:0 !important; }
  /* пустые слоты — одна строка (нет баланса/кнопок) */
  body.lobby-my .player-item-lobby.empty-slot{ grid-template-rows:auto !important; }
  body.lobby-my .player-item-lobby.empty-slot .col-balance{ display:none !important; }
  /* настройки: вертикальные зазоры между блоками меньше */
  body.lobby-my #table-settings > div{ margin-bottom:4px !important; margin-top:4px !important; padding-top:4px !important; }
  body.lobby-my #table-settings .cut-slider{ margin:0 !important; height:18px; }
  body.lobby-my #bet-limits-block > div{ margin-bottom:3px !important; }
  body.lobby-my #game-type-block button{ padding:6px 5px !important; font-size:10px !important; }
  body.lobby-my #gt-hint{ display:none !important; }
  body.lobby-my #start-table-hint-slot{ margin-top:4px !important; min-height:0 !important; }
  body.lobby-my #start-table-hint{ font-size:10.5px !important; line-height:1.3 !important; }

  /* ── «Начать стол» / «Зайти на стол» — крупная кнопка по центру ── */
  body.lobby-my #start-table-btn, body.lobby-my #join-table-btn{
    max-width:240px; margin-left:auto !important; margin-right:auto !important;
    display:block;
  }

  /* ── столы моего лобби: компактные строки ── */
  body.lobby-my #my-lobby-tables-box{ padding:8px !important; }
  body.lobby-my #my-lobby-tables-list{ gap:4px !important; }
  body.lobby-my #my-lobby-tables-list .mylobby-row-main{
    display:grid !important;
    grid-template-columns:20px minmax(0,1fr) auto !important;
    grid-template-areas:
      "grip meta status"
      "actions actions actions" !important;
    justify-content:stretch !important;
    align-items:center !important;
    gap:7px 7px !important;
    padding:8px 8px !important;
    flex-wrap:nowrap !important;
  }
  body.lobby-my #my-lobby-tables-list .mylobby-grip{
    grid-area:grip !important;
    align-self:center !important;
    justify-self:center !important;
  }
  body.lobby-my #my-lobby-tables-list .mylobby-table-meta{
    grid-area:meta !important;
    width:100% !important;
    min-width:0 !important;
    flex:none !important;
  }
  body.lobby-my #my-lobby-tables-list .mylobby-table-meta > div:first-child{
    display:flex !important;
    align-items:center !important;
    gap:6px !important;
    flex-wrap:nowrap !important;
    font-size:14px !important;
    line-height:1.15 !important;
  }
  body.lobby-my #my-lobby-tables-list .mylobby-table-meta > div:first-child span:first-child{
    white-space:nowrap !important;
  }
  body.lobby-my #my-lobby-tables-list .mylobby-table-meta > div:first-child span:nth-child(2){
    margin-left:0 !important;
    font-size:10px !important;
  }
  body.lobby-my #my-lobby-tables-list .mylobby-table-meta > div:nth-child(2){
    display:flex !important;
    align-items:center !important;
    gap:4px !important;
    flex-wrap:nowrap !important;
    font-size:11px !important;
    line-height:1.25 !important;
    margin-top:2px !important;
    min-width:0 !important;
    white-space:nowrap !important;
  }
  body.lobby-my #my-lobby-tables-list .mylobby-table-meta > div:nth-child(2) > span:first-child{
    padding:1px 5px !important;
    font-size:9px !important;
    flex:0 0 auto !important;
  }
  body.lobby-my #my-lobby-tables-list .mylobby-table-meta > div:nth-child(2) > span:last-child{
    min-width:0 !important;
    white-space:nowrap !important;
    overflow:hidden !important;
    text-overflow:ellipsis !important;
  }
  body.lobby-my #my-lobby-tables-list .mylobby-table-status{
    grid-area:status !important;
    justify-self:end !important;
    align-self:end !important;
    text-align:right !important;
    min-width:92px !important;
    max-width:126px !important;
    font-size:11px !important;
    line-height:1.2 !important;
    white-space:nowrap !important;
    overflow:hidden !important;
    text-overflow:ellipsis !important;
  }
  body.lobby-my #my-lobby-tables-list .mylobby-row-actions{
    grid-area:actions !important;
    width:100% !important;
    display:flex !important;
    flex-wrap:nowrap !important;
    gap:4px !important;
    justify-content:space-between !important;
    align-items:stretch !important;
  }
  body.lobby-my #my-lobby-tables-list .mylobby-row-actions button{
    width:auto !important;
    min-width:0 !important;
    height:34px !important;
    padding:6px 5px !important;
    font-size:10px !important;
    line-height:1.1 !important;
    text-align:center !important;
    white-space:nowrap !important;
    overflow:hidden !important;
    text-overflow:ellipsis !important;
    border-radius:7px !important;
    flex:1 1 0 !important;
  }
  body.lobby-my #my-lobby-tables-list .mylobby-row-actions .mylobby-action-bot-add,
  body.lobby-my #my-lobby-tables-list .mylobby-row-actions .mylobby-action-bot-hours{
    flex:.86 1 0 !important;
    padding-left:3px !important;
    padding-right:3px !important;
    font-size:9.5px !important;
  }
  body.lobby-my #my-lobby-tables-list .mylobby-row-actions .mylobby-action-delete{
    flex:0 0 36px !important;
    padding-left:0 !important;
    padding-right:0 !important;
    font-size:12px !important;
  }

  /* мобильное лобби: компактный номер версии без отдельной строки футера */
  body.lobby-my #screen-lobby .app-footer,
  body.lobby-global #screen-lobby .app-footer{
    display:block !important;
    position:fixed !important;
    left:auto !important;
    right:calc(8px + env(safe-area-inset-right)) !important;
    bottom:calc(4px + env(safe-area-inset-bottom)) !important;
    width:auto !important;
    margin:0 !important;
    padding:3px 7px !important;
    border:1px solid rgba(232,200,115,.22);
    border-radius:999px;
    background:rgba(5,10,14,.72);
    color:#7f8a9b !important;
    font-size:0 !important;
    line-height:1 !important;
    letter-spacing:0 !important;
    opacity:.82 !important;
    pointer-events:none;
    z-index:90;
  }
  body.lobby-my #screen-lobby .app-footer .app-version,
  body.lobby-global #screen-lobby .app-footer .app-version{
    color:#a8b3c2;
    font-family:var(--f-mono);
    font-size:9px !important;
    font-weight:700;
  }
  body.lobby-my #screen-lobby .app-footer .app-version::before,
  body.lobby-global #screen-lobby .app-footer .app-version::before{ content:'v'; }
}

/* Mobile report is a fixed viewport shell; wide data tables scroll inside it. */
@media (max-width:760px){
  #screen-lobby-report{
    width:100vw !important;
    max-width:100vw !important;
    min-width:0 !important;
    padding:12px !important;
    gap:10px !important;
    overflow:hidden !important;
  }
  #screen-lobby-report > div:first-child{
    display:grid !important;
    grid-template-columns:minmax(0,1fr) auto !important;
    gap:8px !important;
    align-items:start !important;
    margin-bottom:2px !important;
    padding-bottom:10px !important;
  }
  #lobby-report-title{
    font-size:17px !important;
    line-height:1.2 !important;
    letter-spacing:0 !important;
  }
  #screen-lobby-report > div:first-child > div:last-child{
    display:grid !important;
    grid-template-columns:repeat(2,44px) !important;
    gap:6px !important;
  }
  #screen-lobby-report > div:first-child > div:last-child button{
    width:44px !important;
    height:44px !important;
    padding:5px !important;
    overflow:hidden !important;
    font-size:0 !important;
  }
  #screen-lobby-report > div:first-child > div:last-child button:first-child::before{
    content:'\21BB';
    font-size:20px;
  }
  #lobby-report-back-btn::before{
    content:'\2190';
    font-size:22px;
  }
  #lobby-report-tabs{
    display:grid !important;
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
    gap:6px !important;
    width:100% !important;
    margin-bottom:2px !important;
  }
  #lobby-report-tabs .owner-tab{
    min-width:0 !important;
    min-height:42px !important;
    padding:7px 8px !important;
    font-size:11px !important;
    white-space:normal !important;
  }
  #lobby-report-period{
    width:100% !important;
    min-width:0 !important;
    gap:6px !important;
    margin-bottom:2px !important;
  }
  #lobby-report-period label{
    min-width:0 !important;
    max-width:100% !important;
  }
  #lobby-report-period input{
    min-width:0 !important;
    max-width:calc(100vw - 54px) !important;
  }
  #lobby-report-content{
    width:100% !important;
    min-width:0 !important;
    overflow:auto !important;
    overscroll-behavior:contain;
    touch-action:pan-x pan-y;
  }
  #lobby-report-content .owner-table{
    width:max-content !important;
    min-width:620px;
  }
}

/* ═════════════════════ M3. ОБЩЕЕ ЛОББИ ═════════════════════
   Мокап: шапка та же; список столов скроллится; ВЫБРАННЫЙ СТОЛ —
   закреплённая нижняя панель (превью-колонка становится bottom-sheet);
   правила скрыты (есть на столе), отчёт своего лобби остаётся доступен. */
@media (max-width:760px){

  /* правила в общем лобби не дублируем — они есть на столе */
  body.lobby-global #btn-rules{ display:none !important; }
  body.lobby-global #btn-lobby-report{ display:block !important; }
  /* Пять действий раскладываются без вложенного flex: 2×2 + полноширинный
     переключатель. Так длинные локализованные подписи не зажимают бонус. */
  body.lobby-global #lobby-left-col{
    display:grid !important;
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
    align-items:stretch;
    gap:7px !important;
  }
  body.lobby-global #lobby-left-col .user-badge{ grid-column:1 / -1; }
  body.lobby-global #lobby-nav-buttons{ display:contents !important; }
  body.lobby-global #btn-get-chips,
  body.lobby-global #lobby-nav-buttons > button,
  body.lobby-global #lobby-toggle-btn{
    width:100% !important;
    min-width:0 !important;
    min-height:46px;
    box-sizing:border-box;
    margin:0 !important;
    padding:8px 7px !important;
    font-size:11px !important;
    line-height:1.25;
    text-align:center !important;
    white-space:normal;
  }
  body.lobby-global #lobby-toggle-btn{ grid-column:1 / -1; }

  /* список столов: скроллится ВНУТРИ, нижняя панель закреплена */
  body.lobby-global #screen-lobby{ overflow:hidden !important; }
  body.lobby-global #lobby-main-col{ flex:1 1 auto !important; min-height:0 !important; }
  body.lobby-global #lobby-main-panel{ overflow:hidden !important; max-height:none !important; height:100%; }
  body.lobby-global #tab-global-content{ min-height:0 !important; }
  body.lobby-global #global-tables-rows{ overflow-y:auto !important; min-height:0 !important; }

  /* строки столов: компактная сетка (Тип/Стол/Лимит/Игроки) */
  body.lobby-global #global-tables-rows > div{
    grid-template-columns:30px minmax(0,1fr) .72fr .48fr !important;
    padding:8px 9px !important; font-size:11px !important;
  }
  body.lobby-global #global-tables-rows > div > div:nth-child(4){ grid-column:1 !important; grid-row:1 !important; }
  body.lobby-global #global-tables-rows > div > div:nth-child(1){ grid-column:2 !important; grid-row:1 !important; min-width:0; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  body.lobby-global #global-tables-rows > div > div:nth-child(2){ grid-column:3 !important; grid-row:1 !important; white-space:nowrap; }
  body.lobby-global #global-tables-rows > div > div:nth-child(3){ grid-column:4 !important; grid-row:1 !important; white-space:nowrap; text-align:right; }
  body.lobby-global #global-tables-rows > div > div:nth-child(5){ display:none !important; }
  body.lobby-global #global-tables-rows .global-table-type{
    width:24px; height:24px; border-radius:50%; display:flex; align-items:center; justify-content:center;
    background:rgba(232,200,115,.12); border:1px solid rgba(232,200,115,.28);
    font-size:13px !important; color:#e8c873 !important; letter-spacing:0 !important; text-transform:none !important;
  }
  body.lobby-global #tab-global-content > div:first-child{
    grid-template-columns:30px minmax(0,1fr) .72fr .48fr !important; font-size:9.5px !important;
  }
  body.lobby-global #tab-global-content > div:first-child > div:nth-child(4){ grid-column:1 !important; grid-row:1 !important; }
  body.lobby-global #tab-global-content > div:first-child > div:nth-child(1){ grid-column:2 !important; grid-row:1 !important; }
  body.lobby-global #tab-global-content > div:first-child > div:nth-child(2){ grid-column:3 !important; grid-row:1 !important; }
  body.lobby-global #tab-global-content > div:first-child > div:nth-child(3){ grid-column:4 !important; grid-row:1 !important; text-align:right; }
  body.lobby-global #tab-global-content > div:first-child > div:nth-child(5){ display:none !important; }

  /* ── ПРЕВЬЮ ВЫБРАННОГО СТОЛА: закреплённая нижняя панель (мокап .detail) ── */
  body.lobby-global #lobby-preview-col{
    display:flex !important;
    position:fixed; left:0; right:0; bottom:0; top:auto;
    width:auto !important; max-height:42vh;
    z-index:120;
    padding:0 8px calc(6px + env(safe-area-inset-bottom));
    pointer-events:none; /* пустая зона не перехватывает тапы */
  }
  body.lobby-global #global-table-preview{
    pointer-events:auto;
    width:100%;
    background:linear-gradient(180deg,rgba(9,14,17,.94),rgba(7,10,13,.99)) !important;
    border:1px solid rgba(232,200,115,.35) !important;
    border-radius:14px 14px 10px 10px !important;
    box-shadow:0 -12px 32px rgba(0,0,0,.55);
    padding:9px 11px !important;
    max-height:42vh; overflow-y:auto !important;
  }
  body.lobby-global #global-preview-empty{ padding:8px !important; font-size:11.5px !important; }
  body.lobby-global #gp-title{ font-size:14px !important; }
  body.lobby-global #gp-limits{ font-size:11px !important; }
  body.lobby-global #gp-shoe{ font-size:10px !important; margin-top:2px !important; }
  /* скролл до ПОСЛЕДНЕГО стола при открытой панели: запас = max-height панели */
  body.lobby-global #global-tables-rows{ padding-bottom:48vh !important; scroll-padding-bottom:48vh !important; }
  body.lobby-global.gp-collapsed #global-tables-rows{ padding-bottom:10px !important; }
  body.lobby-global.gp-collapsed #lobby-preview-col{ display:none !important; }
  /* крестик закрытия превью — только на мобиле */
  body.lobby-global #gp-close-btn{
    display:flex !important; position:absolute; top:6px; right:6px; z-index:5;
    width:30px; height:30px; align-items:center; justify-content:center;
    background:rgba(255,255,255,.08); border:1px solid rgba(255,255,255,.15);
    border-radius:8px; color:#a8b3c2; font-size:15px; font-weight:900; cursor:pointer;
  }
  body.lobby-global #global-table-preview{ position:relative; }

  /* версия в общем лобби использует общий compact-badge из блока M2 */
}
