/* Sarafanovo account mobile layout v2, 2026-12-01.
 * Presentation only: account routes, forms and data stay native.
 */
@media screen and (max-width: 700px) {
  html body .sf-account-v2 {
    overflow: clip;
    padding: 14px 0 calc(96px + env(safe-area-inset-bottom, 0px)) !important;
    font-family: onest-nd, Onest, Arial, sans-serif;
    font-size: 14px;
    line-height: 1.45;
  }

  html body .sf-account-v2 > .sf-account-container,
  html body .sf-account-v2.sf-bonus-dashboard > .sf-account-container {
    width: calc(100% - 24px) !important;
    max-width: none !important;
    margin-right: auto !important;
    margin-left: auto !important;
  }

  html body .sf-account-v2 .sf-account-hero.sf-account-hero--workspace {
    width: 100% !important;
    height: auto !important;
    min-height: 210px !important;
    margin: 0 0 14px !important;
    border-radius: 18px !important;
  }

  html body .sf-account-v2 .sf-account-hero.sf-account-hero--workspace::before {
    background: linear-gradient(180deg, rgba(66, 6, 78, .88) 0%, rgba(93, 11, 109, .86) 58%, rgba(120, 17, 138, .78) 100%) !important;
  }

  html body .sf-account-v2 .sf-account-hero.sf-account-hero--workspace .sf-account-hero__visual img {
    object-position: center center !important;
    opacity: .62;
  }

  html body .sf-account-v2 .sf-account-hero.sf-account-hero--workspace .sf-account-hero__copy {
    width: 100% !important;
    max-width: none !important;
    height: auto !important;
    min-height: 210px !important;
    align-content: center !important;
    justify-items: center !important;
    padding: 24px 20px !important;
    text-align: center !important;
  }

  html body .sf-account-v2 .sf-account-hero.sf-account-hero--workspace .sf-account-hero__copy .sf-account-eyebrow {
    margin-bottom: 8px !important;
    color: #f5d9f8 !important;
    font-size: 12px !important;
    line-height: 1.35 !important;
    text-align: center !important;
  }

  html body .sf-account-v2 .sf-account-hero.sf-account-hero--workspace .sf-account-hero__copy h1 {
    margin: 0 0 10px !important;
    font-size: clamp(26px, 8vw, 31px) !important;
    line-height: 1.1 !important;
    text-align: center !important;
    text-wrap: balance;
  }

  html body .sf-account-v2 .sf-account-hero.sf-account-hero--workspace .sf-account-hero__copy > p:last-child {
    max-width: 34ch !important;
    margin: 0 auto !important;
    color: rgba(255, 255, 255, .92) !important;
    font-size: 14px !important;
    line-height: 1.5 !important;
    text-align: center !important;
  }

  html body .sf-account-v2 .sf-account-layout,
  html body .sf-account-v2 .sf-bonus-layout {
    min-width: 0 !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 14px !important;
  }

  html body .sf-account-v2 .sf-account-sidebar {
    position: static !important;
    width: 100% !important;
    max-width: none !important;
    max-height: none !important;
    overflow: visible !important;
  }

  html body .sf-account-v2 .sf-account-sidebar > nav {
    width: 100% !important;
    min-width: 0 !important;
    padding: 6px !important;
    overflow: visible !important;
    border-radius: 16px !important;
  }

  html body .sf-account-v2 .sf-account-sidebar > nav > .sf-account-nav,
  html body .sf-account-v2 .sf-account-nav {
    display: grid !important;
    width: 100% !important;
    min-width: 0 !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 6px !important;
    padding: 0 !important;
    overflow: visible !important;
  }

  html body .sf-account-v2 .sf-account-nav > li {
    display: block !important;
    width: auto !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
  }

  html body .sf-account-v2 .sf-account-nav > .sf-account-nav__profile,
  html body .sf-account-v2 .sf-account-nav > .sf-account-nav__section,
  html body .sf-account-v2 .sf-account-nav > .sf-account-nav__help {
    display: none !important;
  }

  /* An older inline dashboard rule hides the current "Обзор" tile. */
  html body .sf-account-v2 .sf-account-sidebar:has(li[data-sf-nav="dashboard"] > .is-current) .sf-account-nav > li[data-sf-nav="dashboard"] {
    display: block !important;
  }

  html body .sf-account-v2 .sf-account-nav > li > .sf-account-nav__link {
    display: flex !important;
    width: 100% !important;
    min-width: 0 !important;
    min-height: 88px !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    margin: 0 !important;
    padding: 10px 5px !important;
    border: 1px solid #eee5f0 !important;
    border-radius: 13px !important;
    background: #fff !important;
    color: #302735 !important;
    box-shadow: none !important;
    font-family: inherit !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    line-height: 1.22 !important;
    text-align: center !important;
    white-space: normal !important;
  }

  html body .sf-account-v2 .sf-account-nav > li > .sf-account-nav__link::before,
  html body .sf-account-v2 .sf-account-nav > li > .sf-account-nav__link::after {
    content: none !important;
    display: none !important;
  }

  html body .sf-account-v2 .sf-account-nav > li > .sf-account-nav__link .sf-account-nav__icon {
    display: block !important;
    width: 24px !important;
    height: 24px !important;
    flex: 0 0 24px !important;
    margin: 0 auto !important;
    color: currentColor !important;
  }

  html body .sf-account-v2 .sf-account-nav > li > .sf-account-nav__link > span {
    display: block !important;
    width: 100% !important;
    overflow-wrap: anywhere;
  }

  html body .sf-account-v2 .sf-account-nav > li > .sf-account-nav__link:hover,
  html body .sf-account-v2 .sf-account-nav > li > .sf-account-nav__link:focus-visible {
    border-color: #d9bedf !important;
    background: #faf5fb !important;
    color: #5d0b6d !important;
  }

  html body .sf-account-v2 .sf-account-nav > li > .sf-account-nav__link.is-current,
  html body .sf-account-v2 .sf-account-nav > li > .sf-account-nav__link.is-current:hover,
  html body .sf-account-v2 .sf-account-nav > li > .sf-account-nav__link.is-current:focus-visible {
    border-color: #86149a !important;
    background: linear-gradient(135deg, #5d0b6d 0%, #86149a 58%, #a52284 100%) !important;
    color: #fff !important;
    box-shadow: 0 8px 18px rgba(93, 11, 109, .16) !important;
  }

  html body .sf-account-v2 .sf-account-nav > .sf-account-nav__logout {
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
  }

  html body .sf-account-v2 .sf-account-main {
    min-width: 0 !important;
    gap: 12px !important;
  }

  html body .sf-account-v2 .sf-account-card,
  html body .sf-account-v2 .sf-order-card,
  html body .sf-account-v2 .sf-wantcut-catalog {
    min-width: 0 !important;
    padding: 16px !important;
    border-radius: 14px !important;
  }

  html body .sf-account-v2 .sf-dashboard-welcome {
    align-items: center !important;
    text-align: center !important;
  }

  html body .sf-account-v2 .sf-dashboard-welcome > div {
    width: 100%;
  }

  html body .sf-account-v2 .sf-dashboard-welcome .sf-contact-line {
    justify-content: center !important;
  }

  html body .sf-account-v2 .sf-dashboard-welcome .sf-account-button {
    width: 100%;
    max-width: 320px;
    margin: 0 auto;
  }

  html body .sf-account-v2 .sf-stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }

  html body .sf-account-v2 .sf-stat-card {
    min-height: 112px !important;
    align-items: center !important;
    padding: 14px 10px !important;
    text-align: center !important;
  }

  html body .sf-account-v2 .sf-stat-card > strong {
    font-size: 22px !important;
  }

  html body .sf-account-v2 .sf-card-heading {
    display: grid !important;
    gap: 10px !important;
    align-items: center !important;
    justify-items: center !important;
    text-align: center !important;
  }

  html body .sf-account-v2 .sf-account-card h2,
  html body .sf-account-v2 .sf-card-heading h2 {
    font-size: 21px !important;
    line-height: 1.25 !important;
  }

  html body .sf-account-v2 .sf-dashboard-order-row {
    min-width: 0 !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    grid-template-areas:
      "meta status"
      "thumbs thumbs"
      "delivery delivery"
      "total action" !important;
    gap: 10px !important;
    padding: 14px !important;
  }

  html body .sf-account-v2 .sf-dashboard-order-row__total {
    justify-self: start !important;
    align-self: center !important;
    font-size: 15px !important;
  }

  html body .sf-account-v2 .sf-dashboard-order-row__status,
  html body .sf-account-v2 .sf-dashboard-order-row__action {
    justify-self: end !important;
  }

  html body .sf-account-v2 .sf-dashboard-order-row__delivery p {
    max-width: none !important;
    font-size: 12px !important;
    white-space: normal !important;
  }

  html body .sf-account-v2 .sf-dashboard-order-row__thumbs,
  html body .sf-account-v2 .sf-order-thumbs {
    max-width: 100% !important;
    overflow-x: auto !important;
    overflow-y: visible !important;
    scrollbar-width: thin;
  }

  html body .sf-account-v2 .sf-order-thumb__quantity {
    font-size: 11px !important;
    line-height: 1.25 !important;
  }

  html body .sf-account-v2 :is(small, .sf-pill, .sf-bonus-kpi__action) {
    font-size: 12px !important;
    line-height: 1.4 !important;
  }

  html body .sf-account-v2 :is(.sf-account-button, .sf-account-link, button) {
    font-family: inherit !important;
    font-size: 14px !important;
  }

  html body .sf-account-v2 :is(input, select, textarea) {
    min-width: 0 !important;
    font-family: inherit !important;
    font-size: 16px !important;
  }

  html body .sf-account-v2 .sf-form-grid,
  html body .sf-account-v2 .sf-form-grid--filters,
  html body .sf-account-v2 .sf-order-detail-grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }
}

@media screen and (max-width: 390px) {
  html body .sf-account-v2 > .sf-account-container,
  html body .sf-account-v2.sf-bonus-dashboard > .sf-account-container {
    width: calc(100% - 16px) !important;
  }

  html body .sf-account-v2 .sf-account-hero.sf-account-hero--workspace .sf-account-hero__copy {
    padding: 22px 14px !important;
  }

  html body .sf-account-v2 .sf-account-sidebar > nav {
    padding: 5px !important;
  }

  html body .sf-account-v2 .sf-account-sidebar > nav > .sf-account-nav,
  html body .sf-account-v2 .sf-account-nav {
    gap: 4px !important;
  }

  html body .sf-account-v2 .sf-account-nav > li > .sf-account-nav__link {
    min-height: 84px !important;
    padding: 9px 3px !important;
    font-size: 13px !important;
  }
}
