/*
 * Leather R2 tablet/desktop completion.
 * Mobile R2.1 remains owned by leather-r2-mobile.css and is intentionally
 * untouched. This layer is client-scoped and starts at the R2 tablet boundary.
 */
@media (min-width: 600px) {
  html[data-theme="leather"] body.public-mode.telegram-hero-shell .telegram-home-hero,
  html[data-theme="leather"] body.public-mode.browser-public-mode.public-web-shell .public-web-residential-hero,
  html[data-theme="leather"] body.public-mode #seo-initial-content .seo-public-hero {
    width: 100%;
    height: auto;
    min-height: 0;
    max-height: none;
    aspect-ratio: 64 / 25;
    overflow: hidden;
    border-color: transparent;
    border-radius: 20px;
    background: var(--leather-r2-black);
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.5);
  }

  html[data-theme="leather"] body.public-mode .leather-hero-layers,
  html[data-theme="leather"] body.public-mode .leather-hero-r2-plate,
  html[data-theme="leather"] body.public-mode .leather-hero-r2-plate-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
  }

  html[data-theme="leather"] body.public-mode .leather-hero-r2-plate {
    z-index: 1;
    display: block;
    margin: 0;
    opacity: 0;
    pointer-events: none;
  }

  html[data-theme="leather"] body.public-mode .leather-hero-r2-plate-image {
    display: block;
    object-fit: fill;
  }

  html[data-theme="leather"] body.public-mode .leather-hero-layers.is-r2-ready .leather-hero-r2-plate {
    opacity: 1;
  }

  html[data-theme="leather"] body.public-mode .leather-hero-layers.is-r2-ready .leather-hero-girl-pocket,
  html[data-theme="leather"] body.public-mode .leather-hero-layers.is-r2-ready .leather-hero-girl-clip,
  html[data-theme="leather"] body.public-mode .leather-hero-layers.is-r2-ready .leather-hero-girl-seam,
  html[data-theme="leather"] body.public-mode .leather-hero-layers.is-r2-ready .leather-hero-trust-pocket,
  html[data-theme="leather"] body.public-mode .leather-hero-layers.is-r2-ready .leather-hero-trust-seam {
    display: none;
  }

  html[data-theme="leather"] body.public-mode.telegram-hero-shell .telegram-home-hero.leather-hero-r2-ready,
  html[data-theme="leather"] body.public-mode.browser-public-mode.public-web-shell .public-web-residential-hero.leather-hero-r2-ready,
  html[data-theme="leather"] body.public-mode #seo-initial-content .seo-public-hero.leather-hero-r2-ready {
    border-color: transparent;
    background: var(--leather-r2-black);
    box-shadow: none;
  }

  html[data-theme="leather"] body.public-mode.telegram-hero-shell .telegram-home-hero.leather-hero-r2-ready::after,
  html[data-theme="leather"] body.public-mode.browser-public-mode.public-web-shell .public-web-residential-hero.leather-hero-r2-ready::after,
  html[data-theme="leather"] body.public-mode #seo-initial-content .seo-public-hero.leather-hero-r2-ready::after {
    content: none;
  }

  html[data-theme="leather"] body.public-mode.telegram-hero-shell .telegram-home-hero-content,
  html[data-theme="leather"] body.public-mode.browser-public-mode.public-web-shell .public-web-hero-content,
  html[data-theme="leather"] body.public-mode #seo-initial-content .seo-public-hero-content {
    position: absolute;
    z-index: 6;
    inset: 0;
    display: block;
    width: auto;
    height: auto;
    padding: 0;
  }

  /* Tablet safe zones from hero-leather-layout-safezones-r2.json. */
  html[data-theme="leather"] body.public-mode .residential-hero-eyebrow,
  html[data-theme="leather"] body.public-mode #seo-initial-content .residential-hero-eyebrow {
    position: absolute;
    top: 7.5%;
    left: 29.5%;
    display: flex;
    width: 63%;
    height: 11.5%;
    margin: 0;
    gap: 7px;
    align-items: flex-start;
    overflow: hidden;
    color: #dfb78e;
    font-size: clamp(12px, 1.75vw, 15px);
    font-weight: 650;
    line-height: 1.22;
    letter-spacing: 0;
    text-shadow: none;
    transform: none;
    filter: none;
    opacity: 1;
  }

  html[data-theme="leather"] body.public-mode .residential-hero-sparkle {
    flex: 0 0 13px;
    width: 13px;
    height: 13px;
  }

  html[data-theme="leather"] body.public-mode .residential-hero-primary,
  html[data-theme="leather"] body.public-mode #seo-initial-content .residential-hero-primary {
    position: absolute;
    top: 20%;
    left: 30%;
    display: flex;
    width: 58%;
    height: 51%;
    margin: 0;
    flex-direction: column;
    justify-content: space-between;
    transform: none;
    filter: none;
    opacity: 1;
  }

  html[data-theme="leather"] body.public-mode .residential-hero-title,
  html[data-theme="leather"] body.public-mode #seo-initial-content .seo-public-hero h1 {
    max-width: none;
    margin: 0;
    color: #e8bd94;
    font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, "Times New Roman", serif;
    font-size: clamp(40px, 6.7vw, 60px);
    font-weight: 600;
    line-height: 0.96;
    letter-spacing: 0;
    overflow-wrap: normal;
    text-wrap: balance;
    text-shadow: none;
    transform: none;
    filter: none;
    opacity: 1;
  }

  html[data-theme="leather"][lang="ru"] body.public-mode .residential-hero-title,
  html[data-theme="leather"][lang="ru"] body.public-mode #seo-initial-content .seo-public-hero h1 {
    font-size: clamp(33px, 5.5vw, 50px);
    line-height: 0.98;
  }

  html[data-theme="leather"] body.public-mode .residential-hero-subtitle,
  html[data-theme="leather"] body.public-mode #seo-initial-content .residential-hero-subtitle {
    margin: 0;
    color: #d7a878;
    font-size: clamp(14px, 2vw, 18px);
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: 0;
    white-space: nowrap;
    text-shadow: none;
    transform: none;
    filter: none;
    opacity: 1;
  }

  html[data-theme="leather"] body.public-mode .residential-hero-trust,
  html[data-theme="leather"] body.public-mode #seo-initial-content .residential-hero-trust {
    position: absolute;
    top: 74%;
    left: 30%;
    display: grid;
    width: 65%;
    height: 19%;
    margin: 0;
    padding: 0;
    grid-template-columns: 43% minmax(0, 1fr) 108px;
    column-gap: 0;
    align-items: center;
    transform: none;
    filter: none;
    opacity: 1;
  }

  html[data-theme="leather"] body.public-mode .residential-hero-divider,
  html[data-theme="leather"] body.public-mode #seo-initial-content .residential-hero-divider {
    display: none;
  }

  html[data-theme="leather"] body.public-mode .residential-hero-trust-copy,
  html[data-theme="leather"] body.public-mode #seo-initial-content .residential-hero-trust-copy {
    grid-column: 1;
    display: grid;
    width: 100%;
    min-width: 0;
    max-width: none;
    margin: 0;
    gap: 7px;
    grid-template-columns: 18px minmax(0, 1fr);
    align-items: center;
    overflow: hidden;
    color: var(--leather-r2-text-warm);
    font-size: clamp(11.5px, 1.55vw, 14px);
    font-weight: 600;
    line-height: 1.22;
    letter-spacing: 0;
    text-shadow: none;
    transform: none;
    filter: none;
    opacity: 1;
  }

  html[data-theme="leather"] body.public-mode .residential-hero-shield {
    flex: 0 0 18px;
    width: 18px;
    height: 18px;
    color: var(--leather-r2-champagne);
  }

  html[data-theme="leather"] body.public-mode.telegram-hero-shell .telegram-home-hero-language,
  html[data-theme="leather"] body.public-mode.browser-public-mode.public-web-shell .public-web-hero-language,
  html[data-theme="leather"] body.public-mode #seo-initial-content .seo-public-hero-language {
    z-index: 7;
    position: relative;
    display: block;
    top: auto;
    right: auto;
    bottom: auto;
    left: auto;
    grid-column: 3;
    width: 108px;
    min-width: 108px;
    max-width: 108px;
    height: 44px;
    align-self: center;
    justify-self: end;
    transform: none;
    filter: none;
    opacity: 1;
  }

  html[data-theme="leather"] body.public-mode.telegram-hero-shell .telegram-home-hero-language .lang-switch,
  html[data-theme="leather"] body.public-mode.browser-public-mode.public-web-shell .public-web-hero-language .lang-switch,
  html[data-theme="leather"] body.public-mode #seo-initial-content .seo-language-links {
    position: relative;
    z-index: 0;
    isolation: isolate;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    width: 100%;
    min-width: 0;
    height: 44px;
    min-height: 44px;
    margin: 0;
    padding: 0;
    gap: 0;
    overflow: hidden;
    box-sizing: border-box;
    border: 1px solid #523a2d;
    border-radius: 999px;
    background-color: #12100f;
    background-image:
      linear-gradient(rgba(8, 6, 5, 0.18), rgba(8, 6, 5, 0.18)),
      url("/app/assets/leather/textures/leather-black-seamless-512.webp");
    background-size: auto, 180px 180px;
    box-shadow:
      0 7px 14px rgba(0, 0, 0, 0.46),
      inset 0 1px 0 rgba(255, 237, 215, 0.07),
      inset 0 -2px 4px rgba(0, 0, 0, 0.42);
  }

  html[data-theme="leather"] body.public-mode.telegram-hero-shell .telegram-home-hero-language .lang-option,
  html[data-theme="leather"] body.public-mode.browser-public-mode.public-web-shell .public-web-hero-language .lang-option,
  html[data-theme="leather"] body.public-mode #seo-initial-content .seo-language-links a {
    position: relative;
    z-index: 0;
    isolation: isolate;
    display: grid;
    width: auto;
    min-width: 0;
    height: 44px;
    min-height: 44px;
    margin: 0;
    padding: 0;
    place-items: center;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    color: var(--leather-r2-text-warm);
    font-size: 12px;
    line-height: 1;
    transform: none;
  }

  html[data-theme="leather"] body.public-mode.telegram-hero-shell .telegram-home-hero-language .lang-option::before,
  html[data-theme="leather"] body.public-mode.browser-public-mode.public-web-shell .public-web-hero-language .lang-option::before,
  html[data-theme="leather"] body.public-mode #seo-initial-content .seo-language-links a::before {
    position: absolute;
    z-index: -1;
    inset: 2px;
    border: 1px solid transparent;
    border-radius: 999px;
    content: "";
    opacity: 0;
    pointer-events: none;
  }

  html[data-theme="leather"] body.public-mode.telegram-hero-shell .telegram-home-hero-language .lang-option.is-active,
  html[data-theme="leather"] body.public-mode.browser-public-mode.public-web-shell .public-web-hero-language .lang-option.is-active,
  html[data-theme="leather"] body.public-mode #seo-initial-content .seo-language-links a.is-active {
    border: 0;
    background: transparent;
    box-shadow: none;
    color: var(--leather-r2-text-dark);
  }

  html[data-theme="leather"] body.public-mode.telegram-hero-shell .telegram-home-hero-language .lang-option.is-active::before,
  html[data-theme="leather"] body.public-mode.browser-public-mode.public-web-shell .public-web-hero-language .lang-option.is-active::before,
  html[data-theme="leather"] body.public-mode #seo-initial-content .seo-language-links a.is-active::before {
    border-color: #9b6e4e;
    background-color: var(--leather-r2-sand);
    background-image:
      linear-gradient(145deg, rgba(255, 239, 219, 0.18), rgba(121, 69, 39, 0.12)),
      url("/app/assets/leather/textures/leather-sand-seamless-512.webp");
    background-size: 100% 100%, 180px 180px;
    box-shadow:
      0 2px 5px rgba(0, 0, 0, 0.28),
      inset 0 1px 0 rgba(255, 245, 231, 0.28),
      inset 0 -2px 3px rgba(86, 47, 27, 0.18);
    opacity: 1;
  }

  /*
   * R2.1 stitch hierarchy. Each selector receives one closed path only;
   * old tile backgrounds and secondary active-state frames are suppressed.
   */
  html[data-theme="leather"] body.public-mode.telegram-hero-shell.public-client-tabs .tabs > .tab[data-view="search"]::before,
  html[data-theme="leather"] body.public-mode.telegram-hero-shell.public-client-tabs .tabs > .tab[data-view="newdev"]::before,
  html[data-theme="leather"] body.public-mode.telegram-hero-shell.public-client-tabs .tabs > .tab[data-view="commercial"]::before,
  html[data-theme="leather"] body.public-mode.browser-public-mode.public-web-shell .public-web-mobile-primary-navigation .public-web-navigation-button::after,
  html[data-theme="leather"] body.public-mode.browser-public-mode.public-web-shell .public-web-desktop-navigation .public-web-navigation-button:not(.is-service)::after,
  html[data-theme="leather"] body.public-mode:is(.telegram-client-shell, .public-web-shell) .telegram-residential-purpose-choice.is-selected::after,
  html[data-theme="leather"] body.public-mode:is(.telegram-client-shell, .public-web-shell) .residential-location-mode.is-selected::after,
  html[data-theme="leather"] body.public-mode:is(.telegram-client-shell, .public-web-shell) .public-web-desktop-search-submit::after,
  html[data-theme="leather"] body.public-mode #seo-initial-content .seo-public-primary-navigation .seo-public-navigation-button::after,
  html[data-theme="leather"] body.public-mode #seo-initial-content .seo-public-purpose-choice.is-selected::after,
  html[data-theme="leather"] body.public-mode #seo-initial-content .seo-public-location-modes span.is-selected::after,
  html[data-theme="leather"] body.public-mode #seo-initial-content .seo-public-search-link::after,
  html[data-theme="leather"] body.public-mode.public-client-tabs .appearance-option[data-theme-option="leather"]::before {
    position: absolute;
    inset: 0;
    width: auto;
    height: auto;
    border: 0;
    border-radius: inherit;
    background: var(--leather-r2-stitch-a-black) no-repeat 0 0 / 100% 100%;
    box-shadow: none;
    content: "";
    opacity: 1;
    pointer-events: none;
  }

  html[data-theme="leather"] body.public-mode.browser-public-mode.public-web-shell .public-web-desktop-navigation .public-web-navigation-button {
    position: relative;
    overflow: hidden;
  }

  html[data-theme="leather"] body.public-mode.browser-public-mode.public-web-shell .public-web-desktop-navigation .public-web-navigation-button.is-active,
  html[data-theme="leather"] body.public-mode.telegram-hero-shell.public-client-tabs .tabs > .tab.is-active,
  html[data-theme="leather"] body.public-mode.browser-public-mode.public-web-shell .public-web-mobile-primary-navigation .public-web-navigation-button.is-active {
    border-color: transparent;
    box-shadow:
      inset 0 3px 7px rgba(0, 0, 0, 0.5),
      inset 0 1px 0 rgba(255, 240, 220, 0.05),
      0 2px 5px rgba(0, 0, 0, 0.24);
  }

  html[data-theme="leather"] body.public-mode.telegram-hero-shell.public-client-tabs .tabs > .tab[data-view="search"].is-active::after,
  html[data-theme="leather"] body.public-mode.telegram-hero-shell.public-client-tabs .tabs > .tab[data-view="newdev"].is-active::after,
  html[data-theme="leather"] body.public-mode.telegram-hero-shell.public-client-tabs .tabs > .tab[data-view="commercial"].is-active::after {
    content: none;
    background: none;
    box-shadow: none;
  }

  html[data-theme="leather"] body.public-mode:is(.telegram-client-shell, .public-web-shell) .telegram-residential-purpose-choice:not(.is-selected)::after,
  html[data-theme="leather"] body.public-mode:is(.telegram-client-shell, .public-web-shell) .residential-location-mode:not(.is-selected)::after,
  html[data-theme="leather"] body.public-mode #seo-initial-content .seo-public-purpose-choice:not(.is-selected)::after,
  html[data-theme="leather"] body.public-mode #seo-initial-content .seo-public-location-modes span:not(.is-selected)::after {
    content: none;
  }

  html[data-theme="leather"] body.public-mode.browser-public-mode.public-web-shell .public-web-mobile-service-actions::after,
  html[data-theme="leather"] body.public-mode:is(.telegram-client-shell, .public-web-shell) .telegram-residential-core-filters::after,
  html[data-theme="leather"] body.public-mode #seo-initial-content .seo-public-service-actions::after,
  html[data-theme="leather"] body.public-mode #seo-initial-content .seo-public-filter::after,
  html[data-theme="leather"] body.public-mode.browser-public-mode.public-web-shell .public-web-desktop-navigation .public-web-navigation-button.is-service::after {
    position: absolute;
    inset: 0;
    border: 0;
    border-radius: inherit;
    background: var(--leather-r2-stitch-b-sand) no-repeat 0 0 / 100% 100%;
    box-shadow: none;
    content: "";
    opacity: 1;
    pointer-events: none;
  }

  html[data-theme="leather"] body.public-mode.browser-public-mode.public-web-shell .public-web-desktop-navigation .public-web-navigation-button.is-service {
    color: var(--leather-r2-text-dark);
    background-color: var(--leather-r2-sand);
    background-image:
      linear-gradient(145deg, rgba(255, 241, 224, 0.16), rgba(132, 73, 41, 0.17)),
      url("/app/assets/leather/textures/leather-sand-seamless-512.webp");
    background-size: 100% 100%, 210px 210px;
    text-shadow: none;
  }

  html[data-theme="leather"] body.public-mode.telegram-hero-shell.public-client-tabs .tabs::before {
    background-image:
      var(--leather-r2-stitch-b-sand),
      linear-gradient(145deg, rgba(255, 241, 224, 0.16), rgba(132, 73, 41, 0.17)),
      url("/app/assets/leather/textures/leather-sand-seamless-512.webp");
    background-repeat: no-repeat, no-repeat, repeat;
    background-position: 0 0, 0 0, center;
    background-size: 100% 100%, 100% 100%, 210px 210px;
    box-shadow:
      0 7px 14px rgba(0, 0, 0, 0.42),
      inset 0 1px 0 rgba(255, 245, 231, 0.2),
      inset 0 -3px 5px rgba(81, 44, 25, 0.22);
  }

  /* Level C rows keep their material edge and carry no perimeter seam. */
  html[data-theme="leather"] body.public-mode:is(.telegram-client-shell, .public-web-shell) .telegram-residential-property-type::after,
  html[data-theme="leather"] body.public-mode:is(.telegram-client-shell, .public-web-shell) .residential-district-filter::after,
  html[data-theme="leather"] body.public-mode:is(.telegram-client-shell, .public-web-shell) .residential-location-filter::after,
  html[data-theme="leather"] body.public-mode #seo-initial-content .seo-public-property-type::after,
  html[data-theme="leather"] body.public-mode #seo-initial-content .seo-public-location::after,
  html[data-theme="leather"] body.public-mode #seo-initial-content .seo-public-areas::after {
    content: none;
  }

  /*
   * The advanced filter group enters the first viewport on tablet/desktop.
   * Treat it as one secondary black-leather organizer plate; its ordinary
   * fields remain Level C sand rows with no additional perimeter stitch.
   */
  html[data-theme="leather"] body.public-mode:is(.telegram-client-shell, .public-web-shell)
    .client-filters.telegram-residential-legacy-filters {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    border-color: #4c382d;
    background-color: #11100f;
    background-image:
      linear-gradient(rgba(7, 5, 4, 0.17), rgba(7, 5, 4, 0.17)),
      url("/app/assets/leather/textures/leather-black-seamless-512.webp");
    background-size: auto, 260px 260px;
    box-shadow:
      0 12px 24px rgba(0, 0, 0, 0.44),
      inset 0 1px 0 rgba(255, 239, 217, 0.06),
      inset 0 -3px 6px rgba(0, 0, 0, 0.48);
  }

  html[data-theme="leather"] body.public-mode:is(.telegram-client-shell, .public-web-shell)
    .client-filters.telegram-residential-legacy-filters::after {
    position: absolute;
    z-index: 3;
    inset: 0;
    border: 0;
    border-radius: inherit;
    background: var(--leather-r2-stitch-b-black) no-repeat 0 0 / 100% 100%;
    content: "";
    pointer-events: none;
  }

  html[data-theme="leather"] body.public-mode:is(.telegram-client-shell, .public-web-shell)
    .client-filters.telegram-residential-legacy-filters
    .client-filter-secondary .client-filter > span {
    color: var(--leather-r2-champagne);
  }
}

@media (min-width: 1024px) {
  html[data-theme="leather"] body.public-mode.telegram-hero-shell .telegram-home-hero,
  html[data-theme="leather"] body.public-mode.browser-public-mode.public-web-shell .public-web-residential-hero,
  html[data-theme="leather"] body.public-mode #seo-initial-content .seo-public-hero {
    aspect-ratio: 16 / 5;
    border-radius: 22px;
  }

  /* Desktop safe zones from hero-leather-layout-safezones-r2.json. */
  html[data-theme="leather"] body.public-mode .residential-hero-eyebrow,
  html[data-theme="leather"] body.public-mode #seo-initial-content .residential-hero-eyebrow {
    top: 7.5%;
    left: 24.5%;
    width: 68%;
    height: 11.5%;
    font-size: clamp(14px, 1.18vw, 17px);
  }

  html[data-theme="leather"] body.public-mode .residential-hero-primary,
  html[data-theme="leather"] body.public-mode #seo-initial-content .residential-hero-primary {
    top: 20%;
    left: 25%;
    width: 54%;
    height: 51%;
  }

  html[data-theme="leather"] body.public-mode .residential-hero-title,
  html[data-theme="leather"] body.public-mode #seo-initial-content .seo-public-hero h1 {
    max-width: none;
    font-size: clamp(50px, 4.55vw, 68px);
  }

  html[data-theme="leather"][lang="ru"] body.public-mode .residential-hero-title,
  html[data-theme="leather"][lang="ru"] body.public-mode #seo-initial-content .seo-public-hero h1 {
    font-size: clamp(42px, 3.8vw, 58px);
  }

  html[data-theme="leather"] body.public-mode .residential-hero-subtitle,
  html[data-theme="leather"] body.public-mode #seo-initial-content .residential-hero-subtitle {
    font-size: clamp(16px, 1.5vw, 21px);
  }

  html[data-theme="leather"] body.public-mode .residential-hero-trust,
  html[data-theme="leather"] body.public-mode #seo-initial-content .residential-hero-trust {
    top: 74%;
    left: 25%;
    width: 71%;
    height: 19%;
    grid-template-columns: minmax(0, 1fr) 112px;
    column-gap: 10px;
  }

  html[data-theme="leather"] body.public-mode .residential-hero-trust-copy,
  html[data-theme="leather"] body.public-mode #seo-initial-content .residential-hero-trust-copy {
    font-size: clamp(13px, 1.12vw, 16px);
    overflow: visible;
    white-space: nowrap;
  }

  html[data-theme="leather"] body.public-mode .residential-hero-shield,
  html[data-theme="leather"] body.public-mode #seo-initial-content .residential-hero-shield {
    flex: 0 0 18px;
    width: 18px;
    min-width: 18px;
    max-width: 18px;
    height: 18px;
  }

  html[data-theme="leather"] body.public-mode.telegram-hero-shell .telegram-home-hero-language,
  html[data-theme="leather"] body.public-mode.browser-public-mode.public-web-shell .public-web-hero-language,
  html[data-theme="leather"] body.public-mode #seo-initial-content .seo-public-hero-language {
    grid-column: 2;
  }

  html[data-theme="leather"] body.public-mode.telegram-hero-shell .telegram-home-hero-language,
  html[data-theme="leather"] body.public-mode.browser-public-mode.public-web-shell .public-web-hero-language,
  html[data-theme="leather"] body.public-mode #seo-initial-content .seo-public-hero-language {
    width: 112px;
    min-width: 112px;
    max-width: 112px;
  }

  html[data-theme="leather"] body.public-mode.browser-public-mode.public-web-shell .telegram-residential-core-filters {
    border-color: #4c382d;
    background-color: #11100f;
    background-image:
      linear-gradient(rgba(7, 5, 4, 0.17), rgba(7, 5, 4, 0.17)),
      url("/app/assets/leather/textures/leather-black-seamless-512.webp");
    background-size: auto, 260px 260px;
    box-shadow:
      0 14px 28px rgba(0, 0, 0, 0.46),
      inset 0 1px 0 rgba(255, 244, 229, 0.08),
      inset 0 -4px 7px rgba(0, 0, 0, 0.28);
  }

  html[data-theme="leather"] body.public-mode.browser-public-mode.public-web-shell
    .telegram-residential-core-filters > .telegram-residential-purpose,
  html[data-theme="leather"] body.public-mode.browser-public-mode.public-web-shell
    .telegram-residential-core-filters > .telegram-residential-property-type {
    box-sizing: border-box;
    height: 82px;
    min-height: 82px;
    max-height: 82px;
    align-self: end;
    padding: 9px;
  }

  html[data-theme="leather"] body.public-mode.browser-public-mode.public-web-shell
    .telegram-residential-core-filters > .telegram-residential-property-type
    .telegram-residential-property-type-summary {
    box-sizing: border-box;
    height: 62px;
    min-height: 62px;
  }

  html[data-theme="leather"] body.public-mode #seo-initial-content .seo-public-filter {
    gap: 12px;
    padding: 14px;
  }

  html[data-theme="leather"] body.public-mode #seo-initial-content .seo-public-purpose,
  html[data-theme="leather"] body.public-mode #seo-initial-content .seo-public-property-type {
    box-sizing: border-box;
    height: 82px;
    min-height: 82px;
    max-height: 82px;
    align-self: end;
    padding: 9px;
    border: 1px solid #94684b;
    border-radius: 12px;
    background-color: var(--leather-sand-deep);
    background-image:
      linear-gradient(145deg, rgba(255, 241, 222, 0.14), rgba(119, 65, 37, 0.17)),
      url("/app/assets/leather/textures/leather-sand-seamless-512.webp");
    background-size: 100% 100%, 220px 220px;
    box-shadow: var(--leather-elevation-medium);
  }

  html[data-theme="leather"] body.public-mode.browser-public-mode.public-web-shell
    .telegram-residential-core-filters::after,
  html[data-theme="leather"] body.public-mode #seo-initial-content .seo-public-filter::after {
    background: var(--leather-r2-stitch-b-black) no-repeat 0 0 / 100% 100%;
  }

  /*
   * Keep the desktop SEO shell materially aligned while app.js is delayed.
   * The semantic SSR content stays intact; only its Leather presentation is
   * brought onto the same R2 surfaces and vertical rhythm as hydrated UI.
   */
  html[data-theme="leather"] body.public-mode #seo-initial-content
    .seo-public-desktop-navigation .seo-public-navigation-button {
    position: relative;
    overflow: hidden;
    min-height: 44px;
    padding: 8px clamp(8px, 0.9vw, 14px);
    border-color: #563c2d;
    border-radius: 7px;
    color: var(--leather-gold);
    background-color: #181411;
    background-image: url("/app/assets/leather/textures/leather-black-seamless-512.webp");
    background-size: 240px 240px;
    box-shadow: var(--leather-shadow-low);
    font-size: 13px;
    line-height: 1.12;
  }

  html[data-theme="leather"] body.public-mode #seo-initial-content
    .seo-public-desktop-navigation {
    gap: clamp(4px, 0.6vw, 10px);
  }

  html[data-theme="leather"] body.public-mode #seo-initial-content
    .seo-public-desktop-navigation .seo-public-navigation-button.is-active {
    border-color: transparent;
    color: var(--leather-gold-bright);
    background-color: var(--leather-surface-dark-2);
    box-shadow:
      inset 0 3px 7px rgba(0, 0, 0, 0.5),
      inset 0 1px 0 rgba(255, 240, 220, 0.05),
      0 2px 5px rgba(0, 0, 0, 0.24);
  }

  html[data-theme="leather"] body.public-mode #seo-initial-content
    .seo-public-desktop-navigation .seo-public-navigation-button:not(.is-service)::after,
  html[data-theme="leather"] body.public-mode #seo-initial-content
    .seo-public-desktop-navigation .seo-public-navigation-button.is-service::after {
    position: absolute;
    z-index: 1;
    inset: 0;
    border: 0;
    border-radius: inherit;
    content: "";
    pointer-events: none;
  }

  html[data-theme="leather"] body.public-mode #seo-initial-content
    .seo-public-desktop-navigation .seo-public-navigation-button:not(.is-service)::after {
    background: var(--leather-r2-stitch-a-black) no-repeat 0 0 / 100% 100%;
  }

  html[data-theme="leather"] body.public-mode #seo-initial-content
    .seo-public-desktop-navigation .seo-public-navigation-button.is-service {
    border-color: #9b704f;
    color: #2f241d;
    background-color: var(--leather-r2-sand);
    background-image:
      linear-gradient(145deg, rgba(255, 241, 224, 0.16), rgba(132, 73, 41, 0.17)),
      url("/app/assets/leather/textures/leather-sand-seamless-512.webp");
    background-size: 100% 100%, 180px 180px;
    box-shadow:
      0 4px 9px rgba(0, 0, 0, 0.32),
      inset 0 1px 0 rgba(255, 245, 229, 0.18),
      inset 0 -2px 4px rgba(81, 44, 25, 0.2);
  }

  html[data-theme="leather"] body.public-mode #seo-initial-content
    .seo-public-desktop-navigation .seo-public-navigation-button.is-service::after {
    background: var(--leather-r2-stitch-b-sand) no-repeat 0 0 / 100% 100%;
  }

  html[data-theme="leather"] body.public-mode #seo-initial-content .seo-public-telegram-link,
  html[data-theme="leather"] body.public-mode #seo-initial-content .seo-public-request-link,
  html[data-theme="leather"] body.public-mode #seo-initial-content
    .seo-public-header-language .seo-language-links {
    border-color: #563c2d;
    color: var(--leather-r2-champagne);
    background-color: #13110f;
    background-image:
      linear-gradient(rgba(6, 5, 4, 0.12), rgba(6, 5, 4, 0.12)),
      url("/app/assets/leather/textures/leather-black-seamless-512.webp");
    background-size: auto, 220px 220px;
    box-shadow:
      0 3px 7px rgba(0, 0, 0, 0.34),
      inset 0 1px 0 rgba(255, 245, 229, 0.07),
      inset 0 -2px 3px rgba(0, 0, 0, 0.24);
  }

  html[data-theme="leather"] body.public-mode #seo-initial-content .seo-public-header-language {
    display: block;
    width: 124px;
    min-width: 124px;
    height: 44px;
  }

  html[data-theme="leather"] body.public-mode #seo-initial-content
    .seo-public-header-language .seo-language-links {
    width: 116px;
    min-width: 116px;
    max-width: 116px;
  }

  html[data-theme="leather"] body.public-mode #seo-initial-content
    .seo-public-header-language .seo-language-links a {
    color: var(--leather-r2-champagne);
    background: transparent;
  }

  html[data-theme="leather"] body.public-mode #seo-initial-content
    .seo-public-header-language .seo-language-links a.is-active {
    color: #2f241d;
    background-color: var(--leather-r2-sand);
    background-image: url("/app/assets/leather/textures/leather-sand-seamless-512.webp");
    background-size: 180px 180px;
  }

  html[data-theme="leather"] body.public-mode #seo-initial-content .seo-public-feed {
    margin-top: 18px;
  }

  html[data-theme="leather"] body.public-mode #seo-initial-content .seo-public-filter {
    border-color: #4c382d;
    background-color: #11100f;
    background-image:
      linear-gradient(rgba(7, 5, 4, 0.17), rgba(7, 5, 4, 0.17)),
      url("/app/assets/leather/textures/leather-black-seamless-512.webp");
    background-size: auto, 260px 260px;
    box-shadow:
      0 14px 28px rgba(0, 0, 0, 0.46),
      inset 0 1px 0 rgba(255, 244, 229, 0.08),
      inset 0 -4px 7px rgba(0, 0, 0, 0.28);
  }

  /* Override the older desktop fidelity cascade without affecting other themes. */
  html[data-theme="leather"] body.public-mode.browser-public-mode.public-web-shell
    .public-web-residential-hero .residential-hero-eyebrow {
    top: 7.5%;
    left: 24.5%;
    width: 68%;
    height: 11.5%;
    max-width: none;
    margin: 0;
    font-size: clamp(14px, 1.18vw, 17px);
  }

  html[data-theme="leather"] body.public-mode.browser-public-mode.public-web-shell
    .public-web-residential-hero .residential-hero-primary {
    top: 20%;
    left: 25%;
    width: 54%;
    height: 51%;
    margin: 0;
  }

  html[data-theme="leather"] body.public-mode.browser-public-mode.public-web-shell
    .public-web-residential-hero .residential-hero-title {
    max-width: none;
    margin: 0;
    font-size: clamp(50px, 4.55vw, 68px);
  }

  html[data-theme="leather"][lang="ru"] body.public-mode.browser-public-mode.public-web-shell
    .public-web-residential-hero .residential-hero-title {
    font-size: clamp(42px, 3.8vw, 58px);
  }

  html[data-theme="leather"] body.public-mode.browser-public-mode.public-web-shell
    .public-web-residential-hero .residential-hero-subtitle {
    margin: 0;
    font-size: clamp(16px, 1.5vw, 21px);
  }

  html[data-theme="leather"] body.public-mode.browser-public-mode.public-web-shell
    .public-web-residential-hero .residential-hero-trust {
    top: 74%;
    left: 25%;
    width: 71%;
    height: 19%;
    margin: 0;
    padding: 0;
    grid-template-columns: minmax(0, 1fr) 112px;
    column-gap: 10px;
  }

  html[data-theme="leather"] body.public-mode.browser-public-mode.public-web-shell
    .public-web-residential-hero .residential-hero-trust-copy {
    width: 100%;
    max-width: none;
    font-size: clamp(13px, 1.12vw, 16px);
    overflow: visible;
    white-space: nowrap;
  }

  html[data-theme="leather"] body.public-mode.browser-public-mode.public-web-shell
    .public-web-residential-hero .residential-hero-shield {
    flex: 0 0 18px;
    width: 18px;
    min-width: 18px;
    max-width: 18px;
    height: 18px;
  }

  /* Telegram Desktop keeps a narrower app column than public web. */
  html[data-theme="leather"] body.public-mode.telegram-hero-shell
    .telegram-home-hero .residential-hero-title {
    font-size: clamp(44px, 4vw, 56px);
  }

  html[data-theme="leather"][lang="ru"] body.public-mode.telegram-hero-shell
    .telegram-home-hero .residential-hero-title {
    font-size: clamp(38px, 3.4vw, 48px);
  }

  html[data-theme="leather"] body.public-mode.telegram-hero-shell
    .telegram-home-hero .telegram-home-hero-language {
    width: 104px;
    min-width: 104px;
    max-width: 104px;
    left: 2px;
  }
}
