/* Figma 608:6833: 760px content, three 236px columns and 26px gaps.
 * Cards and labels remain in flow; sticker motion still belongs to team-stickers.js. */
@media (min-width:431px) and (max-width:860px) ,  (width > 430px) and (max-width:860px) {
  body.tablet-flow .team-page,
  body.tablet-flow .team-section { width:100%; min-width:0; }
  body.tablet-flow .team-section__inner { width:calc(100% - 2 * var(--tablet-gutter)); max-width:760px; min-width:0; }
  body.tablet-flow .team-header { width:100%; height:auto; }
  body.tablet-flow .team-header__left { width:100%; min-width:0; }
  body.tablet-flow .team-header__right { width:100%; min-width:0; align-items:center; }
  body.tablet-flow .team-title { font-size:50px; white-space:normal; }
  body.tablet-flow .team-subtitle { width:auto; flex:1; min-width:0; height:auto; }
  body.tablet-flow .team-subtitle strong { font-weight:500; }
  body.tablet-flow .team-grid { grid-template-columns:repeat(3,minmax(0,1fr)); column-gap:26px; }
  body.tablet-flow .team-card { width:100%; min-width:0; height:auto; align-self:start; container-type:inline-size; }
  body.tablet-flow .team-card__photo { width:100%; height:auto; aspect-ratio:236/289; }
  body.tablet-flow .team-card__info { width:100%; min-width:0; }
  body.tablet-flow .team-card__name { font-size:20px; white-space:normal; overflow-wrap:break-word; }
  body.tablet-flow .team-card__role { white-space:normal; overflow-wrap:break-word; }
  body.tablet-flow .team-card__badge { max-width:calc(100% - 28px); white-space:normal; text-align:center; }
  body.tablet-flow .team-card__sticker--chef-hat { left:calc(100% - 90px); }
  /* The wide composition crosses the next column; follow its actual fluid width. */
  body.tablet-flow .team-card__sticker--piping-bag { left:calc(200% - 38px); }
  body.tablet-flow .team-card__sticker--macaron { left:calc(100% - 50px); top:calc(14px + 80.51cqw); }
  body.tablet-flow .team-card__badge--special { left:calc(100% - 102px); }
}
@media (min-width: 431px) and (max-width: 860px),  (width > 430px) and (max-width: 860px){
  body.tablet-flow .team-card__sticker--macaron,
  body.tablet-flow .team-card__sticker--flour-bag { display:none; }
  body.tablet-flow .team-card__sticker--tablet { display:block; }
  /* Стикер-макарон на планшете 740–860 позиционировался «по нижнему краю
     photo», но при column-gap:26px он свисал в имя карточки соседа. Держим
     его в пределах фото (44cqw ≈ верх нижней трети). */
  body.tablet-flow .team-card__sticker--tablet.team-card__sticker--macaron {
    top: 44cqw;
    width: 92px; height: 91.5px;
  }
  body.tablet-flow .team-card__sticker--tablet.team-card__sticker--flour-bag {
    top: 40cqw;
    width: 110px; height: 110px;
  }
  /* Бейдж «всегда рядом!» на планшете висел сверху карточки и накладывался
     на бейдж стажа соседней. Держим в габаритах карточки. */
  body.tablet-flow .team-card__badge--special {
    top: -56px; width: 128px; height: 118.6px;
  }
}
/* Снят подбрейкпоинт «@media (min-width:431px) and (max-width:700px)»: полоса 431–860 показывает один макет 860, разницу делает zoom. */

@media (min-width: 431px) and (max-width: 860px) , (width > 430px) and (max-width: 860px){
  body.fluid-flow .team-section { padding-top: clamp(100px, calc(140px - 4.651vw), 120px); }
  body.fluid-flow .team-section__inner { width: calc(100% - 2 * clamp(24px, calc(6.06vw - 2px), 50px)); max-width: 760px; }
  body.fluid-flow .team-header { width: 100%; height: auto; margin-bottom: clamp(32px, calc(16px + 3.72vw), 48px); }
  body.fluid-flow .team-header__left,
  body.fluid-flow .team-header__right { width: 100%; min-width: 0; }
  body.fluid-flow .team-header__right { align-items: flex-start; gap: 16px; }
  body.fluid-flow .team-title { font-size: clamp(37px, calc(22px + 3.256vw), 50px); line-height: 1.16; white-space: normal; }
  body.fluid-flow .team-subtitle { width: auto; height: auto; flex: 1 1 auto; min-width: 0; }
  body.fluid-flow .team-grid { grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr)); column-gap: clamp(22px, calc(18px + .93vw), 26px); row-gap: 32px; }
  body.fluid-flow .team-card { width: 100%; min-width: 0; height: auto; container-type: inline-size; }
  body.fluid-flow .team-card__photo,
  body.fluid-flow .team-card__info { width: 100%; min-width: 0; }
  body.fluid-flow .team-card__photo { height: auto; aspect-ratio: 179 / 235; }
  body.fluid-flow .team-card__name { font-size: clamp(15px, calc(10px + 1.163vw), 20px); }
  body.fluid-flow .team-card__role { font-size: clamp(12px, calc(11px + .1163vw), 13px); }
}

/* Reflow the desktop header and let the live four-person grid choose three
   columns at the narrow end and the authored four at the 1200px endpoint. */
@media (min-width: 861px) and (max-width: 1199px) ,  (width > 860px) and (max-width: 1199px) ,  (min-width: 861px) and (width < 1200px) {
  body.fluid-flow .team-page,
  body.fluid-flow .team-section { width: 100%; min-width: 0; }
  body.fluid-flow .team-section { padding: clamp(100px, calc(17.65vw - 52px), 160px) 0 60px; }
  body.fluid-flow .team-section__inner { width: min(1040px, calc(100% - 100px)); max-width: none; }
  body.fluid-flow .team-header { width: 100%; height: auto; flex-wrap: wrap; gap: clamp(32px, 7.25vw - 30px, 57px); margin-bottom: clamp(48px, calc(-23.1px + 8.26vw), 76px); }
  body.fluid-flow .team-header__left { width: auto; min-width: 0; flex: 0 1 385px; }
  body.fluid-flow .team-header__right { width: auto; min-width: 0; flex: 1 1 320px; gap: clamp(20px, 4.42vw - 18px, 53px); margin-top: 0; }
  body.fluid-flow .team-title { font-size: 50px; white-space: normal; }
  body.fluid-flow .team-subtitle { width: auto; height: auto; flex: 1 1 auto; min-width: 0; }
  body.fluid-flow .team-grid { grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); column-gap: clamp(26px, calc(10.75px + 1.76vw), 32px); row-gap: 47px; }
  body.fluid-flow .team-card { width: 100%; min-width: 0; height: auto; align-self: start; container-type: inline-size; }
  body.fluid-flow .team-card__photo { width: 100%; height: auto; aspect-ratio: 236 / 289; }
  body.fluid-flow .team-card__info { width: 100%; min-width: 0; }
  body.fluid-flow .team-card__name { font-size: 20px; white-space: normal; overflow-wrap: break-word; }
  body.fluid-flow .team-card__role { white-space: normal; overflow-wrap: break-word; }
  body.fluid-flow .team-card__badge { max-width: calc(100% - 28px); white-space: normal; text-align: center; }
  body.fluid-flow .team-card__sticker--chef-hat { left: calc(100% - 90px); }
  body.fluid-flow .team-card__sticker--piping-bag { left: calc(200% - 38px); }
  body.fluid-flow .team-card__sticker--macaron { left: calc(100% - 50px); top: calc(14px + 80.51cqw); }
  body.fluid-flow .team-card__sticker--tablet { display: block; }
  body.fluid-flow .team-card__badge--special { left: calc(100% - 102px); }
}

