/* Shared mobile layout: contain wide content without clipping the page. */
.mobile-record-table { overflow-wrap: anywhere; }
@media (max-width: 899px) {
  .container, .container-fluid, .row > *, .ts-wrap, .ts-panel,
  .ts-card, .dash-card, .admin-content, .live-scores-panel { min-width: 0; }
  .table-responsive, .activity-rankings__table-wrap, .admin-table-wrap,
  .ts-app .ts-table-wrap, .ts-app .table-responsive {
    max-width: 100%;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
  }
  .ts-app .ts-standings { table-layout: auto; min-width: 640px; }
  .ts-app .ts-standings :is(th, td) { display: table-cell; width: auto; }
  .ts-app .ts-standings :is(th, td):nth-child(2) { min-width: 150px; }
  .ts-scorers { table-layout: fixed; overflow-wrap: anywhere; }
  .ts-scorers :is(th, td):first-child { width: 36px; }
  .ts-scorers :is(th, td):nth-child(3) { width: 48px; }
  .ts-match-card__row, .ts-app .md-scoreboard {
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  }
  .ts-app .md-team, .ts-match-card__team, .ts-info-card,
  .activity-rankings__person, .activity-rankings__person > span { min-width: 0; overflow-wrap: anywhere; }
  .ts-app .md-top { flex-wrap: wrap; }
  .ts-app .md-team strong { font-size: 14px; }
  .ts-app .md-scoreboard { gap: 8px; padding-inline: 12px; }
  .ts-drawer { overflow-y: auto; padding-bottom: max(24px, env(safe-area-inset-bottom)); }
  .ts-section :is(p, h2, h3, h4), .gt-breadcrumb-items,
  .news-details-content, .contact-info-items, .footer-widget-items { overflow-wrap: anywhere; }
  .gt-breadcrumb-items, .activity-rankings__tabs { flex-wrap: wrap; }
  form :is(input, select, textarea) { min-width: 0; max-width: 100%; }
  form :is(input:not([type="checkbox"]):not([type="radio"]), select, textarea) { font-size: 16px; }
  .theme-btn, .ts-tab, .ts-topbar__menu, .ts-drawer a { min-height: 44px; }
  .theme-btn { white-space: normal; overflow-wrap: anywhere; max-width: 100%; }
  .ts-tabs { gap: 6px; }
  .ts-tab { max-width: 100%; white-space: normal; }
  .ls-header { flex-wrap: wrap; gap: 10px; }
  .ls-header .ls-search { flex: 1 1 120px; min-width: 0; }
  .ls-header .ls-search input { width: 100%; min-width: 0; font-size: 16px; }
  .ls-group-head a { min-width: 0; overflow-wrap: anywhere; }
  .ls-day { min-height: 44px; }
  .ts-drive-embed { min-height: 280px; }
  .ts-drive-embed iframe { height: 380px; }
}

@media (max-width: 575px) {
  .mobile-record-table { display: block; width: 100%; min-width: 0; }
  /* Keep column headers available to assistive technology. */
  .mobile-record-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .mobile-record-table tbody { display: grid; gap: 12px; padding: 8px; }
  .mobile-record-table tr { display: grid; grid-template-columns: minmax(0, 1fr); border: 1px solid var(--ts-line, var(--line, #dfe3e9)); border-radius: 12px; padding: 8px 12px; }
  .mobile-record-table td { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 10px; align-items: center; width: auto; padding: 8px 0; font-size: 14px; overflow-wrap: anywhere; text-align: left; }
  .mobile-record-table td::before { content: attr(data-label); font-size: 12px; font-weight: 600; color: var(--ts-muted, var(--page-muted, #697386)); }
  .mobile-record-table td:last-child { border-bottom: 0; }
  .mobile-record-table .activity-rankings__person { gap: 8px; }
  .mobile-record-table .activity-rankings__person img { width: 28px; height: 28px; flex-shrink: 0; }
  .mobile-record-table .activity-badge { max-width: 100%; white-space: normal; }
}
