/* =====================================================================
   ZAPFLIX — PHONE LAYER (public pages, ≤900px)
   Loaded last (media="(max-width: 900px)") by includes/mobile_ui.php, so it
   wins over style.css / mobile.css / zapflix-mobile-app.css / liquid / polish.
   Built for 375–430pt phones (iPhone SE … 15 Pro Max) with safe areas.
   Pieces built by js/zf-mobile.js (touch only): .zf-m-actions, .zf-m-sheet.
   ===================================================================== */
@media (max-width: 900px) {
  :root {
    --zm-bg: #050506;
    --zm-card: #121216;
    --zm-line: rgba(255, 255, 255, 0.09);
    --zm-text: #f5f5f7;
    --zm-muted: rgba(235, 235, 245, 0.62);
    --zm-red: #e50914;
    --zm-gutter: 16px;
    --zm-top: calc(56px + env(safe-area-inset-top));
    --zm-tab: calc(62px + env(safe-area-inset-bottom));
    --zm-card-w: clamp(104px, 29.4vw, 150px);
    --zm-radius: 10px;
    --zm-ease: cubic-bezier(0.22, 0.8, 0.24, 1);
  }
  html body { background: var(--zm-bg); -webkit-tap-highlight-color: transparent; }
  html body.zf-has-bottomnav { padding-bottom: calc(var(--zm-tab) + 14px) !important; }

  /* ------------------------------------------------------------ header */
  html body .navbar {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    height: var(--zm-top) !important;
    min-height: 0 !important;
    padding: env(safe-area-inset-top) max(10px, env(safe-area-inset-right)) 0 max(10px, env(safe-area-inset-left)) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 6px !important;
    flex-wrap: nowrap !important;
    background: linear-gradient(180deg, rgba(5, 5, 6, 0.78) 0%, rgba(5, 5, 6, 0.38) 60%, rgba(5, 5, 6, 0) 100%) !important;
    border: 0 !important;
    box-shadow: none !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
    transition: background 0.3s ease, box-shadow 0.3s ease !important;
    z-index: 1000 !important;
  }
  html body .navbar.zf-scrolled,
  html body .navbar.scrolled {
    background: rgba(12, 12, 15, 0.74) !important;
    box-shadow: inset 0 -1px 0 var(--zm-line) !important;
    -webkit-backdrop-filter: blur(22px) saturate(180%) !important;
    backdrop-filter: blur(22px) saturate(180%) !important;
  }
  html body .navbar .zf-mnav-toggle {
    position: static !important;
    order: 0;
    flex: none;
    width: 42px !important;
    height: 42px !important;
    margin: 0 !important;
    border-radius: 50% !important;
    display: inline-flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    background: transparent !important;
    transform: none !important;
  }
  html body .navbar .zf-mnav-toggle span { width: 20px !important; height: 2px !important; border-radius: 2px; }
  html body .navbar .nav-left {
    position: static !important;
    order: 1;
    flex: 0 1 auto;
    width: auto !important;
    height: auto !important;
    display: flex !important;
    align-items: center;
    margin: 0 !important;
    transform: none !important;
  }
  html body .navbar .nav-left .logo,
  html body .navbar > .logo {
    position: static !important;
    transform: none !important;
    margin: 0 !important;
    font-size: 23px !important;
    line-height: 1 !important;
  }
  html body .navbar .nav-right {
    position: static !important;
    order: 3;
    flex: none;
    display: flex !important;
    align-items: center;
    gap: 2px;
    width: auto !important;
    height: auto !important;
    margin: 0 !important;
    transform: none !important;
  }
  html body .navbar .nav-right > .lang-switcher,
  html body .navbar .nav-right > a.btn,
  html body .navbar .nav-right > .netflix-search-box,
  html body .navbar .nav-right > .search-box { display: none !important; }
  /* The logo pushes everything else into the opposite corner (left in Arabic, right in
     English); the old 46px gap for the floating menu button is gone. */
  html body .navbar .nav-left { margin-inline-end: auto !important; }
  html body .navbar .zf-acct { margin: 0 !important; }
  html body .navbar .zf-m-actions {
    order: 2;
    margin-inline-start: 0;
    display: flex;
    align-items: center;
    gap: 2px;
  }
  html body .navbar .zf-m-icon {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #fff;
  }
  html body .navbar .zf-m-icon svg { width: 23px; height: 23px; }
  html body .navbar .zf-m-icon:active { background: rgba(255, 255, 255, 0.12); }
  html body .navbar .zf-m-login {
    display: inline-flex;
    align-items: center;
    height: 34px;
    padding: 0 16px;
    margin-inline-start: 4px;
    border-radius: 999px;
    background: var(--zm-red);
    color: #fff !important;
    font-size: 13.5px;
    font-weight: 800;
    text-decoration: none !important;
    box-shadow: 0 6px 18px rgba(229, 9, 20, 0.35);
  }
  /* Account menu (members): keep the bell + round avatar compact */
  html body .navbar .zf-acct { gap: 2px !important; }
  html body .navbar .zf-acct .zf-bell { width: 40px !important; height: 40px !important; }
  html body .navbar .zf-acct-btn { width: 36px !important; height: 36px !important; }
  /* Report button sits in the drawer's nav-links on phones; the floating hint is a toast */
  html body .zf-fb-hint {
    position: fixed !important;
    top: auto !important;
    left: 12px !important;
    right: 12px !important;
    width: auto !important;
    bottom: calc(var(--zm-tab) + 14px) !important;
    max-width: none !important;
    padding: 14px 16px !important;
    border-radius: 18px !important;
  }
  html body .zf-fb-hint::before, html body .zf-fb-hint::after { display: none !important; }
  html body .zf-fb-hint .zf-fb-hint-body { font-size: 13px !important; }

  /* ----------------------------------------------------- drawer (menu) */
  html body .zf-mnav-drawer {
    width: min(86vw, 340px) !important;
    padding-top: env(safe-area-inset-top) !important;
    padding-bottom: env(safe-area-inset-bottom) !important;
    background: rgba(14, 14, 17, 0.92) !important;
    -webkit-backdrop-filter: blur(26px) saturate(170%) !important;
    backdrop-filter: blur(26px) saturate(170%) !important;
    border-inline-end: 1px solid var(--zm-line) !important;
  }
  html body .zf-mnav-links a {
    min-height: 50px;
    display: flex !important;
    align-items: center;
    gap: 12px;
    padding: 0 20px !important;
    border-radius: 14px !important;
    margin: 2px 10px !important;
    font-size: 16px !important;
    font-weight: 700 !important;
  }
  html body .zf-mnav-links a.active { background: rgba(229, 9, 20, 0.14) !important; color: #fff !important; box-shadow: inset 3px 0 0 var(--zm-red); }
  html[dir="rtl"] body .zf-mnav-links a.active { box-shadow: inset -3px 0 0 var(--zm-red); }

  html body .zf-mnav-drawer .zf-mnav-lang {
    display: flex !important;
    gap: 8px !important;
    margin: 10px 14px !important;
    padding: 0 !important;
    font-size: 0 !important;
    border: 0 !important;
  }
  html body .zf-mnav-drawer .zf-mnav-lang a {
    flex: 1 1 0;
    min-height: 42px !important;
    margin: 0 !important;
    padding: 0 !important;
    display: grid !important;
    place-items: center;
    border-radius: 12px !important;
    background: rgba(255, 255, 255, 0.06) !important;
    box-shadow: inset 0 0 0 1px var(--zm-line) !important;
    color: rgba(255, 255, 255, 0.82) !important;
    font-size: 14px !important;
    font-weight: 800 !important;
  }
  html body .zf-mnav-drawer .zf-mnav-lang a[style*="bold"] { background: var(--zm-red) !important; color: #fff !important; box-shadow: none !important; }

  /* ------------------------------------------------------ bottom tab bar */
  html body .zf-bottomnav {
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    height: var(--zm-tab) !important;
    margin: 0 !important;
    padding: 6px max(8px, env(safe-area-inset-right)) env(safe-area-inset-bottom) max(8px, env(safe-area-inset-left)) !important;
    display: flex !important;
    align-items: flex-start !important;
    justify-content: space-around !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: rgba(12, 12, 15, 0.8) !important;
    box-shadow: inset 0 1px 0 var(--zm-line) !important;
    -webkit-backdrop-filter: blur(24px) saturate(180%) !important;
    backdrop-filter: blur(24px) saturate(180%) !important;
    z-index: 1000 !important;
  }
  html body .zf-bottomnav a {
    position: relative;
    flex: 1 1 0 !important;
    min-width: 0;
    height: 52px !important;
    padding: 4px 2px 0 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 4px !important;
    border-radius: 14px !important;
    background: transparent !important;
    color: rgba(235, 235, 245, 0.56) !important;
    font-size: 10.5px !important;
    font-weight: 700 !important;
    letter-spacing: 0.01em;
    text-decoration: none !important;
    transition: color 0.2s ease !important;
  }
  html body .zf-bottomnav a .zf-ic {
    width: 26px !important;
    height: 26px !important;
    display: grid !important;
    place-items: center !important;
    margin: 0 !important;
    padding: 0 !important;
    border-radius: 0 !important;
    background: none !important;
    box-shadow: none !important;
    filter: none !important;
    transform: none !important;
    font-size: 22px !important;
    transition: transform 0.25s var(--zm-ease) !important;
  }
  html body .zf-bottomnav a .zf-ic svg { width: 24px !important; height: 24px !important; fill: currentColor; }
  html body .zf-bottomnav a span:last-child {
    max-width: 100%;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-size: 10.5px !important;
  }
  html body .zf-bottomnav a.active { color: #fff !important; }
  html body .zf-bottomnav a.active .zf-ic { color: var(--zm-red) !important; transform: translateY(-1px) !important; }
  html body .zf-bottomnav a.active::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 50%;
    width: 22px;
    height: 3px;
    margin-left: -11px;
    border-radius: 0 0 3px 3px;
    background: var(--zm-red);
    box-shadow: 0 2px 10px rgba(229, 9, 20, 0.7);
  }
  html body .zf-bottomnav a:active .zf-ic { transform: scale(0.88) !important; }

  /* -------------------------------------------------- section headings */
  html body .content-section {
    position: relative;
    margin: 0 !important;
    padding: 24px 0 0 !important;
  }
  html body .content-section > .section-title,
  html body .content-section > .zf-section-head {
    margin: 0 var(--zm-gutter) 0 !important;
    padding: 0 0 3px !important;
    padding-inline-start: 10px !important;
    font-size: 19px !important;
    line-height: 1.25 !important;
    font-weight: 800 !important;
    letter-spacing: -0.01em;
  }
  html body .content-section .zf-heading-bar { width: 3px !important; height: 18px !important; }
  html body .content-section .zf-section-sub {
    margin: 0 var(--zm-gutter) 10px !important;
    font-size: 12.5px !important;
    color: var(--zm-muted) !important;
  }
  html body .content-section > .zf-section-more {
    position: absolute !important;
    top: 24px !important;
    inset-inline-end: var(--zm-gutter) !important;
    inset-inline-start: auto !important;
    height: 26px !important;
    padding: 0 4px 0 10px !important;
    display: inline-flex !important;
    align-items: center;
    gap: 2px;
    border: 0 !important;
    background: none !important;
    box-shadow: none !important;
    color: var(--zm-muted) !important;
    font-size: 12.5px !important;
    font-weight: 700 !important;
  }
  html[dir="rtl"] body .content-section > .zf-section-more svg { transform: scaleX(-1); }
  html body .content-section.has-more > .section-title { margin-inline-end: 100px !important; }
  html body .content-section > .section-title:not(.has-sub) { margin-bottom: 10px !important; }

  /* -------------------------------------------------------------- rows */
  html body .content-section .movie-row,
  html body .movie-row {
    display: flex !important;
    gap: 8px !important;
    padding: 4px var(--zm-gutter) 6px !important;
    margin: 0 !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: var(--zm-gutter);
    scrollbar-width: none;
    overscroll-behavior-x: contain;
  }
  html body .movie-row::-webkit-scrollbar { display: none; }
  html[dir="rtl"] body .movie-row { direction: rtl !important; }
  html body .movie-row > .movie-card,
  html body .content-section .movie-row > .movie-card {
    flex: 0 0 var(--zm-card-w) !important;
    width: var(--zm-card-w) !important;
    min-width: 0 !important;
    max-width: none !important;
    height: auto !important;
    aspect-ratio: 2 / 3;
    margin: 0 !important;
    border-radius: var(--zm-radius) !important;
    overflow: hidden !important;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.45), inset 0 0 0 1px rgba(255, 255, 255, 0.05) !important;
    scroll-snap-align: start;
    background: var(--zm-card) !important;
    transform: none !important;
  }
  html body .movie-row > .movie-card .card-img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    border-radius: 0 !important;
  }
  html body .movie-row > .movie-card:active { transform: scale(0.965) !important; transition: transform 0.15s ease !important; }

  /* Top 10 rows: outlined numeral + poster */
  html body .movie-row.zf-rank-row { gap: 4px !important; }
  html body .zf-rank-row > .zf-rank-item {
    flex: 0 0 calc(var(--zm-card-w) * 1.52) !important;
    width: calc(var(--zm-card-w) * 1.52) !important;
    scroll-snap-align: start;
  }
  html body .zf-rank-item > .movie-card {
    flex: 0 0 66% !important;
    width: 66% !important;
    border-radius: var(--zm-radius) !important;
    overflow: hidden;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.45) !important;
  }
  html body .zf-rank-num {
    flex: 0 0 40% !important;
    margin-inline-end: -6% !important;
    font-size: calc(var(--zm-card-w) * 0.98) !important;
    -webkit-text-stroke-width: 2.5px !important;
    letter-spacing: -0.07em !important;
  }
  html body .zf-rank-num.is-wide { font-size: 44cqi !important; letter-spacing: -0.13em !important; }

  /* ------------------------------------------------------------- footer */
  html body .footer {
    margin-top: 34px !important;
    padding: 26px 0 calc(18px) !important;
    border-top: 1px solid var(--zm-line);
    text-align: start !important;
  }
  html body .footer > p { margin: 18px var(--zm-gutter) 0 !important; font-size: 12px !important; color: var(--zm-muted) !important; text-align: center; }
  html body .zf-seo-footer {
    display: flex !important;
    flex-direction: column !important;
    gap: 18px !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  html body .zf-seo-footer > div { min-width: 0 !important; width: 100% !important; }
  html body .zf-seo-footer h3 {
    margin: 0 var(--zm-gutter) 10px !important;
    font-size: 14px !important;
    font-weight: 800 !important;
    color: #fff !important;
  }
  html body .zf-seo-footer ul {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 8px !important;
    margin: 0 !important;
    padding: 0 var(--zm-gutter) 2px !important;
    overflow-x: auto;
    scrollbar-width: none;
    list-style: none !important;
  }
  html body .zf-seo-footer ul::-webkit-scrollbar { display: none; }
  html body .zf-seo-footer li { flex: none; margin: 0 !important; }
  html body .zf-seo-footer a {
    display: inline-flex !important;
    align-items: center;
    height: 34px;
    padding: 0 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    box-shadow: inset 0 0 0 1px var(--zm-line);
    color: rgba(255, 255, 255, 0.84) !important;
    font-size: 13px !important;
    font-weight: 600;
    white-space: nowrap;
    text-decoration: none !important;
  }

  /* -------------------------------------------------- toasts above tab bar */
  html body.zf-has-bottomnav .zf-wish-toast { bottom: calc(var(--zm-tab) + 14px) !important; }
}

/* ============================================== title page (phones) */
@media (max-width: 700px) and (orientation: portrait), (max-width: 700px) and (min-height: 501px) {
  html body .zf-title-hero,
  html body .zf-title-section { --zf-t-gutter: var(--zm-gutter); }
  html body .zf-title-section { margin-bottom: 26px !important; }
  html body .zf-title-crumbs { font-size: 12px !important; margin-bottom: 8px !important; }
  html body .zf-title-buttons .zf-hero-btn { height: 48px !important; border-radius: 12px !important; font-weight: 800 !important; }
  html body .zf-title-buttons .zf-hero-btn--info,
  html body .zf-title-buttons .zf-hero-btn:not(.zf-hero-btn--play) {
    background: rgba(255, 255, 255, 0.12) !important;
    -webkit-backdrop-filter: blur(14px) !important;
    backdrop-filter: blur(14px) !important;
  }
  html body .cast-row.zf-cast-row {
    gap: 10px !important;
    margin-inline: calc(-1 * var(--zm-gutter)) !important;
    padding-inline: var(--zm-gutter) !important;
    scroll-padding-inline: var(--zm-gutter);
  }
  html body .cast-card.zf-cast-card { flex: 0 0 92px !important; width: 92px !important; }
  html body .zf-cast-photo { border-radius: 12px !important; }
  html body .cast-card.zf-cast-card .cast-name,
  html body .cast-card.zf-cast-card h4 { font-size: 12.5px !important; line-height: 1.25 !important; margin-top: 8px !important; }
  html body .cast-card.zf-cast-card .cast-character,
  html body .cast-card.zf-cast-card p { font-size: 11.5px !important; line-height: 1.3 !important; }
  html body .zf-title-section-heading h2,
  html body .zf-title-similar .zf-title-section-heading .section-title { font-size: 19px !important; }
  html body .zf-title-section-sub { font-size: 12.5px !important; }
  html body .zf-title-similar .movie-row { margin-inline: 0 !important; }
  html body .zf-title-similar .zf-title-section-head { padding-inline: var(--zm-gutter) !important; margin-bottom: 10px !important; }
  html body .zf-title-section.cast-section { margin-bottom: 4px !important; }
  html body .zf-cast-stage { padding-bottom: 0 !important; }
  html body .zf-ep-tools { gap: 8px !important; }
  html body .is-list .zf-ep-card { border-radius: 14px !important; grid-template-columns: 40% 1fr !important; }
  html body .is-list .zf-ep-title { font-size: 14.5px !important; }
  html body .zf-ep-index a, html body #zfEpIndex a { min-height: 40px; }
}

/* ============================================== search page (phones) */
@media (max-width: 900px) {
  html body .navbar.search-navbar {
    height: auto !important;
    flex-wrap: wrap !important;
    align-content: flex-start !important;
    row-gap: 2px !important;
    padding-bottom: 10px !important;
  }
  html body .navbar.search-navbar > .zf-mnav-toggle,
  html body .navbar.search-navbar > .nav-left,
  html body .navbar.search-navbar > .zf-m-actions { margin-block: 7px !important; }
  html body .navbar.search-navbar .nav-right { display: contents !important; }
  html body .navbar.search-navbar .zf-acct { order: 3; }
  html body .navbar.search-navbar #netflixSearchBox {
    display: block !important;
    order: 9;
    flex: 0 0 100% !important;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 6px !important;
    position: static !important;
    transform: none !important;
  }
  html body .navbar.search-navbar #netflixSearchBox .search-input-wrapper {
    width: 100% !important;
    height: 46px !important;
    border-radius: 14px !important;
    background: rgba(255, 255, 255, 0.1) !important;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12) !important;
  }
  html body .navbar.search-navbar #searchInput { font-size: 16px !important; }
  html body .search-main-container { padding-top: calc(var(--zm-top) + 70px) !important; }
}
@media (max-width: 900px) and (hover: none) and (pointer: coarse) {
  html body .zf-search-card .card-hover-meta { display: none !important; }
  html body .zf-search-card .zf-chip--type { display: none !important; }
  html body .zf-search-card .zf-chip { font-size: 10px !important; padding: 2px 7px !important; }
  html body .zf-search-card .zf-wish-btn { width: 30px !important; height: 30px !important; }
  html body .zf-search-card .zf-wish-btn svg { width: 16px !important; height: 16px !important; }
}

/* report button inside the phone header: a plain round icon */
@media (max-width: 900px) {
  html body .navbar .zf-fb-btn.zf-fb-nav {
    order: 2;
    width: 40px !important;
    height: 40px !important;
    min-width: 0 !important;
    padding: 0 !important;
    justify-content: center !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }
  html body .navbar .zf-fb-btn.zf-fb-nav span { display: none !important; }
}

/* =============================== touch: clean posters (no hover overlay) */
@media (max-width: 900px) and (hover: none) and (pointer: coarse) {
  /* The hover layer never shows on touch. display:none (not opacity:0) keeps its ~20
     nodes per card out of layout: ~4,800 boxes on the home page. The markup stays in the
     HTML (title link for SEO, buttons the preview sheet clicks programmatically). */
  html body .movie-row .movie-card .card-overlay {
    display: none !important;
  }
  html body .movie-row .movie-card::after,
  html body .movie-row .movie-card .zf-wish-btn:not(.zf-wish-inline) { display: none !important; }
}

/* ===================================================== home hero (phones) */
/* Held upright only: turned sideways (≤500px tall) the hero uses the wide layout in
   zapflix-hero.css instead of a narrow poster card in one corner. */
@media (max-width: 700px) and (orientation: portrait), (max-width: 700px) and (min-height: 501px) {
  html body .zf-hero {
    --zf-hero-overlap: 0px;
    height: auto !important;
    min-height: 0 !important;
    aspect-ratio: 2 / 2.95;
    max-height: calc(100svh - var(--zm-top) - 96px);
    margin: calc(var(--zm-top) + 6px) var(--zm-gutter) 4px !important;
    overflow: visible !important;
    background: transparent !important;
    isolation: isolate;
  }
  html body .zf-hero::before {
    content: '';
    position: absolute;
    inset: -14% -22% -8%;
    z-index: -1;
    background: var(--zf-m-glow, none) center / cover no-repeat;
    filter: blur(56px) saturate(1.7) brightness(0.85);
    opacity: 0.6;
    transform: translateZ(0);
    transition: background-image 0.8s ease;
    pointer-events: none;
    -webkit-mask-image: radial-gradient(closest-side, #000 52%, transparent);
    mask-image: radial-gradient(closest-side, #000 52%, transparent);
  }
  html body .zf-hero .billboard-slide {
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55), inset 0 0 0 1px rgba(255, 255, 255, 0.1);
  }
  html body .zf-hero .billboard-slide::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
    pointer-events: none;
    z-index: 5;
  }
  html body .zf-hero-scrim,
  html[dir="rtl"] body .zf-hero-scrim {
    background:
      linear-gradient(0deg, rgba(5, 5, 6, 0.96) 0%, rgba(5, 5, 6, 0.8) 26%, rgba(5, 5, 6, 0.4) 46%, rgba(5, 5, 6, 0) 64%) !important;
  }
  html body .zf-hero-content {
    inset-inline: 16px !important;
    bottom: 40px !important;
  }
  html body .zf-hero-kicker { font-size: 12.5px !important; margin-bottom: 10px !important; }
  html body .zf-hero-meta { font-size: 12.5px !important; margin-bottom: 14px !important; gap: 0 !important; }
  html body .zf-hero .billboard-buttons { gap: 10px !important; }
  html body .zf-hero-btn {
    height: 46px !important;
    border-radius: 12px !important;
    font-size: 15px !important;
    font-weight: 800 !important;
  }
  html body .zf-hero-btn--info {
    background: rgba(255, 255, 255, 0.16) !important;
    -webkit-backdrop-filter: blur(16px) saturate(170%) !important;
    backdrop-filter: blur(16px) saturate(170%) !important;
  }
  /* Guests: the sign-up offer is long, so it gets its own full-width line under Play */
  html body .zf-hero .billboard-buttons:has(> a.zf-hero-btn--info) { flex-wrap: wrap !important; gap: 8px !important; }
  html body .zf-hero .billboard-buttons:has(> a.zf-hero-btn--info) > .zf-hero-btn { flex: 0 0 100% !important; width: 100% !important; }
  html body .zf-hero .billboard-buttons > a.zf-hero-btn--info { height: 40px !important; font-size: 13.5px !important; }
  html body .zf-hero .billboard-buttons > a.zf-hero-btn--info span { -webkit-line-clamp: 1 !important; font-size: 13.5px !important; }
  html body .zf-hero-btn--info span {
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
    font-size: 13px;
    line-height: 1.2;
    text-align: center;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }
  html body .zf-hero-dots { bottom: 16px !important; gap: 4px !important; }
  html body .zf-hero-dot { width: 6px !important; }
  html body .zf-hero-dot.active { width: 20px !important; }
  html body .zf-hero-dot i { height: 3px !important; }
  html body .zf-hero + .content-section, html body .zf-hero ~ main > .content-section:first-child { padding-top: 18px !important; }
}

/* ============================================ phone turned sideways */
/* A 390px-tall screen: the header and the tab bar get slimmer (icon beside its label) so
   most of the screen is left for the page. The body keeps clear of the notch / Dynamic
   Island through zapflix-nav.css. */
@media (max-width: 900px) and (orientation: landscape) and (max-height: 500px) {
  :root {
    --zm-top: calc(50px + env(safe-area-inset-top));
    --zm-tab: calc(44px + env(safe-area-inset-bottom));
  }
  html body .zf-bottomnav {
    padding-top: 0 !important;
    align-items: center !important;
  }
  html body .zf-bottomnav a {
    height: 40px !important;
    padding: 0 6px !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
  }
  html body .zf-bottomnav a .zf-ic { width: 22px !important; height: 22px !important; }
  html body .zf-bottomnav a .zf-ic svg { width: 21px !important; height: 21px !important; }
  html body .zf-bottomnav a span:last-child { font-size: 12px !important; }
  html body .zf-bottomnav a.active::before { top: -2px; }
  /* the hero copy and buttons stay above the tab bar (zapflix-hero.css, zapflix-title.css) */
  html body .zf-hero,
  html body .zf-title-hero { --zf-hero-tab: var(--zm-tab); }
  html body .zf-title-hero .zf-title-overview { display: none !important; }
  html body .zf-fb-hint {
    left: auto !important;
    right: max(12px, env(safe-area-inset-right)) !important;
    width: min(420px, calc(100% - 24px)) !important;
  }
}

/* ============================================== preview sheet (touch) */
.zf-m-sheet { position: fixed; inset: 0; z-index: 3000; }
.zf-m-sheet[hidden] { display: none; }
.zf-m-sheet-scrim {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.zf-m-sheet-panel {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  max-height: 88svh;
  overflow-y: auto;
  padding: 10px 18px calc(18px + env(safe-area-inset-bottom));
  border-radius: 22px 22px 0 0;
  background: rgba(22, 22, 26, 0.94);
  box-shadow: 0 -20px 60px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  backdrop-filter: blur(28px) saturate(180%);
  color: #f5f5f7;
  transform: translateY(100%);
  transition: transform 0.38s cubic-bezier(0.22, 0.8, 0.24, 1);
  outline: none;
  overscroll-behavior: contain;
}
.zf-m-sheet.is-open .zf-m-sheet-scrim { opacity: 1; }
.zf-m-sheet.is-open .zf-m-sheet-panel { transform: translateY(0); }
.zf-m-sheet-grip { width: 40px; height: 5px; margin: 0 auto 12px; border-radius: 3px; background: rgba(255, 255, 255, 0.24); }
.zf-m-sheet-x {
  position: absolute;
  top: 12px;
  inset-inline-end: 12px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}
.zf-m-sheet-x svg { width: 18px; height: 18px; }
.zf-m-sheet-top { display: flex; gap: 14px; align-items: flex-start; padding-inline-end: 34px; }
.zf-m-sheet-poster {
  flex: 0 0 96px;
  aspect-ratio: 2 / 3;
  border-radius: 10px;
  overflow: hidden;
  background: #222;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.5), inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}
.zf-m-sheet-poster img { width: 100%; height: 100%; object-fit: cover; display: block; }
.zf-m-sheet-poster img[hidden] { display: none; }
.zf-m-sheet-info { min-width: 0; flex: 1; }
.zf-m-sheet-title { margin: 2px 0 6px; font-size: 19px; line-height: 1.25; font-weight: 800; letter-spacing: -0.01em; }
.zf-m-sheet-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin-bottom: 8px; font-size: 12.5px; font-weight: 600; color: rgba(235, 235, 245, 0.66); }
.zf-m-vote { display: inline-flex; align-items: center; gap: 3px; color: #ffd166; font-weight: 800; }
.zf-m-sheet-meta .zf-m-badge { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 4px; background: #e50914; color: #fff; font-weight: 800; font-size: 12px; line-height: 1.35; } /* New Season / Recently added (5.70) */
.zf-m-vote svg { width: 13px; height: 13px; }
.zf-m-sheet-desc {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.55;
  color: rgba(235, 235, 245, 0.82);
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.zf-m-sheet-actions { margin-top: 16px; }
.zf-m-sheet-play {
  width: 100%;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 12px;
  background: #fff;
  color: #0a0a0b;
  font: inherit;
  font-size: 16px;
  font-weight: 800;
}
.zf-m-sheet-play svg { width: 22px; height: 22px; }
.zf-m-sheet-play:active, .zf-m-sheet-btn:active { transform: scale(0.97); }
.zf-m-sheet-row { display: flex; gap: 10px; margin-top: 10px; }
.zf-m-sheet-row[hidden] { display: none; }
.zf-m-sheet-btn {
  flex: 1 1 0;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  color: #fff;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
}
.zf-m-sheet-btn svg { width: 20px; height: 20px; }
.zf-m-sheet-btn[aria-pressed="true"] { background: rgba(255, 255, 255, 0.18); }
.zf-m-like.is-on { color: #ff4d57; }
.zf-m-sheet-more {
  margin-top: 14px;
  padding: 14px 4px 2px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: #fff !important;
  font-size: 14.5px;
  font-weight: 700;
  text-decoration: none !important;
}
.zf-m-sheet-more-ic { display: grid; place-items: center; width: 22px; height: 22px; }
.zf-m-sheet-more-ic svg { width: 22px; height: 22px; }
.zf-m-sheet-more-txt { flex: 1; }
.zf-m-sheet-chev { font-size: 24px; line-height: 1; color: rgba(255, 255, 255, 0.5); }
html[dir="rtl"] .zf-m-sheet-chev { transform: scaleX(-1); }
html.zf-m-sheet-open, html.zf-m-sheet-open body { overflow: hidden !important; }
/* sideways phone: a centred sheet instead of one stretched across the whole width */
@media (orientation: landscape) and (max-height: 500px) {
  .zf-m-sheet-panel { width: min(560px, 100%); margin-inline: auto; max-height: 92svh; }
}

@media (prefers-reduced-motion: reduce) {
  .zf-m-sheet-panel, .zf-m-sheet-scrim { transition: none; }
  html body .zf-hero::before { transition: none; }
}
