/*
Theme Name: FeFeTV Vora SSR
Theme URI: https://fefetv.com
Author: FeFeTV Studio
Description: 100% SSR responsive micro-drama streaming theme modeled on DramaVora, built for Googlebot-Video, Bing/Yahoo IndexNow, 9:16 vertical streams, and Cloudflare R2.
Version: 1.2.0
Text Domain: fefetv-vora
*/

:root {
  --bg: #050505;
  --panel: #111111;
  --panel-2: #181818;
  --panel-3: #242424;
  --line: rgba(255, 255, 255, 0.08);
  --text: #ffffff;
  --muted: #b8b8b8;
  --weak: #777777;
  --accent: #ff2d55;
  --accent-2: #22c55e;
  --vip: #ffd166;
  --shadow: 0 20px 80px rgba(0, 0, 0, 0.42);
  --poster-ratio: 600 / 858;
  --nav-bg: rgba(9, 9, 9, 0.94);
  --side-bg: linear-gradient(180deg, #0d0d0f, #090909);
  --aside-bg: #0b0b0b;
  --tabbar-bg: rgba(14, 16, 18, 0.98);
  --card-overlay: rgba(0, 0, 0, 0.62);
  --panel-glass: rgba(14, 17, 23, 0.76);
  font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, "PingFang SC", sans-serif;
}

html[data-theme="light"] {
  --bg: #f5f6f8;
  --panel: #ffffff;
  --panel-2: #f0f1f4;
  --panel-3: #e4e6eb;
  --line: rgba(18, 20, 24, 0.10);
  --text: #15171a;
  --muted: #62666d;
  --weak: #92969d;
  --shadow: 0 18px 50px rgba(20, 24, 32, 0.10);
  --nav-bg: rgba(255, 255, 255, 0.92);
  --side-bg: linear-gradient(180deg, #ffffff, #f6f7fa);
  --aside-bg: #f0f1f4;
  --tabbar-bg: rgba(255, 255, 255, 0.96);
  --panel-glass: rgba(255, 255, 255, 0.86);
}

*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

button, input, select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: 0;
  background: none;
}

img {
  display: block;
  max-width: 100%;
}

/* =========================================================
   TOP NAVIGATION (Desktop)
   ========================================================= */
.top-nav {
  position: sticky;
  top: 0;
  z-index: 40;
  height: 68px;
  padding: 0 62px;
  display: flex;
  align-items: center;
  gap: 28px;
  background: var(--nav-bg);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(145deg, #ff5b76, #ff2458 58%, #ff7a1a);
  display: grid;
  place-items: center;
  box-shadow: 0 8px 22px rgba(255, 45, 85, 0.35);
}

.brand-mark svg {
  width: 18px;
  height: 18px;
  color: #fff;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}

.brand-text strong {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.4px;
}

.brand-text span {
  font-size: 9px;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--muted);
}

.nav-links {
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 28px;
  height: 100%;
}

.nav-links a {
  position: relative;
  height: 100%;
  display: inline-flex;
  align-items: center;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  transition: color 0.18s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
}

.nav-links a.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
}

.top-search-form {
  width: min(340px, 24vw);
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 8px;
}

.top-search-form svg {
  width: 16px;
  height: 16px;
  color: var(--muted);
  flex-shrink: 0;
}

.top-search-form input {
  width: 100%;
  border: 0;
  background: transparent;
  outline: none;
  font-size: 13px;
}

.top-search-form input::placeholder {
  color: var(--weak);
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  color: var(--muted);
  transition: background 0.18s ease, color 0.18s ease;
}

.icon-btn:hover {
  background: var(--panel-3);
  color: var(--text);
}

.vip-pill-btn {
  height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  background: linear-gradient(135deg, #ffd166, #ff9f1c);
  color: #141414;
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 6px 20px rgba(255, 209, 102, 0.25);
}

.avatar-photo {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: linear-gradient(135deg, #ff2d55, #a855f7);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 13px;
}

/* =========================================================
   HOMEPAGE 3D COVERFLOW CAROUSEL
   ========================================================= */
.cover-carousel {
  position: relative;
  min-height: 670px;
  overflow: hidden;
  background: radial-gradient(circle at 50% 25%, rgba(255, 45, 85, 0.22), transparent 52%),
              radial-gradient(circle at 20% 75%, rgba(168, 85, 247, 0.12), transparent 45%),
              #050505;
  isolation: isolate;
}

html[data-theme="light"] .cover-carousel {
  background: radial-gradient(circle at 50% 25%, rgba(255, 45, 85, 0.14), transparent 55%),
              linear-gradient(180deg, #1b1d24, #0d0e13);
  color: #ffffff;
}

.cover-carousel::before,
.cover-carousel::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  pointer-events: none;
  z-index: 2;
}

.cover-carousel::before {
  top: 0;
  height: 110px;
  background: linear-gradient(180deg, rgba(5, 5, 5, 0.85), transparent);
}

.cover-carousel::after {
  bottom: 0;
  height: 180px;
  background: linear-gradient(0deg, var(--bg), transparent);
}

.carousel-stage {
  position: relative;
  margin: 42px auto 0;
  width: min(1100px, 86vw);
  height: 440px;
  perspective: 1300px;
  z-index: 3;
}

.carousel-poster {
  position: absolute;
  top: 0;
  left: 50%;
  width: 280px;
  aspect-ratio: var(--poster-ratio);
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.65);
  background: var(--panel-2);
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.45s ease;
  padding: 0;
}

.carousel-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.carousel-poster .badge {
  position: absolute;
  top: 14px;
  left: 14px;
  padding: 5px 10px;
  border-radius: 5px;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.4px;
}

.carousel-poster[data-pos="0"] {
  z-index: 6;
  opacity: 1;
  transform: translate3d(-50%, 0, 110px) scale(1.06);
}

.carousel-poster[data-pos="-1"] {
  z-index: 5;
  opacity: 0.84;
  transform: translate3d(-126%, 0, 10px) rotateY(18deg) scale(0.92);
}

.carousel-poster[data-pos="1"] {
  z-index: 5;
  opacity: 0.84;
  transform: translate3d(26%, 0, 10px) rotateY(-18deg) scale(0.92);
}

.carousel-poster[data-pos="-2"] {
  z-index: 3;
  opacity: 0.48;
  transform: translate3d(-192%, 0, -70px) rotateY(24deg) scale(0.78);
}

.carousel-poster[data-pos="2"] {
  z-index: 3;
  opacity: 0.48;
  transform: translate3d(92%, 0, -70px) rotateY(-24deg) scale(0.78);
}

.carousel-poster[data-pos="hidden"] {
  z-index: 1;
  opacity: 0;
  pointer-events: none;
  transform: translate3d(-50%, 0, -160px) scale(0.6);
}

.carousel-arrow {
  position: absolute;
  top: 235px;
  z-index: 8;
  width: 50px;
  height: 50px;
  border-radius: 999px;
  background: rgba(20, 20, 24, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(12px);
  color: #fff;
  display: grid;
  place-items: center;
  transition: background 0.18s ease, transform 0.18s ease;
}

.carousel-arrow:hover {
  background: rgba(255, 45, 85, 0.88);
  transform: scale(1.06);
}

.carousel-arrow.prev { left: max(4%, 28px); }
.carousel-arrow.next { right: max(4%, 28px); }

.carousel-info {
  position: relative;
  z-index: 8;
  text-align: center;
  margin-top: 12px;
  padding: 0 20px 44px;
}

.carousel-meta {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.78);
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.carousel-info h1 {
  margin: 0 auto 14px;
  font-size: 26px;
  font-weight: 700;
  max-width: 720px;
  color: #fff;
}

.carousel-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 196px;
  min-height: 46px;
  padding: 0 26px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 12px 30px rgba(255, 45, 85, 0.34);
  transition: transform 0.18s ease;
}

.carousel-cta:hover {
  transform: translateY(-2px);
}

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 18px;
}

.carousel-dots button {
  width: 26px;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.32);
  transition: all 0.25s ease;
}

.carousel-dots button.active {
  width: 48px;
  background: #ffffff;
}

/* =========================================================
   HOME FEED & DRAMA CARDS
   ========================================================= */
.home-feed {
  width: min(1320px, 86%);
  margin: 0 auto;
  padding: 28px 0 40px;
}

.home-catalog-section {
  padding: 28px 0 38px;
  border-top: 1px solid var(--line);
}

.home-catalog-section:first-child {
  border-top: 0;
  padding-top: 8px;
}

.home-section-title,
.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.home-section-title h2,
.section-title h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
}

.section-more {
  font-size: 13px;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.section-more:hover {
  color: var(--accent);
}

.home-poster-row {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 18px;
}

.drama-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
}

.drama-card {
  display: flex;
  flex-direction: column;
  text-align: left;
  transition: transform 0.22s ease;
}

.drama-card:hover {
  transform: translateY(-4px);
}

.drama-card .cover {
  position: relative;
  width: 100%;
  aspect-ratio: var(--poster-ratio);
  border-radius: 10px;
  overflow: hidden;
  background: var(--panel-2);
  border: 1px solid var(--line);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.3);
  margin-bottom: 10px;
}

.drama-card .cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.drama-card:hover .cover img {
  transform: scale(1.04);
}

.drama-card .cover .card-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(6px);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
}

.drama-card .cover .card-badge.is-hot {
  background: rgba(255, 45, 85, 0.9);
}

.drama-card .cover .card-ep-count {
  position: absolute;
  right: 8px;
  bottom: 8px;
  padding: 3px 7px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.72);
  color: #fff;
  font-size: 11px;
  font-weight: 500;
}

.drama-card strong {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.35;
  margin-bottom: 4px;
}

.drama-card small {
  font-size: 12px;
  color: var(--muted);
}

/* =========================================================
   3-COLUMN SUBPAGE SHELL (Theater, Rankings, Search)
   ========================================================= */
.web-layout {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr) 260px;
  min-height: calc(100vh - 68px);
}

.side-nav {
  background: var(--side-bg);
  border-right: 1px solid var(--line);
  padding: 20px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.side-nav-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--weak);
  padding: 10px 12px 6px;
}

.side-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  transition: background 0.16s ease, color 0.16s ease;
}

.side-nav a:hover {
  background: var(--panel-2);
  color: var(--text);
}

.side-nav a.active {
  background: rgba(255, 45, 85, 0.16);
  color: var(--text);
  font-weight: 600;
}

.main-panel {
  padding: 26px 32px 48px;
  min-width: 0;
}

.web-aside {
  background: var(--aside-bg);
  border-left: 1px solid var(--line);
  padding: 22px 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.aside-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
}

.aside-card h3 {
  margin: 0 0 12px;
  font-size: 14px;
  font-weight: 700;
}

.aside-rank-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 0;
  border-bottom: 1px solid var(--line);
}

.aside-rank-item:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.aside-rank-num {
  width: 20px;
  font-size: 14px;
  font-weight: 800;
  color: var(--weak);
  text-align: center;
  flex-shrink: 0;
}

.aside-rank-item:nth-child(2) .aside-rank-num { color: var(--accent); }
.aside-rank-item:nth-child(3) .aside-rank-num { color: #ff7a1a; }
.aside-rank-item:nth-child(4) .aside-rank-num { color: var(--vip); }

.aside-rank-info {
  min-width: 0;
}

.aside-rank-info strong {
  display: block;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.aside-rank-info span {
  font-size: 11px;
  color: var(--muted);
}

.page-header {
  background: radial-gradient(circle at 12% 20%, rgba(255, 45, 85, 0.18), transparent 36%),
              linear-gradient(135deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 26px 28px;
  margin-bottom: 20px;
}

.page-header .eyebrow {
  margin: 0 0 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.page-header h1 {
  margin: 0 0 6px;
  font-size: 30px;
  font-weight: 700;
}

.page-header p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.search-trigger.wide {
  flex: 1;
  max-width: 520px;
  height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 10px;
}

.search-trigger.wide input {
  width: 100%;
  border: 0;
  background: transparent;
  outline: none;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.chip {
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  font-size: 13px;
  color: var(--muted);
  transition: all 0.16s ease;
}

.chip:hover,
.chip.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  font-weight: 600;
}

.tabs {
  display: flex;
  gap: 20px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 20px;
}

.tabs a {
  padding: 10px 2px;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  border-bottom: 2px solid transparent;
}

.tabs a.active {
  color: var(--text);
  font-weight: 700;
  border-bottom-color: var(--accent);
}

/* =========================================================
   RANKINGS VIEW
   ========================================================= */
.ranking-hero {
  background: linear-gradient(135deg, rgba(255, 45, 85, 0.22), rgba(255, 165, 0, 0.12));
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 26px 28px;
  margin-bottom: 20px;
}

.ranking-hero h1 {
  margin: 0 0 6px;
  font-size: 28px;
}

.desktop-ranking-columns {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.desktop-ranking-board {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px;
}

.desktop-ranking-board h2 {
  margin: 0 0 14px;
  font-size: 17px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.rank-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.rank-row:last-child {
  border-bottom: 0;
}

.rank-row img {
  width: 48px;
  aspect-ratio: var(--poster-ratio);
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
}

.rank-row-num {
  width: 22px;
  font-size: 16px;
  font-weight: 800;
  color: var(--weak);
  text-align: center;
  flex-shrink: 0;
}

.rank-row:nth-child(2) .rank-row-num { color: var(--accent); }
.rank-row:nth-child(3) .rank-row-num { color: #ff7a1a; }
.rank-row:nth-child(4) .rank-row-num { color: var(--vip); }

.rank-row-meta {
  min-width: 0;
}

.rank-row-meta strong {
  display: block;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rank-row-meta span {
  font-size: 12px;
  color: var(--muted);
}

/* =========================================================
   SERIES DETAIL VIEW (/series/{slug}/)
   ========================================================= */
.app-shell.page-detail {
  width: min(1360px, 94%);
  margin: 26px auto 52px;
}

.premium-detail {
  position: relative;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr) 310px;
  gap: 28px;
  min-height: 480px;
  padding: 36px;
  border-radius: 20px;
  border: 1px solid var(--line);
  overflow: hidden;
  background-color: var(--panel);
  background-size: cover;
  background-position: center;
}

.premium-detail::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 25%, rgba(255, 45, 85, 0.2), transparent 45%),
              linear-gradient(90deg, rgba(5, 8, 12, 0.96), rgba(5, 8, 12, 0.82) 48%, rgba(5, 8, 12, 0.92));
  z-index: 0;
}

html[data-theme="light"] .premium-detail::before {
  background: radial-gradient(circle at 30% 25%, rgba(255, 45, 85, 0.16), transparent 48%),
              linear-gradient(90deg, rgba(16, 18, 24, 0.93), rgba(16, 18, 24, 0.80) 50%, rgba(16, 18, 24, 0.92));
}

.premium-detail > * {
  position: relative;
  z-index: 1;
}

.detail-poster {
  width: 100%;
  aspect-ratio: var(--poster-ratio);
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
}

.detail-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.premium-detail-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: #ffffff;
}

.premium-detail-info .eyebrow {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 600;
  color: #ff6b86;
  letter-spacing: 0.4px;
}

.premium-detail-info h1 {
  margin: 0 0 14px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(30px, 3.6vw, 48px);
  line-height: 1.02;
  letter-spacing: -0.8px;
  color: #ffffff;
}

.detail-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.detail-metrics span {
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 12px;
  font-weight: 600;
  color: #f4f4f5;
}

.premium-detail-info .summary {
  margin: 0 0 22px;
  font-size: 14px;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.82);
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.detail-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.watch-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 170px;
  min-height: 50px;
  padding: 0 24px;
  border-radius: 12px;
  background: var(--accent);
  color: #ffffff;
  font-size: 15px;
  font-weight: 700;
  box-shadow: 0 12px 28px rgba(255, 45, 85, 0.36);
}

.my-list-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 50px;
  padding: 0 20px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #fff;
  font-weight: 600;
}

.episode-panel {
  background: rgba(14, 17, 23, 0.78);
  backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  color: #fff;
}

.episode-panel h3 {
  margin: 0 0 12px;
  font-size: 15px;
  font-weight: 700;
}

.episode-range-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.episode-range-tabs button {
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 12px;
  color: rgba(255, 255, 255, 0.74);
}

.episode-range-tabs button.active {
  background: var(--accent);
  color: #fff;
  font-weight: 600;
}

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

.ep-btn {
  position: relative;
  min-height: 38px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.88);
  font-size: 13px;
  font-weight: 600;
  display: grid;
  place-items: center;
  transition: all 0.16s ease;
}

.ep-btn:hover,
.ep-btn.active {
  border-color: var(--accent);
  background: rgba(255, 45, 85, 0.24);
  color: #fff;
}

.episode-lock {
  position: absolute;
  right: 4px;
  top: 4px;
  width: 11px;
  height: 11px;
  color: var(--vip);
}

.episode-lock-tip {
  margin-top: auto;
  padding-top: 12px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.65);
}

.detail-below {
  margin-top: 34px;
}

.seo-story-guide {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 24px 28px;
  margin-bottom: 32px;
}

.seo-story-guide h2 {
  margin: 0 0 12px;
  font-size: 19px;
}

.seo-story-guide p,
.seo-story-guide li {
  color: var(--muted);
  line-height: 1.75;
}

/* =========================================================
   EDITORIAL GUIDES, LEGAL PAGES, COMPARISON TABLES
   ========================================================= */
.guide-eyebrow {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.legal-page h1,
.guide-article > h1 {
  margin: 0 0 16px;
  font-size: 32px;
  line-height: 1.22;
  font-weight: 700;
}

.legal-pill-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 22px;
}

.guide-breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 0 0 14px;
  font-size: 12px;
  color: var(--weak);
}

.guide-breadcrumbs a {
  color: var(--muted);
  font-weight: 600;
}

.guide-breadcrumbs a:hover {
  color: #ff2d55;
}

.guide-breadcrumbs [aria-current="page"] {
  color: var(--text);
  font-weight: 600;
}

.guide-meta-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin: 0 0 18px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel-2);
  font-size: 13px;
  color: var(--muted);
}

.guide-author-avatar {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  object-fit: cover;
  background: var(--panel-3);
  flex-shrink: 0;
}

.guide-author {
  font-weight: 700;
  color: var(--text);
}

.guide-stream-badge {
  margin-left: auto;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(34, 197, 94, 0.16);
  color: var(--accent-2);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.guide-toc {
  margin: 0 0 22px;
  padding: 14px 16px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel-2);
}

.guide-toc strong {
  display: block;
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.guide-toc ol {
  margin: 0;
  padding-left: 18px;
}

.guide-toc li {
  margin: 5px 0;
}

.guide-toc a {
  color: var(--text);
  font-weight: 600;
}

.guide-toc a:hover {
  color: #ff2d55;
}

.guide-toc .toc-h3 {
  margin-left: 12px;
  font-size: 13px;
}

.entry-content h2,
.seo-story-guide .entry-content h2 {
  margin: 1.65em 0 0.5em;
  font-size: 22px;
  line-height: 1.3;
  font-weight: 700;
  color: var(--text);
  scroll-margin-top: 88px;
}

.entry-content h3,
.seo-story-guide .entry-content h3 {
  margin: 1.2em 0 0.35em;
  font-size: 17px;
  line-height: 1.35;
  font-weight: 700;
  color: var(--text);
  scroll-margin-top: 88px;
}

.entry-content p,
.entry-content li {
  line-height: 1.75;
}

.entry-content a {
  color: #ff2d55;
  font-weight: 600;
  text-decoration: none;
}

.entry-content a:hover {
  text-decoration: underline;
}

.entry-content blockquote {
  margin: 18px 0;
  padding: 14px 16px;
  border-left: 3px solid #ff2d55;
  border-radius: 0 12px 12px 0;
  background: var(--panel-2);
  color: var(--text);
}

.seo-story-guide .entry-content blockquote p {
  margin: 0;
  color: var(--text);
}

.guide-table-scroll {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 16px 0 22px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
}

.entry-content table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  margin: 16px 0 22px;
  font-size: 13px;
  line-height: 1.45;
}

.guide-table-scroll table,
.entry-content .guide-table-scroll table {
  margin: 0;
}

.entry-content th,
.entry-content td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.entry-content th {
  background: var(--panel-3);
  color: var(--text);
  font-weight: 700;
  white-space: nowrap;
}

.entry-content td {
  color: var(--muted);
  background: transparent;
}

.entry-content tr:last-child td {
  border-bottom: 0;
}

.guide-series-showcase,
.guide-faq {
  margin-top: 32px;
}

.guide-series-showcase > h2,
.guide-faq > h2,
.related-guides > h2 {
  margin: 0 0 14px;
  font-size: 20px;
  line-height: 1.3;
  font-weight: 700;
  color: var(--text);
}

.guide-spotlight-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.guide-spotlight-card {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel-2);
}

.guide-spotlight-poster img {
  width: 112px;
  aspect-ratio: 600 / 858;
  height: auto;
  object-fit: cover;
  border-radius: 10px;
  background: #111;
}

.guide-spot-genre {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(255, 45, 85, 0.14);
  color: #ff2d55;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.guide-spotlight-body h3 {
  margin: 6px 0 2px;
  font-size: 16px;
  line-height: 1.3;
}

.guide-spotlight-body h3 a {
  color: var(--text);
}

.guide-spotlight-body h3 a:hover {
  color: #ff2d55;
}

.guide-spot-stats,
.guide-spot-hook {
  margin: 0;
  font-size: 13px;
}

.guide-spot-hook {
  margin-top: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.guide-spot-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.guide-watch-btn,
.guide-info-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}

.guide-watch-btn {
  background: #ff2d55;
  color: #fff;
  box-shadow: 0 8px 18px rgba(255, 45, 85, 0.28);
}

.guide-watch-btn:hover {
  color: #fff;
  filter: brightness(1.05);
}

.guide-info-btn {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--text);
}

.guide-info-btn:hover {
  border-color: #ff2d55;
  color: #ff2d55;
}

.faq-item {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel-2);
  margin: 0 0 8px;
  overflow: hidden;
}

.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  cursor: pointer;
  font-weight: 700;
  color: var(--text);
  list-style: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  color: #ff2d55;
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
}

.faq-item[open] summary {
  color: #ff2d55;
}

.faq-item[open] summary::after {
  content: "–";
}

.faq-item p,
.seo-story-guide .faq-item p {
  margin: 0;
  padding: 0 16px 14px;
  color: var(--muted);
  line-height: 1.65;
}

.related-guides {
  margin-top: 32px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.related-guides > h2,
.related-guides > .guide-cta {
  grid-column: 1 / -1;
}

.related-guide-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 100%;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel-2);
  color: var(--text);
}

.related-guide-card strong {
  font-size: 15px;
  line-height: 1.35;
}

.related-guide-card span,
.related-guide-card p {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}

.related-guide-card p {
  font-size: 13px;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.related-guide-card em {
  margin-top: auto;
  font-style: normal;
  font-weight: 700;
  color: #ff2d55;
  font-size: 13px;
}

.related-guide-card:hover {
  border-color: rgba(255, 45, 85, 0.45);
}

.guide-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px;
  border-radius: 16px;
  background: linear-gradient(135deg, #ff2d55, #ff7a1a);
  color: #fff;
}

.guide-cta strong {
  display: block;
  font-size: 16px;
}

.guide-cta p,
.seo-story-guide .guide-cta p {
  margin: 4px 0 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: 13px;
}

.guide-cta .guide-watch-btn {
  background: #fff;
  color: #ff2d55;
  box-shadow: none;
  flex-shrink: 0;
}

.guide-hub-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 28px;
}

.guide-hub-card {
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
}

.guide-hub-kicker {
  margin: 0 0 6px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #ff2d55;
}

.guide-hub-card h2 {
  margin: 0 0 8px;
  font-size: 22px;
  line-height: 1.3;
}

.guide-hub-card h2 a {
  color: var(--text);
}

.guide-hub-card h2 a:hover {
  color: #ff2d55;
}

.guide-hub-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin: 0 0 10px;
  font-size: 12px;
  color: var(--weak);
}

.guide-hub-excerpt {
  margin: 0 0 12px;
  color: var(--muted);
  line-height: 1.65;
}

.guide-hub-cta {
  color: #ff2d55;
  font-weight: 700;
}

.guide-hub-cta:hover {
  text-decoration: underline;
}

.guide-hub-empty {
  color: var(--muted);
}

.guide-hub-trending {
  margin-top: 8px;
}

html[data-theme="light"] .entry-content a,
html[data-theme="light"] .guide-hub-cta,
html[data-theme="light"] .related-guide-card em,
html[data-theme="light"] .guide-toc a:hover,
html[data-theme="light"] .guide-breadcrumbs a:hover {
  color: #ff2d55;
}

html[data-theme="light"] .entry-content th {
  background: #eceef2;
  color: #15171a;
}

html[data-theme="light"] .entry-content td {
  color: #3d424a;
}

html[data-theme="light"] .guide-table-scroll,
html[data-theme="light"] .guide-hub-card,
html[data-theme="light"] .guide-spotlight-card,
html[data-theme="light"] .faq-item,
html[data-theme="light"] .related-guide-card,
html[data-theme="light"] .guide-toc,
html[data-theme="light"] .guide-meta-bar {
  background: #ffffff;
}

html[data-theme="light"] .guide-spot-genre {
  background: rgba(255, 45, 85, 0.1);
}

html[data-theme="light"] .entry-content blockquote {
  background: #f4f5f7;
  color: #15171a;
}

/* =========================================================
   4-COLUMN EPISODE WATCH PLAYER (/watch/{slug}/)
   ========================================================= */
.play-shell {
  min-height: 100vh;
}

.play-layout {
  display: grid;
  grid-template-columns: 170px minmax(300px, 380px) minmax(380px, 500px) minmax(300px, 1fr);
  min-height: calc(100vh - 68px);
}

.player-aside {
  border-right: 1px solid var(--line);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: var(--aside-bg);
}

.player-aside .episode-panel {
  background: var(--panel);
  border-color: var(--line);
  color: var(--text);
}

.player-aside .episode-panel .ep-btn {
  background: var(--panel-2);
  border-color: var(--line);
  color: var(--text);
}

.player-aside .episode-panel .ep-btn.active {
  background: rgba(255, 45, 85, 0.18);
  border-color: var(--accent);
}

.player-info-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
}

.player-info-card .eyebrow {
  margin: 0 0 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
}

.player-info-card h1 {
  margin: 0 0 8px;
  font-size: 19px;
  line-height: 1.3;
}

.player-info-card p {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
}

.player-stage {
  display: grid;
  place-items: center;
  padding: 18px 22px;
  background: radial-gradient(circle at 50% 18%, rgba(255, 45, 85, 0.12), transparent 34%),
              linear-gradient(180deg, #080808, #020202);
}

.video-frame {
  position: relative;
  width: min(100%, 460px);
  height: min(calc(100vh - 110px), 810px);
  aspect-ratio: 9 / 16;
  border: 1px solid rgba(255, 45, 85, 0.38);
  border-radius: 22px;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.72);
  overflow: hidden;
  background: #000;
}

.real-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.play-topline {
  position: absolute;
  top: 16px;
  left: 16px;
  right: 16px;
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
}

.play-topline > * {
  pointer-events: auto;
}

.play-pill {
  padding: 7px 13px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.58);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.play-actions {
  position: absolute;
  right: 14px;
  bottom: 92px;
  z-index: 6;
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: center;
}

.play-action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.7);
}

.play-action-btn span.circle {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.52);
  backdrop-filter: blur(8px);
  display: grid;
  place-items: center;
}

.player-controls {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 14px;
  z-index: 6;
}

.seekbar {
  width: 100%;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.25);
  margin-bottom: 10px;
  cursor: pointer;
  overflow: hidden;
}

.seekbar-fill {
  height: 100%;
  width: 0%;
  background: var(--accent);
}

.control-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(10px);
  color: #fff;
  font-size: 12px;
}

.control-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.paywall-overlay {
  position: absolute;
  inset: 0;
  z-index: 8;
  background: linear-gradient(180deg, rgba(10, 10, 14, 0.65), rgba(5, 5, 8, 0.94));
  backdrop-filter: blur(16px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 28px;
  color: #fff;
}

.paywall-lock-badge {
  width: 64px;
  height: 64px;
  border-radius: 999px;
  background: rgba(255, 209, 102, 0.16);
  border: 1px solid rgba(255, 209, 102, 0.5);
  color: var(--vip);
  display: grid;
  place-items: center;
  margin-bottom: 16px;
}

.paywall-overlay h2 {
  margin: 0 0 8px;
  font-size: 22px;
}

.paywall-overlay p {
  margin: 0 0 22px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.78);
  max-width: 300px;
}

.player-comment-aside {
  border-left: 1px solid var(--line);
  background: var(--aside-bg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.transcript-box {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
}

.transcript-box h3 {
  margin: 0 0 10px;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.transcript-content {
  font-size: 13px;
  line-height: 1.7;
  color: var(--muted);
  white-space: pre-line;
  max-height: 260px;
  overflow-y: auto;
}

.comments-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.comments-list {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 14px;
}

.comment-item {
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}

.comment-item strong {
  display: block;
  font-size: 12px;
  margin-bottom: 2px;
}

.comment-form {
  display: flex;
  gap: 8px;
}

.comment-form input {
  flex: 1;
  padding: 9px 12px;
  border-radius: 999px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  outline: none;
  font-size: 13px;
}

.comment-form button {
  padding: 0 16px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}

/* =========================================================
   FOOTER
   ========================================================= */
.home-footer {
  display: grid;
  grid-template-columns: 1.6fr repeat(5, 1fr);
  gap: 36px;
  padding: 36px 62px 42px;
  border-top: 1px solid var(--line);
  background: var(--bg);
}

.home-footer h4 {
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 700;
}

.home-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.home-footer li a {
  font-size: 13px;
  color: var(--muted);
}

.home-footer li a:hover {
  color: var(--accent);
}

.footer-bottom {
  grid-column: 1 / -1;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--weak);
  flex-wrap: wrap;
  gap: 10px;
}

/* =========================================================
   VIP / COINS CHECKOUT MODAL
   ========================================================= */
.vip-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(8px);
  display: none;
  place-items: center;
  padding: 20px;
}

.vip-modal.open {
  display: grid;
}

.vip-modal-card {
  width: min(460px, 100%);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 28px;
  position: relative;
  box-shadow: var(--shadow);
}

.vip-plan-option {
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.vip-plan-option.featured {
  border-color: var(--vip);
  background: rgba(255, 209, 102, 0.08);
}

/* =========================================================
   MOBILE CONTROLS & RESPONSIVE BREAKPOINTS
   ========================================================= */
.mobile-top,
.mobile-tabbar,
.mobile-episode-dock {
  display: none;
}

@media (max-width: 1180px) {
  .top-nav {
    padding: 0 24px;
    gap: 18px;
  }
  .web-layout {
    grid-template-columns: 160px minmax(0, 1fr);
  }
  .web-aside {
    display: none;
  }
  .home-poster-row,
  .drama-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .premium-detail {
    grid-template-columns: 200px minmax(0, 1fr);
  }
  .premium-detail .episode-panel {
    grid-column: 1 / -1;
  }
  .play-layout {
    grid-template-columns: 320px minmax(360px, 1fr);
  }
  .play-layout .side-nav,
  .play-layout .player-comment-aside {
    display: none;
  }
  .desktop-ranking-columns {
    grid-template-columns: 1fr;
  }
  .home-footer {
    grid-template-columns: repeat(3, 1fr);
    padding: 28px 24px;
  }
}

@media (max-width: 767px) {
  body {
    font-size: 13px;
    padding-bottom: calc(82px + env(safe-area-inset-bottom));
  }
  body.is-player-page {
    padding-bottom: 0;
  }
  .top-nav,
  .side-nav,
  .web-aside,
  .home-footer {
    display: none;
  }
  .mobile-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    position: sticky;
    top: 0;
    z-index: 35;
    background: var(--nav-bg);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
  }
  .cover-carousel {
    min-height: 490px;
  }
  .carousel-stage {
    height: 300px;
    margin-top: 24px;
  }
  .carousel-poster {
    width: 195px;
  }
  .carousel-arrow {
    top: 155px;
    width: 38px;
    height: 38px;
  }
  .home-feed {
    width: 92%;
    padding: 18px 0;
  }
  .home-poster-row,
  .drama-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  .web-layout {
    display: block;
  }
  .main-panel {
    padding: 16px;
  }
  .page-header h1 {
    font-size: 22px;
  }
  .legal-page h1,
  .guide-article > h1,
  .guide-hub-card h2 {
    font-size: 24px;
  }
  .guide-meta-bar {
    align-items: flex-start;
  }
  .guide-stream-badge {
    margin-left: 0;
  }
  .guide-spotlight-card {
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 10px;
  }
  .guide-spotlight-poster img {
    width: 92px;
  }
  .guide-spot-actions,
  .legal-pill-bar {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .legal-pill-bar::-webkit-scrollbar,
  .guide-spot-actions::-webkit-scrollbar {
    display: none;
  }
  .guide-watch-btn,
  .guide-info-btn,
  .legal-pill-bar .chip {
    white-space: nowrap;
    flex-shrink: 0;
  }
  .related-guides,
  .guide-hub-meta {
    grid-template-columns: 1fr;
  }
  .related-guides {
    display: flex;
    flex-direction: column;
  }
  .guide-cta {
    flex-direction: column;
    align-items: flex-start;
  }
  .entry-content h2,
  .seo-story-guide .entry-content h2 {
    font-size: 19px;
  }
  .guide-table-scroll {
    margin-left: -2px;
    margin-right: -2px;
  }
  .chips {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .chips::-webkit-scrollbar {
    display: none;
  }
  .chip {
    white-space: nowrap;
  }
  .app-shell.page-detail {
    width: 94%;
    margin: 14px auto 32px;
  }
  .premium-detail {
    display: block;
    padding: 20px 16px;
  }
  .detail-poster {
    width: min(50vw, 185px);
    margin: 0 auto 18px;
  }
  .premium-detail-info {
    text-align: center;
    align-items: center;
  }
  .premium-detail-info h1 {
    font-size: 26px;
  }
  .detail-metrics,
  .detail-actions {
    justify-content: center;
  }
  .episode-panel {
    margin-top: 20px;
  }
  .episode-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  /* Mobile player view */
  .play-layout {
    display: block;
    min-height: 100dvh;
  }
  .player-aside {
    display: none;
  }
  .player-stage {
    padding: 0;
    background: #000;
  }
  .video-frame {
    width: 100vw;
    height: calc(100dvh - 56px - env(safe-area-inset-bottom));
    max-width: none;
    border-radius: 0;
    border: 0;
  }
  .player-comment-aside {
    display: block;
    border-left: 0;
    border-top: 1px solid var(--line);
    padding-bottom: 84px;
  }
  .mobile-episode-dock {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    height: calc(56px + env(safe-area-inset-bottom));
    padding: 0 16px env(safe-area-inset-bottom);
    background: var(--tabbar-bg);
    border-top: 1px solid var(--line);
    z-index: 45;
  }
  .mobile-tabbar {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    align-items: center;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    min-height: calc(68px + env(safe-area-inset-bottom));
    padding-bottom: env(safe-area-inset-bottom);
    background: var(--tabbar-bg);
    backdrop-filter: blur(18px);
    border-top: 1px solid var(--line);
    z-index: 45;
  }
  body.is-player-page .mobile-tabbar {
    display: none;
  }
  .mobile-tabbar a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    font-size: 10px;
    color: var(--muted);
  }
  .mobile-tabbar a.active {
    color: var(--accent);
    font-weight: 700;
  }
  .featured-tab-icon {
    width: 52px;
    height: 52px;
    margin-top: -22px;
    border-radius: 999px;
    background: linear-gradient(145deg, #ff315d 10%, #ff6b55 56%, #ffae45);
    color: #fff;
    display: grid;
    place-items: center;
    box-shadow: 0 10px 26px rgba(255, 45, 85, 0.45);
  }
}

.mobile-drawer {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(0, 0, 0, 0.7);
  display: none;
  align-items: flex-end;
}

.mobile-drawer.open {
  display: flex;
}

.mobile-drawer-sheet {
  width: 100%;
  max-height: 75vh;
  overflow-y: auto;
  background: var(--panel);
  border-radius: 20px 20px 0 0;
  padding: 20px 16px calc(24px + env(safe-area-inset-bottom));
}

/* =========================================================
   ACCOUNT, LIBRARY, AND FOCUSED MODALS
   ========================================================= */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.signin-pill {
  height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  background: #ff2e63;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.nav-user {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 3px 10px 3px 3px;
  border-radius: 999px;
  background: var(--panel-2);
  border: 1px solid var(--line);
}

.nav-fox {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  object-fit: contain;
  background: var(--panel-3);
  flex-shrink: 0;
}

.nav-coins {
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.me-shell {
  width: min(1080px, calc(100% - 32px));
  margin: 28px auto 72px;
}

.me-guest {
  display: flex;
  justify-content: center;
  padding: 24px 0 12px;
}

.me-guest-card {
  width: min(440px, 100%);
  text-align: center;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 28px 22px 24px;
  box-shadow: var(--shadow);
}

.me-guest-card h1 {
  margin: 6px 0 8px;
  font-size: 28px;
  line-height: 1.15;
}

.me-guest-card p {
  margin: 0 0 18px;
  color: var(--muted);
}

.me-profile {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
}

.me-identity {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.me-avatar-btn {
  position: relative;
  width: 56px;
  height: 56px;
  padding: 0;
  border-radius: 999px;
  flex-shrink: 0;
}

.me-fox,
.me-avatar-btn img {
  width: 56px;
  height: 56px;
  border-radius: 999px;
  object-fit: contain;
  background: var(--panel-2);
}

.me-avatar-edit {
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: #ff2e63;
  color: #fff;
  font-size: 11px;
  display: grid;
  place-items: center;
}

.me-name {
  margin: 0 0 4px;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.2;
}

.me-coin-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  font-size: 12px;
  font-weight: 800;
}

.me-topup {
  min-height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  background: linear-gradient(135deg, #ffd166, #ff9f1c);
  color: #141414;
  font-weight: 800;
  flex-shrink: 0;
}

.me-stage {
  margin-top: 18px;
  min-height: 62vh;
}

.me-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  padding: 4px;
  border-radius: 14px;
  background: var(--panel-2);
}

.me-tab {
  min-height: 42px;
  padding: 0 8px;
  border-radius: 11px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.me-tab.is-active {
  background: #ff2e63;
  color: #fff;
}

.me-panel {
  margin-top: 16px;
}

.me-panel[hidden],
.me-grid[hidden],
.me-empty[hidden] {
  display: none !important;
}

.me-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(158px, 1fr));
  gap: 14px;
}

.me-card,
.me-card-link {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  color: inherit;
}

.me-poster {
  position: relative;
  display: block;
  aspect-ratio: 9 / 16;
  border-radius: 14px;
  overflow: hidden;
  background: var(--panel-2);
}

.me-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.me-badge {
  position: absolute;
  left: 8px;
  bottom: 12px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.62);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
}

.me-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 4px;
  background: rgba(255, 255, 255, 0.28);
}

.me-progress > span {
  display: block;
  height: 100%;
  background: #ff2e63;
}

.me-card strong {
  font-size: 13px;
  line-height: 1.35;
}

.me-remove {
  align-self: flex-start;
  min-height: 32px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.me-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 36px 12px 8px;
  text-align: center;
}

.me-empty img {
  width: 160px;
  height: 160px;
  object-fit: contain;
}

.me-empty p {
  margin: 0;
  color: var(--muted);
}

.me-settings-drawer {
  margin-top: 22px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
  overflow: hidden;
}

.me-settings-drawer summary {
  padding: 14px 16px;
  cursor: pointer;
  font-weight: 800;
  list-style: none;
}

.me-settings-drawer summary::-webkit-details-marker {
  display: none;
}

.me-settings-row {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 48px;
  padding: 0 16px;
  border-top: 1px solid var(--line);
  text-align: left;
  font-weight: 700;
}

.me-settings-row.is-danger,
.me-settings-row.is-danger .chev {
  color: #ff2e63;
}

.fx-modal {
  position: fixed;
  inset: 0;
  z-index: 140;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 16px;
}

.fx-modal[hidden] {
  display: none !important;
}

.fx-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.62);
}

.fx-modal-card {
  position: relative;
  z-index: 1;
  width: min(420px, 100%);
  max-height: min(92dvh, 760px);
  overflow: auto;
  padding: 22px 20px 18px;
  border-radius: 22px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  box-shadow: var(--shadow);
}

.fx-modal-card.is-wide {
  width: min(460px, 100%);
}

.fx-modal-card h2 {
  margin: 0 0 8px;
  font-size: 20px;
  text-align: center;
}

.fx-x {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: var(--panel-2);
  color: var(--text);
  font-size: 22px;
  line-height: 1;
}

.fx-mascot {
  display: block;
  width: auto;
  margin: 0 auto 8px;
  object-fit: contain;
}

.fx-mascot.welcome {
  height: 130px;
}

.fx-mascot.auth {
  height: 88px;
}

.fx-mascot.vip {
  height: 96px;
}

.fx-sub {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.fx-optional {
  font-weight: 600;
  color: var(--weak);
}

.fx-balance {
  margin: 0 0 12px;
  text-align: center;
  font-weight: 800;
}

.fx-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 12px;
  background: #ff2e63;
  color: #fff;
  font-size: 15px;
  font-weight: 800;
}

.fx-primary.is-block {
  width: 100%;
}

.fx-primary:disabled,
.fx-google:disabled {
  opacity: 0.62;
  cursor: not-allowed;
}

.fx-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.fx-field[hidden],
.fx-banner[hidden] {
  display: none !important;
}

.fx-field input {
  min-height: 46px;
  padding: 0 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--text);
}

.fx-seg {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin: 0 0 14px;
  padding: 4px;
  border-radius: 14px;
  background: var(--panel-2);
}

.fx-seg button {
  min-height: 40px;
  border-radius: 10px;
  color: var(--muted);
  font-weight: 800;
}

.fx-seg button.is-active {
  background: #ff2e63;
  color: #fff;
}

.fx-banner {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 700;
  text-align: left;
}

.fx-banner.is-error {
  background: rgba(255, 46, 99, 0.12);
  color: #ff2e63;
}

.fx-banner.is-ok {
  background: rgba(34, 197, 94, 0.14);
  color: var(--accent-2);
}

.fx-banner.is-info {
  background: rgba(255, 209, 102, 0.16);
  color: var(--text);
}

.fx-text-btn,
.fx-google {
  display: block;
  width: 100%;
  min-height: 42px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.fx-google {
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--panel-2);
}

.avatar-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 0 0 14px;
}

.avatar-choice {
  padding: 10px 8px 8px;
  border: 2px solid transparent;
  border-radius: 16px;
  background: var(--panel-2);
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
}

.avatar-choice img {
  width: 100%;
  height: 92px;
  margin: 0 auto 6px;
  object-fit: contain;
}

.avatar-choice.is-active {
  border-color: #ff2e63;
  box-shadow: 0 0 0 3px rgba(255, 46, 99, 0.25);
}

.vip-plan {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 8px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  text-align: left;
}

.vip-plan small {
  display: block;
  color: var(--muted);
  font-weight: 650;
}

.vip-plan .price {
  color: #ff2e63;
  font-size: 16px;
  white-space: nowrap;
}

.vip-plan.is-selected {
  border-color: #ff2e63;
  box-shadow: 0 0 0 3px rgba(255, 46, 99, 0.2);
}

.ledger-list {
  list-style: none;
  max-height: min(360px, 48vh);
  margin: 0 0 14px;
  padding: 0;
  overflow: auto;
}

.ledger-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.ledger-row strong,
.ledger-row small {
  display: block;
}

.ledger-row strong {
  font-size: 13px;
}

.ledger-row small {
  color: var(--muted);
  font-size: 11px;
}

.ledger-amt {
  font-weight: 800;
  white-space: nowrap;
}

.ledger-amt.is-plus {
  color: var(--accent-2);
}

.ledger-amt.is-minus {
  color: #ff2e63;
}

.paywall-unlock {
  min-width: 220px;
}

.paywall-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  margin-top: 8px;
  padding: 0 16px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: transparent;
  color: #fff;
  font-weight: 800;
}

.play-topline-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.play-pill.is-unlocked {
  background: rgba(255, 46, 99, 0.9);
  border-color: transparent;
}

.play-action-btn.is-saved .circle {
  background: rgba(255, 46, 99, 0.88);
}

.my-list-btn.is-saved {
  border-color: #ff2e63;
  background: rgba(255, 46, 99, 0.18);
}

body.fx-modal-open {
  overflow: hidden;
}

@media (max-width: 767px) {
  .me-shell {
    width: min(1080px, calc(100% - 24px));
    margin-top: 16px;
  }

  .me-profile {
    flex-direction: column;
    align-items: stretch;
  }

  .me-topup {
    width: 100%;
  }

  .me-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .me-tab {
    font-size: 12px;
    padding: 0 4px;
  }

  .me-guest-card h1 {
    font-size: 24px;
  }

  .fx-modal {
    padding: 12px;
  }

  .fx-modal-card,
  .fx-modal-card.is-wide {
    width: min(420px, 100%);
  }
}
