/* fx/mobile: phone-only corrections (360-412 wide, down to 320). Loaded last on purpose: every rule here lives in a
   max-width media query, so desktop and tablet layouts are untouched. Grouped by area, same order as the page. */

@media (max-width: 559px) {
  html, body { overflow-x: clip; }
}

/* ---------- nav: pill, logo, theme, menu and CTA all fit 320..440 ---------- */
@media (max-width: 440px) {
  .nav-wrap { padding: 0 10px; }
  .nav { height: 58px; padding: 0 6px 0 8px; gap: 4px; }
  .brand { gap: 7px; padding-right: 2px; min-width: 0; }
  .brand-dot { width: 36px; height: 36px; }
  .brand-name { font-size: 17px; }
  .theme-btn-sq, .menu-btn { width: 36px; height: 36px; min-width: 36px; }
  .cta-nav { height: 38px; padding: 0 12px; font-size: 13px; }
  .menu { top: 64px; }
}
@media (max-width: 350px) {
  .nav-wrap { padding: 0 8px; }
  .nav { padding: 0 5px 0 6px; gap: 3px; }
  .brand-name { font-size: 15px; letter-spacing: -.025em; }
  .brand { gap: 5px; }
  .cta-nav { padding: 0 10px; font-size: 12.5px; }
}

/* ---------- version switch: equal halves, full names always visible ---------- */
.lb-s { display: none; }
@media (max-width: 440px) {
  .mode-sw { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mode-sw [data-mode-set] { min-width: 0; overflow: hidden; padding: 0 8px; font-size: 13.5px; }
}
@media (max-width: 400px) {
  .mode-sw [data-mode-set] { padding: 0 6px; font-size: 13px; }
  .mode-sw .lb-f { display: none; }
  .mode-sw .lb-s { display: inline; }
}

/* ---------- contact button: small, and only near the footer on phones ---------- */
@media (max-width: 759px) {
  .fx-radial { width: 48px; height: 48px; right: 14px; bottom: calc(14px + env(safe-area-inset-bottom, 0px)); transition: opacity .25s ease, transform .25s ease, visibility 0s; }
  .fx-radial-btn { width: 48px; height: 48px; }
  .fx-radial.is-away { opacity: 0; visibility: hidden; pointer-events: none; transform: translateY(10px); transition: opacity .25s ease, transform .25s ease, visibility 0s .25s; }
}
@media (prefers-reduced-motion: reduce) { .fx-radial, .fx-radial.is-away { transition: none; } }

/* ---------- hero ---------- */
/* Portrait stage: a calm chat column (legible bubbles), the cat ring on top, the offer card and the bot notification
   below it. Timeline and bubble list live in app.js (phone branch, same breakpoint). */
@media (max-width: 860px) {
  #lista { gap: 30px !important; }
  .hero-stage-col { max-width: 440px; width: 100%; margin-left: auto !important; margin-right: auto !important; }
  .hero-stage { height: 384px !important; border-radius: 28px !important; }
  .hero-stage::before { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
    background: radial-gradient(70% 38% at 50% 12%, var(--focusbg), transparent 72%); }
  [data-hero="cascade"] { -webkit-mask-image: linear-gradient(180deg, transparent 0, transparent 20%, #000 36%, #000 80%, transparent 100%) !important; mask-image: linear-gradient(180deg, transparent 0, transparent 20%, #000 36%, #000 80%, transparent 100%) !important; }
  .hb-list { position: absolute; left: 12px; right: 12px; top: 0; will-change: transform; }
  .hb { box-sizing: border-box; width: fit-content; max-width: 82%; margin: 0 0 10px; padding: 10px 13px; border-radius: 16px 16px 16px 5px;
    background: var(--bubble); border: 1px solid var(--line); box-shadow: 0 1px 2px rgba(0, 0, 0, .06);
    font-size: 13px; line-height: 1.38; font-weight: 500; color: var(--ink2); }
  .hb-r { margin-left: auto; border-radius: 16px 16px 5px 16px; }
  [data-hero="notif"] { width: 92% !important; padding: 14px 16px !important; border-radius: 22px !important; gap: 13px !important;
    box-shadow: 0 18px 40px rgba(0, 0, 0, .22), 0 0 0 1px var(--focusbg) !important; }
  .hn-ic { width: 42px !important; height: 42px !important; border-radius: 12px !important; }
  .hn-ic img { width: 30px; height: 30px; }
  .hn-hd { font-size: 12.5px !important; }
  .hn-b { font-size: 14px !important; line-height: 1.38 !important; margin-top: 3px !important; }
  [data-hero="card"] { width: 92% !important; }
}
@media (max-width: 440px) {
  .hero-stage { height: 380px !important; }
  .hc-row { flex-wrap: wrap !important; gap: 6px 4px !important; }
  .hc-chip { height: 24px !important; padding: 0 7px !important; font-size: 10.5px !important; gap: 4px !important; }
  .hc-t { font-size: 14.5px !important; }
  .hc-pr { gap: 8px !important; }
  .hc-p { font-size: 24px !important; }
  .hc-spark { width: 76px !important; height: auto !important; }
}
@media (max-width: 350px) {
  .hero-stage { height: 410px !important; }
  .hc-p { font-size: 21px !important; }
  .hc-spark { width: 60px !important; }
  .hn-b { font-size: 13px !important; }
}

/* ---------- #diferente: stage right under its text, decorations inside the screen ---------- */
@media (max-width: 559px) {
  .sc-wrap { padding: 0 20px; }
  .sc-grid { gap: 14px; }
  .sc-text { gap: 10px; }
  .sc-h { font-size: clamp(28px, 8vw, 34px); }
  .sc-p { font-size: 15px; line-height: 1.5; }
  .sc-stage { height: clamp(300px, calc(100svh - 360px), 520px); }
  .sc-pop .sc-o[style*="left"] { left: 3% !important; }
  .sc-pop .sc-o[style*="right"] { right: 3% !important; }
  .sc-pop .sc-o[data-k="dr"], .sc-ui [data-k="dr"] { translate: none !important; }
}

/* ---------- final CTA card ---------- */
@media (max-width: 440px) {
  .cta-card { padding: 26px 22px !important; border-radius: 30px !important; gap: 26px !important; }
}
