/* GENBROKER V2.13.2 — mobile-only Telegram/CRM composition.
   Source: V2.13.1. No other page, carousel, form, or desktop rules are touched. */
@media (max-width: 620px) {
  /* Anchor the hand silhouettes to the section boundary. On mobile the mockup
     was leaving an empty strip below the wrists. The section clips the last
     portion of the sleeves, so the illustration finishes exactly at the edge. */
  body[data-page="home"] .tg-tablet-grid {
    margin-bottom: -34px;
  }
  body[data-page="home"] .tg-tablet-visual {
    padding-bottom: 0;
  }
  body[data-page="home"] .tg-tablet-shell {
    width: 114%;
    margin-left: -7%;
    margin-right: -7%;
    transform: translateY(0);
  }

  /* A 2-column desktop chat list cannot fit in the tablet's 200-270px mobile
     glass aperture. Display its active conversation as a mobile messenger. */
  body[data-page="home"] .tg-tablet-screen {
    border-radius: 9px;
  }
  body[data-page="home"] .tg-screen-ui {
    display: block;
    width: 100%;
    height: 100%;
    min-width: 0;
  }
  body[data-page="home"] .tg-screen-sidebar {
    display: none;
  }
  body[data-page="home"] .tg-screen-chat {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;
    background: #e5f1e2;
  }
  body[data-page="home"] .tg-screen-topbar {
    flex: 0 0 auto;
    min-width: 0;
    padding: 6px 10px;
  }
  body[data-page="home"] .tg-screen-topbar strong {
    font-size: 11px;
    line-height: 1.15;
    overflow-wrap: anywhere;
  }
  body[data-page="home"] .tg-screen-topbar span {
    font-size: 8px;
  }
  body[data-page="home"] .tg-screen-icons {
    gap: 5px;
  }
  body[data-page="home"] .tg-screen-icons i {
    width: 7px;
    height: 7px;
  }
  body[data-page="home"] .tg-screen-scroll {
    flex: 1 1 auto;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
    padding: 8px 10px 7px;
  }

  /* Only the currently animated stage is shown on a narrow screen. Hiding
     inactive stages prevents faint copies of old messages from overlapping. */
  body[data-page="home"] .tg-stage {
    display: none;
    margin: 0;
    opacity: 1;
    transform: none;
    transition: none;
  }
  body[data-page="home"] .tg-stage.is-current {
    display: grid;
    gap: 5px;
    animation: gb-tg-mobile-appear .28s ease both;
  }
  body[data-page="home"] .tg-screen-message {
    min-width: 0;
    max-width: 100%;
    gap: 2px;
  }
  body[data-page="home"] .tg-screen-name {
    font-size: 9px;
    line-height: 1.12;
    padding-left: 5px;
    overflow-wrap: anywhere;
  }
  body[data-page="home"] .tg-screen-bubble {
    box-sizing: border-box;
    min-width: 0;
    max-width: 98%;
    padding: 6px 8px;
    border-radius: 9px;
    overflow-wrap: anywhere;
  }
  body[data-page="home"] .tg-screen-bubble strong {
    font-size: 10px;
    line-height: 1.18;
  }
  body[data-page="home"] .tg-screen-bubble p {
    font-size: 10px;
    line-height: 1.22;
  }
  body[data-page="home"] .tg-screen-bubble time {
    font-size: 7px;
    line-height: 1;
  }
  body[data-page="home"] .tg-screen-file {
    gap: 5px;
    padding: 2px 0;
  }
  body[data-page="home"] .tg-screen-file i {
    width: 20px;
    height: 20px;
    font-size: 6.5px;
  }
  body[data-page="home"] .tg-screen-file span {
    font-size: 9px;
  }
  body[data-page="home"] .tg-screen-file small {
    font-size: 7px;
  }
  /* Last stage has three messages on desktop. On mobile, keep the critical
     release and delivery updates rather than clipping the final message. */
  body[data-page="home"] .tg-stage[data-tg-stage="3"] .tg-screen-message:nth-child(2) {
    display: none;
  }
  body[data-page="home"] .tg-tablet-status-copy strong {
    overflow-wrap: break-word;
    hyphens: auto;
  }
}

@media (max-width: 360px) {
  body[data-page="home"] .tg-screen-topbar {
    padding: 5px 8px;
  }
  body[data-page="home"] .tg-screen-scroll {
    padding: 6px 8px;
  }
  body[data-page="home"] .tg-screen-bubble p,
  body[data-page="home"] .tg-screen-bubble strong {
    font-size: 9px;
  }
  body[data-page="home"] .tg-screen-bubble {
    padding: 5px 7px;
  }
}

@keyframes gb-tg-mobile-appear {
  from { opacity: .45; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  body[data-page="home"] .tg-stage.is-current { animation: none; }
}
