/* qyntro-mobile-sweep-1.css (2026-11-11) - phone layout fixes for the public pages, found by the mobile sweep at 360 / 390 / 412 / 768.
   Every rule sits inside a max-width media query: a window 992 px or wider never matches any of them, so desktop is unchanged.
   No new colours, no wording changes. */

/* 1. /ai/ugc-video: the hero never stacked. Its phone rule was written as ".ugc-hero" while the base rule is "#gv-tool .ugc-hero",
      so the two-column grid stayed and the two sample players shrank to ~60 px boxes with cut labels. Same values as the page's own
      phone rule, with the base rule's specificity. */
@media (max-width: 900px) {
  #gv-tool .ugc-hero { grid-template-columns: 1fr; gap: 20px; padding: 22px; }
  #gv-tool .ugc-hero-copy p { max-width: none; }
}
/*    ... and on phones the two players stack (as on /ai/avatar, item 10): side by side they are ~137 px wide and the play button
      covers their captions ("Skincare", "Coffee roaster"). */
@media (max-width: 480px) {
  #gv-tool .ugc-players { grid-template-columns: 1fr; }
}

/* 2. Home, "Text into voice" cards: on one column the grid track grew to the card's widest content (a long voice name that does not
      wrap + its badge), so each card ran ~10-40 px past the right edge and the time (0:16) was cut off. The track may shrink now, and
      the name ends in "..." as it already does at 768 px. */
@media (max-width: 575.98px) {
  body #qp-voice .qp-voice-grid { grid-template-columns: minmax(0, 1fr); }
  #qp-voice .qp-voice-card { min-width: 0; }
  #qp-voice .qp-voice-top { min-width: 0; }
  #qp-voice .qp-voice-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
}

/* 3. Home footer, "Everything in one place." row: the container has no side padding on phones, so the Bootstrap row's -12 px margins
      put the "Start creating free" button flush against both screen edges (12 px of it outside the screen). */
@media (max-width: 767.98px) {
  #welcome-footer #footer > .row { margin-left: 0; margin-right: 0; }
  #welcome-footer #footer > .row > [class*="col-"] { padding-left: 16px; padding-right: 16px; }
}

/* 4. Home, "Turn your imagination into a masterpiece" video tiles: the model label (e.g. "MiniMax H3 Max Camera") is one line wider
      than a half-width tile, and it was cut mid-letter. It now stops with "..." inside the tile. */
@media (max-width: 575.98px) {
  body #qp-videos .qhw-lab { display: block; max-width: calc(100% - 20px); overflow: hidden; text-overflow: ellipsis; }
  body #qp-videos .qhw-lab .qhw-i { display: inline-flex; vertical-align: middle; margin-right: 6px; }
}

/* 5. The phone / tablet menu (every public page that has the site header): the open list's links start at x = 0, so "Video",
      "Video Studio", "Canvas" ... touch the left edge of the screen. They now line up with the logo (18 px in, the header's own
      padding). Only the menu while it is a drop-down list (below 992 px). */
@media (max-width: 991.98px) {
  #navbar-responsive #navbarNav .navbar-nav > li > .nav-link { padding-left: 18px; padding-right: 18px; }
}

/* 6. Home and /in, first visit: the cookie box sits 16 px above the bottom of the screen, on top of the 62 px bottom bar, so the bar's
      labels (Home, Training, Pricing ...) peeked out cut in half under it. On pages that have the bottom bar the box now sits above it. */
/*    The site already lifts the box on phones with !important (bottom: 1rem + --qp-onetap-h, the Google One Tap prompt's height); this
      keeps that and adds the bar (62 px + its "30% OFF" tag, 14 px above it), so !important is needed here too. Only where the bar is
      shown: the header code's qy-mobile-nav-1 block draws it at max-width 768px (above that it is in the page but display:none). */
@media (max-width: 768px) {
  body:has(#qhb-bar) #cc-main .cm--box.cm--bottom {
    top: auto !important;
    bottom: calc(86px + var(--qp-onetap-h, 0px)) !important;
    max-height: calc(100dvh - var(--qp-onetap-h, 0px) - 86px - 1rem) !important;
  }
}

/* 7. Compare pages with two models: on a two-column phone layout each result card is ~140 px wide, and the model tag
      ("SEEDANCE 2.0 FAST", "NANO BANANA PRO") was cut at the card edge. It goes under the title, as on the three-model pages. */
@media (max-width: 575.98px) {
  #qmd .qcp-shots .qmd-shot-top { flex-wrap: wrap; justify-content: flex-start; row-gap: 4px; }
}

/* 8. /contact (and every page that loads reCAPTCHA): Google's badge sits in the bottom-right corner, and at the end of the page it
      covered the last lines of the trademark notice, including its "Learn more" link. The notice gets room under it on phones. */
@media (max-width: 991.98px) {
  body:has(.grecaptcha-badge) #copyright #qy-tm-notice { padding-bottom: 80px; }
}

/* 9. /ai/agentic at 360 px: the chat demo card (Mode 2) is a fixed 230 px tall, and its last bubble was cut mid-sentence. On the
      narrowest phones it takes the height of its messages. */
@media (max-width: 389.98px) {
  .ah-visual.ah-v-chat { height: auto; min-height: 230px; }
}

/* 10. /ai/avatar: the two sample presenter videos sit side by side as 138 x 78 px tiles on phones; the 44 px play button covered the
       caption ("Male presenter"). On phones they stack, each the full card width. */
@media (max-width: 480px) {
  body .qav-hero .qav-players { grid-template-columns: 1fr; }
}

/* 14. Tablets 769-991 px (iPad portrait 810 / 820 / 834): the site clips sideways overflow on <html> only up to 768 px, so on the home
       page the decorated sections' glows and slides made the page ~45 px wider than the screen and the browser zoomed it out (/in at
       810 px laid out at 855). The same clip, carried on to the end of the tablet range. */
@media (min-width: 768.02px) and (max-width: 991.98px) {
  html { overflow-x: hidden; }
}

/* --- sign-in pages (layouts/auth: /login, /register, /forgot-password) - this file is linked there too --- */

/* 11. /forgot-password: qyntro-premium-login-17.js fits the title to one line (inline white-space:nowrap, then smaller sizes until
       it fits), but it measures against the card's padding box, not its text column - so at 360 px it stopped 36 px too early and
       "QynTro AI" ran out of the card and was cut by the screen edge. Only on this page and only on phones, the title may wrap
       (two centred lines). !important is needed to beat the script's inline style. /login is not touched (its title fits). */
@media (max-width: 575.98px) {
  .login-background .card-body:has(form[action$="/forgot-password"]) h3.login-title { white-space: normal !important; }
  .login-background .card-body:has(form[action$="/forgot-password"]) h3.login-title > .text-info { white-space: nowrap; }
}

/* 12. /login at 360 px: "Keep me logged in" broke as "Keep me logged / in" under its switch, beside a two-line "Forgot Your
       Password?". The label stays on one line and the link moves under it, still on the right. Only the sign-in form: /register's
       long terms switch must keep wrapping. */
@media (max-width: 399.98px) {
  .login-background form[action$="/login"] .d-flex:has(> .custom-switch) { flex-wrap: wrap; row-gap: 6px; }
  .login-background form[action$="/login"] .custom-switch-description { white-space: nowrap; }
}

/* 13. /register (optional - his call): the theme's line pattern behind the form is drawn at desktop size, so on a phone its white
       curves cross the title, the line under it and the first field labels. On phones the pattern is left out. */
@media (max-width: 575.98px) {
  .login-background form#registration-form { background-image: none; }
}
