/* V68 - Desktop Snooker fullscreen: keep the COMPLETE table inside the screen.
   The older layout calculated table width using nearly all of 100dvh,
   overlooking score/toolbar/controls/footer. It could overflow below the screen. */
@media (min-width: 901px) {
  #club-shell:is(:fullscreen, .pseudo-fullscreen, .is-fullscreen) {
    display: flex !important;
    flex-direction: column !important;
    width: 100vw !important;
    height: 100dvh !important;
    min-height: 0 !important;
    max-height: 100dvh !important;
    overflow: hidden !important;
  }

  #club-shell:is(:fullscreen, .pseudo-fullscreen, .is-fullscreen) > .scoreboard {
    flex: 0 0 auto !important;
    padding: 8px 20px !important;
    gap: 10px !important;
  }
  #club-shell:is(:fullscreen, .pseudo-fullscreen, .is-fullscreen) .player .score {
    font-size: clamp(23px, 3.3vh, 34px) !important;
  }
  #club-shell:is(:fullscreen, .pseudo-fullscreen, .is-fullscreen) .player.active::after {
    bottom: -9px !important;
  }

  #club-shell:is(:fullscreen, .pseudo-fullscreen, .is-fullscreen) > .workspace {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) clamp(195px, 13vw, 248px) !important;
    flex: 1 1 0 !important;
    height: 0 !important;
    min-height: 0 !important;
    overflow: hidden !important;
  }

  #club-shell:is(:fullscreen, .pseudo-fullscreen, .is-fullscreen) .table-area {
    display: flex !important;
    flex-direction: column !important;
    min-height: 0 !important;
    overflow: hidden !important;
    padding: 7px 12px 0 !important;
  }
  #club-shell:is(:fullscreen, .pseudo-fullscreen, .is-fullscreen) .table-topbar {
    flex: 0 0 auto !important;
    padding: 0 5px 6px !important;
    min-height: 0 !important;
  }
  #club-shell:is(:fullscreen, .pseudo-fullscreen, .is-fullscreen) .snooker-turn-timer:not([hidden]) {
    flex: 0 0 auto !important;
    height: 14px !important;
    margin-bottom: 5px !important;
  }

  #club-shell:is(:fullscreen, .pseudo-fullscreen, .is-fullscreen) .table-interaction-row {
    display: flex !important;
    flex: 1 1 0 !important;
    height: 0 !important;
    min-height: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    justify-content: center !important;
    align-items: center !important;
    overflow: hidden !important;
  }

  /* Exact pixel sizes calculated from the space left in the row by v68 JS. */
  #club-shell:is(:fullscreen, .pseudo-fullscreen, .is-fullscreen) #table-viewport {
    display: block !important;
    flex: 0 0 auto !important;
    align-self: center !important;
    width: var(--snooker-fit-width, min(100%, calc((100dvh - 220px) * 1.83))) !important;
    height: var(--snooker-fit-height, auto) !important;
    aspect-ratio: 1.83 !important;
    max-width: 100% !important;
    max-height: 100% !important;
    min-width: 0 !important;
    min-height: 0 !important;
    margin: 0 auto !important;
    overflow: auto !important; /* Needed for the game's zoom/pan feature. */
  }
  #club-shell:is(:fullscreen, .pseudo-fullscreen, .is-fullscreen) #canvas-wrap {
    position: relative !important;
    min-width: 0 !important;
    aspect-ratio: 1.83 !important;
    /* Do not force width: snooker.js sets 180% while zooming. */
  }

  #club-shell:is(:fullscreen, .pseudo-fullscreen, .is-fullscreen) .table-status {
    flex: 0 0 auto !important;
    min-height: 0 !important;
    padding: 4px 6px 6px !important;
  }
  #club-shell:is(:fullscreen, .pseudo-fullscreen, .is-fullscreen) .control-strip {
    flex: 0 0 auto !important;
    gap: 10px !important;
    padding: 7px 6px 10px !important;
  }
  #club-shell:is(:fullscreen, .pseudo-fullscreen, .is-fullscreen) .sidebar {
    min-height: 0 !important;
    height: 100% !important;
    overflow-y: auto !important;
    overscroll-behavior: contain;
  }
  #club-shell:is(:fullscreen, .pseudo-fullscreen, .is-fullscreen) > .bottom-note {
    flex: 0 0 auto !important;
    padding: 6px 16px !important;
  }
}

/* V76: the pause button must intercept input instead of passing it to the felt. */
#paused-banner {
  z-index: 12;
  pointer-events: auto;
  padding: 10px;
  font-family: var(--font);
}
#paused-banner .paused-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  max-width: 100%;
  text-align: center;
}
#paused-banner .paused-title {
  font: 800 clamp(16px, 3vw, 24px)/1.1 var(--font);
  letter-spacing: .12em;
}
#paused-continue-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  pointer-events: auto;
  touch-action: manipulation;
  min-height: 36px;
  max-width: 100%;
  padding: 8px 16px;
  border: 1px solid #baffed;
  border-radius: 9px;
  background: var(--mint);
  color: #08251e;
  box-shadow: 0 4px 16px #0005;
  font: 800 12px/1.2 var(--font);
}
#paused-continue-btn svg { width: 15px; height: 15px; }
#paused-continue-btn:active { transform: translateY(1px); }

/* Foul decisions and the next required action stay above the table's lower
   edge, outside the zoom/pan scroller so they cannot disappear while panning. */
#club-shell .table-interaction-row { position: relative; }
#snooker-play-alert {
  position: absolute;
  bottom: max(8px, calc((100% - var(--snooker-fit-height, 100%)) * .5 + 8px));
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  width: min(calc(var(--snooker-fit-width, 100%) - 18px), 440px);
  max-height: calc(var(--snooker-fit-height, 100%) - 12px);
  overflow-y: auto;
  padding: 9px 12px;
  border: 1px solid #78f1d1b0;
  border-radius: 10px;
  background: #091a2af2;
  box-shadow: 0 5px 22px #0008;
  color: #edf9ff;
  text-align: center;
  font: 11px/1.35 var(--font);
  pointer-events: none;
  overscroll-behavior: contain;
}
#snooker-play-alert[hidden] { display: none !important; }
#snooker-play-alert-title { color: var(--mint); font-size: 12px; }
#snooker-play-alert-message { margin: 3px 0 5px; font-size: 10px; }
#snooker-play-alert-message:empty { display: none; }
#snooker-play-alert .nomination-block { display: block !important; }
#snooker-play-alert .nomination-block .selector-label { display: none !important; }
#snooker-play-alert .colours { display: flex !important; justify-content: center; gap: 6px !important; margin: 5px 0 0 !important; }
#snooker-play-alert .colour-button { width: 32px !important; height: 32px !important; }
#snooker-play-alert #decision-bar:not([hidden]) {
  display: block !important;
  margin: 4px 0 0 !important;
  padding: 0 !important;
  border: 0;
  background: transparent;
  max-height: none !important;
  overflow: visible;
}
#snooker-play-alert #decision-text { font-size: 10px; margin: 0 0 5px; }
#snooker-play-alert #decision-actions { justify-content: center; gap: 5px; }
#snooker-play-alert button:not(.colour-button) {
  min-height: 30px;
  padding: 5px 9px;
  border: 1px solid #78f1d1aa;
  border-radius: 7px;
  background: #193c4e;
  color: #eefaff;
  font: 700 10px/1.2 var(--font);
  touch-action: manipulation;
}
#snooker-play-alert button { pointer-events: auto; }

/* The old shared grid put both information sections in row 2, overlapping. */
body[data-game="snooker"] #main-content > #how-to-play {
  grid-column: 1 / -1 !important;
  grid-row: 2 !important;
  position: static !important;
  width: 100% !important;
  min-width: 0;
  margin: 0 !important;
}
body[data-game="snooker"] #main-content > #snooker-mobile-guide {
  grid-column: 1 / -1 !important;
  grid-row: 3 !important;
  position: static !important;
  width: 100% !important;
  min-width: 0;
  margin: 0 auto 24px !important;
}
body.arcade-responsive[data-game="snooker"] main#main-content > #club-shell:not(:fullscreen):not(.arcade-fullscreen):not(.pseudo-fullscreen):not(.is-fullscreen):not(.snooker-fitted-view) {
  max-height: none !important;
}
@media (max-width: 1100px) {
  body.arcade-responsive[data-game="snooker"] main#main-content {
    display: flex !important;
    flex-direction: column !important;
    gap: 18px !important;
  }
  body.arcade-responsive[data-game="snooker"] main#main-content > #club-shell { order: 1 !important; }
  body.arcade-responsive[data-game="snooker"] main#main-content > .title-row {
    order: 2 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 14px !important;
    padding: 16px !important;
  }
  body[data-game="snooker"] #main-content > #how-to-play { order: 3 !important; grid-template-columns: minmax(0, 1fr); gap: 22px; padding: 20px 16px; }
  body[data-game="snooker"] #main-content > #snooker-mobile-guide { order: 4 !important; }
}

/* Phones can be wider than 900px in landscape. Keep the table's actual ratio
   in both orientations and retain colour nomination controls in fullscreen. */
@media (max-width: 900px), (pointer: coarse) and (max-width: 1500px), (orientation: landscape) and (max-height: 520px) {
  #snooker-play-alert {
    left: calc(50% - 24px);
    width: min(calc(var(--snooker-fit-width, calc(100% - 48px)) - 18px), 440px);
  }
  body[data-game="snooker"] #club-shell #mobile-game-info-badge {
    position: static !important;
    flex: 0 0 auto !important;
    width: 100% !important;
    height: 36px !important;
    min-height: 36px !important;
    padding: 3px 8px !important;
    display: flex !important;
    z-index: 50 !important;
  }
  body[data-game="snooker"] #club-shell #mobile-game-info-badge :is(.mobile-app-back-btn, .mobile-settings-toggle, .mobile-burger-toggle) {
    position: static !important;
    inset: auto !important;
    width: 28px !important;
    height: 28px !important;
    min-height: 0 !important;
    padding: 0 !important;
  }
  body[data-game="snooker"] #club-shell #mobile-game-info-badge .mobile-header-left { min-width: 0; gap: 5px; }
  body[data-game="snooker"] #club-shell #mobile-game-info-badge .mobile-header-title-wrap { min-width: 0; }
  body[data-game="snooker"] #club-shell #mobile-game-info-badge .badge-thumb { width: 22px !important; height: 22px !important; }
  body[data-game="snooker"] #club-shell #mobile-game-info-badge .badge-title { font-size: 10px !important; }
  body[data-game="snooker"] #club-shell #mobile-diff-select { max-width: 100px; min-height: 26px; font-size: 10px; padding: 2px 4px; }
  body[data-game="snooker"] #club-shell #arcade-fs-diff-bar { display: none !important; }
  body[data-game="snooker"] #club-shell .workspace {
    display: flex !important;
    flex-direction: column !important;
    min-width: 0 !important;
    height: auto !important;
    max-height: none !important;
    justify-content: flex-start !important;
    align-items: stretch !important;
  }
  body[data-game="snooker"] #club-shell .scoreboard {
    display: grid !important;
    flex: 0 0 auto !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) !important;
    gap: 8px !important;
    padding: 7px 9px !important;
  }
  body[data-game="snooker"] #club-shell .player { min-width: 0; gap: 6px !important; }
  body[data-game="snooker"] #club-shell .player > div { min-width: 0; }
  body[data-game="snooker"] #club-shell .avatar,
  body[data-game="snooker"] #club-shell .player .meta { display: none !important; }
  body[data-game="snooker"] #club-shell .player .name {
    font-size: 10px !important;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  body[data-game="snooker"] #club-shell .player .score { font-size: 22px !important; }
  body[data-game="snooker"] #club-shell .player.active::after { bottom: -8px !important; }
  body[data-game="snooker"] #club-shell .frame-info small { font-size: 7px !important; }
  body[data-game="snooker"] #club-shell .frame-score { font-size: 9px !important; margin: 0 !important; }
  body[data-game="snooker"] #club-shell .table-area {
    padding: 6px 8px 0 !important;
    min-width: 0 !important;
    height: auto !important;
    max-height: none !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
  }
  body[data-game="snooker"] #club-shell .table-topbar {
    display: flex !important;
    flex: 0 0 auto !important;
    margin: 0 !important;
    padding: 0 0 5px !important;
    gap: 6px !important;
    flex-wrap: wrap !important;
  }
  body[data-game="snooker"] #club-shell .table-tools { gap: 4px !important; flex-wrap: wrap; }
  body[data-game="snooker"] #club-shell .icon-button { width: 28px; height: 28px; }
  body[data-game="snooker"] #club-shell .table-interaction-row {
    display: flex !important;
    align-items: stretch !important;
    justify-content: center !important;
    gap: 8px !important;
    min-width: 0 !important;
  }
  body[data-game="snooker"] #club-shell #table-viewport {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    min-height: 0 !important;
    height: auto !important;
    max-width: 100% !important;
    max-height: none !important;
    margin: 0 !important;
    overflow: auto !important;
    flex: 1 1 0 !important;
    aspect-ratio: 1120 / 612 !important;
  }
  body[data-game="snooker"] #club-shell #canvas-wrap {
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    aspect-ratio: 1120 / 612 !important;
    height: auto !important;
    display: block !important;
  }
  body[data-game="snooker"] #club-shell:has(#zoom-button[aria-pressed="true"]) #canvas-wrap {
    width: 180% !important;
  }
  body[data-game="snooker"] #club-shell #snooker-mobile-cue {
    display: flex !important;
    position: static !important;
    flex: 0 0 40px !important;
    width: 40px !important;
    min-width: 0 !important;
    max-width: 40px !important;
    min-height: 0 !important;
    height: auto !important;
    margin: 0 !important;
    padding: 6px 3px !important;
    align-self: stretch !important;
    gap: 3px !important;
  }
  body[data-game="snooker"] #club-shell .mobile-cue-track { min-height: 30px; margin: 4px 0; }
  body[data-game="snooker"] #club-shell .table-status {
    display: flex !important;
    flex: 0 0 auto !important;
    min-height: 0 !important;
    padding: 4px 0 !important;
    font-size: 9px !important;
    line-height: 1.3;
    gap: 5px !important;
    flex-direction: row !important;
  }
  body[data-game="snooker"] #club-shell .table-status #shot-message { max-width: 80% !important; }
  body[data-game="snooker"] #club-shell .control-strip {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 8px !important;
    padding: 4px 0 6px !important;
    position: static !important;
    flex: 0 0 auto !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
  }
  body[data-game="snooker"] #club-shell .control-strip .power-control,
  body[data-game="snooker"] #club-shell #shoot-button,
  body[data-game="snooker"] #club-shell .shot-help { display: none !important; }
  body[data-game="snooker"] #club-shell .spin-wrap { margin: 0 !important; }
  body[data-game="snooker"] #club-shell .sidebar {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 5px !important;
    width: 100% !important;
    max-width: none !important;
    padding: 6px 8px !important;
    border-left: 0;
    border-top: 1px solid var(--line);
    position: static !important;
    flex: 0 0 auto !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    z-index: auto !important;
  }
  body[data-game="snooker"] #club-shell .sidebar-title,
  body[data-game="snooker"] #club-shell .stat-grid,
  body[data-game="snooker"] #club-shell .activity { display: none !important; }
  body[data-game="snooker"] #club-shell .nomination-block {
    display: flex;
    gap: 6px;
    align-items: center;
    min-width: 0;
    grid-column: auto !important;
    grid-row: auto !important;
  }
  body[data-game="snooker"] #club-shell .selector-label { margin: 0 !important; font-size: 7px !important; }
  body[data-game="snooker"] #club-shell .colours { margin: 0 !important; gap: 4px !important; }
  body[data-game="snooker"] #club-shell .colour-button { width: 28px !important; height: 28px !important; }
  body[data-game="snooker"] #club-shell .side-buttons {
    display: flex !important;
    flex-wrap: wrap;
    gap: 4px !important;
    margin: 0 !important;
    grid-column: auto !important;
  }
  body[data-game="snooker"] #club-shell .side-buttons .small-button {
    flex: 1 1 46px;
    min-width: 0;
    min-height: 28px;
    padding: 4px 5px !important;
    font-size: 9px !important;
    line-height: 1.2;
  }
  body[data-game="snooker"] #club-shell .free-ball { grid-column: auto !important; }
  body[data-game="snooker"] #club-shell .free-ball select { margin: 3px 0 0; padding: 4px; font-size: 11px; }
  body[data-game="snooker"] #club-shell .bottom-note { display: none !important; }
  body[data-game="snooker"] #club-shell .decision-bar {
    flex: 0 0 auto;
    max-height: 25dvh;
    overflow-y: auto;
    margin: 4px 8px 6px;
    padding: 6px 8px;
  }
  body[data-game="snooker"] #club-shell .decision-bar p { font-size: 10px; margin-bottom: 4px; }
  body[data-game="snooker"] #club-shell .decision-bar button { padding: 5px 8px; }

  body[data-game="snooker"] #club-shell:is(:fullscreen, .arcade-fullscreen, .pseudo-fullscreen, .is-fullscreen, .snooker-fitted-view) {
    display: flex !important;
    flex-direction: column !important;
    height: var(--arcade-fs-vh, 100dvh) !important;
    max-height: var(--arcade-fs-vh, 100dvh) !important;
    min-height: 0 !important;
    overflow: hidden !important;
    padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left) !important;
  }
  body[data-game="snooker"] #club-shell:is(:fullscreen, .arcade-fullscreen, .pseudo-fullscreen, .is-fullscreen, .snooker-fitted-view) .workspace {
    flex: 1 1 0 !important;
    height: 0 !important;
    min-height: 0 !important;
    overflow-y: auto !important;
  }
  body[data-game="snooker"] #club-shell:is(:fullscreen, .arcade-fullscreen, .pseudo-fullscreen, .is-fullscreen, .snooker-fitted-view) .table-area {
    display: flex !important;
    flex-direction: column !important;
    flex: 1 1 0 !important;
    min-height: 0 !important;
    overflow: hidden !important;
  }
  body[data-game="snooker"] #club-shell:is(:fullscreen, .arcade-fullscreen, .pseudo-fullscreen, .is-fullscreen, .snooker-fitted-view) .table-interaction-row {
    flex: 1 1 0 !important;
    height: 0 !important;
    min-height: 0 !important;
    align-items: center !important;
  }
  body[data-game="snooker"] #club-shell:is(:fullscreen, .arcade-fullscreen, .pseudo-fullscreen, .is-fullscreen, .snooker-fitted-view) #table-viewport {
    flex: 0 0 auto !important;
    width: var(--snooker-fit-width, calc(100% - 48px)) !important;
    height: var(--snooker-fit-height, auto) !important;
    max-height: 100% !important;
    align-self: center !important;
  }
  body[data-game="snooker"] #club-shell:is(:fullscreen, .arcade-fullscreen, .pseudo-fullscreen, .is-fullscreen, .snooker-fitted-view) #snooker-mobile-cue {
    height: var(--snooker-fit-height, 100%) !important;
    max-height: 100% !important;
    align-self: center !important;
  }
  body[data-game="snooker"] #club-shell:is(:fullscreen, .arcade-fullscreen, .pseudo-fullscreen, .is-fullscreen, .snooker-fitted-view) .sidebar {
    flex: 0 0 auto !important;
    height: auto !important;
    min-height: 0 !important;
    overflow: visible !important;
  }
}

@media (orientation: landscape) and (max-height: 520px) {
  body[data-game="snooker"] #club-shell .scoreboard { padding-block: 4px !important; }
  body[data-game="snooker"] #club-shell .frame-info small { display: none !important; }
  body[data-game="snooker"] #club-shell .table-status #motion-status { display: none; }
  body[data-game="snooker"] #club-shell .sidebar {
    display: flex !important;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 10px !important;
    padding-block: 4px !important;
  }
  body[data-game="snooker"] #club-shell .side-buttons { flex: 1 1 240px; }
  body[data-game="snooker"] #club-shell .nomination-block .selector-label { display: none; }
  body[data-game="snooker"] #club-shell .spin-pad { width: 30px; height: 30px; }
  body[data-game="snooker"] #club-shell .spin-pad::before,
  body[data-game="snooker"] #club-shell .spin-pad::after { top: 15px; }
}

@media (min-width: 901px) and (max-height: 680px) {
  #club-shell:is(:fullscreen, .pseudo-fullscreen, .is-fullscreen) > .scoreboard {
    padding: 5px 14px !important;
  }
  #club-shell:is(:fullscreen, .pseudo-fullscreen, .is-fullscreen) > .bottom-note {
    display: none !important;
  }
  #club-shell:is(:fullscreen, .pseudo-fullscreen, .is-fullscreen) .control-strip {
    padding: 4px 5px 6px !important;
  }
}

/* V77: keep required choices reachable after hiding the mobile sidebar. */
#snooker-play-alert #free-ball-panel { margin: 5px 0 0; text-align: left; }
#snooker-play-alert #free-ball-select {
  display: block;
  width: 100%;
  min-height: 32px;
  margin-top: 4px;
  padding: 5px 8px;
  font-size: 11px;
  pointer-events: auto;
  touch-action: manipulation;
}
#snooker-mobile-menu[hidden] { display: none !important; }
body[data-game="snooker"] #club-shell .table-area { position: relative; }
#snooker-mobile-menu {
  position: absolute;
  top: 38px;
  right: 8px;
  z-index: 60;
  display: grid;
  gap: 4px;
  width: min(200px, calc(100% - 16px));
  max-height: min(300px, 70dvh);
  overflow-y: auto;
  padding: 8px;
  border: 1px solid #78f1d166;
  border-radius: 10px;
  background: #102137;
  box-shadow: 0 6px 24px #0009;
}
#snooker-mobile-menu button {
  min-height: 34px;
  padding: 7px 10px;
  border-radius: 6px;
  background: #1e3752;
  color: #eff6e9;
  text-align: left;
  font: 600 11px/1.3 var(--font);
  touch-action: manipulation;
}
#snooker-mobile-menu button[hidden] { display: none !important; }
#snooker-mobile-menu button:disabled { opacity: .45; }

@media (max-width: 900px), (pointer: coarse) and (max-width: 1500px), (orientation: landscape) and (max-height: 520px) {
  body[data-game="snooker"] #club-shell .sidebar,
  body[data-game="snooker"] #club-shell:is(:fullscreen, .arcade-fullscreen, .pseudo-fullscreen, .is-fullscreen, .snooker-fitted-view) .sidebar {
    display: none !important;
  }
}

/* Keep lobby status inside the card and allow its contents to scroll, rather
   than shrinking controls or centering clipped content above the screen. */
body.arcade-responsive[data-game="snooker"] #snooker-overlay-multiplayer.overlay:not([hidden]) {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0 !important;
  padding: max(8px, env(safe-area-inset-top)) max(8px, env(safe-area-inset-right)) max(8px, env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left)) !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
}
body.arcade-responsive[data-game="snooker"] #snooker-overlay-multiplayer .snooker-multiplayer-dialog {
  display: block !important;
  flex: 0 1 440px !important;
  width: min(100%, 440px) !important;
  max-width: 100% !important;
  min-width: 0 !important;
  min-height: 0 !important;
  max-height: calc(100dvh - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom)) !important;
  margin: 0 !important;
  padding: 16px !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  overscroll-behavior: contain;
  touch-action: pan-y;
  box-sizing: border-box !important;
}
#snooker-overlay-multiplayer .snooker-mp-tab-pane[hidden] { display: none !important; }
#snooker-overlay-multiplayer .segmented button {
  min-height: 32px !important;
  padding: 6px 4px !important;
  font-size: 11px !important;
  touch-action: manipulation;
}
#snooker-overlay-multiplayer .segmented button[aria-pressed="true"] {
  background: #1e3752 !important;
  color: #eff6e9 !important;
  box-shadow: inset 0 0 0 1px #78f1d188;
}
#snooker-overlay-multiplayer .snooker-mp-hint,
#snooker-overlay-multiplayer .multiplayer-connection-status {
  display: block !important;
  font-size: 11px !important;
  line-height: 1.4 !important;
  overflow: visible !important;
  margin-block: 8px !important;
}
@media (orientation: landscape) and (max-height: 520px) {
  body.arcade-responsive[data-game="snooker"] #snooker-overlay-multiplayer .snooker-multiplayer-dialog {
    padding: 10px 14px !important;
  }
  #snooker-overlay-multiplayer .snooker-qr-wrap { padding: 6px; gap: 5px; }
  #snooker-overlay-multiplayer #snooker-host-qr-canvas { width: 68px; height: 68px; }
}
