/**
 * Подстраховка, если основной CSS из /_next/static/css/ не загрузился.
 * Селекторы :where(.класс) имеют специфичность 0 — настоящие правила Tailwind всегда сильнее.
 * Покрыты типичные layout-классы главной и шапки (не arbitrary values вроде bg-[...]).
 */

/* ——— display ——— */
:where(.flex) {
  display: flex;
}
:where(.inline-flex) {
  display: inline-flex;
}
:where(.grid) {
  display: grid;
}
:where(.block) {
  display: block;
}
:where(.inline-block) {
  display: inline-block;
}
:where(.hidden) {
  display: none;
}

/* ——— flex ——— */
:where(.flex-col) {
  flex-direction: column;
}
:where(.flex-row) {
  flex-direction: row;
}
:where(.flex-wrap) {
  flex-wrap: wrap;
}
:where(.flex-nowrap) {
  flex-wrap: nowrap;
}
:where(.items-center) {
  align-items: center;
}
:where(.items-start) {
  align-items: flex-start;
}
:where(.items-end) {
  align-items: flex-end;
}
:where(.items-stretch) {
  align-items: stretch;
}
:where(.items-baseline) {
  align-items: baseline;
}
:where(.justify-center) {
  justify-content: center;
}
:where(.justify-between) {
  justify-content: space-between;
}
:where(.justify-end) {
  justify-content: flex-end;
}
:where(.justify-start) {
  justify-content: flex-start;
}
:where(.flex-1) {
  flex: 1 1 0%;
}
:where(.shrink-0) {
  flex-shrink: 0;
}
:where(.grow) {
  flex-grow: 1;
}

/* ——— gap (Tailwind spacing scale) ——— */
:where(.gap-0) {
  gap: 0;
}
:where(.gap-0\.5) {
  gap: 0.125rem;
}
:where(.gap-1) {
  gap: 0.25rem;
}
:where(.gap-1\.5) {
  gap: 0.375rem;
}
:where(.gap-2) {
  gap: 0.5rem;
}
:where(.gap-2\.5) {
  gap: 0.625rem;
}
:where(.gap-3) {
  gap: 0.75rem;
}
:where(.gap-3\.5) {
  gap: 0.875rem;
}
:where(.gap-4) {
  gap: 1rem;
}
:where(.gap-5) {
  gap: 1.25rem;
}
:where(.gap-6) {
  gap: 1.5rem;
}
:where(.gap-7) {
  gap: 1.75rem;
}
:where(.gap-8) {
  gap: 2rem;
}
:where(.gap-10) {
  gap: 2.5rem;
}
:where(.gap-12) {
  gap: 3rem;
}

:where(.gap-x-2) {
  column-gap: 0.5rem;
}
:where(.gap-x-3) {
  column-gap: 0.75rem;
}
:where(.gap-x-4) {
  column-gap: 1rem;
}
:where(.gap-x-6) {
  column-gap: 1.5rem;
}
:where(.gap-x-8) {
  column-gap: 2rem;
}
:where(.gap-y-2) {
  row-gap: 0.5rem;
}
:where(.gap-y-3) {
  row-gap: 0.75rem;
}

/* ——— grid columns ——— */
:where(.grid-cols-1) {
  grid-template-columns: repeat(1, minmax(0, 1fr));
}
:where(.grid-cols-2) {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
:where(.grid-cols-3) {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
:where(.grid-cols-4) {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

/* ——— sizing ——— */
:where(.w-full) {
  width: 100%;
}
:where(.min-w-0) {
  min-width: 0;
}
:where(.max-w-sm) {
  max-width: 24rem;
}
:where(.max-w-md) {
  max-width: 28rem;
}
:where(.max-w-2xl) {
  max-width: 42rem;
}
:where(.max-w-3xl) {
  max-width: 48rem;
}
:where(.max-w-4xl) {
  max-width: 56rem;
}
:where(.max-w-xl) {
  max-width: 36rem;
}
:where(.h-6) {
  height: 1.5rem;
}
:where(.w-6) {
  width: 1.5rem;
}
:where(.h-11) {
  height: 2.75rem;
}
:where(.h-12) {
  height: 3rem;
}
:where([class*="min-h-[48px]"]) {
  min-height: 48px;
}
:where([class*="min-h-[44px]"]) {
  min-height: 44px;
}
:where([class*="min-h-[100px]"]) {
  min-height: 100px;
}

/* ——— position ——— */
:where(.relative) {
  position: relative;
}
:where(.absolute) {
  position: absolute;
}
:where(.fixed) {
  position: fixed;
}
:where(.inset-0) {
  inset: 0;
}
:where(.inset-x-0) {
  left: 0;
  right: 0;
}
:where(.top-0) {
  top: 0;
}
:where(.z-10) {
  z-index: 10;
}
:where(.z-0) {
  z-index: 0;
}
:where(.z-50) {
  z-index: 50;
}

/* ——— overflow ——— */
:where(.overflow-hidden) {
  overflow: hidden;
}
:where(.overflow-x-auto) {
  overflow-x: auto;
}
:where(.overflow-x-clip) {
  overflow-x: clip;
}

/* ——— responsive sm (640px) ——— */
@media (min-width: 640px) {
  :where(.sm\:flex) {
    display: flex;
  }
  :where(.sm\:inline-flex) {
    display: inline-flex;
  }
  :where(.sm\:hidden) {
    display: none;
  }
  :where(.sm\:flex-row) {
    flex-direction: row;
  }
  :where(.sm\:flex-wrap) {
    flex-wrap: wrap;
  }
  :where(.sm\:items-center) {
    align-items: center;
  }
  :where(.sm\:items-stretch) {
    align-items: stretch;
  }
  :where(.sm\:items-end) {
    align-items: flex-end;
  }
  :where(.sm\:justify-between) {
    justify-content: space-between;
  }
  :where(.sm\:justify-center) {
    justify-content: center;
  }
  :where(.sm\:gap-2) {
    gap: 0.5rem;
  }
  :where(.sm\:gap-3) {
    gap: 0.75rem;
  }
  :where(.sm\:gap-3\.5) {
    gap: 0.875rem;
  }
  :where(.sm\:gap-4) {
    gap: 1rem;
  }
  :where(.sm\:gap-5) {
    gap: 1.25rem;
  }
  :where(.sm\:gap-6) {
    gap: 1.5rem;
  }
  :where(.sm\:gap-7) {
    gap: 1.75rem;
  }
  :where(.sm\:gap-10) {
    gap: 2.5rem;
  }
  :where(.sm\:gap-12) {
    gap: 3rem;
  }
  :where(.sm\:gap-x-8) {
    column-gap: 2rem;
  }
  :where(.sm\:grid-cols-2) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  :where(.sm\:grid-cols-3) {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  :where(.sm\:gap-y-10) {
    row-gap: 2.5rem;
  }
  :where(.sm\:mt-12) {
    margin-top: 3rem;
  }
  :where(.sm\:max-w-xl) {
    max-width: 36rem;
  }
  :where(.sm\:pb-1) {
    padding-bottom: 0.25rem;
  }
  :where(.sm\:pt-2) {
    padding-top: 0.5rem;
  }
  :where(.sm\:pt-4) {
    padding-top: 1rem;
  }
  :where(.sm\:pt-12) {
    padding-top: 3rem;
  }
  :where(.sm\:pb-4) {
    padding-bottom: 1rem;
  }
  :where(.sm\:pb-14) {
    padding-bottom: 3.5rem;
  }
  :where(.sm\:pb-2) {
    padding-bottom: 0.5rem;
  }
  :where(.sm\:px-5) {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }
  :where(.sm\:py-3\.5) {
    padding-top: 0.875rem;
    padding-bottom: 0.875rem;
  }
  :where(.sm\:text-base) {
    font-size: 1rem;
  }
  :where(.sm\:text-sm) {
    font-size: 0.875rem;
  }
  :where(.sm\:text-\[15px\]) {
    font-size: 15px;
  }
  :where(.sm\:min-h-\[52px\]) {
    min-height: 52px;
  }
  :where(.sm\:scroll-mt-\[calc\(74px\+1rem\)\]) {
    scroll-margin-top: calc(74px + 1rem);
  }
}

/* ——— max-md (до 767px): часто в паре с .grid вместо .hidden + .md:grid (в shim нет md:grid до подгрузки Tailwind) ——— */
@media (max-width: 767px) {
  :where(.max-md\:hidden) {
    display: none;
  }
}

/* ——— responsive md (768px) ——— */
@media (min-width: 768px) {
  :where(.md\:flex) {
    display: flex;
  }
  :where(.md\:grid) {
    display: grid;
  }
  :where(.md\:hidden) {
    display: none;
  }
  :where(.md\:min-h-0) {
    min-height: 0;
  }
  :where(.md\:grid-cols-3) {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  :where(.md\:gap-6) {
    gap: 1.5rem;
  }
  :where(.md\:gap-8) {
    gap: 2rem;
  }
  :where(.md\:p-7) {
    padding: 1.75rem;
  }
  :where(.md\:px-10) {
    padding-left: 2.5rem;
    padding-right: 2.5rem;
  }
  :where(.md\:py-14) {
    padding-top: 3.5rem;
    padding-bottom: 3.5rem;
  }
}

/* ——— responsive lg (1024px) ——— */
@media (min-width: 1024px) {
  :where(.lg\:grid-cols-3) {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  :where(.lg\:grid-cols-12) {
    grid-template-columns: repeat(12, minmax(0, 1fr));
  }
  :where(.lg\:col-span-2) {
    grid-column: span 2 / span 2;
  }
  :where(.lg\:col-span-3) {
    grid-column: span 3 / span 3;
  }
  :where(.lg\:col-span-4) {
    grid-column: span 4 / span 4;
  }
  :where(.lg\:mx-3) {
    margin-left: 0.75rem;
    margin-right: 0.75rem;
  }
  :where(.lg\:gap-x-10) {
    column-gap: 2.5rem;
  }
  :where(.lg\:pt-14) {
    padding-top: 3.5rem;
  }
}

/* ——— responsive xl ——— */
@media (min-width: 1280px) {
  :where(.xl\:gap-7) {
    gap: 1.75rem;
  }
}

/* ——— responsive 2xl ——— */
@media (min-width: 1536px) {
  :where([class*="2xl:grid-cols-4"]) {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* ——— цвета / фон (переменные из fallback.css :root) ——— */
:where(.bg-pl-bg) {
  background-color: var(--color-pl-bg);
}
:where(.bg-pl-header) {
  background-color: var(--color-pl-header);
}
:where(.bg-pl-surface) {
  background-color: var(--color-pl-surface);
}
:where(.bg-pl-input) {
  background-color: var(--color-pl-input);
}
:where(.bg-pl-accent) {
  background-color: var(--color-pl-accent);
}
:where(.bg-pl-accent\/15) {
  background-color: color-mix(in srgb, var(--color-pl-accent) 15%, transparent);
}
:where(.bg-pl-header\/40) {
  background-color: color-mix(in srgb, var(--color-pl-header) 40%, transparent);
}
:where(.bg-pl-header\/60) {
  background-color: color-mix(in srgb, var(--color-pl-header) 60%, transparent);
}
:where(.bg-pl-input\/60) {
  background-color: color-mix(in srgb, var(--color-pl-input) 60%, transparent);
}
:where(.bg-white\/\[0\.04\]) {
  background-color: rgba(255, 255, 255, 0.04);
}
:where(.bg-white\/\[0\.08\]) {
  background-color: rgba(255, 255, 255, 0.08);
}

:where(.text-white) {
  color: #fafafa;
}
:where(.text-zinc-100) {
  color: #f4f4f5;
}
:where(.text-zinc-200) {
  color: #e4e4e7;
}
:where(.text-zinc-300) {
  color: #d4d4d8;
}
:where(.text-zinc-400) {
  color: #a1a1aa;
}
:where(.text-zinc-500) {
  color: #71717a;
}
:where(.text-zinc-600) {
  color: #52525b;
}
:where(.text-pl-accent) {
  color: var(--color-pl-accent);
}
:where(.text-pl-muted) {
  color: var(--color-pl-muted);
}

/* ——— скругления ——— */
:where(.rounded-2xl) {
  border-radius: 1rem;
}
:where(.rounded-3xl) {
  border-radius: 1.5rem;
}
:where(.rounded-xl) {
  border-radius: 0.75rem;
}
:where(.rounded-lg) {
  border-radius: 0.5rem;
}
:where(.rounded-full) {
  border-radius: 9999px;
}

/* ——— границы (частые) ——— */
:where(.border) {
  border-width: 1px;
  border-style: solid;
}
:where(.border-t) {
  border-top-width: 1px;
  border-top-style: solid;
}
:where(.border-b) {
  border-bottom-width: 1px;
  border-bottom-style: solid;
}
:where(.border-white\/\[0\.06\]) {
  border-color: rgba(255, 255, 255, 0.06);
}
:where(.border-white\/\[0\.08\]) {
  border-color: rgba(255, 255, 255, 0.08);
}
:where(.border-white\/\[0\.09\]) {
  border-color: rgba(255, 255, 255, 0.09);
}
:where(.border-white\/\[0\.12\]) {
  border-color: rgba(255, 255, 255, 0.12);
}

/* ——— отступы (частые на главной) ——— */
:where(.p-4) {
  padding: 1rem;
}
:where(.p-5) {
  padding: 1.25rem;
}
:where(.p-6) {
  padding: 1.5rem;
}
:where(.px-3) {
  padding-left: 0.75rem;
  padding-right: 0.75rem;
}
:where(.px-4) {
  padding-left: 1rem;
  padding-right: 1rem;
}
:where(.px-5) {
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}
:where(.px-6) {
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}
:where(.py-3) {
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}
:where(.py-5) {
  padding-top: 1.25rem;
  padding-bottom: 1.25rem;
}
:where(.py-10) {
  padding-top: 2.5rem;
  padding-bottom: 2.5rem;
}
:where(.pt-1) {
  padding-top: 0.25rem;
}
:where(.pt-3) {
  padding-top: 0.75rem;
}
:where(.pt-4) {
  padding-top: 1rem;
}
:where(.pt-6) {
  padding-top: 1.5rem;
}
:where(.pt-10) {
  padding-top: 2.5rem;
}
:where(.pb-1) {
  padding-bottom: 0.25rem;
}
:where(.pb-10) {
  padding-bottom: 2.5rem;
}
:where(.pb-14) {
  padding-bottom: 3.5rem;
}

:where(.mt-3) {
  margin-top: 0.75rem;
}
:where(.mt-4) {
  margin-top: 1rem;
}
:where(.mt-6) {
  margin-top: 1.5rem;
}
:where(.mt-10) {
  margin-top: 2.5rem;
}
:where(.mb-1) {
  margin-bottom: 0.25rem;
}
:where(.mx-1\.5) {
  margin-left: 0.375rem;
  margin-right: 0.375rem;
}
:where(.m-0) {
  margin: 0;
}

:where(.pt-3) {
  padding-top: 0.75rem;
}
:where(.pb-3) {
  padding-bottom: 0.75rem;
}
:where(.whitespace-nowrap) {
  white-space: nowrap;
}

/* ——— типографика ——— */
:where(.font-medium) {
  font-weight: 500;
}
:where(.font-semibold) {
  font-weight: 600;
}
:where(.font-bold) {
  font-weight: 700;
}
:where(.text-sm) {
  font-size: 0.875rem;
}
:where(.text-base) {
  font-size: 1rem;
}
:where(.text-lg) {
  font-size: 1.125rem;
}
:where(.text-\[11px\]) {
  font-size: 11px;
}
:where(.text-\[12px\]) {
  font-size: 12px;
}
:where(.text-\[13px\]) {
  font-size: 13px;
}
:where(.text-\[14px\]) {
  font-size: 14px;
}
:where(.text-\[15px\]) {
  font-size: 15px;
}
:where(.text-\[16px\]) {
  font-size: 16px;
}
:where(.leading-relaxed) {
  line-height: 1.625;
}
:where(.leading-snug) {
  line-height: 1.375;
}
:where(.leading-normal) {
  line-height: 1.5;
}
:where(.tracking-\[-0\.02em\]) {
  letter-spacing: -0.02em;
}
:where(.tracking-tight) {
  letter-spacing: -0.025em;
}
:where(.tracking-wider) {
  letter-spacing: 0.05em;
}
:where(.tracking-\[0\.18em\]) {
  letter-spacing: 0.18em;
}
:where(.uppercase) {
  text-transform: uppercase;
}
:where(.text-center) {
  text-align: center;
}
:where(.text-left) {
  text-align: left;
}
:where(.text-balance) {
  text-wrap: balance;
}

/* ——— scroll snap (категории) ——— */
:where(.snap-x) {
  scroll-snap-type: x mandatory;
}
:where(.snap-mandatory) {
  scroll-snap-type: x mandatory;
}
:where(.snap-start) {
  scroll-snap-align: start;
}

/* ——— pointer-events ——— */
:where(.pointer-events-none) {
  pointer-events: none;
}

/* Footer: нижний отступ с safe-area (класс с arbitrary value) */
:where([class*="pb-[max(1rem"]) {
  padding-bottom: max(1rem, env(safe-area-inset-bottom, 0px));
}

/* Списки: без маркеров, если нет Tailwind preflight */
:where([data-pl-shell]) ul {
  list-style: none;
  padding-left: 0;
  margin: 0;
}
:where([data-pl-shell]) li {
  margin: 0;
}
