/* Mobile presentation only. Catalog identity and playback remain shared. */
@media (max-width: 720px), (max-width: 900px) and (max-height: 500px) and (pointer: coarse) {
  body.mobile-shell-active { --page-gutter: 16px; }
  .app-main { min-width: 0; padding-bottom: calc(28px + env(safe-area-inset-bottom, 0px)); }
  :is(#home-shelves, #channel-catalog, #catalog-discovery, #content-progress) { scroll-margin-top: calc(var(--mobile-header-height, 112px) + 16px); }
  :is(#content-presentation, #streaming-services) { min-width: 0; }
  .sh-agenda-title { align-self: stretch; width: 100%; }
  #content-presentation .cp-hero,
  #content-presentation .cp-presentation[data-kind='live'] .cp-hero,
  #content-presentation [data-view='favorites'] .cp-hero,
  #content-presentation [data-view='favorites'][data-kind='live'] .cp-hero {
    min-height: clamp(380px, calc(82svh - var(--mobile-header-height, 112px)), 580px);
    padding-block: 40px 16px; flex-direction: column; justify-content: end; align-items: stretch;
  }
  #content-presentation .cp-hero-copy,
  #content-presentation [data-view='favorites'] .cp-hero-copy,
  #content-presentation .cp-presentation[data-kind='live'] .cp-hero-copy {
    display: flex; flex-direction: column; align-items: stretch; width: 100%; gap: 12px;
  }
  #content-presentation .cp-title-slot { min-height: 0; height: auto; }
  #content-presentation .cp-title-art { height: auto; max-height: 88px; max-width: 100%; object-position: left center; }
  #content-presentation .cp-hero-title,
  #content-presentation [data-view='favorites'] .cp-hero-title,
  #content-presentation .cp-presentation[data-kind='live'] .cp-hero-title {
    font-size: clamp(1.85rem, 8vw, 2.85rem); line-height: 1.06; max-height: none; -webkit-line-clamp: 3;
  }
  #content-presentation .cp-eyebrow { min-height: 0; line-height: 1.5; font-size: .65rem; letter-spacing: .15em; }
  #content-presentation .cp-meta { min-height: 0; height: auto; font-size: .78rem; line-height: 1.5; }
  #content-presentation .cp-plot { min-height: 0; height: auto; max-height: none; font-size: .85rem; line-height: 1.5; -webkit-line-clamp: 2; }
  #content-presentation :is(.cp-meta-slot,.cp-plot-slot,.cp-playback-slot) { min-height: 0; height: auto; }
  #content-presentation :is(.cp-meta-slot,.cp-plot-slot,.cp-playback-slot) { grid-template-rows: none; grid-auto-rows: auto; overflow: visible; }
  #content-presentation :is(.cp-meta,.cp-episode-state) { white-space: normal; overflow: visible; overflow-wrap: anywhere; }
  #content-presentation .cp-hero-art { object-position: 66% 28%; }
  #content-presentation .cp-actions { display: grid; grid-template-columns: minmax(0, 1fr) 44px 44px; height: auto; gap: 8px; width: 100%; }
  #content-presentation .cp-actions:has(> .cp-movie-seen-toggle:not([hidden])) { grid-template-columns: minmax(0,1fr) 44px 44px; }
  #content-presentation .cp-actions .cp-action-primary { grid-column: 1 / -1; grid-row: 1; }
  #content-presentation .cp-actions .cp-action-secondary { grid-column: 1; grid-row: 2; }
  #content-presentation .cp-actions .cp-save { grid-column: 2; grid-row: 2; }
  #content-presentation .cp-actions .cp-movie-seen-toggle { grid-column: 3; grid-row: 2; }
  #content-presentation .cp-actions .cp-action { min-height: 44px; height: auto; padding: 11px; font-size: .8rem; line-height: 1.4; white-space: normal; }
  #content-presentation :is(.cp-save, .cp-save-icon, .cp-movie-seen-toggle) { min-width: 44px; width: 44px; min-height: 44px; height: 44px; }
  #content-presentation .cp-hero-pagination { min-height: 44px; height: auto; margin: 0; }
  #content-presentation .cp-dots { max-width: 100%; gap: 0; }
  #content-presentation .cp-dot { width: 44px; min-width: 44px; height: 44px; min-height: 44px; }
  #content-presentation .cp-dot[aria-pressed='true']::before { width: 18px; border-radius: 8px; }
  #content-presentation .cp-scroll { position: relative; bottom: auto; left: auto; transform: none; margin: 4px auto 0; min-height: 44px; gap: 5px; font-size: .7rem; align-self: center; }
  #content-presentation .cp-scroll:is(:hover:where(body[data-input-modality="mouse"] *), :active) { transform: none; }
  #content-presentation .cp-live-identity { display: none; }
  #content-presentation .cp-favorites-heading { min-height: 0; padding-top: 20px; gap: 12px; }
  #content-presentation .cp-favorites-filters { flex-wrap: wrap; gap: 4px; }
  #content-presentation .cp-filter { min-height: 44px; font-size: .75rem; }
  #content-presentation .cp-arrow { min-width: 44px; width: 44px; height: 44px; }
  #streaming-services .ss-hero { min-height: clamp(380px, calc(82svh - var(--mobile-header-height, 112px)), 580px); padding-top: 44px; padding-bottom: 16px; }
  #streaming-services .ss-hero-copy { width: 100%; padding: 0; }
  #streaming-services .ss-title-slot { min-height: 0; margin-bottom: 14px; }
  #streaming-services .ss-hero-title { font-size: clamp(1.85rem, 8vw, 2.85rem); line-height: 1.06; }
  #streaming-services .ss-lettering { max-height: 88px; }
  #streaming-services .ss-kicker { font-size: .65rem; letter-spacing: .15em; line-height: 1.5; }
  #streaming-services .ss-description { min-height: 0; margin-top: 10px; font-size: .85rem; line-height: 1.5; -webkit-line-clamp: 2; }
  #streaming-services .ss-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
  #streaming-services .ss-actions .ss-button { flex: 1 1 100px; min-width: 0; min-height: 44px; padding: 10px 12px; font-size: .8rem; white-space: normal; }
  #streaming-services .ss-actions .ss-button-primary { flex-basis: 100%; }
  #streaming-services :is(.ss-save, .ss-dot) { width: 44px; min-width: 44px; min-height: 44px; height: 44px; }
  #streaming-services .ss-dot[aria-pressed='true']::before { width: 18px; border-radius: 8px; }
  #streaming-services .ss-dots { gap: 0; flex-wrap: wrap; }
  #streaming-services .ss-pagination { margin-top: 6px; }
  #streaming-services .ss-scroll-cue { position: relative; inset: auto; transform: none; min-height: 44px; margin: 4px auto; gap: 5px; }
  #streaming-services .ss-service-search-input { min-height: 44px; font-size: 1rem; }
  .home-shelves .hs-shelf-heading { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: start; }
  .home-shelves .hs-shelf-title { font-size: 1.15rem; line-height: 1.3; overflow-wrap: anywhere; }
  .home-shelves .hs-shelf-description { font-size: .75rem; line-height: 1.5; }
  .home-shelves .hs-see-all { min-height: 44px; padding: 9px 10px; font-size: .72rem; }
  .home-shelves .hs-cell, .home-shelves .hs-skeleton-card { flex-basis: clamp(138px, 41vw, 184px); }
  .home-shelves .hs-shelf { margin-bottom: 28px; }
  .home-shelves .hs-row { gap: 12px; scroll-snap-type: x proximity; scroll-padding-inline: 3px; }
  :is(.home-shelves .hs-card-title, #catalog-discovery .dx-card-copy strong) { font-size: .8rem; line-height: 1.4; }
  :is(.hs-cell, .dx-title-cell) > :is(.movie-seen-toggle, .catalog-favorite-toggle),
  #streaming-services :is(.ss-card-save, .ss-card-watched) { min-width: 44px; width: 44px; min-height: 44px; height: 44px; opacity: 1; background: #101216db; color: #e2e5ea; }
  :is(.hs-cell, .dx-title-cell) > :is(.movie-seen-toggle, .catalog-favorite-toggle)[aria-pressed='true'],
  #streaming-services :is(.ss-card-save, .ss-card-watched)[aria-pressed='true'] { color: #ff4662; }
  #channel-list { gap: 24px; }
  .channel-shelf { margin-block: 0 24px; }
  .channel-shelf > h2 { margin-bottom: 12px; font-size: 1.05rem; line-height: 1.4; overflow-wrap: anywhere; }
  .channel-shelf > h2[data-mobile-label] { font-size: 0; }
  .channel-shelf > h2[data-mobile-label]::before { content: attr(data-mobile-label); font-size: 1.05rem; }
  .channel-row { gap: 12px; padding-bottom: 12px; scroll-snap-type: x proximity; }
  .channel-item[data-kind='live'] { display: grid; grid-template-columns: minmax(0, 1fr) 44px; align-content: start; flex-basis: clamp(186px, 53vw, 230px); gap: 4px; min-height: 0; scroll-snap-align: start; }
  .channel-item[data-kind='live'] .channel-button { grid-column: 1; grid-row: 1; gap: 8px; min-height: 96px; }
  .channel-item[data-kind='live'] .channel-button > span:last-child { white-space: normal; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; font-size: .8rem; line-height: 1.45; padding: 0; }
  .channel-item[data-kind='live'] .channel-artwork { height: 64px; min-height: 64px; aspect-ratio: auto; width: 100%; background: transparent; }
  .channel-item[data-kind='live'] .channel-artwork img { width: 80px; max-width: 100%; height: 36px; max-height: 36px; object-fit: contain; }
  .channel-item[data-kind='live'] .channel-artwork::before, .channel-item[data-kind='live'] .channel-artwork::after, .channel-item[data-kind='live'] .live-badge { display: none; }
  .channel-item[data-kind='live'] > .favorite-toggle { position: relative; inset: auto; grid-column: 2; grid-row: 1; min-width: 44px; min-height: 44px; margin: 8px 0 0; }
  .channel-item[data-kind='live'] :is(.channel-quality-link, .channel-quality-note, .channel-now) { grid-column: 1 / -1; min-height: 0; height: auto; max-height: none; margin: 0; padding: 0; }
  .channel-item[data-kind='live'] .channel-quality-link { min-height: 44px; text-align: left; font-size: .72rem; }
  .channel-item[data-kind='live'] .channel-quality-note { font-size: .72rem; line-height: 1.5; }
  .channel-item[data-kind='live'] .channel-now { position: static; width: 100%; display: grid; gap: 3px; border: 0; border-radius: 0; background: transparent; box-shadow: none; opacity: 1; visibility: visible; transform: none; font-size: .75rem; line-height: 1.45; }
  .channel-item[data-kind='live'] .channel-now :is(p,strong,span,small) { margin: 0; overflow-wrap: anywhere; font-size: inherit; line-height: inherit; }
  .channel-grid { grid-template-columns: repeat(auto-fill,minmax(min(100%, 172px),1fr)); gap: 20px 12px; }
  #catalog-discovery :is(input, select) { min-width: 0; min-height: 44px; font-size: 1rem; }
  #catalog-discovery .dx-filters { grid-template-columns: minmax(0, 1fr); }
  #catalog-discovery .dx-filters > * { min-width: 0; }
  #catalog-discovery .dx-live-brand-row > .dx-poster { flex-basis: 64px; width: 64px; height: 44px; }
  #catalog-discovery .dx-live-member > .dx-poster { flex-basis: 60px; width: 60px; height: 44px; }
  :is(#content-progress, #content-presentation) .cp-episode-copy strong { white-space: normal; overflow-wrap: anywhere; }
  dialog:not(#player-screen) { max-width: calc(100% - 16px); max-height: calc(var(--mobile-visual-height, 100dvh) - 16px); overflow-y: auto; overscroll-behavior: contain; }
  dialog:not(#player-screen) :is(input,select,textarea) { font-size: 1rem; min-height: 44px; min-width: 0; max-width: 100%; }
  dialog.catalog-versions .catalog-version-row input { min-height: 22px; height: 22px; min-width: 22px; }
  dialog:not(#player-screen) :is(button,summary) { min-height: 44px; }
  #series-details .episode-row { grid-template-columns: minmax(0,1fr) 44px; gap: 6px; }
  #player-screen #player-surface .player-toolbar :is(button.player-icon-button,.player-select-icon) { width: 44px; min-width: 44px; height: 44px; min-height: 44px; }
  :is(.sg-discovery-row,.sg-actor-row,.hs-row,.channel-row) { touch-action: pan-x pan-y pinch-zoom; }
  html[data-theme='light'] :is(.hs-cell,.dx-title-cell) > :is(.movie-seen-toggle,.catalog-favorite-toggle) { background: #fffef4ed; color: #343741; }
  html[data-theme='light'] :is(.hs-cell,.dx-title-cell) > :is(.movie-seen-toggle,.catalog-favorite-toggle)[aria-pressed='true'] { color: #b60828; }
}
/* Compact service heroes share the mobile/tablet rhythm. Desktop's reserved
   lettering height and inherited stage height must not become empty touch UI. */
body.mobile-shell-active #streaming-services .ss-hero-stage { min-height: 0; }
body.mobile-shell-active #streaming-services .ss-title-slot { min-height: 0; margin-bottom: 14px; }
body.mobile-shell-active #streaming-services .ss-eyebrow { margin-bottom: 18px; }
body.mobile-shell-active #streaming-services .ss-actions { margin-top: 22px; }
@media (prefers-reduced-motion: reduce) {
  :is(#content-presentation,#streaming-services,.home-shelves,#channel-list) *,
  :is(#content-presentation,#streaming-services,.home-shelves,#channel-list) *::before,
  :is(#content-presentation,#streaming-services,.home-shelves,#channel-list) *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}
