/*
 * FORMA WIN — раздел «Казино» (v79).
 *
 * Мобильная база, затем планшет от 600px, ноутбук от 900/1200px и десктоп.
 * Палитра, шрифт и контейнер — существующие: ManropeFW, тёмные поверхности,
 * индиго #6b4eff. Шапка, футер и нижняя навигация берутся из forma-v36.css.
 *
 * Во второй части файла — читаемость общих белых модалок (провайдеры v78,
 * механики и тематики v79): их открывают и главная, и каталог.
 */

/* ───────────── Контейнер страницы ───────────── */

html body.fw36 #fwCasino {
  display: none;
  padding-bottom: 28px;
  color: #f3f4f7;
}

html body.fw36.fw-casino #fwCasino {
  display: block;
}

/* Если в контейнере маршрута появится чужая разметка, каталог её не показывает. */
html body.fw36.fw-casino #pageGames > :not(#fwCasino) {
  display: none !important;
}

/* ───────────── Заголовок ───────────── */

html body.fw36 #fwCasino .cs-heading {
  padding: 10px 0 16px;
}

html body.fw36 #fwCasino .cs-heading h1 {
  margin: 0 0 6px;
  font-size: 32px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -1px;
}

html body.fw36 #fwCasino .cs-heading h1:focus-visible {
  outline: 3px solid #a392ff;
  outline-offset: 4px;
}

html body.fw36 #fwCasino .cs-heading p {
  margin: 0;
  color: #b6afc3;
  font-size: 15px;
  line-height: 1.5;
}

/* ───────────── Категории: на телефоне компактная сетка 3×3 ───────────── */

html body.fw36 #fwCasino .cs-categories {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  margin-bottom: 19px;
}

html body.fw36 #fwCasino .cs-categories button {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 0;
  min-height: 44px;
  padding: 10px 6px;
  border-radius: 11px;
  background: #242229;
  color: #c5becf;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
}

/* Длинное имя категории переносится, а не обрезается на узком экране. */
html body.fw36 #fwCasino .cs-categories button > span:not(.cs-facet-number):not(.cs-facet-arrow) {
  min-width: 0;
  overflow-wrap: anywhere;
  white-space: normal;
}

html body.fw36 #fwCasino .cs-categories button:hover {
  background: #302b3b;
  color: #fff;
}

html body.fw36 #fwCasino .cs-categories button[aria-pressed="true"] {
  background: var(--fw-indigo, #6b4eff);
  color: #fff;
}

html body.fw36 #fwCasino .cs-categories button[aria-pressed="true"]:hover {
  background: #795bff;
}

html body.fw36 #fwCasino .cs-cat-icon {
  flex: none;
  width: 16px;
  height: 16px;
  fill: currentColor;
}

/* Механики и тематики — кнопки модалок: чуть светлее и со стрелкой. */
html body.fw36 #fwCasino .cs-categories [data-cs-facet] {
  background: #2b2536;
}

html body.fw36 #fwCasino .cs-categories [data-cs-facet]:hover {
  background: #352c45;
}

html body.fw36 #fwCasino .cs-categories [data-cs-facet][aria-pressed="true"] {
  background: var(--fw-indigo, #6b4eff);
}

html body.fw36 #fwCasino .cs-facet-arrow {
  flex: none;
  color: #c6b5de;
  font-size: 12px;
  line-height: 1;
}

html body.fw36 #fwCasino [aria-pressed="true"] .cs-facet-arrow {
  color: #fff;
}

html body.fw36 #fwCasino .cs-facet-number {
  position: absolute;
  right: 3px;
  top: 3px;
  display: grid;
  place-items: center;
  min-width: 15px;
  height: 15px;
  padding: 0 4px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.14);
  color: inherit;
  font-size: 11px;
  font-weight: 700;
}

html body.fw36 #fwCasino .cs-facet-number[hidden] {
  display: none;
}

/* ───────────── Поиск и провайдеры ───────────── */

html body.fw36 #fwCasino .cs-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 48px;
  gap: 9px;
  margin-bottom: 14px;
}

html body.fw36 #fwCasino .cs-search {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  height: 48px;
  padding: 0 12px;
  border-radius: 12px;
  background: #242229;
  color: #b7afc5;
}

/* Подсветка фокуса рисуется внутрь, чтобы не увеличивать строку поиска. */
html body.fw36 #fwCasino .cs-search:focus-within {
  box-shadow: inset 0 0 0 2px #a28af0;
}

html body.fw36 #fwCasino .cs-search-icon {
  flex: none;
  width: 19px;
  height: 19px;
  fill: currentColor;
}

html body.fw36 #fwCasino .cs-search input {
  flex: 1;
  min-width: 0;
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: #f3f4f7;
  font-size: 15px;
  outline: none;
}

/*
 * forma-skin.css красит любой input[type=search|text|email|password] в
 * #141416 !important. В составных полях поиска фон и радиус рисует оболочка,
 * поэтому самому полю фон возвращаем прозрачным — иначе внутри строки поиска
 * видна тёмная вставка со своими углами.
 */
html body.fw36 #fwCasino .cs-search input {
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  color: #f5f0fa !important;
}

html body.fw36 #fwCasino .cs-search input::placeholder {
  color: #a9a1b6;
  opacity: 1;
}

html body.fw36 #fwCasino .cs-search input::-webkit-search-cancel-button {
  display: none;
}

/* Крестик очистки: удобная площадь нажатия и видимый значок из двух линий. */
html body.fw36 #fwCasino .cs-search-clear {
  position: relative;
  flex: none;
  width: 44px;
  height: 44px;
  margin-right: -8px;
  padding: 0;
  border-radius: 11px;
  background: transparent;
  color: #cfc6dd;
}

html body.fw36 #fwCasino .cs-search-clear::before,
html body.fw36 #fwCasino .cs-search-clear::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 15px;
  height: 2px;
  border-radius: 1px;
  background: currentColor;
  transform: translate(-50%, -50%) rotate(45deg);
}

html body.fw36 #fwCasino .cs-search-clear::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

html body.fw36 #fwCasino .cs-search-clear[hidden] {
  display: none;
}

html body.fw36 #fwCasino .cs-provider-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 0;
  height: 48px;
  padding: 0;
  border-radius: 12px;
  background: #2b2536;
  color: #e1d5f6;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

html body.fw36 #fwCasino .cs-provider-button:hover {
  background: #352c45;
}

html body.fw36 #fwCasino .cs-provider-button.is-active {
  background: var(--fw-indigo, #6b4eff);
  color: #fff;
}

html body.fw36 #fwCasino .cs-provider-icon {
  flex: none;
  width: 19px;
  height: 19px;
  fill: currentColor;
}

/* На телефоне кнопка остаётся иконкой, доступное имя задаёт aria-label. */
html body.fw36 #fwCasino .cs-provider-label {
  display: none;
}

/* ───────────── Подборки ───────────── */

/* Подборки — лёгкие ссылки-чипы без подложки: выделяется только выбранная. */
html body.fw36 #fwCasino .cs-collections {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
}

html body.fw36 #fwCasino .cs-collections button {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  min-height: 40px;
  padding: 7px 10px;
  border-radius: 9px;
  background: transparent;
  color: #a9a0b8;
  font-size: 13px;
  font-weight: 600;
}

html body.fw36 #fwCasino .cs-collections button:hover {
  color: #ded3f3;
}

html body.fw36 #fwCasino .cs-collections button[aria-pressed="true"] {
  background: #30263f;
  color: #d7c4ff;
}

html body.fw36 #fwCasino .cs-col-icon {
  flex: none;
  width: 14px;
  height: 14px;
  fill: currentColor;
}

html body.fw36 #fwCasino .cs-collections button > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ───────────── Плашки выбранных фильтров ───────────── */

html body.fw36 #fwCasino .cs-filter-chips {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 8px;
}

html body.fw36 #fwCasino .cs-filter-chips:empty {
  display: none;
}

html body.fw36 #fwCasino .cs-filter-chips[hidden] {
  display: none;
}

html body.fw36 #fwCasino .cs-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  min-height: 36px;
  padding: 6px 10px;
  border-radius: 8px;
  background: #292330;
  color: #d1bee9;
  font-size: 12px;
  font-weight: 600;
}

html body.fw36 #fwCasino .cs-chip > span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

html body.fw36 #fwCasino .cs-chip-x {
  position: relative;
  flex: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
}

html body.fw36 #fwCasino .cs-chip-x::before,
html body.fw36 #fwCasino .cs-chip-x::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 9px;
  height: 2px;
  border-radius: 1px;
  background: currentColor;
  transform: translate(-50%, -50%) rotate(45deg);
}

html body.fw36 #fwCasino .cs-chip-x::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

html body.fw36 #fwCasino .cs-reset {
  min-height: 36px;
  padding: 6px 10px;
  border-radius: 8px;
  background: transparent;
  color: #bca6ea;
  font-size: 12px;
  font-weight: 600;
}

html body.fw36 #fwCasino .cs-reset:hover {
  background: #292330;
  color: #e3d6ff;
}

/* ───────────── Счётчик и сортировка ───────────── */

html body.fw36 #fwCasino .cs-results-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 23px 0 17px;
}

html body.fw36 #fwCasino .cs-results-heading p {
  margin: 0;
  min-width: 0;
  color: #b5adbf;
  font-size: 13px;
  line-height: 1.5;
}

html body.fw36 #fwCasino .cs-sort {
  min-width: 0;
  max-width: 55%;
}

html body.fw36 #fwCasino .cs-sort select {
  max-width: 100%;
  min-height: 40px;
  padding: 8px 9px;
  border: 0;
  border-radius: 8px;
  background: #242129;
  color: #ddd4e9;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
}

/* ───────────── Сетка игр ───────────── */

html body.fw36 #fwCasino .cs-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px 12px;
}

html body.fw36 #fwCasino .cs-game {
  position: relative;
  min-width: 0;
}

html body.fw36 #fwCasino .cs-open {
  display: flex;
  flex-direction: column;
  gap: 7px;
  width: 100%;
  padding: 0;
  text-align: left;
}

html body.fw36 #fwCasino .cs-cover {
  position: relative;
  display: block;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 4 / 5;
  border-radius: 12px;
  background: #27232d;
}

html body.fw36 #fwCasino .cs-cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

html body.fw36 #fwCasino .cs-cover-blank {
  display: block;
  width: 100%;
  height: 100%;
}

/* Обложка без картинки или с неудавшейся загрузкой: ровная подложка без подмены. */
html body.fw36 #fwCasino .cs-cover.is-blank,
html body.fw36 #fwCasino .cs-cover-blank {
  background: linear-gradient(160deg, #26242c, #1b1a20);
}

/* Треугольник запуска появляется поверх обложки на наведении и фокусе. */
html body.fw36 #fwCasino .cs-play {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgba(107, 78, 255, 0.91);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.86);
  transition: opacity 0.18s, transform 0.18s;
}

html body.fw36 #fwCasino .cs-play::before {
  content: "";
  width: 0;
  height: 0;
  margin-left: 4px;
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
  border-left: 12px solid #fff;
}

html body.fw36 #fwCasino .cs-open:hover .cs-play,
html body.fw36 #fwCasino .cs-open:focus-visible .cs-play {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

html body.fw36 #fwCasino .cs-game-name {
  overflow: hidden;
  color: #f5f1fa;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

html body.fw36 #fwCasino .cs-game-provider {
  overflow: hidden;
  color: #a89eb5;
  font-size: 11px;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Звезда — отдельная кнопка: нажатие не запускает игру. */
html body.fw36 #fwCasino .cs-favorite {
  position: absolute;
  right: 6px;
  top: 6px;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 10px;
  background: rgba(22, 18, 27, 0.75);
  color: #f7f2ff;
}

html body.fw36 #fwCasino .cs-favorite:hover {
  background: #392a53;
}

html body.fw36 #fwCasino .cs-favorite[aria-pressed="true"] {
  background: rgba(37, 28, 56, 0.9);
  color: #c7acff;
}

html body.fw36 #fwCasino .cs-star {
  width: 19px;
  height: 19px;
  fill: transparent;
  stroke: currentColor;
  stroke-width: 1.8;
}

html body.fw36 #fwCasino .cs-favorite[aria-pressed="true"] .cs-star {
  fill: currentColor;
}

/* ───────────── Догрузка, пустые состояния, скелет ───────────── */

html body.fw36 #fwCasino .cs-pagination {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  padding: 29px 0 6px;
  color: #a79bb9;
  font-size: 12px;
}

html body.fw36 #fwCasino .cs-more {
  min-height: 46px;
  padding: 12px 24px;
  border-radius: 11px;
  background: var(--fw-indigo, #6b4eff);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
}

html body.fw36 #fwCasino .cs-more:hover {
  background: var(--fw-indigo-hover, #8170ff);
}

html body.fw36 #fwCasino .cs-more[disabled] {
  background: #37334a;
  color: #b4aecb;
  cursor: default;
}

html body.fw36 #fwCasino .cs-more-error {
  margin: 0;
  color: #c7bad9;
  font-size: 13px;
  text-align: center;
  line-height: 1.5;
}

html body.fw36 #fwCasino .cs-more-error button {
  min-height: 44px;
  padding: 8px 14px;
  border-radius: 10px;
  background: var(--fw-surface, #242424);
  color: #efecf7;
  font-weight: 600;
}

html body.fw36 #fwCasino .cs-empty {
  padding: 48px 20px;
  border-radius: 16px;
  background: #201d26;
  text-align: center;
}

html body.fw36 #fwCasino .cs-empty-icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin: 0 auto 12px;
  border-radius: 16px;
  background: #30263f;
  color: #bfa4ef;
}

html body.fw36 #fwCasino .cs-empty-glyph {
  width: 26px;
  height: 26px;
  fill: currentColor;
}

html body.fw36 #fwCasino .cs-empty h2 {
  margin: 0 0 8px;
  color: #f2edf9;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.3;
}

html body.fw36 #fwCasino .cs-empty p {
  margin: 0 auto 18px;
  max-width: 400px;
  color: #b9accb;
  font-size: 14px;
  line-height: 1.6;
}

html body.fw36 #fwCasino .cs-empty button {
  min-height: 46px;
  padding: 12px 24px;
  border-radius: 11px;
  background: var(--fw-indigo, #6b4eff);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
}

html body.fw36 #fwCasino .cs-skeleton span {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  border-radius: 12px;
  background: linear-gradient(100deg, #202026 20%, #2a2a33 40%, #202026 60%);
  background-size: 220% 100%;
  animation: fwCasinoShine 1.3s linear infinite;
}

@keyframes fwCasinoShine {
  from {
    background-position: 120% 0;
  }
  to {
    background-position: -120% 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  html body.fw36 #fwCasino .cs-skeleton span {
    animation: none;
  }

  html body.fw36 #fwCasino .cs-play {
    transition: none;
  }
}

/* ───────────── Планшет от 600px ───────────── */

@media (min-width: 600px) {
  /* От планшета категории — обычный ряд по содержимому, как в макете. */
  html body.fw36 #fwCasino .cs-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

  html body.fw36 #fwCasino .cs-categories button {
    flex: none;
    padding: 11px 14px;
    gap: 7px;
    font-size: 14px;
  }

  html body.fw36 #fwCasino .cs-categories button > span:not(.cs-facet-number):not(.cs-facet-arrow) {
    white-space: nowrap;
  }

  html body.fw36 #fwCasino .cs-cat-icon {
    width: 18px;
    height: 18px;
  }

  html body.fw36 #fwCasino .cs-facet-arrow {
    font-size: 15px;
  }

  html body.fw36 #fwCasino .cs-facet-number {
    position: static;
    min-width: 18px;
    height: 18px;
  }

  html body.fw36 #fwCasino .cs-controls {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  html body.fw36 #fwCasino .cs-search input {
    font-size: 16px;
  }

  html body.fw36 #fwCasino .cs-provider-button {
    padding: 0 18px;
    font-size: 14px;
  }

  html body.fw36 #fwCasino .cs-provider-label {
    display: inline;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  html body.fw36 #fwCasino .cs-results-heading p,
  html body.fw36 #fwCasino .cs-sort select {
    font-size: 14px;
  }

  html body.fw36 #fwCasino .cs-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 25px 16px;
  }

  html body.fw36 #fwCasino .cs-cover {
    border-radius: 13px;
  }

  html body.fw36 #fwCasino .cs-game-name {
    font-size: 14px;
  }

  html body.fw36 #fwCasino .cs-game-provider {
    font-size: 12px;
  }

  html body.fw36 #fwCasino .cs-skeleton span {
    border-radius: 13px;
  }
}

/* ───────────── Ноутбук от 900px ───────────── */

@media (min-width: 900px) {
  html body.fw36 #fwCasino .cs-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  html body.fw36 #fwCasino .cs-categories button {
    padding: 11px 19px;
    font-size: 15px;
  }

  html body.fw36 #fwCasino .cs-heading {
    padding: 14px 0 20px;
  }
}

/* ───────────── Широкие экраны от 1200px ───────────── */

@media (min-width: 1200px) {
  html body.fw36 #fwCasino .cs-heading h1 {
    font-size: 42px;
    letter-spacing: -1.4px;
  }

  html body.fw36 #fwCasino .cs-heading p {
    font-size: 16px;
  }

  html body.fw36 #fwCasino .cs-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 28px 18px;
  }

  html body.fw36 #fwCasino .cs-categories {
    margin-bottom: 22px;
  }

  html body.fw36 #fwCasino .cs-controls {
    gap: 15px;
  }

  html body.fw36 #fwCasino .cs-collections {
    margin-top: 5px;
  }

  html body.fw36 #fwCasino .cs-collections button {
    padding: 7px 12px;
    font-size: 14px;
  }

  /* На мыши звезда появляется при наведении, выбранная остаётся видимой всегда. */
  html body.fw36 #fwCasino .cs-favorite {
    opacity: 0;
    transition: opacity 0.16s;
  }

  html body.fw36 #fwCasino .cs-game:hover .cs-favorite,
  html body.fw36 #fwCasino .cs-game:focus-within .cs-favorite,
  html body.fw36 #fwCasino .cs-favorite[aria-pressed="true"] {
    opacity: 1;
  }
}

/* ───────────── Узкие телефоны до 360px ───────────── */

@media (max-width: 359px) {
  html body.fw36 #fwCasino .cs-collections button {
    padding: 7px 7px;
    font-size: 12px;
  }

  html body.fw36 #fwCasino .cs-grid {
    gap: 20px 10px;
  }

  html body.fw36 #fwCasino .cs-results-heading p {
    font-size: 12px;
  }

  html body.fw36 #fwCasino .cs-sort select {
    padding-inline: 6px;
    font-size: 12px;
  }
}

/* ───────────── Общие белые модалки: читаемость ───────────── */

/* Крестик: площадь нажатия 44×44, значок из двух линий по центру. */
html body.fw36 .fw36-dialog--providers .fw36-dialog-close,
html body.fw36 .fw36-dialog--facets .fw36-dialog-close {
  display: grid;
  place-items: center;
  top: 12px;
  right: 12px;
  width: 44px;
  height: 44px;
  min-height: 44px;
  border-radius: 12px;
  background: #f2f0f5;
  color: #5c5568;
  font-size: 0;
  touch-action: manipulation;
}

html body.fw36 .fw36-dialog--providers .fw36-dialog-close::before,
html body.fw36 .fw36-dialog--providers .fw36-dialog-close::after,
html body.fw36 .fw36-dialog--facets .fw36-dialog-close::before,
html body.fw36 .fw36-dialog--facets .fw36-dialog-close::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 20px;
  height: 2px;
  border-radius: 1px;
  background: currentColor;
  transform: translate(-50%, -50%) rotate(45deg);
}

html body.fw36 .fw36-dialog--providers .fw36-dialog-close::after,
html body.fw36 .fw36-dialog--facets .fw36-dialog-close::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

html body.fw36 .fw36-dialog--providers .fw36-dialog-close:hover,
html body.fw36 .fw36-dialog--facets .fw36-dialog-close:hover {
  background: #e8e3f0;
  color: #33273f;
}

html body.fw36 .fw36-dialog--providers h2,
html body.fw36 .fw36-dialog--facets h2 {
  margin-right: 56px;
}

/* Поле поиска провайдера: 16px и контрастный текст. */
/* Поля в белых модалках тоже перекрываем: тёмный фон из скина здесь нечитаем. */
html body.fw36 .fw36-dialog .provider-search-field input,
html body.fw36 #fw36ProviderSearch {
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  color: #17151f !important;
  appearance: none !important;
  -webkit-appearance: none !important;
}

html body.fw36.forma-ui .fw36-dialog .fw36-search-field input,
html body.fw36.forma-ui #fw36GameSearch,
html body.fw36 .fw36-dialog .fw36-search-field input,
html body.fw36 #fw36GameSearch {
  background: #f0f0f4 !important;
  border: 0 !important;
  border-radius: 11px !important;
  box-shadow: none !important;
  color: #17151f !important;
  letter-spacing: 0 !important;
  appearance: none !important;
  -webkit-appearance: none !important;
}

html body.fw36 .fw36-search-field {
  background: transparent !important;
}

html body.fw36 .provider-search-field {
  background: #f0f0f4 !important;
}

html body.fw36 .fw36-dialog--providers .provider-search-field input {
  font-size: 16px;
  color: #302b38;
}

html body.fw36 .fw36-dialog--providers .provider-search-field input::placeholder {
  color: #716b7a;
  opacity: 1;
}

html body.fw36 .fw36-dialog--providers .provider-search-clear {
  position: relative;
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: transparent;
  color: #62566f;
}

html body.fw36 .fw36-dialog--providers .provider-search-clear::before,
html body.fw36 .fw36-dialog--providers .provider-search-clear::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 16px;
  height: 2px;
  border-radius: 1px;
  background: currentColor;
  transform: translate(-50%, -50%) rotate(45deg);
}

html body.fw36 .fw36-dialog--providers .provider-search-clear::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

html body.fw36 .fw36-dialog--providers .provider-results-meta {
  padding: 16px 0 12px;
  color: #655e70;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
}

/* Названия студий — 14px с переносом полного названия, без сокращения до 10–11px. */
html body.fw36 .fw36-dialog--providers .provider-name {
  display: block;
  max-width: 100%;
  overflow: visible;
  overflow-wrap: anywhere;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  text-align: center;
  text-overflow: clip;
  white-space: normal;
}

html body.fw36 .fw36-dialog--providers .provider-name-fallback {
  color: #57515e;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.4px;
  text-align: center;
}

html body.fw36 .fw36-dialog--providers .provider-empty strong {
  display: block;
  margin-bottom: 6px;
  color: #38323f;
  font-size: 16px;
}

html body.fw36 .fw36-dialog--providers .provider-empty p {
  margin: 0;
  color: #655e70;
  font-size: 15px;
  line-height: 1.5;
}

/* ───────────── Общая модалка механик и тематик ───────────── */

html body.fw36 .fw36-dialog--facets {
  display: flex;
  flex-direction: column;
  width: min(520px, 100%);
  max-height: calc(100dvh - 48px);
  overflow: hidden;
}

html body.fw36 .fw36-dialog--facets #fw36DialogBody {
  display: flex;
  flex-direction: column;
  min-height: 0;
  max-height: min(660px, calc(100dvh - 96px));
}

html body.fw36 .fw36-facet-note {
  flex: none;
  margin: 0 0 12px;
  color: #655e70;
  font-size: 14px;
  line-height: 1.5;
}

/* Длинный список прокручивается внутри, кнопки применения остаются на экране. */
html body.fw36 .fw36-facet-list {
  display: grid;
  gap: 8px;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  margin: 0 -3px;
  padding: 3px;
}

html body.fw36 .fw36-facet-option {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 54px;
  padding: 10px 14px;
  border-radius: 12px;
  background: #f5f5f7;
  color: #26212f;
  cursor: pointer;
}

html body.fw36 .fw36-facet-option:hover {
  background: #eeedf3;
}

html body.fw36 .fw36-facet-option input {
  flex: none;
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: #6b4eff;
}

html body.fw36 .fw36-facet-option strong {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
}

html body.fw36 .fw36-facet-size {
  flex: none;
  color: #655e70;
  font-size: 14px;
  font-weight: 500;
}

html body.fw36 .fw36-facet-empty {
  margin: 0;
  padding: 26px 10px;
  color: #655e70;
  font-size: 15px;
  line-height: 1.5;
  text-align: center;
}

html body.fw36 .fw36-facet-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  gap: 10px;
  flex: none;
  padding-top: 16px;
}

html body.fw36 .fw36-facet-actions button {
  min-height: 48px;
  padding: 12px 14px;
  border: 0;
  border-radius: 12px;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

html body.fw36 .fw36-facet-reset {
  background: #f0eff4;
  color: #413a4d;
}

html body.fw36 .fw36-facet-reset:hover {
  background: #e7e4ee;
}

html body.fw36 .fw36-facet-apply {
  background: #6b4eff;
  color: #fff;
}

html body.fw36 .fw36-facet-apply:hover {
  background: #8170ff;
}

/* ───────────── Кнопки механик и тематик в полосе категорий главной ───────────── */

html body.fw36 .fw36-main .mode-tabs-list {
  display: contents;
}

html body.fw36 .fw36-main .mode-facet {
  position: relative;
}

html body.fw36 .fw36-main .mode-facet-count {
  min-width: 18px;
  height: 18px;
  margin-left: 2px;
  padding: 0 4px;
  border-radius: 9px;
  background: var(--fw-indigo, #6b4eff);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 18px;
}

html body.fw36 .fw36-main .mode-facet-count[hidden] {
  display: none;
}

html body.fw36 .fw36-main .mode-facet[aria-pressed="true"] {
  background: var(--fw-indigo, #6b4eff);
  color: #fff;
}

html body.fw36 .fw36-main .mode-facet[aria-pressed="true"]:hover {
  background: #7760ff;
}

html body.fw36 .fw36-main .mode-facet[aria-pressed="true"] .mode-facet-count {
  background: #fff;
  color: var(--fw-indigo, #6b4eff);
}
