/* Brandlit /account — Filming mode strip phone fit (Utah #8).
   Owner: mobile grok bot. Scope: body:has(#workspace-main) only.
   Load last in /account <head> AFTER account-polish.css.
   Desktop (≥721px) unchanged. Homepage untouched (no #workspace-main). */

/* Phone / narrow: stack brand + modes, let modes scroll horizontally with fade */
@media (max-width: 720px) {
  body:has(#workspace-main) .film-top {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
    padding: 12px 12px 10px !important;
  }

  body:has(#workspace-main) .film-top > div:first-child {
    flex: 0 0 auto;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* Mode strip: full-width horizontal scroller — never clipped by .film-studio overflow */
  body:has(#workspace-main) .film-modes {
    display: flex !important;
    flex-wrap: nowrap !important;
    justify-content: flex-start !important;
    align-items: center !important;
    gap: 6px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
    padding: 4px 28px 4px 4px !important; /* room for right fade */
    position: relative;
    /* Soft right-edge fade so off-screen modes are discoverable */
    -webkit-mask-image: linear-gradient(90deg, #000 0%, #000 calc(100% - 32px), transparent 100%);
            mask-image: linear-gradient(90deg, #000 0%, #000 calc(100% - 32px), transparent 100%);
  }

  body:has(#workspace-main) .film-modes::-webkit-scrollbar {
    display: none;
  }

  body:has(#workspace-main) .film-modes button {
    flex: 0 0 auto !important;
    white-space: nowrap !important;
    min-height: 36px !important;
    padding: 8px 12px !important;
    font-size: 10px !important;
    letter-spacing: 0.5px !important;
    scroll-snap-align: start;
  }
}

/* Extra-narrow (375 / SE): slightly tighter pills, still fully scrollable */
@media (max-width: 400px) {
  body:has(#workspace-main) .film-modes button {
    padding: 8px 10px !important;
    font-size: 9.5px !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  body:has(#workspace-main) .film-modes {
    scroll-behavior: auto !important;
  }
}
