/* App-only compact game layout. Desktop and the regular mobile website are untouched. */
@media (max-width: 700px) {
  html:has(body.gx-mobile-game),
  body.gx-mobile-game {
    width: 100%;
    height: 100%;
    min-height: 100%;
    overflow: hidden !important;
    overscroll-behavior: none;
    background: #07111e;
  }

  body.gx-mobile-game .header,
  body.gx-mobile-game .footer,
  body.gx-mobile-game .mobile-menu,
  body.gx-mobile-game .winter,
  body.gx-mobile-game .cms-game-page-header,
  body.gx-mobile-game .bj-head,
  body.gx-mobile-game .bc-head,
  body.gx-mobile-game .pc-head,
  body.gx-mobile-game .er-head,
  body.gx-mobile-game .th-head,
  body.gx-mobile-game .ppct-head,
  body.gx-mobile-game .dd-head,
  body.gx-mobile-game .hk-header,
  body.gx-mobile-game .ttt__top,
  body.gx-mobile-game .sl__hero,
  body.gx-mobile-game .gf-heading,
  body.gx-mobile-game .cr-game__topbar,
  body.gx-mobile-game .fishing-head,
  body.gx-mobile-game .db-topbar,
  body.gx-mobile-game .eog-topbar,
  body.gx-mobile-game .dv-topbar,
  body.gx-mobile-game .ff-topbar,
  body.gx-mobile-game .wcs-topbar,
  body.gx-mobile-game .gx-bg__tablehead,
  body.gx-mobile-game .gx-bg__back {
    display: none !important;
  }

  body.gx-mobile-game #_ajax_content_ {
    width: 100vw !important;
    height: 100dvh !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
  }

  body.gx-mobile-game button,
  body.gx-mobile-game input {
    min-height: 34px !important;
  }

  /* Blackjack: a single, uncluttered table for the app WebView. */
  body.gx-mobile-game .bj {
    position: relative !important;
    left: auto !important;
    width: 100% !important;
    max-width: none !important;
    height: 100% !important;
    margin: 0 !important;
    padding: 3px !important;
    transform: none !important;
    overflow: hidden;
  }
  body.gx-mobile-game .bj-cabinet {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    border: 0;
    border-radius: 18px;
    background: #073221;
    box-shadow: inset 0 0 0 1px #ffffff17;
  }
  body.gx-mobile-game .bj-table {
    width: 100%;
    height: 100% !important;
    min-height: 0;
    border-radius: 18px;
    background-position: center top;
  }
  body.gx-mobile-game .bj-table::before {
    background: radial-gradient(circle at 50% 38%, transparent 8%, #00130c30 52%, #02060bd9 100%);
  }
  body.gx-mobile-game .bj-shoe {
    top: 16px;
    right: 5%;
    width: 54px;
    height: 72px;
    opacity: .72;
  }
  body.gx-mobile-game .bj-shoe i {
    left: 11px;
    top: 11px;
    width: 32px;
    height: 47px;
  }
  body.gx-mobile-game .bj-dealer { top: 15px; }
  body.gx-mobile-game .bj-player { bottom: 162px; }
  body.gx-mobile-game .bj-seat { width: 94%; }
  body.gx-mobile-game .bj-seat__label {
    margin-bottom: 4px;
    padding: 3px 9px;
    border: 0;
    background: #03100bb3;
  }
  body.gx-mobile-game .bj-hand {
    min-height: 91px;
    padding-left: 22px;
  }
  body.gx-mobile-game .bj-card {
    width: min(65px, 17vw);
    height: auto;
    aspect-ratio: 84 / 117;
    margin-left: -21px;
  }
  body.gx-mobile-game .bj-message {
    top: 45%;
    width: auto;
    min-width: min(270px, 80vw);
    max-width: 82vw;
    padding: 8px 13px;
    border: 0;
    border-radius: 20px;
    background: #020b08a6;
    box-shadow: 0 7px 20px #0005;
  }
  body.gx-mobile-game .bj-message small { display: none; }
  body.gx-mobile-game .bj-message strong {
    margin: 0;
    font-size: 11px;
    line-height: 1.5;
  }
  body.gx-mobile-game .bj-controls {
    position: absolute;
    z-index: 25;
    right: 5px;
    bottom: 5px;
    left: 5px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 5px;
    padding: 7px;
    border: 1px solid #ffffff1a;
    border-radius: 14px;
    background: linear-gradient(180deg, #07120cd9, #050b09f5);
    box-shadow: 0 -12px 35px #0008, inset 0 1px #ffffff13;
    backdrop-filter: blur(10px);
  }
  body.gx-mobile-game .bj-bet__head,
  body.gx-mobile-game .bj-rules,
  body.gx-mobile-game .bj-bottom {
    display: none !important;
  }
  body.gx-mobile-game .bj-bet {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
    gap: 5px;
  }
  body.gx-mobile-game .bj-betbox {
    height: 39px;
    border: 1px solid #d8b24d55;
    border-radius: 10px;
    background: #07100d;
  }
  body.gx-mobile-game .bj-betbox input { font-size: 15px; }
  body.gx-mobile-game .bj-betbox span { font-size: 8px; }
  body.gx-mobile-game .bj-betbox button {
    width: 35px;
    min-height: 37px !important;
  }
  body.gx-mobile-game .bj-chips {
    grid-template-columns: repeat(4, 1fr);
    gap: 3px;
    margin: 0;
  }
  body.gx-mobile-game .bj-chips button {
    min-width: 0;
    min-height: 39px !important;
    padding: 3px;
    border-radius: 10px;
  }
  body.gx-mobile-game .bj-chips button i { display: none; }
  body.gx-mobile-game .bj-chips button b { font-size: 10px; }
  body.gx-mobile-game .bj-actions {
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;
  }
  body.gx-mobile-game .bj-action {
    height: 48px;
    min-height: 48px !important;
    padding: 3px 2px;
    border: 0;
    border-radius: 10px;
    font-size: 11px;
  }
  body.gx-mobile-game .bj-action small {
    margin-top: 1px;
    font-size: 6px;
  }
  body.gx-mobile-game .bj-result {
    right: 8px;
    bottom: 165px;
    left: 8px;
  }
  body.gx-mobile-game .bj-result > div {
    width: 100%;
    min-width: 0;
    padding: 9px 12px;
  }
  body.gx-mobile-game .bj-result p { display: none; }

  /* Video Poker and Three Card Poker: table + controls, without documentation cards. */
  body.gx-mobile-game .gx-cardgame {
    width: 100% !important;
    max-width: none !important;
    height: 100% !important;
    margin: 0 !important;
    padding: 3px !important;
    overflow: hidden;
  }
  body.gx-mobile-game .pc-head,
  body.gx-mobile-game .pc-bottom,
  body.gx-mobile-game .vp-paytable,
  body.gx-mobile-game .tcp-rules { display: none !important; }
  body.gx-mobile-game .pc-shell {
    height: 100%;
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
    overflow: hidden;
    border: 0;
    border-radius: 18px;
  }
  body.gx-mobile-game .pc-stage,
  body.gx-mobile-game .vp-layout,
  body.gx-mobile-game .vp-table,
  body.gx-mobile-game .tcp-stage {
    min-height: 0 !important;
    height: 100% !important;
  }
  body.gx-mobile-game .vp-layout { display: block; }
  body.gx-mobile-game .vp-table {
    display: flex;
    padding: 42px 7px 8px;
  }
  body.gx-mobile-game .pc-eyebrow {
    top: 10px;
    max-width: 88%;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  body.gx-mobile-game .vp-cards { gap: 3px; }
  body.gx-mobile-game .vp-hold {
    min-height: 35px !important;
    margin-top: 3px;
    padding: 2px;
  }
  body.gx-mobile-game .pc-message {
    min-height: 35px;
    margin-top: 8px;
    padding: 5px 10px;
    border: 0;
    border-radius: 18px;
    background: #03100cc4;
  }
  body.gx-mobile-game .pc-controls {
    grid-template-columns: minmax(0, 1fr) minmax(0, .95fr) !important;
    gap: 5px;
    padding: 7px;
    border: 1px solid #ffffff18;
    border-radius: 14px;
    background: #07100deb;
  }
  body.gx-mobile-game .pc-field label { display: none; }
  body.gx-mobile-game .pc-input { height: 38px; }
  body.gx-mobile-game .pc-input button { min-width: 35px; }
  body.gx-mobile-game .pc-chips { gap: 3px; margin-top: 4px; }
  body.gx-mobile-game .pc-chips button { min-height: 34px !important; }
  body.gx-mobile-game .pc-actions { gap: 4px; }
  body.gx-mobile-game .pc-action { min-height: 76px !important; }
  body.gx-mobile-game .tcp-stage { padding: 9px 5px 8px; }
  body.gx-mobile-game .tcp-seat--player { margin-top: 42px; }
  body.gx-mobile-game .tcp-hand { width: min(100%, 290px); gap: 5px; }
  body.gx-mobile-game .tcp-label { margin-bottom: 4px; padding: 3px 9px; }
  body.gx-mobile-game .tcp-controls { grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr) !important; }
  body.gx-mobile-game .tcp-controls .pc-fields { grid-template-columns: 1fr 1fr; gap: 4px; }
  body.gx-mobile-game .tcp-actions { grid-template-columns: repeat(3, 1fr); }
  body.gx-mobile-game .tcp-actions .pc-primary { grid-column: auto; }
  body.gx-mobile-game .tcp-actions .pc-action { min-height: 76px !important; padding: 2px; font-size: 10px; }

  /* Texas Hold'em */
  body.gx-mobile-game .th {
    left: auto !important;
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    padding: 3px !important;
    transform: none !important;
    overflow: hidden;
  }
  body.gx-mobile-game .th-head { display: none !important; }
  body.gx-mobile-game .th-head small { display: none; }
  body.gx-mobile-game .th-head h1 { font-size: 14px; }
  body.gx-mobile-game .th-head h1 em { font-size: 9px; }
  body.gx-mobile-game .th-head button { height: 32px; min-height: 32px !important; }
  body.gx-mobile-game .th-layout { height: 100%; grid-template-rows: minmax(0, 1fr) auto; gap: 4px; overflow: hidden; }
  body.gx-mobile-game .th-table { min-height: 0 !important; height: auto; border-radius: 0 0 12px 12px; }
  body.gx-mobile-game .th-op { top: 8px; }
  body.gx-mobile-game .th-me { bottom: 8px; }
  body.gx-mobile-game .th-seat { min-width: 220px; padding: 4px 7px; }
  body.gx-mobile-game .th-avatar { width: 34px; height: 34px; }
  body.gx-mobile-game .th-card { width: 38px; height: 53px; }
  body.gx-mobile-game .th-hand { height: 55px; }
  body.gx-mobile-game .th-board { height: 64px; }
  body.gx-mobile-game .th-board > i,
  body.gx-mobile-game .th-board .th-card { width: 43px; height: 60px; }
  body.gx-mobile-game .th-side { grid-template-columns: 1fr 1fr; gap: 4px; max-height: 205px; padding-top: 0; overflow: auto; }
  body.gx-mobile-game .th-side section { padding: 7px; border-radius: 9px; }
  body.gx-mobile-game .th-info { display: none; }
  body.gx-mobile-game .th-input { height: 35px; }
  body.gx-mobile-game .th-chips { margin: 4px 0; }
  body.gx-mobile-game .th-chips button { height: 30px; min-height: 30px !important; }
  body.gx-mobile-game .th-find { height: 35px; }
  body.gx-mobile-game .th-private { height: 30px; min-height: 30px !important; margin-top: 3px; }
  body.gx-mobile-game .th-code-entry { margin-top: 3px; }
  body.gx-mobile-game .th-code-entry input { height: 31px; min-height: 31px !important; }
  body.gx-mobile-game .th-turn { padding: 5px; }
  body.gx-mobile-game .th-action-grid { margin: 4px 0; }
  body.gx-mobile-game .th-action-grid button { height: 38px; min-height: 38px !important; }
  body.gx-mobile-game .th-raise { padding-top: 4px; }
  body.gx-mobile-game .th-raise button { height: 32px; min-height: 32px !important; }
  body.gx-mobile-game .th:not(.is-live) .th-actions { display: none !important; }
  body.gx-mobile-game .th-side { grid-template-columns: 1fr; }
  body.gx-mobile-game .th:not(.is-live) .th-side { overflow: hidden; }
  body.gx-mobile-game .th-buy header { display: none; }
  body.gx-mobile-game .th-invite[hidden] { display: none !important; }

  /* Five-card, Omaha and Teen Patti */
  body.gx-mobile-game .ppct { width: 100%; height: 100%; padding: 2px; overflow: hidden; }
  body.gx-mobile-game .ppct-head { display: none !important; }
  body.gx-mobile-game .ppct-back { min-width: 52px; min-height: 31px !important; }
  body.gx-mobile-game .ppct-head small,
  body.gx-mobile-game .ppct-head h1 em { display: none; }
  body.gx-mobile-game .ppct-layout { height: 100%; display: grid !important; grid-template-columns: 1fr !important; grid-template-rows: minmax(0, 1fr) auto !important; border-radius: 0; overflow: hidden !important; }
  body.gx-mobile-game .ppct-table { grid-row: 1; min-height: 0 !important; height: auto !important; order: 0 !important; }
  body.gx-mobile-game .ppct-op { top: 7px; }
  body.gx-mobile-game .ppct-me { bottom: 7px; }
  body.gx-mobile-game .ppct-card { width: min(52px, 15vw); margin-left: -15px; }
  body.gx-mobile-game .ppct-board .ppct-card { width: min(47px, 14vw); margin-left: -9px; }
  body.gx-mobile-game .ppct-side { grid-row: 2; display: grid !important; grid-template-columns: 1fr 1fr; gap: 4px; max-height: 210px; padding: 4px; overflow: auto; order: 0 !important; }
  body.gx-mobile-game .ppct-side section { margin: 0; padding: 7px; border-radius: 9px; }
  body.gx-mobile-game .ppct-info { display: none; }
  body.gx-mobile-game .ppct-input { height: 34px; }
  body.gx-mobile-game .ppct-chips { margin: 3px 0; }
  body.gx-mobile-game .ppct-chips button { min-height: 29px !important; }
  body.gx-mobile-game .ppct-find,
  body.gx-mobile-game .ppct-private,
  body.gx-mobile-game .ppct-actiongrid button,
  body.gx-mobile-game .ppct-raise button,
  body.gx-mobile-game .ppct-draw button { min-height: 34px !important; }
  body.gx-mobile-game .ppct-code input { height: 32px; min-height: 32px !important; }
  body.gx-mobile-game .ppct-turn { min-height: 29px; }
  body.gx-mobile-game .ppct-raise { margin-top: 3px; }

  /* Backgammon */
  body.gx-mobile-game .gx-bg { width: 100%; height: 100%; min-height: 0; margin: 0; padding: 0; overflow: hidden; }
  body.gx-mobile-game .gx-bg__chooser {
    padding: 16px;
    background:
      radial-gradient(circle at 50% 18%, rgba(199, 150, 70, .18), transparent 32%),
      linear-gradient(165deg, #18100d 0%, #080b14 48%, #050711 100%);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
  body.gx-mobile-game .gx-bg__chooser::before {
    width: min(430px, calc(100vw - 24px));
    height: min(438px, calc(100dvh - 34px));
    border: 1px solid rgba(222, 177, 91, .42);
    border-radius: 25px;
    background:
      linear-gradient(135deg, rgba(255, 255, 255, .045), transparent 38%),
      linear-gradient(160deg, #211611, #0a0e1b 52%, #080b16);
    box-shadow: 0 28px 70px rgba(0, 0, 0, .48), inset 0 0 0 4px rgba(94, 57, 25, .26);
  }
  body.gx-mobile-game .gx-bg__chooser-icon {
    display: grid;
    place-items: center;
    width: 66px;
    height: 66px;
    margin-bottom: 4px;
    border: 1px solid rgba(241, 204, 130, .5);
    border-radius: 20px;
    background: linear-gradient(145deg, #6d3b1d, #1c1210);
    box-shadow: inset 0 1px rgba(255, 255, 255, .16), 0 12px 30px rgba(0, 0, 0, .35);
    font-size: 34px;
  }
  body.gx-mobile-game .gx-bg__chooser h2 { margin-top: 5px; color: #fff6df; font-size: 27px; }
  body.gx-mobile-game .gx-bg__chooser > p { margin-bottom: 14px; color: #a99b88; }
  body.gx-mobile-game .gx-bg__mode { width: min(360px, calc(100vw - 48px)); gap: 9px; margin-bottom: 11px; }
  body.gx-mobile-game .gx-bg__mode button {
    min-height: 78px !important;
    padding: 13px 15px;
    border-color: rgba(220, 174, 88, .25);
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(78, 44, 24, .58), rgba(11, 16, 31, .96) 65%);
    box-shadow: inset 0 1px rgba(255, 255, 255, .05);
  }
  body.gx-mobile-game .gx-bg__mode button:active { transform: scale(.985); border-color: #d6a952; }
  body.gx-mobile-game .gx-bg__mode button > b { width: 39px; font-size: 29px; text-align: center; }
  body.gx-mobile-game .gx-bg__mode button span { color: #f7ead1; font-size: 13px; }
  body.gx-mobile-game .gx-bg__mode button small { color: #9b927f; font-size: 9px; }
  body.gx-mobile-game .gx-bg__back { display: none !important; }
  body.gx-mobile-game .gx-bg__layout { height: 100%; grid-template-rows: auto minmax(0, 1fr); gap: 4px; }
  body.gx-mobile-game .gx-bg__table {
    grid-row: 1;
    min-height: 0;
    align-self: start;
    border: 1px solid rgba(218, 170, 80, .48);
    border-radius: 16px;
    background: #130b08;
    box-shadow: 0 10px 28px rgba(0, 0, 0, .3), inset 0 0 0 3px rgba(72, 39, 20, .65);
  }
  body.gx-mobile-game .gx-bg__canvas-wrap { position: relative; padding: 3px; background: #130b08; }
  body.gx-mobile-game .gx-bg__canvas-wrap::before { display: none; }
  body.gx-mobile-game #bgBoard { border: 1px solid rgba(245, 215, 151, .25); border-radius: 14px; }
  body.gx-mobile-game .gx-bg__legend { display: none !important; }
  body.gx-mobile-game .gx-bg__boardbar {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 32px;
    border-bottom: 1px solid rgba(218, 170, 80, .24);
    background: #0d0a09;
  }
  body.gx-mobile-game .gx-bg__boardbar > .gx-bg__timer {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 94px;
    height: 25px;
    padding: 3px 10px;
    border: 1px solid rgba(240, 194, 104, .38);
    border-radius: 999px;
    background: #17100c;
    text-align: center;
  }
  body.gx-mobile-game .gx-bg__boardbar > .gx-bg__timer::before { content: "⏱"; font-size: 13px; }
  body.gx-mobile-game .gx-bg__boardbar > .gx-bg__timer small { color: #d2c4a8; font-size: 8px; }
  body.gx-mobile-game .gx-bg__boardbar > .gx-bg__timer strong { color: #79e7bb; font-size: 13px; }
  body.gx-mobile-game .gx-bg__boardbar > .gx-bg__timer.is-low { border-color: #ef596f; background: #410c17; }
  body.gx-mobile-game .gx-bg__canvas-wrap > #bgRoll {
    position: absolute;
    z-index: 7;
    top: 50%;
    left: 50%;
    display: block;
    width: auto;
    min-width: 142px;
    min-height: 46px !important;
    padding: 9px 18px;
    transform: translate(-50%, -50%);
    border: 1px solid #ffe3a6;
    border-radius: 999px;
    color: #261505;
    background: linear-gradient(135deg, #f6d07d, #c9862d);
    box-shadow: 0 9px 24px rgba(0, 0, 0, .4), inset 0 1px rgba(255, 255, 255, .45);
    font-size: 13px;
    font-weight: 900;
  }
  body.gx-mobile-game .gx-bg__canvas-wrap > #bgRoll:active { transform: translate(-50%, -50%) scale(.96); }
  body.gx-mobile-game .gx-bg__canvas-wrap > #bgRoll:disabled { display: none; }
  body.gx-mobile-game .gx-bg__panel {
    grid-row: 2;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    min-height: 0;
    max-height: 142px;
    height: auto;
    padding: 6px;
    overflow: auto;
    border-color: rgba(218, 170, 80, .22);
    border-radius: 14px;
    background: linear-gradient(155deg, #16131a, #090d19);
    box-shadow: none;
    align-content: start;
  }
  body.gx-mobile-game .gx-bg__players { grid-column: 1 / -1; gap: 4px; }
  body.gx-mobile-game .gx-bg__player { padding: 7px; border-radius: 10px; }
  body.gx-mobile-game .gx-bg__player.is-turn { border-color: rgba(225, 177, 82, .55); background: rgba(196, 141, 47, .12); box-shadow: none; }
  body.gx-mobile-game .gx-bg__status,
  body.gx-mobile-game .gx-bg__facts { margin: 0; }
  body.gx-mobile-game .gx-bg__status { padding: 8px; border-color: rgba(215, 166, 72, .18); background: rgba(107, 67, 30, .16); box-shadow: none; }
  body.gx-mobile-game .gx-bg__facts { grid-template-columns: repeat(3, 1fr); }
  body.gx-mobile-game .gx-bg__facts > div { padding: 6px 3px; border-color: rgba(255, 255, 255, .07); border-radius: 9px; background: #0a0d16; }
  body.gx-mobile-game .gx-bg__actions { grid-column: 1 / -1; display: flex; gap: 4px; }
  body.gx-mobile-game .gx-bg__actions button { flex: 1; padding: 5px !important; font-size: 9px; }
  body.gx-mobile-game .gx-bg__actions button:disabled { display: none; }
  body.gx-mobile-game #gxBackgammon[data-mode="bot"] #bgResign { display: none; }
  body.gx-mobile-game #gxBackgammon[data-mode="online"] #bgUndo,
  body.gx-mobile-game #gxBackgammon[data-mode="online"] #bgNew { display: none; }
  body.gx-mobile-game .gx-bg__actions button,
  body.gx-mobile-game .gx-bg__change,
  body.gx-mobile-game .gx-bg__presets button,
  body.gx-mobile-game .gx-bg__bet button { min-height: 32px !important; }
  body.gx-mobile-game .gx-bg__escrow,
  body.gx-mobile-game .gx-bg__rules { display: none; }

  /* Dice Duel */
  body.gx-mobile-game .dd { width: 100%; height: 100%; margin: 0; padding: 3px; overflow: hidden; }
  body.gx-mobile-game .dd-head { display: none !important; }
  body.gx-mobile-game .dd-head small,
  body.gx-mobile-game .dd-head > span { display: none; }
  body.gx-mobile-game .dd-shell { height: 100%; display: grid; grid-template-rows: minmax(0, 1fr) auto; gap: 4px; overflow: hidden; }
  body.gx-mobile-game .dd-arena { min-height: 0 !important; }
  body.gx-mobile-game .dd-panel { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; max-height: 195px; padding: 4px; overflow: auto; }
  body.gx-mobile-game .dd-panel section { padding: 7px; }
  body.gx-mobile-game .dd-rules { display: none; }
  body.gx-mobile-game .dd-die { width: 48px; height: 48px; }
  body.gx-mobile-game .dd-match,
  body.gx-mobile-game .dd-private { min-height: 34px !important; }

  /* Rock Paper Scissors */
  body.gx-mobile-game #_ajax_content_ > .wrapper { width: 100% !important; max-width: none !important; height: 100%; margin: 0 !important; padding: 3px !important; overflow: hidden; }
  body.gx-mobile-game .rps-layout { height: 100%; margin-top: 0 !important; display: grid !important; grid-template-rows: minmax(0, 1fr) auto; gap: 4px !important; }
  body.gx-mobile-game .rps-arena-panel { grid-row: 1; min-height: 0; }
  body.gx-mobile-game .rps-left-panel { grid-row: 2; width: 100% !important; max-height: 205px; display: grid !important; grid-template-columns: 1fr 1fr; gap: 4px !important; overflow: auto; }
  body.gx-mobile-game .rps-left-panel .bx-input { padding: 6px !important; margin: 0 !important; }
  body.gx-mobile-game #rpsRooms { max-height: 70px !important; }
  body.gx-mobile-game #rpsPk { gap: 5px !important; padding: 6px !important; }
  body.gx-mobile-game #rpsPk button { min-height: 42px !important; padding: 5px !important; }

  /* Snakes & Ladders */
  body.gx-mobile-game .sl { width: 100%; height: 100%; min-height: 0; padding: 3px; overflow: hidden; }
  body.gx-mobile-game .sl__hero { display: none !important; }
  body.gx-mobile-game .sl__hero h1 { font-size: 18px; }
  body.gx-mobile-game .sl__eyebrow,
  body.gx-mobile-game .sl__hero p { display: none; }
  body.gx-mobile-game .sl__layout { height: 100%; margin: 0 !important; padding: 0 !important; grid-template-rows: minmax(0, 1fr) auto; gap: 4px; }
  body.gx-mobile-game .sl__stage { grid-row: 1; min-height: 0; display: grid; grid-template-rows: 31px minmax(0, 1fr); }
  body.gx-mobile-game .sl__stage-head { height: 31px; }
  body.gx-mobile-game .sl__board-wrap { align-self: center; width: min(100%, calc(100dvh - 190px)); height: auto; max-width: 100%; aspect-ratio: 1; padding: 4px; }
  body.gx-mobile-game .sl__paths { inset: 4px; width: calc(100% - 8px); height: calc(100% - 8px); }
  body.gx-mobile-game .sl__panel { grid-row: 2; display: grid; grid-template-columns: 1fr 1fr; gap: 4px; max-height: 200px; padding: 5px; overflow: auto; }
  body.gx-mobile-game .sl__players { grid-template-columns: 1fr 1fr; gap: 4px; }
  body.gx-mobile-game .sl__fair,
  body.gx-mobile-game .sl__rules,
  body.gx-mobile-game .sl__legend { display: none; }
  body.gx-mobile-game .sl__roll { min-height: 50px !important; }

  /* Tic Tac Toe */
  body.gx-mobile-game .ttt { width: 100%; height: 100%; min-height: 0; margin: 0; padding: 3px; overflow: hidden; }
  body.gx-mobile-game .ttt__shell { height: 100%; display: flex; flex-direction: column; }
  body.gx-mobile-game .ttt__top { display: none !important; }
  body.gx-mobile-game .ttt__top h1 { font-size: 17px; }
  body.gx-mobile-game .ttt__eyebrow { display: none; }
  body.gx-mobile-game .ttt__back { min-height: 31px !important; padding: 0 8px; }
  body.gx-mobile-game .ttt__layout { flex: 1; min-height: 0; grid-template-rows: minmax(0, 1fr) auto; gap: 4px; }
  body.gx-mobile-game .ttt__arena { order: 1; min-height: 0; padding: 5px; }
  body.gx-mobile-game .ttt__players { margin-bottom: 4px; }
  body.gx-mobile-game .ttt__player { padding: 4px; }
  body.gx-mobile-game .ttt__mark { width: 31px; height: 31px; flex-basis: 31px; }
  body.gx-mobile-game .ttt__board-wrap { width: min(45dvh, 100%); padding: 4px; }
  body.gx-mobile-game .ttt__board { gap: 4px; }
  body.gx-mobile-game .ttt__cell { min-height: 42px; border-radius: 9px; }
  body.gx-mobile-game .ttt__status { min-height: 34px; margin-top: 4px; padding: 4px; }
  body.gx-mobile-game .ttt__panel { order: 2; max-height: 185px; padding: 6px; overflow: auto; }
  body.gx-mobile-game .ttt__muted { margin-bottom: 5px; line-height: 1.4; }
  body.gx-mobile-game .ttt__modes { gap: 4px; }
  body.gx-mobile-game .ttt__mode { min-height: 55px; padding: 6px; }
  body.gx-mobile-game .ttt__mode-icon { margin-bottom: 2px; }

  /* Hokm */
  body.gx-mobile-game .gx-hokm { width: 100%; height: 100%; margin: 0; padding: 3px; overflow: hidden; }
  body.gx-mobile-game .hk-header { display: none !important; }
  body.gx-mobile-game .hk-brand small,
  body.gx-mobile-game .hk-online { display: none; }
  body.gx-mobile-game .hk-brand h1 { font-size: 15px; }
  body.gx-mobile-game .hk-layout { height: 100%; grid-template-rows: minmax(0, 1fr) auto; gap: 4px; overflow: hidden; }
  body.gx-mobile-game .hk-arena { min-height: 0; height: auto; }
  body.gx-mobile-game .hk-side { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; max-height: 205px; padding-top: 0; overflow: auto; }
  body.gx-mobile-game .hk-panel { padding: 6px; border-radius: 9px; }
  body.gx-mobile-game .hk-panel header { margin-bottom: 4px; }
  body.gx-mobile-game .hk-log-panel { display: none; }
  body.gx-mobile-game .hk-action { min-height: 34px !important; padding: 5px; }
  body.gx-mobile-game .hk-action-icon { width: 27px; height: 27px; }
  body.gx-mobile-game .hk-entry-grid { margin-top: 4px; gap: 3px; }
  body.gx-mobile-game .hk-join { height: 32px; margin-top: 4px; }
}

/* App-only visual audit pass: repair controls that still inherited desktop sizing. */
@media (max-width: 700px) {
  /* Dice: desktop's generic span rule also styled the nested digit spans. */
  body.gx-mobile-game .dice__center {
    width: 156px !important;
    height: 96px !important;
    margin-top: -22px !important;
  }
  body.gx-mobile-game .dice__timer {
    width: 100%;
    height: 96px;
    direction: ltr;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  body.gx-mobile-game .dice__timer > span {
    width: 100%;
    min-width: 0 !important;
    height: 96px !important;
    min-height: 0 !important;
    padding: 0 !important;
  }
  body.gx-mobile-game .dice__slider,
  body.gx-mobile-game .dice__slider-inner {
    width: 100%;
  }
  body.gx-mobile-game .dice__slider { height: 96px; }
  body.gx-mobile-game .dice__slider-item {
    width: 100%;
    height: 96px !important;
    min-height: 0 !important;
  }
  body.gx-mobile-game .dice__slider-item > span {
    display: block !important;
    width: auto !important;
    height: auto !important;
    min-width: 0 !important;
    min-height: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    font-size: 38px !important;
    line-height: 1 !important;
  }
  body.gx-mobile-game .dice__timer::before {
    content: "";
    z-index: 4;
    bottom: 43px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    font-size: 0;
    line-height: 0;
    transform: translateX(-50%) !important;
  }

  /* Mines: keep both selectors readable instead of forcing 44px desktop chips. */
  body.gx-mobile-game .mines__left {
    height: 194px;
    max-height: 194px;
  }
  body.gx-mobile-game .mines__left > .bx-input:nth-child(2),
  body.gx-mobile-game .mines__left > .bx-input:nth-child(3) {
    height: 52px;
  }
  body.gx-mobile-game .mines__left > .bx-input:nth-child(2) .bx-input__input,
  body.gx-mobile-game .mines__left > .bx-input:nth-child(3) .bx-input__input {
    position: relative;
    height: 52px;
    min-height: 52px;
    padding: 14px 5px 3px !important;
  }
  body.gx-mobile-game .mines__left > .bx-input:nth-child(2) .bx-input__input > label,
  body.gx-mobile-game .mines__left > .bx-input:nth-child(3) .bx-input__input > label {
    position: absolute;
    inset: 2px 6px auto auto;
    display: block !important;
    color: #7180a6;
    font-size: 8px;
    line-height: 1.2;
    white-space: nowrap;
  }
  body.gx-mobile-game #BombMines { display: none !important; }
  body.gx-mobile-game .mines__left > .bx-input:nth-child(2) .bx-input__input > div,
  body.gx-mobile-game .mines__bomb {
    width: 100%;
    min-width: 0;
  }
  body.gx-mobile-game .mines__bomb {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 3px;
  }
  body.gx-mobile-game .mines__bomb a {
    width: 100% !important;
    min-width: 0 !important;
    height: 30px !important;
    min-height: 30px !important;
    padding: 0 !important;
    font-size: 10px;
  }

  /* Limbo: offer four useful quick values in each half-width control. */
  body.gx-mobile-game .limbo__left .x30__bet-placed {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 3px;
  }
  body.gx-mobile-game .limbo__left .x30__bet-placed a {
    width: 100% !important;
    min-width: 0 !important;
    min-height: 30px !important;
    padding: 3px 1px !important;
    font-size: 8px;
    white-space: nowrap;
  }
  body.gx-mobile-game #limboBetChips > :nth-child(3),
  body.gx-mobile-game #limboBetChips > :nth-child(4),
  body.gx-mobile-game #limboBetChips > :nth-child(7),
  body.gx-mobile-game #limboTargetChips > :nth-child(5),
  body.gx-mobile-game #limboTargetChips > :nth-child(6) { display: none !important; }
  body.gx-mobile-game .limbo__left > .bx-input:nth-child(2) label {
    max-width: 72px;
    overflow: hidden;
    color: #8190b6;
    font-size: 9px;
    white-space: nowrap;
  }

  /* Tower Legend: enlarge normal towers, but scale 8/10-floor boards to fit. */
  body.gx-mobile-game .tl__left > .bx-input:nth-child(2) .bx-input__input > label {
    display: none !important;
  }
  body.gx-mobile-game .tl__selector {
    width: 100%;
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 3px;
  }
  body.gx-mobile-game .tl-sel {
    width: 100%;
    min-width: 0 !important;
    height: 34px;
    padding: 0 !important;
  }
  body.gx-mobile-game .tl__tower-wrap { padding: 2px; }
  body.gx-mobile-game .tl__tower { gap: 3px; }
  body.gx-mobile-game .tl-floor { gap: 4px; padding: 2px 4px; }
  body.gx-mobile-game .tl-floor-row { gap: 5px; }
  body.gx-mobile-game .tl-cell {
    width: 50px !important;
    height: 50px !important;
    border-radius: 11px;
  }
  body.gx-mobile-game .tl__tower:has(.tl-floor:nth-child(8)) .tl-cell {
    width: 35px !important;
    height: 35px !important;
  }
  body.gx-mobile-game .tl__tower:has(.tl-floor:nth-child(10)) .tl-cell {
    width: 27px !important;
    height: 27px !important;
  }

  /* Dice Duel: keep player labels, prize, status and roll action in separate zones. */
  body.gx-mobile-game .dd-arena {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    padding: 82px 8px 118px;
  }
  body.gx-mobile-game .dd-player { align-self: start; }
  body.gx-mobile-game .dd-avatar {
    width: 60px;
    height: 60px;
    border-radius: 17px;
  }
  body.gx-mobile-game .dd-player h2 {
    max-width: 140px;
    margin: 6px auto 0;
    overflow: hidden;
    font-size: 10px;
    line-height: 1.4;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  body.gx-mobile-game .dd-player > small { display: none; }
  body.gx-mobile-game .dd-player > strong { font-size: 20px; }
  body.gx-mobile-game .dd-dice-row { height: 58px; gap: 4px; }
  body.gx-mobile-game .dd-die { width: 45px; height: 45px; }
  body.gx-mobile-game .dd-die.is-empty { opacity: .08; }
  body.gx-mobile-game .dd-center {
    top: 57%;
    width: min(250px, 70%);
  }
  body.gx-mobile-game .dd-pot { padding: 6px 10px; }
  body.gx-mobile-game .dd-vs {
    width: 54px;
    height: 54px;
    margin: 7px auto 5px;
    font-size: 18px;
  }
  body.gx-mobile-game .dd-center > p {
    min-height: 28px;
    margin: 0;
    font-size: 9px;
    line-height: 1.55;
  }
  body.gx-mobile-game .dd-roll {
    min-width: 170px;
    height: 52px;
    margin-top: 6px;
  }

  /* Hokm: retain quick entry and public lobby without a clipped second row. */
  body.gx-mobile-game .hk-room-panel { display: none !important; }
  body.gx-mobile-game .hk-side {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow: hidden;
  }
  body.gx-mobile-game .hk-entry,
  body.gx-mobile-game .hk-lobby-panel {
    min-width: 0;
    max-height: 205px;
    overflow: auto;
  }
  body.gx-mobile-game .hk-entry header h2,
  body.gx-mobile-game .hk-lobby-panel header h2 { font-size: 10px; }

  /* Tic Tac Toe: pack the board and mode chooser as one continuous cabinet. */
  body.gx-mobile-game .ttt__layout {
    grid-template-rows: auto auto;
    align-content: center;
    gap: 8px;
  }
  body.gx-mobile-game .ttt__arena { flex: none; }
  body.gx-mobile-game .ttt__panel { max-height: 185px; }
}

@media (max-width: 370px) and (max-height: 720px) {
  body.gx-mobile-game .th-side,
  body.gx-mobile-game .ppct-side,
  body.gx-mobile-game .gx-bg__panel,
  body.gx-mobile-game .dd-panel,
  body.gx-mobile-game .rps-left-panel,
  body.gx-mobile-game .sl__panel,
  body.gx-mobile-game .ttt__panel,
  body.gx-mobile-game .hk-side { max-height: 175px; }
}

/* App-only second pass: keep the playfield dominant and dock essential controls. */
@media (max-width: 700px) {
  /* Premium PvP card games: show one useful panel at a time. */
  body.gx-mobile-game .ppct-side {
    grid-template-columns: 1fr;
  }
  body.gx-mobile-game .ppct:not(.is-live) .ppct-actions {
    display: none !important;
  }
  body.gx-mobile-game .ppct-buy header {
    display: none;
  }
  body.gx-mobile-game .ppct-invite[hidden] {
    display: none !important;
  }
  body.gx-mobile-game .ppct:not(.is-live) .ppct-side { overflow: hidden; }

  /* Plinko: the board is the table; controls are a compact dock below it. */
  body.gx-mobile-game #pl-app {
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 3px !important;
    gap: 4px !important;
    display: grid !important;
    grid-template-rows: minmax(0, 1fr) auto;
    border-radius: 0 !important;
    overflow: hidden;
  }
  body.gx-mobile-game #pl-app > div:first-child {
    grid-row: 2;
    width: 100% !important;
    max-height: 220px;
    padding: 7px;
    gap: 5px !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
    overflow: hidden;
    border: 1px solid #ffffff15;
    border-radius: 13px;
    background: #0b1022f2;
  }
  body.gx-mobile-game #pl-app > div:first-child > div:first-child,
  body.gx-mobile-game #pl-app > div:first-child > div:last-child {
    display: none !important;
  }
  body.gx-mobile-game #pl-app > div:first-child > div:nth-child(2) { grid-row: 1 / span 2; }
  body.gx-mobile-game #pl-app > div:first-child > div:nth-child(3) { grid-column: 2; }
  body.gx-mobile-game #pl-app > div:first-child > div:nth-child(4) { grid-column: 2; }
  body.gx-mobile-game #pl-app > div:first-child > button {
    grid-column: 1 / -1;
    min-height: 44px !important;
    padding: 7px 0 !important;
  }
  body.gx-mobile-game #pl-app > div:last-child {
    grid-row: 1;
    min-height: 0 !important;
    gap: 3px !important;
    overflow: hidden;
  }
  body.gx-mobile-game #pl-app > div:last-child > div:first-child {
    min-height: 32px;
    padding: 5px 9px !important;
  }
  body.gx-mobile-game #pl-app > div:last-child > div:nth-child(2) {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    flex: 1;
  }
  body.gx-mobile-game #pl-app > div:last-child > div:last-child {
    display: none !important;
  }
  body.gx-mobile-game #pModes { flex-wrap: nowrap !important; }
  body.gx-mobile-game .pgm { min-height: 31px; padding: 3px !important; }
  body.gx-mobile-game .pch { min-width: 0 !important; }
  body.gx-mobile-game #pBet {
    width: 1px;
    min-width: 0;
  }
  body.gx-mobile-game #pRows { width: 1px; min-width: 0; }
  body.gx-mobile-game #pl-app > div:first-child > div:nth-child(2) > div:nth-child(2) {
    gap: 2px !important;
    padding: 4px 5px !important;
  }

  /* Limbo: hero first, two concise inputs and the play button docked below. */
  body.gx-mobile-game .limbo {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 3px;
    overflow: hidden;
  }
  body.gx-mobile-game .limbo__top {
    height: 100%;
    min-height: 0;
    display: grid !important;
    grid-template-rows: minmax(0, 1fr) auto;
    gap: 4px;
    overflow: hidden;
  }
  body.gx-mobile-game .limbo__right {
    grid-row: 1;
    min-height: 0;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    gap: 4px;
    overflow: hidden;
  }
  body.gx-mobile-game .limbo__header-stats {
    min-height: 38px;
    padding: 5px 10px;
  }
  body.gx-mobile-game .limbo__header-stats > div:first-child > span,
  body.gx-mobile-game .limbo__right > .bx-input:last-child {
    display: none !important;
  }
  body.gx-mobile-game .limbo__display {
    height: auto !important;
    min-height: 0 !important;
  }
  body.gx-mobile-game .limbo__multiplier-wrapper { padding: 8px !important; }
  body.gx-mobile-game .limbo .limbo__multiplier { font-size: 64px !important; }
  body.gx-mobile-game .limbo__left {
    grid-row: 2;
    width: 100%;
    max-height: 210px;
    padding: 7px;
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 5px;
    overflow: hidden;
    border: 1px solid #ffffff12;
    border-radius: 13px;
    background: #0b101bf2;
  }
  body.gx-mobile-game .limbo__left > .bx-input:nth-child(3),
  body.gx-mobile-game .limbo__left > .bx-input:nth-child(5),
  body.gx-mobile-game .limbo__left > .bx-input:nth-child(6) {
    display: none !important;
  }
  body.gx-mobile-game .limbo__left > .bx-input { padding: 0; }
  body.gx-mobile-game .limbo__left > * { min-width: 0; }
  body.gx-mobile-game .limbo__left .bx-input__input { min-height: 34px; padding: 3px 8px; }
  body.gx-mobile-game .limbo__left .bx-input__input input { width: 1px; min-width: 0; }
  body.gx-mobile-game .limbo__left > .bx-input:nth-child(2) .bx-input__input > div { min-width: 0; }
  body.gx-mobile-game #limboTarget { width: 45px; }
  body.gx-mobile-game .limbo__left > button {
    grid-column: 1 / -1;
    min-height: 46px !important;
  }
  body.gx-mobile-game .limbo__left .x30__bet-placed a {
    min-width: 0;
    padding: 5px 2px;
    font-size: 9px;
  }

  /* Tower Legend: tower canvas fills the table, setup lives in the bottom dock. */
  body.gx-mobile-game .tl {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 3px;
    overflow: hidden;
  }
  body.gx-mobile-game .tl__top {
    height: 100%;
    min-height: 0;
    display: grid !important;
    grid-template-rows: minmax(0, 1fr) auto;
    gap: 4px;
    overflow: hidden;
  }
  body.gx-mobile-game .tl__right {
    grid-row: 1;
    min-height: 0;
    overflow: hidden;
  }
  body.gx-mobile-game .tl__header {
    min-height: 42px;
    margin: 0 0 4px;
    padding: 5px 9px;
  }
  body.gx-mobile-game .tl__header > div:first-child > div:last-child { display: none; }
  body.gx-mobile-game .tl__header-icon { font-size: 24px; }
  body.gx-mobile-game .tl__stat-label { display: none; }
  body.gx-mobile-game .tl__stat-value { font-size: 12px; }
  body.gx-mobile-game .tl__canvas {
    min-height: 0 !important;
    border-radius: 14px;
  }
  body.gx-mobile-game .tl__tower-wrap { padding: 6px; }
  body.gx-mobile-game .tl__right > .bx-input:last-child { display: none !important; }
  body.gx-mobile-game .tl__left {
    grid-row: 2;
    width: 100%;
    max-height: 190px;
    padding: 7px;
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 5px;
    overflow: hidden;
    border: 1px solid #ffffff12;
    border-radius: 13px;
    background: #0b101bf2;
  }
  body.gx-mobile-game .tl__left > .bx-input:nth-child(4),
  body.gx-mobile-game .tl__left > .bx-input:last-child { display: none !important; }
  body.gx-mobile-game .tl__left > .bx-input { padding: 0; }
  body.gx-mobile-game .tl__left > * { min-width: 0; }
  body.gx-mobile-game .tl__left > .bx-input:first-child .x30__bet-placed { display: none !important; }
  body.gx-mobile-game .tl__left .bx-input__input { min-height: 38px; padding: 3px 7px !important; }
  body.gx-mobile-game .tl__left > div:nth-child(3) { grid-column: 1 / -1; }
  body.gx-mobile-game .tl__left > div:nth-child(5) { grid-column: 1 / -1; }
  body.gx-mobile-game .tl__left > div:nth-child(3) .bx-input__input {
    display: block !important;
    padding: 3px !important;
  }
  body.gx-mobile-game .tl__left > div:nth-child(3) .bx-input__input > div:first-child {
    display: none !important;
  }
  body.gx-mobile-game .tl__mines-slider { gap: 3px; }
  body.gx-mobile-game .tl-mine-lvl { min-height: 36px; padding: 3px 2px; }
  body.gx-mobile-game .tl-mine-icon,
  body.gx-mobile-game .tl-mine-mines { display: none; }
  body.gx-mobile-game .tl__left button { min-height: 44px !important; }

  /* Mines and Dice: remove old page spacing and make one compact cabinet. */
  body.gx-mobile-game .mines {
    width: 100%;
    height: 100%;
    margin: 0 !important;
    padding: 3px;
    overflow: hidden;
  }
  body.gx-mobile-game .mines__wrapper {
    width: 100%;
    height: 100%;
    display: grid !important;
    grid-template-rows: minmax(0, 1fr) auto;
    gap: 4px;
    overflow: hidden;
    border-radius: 15px;
    background: #0b101b;
  }
  body.gx-mobile-game .mines__right {
    grid-row: 1;
    width: 100%;
    height: 100% !important;
    min-height: 0;
    display: grid;
    place-items: center;
    padding: 6px;
  }
  body.gx-mobile-game .mines__path { width: min(100%, 430px); }
  body.gx-mobile-game .mines__left {
    grid-row: 2;
    width: 100%;
    height: 184px;
    max-height: 184px;
    padding: 5px;
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    overflow: hidden;
  }
  body.gx-mobile-game .mines__left > .bx-input { width: 100%; margin: 0; padding: 0; }
  body.gx-mobile-game .mines__left > * { min-width: 0; }
  body.gx-mobile-game .mines__left .bx-input__input { min-height: 38px; padding: 3px 7px; }
  body.gx-mobile-game .mines__left .x30__bet-placed a { min-width: 0; padding: 4px 2px; font-size: 9px; }
  body.gx-mobile-game .mines__left > .bx-input:first-child .bx-input__input { height: 35px; min-height: 35px; }
  body.gx-mobile-game .mines__left > .bx-input:first-child .x30__bet-placed { height: 29px; }
  body.gx-mobile-game .mines__left > .bx-input:nth-child(2) .bx-input__input,
  body.gx-mobile-game .mines__left > .bx-input:nth-child(3) .bx-input__input { height: 42px; min-height: 42px; }
  body.gx-mobile-game .mines__left .start_block_mine .btn,
  body.gx-mobile-game .mines__left .mines__buttons .btn { min-height: 42px !important; }
  body.gx-mobile-game .mines__left > .bx-input:first-child { height: 64px; overflow: hidden; }
  body.gx-mobile-game .mines__left > .bx-input:nth-child(2),
  body.gx-mobile-game .mines__left > .bx-input:nth-child(3) { height: 42px; overflow: hidden; }
  body.gx-mobile-game .mines__left > .start_block_mine,
  body.gx-mobile-game .mines__left > .mines__buttons { height: 42px; overflow: hidden; }
  body.gx-mobile-game .mines__left > .bx-input:first-child,
  body.gx-mobile-game .mines__left > .mines__buttons,
  body.gx-mobile-game .mines__left > .start_block_mine { grid-column: 1 / -1; }
  body.gx-mobile-game .mines__left > .bx-input:last-child { display: none !important; }
  body.gx-mobile-game .mines__bonus { inset: 20% 3px auto; }
  body.gx-mobile-game #_ajax_content_ > .wrapper:has(.mines) + .wrapper { display: none; }
  body.gx-mobile-game .dice {
    width: 100%;
    height: 100%;
    margin: 0 !important;
    padding: 5px;
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
    gap: 5px;
    overflow: hidden;
  }
  body.gx-mobile-game .dice__drum {
    grid-row: 1;
    width: 100%;
    height: auto !important;
    min-height: 0;
    margin: 0;
  }
  body.gx-mobile-game .dice__bet {
    width: 100%;
    max-height: 235px;
    margin: 0;
    padding: 7px;
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 5px !important;
    overflow: hidden;
    border: 1px solid #ffffff12;
    border-radius: 14px;
    background: #0b101bf2;
  }
  body.gx-mobile-game .dice > .wrapper {
    grid-row: 2;
    width: 100%;
    max-width: none;
    height: auto !important;
    min-height: 0 !important;
    margin: 0;
    padding: 0;
    overflow: hidden;
  }
  body.gx-mobile-game .dice__bet > * { min-width: 0; }
  body.gx-mobile-game .dice__bet .bx-input__input { height: 40px; min-height: 40px; padding: 3px 7px; }
  body.gx-mobile-game .dice__bet .bx-input__input input { min-width: 0; }
  body.gx-mobile-game .dice__procent input,
  body.gx-mobile-game .dice__x input { width: 50px !important; }
  body.gx-mobile-game .dice__win input { width: 45px !important; }
  body.gx-mobile-game .dice__win .bx-input__input > div { flex: 1; min-width: 0; }
  body.gx-mobile-game .dice__bet > .dice__betting:nth-child(4) input { width: 100% !important; }
  body.gx-mobile-game .dice__chance { grid-column: 1 / -1; height: 58px; }
  body.gx-mobile-game .dice__range { height: 9px !important; }
  body.gx-mobile-game .dice__range::-webkit-slider-thumb { width: 22px !important; height: 22px !important; }
  body.gx-mobile-game .dice__select-chance a { min-height: 32px; padding: 5px; }
  body.gx-mobile-game .dice__bet > .dice__betting:nth-child(4) { grid-column: 1 / -1; }
  body.gx-mobile-game .dice__procent { grid-column: 1; grid-row: 1; }
  body.gx-mobile-game .dice__x { grid-column: 2; grid-row: 1; }
  body.gx-mobile-game .dice__win { grid-column: 3; grid-row: 1; }
  body.gx-mobile-game .dice__chance { grid-column: 1 / -1; grid-row: 2; }
  body.gx-mobile-game .dice__bet > .dice__betting:nth-child(4) { grid-column: 1 / -1; grid-row: 3; }
  body.gx-mobile-game .dice__bet > .dice__betting:nth-child(5) { grid-column: 1 / span 2; grid-row: 4; }
  body.gx-mobile-game .dice__bet > .dice__betting:nth-child(5) .x30__bet-placed a { min-width: 0 !important; min-height: 42px !important; padding: 4px !important; }
  body.gx-mobile-game .dice__play { grid-column: 3 !important; grid-row: 4; }
  body.gx-mobile-game .dice__play .btn { width: 100%; min-height: 42px !important; justify-content: center; }
  body.gx-mobile-game .dice__result { width: min(100%, 360px) !important; height: min(310px, 42dvh) !important; }

  /* Chicken Road: one cabinet, no duplicate history/fairness cards in the app. */
  body.gx-mobile-game .cr-game {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 3px;
    overflow: hidden;
  }
  body.gx-mobile-game .cr-cabinet {
    height: 100%;
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
    border-radius: 16px;
    box-shadow: none;
  }
  body.gx-mobile-game .cr-viewport { height: auto; min-height: 0; }
  body.gx-mobile-game .cr-vignette { box-shadow: inset 0 0 34px #0008; }
  body.gx-mobile-game .cr-round-hud,
  body.gx-mobile-game .cr-loader { backdrop-filter: none !important; }
  body.gx-mobile-game .cr-modes button.is-active,
  body.gx-mobile-game .cr-play { box-shadow: none; }
  body.gx-mobile-game .cr-deck { max-height: 300px; padding: 8px; gap: 7px; overflow: hidden; }
  body.gx-mobile-game .cr-deck label { margin-bottom: 4px; }
  body.gx-mobile-game .cr-meta { display: none !important; }

  /* Golden Fishing: game world first, compact casting controls below. */
  body.gx-mobile-game .fishing-game {
    width: 100%;
    height: 100%;
    max-width: none;
    margin: 0;
    padding: 3px;
    overflow: hidden;
  }
  body.gx-mobile-game .fishing-cabinet {
    height: 100%;
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 1fr) auto;
    gap: 4px;
  }
  body.gx-mobile-game .fishing-stage {
    grid-row: 1;
    order: 0;
    height: auto !important;
    min-height: 0;
    border-radius: 15px;
  }
  body.gx-mobile-game .fishing-controls {
    grid-row: 2;
    order: 0;
    max-height: 235px;
    padding: 7px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5px;
    overflow: hidden;
    border-radius: 14px;
  }
  body.gx-mobile-game .fishing-controls > * { min-width: 0; }
  body.gx-mobile-game .fish-control-block label { margin-bottom: 3px; }
  body.gx-mobile-game .fish-bet-input { height: 39px; }
  body.gx-mobile-game .fish-chips { gap: 3px; margin-top: 3px; }
  body.gx-mobile-game .fish-chips button,
  body.gx-mobile-game .fish-modes button { min-height: 32px !important; padding: 3px 1px; }
  body.gx-mobile-game .fish-modes { gap: 3px; }
  body.gx-mobile-game .fish-potential,
  body.gx-mobile-game .fish-depths { grid-column: 1 / -1; padding: 5px 8px; }
  body.gx-mobile-game .fish-main-action,
  body.gx-mobile-game .fish-cashout { min-height: 46px !important; }
  body.gx-mobile-game .fish-depths span { min-width: 0; padding: 4px 2px; }
  body.gx-mobile-game .fishing-bottom,
  body.gx-mobile-game #fishDebug { display: none !important; }
  body.gx-mobile-game #_ajax_content_ > .wrapper ~ .wrapper { display: none !important; }
  body.gx-mobile-game #_ajax_content_ > .dice + .wrapper,
  body.gx-mobile-game #_ajax_content_ > .mines + .wrapper { display: none !important; }
  }

  /* Bespoke slots: keep reels, win state and spin controls; hide promotional chrome. */
  body.gx-mobile-game .ff-root,
  body.gx-mobile-game #wildCrownSafariGame.wcs-root,
  body.gx-mobile-game .eog,
  body.gx-mobile-game .dv {
    width: 100%;
    height: 100%;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 3px !important;
    overflow: hidden !important;
    border-radius: 0;
  }
  body.gx-mobile-game .ff-stage,
  body.gx-mobile-game .wcs-stage {
    height: 100%;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto auto auto;
    gap: 3px;
    overflow: hidden;
  }
  body.gx-mobile-game .ff-jackpot-header,
  body.gx-mobile-game .wcs-jackpot-header,
  body.gx-mobile-game .ff-tools,
  body.gx-mobile-game .wcs-tools,
  body.gx-mobile-game .eog-jackpots,
  body.gx-mobile-game .eog-tools,
  body.gx-mobile-game .dv-hero,
  body.gx-mobile-game .dv-tools { display: none !important; }
  body.gx-mobile-game .ff-meters,
  body.gx-mobile-game .wcs-multiplier-strip { min-height: 38px; margin: 0; padding: 4px 7px; }
  body.gx-mobile-game .ff-cabinet-section,
  body.gx-mobile-game .wcs-cabinet-section { min-height: 0; overflow: hidden; }
  body.gx-mobile-game .ff-cabinet-frame,
  body.gx-mobile-game .wcs-cabinet-frame {
    height: 100%;
    padding: 4px;
    display: flex;
    align-items: center;
  }
  body.gx-mobile-game .ff-reels,
  body.gx-mobile-game .wcs-reels { width: 100%; }
  body.gx-mobile-game .ff-message,
  body.gx-mobile-game .wcs-message { min-height: 30px; margin: 0; padding: 4px 8px; }
  body.gx-mobile-game .ff-summary-bar,
  body.gx-mobile-game .wcs-summary-bar { margin: 0; gap: 3px; }
  body.gx-mobile-game .ff-stat-card,
  body.gx-mobile-game .wcs-stat-card { min-height: 40px; padding: 4px 6px; }
  body.gx-mobile-game .ff-controls,
  body.gx-mobile-game .wcs-controls {
    min-height: 116px;
    margin: 0;
    padding: 6px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 76px minmax(0, 1fr);
    gap: 5px;
  }
  body.gx-mobile-game .ff-bet-section,
  body.gx-mobile-game .ff-spin-section,
  body.gx-mobile-game .ff-options-section,
  body.gx-mobile-game .wcs-bet-section,
  body.gx-mobile-game .wcs-spin-section,
  body.gx-mobile-game .wcs-options-section { width: auto; }
  body.gx-mobile-game .ff-spin-section,
  body.gx-mobile-game .wcs-spin-section { order: 0; }
  body.gx-mobile-game .ff-options-section,
  body.gx-mobile-game .wcs-options-section { display: flex; flex-direction: column; gap: 3px; }
  body.gx-mobile-game .ff-spin-btn,
  body.gx-mobile-game .wcs-spin-btn { width: 72px; height: 72px; min-width: 72px; min-height: 72px !important; }
  body.gx-mobile-game .ff-control-label,
  body.gx-mobile-game .wcs-control-label { display: none; }
  body.gx-mobile-game .eog { display: grid; grid-template-rows: minmax(0, 1fr) auto; gap: 4px; }
  body.gx-mobile-game .eog-stage { min-height: 0; overflow: hidden; }
  body.gx-mobile-game .eog-stage__frame { height: 100%; display: flex; flex-direction: column; padding: 17px 4px 7px; }
  body.gx-mobile-game .eog-reels-wrap { flex: 1; min-height: 0; }
  body.gx-mobile-game .eog-controls { margin: 0; }
  body.gx-mobile-game .dv { display: grid; grid-template-rows: minmax(0, 1fr) auto; gap: 4px; }
  body.gx-mobile-game .dv-stage { min-height: 0; margin: 0; overflow: hidden; }
  body.gx-mobile-game .dv-machine { height: calc(100% - 98px); margin: 0; }
  body.gx-mobile-game .dv-controls { margin: 0; }

/* App-only third pass: repair legacy widths and keep every core action in view. */
@media (max-width: 700px) {
  body.gx-mobile-game,
  body.gx-mobile-game *,
  body.gx-mobile-game *::before,
  body.gx-mobile-game *::after { box-sizing: border-box; }

  /* European Roulette: table and betting console share one screen. */
  body.gx-mobile-game .er {
    position: relative;
    left: auto;
    width: 100% !important;
    max-width: none !important;
    height: 100% !important;
    margin: 0 !important;
    padding: 3px !important;
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
    gap: 4px;
    overflow: hidden;
  }
  body.gx-mobile-game .er-stage {
    min-height: 0 !important;
    height: auto !important;
    border: 1px solid #303947;
    border-radius: 15px;
  }
  body.gx-mobile-game .er-win {
    left: 50% !important;
    top: 7px !important;
    bottom: auto !important;
    min-width: 124px;
    padding: 6px;
    transform: translateX(-50%) !important;
  }
  body.gx-mobile-game .er-win strong { font-size: 24px; }
  body.gx-mobile-game .er-ball { left: 50%; top: 15%; }
  body.gx-mobile-game .er-table-wrap {
    inset: 70px 4px 4px !important;
    width: auto !important;
    min-width: 0;
    padding: 5px;
    overflow: hidden;
  }
  body.gx-mobile-game .er-mode { gap: 3px; margin-bottom: 4px; }
  body.gx-mobile-game .er-mode button { height: 29px; min-height: 29px !important; }
  body.gx-mobile-game .er-grid {
    grid-template-rows: repeat(3, minmax(30px, 1fr)) !important;
    gap: 2px;
  }
  body.gx-mobile-game .er-num { min-height: 30px !important; border-radius: 5px; }
  body.gx-mobile-game .er-num.zero { height: 30px; }
  body.gx-mobile-game .er-outside { gap: 2px; margin-top: 4px; }
  body.gx-mobile-game .er-outside button { min-height: 31px !important; }
  body.gx-mobile-game .er-console {
    max-height: 202px;
    padding: 5px;
    gap: 4px;
    grid-template-columns: 1fr !important;
    overflow: hidden;
    border-radius: 13px;
  }
  body.gx-mobile-game .er-console header { margin-bottom: 3px; }
  body.gx-mobile-game .er-chips > div { gap: 3px; }
  body.gx-mobile-game .er-chips button { height: 34px; min-height: 34px !important; }
  body.gx-mobile-game .er-slip > div { height: 36px; }
  body.gx-mobile-game .er-actions {
    grid-column: auto;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 3px;
  }
  body.gx-mobile-game .er-actions button { height: 42px; min-height: 42px !important; }
  body.gx-mobile-game .er-bottom { display: none !important; }
  body.gx-mobile-game #erWheelCanvas { max-width: 100%; }

  /* Legacy Dice inherited a desktop negative offset and oversized drum. */
  body.gx-mobile-game .dice__drum {
    left: auto !important;
    min-width: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
  }
  body.gx-mobile-game .dice__center {
    width: min(300px, 82vw) !important;
    max-width: 100% !important;
    margin-inline: auto;
  }
  body.gx-mobile-game .dice__timer { width: 100%; }
  body.gx-mobile-game .dice__timer span { min-width: 0; font-size: clamp(34px, 12vw, 48px); }
  body.gx-mobile-game .dice__result {
    left: 50% !important;
    max-width: 100% !important;
    transform: translateX(-50%) !important;
  }

  /* RPS: eliminate the nested horizontal scrollbar and retain match controls. */
  body.gx-mobile-game .rps-left-panel {
    max-height: 250px;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
    grid-auto-rows: auto;
    overflow-x: hidden !important;
    overflow-y: auto !important;
  }
  body.gx-mobile-game .rps-left-panel > * { min-width: 0; }
  body.gx-mobile-game .rps-left-panel > :first-child,
  body.gx-mobile-game .rps-left-panel > :nth-child(4) { grid-column: 1 / -1; }
  body.gx-mobile-game .rps-left-panel > :nth-child(6),
  body.gx-mobile-game .rps-left-panel > :nth-child(7) { display: none !important; }
  body.gx-mobile-game .rps-left-panel .x30__bet-placed { gap: 2px; }
  body.gx-mobile-game .rps-left-panel .x30__bet-placed a {
    min-width: 0 !important;
    padding-inline: 2px !important;
  }
  body.gx-mobile-game .rps-left-panel,
  body.gx-mobile-game .dd-panel,
  body.gx-mobile-game .gx-bg__panel {
    scrollbar-width: none;
  }
  body.gx-mobile-game .rps-left-panel::-webkit-scrollbar,
  body.gx-mobile-game .dd-panel::-webkit-scrollbar,
  body.gx-mobile-game .gx-bg__panel::-webkit-scrollbar { display: none; }

  /* Dice Duel: the waiting-room list is secondary inside the APK cabinet. */
  body.gx-mobile-game .dd-panel {
    max-height: 250px;
    grid-template-columns: minmax(0, 1fr) !important;
    overflow-x: hidden !important;
  }
  body.gx-mobile-game .dd-panel > * { min-width: 0; }
  body.gx-mobile-game .dd-rooms { display: none !important; }
  body.gx-mobile-game .dd-bet header small { display: none; }
  body.gx-mobile-game .dd-betbox { height: 42px; }
  body.gx-mobile-game .dd-chips { margin: 4px 0; }
  body.gx-mobile-game .dd-chips button { height: 30px; min-height: 30px !important; }
  body.gx-mobile-game .dd-private { height: 32px; min-height: 32px !important; }

  /* Boom City: replace the fixed 496px desktop board with a mobile cabinet. */
  body.gx-mobile-game .crash.coinflip:has(.boomcity__main) {
    width: 100%;
    height: 100%;
    margin: 0 !important;
    padding: 3px;
    overflow: hidden;
  }
  body.gx-mobile-game .crash.coinflip:has(.boomcity__main) > .d-flex {
    width: 100%;
    height: 100%;
    display: grid !important;
    grid-template-rows: minmax(0, 1fr) auto;
    gap: 4px;
    overflow: hidden;
  }
  body.gx-mobile-game .boomcity__main {
    grid-row: 1;
    order: 0;
    width: 100% !important;
    min-width: 0;
    min-height: 0;
    padding: 6px !important;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
    border-radius: 15px !important;
  }
  body.gx-mobile-game .boomcity__grid {
    width: min(100%, 390px) !important;
    max-width: 100% !important;
    margin: 0 auto !important;
  }
  body.gx-mobile-game .boomcity__path { width: 100%; }
  body.gx-mobile-game .boomcity__path .boomcity__path-item {
    width: calc(12.5% - 3px) !important;
    height: auto !important;
    max-height: none !important;
    aspect-ratio: 1;
    margin-bottom: 3px !important;
  }
  body.gx-mobile-game .boomcity__path-item--result {
    outline: 3px solid #ffd45c !important;
    box-shadow: 0 0 18px rgba(255, 212, 92, .9) !important;
    transform: scale(1.08);
    position: relative;
    z-index: 3;
  }
  body.gx-mobile-game .boomcity__path-item.dice .icon {
    width: calc(100% - 8px) !important;
    height: calc(100% - 8px) !important;
  }
  body.gx-mobile-game .boomcity__betblock {
    grid-row: 2;
    order: 1;
    width: 100% !important;
    height: 188px;
    max-height: 188px;
    margin: 0 !important;
    overflow: hidden;
  }
  body.gx-mobile-game .boomcity__bets {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 4px !important;
  }
  body.gx-mobile-game .boomcity__bets > .diceBlocks {
    display: none !important;
  }
  body.gx-mobile-game .boomcity__bets > .coinBetBlock {
    height: 65px;
    margin-top: 4px !important;
  }
  body.gx-mobile-game .boomcity__bet { min-width: 0; }
  body.gx-mobile-game .boomcity__bet-heading {
    min-height: 50px !important;
    padding: 5px 7px !important;
    border-radius: 10px !important;
  }
  body.gx-mobile-game .boomcity__bet-heading span { font-size: 10px; }
  body.gx-mobile-game .boomcity__bet-heading img { width: 24px; height: 24px; }
  body.gx-mobile-game .boomcity__bet-info,
  body.gx-mobile-game .boomcity__bet .x100__bet-users { display: none !important; }

  /* Slot cabinets must size from the phone width, never from aspect-ratio height. */
  body.gx-mobile-game .wcs-cabinet-section,
  body.gx-mobile-game .wcs-cabinet-frame,
  body.gx-mobile-game .wcs-reels {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
  }
  body.gx-mobile-game .wcs-cabinet-frame { aspect-ratio: auto !important; }
  body.gx-mobile-game .wcs-reels { height: calc(100% - 8px); }
  body.gx-mobile-game .eog-stage {
    width: 100%;
    height: auto;
    align-self: center;
    margin: 0 auto !important;
  }
  body.gx-mobile-game .dv-stage {
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
  body.gx-mobile-game .dv-machine {
    height: auto !important;
    margin-inline: 4px !important;
  }

  /* Native slot controls: two compact rows keep every bet action reachable. */
  body.gx-mobile-game .ff-controls,
  body.gx-mobile-game .wcs-controls {
    direction: ltr;
    grid-template-columns: minmax(0, 1fr) 76px !important;
    grid-template-rows: 52px 52px;
    grid-template-areas: "bet spin" "options spin";
    min-height: 116px;
    align-items: center;
    overflow: hidden;
  }
  body.gx-mobile-game .ff-bet-section,
  body.gx-mobile-game .wcs-bet-section {
    grid-area: bet;
    width: 100% !important;
    min-width: 0;
    direction: rtl;
  }
  body.gx-mobile-game .ff-spin-section,
  body.gx-mobile-game .wcs-spin-section {
    grid-area: spin;
    width: 76px !important;
    display: grid;
    place-items: center;
    direction: rtl;
  }
  body.gx-mobile-game .ff-options-section,
  body.gx-mobile-game .wcs-options-section {
    grid-area: options;
    width: 100% !important;
    min-width: 0;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 4px;
    direction: rtl;
  }
  body.gx-mobile-game .ff-bet-picker,
  body.gx-mobile-game .wcs-bet-picker {
    width: 100% !important;
    min-width: 0;
    justify-content: stretch !important;
    gap: 3px !important;
  }
  body.gx-mobile-game .ff-bet-display,
  body.gx-mobile-game .wcs-bet-display {
    flex: 1 1 auto;
    min-width: 0;
  }
  body.gx-mobile-game #ffBetInput,
  body.gx-mobile-game #wcsBetInput {
    width: 100% !important;
    min-width: 0 !important;
  }
  body.gx-mobile-game .ff-auto-wrap,
  body.gx-mobile-game .wcs-auto-wrap {
    width: 100% !important;
    min-width: 0 !important;
  }
  body.gx-mobile-game #ffAutoSelect,
  body.gx-mobile-game #wcsAutoSelect {
    width: 100% !important;
    min-width: 0 !important;
  }
  body.gx-mobile-game .wcs-stage {
    width: 100% !important;
    min-width: 0 !important;
    grid-template-columns: minmax(0, 1fr) !important;
  }
  body.gx-mobile-game .wcs-stage > *,
  body.gx-mobile-game .wcs-controls {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
  }

  /* Keno: reserve a real bottom control row instead of clipping it below 100dvh. */
  body.gx-mobile-game .keno {
    width: 100%;
    height: 100%;
    margin: 0 !important;
    border-radius: 0;
    overflow: hidden;
  }
  body.gx-mobile-game .keno__content {
    height: 100%;
    margin: 0 !important;
    padding: 0 !important;
    display: grid;
    grid-template-rows: 82px minmax(0, 1fr) 150px;
    overflow: hidden;
  }
  body.gx-mobile-game .keno__round-info {
    min-height: 0;
    padding: 8px 28px !important;
  }
  body.gx-mobile-game .keno__mines {
    min-height: 0 !important;
    padding: 4px 9px !important;
    overflow: hidden;
  }
  body.gx-mobile-game .keno__canvas {
    width: 100%;
    height: 100%;
    max-width: none !important;
    display: grid !important;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    grid-template-rows: repeat(8, minmax(0, 1fr));
    gap: 5px;
  }
  body.gx-mobile-game .keno__canvas-item {
    width: auto !important;
    min-width: 0 !important;
    height: auto !important;
    min-height: 44px;
    margin: 0 !important;
    border-top-width: 4px;
    border-radius: 14px;
  }
  body.gx-mobile-game .keno__bet {
    min-height: 0;
    padding: 5px 10px 2px !important;
    overflow: hidden;
  }
  body.gx-mobile-game .keno__bet-settings { margin-bottom: 4px; }
  body.gx-mobile-game .keno__bet-left a,
  body.gx-mobile-game .keno__bet-right { min-height: 44px; }
  body.gx-mobile-game .keno__bet-right { padding: 4px 8px; }

  body.gx-mobile-game .sl__change {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100%;
    margin-inline: 0 !important;
    transform: none !important;
  }
  body.gx-mobile-game .sl__panel {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
  body.gx-mobile-game .sl__panel > *,
  body.gx-mobile-game .sl__roll {
    width: 100% !important;
    min-width: 0 !important;
  }
  body.gx-mobile-game .sl__players {
    min-width: 0 !important;
    overflow: hidden;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
  body.gx-mobile-game .sl__player {
    min-width: 0 !important;
    grid-template-columns: 28px minmax(0, 1fr) !important;
    gap: 4px !important;
    padding: 5px !important;
  }
  body.gx-mobile-game .sl__player > i {
    width: 27px !important;
    height: 27px !important;
  }
  body.gx-mobile-game .sl__player > div,
  body.gx-mobile-game .sl__turn > div {
    min-width: 0;
  }
  body.gx-mobile-game .sl__player b,
  body.gx-mobile-game .sl__turn b {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  body.gx-mobile-game .sl__player strong { display: none; }
  body.gx-mobile-game .sl__turn {
    min-width: 0 !important;
    grid-template-columns: 29px minmax(0, 1fr) 34px !important;
    gap: 4px !important;
    padding: 6px !important;
  }
  body.gx-mobile-game .sl__turn > span {
    width: 28px !important;
    height: 28px !important;
  }
}

/* App-only fourth pass: fit tall imported cabinets into the native viewport. */
@media (max-width: 700px) {
  /* Drop Boss keeps the game world and every actionable control on one screen. */
  body.gx-mobile-game .db-game {
    position: relative !important;
    left: auto !important;
    width: 100% !important;
    max-width: none !important;
    height: 100% !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 3px !important;
    transform: none !important;
    overflow: hidden !important;
  }
  body.gx-mobile-game .db-cabinet {
    width: 100%;
    height: 100%;
    min-height: 0;
    display: grid;
    grid-template-rows: minmax(0, 1fr) 238px;
    border-radius: 16px;
    overflow: hidden;
  }
  body.gx-mobile-game .db-stage {
    width: 100%;
    height: auto !important;
    min-height: 0 !important;
  }
  body.gx-mobile-game .db-console {
    height: 238px;
    min-height: 0;
    padding: 6px;
    gap: 5px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: 112px 111px;
    overflow: hidden;
  }
  body.gx-mobile-game .db-action-panel,
  body.gx-mobile-game .db-bet-panel {
    min-width: 0;
    min-height: 0;
    padding: 6px;
  }
  body.gx-mobile-game .db-action-panel {
    order: 0;
    grid-template-columns: minmax(0, 1fr) 112px;
    gap: 5px;
  }
  body.gx-mobile-game .db-modes { gap: 3px; }
  body.gx-mobile-game .db-modes button,
  body.gx-mobile-game .db-chips button,
  body.gx-mobile-game .db-quick-controls button {
    min-height: 32px !important;
  }
  body.gx-mobile-game .db-play {
    height: 61px;
    min-height: 61px !important;
    padding-inline: 10px;
  }
  body.gx-mobile-game .db-quick-controls { gap: 3px; }
  body.gx-mobile-game .db-bet-input { height: 38px; }
  body.gx-mobile-game .db-chips { gap: 3px; margin-top: 4px; }
  body.gx-mobile-game .db-label-row { margin-bottom: 4px; }
  body.gx-mobile-game .db-wallet-panel,
  body.gx-mobile-game .db-diagnostics,
  body.gx-mobile-game .db-bottom-grid { display: none !important; }

  /* Wild Crown: remove redundant status/balance chrome and stop edge clipping. */
  body.gx-mobile-game .wcs-multiplier-strip {
    width: 100% !important;
    min-width: 0 !important;
    padding: 4px 6px !important;
    gap: 4px !important;
    overflow: hidden;
  }
  body.gx-mobile-game .wcs-meter-label {
    flex: 0 0 auto;
    font-size: 9px;
  }
  body.gx-mobile-game .wcs-meter-nodes {
    min-width: 0;
    gap: 3px !important;
  }
  body.gx-mobile-game .wcs-node {
    flex: 1 1 0;
    min-width: 0;
    padding: 3px 2px !important;
    text-align: center;
  }
  body.gx-mobile-game .wcs-stampede-badge,
  body.gx-mobile-game .wcs-stat-card--wallet,
  body.gx-mobile-game #wcsBetMax { display: none !important; }
  body.gx-mobile-game .wcs-cabinet-frame,
  body.gx-mobile-game .wcs-reels,
  body.gx-mobile-game .wcs-column { overflow: hidden !important; }
  body.gx-mobile-game .wcs-column { min-width: 0; }
  body.gx-mobile-game .wcs-summary-bar {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
  body.gx-mobile-game .wcs-bet-picker > * { min-width: 0; }
}
