/* Статический fallback: только layout, без utility-классов Tailwind (hidden/flex/lg:*).
   Unlayered .hidden перебивает @layer utilities и ломает навбар. */
html {
  background-color: #1d3140;
  color: #ffffff;
  scrollbar-width: none;
}

html::-webkit-scrollbar {
  display: none;
}

body {
  margin: 0;
  min-height: 100%;
  background-color: #1d3140;
  color: #ffffff;
  overflow-x: hidden;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
}

img:not([width]),
video {
  max-width: 100%;
  height: auto;
}

img[width] {
  max-width: 100%;
}

.content-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 1rem;
  row-gap: 2rem;
}

@media (min-width: 768px) {
  .content-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .content-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (min-width: 1280px) {
  .content-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

.media-16x9 {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.app-shell {
  display: flex;
  min-height: 100vh;
  width: 100%;
  min-width: 0;
}

@media (max-width: 1023px) {
  .app-sidebar {
    display: none !important;
  }

  .app-mobile-overlay:not([data-open="true"]) {
    display: none !important;
  }

  .app-mobile-drawer:not([data-open="true"]) {
    transform: translateX(-110%) !important;
    pointer-events: none !important;
  }
}

@media (min-width: 1024px) {
  .app-mobile-only,
  .app-mobile-drawer,
  .app-mobile-overlay {
    display: none !important;
  }
}
