/* EpisodeTime responsive layer.
 * This file is loaded only at <= 1024px. Approved desktop styling is intentionally
 * left in app.css and must not be duplicated or changed here.
 */

@media (min-width: 769px) and (max-width: 1024px) {
  .et-navbar-inner { width: calc(100% - 28px) !important; }
  .eth-layout,
  .et-route-show-details .ets-page,
  body.et-route-person-details .etp-page,
  .etd-page,
  .etsc-page,
  body[class*="et-route-ranking"] .etr-page,
  .etc-community,
  .etw-page,
  .etp-page,
  .ets-shell,
  .etb-page,
  .et-contribute-shell { width: calc(100% - 28px) !important; }
  .eth-layout { grid-template-columns: minmax(0, 1fr) 300px; gap: 14px; }
  .eth-hero { min-height: 360px; padding: 32px; }
  .eth-hero h1 { font-size: 48px; }
  .etcs-layout { grid-template-columns: 184px minmax(0, 1fr); }
  .etcs-main { padding-inline: 12px; }
}

/* The Show page becomes a single-column document at 900px in app.css. Keep
 * that entire stacked range seamless; otherwise 769–900px inherits desktop
 * sidebar card widths and produces the narrow floating boxes seen on tablets. */
@media (min-width: 769px) and (max-width: 900px) {
  .et-route-show-details .et-navbar-inner {
    width: 100% !important;
    padding-inline: 16px !important;
  }
  .et-route-show-details .et-nav-links {
    border-inline: 0 !important;
    border-radius: 0 !important;
  }
  .et-route-show-details .ets-page {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
  }
  .et-route-show-details .ets-above-fold,
  .et-route-show-details .ets-sidebar,
  .et-route-show-details .ets-main {
    width: 100% !important;
    max-width: none !important;
    gap: 0 !important;
  }
  .et-route-show-details .ets-hero {
    width: 100% !important;
    min-height: 470px !important;
    margin: 0 !important;
    border-inline: 0 !important;
    border-radius: 0 !important;
  }
  .et-route-show-details .ets-hero-content {
    display: grid !important;
    grid-template-columns: 150px minmax(0, 1fr) !important;
    align-items: end !important;
    gap: 24px !important;
    min-height: 470px !important;
    padding: 62px clamp(20px, 4vw, 36px) 24px !important;
  }
  .et-route-show-details .ets-poster {
    width: 150px !important;
    margin: 0 !important;
  }
  .et-route-show-details .ets-identity { margin: 0 !important; }
  .et-route-show-details .ets-identity h1 { font-size: 44px !important; }
  .et-route-show-details .ets-overview {
    display: -webkit-box !important;
    margin-block: 12px !important;
    overflow: hidden !important;
    -webkit-box-orient: vertical !important;
    -webkit-line-clamp: 2 !important;
  }
  .et-route-show-details .ets-actions { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .et-route-show-details .ets-actions .ets-contribute { grid-column: auto !important; }
  .et-route-show-details .ets-sidebar > .ets-side-card,
  .et-route-show-details .ets-panel {
    align-self: stretch !important;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 20px clamp(18px, 4vw, 34px) !important;
    background: transparent !important;
    border: 0 !important;
    border-bottom: 1px solid var(--eth-line, #26313b) !important;
    border-radius: 0 !important;
    box-shadow: none !important;
  }
  .et-route-show-details .ets-tabs {
    width: 100% !important;
    margin: 0 !important;
    padding-inline: clamp(12px, 3vw, 24px) !important;
    border-inline: 0 !important;
    border-radius: 0 !important;
  }
  .et-route-show-details :is(.ets-overview-grid, .ets-people-pair, .ets-feature-strip) {
    gap: 0 !important;
  }
  .et-route-show-details :is(.ets-airtime, .ets-insights) {
    margin: 0 !important;
    padding: 17px clamp(18px, 4vw, 34px) !important;
    background: transparent !important;
    border: 0 !important;
    border-bottom: 1px solid var(--eth-line, #26313b) !important;
    border-radius: 0 !important;
  }
  .et-route-show-details .ets-where-watch iframe {
    display: block;
    width: 100% !important;
    max-width: 100% !important;
    margin-inline: auto !important;
  }

  body.et-route-person-details .etp-page {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
  }
  body.et-route-person-details .etp-layout,
  body.et-route-person-details .etp-main,
  body.et-route-person-details .etp-sidebar { width: 100% !important; gap: 0 !important; }
  body.et-route-person-details .etp-hero {
    width: 100% !important;
    min-height: 450px !important;
    margin: 0 !important;
    border-inline: 0 !important;
    border-radius: 0 !important;
  }
  body.et-route-person-details .etp-hero-content {
    display: grid !important;
    grid-template-columns: 145px minmax(0, 1fr) !important;
    align-items: end !important;
    gap: 22px !important;
    min-height: 450px !important;
    padding: 58px clamp(20px, 4vw, 36px) 24px !important;
  }
  body.et-route-person-details .etp-portrait { width: 145px !important; margin: 0 !important; }
  body.et-route-person-details .etp-identity { margin: 0 !important; }
  body.et-route-person-details .etp-identity h1 { font-size: 42px !important; }
  body.et-route-person-details .etp-hero-bio {
    display: -webkit-box !important;
    overflow: hidden !important;
    -webkit-box-orient: vertical !important;
    -webkit-line-clamp: 2 !important;
  }
  body.et-route-person-details .etp-actions { margin-top: 10px !important; }
  body.et-route-person-details :is(.etp-panel, .etp-side-card) {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 20px clamp(18px, 4vw, 34px) !important;
    background: transparent !important;
    border: 0 !important;
    border-bottom: 1px solid var(--eth-line, #26313b) !important;
    border-radius: 0 !important;
    box-shadow: none !important;
  }
  body.et-route-person-details .etp-tabs {
    width: 100% !important;
    margin: 0 !important;
    padding-inline: clamp(12px, 3vw, 24px) !important;
    border-inline: 0 !important;
    border-radius: 0 !important;
  }

  .et-route-home .eth-layout { width: 100% !important; padding-top: 0 !important; }
  .et-route-home .eth-hero {
    width: 100% !important;
    min-height: 360px !important;
    margin: 0 !important;
    padding: 26px clamp(20px, 4vw, 34px) !important;
    border-inline: 0 !important;
    border-radius: 0 !important;
  }
  .et-route-home .eth-hero-copy > p { max-width: 470px !important; margin-bottom: 15px !important; }
}

@media (min-width: 769px) {
  .etr-mobile-filter-toggle { display: none !important; }
}

@media (max-width: 768px) {
  :root {
    --et-mobile-gutter: 12px;
    --et-mobile-section-gap: 26px;
    --et-mobile-card-pad: 13px;
    --et-mobile-radius: 12px;
  }

  html { overflow-x: clip; }
  body { overflow-x: hidden; }
  img, video, iframe, svg { max-width: 100%; }
  main, section, article, aside, nav, form, fieldset, div { min-width: 0; }

  /* Compact two-row global navigation. */
  .et-navbar { min-height: 0 !important; }
  .et-navbar-inner {
    display: grid !important;
    grid-template-columns: auto minmax(0, 1fr) auto !important;
    gap: 7px !important;
    width: 100% !important;
    min-height: 0 !important;
    padding: 8px var(--et-mobile-gutter) 0 !important;
  }
  .et-logo { grid-column: 1; grid-row: 1; min-width: 44px; }
  .et-logo-mark { width: 40px !important; height: 40px !important; border-radius: 10px !important; }
  .et-logo-text { display: none !important; }
  .et-nav-actions { grid-column: 3 !important; grid-row: 1; gap: 5px !important; }
  .et-nav-actions .et-search-shell--desktop { display: none !important; }
  .et-nav-actions .et-theme-toggle { width: 44px !important; min-width: 44px !important; min-height: 44px !important; padding: 0 !important; }
  .et-navbar .et-nav-actions .et-theme-toggle {
    border-color: rgba(255, 255, 255, .16) !important;
    background: #111923 !important;
    color: #f7f8fa !important;
    box-shadow: none !important;
  }
  .et-theme-toggle-text { display: none !important; }
  .et-auth-link { min-height: 44px !important; padding-inline: 9px !important; font-size: 12px !important; }
  .et-account-nav .et-user-chip { width: 44px !important; min-width: 44px !important; height: 44px !important; padding: 0 !important; font-size: 0 !important; }
  .et-account-nav .et-nav-avatar { margin: 0 !important; }
  .et-search-shell--mobile {
    display: flex !important;
    grid-column: 2 !important;
    grid-row: 1;
    align-self: center !important;
    width: 100% !important;
    max-width: none !important;
    height: 44px !important;
    padding: 0 !important;
    overflow: visible !important;
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
  }
  .et-navbar .et-search-shell--mobile > .et-search-toggle {
    width: 100% !important;
    min-width: 44px !important;
    height: 44px !important;
    min-height: 44px !important;
    margin: 0 !important;
    padding: 0 13px !important;
    transform: none !important;
    border: 1px solid var(--et-border) !important;
    border-radius: 11px !important;
    outline: 0 !important;
    background: var(--et-card-soft) !important;
    box-shadow: none !important;
  }
  .et-navbar .et-search-shell--mobile > .et-search-toggle::before,
  .et-navbar .et-search-shell--mobile > .et-search-toggle::after { display: none !important; content: none !important; }
  .et-navbar .et-search-shell--mobile > .et-search-toggle:focus-visible {
    border-color: var(--et-accent) !important;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--et-accent) 14%, transparent) !important;
  }
  .et-search-shell--mobile .et-search-toggle-text { display: inline !important; font-size: 12px !important; }
  .et-nav-links {
    grid-column: 1 / -1;
    grid-row: 2 !important;
    display: grid !important;
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    justify-content: space-between !important;
    gap: 0 !important;
    width: calc(100% + (2 * var(--et-mobile-gutter))) !important;
    max-width: none !important;
    margin-inline: calc(-1 * var(--et-mobile-gutter)) !important;
    padding-inline: var(--et-mobile-gutter) !important;
    overflow: visible !important;
    white-space: nowrap;
    scrollbar-width: none;
    background: transparent !important;
    border: 0 !important;
    border-top: 1px solid var(--et-border) !important;
    border-bottom: 1px solid var(--et-border) !important;
    border-radius: 0 !important;
    box-shadow: none !important;
  }
  .et-navbar .et-nav-links {
    overflow-x: visible !important;
    overflow-y: visible !important;
  }
  .et-nav-links::-webkit-scrollbar { display: none; }
  .et-nav-links > a,
  .et-nav-links summary {
    display: flex !important;
    align-items: center;
    justify-content: center !important;
    min-height: 44px !important;
    padding: 8px 2px !important;
    font-size: 11px !important;
    color: #f5f5f5 !important;
  }
  .et-nav-links > a:nth-child(1) { grid-column: 1 !important; grid-row: 1 !important; }
  .et-nav-links > a:nth-child(2) { grid-column: 2 !important; grid-row: 1 !important; }
  .et-nav-links > a:nth-child(3) { grid-column: 3 !important; grid-row: 1 !important; }
  .et-nav-links > a:nth-child(4) { grid-column: 4 !important; grid-row: 1 !important; }
  .et-nav-links .et-nav-desktop-extra,
  .et-nav-links .et-contribute-nav { display: none !important; }
  .et-nav-links .et-mobile-more { display: block !important; }
  .et-nav-links .et-mobile-more > summary {
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
  }
  .et-nav-links .et-mobile-more[open] {
    display: contents !important;
  }
  .et-nav-links .et-mobile-more[open] > summary {
    grid-column: 5 !important;
    grid-row: 1 !important;
    color: #f5c518 !important;
  }
  .et-navbar .et-mobile-more[open] > .et-nav-dropdown {
    position: static !important;
    z-index: auto !important;
    grid-column: 1 / -1 !important;
    grid-row: 2 !important;
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 2px 6px !important;
    width: calc(100vw - (2 * var(--et-mobile-gutter))) !important;
    min-width: calc(100vw - (2 * var(--et-mobile-gutter))) !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 7px 0 9px !important;
    overflow: visible !important;
    border: 0 !important;
    border-top: 1px solid var(--et-border) !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }
  .et-navbar .et-mobile-more[open] > .et-nav-dropdown li { margin: 0 !important; }
  .et-navbar .et-mobile-more[open] > .et-nav-dropdown a {
    display: flex !important;
    align-items: center !important;
    min-height: 44px !important;
    padding: 9px 10px !important;
    border: 0 !important;
    border-radius: 8px !important;
    background: transparent !important;
    color: #f5f5f5 !important;
    font-size: 12px !important;
    font-weight: 750 !important;
  }
  .et-navbar .et-mobile-more[open] > .et-nav-dropdown a:hover,
  .et-navbar .et-mobile-more[open] > .et-nav-dropdown a:focus-visible {
    background: rgba(245, 197, 24, .12) !important;
    color: #f5c518 !important;
  }

  /* One consistent content gutter and mobile rhythm. */
  .eth-layout,
  .et-route-show-details .ets-page,
  body.et-route-person-details .etp-page,
  .etd-page,
  .etsc-page,
  body[class*="et-route-ranking"] .etr-page,
  .etc-community,
  .etw-page,
  body:not(.et-route-person-details) .etp-page,
  .et-route-search .ets-shell,
  .etb-page,
  .et-contribute-shell {
    width: calc(100% - (2 * var(--et-mobile-gutter))) !important;
    max-width: none !important;
    margin-inline: auto !important;
  }
  .etw-page,
  body:not(.et-route-person-details) .etp-page { padding-inline: 0 !important; }
  h1 { overflow-wrap: anywhere; }
  button, .et-btn, input, select, summary { touch-action: manipulation; }

  /* Homepage */
  .eth-layout { padding-top: 0 !important; gap: 0 !important; }
  .eth-hero {
    min-height: 320px !important;
    padding: 16px var(--et-mobile-gutter) !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
  }
  .eth-hero-copy { width: 100% !important; }
  .eth-hero h1 { margin-block: 7px 9px !important; font-size: clamp(34px, 10vw, 40px) !important; line-height: 1 !important; }
  .eth-hero-copy > p {
    display: -webkit-box;
    margin-bottom: 13px !important;
    overflow: hidden;
    font-size: 15px !important;
    line-height: 1.48 !important;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }
  .eth-actions { display: grid !important; grid-template-columns: 1fr 1fr; gap: 9px !important; width: 100% !important; }
  .eth-actions > * { width: 100%; min-height: 44px !important; padding-inline: 10px !important; }
  .eth-feature { right: 14px !important; bottom: 14px !important; max-width: 46%; padding: 10px 12px !important; border-radius: 9px !important; }
  .eth-feature p { margin-block: 4px !important; }
  .eth-section { margin-top: var(--et-mobile-section-gap) !important; }
  .eth-section,
  .eth-section-head {
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }
  .eth-section h2 { font-size: 26px !important; }
  .eth-up-grid { gap: 10px !important; }
  .eth-up-card {
    flex-basis: min(252px, 78vw) !important;
    border-color: transparent !important;
    border-radius: 9px !important;
    box-shadow: none !important;
  }
  .eth-up-card:first-child { border-color: transparent !important; box-shadow: none !important; }
  .eth-poster-row > a { flex-basis: 42vw !important; max-width: 168px; }
  .eth-people-row > a { flex-basis: min(205px, 72vw) !important; }
  .eth-empty, .eth-side-card .eth-empty { min-height: 0 !important; padding: 13px !important; }
  .eth-community-grid, .eth-contributor-list { gap: 0 !important; }
  .eth-community-grid > *, .eth-contributor-list > * { border-radius: 0 !important; }
  .eth-stats { grid-template-columns: repeat(2, 1fr) !important; gap: 8px !important; }
  .eth-stats > div { min-height: 72px !important; padding: 11px !important; }

  /* Show details: cinematic but no longer multiple screens tall. */
  .et-route-show-details .ets-hero { min-height: 430px !important; border-radius: 0 !important; }
  .et-route-show-details .ets-hero-content {
    display: grid !important;
    grid-template-columns: 120px minmax(0, 1fr) !important;
    align-items: end !important;
    gap: 16px !important;
    min-height: 430px !important;
    padding: 58px 14px 16px !important;
  }
  .et-route-show-details .ets-poster { width: 120px !important; margin-bottom: 10px !important; border-radius: 7px !important; }
  .et-route-show-details .ets-poster-wrap { align-self: end !important; }
  .et-route-show-details .ets-identity { align-self: end !important; margin: 0 !important; }
  .et-route-show-details .ets-identity h1 { font-size: 39px !important; line-height: 1 !important; }
  .et-route-show-details .ets-tagline { margin-block: 8px !important; font-size: 15px !important; }
  .et-route-show-details .ets-meta-line { gap: 6px !important; margin: 9px 0 !important; font-size: 12px !important; }
  .et-route-show-details .ets-genres { gap: 5px !important; }
  .et-route-show-details .ets-genres a { padding: 4px 8px !important; font-size: 10px !important; }
  .et-route-show-details .ets-rating { margin-top: 9px !important; }
  .et-route-show-details .ets-overview {
    margin: 9px 0 12px !important;
    font-size: 12px !important;
    line-height: 1.5 !important;
    -webkit-line-clamp: 3 !important;
  }
  .et-route-show-details .ets-actions { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 7px !important; }
  .et-route-show-details .ets-actions > * { min-height: 44px; }
  .et-route-show-details .ets-actions .ets-contribute { grid-column: auto !important; }
  .et-route-show-details .ets-sidebar { gap: 0 !important; }
  .et-route-show-details .ets-side-card,
  .et-route-show-details .ets-panel {
    padding: var(--et-mobile-card-pad) !important;
    border-radius: var(--et-mobile-radius) !important;
  }
  .et-route-show-details .ets-main { margin-top: 8px !important; }
  .et-route-show-details .ets-tabs { margin-inline: 0 !important; padding-inline: 3px !important; border-radius: 8px 8px 0 0 !important; }
  .et-route-show-details .ets-tabs a { min-height: 44px; padding: 13px 10px !important; }
  .et-route-show-details .ets-overview-grid,
  .et-route-show-details .ets-people-pair { gap: 7px !important; }
  .et-route-show-details .ets-people { justify-content: flex-start !important; }
  .et-route-show-details .ets-airtime,
  .et-route-show-details .ets-insights { padding: 11px 13px !important; border-radius: 9px !important; }
  .et-route-show-details .ets-episode-row { min-height: 52px !important; }
  .et-route-show-details .ets-similar a { flex-basis: 40vw !important; }

  /* Android-app inspired Show header for mobile browsers. The backdrop remains
     full bleed, while the poster/title become one compact identity block and
     actions behave like the app's horizontal action rail. */
  .et-route-show-details .ets-hero {
    min-height: 410px !important;
  }
  .et-route-show-details .ets-hero-art {
    background-image:
      linear-gradient(0deg, #050a0f 0%, rgba(5, 10, 15, .93) 20%, rgba(5, 10, 15, .42) 62%, rgba(5, 10, 15, .20) 100%),
      var(--ets-backdrop) !important;
    background-position: center top !important;
  }
  .et-route-show-details .ets-hero-content {
    grid-template-columns: 108px minmax(0, 1fr) !important;
    grid-template-rows: repeat(6, auto) auto auto !important;
    align-content: end !important;
    align-items: end !important;
    gap: 5px 13px !important;
    min-height: 410px !important;
    padding: 48px var(--et-mobile-gutter) 14px !important;
  }
  .et-route-show-details .ets-poster-wrap {
    grid-column: 1 !important;
    grid-row: 1 / 7 !important;
    align-self: end !important;
  }
  .et-route-show-details .ets-poster {
    width: 108px !important;
    margin: 0 !important;
    border-radius: 9px !important;
    box-shadow: 0 14px 30px rgba(0, 0, 0, .42) !important;
  }
  .et-route-show-details .ets-identity { display: contents !important; }
  .et-route-show-details .ets-kicker { grid-column: 2; grid-row: 1; justify-self: start; margin: 0 0 2px !important; }
  .et-route-show-details .ets-identity h1 { grid-column: 2; grid-row: 2; margin: 0 !important; font-size: clamp(29px, 8.8vw, 36px) !important; }
  .et-route-show-details .ets-tagline { grid-column: 2; grid-row: 3; margin: 2px 0 !important; }
  .et-route-show-details .ets-meta-line { grid-column: 2; grid-row: 4; margin: 3px 0 !important; }
  .et-route-show-details .ets-genres { grid-column: 2; grid-row: 5; overflow-x: auto; flex-wrap: nowrap !important; scrollbar-width: none; }
  .et-route-show-details .ets-genres::-webkit-scrollbar { display: none; }
  .et-route-show-details .ets-rating { grid-column: 2; grid-row: 6; margin: 3px 0 0 !important; }
  .et-route-show-details .ets-overview {
    grid-column: 1 / -1 !important;
    grid-row: 7 !important;
    margin: 8px 0 4px !important;
    font-size: 13px !important;
    -webkit-line-clamp: 2 !important;
  }
  .et-route-show-details .ets-actions {
    grid-column: 1 / -1 !important;
    grid-row: 8 !important;
    display: flex !important;
    gap: 7px !important;
    width: calc(100% + var(--et-mobile-gutter)) !important;
    margin-right: calc(-1 * var(--et-mobile-gutter)) !important;
    padding: 3px var(--et-mobile-gutter) 2px 0 !important;
    overflow-x: auto !important;
    flex-wrap: nowrap !important;
    scrollbar-width: none;
  }
  .et-route-show-details .ets-actions::-webkit-scrollbar { display: none; }
  .et-route-show-details .ets-actions > *,
  .et-route-show-details .ets-actions > form,
  .et-route-show-details .ets-actions > form > button {
    flex: 0 0 auto !important;
    width: auto !important;
    min-width: max-content !important;
  }
  .et-route-show-details .ets-actions .ets-btn,
  .et-route-show-details .ets-actions summary.ets-btn {
    min-height: 38px !important;
    padding: 8px 13px !important;
    border-radius: 9px !important;
    font-size: 12px !important;
  }
  .et-route-show-details .ets-actions .ets-contribute { grid-column: auto !important; }

  /* App-style progress module: dense state, stronger progress, no dashboard box. */
  .et-route-show-details .ets-watch { padding-block: 15px !important; }
  .et-route-show-details .ets-watch-state {
    grid-template-columns: 17px minmax(0, 1fr) auto !important;
    margin-top: 9px !important;
  }
  .et-route-show-details .ets-watch-state strong,
  .et-route-show-details .ets-watch-state b { font-size: 18px !important; }
  .et-route-show-details .ets-watch > p { margin: 6px 0 !important; }
  .et-route-show-details .ets-progress { height: 7px !important; margin: 8px 0 10px !important; }
  .et-route-show-details .ets-watch-next { padding-top: 9px !important; }
  .et-route-show-details .ets-side-button { min-height: 42px !important; margin-top: 9px !important; }

  /* Person details */
  body.et-route-person-details .etp-page { padding-top: 12px !important; }
  body.et-route-person-details .etp-hero { min-height: 420px !important; }
  body.et-route-person-details .etp-hero-content {
    display: grid !important;
    grid-template-columns: 120px minmax(0, 1fr) !important;
    align-items: end !important;
    gap: 16px !important;
    min-height: 420px !important;
    padding: 58px 14px 16px !important;
  }
  body.et-route-person-details .etp-portrait { width: 120px !important; margin-bottom: 10px !important; border-radius: 8px !important; }
  body.et-route-person-details .etp-portrait-wrap { align-self: end !important; }
  body.et-route-person-details .etp-identity { align-self: end !important; margin: 0 !important; }
  body.et-route-person-details .etp-name h1,
  body.et-route-person-details .etp-identity h1 {
    max-width: 100% !important;
    overflow-wrap: anywhere !important;
    white-space: normal !important;
  }
  body.et-route-person-details .etp-name h1 { font-size: 38px !important; line-height: 1 !important; }
  body.et-route-person-details .etp-hero-meta { gap: 6px !important; margin-block: 8px !important; }
  body.et-route-person-details .etp-hero-bio {
    display: -webkit-box !important;
    margin: 10px 0 !important;
    overflow: hidden;
    font-size: 13px !important;
    line-height: 1.48 !important;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
  }
  body.et-route-person-details .etp-hero-actions { display: grid !important; grid-template-columns: 1fr 1fr; gap: 8px !important; }
  body.et-route-person-details .etp-actions { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 8px !important; }
  body.et-route-person-details .etp-tabs { margin-inline: 0 !important; }
  body.et-route-person-details .etp-panel,
  body.et-route-person-details .etp-side-card { padding: var(--et-mobile-card-pad) !important; border-radius: var(--et-mobile-radius) !important; }

  /* Discover */
  .etd-page { padding-top: 12px !important; }
  .etd-heading h1 { font-size: 32px !important; }
  .etd-stats { display: grid !important; grid-template-columns: repeat(2, 1fr) !important; gap: 8px !important; overflow: visible !important; }
  .etd-stats > * { min-width: 0 !important; min-height: 70px !important; padding: 10px !important; }
  .etd-card-grid { gap: 15px 9px !important; }
  .etd-card { border-radius: 10px !important; }
  .etd-card-copy { padding: 9px !important; }

  /* Schedule */
  .etsc-page { padding-top: 10px !important; }
  .etsc-heading h1 { font-size: 30px !important; }
  .etsc-date-nav { margin-inline: calc(-1 * var(--et-mobile-gutter)) !important; padding-inline: var(--et-mobile-gutter) !important; }
  .etsc-date-nav > a { flex-basis: 105px !important; min-height: 54px !important; }
  .etsc-day { border-inline: 0 !important; border-radius: 8px !important; }
  .etsc-row { grid-template-columns: 78px minmax(0, 1fr) auto !important; min-height: 94px !important; padding: 9px 4px !important; }
  .etsc-thumb { width: 78px !important; }
  .etsc-reminder { justify-self: end; }
  .etsc-reminder button, .etsc-reminder > a { width: auto !important; min-height: 38px !important; padding-inline: 12px !important; }
  .etsc-highlights, .etsc-mini-calendar, .etsc-filters { padding: var(--et-mobile-card-pad) !important; }

  /* Rankings */
  body[class*="et-route-ranking"] .etr-page { padding-top: 10px !important; }
  .etr-mobile-filter-toggle {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 44px;
    margin-bottom: 9px;
    color: var(--etr-yellow);
    background: var(--etr-surface);
    border: 1px solid var(--etr-line);
    border-radius: 8px;
    font-weight: 850;
  }
  .etr-mobile-filter-toggle[hidden] { display: flex !important; }
  .etr-filterbar:not(.is-open) { display: none !important; }
  .etr-filterbar.is-open { margin-bottom: 10px !important; }
  .etr-show-list { border-inline: 0 !important; border-radius: 8px !important; }
  .etr-show-row { grid-template-columns: 31px 78px minmax(0, 1fr) !important; min-height: 104px !important; padding: 8px 3px !important; }
  .etr-show-image { width: 78px !important; }
  .etr-overview { display: none !important; }
  .etr-score { grid-column: 2 / 4 !important; min-height: 30px; }
  .etr-person-card { border-radius: 10px !important; }

  /* Community */
  .etc-community { padding-top: 10px !important; }
  .etc-heading h1 { font-size: 32px !important; }
  .etc-stats { grid-template-columns: repeat(2, 1fr) !important; gap: 7px !important; }
  .etc-stats > div { min-height: 64px !important; padding: 10px !important; border-radius: 9px !important; }
  .etc-tabs { margin-inline: calc(-1 * var(--et-mobile-gutter)) !important; padding-inline: var(--et-mobile-gutter) !important; }
  .etc-feed { border-inline: 0 !important; border-radius: 8px !important; }
  .etc-discussion { min-height: 0 !important; padding: 13px 3px !important; gap: 10px !important; }
  .etc-discussion h2 { margin-top: 7px !important; font-size: 17px !important; }
  .etc-discussion-image { max-height: 150px !important; border-radius: 8px !important; }
  .etc-card-copy > footer { margin-top: 9px !important; }
  .etc-sidebar > section { padding: var(--et-mobile-card-pad) !important; border-radius: var(--et-mobile-radius) !important; }

  /* Watchlist */
  .etw-page { padding-top: 14px !important; padding-bottom: 72px !important; }
  .etw-tabs { margin-inline: calc(-1 * var(--et-mobile-gutter)) !important; padding-inline: var(--et-mobile-gutter) !important; }
  .etw-toolbar { gap: 8px !important; }
  .etw-grid { gap: 12px 8px !important; }
  .et-watch-card { border-radius: 10px !important; }
  .et-watch-body { padding: 8px !important; }
  .et-watch-body h2 { font-size: 15px !important; }
  .et-watch-body p { margin-block: 5px !important; }
  .et-watch-menu { z-index: 50 !important; }
  .et-watch-card:has(.et-watch-menu[open]) { z-index: 60 !important; overflow: visible !important; }

  /* Own/public profile */
  body:not(.et-route-person-details) .etp-page { padding-top: 8px !important; padding-bottom: 72px !important; }
  body:not(.et-route-person-details) .etp-hero { min-height: 250px !important; margin-inline: calc(-1 * var(--et-mobile-gutter)) !important; }
  body:not(.et-route-person-details) .etp-identity { right: var(--et-mobile-gutter) !important; bottom: 14px !important; left: var(--et-mobile-gutter) !important; }
  body:not(.et-route-person-details) .etp-stats { grid-template-columns: repeat(5, minmax(64px, 1fr)) !important; overflow-x: auto; }
  body:not(.et-route-person-details) .etp-tabs { margin-inline: calc(-1 * var(--et-mobile-gutter)) !important; padding-inline: var(--et-mobile-gutter) !important; }
  body:not(.et-route-person-details) .etp-section,
  body:not(.et-route-person-details) .etp-side section { margin-inline: 0 !important; padding: var(--et-mobile-card-pad) !important; border-radius: var(--et-mobile-radius) !important; }

  /* Search */
  .et-route-search .ets-shell { padding-top: 12px !important; }
  .et-route-search .ets-heading h1 { font-size: 30px !important; }
  .et-route-search .ets-tabs { margin-inline: 0 !important; }
  .et-route-search .ets-section { padding: 12px 3px !important; border-inline: 0 !important; border-radius: 8px !important; }
  .et-route-search .ets-show-row { grid-template-columns: 59px minmax(0, 1fr) 12px !important; min-height: 104px !important; }
  .et-route-search .ets-show-poster img { width: 59px !important; height: 88px !important; }
  .et-search-shell--mobile .et-search-panel.is-open { width: 100% !important; height: 100dvh !important; }

  /* Year / Network / Genre browse */
  .etb-page { padding-top: 10px !important; }
  .etb-hero { min-height: 155px !important; padding: 19px 16px !important; border-radius: var(--et-mobile-radius) !important; }
  .etb-hero h1 { font-size: 31px !important; }
  .etb-section { padding-block: 17px !important; }
  .etb-popular-row > a { flex-basis: 118px !important; min-height: 86px !important; }
  .etb-year-grid a { min-height: 62px !important; }
  .etb-network-grid > a { min-height: 164px !important; }
  .etb-contribute { padding: 14px !important; border-radius: var(--et-mobile-radius) !important; }

  /* Public contribution hub */
  .et-contribute-shell { padding-top: 12px !important; padding-bottom: 56px !important; }
  .et-contribute-hero { min-height: 0 !important; padding: 23px 17px !important; border-radius: var(--et-mobile-radius) !important; }
  .et-contribute-hero h1, .et-page-heading h1 { font-size: 34px !important; line-height: 1.02 !important; }
  .et-contribute-hero p { font-size: 15px !important; line-height: 1.5 !important; }
  .et-contribute-grid { gap: 9px !important; }
  .et-contribute-card { padding: 15px !important; border-radius: var(--et-mobile-radius) !important; }
  .et-contribute-card p { min-height: 0 !important; }
  .et-section { padding: var(--et-mobile-card-pad) !important; border-radius: var(--et-mobile-radius) !important; }
  .et-guide-strip { padding: 16px !important; }

  /* Contributor Studio: section selector replaces desktop rail. */
  .etcs-layout { display: block !important; min-height: 0 !important; }
  .etcs-rail { display: none !important; }
  .etcs-main { width: 100% !important; padding: 9px var(--et-mobile-gutter) 36px !important; }
  .etcs-show-head { min-height: 148px !important; grid-template-columns: 74px minmax(0, 1fr) !important; gap: 11px !important; padding: 9px !important; }
  .etcs-show-head > img { width: 74px !important; }
  .etcs-show-copy h1 { font-size: 22px !important; }
  .etcs-show-copy > p { margin-block: 6px !important; font-size: 12px !important; }
  .etcs-provider-row { gap: 8px !important; font-size: 10px !important; }
  .etcs-head-actions { grid-column: 1 / -1 !important; gap: 7px !important; }
  .etcs-mobile-section { position: sticky; z-index: 20; top: 0; padding: 7px 0; margin-block: 7px !important; background: var(--cs-bg); }
  .etcs-panel { padding: 11px !important; border-radius: var(--et-mobile-radius) !important; }
  .etcs-season-grid { gap: 7px !important; }
  .etcs-season-grid > a, .etcs-season-grid > button.etcs-add-card { min-height: 82px !important; }
  .etcs-detail-list > div { grid-template-columns: 95px minmax(0, 1fr) !important; gap: 8px !important; }
  .etcs-side { position: static !important; order: 2; }
  .etcs-smart-results { right: var(--et-mobile-gutter) !important; bottom: var(--et-mobile-gutter) !important; left: var(--et-mobile-gutter) !important; }

  /* Import, migration and account/admin utility pages. */
  body.et-route-import .et-page-shell,
  body[class*="et-route-import-"] .et-page-shell,
  body[class*="et-route-admin"] .et-page-shell,
  body[class*="et-route-user-edit"] .et-page-shell { padding-inline: var(--et-mobile-gutter) !important; }
  body.et-route-import :is(.et-import-hero, .et-import-panel),
  body[class*="et-route-import-"] :is(.et-import-hero, .et-import-panel, .et-tvtime-card),
  body[class*="et-route-user-edit"] :is(.etu-panel, .etu-card) { padding: var(--et-mobile-card-pad) !important; border-radius: var(--et-mobile-radius) !important; }
  body[class*="et-route-admin"] table,
  body[class*="et-route-contribution"] table { display: block; max-width: 100%; overflow-x: auto; white-space: nowrap; }

  /* Full-bleed mobile composition. Large visual regions touch the viewport edge,
     while text and controls keep the shared readable gutter. */
  .eth-hero,
  .et-route-show-details .ets-hero,
  body.et-route-person-details .etp-hero,
  .etb-hero,
  .et-contribute-hero {
    width: calc(100% + (2 * var(--et-mobile-gutter))) !important;
    margin-inline: calc(-1 * var(--et-mobile-gutter)) !important;
    border-inline: 0 !important;
    border-radius: 0 !important;
  }
  .et-route-home .eth-hero {
    width: 100vw !important;
    margin-left: calc(-1 * var(--et-mobile-gutter)) !important;
    margin-right: 0 !important;
  }
  .eth-hero,
  .et-route-show-details .ets-hero,
  body.et-route-person-details .etp-hero {
    border-top: 0 !important;
  }
  .et-nav-links {
    border-inline: 0 !important;
    border-radius: 0 !important;
  }

  /* Tabs are navigation rails rather than another rounded card. */
  .et-route-show-details .ets-tabs,
  body.et-route-person-details .etp-tabs,
  .et-route-search .ets-tabs {
    width: calc(100% + (2 * var(--et-mobile-gutter))) !important;
    margin-inline: calc(-1 * var(--et-mobile-gutter)) !important;
    padding-inline: var(--et-mobile-gutter) !important;
    border-inline: 0 !important;
    border-radius: 0 !important;
  }

  /* Detail pages use continuous sections and fine separators on phones. */
  .et-route-show-details :is(.ets-main, .ets-sidebar),
  body.et-route-person-details :is(.etp-main, .etp-sidebar) {
    gap: 0 !important;
  }
  .et-route-show-details :is(.ets-overview-grid, .ets-people-pair, .ets-feature-strip),
  body.et-route-person-details .etp-about-body {
    gap: 0 !important;
  }
  .et-route-show-details :is(.ets-panel, .ets-side-card),
  body.et-route-person-details :is(.etp-panel, .etp-side-card) {
    width: calc(100% + (2 * var(--et-mobile-gutter))) !important;
    margin: 0 calc(-1 * var(--et-mobile-gutter)) !important;
    padding: 16px var(--et-mobile-gutter) !important;
    background: transparent !important;
    border: 0 !important;
    border-bottom: 1px solid var(--eth-line, var(--eth-border, #26313b)) !important;
    border-radius: 0 !important;
    box-shadow: none !important;
  }
  .et-route-show-details :is(.ets-airtime, .ets-insights) {
    margin-inline: calc(-1 * var(--et-mobile-gutter)) !important;
    padding-inline: var(--et-mobile-gutter) !important;
    background: transparent !important;
    border: 0 !important;
    border-bottom: 1px solid var(--eth-line, var(--eth-border, #26313b)) !important;
    border-radius: 0 !important;
  }
  body.et-route-person-details .etp-about-grid {
    padding: 13px 0 0 !important;
    border: 0 !important;
    border-top: 1px solid var(--eth-line, var(--eth-border, #26313b)) !important;
  }

  /* Desktop sidebars become a seamless continuation of the mobile document. */
  .eth-sidebar,
  .etsc-sidebar,
  .etr-sidebar,
  .etc-sidebar,
  body:not(.et-route-person-details) .etp-side,
  .etcs-side {
    gap: 0 !important;
  }
  .eth-sidebar > :is(.eth-side-card, .eth-app-card),
  .etsc-sidebar > :is(section, form),
  .etr-sidebar > section,
  .etc-sidebar > section,
  body:not(.et-route-person-details) .etp-side > section,
  .etcs-side > section,
  .etcs-side > .etcs-panel {
    width: calc(100% + (2 * var(--et-mobile-gutter))) !important;
    margin: 0 calc(-1 * var(--et-mobile-gutter)) !important;
    padding: 16px var(--et-mobile-gutter) !important;
    background: transparent !important;
    border: 0 !important;
    border-bottom: 1px solid var(--eth-line, var(--eth-border, #26313b)) !important;
    border-radius: 0 !important;
    box-shadow: none !important;
  }

  /* Main reader sections on social/profile/schedule pages follow the same flat
     rhythm; interactive cards inside them keep their own affordance. */
  .etsc-day,
  .etc-feed,
  body:not(.et-route-person-details) .etp-section,
  .et-route-search .ets-section {
    margin-inline: calc(-1 * var(--et-mobile-gutter)) !important;
    padding-inline: var(--et-mobile-gutter) !important;
    background: transparent !important;
    border-inline: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
  }

  /* Compact footer without changing its desktop columns. */
  .et-footer { padding-block: 22px !important; }
  .et-footer-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 18px 12px !important; }
}

@media (max-width: 480px) {
  .et-auth-link { padding-inline: 7px !important; font-size: 11px !important; }
  .eth-feature { display: none !important; }
  .eth-hero { min-height: 340px !important; }
  .eth-hero-copy > p { -webkit-line-clamp: 2 !important; }
  .et-route-show-details .ets-hero { min-height: 395px !important; }
  .et-route-show-details .ets-hero-art { background-position: 62% center !important; }
  .et-route-show-details .ets-hero-content {
    display: grid !important;
    grid-template-columns: 92px minmax(0, 1fr) !important;
    grid-template-rows: repeat(6, auto) auto auto !important;
    align-items: end !important;
    gap: 10px !important;
    min-height: 395px !important;
    padding: 42px 12px 11px !important;
  }
  .et-route-show-details .ets-poster { width: 92px !important; margin: 0 !important; }
  .et-route-show-details .ets-poster-wrap { grid-column: 1 !important; grid-row: 1 / 7 !important; align-self: end !important; }
  .et-route-show-details .ets-identity { display: contents !important; }
  .et-route-show-details .ets-identity h1 { font-size: 32px !important; }
  .et-route-show-details .ets-tagline { font-size: 13px !important; }
  .et-route-show-details .ets-meta-line { font-size: 10px !important; }
  .et-route-show-details .ets-overview { font-size: 11px !important; -webkit-line-clamp: 2 !important; }
  .et-route-show-details .ets-actions { grid-column: 1 / -1; }
  body.et-route-person-details .etp-hero { min-height: 415px !important; }
  body.et-route-person-details .etp-hero-art { background-position: 62% center !important; }
  body.et-route-person-details .etp-hero-content {
    display: grid !important;
    grid-template-columns: 94px minmax(0, 1fr) !important;
    align-items: end !important;
    gap: 10px !important;
    min-height: 415px !important;
    padding: 76px 12px 12px !important;
  }
  body.et-route-person-details .etp-portrait { width: 94px !important; margin: 0 !important; }
  body.et-route-person-details .etp-portrait-wrap { grid-column: 1; grid-row: 1; align-self: end; }
  body.et-route-person-details .etp-identity { position: static !important; grid-column: 2; grid-row: 1; align-self: end; }
  body.et-route-person-details .etp-identity h1 { font-size: 29px !important; }
  body.et-route-person-details .etp-occupation-line { margin-block: 7px !important; font-size: 13px !important; }
  body.et-route-person-details .etp-hero-facts { gap: 4px !important; font-size: 11px !important; }
  body.et-route-person-details .etp-tags { gap: 4px !important; }
  body.et-route-person-details .etp-hero-bio { font-size: 11px !important; -webkit-line-clamp: 2 !important; }
  body.et-route-person-details .etp-actions { grid-column: 1 / -1; }
  .etsc-row { grid-template-columns: 70px minmax(0, 1fr) auto !important; }
  .etsc-thumb { width: 70px !important; }
  .etsc-reminder { grid-column: 3 !important; justify-self: end !important; }
  .etsc-reminder button, .etsc-reminder > a { width: 44px !important; min-width: 44px !important; padding: 0 !important; overflow: hidden; font-size: 0 !important; }
  .etsc-reminder button::before, .etsc-reminder > a::before { content: "♧"; font-size: 17px; }
}

@media (max-width: 360px) {
  :root { --et-mobile-gutter: 10px; }
  .et-logo-mark { width: 38px !important; height: 38px !important; }
  .et-nav-actions .et-theme-toggle,
  .et-account-nav .et-user-chip,
  .et-search-shell--mobile > button { width: 42px !important; min-width: 42px !important; min-height: 42px !important; }
  .et-auth-link { padding-inline: 6px !important; font-size: 10px !important; }
  .eth-hero h1 { font-size: 37px !important; }
  .etd-card-grid, .etw-grid { gap-inline: 7px !important; }
}
