:root {
  color-scheme: light;
  --bg: #f0e2e6;
  --bg-soft: #f5eaed;
  --surface: #e8d4d9;
  --surface-raised: #f7edf0;
  --surface-deep: #dac1c7;
  --fg: #2d2023;
  --muted: #68545a;
  --line: #ceafb7;
  --line-strong: #b7909a;
  --brand: #a33c1f;
  --brand-dark: #792612;
  --brand-soft: #dba78f;
  --accent: #1747bf;
  --accent-soft: #aebce8;
  --on-brand: #fffaf8;
  --on-accent: #ffffff;
  --shadow: 0 16px 42px rgba(61, 31, 39, 0.14);
  --shadow-tight: 0 8px 22px rgba(61, 31, 39, 0.12);
  --glow: rgba(255, 255, 255, 0.78);
  --radius: 14px;
  --radius-sm: 10px;
  --gap: 14px;
  --pad: 24px;
  --max: 1200px;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-serif: "Songti SC", "STSong", "SimSun", "Noto Serif SC", serif;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #181316;
  --bg-soft: #21191d;
  --surface: #2b2025;
  --surface-raised: #34252b;
  --surface-deep: #402c33;
  --fg: #f2e8eb;
  --muted: #bca8af;
  --line: #5d434c;
  --line-strong: #80616b;
  --brand: #ef8b6b;
  --brand-dark: #ffd0c1;
  --brand-soft: #793825;
  --accent: #91a8ff;
  --accent-soft: #2c3973;
  --on-brand: #261512;
  --on-accent: #11172e;
  --shadow: 0 18px 52px rgba(0, 0, 0, 0.38);
  --shadow-tight: 0 9px 26px rgba(0, 0, 0, 0.3);
  --glow: rgba(255, 230, 235, 0.05);
}

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

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--fg);
  background: var(--bg);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.75;
  letter-spacing: 0.015em;
  transition: color 0.25s ease, background-color 0.25s ease;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  background-image:
    linear-gradient(90deg, transparent 49.7%, color-mix(in srgb, var(--line) 22%, transparent) 50%, transparent 50.3%),
    linear-gradient(color-mix(in srgb, var(--line) 18%, transparent) 1px, transparent 1px);
  background-size: 72px 100%, 100% 72px;
  opacity: 0.22;
}

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

svg {
  width: 1.25em;
  height: 1.25em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

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

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

button,
select {
  cursor: pointer;
}

button {
  border: 0;
  background: none;
}

h1,
h2,
h3,
p,
blockquote,
figure {
  margin: 0;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

::selection {
  color: var(--on-brand);
  background: var(--brand);
}

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

.sr-only {
  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;
}

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 1000;
  padding: 8px 14px;
  color: var(--on-brand);
  background: var(--brand);
  border-radius: 8px;
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
}

.container {
  width: min(calc(100% - 28px), var(--max));
  margin-inline: auto;
}

.kicker {
  display: block;
  margin-bottom: 3px;
  color: var(--brand);
  font-size: 9px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0.22em;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 42px;
  padding: 10px 18px;
  border: 1.5px solid transparent;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.2;
  text-align: center;
  transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.button svg {
  width: 17px;
  height: 17px;
}

.button:hover {
  transform: translateY(-1px);
}

.button-primary {
  color: var(--on-brand);
  background: var(--brand);
  border-color: var(--brand);
}

.button-primary:hover {
  background: var(--brand-dark);
  border-color: var(--brand-dark);
}

.button-ghost {
  color: var(--brand);
  background: transparent;
  border-color: var(--brand);
}

.button-ghost:hover,
.button-ghost.is-active {
  color: var(--on-brand);
  background: var(--brand);
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--brand);
  font-weight: 650;
}

.text-link svg {
  transition: transform 0.2s ease;
}

.text-link:hover svg {
  transform: translateX(3px);
}

/* Header */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: blur(18px) saturate(1.15);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  gap: 24px;
}

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

.brand-mark {
  display: grid;
  width: 37px;
  height: 37px;
  place-items: center;
  color: var(--brand);
  border: 1.5px solid var(--brand);
  border-radius: 50%;
  background: color-mix(in srgb, var(--surface) 80%, transparent);
}

.brand-mark svg {
  width: 26px;
  height: 26px;
  stroke-width: 1.35;
}

.brand-name {
  display: block;
  color: var(--fg);
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: 0.08em;
}

.brand-sub {
  display: block;
  margin-top: 1px;
  color: var(--muted);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.2em;
  line-height: 1.3;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.nav-link {
  position: relative;
  padding: 20px 13px;
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.nav-link::after {
  position: absolute;
  right: 13px;
  bottom: 14px;
  left: 13px;
  height: 1.5px;
  content: "";
  background: var(--brand);
  transform: scaleX(0);
  transition: transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--fg);
}

.nav-link:hover::after,
.nav-link.is-active::after {
  transform: scaleX(1);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.icon-button,
.menu-button {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: var(--muted);
  border: 1px solid transparent;
  border-radius: 50%;
  transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.icon-button:hover,
.menu-button:hover {
  color: var(--fg);
  background: var(--surface);
  border-color: var(--line);
}

.icon-button svg {
  width: 19px;
  height: 19px;
}

.theme-icon-moon {
  display: none;
}

[data-theme="dark"] .theme-icon-sun {
  display: none;
}

[data-theme="dark"] .theme-icon-moon {
  display: block;
}

.menu-button {
  display: none;
  align-content: center;
  gap: 4px;
}

.menu-button span:not(.sr-only) {
  width: 17px;
  height: 1.5px;
  background: currentColor;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.menu-button[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(5.5px) rotate(45deg);
}

.menu-button[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.menu-button[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-5.5px) rotate(-45deg);
}

.search-drawer {
  border-top: 1px solid var(--line);
  background: var(--bg);
}

.search-form {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 68px;
}

.search-form > svg {
  width: 20px;
  height: 20px;
  color: var(--brand);
}

.search-form input {
  flex: 1;
  min-width: 0;
  padding: 10px 0;
  color: var(--fg);
  background: transparent;
  border: 0;
  outline: 0;
  font-size: 16px;
}

.search-form input::placeholder {
  color: color-mix(in srgb, var(--muted) 80%, transparent);
}

.search-form kbd {
  padding: 2px 6px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface);
  font-size: 9px;
}

.mobile-menu {
  padding: 8px 14px 16px;
  border-top: 1px solid var(--line);
  background: var(--bg);
}

.mobile-menu a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 4px;
  color: var(--muted);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 60%, transparent);
}

/* Page shell */
.site-shell {
  flex: 1;
  padding-bottom: 48px;
  background-image: radial-gradient(circle, color-mix(in srgb, var(--line) 65%, transparent) 0.8px, transparent 0.9px);
  background-size: 42px 42px;
  background-position: center top;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 10px 0 7px;
  color: var(--muted);
  font-size: 11px;
}

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

.breadcrumb [aria-hidden="true"] {
  opacity: 0.45;
}

.section-rail {
  display: flex;
  gap: 6px;
  padding: 4px 0 11px;
  overflow-x: auto;
  scrollbar-width: none;
}

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

.section-rail a {
  flex: 0 0 auto;
  padding: 5px 13px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 9px;
  background: color-mix(in srgb, var(--surface) 74%, transparent);
  font-size: 11px;
  transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.section-rail a:hover,
.section-rail a.is-active {
  color: var(--on-brand);
  border-color: var(--brand);
  background: var(--brand);
}

/* Hero */
.hero {
  padding: 2px 0 16px;
}

.hero-card {
  position: relative;
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr) 74px;
  gap: 24px;
  min-height: 286px;
  padding: 18px;
  overflow: hidden;
  border: 1.5px dashed var(--accent);
  border-radius: var(--radius);
  background:
    linear-gradient(105deg, color-mix(in srgb, var(--surface-raised) 94%, transparent), color-mix(in srgb, var(--surface) 89%, transparent));
  box-shadow: var(--shadow);
}

.hero-card::before {
  position: absolute;
  top: -120px;
  right: 70px;
  width: 280px;
  height: 280px;
  content: "";
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
  border-radius: 50%;
  box-shadow:
    0 0 0 28px color-mix(in srgb, var(--accent) 4%, transparent),
    0 0 0 70px color-mix(in srgb, var(--accent) 3%, transparent);
}

.hero-poster {
  position: relative;
  align-self: stretch;
  min-height: 250px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
  border-radius: 11px;
  box-shadow: var(--shadow-tight);
}

.hero-poster::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(180deg, transparent 48%, rgba(19, 11, 13, 0.65));
}

.hero-poster img {
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.hero-poster:hover img {
  transform: scale(1.035);
}

.hero-poster-badge,
.hero-poster-index {
  position: absolute;
  z-index: 1;
  color: #fff8f6;
}

.hero-poster-badge {
  top: 11px;
  left: 11px;
  padding: 3px 9px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 999px;
  background: rgba(26, 16, 20, 0.52);
  backdrop-filter: blur(8px);
  font-size: 9px;
  letter-spacing: 0.12em;
}

.hero-poster-index {
  right: 11px;
  bottom: 10px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.18em;
}

.hero-copy {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  padding: 4px 0;
}

.hero-label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  color: var(--brand);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.pulse-dot {
  position: relative;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand);
}

.pulse-dot::after {
  position: absolute;
  inset: -4px;
  content: "";
  border: 1px solid var(--brand);
  border-radius: 50%;
  animation: pulse 2.2s ease-out infinite;
}

@keyframes pulse {
  0% {
    opacity: 0.85;
    transform: scale(0.65);
  }
  70%,
  100% {
    opacity: 0;
    transform: scale(1.5);
  }
}

.hero h1 {
  max-width: 730px;
  font-family: var(--font-serif);
  font-size: clamp(38px, 4.5vw, 58px);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: 0.09em;
}

.hero-quote {
  margin-top: 10px;
  color: var(--accent);
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: 650;
}

.hero-summary {
  display: -webkit-box;
  max-width: 730px;
  margin-top: 8px;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.85;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 13px;
}

.hero-meta span {
  padding: 3px 8px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 6px;
  background: color-mix(in srgb, var(--surface-raised) 58%, transparent);
  font-size: 9px;
}

.hero-meta span:nth-child(3) {
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 40%, var(--line));
}

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

.hero-score {
  margin-left: 5px;
  color: var(--muted);
  font-size: 10px;
}

.hero-score b {
  margin-right: 2px;
  color: var(--brand);
  font-family: var(--font-serif);
  font-size: 23px;
  line-height: 1;
}

.hero-stamp {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  align-self: center;
  justify-content: center;
  flex-direction: column;
  gap: 8px;
  height: 100%;
  min-height: 240px;
  padding: 8px;
  color: var(--brand);
  border-left: 1px solid color-mix(in srgb, var(--line) 72%, transparent);
  font-size: 8px;
  letter-spacing: 0.16em;
  writing-mode: vertical-rl;
}

.hero-stamp b {
  display: grid;
  width: 39px;
  height: 39px;
  place-items: center;
  border: 1.5px solid var(--brand);
  border-radius: 50%;
  font-family: var(--font-serif);
  font-size: 21px;
  letter-spacing: 0;
  writing-mode: horizontal-tb;
}

/* Metrics */
.metric-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--gap);
  padding: 16px 0 12px;
}

.metric-card {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 7px;
  min-height: 58px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: color-mix(in srgb, var(--surface) 70%, transparent);
  box-shadow: 0 3px 12px rgba(70, 41, 49, 0.05);
}

.metric-card strong {
  color: var(--accent);
  font-family: var(--font-serif);
  font-size: 21px;
  line-height: 1.1;
}

.metric-card span {
  color: var(--muted);
  font-size: 10px;
  white-space: nowrap;
}

.category-rail {
  display: flex;
  gap: 6px;
  padding: 4px 0 17px;
  overflow-x: auto;
  scrollbar-width: none;
}

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

.category-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  padding: 6px 13px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface) 68%, transparent);
  font-size: 11px;
  transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.category-chip small {
  color: color-mix(in srgb, currentColor 62%, transparent);
  font-size: 8px;
  letter-spacing: 0.08em;
}

.category-chip:hover,
.category-chip.is-active {
  color: var(--on-accent);
  border-color: var(--accent);
  background: var(--accent);
}

/* Main three-column layout */
.page-layout {
  display: grid;
  grid-template-columns: 196px minmax(0, 1fr) 238px;
  gap: 17px;
  align-items: start;
}

.sidebar {
  display: grid;
  gap: var(--gap);
}

.sidebar-left,
.sidebar-right {
  position: sticky;
  top: 92px;
}

.side-panel {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: color-mix(in srgb, var(--surface) 84%, transparent);
}

.side-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.side-heading h2 {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
}

.side-count {
  display: grid;
  min-width: 28px;
  height: 28px;
  padding-inline: 6px;
  place-items: center;
  color: var(--on-accent);
  border-radius: 50%;
  background: var(--accent);
  font-size: 9px;
  font-weight: 700;
}

.filter-list {
  display: grid;
  gap: 2px;
  padding-top: 8px;
}

.filter-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 34px;
  padding: 5px 8px;
  color: var(--muted);
  border-radius: 6px;
  font-size: 11px;
  text-align: left;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.filter-button span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.filter-button i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--line-strong);
}

.filter-button small {
  color: color-mix(in srgb, var(--muted) 75%, transparent);
  font-size: 9px;
}

.filter-button:hover,
.filter-button.is-active {
  color: var(--brand);
  background: color-mix(in srgb, var(--surface-raised) 70%, transparent);
}

.filter-button.is-active i {
  background: var(--brand);
}

.schedule-list {
  display: grid;
  padding-top: 7px;
}

.schedule-item {
  display: grid;
  grid-template-columns: 36px 48px 1fr;
  align-items: center;
  gap: 5px;
  min-height: 35px;
  color: var(--muted);
  border-bottom: 1px dashed color-mix(in srgb, var(--line) 70%, transparent);
  font-size: 9px;
}

.schedule-item:last-child {
  border-bottom: 0;
}

.schedule-item b {
  color: var(--fg);
  font-size: 9px;
}

.schedule-item em {
  overflow: hidden;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.schedule-item.is-today span,
.schedule-item.is-today b {
  color: var(--brand);
}

.side-note {
  position: relative;
  padding: 17px 15px 14px;
  overflow: hidden;
  border: 1px dashed var(--line);
  border-radius: 10px;
  background: color-mix(in srgb, var(--surface-raised) 64%, transparent);
}

.note-symbol {
  position: absolute;
  top: 1px;
  right: 10px;
  color: var(--brand);
  font-family: var(--font-serif);
  font-size: 52px;
  line-height: 1;
  opacity: 0.18;
}

.side-note p {
  position: relative;
  color: var(--fg);
  font-family: var(--font-serif);
  font-size: 13px;
  line-height: 1.85;
}

.note-from {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 8px;
  letter-spacing: 0.1em;
}

/* Catalog */
.catalog {
  min-width: 0;
}

.catalog-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  padding: 4px 0 11px;
  border-bottom: 1px solid var(--line);
}

.catalog-heading h2,
.section-title-row h2 {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 800;
  line-height: 1.35;
  letter-spacing: 0.03em;
}

.catalog-heading p {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
}

.catalog-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.result-count {
  color: var(--muted);
  font-size: 9px;
  white-space: nowrap;
}

.result-count b {
  color: var(--brand);
  font-family: var(--font-serif);
  font-size: 16px;
}

.select-wrap {
  position: relative;
}

.select-wrap::after {
  position: absolute;
  top: 50%;
  right: 8px;
  width: 5px;
  height: 5px;
  pointer-events: none;
  content: "";
  border-right: 1px solid var(--muted);
  border-bottom: 1px solid var(--muted);
  transform: translateY(-70%) rotate(45deg);
}

.select-wrap select {
  min-height: 32px;
  padding: 5px 24px 5px 9px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  outline: 0;
  appearance: none;
  font-size: 9px;
}

.active-filter {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
  padding: 7px 10px;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: 7px;
  background: color-mix(in srgb, var(--surface-raised) 58%, transparent);
  font-size: 9px;
}

.active-filter button {
  color: var(--brand);
  font-size: 9px;
}

.drama-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding-top: 13px;
}

.drama-card {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border: 1.5px dashed var(--line);
  border-radius: 10px;
  background: color-mix(in srgb, var(--surface-raised) 72%, transparent);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.drama-card:hover {
  z-index: 2;
  border-color: var(--brand-soft);
  box-shadow: var(--shadow-tight);
  transform: translateY(-4px);
}

.drama-cover-link {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
}

.drama-cover-link img {
  height: 100%;
  object-fit: cover;
  transition: transform 0.55s cubic-bezier(0.2, 0.7, 0.2, 1);
}

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

.drama-cover-link::after {
  position: absolute;
  inset: 32% 0 0;
  content: "";
  background: linear-gradient(transparent, rgba(23, 14, 17, 0.86));
}

.drama-number {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 1;
  display: grid;
  width: 25px;
  height: 25px;
  place-items: center;
  color: var(--on-accent);
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 92%, transparent);
  font-family: var(--font-serif);
  font-size: 9px;
  font-weight: 700;
  backdrop-filter: blur(8px);
}

.drama-score {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 1;
  padding: 2px 6px;
  color: #fff8f6;
  border: 1px solid rgba(255, 255, 255, 0.29);
  border-radius: 999px;
  background: rgba(26, 15, 19, 0.54);
  backdrop-filter: blur(8px);
  font-size: 8px;
  font-weight: 700;
}

.drama-cover-copy {
  position: absolute;
  right: 9px;
  bottom: 9px;
  left: 9px;
  z-index: 1;
  color: #fffaf8;
}

.drama-cover-copy small {
  display: block;
  margin-bottom: 2px;
  font-size: 8px;
  letter-spacing: 0.08em;
  opacity: 0.74;
}

.drama-cover-copy h3 {
  display: -webkit-box;
  overflow: hidden;
  font-family: var(--font-serif);
  font-size: 17px;
  font-weight: 750;
  line-height: 1.35;
  letter-spacing: 0.03em;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.drama-card-body {
  min-height: 70px;
  padding: 9px 10px 10px;
}

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

.drama-tags span {
  padding: 1px 5px;
  color: var(--muted);
  border: 1px solid color-mix(in srgb, var(--line) 85%, transparent);
  border-radius: 4px;
  background: color-mix(in srgb, var(--surface) 74%, transparent);
  font-size: 7px;
  line-height: 1.7;
}

.drama-tags span:first-child {
  color: var(--brand);
  border-color: color-mix(in srgb, var(--brand) 30%, var(--line));
}

.drama-excerpt {
  display: -webkit-box;
  margin-top: 6px;
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.65;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.follow-button {
  position: absolute;
  right: 8px;
  bottom: 73px;
  z-index: 3;
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.36);
  border-radius: 50%;
  background: rgba(30, 18, 22, 0.45);
  opacity: 0;
  backdrop-filter: blur(8px);
  transform: translateY(4px);
  transition: opacity 0.2s ease, transform 0.2s ease, background-color 0.2s ease;
}

.follow-button svg {
  width: 14px;
  height: 14px;
}

.drama-card:hover .follow-button,
.follow-button:focus-visible,
.follow-button.is-active {
  opacity: 1;
  transform: translateY(0);
}

.follow-button.is-active {
  color: #fff;
  background: var(--brand);
}

.follow-button.is-active svg {
  fill: currentColor;
}

.empty-state {
  padding: 56px 20px;
  border: 1.5px dashed var(--line);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--surface) 68%, transparent);
  text-align: center;
}

.empty-glyph {
  color: var(--line-strong);
  font-family: var(--font-serif);
  font-size: 54px;
  line-height: 1;
}

.empty-state h3 {
  margin-top: 8px;
  font-family: var(--font-serif);
  font-size: 20px;
}

.empty-state p {
  margin: 4px 0 14px;
  color: var(--muted);
  font-size: 11px;
}

/* Editor feature */
.editor-pick,
.topic-band,
.faq-section,
.guide-section,
.update-section {
  margin-top: 28px;
}

.section-title-row {
  display: flex;
  align-items: baseline;
  gap: 11px;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.section-title-row .kicker {
  margin: 0;
}

.section-title-row h2 {
  font-size: 18px;
}

.section-title-center {
  justify-content: center;
  border-bottom: 0;
}

.editor-feature {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  overflow: hidden;
  border: 1.5px dashed var(--accent);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--surface-raised) 76%, transparent);
}

.editor-image {
  position: relative;
  min-height: 230px;
  overflow: hidden;
}

.editor-image img {
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s ease;
}

.editor-image:hover img {
  transform: scale(1.04);
}

.editor-image::after {
  position: absolute;
  inset: 50% 0 0;
  content: "";
  background: linear-gradient(transparent, rgba(22, 13, 17, 0.76));
}

.editor-image span {
  position: absolute;
  right: 9px;
  bottom: 9px;
  z-index: 1;
  color: #fff;
  font-size: 8px;
  letter-spacing: 0.1em;
}

.editor-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 20px;
}

.editor-number {
  color: var(--brand);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.editor-copy h3 {
  margin: 5px 0 7px;
  font-family: var(--font-serif);
  font-size: 26px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.editor-copy > p {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.9;
}

.editor-quote {
  margin: 11px 0;
  padding: 7px 11px;
  color: var(--fg);
  border-left: 2px solid var(--accent);
  background: color-mix(in srgb, var(--surface) 72%, transparent);
  font-family: var(--font-serif);
  font-size: 11px;
}

.editor-copy .text-link {
  align-self: flex-start;
  font-size: 10px;
}

/* Topic collection */
.topic-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr 0.85fr;
  gap: 10px;
}

.topic-card {
  position: relative;
  min-height: 205px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  background: #24191d;
}

.topic-card img {
  position: absolute;
  inset: 0;
  height: 100%;
  object-fit: cover;
  opacity: 0.57;
  filter: saturate(0.78);
  transition: transform 0.7s ease, opacity 0.3s ease;
}

.topic-card:hover img {
  opacity: 0.7;
  transform: scale(1.04);
}

.topic-card::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(180deg, rgba(20, 12, 16, 0.06), rgba(20, 12, 16, 0.91));
}

.topic-card > div {
  position: absolute;
  right: 14px;
  bottom: 13px;
  left: 14px;
  z-index: 1;
  color: #fff8f5;
}

.topic-card span {
  color: rgba(255, 248, 245, 0.68);
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.topic-card h3 {
  margin: 4px 0;
  font-family: var(--font-serif);
  font-size: 20px;
}

.topic-card p {
  color: rgba(255, 248, 245, 0.74);
  font-size: 9px;
  line-height: 1.6;
}

.topic-card-warm img {
  filter: sepia(0.22) saturate(0.92);
}

/* FAQ */
.faq-list {
  display: grid;
  gap: 7px;
}

.faq-item {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface) 74%, transparent);
}

.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 43px;
  padding: 9px 12px;
  font-size: 11px;
  font-weight: 650;
  list-style: none;
  cursor: pointer;
}

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

.faq-item summary::after {
  display: grid;
  width: 19px;
  height: 19px;
  flex: 0 0 auto;
  place-items: center;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 50%;
  content: "+";
  font-family: var(--font-serif);
  font-size: 14px;
  font-weight: 400;
}

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

.faq-item p {
  padding: 0 12px 12px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.85;
}

/* About */
.guide-card {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 17px;
  align-items: center;
  padding: 18px;
  border: 1.5px dashed var(--line);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--surface-raised) 70%, transparent);
}

.guide-mark {
  display: grid;
  width: 72px;
  height: 72px;
  place-items: center;
  color: var(--brand);
  border: 1px solid var(--brand);
  border-radius: 50%;
  font-family: var(--font-serif);
  font-size: 38px;
}

.guide-body p {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.95;
}

.guide-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 11px;
  color: var(--muted);
  font-size: 9px;
}

.guide-facts b {
  margin-right: 2px;
  color: var(--brand);
  font-family: var(--font-serif);
  font-size: 15px;
}

/* Updates */
.update-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.update-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface) 62%, transparent);
}

.update-date {
  display: grid;
  width: 40px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  color: var(--on-accent);
  border-radius: 6px;
  background: var(--accent);
  font-size: 8px;
  font-weight: 700;
}

.update-copy {
  min-width: 0;
}

.update-copy span {
  display: block;
  color: var(--brand);
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.update-copy p {
  overflow: hidden;
  color: var(--fg);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Right sidebar */
.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 6px;
  color: var(--brand);
  border: 1px solid color-mix(in srgb, var(--brand) 30%, var(--line));
  border-radius: 999px;
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.live-pill i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--brand);
  animation: blink 1.8s infinite;
}

@keyframes blink {
  50% {
    opacity: 0.3;
  }
}

.rank-list {
  display: grid;
  padding-top: 6px;
}

.rank-item {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  min-height: 37px;
  border-bottom: 1px dashed color-mix(in srgb, var(--line) 72%, transparent);
}

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

.rank-number {
  display: grid;
  width: 21px;
  height: 21px;
  place-items: center;
  color: var(--muted);
  border-radius: 50%;
  background: color-mix(in srgb, var(--surface-raised) 68%, transparent);
  font-family: var(--font-serif);
  font-size: 9px;
}

.rank-item:nth-child(-n + 3) .rank-number {
  color: var(--on-accent);
  background: var(--accent);
}

.rank-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 7px;
  min-width: 0;
}

.rank-link strong {
  overflow: hidden;
  font-size: 10px;
  font-weight: 550;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-link span {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 7px;
}

.rank-link:hover strong {
  color: var(--brand);
}

.rank-more {
  margin-top: 8px;
  font-size: 9px;
}

.mini-button {
  color: var(--muted);
  font-size: 8px;
}

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

.mini-watchlist {
  display: grid;
  gap: 6px;
  padding-top: 8px;
}

.mini-empty {
  padding: 10px 0;
  color: var(--muted);
  font-size: 9px;
  text-align: center;
}

.mini-drama {
  display: grid;
  grid-template-columns: 34px 1fr;
  align-items: center;
  gap: 7px;
}

.mini-drama img {
  width: 34px;
  height: 44px;
  object-fit: cover;
  border-radius: 4px;
}

.mini-drama strong {
  display: block;
  overflow: hidden;
  font-size: 9px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-drama span {
  display: block;
  color: var(--muted);
  font-size: 7px;
}

.quote-card {
  position: relative;
  overflow: hidden;
}

.quote-card::after {
  position: absolute;
  right: -20px;
  bottom: -50px;
  width: 95px;
  height: 95px;
  content: "";
  border: 1px solid var(--accent);
  border-radius: 50%;
  opacity: 0.18;
}

.quote-card-num {
  position: absolute;
  top: 8px;
  right: 11px;
  color: var(--brand);
  font-family: var(--font-serif);
  font-size: 33px;
  opacity: 0.25;
}

.quote-card blockquote {
  position: relative;
  z-index: 1;
  margin-top: 9px;
  font-family: var(--font-serif);
  font-size: 15px;
  font-weight: 650;
  line-height: 1.8;
}

.quote-card p {
  margin-top: 7px;
  color: var(--muted);
  font-size: 8px;
}

.side-cta {
  position: relative;
  min-height: 131px;
  padding: 17px 15px;
  overflow: hidden;
  color: #fff8f5;
  border-radius: 10px;
  background:
    linear-gradient(120deg, rgba(24, 14, 18, 0.48), rgba(24, 14, 18, 0.8)),
    url("../assets/images/hero-yimai.webp") 65% center / cover;
  box-shadow: var(--shadow-tight);
}

.side-cta .kicker {
  color: #f3bda9;
}

.side-cta strong {
  display: block;
  margin-top: 18px;
  font-family: var(--font-serif);
  font-size: 21px;
  line-height: 1.45;
  letter-spacing: 0.06em;
}

.side-cta-arrow {
  position: absolute;
  right: 14px;
  bottom: 11px;
  font-size: 18px;
  transition: transform 0.2s ease;
}

.side-cta:hover .side-cta-arrow {
  transform: translate(2px, -2px);
}

/* Footer */
.footer {
  border-top: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 72%, var(--bg));
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.1fr 1fr auto;
  align-items: end;
  gap: 30px;
  padding: 28px 0 24px;
}

.footer-brand p {
  margin-top: 9px;
  color: var(--muted);
  font-size: 9px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 17px;
  color: var(--muted);
  font-size: 9px;
}

.footer-links a:hover {
  color: var(--brand);
}

.footer-meta {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 8px;
  text-align: right;
}

/* Mobile dock and toast */
.mobile-dock {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 90;
  display: none;
  grid-template-columns: repeat(4, 1fr);
  padding: 7px 8px calc(7px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  box-shadow: 0 -8px 22px rgba(60, 30, 38, 0.08);
  backdrop-filter: blur(16px);
}

.mobile-dock a,
.mobile-dock button {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 2px;
  min-height: 43px;
  color: var(--muted);
  font-size: 8px;
}

.mobile-dock svg {
  width: 19px;
  height: 19px;
}

.mobile-dock a.is-active {
  color: var(--brand);
}

.dock-search {
  display: grid;
  width: 42px;
  height: 29px;
  place-items: center;
  color: var(--on-accent);
  border-radius: 999px;
  background: var(--accent);
  transform: translateY(-5px);
}

.dock-badge {
  position: absolute;
  top: -1px;
  left: calc(50% + 7px);
  display: none;
  min-width: 14px;
  height: 14px;
  padding: 0 3px;
  place-items: center;
  color: var(--on-accent);
  border-radius: 999px;
  background: var(--accent);
  font-size: 7px;
}

.dock-badge.is-visible {
  display: grid;
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 24px;
  z-index: 200;
  padding: 10px 15px;
  color: var(--on-brand);
  border-radius: 8px;
  background: var(--brand);
  box-shadow: var(--shadow-tight);
  font-size: 11px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Detail page */
.detail-shell {
  padding: 18px 0 54px;
  background-image: radial-gradient(circle, color-mix(in srgb, var(--line) 65%, transparent) 0.8px, transparent 0.9px);
  background-size: 42px 42px;
}

.detail-breadcrumb {
  padding-top: 0;
}

.detail-hero {
  position: relative;
  display: grid;
  grid-template-columns: 242px minmax(0, 1fr);
  gap: 30px;
  padding: 22px;
  overflow: hidden;
  border: 1.5px dashed var(--accent);
  border-radius: var(--radius);
  background:
    linear-gradient(105deg, color-mix(in srgb, var(--surface-raised) 94%, transparent), color-mix(in srgb, var(--surface) 88%, transparent));
  box-shadow: var(--shadow);
}

.detail-hero::after {
  position: absolute;
  top: -160px;
  right: 7%;
  width: 380px;
  height: 380px;
  content: "";
  border: 1px solid color-mix(in srgb, var(--accent) 24%, transparent);
  border-radius: 50%;
  box-shadow:
    0 0 0 32px color-mix(in srgb, var(--accent) 4%, transparent),
    0 0 0 82px color-mix(in srgb, var(--accent) 3%, transparent);
}

.detail-poster {
  position: relative;
  z-index: 1;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 11px;
  box-shadow: var(--shadow-tight);
}

.detail-poster img {
  aspect-ratio: 3 / 4;
  height: 100%;
  object-fit: cover;
}

.detail-poster span {
  position: absolute;
  right: 9px;
  bottom: 9px;
  padding: 3px 7px;
  color: #fff;
  border-radius: 4px;
  background: rgba(24, 14, 18, 0.55);
  font-size: 8px;
  backdrop-filter: blur(8px);
}

.detail-copy {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.detail-copy h1 {
  font-family: var(--font-serif);
  font-size: clamp(39px, 5vw, 62px);
  font-weight: 800;
  line-height: 1.16;
  letter-spacing: 0.08em;
}

.detail-subtitle {
  max-width: 760px;
  margin-top: 9px;
  color: var(--accent);
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: 650;
}

.detail-synopsis {
  display: -webkit-box;
  max-width: 760px;
  margin-top: 10px;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.95;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.detail-tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 13px;
}

.detail-tag-row span {
  padding: 3px 8px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 5px;
  background: color-mix(in srgb, var(--surface-raised) 55%, transparent);
  font-size: 8px;
}

.detail-meta-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 15px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 9px;
}

.detail-meta-row strong {
  color: var(--brand);
  font-family: var(--font-serif);
  font-size: 24px;
  line-height: 1;
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 17px;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 250px;
  gap: 17px;
  margin-top: 17px;
  align-items: start;
}

.detail-main,
.detail-side {
  display: grid;
  gap: 16px;
}

.cinema-panel {
  position: relative;
  padding: 14px;
  overflow: hidden;
  border: 1.5px dashed var(--line);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--surface) 74%, transparent);
}

.cinema-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.cinema-head h2 {
  font-family: var(--font-serif);
  font-size: 18px;
}

.episode-now {
  color: var(--muted);
  font-size: 9px;
}

.cinema-screen {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 9px;
  background: #130c0f;
}

.cinema-screen img {
  height: 100%;
  object-fit: cover;
  opacity: 0.73;
  transform: scale(1.02);
  transition: opacity 0.3s ease, transform 5s linear;
}

.cinema-screen.is-playing img {
  opacity: 0.58;
  transform: scale(1.08);
}

.cinema-screen::after {
  position: absolute;
  inset: 0;
  content: "";
  background:
    linear-gradient(180deg, rgba(13, 8, 10, 0.06), rgba(13, 8, 10, 0.72)),
    linear-gradient(90deg, rgba(13, 8, 10, 0.32), transparent 30%, transparent 70%, rgba(13, 8, 10, 0.32));
}

.cinema-play {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 2;
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.54);
  border-radius: 50%;
  background: rgba(26, 16, 20, 0.38);
  backdrop-filter: blur(10px);
  transform: translate(-50%, -50%);
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.cinema-play:hover {
  background: var(--brand);
  transform: translate(-50%, -50%) scale(1.04);
}

.cinema-play svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
  stroke: none;
  margin-left: 2px;
}

.cinema-caption {
  position: absolute;
  right: 6%;
  bottom: 13%;
  left: 6%;
  z-index: 2;
  color: #fff;
  font-family: var(--font-serif);
  font-size: clamp(13px, 2vw, 20px);
  text-align: center;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.7);
}

.cinema-progress {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 3;
  height: 3px;
  background: rgba(255, 255, 255, 0.2);
}

.cinema-progress span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--brand);
}

.cinema-screen.is-playing .cinema-progress span {
  animation: preview-progress 14s linear forwards;
}

@keyframes preview-progress {
  to {
    width: 100%;
  }
}

.cinema-note {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 8px;
}

.episode-panel,
.character-panel,
.story-panel,
.detail-side .side-panel,
.related-panel {
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: color-mix(in srgb, var(--surface) 78%, transparent);
}

.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 9px;
  border-bottom: 1px solid var(--line);
}

.panel-heading h2 {
  font-family: var(--font-serif);
  font-size: 17px;
}

.panel-heading span {
  color: var(--muted);
  font-size: 8px;
}

.episode-grid {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 6px;
  padding-top: 11px;
}

.episode-button {
  min-height: 34px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 6px;
  background: color-mix(in srgb, var(--surface-raised) 70%, transparent);
  font-size: 9px;
  transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.episode-button:hover,
.episode-button.is-active {
  color: var(--on-accent);
  border-color: var(--accent);
  background: var(--accent);
}

.episode-button.is-locked {
  opacity: 0.38;
  cursor: not-allowed;
}

.character-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  padding-top: 11px;
}

.character-card {
  padding: 11px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface-raised) 56%, transparent);
}

.character-card span {
  color: var(--brand);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.character-card h3 {
  margin: 3px 0;
  font-family: var(--font-serif);
  font-size: 18px;
}

.character-card p {
  color: var(--muted);
  font-size: 9px;
  line-height: 1.7;
}

.story-panel p {
  padding-top: 10px;
  color: var(--muted);
  font-size: 10px;
  line-height: 2;
}

.detail-score-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
  padding: 12px;
  border: 1px dashed var(--accent);
  border-radius: 8px;
  background: color-mix(in srgb, var(--accent-soft) 13%, transparent);
}

.detail-score-box strong {
  color: var(--brand);
  font-family: var(--font-serif);
  font-size: 36px;
  line-height: 1;
}

.detail-score-box span {
  color: var(--muted);
  font-size: 8px;
  text-align: right;
}

.detail-info-list {
  display: grid;
  gap: 7px;
  padding-top: 10px;
}

.detail-info-list div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 6px;
  border-bottom: 1px dashed color-mix(in srgb, var(--line) 70%, transparent);
  color: var(--muted);
  font-size: 9px;
}

.detail-info-list b {
  color: var(--fg);
  font-weight: 550;
  text-align: right;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  padding-top: 11px;
}

.related-card {
  min-width: 0;
}

.related-card img {
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 6px;
  transition: transform 0.25s ease;
}

.related-card:hover img {
  transform: translateY(-2px);
}

.related-card strong {
  display: block;
  margin-top: 5px;
  overflow: hidden;
  font-size: 9px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.related-card span {
  display: block;
  color: var(--muted);
  font-size: 7px;
}

.detail-bottom-actions {
  display: none;
}

/* Responsive */
@media (max-width: 1100px) {
  .page-layout {
    grid-template-columns: 176px minmax(0, 1fr) 220px;
    gap: 13px;
  }

  .hero-card {
    grid-template-columns: 185px minmax(0, 1fr) 54px;
    gap: 18px;
  }

  .hero-poster {
    min-height: 235px;
  }

  .hero h1 {
    font-size: 46px;
  }

  .drama-grid {
    gap: 9px;
  }

  .drama-cover-copy h3 {
    font-size: 15px;
  }

  .topic-grid {
    grid-template-columns: 1.1fr 0.9fr;
  }

  .topic-card-period {
    grid-column: 1 / -1;
  }
}

@media (max-width: 920px) {
  .desktop-nav {
    display: none;
  }

  .menu-button {
    display: grid;
  }

  .topbar-actions {
    margin-left: auto;
  }

  .page-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .sidebar-left {
    position: static;
    grid-row: 1;
  }

  .sidebar-right {
    position: static;
    grid-row: 3;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .catalog {
    grid-row: 2;
  }

  .sidebar-left {
    grid-template-columns: 1fr 1fr;
  }

  .sidebar-left .side-note {
    display: none;
  }

  .filter-list {
    grid-template-columns: repeat(4, 1fr);
  }

  .filter-button {
    justify-content: center;
    padding: 5px;
  }

  .filter-button small,
  .filter-button i {
    display: none;
  }

  .sidebar-left .side-panel {
    min-height: 100%;
  }

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

  .topic-card-period {
    grid-column: auto;
  }

  .footer-inner {
    grid-template-columns: 1fr 1fr;
  }

  .footer-meta {
    grid-column: 1 / -1;
    text-align: left;
  }

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

  .detail-side {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 720px) {
  body {
    padding-bottom: calc(68px + env(safe-area-inset-bottom, 0px));
    font-size: 13px;
  }

  .container {
    width: min(calc(100% - 20px), var(--max));
  }

  .topbar-inner {
    min-height: 62px;
  }

  .brand-name {
    font-size: 19px;
  }

  .brand-mark {
    width: 32px;
    height: 32px;
  }

  .brand-mark svg {
    width: 23px;
    height: 23px;
  }

  .brand-sub {
    font-size: 7px;
  }

  .icon-button {
    width: 34px;
    height: 34px;
  }

  .section-rail {
    position: sticky;
    top: 62px;
    z-index: 60;
    margin-inline: -10px;
    padding-inline: 10px;
    border-bottom: 1px solid var(--line);
    background: color-mix(in srgb, var(--bg) 95%, transparent);
    backdrop-filter: blur(12px);
  }

  .hero {
    padding-top: 10px;
  }

  .hero-card {
    grid-template-columns: 116px minmax(0, 1fr);
    gap: 12px;
    min-height: 0;
    padding: 11px;
  }

  .hero-poster {
    min-height: 165px;
  }

  .hero-stamp {
    display: none;
  }

  .hero-copy {
    justify-content: flex-start;
    padding: 0;
  }

  .hero-label {
    margin-bottom: 4px;
    font-size: 8px;
  }

  .hero h1 {
    font-size: 31px;
  }

  .hero-quote {
    display: -webkit-box;
    margin-top: 5px;
    overflow: hidden;
    font-size: 11px;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .hero-summary {
    display: none;
  }

  .hero-meta {
    gap: 4px;
    margin-top: 7px;
  }

  .hero-meta span {
    padding: 2px 5px;
    font-size: 7px;
  }

  .hero-meta span:nth-child(n + 4) {
    display: none;
  }

  .hero-actions {
    gap: 5px;
    margin-top: 9px;
  }

  .hero-actions .button {
    min-height: 32px;
    padding: 6px 9px;
    border-radius: 6px;
    font-size: 9px;
  }

  .hero-actions .button svg {
    width: 14px;
    height: 14px;
  }

  .hero-actions .button-ghost span {
    display: none;
  }

  .hero-actions .button-ghost {
    width: 32px;
    padding: 0;
  }

  .hero-score {
    display: none;
  }

  .metric-strip {
    grid-template-columns: repeat(4, 1fr);
    gap: 5px;
    padding: 10px 0;
  }

  .metric-card {
    flex-direction: column;
    gap: 0;
    min-height: 49px;
    padding: 6px 2px;
  }

  .metric-card strong {
    font-size: 17px;
  }

  .metric-card span {
    font-size: 7px;
  }

  .category-rail {
    position: sticky;
    top: 106px;
    z-index: 55;
    margin-inline: -10px;
    padding: 7px 10px;
    border-bottom: 1px solid var(--line);
    background: color-mix(in srgb, var(--bg) 95%, transparent);
    backdrop-filter: blur(12px);
  }

  .category-chip {
    padding: 5px 9px;
    font-size: 9px;
  }

  .category-chip small {
    display: none;
  }

  .page-layout {
    gap: 13px;
  }

  .sidebar-left {
    display: none;
  }

  .sidebar-left > .side-panel:first-child {
    padding: 7px;
  }

  .sidebar-left > .side-panel:first-child .side-heading {
    display: none;
  }

  .filter-list {
    display: flex;
    gap: 4px;
    padding: 0;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .filter-list::-webkit-scrollbar {
    display: none;
  }

  .filter-button {
    flex: 0 0 auto;
    width: auto;
    min-height: 27px;
    padding: 4px 9px;
    border: 1px solid var(--line);
    border-radius: 6px;
    font-size: 9px;
  }

  .filter-button.is-active {
    color: var(--on-brand);
    border-color: var(--brand);
    background: var(--brand);
  }

  .sidebar-left > .schedule-panel {
    display: none;
  }

  .catalog-heading {
    align-items: flex-end;
    gap: 8px;
  }

  .catalog-heading h2 {
    font-size: 20px;
  }

  .catalog-heading p {
    display: none;
  }

  .catalog-tools {
    gap: 6px;
  }

  .result-count {
    font-size: 8px;
  }

  .select-wrap select {
    width: 82px;
    font-size: 8px;
  }

  .drama-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding-top: 10px;
  }

  .drama-cover-copy h3 {
    font-size: 16px;
  }

  .drama-card-body {
    min-height: 67px;
    padding: 8px;
  }

  .follow-button {
    right: 7px;
    bottom: 75px;
  }

  .editor-feature {
    grid-template-columns: 100px minmax(0, 1fr);
  }

  .editor-image {
    min-height: 190px;
  }

  .editor-copy {
    padding: 13px;
  }

  .editor-copy h3 {
    font-size: 21px;
  }

  .editor-copy > p {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 4;
  }

  .editor-quote {
    display: none;
  }

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

  .topic-card {
    min-height: 170px;
  }

  .topic-card-period {
    grid-column: 1 / -1;
  }

  .guide-card {
    grid-template-columns: 58px 1fr;
    gap: 12px;
    padding: 13px;
  }

  .guide-mark {
    width: 54px;
    height: 54px;
    font-size: 29px;
  }

  .update-list {
    grid-template-columns: 1fr;
  }

  .sidebar-right {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .sidebar-right .side-panel {
    padding: 11px;
  }

  .sidebar-right .quote-card,
  .sidebar-right .side-cta {
    display: none;
  }

  .rank-item {
    grid-template-columns: 20px minmax(0, 1fr);
    min-height: 34px;
  }

  .rank-number {
    width: 18px;
    height: 18px;
  }

  .rank-link strong {
    font-size: 9px;
  }

  .footer {
    padding-bottom: 8px;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 15px;
    padding: 22px 0 18px;
  }

  .footer-meta {
    grid-column: auto;
  }

  .mobile-dock {
    display: grid;
  }

  .toast {
    right: 50%;
    bottom: 82px;
    width: max-content;
    max-width: calc(100% - 36px);
    text-align: center;
    transform: translate(50%, 12px);
  }

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

  .detail-shell {
    padding-top: 10px;
  }

  .detail-hero {
    grid-template-columns: 105px minmax(0, 1fr);
    gap: 12px;
    padding: 11px;
  }

  .detail-copy h1 {
    font-size: 31px;
  }

  .detail-subtitle {
    display: -webkit-box;
    margin-top: 4px;
    overflow: hidden;
    font-size: 10px;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .detail-synopsis,
  .detail-tag-row span:nth-child(n + 4),
  .detail-meta-row span {
    display: none;
  }

  .detail-meta-row {
    gap: 7px;
    margin-top: 7px;
  }

  .detail-meta-row strong {
    font-size: 19px;
  }

  .detail-actions {
    gap: 5px;
    margin-top: 9px;
  }

  .detail-actions .button {
    min-height: 31px;
    padding: 6px 9px;
    font-size: 8px;
  }

  .detail-actions .button-ghost {
    width: 31px;
    padding: 0;
  }

  .detail-actions .button-ghost span {
    display: none;
  }

  .detail-layout {
    margin-top: 10px;
  }

  .cinema-panel {
    padding: 8px;
  }

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

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

  .detail-side {
    grid-template-columns: 1fr;
  }

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

  .detail-bottom-actions {
    position: fixed;
    right: 0;
    bottom: calc(50px + env(safe-area-inset-bottom, 0px));
    left: 0;
    z-index: 80;
    display: grid;
    grid-template-columns: 90px 1fr;
    gap: 7px;
    padding: 8px 10px;
    border-top: 1px solid var(--line);
    background: color-mix(in srgb, var(--bg) 94%, transparent);
    backdrop-filter: blur(14px);
  }

  .detail-bottom-actions .button {
    min-height: 38px;
  }
}

@media (max-width: 390px) {
  .brand-mark {
    display: none;
  }

  .hero-card {
    grid-template-columns: 104px minmax(0, 1fr);
  }

  .hero-poster {
    min-height: 149px;
  }

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

  .drama-grid {
    gap: 6px;
  }

  .drama-cover-copy h3 {
    font-size: 14px;
  }

  .drama-tags span:nth-child(n + 3) {
    display: none;
  }

  .sidebar-right {
    grid-template-columns: 1fr;
  }
}

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