/* Unified touch-first layout for the authenticated dashboard and its views. */
@media (max-width: 760px){
  html,body{max-width:100%;overflow-x:hidden}
  .app-shell{display:block;min-height:100svh}
  .main-content{min-width:0;overflow:hidden}
  .topbar{position:sticky;top:0;z-index:9;background:rgba(11,13,18,.94);backdrop-filter:blur(14px);padding-inline:2px}
  .breadcrumb{min-width:0;gap:8px}.breadcrumb strong{font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .top-actions{gap:7px}.top-actions .icon-button{width:36px;height:36px;font-size:20px}.top-actions .user-menu{padding:4px}
  .view{width:100%;min-width:0;padding-top:22px}.section-header,.welcome-row{margin-bottom:20px;gap:14px}.section-header>div,.welcome-row>div{min-width:0;width:100%}
  .section-header h1,.welcome-row h1{font-size:21px;line-height:1.6}.section-header .muted,.welcome-row .muted{font-size:11px;line-height:1.9}
  .panel{min-width:0;padding:16px;border-radius:13px}.panel-heading,.form-heading{gap:12px;flex-wrap:wrap}.form-heading>*{min-width:0}.estimated{width:100%}
  .stats-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.stat-card{min-width:0;padding:13px;gap:9px}.stat-icon{width:36px;height:36px;flex:none;font-size:17px}.stat-card strong{font-size:18px}.stat-card span{font-size:10px}.stat-card small{font-size:9px}
  .content-grid,.bottom-grid,.create-layout,.billing-grid,.settings-grid{grid-template-columns:minmax(0,1fr);gap:12px}.service-cards{grid-template-columns:1fr;gap:9px}.service-card{min-height:0;padding:14px}.service-card h3{margin-top:0}
  .form-panel{padding:16px}.form-row{grid-template-columns:minmax(0,1fr);gap:0}.form-panel label{margin-bottom:13px}.form-panel input,.form-panel textarea,.form-panel select{font-size:13px;min-height:44px}.form-panel textarea{min-height:105px}.form-footer{padding-top:15px;margin-top:4px}.form-footer strong{font-size:17px}.form-footer .primary-btn{min-height:48px}
  .toolbar{display:grid;grid-template-columns:minmax(0,1fr);gap:8px;padding:10px}.toolbar .search-box,.toolbar select{width:100%;min-width:0}.toolbar select{min-height:42px}.table-panel{width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}.table-panel table{min-width:650px}
  .billing-grid .balance-card{padding:18px}.balance-card strong{font-size:36px}.plans-card{overflow:hidden}.plans-card .buy-plan{white-space:normal;line-height:1.8;padding:12px!important}
  .settings-grid{display:block}.settings-nav{display:flex;gap:6px;overflow-x:auto;margin-bottom:12px;padding:7px}.settings-tab{min-width:max-content;white-space:nowrap}.settings-form{max-width:none}.profile-row{display:grid}
  .welcome-credit-banner{font-size:11px;line-height:1.9}.toast{left:12px;right:12px;bottom:14px}
  html.sidebar-scroll-locked,html.sidebar-scroll-locked body{overflow:hidden!important;overscroll-behavior:none}
  html.sidebar-scroll-locked body.dashboard-page{position:fixed!important;top:var(--sidebar-lock-offset,0)!important;right:0;left:0;width:100%!important;height:100dvh!important}
  body.sidebar-is-open{overflow:hidden!important;overscroll-behavior:none}
  body.sidebar-is-open .sidebar{touch-action:pan-y;overscroll-behavior:contain}
  .sidebar{height:100dvh;max-height:100dvh;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;padding-bottom:24px;z-index:40}
  .sidebar-backdrop{display:block;position:fixed;inset:0;border:0;padding:0;background:#03050a99;opacity:0;visibility:hidden;pointer-events:none;transition:opacity .22s ease,visibility .22s ease;z-index:35}
  .sidebar-backdrop.open{opacity:1;visibility:visible;pointer-events:auto}
}
@media (max-width:380px){.main-content{padding-inline:10px}.stats-grid{gap:7px}.stat-card{padding:10px}.stat-icon{display:none}.section-header h1,.welcome-row h1{font-size:19px}.panel{padding:13px}.primary-btn,.secondary-btn{padding-inline:13px}}
/* Final mobile pass for the podcast creation flow. Keep every control inside the viewport. */
@media (max-width:760px){
  #create .section-header{width:100%;margin-bottom:14px}
  #create .credit-pill{width:100%;text-align:center;font-size:11px}
  #create .create-layout{display:flex;flex-direction:column;gap:10px}
  #create .service-selector,#create .form-panel{width:100%;min-width:0;box-sizing:border-box}
  #create .service-selector h2{font-size:14px;margin-bottom:10px}
  #create .create-service{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:9px;width:100%;padding:11px 8px;margin-bottom:6px;text-align:right}
  #create .create-service div{min-width:0}
  #create .create-service strong,#create .create-service small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  #create .create-service b{font-size:9px;white-space:nowrap}
  #create .service-note{font-size:9px;line-height:1.8;padding-top:11px}
  #create .form-heading{display:block;margin-bottom:14px}
  #create .form-heading h2{font-size:15px;margin-bottom:5px}
  #create .estimated{display:block;font-size:9px}
  #create .form-panel label{font-size:10px}
  #create .form-panel textarea{min-height:115px;line-height:1.8}
  #create .form-footer{display:flex;flex-direction:column;align-items:stretch;gap:10px}
  #create .form-footer>div{display:flex;align-items:baseline;justify-content:space-between}
  #create .form-footer .primary-btn{width:100%;min-height:50px}
}
