/* Mobile-first adjustments for <= 992px (Bootstrap lg breakpoint) */
@media (max-width: 991.98px) {
  :root { --tabbar-height: 64px; }

  /* Чтобы контент не уходил под плашку */
  body { padding-bottom: calc(var(--tabbar-height) + env(safe-area-inset-bottom, 0px)); }

  /* Layout: hide sidebars, main takes full width */
  .container-fluid > .row > .col-lg-2,
  .container-fluid > .row > .col-lg-3 {
    display: none !important;
  }

  /* Navbar tweaks */
  .navbar {
    padding-top: .25rem;
    padding-bottom: .25rem;
  }
  .navbar-brand {
    font-size: 1rem;
  }
  .navbar .form-select {
    height: 32px;
    padding-top: .125rem;
    padding-bottom: .125rem;
    font-size: .875rem;
  }

  /* Accordion (tournaments, sports) compact view */
  .accordion-button {
    padding: .5rem .75rem;
    font-size: .95rem;
    line-height: 1.2;
  }
  .accordion-body {
    padding: .5rem;
  }

  /* Match list items */
  .list-group-item {
    padding: .5rem .75rem;
  }
  /* Header row inside item: teams/time */
  .list-group-item > .d-flex {
    gap: .5rem;
  }
  .list-group-item a.fw-bold {
    font-size: .98rem;
  }
  .list-group-item .text-muted {
    font-size: .8rem;
  }

  /* Score line */
  .list-group-item .small.text-muted {
    margin-top: .25rem;
    font-size: .78rem;
  }

  /* Market group: make odds buttons full-width grid */
  .list-group-item .mb-1 {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    gap: .5rem;
  }
  /* Hide group label to save space on mobile (e.g., "1X2:") */
  .list-group-item .mb-1 > .fw-bold {
    display: none !important;
  }
  .list-group-item .mb-1 .btn {
    flex: 1 1 0;
    min-width: 0;
    border-radius: .5rem;
    font-weight: 600;
  }
  /* Slightly larger tap targets */
  .list-group-item .btn.btn-sm {
    padding: .5rem .25rem;
    font-size: .95rem;
  }

  /* Visual polish: make list items card-like */
  .list-group-flush > .list-group-item {
    border-width: 0 0 1px 0;
  }

  /* Utilities for images in rows */
  img[alt=""] {
    vertical-align: middle;
  }

  /* Bottom mobile tab bar */
  .mobile-tabbar {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    height: var(--tabbar-height);
    padding-bottom: env(safe-area-inset-bottom, 0px);
    background: var(--header-bg, #101633);
    color: var(--header-fg, #fff);
    border-top: 1px solid var(--color-border, #242b42);
    z-index: 1040;
  }
  .mobile-tabbar .tabbar-inner {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    align-items: center;
    height: 100%;
  }
  .mobile-tabbar a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--header-fg, #fff);
    font-size: .75rem;
    gap: .15rem;
  }
  .mobile-tabbar a .icon { width: 22px; height: 22px; display: inline-flex; }
  .mobile-tabbar a .label { line-height: 1; }
  .mobile-tabbar a.active,
  .mobile-tabbar a:active { color: var(--brand-pink, #ff267e); }
  .mobile-tabbar a.active svg,
  .mobile-tabbar a:active svg { stroke: var(--brand-pink, #ff267e); fill: none; }
}
