/* Telegram channels catalog enhancements */

body.catalog-home,
body.catalog-legacy-hidden {
  --cat-accent: #38b7ee;
  --cat-accent-hover: #2aa8e8;
  --cat-accent-light: #4fc3f0;
  --cat-accent-dark: #2aa8e8;
  --cat-accent-rgb: 56, 183, 238;
  --cat-accent-soft: #b8e9fa;
  --cat-bg-base: #3d5670;
  --cat-bg-overlay-a: rgba(15, 30, 50, 0.42);
  --cat-bg-overlay-b: rgba(45, 68, 95, 0.58);
  --cat-container-top: rgba(55, 82, 112, 0.58);
  --cat-container-bottom: rgba(42, 68, 98, 0.52);
  --cat-header-top: rgba(32, 52, 78, 0.82);
  --cat-header-bottom: rgba(24, 42, 64, 0.74);
  --cat-bg-image: url('../images/catalog-bg.jpg');
  background-color: var(--cat-bg-base);
  background-image:
    linear-gradient(
      90deg,
      var(--cat-bg-overlay-a) 0%,
      rgba(15, 30, 50, 0.28) 30%,
      rgba(15, 30, 50, 0.28) 70%,
      var(--cat-bg-overlay-a) 100%
    ),
    linear-gradient(180deg, var(--cat-bg-overlay-b) 0%, rgba(35, 55, 80, 0.52) 100%),
    var(--cat-bg-image);
  background-position: center center;
  background-size: cover;
  background-attachment: fixed;
  background-repeat: no-repeat;
  min-height: 100vh;
}

body.catalog-home .main-container,
body.catalog-legacy-hidden .main-container {
  background: linear-gradient(180deg, var(--cat-container-top) 0%, var(--cat-container-bottom) 100%);
  box-shadow: none;
}

body.catalog-home .main-header,
body.catalog-legacy-hidden .main-header {
  background: linear-gradient(180deg, var(--cat-header-top) 0%, var(--cat-header-bottom) 100%);
  z-index: 1000;
  overflow: visible;
}

body.catalog-home #header,
body.catalog-legacy-hidden #header {
  background: transparent;
  box-shadow: none;
  display: flex !important;
  align-items: center;
  justify-content: flex-start !important;
  flex-wrap: nowrap;
  gap: 10px 14px;
  padding: 8px 15px;
  box-sizing: border-box;
  float: none !important;
  overflow: visible;
}

body.catalog-home .header-center,
body.catalog-home .secondary-navigation,
body.catalog-home #navigation,
body.catalog-legacy-hidden .header-center,
body.catalog-legacy-hidden .secondary-navigation,
body.catalog-legacy-hidden #navigation {
  overflow: visible;
}

body.catalog-home .header-center,
body.catalog-legacy-hidden .header-center {
  margin-left: 0;
  margin-right: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  max-width: none;
  min-width: 0;
  flex: 1 1 auto;
  align-self: center;
  order: 3;
}

body.catalog-home #site-userbar,
body.catalog-legacy-hidden #site-userbar {
  flex-shrink: 0;
  align-self: center;
  margin: 0 0 0 auto;
  justify-content: center;
  order: 5;
}

body.catalog-home .lang-switch-mount,
body.catalog-legacy-hidden .lang-switch-mount {
  flex-shrink: 0;
  align-self: center;
  margin: 0;
  margin-inline-start: 0;
  justify-content: center;
  order: 20;
}

body.catalog-home .header-top-actions,
body.catalog-legacy-hidden .header-top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  align-self: center;
  order: 4;
  margin-left: 0;
}

body.catalog-home .header-top-actions .header-add-channel,
body.catalog-legacy-hidden .header-top-actions .header-add-channel {
  margin: 0;
  min-height: 36px;
  height: 36px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

body.catalog-home .header-menu-toggle,
body.catalog-legacy-hidden .header-menu-toggle {
  display: none;
}

body.catalog-home .menu-lang-item,
body.catalog-legacy-hidden .menu-lang-item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0 4px;
  align-self: center;
  /* Keep mail → language order identical for ru/en/he/ar */
  direction: ltr;
  flex-direction: row;
}

body.catalog-home .menu-lang-item .mail-inbox-mount,
body.catalog-legacy-hidden .menu-lang-item .mail-inbox-mount {
  margin: 0;
  order: 1;
}

body.catalog-home .menu-lang-item .lang-switch-mount,
body.catalog-legacy-hidden .menu-lang-item .lang-switch-mount {
  order: 2;
  margin: 0;
}

body.catalog-home .menu-userbar-item,
body.catalog-legacy-hidden .menu-userbar-item {
  display: flex;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0 4px;
}

body.catalog-home .menu-userbar-item .site-userbar,
body.catalog-legacy-hidden .menu-userbar-item .site-userbar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 0;
  order: unset;
}

/* Desktop: keep auth buttons compact (theme .secondary-navigation a is oversized). */
body.catalog-home .menu-userbar-item .site-userbar a,
body.catalog-home .menu-userbar-item .site-userbar button,
body.catalog-legacy-hidden .menu-userbar-item .site-userbar a,
body.catalog-legacy-hidden .menu-userbar-item .site-userbar button {
  min-height: 36px !important;
  height: 36px !important;
  padding: 0 12px !important;
  line-height: 1.2 !important;
  text-transform: none !important;
  font-size: 13px !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

body.catalog-home .secondary-navigation .menu > li > a,
body.catalog-home .secondary-navigation .menu > li > button.menu-search-link,
body.catalog-legacy-hidden .secondary-navigation .menu > li > a,
body.catalog-legacy-hidden .secondary-navigation .menu > li > button.menu-search-link {
  border-radius: 10px;
  width: auto;
  min-height: 36px !important;
  height: 36px !important;
  padding: 0 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1.2 !important;
  font-size: 15px;
  font-weight: 400;
  box-sizing: border-box;
  white-space: nowrap;
  text-transform: uppercase;
  align-self: center;
  overflow: visible;
}

body.catalog-home .main-container #page,
body.catalog-legacy-hidden .main-container #page {
  padding-top: 78px !important;
}

body.catalog-home .header-brand,
body.catalog-legacy-hidden .header-brand {
  flex-shrink: 0;
  align-self: center;
  min-width: 0;
}

body.catalog-home #logo,
body.catalog-legacy-hidden #logo,
body.catalog-home #logo a,
body.catalog-legacy-hidden #logo a {
  float: none !important;
  display: block;
  line-height: 0;
  margin: 0;
  padding: 0;
}

body.catalog-home #logo a.brand-logo,
body.catalog-legacy-hidden #logo a.brand-logo {
  line-height: normal;
}

.brand-logo {
  display: inline-flex !important;
  align-items: center;
  gap: 10px;
  text-decoration: none !important;
  color: #fff !important;
}

.brand-logo__inner {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.brand-logo__icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: block;
  line-height: 0;
  filter: drop-shadow(0 2px 8px rgba(42, 171, 238, 0.35));
}

.brand-logo__icon svg {
  display: block;
  width: 40px;
  height: 40px;
}

.brand-logo__text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.brand-logo__title {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: #fff;
  white-space: nowrap;
}

.brand-logo__sub {
  font-size: 11px;
  font-weight: 500;
  line-height: 1.2;
  color: rgba(143, 214, 248, 0.92);
  white-space: nowrap;
}

body.catalog-home #logo img,
body.catalog-legacy-hidden #logo img,
body.catalog-home .header-logo-img,
body.catalog-legacy-hidden .header-logo-img {
  float: none !important;
  padding: 0 !important;
  margin: 0 !important;
  width: auto !important;
  max-width: 280px;
  height: 44px !important;
  object-fit: contain;
  object-position: left center;
  display: block;
}

body.catalog-home #logo img[hidden],
body.catalog-legacy-hidden #logo img[hidden],
body.catalog-home .header-logo-img[hidden],
body.catalog-legacy-hidden .header-logo-img[hidden] {
  display: none !important;
}

body.catalog-home .header-social,
body.catalog-legacy-hidden .header-social {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 0;
  align-self: center;
  flex-shrink: 0;
  order: 2;
  padding: 4px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-sizing: border-box;
}

body.catalog-home .header-social__link,
body.catalog-legacy-hidden .header-social__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  min-width: 38px;
  min-height: 38px;
  aspect-ratio: 1 / 1;
  border-radius: 10px;
  color: rgba(255, 255, 255, 0.92);
  background: rgba(255, 255, 255, 0.08);
  text-decoration: none;
  box-sizing: border-box;
  overflow: visible;
  flex-shrink: 0;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

body.catalog-home .header-social__link:hover,
body.catalog-legacy-hidden .header-social__link:hover {
  color: #fff;
  background: rgba(var(--cat-accent-rgb), 0.35);
  transform: translateY(-1px);
}

body.catalog-home .header-social__link.is-active,
body.catalog-legacy-hidden .header-social__link.is-active {
  color: #fff;
  background: rgba(var(--cat-accent-rgb), 0.55);
  box-shadow: 0 0 0 2px rgba(var(--cat-accent-rgb), 0.85);
}

body.catalog-home .header-social__icon,
body.catalog-legacy-hidden .header-social__icon {
  display: block;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  overflow: visible;
}

body.catalog-home .header-center,
body.catalog-legacy-hidden .header-center {
  margin-left: 0;
  margin-right: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  max-width: none;
  min-width: 0;
  flex: 1 1 auto;
  align-self: center;
}

body.catalog-home .secondary-navigation,
body.catalog-legacy-hidden .secondary-navigation {
  width: auto;
  max-width: 100%;
  padding: 0;
  float: none;
  display: flex;
  align-items: center;
  align-self: center;
}

body.catalog-home #navigation,
body.catalog-legacy-hidden #navigation {
  display: flex;
  align-items: center;
  align-self: center;
  height: auto;
}

body.catalog-home .header-center .header-add-channel,
body.catalog-legacy-hidden .header-center .header-add-channel {
  min-height: 36px;
  height: 36px;
  align-self: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  flex-shrink: 0;
  box-sizing: border-box;
}

body.catalog-home .secondary-navigation .menu > li > button.menu-search-link,
body.catalog-legacy-hidden .secondary-navigation .menu > li > button.menu-search-link {
  border: 0;
  cursor: pointer;
  color: #fff;
  background: var(--cat-accent);
  font-family: inherit;
  appearance: none;
  -webkit-appearance: none;
}

body.catalog-home .menu > li:hover > a,
body.catalog-home .menu > li:hover > button.menu-search-link,
body.catalog-home .secondary-navigation a:hover,
body.catalog-home .secondary-navigation button.menu-search-link:hover,
body.catalog-legacy-hidden .menu > li:hover > a,
body.catalog-legacy-hidden .menu > li:hover > button.menu-search-link,
body.catalog-legacy-hidden .secondary-navigation a:hover,
body.catalog-legacy-hidden .secondary-navigation button.menu-search-link:hover {
  border-radius: 10px;
}

body.catalog-home .current-menu-item > a,
body.catalog-home .current-menu-item > button.menu-search-link,
body.catalog-legacy-hidden .current-menu-item > a,
body.catalog-legacy-hidden .current-menu-item > button.menu-search-link {
  border-radius: 10px;
  min-height: 36px !important;
  height: 36px !important;
}

body.catalog-home #navigation .menu,
body.catalog-legacy-hidden #navigation .menu {
  gap: 6px;
  justify-content: center;
  width: auto;
  min-width: 0;
  max-width: 100%;
  align-items: center;
  height: auto;
}

body.catalog-home #navigation .menu > li,
body.catalog-legacy-hidden #navigation .menu > li {
  flex: 0 1 auto;
  min-width: min-content;
  position: relative;
  display: flex;
  align-items: center;
  align-self: center;
}

body.catalog-home #navigation .menu > li:hover,
body.catalog-legacy-hidden #navigation .menu > li:hover {
  z-index: 520;
}

body.catalog-home #navigation .menu > li.is-submenu-open,
body.catalog-legacy-hidden #navigation .menu > li.is-submenu-open {
  z-index: 1200;
}

body.catalog-home #navigation .menu > li:has(> .sub-menu)::after,
body.catalog-legacy-hidden #navigation .menu > li:has(> .sub-menu)::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  height: 14px;
  z-index: 525;
}

@media (min-width: 961px) {
  body.catalog-home #navigation ul ul,
  body.catalog-legacy-hidden #navigation ul ul {
    display: block !important;
    position: absolute;
    width: max-content !important;
    min-width: 168px !important;
    max-width: 280px !important;
    left: 0 !important;
    right: auto !important;
    top: 100% !important;
    margin-top: 4px;
    padding: 8px !important;
    box-sizing: border-box;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.16) !important;
    background: rgba(18, 36, 58, 0.98) !important;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
    overflow: visible;
    z-index: 1100;
    opacity: 0;
    pointer-events: none;
  }

  body.catalog-home #navigation ul ul::before,
  body.catalog-legacy-hidden #navigation ul ul::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: -10px;
    height: 12px;
  }

  body.catalog-home #navigation ul li.is-submenu-open > ul,
  body.catalog-home #navigation .menu > li.is-submenu-open > .sub-menu,
  body.catalog-legacy-hidden #navigation ul li.is-submenu-open > ul,
  body.catalog-legacy-hidden #navigation .menu > li.is-submenu-open > .sub-menu {
    left: 0 !important;
    right: auto !important;
    top: 100% !important;
    width: max-content !important;
    min-width: 168px !important;
    max-width: 260px !important;
    opacity: 1;
    pointer-events: auto;
  }
}

body.catalog-home #navigation ul ul li,
body.catalog-legacy-hidden #navigation ul ul li {
  width: 100%;
  padding: 0 !important;
  margin: 0;
  float: none;
  background: transparent !important;
}

body.catalog-home #navigation ul ul li:hover,
body.catalog-legacy-hidden #navigation ul ul li:hover {
  background: transparent !important;
}

body.catalog-home #navigation .sub-menu a,
body.catalog-home #navigation .sub-menu a span,
body.catalog-legacy-hidden #navigation .sub-menu a,
body.catalog-legacy-hidden #navigation .sub-menu a span {
  width: 100%;
  min-height: 40px;
  height: auto;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  text-align: left;
  line-height: 1.35;
  font-size: 14px !important;
  font-weight: 600;
  color: #fff !important;
  background: rgba(255, 255, 255, 0.08) !important;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-sizing: border-box;
  text-transform: none;
  white-space: nowrap;
  border-radius: 8px;
}

body.catalog-home #navigation .sub-menu li + li,
body.catalog-legacy-hidden #navigation .sub-menu li + li {
  margin-top: 4px;
}

body.catalog-home #navigation .sub-menu a:hover,
body.catalog-legacy-hidden #navigation .sub-menu a:hover {
  background: rgba(var(--cat-accent-rgb), 0.45) !important;
  border-color: rgba(255, 255, 255, 0.22);
  color: #fff !important;
}

body.catalog-home .menu-search-link,
body.catalog-legacy-hidden .menu-search-link {
  gap: 8px;
}

body.catalog-home .menu-search-item,
body.catalog-legacy-hidden .menu-search-item {
  position: relative;
}

body.catalog-home .header-search-panel,
body.catalog-legacy-hidden .header-search-panel {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: auto;
  transform: none;
  width: min(360px, calc(100vw - 24px));
  padding: 12px;
  border-radius: 14px;
  background: rgba(14, 28, 48, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.35);
  z-index: 1100;
  box-sizing: border-box;
}

body.catalog-home .header-search-panel[hidden],
body.catalog-legacy-hidden .header-search-panel[hidden] {
  display: none !important;
}

body.catalog-home .header-search-panel__field,
body.catalog-legacy-hidden .header-search-panel__field {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(var(--cat-accent-rgb), 0.55);
  box-shadow: 0 0 0 3px rgba(var(--cat-accent-rgb), 0.18);
}

body.catalog-home .header-search-panel__icon,
body.catalog-legacy-hidden .header-search-panel__icon {
  flex-shrink: 0;
  color: rgba(255, 255, 255, 0.75);
}

body.catalog-home .header-search-panel__field input,
body.catalog-legacy-hidden .header-search-panel__field input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: none;
  background: transparent;
  color: #fff;
  font-size: 15px;
  font-family: inherit;
}

body.catalog-home .header-search-panel__field input::placeholder,
body.catalog-legacy-hidden .header-search-panel__field input::placeholder {
  color: rgba(255, 255, 255, 0.45);
}

body.catalog-home .menu-search-icon,
body.catalog-legacy-hidden .menu-search-icon {
  flex-shrink: 0;
  display: block;
  width: 17px !important;
  height: 17px !important;
  max-width: 17px !important;
  max-height: 17px !important;
}

/* Theme forces .secondary-navigation svg to 60×60 / display:none on mobile. */
body.catalog-home .secondary-navigation svg,
body.catalog-legacy-hidden .secondary-navigation svg {
  width: 17px !important;
  height: 17px !important;
  max-width: 17px !important;
  max-height: 17px !important;
  display: block !important;
}

body.catalog-home .secondary-navigation .mail-inbox__btn svg,
body.catalog-legacy-hidden .secondary-navigation .mail-inbox__btn svg {
  width: 20px !important;
  height: 20px !important;
  max-width: 20px !important;
  max-height: 20px !important;
  flex-shrink: 0;
}

body.catalog-home .secondary-navigation .lang-switch__flag,
body.catalog-legacy-hidden .secondary-navigation .lang-switch__flag,
body.catalog-home .secondary-navigation img[data-lang-flag],
body.catalog-legacy-hidden .secondary-navigation img[data-lang-flag] {
  display: block !important;
  width: 22px !important;
  height: 16px !important;
  max-width: 22px !important;
  max-height: 16px !important;
  object-fit: cover;
}

@media (min-width: 1580px) {
  body.catalog-home .secondary-navigation .menu > li > a,
  body.catalog-legacy-hidden .secondary-navigation .menu > li > a {
    font-size: 17px;
    padding: 9px 18px 8px;
  }
}

body.catalog-home .site-userbar__btn--admin,
body.catalog-home .site-userbar__btn--register,
body.catalog-legacy-hidden .site-userbar__btn--admin,
body.catalog-legacy-hidden .site-userbar__btn--register {
  background: var(--cat-accent);
  box-shadow: 0 4px 14px rgba(var(--cat-accent-rgb), 0.28);
}

body.catalog-home .site-userbar__btn--admin:hover,
body.catalog-home .site-userbar__btn--register:hover,
body.catalog-legacy-hidden .site-userbar__btn--admin:hover,
body.catalog-legacy-hidden .site-userbar__btn--register:hover {
  background: var(--cat-accent-hover);
  box-shadow: 0 6px 18px rgba(var(--cat-accent-rgb), 0.34);
}

body.catalog-home .site-userbar__btn--login,
body.catalog-legacy-hidden .site-userbar__btn--login {
  background: rgba(var(--cat-accent-rgb), 0.15);
  border-color: rgba(var(--cat-accent-rgb), 0.35);
  color: var(--cat-accent-soft) !important;
}

body.catalog-home .site-userbar__btn--login:hover,
body.catalog-legacy-hidden .site-userbar__btn--login:hover {
  background: rgba(var(--cat-accent-rgb), 0.28);
  border-color: rgba(var(--cat-accent-rgb), 0.55);
  color: #fff !important;
}

body.catalog-home .site-userbar a,
body.catalog-home .site-userbar button,
body.catalog-legacy-hidden .site-userbar a,
body.catalog-legacy-hidden .site-userbar button {
  border-radius: 6px;
}

body.catalog-home #header .header-brand,
body.catalog-legacy-hidden #header .header-brand {
  align-self: center;
}

body.catalog-home .kretini,
body.catalog-legacy-hidden .kretini {
  display: none !important;
}

body.catalog-home .partner,
body.catalog-home .share42init,
body.catalog-legacy-hidden .partner,
body.catalog-legacy-hidden .share42init {
  display: none !important;
}

body.catalog-home .post-content .youtube,
body.catalog-home .post-content .play,
body.catalog-legacy-hidden .post-content .youtube,
body.catalog-legacy-hidden .post-content .play {
  display: none !important;
}

body.catalog-home .header-add-channel,
body.catalog-legacy-hidden .header-add-channel {
  background: var(--cat-accent) !important;
  box-shadow: 0 4px 14px rgba(var(--cat-accent-rgb), 0.28);
}

body.catalog-home .header-add-channel:hover,
body.catalog-legacy-hidden .header-add-channel:hover {
  background: var(--cat-accent-hover) !important;
}

body.catalog-home .menu > li:hover > a,
body.catalog-legacy-hidden .menu > li:hover > a {
  background: var(--cat-accent-hover) !important;
  color: #fff !important;
}

body.catalog-home .menu > li:hover > button.menu-search-link,
body.catalog-legacy-hidden .menu > li:hover > button.menu-search-link,
body.catalog-home .current-menu-item > button.menu-search-link,
body.catalog-legacy-hidden .current-menu-item > button.menu-search-link {
  background: var(--cat-accent-hover) !important;
  color: #fff !important;
}

body.catalog-home .secondary-navigation a:hover,
body.catalog-home .secondary-navigation .sfHover,
body.catalog-legacy-hidden .secondary-navigation a:hover,
body.catalog-legacy-hidden .secondary-navigation .sfHover {
  background: var(--cat-accent) !important;
  text-decoration: none !important;
}

body.catalog-home #navigation .sub-menu,
body.catalog-legacy-hidden #navigation .sub-menu {
  background: rgba(18, 36, 58, 0.96) !important;
  background-color: rgba(18, 36, 58, 0.96) !important;
}

body.catalog-home .current-menu-item > a,
body.catalog-legacy-hidden .current-menu-item > a {
  background: var(--cat-accent) !important;
  color: #fff !important;
}

body.catalog-home .nav-previous a,
body.catalog-home .nav-next a,
body.catalog-home .header-button,
body.catalog-home #commentform input#submit,
body.catalog-home .tagcloud a,
body.catalog-home .featured-cat,
body.catalog-home .pagination a,
body.catalog-legacy-hidden .nav-previous a,
body.catalog-legacy-hidden .nav-next a,
body.catalog-legacy-hidden .header-button,
body.catalog-legacy-hidden #commentform input#submit,
body.catalog-legacy-hidden .tagcloud a,
body.catalog-legacy-hidden .featured-cat,
body.catalog-legacy-hidden .pagination a {
  background-color: var(--cat-accent) !important;
  color: #fff !important;
}

body.catalog-home #navigation .sub-menu,
body.catalog-legacy-hidden #navigation .sub-menu {
  background: rgba(18, 36, 58, 0.96) !important;
  background-color: rgba(18, 36, 58, 0.96) !important;
  color: #fff !important;
}

body.catalog-home button,
body.catalog-home input[type="button"],
body.catalog-home input[type="submit"],
body.catalog-legacy-hidden button,
body.catalog-legacy-hidden input[type="button"],
body.catalog-legacy-hidden input[type="submit"] {
  border-radius: 12px;
  -webkit-appearance: none;
  appearance: none;
  -webkit-tap-highlight-color: transparent;
}

/* Kill square tap flash on mobile (WebKit/Blink ignores border-radius for highlight) */
body.catalog-home,
body.catalog-legacy-hidden,
body.catalog-home *,
body.catalog-legacy-hidden * {
  -webkit-tap-highlight-color: transparent;
}

body.catalog-home a,
body.catalog-home button,
body.catalog-home [role="button"],
body.catalog-home input,
body.catalog-home select,
body.catalog-home summary,
body.catalog-legacy-hidden a,
body.catalog-legacy-hidden button,
body.catalog-legacy-hidden [role="button"],
body.catalog-legacy-hidden input,
body.catalog-legacy-hidden select,
body.catalog-legacy-hidden summary {
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

body.catalog-home a:focus:not(:focus-visible),
body.catalog-home button:focus:not(:focus-visible),
body.catalog-home [role="button"]:focus:not(:focus-visible),
body.catalog-legacy-hidden a:focus:not(:focus-visible),
body.catalog-legacy-hidden button:focus:not(:focus-visible),
body.catalog-legacy-hidden [role="button"]:focus:not(:focus-visible) {
  outline: none;
  box-shadow: none;
}

body.catalog-home a:focus-visible,
body.catalog-home button:focus-visible,
body.catalog-home [role="button"]:focus-visible,
body.catalog-home .catalog-chip:focus-visible,
body.catalog-home .header-social__link:focus-visible,
body.catalog-home .catalog-more-btn:focus-visible,
body.catalog-home .site-userbar__btn:focus-visible,
body.catalog-home .channel-card:focus-visible,
body.catalog-legacy-hidden a:focus-visible,
body.catalog-legacy-hidden button:focus-visible,
body.catalog-legacy-hidden [role="button"]:focus-visible,
body.catalog-legacy-hidden .catalog-chip:focus-visible,
body.catalog-legacy-hidden .header-social__link:focus-visible,
body.catalog-legacy-hidden .catalog-more-btn:focus-visible,
body.catalog-legacy-hidden .site-userbar__btn:focus-visible,
body.catalog-legacy-hidden .channel-card:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(var(--cat-accent-rgb), 0.45);
}

body.catalog-home button:active,
body.catalog-home a:active,
body.catalog-home .catalog-chip:active,
body.catalog-home .catalog-more-btn:active,
body.catalog-home .site-userbar__btn:active,
body.catalog-home .header-social__link:active,
body.catalog-home .header-add-channel:active,
body.catalog-home .channel-card__btn:active,
body.catalog-legacy-hidden button:active,
body.catalog-legacy-hidden a:active,
body.catalog-legacy-hidden .catalog-chip:active,
body.catalog-legacy-hidden .catalog-more-btn:active,
body.catalog-legacy-hidden .site-userbar__btn:active,
body.catalog-legacy-hidden .header-social__link:active,
body.catalog-legacy-hidden .header-add-channel:active,
body.catalog-legacy-hidden .channel-card__btn:active {
  -webkit-tap-highlight-color: transparent;
}

body.catalog-home select,
body.catalog-legacy-hidden select {
  border-radius: 12px;
  -webkit-appearance: none;
  appearance: none;
}

.catalog-toolbar {
  position: sticky;
  top: 0;
  z-index: 120;
  margin: 0 0 24px;
  padding: 18px 18px 16px;
  border-radius: 16px;
  background: linear-gradient(165deg, rgba(42, 68, 102, 0.52) 0%, rgba(30, 54, 86, 0.46) 100%);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.16);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.catalog-toolbar__row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: stretch;
}

.catalog-search {
  flex: 1 1 300px;
  position: relative;
}

.catalog-search input {
  width: 100%;
  box-sizing: border-box;
  padding: 13px 44px 13px 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.22);
  color: #fff;
  font-size: 15px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.catalog-search input::placeholder {
  color: rgba(255, 255, 255, 0.45);
}

.catalog-search input:focus {
  outline: none;
  border-color: rgba(var(--cat-accent-rgb), 0.7);
  box-shadow: 0 0 0 3px rgba(var(--cat-accent-rgb), 0.18);
  background: rgba(0, 0, 0, 0.28);
}

.catalog-search input.is-spotlight {
  border-color: rgba(var(--cat-accent-rgb), 1) !important;
  box-shadow: 0 0 0 4px rgba(var(--cat-accent-rgb), 0.4) !important;
  background: rgba(0, 0, 0, 0.35) !important;
}

.catalog-search__clear {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  cursor: pointer;
  display: none;
  font-size: 18px;
  line-height: 1;
}

.catalog-search__clear.is-visible {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.catalog-sort {
  display: flex;
  align-items: center;
}

.catalog-sort select {
  min-width: 190px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.22);
  color: #fff;
  font-size: 14px;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

.catalog-entity-tabs {
  display: flex;
  align-items: stretch;
  gap: 0;
  margin-top: 16px;
  padding: 4px;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.catalog-entity-tab {
  flex: 1;
  min-height: 42px;
  padding: 10px 16px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: rgba(255, 255, 255, 0.55);
  font-size: 15px;
  font-weight: 700;
  text-transform: lowercase;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.catalog-entity-tab:hover {
  color: rgba(255, 255, 255, 0.85);
  background: rgba(255, 255, 255, 0.06);
}

.catalog-entity-tab.is-active {
  background: var(--cat-accent);
  color: #fff;
  box-shadow: none;
}

.catalog-entity-tabs__count {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 100px;
  padding: 0 16px;
  margin-left: 4px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.7);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  border: 0;
}

.catalog-stats {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.catalog-stat {
  padding: 5px 11px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.75);
  font-size: 12px;
}

.catalog-stat strong {
  color: var(--cat-accent-soft);
  font-weight: 700;
}

.catalog-categories-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  padding: 8px;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.catalog-categories {
  flex: 1;
  min-width: 0;
}

.catalog-categories__label {
  margin-bottom: 8px;
  color: rgba(255, 255, 255, 0.45);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.catalog-categories__viewport {
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  scroll-behavior: auto;
}

.catalog-categories__viewport::-webkit-scrollbar {
  display: none;
}

.catalog-categories__track {
  display: grid;
  grid-template-rows: repeat(3, auto);
  grid-auto-flow: column;
  grid-auto-columns: max-content;
  gap: 8px;
  width: max-content;
  padding: 6px 4px 10px;
}

.catalog-categories-nav {
  flex-shrink: 0;
  align-self: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  margin-top: 0;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, opacity 0.2s ease;
}

.catalog-categories-nav:hover:not(:disabled) {
  background: rgba(var(--cat-accent-rgb), 0.22);
  border-color: rgba(var(--cat-accent-rgb), 0.45);
}

.catalog-categories-nav:disabled {
  opacity: 0.35;
  cursor: default;
}

.catalog-categories-nav.is-hidden {
  visibility: hidden;
  pointer-events: none;
}

.catalog-chip {
  border: 1px solid transparent;
  background: transparent;
  color: rgba(255, 255, 255, 0.55);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 13px;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
  white-space: nowrap;
  box-shadow: none;
}

.catalog-chip__count {
  opacity: 0.21;
}

.catalog-chip:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: transparent;
  color: rgba(255, 255, 255, 0.85);
  box-shadow: none;
}

.catalog-chip.is-active {
  background: var(--cat-accent);
  border-color: transparent;
  color: #fff;
  font-weight: 600;
  box-shadow: none;
}

.catalog-chip:focus {
  outline: none;
}

.catalog-search-hub {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.catalog-search-hub__block {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.catalog-search-hub__head {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 12px 16px;
}

.catalog-search-hub__search {
  flex: 1 1 220px;
  min-width: min(100%, 220px);
  max-width: 420px;
  margin-inline-start: auto;
}

.catalog-search-hub__search.header-search-panel,
body.catalog-home .catalog-search-hub__search.header-search-panel,
body.catalog-legacy-hidden .catalog-search-hub__search.header-search-panel {
  position: static;
  top: auto;
  left: auto;
  right: auto;
  transform: none;
  width: 100%;
  max-width: none;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  z-index: auto;
}

body.catalog-home .catalog-search-hub__search .header-search-panel__field,
body.catalog-legacy-hidden .catalog-search-hub__search .header-search-panel__field {
  padding: 8px 12px;
  min-height: 40px;
  box-sizing: border-box;
}

.catalog-search-hub__title {
  margin: 0;
  color: #fff;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.catalog-search-hub__back {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 0;
  padding: 8px 14px;
  min-height: 36px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.92);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.catalog-search-hub__back:hover {
  background: rgba(var(--cat-accent-rgb), 0.22);
  border-color: rgba(var(--cat-accent-rgb), 0.45);
  color: #fff;
}

body.is-rtl .catalog-search-hub__head {
  flex-direction: row-reverse;
}

body.is-rtl .catalog-search-hub__search {
  margin-inline-start: 0;
  margin-inline-end: auto;
}

.catalog-search-hub__empty {
  margin: 0;
  color: rgba(255, 255, 255, 0.65);
}

.catalog-category-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(137px, 1fr));
  gap: 9px;
}

.catalog-category-card {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 9px;
  min-height: 94px;
  padding: 11px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 13px;
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.1) 0%, rgba(0, 0, 0, 0.22) 100%);
  color: #fff;
  text-align: left;
  cursor: pointer;
  font: inherit;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.catalog-category-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 90% at 0% 0%, var(--cat-card-accent, #6b8cb5) 0%, transparent 58%);
  opacity: 0.32;
  pointer-events: none;
}

.catalog-category-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.35);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.28);
}

.catalog-category-card.is-empty {
  opacity: 0.7;
}

.catalog-category-card.is-empty:hover {
  opacity: 1;
}

.catalog-category-card:hover::before {
  opacity: 0.45;
}

.catalog-category-card__icon,
.catalog-category-card__body {
  position: relative;
  z-index: 1;
}

.catalog-category-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  color: #fff;
  background: var(--cat-card-accent, #6b8cb5);
  box-shadow: 0 5px 12px rgba(0, 0, 0, 0.2);
}

.catalog-category-card__icon svg {
  display: block;
  width: 18px;
  height: 18px;
}

.catalog-category-card__body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
  margin-top: auto;
}

.catalog-category-card__name {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
}

.catalog-category-card__count {
  font-size: 11px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.15);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

body.catalog-search-hub-mode .catalog-categories-wrap {
  display: none !important;
}

.catalog-countries-wrap {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) 36px;
  gap: 8px;
  align-items: center;
  margin-top: 10px;
}

.catalog-countries {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.catalog-countries__label {
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}

.catalog-countries__viewport {
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
  min-width: 0;
}

.catalog-countries__viewport::-webkit-scrollbar {
  display: none;
}

.catalog-countries__track {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  padding: 6px 2px 10px;
}

.catalog-countries-nav {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.9);
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
}

.catalog-countries-nav:hover:not(:disabled) {
  background: rgba(var(--cat-accent-rgb), 0.22);
  border-color: rgba(var(--cat-accent-rgb), 0.45);
}

.catalog-countries-nav:disabled {
  opacity: 0.35;
  cursor: default;
}

.catalog-countries-nav.is-hidden {
  display: none !important;
  visibility: hidden;
  pointer-events: none;
}

.catalog-categories-nav.is-hidden {
  display: none !important;
  visibility: hidden;
  pointer-events: none;
}

.catalog-country-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.88);
  border-radius: 999px;
  padding: 7px 13px;
  font-size: 13px;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
  white-space: nowrap;
}

.catalog-country-flag {
  display: block;
  width: 18px;
  height: 14px;
  margin: 0;
  padding: 0;
  object-fit: cover;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.15);
  flex-shrink: 0;
  align-self: center;
  vertical-align: middle;
}

.catalog-country-chip:hover {
  background: rgba(var(--cat-accent-rgb), 0.15);
  border-color: rgba(var(--cat-accent-rgb), 0.35);
  color: #fff;
  transform: translateY(-1px);
}

.catalog-country-chip.is-active {
  background: var(--cat-accent);
  border-color: transparent;
  color: #fff;
  box-shadow: none;
}

.catalog-country-chip.is-empty:not(.is-active) {
  /* Keep empty countries visually like the rest; content still empty. */
  opacity: 1;
  border-style: solid;
}

.catalog-view {
  margin-top: 8px;
}

.catalog-empty {
  display: none;
  text-align: center;
  padding: 48px 20px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--cat-accent-soft);
}

.catalog-empty.is-visible {
  display: block;
}

.catalog-section {
  margin: 0 0 28px;
  min-width: 0;
  max-width: 100%;
}

.catalog-section--country .catalog-section__title {
  color: var(--cat-accent-soft);
}

.catalog-section--country {
  padding: 18px 18px 8px;
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(var(--cat-accent-rgb), 0.08) 0%, rgba(255, 255, 255, 0) 100%);
  border: 1px solid rgba(var(--cat-accent-rgb), 0.12);
}

.catalog-section.is-hidden {
  display: none;
}

.catalog-section__title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 14px;
  padding-bottom: 8px;
  border-bottom: 2px solid rgba(var(--cat-accent-rgb), 0.35);
  color: #fff;
  font-size: 22px;
}

.catalog-section__count {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.65);
  font-weight: normal;
}

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
  gap: 14px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.catalog-grid--4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.catalog-grid--4 .channel-card {
  padding: 14px;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.catalog-grid--4 .channel-card__avatar {
  width: 56px;
  height: 56px;
}

.catalog-grid--4 .channel-card__name {
  font-size: 15px;
}

.catalog-grid--4 .channel-card__username {
  font-size: 12px;
}

.catalog-grid--4 .channel-card__desc {
  font-size: 13px;
  min-height: 36px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.catalog-grid--4 .channel-card__subs,
.catalog-grid--4 .channel-card__last-post {
  font-size: 11px;
}

.catalog-grid--4 .channel-card__btn {
  padding: 9px 12px;
  font-size: 13px;
}

.catalog-grid--4 .channel-card__btn--copy {
  min-width: 42px;
}

.catalog-section__more {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.catalog-more-btn {
  min-width: 220px;
  padding: 12px 28px;
  border: 1px solid rgba(var(--cat-accent-rgb), 0.45);
  border-radius: 12px;
  background: rgba(var(--cat-accent-rgb), 0.12);
  color: var(--cat-accent-soft);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: 0.2s ease;
}

.catalog-more-btn--ghost {
  min-width: auto;
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.8);
}

.catalog-more-btn:hover {
  background: var(--cat-accent-hover);
  border-color: var(--cat-accent-hover);
  color: #fff;
}

.catalog-more-btn--ghost:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.catalog-category-main {
  padding: 18px 16px 40px;
}

.catalog-category-root {
  max-width: 1180px;
  margin: 0 auto;
}

.catalog-category-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  color: rgba(255, 255, 255, 0.55);
  font-size: 14px;
}

.catalog-category-breadcrumb a {
  color: var(--cat-accent-light);
  text-decoration: none;
}

.catalog-category-breadcrumb a:hover {
  text-decoration: underline;
}

.catalog-category-header {
  margin-bottom: 18px;
}

.catalog-category-header h1 {
  margin: 0 0 6px;
  color: #fff;
  font-size: 28px;
}

.catalog-category-meta {
  margin: 0;
  color: rgba(255, 255, 255, 0.65);
  font-size: 14px;
}

.catalog-category-grid {
  margin-bottom: 40px;
}

.catalog-category-loading {
  padding: 40px 0;
  text-align: center;
  color: rgba(255, 255, 255, 0.7);
}

.channel-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(6px);
  text-decoration: none !important;
  color: inherit;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  min-width: 0;
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

a.channel-card:link,
a.channel-card:visited,
a.channel-card:hover,
a.channel-card:active,
a.channel-card:focus {
  text-decoration: none !important;
  color: inherit;
}

.channel-card .channel-card__name,
.channel-card .channel-card__desc,
.channel-card .channel-card__subs,
.channel-card .channel-card__last-post {
  text-decoration: none;
}

.channel-card:hover {
  transform: translateY(-2px);
  border-color: rgba(var(--cat-accent-rgb), 0.45);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}

.channel-card:focus-visible {
  outline: none;
  border-color: rgba(var(--cat-accent-rgb), 0.65);
  box-shadow: 0 0 0 3px rgba(var(--cat-accent-rgb), 0.35);
}

.channel-card__head {
  display: flex;
  gap: 12px;
  align-items: center;
}

.channel-card__top {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  justify-content: space-between;
  min-width: 0;
  width: 100%;
}

.channel-card__info {
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
}

.channel-card__stats {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 2px;
  min-height: 18px;
}

.channel-card__subs,
.channel-card__last-post {
  color: rgba(255, 255, 255, 0.55);
  font-size: 12px;
  line-height: 1.3;
}

.channel-card__last-post {
  text-align: right;
  flex-shrink: 0;
}

.channel-card__avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.08);
  display: block;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-sizing: border-box;
}

.channel-card__avatar--placeholder,
.tgstat-hero__avatar--placeholder,
.tgstat-related__item img[src*="telegram-placeholder"],
.tgstat-related__item img[src*="facebook-placeholder"],
.tgstat-related__item img[src*="whatsapp-placeholder"],
.tgstat-related__item img[src*="instagram-placeholder"] {
  object-fit: cover;
  object-position: center;
  background-color: transparent;
  padding: 0;
  border: 0;
}

.channel-card:hover .channel-card__avatar {
  transform: scale(1.04);
  box-shadow: 0 0 0 3px rgba(var(--cat-accent-rgb), 0.35);
}

.channel-card__meta {
  min-width: 0;
}

.channel-card__name {
  margin: 0;
  color: #fff;
  font-size: 16px;
  line-height: 1.3;
  font-weight: 700;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.channel-card__username {
  margin-top: 4px;
  color: var(--cat-accent-soft);
  font-size: 13px;
  word-break: break-all;
}

.channel-card__desc {
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 13px;
  line-height: 1.45;
  min-height: 38px;
  max-width: 100%;
  overflow: hidden;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.channel-card__actions {
  display: flex;
  gap: 8px;
  margin-top: auto;
}

.channel-card__btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 0;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.channel-card__btn--open {
  background: var(--cat-accent);
  color: #fff;
}

.channel-card__btn--open:hover {
  background: var(--cat-accent-hover);
}

.channel-card__btn--copy {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  flex: 0 0 auto;
  min-width: 44px;
}

.channel-card__btn--copy.is-copied {
  background: #2f9e62;
}

.catalog-help {
  margin-bottom: 14px;
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--cat-accent-soft);
}

.catalog-help summary {
  cursor: pointer;
  font-weight: 700;
}

.catalog-help ul {
  margin: 10px 0 0 18px;
  line-height: 1.55;
}

.catalog-help kbd {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.12);
  font-size: 12px;
}

body.catalog-legacy-hidden #respond,
body.catalog-legacy-hidden .commentlist,
body.catalog-legacy-hidden .navigation.bottomnav,
body.catalog-home #commentsAdd,
body.catalog-home #comments,
body.catalog-home .total-comments,
body.catalog-home .bordersperator2,
body.catalog-legacy-hidden #commentsAdd,
body.catalog-legacy-hidden #comments,
body.catalog-legacy-hidden .total-comments,
body.catalog-legacy-hidden .bordersperator2 {
  display: none !important;
}

.catalog-legacy-hidden .post-content > hr:first-of-type,
.catalog-legacy-hidden .post-content > p:first-of-type,
.catalog-legacy-hidden .post-content > table.ustanovkae,
.catalog-legacy-hidden .post-content > p[style*="text-align: center"],
.catalog-legacy-hidden .post-content > hr:nth-of-type(2),
.catalog-legacy-hidden .post-content > .youtube,
.catalog-legacy-hidden .post-content > hr:nth-of-type(3),
.catalog-legacy-hidden .post-content > h2.channel-category__name,
.catalog-legacy-hidden .post-content > table.stikers {
  display: none !important;
}

.catalog-intro {
  margin-bottom: 18px;
  padding: 14px 16px;
  border-radius: 12px;
  background: rgba(var(--cat-accent-rgb), 0.07);
  border: 1px solid rgba(var(--cat-accent-rgb), 0.15);
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.55;
  font-size: 14px;
}

.channel-detail {
  width: 100%;
  max-width: 680px;
}

.channel-detail__card {
  padding: 28px;
  border-radius: 18px;
  background: rgba(17, 35, 58, 0.96);
  border: 1px solid rgba(var(--cat-accent-rgb), 0.22);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.22);
}

.channel-detail__loading,
.channel-detail__error {
  color: rgba(255, 255, 255, 0.8);
  text-align: center;
}

.channel-detail__back {
  display: inline-block;
  margin-bottom: 18px;
  color: var(--cat-accent-soft);
  text-decoration: none;
  font-size: 14px;
}

.channel-detail__back:hover {
  text-decoration: underline;
}

.channel-detail__hero {
  display: flex;
  gap: 20px;
  align-items: center;
  margin-bottom: 20px;
}

.channel-detail__avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.channel-detail__type {
  display: inline-block;
  margin-bottom: 8px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(var(--cat-accent-rgb), 0.15);
  color: var(--cat-accent-soft);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.channel-detail__name {
  margin: 0 0 6px;
  color: #fff;
  font-size: 30px;
  line-height: 1.2;
}

.channel-detail__username {
  color: var(--cat-accent-soft);
  font-size: 16px;
  margin-bottom: 8px;
}

.channel-detail__category {
  color: rgba(255, 255, 255, 0.65);
  font-size: 14px;
}

.channel-detail__desc {
  margin: 0 0 22px;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.6;
  font-size: 15px;
}

.channel-detail__stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 22px;
}

.channel-detail__stat {
  padding: 14px 16px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.channel-detail__stat span {
  display: block;
  margin-bottom: 6px;
  color: rgba(255, 255, 255, 0.55);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.channel-detail__stat strong {
  color: #fff;
  font-size: 16px;
  font-weight: 700;
}

.channel-detail__actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.channel-detail__actions .auth-btn {
  width: auto;
  flex: 1 1 200px;
}

@media (max-width: 600px) {
  .channel-detail__hero {
    flex-direction: column;
    text-align: center;
  }

  .channel-detail__stats {
    grid-template-columns: 1fr;
  }
}

.catalog-toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%) translateY(20px);
  opacity: 0;
  pointer-events: none;
  background: #1f7a43;
  color: #fff;
  padding: 10px 16px;
  border-radius: 999px;
  z-index: 200;
  transition: 0.25s ease;
}

.catalog-toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.button-up {
  display: none !important;
  position: fixed !important;
  right: 18px !important;
  bottom: 22px !important;
  left: auto !important;
  top: auto !important;
  width: 48px !important;
  height: 48px !important;
  min-width: 48px !important;
  min-height: 48px !important;
  max-width: 48px !important;
  max-height: 48px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 50% !important;
  background: rgba(var(--cat-accent-rgb, 56, 183, 238), 0.95) !important;
  color: #fff !important;
  cursor: pointer;
  z-index: 9999 !important;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28) !important;
  transition: transform 0.2s ease, background 0.2s ease, opacity 0.2s ease;
  opacity: 0.95;
  font-size: 0 !important;
  line-height: 0 !important;
  text-indent: 0 !important;
  align-items: center;
  justify-content: center;
}

.button-up.is-visible {
  display: inline-flex !important;
}

.button-up svg {
  width: 22px !important;
  height: 22px !important;
  fill: currentColor !important;
  display: block !important;
  margin: 0 !important;
  pointer-events: none;
}

.button-up:hover {
  opacity: 1;
  background: var(--cat-accent-hover, #2aa8e8) !important;
  transform: translateY(-2px);
}

@media (max-width: 1100px) {
  .catalog-grid--4 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .catalog-grid--4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .catalog-entity-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .catalog-entity-tab {
    flex: none;
    width: 100%;
    min-width: 0;
    padding: 12px 8px;
    font-size: 13px;
    white-space: normal;
    line-height: 1.2;
  }

  .catalog-entity-tabs__count {
    grid-column: 1 / -1;
    text-align: center;
    border-left: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 8px;
  }

  .catalog-search-hub__head {
    flex-wrap: wrap;
    gap: 8px;
  }

  .catalog-search-hub__back {
    width: 100%;
    justify-content: flex-start;
  }

  .catalog-section__head {
    gap: 8px;
  }

  .catalog-section__count {
    white-space: nowrap;
  }

  .button-up {
    right: 14px !important;
    bottom: 18px !important;
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    min-height: 44px !important;
    max-width: 44px !important;
    max-height: 44px !important;
  }

  .button-up svg {
    width: 20px !important;
    height: 20px !important;
  }

  .catalog-categories-nav {
    width: 34px;
    height: 34px;
    margin-top: 0;
    font-size: 22px;
  }

  .catalog-toolbar {
    top: 0;
    border-radius: 0 0 14px 14px;
    margin-left: -12px;
    margin-right: -12px;
  }

  .catalog-grid,
  .catalog-grid--4 {
    grid-template-columns: 1fr;
  }
}

/* Messenger-specific backgrounds and accents */

body.catalog-home.messenger-facebook,
body.catalog-legacy-hidden.messenger-facebook {
  --cat-accent: #4267b2;
  --cat-accent-hover: #365899;
  --cat-accent-light: #4e71bf;
  --cat-accent-dark: #3b5998;
  --cat-accent-rgb: 66, 103, 178;
  --cat-accent-soft: #d8e4ff;
  --cat-bg-base: #4267b2;
  --cat-bg-overlay-a: rgba(59, 89, 152, 0.42);
  --cat-bg-overlay-b: rgba(66, 103, 178, 0.58);
  --cat-container-top: rgba(59, 89, 152, 0.58);
  --cat-container-bottom: rgba(49, 79, 140, 0.52);
  --cat-header-top: rgba(48, 72, 130, 0.82);
  --cat-header-bottom: rgba(40, 62, 115, 0.74);
  --cat-bg-image: url('../images/catalog-bg.jpg');
  --cat-chip-bg: rgba(8, 18, 42, 0.42);
  --cat-chip-border: rgba(255, 255, 255, 0.16);
  --cat-chip-active-top: #f4f7fd;
  --cat-chip-active-bottom: #dce6f7;
  --cat-chip-active-text: #1a3566;
}

body.catalog-home.messenger-telegram #logo.is-telegram-logo .header-logo-img,
body.catalog-legacy-hidden.messenger-telegram #logo.is-telegram-logo .header-logo-img,
body.catalog-home.messenger-facebook #logo.is-facebook-logo .header-logo-img,
body.catalog-legacy-hidden.messenger-facebook #logo.is-facebook-logo .header-logo-img,
body.catalog-home.messenger-whatsapp #logo.is-whatsapp-logo .header-logo-img,
body.catalog-legacy-hidden.messenger-whatsapp #logo.is-whatsapp-logo .header-logo-img,
body.catalog-home.messenger-instagram #logo.is-instagram-logo .header-logo-img,
body.catalog-legacy-hidden.messenger-instagram #logo.is-instagram-logo .header-logo-img {
  width: auto !important;
  height: 44px !important;
  max-width: 300px;
  padding: 0 !important;
  border-radius: 0 !important;
  display: block;
  object-fit: contain;
}

body.catalog-home.messenger-whatsapp,
body.catalog-legacy-hidden.messenger-whatsapp {
  --cat-accent: #25d366;
  --cat-accent-hover: #1da851;
  --cat-accent-light: #34eb78;
  --cat-accent-dark: #128c7e;
  --cat-accent-rgb: 37, 211, 102;
  --cat-accent-soft: #9ef0be;
  --cat-bg-base: #075e54;
  --cat-bg-overlay-a: rgba(7, 94, 84, 0.42);
  --cat-bg-overlay-b: rgba(18, 140, 126, 0.58);
  --cat-container-top: rgba(18, 120, 108, 0.58);
  --cat-container-bottom: rgba(10, 90, 82, 0.52);
  --cat-header-top: rgba(8, 75, 68, 0.82);
  --cat-header-bottom: rgba(6, 58, 52, 0.74);
  --cat-bg-image: url('../images/catalog-bg.jpg');
}

body.catalog-home.messenger-instagram,
body.catalog-legacy-hidden.messenger-instagram {
  --cat-accent: #c13584;
  --cat-accent-hover: #a02a6c;
  --cat-accent-light: #d946a8;
  --cat-accent-dark: #833ab4;
  --cat-accent-rgb: 193, 53, 132;
  --cat-accent-soft: #f0b0d8;
  --cat-bg-base: #5b2d82;
  --cat-bg-overlay-a: rgba(90, 40, 130, 0.42);
  --cat-bg-overlay-b: rgba(120, 55, 160, 0.58);
  --cat-container-top: rgba(110, 55, 145, 0.58);
  --cat-container-bottom: rgba(75, 35, 110, 0.52);
  --cat-header-top: rgba(70, 30, 105, 0.82);
  --cat-header-bottom: rgba(50, 20, 80, 0.74);
  --cat-bg-image: url('../images/catalog-bg.jpg');
}

body.catalog-home.messenger-telegram,
body.catalog-legacy-hidden.messenger-telegram {
  --cat-accent: #38b7ee;
  --cat-accent-hover: #2aa8e8;
  --cat-accent-light: #4fc3f0;
  --cat-accent-dark: #2aa8e8;
  --cat-accent-rgb: 56, 183, 238;
  --cat-accent-soft: #b8e9fa;
  --cat-bg-image: url('../images/catalog-bg.jpg');
}

/* Help panel — «Как пользоваться» */

.help-backdrop {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(8, 18, 32, 0.62);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.help-backdrop.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

body.help-open {
  overflow: hidden;
}

.help-panel {
  width: min(720px, 100%);
  max-height: min(86vh, 900px);
  overflow: auto;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(42, 68, 98, 0.94) 0%, rgba(28, 48, 72, 0.96) 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.38);
  color: #fff;
}

.help-panel__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 24px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.help-panel__head h2 {
  margin: 0;
  font-size: 22px;
  line-height: 1.3;
  font-weight: 700;
}

.help-panel__close {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s ease;
}

.help-panel__close:hover {
  background: rgba(var(--cat-accent-rgb), 0.35);
}

.help-panel__body {
  padding: 18px 24px 24px;
}

.help-panel__intro {
  margin: 0 0 18px;
  color: rgba(255, 255, 255, 0.88);
  line-height: 1.55;
  font-size: 15px;
}

.help-faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 0 0 18px;
}

.help-faq-item {
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.help-faq-item__q {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  line-height: 1.35;
}

.help-faq-item__a {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.82);
}

.help-panel__subtitle {
  margin: 0 0 10px;
  font-size: 15px;
  font-weight: 700;
  color: var(--cat-accent-soft);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.help-panel__steps {
  margin: 0 0 20px;
  padding: 0;
  list-style: none;
}

.help-panel__steps li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 10px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.92);
}

.help-step__num {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, var(--cat-accent-light) 0%, var(--cat-accent-dark) 100%);
  font-size: 13px;
  font-weight: 700;
}

.help-panel__tips {
  margin: 0 0 18px;
  padding-left: 20px;
  color: rgba(255, 255, 255, 0.84);
}

.help-panel__tips li {
  margin-bottom: 8px;
  line-height: 1.5;
}

.help-panel__links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}

.help-panel__link {
  display: inline-flex;
  align-items: center;
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(var(--cat-accent-rgb), 0.18);
  border: 1px solid rgba(var(--cat-accent-rgb), 0.35);
  color: #fff !important;
  text-decoration: none !important;
  font-size: 14px;
  font-weight: 600;
  transition: background 0.2s ease, transform 0.2s ease;
}

.help-panel__link:hover {
  background: rgba(var(--cat-accent-rgb), 0.32);
  transform: translateY(-1px);
}

.help-panel__source {
  margin: 0;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.55);
  line-height: 1.45;
}

@media (max-width: 640px) {
  .help-backdrop {
    padding: 12px;
    align-items: flex-end;
  }

  .help-panel {
    max-height: 92vh;
    border-radius: 18px 18px 12px 12px;
  }

  .help-panel__head h2 {
    font-size: 18px;
  }
}

/* Site footer */
body.catalog-home .site-footer,
body.catalog-legacy-hidden .site-footer {
  float: none;
  clear: both;
  width: 100%;
  margin: 28px 0 0;
  padding: 0;
  background: linear-gradient(180deg, rgba(22, 40, 64, 0.92) 0%, rgba(14, 28, 48, 0.96) 100%);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: none;
  color: rgba(255, 255, 255, 0.78);
  font-size: 14px;
  position: relative;
  box-sizing: border-box;
}

body.catalog-home .site-footer__inner,
body.catalog-legacy-hidden .site-footer__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 22px 24px 18px;
  box-sizing: border-box;
}

body.catalog-home .site-footer__row,
body.catalog-legacy-hidden .site-footer__row {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 14px 18px;
  width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
}

body.catalog-home .site-footer__row::-webkit-scrollbar,
body.catalog-legacy-hidden .site-footer__row::-webkit-scrollbar {
  display: none;
}

body.catalog-home .site-footer__brand,
body.catalog-legacy-hidden .site-footer__brand {
  flex-shrink: 0;
  text-decoration: none !important;
  color: #fff !important;
}

body.catalog-home .site-footer__logo,
body.catalog-legacy-hidden .site-footer__logo {
  display: block;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #fff;
  line-height: 1.2;
  white-space: nowrap;
}

body.catalog-home .site-footer__nav,
body.catalog-legacy-hidden .site-footer__nav {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
  flex: 1 1 auto;
  min-width: 0;
  justify-content: flex-start;
}

body.catalog-home .site-footer__nav a,
body.catalog-legacy-hidden .site-footer__nav a {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--cat-accent-soft) !important;
  text-decoration: none !important;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

body.catalog-home .site-footer__nav a:hover,
body.catalog-legacy-hidden .site-footer__nav a:hover {
  background: rgba(var(--cat-accent-rgb), 0.28);
  border-color: rgba(var(--cat-accent-rgb), 0.45);
  color: #fff !important;
  transform: translateY(-1px);
}

body.catalog-home .site-footer__copy,
body.catalog-legacy-hidden .site-footer__copy {
  flex-shrink: 0;
  margin-left: auto;
  color: rgba(255, 255, 255, 0.7);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

body.catalog-home .site-footer__legal,
body.catalog-legacy-hidden .site-footer__legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

body.catalog-home .site-footer__legal p,
body.catalog-legacy-hidden .site-footer__legal p {
  margin: 0;
  max-width: 900px;
  color: rgba(255, 255, 255, 0.5);
  font-size: 12px;
  line-height: 1.5;
}

body.catalog-home .site-footer__counters,
body.catalog-legacy-hidden .site-footer__counters {
  display: inline-flex;
  align-items: center;
  min-height: 1px;
  opacity: 0.3;
}

@media (max-width: 720px) {
  body.catalog-home .site-footer__inner,
  body.catalog-legacy-hidden .site-footer__inner {
    padding: 18px 14px 14px;
  }

  body.catalog-home .site-footer__logo,
  body.catalog-legacy-hidden .site-footer__logo {
    font-size: 16px;
  }

  body.catalog-home .site-footer__nav a,
  body.catalog-legacy-hidden .site-footer__nav a {
    padding: 6px 10px;
    font-size: 12px;
  }
}

/* Language switcher — dropdown with flags */
.lang-switch-mount {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  position: relative;
  z-index: 1100;
}

.lang-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.lang-switch__toggle {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-sizing: border-box;
  width: auto;
  height: 36px;
  min-height: 36px;
  padding: 0 8px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(0, 0, 0, 0.3);
  color: #fff;
  line-height: 0;
  cursor: pointer;
  overflow: hidden;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.lang-switch__toggle-label {
  display: none;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  color: #fff;
}

.lang-switch__toggle:hover,
.lang-switch.is-open .lang-switch__toggle {
  background: rgba(var(--cat-accent-rgb), 0.22);
  border-color: rgba(var(--cat-accent-rgb), 0.45);
}

.lang-switch__flag,
.secondary-navigation .lang-switch__flag,
.secondary-navigation img.lang-switch__flag {
  display: block !important;
  width: 22px !important;
  height: 16px !important;
  max-width: 22px !important;
  max-height: 16px !important;
  margin: 0 !important;
  padding: 0 !important;
  object-fit: cover;
  border: 0;
  border-radius: 3px;
  box-shadow: none;
  outline: none;
  flex-shrink: 0;
  align-self: center;
  vertical-align: middle;
  overflow: hidden;
}

.lang-switch__menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  left: auto;
  min-width: 168px;
  padding: 6px;
  border-radius: 12px;
  background: rgba(10, 22, 38, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.35);
  z-index: 1200;
  box-sizing: border-box;
}

.lang-switch__option {
  appearance: none;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: rgba(255, 255, 255, 0.9);
  font: 600 13px/1.2 "Segoe UI", Tahoma, sans-serif;
  text-align: start;
  cursor: pointer;
  transition: background 0.15s ease;
}

.lang-switch__option:hover {
  background: rgba(255, 255, 255, 0.08);
}

.lang-switch__option.is-active {
  background: rgba(var(--cat-accent-rgb), 0.28);
  color: #fff;
}

.lang-switch__option-label {
  white-space: nowrap;
}

body.is-rtl .lang-switch__menu {
  right: auto;
  left: 0;
}

body.is-rtl.catalog-home #site-userbar,
body.is-rtl.catalog-legacy-hidden #site-userbar {
  margin-left: 0;
  margin-right: auto;
}

/* RTL layout tweaks */
body.is-rtl .header-center,
body.is-rtl #header.gfr,
body.is-rtl .site-footer__row,
body.is-rtl .catalog-toolbar,
body.is-rtl .catalog-entity-tabs,
body.is-rtl .catalog-country-row,
body.is-rtl .catalog-chip-row {
  direction: rtl;
}

/* Keep carousel scroll metrics LTR-stable under RTL page direction. */
body.is-rtl .catalog-countries-wrap,
body.is-rtl .catalog-categories-wrap,
body.is-rtl .catalog-countries__viewport,
body.is-rtl .catalog-categories__viewport {
  direction: ltr;
}

body.is-rtl .catalog-card,
body.is-rtl .catalog-section__head,
body.is-rtl .site-userbar,
body.is-rtl .help-panel__head {
  text-align: right;
}

body.is-rtl .catalog-card__meta,
body.is-rtl .catalog-section__more {
  direction: rtl;
}

body.is-rtl .header-search-panel {
  left: auto;
  right: 0;
}

@media (max-width: 900px) {
  .lang-switch__toggle {
    height: 34px;
    min-height: 34px;
    padding: 0 7px;
  }
}

/* ========== Mobile layout ========== */
@media (max-width: 960px) {
  body.catalog-home #mlip,
  body.catalog-legacy-hidden #mlip {
    position: fixed !important;
    left: 0;
    right: 0;
    top: 0;
    width: 100%;
    z-index: 1000;
  }

  body.catalog-home .main-header,
  body.catalog-legacy-hidden .main-header {
    min-height: 0;
    max-width: none;
  }

  body.catalog-home #header,
  body.catalog-legacy-hidden #header {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "brand actions"
      "social social"
      "center center";
    align-items: center;
    justify-content: stretch !important;
    column-gap: 8px;
    row-gap: 8px;
    flex-wrap: nowrap;
    padding: 10px 12px;
    width: 100%;
    box-sizing: border-box;
    /* Keep brand/actions positions stable in he/ar */
    direction: ltr;
  }

  body.catalog-home .header-brand,
  body.catalog-legacy-hidden .header-brand {
    grid-area: brand;
    order: unset;
    min-width: 0;
  }

  body.catalog-home .header-top-actions,
  body.catalog-legacy-hidden .header-top-actions {
    grid-area: actions;
    order: unset;
    margin: 0 !important;
    justify-self: end;
    gap: 6px;
  }

  body.catalog-home .header-top-actions .header-add-channel,
  body.catalog-legacy-hidden .header-top-actions .header-add-channel {
    width: auto !important;
    max-width: none !important;
    min-height: 36px !important;
    height: 36px !important;
    padding: 0 10px !important;
    font-size: 12px !important;
    border-radius: 10px !important;
    white-space: nowrap;
    box-shadow: 0 3px 10px rgba(var(--cat-accent-rgb), 0.25);
  }

  body.catalog-home .header-social,
  body.catalog-legacy-hidden .header-social {
    grid-area: social;
    order: unset;
    flex: none;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    gap: 6px;
    justify-content: space-between;
    overflow: visible;
    box-sizing: border-box;
  }

  body.catalog-home .header-social__link,
  body.catalog-legacy-hidden .header-social__link {
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
    border-radius: 10px;
    flex: 1 1 0;
  }

  body.catalog-home .header-social__icon,
  body.catalog-legacy-hidden .header-social__icon {
    width: 20px;
    height: 20px;
  }

  body.catalog-home #site-userbar,
  body.catalog-legacy-hidden #site-userbar {
    grid-area: unset;
    order: unset;
    margin: 0 !important;
    width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: stretch !important;
    align-items: stretch !important;
    flex-wrap: nowrap !important;
    gap: 8px !important;
    padding: 0 !important;
    box-sizing: border-box;
  }

  body.catalog-home .menu-userbar-item,
  body.catalog-legacy-hidden .menu-userbar-item {
    width: 100%;
    padding: 2px 0 6px;
    display: block !important;
  }

  body.catalog-home .menu-userbar-item .site-userbar,
  body.catalog-legacy-hidden .menu-userbar-item .site-userbar {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 8px !important;
    width: 100%;
  }

  body.catalog-home .menu-userbar-item .site-userbar__name,
  body.catalog-legacy-hidden .menu-userbar-item .site-userbar__name {
    display: block !important;
    padding: 4px 4px 2px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    text-transform: none !important;
    letter-spacing: normal !important;
    line-height: 1.4 !important;
    text-align: center !important;
  }

  body.catalog-home .menu-userbar-item .site-userbar__btn,
  body.catalog-legacy-hidden .menu-userbar-item .site-userbar__btn,
  body.catalog-home .menu-userbar-item .site-userbar a,
  body.catalog-home .menu-userbar-item .site-userbar button,
  body.catalog-legacy-hidden .menu-userbar-item .site-userbar a,
  body.catalog-legacy-hidden .menu-userbar-item .site-userbar button,
  body.catalog-home #navigation .menu-userbar-item a,
  body.catalog-legacy-hidden #navigation .menu-userbar-item a {
    display: inline-flex !important;
    width: 100% !important;
    max-width: 100% !important;
    min-height: 42px !important;
    height: auto !important;
    margin: 0 !important;
    padding: 10px 14px !important;
    flex: none !important;
    flex-shrink: 0 !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    text-indent: 0 !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    line-height: 1.25 !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    white-space: nowrap !important;
    box-sizing: border-box !important;
    border-radius: 6px !important;
    box-shadow: none !important;
  }

  body.catalog-home .lang-switch-mount,
  body.catalog-legacy-hidden .lang-switch-mount {
    grid-area: unset;
    order: 2 !important;
    margin: 0 !important;
    justify-self: unset;
    width: 100%;
  }

  body.catalog-home .menu-lang-item,
  body.catalog-legacy-hidden .menu-lang-item {
    width: 100%;
    padding: 4px 0 2px;
    justify-content: stretch;
    align-items: stretch;
    flex-direction: column;
    gap: 8px;
    direction: ltr;
  }

  body.catalog-home .menu-lang-item .mail-inbox-mount,
  body.catalog-legacy-hidden .menu-lang-item .mail-inbox-mount {
    order: 1 !important;
    width: 100%;
    margin: 0;
    display: flex;
    justify-content: stretch;
  }

  body.catalog-home .menu-lang-item .mail-inbox,
  body.catalog-legacy-hidden .menu-lang-item .mail-inbox {
    width: 100%;
  }

  body.catalog-home .menu-lang-item .mail-inbox__btn,
  body.catalog-legacy-hidden .menu-lang-item .mail-inbox__btn {
    width: 100%;
    min-height: 46px;
    height: auto;
    justify-content: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 10px;
    color: #fff;
  }

  body.catalog-home .menu-lang-item .mail-inbox__btn-label,
  body.catalog-legacy-hidden .menu-lang-item .mail-inbox__btn-label {
    display: inline !important;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;
  }

  body.catalog-home .menu-lang-item .mail-inbox__btn svg,
  body.catalog-legacy-hidden .menu-lang-item .mail-inbox__btn svg {
    display: block !important;
    width: 20px !important;
    height: 20px !important;
    color: #d8f3ff;
  }

  body.catalog-home .menu-lang-item .mail-inbox__panel,
  body.catalog-legacy-hidden .menu-lang-item .mail-inbox__panel {
    left: 0;
    right: 0;
    width: 100%;
    min-width: 0;
    max-width: none;
    box-sizing: border-box;
  }

  body.catalog-home .menu-lang-item .lang-switch,
  body.catalog-legacy-hidden .menu-lang-item .lang-switch {
    width: 100%;
  }

  body.catalog-home .menu-lang-item .lang-switch__toggle,
  body.catalog-legacy-hidden .menu-lang-item .lang-switch__toggle {
    width: 100%;
    justify-content: center;
    min-height: 42px;
    padding: 8px 12px;
    gap: 10px;
  }

  body.catalog-home .menu-lang-item .lang-switch__toggle-label,
  body.catalog-legacy-hidden .menu-lang-item .lang-switch__toggle-label {
    display: inline !important;
    font-size: 14px;
  }

  body.catalog-home .menu-lang-item .lang-switch__menu,
  body.catalog-legacy-hidden .menu-lang-item .lang-switch__menu {
    left: 0;
    right: 0;
    min-width: 0;
    width: 100%;
  }

  body.catalog-home .header-center,
  body.catalog-legacy-hidden .header-center {
    direction: inherit;
  }

  body.is-rtl.catalog-home .header-center,
  body.is-rtl.catalog-legacy-hidden .header-center,
  body.is-rtl.catalog-home #navigation .menu,
  body.is-rtl.catalog-legacy-hidden #navigation .menu {
    direction: rtl;
    text-align: right;
  }

  body.is-rtl.catalog-home #site-userbar,
  body.is-rtl.catalog-legacy-hidden #site-userbar {
    margin: 0 !important;
    justify-content: center;
  }

  body.catalog-home .header-center,
  body.catalog-legacy-hidden .header-center {
    grid-area: center;
    order: unset;
    width: 100%;
    max-width: 100%;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    margin: 0;
    flex: none;
    box-sizing: border-box;
  }

  body.catalog-home .secondary-navigation,
  body.catalog-legacy-hidden .secondary-navigation {
    position: relative !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    right: auto !important;
    float: none !important;
    background: transparent !important;
    border: 0 !important;
    box-sizing: border-box !important;
  }

  body.catalog-home #navigation,
  body.catalog-legacy-hidden #navigation {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    position: relative !important;
    background: transparent !important;
    border: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    overflow: visible !important;
  }

  body.catalog-home #navigation .menu,
  body.catalog-legacy-hidden #navigation .menu {
    display: none;
    position: static !important;
    top: auto !important;
    left: auto !important;
    float: none !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    height: auto !important;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    margin: 0;
    padding: 8px;
    border-radius: 12px;
    background: rgba(8, 18, 32, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
    box-sizing: border-box;
  }

  body.catalog-home #navigation .menu.is-open,
  body.catalog-legacy-hidden #navigation .menu.is-open {
    display: flex !important;
  }

  body.catalog-home #navigation .menu > li,
  body.catalog-legacy-hidden #navigation .menu > li {
    flex: none;
    width: 100%;
    min-width: 0;
    display: block;
  }

  body.catalog-home #navigation .menu > li:has(> .sub-menu)::after,
  body.catalog-legacy-hidden #navigation .menu > li:has(> .sub-menu)::after {
    display: none;
  }

  body.catalog-home .secondary-navigation .menu > li > a,
  body.catalog-home .secondary-navigation .menu > li > button.menu-search-link,
  body.catalog-legacy-hidden .secondary-navigation .menu > li > a,
  body.catalog-legacy-hidden .secondary-navigation .menu > li > button.menu-search-link {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 48px !important;
    height: auto !important;
    width: 100%;
    text-align: center;
    padding: 12px 16px !important;
    font-size: 17px !important;
    font-weight: 600 !important;
    line-height: 1.25 !important;
    text-indent: 0 !important;
    letter-spacing: 0 !important;
    border-radius: 10px;
    text-transform: none;
    white-space: normal;
    box-sizing: border-box;
    gap: 8px;
  }

  body.is-rtl.catalog-home .secondary-navigation .menu > li > a,
  body.is-rtl.catalog-home .secondary-navigation .menu > li > button.menu-search-link,
  body.is-rtl.catalog-legacy-hidden .secondary-navigation .menu > li > a,
  body.is-rtl.catalog-legacy-hidden .secondary-navigation .menu > li > button.menu-search-link,
  body.is-rtl.catalog-home .menu-lang-item .mail-inbox__btn,
  body.is-rtl.catalog-legacy-hidden .menu-lang-item .mail-inbox__btn,
  body.is-rtl.catalog-home .menu-lang-item .lang-switch__toggle,
  body.is-rtl.catalog-legacy-hidden .menu-lang-item .lang-switch__toggle,
  body.is-rtl.catalog-home .menu-userbar-item .site-userbar__name,
  body.is-rtl.catalog-legacy-hidden .menu-userbar-item .site-userbar__name {
    justify-content: center !important;
    text-align: center !important;
  }

  body.catalog-home .secondary-navigation .menu > li > a.menu-telegram-parent,
  body.catalog-legacy-hidden .secondary-navigation .menu > li > a.menu-telegram-parent {
    /* Keep label visually centered inside the blue pill */
    padding-top: 13px !important;
    padding-bottom: 13px !important;
  }

  body.catalog-home #navigation .sub-menu a,
  body.catalog-home #navigation .sub-menu a span,
  body.catalog-legacy-hidden #navigation .sub-menu a,
  body.catalog-legacy-hidden #navigation .sub-menu a span {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    min-height: 44px !important;
    padding: 12px 14px !important;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06) !important;
    font-size: 16px !important;
    font-weight: 500 !important;
    line-height: 1.25 !important;
    text-indent: 0 !important;
    text-align: center !important;
    white-space: normal !important;
    box-sizing: border-box !important;
  }

  body.catalog-home .menu-userbar-item .site-userbar__btn,
  body.catalog-legacy-hidden .menu-userbar-item .site-userbar__btn,
  body.catalog-home .menu-userbar-item .site-userbar a,
  body.catalog-home .menu-userbar-item .site-userbar button,
  body.catalog-legacy-hidden .menu-userbar-item .site-userbar a,
  body.catalog-legacy-hidden .menu-userbar-item .site-userbar button,
  body.catalog-home #navigation .menu-userbar-item a,
  body.catalog-legacy-hidden #navigation .menu-userbar-item a {
    font-size: 16px !important;
    min-height: 46px !important;
  }

  body.catalog-home .menu-lang-item .lang-switch__toggle,
  body.catalog-legacy-hidden .menu-lang-item .lang-switch__toggle {
    min-height: 46px;
    font-size: 16px;
  }

  body.catalog-home .menu-lang-item .lang-switch__toggle-label,
  body.catalog-legacy-hidden .menu-lang-item .lang-switch__toggle-label {
    display: inline !important;
    font-size: 16px !important;
  }

  body.catalog-home #navigation ul ul,
  body.catalog-legacy-hidden #navigation ul ul,
  body.catalog-home #navigation .sub-menu,
  body.catalog-legacy-hidden #navigation .sub-menu {
    display: none !important;
    position: static !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    left: auto !important;
    right: auto !important;
    top: auto !important;
    margin: 6px 0 0 !important;
    padding: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
    border: 0 !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
  }

  body.catalog-home #navigation .menu > li.is-submenu-open > .sub-menu,
  body.catalog-legacy-hidden #navigation .menu > li.is-submenu-open > .sub-menu,
  body.catalog-home #navigation .menu > li.is-submenu-open > ul,
  body.catalog-legacy-hidden #navigation .menu > li.is-submenu-open > ul,
  body.catalog-home #navigation ul li.is-submenu-open > ul,
  body.catalog-legacy-hidden #navigation ul li.is-submenu-open > ul {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    gap: 6px !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    margin: 6px 0 0 !important;
    padding: 0 !important;
    left: auto !important;
    right: auto !important;
    top: auto !important;
    position: static !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
  }

  body.catalog-home #navigation .sub-menu > li,
  body.catalog-legacy-hidden #navigation .sub-menu > li,
  body.catalog-home #navigation ul ul > li,
  body.catalog-legacy-hidden #navigation ul ul > li,
  body.catalog-home #navigation ul ul li,
  body.catalog-legacy-hidden #navigation ul ul li,
  body.catalog-home #navigation ul li li,
  body.catalog-legacy-hidden #navigation ul li li {
    display: block !important;
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    float: none !important;
    text-align: center !important;
    text-indent: 0 !important;
    box-sizing: border-box !important;
  }

  body.catalog-home #navigation .sub-menu a,
  body.catalog-home #navigation .sub-menu a span,
  body.catalog-home #navigation ul ul a,
  body.catalog-home #navigation ul ul a span,
  body.catalog-legacy-hidden #navigation .sub-menu a,
  body.catalog-legacy-hidden #navigation .sub-menu a span,
  body.catalog-legacy-hidden #navigation ul ul a,
  body.catalog-legacy-hidden #navigation ul ul a span {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    min-height: 44px !important;
    margin: 0 !important;
    padding: 12px 14px !important;
    border-radius: 8px !important;
    background: rgba(255, 255, 255, 0.06) !important;
    font-size: 16px !important;
    font-weight: 500 !important;
    line-height: 1.25 !important;
    text-indent: 0 !important;
    text-align: center !important;
    white-space: normal !important;
    box-sizing: border-box !important;
  }

  body.catalog-home a#pull,
  body.catalog-legacy-hidden a#pull,
  body.catalog-home .header-menu-toggle,
  body.catalog-legacy-hidden .header-menu-toggle {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 40px !important;
    min-width: 40px !important;
    max-width: 40px !important;
    height: 40px !important;
    min-height: 40px !important;
    margin: 0 !important;
    padding: 0 !important;
    border-radius: 10px !important;
    border: 1px solid rgba(255, 255, 255, 0.16) !important;
    background: rgba(0, 0, 0, 0.28) !important;
    color: transparent !important;
    font-size: 0 !important;
    font-weight: 400;
    letter-spacing: 0 !important;
    line-height: 0 !important;
    text-indent: 0 !important;
    text-decoration: none !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
    box-shadow: none !important;
    flex: none !important;
  }

  body.catalog-home a#pull::after,
  body.catalog-legacy-hidden a#pull::after,
  body.catalog-home a#pull:after,
  body.catalog-legacy-hidden a#pull:after {
    content: "" !important;
    position: static !important;
    top: auto !important;
    right: auto !important;
    left: auto !important;
    width: 18px !important;
    height: 14px !important;
    margin: 0 !important;
    background-image: none !important;
    background:
      linear-gradient(#fff, #fff) 0 0 / 100% 2px no-repeat,
      linear-gradient(#fff, #fff) 0 6px / 100% 2px no-repeat,
      linear-gradient(#fff, #fff) 0 12px / 100% 2px no-repeat !important;
    display: block !important;
    flex-shrink: 0;
  }

  body.catalog-home a#pull[aria-expanded="true"],
  body.catalog-legacy-hidden a#pull[aria-expanded="true"] {
    background: var(--cat-accent) !important;
    border-color: transparent !important;
  }

  body.catalog-home .header-center .header-add-channel,
  body.catalog-legacy-hidden .header-center .header-add-channel {
    display: none !important;
  }

  body.catalog-home .site-userbar__btn,
  body.catalog-legacy-hidden .site-userbar__btn,
  body.catalog-home .site-userbar a,
  body.catalog-home .site-userbar button,
  body.catalog-legacy-hidden .site-userbar a,
  body.catalog-legacy-hidden .site-userbar button {
    min-height: 42px;
    height: auto;
    padding: 10px 14px;
    font-size: 14px;
    flex: none;
    position: relative;
    z-index: 1;
    box-sizing: border-box;
    justify-content: center;
  }

  body.catalog-home .site-userbar__name,
  body.catalog-legacy-hidden .site-userbar__name {
    display: none;
  }

  body.catalog-home .lang-switch__toggle,
  body.catalog-legacy-hidden .lang-switch__toggle {
    height: 34px;
    min-height: 34px;
    padding: 0 7px;
  }

  body.catalog-home .lang-switch__menu,
  body.catalog-legacy-hidden .lang-switch__menu {
    min-width: 156px;
  }

  body.catalog-home .header-search-panel,
  body.catalog-legacy-hidden .header-search-panel {
    position: static;
    width: 100%;
    margin-top: 6px;
    box-shadow: none;
  }

  body.catalog-home .header-brand #logo img,
  body.catalog-legacy-hidden .header-brand #logo img,
  body.catalog-home .header-brand .header-logo-img,
  body.catalog-legacy-hidden .header-brand .header-logo-img {
    height: 36px !important;
    width: auto !important;
    max-width: min(240px, 72vw) !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  body.catalog-home .brand-logo__icon,
  body.catalog-legacy-hidden .brand-logo__icon,
  body.catalog-home .brand-logo__icon svg,
  body.catalog-legacy-hidden .brand-logo__icon svg {
    width: 34px;
    height: 34px;
  }

  body.catalog-home .brand-logo__title,
  body.catalog-legacy-hidden .brand-logo__title {
    font-size: 15px;
  }

  body.catalog-home .brand-logo__sub,
  body.catalog-legacy-hidden .brand-logo__sub {
    font-size: 10px;
  }

  body.catalog-home .main-container #page,
  body.catalog-legacy-hidden .main-container #page {
    padding-top: calc(var(--catalog-header-height, 170px) + 12px) !important;
  }

  body.catalog-home .content,
  body.catalog-legacy-hidden .content,
  body.catalog-home #content_box,
  body.catalog-legacy-hidden #content_box {
    padding-left: 12px;
    padding-right: 12px;
    box-sizing: border-box;
  }

  body.catalog-home h1.title,
  body.catalog-legacy-hidden h1.title {
    font-size: 20px;
    line-height: 1.3;
    margin: 4px 0 12px;
    overflow-wrap: anywhere;
  }

  .catalog-intro {
    font-size: 13px;
    padding: 12px;
  }

  .catalog-toolbar {
    padding: 14px 12px 12px;
    margin-left: -12px;
    margin-right: -12px;
    width: calc(100% + 24px);
    box-sizing: border-box;
    border-radius: 0 0 14px 14px;
  }

  .catalog-toolbar__row {
    flex-direction: column;
    gap: 10px;
  }

  .catalog-search {
    flex: 1 1 auto;
    width: 100%;
  }

  .catalog-sort {
    width: 100%;
  }

  .catalog-sort select {
    width: 100%;
    min-width: 0;
  }

  .catalog-countries-nav,
  .catalog-categories-nav {
    display: none !important;
  }

  .catalog-countries-wrap {
    display: block !important;
    grid-template-columns: none !important;
    margin-top: 12px;
    padding: 0;
    width: 100%;
  }

  .catalog-countries {
    width: 100%;
    min-width: 0;
  }

  .catalog-countries__viewport {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .catalog-countries__track {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    width: max-content;
    padding: 6px 2px 10px;
  }

  .catalog-categories-wrap {
    display: block !important;
    padding: 8px;
    margin-top: 12px;
  }

  .catalog-categories {
    width: 100%;
    min-width: 0;
  }

  .catalog-categories__viewport {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: auto;
  }

  .catalog-categories__track {
    display: grid;
    grid-template-rows: repeat(3, auto);
    grid-auto-flow: column;
    grid-auto-columns: max-content;
    gap: 8px;
    width: max-content;
    min-width: max-content;
    padding: 6px 4px 10px;
  }

  .catalog-country-chip {
    padding: 7px 11px;
    font-size: 12px;
  }

  .channel-card {
    padding: 12px;
  }

  .channel-card__avatar {
    width: 56px;
    height: 56px;
  }

  .channel-card__name {
    font-size: 15px;
  }

  .channel-card__desc {
    font-size: 13px;
  }

  body.catalog-home .site-footer__row,
  body.catalog-legacy-hidden .site-footer__row {
    flex-wrap: wrap;
    overflow: visible;
    gap: 10px;
  }

  body.catalog-home .site-footer__nav,
  body.catalog-legacy-hidden .site-footer__nav {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    width: 100%;
  }

  body.is-rtl.catalog-home .header-social,
  body.is-rtl.catalog-legacy-hidden .header-social {
    justify-content: space-between;
  }

  body.is-rtl .header-search-panel {
    left: 0;
    right: 0;
  }
}

@media (max-width: 720px) {
  body.catalog-home .main-container #page,
  body.catalog-legacy-hidden .main-container #page {
    padding-top: calc(var(--catalog-header-height, 170px) + 10px) !important;
  }

  .catalog-card {
    padding: 14px;
  }

  .catalog-section__head {
    flex-wrap: wrap;
    gap: 8px;
  }

  .catalog-section__title {
    font-size: 17px;
  }

  .catalog-entity-tab {
    font-size: 12px;
    padding: 10px 6px;
  }

  .catalog-chip {
    font-size: 12px;
    padding: 8px 10px;
  }

  .catalog-chip.is-active {
    box-shadow: none;
  }

  body.catalog-home .header-top-actions .header-add-channel,
  body.catalog-legacy-hidden .header-top-actions .header-add-channel {
    max-width: 42vw;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

@media (max-width: 480px) {
  body.catalog-home #header,
  body.catalog-legacy-hidden #header {
    padding: 8px 10px;
    row-gap: 6px;
    column-gap: 6px;
  }

  body.catalog-home .header-social__link,
  body.catalog-legacy-hidden .header-social__link {
    width: 38px;
    height: 38px;
    min-width: 38px;
    min-height: 38px;
  }

  body.catalog-home h1.title,
  body.catalog-legacy-hidden h1.title {
    font-size: 18px;
  }

  body.catalog-home .site-userbar__btn,
  body.catalog-legacy-hidden .site-userbar__btn {
    padding: 6px 10px;
    font-size: 11px;
  }

  body.catalog-home .lang-switch__toggle,
  body.catalog-legacy-hidden .lang-switch__toggle {
    height: 32px;
    min-height: 32px;
    padding: 0 6px;
  }

  body.catalog-home .lang-switch__flag,
  body.catalog-legacy-hidden .lang-switch__flag {
    width: 20px !important;
    height: 14px !important;
    max-width: 20px !important;
    max-height: 14px !important;
    margin: 0 !important;
    padding: 0 !important;
  }
}

