/* Specialty studios: shared responsive finishing layer. */

@media (max-width: 1240px) and (min-width: 761px) {
  .doc101-tabs {
    display: flex;
    flex-wrap: nowrap;
    max-width: 100%;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scrollbar-width: thin;
    scroll-snap-type: x proximity;
  }

  .doc101-tab {
    flex: 0 0 auto;
    min-width: max-content;
    scroll-snap-align: start;
  }
}

@media (max-width: 760px) {
  /* Keep every studio bounded inside the phone viewport. */
  #documentary-app,
  #adtreatment-app,
  #podcast-app,
  #musicvideo-app,
  #festival-app,
  .doc101-shell,
  #adtreatment-app .cfr-shell,
  #podcast-app .pod113-shell,
  #musicvideo-app .mv118-shell,
  .ff111-shell {
    max-width: 100%;
    min-width: 0;
  }

  /* Documentary: reveal the workflow without making the first screen a poster. */
  .doc101-hero {
    gap: 12px;
    min-height: 0;
    padding: 14px;
  }

  .doc101-case-stamp {
    min-height: 76px;
    padding: 12px 14px;
  }

  .doc101-case-stamp b {
    font-size: 24px;
  }

  .doc101-title-stack h1 {
    font-size: clamp(34px, 11vw, 48px);
    line-height: .96;
  }

  .doc101-title-stack p:not(.doc101-eyebrow) {
    margin-top: 9px;
    font-size: 15px;
  }

  .doc101-hero-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .doc101-hero-actions .doc101-btn {
    min-width: 0;
    padding-inline: 10px;
  }

  /* Campaign Forge: compact progress while retaining every stage. */
  #adtreatment-app .cfr-top {
    gap: 10px;
    padding: 14px;
    border-radius: 20px;
  }

  #adtreatment-app .cfr-top h2 {
    font-size: 1.55rem;
    line-height: 1.05;
  }

  #adtreatment-app .cfr-progress {
    display: flex;
    gap: 8px;
    max-width: 100%;
    margin-block: 10px;
    padding-bottom: 4px;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scrollbar-width: thin;
    scroll-snap-type: x proximity;
  }

  #adtreatment-app .cfr-progress .cfr-step {
    flex: 0 0 min(220px, 72vw);
    min-height: 52px;
    scroll-snap-align: start;
  }

  /* Podcast: a useful first viewport and a stable horizontal section rail. */
  #podcast-app .pod113-hero {
    gap: 14px;
    padding: 20px 16px;
    border-radius: 24px;
  }

  #podcast-app .pod113-hero h1 {
    max-width: none;
    font-size: clamp(2rem, 10vw, 2.7rem);
    line-height: .96;
    overflow-wrap: normal;
  }

  #podcast-app .pod113-subline {
    margin-top: 9px;
    font-size: .9rem;
    line-height: 1.45;
  }

  #podcast-app .pod113-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    max-width: none;
    gap: 8px;
  }

  #podcast-app .pod113-actions .pod113-btn {
    min-width: 0;
    padding-inline: 10px;
  }

  #podcast-app .pod113-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: 12px;
  }

  #podcast-app .pod113-stat {
    padding: 10px 12px;
    border-radius: 16px;
  }

  #podcast-app .pod113-stat strong {
    font-size: 1.25rem;
  }

  #podcast-app .pod113-tabs {
    max-width: 100%;
    flex-wrap: nowrap;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scrollbar-width: thin;
    scroll-snap-type: x proximity;
  }

  #podcast-app .pod113-tab {
    flex: 0 0 auto;
    min-width: max-content;
  }

  /* Music Video: stop title fragmentation and preserve complete tab labels. */
  .mv118-header {
    padding: 20px 16px;
    border-radius: 22px;
  }

  .mv118-header-main {
    gap: 10px;
  }

  .mv118-header-icon {
    width: 40px;
    height: 40px;
  }

  .mv118-title-block p {
    font-size: clamp(1.65rem, 8vw, 2rem);
    line-height: 1;
    overflow-wrap: normal;
    word-break: normal;
  }

  .mv118-header-right {
    max-width: 100%;
  }

  .mv118-kpis {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
    margin-top: 14px;
  }

  .mv118-kpi {
    min-width: 0;
    padding: 10px;
    border-radius: 16px;
  }

  .mv118-tab-nav {
    max-width: 100%;
    padding: 7px;
    scroll-padding-inline: 7px;
    scroll-snap-type: x proximity;
  }

  .mv118-tab {
    flex: 0 0 auto;
    width: auto;
    min-width: max-content;
    padding-inline: 14px;
    scroll-snap-align: start;
  }

  /* Festival: prevent card-header actions from competing with collapse controls. */
  body[data-active-view="festival-app"] #festival-app {
    overflow-x: clip !important;
  }

  .ff111-shell {
    width: calc(100% - 16px);
  }

  .ff111-hero {
    gap: 14px;
    min-height: 0;
    padding: 16px;
  }

  .ff111-title {
    font-size: clamp(2rem, 10vw, 2.8rem);
    line-height: .96;
  }

  .ff111-copy {
    margin-top: 10px;
    font-size: .94rem;
    line-height: 1.45;
  }

  .ff111-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: 14px;
  }

  .ff111-actions .ff111-btn,
  .ff111-card-head .ff111-btn {
    min-width: 0;
    padding-inline: 10px;
    white-space: normal;
  }

  .ff111-card-head {
    min-width: 0;
    gap: 8px;
    padding-right: 34px;
  }

  .ff111-card-head > * {
    min-width: 0;
  }

  .ff111-card-head > :first-child {
    flex: 1 1 auto;
  }

  .ff111-card-head > .ff111-btn {
    flex: 0 0 auto;
    min-width: max-content;
    max-width: calc(100% - 92px);
  }
}

@media (max-width: 390px) {
  .doc101-hero-actions,
  #podcast-app .pod113-actions,
  .ff111-actions {
    grid-template-columns: 1fr;
  }
}
