:target {
  scroll-margin-top: 80px; /* подставьте реальную высоту хедера */
}


/* === Глобальная настройка адаптива под мобилу === */

/* До 340px – самый маленький экран (старые SE и ультра-бюджетные) */
@media (max-width: 340px) {
  .t-container {
    width: 100% !important;
    max-width: 100% !important;
    padding-left: 12px !important;   /* минимальный воздух слева */
    padding-right: 12px !important;  /* минимальный воздух справа */
    margin-left: auto !important;
    margin-right: auto !important;
    box-sizing: border-box;
  }
}

/* От 341px до 480px – твоя новая «мобильная сетка» */
@media (min-width: 341px) and (max-width: 480px) {
  .t-container {
    width: 90% !important;     /* 90% от ширины экрана */
    max-width: 90% !important;
    margin-left: auto !important;
    margin-right: auto !important;
    box-sizing: border-box;
  }
}

/* Планшеты до 640px – можно чуть шире (95%) */
@media (min-width: 481px) and (max-width: 640px) {
  .t-container {
    width: 95% !important;
    max-width: 95% !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }
}

/* Для айфонов с челкой и свайп-барами */
.t-container {
  padding-left: max(env(safe-area-inset-left), 12px);
  padding-right: max(env(safe-area-inset-right), 12px);
}


/* === ME403: растягиваем меню на всю высоту экрана === */
#rec1306548721 .t-me__overlay {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100dvh !important; /* dvh — корректная высота для iOS Safari */
}

#rec1306548721 .t-me__menu {
  position: fixed !important;
  inset: 0 !important;
  height: 100dvh !important;
  max-height: 100dvh !important;
  transform: none !important;      /* убираем translateY(-50%) */
  border-radius: 0 !important;
  padding-top: env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
  box-sizing: border-box;
}

#rec1306548721 .t-me__container {
  height: 100% !important;
  display: flex !important;
  flex-direction: column !important;
}

#rec1306548721 .t-me__body,
#rec1306548721 .t-me__content {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  overflow: auto !important;
  -webkit-overflow-scrolling: touch;
}

#rec1306548721 .t-me__menu,
#rec1306548721 .t-me__container,
#rec1306548721 .t-me__body,
#rec1306548721 .t-me__content {
  max-height: 100dvh !important;
}

/* Запрет скролла под меню */
html.t-body_scroll-locked,
body.t-body_scroll-locked {
  overflow: hidden !important;
  height: 100% !important;
  touch-action: none;
}

/* ===== Жёстко выравниваем шаблонный новостной блок (#rec1240161801) под сетку 320 на мобиле ===== */
@media (max-width: 340px) {
  /* 1) Все контейнеры и обёртки блока ограничиваем 320 и центрируем */
  #rec1240161801,
  #rec1240161801 .t-container,
  #rec1240161801 .t-container_100,
  #rec1240161801 .t-container.t-container_flex,
  #rec1240161801 .t-feed,
  #rec1240161801 .t-feed__container,
  #rec1240161801 .t-feed__row,
  #rec1240161801 .t-feed__col,
  #rec1240161801 .t-feed__post,
  #rec1240161801 .t-feed__post-card,
  #rec1240161801 .t-slds__container,
  #rec1240161801 .t-slds__wrapper,
  #rec1240161801 .t-slds__items-wrapper,
  #rec1240161801 .t-slds__item,
  #rec1240161801 [class*="t-width"],
  #rec1240161801 [class*="t-col_"] {
    max-width: 320px !important;
    width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
    box-sizing: border-box !important;
  }

  /* 2) Срезаем все боковые внутренние отступы/«гуттеры» у карусели и карточек */
  #rec1240161801 .t-container,
  #rec1240161801 .t-container_100,
  #rec1240161801 .t-feed__container,
  #rec1240161801 .t-feed__row,
  #rec1240161801 .t-feed__col,
  #rec1240161801 .t-feed__post,
  #rec1240161801 .t-feed__post-card,
  #rec1240161801 .t-feed__post-inner,
  #rec1240161801 .t-slds__container,
  #rec1240161801 .t-slds__wrapper,
  #rec1240161801 .t-slds__items-wrapper,
  #rec1240161801 .t-slds__item {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  /* 3) Если у карточек есть внешние отступы — прибиваем */
  #rec1240161801 .t-feed__post,
  #rec1240161801 .t-slds__item {
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  /* 4) Страховка против скрытых отрицательных отступов */
  #rec1240161801 [style*="margin-left:"],
  #rec1240161801 [style*="margin-right:"] {
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
}

/* Чуть шире мобилы: держим аккуратные поля по 16px, чтобы всё совпало с Zero */
@media (min-width: 341px) and (max-width: 640px) {
  #rec1240161801 .t-feed__container {
    padding-left: 16px !important;
    padding-right: 16px !important;
    box-sizing: border-box !important;
    max-width: 100% !important;
  }
}

/* Безопасные зоны на iOS, чтобы ничего не липло к краям-«вырезам» */
#rec1240161801 .t-feed__container {
  padding-left: max(env(safe-area-inset-left), 0px);
  padding-right: max(env(safe-area-inset-right), 0px);
}

/* Десктоп: обычная ширина и центр */
.my-form { 
  /* центрируем сам элемент Zero (он абсолютно позиционируется) */
  left: 50% !important; 
  transform: translateX(-50%) !important;
}
.my-form .t-form,
.my-form .t-form__inputsbox,
.my-form .t-input-block,
.my-form .t-form__submit,
.my-form .t-form__errorbox-bottom {
  max-width: 470px !important;
  width: 100% !important;
  min-width: 0 !important;           /* снимаем встроенные min-width */
  margin-left: auto !important;
  margin-right: auto !important;
  box-sizing: border-box !important;
}

/* Центрируем сам элемент Zero с классом my-form */
.my-form{
  left:50% !important;
  transform:translateX(-50%) !important;
}

/* Десктоп: ограничиваем внутренности формы */
.my-form .t-form,
.my-form .t-form__wrap,
.my-form .t-form__inputsbox,
.my-form .t-input-block,
.my-form .t-submit,
.my-form .t-form__errorbox-bottom{
  max-width:470px !important;
  width:100% !important;
  min-width:0 !important;
  margin-left:auto !important;
  margin-right:auto !important;
  box-sizing:border-box !important;
}

/* Мобилка: ужимаем до 280 и центрируем всё */
@media (max-width:480px){
  .my-form{
    left:50% !important;
    transform:translateX(-50%) !important;
  }
  .my-form .t-form,
  .my-form .t-form__wrap,
  .my-form .t-form__inputsbox,
  .my-form .t-input-block,
  .my-form .t-submit,
  .my-form .t-form__errorbox-bottom,
  .my-form .t-descr,
  .my-form .t-checkbox__text{
    max-width:280px !important;   /* конечная ширина формы на мобиле */
    width:100% !important;
    min-width:0 !important;
    margin-left:auto !important;
    margin-right:auto !important;
  }
  /* поля не должны распирать контейнер */
  .my-form .t-input,
  .my-form .t-select,
  .my-form .t-textarea{
    max-width:100% !important;
    width:100% !important;
  }
}


/* === FAQ блок TX16N2: фикс отступов справа от иконки === */

/* Все возможные селекторы для класса uc-faq-wide */
#rec1312882601 .t016__row,
.uc-faq-wide .t016__row {
  padding-right: 60px !important;
}

/* Иконка плюса */
#rec1312882601 .t016__trigger,
.uc-faq-wide .t016__trigger {
  position: absolute !important;
  right: 20px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
}

/* Мобильная версия */
@media (max-width: 640px) {
  #rec1312882601 .t016__row,
  .uc-faq-wide .t016__row {
    padding-right: 50px !important;
  }
  
  #rec1312882601 .t016__trigger,
  .uc-faq-wide .t016__trigger {
    right: 15px !important;
  }
}