@media (max-width: 767px) {
  :root {
    --bv-mobile-header: calc(60px + env(safe-area-inset-top, 0px));
    --bv-mobile-dock: calc(64px + env(safe-area-inset-bottom, 0px));
    --bv-mobile-gutter: clamp(12px, 4vw, 24px);
  }

  .bv-top {
    box-sizing: border-box;
    height: var(--bv-mobile-header);
    padding: env(safe-area-inset-top, 0px) max(6px, env(safe-area-inset-right)) 0 max(6px, env(safe-area-inset-left));
    gap: 4px;
    background: #191c17;
  }

  .bv-top > div { gap: 3px; min-width: 0; }
  .bv-top > div:last-child { flex: 0 1 auto; }
  .bv-top img { display: block; width: clamp(68px, 22vw, 116px); height: 32px; }

  .bv-top .bv-menu,
  .bv-top .bv-search-toggle {
    flex: none;
    min-width: 44px;
    min-height: 44px;
    padding: 0;
    border-radius: 8px;
  }

  .bv-top .bv-login,
  .bv-top .bv-register {
    display: block;
    min-width: 0;
    min-height: 44px;
    padding: 0 8px;
    border-radius: 8px;
    line-height: 42px;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
    box-shadow: none;
  }

  .bv-top .bv-register { flex: none; }
  .bv-top ~ .main-layout-wrapper {
    margin-top: var(--bv-mobile-header) !important;
    padding-bottom: calc(var(--bv-mobile-dock) + 16px) !important;
    min-width: 0;
  }

  body .sidebar-container {
    top: var(--bv-mobile-header) !important;
    bottom: var(--bv-mobile-dock) !important;
    width: min(340px, 88vw) !important;
    height: auto !important;
    overscroll-behavior: contain;
  }

  .bv-menu-open .bv-overlay { inset: var(--bv-mobile-header) 0 0; }

  .bv-mobile {
    box-sizing: border-box;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    align-items: center;
    min-height: var(--bv-mobile-dock);
    padding: 5px max(5px, env(safe-area-inset-right)) calc(5px + env(safe-area-inset-bottom)) max(5px, env(safe-area-inset-left));
    background: #171b15;
    border-top-color: #414e35;
  }

  .bv-mobile a {
    justify-content: center;
    align-items: center;
    min-height: 52px;
    min-width: 0;
    gap: 2px;
    border-radius: 9px;
    color: #dce4d6;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
  }

  .bv-mobile a.active { color: #dce4d6; }
  .bv-mobile a[aria-current="page"] { color: #b2ff76; background: #2d4024; }
  .bv-mobile a:focus-visible { outline-offset: -3px; }

  .bv-hero {
    height: clamp(244px, 66vw, 330px);
    margin: 10px var(--bv-mobile-gutter) 0;
    border: 1px solid #3e4b35;
    border-radius: 16px;
    background-color: #151a13;
    background-position: 67% center;
  }

  .bv-hero::before {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, #0b100bf5, #0b100ba8 42%, transparent 88%);
    content: "";
    pointer-events: none;
  }

  .bv-hero video { width: 100%; left: 0; object-position: 66% center; opacity: .68; }
  .bv-hero .bv-hero-copy {
    inset: auto 42px 20px;
    width: auto;
    height: auto;
    gap: 5px;
  }

  .bv-hero .bv-hero-copy h1 { font-size: clamp(20px, 5.5vw, 28px); line-height: 1.15; }
  .bv-hero .bv-hero-copy h2 { font-size: clamp(15px, 4vw, 20px); line-height: 1.2; }
  .bv-hero .bv-hero-cta { min-height: 44px; max-width: 100%; text-align: center; }
  .bv-hero .bv-hero-prev,
  .bv-hero .bv-hero-next { top: 38%; width: 44px; height: 44px; }
  .bv-hero .bv-motion { top: 8px; right: 8px; bottom: auto; width: 44px; height: 44px; }

  .bp12-page { padding-inline: var(--bv-mobile-gutter); }
  .bp12-section-heading { flex-wrap: wrap; align-items: center; gap: 8px; }
  .bp12-game-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 99px), 1fr)); }
  .bp12-game-rail { scroll-snap-type: x proximity; overscroll-behavior-inline: contain; }
  .bp12-game-rail > * { scroll-snap-align: start; }
  .bp12-search label,
  .mp-shell[data-mp-brand="betovo"] .mp-account-main { min-width: 0; }
  .bp12-search { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 12px; }
  .bp12-search-dialog .bp12-search { grid-template-columns: minmax(0, 1fr); }
  .bp12-search button,
  .bp12-search select,
  .bp12-search input:not([type="hidden"]) { min-height: 44px; }

  .bv-auth-modal,
  .bp12-search-dialog {
    box-sizing: border-box;
    max-height: calc(100dvh - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
    overflow: auto;
    overscroll-behavior: contain;
    border-radius: 16px;
  }

  .bp12-search-dialog { padding: 16px; }
  .bp12-search-dialog > button,
  .bv-auth-close { min-width: 44px; min-height: 44px; }
  .bv-auth-content { max-height: none; padding: 52px 16px 24px; overflow: visible; }
  .bv-auth-content .field input,
  .bp12-search input:not([type="hidden"]),
  .bp12-search select { font-size: 16px; }

  .betovo-site .bv-header { gap: 6px; padding-inline: var(--bv-mobile-gutter); }
  .betovo-site .bv-header-left,
  .betovo-site .bv-header-right { min-width: 0; gap: 4px; }
  .betovo-site .bv-header-right { flex-wrap: wrap; justify-content: flex-end; }
  .betovo-site .bv-logo img { width: clamp(64px, 22vw, 108px); height: auto; }
  .betovo-site .bv-mobile-nav {
    padding-bottom: calc(6px + env(safe-area-inset-bottom));
  }
  .betovo-site .bv-mobile-nav-item { min-height: 44px; min-width: 0; text-align: center; }
}

@media (max-width: 767px) and (prefers-reduced-motion: reduce) {
  .bv-hero video { visibility: hidden; }
  .bv-hero { background-image: url('/tema/v2/assets/hero-poster.webp'); }
}
