:root {
  --bg: #050506;
  --surface: #111114;
  --surface-2: #1a1a1f;
  --text: #f7f7f8;
  --muted: #8f8f98;
  --line: rgba(255, 255, 255, .1);
  --accent: #ff2345;
  --accent-soft: #ff8fa2;
}

* { box-sizing: border-box; }
.visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0,0,0,0) !important; white-space: nowrap !important; border: 0 !important; }
html { color-scheme: dark; background: var(--bg); }
body { margin: 0; min-height: 100vh; color: var(--text); background: var(--bg); font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
button, input { font: inherit; }
a { color: inherit; }
svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.browse-page { padding-bottom: 92px; }
.browse-controls { position: sticky; z-index: 18; top: 0; padding-bottom: 11px; border-bottom: 1px solid var(--line); background: var(--bg); box-shadow: 0 12px 24px rgba(0,0,0,.2); }
.app-header { padding: max(22px, env(safe-area-inset-top)) clamp(18px, 5vw, 56px) 0; }
.top-tools { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; }
.header-actions { display: flex; align-items: center; gap: 8px; }
.header-tool { display: grid; place-items: center; min-width: 32px; height: 32px; padding: 0; border: 0; color: white; background: transparent; pointer-events: none; }
.header-tool strong { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; font-size: 1.15rem; box-shadow: 0 8px 22px rgba(0,0,0,.28); }
.header-tool strong svg { width: 16px; height: 16px; stroke-width: 2; }
.header-tool small { display: none; }
.vip-tool strong { color: #241500; background: linear-gradient(135deg, #ffe08a, #f0aa35); }
.create-tool strong { color: white; background: linear-gradient(135deg, #ff9b52 0%, #ff4168 48%, #c9083d 100%); box-shadow: 0 8px 24px rgba(255,35,69,.32); }
.search-shell { display: flex; min-width: 0; align-items: center; gap: 8px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 11px; color: #7e7e86; background: #121215; }
.search-shell svg { width: 16px; height: 16px; }
.search-shell span { overflow: hidden; font-size: .74rem; font-weight: 400; text-overflow: ellipsis; white-space: nowrap; }
.topic-tabs, .subcategory-tabs { display: flex; overflow-x: auto; scrollbar-width: none; white-space: nowrap; }
.topic-tabs::-webkit-scrollbar, .subcategory-tabs::-webkit-scrollbar { display: none; }
.topic-tabs { gap: 26px; padding: 24px clamp(18px, 5vw, 56px) 0; }
.topic-tabs button { flex: 0 0 auto; padding: 0 0 11px; border: 0; color: #777780; background: transparent; font-size: .95rem; font-weight: 600; }
.topic-tabs button.active { color: white; border-bottom: 2px solid white; font-weight: 800; }
.subcategory-tabs { gap: 10px; padding: 13px clamp(18px, 5vw, 56px) 0; }
.subcategory-tabs button { flex: 0 0 auto; padding: 8px 16px; border: 1px solid transparent; border-radius: 999px; color: #8b8b93; background: #17171a; font-size: .82rem; }
.subcategory-tabs button.active { border-color: #dedee2; color: white; background: #111114; }
.collection { padding: 20px clamp(18px, 5vw, 56px) 44px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 18px; margin-bottom: 22px; }
.eyebrow { margin: 0 0 9px; color: var(--accent-soft); font-size: .66rem; font-weight: 800; letter-spacing: .18em; }
.section-heading h1 { margin: 0; max-width: 640px; font-size: clamp(1.7rem, 5vw, 3.2rem); letter-spacing: -.04em; line-height: 1; }
.count { color: #74747c; font-size: .65rem; font-weight: 800; letter-spacing: .12em; }
.drama-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px 8px; }
.drama-card { min-width: 0; text-decoration: none; }
.poster { position: relative; display: block; overflow: hidden; aspect-ratio: 3 / 4; border-radius: 10px; background-image: linear-gradient(to top, rgba(0,0,0,.38), transparent 48%), var(--poster-image); background-position: center; background-repeat: no-repeat; background-size: cover; box-shadow: 0 16px 30px rgba(0, 0, 0, .28); transition: transform 180ms ease, box-shadow 180ms ease; }
.drama-card:hover .poster, .drama-card:focus-visible .poster { transform: translateY(-4px); box-shadow: 0 20px 38px rgba(0, 0, 0, .5); }
.poster-one { --poster-image: url("assets/queens-gambit-poster.png"); }
.poster-two { --poster-image: url("assets/shadows-london-poster.png"); }
.poster-three { --poster-image: url("assets/dragons-legacy-poster.png"); }
.poster-four { --poster-image: url("assets/forbidden-love-poster.png"); }
.poster-five { --poster-image: url("assets/railway-baron-poster.png"); }
.poster-six { --poster-image: url("assets/gilded-age-poster.png"); }
.poster-seven { --poster-image: url("assets/jade-empress-poster.png"); }
.poster-eight { --poster-image: url("assets/crown-of-sand-poster.png"); }
.poster-nine { --poster-image: url("assets/midnight-montmartre-poster.png"); }
.badge { position: absolute; top: 8px; right: 8px; padding: 5px 7px; border-radius: 6px; color: white; background: var(--accent); font-size: .64rem; font-weight: 800; }
.vip-badge { color: #241500; background: linear-gradient(135deg, #ffe08a, #f0aa35); }
.poster-title { display: none; }
.drama-card strong { display: block; overflow: hidden; margin-top: 9px; font-size: clamp(.7rem, 2.8vw, .92rem); font-weight: 700; line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }
.drama-card small { display: block; overflow: hidden; margin-top: 4px; color: var(--muted); font-size: clamp(.58rem, 2.2vw, .74rem); text-overflow: ellipsis; white-space: nowrap; }
.bottom-nav { position: fixed; z-index: 20; right: 0; bottom: 0; left: 0; display: grid; grid-template-columns: repeat(5, 1fr); padding: 11px max(10px, env(safe-area-inset-right)) max(11px, env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left)); border-top: 1px solid var(--line); background: rgba(5, 5, 6, .94); backdrop-filter: blur(18px); }
.nav-item { display: flex; flex-direction: column; align-items: center; gap: 5px; color: #62626a; font-size: .63rem; text-decoration: none; }
.nav-item svg { width: 22px; height: 22px; }
.nav-item.active { color: white; }
.profile-label-desktop { display: none; }
.sidebar-actions { display: none; }

.library-page { min-height: 100vh; padding-bottom: 92px; background: radial-gradient(circle at 88% 8%, rgba(112,20,38,.18), transparent 30%), var(--bg); }
.library-shell { width: min(100%, 1120px); margin: 0 auto; padding: 26px clamp(18px, 5vw, 56px) 52px; }
.library-header { position: sticky; z-index: 10; top: 0; padding: max(30px, env(safe-area-inset-top)) clamp(18px, 5vw, 56px) 0; border-bottom: 1px solid var(--line); background: rgba(5,5,6,.94); backdrop-filter: blur(18px); }
.library-header h1 { margin: 0 0 20px; font-size: 1.15rem; letter-spacing: -.015em; line-height: 1.15; }
.library-tabs { display: flex; gap: 28px; overflow-x: auto; scrollbar-width: none; }
.library-tabs::-webkit-scrollbar { display: none; }
.library-tabs button { position: relative; flex: 0 0 auto; padding: 0 0 14px; border: 0; color: #777780; background: transparent; font-size: .92rem; font-weight: 750; cursor: pointer; }
.library-tabs button.active { color: white; }
.library-tabs button.active::after { content: ""; position: absolute; right: 0; bottom: -1px; left: 0; height: 2px; background: var(--accent); }
.library-view[hidden] { display: none; }
.library-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 12px; }
.library-card { min-width: 0; text-decoration: none; }
.library-card img { display: block; width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 10px; background: var(--surface); box-shadow: 0 16px 32px rgba(0,0,0,.3); transition: transform 180ms ease, box-shadow 180ms ease; }
.library-card:hover img, .library-card:focus-visible img { transform: translateY(-4px); box-shadow: 0 22px 42px rgba(0,0,0,.48); }
.library-card strong { display: block; overflow: hidden; margin-top: 10px; font-size: .88rem; line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }
.library-card small { display: block; margin-top: 5px; color: var(--muted); font-size: .72rem; font-weight: 650; }
.library-comments { display: grid; }
.library-comment { display: grid; grid-template-columns: 76px minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); text-decoration: none; }
.library-comment:first-child { border-top: 1px solid var(--line); }
.library-comment img { width: 76px; aspect-ratio: 9 / 16; object-fit: cover; border-radius: 8px; }
.library-comment-copy { display: grid; min-width: 0; gap: 7px; }
.library-comment-copy strong { overflow: hidden; font-size: .76rem; text-overflow: ellipsis; white-space: nowrap; }
.library-comment-copy > span { display: -webkit-box; overflow: hidden; color: #c6c6cc; font-size: .8rem; line-height: 1.4; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.library-comment time { align-self: center; color: var(--muted); font-size: .63rem; white-space: nowrap; }

.social-page { min-height: 100vh; padding-bottom: 92px; background: radial-gradient(circle at 92% 4%, rgba(130, 24, 48, .14), transparent 33%), var(--bg); }
.social-shell { width: min(100%, 1100px); margin: 0 auto; padding: 28px clamp(18px, 5vw, 56px) 52px; }
.social-header { position: sticky; z-index: 10; top: 0; padding: max(30px, env(safe-area-inset-top)) clamp(18px, 5vw, 56px) 0; border-bottom: 1px solid var(--line); background: var(--bg); }
.social-header h1 { margin: 0 0 20px; font-size: 1.15rem; line-height: 1.15; }
.social-tabs { display: flex; gap: 26px; overflow-x: auto; scrollbar-width: none; }
.social-tabs::-webkit-scrollbar { display: none; }
.social-tabs a { position: relative; flex: 0 0 auto; padding: 0 0 14px; color: #777780; font-size: .92rem; font-weight: 750; text-decoration: none; }
.social-tabs a.active { color: white; }
.social-tabs a.active::after { content: ""; position: absolute; right: 0; bottom: -1px; left: 0; height: 2px; background: var(--accent); }
.social-section[hidden], .quiz-grid[hidden], .quiz-play[hidden], .quiz-creator[hidden], .social-quiz-actions[hidden], .discussion-composer[hidden], .discussion-replies[hidden], .discussion-compose-backdrop[hidden] { display: none; }
.social-discussion-actions, .social-quiz-actions { display: flex; justify-content: flex-start; margin-bottom: 18px; }
.social-quiz-actions { gap: 10px; }
.leaderboard-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 36px; padding: 9px 14px; border: 0; border-radius: 9px; color: #241500; background: linear-gradient(135deg, #ffe08a, #f0aa35); font-size: .78rem; font-weight: 750; white-space: nowrap; pointer-events: none; }
.leaderboard-button svg { width: 18px; height: 18px; flex: 0 0 auto; stroke-width: 2; }
.social-primary, .social-secondary { display: inline-flex; align-items: center; justify-content: center; min-height: 36px; padding: 9px 14px; border-radius: 9px; font-size: .78rem; font-weight: 750; cursor: pointer; }
.social-primary { border: 1px solid #ff3354; color: white; background: #e4163d; }
.social-secondary { border: 1px solid var(--line); color: #d0d0d5; background: #1c1c21; }
.social-form { display: grid; gap: 9px; margin: 0 0 22px; padding: 18px; border: 1px solid var(--line); border-radius: 13px; background: #111114; }
.social-form label { margin-top: 4px; color: #c6c6cc; font-size: .75rem; font-weight: 700; }
.social-form input, .social-form textarea, .social-form select { width: 100%; min-width: 0; padding: 11px 12px; border: 1px solid rgba(255,255,255,.14); border-radius: 8px; color: white; background: #1a1a1f; font: inherit; font-size: .82rem; }
.social-form textarea { resize: vertical; }
.social-form-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 7px; }
.discussion-compose-backdrop, .discussion-sheet-handle { display: none; }
.discussion-list { display: grid; }
.discussion-post { display: grid; grid-template-columns: 42px minmax(0, 1fr); gap: 14px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.discussion-post:first-child { border-top: 1px solid var(--line); }
.discussion-vote { display: grid; align-content: center; justify-items: center; gap: 4px; align-self: start; width: 42px; min-height: 58px; padding: 6px 0; border: 1px solid var(--line); border-radius: 10px; color: #a9a9b0; background: #17171b; cursor: pointer; }
.discussion-vote.voted { border-color: rgba(255,35,69,.65); color: #ff4965; background: rgba(255,35,69,.1); }
.discussion-vote .vote-arrow { font-size: .75rem; }
.discussion-vote strong { font-size: .77rem; }
.discussion-post-content { min-width: 0; }
.discussion-meta { margin: 0 0 7px; color: var(--muted); font-size: .67rem; }
.discussion-post h3 { margin: 0 0 6px; font-size: .95rem; line-height: 1.3; }
.discussion-body { margin: 0 0 11px; color: #bdbdc4; font-size: .78rem; line-height: 1.5; overflow-wrap: anywhere; }
.discussion-reply-toggle { padding: 0; border: 0; color: #a5a5ad; background: transparent; font-size: .72rem; font-weight: 700; cursor: pointer; }
.discussion-replies { display: grid; gap: 10px; margin-top: 14px; padding: 12px 0 0 13px; border-left: 2px solid rgba(255,255,255,.12); }
.discussion-reply { margin: 0; color: #c4c4ca; font-size: .75rem; line-height: 1.45; overflow-wrap: anywhere; }
.discussion-reply strong { color: white; }
.social-delete { padding: 0; border: 0; color: #ed8192; background: transparent; font: inherit; font-size: .7rem; cursor: pointer; }
.discussion-delete { margin-left: 12px; }
.discussion-reply-form { display: flex; gap: 8px; }
.discussion-reply-form input { min-width: 0; flex: 1; padding: 9px 10px; border: 1px solid var(--line); border-radius: 8px; color: white; background: #17171b; font: inherit; font-size: .76rem; }
.discussion-reply-form .social-primary { flex: 0 0 auto; }
.social-preview-note { margin: 18px 0 0; color: var(--muted); font-size: .68rem; }
.quiz-creator { max-width: 680px; }
.quiz-creator-heading { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; font-size: .8rem; }
.quiz-creator-heading span { color: var(--muted); font-size: .7rem; }
.quiz-question-fields { display: grid; gap: 14px; }
.quiz-question-field { position: relative; display: grid; gap: 10px; min-width: 0; margin: 0; padding: 16px; border: 1px solid var(--line); border-radius: 10px; }
.quiz-question-field legend { padding: 0 5px; font-size: .77rem; font-weight: 750; }
.quiz-question-field label { display: grid; gap: 6px; margin: 0; }
.quiz-remove-question { position: absolute; top: 13px; right: 14px; }
.quiz-creator > #add-quiz-question { justify-self: start; }
.quiz-creator > #add-quiz-question:disabled { opacity: .45; cursor: default; }
.quiz-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.quiz-card { overflow: hidden; padding: 0; border: 1px solid var(--line); border-radius: 13px; color: white; background: #151519; text-align: left; cursor: pointer; }
.quiz-card img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; object-position: center 25%; }
.quiz-card > span { display: grid; gap: 5px; padding: 12px; }
.quiz-card strong { font-size: .85rem; }
.quiz-card small { color: var(--muted); font-size: .67rem; }
.quiz-card .quiz-creator-label { color: #c6c6cc; }
.quiz-play { max-width: 620px; padding: 20px; border: 1px solid var(--line); border-radius: 15px; background: #111114; }
.quiz-topline { display: flex; justify-content: space-between; color: #babac0; font-size: .75rem; font-weight: 700; }
.quiz-timer { color: var(--accent-soft); }
.quiz-timer-track { height: 5px; margin-top: 11px; border-radius: 99px; background: #303035; }
.quiz-timer-track span { display: block; height: 100%; border-radius: inherit; background: var(--accent); }
.quiz-play h3 { margin: 28px 0 20px; font-size: 1.15rem; line-height: 1.35; }
.quiz-answers { display: grid; gap: 9px; }
.quiz-answer { min-height: 44px; padding: 11px 13px; border: 1px solid var(--line); border-radius: 9px; color: white; background: #202025; text-align: left; cursor: pointer; }
.quiz-answer.correct { border-color: #4ab87b; background: rgba(31,137,81,.23); }
.quiz-answer.incorrect { border-color: #f05a70; background: rgba(212,29,60,.2); }
.quiz-feedback { min-height: 1.3em; margin: 14px 0; color: #bdbdc4; font-size: .78rem; }
.request-form { max-width: 680px; }
.request-visibility { display: flex; gap: 18px; margin: 8px 0 0; padding: 0; border: 0; }
.request-visibility legend { margin-bottom: 8px; color: #c6c6cc; font-size: .75rem; font-weight: 700; }
.request-visibility label { display: inline-flex; align-items: center; gap: 7px; margin: 0; font-weight: 500; }
.request-visibility input[type="radio"] { width: auto; margin: 0; accent-color: var(--accent); }
.request-form > .social-primary { justify-self: start; margin-top: 7px; }
.social-form-note { margin: 0; color: var(--muted); font-size: .68rem; }
.request-list-heading { margin: 28px 0 14px; font-size: .93rem; }
.request-empty { color: var(--muted); font-size: .78rem; }
.request-item { padding: 15px 0; border-top: 1px solid var(--line); }
.request-type { color: var(--accent-soft); font-size: .67rem; font-weight: 800; }
.request-item h4 { margin: 6px 0; font-size: .89rem; }
.request-item p { margin: 0; color: #bdbdc4; font-size: .78rem; line-height: 1.5; overflow-wrap: anywhere; }

.watch-page { min-height: 100svh; background: #000; }
.viewer-nav { display: none; }
.viewer-shell { min-height: 100svh; }
.player { position: relative; min-height: 100svh; overflow: hidden; background: #111; }
.player > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 22%; filter: saturate(.7) brightness(.78); }
.player-shade { position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(0,0,0,.34), transparent 24%, transparent 48%, rgba(0,0,0,.96) 100%); }
.player-topbar { position: absolute; z-index: 2; top: max(20px, env(safe-area-inset-top)); right: 18px; left: 18px; display: flex; align-items: center; justify-content: space-between; }
.back-button { display: flex; align-items: center; gap: 6px; font-size: .98rem; font-weight: 750; text-decoration: none; }
.back-button svg { width: 28px; height: 28px; }
.feed-search-button { display: none; width: 34px; height: 34px; padding: 5px; place-items: center; border: 0; color: white; background: transparent; pointer-events: none; }
.feed-search-button svg { width: 24px; height: 24px; }
.player-tools { display: flex; align-items: center; gap: 20px; color: rgba(255,255,255,.82); font-size: .88rem; }
.feed-mobile-actions { display: none; align-items: center; gap: 9px; }
.feed-mobile-actions button { display: grid; width: 32px; height: 32px; padding: 7px; place-items: center; border: 0; border-radius: 50%; pointer-events: none; }
.feed-mobile-actions svg { width: 18px; height: 18px; }
.feed-vip-button { color: #241500; background: linear-gradient(135deg, #ffe08a, #f0aa35); }
.feed-create-button { color: white; background: linear-gradient(135deg, #ff9b52 0%, #ff4168 48%, #c9083d 100%); }
.speed-toggle { min-width: 48px; padding: 7px 0; border: 0; color: inherit; background: transparent; font: inherit; cursor: pointer; }
.play-placeholder { position: absolute; z-index: 2; top: 42%; left: 50%; display: grid; place-items: center; width: 68px; height: 68px; padding: 0; border: 1px solid rgba(255,255,255,.22); border-radius: 50%; color: white; background: rgba(0,0,0,.42); pointer-events: none; transform: translate(-50%, -50%); backdrop-filter: blur(7px); }
.play-placeholder svg { width: 32px; height: 32px; fill: currentColor; stroke: none; }
.side-actions { position: absolute; z-index: 2; right: 16px; bottom: 100px; display: grid; gap: 20px; }
.side-actions span, .save-toggle, .episode-toggle, .comment-toggle, .share-action { display: grid; place-items: center; gap: 4px; }
.side-actions svg { width: 27px; height: 27px; }
.side-actions small { font-size: .62rem; }
.save-toggle, .episode-toggle, .comment-toggle, .share-action { padding: 0; border: 0; color: inherit; background: transparent; cursor: pointer; }
.save-toggle.saved { color: var(--accent); }
.save-toggle.saved svg { fill: currentColor; }
.share-action { pointer-events: none; }
.share-action svg { overflow: visible; }
.comment-toggle svg { overflow: visible; }
.story-overlay { position: absolute; z-index: 2; right: 74px; bottom: 28px; left: 20px; }
.story-overlay h1 { margin: 0; font-size: clamp(1.6rem, 7vw, 3.4rem); letter-spacing: -.035em; line-height: 1; }
.story-overlay #story-summary { display: -webkit-box; overflow: hidden; margin: 12px 0 0; color: rgba(255,255,255,.7); font-size: .82rem; line-height: 1.5; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.watch-full-link { display: none; width: fit-content; margin-top: 14px; padding: 10px 15px; border: 1px solid rgba(255,255,255,.22); border-radius: 9px; color: white; background: rgba(255,255,255,.12); font-size: .76rem; font-weight: 750; text-decoration: none; backdrop-filter: blur(12px); }
.for-you-page .back-button { display: none; }
.for-you-page .feed-search-button { display: grid; }
.for-you-page .watch-full-link { display: inline-flex; }
.for-you-page .player.feed-changed #story-image { animation: feedReveal 360ms ease both; }
@keyframes feedReveal { from { opacity: .55; transform: scale(1.025); } to { opacity: 1; transform: scale(1); } }
.episode-panel { position: relative; z-index: 3; margin-top: -2px; padding: 18px 18px max(32px, env(safe-area-inset-bottom)); border-radius: 24px 24px 0 0; background: #101012; }
.episode-panel.panel-hidden { display: none; }
.panel-handle { width: 44px; height: 4px; margin: 0 auto 22px; border-radius: 999px; background: #3d3d43; }
.episode-heading { display: flex; align-items: end; justify-content: space-between; gap: 16px; }
.episode-heading h2 { margin: 0; font-size: 1.45rem; letter-spacing: -.025em; }
.episode-heading a { color: var(--muted); font-size: .78rem; text-decoration: none; }
.panel-actions { display: flex; align-items: center; gap: 14px; }
.panel-actions button { display: none; width: 34px; height: 34px; padding: 0; border: 1px solid var(--line); border-radius: 50%; color: white; background: #25252a; font-size: 1.35rem; line-height: 1; }
.episode-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(58px, 1fr)); width: 100%; gap: 9px; margin-top: 20px; }
.episode-tabs { display: flex; align-items: center; gap: 22px; border-bottom: 1px solid var(--line); }
.episode-tabs > button:not(.panel-actions button) { position: relative; padding: 0 0 12px; border: 0; color: #777780; background: transparent; font-size: 1rem; font-weight: 750; cursor: pointer; }
.episode-tabs > button.active { color: white; }
.episode-tabs > button.active::after { content: ""; position: absolute; right: 0; bottom: -1px; left: 0; height: 2px; background: var(--accent); }
.episode-tabs .panel-actions { margin-left: auto; padding-bottom: 9px; }
.panel-view[hidden] { display: none; }
.about-content { padding-top: 24px; }
.about-content h2 { margin: 0 0 10px; font-size: 1rem; }
.about-content > p { margin: 0; color: #b7b7bd; font-size: .84rem; line-height: 1.7; }
.cast-section { margin-top: 30px; padding-top: 24px; border-top: 1px solid var(--line); }
.character-list { display: flex; gap: 18px; overflow-x: auto; padding: 4px 0 6px; scrollbar-width: none; }
.character-list::-webkit-scrollbar { display: none; }
.character-profile { flex: 0 0 76px; text-align: center; }
.character-profile img { display: block; width: 66px; height: 66px; margin: 0 auto 8px; border: 1px solid rgba(255,255,255,.12); border-radius: 50%; object-fit: cover; background: var(--surface-2); }
.character-profile strong { display: block; font-size: .7rem; font-weight: 700; line-height: 1.25; }
.producer-section { margin-top: 30px; padding-top: 24px; border-top: 1px solid var(--line); }
.producer-profile { display: grid; justify-items: center; width: 76px; gap: 8px; text-align: center; }
.producer-profile img { width: 66px; height: 66px; border-radius: 50%; object-fit: cover; }
.producer-profile strong { font-size: .7rem; line-height: 1.25; }
.episode-link { display: grid; min-width: 0; width: 100%; place-items: center; aspect-ratio: 1.24; border: 1px solid transparent; border-radius: 10px; color: #e9e9eb; background: #202024; font-size: .92rem; font-weight: 700; text-decoration: none; }
.episode-link.active { border-color: rgba(255, 35, 69, .55); color: white; background: rgba(255, 35, 69, .19); }
.episode-backdrop { display: none; }
.comment-backdrop { display: none; }
.comment-panel { position: relative; z-index: 3; display: none; min-height: 100vh; padding: 18px 18px max(18px, env(safe-area-inset-bottom)); background: #101012; }
.comment-panel.open { display: flex; flex-direction: column; }
.comment-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.comment-heading h2 { margin: 0; font-size: 1.45rem; letter-spacing: -.025em; }
.comment-heading h2 span { color: var(--muted); font-size: .8em; }
.comment-heading > button { display: grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 1px solid var(--line); border-radius: 50%; color: white; background: #25252a; font-size: 1.35rem; cursor: pointer; }
.comment-list { flex: 1; overflow-y: auto; margin: 18px -4px 0; padding: 0 4px 18px; }
.comment { display: grid; grid-template-columns: 38px 1fr; gap: 11px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.comment-avatar { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; color: white; background: linear-gradient(135deg, #e84a68, #7b294e); font-size: .7rem; font-weight: 800; }
.avatar-two { background: linear-gradient(135deg, #4c8fe8, #343277); }
.avatar-three { background: linear-gradient(135deg, #e0953c, #8f3d32); }
.comment-meta { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.comment-meta strong { font-size: .82rem; }
.comment-meta span { color: #6f6f77; font-size: .66rem; }
.comment-body > p, .comment-reply p { margin: 6px 0 8px; color: #d0d0d4; font-size: .79rem; line-height: 1.45; }
.moment-link { display: inline-block; padding: 5px 8px; border-radius: 7px; color: #ff8aa0; background: rgba(255,35,69,.12); font-size: .67rem; font-weight: 750; text-decoration: none; }
.comment-actions { display: flex; gap: 16px; margin-top: 9px; }
.comment-actions button { padding: 0; border: 0; color: #8d8d95; background: transparent; font-size: .69rem; cursor: pointer; }
.comment-actions .liked { color: #ff4668; }
.comment-reply { margin-top: 12px; padding: 10px 12px; border-left: 2px solid #3a3a40; background: #17171a; }
.comment-reply strong { font-size: .72rem; }
.comment-reply p { margin-bottom: 0; }
.comment-composer { position: sticky; bottom: 0; margin: auto -18px calc(-1 * max(18px, env(safe-area-inset-bottom))); padding: 12px 18px max(14px, env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: rgba(16,16,18,.97); backdrop-filter: blur(16px); }
.comment-input-row { display: flex; align-items: center; gap: 8px; padding: 4px 5px 4px 12px; border: 1px solid #34343a; border-radius: 12px; background: #1c1c20; }
.comment-input-row:focus-within { border-color: #676771; }
.comment-composer textarea { flex: 1; min-width: 0; height: 34px; resize: none; padding: 8px 0; border: 0; color: white; background: transparent; font: inherit; font-size: .8rem; line-height: 18px; outline: none; }
.comment-send { height: 32px; padding: 0 14px; border: 0; border-radius: 9px; color: white; background: var(--accent); font: inherit; font-size: .8rem; font-weight: 700; cursor: pointer; }
.timestamp-toggle { display: flex; align-items: center; gap: 7px; margin-top: 9px; padding: 0; border: 0; color: #92929a; background: transparent; font: inherit; font-size: .7rem; cursor: pointer; }
.timestamp-check { display: grid; place-items: center; width: 17px; height: 17px; border: 1px solid #62626b; border-radius: 50%; color: transparent; font-size: .65rem; }
.timestamp-toggle[aria-pressed="true"] { color: #dddde1; }
.timestamp-toggle[aria-pressed="true"] .timestamp-check { border-color: var(--accent); color: white; background: var(--accent); }
.comment-composer-tools { display: flex; align-items: end; gap: 8px; margin-top: 8px; }
.comment-composer-tools[hidden] { display: none; }
.comment-composer-tools label { display: grid; gap: 3px; color: #777780; font-size: .58rem; text-transform: uppercase; }
.comment-composer-tools select, .comment-composer-tools input { width: 70px; height: 34px; padding: 0 8px; border: 1px solid #34343a; border-radius: 8px; color: #dddde1; background: #1c1c20; font: inherit; font-size: .7rem; }
.replying-to { align-items: center; width: fit-content; margin-bottom: 8px; padding: 6px 8px 6px 10px; border: 1px solid rgba(255,70,104,.22); border-radius: 8px; color: #ff6c87; background: rgba(255,35,69,.1); font-size: .68rem; }
.replying-to:not([hidden]) { display: inline-flex; gap: 5px; }
.replying-to button { width: 18px; height: 18px; padding: 0; border: 0; color: #ff4668; background: transparent; font-size: .95rem; line-height: 1; cursor: pointer; }
.replying-context { margin-top: 6px; color: #8d8d95; font-size: .67rem; }
.speed-backdrop { position: fixed; z-index: 39; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; background: rgba(0, 0, 0, .62); opacity: 0; pointer-events: none; transition: opacity 180ms ease; }
.speed-backdrop[hidden] { display: none; }
.speed-backdrop.open { opacity: 1; pointer-events: auto; }
.speed-panel { position: fixed; z-index: 40; right: 0; bottom: 0; left: 0; max-height: 76svh; padding: 18px 18px max(32px, env(safe-area-inset-bottom)); border-radius: 24px 24px 0 0; background: #101012; box-shadow: 0 -24px 70px rgba(0, 0, 0, .55); transform: translateY(104%); transition: transform 220ms ease; }
.speed-panel.open { transform: translateY(0); }
.speed-heading { display: flex; align-items: center; justify-content: space-between; }
.speed-heading h2 { margin: 0; font-size: 1.3rem; letter-spacing: -.02em; }
.speed-heading button { display: grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 1px solid var(--line); border-radius: 50%; color: white; background: #25252a; font-size: 1.35rem; line-height: 1; cursor: pointer; }
.speed-options { display: grid; margin-top: 14px; }
.speed-options button { display: flex; align-items: center; justify-content: space-between; min-height: 52px; padding: 0 4px; border: 0; border-bottom: 1px solid var(--line); color: #c7c7cc; background: transparent; font: inherit; font-weight: 700; text-align: left; cursor: pointer; }
.speed-options button:last-child { border-bottom: 0; }
.speed-options button.active { color: white; }
.speed-options button.active::after { content: "✓"; color: var(--accent); font-size: 1.05rem; }
body.speed-open { overflow: hidden; }

@media (max-width: 679px) {
  .browse-page, .library-page, .social-page { position: fixed; inset: 0; display: flex; flex-direction: column; width: 100%; height: 100svh; min-height: 0; overflow: hidden; padding-bottom: 0; overscroll-behavior: none; }
  .browse-page .browse-controls { position: relative; flex: 0 0 auto; }
  .browse-page main, .library-shell, .social-shell { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior-y: contain; -webkit-overflow-scrolling: touch; }
  .browse-page main { padding-bottom: 92px; }
  .library-header, .social-header { flex: 0 0 auto; padding-top: max(22px, env(safe-area-inset-top)); }
  .discussion-post:first-child { border-top: 0; }
  .library-shell { padding-bottom: 144px; }
  .for-you-page { position: fixed; inset: 0; width: 100%; height: 100svh; min-height: 0; overflow: hidden; overscroll-behavior: none; }
  .for-you-page .viewer-shell, .for-you-page .player { height: 100%; min-height: 0; }
  .for-you-page .player { touch-action: none; }
  .social-shell { padding-bottom: 150px; }
  .social-discussion-actions, .social-quiz-actions { position: fixed; z-index: 15; bottom: calc(77px + env(safe-area-inset-bottom)); left: 50%; justify-content: center; width: max-content; margin: 0; transform: translateX(-50%); }
  .social-discussion-actions .social-primary, .social-quiz-actions .social-primary { min-width: 148px; min-height: 42px; box-shadow: 0 10px 30px rgba(0,0,0,.6); }
  .social-quiz-actions .social-primary, .social-quiz-actions .leaderboard-button { min-width: 132px; min-height: 42px; padding: 8px 10px; box-shadow: 0 10px 30px rgba(0,0,0,.6); }
  .discussion-compose-backdrop { position: fixed; z-index: 29; inset: 0; display: block; width: 100%; height: 100%; padding: 0; border: 0; background: rgba(0,0,0,.65); }
  .discussion-composer { position: fixed; z-index: 30; right: 0; bottom: 0; left: 0; display: grid; max-height: 85svh; overflow-y: auto; margin: 0; padding: 12px 20px max(28px, env(safe-area-inset-bottom)); border-radius: 22px 22px 0 0; box-shadow: 0 -24px 70px rgba(0,0,0,.55); }
  .discussion-sheet-handle { display: block; width: 42px; height: 4px; margin: 0 auto 12px; border-radius: 99px; background: #5a5a62; }
  body.discussion-compose-open { overflow: hidden; }
  .for-you-page .viewer-nav { display: grid; }
  .for-you-page .story-overlay { bottom: 88px; }
  .for-you-page .standard-player-tools { display: none; }
  .for-you-page .feed-mobile-actions { display: flex; }
  .episode-backdrop {
    position: fixed;
    z-index: 29;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    background: rgba(0, 0, 0, .62);
    opacity: 0;
    pointer-events: none;
    transition: opacity 180ms ease;
  }
  .comment-backdrop { position: fixed; z-index: 29; inset: 0; display: block; width: 100%; height: 100%; padding: 0; border: 0; background: rgba(0,0,0,.62); opacity: 0; pointer-events: none; transition: opacity 180ms ease; }
  .comment-backdrop[hidden] { display: none; }
  .comment-backdrop.open { opacity: 1; pointer-events: auto; }
  .episode-backdrop[hidden] { display: none; }
  .episode-backdrop.open { opacity: 1; pointer-events: auto; }
  .episode-panel {
    position: fixed;
    z-index: 30;
    right: 0;
    bottom: 0;
    left: 0;
    max-height: 76svh;
    overflow-y: auto;
    padding-bottom: max(32px, env(safe-area-inset-bottom));
    box-shadow: 0 -24px 70px rgba(0, 0, 0, .55);
    transform: translateY(104%);
    transition: transform 220ms ease;
  }
  .episode-panel.open { transform: translateY(0); }
  .comment-panel { position: fixed; z-index: 30; right: 0; bottom: 0; left: 0; display: flex; max-height: 82svh; min-height: 0; overflow: hidden; border-radius: 24px 24px 0 0; box-shadow: 0 -24px 70px rgba(0,0,0,.55); transform: translateY(104%); transition: transform 220ms ease; }
  .comment-panel.open { transform: translateY(0); }
  .panel-actions button { display: block; }
  body.episodes-open, body.comments-open { overflow: hidden; }
}

@media (min-width: 680px) {
  .social-discussion-actions, .social-quiz-actions { position: sticky; z-index: 9; top: 113px; padding: 8px 0 12px; background: var(--bg); }
  .drama-grid { gap: 34px 18px; }
  .search-shell { gap: 11px; padding: 13px 15px; border-radius: 12px; }
  .search-shell svg { width: 20px; height: 20px; }
  .search-shell span { font-size: .94rem; }
  .bottom-nav { left: 50%; width: min(100%, 680px); transform: translateX(-50%); border-right: 1px solid var(--line); border-left: 1px solid var(--line); border-radius: 20px 20px 0 0; }
  .browse-page { padding: 0 0 0 188px; }
  .library-page, .social-page { padding: 0 0 0 188px; }
  .browse-controls { position: sticky; z-index: 18; top: 0; padding-bottom: 14px; border-bottom: 1px solid var(--line); background: var(--bg); box-shadow: 0 14px 28px rgba(0,0,0,.22); }
  .browse-controls .app-header { padding-top: 42px; }
  .browse-controls .topic-tabs { padding-top: 18px; }
  .browse-controls .subcategory-tabs { padding-top: 12px; }
  .browse-controls .header-actions { display: none; }
  .browse-page .bottom-nav, .library-page .bottom-nav, .social-page .bottom-nav {
    top: 0;
    right: auto;
    bottom: 0;
    left: 0;
    grid-template-columns: 1fr;
    align-content: start;
    gap: 8px;
    width: 188px;
    padding: 42px 18px;
    border: 0;
    border-right: 1px solid var(--line);
    border-radius: 0;
    background: rgba(8,8,10,.97);
    transform: none;
  }
  .browse-page .nav-item, .library-page .nav-item, .social-page .nav-item {
    box-sizing: border-box;
    flex-direction: row;
    justify-content: flex-start;
    gap: 14px;
    min-height: 52px;
    padding: 0 14px;
    border: 1px solid transparent;
    border-radius: 12px;
    color: #8c8c95;
    font-size: .83rem;
    font-weight: 700;
  }
  .browse-page .nav-item svg, .library-page .nav-item svg, .social-page .nav-item svg { width: 25px; height: 25px; }
  .profile-label-mobile { display: none; }
  .profile-label-desktop { display: inline; }
  .browse-page .nav-item.active, .library-page .nav-item.active, .social-page .nav-item.active { border-color: rgba(255,35,69,.55); color: white; background: rgba(255,35,69,.14); }
  .library-shell { width: 100%; max-width: none; margin: 0; }
  .library-header { padding-top: 58px; }
  .social-shell { width: 100%; max-width: none; margin: 0; }
  .social-header { padding-top: 58px; }
  .quiz-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
  .library-grid { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 34px 18px; }
  .library-comment { grid-template-columns: 92px minmax(0, 1fr) 90px; gap: 20px; padding: 16px 0; }
  .library-comment img { width: 92px; }
  .library-comment-copy strong { font-size: .86rem; }
  .library-comment-copy > span { font-size: .9rem; }
  .sidebar-actions { position: absolute; right: 18px; bottom: 42px; left: 18px; display: grid; gap: 8px; }
  .sidebar-tool { display: flex; align-items: center; justify-content: flex-start; gap: 14px; width: 100%; min-height: 52px; padding: 0 14px; border: 0; border-radius: 12px; font-size: .83rem; font-weight: 750; box-shadow: 0 10px 24px rgba(0,0,0,.24); pointer-events: none; }
  .sidebar-tool svg { width: 25px; height: 25px; flex: 0 0 auto; }
  .sidebar-create { color: white; background: linear-gradient(135deg, #ff9b52 0%, #ff4168 48%, #c9083d 100%); }
  .sidebar-vip { color: #241500; background: linear-gradient(135deg, #ffe08a, #f0aa35); }
  .watch-page { padding-left: 188px; }
  .viewer-nav {
    top: 0;
    right: auto;
    bottom: 0;
    left: 0;
    display: grid;
    grid-template-columns: 1fr;
    align-content: start;
    gap: 8px;
    width: 188px;
    padding: 42px 18px;
    border: 0;
    border-right: 1px solid var(--line);
    border-radius: 0;
    background: rgba(8,8,10,.98);
    transform: none;
  }
  .viewer-nav .nav-item { box-sizing: border-box; flex-direction: row; justify-content: flex-start; gap: 14px; min-height: 52px; padding: 0 14px; border: 1px solid transparent; border-radius: 12px; color: #8c8c95; font-size: .83rem; font-weight: 700; text-decoration: none; }
  .viewer-nav .nav-item svg { width: 25px; height: 25px; }
  .viewer-nav .nav-item.active { border-color: rgba(255,35,69,.55); color: white; background: rgba(255,35,69,.14); }
  .viewer-shell { display: grid; grid-template-columns: 56.25vh 76px minmax(0, 1fr); min-height: 100vh; background: #080809; }
  .player { grid-column: 1; width: 56.25vh; height: 100vh; min-height: 0; aspect-ratio: 9 / 16; overflow: visible; }
  .episode-panel { grid-column: 3; min-height: 100vh; margin: 0; padding: 48px clamp(30px, 5vw, 70px); border-radius: 0; }
  .comment-panel { grid-column: 3; min-height: 100vh; padding: 48px clamp(30px, 5vw, 70px) 18px; }
  .side-actions { right: -62px; bottom: 50%; width: 48px; gap: 18px; transform: translateY(50%); }
  .side-actions span, .side-actions button { color: #d8d8dd; }
  .side-actions svg { box-sizing: border-box; width: 46px; height: 46px; padding: 11px; border: 1px solid rgba(255,255,255,.08); border-radius: 50%; background: #1b1b1f; }
  .side-actions small { color: #aaaab2; font-size: .6rem; }
  .story-overlay h1 { font-size: 1.45rem; letter-spacing: -.025em; line-height: 1.08; }
  .panel-handle { display: none; }
  .episode-grid { grid-template-columns: repeat(auto-fill, minmax(58px, 1fr)); gap: 12px; }
  .speed-backdrop { background: transparent; }
  .speed-panel {
    top: 66px;
    right: calc(100vw - 188px - 56.25vh + 12px);
    bottom: auto;
    left: auto;
    width: 176px;
    max-height: none;
    padding: 7px 12px;
    border: 1px solid rgba(255,255,255,.11);
    border-radius: 12px;
    box-shadow: 0 18px 50px rgba(0,0,0,.48);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-8px) scale(.98);
    transform-origin: top right;
    transition: opacity 150ms ease, transform 150ms ease;
  }
  .speed-panel.open { opacity: 1; pointer-events: auto; transform: translateY(0) scale(1); }
  .speed-panel .panel-handle, .speed-heading { display: none; }
  .speed-options { margin-top: 0; }
  .speed-options button { min-height: 39px; font-size: .78rem; }
}

@media (min-width: 1100px) {
  .drama-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}
