/* Riley+ iPhone presentation layer. Desktop remains defined by styles.css. */
@media (max-width: 850px) {
  :root {
    color-scheme: dark;
    --mobile-pad: 20px;
    --mobile-nav-height: 76px;
    --mobile-green: #31e6aa;
    --mobile-surface: #17171a;
    --mobile-surface-2: #242428;
    --mobile-muted: #a4a4ad;
  }

  html {
    min-width: 0;
    background: #000;
    scrollbar-width: none;
  }

  html::-webkit-scrollbar,
  body::-webkit-scrollbar,
  .rail-grid::-webkit-scrollbar,
  .continue-grid::-webkit-scrollbar,
  .service-switcher::-webkit-scrollbar {
    display: none;
  }

  body {
    min-width: 0;
    min-height: 100svh;
    margin: 0;
    overflow-x: hidden;
    background: #000;
    color: #f7f7f9;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", sans-serif;
    letter-spacing: 0;
    -webkit-tap-highlight-color: transparent;
  }

  [hidden] {
    display: none !important;
  }

  button,
  input,
  select {
    font: inherit;
  }

  button,
  a {
    -webkit-tap-highlight-color: transparent;
  }

  button:active,
  a:active,
  .media-card:active,
  .result-row:active,
  .profile-option:active {
    transform: scale(0.97);
  }

  .interaction-ripple,
  .rail-control,
  .app-fullscreen-control,
  .profile-fullscreen-hint,
  .install-nav,
  .app-exit-nav {
    display: none !important;
  }

  .startup-intro {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: grid;
    place-items: center;
    overflow: hidden;
    background: #000;
    opacity: 1;
    transition: opacity 420ms ease;
  }

  .startup-intro.is-exiting {
    opacity: 0;
    pointer-events: none;
  }

  .startup-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #000;
  }

  .startup-start-button {
    display: none !important;
  }

  .site-header {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    z-index: 120;
    height: calc(58px + env(safe-area-inset-top));
    padding: env(safe-area-inset-top) var(--mobile-pad) 0;
    border: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.76), transparent);
    pointer-events: none;
  }

  .site-header .brand,
  .site-header .main-nav {
    display: none !important;
  }

  .profile-button {
    position: absolute;
    top: calc(env(safe-area-inset-top) + 10px);
    right: var(--mobile-pad);
    display: grid;
    width: 42px;
    height: 42px;
    min-width: 42px;
    padding: 0;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.7);
    border-radius: 50%;
    background: #252529;
    box-shadow: 0 6px 22px rgba(0, 0, 0, 0.35);
    pointer-events: auto;
    transition: transform 160ms ease, border-color 160ms ease;
  }

  .profile-button:active {
    transform: scale(0.93);
  }

  .profile-button .profile-initial {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background-position: center;
    background-size: cover;
    color: transparent;
  }

  .profile-button .profile-name {
    display: none;
  }

  .page-shell {
    width: 100%;
    min-height: 100svh;
    margin: 0;
    padding: 0 0 calc(var(--mobile-nav-height) + env(safe-area-inset-bottom) + 18px);
  }

  .page-back-button {
    display: none !important;
  }

  body[data-screen="watch"] .page-back-button {
    position: fixed;
    top: calc(env(safe-area-inset-top) + 14px);
    left: 16px;
    z-index: 420;
    display: inline-flex !important;
    align-items: center;
    gap: 7px;
    min-height: 44px;
    padding: 0 17px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 22px;
    background: rgba(24, 24, 27, 0.82);
    color: #fff;
    font-weight: 700;
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
  }

  body[data-screen="watch"] .page-back-button svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.4;
  }

  .search-panel {
    position: relative;
    display: block;
    width: 100%;
    min-height: 76svh;
    margin: 0;
    padding: 0;
    overflow: hidden;
    border: 0;
    border-radius: 0;
    background: #000;
    box-shadow: none;
  }

  .billboard-art {
    position: absolute;
    inset: 0;
    display: block;
    background-image:
      linear-gradient(180deg, rgba(0, 0, 0, 0.1) 0%, rgba(0, 0, 0, 0.05) 36%, rgba(0, 0, 0, 0.82) 76%, #000 100%),
      var(--billboard);
    background-position: center top;
    background-size: cover;
    transform: scale(1.01);
  }

  .home-topbar {
    display: none !important;
  }

  .search-copy {
    position: absolute;
    right: var(--mobile-pad);
    bottom: 178px;
    left: var(--mobile-pad);
    z-index: 2;
    max-width: 630px;
    padding: 0;
    display: block !important;
  }

  .search-copy .kicker {
    display: block;
    margin: 0 0 8px;
    color: var(--mobile-green);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
  }

  .search-copy h1 {
    max-width: 12ch;
    margin: 0;
    color: #fff;
    font-size: clamp(36px, 11vw, 58px);
    font-weight: 800;
    line-height: 0.96;
    letter-spacing: 0;
    text-wrap: balance;
  }

  .hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 14px 0 0;
  }

  .hero-meta span {
    padding: 5px 9px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 6px;
    background: rgba(25, 25, 27, 0.62);
    color: #efeff2;
    font-size: 11px;
    font-weight: 650;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
  }

  .hero-description {
    display: -webkit-box;
    max-width: 36rem;
    margin: 12px 0 0;
    overflow: hidden;
    color: rgba(255, 255, 255, 0.76);
    font-size: 14px;
    line-height: 1.45;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .billboard-actions {
    position: absolute;
    right: var(--mobile-pad);
    bottom: 112px;
    left: var(--mobile-pad);
    z-index: 3;
    display: flex;
    gap: 10px;
    padding: 0;
  }

  .billboard-actions .primary-action,
  .billboard-actions .secondary-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 20px;
    border: 0;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 750;
    min-width: 112px;
    white-space: nowrap;
    transition: transform 160ms ease, background-color 160ms ease;
  }

  .billboard-actions .primary-action {
    background: #fff;
    color: #050505;
  }

  .billboard-actions .secondary-action {
    background: rgba(37, 37, 40, 0.84);
    color: #fff;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
  }

  .billboard-actions svg {
    width: 18px;
    height: 18px;
    margin-right: 8px;
    fill: currentColor;
    stroke: currentColor;
  }

  .channels-label {
    display: none;
  }

  .service-switcher {
    position: absolute;
    right: 0;
    bottom: 20px;
    left: 0;
    z-index: 3;
    display: flex;
    gap: 9px;
    width: auto;
    max-width: none;
    margin: 0;
    padding: 0 var(--mobile-pad);
    overflow-x: auto;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    scroll-padding-inline: var(--mobile-pad);
    scroll-snap-type: x proximity;
    scrollbar-width: none;
  }

  .service-switcher button {
    flex: 0 0 auto;
    width: 116px;
    height: 54px;
    padding: 13px 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    background: rgba(27, 27, 30, 0.82);
    opacity: 0.62;
    scroll-snap-align: start;
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    transition: opacity 160ms ease, transform 160ms ease, border-color 160ms ease, background-color 160ms ease;
  }

  .service-switcher button.active {
    border-color: rgba(255, 255, 255, 0.42);
    background: rgba(248, 248, 250, 0.96);
    opacity: 1;
  }

  .service-switcher button img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: none;
  }

  .search-form {
    display: none;
  }

  body[data-screen="search"] .search-panel {
    min-height: 126px;
    padding: calc(env(safe-area-inset-top) + 72px) var(--mobile-pad) 12px;
    overflow: visible;
  }

  body[data-screen="search"] .billboard-art,
  body[data-screen="search"] .search-copy,
  body[data-screen="search"] .billboard-actions,
  body[data-screen="search"] .channels-label,
  body[data-screen="search"] .service-switcher {
    display: none !important;
  }

  body[data-screen="search"] .search-form {
    display: flex;
    width: 100%;
    min-height: 52px;
    padding: 4px 5px 4px 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    background: #1c1c1f;
  }

  .search-form input {
    min-width: 0;
    flex: 1;
    border: 0;
    outline: 0;
    background: transparent;
    color: #fff;
    font-size: 17px;
  }

  .search-form button {
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    border: 0;
    border-radius: 7px;
    background: #f5f5f7;
    color: #060606;
  }

  .search-form svg {
    width: 21px;
    height: 21px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
  }

  .search-status {
    position: static;
    margin: 8px var(--mobile-pad) 0;
    color: var(--mobile-muted);
    font-size: 13px;
  }

  .continue-section,
  .featured-section,
  .results-section,
  .library-section {
    width: 100%;
    margin: 0;
    padding: 0;
    background: #000;
  }

  .continue-section {
    padding-top: 20px;
  }

  .section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 0 var(--mobile-pad);
  }

  .section-title h2,
  .rail-section > h2 {
    margin: 0;
    color: #f5f5f7;
    font-size: 21px;
    font-weight: 750;
    line-height: 1.15;
    letter-spacing: 0;
  }

  .section-title h2 > span:first-child,
  .rail-section > h2 > span:first-child {
    display: none;
  }

  .link-button {
    min-height: 38px;
    padding: 0 13px;
    border: 0;
    border-radius: 7px;
    background: #202023;
    color: #f5f5f7;
    font-size: 13px;
    font-weight: 700;
  }

  .rail-frame {
    width: 100%;
    overflow: visible;
  }

  .continue-grid,
  .rail-grid {
    display: flex;
    gap: 12px;
    width: 100%;
    padding: 14px var(--mobile-pad) 8px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-padding-inline: var(--mobile-pad);
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }

  .rail-section {
    width: 100%;
    margin: 26px 0 0;
    padding: 0;
  }

  .rail-section > h2 {
    padding: 0 var(--mobile-pad);
  }

  .media-card {
    display: block;
    flex: 0 0 clamp(152px, 42vw, 190px);
    width: clamp(152px, 42vw, 190px);
    min-width: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #fff;
    text-align: left;
    scroll-snap-align: start;
    box-shadow: none;
    transition: transform 160ms ease, opacity 160ms ease;
  }

  .card-poster {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    background: #141416;
    background-image: none !important;
    box-shadow: none;
  }

  .card-poster-image {
    position: absolute;
    inset: 0;
    z-index: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .poster-fallback {
    position: absolute !important;
    inset: 0;
    z-index: 0 !important;
    display: grid;
    place-items: center;
    padding: 12px;
    color: #777780;
    font-size: 13px;
    text-align: center;
  }

  .card-poster-image + .poster-fallback {
    opacity: 0;
  }

  .media-card .rating {
    position: absolute !important;
    right: 7px;
    bottom: 7px;
    z-index: 2 !important;
    min-width: 0;
    padding: 4px 6px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 5px;
    background: rgba(0, 0, 0, 0.66);
    color: #fff;
    font-size: 10px;
    font-weight: 750;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }

  .media-card > strong {
    display: -webkit-box;
    margin: 9px 1px 0;
    overflow: hidden;
    color: #f0f0f3;
    font-size: 14px;
    font-weight: 650;
    line-height: 1.25;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .media-card > span:last-child {
    display: block;
    margin: 4px 1px 0;
    color: #8d8d96;
    font-size: 12px;
    line-height: 1.25;
  }

  .continue-grid {
    gap: 14px;
    padding-top: 16px;
  }

  .continue-card {
    flex-basis: min(78vw, 330px);
    width: min(78vw, 330px);
  }

  .continue-card .card-poster {
    aspect-ratio: 16 / 9;
  }

  .continue-card > strong,
  .continue-card > span:last-child,
  .continue-card .rating {
    display: none !important;
  }

  .continue-card .card-poster::after {
    content: "";
    position: absolute;
    inset: 42% 0 0;
    z-index: 1;
    background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.76));
    pointer-events: none;
  }

  .watch-progress {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 3;
    height: 4px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.24);
  }

  .watch-progress::before {
    content: "";
    display: block;
    width: var(--progress);
    height: 100%;
    background: var(--mobile-green);
  }

  .continue-label {
    position: absolute;
    bottom: 10px;
    left: 11px;
    z-index: 4;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
  }

  .featured-section {
    padding-bottom: 26px;
  }

  .mobile-nav {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 350;
    display: grid !important;
    grid-template-columns: repeat(3, 1fr);
    height: calc(var(--mobile-nav-height) + env(safe-area-inset-bottom));
    padding: 8px 14px env(safe-area-inset-bottom);
    border-top: 1px solid rgba(255, 255, 255, 0.09);
    background: rgba(12, 12, 14, 0.88);
    box-shadow: 0 -8px 28px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(22px) saturate(1.35);
    -webkit-backdrop-filter: blur(22px) saturate(1.35);
  }

  .mobile-nav button {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-width: 0;
    padding: 4px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: #8d8d96;
    font-size: 10px;
    font-weight: 650;
    transition: color 160ms ease, transform 160ms ease;
  }

  .mobile-nav button.active {
    background: transparent !important;
    color: #fff;
  }

  .mobile-nav svg {
    width: 25px;
    height: 25px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
  }

  body[data-screen="watch"] .mobile-nav,
  body.modal-open .mobile-nav {
    display: none !important;
  }

  body[data-screen="watch"] .site-header,
  body.modal-open .site-header {
    display: none;
  }

  .results-section {
    min-height: calc(100svh - 200px);
    padding: 8px var(--mobile-pad) 32px;
  }

  .results-section .screen-kicker {
    color: var(--mobile-green);
    font-size: 12px;
    font-weight: 800;
  }

  .results-section h2 {
    margin: 7px 0 18px;
    font-size: 28px;
    letter-spacing: 0;
  }

  .results-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px 12px;
  }

  .result-row {
    display: block;
    min-width: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #fff;
    text-align: left;
    transition: transform 160ms ease;
  }

  .result-poster {
    display: block;
    width: 100%;
    aspect-ratio: 2 / 3;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    background-color: #17171a;
    background-image: var(--poster);
    background-position: center;
    background-size: cover;
  }

  .result-title {
    display: -webkit-box;
    margin-top: 8px;
    overflow: hidden;
    color: #f5f5f7;
    font-size: 14px;
    font-weight: 650;
    line-height: 1.25;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .result-title .badge,
  .result-description {
    display: none;
  }

  .result-meta {
    display: flex;
    gap: 5px;
    margin-top: 5px;
    color: #8d8d96;
    font-size: 11px;
  }

  .result-meta span {
    padding: 0;
    border: 0;
    background: transparent;
  }

  .library-section {
    min-height: 100svh;
    padding: calc(env(safe-area-inset-top) + 72px) var(--mobile-pad) 30px;
  }

  .library-hero {
    margin: 0 0 22px;
    padding: 0;
  }

  .library-hero .screen-kicker,
  .library-hero p {
    display: none;
  }

  .library-hero h1 {
    margin: 0;
    color: #fff;
    font-size: 34px;
    letter-spacing: 0;
  }

  .library-section .section-title {
    padding: 0;
  }

  .library-mode-switch {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3px;
    margin: 18px 0 20px;
    padding: 3px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    background: #17171a;
  }

  .library-mode-switch button {
    min-height: 40px;
    padding: 0 10px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #9999a2;
    font-size: 13px;
    font-weight: 700;
  }

  .library-mode-switch button.active {
    background: #f5f5f7;
    color: #08080a;
  }

  .library-section .featured-grid.compact {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px 12px;
    padding: 0;
  }

  .library-section .media-card {
    width: 100%;
  }

  .empty-state {
    grid-column: 1 / -1;
    padding: 54px 10px;
    color: var(--mobile-muted);
    text-align: center;
  }

  .title-modal {
    position: fixed;
    inset: 0;
    z-index: 500;
    display: block;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    background: #08090d;
  }

  .title-modal .modal-backdrop {
    display: none;
  }

  .title-modal .modal-panel {
    position: relative;
    display: block;
    width: 100%;
    min-height: 100svh;
    max-width: none;
    margin: 0;
    padding: 0 0 calc(28px + env(safe-area-inset-bottom));
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: #08090d;
    box-shadow: none;
  }

  .title-modal .modal-close {
    display: none !important;
  }

  .title-modal .modal-back-button {
    position: fixed;
    top: calc(env(safe-area-inset-top) + 14px);
    left: 16px;
    z-index: 5;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 44px;
    padding: 0 17px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 22px;
    background: rgba(24, 24, 27, 0.82);
    color: #fff;
    font-weight: 700;
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
  }

  .title-modal .modal-back-button svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.4;
  }

  .title-modal .modal-backdrop-art {
    position: relative;
    inset: auto;
    display: block;
    width: 100%;
    height: 50svh;
    min-height: 390px;
    background-image:
      linear-gradient(180deg, rgba(8, 9, 13, 0.08), rgba(8, 9, 13, 0.08) 42%, #08090d 100%),
      var(--modal-backdrop);
    background-position: center top;
    background-size: cover;
    opacity: 1;
  }

  .title-modal .modal-content {
    position: relative;
    z-index: 2;
    display: block;
    width: auto;
    margin: -116px 0 0;
    padding: 0 var(--mobile-pad) 12px;
  }

  .title-modal .modal-poster {
    display: none;
  }

  .title-modal .modal-copy {
    width: 100%;
    max-width: 680px;
  }

  .title-modal .modal-eyebrow {
    display: block;
    margin-bottom: 8px;
    color: var(--mobile-green);
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
  }

  .title-modal .modal-copy h2 {
    max-width: 12ch;
    margin: 0;
    color: #fff;
    font-size: clamp(40px, 12vw, 60px);
    font-weight: 820;
    line-height: 0.97;
    letter-spacing: 0;
    overflow-wrap: anywhere;
  }

  .title-modal .modal-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin: 18px 0 0;
  }

  .title-modal .modal-meta span {
    padding: 7px 10px;
    border: 0;
    border-radius: 6px;
    background: #292a2f;
    color: #f0f0f3;
    font-size: 12px;
    font-weight: 700;
  }

  .title-modal .modal-description {
    margin: 19px 0 0;
    color: #c0c0c8;
    font-size: 16px;
    line-height: 1.5;
  }

  .title-modal .modal-current-episode {
    margin: 18px 0 0;
    color: #f3f3f5;
    font-size: 16px;
    font-weight: 720;
  }

  .title-modal .modal-episode-controls {
    display: none !important;
  }

  .title-modal .modal-actions {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    gap: 10px;
    margin-top: 22px;
  }

  .title-modal .modal-actions .primary-action,
  .title-modal .modal-actions .secondary-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    min-height: 52px;
    padding: 0 16px;
    border: 0;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 760;
  }

  .title-modal .modal-actions .primary-action {
    background: #f7f7f9;
    color: #08080a;
  }

  .title-modal .modal-actions .secondary-action {
    background: #2a2a2e;
    color: #fff;
  }

  .title-modal .modal-actions svg {
    width: 19px;
    height: 19px;
    margin-right: 8px;
    fill: currentColor;
  }

  .modal-show-extras {
    margin: 18px 0 0;
    padding: 0 var(--mobile-pad);
  }

  .modal-tabs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    border-bottom: 1px solid #303038;
  }

  .modal-tabs button {
    position: relative;
    min-height: 48px;
    padding: 0 4px;
    border: 0;
    background: transparent;
    color: #8f8f98;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
  }

  .modal-tabs button.active {
    color: #fff;
  }

  .modal-tabs button.active::after {
    content: "";
    position: absolute;
    right: 12%;
    bottom: -1px;
    left: 12%;
    height: 3px;
    border-radius: 2px;
    background: #fff;
  }

  .modal-season-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 0 12px;
  }

  .modal-season-button {
    min-height: 42px;
    padding: 0 15px;
    border: 0;
    border-radius: 7px;
    background: #25262b;
    color: #fff;
    font-weight: 720;
  }

  .modal-season-menu {
    position: absolute;
    z-index: 8;
    min-width: 150px;
    max-height: 250px;
    padding: 6px;
    overflow-y: auto;
    border: 1px solid #33343b;
    border-radius: 8px;
    background: rgba(25, 25, 28, 0.96);
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.48);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
  }

  .modal-episode-grid,
  .modal-suggested-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .modal-episode-card,
  .modal-suggested-card {
    display: grid;
    grid-template-columns: 42% minmax(0, 1fr);
    gap: 13px;
    width: 100%;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #fff;
    text-align: left;
  }

  .modal-episode-card.is-selected .modal-episode-thumb {
    outline: 2px solid #fff;
    outline-offset: 2px;
  }

  .modal-episode-thumb,
  .modal-suggested-thumb {
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 7px;
    background-position: center;
    background-size: cover;
  }

  body[data-screen="watch"] .player-section {
    position: relative;
    display: flex !important;
    min-height: 100svh;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 26px;
    padding: calc(env(safe-area-inset-top) + 76px) 14px calc(env(safe-area-inset-bottom) + 34px);
    background: #000;
  }

  body[data-screen="watch"] .hero-backdrop {
    position: relative;
    width: min(100%, 720px) !important;
    height: auto !important;
    aspect-ratio: 16 / 9;
    margin: 0 !important;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    background: #09090b;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
  }

  body[data-screen="watch"] .hero-backdrop iframe {
    position: absolute;
    inset: 0;
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    border: 0;
    opacity: 1 !important;
    visibility: visible !important;
  }

  .player-fullscreen {
    display: none !important;
  }

  .watch-episode-nav {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 10px;
    width: min(100%, 620px);
  }

  .watch-episode-nav button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-height: 46px;
    padding: 0 14px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    background: #202023;
    color: #fff;
    font-weight: 700;
  }

  .watch-episode-nav button:disabled {
    opacity: 0.35;
  }

  .watch-episode-nav svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.3;
  }

  .watch-episode-nav > span {
    color: #aaaab2;
    font-size: 13px;
    font-weight: 700;
  }

  .profile-sheet {
    position: fixed;
    inset: 0;
    z-index: 800;
    display: block;
    overflow-x: hidden;
    overflow-y: auto;
    background: #000;
  }

  .profile-sheet .install-backdrop {
    display: none;
  }

  .profile-panel {
    position: relative;
    display: flex;
    width: 100%;
    min-height: 100svh;
    max-width: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: calc(env(safe-area-inset-top) + 54px) var(--mobile-pad) calc(env(safe-area-inset-bottom) + 38px);
    border: 0;
    border-radius: 0;
    background: #000;
    box-shadow: none;
  }

  .profile-panel > .modal-close {
    position: fixed;
    top: calc(env(safe-area-inset-top) + 12px);
    left: 16px;
    z-index: 3;
    display: grid;
    width: 86px;
    height: 44px;
    place-items: center;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 999px;
    background: #222225;
    color: transparent;
    text-indent: -9999px;
  }

  .profile-panel > .modal-close::after {
    content: "\2039  Back";
    position: static !important;
    display: block !important;
    width: auto !important;
    height: auto !important;
    background: none !important;
    color: #fff;
    font-size: 14px;
    font-weight: 750;
    line-height: 1;
    text-indent: 0;
    transform: translateY(-1px);
  }

  .profile-sheet.startup-profile .modal-close {
    display: none;
  }

  .profile-panel .install-logo {
    display: block !important;
    width: 150px;
    max-height: 82px;
    margin: 0 0 20px;
    object-fit: contain;
  }

  .profile-panel h2 {
    margin: 0 0 34px;
    color: #fff;
    font-size: 32px;
    font-weight: 760;
    letter-spacing: 0;
  }

  .profile-options {
    display: grid;
    width: min(100%, 520px);
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px 12px;
  }

  .profile-option {
    display: flex;
    min-width: 0;
    flex-direction: column;
    align-items: center;
    gap: 9px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #fff;
    text-align: center;
    box-shadow: none;
    transition: transform 160ms ease, opacity 160ms ease;
  }

  .profile-avatar {
    display: block;
    width: clamp(76px, 23vw, 106px);
    height: clamp(76px, 23vw, 106px);
    overflow: hidden;
    border: 3px solid transparent;
    border-radius: 50%;
    background-position: center;
    background-size: cover;
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.35);
  }

  .profile-option.active .profile-avatar {
    border-color: #fff;
  }

  .profile-option strong {
    max-width: 100%;
    overflow: hidden;
    color: #f5f5f7;
    font-size: 14px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .profile-option > span:last-child {
    display: none;
  }

  .profile-add-option {
    grid-column: 1 / -1;
    justify-self: center;
    width: 110px;
    margin-top: 12px;
  }

  .profile-add-avatar {
    display: grid;
    width: 62px;
    height: 62px;
    place-items: center;
    background: #222225 !important;
    color: #fff;
    font-size: 30px;
  }

  .profile-status {
    display: none;
  }

  .profile-create-form {
    width: min(100%, 420px);
    margin-top: 28px;
    padding: 18px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    background: #17171a;
  }

  .profile-create-row {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 8px;
  }

  .profile-create-row input {
    min-width: 0;
    height: 44px;
    padding: 0 12px;
    border: 1px solid #34343a;
    border-radius: 7px;
    background: #0d0d0f;
    color: #fff;
  }

  .profile-create-row button {
    min-height: 44px;
    padding: 0 12px;
    border: 0;
    border-radius: 7px;
  }

  .auth-gate {
    padding: calc(env(safe-area-inset-top) + 30px) var(--mobile-pad) calc(env(safe-area-inset-bottom) + 30px);
    background: #000;
  }

  .auth-card {
    width: min(100%, 390px);
    border-radius: 8px;
    background: #17171a;
  }
}

@media (max-width: 370px) {
  .search-copy h1,
  .title-modal .modal-copy h2 {
    font-size: 36px;
  }

  .profile-options {
    gap-inline: 7px;
  }

  .profile-avatar {
    width: 72px;
    height: 72px;
  }
}

@media (max-width: 850px) and (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
