/* Последний защитный слой адаптива для всех клиентских страниц. */
html,
body {
  width: 100%;
  max-width: 100%;
  overflow-x: clip;
}

.page-shell,
.page-shell > *,
.page-shell :where(section, article, header, footer, nav, aside, form, fieldset, div, label) {
  min-width: 0;
}

.page-shell :where(h1, h2, h3, h4, p, li, dt, dd, strong, small, label, a, button, span) {
  max-width: 100%;
  overflow-wrap: break-word;
  word-break: normal;
}

.page-shell :where(img, video, canvas, svg, iframe, object) {
  max-width: 100%;
}

.page-shell :where(input, select, textarea, button) {
  min-width: 0;
  max-width: 100%;
}

.page-shell pre,
.page-shell table {
  max-width: 100%;
}

.page-shell pre,
.page-shell .table-scroll,
.page-shell .account-table {
  overflow-x: auto;
  overscroll-behavior-inline: contain;
}

.page-shell :where(
  .account-row strong,
  .referral-link-box input,
  .order-number,
  .payment-id,
  .publication-content a,
  .topic-article a,
  .legal-document-shell a
) {
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* Акции и новости: заголовок не дробится по буквам, баннер не обрезается. */
.news-page .news-hero,
.news-detail-page .publication-detail,
.news-detail-page .publication-detail-head,
.news-detail-page .publication-detail-topline,
.news-detail-page .publication-breadcrumbs,
.news-detail-page .detail-meta {
  min-width: 0;
}

.news-page .news-hero h1,
.news-page .news-hero h1 span,
.news-detail-page .publication-detail h1,
.news-detail-page .publication-lead,
.news-detail-page .publication-breadcrumbs,
.news-detail-page .publication-edit-link {
  word-break: normal !important;
  overflow-wrap: break-word !important;
  hyphens: none;
}

.news-detail-page .publication-detail-cover {
  width: min(730px, 100%) !important;
  height: auto !important;
  min-height: 0 !important;
  aspect-ratio: 730 / 359 !important;
  display: grid !important;
  place-items: center !important;
  background: #eee7da;
}

.news-detail-page .publication-detail-cover img {
  width: 100% !important;
  height: 100% !important;
  max-height: 100% !important;
  object-fit: contain !important;
  object-position: center !important;
}

html[data-theme="dark"] .news-detail-page .publication-detail-cover {
  background: #090d0a;
}

.news-page .publication-card,
.news-page .publication-card-body,
.news-page .publication-card-body h2,
.news-page .publication-card-body p {
  min-width: 0;
}

.news-page .publication-cover {
  width: 100%;
  max-width: 730px;
  aspect-ratio: 730 / 359;
}

.news-page .publication-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (max-width: 900px) {
  .page-shell :where(
    .hero,
    .services-hero,
    .rules-hero,
    .reviews-hero,
    .contacts-hero,
    .profile-hero,
    .news-hero,
    .publication-detail-head,
    .payment-layout,
    .topic-layout
  ) {
    min-width: 0;
  }

  .page-shell :where(.hero-content, .services-copy, .rules-copy, .reviews-copy, .contacts-copy, .profile-copy) {
    min-width: 0;
    max-width: 100%;
  }
}

@media (max-width: 720px) {
  .page-shell {
    overflow: hidden;
  }

  /* Keep 730x359 publication posters fully visible in mobile cards. */
  .news-page .publication-cover {
    height: auto !important;
    min-height: 0 !important;
    aspect-ratio: 730 / 359 !important;
  }

  .news-page .publication-cover img {
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    object-fit: contain !important;
    object-position: center !important;
  }

  .page-shell :where(h1, .hero-title) {
    font-size: clamp(38px, 12vw, 58px);
    line-height: .96;
    letter-spacing: -2px;
  }

  .page-shell :where(h2, .section-heading h2) {
    font-size: clamp(27px, 8vw, 38px);
    line-height: 1.03;
    letter-spacing: -1px;
  }

  .page-shell :where(.btn, .green-action, .dark-action, .buy-btn, .pay-btn, .faq-contact-link) {
    min-height: 48px;
    height: auto;
    padding-top: 11px;
    padding-bottom: 11px;
    white-space: normal;
    text-align: center;
    line-height: 1.25;
  }

  .page-shell :where(.service-card, .review-card-public, .contact-card, .profile-card, .related-card) {
    min-width: 0;
    max-width: 100%;
  }

  .news-page .news-hero {
    padding-inline: 0 !important;
  }

  .news-page .news-hero h1 {
    margin-bottom: 17px;
    font-size: clamp(38px, 11.5vw, 54px) !important;
    line-height: .96 !important;
    letter-spacing: -1.9px !important;
  }

  .news-page .news-hero h1 span:first-child {
    white-space: normal !important;
  }

  .news-page .news-filters {
    width: 100%;
    max-width: 100%;
    scroll-padding-inline: 7px;
  }

  .news-page .publication-badges {
    left: 12px;
    right: 12px;
    top: 12px;
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .news-page .publication-type,
  .news-page .publication-pin {
    min-width: 0;
    max-width: 100%;
    white-space: normal;
    text-align: center;
    line-height: 1.15;
  }

  .news-page .publication-card-body {
    padding: 20px 17px 22px;
  }

  .news-page .publication-card-body h2 {
    font-size: clamp(23px, 7vw, 29px);
  }

  .news-detail-page .publication-detail {
    width: 100%;
    margin-top: 22px !important;
    padding: 18px 14px !important;
    overflow: hidden;
  }

  .news-detail-page .publication-detail-topline {
    width: 100%;
    margin-bottom: 23px !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 12px !important;
  }

  .news-detail-page .publication-breadcrumbs {
    width: 100%;
    margin: 0 !important;
    gap: 7px;
    font-size: 11px;
    line-height: 1.35;
  }

  .news-detail-page .publication-breadcrumbs > span:last-child {
    display: none;
  }

  .news-detail-page .publication-edit-link {
    width: 100%;
    min-height: 44px;
    justify-content: center;
    white-space: normal;
    text-align: center;
  }

  .news-detail-page .publication-detail-head {
    width: 100%;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 18px !important;
  }

  .news-detail-page .detail-meta {
    width: 100%;
    align-items: flex-start;
    gap: 8px 10px;
    font-size: 11px;
  }

  .news-detail-page .detail-meta > * {
    min-width: 0;
    max-width: 100%;
  }

  .news-detail-page .publication-detail h1 {
    width: 100%;
    margin-bottom: 16px;
    font-size: clamp(35px, 10.7vw, 52px) !important;
    line-height: .98 !important;
    letter-spacing: -1.5px !important;
  }

  .news-detail-page .publication-lead {
    width: 100%;
    font-size: 16px !important;
    line-height: 1.5;
  }

  .news-detail-page .promo-deadline {
    width: 100%;
    max-width: 100%;
    min-height: 0;
  }

  .news-detail-page .publication-detail-cover {
    width: 100% !important;
    margin-bottom: 22px !important;
    border-radius: 18px !important;
  }

  .news-detail-page .publication-content {
    width: 100%;
    padding: 23px 16px !important;
  }

  .news-detail-page .publication-cta {
    width: 100%;
  }

  .news-detail-page .publication-cta a {
    width: 100%;
    white-space: normal;
    text-align: center;
  }

  .news-detail-page .related-publications {
    width: 100%;
    padding: 20px 14px !important;
  }

  .faq-page .faq-item summary {
    grid-template-columns: 42px minmax(0, 1fr) 32px;
  }

  .profile-page :where(.account-row, .referral-code-box, .referral-link-box) {
    min-width: 0;
  }

  .profile-page .account-row strong,
  .profile-page .referral-link-box input {
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .cookie-notice {
    max-width: calc(100vw - 20px);
  }
}

@media (max-width: 430px) {
  .page-shell :where(h1, .hero-title) {
    font-size: clamp(34px, 11vw, 46px);
    letter-spacing: -1.5px;
  }

  .news-page .news-hero h1 {
    font-size: clamp(35px, 10.5vw, 45px) !important;
    letter-spacing: -1.35px !important;
  }

  .news-detail-page .publication-detail h1 {
    font-size: clamp(32px, 9.8vw, 43px) !important;
    letter-spacing: -1.1px !important;
  }

  .news-detail-page .publication-detail {
    padding-inline: 12px !important;
  }

  .news-detail-page .publication-content {
    padding-inline: 14px !important;
  }

  .page-shell :where(.legal-documents-badge, .publication-expiry, .ww-balance-pill) {
    width: fit-content;
    max-width: 100%;
    white-space: normal;
    line-height: 1.25;
  }
}

@media (max-width: 340px) {
  .page-shell {
    padding-left: 10px !important;
    padding-right: 10px !important;
  }

  .news-detail-page .publication-detail h1,
  .news-page .news-hero h1 {
    font-size: 33px !important;
  }

  .support-panel-head span,
  .support-popular-title span {
    font-size: 9px;
  }
}
