/* SwakDrama web — dark, poster-first short-drama site. */
/* Inter (SIL Open Font License), self-hosted so first paint does not wait on a third-party host. */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url("/fonts/inter-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url("/fonts/inter-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
:root {
  --bg: #0c0a0b;
  --bg-deep: #090708;
  --surface: #151215;
  --surface-2: #1c181b;
  --surface-3: #262226;
  --line: #262226;
  --line-strong: #3a353a;
  --text: #f7f3f6;
  --text-soft: #d9d3d8;
  --muted: #a49ea3;
  --faint: #857e84;
  --accent: #ff7a1a;
  --accent-ink: #140a02;
  --accent-soft: rgba(255, 122, 26, 0.14);
  --link: #ff9a4d;
  --new: #2bd47d;
  --telegram: #2aabee;
  --radius-card: 10px;
  --radius-panel: 16px;
  --header-h: 68px;
  --tab-h: 64px;
  --page-inline: 32px;
  --section-gap: 56px;
  --shadow-poster: 0 30px 80px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.08);
  --font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

html {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  overflow-x: hidden;
}

a {
  color: var(--link);
  text-decoration: none;
}

a:hover {
  color: #ffb67f;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

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

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

button {
  cursor: pointer;
}

h1,
h2,
h3 {
  margin: 0;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

p {
  margin: 0;
}

.muted {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.container {
  width: 100%;
  max-width: 1376px;
  margin: 0 auto;
  padding-inline: var(--page-inline);
}

.page {
  padding-top: 24px;
  padding-bottom: 72px;
}

.page > section,
.drama-main > section {
  margin-top: var(--section-gap);
}

.page > section:first-child {
  margin-top: 0;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.dot {
  display: inline-block;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.45;
  flex: none;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--header-h);
  background: rgba(12, 10, 11, 0.86);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  backdrop-filter: blur(16px) saturate(1.4);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  transition: background 0.25s ease, border-color 0.25s ease;
}

.header-row {
  display: flex;
  align-items: center;
  gap: 32px;
  height: 100%;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-size: 20px;
  font-weight: 900;
  letter-spacing: -0.03em;
  flex: none;
}

.brand:hover {
  color: var(--text);
}

.brand img {
  width: 32px;
  height: 32px;
  border-radius: 9px;
}

.header-nav {
  display: flex;
  gap: 26px;
}

.header-nav a {
  position: relative;
  color: var(--muted);
  font-size: 14.5px;
  font-weight: 600;
  padding: 6px 0;
  transition: color 0.15s ease;
}

.header-nav a:hover,
.header-nav a[aria-current] {
  color: #fff;
}

.header-nav a[aria-current]::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
}

.header-search {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  width: 300px;
  height: 40px;
  padding: 0 14px 0 6px;
  border-radius: 20px;
  background: var(--surface-2);
  border: 1px solid #2e292d;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.header-search:focus-within {
  border-color: var(--line-strong);
  background: #221d21;
}

.header-search button {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 50%;
  background: none;
  color: var(--faint);
}

.header-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: none;
  font-size: 14px;
}

.header-search input::placeholder {
  color: var(--faint);
}

.header-search input::-webkit-search-cancel-button {
  filter: invert(0.6);
}

.icon-link {
  display: none;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: var(--text);
  background: var(--surface-2);
}

.lang-menu {
  position: relative;
  flex: none;
}

.lang-menu summary {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 38px;
  padding: 0 8px;
  border-radius: 10px;
  list-style: none;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.lang-menu summary::-webkit-details-marker {
  display: none;
}

.lang-menu summary:hover,
.lang-menu[open] summary {
  color: #fff;
  background: var(--surface-2);
}

.lang-list {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 200px;
  padding: 6px;
  border-radius: 12px;
  background: #1a1619;
  border: 1px solid var(--line-strong);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.55);
  display: grid;
}

.lang-list a {
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--text-soft);
  font-size: 14px;
  font-weight: 500;
}

.lang-list a:hover {
  background: var(--surface-3);
  color: #fff;
}

.lang-list a[aria-current] {
  color: var(--link);
  font-weight: 700;
}

.label-narrow {
  display: none;
}

/* ---------- Buttons, pills, badges ---------- */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 44px;
  padding: 0 20px;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: 0 10px 30px rgba(255, 122, 26, 0.3);
  transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.button:hover {
  color: var(--accent-ink);
  background: #ff8b38;
  transform: translateY(-1px);
}

.button:active {
  transform: translateY(0);
}

.button-large {
  height: 52px;
  padding: 0 26px;
  font-size: 16px;
}

.button-small {
  height: 38px;
  padding: 0 16px;
  font-size: 14px;
  font-weight: 600;
}

.button-ghost {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: none;
}

.button-ghost:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
}

.button-telegram {
  background: none;
  color: var(--text);
  border: 1px solid var(--line-strong);
  box-shadow: none;
}

.button-telegram:hover {
  color: #fff;
  background: var(--surface-2);
}

.button-telegram .icon-telegram {
  color: var(--telegram);
}

.button-telegram-solid {
  background: var(--telegram);
  color: #fff;
  box-shadow: 0 10px 30px rgba(42, 171, 238, 0.25);
}

.button-telegram-solid:hover {
  background: #45b8f2;
  color: #fff;
}

.button-block {
  display: flex;
  width: 100%;
}

.button-text {
  border: 0;
  background: none;
  padding: 6px 2px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}

.button-text:hover {
  color: #fff;
}

.icon-button {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #fff;
  transition: background 0.15s ease;
}

.icon-button:hover {
  background: rgba(255, 255, 255, 0.18);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 26px;
  padding: 0 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.pill-accent {
  background: var(--accent);
  color: var(--accent-ink);
}

.badge {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 7px;
  border-radius: 5px;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  white-space: nowrap;
}

.badge-free {
  background: var(--accent);
  color: var(--accent-ink);
}

.badge-new {
  background: var(--new);
  color: #03140a;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.chip {
  display: inline-flex;
  align-items: center;
  height: 38px;
  padding: 0 18px;
  border-radius: 19px;
  background: var(--surface-2);
  border: 1px solid #2e292d;
  color: var(--text-soft);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.chip:hover {
  color: #fff;
  border-color: var(--line-strong);
  background: #231e22;
}

.chip-current,
.chip-current:hover {
  background: var(--text);
  border-color: var(--text);
  color: var(--bg);
}

.chip-small {
  height: 32px;
  padding: 0 14px;
  font-size: 13px;
}

button.chip {
  border-style: solid;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  display: inline-flex;
  align-items: center;
  height: 30px;
  padding: 0 12px;
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #e3dde2;
  font-size: 13px;
  font-weight: 600;
}

a.tag:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
}

/* ---------- Section heads, breadcrumbs ---------- */

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.section-head h2,
.drama-main h2,
.page > section > h2 {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.page > section > h2,
.drama-main > section > h2 {
  margin-bottom: 18px;
}

.view-all {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--link);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: var(--faint);
  font-size: 13.5px;
  margin-bottom: 20px;
}

.breadcrumb a {
  color: var(--muted);
}

.breadcrumb a:hover {
  color: #fff;
}

.breadcrumb [aria-current] {
  color: var(--text);
  font-weight: 600;
}

/* ---------- Cards and rails ---------- */

.card {
  display: block;
  min-width: 0;
  color: var(--text);
}

.card:hover {
  color: var(--text);
}

.card-cover-wrap {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  border-radius: var(--radius-card);
  overflow: hidden;
  background: var(--surface-2);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.card-cover-wrap::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 42%;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.78), transparent);
  pointer-events: none;
}

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

.card:hover .card-cover-wrap {
  box-shadow: 0 0 0 2px var(--accent), 0 16px 40px rgba(0, 0, 0, 0.5);
}

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

.card .badge {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 1;
}

.card-eps {
  position: absolute;
  right: 8px;
  bottom: 8px;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.card-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.6em;
  margin-top: 10px;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
}

.card-meta {
  display: block;
  margin-top: 4px;
  color: var(--faint);
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: calc((100% - 6 * 16px) / 7);
  gap: 16px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding: 4px 4px 6px;
  margin: -4px -4px -6px;
}

.rail::-webkit-scrollbar {
  display: none;
}

.rail > * {
  scroll-snap-align: start;
}

.grid {
  display: grid;
  gap: 28px 18px;
}

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

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

/* ---------- Home hero carousel ---------- */

.hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.hero-kicker-row {
  position: absolute;
  left: 0;
  right: 0;
  top: 26px;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 14px;
  pointer-events: none;
}

.hero-kicker {
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #ffb070;
}

.hero-kicker-sub {
  color: var(--faint);
  font-size: 12.5px;
  font-weight: 600;
}

.hero-slides {
  position: relative;
  height: 560px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.7s ease, visibility 0.7s;
}

.hero-slide.is-active {
  opacity: 1;
  visibility: visible;
}

.hero-bg {
  position: absolute;
  inset: -60px;
  background-size: cover;
  background-position: center 30%;
  filter: blur(40px) saturate(1.25);
  opacity: 0.55;
  transform: scale(1.1);
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, var(--bg) 0%, rgba(12, 10, 11, 0.92) 36%, rgba(12, 10, 11, 0.35) 70%, rgba(12, 10, 11, 0.65) 100%),
    linear-gradient(0deg, var(--bg) 0%, rgba(12, 10, 11, 0) 38%);
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 64px;
  height: 100%;
  padding-top: 40px;
  padding-right: calc(var(--page-inline) + 110px);
}

.hero-copy {
  flex: 1;
  max-width: 640px;
}

.hero-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.hero-title {
  font-size: 56px;
  font-weight: 900;
  line-height: 1.04;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.hero-title a {
  color: var(--text);
}

.hero-title a:hover {
  color: #fff;
}

.hero-meta,
.drama-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
  color: #d0cacf;
  font-size: 15px;
  font-weight: 500;
}

.hero-synopsis {
  margin-top: 18px;
  max-width: 560px;
  color: #c9c3c8;
  font-size: 17px;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.hero-poster {
  flex: none;
  width: 300px;
  aspect-ratio: 3 / 4;
  margin-left: auto;
  border-radius: var(--radius-panel);
  overflow: hidden;
  box-shadow: var(--shadow-poster);
  transform: translateY(12px);
  transition: transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.hero-slide.is-active .hero-poster {
  transform: none;
}

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

.hero-controls {
  position: absolute;
  inset: 0;
  left: 0;
  right: 0;
  margin: 0 auto;
  z-index: 2;
  pointer-events: none;
}

.hero-dots {
  position: absolute;
  left: var(--page-inline);
  bottom: 30px;
  display: flex;
  gap: 8px;
  pointer-events: auto;
}

.hero-dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: #4a4349;
  transition: width 0.3s ease, background 0.3s ease;
}

.hero-dot.is-active {
  width: 30px;
  background: var(--accent);
}

.hero-thumbs {
  position: absolute;
  right: var(--page-inline);
  top: 50%;
  transform: translateY(-46%);
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: auto;
}

.hero-thumb {
  width: 66px;
  aspect-ratio: 3 / 4;
  padding: 0;
  border: 0;
  border-radius: 9px;
  overflow: hidden;
  background: var(--surface-2);
  opacity: 0.45;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1);
  transition: opacity 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.hero-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-thumb:hover {
  opacity: 0.8;
}

.hero-thumb.is-active {
  opacity: 1;
  box-shadow: 0 0 0 2px var(--accent);
  transform: scale(1.04);
}

.page-home {
  padding-top: 8px;
}

.home-chips .chips {
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 2px 0 4px;
}

.home-chips .chips::-webkit-scrollbar {
  display: none;
}

.page-home > section {
  margin-top: 48px;
}

.page-home > section.home-chips {
  margin-top: 0;
}

/* Top 10 */

.top-rail {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 24px 20px;
}

.top-card {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  height: 100%;
}

.top-number {
  position: absolute;
  left: 0;
  bottom: -6px;
  font-size: 150px;
  font-weight: 900;
  line-height: 0.78;
  letter-spacing: -0.08em;
  color: var(--bg);
  -webkit-text-stroke: 3px #4a4349;
  transition: -webkit-text-stroke-color 0.2s ease;
}

.top-card img {
  position: relative;
  width: 64%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: var(--radius-card);
  box-shadow: -10px 0 24px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.06);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.top-card:hover .top-number {
  -webkit-text-stroke-color: var(--accent);
}

.top-card:hover img {
  transform: translateY(-3px);
  box-shadow: -10px 0 24px rgba(0, 0, 0, 0.55), 0 0 0 2px var(--accent);
}

/* Genre tiles */

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

.genre-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  height: 124px;
  padding: 18px 20px;
  border-radius: 14px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--tile-from), var(--tile-to));
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.genre-tile:hover {
  color: #fff;
}

.genre-tile img {
  position: absolute;
  right: -8px;
  top: -6px;
  width: 96px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 8px;
  transform: rotate(10deg);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  transition: transform 0.3s ease;
}

.genre-tile:hover img {
  transform: rotate(4deg) translateY(4px);
}

.genre-tile strong,
.genre-tile h2 {
  position: relative;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.genre-tile span {
  position: relative;
  color: rgba(255, 255, 255, 0.7);
  font-size: 13px;
  margin-top: 2px;
}

/* Genres directory (/genres/) */

.genre-directory {
  list-style: none;
  margin: 32px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.genre-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 12px 12px 16px;
  border-radius: var(--radius-panel);
  background: var(--surface);
  border: 1px solid var(--line);
}

.genre-card .genre-tile h2 {
  margin: 0;
}

.genre-card-intro {
  padding: 0 6px;
  color: var(--text-soft);
  font-size: 14px;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.genre-card-picks {
  margin-top: auto;
  padding: 0 6px;
  font-size: 13.5px;
  line-height: 1.6;
}

.ranked-list-compact {
  margin-top: 0;
}

@media (max-width: 1080px) {
  .genre-directory {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .genre-directory {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
  }
}

/* Steps */

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.steps li {
  display: flex;
  gap: 16px;
  padding: 22px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
}

.step-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
}

.steps h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 6px;
}

.steps p {
  color: var(--faint);
  font-size: 14px;
  line-height: 1.55;
}

/* FAQ */

.faq-list {
  border-top: 1px solid var(--line);
}

.faq-item {
  border-bottom: 1px solid var(--line);
}

.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0;
  list-style: none;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
}

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

.faq-item summary:hover {
  color: #fff;
}

.faq-icon {
  position: relative;
  flex: none;
  width: 16px;
  height: 16px;
}

.faq-icon::before,
.faq-icon::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 7px;
  height: 2px;
  border-radius: 2px;
  background: var(--muted);
  transition: transform 0.2s ease;
}

.faq-icon::after {
  transform: rotate(90deg);
}

.faq-item[open] .faq-icon::after {
  transform: rotate(0);
}

.faq-item p {
  max-width: 820px;
  padding-bottom: 18px;
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.65;
}

/* Legacy definition-list FAQ (about page) */

.faq {
  margin: 0;
  border-top: 1px solid var(--line);
}

.faq dt {
  padding-top: 18px;
  font-size: 16px;
  font-weight: 600;
}

.faq dd {
  margin: 8px 0 0;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.65;
}

/* ---------- List pages ---------- */

.list-hero {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 40px;
  padding: 40px 44px;
  border-radius: 20px;
  background: linear-gradient(120deg, var(--hero-from) 0%, var(--hero-to) 55%, var(--surface) 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.list-hero h1 {
  font-size: 44px;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.list-hero p {
  margin-top: 10px;
  max-width: 660px;
  color: #ddd0d6;
  font-size: 16px;
  line-height: 1.6;
}

.list-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  margin: 22px 0 0;
}

.list-stats div {
  display: flex;
  flex-direction: column-reverse;
}

.list-stats dt {
  color: rgba(255, 255, 255, 0.62);
  font-size: 13px;
}

.list-stats dd {
  margin: 0;
  color: #fff;
  font-size: 22px;
  font-weight: 800;
}

.list-hero-fan {
  position: relative;
  flex: none;
  width: 300px;
  height: 170px;
  margin-left: auto;
}

.list-hero-fan img {
  position: absolute;
  top: 10px;
  width: 112px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 10px;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.55);
}

.list-hero-fan img:nth-child(1) {
  left: 0;
  transform: rotate(-10deg);
}

.list-hero-fan img:nth-child(2) {
  left: 94px;
  top: 0;
  z-index: 1;
}

.list-hero-fan img:nth-child(3) {
  left: 188px;
  transform: rotate(10deg);
}

.page-list > .chips {
  margin-top: 24px;
}

.count {
  margin: 24px 0 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

/* ---------- Drama page ---------- */

.drama-hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  padding: 22px 0 56px;
}

.drama-hero-bg {
  position: absolute;
  inset: -60px;
  z-index: -1;
  background-size: cover;
  background-position: center 30%;
  filter: blur(44px) saturate(1.2);
  opacity: 0.45;
  transform: scale(1.1);
}

.drama-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(12, 10, 11, 0.75) 0%, rgba(12, 10, 11, 0.9) 60%, var(--bg) 100%),
    linear-gradient(0deg, var(--bg) 0%, rgba(12, 10, 11, 0) 50%);
}

.drama-hero-row {
  display: flex;
  align-items: flex-start;
  gap: 48px;
}

.drama-cover {
  flex: none;
  width: 300px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: var(--radius-panel);
  box-shadow: var(--shadow-poster);
}

.drama-head {
  flex: 1;
  min-width: 0;
  padding-top: 4px;
}

.drama-head h1 {
  font-size: 52px;
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.original-title {
  margin-top: 8px;
}

.drama-head .drama-meta {
  margin-top: 14px;
}

.synopsis {
  color: #c9c3c8;
  font-size: 17px;
  line-height: 1.65;
}

.drama-head .synopsis {
  margin-top: 18px;
  max-width: 700px;
}

.drama-head .tags {
  margin-top: 18px;
}

.drama-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 28px;
}

.drama-actions .button-ghost .icon-telegram {
  color: var(--telegram);
}

.note {
  margin-top: 14px;
  color: var(--faint);
  font-size: 13px;
}

.page-drama {
  padding-top: 8px;
}

.drama-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 48px;
  align-items: start;
}

.drama-main > section:first-child {
  margin-top: 0;
}

.drama-aside {
  display: grid;
  gap: 16px;
  position: sticky;
  top: calc(var(--header-h) + 16px);
}

.episode-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin: -6px 0 16px;
  color: var(--faint);
  font-size: 13px;
}

.episode-legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.episode-legend i {
  width: 10px;
  height: 10px;
  border-radius: 3px;
}

.legend-free {
  background: var(--accent);
}

.legend-telegram {
  background: var(--telegram);
  opacity: 0.6;
}

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

.episode-tab-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.episode-tabs .episodes + .episodes {
  margin-top: 10px;
}

.episode-tabs.is-enhanced [data-collapsed] {
  display: none;
}

.ep {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 52px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-size: 15px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.ep-free {
  background: #1f1a1d;
  border-color: #3a2a22;
  color: #fff;
}

.ep-free::before {
  content: "";
  width: 8px;
  height: 9px;
  background: var(--accent);
  clip-path: polygon(0 0, 100% 50%, 0 100%);
}

.ep-free:hover {
  color: #fff;
  border-color: var(--accent);
  transform: translateY(-1px);
}

.ep-free.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}

.ep-free.is-active::before {
  background: var(--accent-ink);
}

.ep-telegram {
  background: #141113;
  border-color: #221e21;
  color: #8a838a;
}

.ep-telegram:hover {
  color: #fff;
  border-color: rgba(42, 171, 238, 0.6);
  background: rgba(42, 171, 238, 0.08);
}

.prose p {
  max-width: 760px;
  color: #c9c3c8;
  font-size: 16px;
  line-height: 1.75;
}

.prose p + p {
  margin-top: 14px;
}

.panel {
  padding: 22px 24px;
  border-radius: var(--radius-panel);
  background: var(--surface);
  border: 1px solid var(--line);
}

.panel > h2 {
  font-size: 17px;
  font-weight: 800;
  margin-bottom: 12px;
}

.facts {
  margin: 0;
}

.facts div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 11px 0;
  border-top: 1px solid #221e21;
  font-size: 14px;
}

.facts div:first-child {
  border-top: 0;
  padding-top: 2px;
}

.facts dt {
  color: var(--faint);
  flex: none;
}

.facts dd {
  margin: 0;
  font-weight: 600;
  text-align: right;
}

.facts dd a {
  color: var(--link);
}

.facts + .button {
  margin-top: 10px;
}

.panel-links a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-top: 1px solid #221e21;
  color: var(--text-soft);
  font-size: 14px;
}

.panel-links a:first-child {
  border-top: 0;
}

.panel-links a:hover {
  color: #fff;
}

.telegram-box {
  padding: 24px;
  border-radius: var(--radius-panel);
  background: linear-gradient(150deg, #1d2c3a 0%, var(--surface) 72%);
  border: 1px solid #24394b;
}

.telegram-box-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgba(42, 171, 238, 0.16);
  color: var(--telegram);
}

.telegram-box h2 {
  margin: 14px 0 8px;
  font-size: 19px;
  font-weight: 800;
}

.telegram-box p {
  color: #a9b4bd;
  font-size: 14px;
  line-height: 1.55;
}

.telegram-box ul {
  list-style: none;
  margin: 16px 0 18px;
  padding: 0;
  display: grid;
  gap: 8px;
  color: #cfd8df;
  font-size: 13.5px;
}

.telegram-box li {
  display: flex;
  align-items: center;
  gap: 8px;
}

.telegram-box li svg {
  color: var(--new);
  flex: none;
}

.sticky-watch {
  display: none;
}

/* ---------- Ranked lists (Top 10, series) ---------- */

.page-intro h1 {
  font-size: 44px;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.page-intro p,
.about-copy {
  margin-top: 12px;
  max-width: 760px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.65;
}

.page-intro .tags {
  margin-top: 16px;
}

.ranked-list {
  list-style: none;
  margin: 32px 0 0;
  padding: 0;
  display: grid;
  gap: 16px;
}

.ranked-item {
  position: relative;
  display: grid;
  grid-template-columns: 90px 150px minmax(0, 1fr);
  gap: 28px;
  align-items: center;
  padding: 20px 24px 20px 12px;
  border-radius: var(--radius-panel);
  background: var(--surface);
  border: 1px solid var(--line);
  transition: border-color 0.2s ease;
}

.ranked-item:hover {
  border-color: var(--line-strong);
}

.series-item {
  grid-template-columns: 150px minmax(0, 1fr);
  padding-left: 24px;
}

.ranked-number {
  justify-self: center;
  font-size: 64px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.06em;
  color: var(--bg);
  -webkit-text-stroke: 2px #5a525a;
}

.ranked-item:nth-child(-n + 3) .ranked-number {
  -webkit-text-stroke-color: var(--accent);
}

.ranked-cover-link {
  display: block;
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.ranked-cover {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.ranked-cover-link:hover .ranked-cover {
  transform: scale(1.04);
}

.ranked-body :is(h2, h3) {
  font-size: 22px;
  font-weight: 800;
}

.ranked-body :is(h2, h3) a {
  color: var(--text);
}

.ranked-body :is(h2, h3) a:hover {
  color: var(--link);
}

.ranked-body .muted {
  margin-top: 6px;
}

.ranked-synopsis {
  margin-top: 10px;
  max-width: 760px;
  color: #c9c3c8;
  font-size: 15px;
  line-height: 1.6;
}

.ranked-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
  margin-top: 16px;
}

.ranked-actions > a:not(.button) {
  font-size: 14px;
  font-weight: 600;
}

.season-badge {
  display: inline-block;
  margin-bottom: 8px;
  padding: 3px 9px;
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--link);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.about-channels {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* ---------- Search and 404 ---------- */

.search-intro h1 {
  font-size: 40px;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 720px;
  height: 58px;
  margin-top: 20px;
  padding: 0 8px 0 18px;
  border-radius: 29px;
  background: var(--surface-2);
  border: 1px solid #2e292d;
  color: var(--faint);
}

.search-box:focus-within {
  border-color: var(--accent);
}

.search-box input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: none;
  color: var(--text);
  font-size: 16px;
}

.search-box input::placeholder {
  color: var(--faint);
}

#search-status {
  margin: 18px 0;
}

#search-browse > section {
  margin-top: 40px;
}

#search-browse h2 {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 16px;
}

.not-found {
  display: grid;
  justify-items: start;
  gap: 16px;
  padding-top: 96px;
  padding-bottom: 120px;
}

.not-found h1 {
  font-size: 44px;
  font-weight: 900;
  letter-spacing: -0.03em;
}

/* ---------- Footer and tab bar ---------- */

.site-footer {
  margin-top: 24px;
  padding: 52px 0 28px;
  background: var(--bg-deep);
  border-top: 1px solid #221e21;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr repeat(4, minmax(0, 1fr));
  gap: 32px;
}

.footer-about p {
  max-width: 340px;
  margin-top: 14px;
  color: var(--faint);
  font-size: 14px;
  line-height: 1.6;
}

.footer-brand {
  font-size: 18px;
}

.footer-brand img {
  width: 28px;
  height: 28px;
  border-radius: 8px;
}

.footer-channels {
  display: grid;
  gap: 10px;
  margin-top: 20px;
}

.footer-channels a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-soft);
  font-size: 13.5px;
}

.footer-channels a svg {
  flex: none;
  color: var(--telegram);
}

.footer-col h2 {
  margin-bottom: 14px;
  color: var(--faint);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.footer-col a {
  display: block;
  margin-bottom: 10px;
  color: #c9c3c8;
  font-size: 14px;
}

.footer-col a:hover,
.footer-channels a:hover {
  color: #fff;
}

.footer-languages a[aria-current] {
  color: var(--link);
  font-weight: 600;
}

.footer-bottom {
  margin-top: 36px;
  padding-top: 20px;
  border-top: 1px solid #1d191c;
  color: #6f686e;
  font-size: 13px;
}

.tab-bar {
  display: none;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 96px;
  z-index: 100;
  padding: 11px 18px;
  border-radius: 999px;
  background: #f7f3f6;
  color: #0c0a0b;
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
  opacity: 0;
  transform: translate(-50%, 10px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ---------- Watch page: theater ---------- */

.page-watch-body .site-header {
  position: fixed;
  left: 0;
  right: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.62), rgba(0, 0, 0, 0));
  border-bottom-color: transparent;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.page-watch-body .site-header.is-scrolled {
  background: rgba(12, 10, 11, 0.9);
  border-bottom-color: rgba(255, 255, 255, 0.06);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}

.page-watch-body .header-search {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.1);
}

.theater {
  --player-h: calc(100svh - var(--header-h) - 28px);
  --video-ar: 0.5625;
  position: relative;
  height: 100vh;
  height: 100svh;
  min-height: 600px;
  overflow: hidden;
  isolation: isolate;
  background: #000;
}

.theater-bg {
  position: absolute;
  inset: -80px;
  z-index: -1;
  background-size: cover;
  background-position: center;
  filter: blur(70px) saturate(1.3) brightness(0.38);
  transform: scale(1.15);
}

.theater::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(ellipse at center, transparent 40%, rgba(0, 0, 0, 0.6) 100%);
}

/* Sized from the episode's own aspect ratio (portrait or landscape), centred in the space under the header. */
.theater-stage {
  position: absolute;
  left: 50%;
  top: calc(var(--header-h) + 8px + var(--player-h) / 2);
  width: min(calc(var(--player-h) * var(--video-ar)), calc(100vw - 260px));
  aspect-ratio: var(--video-ar);
  transform: translate(-50%, -50%);
}

.theater.is-landscape .theater-stage {
  width: min(calc(var(--player-h) * var(--video-ar)), calc(100vw - 420px));
}

.theater.is-landscape .theater-series {
  display: none;
}

.theater.is-landscape .player-rail {
  bottom: 0;
}

.player {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 16px;
  overflow: hidden;
  background: #000;
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.player video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
  cursor: pointer;
}

.player video::cue {
  font-family: var(--font);
  font-size: 18px;
  font-weight: 600;
  background: rgba(0, 0, 0, 0.55);
}

.player-big-play {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 78px;
  height: 78px;
  padding-left: 4px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.85);
  background: rgba(12, 10, 11, 0.5);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: #fff;
  transform: translate(-50%, -50%);
  transition: opacity 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.player-big-play:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}

.player.is-playing .player-big-play,
.player.has-overlay .player-big-play {
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(0.85);
}

.player.is-buffering .player-big-play {
  opacity: 1;
  border-color: transparent;
  background: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.player.is-buffering .player-big-play svg {
  display: none;
}

.player.is-buffering .player-big-play::after {
  content: "";
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.25);
  border-top-color: #fff;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.watch-status {
  position: absolute;
  left: 50%;
  top: 22px;
  z-index: 3;
  max-width: calc(100% - 40px);
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  transform: translateX(-50%);
}

.watch-status.is-error {
  top: 50%;
  border-radius: 12px;
  padding: 14px 18px;
  background: rgba(20, 17, 19, 0.92);
  line-height: 1.5;
  transform: translate(-50%, 60px);
}

.player-ui {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  padding: 90px 20px 14px;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.88) 0%, rgba(0, 0, 0, 0.5) 55%, transparent);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.player.is-idle .player-ui {
  opacity: 0;
  transform: translateY(6px);
}

.player.is-idle {
  cursor: none;
}

.player.has-overlay .player-ui {
  opacity: 0;
  pointer-events: none;
}

.player-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 17px;
  font-weight: 800;
}

.player-title a {
  color: #fff;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.player-episode {
  margin-top: 4px;
  color: #e8e2e6;
  font-size: 14px;
  font-weight: 600;
}

.player-progress {
  position: relative;
  height: 4px;
  margin-top: 16px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.22);
  transition: height 0.15s ease;
}

.player-progress:hover {
  height: 6px;
}

.player-progress-buffer,
.player-progress-fill {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  transform: scaleX(0);
  transform-origin: left center;
}

.player-progress-buffer {
  background: rgba(255, 255, 255, 0.28);
}

.player-progress-fill {
  background: var(--accent);
}

.player-progress input {
  position: absolute;
  left: 0;
  right: 0;
  top: -8px;
  width: 100%;
  height: calc(100% + 16px);
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.player-controls {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
}

.player-control {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: none;
  color: #fff;
}

.player-control:hover {
  background: rgba(255, 255, 255, 0.12);
}

.icon-pause,
.player.is-playing .icon-play {
  display: none;
}

.player.is-playing .icon-pause,
.icon-play {
  display: grid;
}

.volume-off,
.player.is-muted .volume-on {
  display: none;
}

.player.is-muted .volume-off {
  display: inline;
}

.player-time {
  margin-left: 4px;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.player-cc {
  position: relative;
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 4px 0 8px;
  border-radius: 8px;
  color: #fff;
}

.player-cc:hover {
  background: rgba(255, 255, 255, 0.12);
}

.player-cc > span {
  border: 1.5px solid #fff;
  border-radius: 4px;
  padding: 0 4px;
  font-size: 10.5px;
  font-weight: 800;
  line-height: 15px;
}

.player-cc select {
  max-width: 120px;
  border: 0;
  outline: 0;
  background: none;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.player-cc select option {
  color: #000;
}

.watch-overlay {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0 36px;
  text-align: center;
  background: rgba(8, 6, 7, 0.76);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.watch-overlay[hidden] {
  display: none;
}

.watch-overlay-icon {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(42, 171, 238, 0.16);
  color: var(--telegram);
  margin-bottom: 18px;
}

.watch-overlay h2 {
  font-size: 24px;
  font-weight: 900;
}

.watch-overlay p {
  margin: 10px 0 24px;
  color: #c9c3c8;
  font-size: 14.5px;
  line-height: 1.55;
}

.watch-overlay .button {
  width: 100%;
  max-width: 340px;
}

.watch-overlay-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 18px;
  margin-top: 16px;
}

.player-rail {
  position: absolute;
  left: calc(100% + 20px);
  bottom: 110px;
  z-index: 3;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.rail-button {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-width: 56px;
  padding: 0;
  border: 0;
  background: none;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
}

.rail-button:hover {
  color: #fff;
}

.rail-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  transition: background 0.15s ease, transform 0.15s ease;
}

.rail-button:hover .rail-icon {
  background: rgba(255, 255, 255, 0.22);
  transform: scale(1.05);
}

.rail-icon-telegram,
.rail-button:hover .rail-icon-telegram {
  background: var(--telegram);
}

.glass-button {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  color: #fff;
  transition: background 0.15s ease, opacity 0.15s ease;
}

.glass-button:hover {
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
}

.glass-button:disabled {
  opacity: 0.3;
  cursor: default;
}

.theater-nav {
  position: absolute;
  right: 32px;
  top: 50%;
  z-index: 3;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transform: translateY(-50%);
}

.theater-series {
  position: absolute;
  left: 32px;
  bottom: 40px;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 14px;
  width: 300px;
  padding: 12px;
  border-radius: 14px;
  background: rgba(20, 17, 19, 0.55);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #fff;
  transition: background 0.2s ease;
}

.theater-series:hover {
  color: #fff;
  background: rgba(30, 26, 29, 0.7);
}

.theater-series img {
  flex: none;
  width: 60px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 8px;
}

.theater-series strong {
  display: block;
  font-size: 14px;
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.theater-series small {
  display: block;
  color: #b8b2b7;
  font-size: 12px;
  line-height: 1.45;
}

.free-dots {
  display: flex;
  gap: 3px;
  margin-top: 8px;
}

.free-dots i {
  width: 22px;
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.2);
}

.free-dots i.is-seen {
  background: rgba(255, 122, 26, 0.5);
}

.free-dots i.is-active {
  background: var(--accent);
}

.theater-hint {
  position: absolute;
  left: 50%;
  bottom: 4px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: rgba(255, 255, 255, 0.5);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  transform: translateX(-50%);
  animation: hint 2.4s ease-in-out infinite;
}

.theater-hint:hover {
  color: #fff;
}

@keyframes hint {
  50% {
    transform: translate(-50%, 3px);
  }
}

.episode-drawer {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 6;
  display: flex;
  flex-direction: column;
  width: 400px;
  padding: calc(var(--header-h) + 8px) 24px 0;
  background: rgba(18, 15, 17, 0.86);
  -webkit-backdrop-filter: blur(24px);
  backdrop-filter: blur(24px);
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  transform: translateX(100%);
  transition: transform 0.25s ease;
}

.drawer-open .episode-drawer {
  transform: none;
}

.drawer-scrim {
  position: absolute;
  inset: 0;
  z-index: 5;
}

.drawer-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.drawer-head h2 {
  font-size: 18px;
  font-weight: 800;
}

.drawer-head p {
  margin-top: 4px;
  color: var(--faint);
  font-size: 13px;
}

.drawer-head .glass-button {
  width: 36px;
  height: 36px;
  flex: none;
}

.drawer-grid {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-content: start;
  gap: 8px;
  padding-bottom: 16px;
  scrollbar-width: thin;
}

.drawer-grid .ep {
  height: 54px;
}

.drawer-grid .ep-free {
  background: rgba(255, 255, 255, 0.06);
}

.drawer-grid .ep-free.is-active {
  background: var(--accent);
}

.drawer-grid .ep-telegram {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.06);
}

.drawer-foot {
  margin: 0 -24px;
  padding: 18px 24px 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.drawer-foot p {
  margin-bottom: 12px;
  color: #a9b4bd;
  font-size: 13px;
  line-height: 1.5;
}

/* Below the fold */

.page-watch {
  padding-top: 32px;
}

.watch-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 36px;
  padding-bottom: 28px;
  border-bottom: 1px solid #221e21;
}

.watch-head h1 {
  font-size: 40px;
  font-weight: 900;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.watch-head-actions {
  display: flex;
  gap: 12px;
  flex: none;
}

.page-watch .synopsis {
  max-width: 760px;
}

.page-watch .synopsis + .view-all {
  margin-top: 10px;
}

.panel-series-head {
  display: flex;
  gap: 14px;
  margin-bottom: 16px;
  color: var(--text);
}

.panel-series-head:hover {
  color: var(--text);
}

.panel-series-head img {
  flex: none;
  width: 84px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 10px;
}

.panel-series-head strong {
  display: block;
  font-size: 17px;
  line-height: 1.25;
  margin-bottom: 6px;
}

.panel-series-head small {
  color: var(--faint);
  font-size: 13px;
  line-height: 1.5;
}

.page-watch > section {
  margin-top: var(--section-gap);
}

/* ---------- Responsive ---------- */

@media (max-width: 1240px) {
  .theater-series {
    display: none;
  }

  .header-nav {
    gap: 20px;
  }

  .header-search {
    width: 240px;
  }
}

@media (max-width: 1080px) {
  :root {
    --page-inline: 24px;
  }

  .header-row {
    gap: 22px;
  }

  .header-search {
    display: none;
  }

  .icon-link {
    display: grid;
    margin-left: auto;
  }

  .rail {
    grid-auto-columns: calc((100% - 4 * 14px) / 4.6);
    gap: 14px;
  }

  .grid-genre,
  .grid-related {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .top-rail {
    grid-auto-flow: column;
    grid-template-columns: none;
    grid-auto-columns: calc((100% - 3 * 20px) / 3.4);
    overflow-x: auto;
    scrollbar-width: none;
  }

  .top-rail::-webkit-scrollbar {
    display: none;
  }

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

  .steps {
    grid-template-columns: 1fr;
  }

  .drama-layout {
    grid-template-columns: 1fr;
  }

  .drama-aside {
    position: static;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }

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

  .footer-about {
    grid-column: 1 / -1;
  }

  .hero-title {
    font-size: 44px;
  }

  .hero-poster {
    width: 240px;
  }

  .drama-cover {
    width: 240px;
  }

  .drama-head h1 {
    font-size: 42px;
  }

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

@media (max-width: 760px) {
  :root {
    --page-inline: 16px;
    --header-h: 56px;
    --section-gap: 40px;
  }

  body.has-tab-bar {
    padding-bottom: calc(var(--tab-h) + env(safe-area-inset-bottom));
  }

  .brand {
    font-size: 18px;
  }

  .brand img {
    width: 28px;
    height: 28px;
  }

  .header-nav,
  .label-wide {
    display: none;
  }

  .label-narrow {
    display: inline;
  }

  .header-row {
    gap: 10px;
  }

  .icon-link {
    width: 36px;
    height: 36px;
  }

  .lang-menu summary {
    padding: 0 6px;
  }

  .lang-menu summary svg:first-child {
    display: none;
  }

  .header-row > .button-small {
    height: 36px;
    padding: 0 12px;
    font-size: 13px;
  }

  .section-head h2,
  .drama-main h2,
  .page > section > h2 {
    font-size: 20px;
  }

  .rail {
    grid-auto-columns: 36%;
    gap: 10px;
    margin-inline: calc(-1 * var(--page-inline));
    padding-inline: var(--page-inline);
    scroll-padding-inline: var(--page-inline);
  }

  .grid {
    gap: 20px 10px;
  }

  .grid-genre,
  .grid-related {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .card-title {
    font-size: 13.5px;
    margin-top: 8px;
  }

  .card-meta {
    font-size: 12px;
  }

  .card .badge {
    top: 6px;
    left: 6px;
    height: 18px;
    padding: 0 5px;
    font-size: 9px;
  }

  .card-eps {
    right: 6px;
    bottom: 6px;
    font-size: 10.5px;
  }

  /* Home hero becomes a full-bleed poster. */
  .hero-kicker-row {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
  }

  .hero-slides {
    height: 540px;
  }

  .hero-bg {
    inset: 0;
    filter: none;
    opacity: 1;
    transform: none;
    background-position: center 18%;
  }

  .hero-slide::after {
    background:
      linear-gradient(0deg, var(--bg) 0%, rgba(12, 10, 11, 0.88) 30%, rgba(12, 10, 11, 0) 64%),
      linear-gradient(180deg, rgba(12, 10, 11, 0.7), transparent 22%);
  }

  .hero-inner {
    align-items: flex-end;
    padding: 0 var(--page-inline) 52px;
  }

  .hero-poster,
  .hero-thumbs {
    display: none;
  }

  .hero-title {
    font-size: 32px;
  }

  .hero-meta {
    margin-top: 10px;
    font-size: 13px;
  }

  .hero-synopsis {
    display: none;
  }

  .hero-actions {
    flex-wrap: nowrap;
    margin-top: 18px;
  }

  .hero-actions .button {
    height: 48px;
    padding: 0 18px;
    font-size: 15px;
  }

  .hero-actions .button:first-child {
    flex: 1;
  }

  .hero-actions .button-ghost {
    width: 48px;
    padding: 0;
    font-size: 0;
    gap: 0;
  }

  .hero-dots {
    left: 50%;
    bottom: 22px;
    transform: translateX(-50%);
  }

  .pill {
    height: 22px;
    font-size: 10.5px;
    padding: 0 8px;
  }

  .page-home > section {
    margin-top: 32px;
  }

  .home-chips .chips,
  .page-list > .chips {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    margin-inline: calc(-1 * var(--page-inline));
    padding-inline: var(--page-inline);
  }

  .chip {
    height: 34px;
    padding: 0 15px;
    font-size: 13px;
  }

  .top-rail {
    grid-auto-columns: 46%;
    gap: 4px;
    margin-inline: calc(-1 * var(--page-inline));
    padding-inline: var(--page-inline);
  }

  .top-number {
    font-size: 104px;
    -webkit-text-stroke-width: 2.5px;
  }

  .top-card img {
    width: 66%;
  }

  .genre-tiles {
    gap: 10px;
  }

  .genre-tile {
    height: 104px;
    padding: 14px;
  }

  .genre-tile img {
    width: 72px;
  }

  .genre-tile strong {
    font-size: 17px;
  }

  .steps li {
    padding: 18px;
  }

  /* List pages */
  .list-hero {
    padding: 24px 20px;
    border-radius: 16px;
  }

  .list-hero h1 {
    font-size: 28px;
  }

  .list-hero p {
    font-size: 14.5px;
  }

  .list-stats {
    gap: 22px;
  }

  .list-stats dd {
    font-size: 18px;
  }

  .list-hero-fan {
    display: none;
  }

  /* Drama page */
  .drama-hero {
    padding: 12px 0 28px;
  }

  .drama-hero .breadcrumb {
    font-size: 12.5px;
    margin-bottom: 14px;
  }

  .drama-hero-row {
    display: grid;
    grid-template-columns: 124px minmax(0, 1fr);
    gap: 0 14px;
    align-items: end;
  }

  .drama-head {
    display: contents;
  }

  .drama-cover {
    grid-row: 1 / span 4;
    width: 124px;
    border-radius: 12px;
    align-self: start;
  }

  .drama-head > .hero-pills,
  .drama-head > h1,
  .drama-head > .original-title,
  .drama-head > .drama-meta {
    grid-column: 2;
  }

  .drama-head > .hero-pills {
    margin-bottom: 8px;
    align-self: end;
  }

  .meta-wide {
    display: none;
  }

  .drama-head h1 {
    font-size: 23px;
    line-height: 1.15;
  }

  .drama-head .drama-meta {
    margin-top: 6px;
    font-size: 12.5px;
    gap: 6px;
  }

  .drama-head > .synopsis,
  .drama-head > .tags,
  .drama-head > .drama-actions,
  .drama-head > .note {
    grid-column: 1 / -1;
  }

  .drama-head .synopsis {
    margin-top: 16px;
    font-size: 14.5px;
  }

  .drama-head .tags {
    margin-top: 12px;
  }

  .tag {
    height: 26px;
    font-size: 12px;
    padding: 0 10px;
  }

  .drama-actions,
  .drama-head > .note {
    display: none;
  }

  .has-sticky-watch {
    padding-bottom: calc(76px + env(safe-area-inset-bottom));
  }

  .sticky-watch {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 30;
    display: flex;
    gap: 10px;
    padding: 10px 16px calc(12px + env(safe-area-inset-bottom));
    background: rgba(16, 13, 15, 0.95);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    border-top: 1px solid #221e21;
  }

  .sticky-watch .button:first-child {
    flex: 1;
    height: 48px;
    font-size: 15px;
  }

  .sticky-telegram {
    width: 48px;
    height: 48px;
    padding: 0;
  }

  .sticky-telegram .icon-telegram {
    color: var(--telegram);
  }

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

  .ep {
    height: 46px;
    font-size: 14px;
  }

  .panel {
    padding: 18px;
  }

  .ranked-item {
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 16px;
    padding: 14px;
  }

  .ranked-number {
    position: absolute;
    left: 6px;
    top: 4px;
    z-index: 1;
    font-size: 40px;
  }

  .ranked-body :is(h2, h3) {
    font-size: 17px;
  }

  .ranked-synopsis {
    font-size: 13.5px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .ranked-actions {
    gap: 12px;
  }

  .page-intro h1,
  .not-found h1 {
    font-size: 30px;
  }

  .search-intro h1 {
    font-size: 28px;
  }

  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px 20px;
  }

  .site-footer {
    padding-top: 40px;
  }

  .tab-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 30;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    height: calc(var(--tab-h) + env(safe-area-inset-bottom));
    padding: 8px 6px env(safe-area-inset-bottom);
    background: rgba(16, 13, 15, 0.94);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    border-top: 1px solid #221e21;
  }

  .tab-bar a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    color: var(--faint);
    font-size: 10.5px;
    font-weight: 600;
  }

  .tab-bar a[aria-current] {
    color: var(--accent);
  }

  .tab-app .icon-telegram {
    color: var(--telegram);
  }

  .toast {
    bottom: calc(var(--tab-h) + 24px);
  }

  /* Watch page: the phone screen is the player. */
  .theater {
    min-height: 520px;
  }

  .theater-stage,
  .theater.is-landscape .theater-stage {
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    aspect-ratio: auto;
    transform: none;
  }

  .player {
    border-radius: 0;
    box-shadow: none;
  }

  .player video {
    object-fit: cover;
  }

  /* A landscape episode keeps its whole frame, centred over the blurred backdrop. */
  .theater.is-landscape .player {
    background: transparent;
  }

  .theater.is-landscape .player video {
    object-fit: contain;
    background: transparent;
  }

  .theater.is-landscape .player-rail {
    bottom: 170px;
  }

  .player-ui {
    padding: 80px 16px calc(28px + env(safe-area-inset-bottom));
  }

  .player-info {
    padding-right: 72px;
  }

  .player-cc select {
    max-width: 92px;
  }

  .player-rail {
    left: auto;
    right: 10px;
    bottom: 170px;
    gap: 16px;
  }

  .rail-icon {
    width: 46px;
    height: 46px;
  }

  .theater-nav,
  .theater-hint {
    display: none;
  }

  .episode-drawer {
    top: auto;
    left: 0;
    width: auto;
    height: 72%;
    padding: 20px 16px 0;
    border-left: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px 20px 0 0;
    transform: translateY(100%);
  }

  .drawer-open .drawer-scrim {
    background: rgba(0, 0, 0, 0.5);
  }

  .drawer-foot {
    margin: 0 -16px;
    padding: 14px 16px calc(16px + env(safe-area-inset-bottom));
  }

  .drawer-grid .ep {
    height: 48px;
  }

  .watch-head {
    flex-direction: column;
    align-items: stretch;
    gap: 18px;
  }

  .watch-head h1 {
    font-size: 24px;
  }

  .watch-head-actions .button {
    flex: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }

  html {
    scroll-behavior: auto;
  }
}
