@media (max-width: 430px) {
  body.phone-flow .sets-page .set-card__visual > :not(.catalog-product-flow) { display: none; }
  body.phone-flow .sets-page .set-card__visual > .catalog-product-flow[hidden] { display: block !important; position: absolute; left: calc(var(--catalog-photo-x) * 100% / 379); right: auto; top: calc(var(--catalog-photo-y) * 1px); width: calc(var(--catalog-photo-w) * 100% / 379) !important; height: auto !important; object-fit: contain; filter: none; transform: none; }
  body.phone-flow .sets-page .set-card:nth-child(1) { --catalog-photo-x: 202; --catalog-photo-y: 164.76953125; --catalog-photo-w: 203; }
  body.phone-flow .sets-page .set-card:nth-child(2) { --catalog-photo-x: 200.9609375; --catalog-photo-y: 158.306640625; --catalog-photo-w: 204.0390625; }
  body.phone-flow .sets-page .set-card:nth-child(3) { --catalog-photo-x: 186.921875; --catalog-photo-y: 151.724609375; --catalog-photo-w: 218.078125; }
  body.phone-flow .sets-page .set-card:nth-child(4) { --catalog-photo-x: 192; --catalog-photo-y: 161.99609375; --catalog-photo-w: 213; }
  body.phone-flow .sets-page .set-card:nth-child(5) { --catalog-photo-x: 205; --catalog-photo-y: 203.001953125; --catalog-photo-w: 188.2421875; }
  body.phone-flow .sets-page .set-card:nth-child(6) { --catalog-photo-x: 197.5; --catalog-photo-y: 131.11328125; --catalog-photo-w: 206.6875; }
  body.phone-flow .sets-page .set-card:nth-child(7) { --catalog-photo-x: 204.46875; --catalog-photo-y: 134.1875; --catalog-photo-w: 185.9296875; }
  body.phone-flow .sets-page .set-card:nth-child(8) { --catalog-photo-x: 215; --catalog-photo-y: 116.998046875; --catalog-photo-w: 189.5546875; }
  body.phone-flow .sets-page .set-card:nth-child(9) { --catalog-photo-x: 228; --catalog-photo-y: 119.998046875; --catalog-photo-w: 176.8046875; }
  body.phone-flow .sets-page .set-card:nth-child(10) { --catalog-photo-x: 217.96875; --catalog-photo-y: 110.833984375; --catalog-photo-w: 187.03125; }
  body.phone-flow .sets-page .set-card:nth-child(11) { --catalog-photo-x: 205; --catalog-photo-y: 149.0008903902417; --catalog-photo-w: 184.0703125; }
  body.phone-flow .sets-page .set-card:nth-child(12) { --catalog-photo-x: 203.3515625; --catalog-photo-y: 140; --catalog-photo-w: 185.41413871913392; }
  body.phone-flow .sets-page .set-card:nth-child(13) { --catalog-photo-x: 206.421875; --catalog-photo-y: 138.000539725188; --catalog-photo-w: 183.3125; }
}
/* Catalog 796:53417. Product text and actions determine each card's height;
 * paper and product photography are the only independent decorative layers. */
@media (max-width: 430px) {
  body.phone-flow .sets-page { width: 100%; height: auto; min-width: 0; min-height: 0; overflow: clip; background: #fff6eb; }
  body.phone-flow .sets-page .sets-header-outer { height: auto; min-height: 0; padding: 120px var(--phone-gutter,25px) 32px; }
  body.phone-flow .sets-page .sets-page__header .container { width: 100%; max-width: none; padding: 0; }
  body.phone-flow .sets-page .sets-header-row { display: block; width: 100%; }
  body.phone-flow .sets-page .sets-header { width: 100%; }
  body.phone-flow .sets-page .section-title { margin: 0; padding-right: 28px; font-size: 37px; line-height: 43px; letter-spacing: .06em; }
  body.phone-flow .sets-page .sets-subtitle { width: 100%; max-width: 350px; margin-top: 10px; font-size: 16px; line-height: 19px; }
  body.phone-flow .sets-page .sets-subtitle br { display: none; }
  body.phone-flow .sets-page .sets-subtitle .subtitle-star { left: auto; right: 38px; top: 10px; width: 23px; height: 23px; }
  body.phone-flow .sets-page .sets-decorative-badge { display: none; }
  body.phone-flow .sets-page .sets { width: 100%; height: auto; padding: 0 0 40px; background: #fff6eb !important; }
  body.phone-flow .sets-page .sets > .container { width: 100%; padding: 0 var(--phone-gutter,25px); }
  body.phone-flow .sets-page .sets-list { display: flex; flex-direction: column; width: 100%; gap: 22px; margin: 0; }
  body.phone-flow .sets-page .set-card:nth-child(n) { width: 100%; max-width: 379px; height: auto; min-height: 0; flex: none; padding: 46px 32px 0; display: grid; grid-template-columns: minmax(0,1fr); border-radius: 0; background: transparent; container-type: inline-size; }
  body.phone-flow .sets-page .set-card::before { display: none; }
  /* Transparent paper includes the full shadow, but not the live link. */
  body.phone-flow .sets-page .set-card__texture { display: block; inset: -6px auto auto -6px; width: calc(100% + 20px); height: calc(100% - 9px); background: url('../../../img/sets/mobile/set-paper-1@3x-optimized.webp') center / 100% 100% no-repeat; opacity: 1; mix-blend-mode: normal; mask: none; -webkit-mask: none; border-radius: 0; clip-path: none; pointer-events: none; }
  body.phone-flow .sets-page .theme-red-dark .set-card__texture { background-image: url('../../../img/sets/mobile/set-paper-2@3x-optimized.webp'); }
  body.phone-flow .sets-page .theme-caramel .set-card__texture { background-image: url('../../../img/sets/mobile/set-paper-3@3x-optimized.webp'); }
  body.phone-flow .sets-page .set-card:nth-child(4) .set-card__texture { background-image: url('../../../img/sets/mobile/set-paper-4@3x-optimized.webp'); }
  body.phone-flow .sets-page .set-card:nth-child(n+6).theme-cream .set-card__texture { background-image: url('../../../img/sets/mobile/set-paper-5@3x-optimized.webp'); }
  /* [255] — растровые @3x стикеры были низкого качества и с бейкед-обводкой;
     заменены на векторные SVG-экспорты из Figma (без обводки), размеры/позиции сохранены. */
  body.phone-flow .sets-page .set-card.theme-cream .set-card__sostav { content: url('../../../img/catalog/pass2-assets/phone-sticker-red-fw10.svg'); width: 137px; height: auto; top: 79px; left: 14.5px; }
  /* Phone Figma nodes 796:55717 and 208:5633 share the same cream artwork
     and rotation. Use the home SVG rather than the separately pre-tilted
     catalog export so both routes render the same total angle. */
  body.phone-flow .sets-page .set-card.theme-red-dark .set-card__sostav,
  body.phone-flow .sets-page .set-card.theme-caramel .set-card__sostav { content: url('../../../img/sets-sticker-home-cream-fw10.svg'); width: 137px; height: auto; top: 84px; left: 11.6px; transform: rotate(-10.43deg); transform-origin: left center; }
  body.phone-flow .sets-page .set-card__texture::before { display: none; }
  body.phone-flow .sets-page .set-card__content { position: relative; inset: auto; width: 100%; height: auto; padding: 0; display: block; }
  body.phone-flow .sets-page .set-card__text { display: grid; grid-template-columns: minmax(0,1fr); gap: 41px; }
  /* [258] Заголовок начинается по левому краю состава, но сам текст
     выравнивается вправо внутри своего intrinsic-width box. */
  body.phone-flow .sets-page .set-card__title { width: fit-content; max-width: 100%; justify-self: start; height: auto; margin: 0; font-size: 30px; line-height: 35px; letter-spacing: .06em; white-space: normal; text-align: right; }
  body.phone-flow .sets-page .set-card--berry-fruit .set-card__title { width: 292px; }
  body.phone-flow .sets-page .theme-cream .catalog-title-separator { display: none; }
  body.phone-flow .sets-page .theme-cream .catalog-title-count { display: block; }
  body.phone-flow .sets-page .theme-cream .catalog-title-name { white-space: nowrap; }
  body.phone-flow .sets-page .set-card:nth-child(2) .set-card__text { gap: 72px; }
  body.phone-flow .sets-page .set-card:nth-child(3) .set-card__text,
  body.phone-flow .sets-page .set-card:nth-child(5) .set-card__text { gap: 77px; }
  /* [92].1 переносы: text-wrap:pretty снимает висячие слова в описаниях. */
  body.phone-flow .sets-page .set-card__desc { display: block; width: 55.56%; max-width: 175px; height: auto; min-height: 192px; margin: 0; font-size: 14px; line-height: 16px; -webkit-line-clamp: unset; overflow: visible; text-wrap: pretty; }
  body.phone-flow .sets-page .set-card:nth-child(2) .set-card__desc { min-height: 224px; }
  body.phone-flow .sets-page .set-card:nth-child(3) .set-card__desc { width: 47.3%; min-height: 176px; }
  body.phone-flow .sets-page .set-card:nth-child(4) .set-card__desc { min-height: 176px; }
  body.phone-flow .sets-page .set-card:nth-child(5) .set-card__desc { width: 52.38%; min-height: 176px; }
  body.phone-flow .sets-page .set-card:nth-child(n+6) .set-card__text { gap: 30px; }
  body.phone-flow .sets-page .set-card:nth-child(n+6) .set-card__desc { width: 55.56%; min-height: 119px; margin: 0; }
  body.phone-flow .sets-page .set-card:nth-child(n+6).theme-cream .set-card__text { gap: 41px; }
  body.phone-flow .sets-page .set-card:nth-child(n+6).theme-cream .set-card__desc { min-height: 108px; }
  body.phone-flow .sets-page .set-card:nth-child(n+6).theme-caramel .set-card__text { gap: 77px; }
  body.phone-flow .sets-page .set-card__action-row { position: relative; inset: auto; width: calc(100% - 16px); margin: 29px 8px 0; display: flex; flex-direction: column; gap: 54px; align-items: center; }
  body.phone-flow .sets-page .set-card:nth-child(2) .set-card__action-row { margin-top: 29px; }
  body.phone-flow .sets-page .set-card:nth-child(3) .set-card__action-row,
  body.phone-flow .sets-page .set-card:nth-child(5) .set-card__action-row { margin-top: 44px; }
  body.phone-flow .sets-page .set-card:nth-child(4) .set-card__action-row { margin-top: 45px; }
  body.phone-flow .sets-page .set-card:nth-child(n+6) .set-card__action-row { margin-top: 29px; }
  body.phone-flow .sets-page .set-card:nth-child(n+6).theme-caramel .set-card__action-row { margin-top: 38px; gap: 33px; }
  body.phone-flow .sets-page .set-card__action-row .btn { width: 100%; height: auto; min-height: 46px; padding: 12px 8px; font-size: 12px; line-height: 15px; letter-spacing: .03em; white-space: normal; }
  body.phone-flow .sets-page .btn-text-link { width: 100%; height: auto; min-height: 15px; margin: 0; font-size: 12px; line-height: 15px; text-align: center; color: #401c0c; }
  body.phone-flow .sets-page .set-card__visual { inset: 0; width: 100%; height: 100%; overflow: visible; }
  body.phone-flow .sets-page .set-card__group-bg { display: none; }
  body.phone-flow .sets-page .set-card:nth-child(n) .set-card__product-img { left: auto; right: -9px; top: 185px; width: 46.14% !important; height: auto !important; object-fit: contain; transform: rotate(-6.87deg); }
  body.phone-flow .sets-page .set-card:nth-child(n+6) .set-card__product-img { top: 154px; }
  body.phone-flow .sets-page .set-card__product-pair,
  body.phone-flow .sets-page .set-card__product-composite { left: auto; right: -18px; top: 154px; width: 50.48%; height: 154px; }
  body.phone-flow .sets-page .set-card__product-pair { overflow: hidden; }
  body.phone-flow .sets-page .set-card__product-pair span { width: 100%; height: 64px; }
  body.phone-flow .sets-page .set-card__product-pair span:last-child { top: 81px; }
  body.phone-flow .sets-page .set-card__product-pair img { left: -32.3%; width: 163%; height: auto; }
  body.phone-flow .sets-page .catalog-flow-signature[hidden] { display: flex !important; flex-direction: column; align-items: flex-end; margin-top: 18px; min-height: 61px; }
  body.phone-flow .sets-page .catalog-flow-signature .sets-dec-main { font-size: 43px; line-height: 43px; }
  body.phone-flow .sets-page .catalog-flow-signature .sets-dec-sub { font-size: 18px; line-height: 22px; margin-top: -4px; }
  body.phone-flow #catalog-sm-overlay .sm-panel { width: calc(100% - 24px); max-width: 600px; max-height: calc(100dvh - 24px); overflow: auto; }
  body.phone-flow #catalog-sm-overlay .sm-head { width: 100%; min-width: 0; }
  body.phone-flow #catalog-sm-overlay .sm-grid { width: 100%; grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 379px) {
  body.phone-flow .sets-page .set-card:nth-child(n) { padding-inline: 22px; }
  body.phone-flow .sets-page .sets-subtitle .subtitle-star { right: 0; }
  body.phone-flow .sets-page .set-card__desc,
  body.phone-flow .sets-page .set-card:nth-child(n+6) .set-card__desc { width: 56%; }
  body.phone-flow .sets-page .set-card__action-row { width: 100%; margin-inline: 0; }
}

/* Keep the sticker in the text sequence on phones so the title, sticker and
   description retain separate, readable rows at both 430px and narrow widths. */
@media (max-width: 430px) {
  body.phone-flow .sets-page .set-card:nth-child(n) {
    grid-template-rows: auto auto auto auto;
    row-gap: 8px;
  }
  body.phone-flow .sets-page .set-card__content,
  body.phone-flow .sets-page .set-card__text { display: contents; }
  body.phone-flow .sets-page .set-card__title { grid-column: 1; grid-row: 1; }
  body.phone-flow .sets-page .set-card__sostav {
    position: relative;
    inset: auto;
    grid-column: 1;
    grid-row: 2;
    justify-self: start;
    width: 137px;
    max-width: 100%;
    height: auto;
    top: auto;
    transform: none;
  }
  body.phone-flow .sets-page .set-card.theme-cream .set-card__sostav { top: auto; left: -17.5px; }
  body.phone-flow .sets-page .set-card.theme-red-dark .set-card__sostav,
  body.phone-flow .sets-page .set-card.theme-caramel .set-card__sostav { top: auto; left: -20.4px; }
  /* Figma 796:53417 places the first phone card sticker 38px higher. */
  body.phone-flow .sets-page .set-card:nth-child(1) .set-card__sostav { top: -38px; }
  body.phone-flow .sets-page .set-card__title { position: relative; z-index: 2; }
  body.phone-flow .sets-page .set-card__desc { position: relative; z-index: 2; grid-column: 1; grid-row: 3; }
  body.phone-flow .sets-page .set-card__action-row { position: relative; z-index: 2; grid-column: 1; grid-row: 4; margin-top: 21px; }
  body.phone-flow .sets-page .set-card:nth-child(2) .set-card__action-row { margin-top: 21px; }
  body.phone-flow .sets-page .set-card:nth-child(3) .set-card__action-row,
  body.phone-flow .sets-page .set-card:nth-child(5) .set-card__action-row { margin-top: 36px; }
  body.phone-flow .sets-page .set-card:nth-child(4) .set-card__action-row { margin-top: 37px; }
  body.phone-flow .sets-page .set-card:nth-child(n+6) .set-card__action-row { margin-top: 21px; }
  body.phone-flow .sets-page .set-card:nth-child(n+6).theme-caramel .set-card__action-row { margin-top: 30px; }
}

@media (max-width: 379px) {
  body.phone-flow .sets-page .set-card.theme-cream .set-card__sostav { left: -7.5px; }
  body.phone-flow .sets-page .set-card.theme-red-dark .set-card__sostav,
  body.phone-flow .sets-page .set-card.theme-caramel .set-card__sostav { left: -10.4px; }
}
