:root {
  color-scheme: light;
  --bg: #f4f6fa;
  --surface: #ffffff;
  --surface-soft: #f8f9fc;
  --surface-strong: #eef1f7;
  --text: #111827;
  --text-soft: #4b5563;
  --muted: #788396;
  --line: #e2e7ef;
  --line-strong: #cfd6e3;
  --accent: #2563eb;
  --accent-strong: #1d4ed8;
  --accent-soft: #e8efff;
  --success: #0f9f6e;
  --success-soft: #e7f8f1;
  --warning: #d68a00;
  --danger: #d33843;
  --danger-soft: #fff0f1;
  --shadow: 0 12px 36px rgba(22, 34, 51, 0.08);
  --shadow-small: 0 5px 18px rgba(22, 34, 51, 0.07);
  --header-bg: rgba(255, 255, 255, 0.92);
  --radius: 8px;
  --shell: 1440px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0d1117;
    --surface: #141a22;
    --surface-soft: #111720;
    --surface-strong: #1b2330;
    --text: #edf1f7;
    --text-soft: #b7c0ce;
    --muted: #8995a7;
    --line: #26303d;
    --line-strong: #364253;
    --accent: #5a8cff;
    --accent-strong: #78a2ff;
    --accent-soft: #172744;
    --success: #49d3a0;
    --success-soft: #132b24;
    --warning: #f4ba54;
    --danger: #ff7f88;
    --danger-soft: #321b20;
    --shadow: 0 16px 42px rgba(0, 0, 0, 0.28);
    --shadow-small: 0 6px 22px rgba(0, 0, 0, 0.24);
    --header-bg: rgba(13, 17, 23, 0.9);
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0d1117;
  --surface: #141a22;
  --surface-soft: #111720;
  --surface-strong: #1b2330;
  --text: #edf1f7;
  --text-soft: #b7c0ce;
  --muted: #8995a7;
  --line: #26303d;
  --line-strong: #364253;
  --accent: #5a8cff;
  --accent-strong: #78a2ff;
  --accent-soft: #172744;
  --success: #49d3a0;
  --success-soft: #132b24;
  --warning: #f4ba54;
  --danger: #ff7f88;
  --danger-soft: #321b20;
  --shadow: 0 16px 42px rgba(0, 0, 0, 0.28);
  --shadow-small: 0 6px 22px rgba(0, 0, 0, 0.24);
  --header-bg: rgba(13, 17, 23, 0.9);
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.6 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

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

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent) 42%, transparent);
  outline-offset: 2px;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  background: var(--header-bg);
  backdrop-filter: blur(18px);
}

.header-inner {
  width: min(var(--shell), calc(100% - 48px));
  min-height: 86px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 32px;
}

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

.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--accent);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: -0.3px;
  box-shadow: 0 8px 20px color-mix(in srgb, var(--accent) 28%, transparent);
}

.brand-copy strong,
.brand-copy small {
  display: block;
}

.brand-copy strong {
  font-size: 19px;
  line-height: 1.2;
}

.brand-copy small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.2px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 32px;
  flex: 0 0 auto;
  color: var(--text-soft);
  font-size: 18px;
  font-weight: 600;
}

.main-nav a {
  padding: 30px 0 26px;
  border-bottom: 2px solid transparent;
}

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

.header-search,
.mobile-search,
.admin-search {
  display: flex;
  align-items: center;
  gap: 9px;
}

.header-search {
  flex: 1;
  max-width: 330px;
  margin-left: auto;
  min-height: 42px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.header-search svg,
.mobile-search svg,
.admin-search svg {
  width: 18px;
  height: 18px;
  color: var(--muted);
  flex: 0 0 auto;
}

.header-search input,
.mobile-search input,
.admin-search input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 9px;
  flex: 0 0 auto;
}

.header-logout {
  margin: 0;
}

.header-logout .text-action {
  cursor: pointer;
}

.text-action {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text-soft);
  background: var(--surface);
  font-size: 14px;
}

.text-action.primary-text {
  border-color: var(--accent);
  color: #fff;
  background: var(--accent);
}

.user-account-link {
  max-width: 110px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.icon-button {
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text-soft);
  background: var(--surface);
  cursor: pointer;
}

.icon-button:hover,
.text-action:hover {
  color: var(--text);
  border-color: var(--line-strong);
}

.theme-toggle svg {
  width: 19px;
  height: 19px;
}

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

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

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

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .icon-moon {
    display: block;
  }
  :root:not([data-theme="light"]) .theme-toggle .icon-sun {
    display: none;
  }
}

.page-shell {
  width: min(var(--shell), calc(100% - 48px));
  margin: 0 auto;
  padding: 30px 0 70px;
}

.catalog-head {
  min-height: 132px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  padding: 10px 2px 28px;
}

.eyebrow {
  display: block;
  margin-bottom: 7px;
  color: var(--accent);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 1.4px;
}

.catalog-head h1,
.admin-title-row h1,
.login-heading h1 {
  margin: 0;
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1.16;
  letter-spacing: -0.9px;
}

.catalog-head p,
.admin-title-row p,
.login-heading p {
  margin: 10px 0 0;
  color: var(--muted);
}

.catalog-stats {
  display: flex;
  gap: 12px;
}

.catalog-stats div {
  min-width: 104px;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-small);
}

.catalog-stats strong,
.catalog-stats span {
  display: block;
}

.dashboard-shell {
  padding-top: 24px;
}

.dashboard-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 480px);
  gap: 20px 32px;
  align-items: center;
  padding: 25px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-small);
}

.dashboard-hero h1 {
  margin: 0;
  font-size: clamp(30px, 3.2vw, 44px);
  letter-spacing: -1px;
  line-height: 1.12;
}

.dashboard-hero p {
  margin: 9px 0 0;
  color: var(--muted);
}

.dashboard-search {
  min-height: 46px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 4px 4px 4px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.dashboard-search svg {
  width: 19px;
  height: 19px;
  color: var(--muted);
}

.dashboard-search input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
}

.dashboard-search .button {
  min-height: 36px;
}

.dashboard-stats {
  grid-column: 1 / -1;
  display: flex;
  gap: 10px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.dashboard-stats div {
  min-width: 120px;
  padding: 9px 12px;
  border-radius: 6px;
  background: var(--surface-soft);
}

.dashboard-stats strong,
.dashboard-stats span {
  display: block;
}

.dashboard-stats strong {
  font-size: 16px;
}

.dashboard-stats span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10.5px;
}

.home-category-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 335px;
  gap: 22px;
  margin-top: 34px;
  align-items: start;
}

.home-category-main {
  min-width: 0;
}

.home-section-head {
  min-height: 52px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.home-section-head h2 {
  margin: 0;
  font-size: 23px;
  line-height: 1.2;
}

.home-section-head > a {
  color: var(--muted);
  font-size: 11.5px;
}

.home-section-head > a:hover {
  color: var(--accent);
}

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

.home-ranking-panel {
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-small);
}

.live-chip {
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  padding: 0 8px;
  border-radius: 999px;
  color: var(--success);
  background: var(--success-soft);
  font-size: 10px;
  font-weight: 650;
}

.home-ranking-list {
  display: flex;
  flex-direction: column;
}

.home-ranking-item {
  min-height: 75px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.home-rank-number {
  width: 20px;
  flex: 0 0 20px;
  color: var(--text-soft);
  font-size: 15px;
  font-weight: 750;
  text-align: center;
}

.home-rank-number.top {
  color: #e24e2b;
}

.home-rank-cover {
  width: 43px;
  height: 60px;
  flex: 0 0 43px;
  overflow: hidden;
  border-radius: 5px;
  background: var(--surface-strong);
}

.home-rank-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.home-rank-copy {
  min-width: 0;
  flex: 1;
}

.home-rank-copy strong,
.home-rank-copy small,
.home-rank-copy em {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-rank-copy strong {
  font-size: 12.5px;
  font-weight: 650;
}

.home-rank-copy small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
}

.home-rank-copy em {
  margin-top: 3px;
  color: var(--warning);
  font-size: 10px;
  font-style: normal;
}

.home-rank-hot {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 10.5px;
}

.section-empty-compact {
  min-height: 120px;
  display: grid;
  place-items: center;
  padding: 18px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  color: var(--muted);
  background: var(--surface);
  font-size: 12px;
  text-align: center;
}

.category-shell {
  padding-top: 24px;
}

.category-result-row {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.category-result-row strong {
  font-size: 15px;
}

.category-sort-row {
  min-height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 4px;
  border-bottom: 1px solid var(--line);
}

.category-sort-links {
  display: flex;
  align-items: center;
  gap: 26px;
}

.category-sort-links a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 550;
}

.category-sort-links a:hover {
  color: var(--text);
}

.category-sort-links a.active {
  color: var(--text);
  font-weight: 750;
}

.category-sort-links svg {
  width: 15px;
  height: 15px;
  stroke-width: 1.6;
}

.category-result-row div span {
  margin-left: 9px;
  color: var(--muted);
  font-size: 11.5px;
}

.category-catalog-layout {
  margin-top: 18px;
}

.category-ranking-panel {
  position: sticky;
  top: 92px;
}

.catalog-stats strong {
  font-size: 21px;
  line-height: 1.2;
}

.catalog-stats span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
}

.filter-panel {
  padding: 8px 18px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-small);
}

.filter-row {
  min-height: 49px;
  display: flex;
  align-items: center;
  gap: 16px;
  border-top: 1px solid var(--line);
}

.filter-row:first-of-type {
  border-top: 0;
}

.filter-label {
  width: 42px;
  flex: 0 0 42px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.filter-options {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

.filter-options a {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  padding: 0 11px;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--text-soft);
  font-size: 12.5px;
}

.filter-options a:hover {
  border-color: var(--line-strong);
  background: var(--surface-soft);
}

.filter-options a.active {
  border-color: var(--accent);
  color: var(--accent-strong);
  background: var(--accent-soft);
  font-weight: 600;
}

.year-options {
  max-width: 800px;
}

.filter-options.compact a {
  padding: 0 9px;
}

.result-count {
  margin-left: auto;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.mobile-search {
  display: none;
}

.catalog-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 292px;
  gap: 22px;
  margin-top: 24px;
  align-items: start;
}

.section-title-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 15px;
}

.section-title-row h2,
.ranking-head h2,
.side-facts h2 {
  margin: 0;
  font-size: 20px;
  line-height: 1.3;
}

.section-title-row p,
.ranking-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}

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

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

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-strong);
  box-shadow: var(--shadow-small);
}

.poster-link img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 220ms ease, opacity 180ms ease;
}

.poster-link:hover img {
  transform: scale(1.025);
  opacity: 0.92;
}

.poster-placeholder {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  padding: 20px;
  color: var(--muted);
  background: var(--surface-strong);
  text-align: center;
  font-weight: 650;
}

.quality-badge,
.score-badge,
.episode-badge,
.detail-quality {
  position: absolute;
  z-index: 2;
  border-radius: 4px;
  font-size: 10.5px;
  font-weight: 700;
  line-height: 1;
}

.quality-badge,
.detail-quality {
  top: 8px;
  right: 8px;
  padding: 5px 7px;
  color: #fff;
  background: var(--accent);
}

.score-badge {
  left: 8px;
  bottom: 8px;
  padding: 5px 7px;
  color: #282009;
  background: #f6c95c;
}

.episode-badge {
  right: 8px;
  bottom: 8px;
  max-width: calc(100% - 16px);
  padding: 5px 7px;
  color: #fff;
  background: rgba(11, 17, 26, 0.76);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.poster-copy {
  padding-top: 9px;
}

.poster-title {
  display: block;
  overflow: hidden;
  color: var(--text);
  font-size: 13.5px;
  font-weight: 650;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.poster-title:hover {
  color: var(--accent-strong);
}

.poster-meta {
  display: flex;
  gap: 6px;
  margin-top: 4px;
  overflow: hidden;
  color: var(--muted);
  font-size: 10.5px;
  white-space: nowrap;
}

.poster-meta span + span::before {
  content: "·";
  margin-right: 6px;
}

.ranking-panel {
  position: sticky;
  top: 92px;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-small);
}

.ranking-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.ranking-mark {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.8px;
}

.ranking-list {
  display: flex;
  flex-direction: column;
}

.ranking-item {
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}

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

.ranking-number {
  width: 20px;
  flex: 0 0 20px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}

.ranking-number.top {
  color: #e05a21;
}

.ranking-cover {
  width: 43px;
  height: 58px;
  flex: 0 0 43px;
  overflow: hidden;
  border-radius: 5px;
  background: var(--surface-strong);
}

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

.ranking-copy {
  min-width: 0;
  flex: 1;
}

.ranking-copy strong,
.ranking-copy span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ranking-copy strong {
  font-size: 12.5px;
  font-weight: 650;
}

.ranking-copy span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 10.5px;
}

.ranking-item > b {
  color: var(--warning);
  font-size: 12px;
}

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin-top: 30px;
}

.pagination a,
.pagination span {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  padding: 0 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text-soft);
  font-size: 12.5px;
}

.pagination a:hover {
  border-color: var(--accent);
  color: var(--accent-strong);
}

.empty-state {
  min-height: 320px;
  display: grid;
  place-items: center;
  align-content: center;
  padding: 40px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  text-align: center;
}

.empty-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--muted);
  background: var(--surface-strong);
}

.empty-icon svg {
  width: 24px;
  height: 24px;
}

.empty-state h3 {
  margin: 14px 0 0;
  font-size: 16px;
}

.empty-state p,
.muted-copy {
  color: var(--muted);
  font-size: 13px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  color: var(--muted);
  font-size: 12px;
  overflow: hidden;
  white-space: nowrap;
}

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

.breadcrumb strong {
  overflow: hidden;
  color: var(--text-soft);
  text-overflow: ellipsis;
}

.detail-hero {
  display: grid;
  grid-template-columns: 246px minmax(0, 1fr);
  gap: 34px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.detail-poster-wrap {
  position: relative;
  align-self: start;
}

.detail-poster {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-strong);
}

.detail-main {
  min-width: 0;
  padding-top: 4px;
}

.detail-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.detail-title-row h1 {
  margin: 0;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.15;
  letter-spacing: -1.2px;
}

.original-title {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.detail-score {
  min-width: 63px;
  text-align: right;
}

.detail-score strong,
.detail-score span {
  display: block;
}

.detail-score strong {
  color: var(--warning);
  font-size: 28px;
  line-height: 1.1;
}

.detail-score span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 18px;
}

.tag-list a,
.tag-list span {
  min-height: 27px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--text-soft);
  background: var(--surface-soft);
  font-size: 11.5px;
}

.tag-list a:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.detail-facts {
  display: grid;
  gap: 9px;
  margin: 22px 0 0;
}

.detail-facts div {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 12px;
}

.detail-facts dt {
  color: var(--muted);
  font-size: 12px;
}

.detail-facts dd {
  margin: 0;
  color: var(--text-soft);
  font-size: 13px;
}

.share-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 26px;
  padding: 15px 16px;
  border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--line));
  border-radius: var(--radius);
  background: var(--accent-soft);
}

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

.share-copy > div {
  min-width: 0;
}

.share-icon {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  color: #fff;
  background: var(--accent);
}

.share-icon svg {
  width: 20px;
  height: 20px;
}

.share-copy strong,
.share-copy p {
  display: block;
  margin: 0;
}

.share-copy p {
  margin-top: 2px;
  color: var(--text-soft);
  font-size: 11.5px;
}

.share-link-preview {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.share-actions {
  display: flex;
  gap: 8px;
  flex: 0 0 auto;
}

.button {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  background: var(--surface);
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

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

.button.primary {
  border-color: var(--accent);
  color: #fff;
  background: var(--accent);
}

.button.primary:hover {
  background: var(--accent-strong);
}

.button.secondary {
  color: var(--text-soft);
  background: var(--surface-soft);
}

.button.wide {
  width: 100%;
}

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

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

.synopsis-text {
  margin: 4px 0 0;
  color: var(--text-soft);
  font-size: 14px;
  line-height: 1.95;
  white-space: pre-wrap;
}

.source-link {
  display: inline-flex;
  margin-top: 18px;
  color: var(--accent);
  font-size: 12px;
}

.side-facts h2 {
  margin-bottom: 14px;
}

.side-facts div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
  font-size: 12px;
}

.side-facts span {
  color: var(--muted);
}

.side-facts strong {
  font-weight: 600;
  text-align: right;
}

.admin-shell {
  width: min(1320px, calc(100% - 48px));
  margin: 0 auto;
  padding: 34px 0 70px;
}

.admin-title-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.admin-title-row h1 {
  font-size: clamp(28px, 3vw, 38px);
}

.admin-title-actions {
  display: flex;
  gap: 9px;
}

.admin-title-actions form,
.inline-form {
  display: inline;
}

.admin-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: var(--radius) var(--radius) 0 0;
  background: var(--surface);
}

.admin-search {
  flex: 1;
  max-width: 720px;
}

.admin-search input,
.admin-search select {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-soft);
  color: var(--text);
}

.admin-search input {
  padding: 0 12px;
}

.admin-search select {
  padding: 0 28px 0 10px;
}

.admin-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 0 0 var(--radius) var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-small);
}

.admin-table {
  width: 100%;
  min-width: 930px;
  border-collapse: collapse;
}

.admin-table th,
.admin-table td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
  font-size: 12.5px;
}

.admin-table th {
  color: var(--muted);
  background: var(--surface-soft);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.admin-table tr:last-child td {
  border-bottom: 0;
}

.admin-table td small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 10.5px;
}

.admin-movie-cell {
  min-width: 230px;
  display: flex;
  align-items: center;
  gap: 11px;
}

.admin-movie-cell strong,
.admin-movie-cell small {
  display: block;
}

.admin-thumb {
  width: 38px;
  height: 52px;
  flex: 0 0 38px;
  overflow: hidden;
  border-radius: 4px;
  background: var(--surface-strong);
}

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

.state-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 10.5px;
}

.state-pill.success {
  color: var(--success);
  background: var(--success-soft);
}

.state-pill.muted {
  color: var(--muted);
  background: var(--surface-strong);
}

.align-right {
  text-align: right !important;
}

.table-action {
  display: inline-flex;
  margin-left: 9px;
  border: 0;
  color: var(--accent);
  background: transparent;
  cursor: pointer;
  font-size: 12px;
}

.table-action.danger {
  color: var(--danger);
}

.edit-form {
  display: flex;
  flex-direction: column;
  gap: 17px;
}

.form-section {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-small);
}

.form-section-head {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
}

.form-section-head > span {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  color: var(--accent);
  background: var(--accent-soft);
  font-size: 11px;
  font-weight: 800;
}

.form-section-head h2 {
  margin: 0;
  font-size: 17px;
}

.form-section-head p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 11.5px;
}

.form-grid {
  display: grid;
  gap: 15px;
}

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

.span-2 {
  grid-column: span 2;
}

.form-grid label > span {
  display: block;
  margin-bottom: 7px;
  color: var(--text-soft);
  font-size: 11.5px;
  font-weight: 600;
}

.form-grid input,
.form-grid select,
.form-grid textarea,
.stack-form input {
  width: 100%;
  min-height: 42px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 6px;
  outline: 0;
  background: var(--surface-soft);
  color: var(--text);
}

.form-grid textarea {
  resize: vertical;
}

.form-grid input:focus,
.form-grid select:focus,
.form-grid textarea:focus,
.stack-form input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 12%, transparent);
}

.check-field {
  min-height: 42px;
  display: flex !important;
  align-items: center;
  gap: 9px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-soft);
}

.check-field input {
  width: 16px;
  min-height: 16px;
  margin: 0;
}

.check-field span {
  margin: 0 !important;
}

.form-submit-bar {
  position: sticky;
  bottom: 14px;
  z-index: 10;
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--header-bg);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
}

.back-link {
  display: inline-block;
  margin-bottom: 10px;
  color: var(--accent);
  font-size: 12px;
}

.alert {
  margin-bottom: 17px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 13px;
}

.alert.error {
  border-color: color-mix(in srgb, var(--danger) 35%, var(--line));
  color: var(--danger);
  background: var(--danger-soft);
}

.alert.success {
  border-color: color-mix(in srgb, var(--success) 35%, var(--line));
  color: var(--success);
  background: var(--success-soft);
}

.auth-shell {
  width: min(1180px, calc(100% - 32px));
  min-height: calc(100vh - 210px);
  display: grid;
  place-items: center;
  margin: 0 auto;
  padding: 42px 0 68px;
}

.auth-card {
  width: min(430px, 100%);
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.auth-card .login-heading h1 {
  font-size: 30px;
}

.auth-switch {
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 12.5px;
  text-align: center;
}

.auth-switch a {
  color: var(--accent);
  font-weight: 600;
}

.account-shell {
  width: min(1060px, calc(100% - 32px));
  margin: 0 auto;
  padding: 42px 0 74px;
}

.account-hero {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-small);
}

.account-avatar {
  width: 64px;
  height: 64px;
  flex: 0 0 64px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #fff;
  background: var(--accent);
  font-size: 24px;
  font-weight: 750;
}

.account-hero h1 {
  margin: 0;
  font-size: 30px;
}

.account-hero p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12.5px;
}

.account-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.account-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.account-card span,
.account-card strong,
.account-card p {
  display: block;
}

.account-card span {
  color: var(--muted);
  font-size: 11px;
}

.account-card strong {
  margin-top: 9px;
  font-size: 20px;
}

.account-card p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 11.5px;
}

.account-actions {
  display: flex;
  gap: 9px;
  margin-top: 20px;
}

.domain-hint {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 11.5px;
}

.domain-hint strong {
  color: var(--text-soft);
}

.domain-hint span {
  color: var(--accent);
}

.ranking-sync-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-soft);
}

.ranking-sync-box strong,
.ranking-sync-box span,
.ranking-sync-box small {
  display: block;
}

.ranking-sync-box span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11.5px;
}

.ranking-sync-box small {
  margin-top: 5px;
  color: var(--text-soft);
  font-size: 10.5px;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 30px;
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--line) 48%, transparent) 1px, transparent 1px),
    linear-gradient(color-mix(in srgb, var(--line) 48%, transparent) 1px, transparent 1px),
    var(--bg);
  background-size: 44px 44px;
}

.login-brand {
  position: absolute;
  top: 26px;
  left: 32px;
}

.login-card {
  width: min(410px, 100%);
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.login-heading h1 {
  font-size: 28px;
}

.stack-form {
  display: grid;
  gap: 15px;
  margin-top: 24px;
}

.stack-form label > span {
  display: block;
  margin-bottom: 7px;
  font-size: 12px;
  font-weight: 600;
}

.back-home {
  display: block;
  margin-top: 18px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.back-home:hover {
  color: var(--accent);
}

@media (max-width: 1240px) {
  .main-nav {
    gap: 16px;
  }
  .poster-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
  .dashboard-poster-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .home-category-section {
    grid-template-columns: minmax(0, 1fr) 310px;
  }
}

@media (max-width: 1040px) {
  .header-search {
    display: none;
  }
  .catalog-layout {
    grid-template-columns: 1fr;
  }
  .home-category-section {
    grid-template-columns: 1fr;
  }
  .home-ranking-panel {
    order: 2;
  }
  .dashboard-hero {
    grid-template-columns: 1fr;
  }
  .dashboard-search {
    max-width: none;
  }
  .ranking-panel {
    position: static;
  }
  .ranking-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 18px;
  }
  .poster-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .dashboard-poster-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .dashboard-hero {
    padding: 18px;
  }
  .dashboard-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .dashboard-stats div {
    min-width: 0;
    padding: 9px;
  }
  .home-category-section {
    margin-top: 27px;
  }
  .category-ranking-panel {
    position: static;
  }
  .category-result-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }
  .category-result-row div span {
    display: block;
    margin: 3px 0 0;
  }
  .category-sort-row {
    min-height: 54px;
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
    padding: 11px 0;
  }
  .category-sort-links {
    width: 100%;
    gap: 19px;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .category-sort-links::-webkit-scrollbar {
    display: none;
  }
  .category-sort-links a {
    flex: 0 0 auto;
    font-size: 13.5px;
  }
  .detail-content-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 780px) {
  .header-inner {
    width: calc(100% - 28px);
    min-height: 62px;
    gap: 12px;
  }
  .brand-mark {
    width: 36px;
    height: 36px;
  }
  .brand-copy strong {
    font-size: 15px;
  }
  .brand-copy small {
    display: none;
  }
  .main-nav {
    order: 4;
    width: 100%;
    overflow-x: auto;
    gap: 18px;
    scrollbar-width: none;
  }
  .main-nav::-webkit-scrollbar {
    display: none;
  }
  .main-nav a {
    padding: 0 0 10px;
    white-space: nowrap;
  }
  .header-actions {
    margin-left: auto;
  }
  .header-inner {
    flex-wrap: wrap;
    padding-top: 10px;
  }
  .page-shell,
  .admin-shell {
    width: calc(100% - 28px);
  }
  .page-shell {
    padding-top: 20px;
  }
  .catalog-head {
    min-height: 0;
    align-items: flex-start;
    flex-direction: column;
    gap: 18px;
  }
  .catalog-head h1 {
    font-size: 30px;
  }
  .catalog-stats {
    width: 100%;
  }
  .catalog-stats div {
    min-width: 0;
    flex: 1;
  }
  .filter-panel {
    padding: 12px;
  }
  .mobile-search {
    display: flex;
    min-height: 42px;
    padding: 0 10px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--surface-soft);
  }
  .mobile-search button {
    border: 0;
    color: var(--accent);
    background: transparent;
    font-size: 12px;
  }
  .filter-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 7px;
    padding: 12px 0;
  }
  .filter-label {
    width: auto;
    flex: none;
  }
  .year-options {
    max-width: none;
    max-height: 88px;
    overflow: auto;
  }
  .result-count {
    margin-left: 0;
  }
  .poster-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px 12px;
  }
  .poster-title {
    font-size: 12.5px;
  }
  .ranking-list {
    grid-template-columns: 1fr;
  }
  .detail-hero {
    grid-template-columns: 118px minmax(0, 1fr);
    gap: 16px;
    padding: 14px;
  }
  .detail-title-row h1 {
    font-size: 24px;
  }
  .detail-score strong {
    font-size: 20px;
  }
  .detail-facts div {
    grid-template-columns: 46px minmax(0, 1fr);
  }
  .share-panel {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }
  .share-actions {
    width: 100%;
  }
  .share-actions .button {
    flex: 1;
  }
  .detail-content-grid {
    margin-top: 14px;
  }
  .admin-title-row {
    align-items: flex-start;
    flex-direction: column;
  }
  .admin-title-actions {
    width: 100%;
  }
  .admin-title-actions > * {
    flex: 1;
  }
  .admin-title-actions .button {
    width: 100%;
  }
  .admin-toolbar {
    align-items: stretch;
    flex-direction: column;
  }
  .admin-search {
    align-items: stretch;
    flex-wrap: wrap;
  }
  .admin-search input {
    flex-basis: 100%;
  }
  .form-grid.two {
    grid-template-columns: 1fr;
  }
  .span-2 {
    grid-column: auto;
  }
  .form-section {
    padding: 16px;
  }
  .login-shell {
    padding: 76px 16px 24px;
  }
  .login-brand {
    top: 20px;
    left: 18px;
  }
  .login-card {
    padding: 22px;
  }
  .auth-card {
    padding: 22px;
  }
  .account-hero {
    padding: 20px;
  }
  .account-grid {
    grid-template-columns: 1fr;
  }
  .account-actions {
    align-items: stretch;
    flex-direction: column;
  }
  .account-actions .button,
  .account-actions form,
  .account-actions form .button {
    width: 100%;
  }
  .user-account-link {
    max-width: 72px;
  }
  .ranking-sync-box {
    align-items: stretch;
    flex-direction: column;
  }
}

/* Covers and action controls use square corners throughout the site. */
.poster-card,
.poster-link,
.poster-media,
.poster-media img,
.ranking-cover,
.ranking-cover img,
.home-rank-cover,
.home-rank-cover img,
.detail-poster-wrap,
.detail-poster,
.quality-badge,
.episode-badge,
.detail-quality,
button,
.button,
.text-action,
.icon-button,
.filter-options a,
.pagination a,
.pagination span,
.tag-list a,
.tag-list span {
  border-radius: 0 !important;
}

@media (max-width: 390px) {
  .catalog-stats {
    gap: 7px;
  }
  .catalog-stats div {
    padding: 10px;
  }
  .catalog-stats strong {
    font-size: 18px;
  }
  .detail-hero {
    grid-template-columns: 96px minmax(0, 1fr);
  }
  .detail-title-row {
    gap: 8px;
  }
  .detail-title-row h1 {
    font-size: 21px;
  }
  .tag-list span,
  .tag-list a {
    font-size: 10px;
  }
}

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

/* Qinghua-inspired media catalog */
:root {
  --bg: #f4f4f5;
  --surface: #ffffff;
  --surface-soft: #f7f7f8;
  --surface-strong: #ececef;
  --text: #151619;
  --text-soft: #50535a;
  --muted: #858991;
  --line: #e2e3e6;
  --line-strong: #c9cbd0;
  --accent: #2563eb;
  --accent-strong: #1d4ed8;
  --accent-soft: #edf2ff;
  --header-bg: rgba(247, 247, 248, 0.94);
  --radius: 7px;
}

:root[data-theme="dark"] {
  --bg: #0f1012;
  --surface: #18191c;
  --surface-soft: #131417;
  --surface-strong: #232429;
  --text: #f5f5f6;
  --text-soft: #c2c4ca;
  --muted: #90939b;
  --line: #292b30;
  --line-strong: #3a3c42;
  --accent: #6d96ff;
  --accent-strong: #8caaff;
  --accent-soft: #1b2741;
  --header-bg: rgba(15, 16, 18, 0.94);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1012;
    --surface: #18191c;
    --surface-soft: #131417;
    --surface-strong: #232429;
    --text: #f5f5f6;
    --text-soft: #c2c4ca;
    --muted: #90939b;
    --line: #292b30;
    --line-strong: #3a3c42;
    --accent: #6d96ff;
    --accent-strong: #8caaff;
    --accent-soft: #1b2741;
    --header-bg: rgba(15, 16, 18, 0.94);
  }
}

.site-header {
  backdrop-filter: blur(22px);
}

.header-inner {
  min-height: 88px;
  gap: 30px;
}

.brand-mark {
  color: var(--bg);
  background: var(--text);
  box-shadow: none;
}

.brand-copy strong {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.2px;
}

.main-nav {
  gap: 10px;
  font-size: 18px;
  font-weight: 600;
}

.main-nav a {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border: 1px solid var(--line);
  color: var(--text-soft);
  background: var(--surface-soft);
  transition: color .16s ease, background .16s ease, border-color .16s ease;
}

.main-nav a:hover {
  color: var(--text);
  border-color: var(--line-strong);
  background: var(--surface-strong);
}

.main-nav a.active {
  color: var(--bg);
  border-color: var(--text);
  background: var(--text);
}

.header-search {
  max-width: 340px;
  border: 0;
  border-radius: 8px;
  background: var(--surface-strong);
}

.text-action {
  border-radius: 7px;
  min-height: 42px;
  font-size: 14px;
  font-weight: 600;
}

.text-action.primary-text {
  border-color: var(--text);
  color: var(--bg);
  background: var(--text);
}

.button.primary {
  border-color: var(--text);
  color: var(--bg);
  background: var(--text);
  box-shadow: none;
}

.button.primary:hover {
  color: var(--bg);
  background: var(--text-soft);
  border-color: var(--text-soft);
}

.poster-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 4px 13px rgba(16, 24, 40, 0.05);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.poster-card:hover {
  transform: translateY(-3px);
  border-color: var(--line-strong);
  box-shadow: 0 12px 25px rgba(16, 24, 40, 0.13);
}

.poster-link {
  display: block;
  overflow: visible;
  aspect-ratio: auto;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.poster-media {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  background: var(--surface-strong);
}

.poster-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 220ms ease, opacity 180ms ease;
}

.poster-card:hover .poster-media img {
  transform: scale(1.035);
  opacity: 0.95;
}

.poster-footer {
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 10px 10px;
  background: var(--surface);
}

.poster-title-wrap {
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 3px;
}

.poster-title {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.poster-title-wrap small {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 10.5px;
}

.poster-score {
  flex: 0 0 auto;
  color: #e69b19;
  font-size: 12.5px;
  font-weight: 750;
}

.quality-badge {
  border-radius: 3px;
  background: var(--accent);
}

.episode-badge {
  left: 8px;
  right: auto;
  background: rgba(13, 14, 16, 0.78);
}

.dashboard-shell,
.category-shell {
  padding-top: 18px;
}

@media (min-width: 1041px) {
  .dashboard-shell {
    width: min(var(--shell), calc(100% - 48px));
    margin-left: max(24px, calc((100% - var(--shell)) / 2));
    margin-right: 0;
  }
}

.home-category-section {
  margin-top: 38px;
  grid-template-columns: minmax(0, 988px) minmax(386px, 1fr);
  gap: 18px;
}

.home-category-section:first-of-type {
  margin-top: 6px;
}

.home-section-head {
  min-height: 54px;
  align-items: center;
  margin-bottom: 12px;
}

.home-section-head h2 {
  font-size: 27px;
  font-weight: 800;
  letter-spacing: -0.7px;
}

.home-section-head > a {
  padding: 7px 11px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--text-soft);
  background: var(--surface);
}

.dashboard-poster-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 22px 19px;
}

.home-ranking-panel {
  padding: 18px;
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 7px 20px rgba(16, 24, 40, 0.07);
}

.home-ranking-panel {
  padding: 0 0 0 14px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.home-ranking-panel .home-section-head h2 {
  font-size: 26px;
}

.live-chip {
  color: var(--text-soft);
  background: var(--surface-strong);
}

.home-ranking-item {
  min-height: 76px;
  border-top: 0;
  border-radius: 6px;
  transition: background .16s ease, padding .16s ease;
}

.home-ranking-item.top-three {
  min-height: 86px;
}

.home-ranking-item.after-three {
  min-height: 50px;
  padding-top: 6px;
  padding-bottom: 6px;
}

.home-ranking-item.after-three:hover {
  min-height: 78px;
}

.home-rank-cover {
  width: 56px;
  height: 78px;
  flex-basis: 56px;
}

.home-ranking-item:hover {
  background: var(--surface-soft);
  padding-left: 7px;
  padding-right: 7px;
}

.home-ranking-item.after-three .home-rank-cover {
  width: 0;
  height: 0;
  flex-basis: 0;
  opacity: 0;
  transform: translateX(-5px);
  transition: width .16s ease, height .16s ease, flex-basis .16s ease, opacity .16s ease, transform .16s ease;
}

.home-ranking-item.after-three .home-rank-copy small,
.home-ranking-item.after-three .home-rank-copy em {
  display: none;
}

.home-ranking-item.after-three:hover .home-rank-cover {
  width: 56px;
  height: 78px;
  flex-basis: 56px;
  opacity: 1;
  transform: translateX(0);
}

.home-ranking-item.after-three:hover .home-rank-copy small,
.home-ranking-item.after-three:hover .home-rank-copy em {
  display: block;
}

.home-rank-copy strong {
  font-size: 13.5px;
}

.filter-panel {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.filter-row {
  min-height: 50px;
  border-top: 0;
}

.filter-label {
  color: var(--text-soft);
  font-weight: 700;
}

.filter-options a {
  min-height: 31px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
}

.filter-options a:hover {
  border-color: var(--line-strong);
  background: var(--surface-strong);
}

.filter-options a.active {
  border-color: var(--text);
  color: var(--bg);
  background: var(--text);
}

.category-filter-panel {
  padding: 0 0 4px;
}

.category-result-row {
  min-height: 52px;
  margin-top: 8px;
  padding-top: 12px;
  border-top: 0;
  border-bottom: 1px solid var(--line);
}

.category-result-row strong {
  font-size: 20px;
  font-weight: 800;
}

.category-catalog-layout {
  margin-top: 24px;
  grid-template-columns: minmax(0, 1fr);
}

.category-ranking-panel {
  top: 94px;
}

.detail-hero {
  padding: 26px;
  box-shadow: 0 7px 24px rgba(16, 24, 40, 0.08);
}

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

.detail-title-row h1 {
  font-weight: 800;
}

.share-panel {
  border-color: var(--line);
  background: var(--surface-soft);
}

.share-icon {
  border-radius: 6px;
}

.detail-share-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  margin-top: 20px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-small);
}

@media (max-width: 1240px) {
  .main-nav {
    gap: 14px;
  }
  .dashboard-poster-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 1040px) {
  .home-category-section {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 780px) {
  .header-inner {
    min-height: 64px;
  }
  .main-nav {
    gap: 8px;
  }
  .main-nav a {
    min-height: 40px;
    padding: 0 14px;
    font-size: 16px;
  }
  .dashboard-poster-grid,
  .poster-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .poster-footer {
    min-height: 44px;
    padding: 7px 8px 8px;
  }
  .poster-title {
    font-size: 12px;
  }
  .poster-score {
    font-size: 11.5px;
  }
  .home-section-head h2,
  .home-ranking-panel .home-section-head h2 {
    font-size: 21px;
  }
  .filter-panel {
    padding: 0;
  }
  .filter-row {
    padding: 10px 0;
  }
  .detail-share-bottom {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
  }
  .detail-share-bottom .share-actions {
    width: 100%;
  }
  .detail-share-bottom .share-actions .button {
    flex: 1;
  }
}
