/* Separately rendered product objects; neutral depth matches the supplied composition.
   Chat bubbles retain LiveMessageSurface's 25px radius, inset avatar and top-left tail. */
.home-following {
  max-width: 1780px;
  margin: 160px auto 100px;
  /* Balance the artist's left overhang and the compact community cluster. */
  padding: 40px 0 40px 210px;
  display: grid;
  grid-template-columns: 1.22fr 1fr .94fr;
  align-items: start;
  gap: 40px;
  color: #111318;
  font-family: Collab UI, sans-serif;
  scroll-margin-top: 110px;
  /* Match block two's layered depth, keeping every shadow neutral gray. */
  --following-shadow: 0 16px 48px 5px #29292926, 0 32px 46px -20px #29292933, 0 3px 5px #29292914;
}

.home-following__heading { padding-left: 80px; }
.home-following__heading h2 {
  font: 800 clamp(42px, 4.4vw, 74px)/1.02 Raleway, sans-serif;
  letter-spacing: -.05em;
  text-transform: none;
  margin: 0 0 18px;
}
.home-following__heading em { color: #0565ff; font-style: normal; }
.home-following__heading p { font: 400 clamp(16px, 1.32vw, 22px)/1.5 Raleway, sans-serif; color: #707680; margin-bottom: 23px; }
.home-following__publish { display: inline-flex; align-items: center; gap: 30px; padding: 14px 26px; border-radius: 12px; background: #0565ff; color: white; font: 700 22px Raleway, sans-serif; box-shadow: 0 7px 16px #19191918; }
.home-following__publish:hover { background: #004ee0; color: white; }
.home-following__publish img { filter: brightness(0) invert(1); }
.home-following a:focus-visible { outline: 3px solid #0565ff; outline-offset: 5px; }

.following-studio { position: relative; margin-top: 52px; padding-left: 100px; padding-bottom: 28px; }
.following-canvas { background: #fff; box-shadow: var(--following-shadow); transform: rotate(-3deg); }
.following-canvas__header { display: flex; align-items: center; gap: 10px; padding: 13px 14px; font-size: 14px; }
.following-canvas__header > img { width: 23px; height: 23px; }
.following-canvas__header > span { font-size: 9px; color: #858890; margin-left: auto; }
.following-options { width: 21px; height: 21px; margin-left: auto; opacity: .65; object-fit: contain; }
.following-canvas__workspace { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 10px; padding: 10px; background: #f3f3f3; align-items: stretch; }
.following-canvas__tools { display: grid; grid-template-columns: 1fr; gap: 2px; }
.following-canvas__tools span { display: grid; place-items: center; height: 27px; }
.following-canvas__tools .is-active { background: #e4eaf0; }
.following-canvas__tools img { width: 24px; height: 24px; object-fit: contain; }
.following-canvas__painting { width: 100%; height: 288px; object-fit: cover; }
.following-artist { position: absolute; bottom: -36px; left: -110px; width: 270px; height: auto; filter: drop-shadow(0 15px 10px #29292926); }
.following-publish-arrow { position: absolute; right: -28px; top: -85px; width: 100px; height: 95px; color: #0565ff; }

.following-post { margin-top: 8px; transform: rotate(-.7deg); }
.following-post__surface { background: #fff; box-shadow: var(--following-shadow); }
.following-post__tabs { display: flex; align-items: center; gap: 30px; padding: 19px 25px 0; color: #777d87; border-bottom: 1px solid #ededed; font-size: 16px; font-weight: 600; }
.following-post__tabs > span { padding-bottom: 16px; }
.following-post__tabs .is-active { color: #0565ff; border-bottom: 3px solid #0565ff; }
.following-post__tabs .following-options { align-self: flex-start; margin-top: 4px; }
.following-post__body { padding: 22px; }
.following-post__author { display: flex; align-items: center; gap: 11px; margin-bottom: 20px; }
.following-post__author .collab-avatar { width: 46px; height: 46px; }
.following-post__author b { font-size: 16px; }
.following-post__author small { display: block; font-size: 11px; color: #7c8087; margin-top: 4px; }
.following-post__painting { display: block; width: 100%; height: 360px; object-fit: cover; }
.following-post h3 { font: 700 20px/1.3 Collab UI, sans-serif; letter-spacing: -.6px; margin: 18px 0 5px; }
.following-post p { font-size: 14px; line-height: 1.6; color: #747a84; margin: 0 0 20px; }
.following-post__footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.following-post__share { display: flex; align-items: center; gap: 7px; color: #777d87; font-size: 12px; }
.following-post__share .material-icons { font-size: 20px; }
.following-post__results { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 9px; margin-top: 14px; }
.following-post__reactions, .following-post__capsule { display: flex; align-items: center; background: white; border-radius: 28px; min-height: 48px; box-shadow: var(--following-shadow); font-size: 12px; }
.following-post__reactions { padding: 0 4px; }
.following-post__reactions > span { display: flex; align-items: center; gap: 6px; padding: 8px 10px; }
.following-emoji { font-family: 'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji', sans-serif; font-style: normal; font-weight: 400; font-size: 27px; line-height: 1; }
.following-post__capsule { gap: 8px; padding: 8px 14px; }
.following-post__capsule img { width: 25px; height: 25px; object-fit: contain; }
.following-post__award img { width: 33px; height: 33px; }
.following-post__join { display: flex; align-items: center; justify-content: center; gap: 8px; flex-shrink: 0; border-radius: 10px; padding: 12px; background: #151923; color: white; font-size: 12px; font-weight: 600; text-decoration: none; }
.following-post__join:hover { color: white; background: #303744; }
.following-post__join img { width: 20px; height: 20px; filter: brightness(0) invert(1); }

.following-community { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); grid-auto-rows: 100px; align-items: center; justify-items: start; gap: 24px; padding: 16px 0 35px; }
.following-bubble { position: relative; display: flex; align-items: center; gap: 10px; width: max-content; max-width: 88%; background: white; border-radius: 25px; padding: 10px 16px 10px 10px; box-shadow: var(--following-shadow); min-height: 72px; }
.following-bubble::before { content: ""; position: absolute; width: 16px; height: 16px; top: 0; left: 0; background: white; mask: url('../img/following/message-bubble-arrow.svg') center / contain no-repeat; }
.following-bubble .collab-avatar { width: 40px; height: 40px; }
.following-bubble > div { min-width: 0; }
.following-bubble b { display: block; font-size: 20px; line-height: 1.4; }
.following-bubble small { color: #a1a4aa; font-size: 10px; font-weight: 400; margin-left: 7px; }
.following-bubble p { margin: 2px 0 0; color: #747a84; font-size: 16px; line-height: 1.45; }
.following-bubble__icon { margin-left: auto; width: 28px; height: 28px; object-fit: contain; }
.following-bubble__award { width: 36px; height: 36px; }
.following-bubble__emoji { margin-left: 8px; font-size: 30px; }
.following-bubble--follower { transform: rotate(-4deg); margin-left: 4px; }
.following-bubble--join { transform: rotate(-6deg); max-width: calc(100% - 72px); }
.following-bubble--award { transform: rotate(4deg); margin-left: 55px; }
.following-bubble--love { transform: rotate(-4deg); margin-left: 12px; }
.following-bubble--question { transform: rotate(5deg); max-width: calc(100% - 72px); }
.following-reaction { position: absolute; display: grid; place-items: center; width: 42px; height: 42px; font-size: 34px; pointer-events: none; }
/* Each emoji travels with its bubble, preserving the small gap as text wraps. */
.following-reaction--one { left: calc(100% + 12px); top: 50%; transform: translateY(-50%) rotate(12deg); }
.following-reaction--two { right: calc(100% + 12px); top: 50%; transform: translateY(-50%) rotate(-12deg); }
.following-reaction--three { left: calc(100% + 12px); top: 50%; transform: translateY(-50%) rotate(10deg); }

/* Five occupied rows stay in place while messages move through them. */
.following-bubble.is-leaving { pointer-events: none; }
.home-following[data-following-motion] .following-reaction {
  animation: following-emoji-drift 3.4s ease-in-out infinite;
  animation-play-state: paused;
}
.home-following[data-following-motion] .following-reaction--two { animation-delay: -1.2s; animation-duration: 3.8s; }
.home-following[data-following-motion] .following-reaction--three { animation-delay: -2.4s; animation-duration: 4.2s; }
.home-following[data-following-playing] .following-reaction { animation-play-state: running; }
.following-count { position: relative; display: inline-block; min-width: 2ch; height: 1.4em; line-height: 1.4; overflow: hidden; font-variant-numeric: tabular-nums; }
.following-count__outgoing, .following-count__incoming { position: absolute; inset: 0; }
.following-reaction-float {
  position: absolute;
  left: var(--float-side);
  top: 0;
  z-index: 1;
  font-size: 32px;
  pointer-events: none;
  animation: following-reaction-rise 2.1s cubic-bezier(.22, .61, .36, 1) both;
  animation-play-state: paused;
}
.home-following[data-following-playing] .following-reaction-float { animation-play-state: running; }
@keyframes following-emoji-drift {
  0%, 100% { opacity: .25; translate: 0 5px; scale: .75; }
  35%, 65% { opacity: 1; translate: 3px -9px; scale: 1.08; }
}
@keyframes following-reaction-rise {
  0% { opacity: 0; translate: 0 18px; scale: .45; }
  20% { opacity: 1; scale: 1.18; }
  45% { opacity: 1; scale: 1; }
  100% { opacity: 0; translate: var(--float-x) -95px; scale: .7; }
}
@media (prefers-reduced-motion: reduce) {
  .home-following .following-reaction, .home-following .following-reaction-float { animation: none; }
}

@media (max-width: 1400px) and (min-width: 1201px) {
  .home-following { padding-left: 75px; padding-right: 5px; gap: 25px; }
  .home-following__heading { padding-left: 35px; }
  .following-post__body { padding: 16px; }
  .following-post__painting { height: 315px; }
  .following-post__join { gap: 5px; padding: 10px 8px; font-size: 11px; }
  .following-bubble { padding-right: 12px; gap: 8px; }
  .following-bubble b { font-size: 18px; }
  .following-bubble p { font-size: 15px; }
  .following-bubble small { display: none; }
  .following-bubble .collab-avatar { width: 38px; height: 38px; }
  .following-artist { width: 220px; left: -72px; bottom: -40px; }
  .following-studio { padding-left: 90px; }
}

@media (max-width: 1200px) {
  .home-following { margin-top: 100px; padding: 30px 40px; grid-template-columns: 1fr 1fr; gap: 45px; }
  .home-following__heading { padding-left: 0; }
  .home-following__heading h2 { font-size: clamp(42px, 6vw, 65px); }
  .home-following__heading p { font-size: 18px; }
  .following-studio { padding-left: 80px; }
  .following-artist { width: 210px; left: -70px; bottom: -40px; }
  .following-community { grid-column: 1 / -1; width: 100%; max-width: 520px; justify-self: center; padding-top: 0; }
  .following-bubble { max-width: calc(100% - 50px); }
  .following-post__painting { height: 320px; }
  .following-post__body { padding: 18px; }
  .following-post__footer { flex-wrap: wrap; }
}

@media (max-width: 760px) {
  .home-following { margin: 70px auto 40px; padding: 20px 25px; grid-template-columns: minmax(0, 1fr); gap: 42px; max-width: 540px; }
  .home-following__heading h2 { font-size: clamp(40px, 10.5vw, 65px); }
  .home-following__heading p { font-size: 17px; }
  .following-studio { margin-top: 45px; padding-left: 0; padding-bottom: 100px; }
  .following-publish-arrow { display: none; }
  .following-artist { width: 185px; left: -10px; bottom: -20px; }
  .following-post { margin: 0 6px; }
  .following-post__painting { height: auto; aspect-ratio: 1; }
  .following-post h3 { font-size: 18px; }
  .following-community { grid-auto-rows: 110px; gap: 16px; padding: 6px 8px 20px; }
  .following-bubble--follower, .following-bubble--love { margin-left: 10px; }
  .following-bubble--award { margin-left: 22px; }
  .following-bubble--join { margin-right: 18px; }
  .following-bubble--question { width: auto; margin-right: 8px; }
}
