:root {
  --bg: #000;
  --panel: #151515;
  --panel-2: #252525;
  --text: rgba(255, 255, 255, .94);
  --muted: rgba(255, 255, 255, .56);
  --line: rgba(255, 255, 255, .1);
  --red: #ef3035;
  --gold: #f5d39d;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* MOBILEWATCH5 DEFINITIVE OVERRIDE - must stay at EOF */
@media screen and (max-width: 760px) {
  html,
  body {
    overflow-x: hidden !important;
  }

  .site-header {
    display: grid !important;
    grid-template-columns: 44px minmax(0, 1fr) 90px !important;
    gap: 8px !important;
    align-items: center !important;
    height: 70px !important;
    padding: 10px 12px !important;
    background: rgba(9,9,12,.96) !important;
    border-bottom: 1px solid rgba(255,255,255,.08) !important;
  }

  .site-header .menu-toggle {
    position: static !important;
    display: grid !important;
    grid-column: 1 !important;
    width: 42px !important;
    height: 42px !important;
    min-width: 42px !important;
    min-height: 42px !important;
    place-items: center !important;
    border-radius: 50% !important;
    font-size: 27px !important;
  }

  .site-header .brand {
    grid-column: 2 !important;
    justify-self: center !important;
    min-width: 0 !important;
    margin: 0 !important;
    gap: 8px !important;
    font-size: 18px !important;
    transform: none !important;
  }

  .site-header .brand-mark {
    width: 34px !important;
    height: 34px !important;
    border-radius: 10px !important;
    flex: 0 0 34px !important;
  }

  .site-header .brand span:last-child {
    max-width: 134px !important;
    overflow: hidden !important;
    white-space: nowrap !important;
    text-overflow: ellipsis !important;
  }

  .site-header .header-tools {
    grid-column: 3 !important;
    justify-self: end !important;
    display: flex !important;
    gap: 6px !important;
    margin: 0 !important;
    min-width: 0 !important;
  }

  .site-header .header-tools .header-icon[aria-label="Search"],
  .site-header .header-tools .avatar-button {
    display: grid !important;
    width: 39px !important;
    height: 39px !important;
    min-width: 39px !important;
    min-height: 39px !important;
    padding: 0 !important;
    border-radius: 50% !important;
  }

  .site-header .header-tools .header-icon[aria-label="History"],
  .site-header .header-tools .language-wrap,
  .site-header .header-tools .topup-button {
    display: none !important;
  }

  .site-header .main-nav {
    position: fixed !important;
    top: 72px !important;
    left: 12px !important;
    right: 12px !important;
    z-index: 999 !important;
    display: none !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
    height: auto !important;
    margin: 0 !important;
    padding: 12px !important;
    border: 1px solid rgba(255,255,255,.1) !important;
    border-radius: 18px !important;
    background: rgba(15,15,19,.98) !important;
    box-shadow: 0 24px 70px rgba(0,0,0,.58) !important;
  }

  .site-header.menu-open .main-nav {
    display: grid !important;
  }

  .site-header .main-nav a {
    min-height: 42px !important;
    padding: 0 12px !important;
    border-radius: 12px !important;
    color: rgba(255,255,255,.74) !important;
    background: rgba(255,255,255,.045) !important;
    font-size: 14px !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
  }

  .site-header .main-nav a.is-active,
  .site-header .main-nav a:hover {
    color: #fff !important;
    background: rgba(239,48,53,.22) !important;
  }

  .site-header .main-nav a::after {
    display: none !important;
  }

  .watch-view {
    padding: 76px 0 28px !important;
    background: #050505 !important;
  }

  .watch-view .back-button {
    top: 76px !important;
    left: 10px !important;
    width: 36px !important;
    height: 36px !important;
    z-index: 70 !important;
  }

  .watch-view .watch-player {
    display: block !important;
    min-height: 0 !important;
    padding: 0 !important;
  }

  .watch-view .player-shell {
    width: min(220px, calc(100vw - 126px)) !important;
    max-width: 220px !important;
    min-width: 0 !important;
    margin: 0 auto !important;
    aspect-ratio: 9 / 16 !important;
    border-radius: 13px !important;
    box-shadow: 0 16px 42px rgba(0,0,0,.42) !important;
    transition: width .22s ease, transform .22s ease, border-radius .22s ease !important;
  }

  .watch-view.is-player-collapsed .player-shell {
    width: 120px !important;
    max-width: 120px !important;
    aspect-ratio: 16 / 9 !important;
    border-radius: 10px !important;
    transform: translateY(-3px) !important;
  }

  .watch-view .player-brand {
    top: 12px !important;
    left: 12px !important;
    transform: scale(.72) !important;
    transform-origin: top left !important;
  }

  .watch-view .quality-select {
    top: 10px !important;
    right: 10px !important;
    min-width: 72px !important;
    height: 30px !important;
    font-size: 11px !important;
  }

  .watch-info {
    display: flex !important;
    flex-direction: column !important;
    padding: 14px 16px 120px !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
  }

  .watch-info h1 {
    order: 0 !important;
    margin: 0 0 12px !important;
    font-size: 20px !important;
    line-height: 1.18 !important;
  }

  .watch-info > .episode-tabs {
    order: 1 !important;
    margin: 0 0 10px !important;
  }

  .watch-info > .episode-grid {
    order: 2 !important;
    margin: 0 0 12px !important;
  }

  .watch-info > .watch-actions {
    order: 3 !important;
    display: flex !important;
    justify-content: space-around !important;
    margin: 8px 0 0 !important;
    padding: 12px 0 !important;
    border-top: 1px solid rgba(255,255,255,.08) !important;
    border-bottom: 1px solid rgba(255,255,255,.08) !important;
  }

  .watch-info .breadcrumb,
  .watch-info .alias,
  .watch-info h3,
  .watch-info #watchPlot,
  .watch-info .watch-tags,
  .watch-info .watch-meta-strip,
  .watch-info .locked-hint {
    display: none !important;
  }

  .episode-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }

  .episode-card {
    min-height: 52px !important;
    border-radius: 12px !important;
  }
}

/* Mobile watch final pass: compact player + menu-only navigation */
@media (max-width: 640px) {
  .site-header {
    display: grid !important;
    grid-template-columns: 42px 1fr 86px !important;
    align-items: center !important;
    height: 74px !important;
    padding: 12px 12px !important;
  }

  .menu-toggle {
    position: static !important;
    grid-column: 1 !important;
    grid-row: 1 !important;
    display: grid !important;
    width: 42px !important;
    height: 42px !important;
    min-width: 42px !important;
  }

  .brand {
    grid-column: 2 !important;
    grid-row: 1 !important;
    justify-self: center !important;
    margin: 0 !important;
    transform: translateX(-2px) !important;
    gap: 7px !important;
    font-size: 18px !important;
  }

  .header-tools {
    grid-column: 3 !important;
    grid-row: 1 !important;
    justify-self: end !important;
    display: flex !important;
    gap: 6px !important;
    margin: 0 !important;
  }

  .header-tools .header-icon[aria-label="Search"],
  .header-tools .avatar-button {
    display: grid !important;
    width: 38px !important;
    height: 38px !important;
  }

  .header-tools .header-icon[aria-label="History"],
  .header-tools .language-wrap,
  .topup-button:not(.wide) {
    display: none !important;
  }

  .site-header .main-nav {
    position: fixed !important;
    top: 72px !important;
    left: 12px !important;
    right: 12px !important;
    z-index: 500 !important;
    display: none !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
    height: auto !important;
    padding: 12px !important;
    overflow: hidden !important;
    border-radius: 18px !important;
    background: rgba(14,14,18,.98) !important;
    box-shadow: 0 24px 60px rgba(0,0,0,.5) !important;
  }

  .site-header.menu-open .main-nav {
    display: grid !important;
  }

  .site-header .main-nav a {
    display: flex !important;
    align-items: center !important;
    min-height: 42px !important;
    padding: 0 12px !important;
    border-radius: 12px !important;
    font-size: 14px !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
  }

  .site-header .main-nav a.is-active {
    background: rgba(255,255,255,.1) !important;
  }

  .site-header .main-nav a.is-active::after {
    display: none !important;
  }

  .watch-view {
    padding-top: 74px !important;
  }

  .watch-view .back-button {
    top: 74px !important;
    left: 12px !important;
    width: 36px !important;
    height: 36px !important;
  }

  .watch-view .player-shell {
    width: min(calc(100% - 108px), 248px) !important;
    max-width: 248px !important;
    border-radius: 13px !important;
  }

  .watch-view.is-player-collapsed .player-shell {
    width: 138px !important;
    max-width: 138px !important;
    aspect-ratio: 16 / 9 !important;
    border-radius: 10px !important;
  }

  .watch-info {
    padding-top: 14px !important;
  }

  .watch-info .breadcrumb,
  .watch-info .alias,
  .watch-info h3,
  .watch-info #watchPlot,
  .watch-info .watch-tags,
  .watch-info .watch-meta-strip,
  .watch-info .locked-hint {
    display: none !important;
  }

  .watch-info h1 {
    margin: 0 0 12px !important;
    font-size: 20px !important;
  }

  .watch-info > .episode-tabs {
    order: 1 !important;
    margin: 0 0 10px !important;
  }

  .watch-info > .episode-grid {
    order: 2 !important;
    margin-bottom: 12px !important;
  }

  .watch-info > .watch-actions {
    order: 3 !important;
    margin: 10px 0 0 !important;
    padding: 12px 0 !important;
    border-top: 1px solid rgba(255,255,255,.08) !important;
    border-bottom: 1px solid rgba(255,255,255,.08) !important;
  }

  .category-band {
    display: none !important;
  }

  .watch-view.is-player-collapsed .player-shell {
    width: min(220px, calc(100vw - 110px)) !important;
    max-width: 220px !important;
    aspect-ratio: 9 / 16 !important;
    transform: none !important;
  }

  .watch-info > .episode-grid {
    display: grid !important;
    grid-template-columns: repeat(14, 1fr) !important;
    gap: 8px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    padding-bottom: 2px !important;
    scroll-snap-type: x mandatory !important;
  }

  .episode-card {
    min-width: 62px !important;
    scroll-snap-align: start !important;
  }
}

/* Drama Loop UI refresh: cinematic black-gold identity, distinct from reference platforms */
:root {
  --bg: #030303;
  --panel: rgba(18, 18, 18, .82);
  --panel-2: rgba(255, 255, 255, .075);
  --muted: rgba(255, 255, 255, .58);
  --line: rgba(255, 255, 255, .11);
  --red: #ff3744;
  --gold: #e9c06f;
  --gold-soft: rgba(233, 192, 111, .18);
  --serif: Georgia, "Times New Roman", serif;
}

body {
  background:
    radial-gradient(circle at 18% -10%, rgba(132, 35, 38, .24), transparent 34%),
    radial-gradient(circle at 86% 7%, rgba(233, 192, 111, .11), transparent 30%),
    #030303;
}

.site-header {
  height: 66px;
  padding: 0 clamp(18px, 4vw, 54px);
  border-bottom: 1px solid rgba(255,255,255,.08);
  background: rgba(3,3,3,.72);
}

.brand, .footer-brand { letter-spacing: -.02em; }
.brand-mark { background: linear-gradient(135deg, #ff3948, #8d141e); box-shadow: 0 10px 30px rgba(255, 55, 68, .22); }
.main-nav { gap: 28px; font-size: 14px; letter-spacing: .02em; text-transform: uppercase; }
.main-nav a { color: rgba(255,255,255,.64); }
.main-nav a:hover, .main-nav .is-active { color: #fff; }

.header-tools { gap: 10px; }
.header-icon, .language, .avatar-button, .topup-button {
  min-height: 40px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 999px;
  background: rgba(255,255,255,.055);
  backdrop-filter: blur(14px);
}
.header-icon { width: 42px; font-size: 18px; }
.language { padding: 0 14px; font-size: 13px; }
.language-menu { right: 0; width: 180px; border: 1px solid rgba(255,255,255,.1); background: rgba(18,18,18,.96); }
.language-menu::before { background: rgba(18,18,18,.96); }
.language-option { padding: 11px 18px; }
.avatar-button { width: 42px; height: 42px; }
.topup-button { background: linear-gradient(135deg, #ff3948, #d51d2d); box-shadow: 0 14px 30px rgba(255,55,68,.22); }

.hero { min-height: min(860px, 56.25vw); border-bottom: 1px solid rgba(255,255,255,.08); }
.hero-backdrop { background-image: url("assets/heiress-hero-16x9.png"); filter: saturate(1.04) contrast(1.02); }
.hero-vignette {
  background:
    linear-gradient(90deg, rgba(0,0,0,.86), rgba(0,0,0,.34) 44%, rgba(0,0,0,.08) 72%),
    linear-gradient(180deg, rgba(0,0,0,.08), rgba(0,0,0,0) 46%, #030303 98%);
}
.hero-content { bottom: 110px; gap: 16px; width: min(650px, 44vw); }
.hero-title {
  font-family: var(--serif);
  font-size: clamp(44px, 5.2vw, 86px);
  font-weight: 700;
  letter-spacing: -.055em;
  text-shadow: 0 14px 42px rgba(0,0,0,.45);
}
.hero-tags span { border: 1px solid rgba(255,255,255,.13); background: rgba(255,255,255,.08); color: rgba(255,255,255,.82); }
.hero-tags span:first-child { border-color: rgba(233,192,111,.4); background: var(--gold-soft); color: var(--gold); }
.hero-copy { color: rgba(255,255,255,.7); font-size: 16px; }
.play-pill { width: 220px; height: 54px; border-radius: 999px; color: #080808; background: #fff; font-size: 17px; box-shadow: 0 18px 44px rgba(255,255,255,.16); }
.hero-thumbs { right: 5vw; bottom: 78px; }
.hero-thumb { width: 96px; height: 56px; border-radius: 14px; opacity: .72; }
.hero-thumb.is-active { border-color: var(--gold); opacity: 1; box-shadow: 0 0 0 4px rgba(233,192,111,.12); }

.category-band, .movie-section { padding-inline: clamp(18px, 5vw, 86px); }
.category-chip {
  border-color: rgba(255,255,255,.08);
  background: rgba(255,255,255,.055);
  color: rgba(255,255,255,.62);
}
.category-chip.is-active { border-color: rgba(233,192,111,.4); color: var(--gold); background: var(--gold-soft); }
.section-heading h2 { font-family: var(--serif); font-size: clamp(28px, 2.6vw, 42px); letter-spacing: -.04em; }
.poster-rail { grid-auto-columns: clamp(220px, 20vw, 330px); gap: 22px; }
.poster-card {
  padding: 10px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255,255,255,.075), rgba(255,255,255,.025));
  box-shadow: 0 24px 60px rgba(0,0,0,.24);
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}
.poster-card:hover { transform: translateY(-4px); border-color: rgba(233,192,111,.32); background: linear-gradient(180deg, rgba(255,255,255,.11), rgba(255,255,255,.035)); }
.poster-image { aspect-ratio: 16 / 10; border-radius: 18px; }
.poster-image::after { position: absolute; inset: auto 0 0; height: 44%; content: ""; background: linear-gradient(180deg, transparent, rgba(0,0,0,.76)); }
.poster-tag { top: 12px; left: 12px; border: 1px solid rgba(255,255,255,.2); background: rgba(255,55,68,.9); }
.poster-play { font-size: 36px; background: rgba(0,0,0,.25); }
.poster-card h3 { margin: 14px 4px 5px; font-size: 18px; letter-spacing: -.02em; }
.poster-card p { margin: 0 4px 6px; color: rgba(255,255,255,.54); }

.watch-info, .store-shell, .account-card, .auth-dialog, .app-callout {
  border: 1px solid rgba(255,255,255,.09);
  background: linear-gradient(180deg, rgba(24,24,24,.94), rgba(10,10,10,.92));
}
.watch-actions span { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.1); }
.watch-actions button:hover span, .watch-actions button.is-active span { background: linear-gradient(135deg, #ff3948, #b91321); }
.episode-card { border-radius: 14px; background: rgba(255,255,255,.065); }
.episode-card.is-open { background: linear-gradient(135deg, rgba(255,55,68,.76), rgba(233,192,111,.18)); }

.vip-card { border-radius: 18px; background: linear-gradient(135deg, #ffe4b1, #c99342); }
.coin-card { border: 1px solid rgba(255,255,255,.08); border-radius: 18px; background: rgba(255,255,255,.07); }
.payment-row button { border-radius: 14px; background: rgba(255,255,255,.07); }

.auth-modal { backdrop-filter: blur(10px); }
.modal-backdrop { background: rgba(0,0,0,.72); }
.auth-dialog { width: min(520px, 100%); padding: 34px; border-radius: 28px; box-shadow: 0 28px 90px rgba(0,0,0,.5); }
.auth-dialog h2 { font-size: 28px; letter-spacing: -.04em; }
.auth-dialog input { height: 52px; border-radius: 16px; background: rgba(255,255,255,.055); }
.auth-tabs { border: 1px solid rgba(255,255,255,.08); background: rgba(255,255,255,.045); }
.auth-tabs button.is-active { background: rgba(255,255,255,.12); }
.otp-input {
  letter-spacing: .25em;
  background-image: linear-gradient(90deg, rgba(255,255,255,.22) 1px, transparent 1px);
  background-size: calc(100% / 6) 100%;
}
.auth-options button { border: 1px solid rgba(255,255,255,.08); border-radius: 14px; background: rgba(255,255,255,.08); }

@media (max-width: 900px) {
  .hero::before { padding-top: 112%; }
  .hero-content { bottom: 86px; }
  .hero-title { font-size: 38px; }
  .hero-thumbs { bottom: 20px; }
  .hero-thumb { width: 72px; height: 44px; }
  .poster-rail { grid-auto-columns: 232px; }
}

* { box-sizing: border-box; }
html { background: #000; scroll-behavior: smooth; }
body { margin: 0; color: var(--text); background: #000; font-family: var(--sans); font-size: 14px; line-height: 1.45; overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button { cursor: pointer; }
body.modal-open { overflow: hidden; }

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  display: flex;
  align-items: center;
  height: 58px;
  padding: 0 30px;
  border-bottom: 1px solid rgba(255,255,255,.07);
  color: #fff;
  background: rgba(0,0,0,.82);
  backdrop-filter: blur(12px);
}
.brand, .footer-brand { display: inline-flex; align-items: center; gap: 10px; flex: none; font-size: 22px; font-weight: 900; }
.brand-mark { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 9px; background: var(--red); }
.brand-mark.mini { width: 50px; height: 50px; border-radius: 14px; background: rgba(255,255,255,.72); }
.brand-mark.mini i { background: rgba(0,0,0,.62); }
.brand-mark i { display: block; width: 5px; height: 17px; margin: 0 1.3px; border-radius: 3px; background: #fff; transform: skew(-12deg); }
.brand-mark i:nth-child(2) { height: 24px; }
.brand-mark i:nth-child(3) { height: 13px; }
.main-nav { display: flex; gap: 36px; margin-left: 42px; height: 100%; font-size: 16px; font-weight: 850; }
.main-nav a { display: flex; align-items: center; color: rgba(255,255,255,.92); }
.main-nav a:hover, .main-nav .is-active { color: var(--red); }
.header-tools { display: flex; align-items: center; gap: 18px; margin-left: auto; }
.header-icon, .language, .avatar-button, .topup-button { border: 0; color: #fff; background: transparent; }
.header-icon { width: 34px; height: 34px; font-size: 22px; }
.language { display: inline-flex; align-items: center; gap: 7px; font-size: 15px; font-weight: 850; }
.language-wrap { position: relative; }
.language-menu {
  position: absolute;
  top: 45px;
  right: -56px;
  display: none;
  width: 240px;
  padding: 18px 0;
  border-radius: 14px;
  background: #2a2a2a;
  box-shadow: 0 18px 44px rgba(0,0,0,.48);
}
.language-menu.is-open { display: block; }
.language-menu::before { position: absolute; top: -8px; left: 50%; width: 16px; height: 16px; content: ""; background: #2a2a2a; transform: rotate(45deg); }
.language-option { display: block; width: 100%; padding: 10px 24px; border: 0; color: rgba(255,255,255,.64); background: transparent; text-align: left; font-weight: 700; }
.language-option.is-active, .language-option:hover { color: #fff; }
.avatar-button, .avatar-large { border-radius: 50%; background: radial-gradient(circle at 50% 35%, #767676 0 24%, #444 25% 48%, #2c2c2c 49%); }
.avatar-button { width: 36px; height: 36px; }
.topup-button { min-height: 38px; padding: 0 22px; border-radius: 22px; background: var(--red); font-weight: 900; }
.topup-button.wide { width: 100%; }
.ghost-button { min-height: 42px; border: 1px solid rgba(255,255,255,.18); border-radius: 22px; color: #fff; background: transparent; font-weight: 900; }
.ghost-button.wide { width: 100%; }
.menu-toggle { display: none; }
.search-panel { position: absolute; top: 68px; right: 28px; display: none; align-items: center; gap: 10px; width: min(430px, calc(100vw - 36px)); padding: 12px 14px; border-radius: 22px; background: #252525; }
.search-panel.is-open { display: flex; }
.search-panel input { flex: 1; border: 0; outline: 0; color: #fff; background: transparent; }
.search-panel button { border: 0; color: #fff; background: transparent; font-size: 22px; }

main { min-height: calc(100vh - 58px); }
.view { display: none; }
.view.is-active { display: block; }

.hero { position: relative; min-height: min(820px, 56.25vw); overflow: hidden; background: #000; }
.hero::before { content: ""; display: block; padding-top: 56.25%; }
.hero-slide { position: absolute; inset: 0; display: block; width: 100%; border: 0; padding: 0; color: #fff; background: #000; text-align: left; }
.hero-backdrop { position: absolute; inset: 0; display: block; background: url("assets/heiress-hero-16x9.jpg") center center / cover no-repeat; opacity: .96; transition: background-image .25s ease; }
.hero-vignette { position: absolute; inset: 0; display: block; background: linear-gradient(90deg, rgba(0,0,0,.84), rgba(0,0,0,.32) 47%, rgba(0,0,0,.08)), linear-gradient(180deg, rgba(0,0,0,.2), rgba(0,0,0,0) 54%, #000); }
.hero-content { position: absolute; left: 6vw; bottom: 92px; display: flex; flex-direction: column; align-items: flex-start; gap: 18px; width: min(630px, 45vw); }
.hero-title { font-size: clamp(36px, 4vw, 58px); font-weight: 950; line-height: 1.08; }
.hero-tags { display: flex; gap: 9px; flex-wrap: wrap; }
.hero-tags span { padding: 6px 14px; border-radius: 18px; background: rgba(255,255,255,.18); font-weight: 800; }
.hero-tags span:first-child { background: var(--red); }
.hero-copy { max-width: 590px; color: rgba(255,255,255,.74); font-size: 17px; }
.play-pill { display: inline-flex; align-items: center; justify-content: center; gap: 12px; width: 280px; height: 64px; border-radius: 36px; color: #000; background: #fff; font-size: 22px; font-weight: 950; }
.hero-thumbs { position: absolute; right: 7vw; bottom: 72px; display: flex; align-items: center; gap: 10px; }
.hero-thumb { width: 78px; height: 104px; padding: 0; border: 2px solid transparent; border-radius: 9px; overflow: hidden; background: #202020; }
.hero-thumb.is-active { border-color: #fff; }
.hero-thumb img { width: 100%; height: 100%; object-fit: cover; }

.category-band, .movie-section { padding-inline: clamp(24px, 4vw, 70px); }
.category-band { padding-top: 24px; padding-bottom: 8px; }
.category-scroller, .poster-rail { overflow-x: auto; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.24) transparent; }
.category-scroller { display: flex; gap: 12px; padding-bottom: 10px; }
.category-chip { flex: none; padding: 10px 18px; border: 1px solid transparent; border-radius: 22px; color: rgba(255,255,255,.7); background: #1b1b1b; font-weight: 850; }
.category-chip.is-active { border-color: var(--red); color: var(--red); background: rgba(239,48,53,.12); }
.movie-section { padding-top: 26px; }
.section-heading { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.section-heading h2 { margin: 0; font-size: 28px; font-weight: 950; }
.section-heading button { border: 0; color: rgba(255,255,255,.62); background: transparent; font-weight: 800; }
.poster-rail { display: grid; grid-auto-flow: column; grid-auto-columns: clamp(176px, 14vw, 260px); gap: 20px; padding-bottom: 18px; }
.poster-card { padding: 0; border: 0; color: #fff; background: transparent; text-align: left; }
.poster-image { position: relative; display: block; aspect-ratio: 2 / 3; border-radius: 8px; overflow: hidden; background: #242424; }
.poster-image img { width: 100%; height: 100%; object-fit: cover; }
.poster-tag { position: absolute; top: 10px; left: 10px; z-index: 2; padding: 4px 9px; border-radius: 12px; background: var(--red); font-size: 12px; font-weight: 950; }
.poster-play { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-size: 44px; background: rgba(0,0,0,.16); opacity: 0; transition: .18s ease; }
.poster-card:hover .poster-play { opacity: 1; }
.poster-card h3 { margin: 12px 0 6px; font-size: 17px; line-height: 1.25; }
.poster-card p { margin: 0; color: var(--muted); font-size: 13px; }

.watch-view { min-height: 100vh; padding: 58px 24px 32px; background: radial-gradient(circle at 32% 20%, rgba(70,28,32,.36), transparent 28%), linear-gradient(180deg, #050505, #000 32%, #050505); }
.back-button { position: fixed; top: 86px; left: 26px; z-index: 10; width: 52px; height: 52px; border: 0; border-radius: 50%; color: #fff; background: rgba(30,30,30,.82); font-size: 28px; }
.watch-player { position: relative; display: flex; justify-content: center; align-items: center; gap: 18px; min-height: calc(100vh - 90px); padding-right: clamp(380px, 32vw, 500px); }
.player-shell { position: relative; width: min(calc((100vh - 82px) * 9 / 16), calc(100vw - 575px)); min-width: 380px; max-width: 560px; aspect-ratio: 9 / 16; border-radius: 22px; overflow: hidden; background: #111; box-shadow: 0 26px 90px rgba(0,0,0,.58), 0 0 0 1px rgba(255,255,255,.08); }
.watch-player video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #111; object-fit: contain; }
.watch-player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #000; }
.player-brand { position: absolute; top: 22px; left: 22px; z-index: 2; pointer-events: none; }
.quality-select { position: absolute; top: 16px; right: 14px; z-index: 3; min-width: 92px; height: 34px; padding: 0 10px; border: 1px solid rgba(255,255,255,.2); border-radius: 17px; color: #fff; background: rgba(0,0,0,.48); font-size: 12px; font-weight: 900; outline: 0; backdrop-filter: blur(8px); }
.quality-select option { color: #111; background: #fff; }
.watch-actions { display: grid; gap: 14px; align-self: center; }
.watch-actions button { display: grid; justify-items: center; gap: 6px; min-width: 62px; border: 0; color: rgba(255,255,255,.82); background: transparent; font-weight: 900; }
.watch-actions span { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 50%; background: rgba(255,255,255,.1); box-shadow: inset 0 0 0 1px rgba(255,255,255,.12); color: #fff; font-size: 28px; transition: .16s ease; }
.watch-actions button:hover span, .watch-actions button.is-active span { transform: scale(1.06); background: rgba(239,48,53,.9); }
.watch-actions button.is-active strong { color: #fff; }
.watch-actions strong { color: rgba(255,255,255,.62); font-size: 12px; }
.watch-info { position: fixed; top: 82px; right: 24px; bottom: 24px; width: min(420px, 31vw); overflow-y: auto; padding: 18px; border-radius: 22px; background: linear-gradient(180deg, rgba(28,28,28,.96), rgba(12,12,12,.92)); box-shadow: 0 20px 70px rgba(0,0,0,.38), inset 0 0 0 1px rgba(255,255,255,.06); }
.breadcrumb { display: flex; gap: 8px; color: var(--muted); font-size: 12px; }
.watch-info h1 { margin: 22px 0 10px; font-size: 22px; line-height: 1.18; }
.alias, .watch-info p { color: var(--muted); }
.watch-tags { display: flex; flex-wrap: wrap; gap: 9px; margin: 18px 0; }
.watch-tags span { padding: 8px 13px; border-radius: 18px; background: #1d1d1d; color: rgba(255,255,255,.74); font-size: 12px; font-weight: 850; }
.watch-meta-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); color: var(--muted); text-align: center; font-size: 11px; }
.watch-meta-strip strong { display: block; color: #fff; font-size: 17px; }
.episode-tabs { display: flex; gap: 10px; align-items: center; margin: 22px 0 12px; overflow-x: auto; }
.episode-tabs button { flex: none; min-height: 34px; padding: 0 13px; border: 1px solid rgba(255,255,255,.1); border-radius: 18px; color: var(--muted); background: #202020; font-weight: 900; }
.episode-tabs .is-active { border-color: rgba(239,48,53,.75); color: #fff; background: rgba(239,48,53,.2); }
.episode-grid { display: grid; grid-template-columns: repeat(5, minmax(52px, 1fr)); gap: 9px; }
.episode-card { position: relative; display: grid; place-items: center; min-height: 54px; border: 1px solid rgba(255,255,255,.06); border-radius: 10px; color: rgba(255,255,255,.78); background: #242424; font-weight: 950; transition: transform .16s ease, background .16s ease, border-color .16s ease; }
.episode-card:hover { transform: translateY(-1px); border-color: rgba(255,255,255,.2); }
.episode-card.is-open { color: #fff; background: linear-gradient(135deg, rgba(239,48,53,.68), #2b2b2b); }
.episode-card.is-current { outline: 2px solid rgba(255,255,255,.88); outline-offset: 2px; }
.episode-card span { font-size: 18px; }
.episode-card small { display: block; margin-top: -8px; color: rgba(255,255,255,.52); font-size: 10px; font-weight: 800; }
.episode-card.is-locked { color: rgba(255,255,255,.38); background: #1b1b1b; }
.episode-card.is-locked::after { position: absolute; top: 5px; right: 7px; content: "\1F512"; font-size: 11px; opacity: .62; }
.episode-card.is-coming { color: rgba(255,255,255,.28); background: rgba(255,255,255,.045); border-style: dashed; }
.episode-card.is-coming::after { content: ""; }
.locked-hint { margin: 12px 0 0; color: rgba(255,255,255,.42); font-size: 12px; }

.store-view { display: none; min-height: 100vh; padding: 92px 330px 80px 0; }
.store-view.is-active { display: block; }
.store-shell { width: min(860px, calc(100vw - 380px)); margin: 0 auto; padding: 22px; border-radius: 14px; background: var(--panel); }
.wallet-row { display: flex; gap: 22px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.wallet-row button { margin-left: auto; border: 0; color: var(--muted); background: transparent; }
.store-shell h2 { margin: 22px 0 4px; font-size: 18px; }
.vip-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-top: 14px; }
.vip-card { min-height: 112px; padding: 18px; border: 0; border-radius: 5px; color: #3b2415; background: linear-gradient(135deg, #ffe5b9, #f5c887); text-align: left; }
.vip-card strong { display: block; margin-top: 6px; font-size: 28px; }
.coin-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 14px; }
.coin-card { min-height: 110px; padding: 15px; border: 0; border-radius: 5px; color: #fff; background: #2b2b2b; text-align: left; }
.coin-card strong { display: block; font-size: 22px; }
.payment-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.payment-row button { min-height: 42px; border: 1px solid rgba(255,255,255,.32); border-radius: 4px; color: #fff; background: #2a2a2a; font-weight: 900; }
.store-note { color: var(--muted); font-size: 12px; }
.account-card { position: fixed; top: 86px; right: 26px; width: 280px; padding: 20px; border-radius: 14px; background: #2a2a2a; }
.account-top { display: grid; grid-template-columns: 42px 1fr auto; gap: 10px; align-items: center; }
.avatar-large { width: 42px; height: 42px; }
.account-top small { display: block; color: var(--muted); }
.account-top button { border: 0; color: var(--muted); background: transparent; }
.balance { display: grid; grid-template-columns: repeat(2, 1fr); margin: 20px 0; padding: 18px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); text-align: center; color: var(--muted); }
.balance strong { display: block; color: #fff; }

.brand-view { padding: 110px clamp(24px, 5vw, 90px); }
.app-callout { display: grid; grid-template-columns: 1fr auto; gap: 30px; align-items: center; padding: 58px; border-radius: 18px; background: var(--panel); }
.app-callout h2 { margin: 0 0 14px; font-size: 48px; line-height: 1; }
.app-callout p { color: var(--muted); font-size: 17px; }
.app-callout a { display: inline-flex; align-items: center; min-height: 46px; padding: 0 22px; border-radius: 24px; background: var(--red); font-weight: 900; }
.site-footer { padding: 40px clamp(24px, 5vw, 90px); color: var(--muted); background: #050505; }
.footer-links { display: flex; flex-wrap: wrap; gap: 20px; margin: 20px 0; font-size: 12px; font-weight: 900; }

.auth-modal[hidden] { display: none; }
.auth-modal { position: fixed; inset: 0; z-index: 400; display: grid; place-items: center; padding: 20px; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.78); }
.auth-dialog { position: relative; width: min(430px, 100%); padding: 28px; border-radius: 16px; background: #1b1b1b; }
.close-button { position: absolute; top: 10px; right: 12px; border: 0; color: #fff; background: transparent; font-size: 26px; }
.auth-dialog h2 { margin: 0 0 10px; }
.auth-dialog p { color: var(--muted); }
.auth-dialog form { display: grid; gap: 10px; margin: 18px 0; }
.auth-dialog input { height: 46px; padding: 0 14px; border: 1px solid var(--line); border-radius: 8px; color: #fff; background: #111; }
.auth-tabs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-top: 18px; padding: 4px; border-radius: 24px; background: #111; }
.auth-tabs button { min-height: 40px; border: 0; border-radius: 20px; color: var(--muted); background: transparent; font-weight: 900; }
.auth-tabs button.is-active { color: #fff; background: #2f2f2f; }
.otp-panel { display: grid; gap: 10px; padding-top: 8px; }
.otp-panel[hidden] { display: none; }
.otp-panel p { margin: 0 0 4px; font-size: 13px; }
.otp-input { text-align: center; font-size: 22px; letter-spacing: .18em; font-weight: 900; }
.auth-options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.auth-options button { min-height: 40px; border: 0; border-radius: 8px; color: #fff; background: #2b2b2b; }
.toast { position: fixed; right: 20px; bottom: 20px; z-index: 100; width: min(340px, calc(100vw - 40px)); padding: 14px 16px; border-left: 4px solid var(--red); color: #fff; background: #202020; opacity: 0; pointer-events: none; transform: translateY(12px); transition: .2s; }
.toast.is-showing { opacity: 1; transform: translateY(0); }

.checkout-modal[hidden] { display: none; }
.checkout-modal { position: fixed; inset: 0; z-index: 410; display: grid; place-items: center; padding: 20px; }
.checkout-dialog {
  position: relative;
  width: min(460px, 100%);
  padding: 30px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 26px;
  color: #fff;
  background: linear-gradient(180deg, rgba(32,32,34,.98), rgba(14,14,16,.98));
  box-shadow: 0 28px 90px rgba(0,0,0,.55);
}
.checkout-dialog .eyebrow { margin: 0 0 8px; color: #f6c978; font-size: 12px; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.checkout-dialog h2 { margin: 0 0 18px; font-size: 28px; letter-spacing: -.04em; }
.checkout-summary {
  display: grid;
  gap: 6px;
  margin-bottom: 18px;
  padding: 16px;
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 18px;
  background: rgba(255,255,255,.055);
}
.checkout-summary span { color: rgba(255,255,255,.82); font-weight: 800; }
.checkout-summary strong { font-size: 32px; color: #ffd58a; }
.checkout-summary small, .checkout-note { color: var(--muted); }
.checkout-note.is-error { color: #ff9d9d; }
.paypal-button-container { min-height: 46px; margin: 12px 0; }
.vip-card, .coin-card { position: relative; transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease; }
.vip-card:hover, .coin-card:hover { transform: translateY(-2px); box-shadow: 0 14px 28px rgba(0,0,0,.24); }
.vip-card.is-featured { outline: 2px solid rgba(255,255,255,.32); }
.vip-card em {
  position: absolute;
  right: 12px;
  top: 12px;
  padding: 5px 8px;
  border-radius: 999px;
  color: #231507;
  background: rgba(255,255,255,.55);
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}

@media (max-width: 900px) {
  .site-header { height: 62px; padding: 0 14px; }
  .brand { font-size: 18px; }
  .brand-mark { width: 32px; height: 32px; }
  .main-nav, .topup-button:not(.wide), .avatar-button { display: none; }
  .menu-toggle { display: inline-block; }
  .site-header.menu-open .main-nav { position: absolute; top: 62px; left: 0; right: 0; display: grid; height: auto; margin: 0; padding: 12px 18px; background: #050505; }
  .site-header.menu-open .main-nav a { min-height: 38px; }
  .hero { min-height: auto; }
  .hero::before { padding-top: 118%; }
  .hero-backdrop { background-position: center top; }
  .hero-content { left: 18px; right: 18px; bottom: 92px; align-items: center; width: auto; text-align: center; }
  .hero-title { font-size: 30px; }
  .hero-copy { display: none; }
  .hero-thumbs { left: 16px; right: 16px; bottom: 22px; overflow-x: auto; }
  .hero-thumb { width: 58px; height: 78px; }
  .play-pill { width: 168px; height: 44px; font-size: 16px; }
  .poster-rail { grid-auto-columns: 138px; gap: 12px; }
  .watch-view { padding: 72px 12px 30px; }
  .back-button { position: static; margin: 0 0 12px; }
  .watch-player { min-height: auto; padding: 0; gap: 10px; align-items: flex-end; }
  .player-shell { width: min(430px, calc(100vw - 84px)); min-width: 0; border-radius: 14px; }
  .watch-actions { gap: 10px; padding-bottom: 18px; }
  .watch-actions span { width: 44px; height: 44px; font-size: 23px; }
  .watch-actions strong { font-size: 10px; }
  .watch-info { position: static; width: auto; padding: 22px 8px; background: transparent; box-shadow: none; }
  .episode-grid { grid-template-columns: repeat(5, 1fr); }
  .store-view { padding: 78px 12px 40px; }
  .store-shell { width: 100%; }
  .account-card { position: static; width: auto; margin: 16px 12px; }
  .vip-grid, .coin-grid, .payment-row, .app-callout { grid-template-columns: 1fr; }
}

/* Final UI overrides */
.site-header { height: 66px; padding: 0 clamp(18px, 4vw, 54px); background: rgba(3,3,3,.76); border-bottom: 1px solid rgba(255,255,255,.08); }
.main-nav { gap: 28px; font-size: 14px; letter-spacing: .02em; text-transform: uppercase; }
.main-nav a { color: rgba(255,255,255,.64); }
.main-nav a:hover, .main-nav .is-active { color: #fff; }
.header-tools { gap: 10px; }
.header-icon, .language, .avatar-button, .topup-button { min-height: 40px; border: 1px solid rgba(255,255,255,.1); border-radius: 999px; background: rgba(255,255,255,.055); backdrop-filter: blur(14px); }
.header-icon { width: 42px; font-size: 18px; }
.language { padding: 0 14px; font-size: 13px; }
.language-menu { right: 0; width: 180px; border: 1px solid rgba(255,255,255,.1); background: rgba(18,18,18,.96); }
.language-option { padding: 11px 18px; }
.avatar-button { width: 42px; height: 42px; }
.topup-button { background: linear-gradient(135deg, #ff3948, #d51d2d); box-shadow: 0 14px 30px rgba(255,55,68,.22); }

.hero { min-height: min(860px, 56.25vw); border-bottom: 1px solid rgba(255,255,255,.08); }
.hero-backdrop { background-image: url("assets/heiress-hero-16x9.png"); filter: saturate(1.04) contrast(1.02); }
.hero-vignette { background: linear-gradient(90deg, rgba(0,0,0,.86), rgba(0,0,0,.34) 44%, rgba(0,0,0,.08) 72%), linear-gradient(180deg, rgba(0,0,0,.08), rgba(0,0,0,0) 46%, #030303 98%); }
.hero-content { bottom: 110px; gap: 16px; width: min(650px, 44vw); }
.hero-title { font-family: var(--serif); font-size: clamp(44px, 5.2vw, 86px); font-weight: 700; letter-spacing: -.055em; text-shadow: 0 14px 42px rgba(0,0,0,.45); }
.hero-tags span { border: 1px solid rgba(255,255,255,.13); background: rgba(255,255,255,.08); color: rgba(255,255,255,.82); }
.hero-tags span:first-child { border-color: rgba(233,192,111,.4); background: var(--gold-soft); color: var(--gold); }
.hero-copy { color: rgba(255,255,255,.7); font-size: 16px; }
.play-pill { width: 220px; height: 54px; border-radius: 999px; color: #080808; background: #fff; font-size: 17px; box-shadow: 0 18px 44px rgba(255,255,255,.16); }
.hero-thumbs { right: 5vw; bottom: 78px; }
.hero-thumb { width: 96px; height: 56px; border-radius: 14px; opacity: .72; }
.hero-thumb.is-active { border-color: var(--gold); opacity: 1; box-shadow: 0 0 0 4px rgba(233,192,111,.12); }

.poster-rail { grid-auto-columns: clamp(220px, 20vw, 330px); gap: 22px; }
.poster-card { padding: 10px; border: 1px solid rgba(255,255,255,.08); border-radius: 24px; background: linear-gradient(180deg, rgba(255,255,255,.075), rgba(255,255,255,.025)); box-shadow: 0 24px 60px rgba(0,0,0,.24); transition: transform .18s ease, border-color .18s ease, background .18s ease; }
.poster-card:hover { transform: translateY(-4px); border-color: rgba(233,192,111,.32); background: linear-gradient(180deg, rgba(255,255,255,.11), rgba(255,255,255,.035)); }
.poster-image { aspect-ratio: 16 / 10; border-radius: 18px; }
.poster-image::after { position: absolute; inset: auto 0 0; height: 44%; content: ""; background: linear-gradient(180deg, transparent, rgba(0,0,0,.76)); }
.poster-card h3 { margin: 14px 4px 5px; font-size: 18px; letter-spacing: -.02em; }
.poster-card p { margin: 0 4px 6px; color: rgba(255,255,255,.54); }
.section-heading h2 { font-family: var(--serif); font-size: clamp(28px, 2.6vw, 42px); letter-spacing: -.04em; }

.watch-info, .store-shell, .account-card, .auth-dialog, .app-callout { border: 1px solid rgba(255,255,255,.09); background: linear-gradient(180deg, rgba(24,24,24,.94), rgba(10,10,10,.92)); }
.auth-dialog { width: min(520px, 100%); padding: 34px; border-radius: 28px; box-shadow: 0 28px 90px rgba(0,0,0,.5); }
.auth-dialog h2 { font-size: 28px; letter-spacing: -.04em; }
.auth-dialog input { height: 52px; border-radius: 16px; background: rgba(255,255,255,.055); }
.otp-input { letter-spacing: .25em; background-image: linear-gradient(90deg, rgba(255,255,255,.22) 1px, transparent 1px); background-size: calc(100% / 6) 100%; }
.auth-options button { border: 1px solid rgba(255,255,255,.08); border-radius: 14px; background: rgba(255,255,255,.08); }

@media (max-width: 900px) {
  .hero::before { padding-top: 112%; }
  .hero-title { font-size: 38px; }
  .hero-thumb { width: 72px; height: 44px; }
  .poster-rail { grid-auto-columns: 232px; }
}

/* UI pass 2: compact hero, true vertical posters, refined top tools */
.site-header {
  height: 60px;
  padding: 0 clamp(18px, 3vw, 42px);
  background: rgba(4, 4, 5, .86);
  box-shadow: 0 1px 0 rgba(255,255,255,.06), 0 18px 50px rgba(0,0,0,.28);
}
.brand {
  font-size: 19px;
}
.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 10px;
}
.main-nav {
  margin-left: 34px;
  gap: 24px;
  font-size: 13px;
  font-weight: 800;
}
.header-tools {
  gap: 9px;
}
.header-icon,
.language,
.avatar-button,
.topup-button {
  height: 38px;
  min-height: 38px;
  border: 1px solid rgba(255,255,255,.12);
  background: linear-gradient(180deg, rgba(255,255,255,.075), rgba(255,255,255,.035));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 8px 22px rgba(0,0,0,.18);
}
.header-icon {
  width: 38px;
  display: grid;
  place-items: center;
  color: rgba(255,255,255,.86);
  font-size: 0;
}
.header-icon::before {
  font-size: 17px;
  line-height: 1;
}
.header-icon[aria-label="Search"]::before {
  content: "⌕";
  color: #8dc7ff;
  text-shadow: 5px 5px 0 rgba(255,70,96,.75);
}
.header-icon[aria-label="History"]::before {
  content: "↺";
  color: rgba(255,255,255,.82);
}
.language {
  gap: 7px;
  padding: 0 13px;
  color: rgba(255,255,255,.92);
  font-size: 13px;
}
.language span:first-child {
  font-size: 14px;
  filter: saturate(1.2);
}
.language-menu {
  top: 46px;
  right: 0;
  width: 172px;
  border-radius: 18px;
  background: rgba(12,12,13,.97);
  box-shadow: 0 22px 70px rgba(0,0,0,.44);
}
.language-menu::before {
  display: none;
}
.language-option {
  padding: 10px 16px;
  font-size: 13px;
}
.language-option.is-active {
  color: var(--gold);
}
.avatar-button {
  position: relative;
  width: 38px;
  padding: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 34%, #f4dcb7 0 13%, transparent 14%),
    radial-gradient(ellipse at 50% 86%, #f4dcb7 0 27%, transparent 28%),
    linear-gradient(135deg, rgba(233,192,111,.28), rgba(255,55,68,.1)),
    #151515;
}
.avatar-button::before {
  position: absolute;
  inset: 6px;
  content: "";
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 50%;
}
.avatar-button.is-signed-in {
  background:
    radial-gradient(circle at 50% 34%, #fff 0 13%, transparent 14%),
    radial-gradient(ellipse at 50% 86%, #fff 0 27%, transparent 28%),
    linear-gradient(135deg, #ff3948, #e9c06f);
}
.topup-button {
  padding: 0 21px;
  border: 0;
  color: #fff;
  background: linear-gradient(135deg, #ff3d50, #de1e32);
}

.hero {
  min-height: clamp(520px, 42vw, 690px);
}
.hero::before {
  padding-top: min(47.5%, 690px);
}
.hero-backdrop {
  background-size: contain;
  background-position: center center;
  background-color: #030303;
}
.hero-backdrop::before {
  position: absolute;
  inset: -28px;
  content: "";
  background: inherit;
  background-size: cover;
  background-position: center center;
  filter: blur(28px) brightness(.44) saturate(1.1);
  transform: scale(1.04);
}
.hero-backdrop::after {
  position: absolute;
  inset: 0;
  content: "";
  background: inherit;
  background-size: contain;
  background-position: center center;
  background-repeat: no-repeat;
}
.hero-vignette {
  background:
    linear-gradient(90deg, rgba(0,0,0,.88), rgba(0,0,0,.30) 35%, rgba(0,0,0,.08) 66%, rgba(0,0,0,.45)),
    linear-gradient(180deg, rgba(0,0,0,.12), rgba(0,0,0,0) 50%, #030303 98%);
}
.hero-content {
  bottom: clamp(62px, 7vw, 96px);
  width: min(560px, 39vw);
}
.hero-title {
  font-size: clamp(38px, 4.2vw, 66px);
}
.hero-copy {
  max-width: 460px;
}
.play-pill {
  width: 180px;
  height: 48px;
  font-size: 16px;
}
.hero-thumbs {
  right: clamp(28px, 4vw, 70px);
  bottom: 44px;
}
.hero-thumb {
  width: 86px;
  height: 50px;
}

.category-band {
  padding-top: 14px;
}
.movie-section {
  padding-top: 18px;
}
.section-heading {
  margin-bottom: 14px;
}
.section-heading h2 {
  font-size: clamp(25px, 2.2vw, 36px);
}
.poster-rail {
  grid-auto-columns: clamp(158px, 13vw, 220px);
  gap: 18px;
}
.poster-card {
  padding: 8px;
  border-radius: 22px;
}
.poster-image {
  aspect-ratio: 3 / 4;
  border-radius: 16px;
  background: #111;
}
.poster-image img {
  object-fit: contain;
  background: #111;
}
.poster-image::before {
  position: absolute;
  inset: 0;
  z-index: 0;
  content: "";
  background: inherit;
  filter: blur(18px) brightness(.44);
  transform: scale(1.08);
}
.poster-image img,
.poster-tag,
.poster-play {
  position: relative;
  z-index: 1;
}
.poster-image::after {
  z-index: 2;
  pointer-events: none;
}
.poster-tag {
  z-index: 3;
}
.poster-play {
  z-index: 4;
}
.poster-card h3 {
  margin-top: 11px;
  font-size: 16px;
}

@media (max-width: 900px) {
  .site-header {
    height: 60px;
    padding: 0 14px;
  }
  .header-tools {
    gap: 7px;
  }
  .header-icon,
  .language,
  .avatar-button {
    height: 36px;
    min-height: 36px;
  }
  .header-icon,
  .avatar-button {
    width: 36px;
  }
  .language {
    max-width: 126px;
    padding: 0 10px;
  }
  .hero {
    min-height: 470px;
  }
  .hero::before {
    padding-top: 72%;
  }
  .hero-backdrop {
    background-size: cover;
    background-position: center center;
  }
  .hero-content {
    left: 18px;
    right: 18px;
    bottom: 76px;
    width: auto;
  }
  .hero-title {
    font-size: 34px;
  }
  .hero-thumbs {
    left: 18px;
    right: 18px;
    bottom: 20px;
  }
  .hero-thumb {
    width: 76px;
    height: 44px;
  }
  .poster-rail {
    grid-auto-columns: 158px;
  }
}

/* UI pass 3: bleeding cinematic hero image */
.hero {
  min-height: clamp(500px, 39vw, 640px);
}
.hero::before {
  padding-top: min(43.5%, 640px);
}
.hero-backdrop {
  background-size: cover;
  background-position: center center;
  background-color: #030303;
}
.hero-backdrop::before {
  inset: 0;
  opacity: .45;
  filter: blur(18px) brightness(.58) saturate(1.08);
  transform: scale(1.02);
}
.hero-backdrop::after {
  inset: 0;
  background-size: cover;
  background-position: center center;
  opacity: .92;
}
.hero-vignette {
  background:
    linear-gradient(90deg, rgba(0,0,0,.92) 0%, rgba(0,0,0,.70) 17%, rgba(0,0,0,.16) 42%, rgba(0,0,0,.18) 73%, rgba(0,0,0,.74) 100%),
    linear-gradient(180deg, rgba(0,0,0,.06), rgba(0,0,0,0) 54%, #030303 98%);
}
.hero-content {
  bottom: clamp(54px, 6.2vw, 84px);
  width: min(520px, 34vw);
}
.hero-title {
  font-size: clamp(36px, 3.8vw, 60px);
}
.hero-thumbs {
  bottom: 36px;
}

@media (max-width: 900px) {
  .hero {
    min-height: 430px;
  }
  .hero::before {
    padding-top: 78%;
  }
  .hero-backdrop,
  .hero-backdrop::after {
    background-size: cover;
    background-position: center center;
  }
}

/* UI pass 4: safe hero composition + minimal header icons */
.site-header {
  height: 58px;
  background: linear-gradient(180deg, rgba(4,4,5,.92), rgba(4,4,5,.78));
}
.header-tools {
  gap: 12px;
}
.header-icon,
.avatar-button {
  width: 36px;
  height: 36px;
  min-height: 36px;
  border: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}
.header-icon {
  color: rgba(255,255,255,.92);
  font-size: 0;
}
.header-icon::before {
  font-size: 22px;
  font-weight: 400;
  text-shadow: none;
}
.header-icon[aria-label="Search"]::before {
  content: "⌕";
  color: rgba(255,255,255,.94);
  text-shadow: none;
}
.header-icon[aria-label="History"]::before {
  content: "◷";
  color: rgba(255,255,255,.86);
}
.language {
  height: 36px;
  min-height: 36px;
  padding: 0 12px;
  border: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  color: rgba(255,255,255,.92);
}
.avatar-button {
  background:
    radial-gradient(circle at 50% 36%, rgba(255,255,255,.78) 0 15%, transparent 16%),
    radial-gradient(ellipse at 50% 84%, rgba(255,255,255,.78) 0 28%, transparent 29%),
    rgba(255,255,255,.16);
}
.avatar-button::before {
  display: none;
}
.topup-button {
  height: 38px;
  min-height: 38px;
  padding: 0 22px;
  border: 0;
  background: #ff3446;
  box-shadow: none;
}

.hero {
  min-height: clamp(560px, 46.25vw, 760px);
}
.hero::before {
  padding-top: min(46.25%, 760px);
}
.hero-backdrop {
  background-size: cover;
  background-position: var(--hero-position, center 38%);
  opacity: 1;
}
.hero-backdrop::before {
  inset: 0;
  background: inherit;
  background-size: cover;
  background-position: var(--hero-position, center 38%);
  opacity: .8;
  filter: blur(18px) brightness(.45) saturate(1.08);
  transform: scale(1.03);
}
.hero-backdrop::after {
  position: absolute;
  inset: 0 clamp(0px, 4vw, 76px);
  content: "";
  background: inherit;
  background-size: contain;
  background-position: var(--hero-position, center 38%);
  background-repeat: no-repeat;
  opacity: .98;
}
.hero-vignette {
  background:
    linear-gradient(90deg, rgba(0,0,0,.95) 0%, rgba(0,0,0,.82) 20%, rgba(0,0,0,.26) 43%, rgba(0,0,0,.14) 68%, rgba(0,0,0,.72) 100%),
    linear-gradient(180deg, rgba(0,0,0,.18), rgba(0,0,0,0) 48%, #030303 99%);
}
.hero-content {
  left: clamp(54px, 5.4vw, 110px);
  bottom: clamp(82px, 9vw, 130px);
  width: min(480px, 30vw);
}
.hero-title {
  font-size: clamp(40px, 4.1vw, 72px);
}
.hero-thumbs {
  right: clamp(34px, 5vw, 92px);
  bottom: 74px;
}

@media (max-width: 900px) {
  .hero {
    min-height: 520px;
  }
  .hero::before {
    padding-top: 92%;
  }
  .hero-backdrop::after {
    inset: 0;
    background-size: cover;
  }
  .hero-content {
    left: 18px;
    right: 18px;
    bottom: 82px;
    width: auto;
  }
  .hero-thumbs {
    bottom: 22px;
  }
}

/* UI pass 5: brighter full-bleed hero, fewer black bands */
body {
  background:
    radial-gradient(circle at 18% -6%, rgba(160, 53, 48, .18), transparent 32%),
    radial-gradient(circle at 82% 0%, rgba(233, 192, 111, .10), transparent 28%),
    #050505;
}
.hero {
  min-height: clamp(540px, 44vw, 720px);
  background: #050505;
}
.hero::before {
  padding-top: min(44%, 720px);
}
.hero-backdrop {
  background-size: cover;
  background-position: var(--hero-position, center 43%);
  filter: saturate(1.08) contrast(1.04) brightness(1.08);
}
.hero-backdrop::before {
  display: none;
}
.hero-backdrop::after {
  display: none;
}
.hero-vignette {
  background:
    linear-gradient(90deg, rgba(0,0,0,.82) 0%, rgba(0,0,0,.58) 18%, rgba(0,0,0,.12) 45%, rgba(0,0,0,.08) 70%, rgba(0,0,0,.48) 100%),
    linear-gradient(180deg, rgba(0,0,0,.08) 0%, rgba(0,0,0,0) 50%, rgba(5,5,5,.78) 100%);
}
.hero-content {
  bottom: clamp(76px, 8.2vw, 118px);
}
.hero-copy {
  color: rgba(255,255,255,.82);
}
.hero-tags span {
  background: rgba(255,255,255,.13);
}
.category-band {
  background: linear-gradient(180deg, rgba(5,5,5,.98), #050505);
}
.movie-section,
.site-footer {
  background: #050505;
}
.poster-card {
  background: linear-gradient(180deg, rgba(255,255,255,.09), rgba(255,255,255,.035));
}
.poster-image {
  background: #181818;
}

@media (max-width: 900px) {
  .hero {
    min-height: 500px;
  }
  .hero::before {
    padding-top: 86%;
  }
}

/* Header icon image pass */
.header-tools .header-icon,
.header-tools .avatar-button,
.header-tools .language {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.header-tools .header-icon::before,
.header-tools .avatar-button::before {
  display: none !important;
  content: none !important;
}
.header-tools .header-icon img,
.header-tools .avatar-button img,
.header-tools .language img {
  display: block;
  width: 22px;
  height: 22px;
  object-fit: contain;
  opacity: .86;
  filter: brightness(1.18);
  transition: opacity .18s ease, filter .18s ease, transform .18s ease;
}
.header-tools .avatar-button img {
  width: 24px;
  height: 24px;
}
.header-tools .language img {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
}
.header-tools .header-icon:hover img,
.header-tools .avatar-button:hover img,
.header-tools .language:hover img {
  opacity: 1;
  filter: brightness(1.45);
  transform: translateY(-1px);
}
.header-tools .avatar-button,
.header-tools .avatar-button.is-signed-in {
  background: rgba(255,255,255,.055);
}

/* Emergency header icon size clamp */
.site-header .header-tools button.header-icon,
.site-header .header-tools button.avatar-button {
  width: 38px !important;
  height: 38px !important;
  min-width: 38px !important;
  min-height: 38px !important;
  padding: 0 !important;
  overflow: hidden !important;
}
.site-header .header-tools button.language {
  height: 38px !important;
  min-height: 38px !important;
  padding: 0 12px !important;
  overflow: visible !important;
}
.site-header .header-tools button.header-icon > img,
.site-header .header-tools button.avatar-button > img,
.site-header .header-tools button.language > img {
  width: 20px !important;
  height: 20px !important;
  max-width: 20px !important;
  max-height: 20px !important;
  min-width: 0 !important;
  min-height: 0 !important;
  object-fit: contain !important;
  flex: 0 0 20px !important;
  opacity: .86;
  filter: brightness(1.18);
}
.site-header .header-tools button.avatar-button > img {
  width: 22px !important;
  height: 22px !important;
  max-width: 22px !important;
  max-height: 22px !important;
  flex-basis: 22px !important;
}
.site-header .header-tools .language-menu img,
.site-header .hero-thumbs img,
.site-header .poster-card img {
  width: auto;
  height: auto;
}

/* UI tone pass: soften pure black and add cinematic warmth */
:root {
  --page-bg: #0d0d10;
  --surface-soft: rgba(255,255,255,.072);
  --surface-mid: rgba(255,255,255,.105);
  --line-soft: rgba(255,255,255,.115);
}
body {
  background:
    radial-gradient(circle at 12% 0%, rgba(136, 38, 48, .22), transparent 34%),
    radial-gradient(circle at 82% 8%, rgba(216, 167, 87, .14), transparent 32%),
    linear-gradient(180deg, #111116 0%, #0d0d10 42%, #101014 100%) !important;
}
.site-header {
  background: linear-gradient(180deg, rgba(16,16,19,.92), rgba(16,16,19,.72)) !important;
  border-bottom: 1px solid rgba(255,255,255,.09);
  box-shadow: 0 16px 36px rgba(0,0,0,.24);
}
.hero {
  background: #111116 !important;
  border-bottom: 1px solid rgba(255,255,255,.10) !important;
}
.hero-backdrop {
  background-size: cover !important;
  background-position: var(--hero-position, center center) !important;
  filter: saturate(1.06) contrast(1.02) brightness(1.04) !important;
}
.hero-vignette {
  background:
    linear-gradient(90deg, rgba(10,10,13,.76) 0%, rgba(10,10,13,.38) 18%, rgba(10,10,13,.05) 45%, rgba(10,10,13,.08) 72%, rgba(10,10,13,.56) 100%),
    linear-gradient(180deg, rgba(10,10,13,.06) 0%, rgba(10,10,13,0) 48%, rgba(13,13,16,.62) 100%) !important;
}
.category-band {
  background: linear-gradient(180deg, rgba(18,18,22,.96), rgba(15,15,18,.92)) !important;
}
.movie-section,
.site-footer {
  background: transparent !important;
}
.movie-section {
  margin-top: 18px;
  padding-top: 10px;
}
.section-heading h2 {
  color: rgba(255,255,255,.95);
}
.category-chip,
.poster-card,
.watch-info,
.store-shell,
.account-card,
.auth-dialog,
.checkout-dialog,
.app-callout {
  border-color: var(--line-soft) !important;
  background: linear-gradient(180deg, rgba(35,35,40,.88), rgba(20,20,24,.84)) !important;
  box-shadow: 0 18px 54px rgba(0,0,0,.24);
}
.poster-card {
  background: linear-gradient(180deg, rgba(255,255,255,.105), rgba(255,255,255,.052)) !important;
}
.poster-image {
  background: #222228 !important;
}
.category-chip {
  background: rgba(255,255,255,.078) !important;
}
.category-chip.is-active,
.category-chip:hover {
  background: rgba(255,64,82,.20) !important;
  border-color: rgba(255,98,114,.35) !important;
}
.wallet-row,
.episode-tabs,
.watch-meta-strip {
  background: rgba(255,255,255,.045);
  border-radius: 16px;
}
.vip-card {
  box-shadow: 0 16px 36px rgba(204,145,65,.20);
}
.coin-card {
  background: linear-gradient(180deg, rgba(255,255,255,.095), rgba(255,255,255,.045)) !important;
}
.site-footer {
  color: rgba(255,255,255,.66);
}
@media (max-width: 900px) {
  .site-header {
    background: rgba(16,16,19,.94) !important;
  }
}

/* 2026-08-14 final tone balance: brighter premium charcoal, less pure black */
:root {
  --page-bg: #15151a;
  --page-bg-2: #101116;
  --panel-bg: rgba(38,38,45,.78);
  --panel-bg-strong: rgba(46,46,54,.88);
  --panel-line: rgba(255,255,255,.14);
  --text-soft: rgba(255,255,255,.74);
}
html {
  background: #15151a !important;
}
body {
  background:
    radial-gradient(circle at 8% -4%, rgba(212,64,78,.20), transparent 34%),
    radial-gradient(circle at 84% 5%, rgba(227,181,105,.16), transparent 30%),
    radial-gradient(circle at 50% 52%, rgba(255,255,255,.045), transparent 34%),
    linear-gradient(180deg, #19191f 0%, #14141a 42%, #17171d 100%) !important;
}
.site-header {
  background: rgba(24,24,30,.78) !important;
  border-bottom-color: rgba(255,255,255,.12) !important;
  backdrop-filter: blur(18px);
}
.hero {
  min-height: min(760px, 43vw) !important;
  background: #17171d !important;
}
.hero::before {
  padding-top: 29.6875% !important;
}
.hero-vignette {
  background:
    linear-gradient(90deg, rgba(15,15,19,.68) 0%, rgba(15,15,19,.30) 20%, rgba(15,15,19,.03) 47%, rgba(15,15,19,.07) 76%, rgba(15,15,19,.48) 100%),
    linear-gradient(180deg, rgba(15,15,19,.04) 0%, rgba(15,15,19,0) 55%, rgba(21,21,26,.44) 100%) !important;
}
.hero-content {
  bottom: clamp(56px, 5vw, 96px) !important;
}
.hero-title {
  text-shadow: 0 18px 44px rgba(0,0,0,.38) !important;
}
.category-band {
  background: linear-gradient(180deg, rgba(26,26,32,.92), rgba(22,22,28,.82)) !important;
  border-top: 1px solid rgba(255,255,255,.08);
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.movie-section {
  background: linear-gradient(180deg, rgba(255,255,255,.035), rgba(255,255,255,.012)) !important;
}
.section-heading button,
.section-heading a {
  color: rgba(255,255,255,.68) !important;
}
.category-chip {
  background: rgba(255,255,255,.095) !important;
  border-color: rgba(255,255,255,.11) !important;
  color: rgba(255,255,255,.78) !important;
  box-shadow: 0 10px 26px rgba(0,0,0,.16) !important;
}
.poster-card {
  border: 1px solid var(--panel-line) !important;
  background:
    linear-gradient(180deg, rgba(255,255,255,.13), rgba(255,255,255,.055)),
    rgba(34,34,40,.72) !important;
  box-shadow: 0 18px 44px rgba(0,0,0,.20) !important;
}
.poster-card:hover {
  border-color: rgba(233,192,111,.36) !important;
  background:
    linear-gradient(180deg, rgba(255,255,255,.17), rgba(255,255,255,.07)),
    rgba(42,42,48,.82) !important;
}
.poster-card p,
.hero-copy {
  color: var(--text-soft) !important;
}
.poster-image {
  background: #2b2b32 !important;
}
.watch-view {
  background:
    radial-gradient(circle at 30% 16%, rgba(171,51,65,.22), transparent 28%),
    linear-gradient(180deg, #19191f, #131318 44%, #17171d) !important;
}
.watch-info,
.store-shell,
.account-card,
.auth-dialog,
.checkout-dialog,
.app-callout,
.search-panel,
.language-menu,
.language-menu::before {
  background: linear-gradient(180deg, rgba(48,48,56,.94), rgba(31,31,38,.94)) !important;
  border-color: rgba(255,255,255,.14) !important;
}
.episode-card,
.coin-card,
.payment-row button,
.auth-options button,
.auth-tabs,
.wallet-row,
.episode-tabs,
.watch-meta-strip {
  background: rgba(255,255,255,.08) !important;
  border-color: rgba(255,255,255,.12) !important;
}
.site-footer {
  background: rgba(20,20,25,.72) !important;
  border-top: 1px solid rgba(255,255,255,.08);
}
.history-list {
  display: grid;
  gap: 10px;
  max-height: min(420px, 58vh);
  overflow: auto;
}
.history-item {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 16px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 16px;
  background: rgba(255,255,255,.07);
}
.history-item strong,
.history-item b {
  display: block;
  color: rgba(255,255,255,.95);
}
.history-item small,
.empty-state {
  color: rgba(255,255,255,.62);
}
.history-item > div:last-child {
  text-align: right;
  white-space: nowrap;
}
@media (max-width: 900px) {
  .hero {
    min-height: 64vh !important;
  }
  .hero::before {
    padding-top: 92% !important;
  }
}

@media (max-width: 900px) {
  .site-header {
    height: 58px !important;
    padding: 0 max(16px, env(safe-area-inset-right)) 0 max(14px, env(safe-area-inset-left)) !important;
    gap: 8px !important;
  }

  .brand {
    min-width: 0 !important;
    gap: 8px !important;
    font-size: 18px !important;
  }

  .brand span:last-child {
    max-width: 160px !important;
    overflow: hidden !important;
    white-space: nowrap !important;
  }

  .brand-mark {
    width: 34px !important;
    height: 34px !important;
    border-radius: 10px !important;
  }

  .header-tools {
    flex: 1 1 auto !important;
    justify-content: flex-end !important;
    gap: 7px !important;
    min-width: 0 !important;
    margin-left: 4px !important;
  }

  .header-tools .header-icon,
  .header-tools .avatar-button,
  .header-tools .language {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    min-height: 36px !important;
  }

  .header-tools .language {
    width: auto !important;
    max-width: 116px !important;
    padding: 0 8px !important;
    gap: 5px !important;
  }

  .header-tools .language span {
    max-width: 64px !important;
    overflow: hidden !important;
    white-space: nowrap !important;
  }

  .header-tools .avatar-button {
    margin-right: 4px !important;
  }

  .hero {
    min-height: 430px !important;
    height: min(58vh, 520px) !important;
  }

  .hero::before {
    padding-top: 0 !important;
  }

  .hero-slide {
    min-height: 430px !important;
  }

  .hero-backdrop {
    background-size: cover !important;
    background-position: center top !important;
  }

  .hero-content {
    left: 14px !important;
    right: 14px !important;
    bottom: 100px !important;
    gap: 10px !important;
  }

  .hero-title {
    max-width: 92vw !important;
    font-size: clamp(24px, 7vw, 34px) !important;
    line-height: 1.08 !important;
    text-wrap: balance !important;
  }

  .hero-tags {
    justify-content: center !important;
    gap: 6px !important;
  }

  .hero-tags span {
    padding: 5px 10px !important;
    font-size: 12px !important;
  }

  .hero-copy {
    display: none !important;
  }

  .hero-cta {
    min-height: 50px !important;
    padding: 0 34px !important;
    font-size: 20px !important;
  }

  .hero-thumbs {
    left: 12px !important;
    right: 12px !important;
    bottom: 12px !important;
    gap: 8px !important;
  }

  .hero-thumb {
    width: 54px !important;
    height: 74px !important;
  }

  .movie-section {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }

  .poster-rail {
    grid-auto-columns: 146px !important;
    gap: 12px !important;
  }

  .poster-card h3 {
    font-size: 15px !important;
  }

  .poster-card p {
    font-size: 12px !important;
  }

  .watch-view {
    padding: 64px 12px 24px !important;
  }

  .back-button {
    top: 72px !important;
    left: 12px !important;
    width: 42px !important;
    height: 42px !important;
    font-size: 24px !important;
  }

  .watch-player {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 12px !important;
    min-height: auto !important;
    padding-right: 0 !important;
  }

  .player-shell {
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    aspect-ratio: 9 / 16 !important;
    min-height: min(72vh, 680px) !important;
    border-radius: 18px !important;
  }

  .quality-select {
    top: 12px !important;
    right: 12px !important;
  }

  .watch-actions {
    width: 100% !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 8px !important;
    padding: 0 4px !important;
  }

  .watch-actions button {
    min-width: 0 !important;
  }

  .watch-actions span {
    width: 42px !important;
    height: 42px !important;
    font-size: 22px !important;
  }

  .watch-actions strong {
    font-size: 10px !important;
  }

  .watch-info {
    position: static !important;
    width: auto !important;
    margin-top: 6px !important;
    padding: 14px 6px 22px !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  .watch-info h1 {
    margin-top: 14px !important;
    font-size: 18px !important;
  }

  .watch-meta-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 6px !important;
  }

  .episode-tabs {
    gap: 8px !important;
    margin: 18px 0 10px !important;
  }

  .episode-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }

  .episode-card {
    min-height: 48px !important;
  }

  .episode-card span {
    font-size: 16px !important;
  }

  .store-view {
    padding: 72px 12px 24px !important;
  }

  .store-shell {
    width: 100% !important;
    padding: 16px !important;
  }

  .wallet-row {
    flex-wrap: wrap !important;
    gap: 10px !important;
  }

  .wallet-row button {
    margin-left: 0 !important;
  }

  .vip-grid,
  .coin-grid,
  .payment-row,
  .auth-options {
    grid-template-columns: 1fr !important;
  }

  .account-card {
    position: static !important;
    width: auto !important;
    margin-top: 14px !important;
  }

  .brand-view {
    padding: 76px 12px !important;
  }

  .app-callout {
    grid-template-columns: 1fr !important;
    padding: 22px !important;
  }

  .app-callout h2 {
    font-size: 30px !important;
  }

  .auth-dialog,
  .checkout-dialog {
    width: min(100%, 100%) !important;
    padding: 22px 16px !important;
    border-radius: 20px !important;
  }
}

/* Mobile-only app UI: separated from desktop layout */
@media (max-width: 640px) {
  body {
    background: #070708 !important;
  }

  .site-header {
    display: grid !important;
    grid-template-columns: 40px minmax(0, 1fr) auto !important;
    align-items: center !important;
    height: 74px !important;
    padding: 12px 14px 8px !important;
    background: rgba(12,12,15,.94) !important;
    backdrop-filter: blur(18px) !important;
  }

  .brand {
    grid-column: 2 !important;
    justify-self: center !important;
    margin-left: 0 !important;
    font-size: 20px !important;
    line-height: 1 !important;
  }

  .brand span:last-child {
    max-width: 138px !important;
  }

  .brand-mark {
    width: 36px !important;
    height: 36px !important;
  }

  .header-tools {
    grid-column: 3 !important;
    gap: 9px !important;
    flex: 0 0 auto !important;
  }

  .menu-toggle {
    position: absolute !important;
    left: 14px !important;
    top: 18px !important;
    z-index: 120 !important;
    display: grid !important;
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    font-size: 28px !important;
  }

  .header-tools > button[data-toast],
  .topup-button:not(.wide) {
    display: none !important;
  }

  .header-tools .language {
    display: none !important;
  }

  .header-tools .header-icon,
  .header-tools .avatar-button {
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    border-radius: 50% !important;
    background: rgba(255,255,255,.075) !important;
  }

  .header-tools .avatar-button {
    margin-right: 0 !important;
  }

  .main-nav {
    position: absolute !important;
    top: 74px !important;
    left: 12px !important;
    right: 12px !important;
    z-index: 98 !important;
    display: none !important;
    gap: 4px !important;
    height: auto !important;
    padding: 10px !important;
    overflow: hidden !important;
    border: 1px solid rgba(255,255,255,.09) !important;
    border-radius: 16px !important;
    background: rgba(12,12,15,.98) !important;
    box-shadow: 0 18px 48px rgba(0,0,0,.44) !important;
  }

  .site-header.menu-open .main-nav { display: grid !important; }

  .main-nav a {
    min-height: 44px !important;
    padding: 0 12px !important;
    border-radius: 10px !important;
    color: rgba(255,255,255,.68) !important;
    font-size: 16px !important;
    font-weight: 700 !important;
  }

  .main-nav a:hover,
  .main-nav a.is-active {
    background: rgba(255,255,255,.08) !important;
  }

  .main-nav a.is-active {
    color: #fff !important;
  }

  .main-nav a.is-active::after { display: none !important; }

  .hero {
    height: 620px !important;
    min-height: 620px !important;
    margin-top: 0 !important;
    border-bottom: 0 !important;
  }

  .hero-slide,
  .hero-backdrop {
    min-height: 620px !important;
  }

  .hero-backdrop {
    background-size: cover !important;
    background-position: center center !important;
  }

  .hero-vignette {
    background:
      linear-gradient(180deg, rgba(0,0,0,.28), rgba(0,0,0,.08) 34%, rgba(0,0,0,.78) 88%, #070708),
      linear-gradient(90deg, rgba(0,0,0,.28), transparent 38%, rgba(0,0,0,.22)) !important;
  }

  .hero-content {
    top: auto !important;
    bottom: 118px !important;
    left: 18px !important;
    right: 18px !important;
  }

  .hero-title {
    font-size: clamp(30px, 9vw, 46px) !important;
    line-height: 1.02 !important;
    text-shadow: 0 3px 24px rgba(0,0,0,.74) !important;
  }

  .hero-tags span {
    padding: 6px 12px !important;
    border-radius: 999px !important;
    font-size: 13px !important;
    background: rgba(255,255,255,.22) !important;
  }

  .hero-cta {
    min-width: 220px !important;
    height: 58px !important;
    border-radius: 999px !important;
    font-size: 22px !important;
  }

  .hero-thumbs {
    bottom: 24px !important;
    left: 18px !important;
    right: 18px !important;
  }

  .hero-thumb {
    width: 76px !important;
    height: 96px !important;
    border-radius: 14px !important;
  }

  .category-scroller {
    margin-top: 0 !important;
    padding: 16px 18px 14px !important;
    background: #141419 !important;
  }

  .movie-section {
    padding: 28px 18px 10px !important;
  }

  .section-heading h2 {
    font-size: 28px !important;
  }

  .poster-rail {
    grid-auto-columns: 172px !important;
  }

  .watch-view {
    padding: 94px 0 28px !important;
    background: #050505 !important;
  }

  .watch-player {
    display: block !important;
    min-height: 0 !important;
    padding: 0 !important;
  }

  .player-shell {
    width: min(calc(100% - 32px), 360px) !important;
    margin: 0 auto !important;
    height: auto !important;
    min-height: 0 !important;
    aspect-ratio: 9 / 16 !important;
    border-radius: 16px !important;
    box-shadow: 0 18px 48px rgba(0,0,0,.38) !important;
    transition: width .24s ease, height .24s ease, aspect-ratio .24s ease, border-radius .24s ease, transform .24s ease !important;
  }

  .watch-actions {
    display: flex !important;
    justify-content: space-around !important;
    gap: 8px !important;
    margin: 10px 0 2px !important;
    padding: 0 !important;
  }

  .watch-info {
    padding: 12px 18px 120px !important;
  }

  .watch-info h1 {
    font-size: 26px !important;
    line-height: 1.18 !important;
    margin-bottom: 10px !important;
  }

  .watch-info > .episode-tabs { margin-top: 8px !important; }
  .watch-info > .episode-grid { margin-bottom: 18px !important; }

  .watch-view.is-player-collapsed .player-shell {
    width: min(220px, calc(100% - 48px)) !important;
    aspect-ratio: 16 / 9 !important;
    border-radius: 12px !important;
    transform: translateY(-4px) !important;
  }

  .watch-meta-strip {
    border-radius: 18px !important;
  }

  .episode-tabs {
    background: transparent !important;
    overflow-x: auto !important;
  }

  .episode-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    gap: 10px !important;
  }

  .episode-card {
    min-height: 58px !important;
    border-radius: 13px !important;
  }
}

/* Mobile watch final pass: compact player + menu-only navigation */
@media (max-width: 640px) {
  .site-header {
    display: grid !important;
    grid-template-columns: 46px 1fr 92px !important;
    align-items: center !important;
    height: 72px !important;
    padding: 12px 16px !important;
  }

  .menu-toggle {
    position: static !important;
    grid-column: 1 !important;
    grid-row: 1 !important;
    display: grid !important;
    width: 42px !important;
    height: 42px !important;
    min-width: 42px !important;
  }

  .brand {
    grid-column: 2 !important;
    grid-row: 1 !important;
    justify-self: center !important;
    margin: 0 !important;
    transform: translateX(-2px) !important;
  }

  .header-tools {
    grid-column: 3 !important;
    grid-row: 1 !important;
    justify-self: end !important;
    display: flex !important;
    gap: 10px !important;
    margin: 0 !important;
  }

  .header-tools .header-icon[aria-label="Search"],
  .header-tools .avatar-button {
    display: grid !important;
  }

  .header-tools .header-icon[aria-label="History"],
  .header-tools .language-wrap,
  .topup-button:not(.wide) {
    display: none !important;
  }

  .site-header .main-nav {
    position: fixed !important;
    top: 72px !important;
    left: 12px !important;
    right: 12px !important;
    z-index: 500 !important;
    display: none !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
    height: auto !important;
    padding: 12px !important;
    overflow: hidden !important;
    border-radius: 18px !important;
    background: rgba(14,14,18,.98) !important;
    box-shadow: 0 24px 60px rgba(0,0,0,.5) !important;
  }

  .site-header.menu-open .main-nav {
    display: grid !important;
  }

  .site-header .main-nav a {
    display: flex !important;
    align-items: center !important;
    min-height: 42px !important;
    padding: 0 12px !important;
    border-radius: 12px !important;
    font-size: 14px !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
  }

  .site-header .main-nav a.is-active {
    background: rgba(255,255,255,.1) !important;
  }

  .site-header .main-nav a.is-active::after {
    display: none !important;
  }

  .hero {
    height: 640px !important;
    min-height: 640px !important;
  }

  .hero-backdrop {
    background-size: cover !important;
    background-position: center center !important;
  }

  .hero-content {
    bottom: 124px !important;
  }

  .hero-thumbs {
    bottom: 18px !important;
  }

  .category-band {
    display: none !important;
  }

  .watch-view {
    padding-top: 82px !important;
  }

  .watch-view .back-button {
    top: 82px !important;
    left: 12px !important;
    width: 38px !important;
    height: 38px !important;
  }

  .watch-view .player-shell {
    width: min(calc(100% - 92px), 292px) !important;
    max-width: 292px !important;
    border-radius: 14px !important;
  }

  .watch-view.is-player-collapsed .player-shell {
    width: 168px !important;
    max-width: 168px !important;
    aspect-ratio: 16 / 9 !important;
    border-radius: 10px !important;
  }

  .watch-info {
    display: flex !important;
    flex-direction: column !important;
    padding-top: 14px !important;
  }

  .watch-info .breadcrumb,
  .watch-info .alias,
  .watch-info h3,
  .watch-info #watchPlot,
  .watch-info .watch-tags,
  .watch-info .watch-meta-strip,
  .watch-info .locked-hint {
    display: none !important;
  }

  .watch-info h1 {
    margin: 0 0 12px !important;
    font-size: 22px !important;
  }

  .watch-info > .episode-tabs {
    order: 1 !important;
    margin: 0 0 10px !important;
  }

  .watch-info > .episode-grid {
    order: 2 !important;
    margin-bottom: 12px !important;
  }

  .watch-info > .watch-actions {
    order: 3 !important;
    margin: 10px 0 0 !important;
    padding: 12px 0 !important;
    border-top: 1px solid rgba(255,255,255,.08) !important;
    border-bottom: 1px solid rgba(255,255,255,.08) !important;
  }
}

/* MOBILEWATCH8 FINAL: real single-row episodes + no collapsed player */
@media screen and (max-width: 760px) {
  body[data-view="home"] .site-header {
    background: rgba(9,9,12,.22) !important;
  }

  .category-band {
    display: none !important;
  }

  .hero {
    height: 640px !important;
    min-height: 640px !important;
  }

  .hero-backdrop {
    background-size: cover !important;
    background-position: center center !important;
  }

  .watch-view.is-player-collapsed .player-shell,
  .watch-view .player-shell {
    width: min(292px, calc(100vw - 92px)) !important;
    max-width: 292px !important;
    aspect-ratio: 9 / 16 !important;
    transform: none !important;
  }

  .watch-info > .episode-grid,
  .episode-grid.compact {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: stretch !important;
    gap: 10px !important;
    width: 100% !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    padding: 2px 0 8px !important;
    scroll-snap-type: x mandatory !important;
  }

  .watch-info > .episode-grid .episode-card,
  .episode-grid.compact .episode-card {
    flex: 0 0 74px !important;
    width: 74px !important;
    min-width: 74px !important;
    max-width: 74px !important;
    min-height: 58px !important;
    scroll-snap-align: start !important;
  }

  .watch-info > .watch-actions {
    order: 3 !important;
    margin-top: 14px !important;
  }
}
