/* V67 - Snooker phone/tablet: leave the two right corner pockets unobstructed.
   The cue sits in its own column BESIDE the actual table, never on the felt. */
@media (pointer: coarse) and (max-width: 1500px), (max-width: 900px) {
  body:has(#snooker-canvas) .club-shell .table-area,
  body:has(#snooker-canvas) .club-shell:fullscreen .table-area,
  body:has(#snooker-canvas) .club-shell.pseudo-fullscreen .table-area {
    padding-inline: 8px !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }

  body:has(#snooker-canvas) .club-shell .table-interaction-row {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 44px !important;
    align-items: stretch !important;
    gap: 10px !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }

  body:has(#snooker-canvas) .club-shell .table-interaction-row .viewport,
  body:has(#snooker-canvas) .club-shell:fullscreen .table-interaction-row .viewport,
  body:has(#snooker-canvas) .club-shell.pseudo-fullscreen .table-interaction-row .viewport {
    position: relative !important;
    grid-column: 1 !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    margin: 0 !important;
    overflow: hidden !important;
  }

  body:has(#snooker-canvas) .club-shell .table-interaction-row .canvas-wrap {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  body:has(#snooker-canvas) .club-shell .table-interaction-row .mobile-cue-rail,
  body:has(#snooker-canvas) .club-shell:fullscreen .table-interaction-row .mobile-cue-rail,
  body:has(#snooker-canvas) .club-shell.pseudo-fullscreen .table-interaction-row .mobile-cue-rail {
    display: flex !important;
    position: relative !important;
    grid-column: 2 !important;
    inset: auto !important;
    top: auto !important;
    right: auto !important;
    bottom: auto !important;
    left: auto !important;
    z-index: 2 !important;
    width: 44px !important;
    min-width: 0 !important;
    max-width: 44px !important;
    min-height: 0 !important;
    height: auto !important;
    max-height: 100% !important;
    margin: 0 !important;
    padding: 8px 3px !important;
    align-self: stretch !important;
    box-sizing: border-box !important;
    touch-action: none !important;
  }

  /* Only one mobile power control; no desktop slider covering the table. */
  body:has(#snooker-canvas) .club-shell .control-strip .power-control,
  body:has(#snooker-canvas) .club-shell .control-strip #shoot-button {
    display: none !important;
  }

  body:has(#snooker-canvas) .club-shell .table-topbar {
    margin-right: 0 !important;
    min-width: 0 !important;
  }
}

@media (pointer: coarse) and (orientation: portrait) and (max-width: 900px) {
  body:has(#snooker-canvas) .club-shell .table-interaction-row {
    grid-template-columns: minmax(0, 1fr) 40px !important;
    gap: 7px !important;
  }
  body:has(#snooker-canvas) .club-shell .table-interaction-row .mobile-cue-rail {
    width: 40px !important;
    max-width: 40px !important;
    padding: 6px 2px !important;
  }
}
