: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;
}

[hidden] {
  display: none !important;
}

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;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  overflow: hidden;
}

.user-account-link img {
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  border-radius: 4px;
  object-fit: cover;
}

.user-account-link span {
  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;
  }
}

.detail-title-actions {
  display: flex;
  align-items: center;
  gap: 24px;
  flex: 0 0 auto;
}

.favorite-button {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 13px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  color: var(--text-soft);
  background: var(--surface);
  cursor: pointer;
  font-size: 11px;
  font-weight: 650;
}

.favorite-button svg {
  width: 16px;
  height: 16px;
}

.favorite-button:hover {
  color: var(--text);
  border-color: var(--text-soft);
}

.favorite-button.is-active {
  color: #e5a919;
  border-color: color-mix(in srgb, #e5a919 45%, var(--line));
  background: color-mix(in srgb, #e5a919 12%, var(--surface));
}

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

.favorites-shell {
  padding-top: 34px;
}

.favorites-page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}

.favorites-page-head h1 {
  margin: 5px 0 0;
  color: var(--text);
  font-size: 30px;
}

.favorites-page-head p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
}

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

.favorite-card {
  min-width: 0;
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 15px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
}

.favorite-poster {
  width: 112px;
  height: 158px;
  overflow: hidden;
  border-radius: 3px;
  background: var(--surface-strong);
}

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

.favorite-card-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.favorite-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.favorite-card-top span {
  color: var(--muted);
  font-size: 10px;
}

.favorite-card-top b {
  color: #e0a01b;
  font-size: 11px;
}

.favorite-card-title {
  margin-top: 9px;
  overflow: hidden;
  color: var(--text);
  font-size: 16px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.favorite-card-title:hover {
  color: var(--accent);
}

.favorite-card-body > p {
  display: -webkit-box;
  overflow: hidden;
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.6;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.favorite-card-actions {
  display: flex;
  gap: 7px;
  margin-top: auto;
  padding-top: 12px;
}

.favorite-card-actions .button {
  min-height: 34px;
  padding: 0 11px;
  font-size: 10.5px;
}

.favorite-remove {
  color: var(--danger);
  background: var(--danger-soft);
}

.favorites-empty {
  min-height: 380px;
  display: grid;
  place-items: center;
  align-content: center;
  padding: 40px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  text-align: center;
}

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

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

.favorites-empty h2 {
  margin: 16px 0 0;
  font-size: 18px;
}

.favorites-empty p {
  margin: 7px 0 18px;
  color: var(--muted);
  font-size: 11.5px;
}

@media (max-width: 1040px) {
  .favorites-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .detail-title-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
  }
  .detail-title-actions {
    width: 100%;
    justify-content: space-between;
  }
  .favorites-page-head {
    align-items: flex-start;
    flex-direction: column;
  }
  .favorites-page-head h1 {
    font-size: 26px;
  }
  .favorite-card {
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 12px;
    padding: 10px;
  }
  .favorite-poster {
    width: 88px;
    height: 124px;
  }
  .favorite-card-actions {
    flex-wrap: wrap;
  }
}

.home-carousel {
  position: relative;
  height: 480px;
  overflow: hidden;
  margin-bottom: 30px;
  border-radius: 7px;
  background: #111;
}

.home-carousel-track,
.home-carousel-slide,
.home-carousel-slide > a {
  position: absolute;
  inset: 0;
}

.home-carousel-slide {
  opacity: 0;
  pointer-events: none;
  transition: opacity .35s ease;
}

.home-carousel-slide:first-child,
.home-carousel-slide.active {
  opacity: 1;
  pointer-events: auto;
}

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

.home-carousel-slide > a::after {
  content: "";
  position: absolute;
  inset: 34% 0 0;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, .79));
}

.home-carousel-caption {
  position: absolute;
  left: 26px;
  right: 80px;
  bottom: 22px;
  z-index: 2;
  color: #fff;
}

.home-carousel-caption strong,
.home-carousel-caption small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-carousel-caption strong {
  font-size: 18px;
  font-weight: 750;
}

.home-carousel-caption small {
  margin-top: 5px;
  color: rgba(255, 255, 255, .7);
  font-size: 10.5px;
}

.home-carousel-arrow {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 50%;
  color: #fff;
  background: rgba(0, 0, 0, .48);
  cursor: pointer;
  transform: translateY(-50%);
}

.home-carousel-arrow:hover {
  background: rgba(0, 0, 0, .74);
}

.home-carousel-arrow.prev {
  left: 14px;
}

.home-carousel-arrow.next {
  right: 14px;
}

.home-carousel-arrow svg {
  width: 18px;
  height: 18px;
}

.home-carousel-dots {
  position: absolute;
  right: 0;
  bottom: 14px;
  left: 0;
  z-index: 3;
  display: flex;
  justify-content: center;
  gap: 6px;
  pointer-events: none;
}

.home-carousel-dots button {
  width: 6px;
  height: 6px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, .36);
  cursor: pointer;
  pointer-events: auto;
  transition: width .2s ease, background .2s ease;
}

.home-carousel-dots button.active {
  width: 18px;
  background: #fff;
}

.banner-admin-panel {
  overflow: visible;
}

.banner-count {
  color: var(--muted);
  font-size: 10.5px;
}

.banner-table {
  min-width: 980px;
}

.banner-table tr.dragging {
  opacity: .45;
}

.banner-table tr.drag-over {
  box-shadow: inset 0 2px 0 var(--accent);
}

.banner-drag-handle {
  display: inline-block;
  color: var(--muted);
  cursor: grab;
  font-size: 18px;
  line-height: 1;
}

.banner-drag-handle:active {
  cursor: grabbing;
}

.banner-admin-thumb {
  width: 106px;
  height: 58px;
  border-radius: 3px;
  object-fit: cover;
}

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

.banner-admin-copy strong {
  max-width: 270px;
  color: var(--text);
  font-size: 12px;
}

.banner-admin-copy small {
  max-width: 300px;
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
}

.banner-admin-copy em {
  margin-top: 5px;
  color: var(--muted);
  font-size: 9px;
  font-style: normal;
}

.banner-row-actions {
  flex-wrap: nowrap;
}

.banner-move {
  width: 27px;
  height: 30px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--muted);
  background: var(--surface);
  cursor: pointer;
}

.banner-admin-empty {
  padding: 60px 20px;
  text-align: center;
}

.banner-admin-empty strong {
  color: var(--text);
  font-size: 16px;
}

.banner-admin-empty p {
  margin: 7px 0 18px;
  color: var(--muted);
  font-size: 11px;
}

.banner-dialog {
  width: min(620px, calc(100% - 28px));
}

.banner-preview {
  position: relative;
  min-height: 210px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--muted);
  background: var(--surface-soft);
  font-size: 12px;
}

.banner-preview img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: none;
  object-fit: cover;
}

.banner-preview span {
  position: relative;
  z-index: 1;
}

.banner-dialog-form > label {
  margin-top: 12px;
}

.banner-dialog-form select {
  width: 100%;
  min-height: 42px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--text);
  background: var(--surface-soft);
}

.banner-active-check {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface-soft);
}

.banner-active-check > span {
  margin: 0;
}

.banner-movie-picker {
  position: relative;
  display: block;
}

.banner-dialog-form .banner-movie-picker > input[type="search"] {
  width: 100%;
  min-height: 42px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--text);
  background: var(--surface-soft);
}

.banner-movie-results {
  position: absolute;
  top: calc(100% + 5px);
  right: 0;
  left: 0;
  z-index: 20;
  max-height: 230px;
  overflow-y: auto;
  padding: 5px;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  background: var(--surface);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
}

.banner-movie-results[hidden] {
  display: none;
}

.banner-movie-results button {
  width: 100%;
  display: block;
  padding: 9px 10px;
  border: 0;
  border-radius: 4px;
  color: var(--text-soft);
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.banner-movie-results button:hover {
  color: var(--text);
  background: var(--surface-strong);
}

.banner-movie-results strong,
.banner-movie-results small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.banner-movie-results strong {
  font-size: 11px;
}

.banner-movie-results small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
}

.banner-movie-selected {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 9.5px;
}

.banner-movie-selected.selected {
  color: var(--success);
}

.banner-active-switch {
  min-height: 58px;
  display: flex !important;
  align-items: center;
  gap: 11px;
  margin-top: 14px !important;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface-soft);
  cursor: pointer;
}

.banner-active-switch > input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.banner-switch-track {
  position: relative;
  width: 40px;
  height: 22px;
  flex: 0 0 40px;
  border-radius: 999px;
  background: var(--line-strong);
  transition: background .18s ease;
}

.banner-switch-track i {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .2);
  transition: transform .18s ease;
}

.banner-active-switch > input:checked + .banner-switch-track {
  background: var(--accent);
}

.banner-active-switch > input:checked + .banner-switch-track i {
  transform: translateX(18px);
}

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

.banner-switch-copy strong {
  color: var(--text);
  font-size: 11px;
}

.banner-switch-copy small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9.5px;
}

@media (max-width: 780px) {
  .home-carousel {
    height: 300px;
    margin-bottom: 22px;
  }
  .home-carousel-caption {
    left: 18px;
    right: 64px;
    bottom: 20px;
  }
  .home-carousel-caption strong {
    font-size: 15px;
  }
  .home-carousel-arrow {
    width: 30px;
    height: 30px;
  }
  .banner-dialog-form {
    max-height: calc(100vh - 24px);
    overflow-y: auto;
  }
}

@media (min-width: 781px) and (max-width: 1200px) {
  .home-carousel {
    height: 420px;
  }
}

.account-shell {
  width: min(var(--shell), calc(100% - 48px));
}

.account-profile-panel {
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow-small);
}

.account-profile-panel .account-profile-top {
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.account-profile-panel .account-avatar,
.account-avatar-upload,
.account-avatar-upload img,
.account-avatar-upload .account-avatar {
  width: 72px;
  height: 72px;
  flex-basis: 72px;
}

.account-profile-panel .account-avatar {
  border: 1px solid var(--line);
}

.account-avatar-upload em {
  right: -6px;
  bottom: -5px;
  padding: 3px 7px;
}

.account-setting-head {
  margin-top: 17px;
  padding-top: 0;
  border-top: 0;
}

.account-setting-row {
  background: var(--surface);
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.03);
}

.account-setting-row:hover {
  background: var(--surface-soft);
}

.account-profile-actions {
  display: block;
  margin-top: 14px;
}

.account-profile-actions form,
.account-logout-button {
  width: 100%;
}

.account-logout-button {
  border-color: color-mix(in srgb, var(--danger) 36%, var(--line));
  color: var(--danger);
  background: var(--danger-soft);
}

.header-search-submit {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  flex: 0 0 30px;
  padding: 0;
  border: 0;
  border-radius: 4px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
}

.header-search-submit:hover {
  color: var(--text);
  background: var(--surface-strong);
}

.header-search-submit svg {
  width: 17px;
  height: 17px;
}

.header-search {
  position: relative;
}

.header-search-suggestions {
  position: absolute;
  top: calc(100% + 7px);
  left: 0;
  right: 0;
  z-index: 90;
  max-height: 370px;
  overflow-y: auto;
  padding: 5px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--surface);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.2);
}

.header-search-suggestions[hidden] {
  display: none;
}

.header-search-suggestions a {
  display: block;
  padding: 9px 10px;
  border-radius: 4px;
  color: var(--text-soft);
}

.header-search-suggestions a:hover,
.header-search-suggestions a.active {
  color: var(--text);
  background: var(--surface-strong);
}

.header-search-suggestions strong,
.header-search-suggestions small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.header-search-suggestions strong {
  font-size: 11.5px;
}

.header-search-suggestions small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9.5px;
}

.search-page-shell {
  padding-top: 26px;
}

.search-page-bar {
  display: flex;
  gap: 9px;
  margin-bottom: 18px;
}

.search-page-bar input {
  min-width: 0;
  min-height: 42px;
  flex: 1;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--text);
  background: var(--surface);
  font-size: 13px;
}

.search-page-bar .button {
  min-width: 82px;
}

.search-page-meta {
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 11px;
}

.search-result-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.search-movie-card {
  min-width: 0;
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 15px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.search-movie-card:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-small);
  transform: translateY(-2px);
}

.search-movie-poster {
  position: relative;
  width: 132px;
  height: 182px;
  overflow: hidden;
  border-radius: 3px;
  background: var(--surface-strong);
}

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

.search-movie-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding: 3px 2px 1px 0;
}

.search-movie-title {
  overflow: hidden;
  color: var(--text);
  font-size: 16px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-movie-meta {
  margin-top: 7px;
  color: var(--muted);
  font-size: 10.5px;
}

.search-movie-actors {
  display: block;
  overflow: hidden;
  margin-top: 7px;
  color: var(--text-soft);
  font-size: 10.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-movie-actors b {
  margin-right: 5px;
  color: var(--text);
}

.search-movie-intro {
  display: -webkit-box;
  overflow: hidden;
  margin-top: 7px;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.65;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.search-movie-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 9px;
}

.search-movie-foot em {
  overflow: hidden;
  color: var(--muted);
  font-size: 9.5px;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-movie-foot > b {
  color: #dfa21c;
  font-size: 12px;
}

.search-empty {
  min-height: 360px;
  display: grid;
  place-items: center;
  align-content: center;
  padding: 36px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  text-align: center;
}

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

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

.search-empty h2 {
  margin: 15px 0 0;
  font-size: 18px;
}

.search-empty p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 11px;
}

@media (max-width: 1040px) {
  .search-result-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .search-page-shell {
    padding-top: 18px;
  }
  .search-page-bar .button {
    min-width: 68px;
    padding: 0 13px;
  }
  .search-movie-card {
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 11px;
    padding: 10px;
  }
  .search-movie-poster {
    width: 96px;
    height: 136px;
  }
  .search-movie-title {
    font-size: 14px;
  }
  .search-movie-intro {
    -webkit-line-clamp: 2;
  }
}

.account-logout-button:hover {
  border-color: var(--danger);
  color: var(--danger);
  background: color-mix(in srgb, var(--danger) 16%, var(--surface));
}

@media (max-width: 700px) {
  .account-shell {
    width: calc(100% - 28px);
  }
  .header-favorite-button {
    min-width: 54px;
    min-height: 38px;
    padding: 0 9px;
    font-size: 10.5px;
  }
}

.detail-hero {
  position: relative;
}

.detail-favorite-corner {
  position: absolute;
  right: 24px;
  bottom: 22px;
}

.header-favorite-button {
  min-width: 62px;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--text-soft);
  background: var(--surface);
  font-size: 11px;
  font-weight: 650;
}

.header-favorite-button:hover {
  color: var(--yellow, #d99b16);
  border-color: var(--line-strong);
  background: var(--surface-strong);
}

.favorites-page-head {
  margin-bottom: 16px;
}

.favorites-page-head h1 {
  margin-top: 0;
}

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

.favorites-tabs {
  display: flex;
  align-items: center;
  gap: 7px;
  overflow-x: auto;
  scrollbar-width: none;
}

.favorites-tabs::-webkit-scrollbar {
  display: none;
}

.favorites-tabs a {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex: 0 0 auto;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--text-soft);
  background: var(--surface);
  font-size: 11px;
}

.favorites-tabs a.active {
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 52%, var(--line));
  background: var(--accent-soft);
}

.favorites-tabs b {
  min-width: 19px;
  padding: 1px 5px;
  border-radius: 999px;
  color: var(--muted);
  background: var(--surface-strong);
  font-size: 9px;
  text-align: center;
}

.favorites-tabs a.active b {
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 16%, var(--surface));
}

.favorites-search {
  display: flex;
  align-items: center;
  gap: 7px;
  flex: 0 0 auto;
}

.favorites-search input {
  width: 230px;
  min-height: 36px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--text);
  background: var(--surface);
  font-size: 11px;
}

.favorites-search .button {
  min-height: 36px;
  padding: 0 14px;
  font-size: 11px;
}

.favorites-result-head {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 11px;
}

.favorites-result-head a {
  color: var(--accent);
}

.favorite-card {
  min-height: 190px;
  grid-template-columns: 132px minmax(0, 1fr);
  padding: 12px;
}

.favorite-poster {
  width: 132px;
  height: 182px;
}

.favorite-card-body {
  position: relative;
  padding-right: 74px;
}

.favorite-cancel {
  position: absolute;
  top: 0;
  right: 0;
  min-height: 28px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--muted);
  background: var(--surface-soft);
  cursor: pointer;
  font-size: 9.5px;
}

.favorite-cancel:hover {
  color: var(--danger);
  border-color: color-mix(in srgb, var(--danger) 35%, var(--line));
}

.favorite-card-title {
  margin-top: 2px;
  font-size: 15px;
}

.favorite-card-meta {
  margin-top: 6px;
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.favorite-card-body > p {
  margin-top: 7px;
  line-height: 1.65;
}

.favorite-card-body > p strong {
  color: var(--text-soft);
  font-weight: 650;
}

.favorite-card-synopsis {
  -webkit-line-clamp: 3;
}

.favorite-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 10px;
}

.favorite-card-footer span {
  color: var(--muted);
  font-size: 9.5px;
}

.favorite-card-footer b {
  color: #dfa21c;
  font-size: 11px;
}

@media (max-width: 900px) {
  .favorites-toolbar {
    align-items: stretch;
    flex-direction: column;
  }
  .favorites-search {
    width: 100%;
  }
  .favorites-search input {
    width: auto;
    flex: 1;
  }
}

@media (max-width: 640px) {
  .detail-favorite-corner {
    position: static;
    margin-top: 14px;
  }
  .detail-favorite-corner .favorite-button {
    width: 100%;
  }
  .favorites-page-head {
    align-items: flex-start;
    flex-direction: column;
  }
  .favorites-tabs {
    width: 100%;
  }
  .favorite-card {
    grid-template-columns: 96px minmax(0, 1fr);
    min-height: 148px;
    padding: 10px;
  }
  .favorite-poster {
    width: 96px;
    height: 136px;
  }
  .favorite-card-body {
    padding-right: 0;
  }
  .favorite-cancel {
    position: static;
    margin-bottom: 8px;
  }
}

/* Operations console */
body[data-page^="admin"] {
  background: var(--bg);
}

.admin-layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 244px minmax(0, 1fr);
}

.admin-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 18px 14px;
  border-right: 1px solid var(--line);
  background: var(--surface);
}

.admin-brand {
  min-height: 58px;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 9px;
  margin-bottom: 18px;
}

.admin-brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  flex: 0 0 38px;
  border-radius: 6px;
  color: var(--bg);
  background: var(--text);
  font-size: 12px;
  font-weight: 800;
}

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

.admin-brand strong {
  max-width: 166px;
  overflow: hidden;
  color: var(--text);
  font-size: 15px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.admin-nav {
  display: grid;
  gap: 5px;
}

.admin-nav a {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 11px;
  border: 1px solid transparent;
  border-radius: 5px;
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 650;
  transition: color .16s ease, background .16s ease, border-color .16s ease;
}

.admin-nav a:hover {
  color: var(--text);
  background: var(--surface-soft);
}

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

.admin-nav svg {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
}

.admin-nav em {
  min-width: 22px;
  margin-left: auto;
  padding: 1px 6px;
  border-radius: 999px;
  color: var(--muted);
  background: var(--surface);
  font-size: 10px;
  font-style: normal;
  text-align: center;
}

.admin-sidebar-footer {
  margin-top: auto;
  padding: 14px 9px 2px;
  border-top: 1px solid var(--line);
}

.admin-identity {
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-avatar {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  flex: 0 0 32px;
  border-radius: 5px;
  color: var(--accent);
  background: var(--accent-soft);
  font-size: 12px;
  font-weight: 800;
}

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

.admin-identity strong {
  font-size: 12px;
}

.admin-identity small {
  color: var(--muted);
  font-size: 10px;
}

.admin-footer-actions {
  display: flex;
  gap: 12px;
  margin-top: 12px;
}

.admin-footer-actions a,
.admin-footer-actions button {
  padding: 0;
  border: 0;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-size: 11px;
}

.admin-footer-actions a:hover,
.admin-footer-actions button:hover {
  color: var(--text);
}

.admin-main {
  min-width: 0;
}

.admin-topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 0 28px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 93%, transparent);
  backdrop-filter: blur(16px);
}

.admin-topbar-title {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 12px;
}

.admin-topbar-title span {
  color: var(--muted);
}

.admin-topbar-title span::after {
  content: "/";
  margin-left: 9px;
  color: var(--line-strong);
}

.admin-topbar-title strong {
  color: var(--text);
  font-weight: 700;
}

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

.admin-icon-link {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--text-soft);
  background: var(--surface);
  font-size: 11px;
}

.admin-icon-link:hover {
  color: var(--text);
  border-color: var(--line-strong);
}

.admin-icon-link svg {
  width: 15px;
  height: 15px;
}

.admin-content {
  width: min(1480px, 100%);
  margin: 0 auto;
  padding: 28px 30px 64px;
}

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

.admin-page-head h1 {
  margin: 5px 0 0;
  color: var(--text);
  font-size: 28px;
  line-height: 1.2;
}

.admin-page-head p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.admin-page-head .back-link {
  margin: 0 0 8px;
}

.admin-eyebrow {
  color: var(--accent);
  font-size: 9.5px;
  font-weight: 750;
  letter-spacing: 1.2px;
}

.admin-page-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

.admin-page-actions .button {
  gap: 7px;
}

.admin-page-actions .button svg {
  width: 16px;
  height: 16px;
}

.admin-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

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

.admin-metric {
  min-width: 0;
  min-height: 104px;
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
}

.admin-metric-icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  flex: 0 0 40px;
  border-radius: 6px;
}

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

.admin-metric-icon.blue {
  color: #4f7cff;
  background: color-mix(in srgb, #4f7cff 14%, transparent);
}

.admin-metric-icon.green {
  color: #16a36a;
  background: color-mix(in srgb, #16a36a 14%, transparent);
}

.admin-metric-icon.violet {
  color: #8465e8;
  background: color-mix(in srgb, #8465e8 14%, transparent);
}

.admin-metric-icon.amber {
  color: #d98a14;
  background: color-mix(in srgb, #d98a14 14%, transparent);
}

.admin-metric small,
.admin-metric strong,
.admin-metric em {
  display: block;
}

.admin-metric small {
  color: var(--muted);
  font-size: 10.5px;
}

.admin-metric strong {
  margin: 2px 0;
  color: var(--text);
  font-size: 24px;
  line-height: 1.2;
}

.admin-metric em {
  overflow: hidden;
  color: var(--text-soft);
  font-size: 10px;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-panel {
  min-width: 0;
  margin-bottom: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
}

.admin-panel-head {
  min-height: 66px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}

.admin-panel-head h2 {
  margin: 0;
  color: var(--text);
  font-size: 15px;
  line-height: 1.3;
}

.admin-panel-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 10.5px;
}

.admin-text-link,
.admin-clear-link {
  color: var(--accent);
  font-size: 11px;
  font-weight: 650;
}

.admin-text-link:hover,
.admin-clear-link:hover {
  color: var(--accent-strong);
}

.admin-toolbar {
  min-height: 62px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 11px 18px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-soft);
}

.admin-search-field {
  min-width: 240px;
  max-width: 420px;
  min-height: 38px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface);
}

.admin-search-field svg {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  color: var(--muted);
}

.admin-search-field input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
  font-size: 12px;
}

.admin-toolbar select {
  min-height: 38px;
  padding: 0 32px 0 10px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--text-soft);
  background: var(--surface);
  font-size: 12px;
}

.admin-toolbar .button {
  min-height: 38px;
  font-size: 12px;
}

.admin-table-wrap {
  width: 100%;
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  min-width: 920px;
  border-collapse: collapse;
  font-size: 12px;
}

.admin-table th,
.admin-table td {
  padding: 12px 15px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

.admin-table th {
  color: var(--muted);
  background: var(--surface-soft);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .2px;
}

.admin-table tbody tr {
  transition: background .15s ease;
}

.admin-table tbody tr:hover {
  background: var(--surface-soft);
}

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

.admin-movie-cell,
.admin-user-cell {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-movie-cell > div:last-child,
.admin-user-cell > div:last-child {
  min-width: 0;
}

.admin-movie-cell strong,
.admin-user-cell strong,
.admin-cell-main,
.admin-table td small {
  display: block;
}

.admin-movie-cell strong,
.admin-user-cell strong {
  max-width: 240px;
  overflow: hidden;
  color: var(--text);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-movie-cell small,
.admin-user-cell small,
.admin-table td small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
}

.admin-cell-main {
  color: var(--text-soft);
}

.admin-thumb {
  width: 34px;
  height: 46px;
  overflow: hidden;
  flex: 0 0 34px;
  border-radius: 3px;
  background: var(--surface-strong);
}

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

.admin-row-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
}

.admin-row-actions .table-action {
  min-height: 30px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface);
  font-size: 10.5px;
}

.admin-row-actions .table-action:hover {
  border-color: var(--line-strong);
  background: var(--surface-strong);
}

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

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

.admin-user-avatar {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  flex: 0 0 34px;
  border-radius: 50%;
  color: var(--accent);
  background: var(--accent-soft);
}

.admin-user-avatar svg {
  width: 17px;
  height: 17px;
}

.admin-user-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.admin-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 18px;
  align-items: start;
}

.admin-detail-side {
  min-width: 0;
}

.admin-form-panel {
  overflow: visible;
}

.admin-form {
  padding: 18px;
}

.admin-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.admin-form-grid label > span {
  display: block;
  margin-bottom: 6px;
  color: var(--text-soft);
  font-size: 11px;
  font-weight: 650;
}

.admin-form-grid input:not([type="checkbox"]) {
  width: 100%;
  min-height: 40px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--text);
  background: var(--surface-soft);
}

.admin-form-grid input:disabled {
  color: var(--muted);
  cursor: not-allowed;
  opacity: .75;
}

.admin-form-divider {
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.admin-check {
  grid-column: 1 / -1;
  min-height: 40px;
  display: flex;
  align-items: center;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface-soft);
}

.admin-check > span {
  margin: 0 0 0 8px;
}

.admin-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.admin-facts {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 4px 18px 14px;
}

.admin-facts div {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}

.admin-facts div:last-child {
  border-bottom: 0;
}

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

.admin-facts dd {
  margin: 0;
  color: var(--text-soft);
  font-size: 11px;
  text-align: right;
}

.danger-zone {
  border-color: color-mix(in srgb, var(--danger) 35%, var(--line));
}

.danger-zone .admin-panel-head h2 {
  color: var(--danger);
}

.danger-zone form {
  padding: 16px 18px;
}

.danger-button {
  width: 100%;
  border-color: color-mix(in srgb, var(--danger) 45%, var(--line));
  color: var(--danger);
  background: var(--danger-soft);
}

.admin-content .edit-form {
  margin-top: 0;
}

.admin-content .form-section {
  margin-bottom: 16px;
  border-radius: 7px;
}

.admin-content .form-submit-bar {
  position: sticky;
  bottom: 14px;
  z-index: 20;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  box-shadow: var(--shadow-small);
  backdrop-filter: blur(12px);
}

@media (max-width: 1200px) {
  .admin-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .admin-detail-grid {
    grid-template-columns: minmax(0, 1fr) 280px;
  }
}

@media (max-width: 960px) {
  .admin-layout {
    grid-template-columns: 1fr;
  }
  .admin-sidebar {
    position: static;
    height: auto;
    padding: 12px 14px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .admin-brand {
    min-height: 44px;
    margin-bottom: 8px;
  }
  .admin-nav {
    display: flex;
    overflow-x: auto;
    gap: 6px;
    scrollbar-width: none;
  }
  .admin-nav::-webkit-scrollbar {
    display: none;
  }
  .admin-nav a {
    min-height: 36px;
    flex: 0 0 auto;
    padding: 0 10px;
  }
  .admin-nav em,
  .admin-sidebar-footer {
    display: none;
  }
  .admin-topbar {
    position: static;
    padding: 0 18px;
  }
  .admin-content {
    padding: 22px 16px 48px;
  }
  .admin-detail-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .admin-page-head {
    align-items: flex-start;
    flex-direction: column;
  }
  .admin-page-head h1 {
    font-size: 24px;
  }
  .admin-metrics,
  .admin-metrics.three {
    grid-template-columns: 1fr;
  }
  .admin-metric {
    min-height: 88px;
  }
  .admin-toolbar {
    align-items: stretch;
    flex-direction: column;
    padding: 12px;
  }
  .admin-search-field {
    min-width: 0;
    max-width: none;
    flex: none;
  }
  .admin-toolbar select,
  .admin-toolbar .button {
    width: 100%;
  }
  .admin-form-grid {
    grid-template-columns: 1fr;
  }
  .admin-check {
    grid-column: auto;
  }
  .admin-topbar-title span {
    display: none;
  }
  .admin-icon-link span {
    display: none;
  }
}

.email-code-row {
  display: flex !important;
  align-items: center;
  gap: 8px;
  margin-bottom: 0 !important;
}

.email-code-row input {
  min-width: 0;
  flex: 1;
}

.email-code-row .button {
  min-height: 42px;
  flex: 0 0 auto;
  white-space: nowrap;
}

.field-hint {
  display: block;
  min-height: 17px;
  margin-top: 6px;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.5;
}

.field-hint[data-state="success"] {
  color: var(--success);
}

.field-hint[data-state="error"] {
  color: var(--danger);
}

.account-shell {
  width: min(1220px, calc(100% - 40px));
  margin: 0 auto;
  padding: 34px 0 70px;
}

.account-page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}

.account-page-head h1 {
  margin: 5px 0 0;
  color: var(--text);
  font-size: 30px;
  line-height: 1.2;
}

.account-page-head p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.account-page-head .button {
  gap: 7px;
}

.account-page-head .button svg {
  width: 16px;
  height: 16px;
}

.account-layout {
  display: grid;
  grid-template-columns: 292px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.account-profile-panel,
.account-metric,
.account-info-panel,
.account-security-panel {
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
}

.account-profile-panel {
  position: sticky;
  top: 112px;
  padding: 20px;
}

.account-profile-top {
  display: flex;
  align-items: center;
  gap: 13px;
}

.account-profile-panel .account-avatar {
  width: 58px;
  height: 58px;
  flex: 0 0 58px;
  border-radius: 8px;
  color: var(--bg);
  background: var(--text);
  font-size: 23px;
}

.account-profile-title {
  min-width: 0;
}

.account-profile-title strong,
.account-profile-title span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-profile-title strong {
  color: var(--text);
  font-size: 17px;
}

.account-profile-title span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10.5px;
}

.account-status-badge {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 16px;
  padding: 0 9px;
  border: 1px solid color-mix(in srgb, var(--success) 32%, var(--line));
  border-radius: 4px;
  color: var(--success);
  background: var(--success-soft);
  font-size: 10.5px;
  font-weight: 650;
}

.account-status-badge i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
}

.account-profile-facts {
  display: grid;
  gap: 0;
  margin: 18px 0 0;
  padding: 0;
}

.account-profile-facts div {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 10px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.account-profile-facts dt {
  color: var(--muted);
  font-size: 10.5px;
}

.account-profile-facts dd {
  margin: 0;
  overflow: hidden;
  color: var(--text-soft);
  font-size: 10.5px;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-profile-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-top: 16px;
}

.account-profile-actions .button {
  width: 100%;
  min-height: 38px;
  padding: 0 10px;
  font-size: 11px;
}

.account-main {
  min-width: 0;
}

.account-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.account-metric {
  min-width: 0;
  min-height: 106px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
}

.account-metric-icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  flex: 0 0 40px;
  border-radius: 6px;
}

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

.account-metric-icon.blue {
  color: #4f7cff;
  background: color-mix(in srgb, #4f7cff 14%, transparent);
}

.account-metric-icon.green {
  color: #16a36a;
  background: color-mix(in srgb, #16a36a 14%, transparent);
}

.account-metric-icon.violet {
  color: #8465e8;
  background: color-mix(in srgb, #8465e8 14%, transparent);
}

.account-metric small,
.account-metric strong,
.account-metric em {
  display: block;
}

.account-metric small {
  color: var(--muted);
  font-size: 10.5px;
}

.account-metric strong {
  margin: 2px 0;
  color: var(--text);
  font-size: 18px;
}

.account-metric em {
  overflow: hidden;
  color: var(--text-soft);
  font-size: 10px;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-info-panel,
.account-security-panel {
  margin-top: 14px;
  overflow: hidden;
}

.account-panel-head {
  min-height: 64px;
  display: flex;
  align-items: center;
  padding: 13px 18px;
  border-bottom: 1px solid var(--line);
}

.account-panel-head h2 {
  margin: 0;
  color: var(--text);
  font-size: 15px;
}

.account-panel-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 10.5px;
}

.account-info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 4px 18px 16px;
}

.account-info-row {
  min-width: 0;
  padding: 14px 12px 14px 0;
  border-bottom: 1px solid var(--line);
}

.account-info-row:nth-last-child(-n+2) {
  border-bottom: 0;
}

.account-info-row:nth-child(odd) {
  margin-right: 18px;
  border-right: 1px solid var(--line);
}

.account-info-row span,
.account-info-row strong {
  display: block;
}

.account-info-row span {
  color: var(--muted);
  font-size: 10.5px;
}

.account-info-row strong {
  margin-top: 6px;
  overflow: hidden;
  color: var(--text-soft);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-verified {
  color: var(--success) !important;
}

.account-unverified,
.warning-text {
  color: var(--warning) !important;
}

.account-security-list {
  display: grid;
}

.account-security-list > div {
  min-height: 76px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 18px;
  border-bottom: 1px solid var(--line);
}

.account-security-list > div:last-child {
  border-bottom: 0;
}

.security-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  flex: 0 0 34px;
  border-radius: 6px;
  color: var(--text-soft);
  background: var(--surface-strong);
}

.security-icon.success {
  color: var(--success);
  background: var(--success-soft);
}

.security-icon.warning {
  color: var(--warning);
  background: color-mix(in srgb, var(--warning) 14%, transparent);
}

.security-icon svg {
  width: 17px;
  height: 17px;
}

.account-security-list > div > div {
  min-width: 0;
  flex: 1;
}

.account-security-list strong,
.account-security-list p {
  display: block;
  margin: 0;
}

.account-security-list strong {
  color: var(--text);
  font-size: 12px;
}

.account-security-list p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 10.5px;
}

.account-security-list em {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
}

@media (max-width: 980px) {
  .account-layout {
    grid-template-columns: 1fr;
  }
  .account-profile-panel {
    position: static;
  }
}

.account-avatar-form {
  display: block;
}

.account-avatar-form .account-profile-top {
  margin-bottom: 0;
}

.account-avatar-save {
  width: 100%;
  min-height: 36px;
  margin-top: 11px;
  font-size: 10.5px;
}

.account-summary-list {
  display: grid;
  margin-top: 16px;
  border-top: 1px solid var(--line);
}

.account-summary-list > div {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.account-summary-list span,
.account-summary-list strong {
  display: block;
}

.account-summary-list span {
  grid-column: 1;
  color: var(--muted);
  font-size: 9.5px;
}

.account-summary-list strong {
  grid-column: 1;
  margin-top: 4px;
  overflow: hidden;
  color: var(--text-soft);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-summary-list button {
  grid-column: 2;
  grid-row: 1 / span 2;
  padding: 5px 8px;
  border: 0;
  border-radius: 4px;
  color: var(--accent);
  background: var(--accent-soft);
  cursor: pointer;
  font-size: 10px;
  font-weight: 650;
}

.account-summary-list button:hover {
  color: var(--accent-strong);
}

.account-dialog {
  width: min(470px, calc(100% - 28px));
  max-width: none;
  padding: 0;
  border: 0;
  border-radius: 8px;
  color: var(--text);
  background: transparent;
}

.account-dialog::backdrop {
  background: rgba(7, 10, 16, 0.62);
  backdrop-filter: blur(3px);
}

.account-dialog-card {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
}

.account-dialog-card header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.account-dialog-card h2 {
  margin: 0;
  color: var(--text);
  font-size: 17px;
}

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

.account-dialog-card header button {
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--muted);
  background: var(--surface-soft);
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
}

.account-dialog-card > label {
  display: block;
  margin-top: 13px;
}

.account-dialog-card > label > span:first-child {
  display: block;
  margin-bottom: 6px;
  color: var(--text-soft);
  font-size: 10.5px;
  font-weight: 650;
}

.account-dialog-card > label > input {
  width: 100%;
  min-height: 42px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--text);
  background: var(--surface-soft);
}

.account-dialog-card footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 18px;
  padding-top: 15px;
  border-top: 1px solid var(--line);
}

@media (max-width: 520px) {
  .account-dialog-card {
    padding: 16px;
  }
  .account-dialog-card footer .button {
    flex: 1;
  }
}

.resource-verification-form .resource-slider-stage.resource-simple-slider {
  height: 58px;
  display: block;
  gap: 0;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

@media (max-width: 520px) {
  .resource-verification-form .resource-slider-stage.resource-simple-slider {
    height: 52px;
  }
}

.resource-verification-card::before {
  display: none;
}

.resource-challenge-body[data-resource-kind="slider"] .resource-captcha-prompt-bar {
  order: 1;
  min-height: 40px;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.resource-challenge-body[data-resource-kind="slider"] .resource-challenge-prompt {
  color: #f5f6f7;
  font-size: 16px;
}

.resource-challenge-body[data-resource-kind="slider"] .resource-captcha-visual {
  order: 2;
}

.resource-challenge-body[data-resource-kind="slider"] .resource-simple-slider {
  order: 3;
}

.resource-puzzle-notch,
.resource-puzzle-piece {
  border: 0;
  border-radius: 0;
  clip-path: polygon(
    0 18%,
    20% 0,
    44% 12%,
    58% 2%,
    100% 18%,
    88% 86%,
    63% 100%,
    38% 91%,
    13% 100%,
    0 68%
  );
}

.resource-puzzle-notch {
  background: rgba(8, 12, 18, .72);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .9);
}

.resource-puzzle-piece {
  box-shadow: 0 8px 20px rgba(0, 0, 0, .36);
}

.resource-simple-slider {
  position: relative;
  width: 100%;
  height: 58px;
  display: block;
  padding: 0;
  border: 0;
  background: transparent;
}

.resource-simple-slider::before {
  position: absolute;
  top: 18px;
  right: 0;
  left: 0;
  height: 22px;
  border-radius: 999px;
  background: #393d43;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, .35);
  content: "";
}

.resource-simple-slider input[type="range"] {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 58px;
  margin: 0;
  appearance: none;
  background: transparent;
  cursor: grab;
}

.resource-simple-slider input[type="range"]:active {
  cursor: grabbing;
}

.resource-simple-slider input[type="range"]::-webkit-slider-runnable-track {
  height: 58px;
  background: transparent;
}

.resource-simple-slider input[type="range"]::-webkit-slider-thumb {
  width: 64px;
  height: 46px;
  margin-top: 6px;
  appearance: none;
  border: 0;
  background: transparent;
}

.resource-simple-slider input[type="range"]::-moz-range-track {
  height: 58px;
  background: transparent;
}

.resource-simple-slider input[type="range"]::-moz-range-thumb {
  width: 64px;
  height: 46px;
  border: 0;
  background: transparent;
}

.resource-slider-pill {
  position: absolute;
  top: 4px;
  left: 0;
  z-index: 3;
  width: 64px;
  height: 50px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  background: #4578ff;
  box-shadow: 0 7px 18px rgba(34, 84, 214, .42);
  pointer-events: none;
  font-size: 24px;
  font-weight: 800;
  transition: left .05s linear;
}

.resource-simple-slider input[type="range"]:focus-visible + .resource-slider-pill {
  outline: 3px solid rgba(105, 150, 255, .48);
  outline-offset: 2px;
}

@media (max-width: 520px) {
  .resource-simple-slider {
    height: 52px;
  }
  .resource-simple-slider::before {
    top: 17px;
    height: 18px;
  }
  .resource-slider-pill {
    top: 2px;
    width: 56px;
    height: 46px;
    font-size: 21px;
  }
  .resource-simple-slider input[type="range"],
  .resource-simple-slider input[type="range"]::-webkit-slider-runnable-track {
    height: 52px;
  }
  .resource-simple-slider input[type="range"]::-webkit-slider-thumb,
  .resource-simple-slider input[type="range"]::-moz-range-thumb {
    width: 56px;
    height: 42px;
  }
}

.resource-object-scene {
  position: absolute;
  inset: 0;
}

.resource-captcha-visual > .resource-object-scene,
.resource-captcha-visual > .resource-sequence-scene,
.resource-captcha-visual > .resource-puzzle-scene {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.resource-object-hit {
  position: absolute;
  left: var(--object-left);
  top: var(--object-top);
  z-index: 2;
  width: 62px;
  height: 68px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 8px;
  outline: 0;
  background: transparent;
  cursor: pointer;
  transform: translate(-50%, -50%) rotate(var(--object-rotate));
}

.resource-object-hit::after {
  position: absolute;
  right: 10px;
  bottom: 2px;
  left: 10px;
  height: 9px;
  border-radius: 50%;
  background: rgba(38, 45, 55, .2);
  filter: blur(3px);
  content: "";
}

.resource-object-hit:hover .resource-3d-object,
.resource-object-hit:focus-visible .resource-3d-object {
  filter: brightness(1.08);
  transform: translateY(-2px);
}

.resource-object-hit.selected {
  background: rgba(78, 127, 255, .1);
  box-shadow: 0 0 0 2px #4e7fff;
}

.resource-3d-object {
  --object-size: 54px;
  position: relative;
  z-index: 1;
  display: block;
  transition: transform .15s ease, filter .15s ease;
  filter: drop-shadow(0 7px 5px rgba(26, 34, 46, .24));
  pointer-events: none;
}

.resource-3d-small {
  --object-size: 40px;
}

.resource-3d-large {
  --object-size: 62px;
}

.resource-3d-sphere {
  width: var(--object-size);
  height: var(--object-size);
  border-radius: 50%;
  background:
    radial-gradient(circle at 32% 26%, rgba(255, 255, 255, .94) 0 7%, transparent 18%),
    radial-gradient(circle at 38% 34%, var(--object-color) 0 22%, color-mix(in srgb, var(--object-color) 76%, #06101f) 74%, color-mix(in srgb, var(--object-color) 38%, #02060b) 100%);
}

.resource-3d-cone {
  width: calc(var(--object-size) * .94);
  height: calc(var(--object-size) * 1.12);
  background:
    linear-gradient(105deg, color-mix(in srgb, var(--object-color) 48%, #fff), var(--object-color) 42%, color-mix(in srgb, var(--object-color) 56%, #000));
  clip-path: polygon(50% 0, 100% 92%, 86% 100%, 50% 89%, 14% 100%, 0 92%);
}

.resource-3d-cylinder {
  width: calc(var(--object-size) * .72);
  height: calc(var(--object-size) * .98);
  border-radius: 50% / 17%;
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--object-color) 52%, #000), color-mix(in srgb, var(--object-color) 72%, #fff) 42%, var(--object-color) 68%, color-mix(in srgb, var(--object-color) 58%, #000));
}

.resource-3d-cylinder::before {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 22%;
  border-radius: 50%;
  background: color-mix(in srgb, var(--object-color) 76%, #fff);
  box-shadow: inset 0 -2px 4px rgba(0, 0, 0, .12);
  content: "";
}

.resource-3d-cube {
  width: calc(var(--object-size) * .84);
  height: calc(var(--object-size) * .84);
  background: linear-gradient(135deg, color-mix(in srgb, var(--object-color) 74%, #fff), var(--object-color));
  clip-path: polygon(18% 0, 100% 0, 100% 82%, 82% 100%, 0 100%, 0 18%);
}

.resource-3d-cube::before,
.resource-3d-cube::after {
  position: absolute;
  content: "";
}

.resource-3d-cube::before {
  top: 0;
  left: 0;
  width: 18%;
  height: 100%;
  background: color-mix(in srgb, var(--object-color) 58%, #000);
  clip-path: polygon(0 18%, 100% 0, 100% 100%, 0 100%);
}

.resource-3d-cube::after {
  right: 0;
  bottom: 0;
  left: 0;
  height: 18%;
  background: color-mix(in srgb, var(--object-color) 52%, #000);
  clip-path: polygon(0 0, 100% 0, 82% 100%, 0 100%);
}

@media (max-width: 520px) {
  .resource-object-hit {
    width: 58px;
    height: 64px;
  }
  .resource-3d-object {
    --object-size: 45px;
  }
  .resource-3d-small {
    --object-size: 34px;
  }
  .resource-3d-large {
    --object-size: 52px;
  }
}

.account-profile-panel {
  padding: 22px;
}

.account-profile-top {
  align-items: flex-start;
}

.account-profile-panel .account-avatar,
.account-avatar-upload,
.account-avatar-upload img,
.account-avatar-upload .account-avatar {
  width: 66px;
  height: 66px;
  flex-basis: 66px;
}

.account-profile-title {
  padding-top: 3px;
}

.account-profile-title strong {
  font-size: 18px;
}

.account-profile-title small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 9.5px;
}

.account-avatar-help {
  margin-top: 10px;
}

.account-setting-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-top: 20px;
  padding-top: 17px;
  border-top: 1px solid var(--line);
}

.account-setting-head strong {
  color: var(--text);
  font-size: 12px;
}

.account-setting-head span {
  color: var(--muted);
  font-size: 9.5px;
}

.account-setting-list {
  display: grid;
  gap: 6px;
  margin-top: 10px;
}

.account-setting-row {
  width: 100%;
  min-width: 0;
  min-height: 56px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--text);
  background: var(--surface-soft);
  cursor: pointer;
  text-align: left;
  transition: border-color .16s ease, background .16s ease, transform .16s ease;
}

.account-setting-row:hover {
  border-color: var(--line-strong);
  background: var(--surface-strong);
  transform: translateX(2px);
}

.account-setting-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 5px;
  color: var(--accent);
  background: var(--accent-soft);
}

.account-setting-icon svg {
  width: 17px;
  height: 17px;
}

.account-setting-copy {
  min-width: 0;
}

.account-setting-copy small,
.account-setting-copy strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-setting-copy small {
  color: var(--muted);
  font-size: 9.5px;
}

.account-setting-copy strong {
  margin-top: 3px;
  color: var(--text-soft);
  font-size: 11px;
  font-weight: 650;
}

.account-setting-arrow {
  width: 16px;
  height: 16px;
  color: var(--muted);
}

.account-profile-panel > .account-status-badge {
  margin-top: 14px;
}

.account-avatar-save {
  display: none;
}

.user-menu {
  position: relative;
  flex: 0 0 auto;
}

.user-menu-trigger {
  min-height: 40px;
  max-width: 170px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--text-soft);
  background: var(--surface);
  cursor: pointer;
}

.user-menu-trigger:hover,
.user-menu-trigger[aria-expanded="true"] {
  color: var(--text);
  border-color: var(--line-strong);
  background: var(--surface-strong);
}

.user-menu-trigger > img,
.user-menu-initial {
  width: 26px;
  height: 26px;
  flex: 0 0 26px;
  border-radius: 50%;
}

.user-menu-trigger > img {
  object-fit: cover;
}

.user-menu-initial {
  display: grid;
  place-items: center;
  color: var(--accent);
  background: var(--accent-soft);
  font-size: 10px;
  font-weight: 800;
}

.user-menu-name {
  min-width: 0;
  overflow: hidden;
  font-size: 12px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-menu-trigger > svg {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  color: var(--muted);
  transition: transform .16s ease;
}

.user-menu-trigger[aria-expanded="true"] > svg {
  transform: rotate(180deg);
}

.user-dropdown {
  position: absolute;
  top: calc(100% + 9px);
  right: 0;
  z-index: 80;
  width: 208px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--surface);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.22);
}

.user-dropdown[hidden] {
  display: none;
}

.user-dropdown-head {
  padding: 14px 15px 12px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-soft);
}

.user-dropdown-head strong,
.user-dropdown-head span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-dropdown-head strong {
  color: var(--text);
  font-size: 12px;
}

.user-dropdown-head span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
}

.user-dropdown-links {
  padding: 6px;
}

.user-dropdown a,
.user-dropdown-logout button {
  width: 100%;
  min-height: 38px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 10px;
  border: 0;
  border-radius: 4px;
  color: var(--text-soft);
  background: transparent;
  cursor: pointer;
  font-size: 11px;
  text-align: left;
}

.user-dropdown a:hover,
.user-dropdown-logout button:hover {
  color: var(--text);
  background: var(--surface-strong);
}

.user-dropdown a svg,
.user-dropdown-logout button svg {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  color: var(--muted);
}

.user-dropdown-logout {
  padding: 6px;
  border-top: 1px solid var(--line);
}

.user-dropdown-logout button {
  color: var(--danger);
}

.user-dropdown-logout button svg {
  color: var(--danger);
}

@media (max-width: 780px) {
  .user-menu-trigger {
    max-width: 126px;
  }
  .user-menu-name {
    max-width: 62px;
  }
  .user-dropdown {
    position: fixed;
    top: 118px;
    right: 14px;
  }
}

@media (max-width: 700px) {
  .account-shell {
    width: calc(100% - 28px);
    padding-top: 24px;
  }
  .account-page-head {
    align-items: flex-start;
    flex-direction: column;
  }
  .account-page-head h1 {
    font-size: 26px;
  }
  .account-metrics {
    grid-template-columns: 1fr;
  }
  .account-info-grid {
    grid-template-columns: 1fr;
  }
  .account-info-row,
  .account-info-row:nth-child(odd) {
    margin-right: 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .account-info-row:last-child {
    border-bottom: 0;
  }
}

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

.account-profile-form {
  display: block;
}

.account-avatar-upload {
  position: relative;
  width: 58px;
  height: 58px;
  flex: 0 0 58px;
  cursor: pointer;
}

.account-avatar-upload input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
}

.account-avatar-upload img,
.account-avatar-upload .account-avatar {
  width: 58px;
  height: 58px;
  border-radius: 8px;
  object-fit: cover;
}

.account-avatar-upload em {
  position: absolute;
  right: -4px;
  bottom: -4px;
  padding: 2px 6px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--text-soft);
  background: var(--surface);
  font-size: 9px;
  font-style: normal;
  line-height: 1.4;
}

.account-avatar-help {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 9.5px;
}

.account-edit-fields {
  display: grid;
  gap: 12px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.account-edit-fields label > span:first-child {
  display: block;
  margin-bottom: 6px;
  color: var(--text-soft);
  font-size: 10.5px;
  font-weight: 650;
}

.account-edit-fields input {
  width: 100%;
  min-height: 40px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--text);
  background: var(--surface-soft);
  font-size: 11.5px;
}

.account-email-code-row {
  display: flex !important;
  align-items: center;
  gap: 7px;
  margin: 0 !important;
}

.account-email-code-row input {
  min-width: 0;
  flex: 1;
}

.account-email-code-row .button {
  min-height: 40px;
  flex: 0 0 auto;
  padding: 0 10px;
  font-size: 10.5px;
}

.account-save-button {
  width: 100%;
  margin-top: 15px;
}

@media (max-width: 980px) {
  .account-layout {
    grid-template-columns: 1fr;
  }
  .account-profile-panel {
    position: static;
  }
}

/* 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 {
  border-radius: 0 !important;
}

button,
.button,
.text-action,
.icon-button,
.main-nav a,
.filter-options a,
.pagination a,
.pagination span,
.tag-list a,
.tag-list span {
  border-radius: 4px !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: 80px;
  gap: 30px;
}

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

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

.main-nav {
  gap: 30px;
  font-size: 16px;
  font-weight: 600;
}

.main-nav a {
  min-height: 0;
  display: block;
  padding: 27px 0 23px;
  border: 0;
  color: var(--text-soft);
  background: transparent;
  transition: color .16s ease, background .16s ease, border-color .16s ease;
}

.main-nav a:hover {
  color: var(--text);
  background: transparent;
}

.main-nav a.active {
  color: var(--text);
  background: transparent;
  font-weight: 750;
}

.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);
}

.resource-honeypot {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: auto;
}

.resource-verification-dialog {
  width: min(520px, calc(100% - 28px));
}

.resource-verification-card {
  max-height: min(780px, calc(100vh - 32px));
  padding: 0;
  overflow-y: auto;
}

.resource-verification-header {
  align-items: center !important;
  margin: 0 !important;
  padding: 18px 20px 15px !important;
  background: var(--surface);
}

.resource-security-heading {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.resource-security-heading > div {
  min-width: 0;
}

.resource-security-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  flex: 0 0 42px;
  border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--line));
  border-radius: 7px;
  color: var(--accent);
  background: var(--accent-soft);
}

.resource-security-mark svg {
  width: 24px;
  height: 24px;
  margin: 0;
  stroke-width: 1.9;
}

.resource-verification-header h2 {
  font-size: 18px;
}

.resource-verification-header p {
  margin-top: 3px !important;
  font-size: 11px !important;
}

.resource-verification-header > button {
  flex: 0 0 32px;
}

.resource-verification-form {
  display: grid;
  gap: 13px;
  padding: 15px 20px 18px;
}

.resource-verification-status {
  margin: 0 20px;
  padding: 10px 12px;
  border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--line));
  border-radius: 6px;
  color: var(--accent-strong);
  background: var(--accent-soft);
  font-size: 11.5px;
  line-height: 1.45;
}

.resource-verification-status[data-state="error"] {
  border-color: color-mix(in srgb, #dc2626 32%, var(--line));
  color: #dc2626;
  background: color-mix(in srgb, #dc2626 8%, var(--surface));
}

.resource-challenge-body {
  min-height: 250px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 16px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-soft);
  overflow: hidden;
}

.resource-prompt-block {
  display: grid;
  gap: 9px;
}

.resource-challenge-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

.resource-challenge-type,
.resource-challenge-expiry {
  min-height: 22px;
  display: inline-flex;
  align-items: center;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 9.5px;
  font-weight: 700;
}

.resource-challenge-type {
  color: var(--accent-strong);
  background: var(--accent-soft);
}

.resource-challenge-expiry {
  color: var(--muted);
  background: var(--surface);
}

.resource-challenge-prompt {
  margin: 0;
  color: var(--text);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.5;
  text-align: center;
}

.resource-equation-stage {
  display: grid;
  place-items: center;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
}

.resource-equation {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.resource-equation-number,
.resource-equation-unknown {
  min-width: 45px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--text);
  background: var(--surface-soft);
  font-size: 22px;
  font-weight: 800;
}

.resource-equation-unknown {
  border-color: color-mix(in srgb, var(--accent) 42%, var(--line));
  color: var(--accent);
  background: var(--accent-soft);
}

.resource-equation-operator {
  color: var(--muted);
  font-size: 18px;
  font-weight: 700;
}

.resource-answer-console {
  display: grid;
  gap: 10px;
}

.resource-answer-display {
  display: grid;
  gap: 6px;
  justify-items: center;
}

.resource-answer-display > span {
  color: var(--muted);
  font-size: 9.5px;
  font-weight: 650;
}

.resource-answer-display input {
  width: min(210px, 100%);
  min-height: 48px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 6px;
  outline: 0;
  color: var(--text);
  background: var(--surface);
  text-align: center;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 2px;
}

.resource-answer-display input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 14%, transparent);
}

.resource-keypad {
  width: min(260px, 100%);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  justify-self: center;
}

.resource-key {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--text);
  background: var(--surface);
  cursor: pointer;
  font-size: 15px;
  font-weight: 750;
}

.resource-key:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.resource-key:active,
.resource-choice:active,
.resource-sequence-tile:active {
  transform: translateY(1px);
}

.resource-key-utility {
  color: var(--text-soft);
  font-size: 11px;
}

.resource-choice {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--text);
  background: var(--surface);
  cursor: pointer;
  transition: border-color .16s ease, background .16s ease, transform .12s ease;
}

.resource-choice:hover {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent-soft) 58%, var(--surface));
}

.resource-choice.selected {
  border-color: var(--accent);
  color: var(--accent-strong);
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 36%, transparent);
}

.resource-choice-check {
  width: 20px;
  height: 20px;
  display: none;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--accent);
  font-size: 11px;
  font-weight: 800;
}

.resource-choice.selected .resource-choice-check {
  display: grid;
}

.resource-binary-grid,
.resource-color-grid,
.resource-direction-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.resource-number-stage {
  min-height: 96px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
}

.resource-number-caption {
  color: var(--muted);
  font-size: 9.5px;
}

.resource-number-value {
  color: var(--text);
  font-size: 42px;
  font-weight: 820;
  line-height: 1;
  letter-spacing: 1px;
}

.resource-binary-choice {
  min-height: 54px;
  font-size: 15px;
  font-weight: 750;
}

.resource-missing-sequence,
.resource-sum-tiles {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.resource-missing-card,
.resource-sum-tile {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--text);
  background: var(--surface);
  font-size: 20px;
  font-weight: 800;
}

.resource-missing-card.missing {
  border-style: dashed;
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}

.resource-sum-operator {
  color: var(--muted);
  font-size: 18px;
  font-weight: 700;
}

.resource-sum-tile.result {
  border-style: dashed;
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}

.resource-largest-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.resource-largest-choice {
  min-height: 102px;
  display: grid;
  grid-template-columns: 1fr 42px 20px;
  align-items: end;
  gap: 10px;
  padding: 12px;
  text-align: left;
}

.resource-largest-choice strong {
  align-self: center;
  font-size: 24px;
  font-weight: 800;
}

.resource-largest-bar {
  height: 62px;
  display: flex;
  align-items: flex-end;
  padding: 4px;
  border-radius: 4px;
  background: color-mix(in srgb, var(--accent) 8%, var(--surface-soft));
}

.resource-largest-bar > span {
  width: 100%;
  height: var(--resource-bar-height);
  display: block;
  border-radius: 2px;
  background: color-mix(in srgb, var(--accent) 72%, #7dd3fc);
}

.resource-largest-choice .resource-choice-check {
  align-self: start;
}

.resource-color-choice {
  min-height: 70px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 20px;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  text-align: left;
}

.resource-color-swatch {
  width: 30px;
  height: 30px;
  display: block;
  border: 2px solid color-mix(in srgb, #fff 72%, transparent);
  border-radius: 50%;
  background: var(--resource-swatch);
  box-shadow: 0 0 0 1px var(--line);
}

.resource-color-label {
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
}

.resource-direction-target {
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
}

.resource-direction-target span {
  color: var(--muted);
  font-size: 10px;
}

.resource-direction-target strong {
  color: var(--accent);
  font-size: 17px;
}

.resource-direction-choice {
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.resource-direction-choice strong {
  font-size: 25px;
  line-height: 1;
}

.resource-direction-choice span {
  color: var(--muted);
  font-size: 10px;
}

.resource-dot-board {
  position: relative;
  height: 126px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px),
    var(--surface);
  background-size: 26px 26px;
  overflow: hidden;
}

.resource-dot-board span {
  position: absolute;
  left: var(--dot-left);
  top: var(--dot-top);
  width: 13px;
  height: 13px;
  border: 2px solid color-mix(in srgb, var(--accent) 18%, #fff);
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 2px 5px color-mix(in srgb, var(--accent) 28%, transparent);
}

.resource-count-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
}

.resource-count-choice {
  min-height: 44px;
  font-size: 14px;
  font-weight: 750;
}

.resource-order-progress {
  display: flex;
  justify-content: center;
  gap: 7px;
}

.resource-order-slot {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px dashed var(--line-strong);
  border-radius: 5px;
  color: var(--muted);
  background: var(--surface);
  font-size: 11px;
  font-weight: 700;
}

.resource-order-slot.filled {
  border-style: solid;
  border-color: var(--accent);
  color: var(--accent-strong);
  background: var(--accent-soft);
}

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

.resource-sequence-tile {
  position: relative;
  min-height: 56px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--text);
  background: var(--surface);
  cursor: pointer;
  font-size: 21px;
  font-weight: 800;
  transition: border-color .16s ease, background .16s ease, transform .12s ease;
}

.resource-sequence-tile:hover {
  border-color: var(--accent);
}

.resource-sequence-tile.selected {
  border-color: var(--accent);
  color: var(--accent-strong);
  background: var(--accent-soft);
}

.resource-sequence-index {
  position: absolute;
  top: -6px;
  right: -5px;
  min-width: 19px;
  height: 19px;
  display: none;
  place-items: center;
  border: 2px solid var(--surface);
  border-radius: 50%;
  color: #fff;
  background: var(--accent);
  font-size: 9px;
}

.resource-sequence-tile.selected .resource-sequence-index {
  display: grid;
}

.resource-slider-stage {
  display: grid;
  gap: 11px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
}

.resource-slider-target-row,
.resource-slider-output-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.resource-slider-target-row span,
.resource-slider-output-row span {
  color: var(--muted);
  font-size: 10px;
}

.resource-slider-target-row strong {
  min-width: 42px;
  padding: 3px 8px;
  border-radius: 4px;
  color: var(--accent-strong);
  background: var(--accent-soft);
  font-size: 16px;
  text-align: center;
}

.resource-slider-output {
  color: var(--text);
  font-size: 20px;
  font-weight: 800;
}

.resource-slider-stage input[type="range"] {
  width: 100%;
  height: 8px;
  margin: 9px 0 4px;
  appearance: none;
  border-radius: 999px;
  outline: none;
  background: linear-gradient(
    to right,
    var(--accent) 0,
    var(--accent) var(--resource-slider-progress),
    color-mix(in srgb, var(--line) 78%, var(--surface)) var(--resource-slider-progress),
    color-mix(in srgb, var(--line) 78%, var(--surface)) 100%
  );
  cursor: pointer;
}

.resource-slider-stage input[type="range"]::-webkit-slider-thumb {
  width: 24px;
  height: 24px;
  appearance: none;
  border: 3px solid var(--surface);
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), 0 3px 9px rgba(0, 0, 0, .18);
}

.resource-slider-stage input[type="range"]::-moz-range-thumb {
  width: 19px;
  height: 19px;
  border: 3px solid var(--surface);
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), 0 3px 9px rgba(0, 0, 0, .18);
}

.resource-slider-stage input[type="range"]:focus-visible {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}

.resource-slider-scale {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 9px;
}

.resource-challenge-loading {
  display: grid;
  place-items: center;
  gap: 12px;
  color: var(--muted);
}

.resource-challenge-loading p {
  margin: 0;
  font-size: 11px;
}

.resource-loading-ring {
  width: 28px;
  height: 28px;
  border: 2px solid var(--line);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: resource-spin .75s linear infinite;
}

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

@keyframes resource-shake {
  0%, 100% { transform: translateX(0); }
  22% { transform: translateX(-5px); }
  44% { transform: translateX(5px); }
  66% { transform: translateX(-3px); }
  82% { transform: translateX(3px); }
}

.resource-challenge-body.resource-shake {
  animation: resource-shake .38s ease;
}

.resource-result {
  padding: 24px 18px;
  border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--line));
  border-radius: 7px;
  background: var(--accent-soft);
  text-align: center;
}

.resource-result-success {
  animation: resource-success-in .32s ease both;
}

.resource-result-mark {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  margin: 0 auto 10px;
  border-radius: 50%;
  color: #fff;
  background: var(--accent);
  box-shadow: 0 8px 20px color-mix(in srgb, var(--accent) 28%, transparent);
}

.resource-result-mark svg {
  width: 25px;
  height: 25px;
  margin: 0;
  stroke-width: 2.3;
}

@keyframes resource-success-in {
  from { opacity: 0; transform: translateY(5px) scale(.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.resource-result strong {
  display: block;
  color: var(--accent-strong);
  font-size: 17px;
}

.resource-result p {
  margin: 5px 0 16px;
  color: var(--text-soft);
  font-size: 11px;
}

.resource-result .button {
  min-height: 44px;
  gap: 8px;
}

.resource-result .button svg {
  width: 17px;
  height: 17px;
  margin: 0;
}

.resource-verification-form footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.resource-verification-form footer .button {
  min-height: 42px;
}

@media (prefers-reduced-motion: reduce) {
  .resource-loading-ring,
  .resource-challenge-body.resource-shake,
  .resource-result-success {
    animation: none !important;
  }
  .resource-choice,
  .resource-key,
  .resource-sequence-tile {
    transition: none !important;
  }
}

@media (max-width: 520px) {
  .resource-verification-dialog {
    width: min(100% - 20px, 520px);
  }
  .resource-verification-header {
    padding: 15px 15px 13px !important;
  }
  .resource-verification-form {
    padding: 13px 15px 15px;
  }
  .resource-verification-status {
    margin: 0 15px;
  }
  .resource-challenge-body {
    min-height: 235px;
    padding: 14px;
  }
  .resource-equation {
    gap: 5px;
  }
  .resource-equation-number,
  .resource-equation-unknown {
    min-width: 38px;
    height: 43px;
    font-size: 19px;
  }
  .resource-missing-card,
  .resource-sum-tile {
    width: 48px;
    height: 52px;
    font-size: 18px;
  }
  .resource-sequence-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .resource-count-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 380px) {
  .resource-binary-grid,
  .resource-color-grid,
  .resource-direction-grid,
  .resource-largest-grid {
    grid-template-columns: 1fr;
  }
  .resource-sum-tiles {
    gap: 5px;
  }
  .resource-sum-tile {
    width: 42px;
    height: 46px;
    font-size: 16px;
  }
}

@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: 24px;
  }
  .main-nav a {
    min-height: 38px;
    padding: 0 0 8px;
    font-size: 15px;
  }
  .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;
  }
  .resource-verification-form footer {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .resource-verification-form footer [data-resource-submit] {
    grid-column: span 2;
  }
  body[data-page="search"] .header-search {
    order: 5;
    width: 100%;
    max-width: none;
    display: flex;
    margin-top: 4px;
  }
}

.account-shell {
  width: min(var(--shell), calc(100% - 48px));
}

.account-profile-panel {
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow-small);
}

.account-profile-panel .account-profile-top {
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.account-profile-panel .account-avatar,
.account-avatar-upload,
.account-avatar-upload img,
.account-avatar-upload .account-avatar {
  width: 72px;
  height: 72px;
  flex-basis: 72px;
}

.account-avatar-upload em {
  right: -6px;
  bottom: -5px;
  padding: 3px 7px;
}

.account-setting-head {
  margin-top: 17px;
  padding-top: 0;
  border-top: 0;
}

.account-setting-row {
  background: var(--surface);
}

.account-profile-actions {
  display: block;
  margin-top: 14px;
}

.account-profile-actions form,
.account-logout-button {
  width: 100%;
}

.account-logout-button {
  border-color: color-mix(in srgb, var(--danger) 36%, var(--line));
  color: var(--danger);
  background: var(--danger-soft);
}

@media (max-width: 700px) {
  .account-shell {
    width: calc(100% - 28px);
  }
}

/* Keep inactive carousel captions fully hidden to prevent overlap. */
.home-carousel-slide {
  visibility: hidden;
  opacity: 0;
  z-index: 0;
}

.home-carousel-slide.active {
  visibility: visible;
  opacity: 1;
  z-index: 2;
}

.home-carousel-slide:not(.active) .home-carousel-caption {
  visibility: hidden;
  opacity: 0;
}

.home-carousel-slide.active .home-carousel-caption {
  visibility: visible;
  opacity: 1;
}

.home-carousel-slide:not(.active) {
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.home-carousel-slide.active {
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}

.banner-interval-form {
  min-height: 40px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface);
}

.banner-interval-form label {
  color: var(--muted);
  font-size: 10.5px;
}

.banner-interval-form > span {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--text-soft);
  font-size: 10.5px;
}

.banner-interval-form input {
  width: 54px;
  min-height: 30px;
  padding: 0 7px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--text);
  background: var(--surface-soft);
  text-align: center;
}

.banner-interval-form .button {
  min-height: 30px;
  padding: 0 9px;
  font-size: 10px;
}

.banner-dialog {
  width: min(620px, calc(100vw - 28px)) !important;
  max-width: calc(100vw - 28px) !important;
  overflow-x: hidden;
}

.banner-dialog .account-dialog-card {
  width: 100%;
  min-width: 0;
  overflow-x: hidden;
}

.banner-dialog input,
.banner-dialog select,
.banner-dialog .banner-movie-picker,
.banner-dialog .banner-preview {
  min-width: 0;
  max-width: 100%;
}

body[data-page="admin-banners"] {
  overflow-x: hidden;
}

@media (max-width: 640px) {
  .admin-page-head .admin-page-actions {
    width: 100%;
    align-items: stretch;
    flex-direction: column;
  }
  .banner-interval-form {
    flex-wrap: wrap;
    padding: 8px;
  }
  .banner-interval-form .button {
    margin-left: auto;
  }
}

/* Verification widget: dark floating window with an image-led challenge stage. */
.resource-verification-dialog {
  width: min(500px, calc(100% - 24px));
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: transparent;
}

.resource-verification-dialog::backdrop {
  background: rgba(5, 8, 13, .72);
  backdrop-filter: blur(4px);
}

.resource-verification-card {
  position: relative;
  width: 100%;
  max-height: min(800px, calc(100vh - 24px));
  padding: 0;
  border: 1px solid #35373b;
  border-radius: 12px;
  color: #f4f5f6;
  background: #202124;
  box-shadow: 0 28px 90px rgba(0, 0, 0, .55);
  overflow-x: hidden;
  overflow-y: auto;
}

.resource-verification-card::before {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  z-index: 4;
  height: 3px;
  border-radius: 12px 12px 0 0;
  background: #4e7fff;
  content: "";
}

.resource-verification-header {
  min-height: 64px;
  padding: 13px 14px 12px 16px !important;
  border-bottom: 1px solid #34363a;
  background: #1b1c1f;
}

.resource-security-heading {
  gap: 10px;
}

.resource-security-mark {
  width: 36px;
  height: 36px;
  flex-basis: 36px;
  border-color: #3a3e45;
  border-radius: 50%;
  color: #62dbe8;
  background: #26282c;
}

.resource-security-mark svg {
  width: 20px;
  height: 20px;
}

.resource-verification-header h2 {
  color: #f7f8f9;
  font-size: 16px;
  letter-spacing: 0;
}

.resource-verification-header p {
  color: #a7abb2 !important;
  font-size: 10.5px !important;
}

.resource-window-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.resource-window-actions button {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 5px;
  color: #c9cdd3;
  background: transparent;
  cursor: pointer;
}

.resource-window-actions button:hover {
  color: #fff;
  background: #2d3034;
}

.resource-window-actions svg {
  width: 19px;
  height: 19px;
  margin: 0;
  stroke-width: 1.9;
}

.resource-verification-form {
  gap: 10px;
  padding: 12px 14px 14px;
}

.resource-verification-status {
  margin: 10px 14px 0;
  border-color: #31575b;
  border-radius: 5px;
  color: #8ee7ee;
  background: #222f31;
}

.resource-verification-status[data-state="error"] {
  border-color: #703b40;
  color: #ff9da4;
  background: #342326;
}

.resource-challenge-body {
  min-height: 0;
  gap: 9px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  overflow: visible;
}

.resource-captcha-visual {
  position: relative;
  width: 100%;
  aspect-ratio: 1.82 / 1;
  min-height: 188px;
  max-height: 278px;
  display: grid;
  place-items: center;
  border: 1px solid #3a3c40;
  border-radius: 7px;
  background-color: #dfe2e5;
  background-position: center;
  background-size: cover;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06);
  overflow: hidden;
}

.resource-captcha-visual::before {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(180deg, transparent 48%, rgba(0, 0, 0, .18));
  content: "";
  pointer-events: none;
}

.resource-captcha-visual > * {
  position: relative;
  z-index: 1;
}

.resource-studio-stage {
  background-image:
    radial-gradient(circle at 50% 24%, #fbfbfb 0, #e4e7ea 42%, #c8cdd3 100%) !important;
}

.resource-studio-stage::before {
  background:
    linear-gradient(180deg, transparent 59%, rgba(71, 80, 91, .13)),
    radial-gradient(ellipse at 50% 86%, rgba(72, 79, 88, .2), transparent 58%);
}

.resource-captcha-prompt-bar {
  min-height: 50px;
  display: grid;
  place-items: center;
  padding: 8px 12px;
  border: 1px solid #56d6e2;
  border-radius: 5px;
  background: #f5f6f6;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .7);
}

.resource-challenge-prompt {
  color: #303236;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.4;
  text-align: center;
}

.resource-equation-stage,
.resource-number-object {
  border: 1px solid rgba(255, 255, 255, .45);
  background: rgba(248, 249, 250, .88);
  box-shadow: 0 8px 20px rgba(17, 24, 39, .16);
  backdrop-filter: blur(4px);
}

.resource-equation-stage {
  min-width: min(310px, calc(100% - 34px));
  padding: 12px 18px;
}

.resource-equation-number,
.resource-equation-unknown {
  min-width: 42px;
  height: 44px;
  border-color: rgba(35, 43, 55, .14);
  color: #1f2937;
  background: rgba(255, 255, 255, .72);
}

.resource-equation-operator {
  color: #515862;
}

.resource-number-object {
  width: 126px;
  height: 126px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 0;
  border-radius: 50%;
  background: linear-gradient(145deg, #fbfdff 6%, #d7dce3 58%, #aab4c1 100%);
  box-shadow:
    inset -10px -12px 20px rgba(64, 74, 88, .17),
    inset 8px 8px 16px rgba(255, 255, 255, .78),
    0 18px 30px rgba(42, 50, 62, .22);
}

.resource-number-caption {
  color: #68717d;
}

.resource-number-value {
  color: #1f2937;
  font-size: 44px;
}

.resource-missing-sequence,
.resource-sum-tiles {
  gap: 6px;
  width: calc(100% - 30px);
  padding: 10px 12px;
  border-radius: 7px;
  background: rgba(17, 24, 33, .52);
  backdrop-filter: blur(4px);
}

.resource-missing-card,
.resource-sum-tile {
  width: 50px;
  height: 50px;
  border-color: rgba(255, 255, 255, .45);
  color: #f8fafc;
  background: rgba(31, 39, 50, .58);
  box-shadow: 0 5px 12px rgba(0, 0, 0, .18);
}

.resource-missing-card.missing,
.resource-sum-tile.result {
  border-color: #67dce7;
  color: #8ceef6;
  background: rgba(17, 74, 81, .52);
}

.resource-sum-operator {
  color: #eef2f5;
}

.resource-answer-console {
  gap: 7px;
}

.resource-answer-display {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 9px;
}

.resource-answer-display > span {
  color: #9fa4ab;
  white-space: nowrap;
}

.resource-answer-display input {
  width: 100%;
  min-height: 42px;
  border-color: #404349;
  color: #f4f6f8;
  background: #292b2f;
  font-size: 18px;
}

.resource-keypad {
  width: 100%;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 5px;
}

.resource-key {
  min-height: 36px;
  border-color: #3c3f44;
  color: #e9ebed;
  background: #2a2c30;
  font-size: 14px;
}

.resource-key:hover {
  border-color: #5f8fff;
  background: #30343a;
}

.resource-key-utility {
  color: #b5bac1;
  font-size: 10px;
}

.resource-choice {
  border-color: #3b3e43;
  color: #eef0f2;
  background: #2a2c30;
}

.resource-choice:hover {
  border-color: #5f8fff;
  background: #30343a;
}

.resource-choice.selected {
  border-color: #66dce7;
  color: #fff;
  background: #263f43;
  box-shadow: inset 0 0 0 1px rgba(102, 220, 231, .25);
}

.resource-binary-grid {
  gap: 8px;
}

.resource-binary-choice {
  min-height: 47px;
  font-size: 14px;
}

.resource-largest-grid {
  width: calc(100% - 28px);
  gap: 8px;
}

.resource-largest-choice {
  min-height: 88px;
  padding: 10px;
  border-color: rgba(255, 255, 255, .66);
  color: #20252c;
  background: rgba(255, 255, 255, .84);
  box-shadow: 0 7px 18px rgba(25, 32, 44, .13);
}

.resource-largest-choice:hover {
  border-color: #4d7ff2;
  background: rgba(255, 255, 255, .96);
}

.resource-largest-choice strong {
  color: #20252c;
}

.resource-largest-bar {
  background: rgba(47, 73, 111, .08);
}

.resource-largest-choice.selected {
  border-color: #4d7ff2;
  background: #f7faff;
}

.resource-object-choice-grid {
  width: calc(100% - 28px);
  gap: 5px;
}

.resource-color-choice {
  min-height: 105px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  border-color: transparent;
  color: #262b32;
  background: transparent;
  text-align: center;
}

.resource-color-choice:hover {
  border-color: rgba(63, 114, 240, .34);
  background: rgba(255, 255, 255, .34);
}

.resource-color-choice.selected {
  border-color: #4d7ff2;
  color: #1f2937;
  background: rgba(255, 255, 255, .52);
}

.resource-color-swatch {
  width: 48px;
  height: 48px;
  border: 0;
  background:
    radial-gradient(circle at 33% 27%, rgba(255, 255, 255, .92) 0 8%, transparent 18%),
    radial-gradient(circle at 36% 30%, var(--resource-swatch) 0 22%, transparent 58%),
    var(--resource-swatch);
  box-shadow:
    inset -7px -9px 14px rgba(0, 0, 0, .2),
    0 10px 15px rgba(40, 48, 60, .2);
}

.resource-color-label {
  color: inherit;
  font-size: 11px;
}

.resource-color-choice .resource-choice-check {
  position: absolute;
  right: 7px;
  bottom: 7px;
}

.resource-direction-target {
  min-height: 45px;
  width: calc(100% - 32px);
  border-color: rgba(255, 255, 255, .38);
  background: rgba(18, 24, 32, .56);
  color: #fff;
  backdrop-filter: blur(5px);
}

.resource-direction-target span {
  color: #d5dae0;
}

.resource-direction-target strong {
  color: #74e2eb;
}

.resource-direction-grid {
  width: calc(100% - 32px);
  gap: 6px;
}

.resource-direction-choice {
  min-height: 50px;
  border-color: rgba(255, 255, 255, .35);
  color: #fff;
  background: rgba(21, 28, 37, .56);
  backdrop-filter: blur(4px);
}

.resource-direction-choice:hover {
  border-color: #70e1e9;
  background: rgba(24, 42, 49, .72);
}

.resource-direction-choice.selected {
  border-color: #70e1e9;
  background: rgba(29, 86, 94, .72);
}

.resource-direction-choice span {
  color: #d8dde3;
}

.resource-dot-board {
  width: calc(100% - 24px);
  height: 176px;
  border: 0;
  background: none;
}

.resource-dot-board span {
  width: 16px;
  height: 16px;
  border: 0;
  background:
    radial-gradient(circle at 33% 28%, #dfeeff 0 9%, #3382f0 30%, #1458bd 78%);
  box-shadow:
    inset -3px -4px 6px rgba(0, 28, 87, .25),
    3px 7px 8px rgba(26, 44, 70, .22);
}

.resource-count-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.resource-count-choice {
  min-height: 39px;
  border-color: #3b3e43;
  color: #eef0f2;
  background: #2a2c30;
}

.resource-count-choice:hover,
.resource-count-choice.selected {
  border-color: #66dce7;
  background: #263f43;
}

.resource-sequence-scene {
  position: absolute;
  inset: 0;
}

.resource-sequence-scene::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, .08), rgba(0, 0, 0, .3));
  content: "";
  pointer-events: none;
}

.resource-sequence-scene-text {
  position: absolute;
  left: var(--sequence-left);
  top: var(--sequence-top);
  z-index: 2;
  width: auto;
  min-width: 38px;
  min-height: 48px;
  padding: 0;
  border: 0;
  border-radius: 0;
  color: var(--sequence-color);
  background: transparent;
  transform: translate(-50%, -50%) rotate(var(--sequence-rotate));
  font-family: "Arial Narrow", "Microsoft YaHei UI", sans-serif;
  font-size: clamp(35px, 8vw, 53px);
  font-weight: 900;
  line-height: 1;
  text-shadow:
    -2px -1px 0 #25282c,
    2px -1px 0 #25282c,
    -2px 2px 0 #25282c,
    2px 2px 0 #25282c,
    0 5px 8px rgba(0, 0, 0, .36);
  transition: transform .15s ease, filter .15s ease;
}

.resource-sequence-scene-text:hover {
  filter: brightness(1.16);
}

.resource-sequence-scene-text.selected {
  color: #72eff8;
  filter: drop-shadow(0 0 9px rgba(49, 210, 223, .8));
  transform: translate(-50%, -50%) rotate(var(--sequence-rotate)) scale(1.08);
}

.resource-sequence-scene-text .resource-sequence-index {
  top: -8px;
  right: -7px;
  border-color: #1f2022;
  font-family: system-ui, sans-serif;
}

.resource-sequence-overlay-progress {
  position: absolute;
  right: 12px;
  bottom: 10px;
  z-index: 3;
}

.resource-sequence-overlay-progress .resource-order-slot {
  width: 27px;
  height: 27px;
  border-color: rgba(255, 255, 255, .56);
  color: rgba(255, 255, 255, .86);
  background: rgba(20, 25, 32, .48);
  backdrop-filter: blur(3px);
}

.resource-sequence-overlay-progress .resource-order-slot.filled {
  border-color: #6ee3eb;
  color: #dffcff;
  background: rgba(23, 107, 115, .72);
}

.resource-puzzle-scene {
  position: absolute;
  inset: 0;
  background-image: var(--captcha-scene);
  background-position: center;
  background-size: cover;
  filter: saturate(.72) brightness(.72);
}

.resource-puzzle-notch,
.resource-puzzle-piece {
  position: absolute;
  width: 58px;
  height: 58px;
  border-radius: 6px;
}

.resource-puzzle-notch {
  border: 2px dashed rgba(255, 255, 255, .88);
  background: rgba(15, 18, 24, .68);
  box-shadow: inset 0 0 15px rgba(0, 0, 0, .48);
}

.resource-puzzle-piece {
  border: 2px solid rgba(255, 255, 255, .72);
  background-repeat: no-repeat;
  box-shadow: 0 8px 18px rgba(0, 0, 0, .36);
}

.resource-slider-stage {
  gap: 8px;
  padding: 10px 12px;
  border-color: #3b3e43;
  background: #25272a;
}

.resource-slider-target-row strong {
  color: #8ee7ee;
  background: #243d41;
}

.resource-slider-target-row span,
.resource-slider-output-row span,
.resource-slider-scale {
  color: #9da2a9;
}

.resource-slider-output {
  color: #f1f3f5;
}

.resource-slider-stage input[type="range"] {
  height: 34px;
  margin: 0;
  background: transparent;
}

.resource-slider-stage input[type="range"]::-webkit-slider-runnable-track {
  height: 18px;
  border-radius: 999px;
  background: #3a3d42;
}

.resource-slider-stage input[type="range"]::-webkit-slider-thumb {
  width: 48px;
  height: 28px;
  margin-top: -5px;
  border: 0;
  border-radius: 999px;
  background: #4f7cff;
  box-shadow: 0 5px 12px rgba(36, 82, 198, .42);
}

.resource-slider-stage input[type="range"]::-moz-range-track {
  height: 18px;
  border-radius: 999px;
  background: #3a3d42;
}

.resource-slider-stage input[type="range"]::-moz-range-thumb {
  width: 48px;
  height: 28px;
  border: 0;
  border-radius: 999px;
  background: #4f7cff;
  box-shadow: 0 5px 12px rgba(36, 82, 198, .42);
}

.resource-challenge-loading {
  min-height: 260px;
  color: #aeb3ba;
  background: #25272a;
  border-radius: 7px;
}

.resource-loading-ring {
  border-color: #41454b;
  border-top-color: #66dce7;
}

.resource-result {
  padding: 26px 18px;
  border-color: #31575b;
  border-radius: 7px;
  background: #222f31;
}

.resource-result-mark {
  color: #0d1e21;
  background: #74e3eb;
  box-shadow: 0 8px 20px rgba(44, 180, 191, .22);
}

.resource-result strong {
  color: #f5ffff;
}

.resource-result p {
  color: #aec2c5;
}

.resource-verification-form footer {
  display: flex !important;
  grid-template-columns: none !important;
  justify-content: flex-end;
  gap: 7px;
  padding-top: 11px;
  border-top-color: #34363a;
}

.resource-verification-form footer .button {
  min-height: 39px;
  padding: 0 14px;
  border-radius: 5px !important;
  font-size: 12px;
}

.resource-verification-form footer .button.secondary {
  border-color: #3b3e43;
  color: #c8ccd1;
  background: #2a2c30;
}

.resource-verification-form footer .button.primary {
  border-color: #4e7fff;
  color: #fff;
  background: #4e7fff;
}

.resource-verification-form footer .button.primary:hover {
  background: #668fff;
}

.resource-verification-form footer [data-resource-submit] {
  grid-column: auto !important;
}

@media (max-width: 520px) {
  .resource-verification-dialog {
    width: calc(100% - 16px);
  }
  .resource-verification-card {
    max-height: calc(100vh - 16px);
    border-radius: 10px;
  }
  .resource-verification-card::before {
    border-radius: 10px 10px 0 0;
  }
  .resource-verification-header {
    min-height: 60px;
    padding: 11px 11px 10px 13px !important;
  }
  .resource-security-mark {
    width: 34px;
    height: 34px;
    flex-basis: 34px;
  }
  .resource-verification-form {
    padding: 10px 11px 11px;
  }
  .resource-verification-status {
    margin: 8px 11px 0;
  }
  .resource-captcha-visual {
    aspect-ratio: 1.68 / 1;
    min-height: 174px;
    max-height: 232px;
  }
  .resource-captcha-prompt-bar {
    min-height: 46px;
    padding: 7px 10px;
  }
  .resource-challenge-prompt {
    font-size: 13px;
  }
  .resource-keypad {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 4px;
  }
  .resource-key {
    min-height: 35px;
    padding: 0 3px;
    font-size: 13px;
  }
  .resource-key-utility {
    font-size: 9px;
  }
  .resource-answer-display {
    grid-template-columns: 1fr;
    gap: 5px;
  }
  .resource-answer-display > span {
    text-align: center;
  }
  .resource-answer-display input {
    width: min(190px, 100%);
    min-height: 39px;
    justify-self: center;
  }
  .resource-equation-stage {
    min-width: calc(100% - 24px);
    padding: 9px 10px;
  }
  .resource-equation-number,
  .resource-equation-unknown {
    min-width: 35px;
    height: 39px;
    font-size: 17px;
  }
  .resource-equation {
    gap: 4px;
  }
  .resource-number-object {
    width: 105px;
    height: 105px;
  }
  .resource-number-value {
    font-size: 38px;
  }
  .resource-missing-sequence,
  .resource-sum-tiles {
    width: calc(100% - 18px);
    padding: 7px 8px;
  }
  .resource-missing-card,
  .resource-sum-tile {
    width: 40px;
    height: 43px;
    font-size: 16px;
  }
  .resource-object-choice-grid {
    width: calc(100% - 14px);
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .resource-color-choice {
    min-height: 90px;
    gap: 5px;
  }
  .resource-color-swatch {
    width: 39px;
    height: 39px;
  }
  .resource-color-label {
    font-size: 10px;
  }
  .resource-largest-grid {
    width: calc(100% - 18px);
  }
  .resource-largest-choice {
    min-height: 78px;
    grid-template-columns: 1fr 30px 18px;
    gap: 6px;
    padding: 8px;
  }
  .resource-largest-choice strong {
    font-size: 19px;
  }
  .resource-largest-bar {
    height: 49px;
  }
  .resource-direction-target,
  .resource-direction-grid {
    width: calc(100% - 20px);
  }
  .resource-direction-target {
    min-height: 38px;
  }
  .resource-direction-choice {
    min-height: 42px;
  }
  .resource-dot-board {
    height: 142px;
  }
  .resource-sequence-scene-text {
    font-size: 38px;
  }
  .resource-sequence-overlay-progress {
    right: 8px;
    bottom: 7px;
  }
  .resource-puzzle-notch,
  .resource-puzzle-piece {
    width: 48px;
    height: 48px;
  }
  .resource-verification-form footer {
    display: grid !important;
    grid-template-columns: 92px minmax(0, 1fr) !important;
    gap: 6px;
  }
}

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

.header-notification-button {
  position: relative;
  width: 42px;
  height: 40px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 42px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--text-soft);
  background: var(--surface);
  cursor: pointer;
}

.header-notification-button:hover,
.header-notification-button.has-unread {
  color: var(--text);
  border-color: var(--line-strong);
  background: var(--surface-strong);
}

.header-notification-button svg {
  width: 19px;
  height: 19px;
  margin: 0;
}

.notification-indicator {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 8px;
  height: 8px;
  border: 2px solid var(--surface);
  border-radius: 50%;
  background: #ff4d4f;
  box-sizing: content-box;
}

.notification-dialog {
  width: min(560px, calc(100% - 28px));
  max-width: none;
  max-height: calc(100vh - 72px);
  padding: 0;
  border: 0;
  border-radius: 9px;
  background: transparent;
  margin: 82px 20px 18px auto;
}

.notification-dialog::backdrop {
  background: rgba(8, 11, 17, .5);
  backdrop-filter: blur(2px);
}

.notification-panel {
  max-height: calc(100vh - 90px);
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  color: var(--text);
  background: var(--surface);
  box-shadow: 0 26px 80px rgba(0, 0, 0, .3);
}

.notification-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--line);
}

.notification-eyebrow {
  color: var(--accent);
  font-size: 9px;
  font-weight: 750;
}

.notification-panel-head h2 {
  margin: 3px 0 0;
  font-size: 20px;
}

.notification-close {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  flex: 0 0 34px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--muted);
  background: var(--surface-soft);
  cursor: pointer;
}

.notification-close:hover {
  color: var(--text);
  border-color: var(--line-strong);
}

.notification-close svg {
  width: 17px;
  height: 17px;
  margin: 0;
}

.notification-toolbar {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 0 20px;
  border-bottom: 1px solid var(--line);
  color: var(--text-soft);
  background: var(--surface-soft);
  font-size: 11px;
}

.notification-toolbar strong {
  color: var(--danger, #dc2626);
}

.notification-toolbar button,
.notification-item-actions button,
.notification-item-actions a {
  padding: 0;
  border: 0;
  color: var(--accent);
  background: transparent;
  cursor: pointer;
  font-size: 11px;
  font-weight: 650;
}

.notification-toolbar button:disabled {
  color: var(--muted);
  cursor: default;
  opacity: .6;
}

.notification-list {
  min-height: 140px;
  padding: 10px 12px 14px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.notification-item {
  position: relative;
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr);
  gap: 10px;
  padding: 13px 14px;
  border: 1px solid transparent;
  border-bottom-color: var(--line);
  border-radius: 6px;
  background: var(--surface);
}

.notification-item + .notification-item {
  margin-top: 5px;
}

.notification-item.unread {
  border-color: color-mix(in srgb, var(--accent) 18%, var(--line));
  background: color-mix(in srgb, var(--accent-soft) 34%, var(--surface));
}

.notification-item-marker {
  width: 7px;
  height: 7px;
  margin-top: 6px;
  border-radius: 50%;
  background: var(--line-strong);
}

.notification-item.unread .notification-item-marker {
  background: #ff4d4f;
  box-shadow: 0 0 0 3px color-mix(in srgb, #ff4d4f 12%, transparent);
}

.notification-item-body {
  min-width: 0;
}

.notification-item-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.notification-item-head strong {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.notification-item-head time {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 9.5px;
}

.notification-item-body > p {
  margin: 7px 0 0;
  color: var(--text-soft);
  font-size: 11.5px;
  line-height: 1.65;
  white-space: pre-line;
  word-break: break-word;
}

.notification-item-actions {
  display: flex;
  justify-content: flex-end;
  gap: 14px;
  margin-top: 9px;
}

.notification-item-actions a:hover,
.notification-item-actions button:hover {
  text-decoration: underline;
}

.notification-empty {
  min-height: 180px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 4px;
  margin: 0;
  color: var(--muted);
  text-align: center;
}

.notification-empty strong {
  color: var(--text-soft);
  font-size: 13px;
}

.notification-empty p {
  margin: 0;
  font-size: 10.5px;
}

.notification-admin-layout {
  display: grid;
  grid-template-columns: minmax(320px, 380px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.notification-editor {
  position: sticky;
  top: 78px;
}

.notification-editor-form {
  padding: 18px;
}

.notification-editor-form label {
  display: grid;
  gap: 7px;
}

.notification-editor-form label > span {
  color: var(--text-soft);
  font-size: 10.5px;
  font-weight: 650;
}

.notification-editor-form input,
.notification-editor-form textarea {
  width: 100%;
  min-height: 42px;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--text);
  background: var(--surface-soft);
}

.notification-editor-form textarea {
  resize: vertical;
  line-height: 1.65;
}

.notification-editor-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.notification-admin-items {
  padding: 0 18px 18px;
}

.notification-admin-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
}

.notification-admin-copy {
  min-width: 0;
}

.notification-admin-title {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.notification-admin-title strong {
  font-size: 13px;
}

.notification-admin-title time {
  color: var(--muted);
  font-size: 9.5px;
}

.notification-admin-copy p {
  max-width: 760px;
  margin: 7px 0 0;
  color: var(--text-soft);
  font-size: 11.5px;
  line-height: 1.55;
  white-space: pre-line;
}

.notification-admin-copy small {
  display: block;
  max-width: 620px;
  margin-top: 7px;
  overflow: hidden;
  color: var(--accent);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.notification-admin-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.notification-admin-actions form {
  margin: 0;
}

.notification-admin-empty {
  min-height: 260px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 5px;
  margin: 0 18px 18px;
  border: 1px dashed var(--line-strong);
  border-radius: 6px;
  color: var(--muted);
  text-align: center;
}

.notification-admin-empty strong {
  color: var(--text-soft);
}

.notification-admin-empty p {
  margin: 0;
  font-size: 11px;
}

@media (max-width: 900px) {
  .notification-admin-layout {
    grid-template-columns: 1fr;
  }
  .notification-editor {
    position: static;
  }
}

@media (max-width: 620px) {
  .header-notification-button {
    width: 38px;
    height: 38px;
    flex-basis: 38px;
  }
  .notification-dialog {
    width: calc(100% - 16px);
    max-height: calc(100vh - 72px);
    margin: 64px auto 8px;
  }
  .notification-panel {
    max-height: calc(100vh - 72px);
  }
  .notification-panel-head {
    padding: 15px 15px 12px;
  }
  .notification-toolbar {
    padding: 0 15px;
  }
  .notification-list {
    padding: 8px;
  }
  .notification-item {
    padding: 12px 11px;
  }
  .notification-item-head {
    gap: 8px;
  }
  .notification-admin-item {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }
  .notification-admin-actions {
    align-self: flex-end;
  }
}

.mobile-page-search,
.mobile-app-nav,
.mobile-home-section-title,
.mobile-section-controls {
  display: none;
}

@media (max-width: 620px) {
  body[data-page="dashboard"] {
    padding-bottom: calc(68px + env(safe-area-inset-bottom));
  }

  body[data-page="dashboard"] .site-header {
    position: sticky;
    top: 0;
    z-index: 70;
    border-bottom: 0;
    background: color-mix(in srgb, var(--bg) 94%, transparent);
  }

  body[data-page="dashboard"] .header-inner {
    width: 100%;
    min-height: 72px;
    display: flex;
    flex-wrap: nowrap;
    gap: 10px;
    padding: 8px 14px;
  }

  body[data-page="dashboard"] .brand {
    min-width: 0;
    flex: 1;
    gap: 10px;
  }

  body[data-page="dashboard"] .brand-mark {
    width: 40px;
    height: 40px;
    flex-basis: 40px;
    border-radius: 9px;
    font-size: 12px;
  }

  body[data-page="dashboard"] .brand-copy {
    min-width: 0;
  }

  body[data-page="dashboard"] .brand-copy strong {
    overflow: hidden;
    font-size: 16px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body[data-page="dashboard"] .brand-copy small {
    display: block;
    max-width: 170px;
    margin-top: 2px;
    overflow: hidden;
    color: var(--muted);
    font-size: 10.5px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body[data-page="dashboard"] .main-nav,
  body[data-page="dashboard"] .header-search {
    display: none;
  }

  body[data-page="dashboard"] .header-actions {
    margin-left: auto;
    gap: 7px;
  }

  body[data-page="dashboard"] .header-actions .header-favorite-button,
  body[data-page="dashboard"] .header-actions .user-menu,
  body[data-page="dashboard"] .header-actions .text-action {
    display: none;
  }

  body[data-page="dashboard"] .header-notification-button,
  body[data-page="dashboard"] .theme-toggle {
    width: 38px;
    height: 38px;
    flex-basis: 38px;
    border-radius: 8px;
  }

  body[data-page="dashboard"] .dashboard-shell {
    width: calc(100% - 24px);
    display: flex;
    flex-direction: column;
    padding-top: 0;
  }

  .mobile-page-search {
    position: relative;
    top: auto;
    z-index: 1;
    width: calc(100% - 24px);
    min-height: 44px;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 7px auto 10px;
    padding: 0 13px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface-strong) !important;
    box-shadow: 0 5px 16px rgba(0, 0, 0, .08);
  }

  .mobile-page-search.is-scroll-hidden {
    display: none;
  }

  .mobile-page-search input {
    min-width: 0;
    flex: 1;
    border: 0;
    outline: 0;
    color: var(--text);
    background: transparent;
    font-size: 12.5px;
  }

  .mobile-page-search button {
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 0;
    color: var(--text-soft);
    background: transparent;
  }

  .mobile-page-search svg {
    width: 18px;
    height: 18px;
    margin: 0;
  }

  body[data-page="dashboard"] .home-carousel {
    display: none;
  }

  body[data-page="dashboard"] .home-category-section {
    display: block;
    margin-top: 24px;
  }

  body[data-page="dashboard"] .home-category-section.no-mobile-latest {
    display: none;
  }

  body[data-page="dashboard"] #section-movie {
    order: 1;
    margin-top: 8px;
  }

  body[data-page="dashboard"] #section-tv {
    order: 2;
  }

  body[data-page="dashboard"] #section-variety {
    order: 3;
  }

  body[data-page="dashboard"] #section-anime {
    order: 4;
  }

  body[data-page="dashboard"] #section-playlet {
    order: 5;
  }

  body[data-page="dashboard"] .home-ranking-panel {
    display: none;
  }

  body[data-page="dashboard"] .home-section-head {
    min-height: 36px;
    margin-bottom: 10px;
  }

  body[data-page="dashboard"] .home-section-head h2 {
    font-size: 20px;
    letter-spacing: 0;
  }

  .desktop-home-section-title {
    display: none;
  }

  .mobile-home-section-title {
    display: inline;
  }

  .mobile-section-controls {
    display: flex;
    align-items: center;
    gap: 6px;
  }

  .mobile-section-controls button {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 50%;
    color: var(--text-soft);
    background: var(--surface);
  }

  .mobile-section-controls svg {
    width: 15px;
    height: 15px;
    margin: 0;
  }

  body[data-page="dashboard"] .dashboard-poster-grid {
    display: flex;
    gap: 10px;
    margin-right: -12px;
    padding-right: 12px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }

  body[data-page="dashboard"] .dashboard-poster-grid::-webkit-scrollbar {
    display: none;
  }

  body[data-page="dashboard"] .dashboard-poster-grid .poster-card {
    width: calc((100% - 20px) / 3);
    flex: 0 0 calc((100% - 20px) / 3);
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow-small);
    scroll-snap-align: start;
  }

  body[data-page="dashboard"] .dashboard-poster-grid .poster-card:hover {
    transform: none;
    box-shadow: none;
  }

  body[data-page="dashboard"] .dashboard-poster-grid .poster-link {
    position: relative;
  }

  body[data-page="dashboard"] .dashboard-poster-grid .poster-media {
    border-radius: 0;
  }

  body[data-page="dashboard"] .dashboard-poster-grid .poster-footer {
    position: static;
    min-height: 42px;
    display: flex;
    padding: 7px 7px 8px;
    background: var(--surface);
    color: var(--text);
  }

  body[data-page="dashboard"] .dashboard-poster-grid .poster-title-wrap {
    display: block;
    flex: 1;
  }

  body[data-page="dashboard"] .dashboard-poster-grid .poster-title {
    display: block;
    color: var(--text);
    font-size: 11px;
    font-weight: 650;
    line-height: 1.35;
  }

  body[data-page="dashboard"] .dashboard-poster-grid .poster-title-wrap small {
    display: block;
    margin-top: 2px;
    overflow: hidden;
    color: var(--muted);
    font-size: 9.5px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body[data-page="dashboard"] .dashboard-poster-grid .poster-score {
    display: block;
    flex: 0 0 auto;
    align-self: center;
    color: #e69b19;
    font-size: 10px;
    font-weight: 750;
  }

  body[data-page="dashboard"] .dashboard-poster-grid .quality-badge {
    top: 6px;
    right: 6px;
    left: auto;
    bottom: auto;
    max-width: calc(100% - 12px);
    padding: 4px 5px;
    border-radius: 3px;
    color: #fff;
    background: var(--accent);
    font-size: 9px;
  }

  body[data-page="dashboard"] .dashboard-poster-grid .episode-badge {
    top: auto;
    right: auto;
    bottom: 6px;
    left: 6px;
    max-width: calc(100% - 12px);
    padding: 4px 5px;
    border-radius: 3px;
    color: #fff;
    background: rgba(20, 21, 24, .78);
    font-size: 9px;
  }

  .mobile-app-nav {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 90;
    min-height: calc(58px + env(safe-area-inset-bottom));
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    padding: 4px 8px env(safe-area-inset-bottom);
    border-top: 1px solid var(--line);
    background: color-mix(in srgb, var(--surface) 96%, transparent);
    backdrop-filter: blur(18px);
    box-shadow: 0 -6px 20px rgba(0, 0, 0, .06);
  }

  .mobile-app-nav a {
    min-width: 0;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 2px;
    color: var(--muted);
    font-size: 10px;
  }

  .mobile-app-nav a.active,
  .mobile-app-nav .mobile-category-menu > button.active {
    color: var(--accent);
  }

  .mobile-category-menu {
    position: relative;
    min-width: 0;
  }

  .mobile-category-menu > button {
    width: 100%;
    min-height: 100%;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 2px;
    padding: 0;
    border: 0;
    color: var(--muted);
    background: transparent;
    font-size: 10px;
  }

  .mobile-category-dropdown {
    position: absolute;
    bottom: calc(100% + 12px);
    left: 50%;
    z-index: 100;
    width: 152px;
    padding: 6px;
    border: 1px solid var(--line-strong);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: 0 16px 42px rgba(0, 0, 0, .25);
    transform: translateX(-50%);
  }

  .mobile-category-dropdown::after {
    position: absolute;
    bottom: -6px;
    left: calc(50% - 6px);
    width: 12px;
    height: 12px;
    border-right: 1px solid var(--line-strong);
    border-bottom: 1px solid var(--line-strong);
    background: var(--surface);
    transform: rotate(45deg);
    content: "";
  }

  .mobile-app-nav .mobile-category-dropdown a {
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 0 12px;
    border-radius: 5px;
    color: var(--text-soft);
    font-size: 12px;
  }

  .mobile-app-nav .mobile-category-dropdown a:hover {
    color: var(--text);
    background: var(--surface-soft);
  }

  .mobile-app-nav svg {
    width: 21px;
    height: 21px;
    margin: 0;
    stroke-width: 1.9;
  }
}

.mobile-user-identity {
  display: none;
}

@media (max-width: 620px) {
  .site-header.is-authenticated .brand {
    display: none;
  }
  .site-header .mobile-user-identity {
    min-width: 0;
    display: inline-flex;
    align-items: center;
    flex: 1;
    gap: 10px;
  }
  .mobile-user-identity > img,
  .mobile-user-avatar {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    flex: 0 0 42px;
    border-radius: 50%;
  }
  .mobile-user-identity > img {
    object-fit: cover;
  }
  .mobile-user-avatar {
    color: var(--accent);
    background: var(--accent-soft);
    font-size: 13px;
    font-weight: 800;
  }
  .mobile-user-copy {
    min-width: 0;
    display: grid;
    gap: 2px;
  }
  .mobile-user-copy strong,
  .mobile-user-copy small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .mobile-user-copy strong {
    color: var(--text);
    font-size: 16px;
    font-weight: 750;
  }
  .mobile-user-copy small {
    color: var(--muted);
    font-size: 10.5px;
  }

  body[data-page]:not([data-page^="admin"]) {
    padding-bottom: calc(68px + env(safe-area-inset-bottom));
  }

  .site-header .header-inner {
    min-height: 62px;
    flex-wrap: nowrap;
    padding-top: 8px;
    padding-bottom: 8px;
  }

  .site-header .main-nav {
    display: none;
  }

  .site-header .header-actions .header-favorite-button,
  .site-header .header-actions .user-menu {
    display: none;
  }

  .mobile-app-nav {
    display: grid;
  }

  body[data-page="dashboard"] .home-carousel {
    order: 0;
    height: auto;
    display: block;
    aspect-ratio: 16 / 9;
    margin: 2px 0 10px;
    border-radius: 8px;
  }

  body[data-page="dashboard"] .home-carousel-caption {
    right: 52px;
    bottom: 14px;
    left: 14px;
  }

  body[data-page="dashboard"] .home-carousel-caption strong {
    font-size: 14px;
  }

  body[data-page="dashboard"] .home-carousel-caption small {
    margin-top: 3px;
    font-size: 9px;
  }

  body[data-page="dashboard"] .home-carousel-arrow {
    width: 27px;
    height: 27px;
  }

  body[data-page="dashboard"] .home-carousel-arrow.prev {
    left: 8px;
  }

  body[data-page="dashboard"] .home-carousel-arrow.next {
    right: 8px;
  }

  body[data-page="dashboard"] .home-carousel-dots {
    bottom: 7px;
  }
}

@media (max-width: 620px) {
  body[data-page="search"] .site-header .header-search {
    display: none !important;
  }

  body[data-page="search"] .search-page-shell {
    padding-top: 12px;
    padding-bottom: 18px;
  }

  .mobile-app-nav {
    height: calc(58px + env(safe-area-inset-bottom));
    min-height: 0;
    box-sizing: border-box;
    padding-top: 4px;
    padding-bottom: env(safe-area-inset-bottom);
    overflow: visible;
  }
}

.pan123-login-dialog {
  width: min(460px, calc(100% - 24px));
  max-width: none;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
}

.pan123-login-dialog::backdrop,
.pan123-player-dialog::backdrop {
  background: rgba(4, 7, 12, .82);
  backdrop-filter: blur(4px);
}

.pan123-login-card {
  display: grid;
  gap: 14px;
  padding: 0 20px 20px;
  border: 1px solid #34373c;
  border-radius: 10px;
  color: #eef2f6;
  background: #202124;
  box-shadow: 0 26px 80px rgba(0, 0, 0, .55);
}

.pan123-login-card header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin: 0 -20px;
  padding: 18px 20px 14px;
  border-bottom: 1px solid #35373b;
}

.pan123-login-card h2 {
  margin: 0;
  color: #f7f8f9;
  font-size: 19px;
}

.pan123-login-card header p {
  margin: 4px 0 0;
  color: #9da3ab;
  font-size: 11px;
}

.pan123-login-card header button,
.pan123-player-head > button {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid #3d4045;
  border-radius: 5px;
  color: #c7ccd3;
  background: #292b2f;
  cursor: pointer;
  font-size: 20px;
}

.pan123-login-notice {
  padding: 9px 11px;
  border: 1px solid #304b5a;
  border-radius: 5px;
  color: #9fc5d7;
  background: #202c33;
  font-size: 10.5px;
  line-height: 1.55;
}

.pan123-login-card label {
  display: grid;
  gap: 7px;
}

.pan123-login-card label span {
  color: #aeb3bb;
  font-size: 10.5px;
  font-weight: 650;
}

.pan123-login-methods {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 3px;
  padding: 3px;
  border: 1px solid #34373c;
  border-radius: 6px;
  background: #191b1e;
}

.pan123-login-methods button {
  min-height: 38px;
  border: 0;
  border-radius: 4px;
  color: #9ea5ae;
  background: transparent;
  cursor: pointer;
  font-size: 11.5px;
  font-weight: 650;
}

.pan123-login-methods button.active {
  color: #6591ff;
  background: #262a31;
}

.pan123-sms-row {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.pan123-sms-row .button {
  min-height: 44px;
  padding: 0 11px;
  white-space: nowrap;
}

.pan123-login-card input {
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid #41444a;
  border-radius: 5px;
  outline: 0;
  color: #f3f5f7;
  background: #292b2f;
  font-size: 13px;
}

.pan123-login-card input:focus {
  border-color: #4e7fff;
  box-shadow: 0 0 0 3px rgba(78, 127, 255, .16);
}

.pan123-login-error,
.pan123-player-error {
  padding: 9px 11px;
  border: 1px solid #703b40;
  border-radius: 5px;
  color: #ff9da4;
  background: #342326;
  font-size: 11px;
  line-height: 1.5;
}

.pan123-transcoding-toast {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 38;
  width: max-content;
  max-width: calc(100% - 40px);
  padding: 12px 18px;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 6px;
  color: #dce9f8;
  background: rgba(8, 13, 22, .88);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .3);
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.pan123-login-card footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 2px;
  padding-top: 14px;
  border-top: 1px solid #35373b;
}

.pan123-login-card .button.secondary {
  border-color: #3b3e43;
  color: #c8ccd1;
  background: #2a2c30;
}

.pan123-login-card .button.primary {
  border-color: #4e7fff;
  color: #fff;
  background: #4e7fff;
}

.pan123-player-dialog {
  width: min(1180px, calc(100% - 24px));
  max-width: none;
  max-height: calc(100vh - 24px);
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
}

.pan123-player-shell {
  overflow: hidden;
  border: 1px solid #2f3237;
  border-radius: 8px;
  color: #f1f4f8;
  background: #111317;
  box-shadow: 0 28px 100px rgba(0, 0, 0, .7);
}

.pan123-player-head {
  min-height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 10px 16px 10px 20px;
  border-bottom: 1px solid #2d3035;
  background: #17191d;
}

.pan123-player-head strong,
.pan123-player-head span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pan123-player-head strong {
  color: #f5f7f9;
  font-size: 15px;
}

.pan123-player-head span {
  margin-top: 3px;
  color: #8f969f;
  font-size: 10.5px;
}

.pan123-player-stage {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #020304;
}

.pan123-player-stage video {
  width: 100%;
  height: 100%;
  display: block;
  background: #020304;
  object-fit: contain;
}

.pan123-art-player {
  width: 100%;
  height: 100%;
}

.pan123-art-player .art-video-player {
  width: 100%;
  height: 100%;
}

.pan123-art-player .art-loading {
  display: none !important;
}

.pan123-player-episode-picker {
  position: absolute;
  inset: 0;
  z-index: 70;
  pointer-events: none;
}

.pan123-player-episode-picker[hidden],
.pan123-player-episode-menu[hidden] {
  display: none;
}

.pan123-player-episode-control {
  height: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  padding: 0 8px;
  border: 0;
  color: rgba(255, 255, 255, .9);
  background: transparent;
  font: inherit;
  font-size: 16px;
  font-weight: 650;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
}

.pan123-player-episode-control:hover,
.pan123-player-episode-control[aria-expanded="true"] {
  color: #6da9ff;
}

.pan123-player-episode-control[hidden] {
  display: none;
}

.pan123-player-episode-menu {
  position: absolute;
  right: 12px;
  bottom: 66px;
  width: min(420px, calc(100% - 24px));
  max-height: min(calc(100% - 90px), 420px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #343b46;
  border-radius: 6px;
  color: #edf2f8;
  background: rgba(16, 20, 27, .97);
  box-shadow: 0 18px 50px rgba(0, 0, 0, .48);
  pointer-events: auto;
}

.pan123-player-episode-menu header {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 13px;
  border-bottom: 1px solid #303641;
}

.pan123-player-episode-menu header strong {
  font-size: 13px;
}

.pan123-player-episode-menu header span {
  color: #8e9aab;
  font-size: 10.5px;
}

.pan123-player-episode-list {
  display: grid;
  gap: 3px;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 6px;
  scrollbar-color: #596579 transparent;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
}

.pan123-player-episode-item {
  min-width: 0;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 8px 9px;
  border: 0;
  border-radius: 4px;
  color: #cbd4df;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.pan123-player-episode-item:hover {
  color: #fff;
  background: #242b35;
}

.pan123-player-episode-item.active {
  color: #fff;
  background: #17365f;
}

.pan123-player-episode-item-index {
  color: #8492a3;
  font-size: 10px;
  text-align: center;
}

.pan123-player-episode-item.active .pan123-player-episode-item-index {
  color: #9bc5ff;
}

.pan123-player-episode-item-name {
  overflow: hidden;
  font-size: 11.5px;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pan123-browser-dialog {
  width: min(920px, calc(100% - 24px));
  max-width: none;
  max-height: calc(100vh - 24px);
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
}

.pan123-browser-dialog::backdrop {
  background: rgba(4, 7, 12, .82);
  backdrop-filter: blur(4px);
}

.pan123-browser-shell {
  overflow: hidden;
  border: 1px solid #31343a;
  border-radius: 8px;
  color: #edf1f6;
  background: #15171b;
  box-shadow: 0 28px 90px rgba(0, 0, 0, .62);
}

.pan123-browser-head {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 13px 10px 17px;
  border-bottom: 1px solid #2d3035;
  background: #1b1d21;
}

.pan123-browser-head strong {
  font-size: 15px;
}

.pan123-browser-head span {
  margin-left: 8px;
  padding: 2px 7px;
  border-radius: 999px;
  color: #9ba3ad;
  background: #292c31;
  font-size: 10px;
}

.pan123-browser-head button,
.pan123-browser-toolbar button {
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid #393d43;
  border-radius: 5px;
  color: #b7bec7;
  background: #24272b;
  cursor: pointer;
  font-size: 10.5px;
}

.pan123-browser-head button {
  width: 32px;
  padding: 0;
  font-size: 19px;
}

.pan123-browser-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  min-height: 48px;
  padding: 7px 12px;
  border-bottom: 1px solid #2c2f34;
}

.pan123-browser-toolbar button.active {
  border-color: #3e76ff;
  color: #dce7ff;
  background: #24365f;
}

.pan123-browser-breadcrumb {
  min-height: 38px;
  display: flex;
  align-items: center;
  padding: 7px 14px;
  border-bottom: 1px solid #292c31;
  color: #8f98a4;
  background: #191b1f;
  font-size: 10.5px;
}

.pan123-browser-list {
  max-height: min(62vh, 540px);
  padding: 6px 9px 10px;
  overflow-y: auto;
}

.pan123-browser-row {
  min-height: 58px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-bottom-color: #292c31;
}

.pan123-browser-row.folder {
  border-color: #254a86;
  background: #18243b;
}

.pan123-browser-icon {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 5px;
  color: #f2bd50;
  background: #302818;
}

.pan123-browser-row.file .pan123-browser-icon {
  color: #8ea4c2;
  background: #242930;
}

.pan123-browser-name {
  min-width: 0;
  overflow: hidden;
  color: #e4e9ef;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pan123-browser-size {
  color: #8b949f;
  font-size: 10px;
  white-space: nowrap;
}

.pan123-browser-action {
  min-height: 31px;
  padding: 0 11px;
  border: 1px solid #3d5f9e;
  border-radius: 5px;
  color: #72a5ff;
  background: #202b40;
  cursor: pointer;
  font-size: 10.5px;
}

.pan123-browser-error {
  margin: 0 12px 12px;
  padding: 9px 11px;
  border: 1px solid #703b40;
  border-radius: 5px;
  color: #ff9da4;
  background: #342326;
  font-size: 11px;
}

.pan123-browser-empty {
  min-height: 180px;
  display: grid;
  place-items: center;
  color: #8d96a2;
  font-size: 11px;
}

.pan123-player-loading {
  display: none !important;
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 35;
  padding: 10px 14px;
  border-radius: 6px;
  color: #cbd1d9;
  background: rgba(7, 11, 18, .82);
  transform: translate(-50%, -50%);
  font-size: 11px;
}

.pan123-player-error {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 36;
  width: min(430px, calc(100% - 28px));
  text-align: center;
  transform: translate(-50%, -50%);
}

.pan123-episode-strip {
  display: flex;
  gap: 8px;
  padding: 11px 14px;
  overflow-x: auto;
  border-top: 1px solid #2d3035;
  background: #17191d;
  scrollbar-width: thin;
}

.pan123-episode-strip button {
  min-height: 36px;
  max-width: 280px;
  flex: 0 0 auto;
  padding: 0 12px;
  overflow: hidden;
  border: 1px solid #393d43;
  border-radius: 5px;
  color: #bdc4cc;
  background: #24272b;
  cursor: pointer;
  font-size: 10.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pan123-episode-strip button.active {
  border-color: #4e7fff;
  color: #fff;
  background: #315fbf;
}

@media (max-width: 620px) {
  .pan123-login-dialog {
    width: calc(100% - 18px);
  }
  .pan123-login-card {
    padding: 0 15px 15px;
  }
  .pan123-login-card header {
    margin: 0 -15px;
    padding: 15px;
  }
  .pan123-player-dialog {
    width: 100%;
    max-height: 100dvh;
    margin: 0;
    border-radius: 0;
  }
  .pan123-player-shell {
    min-height: 100dvh;
    border: 0;
    border-radius: 0;
  }
  .pan123-player-head {
    min-height: 56px;
    padding: 9px 12px;
  }
  .pan123-player-head strong {
    font-size: 13px;
  }
  .pan123-player-stage {
    margin-top: min(28vh, 190px);
  }
  .pan123-player-episode-picker {
    inset: 0;
  }
  .pan123-player-episode-menu {
    right: 8px;
    bottom: 56px;
    width: calc(100% - 16px);
    max-height: calc(100% - 72px);
  }
  .pan123-episode-strip {
    padding: 9px 10px;
  }
  .pan123-browser-dialog {
    width: 100%;
    max-height: 100dvh;
    margin: 0;
    border-radius: 0;
  }
  .pan123-browser-shell {
    min-height: 100dvh;
    border: 0;
    border-radius: 0;
  }
  .pan123-browser-row {
    grid-template-columns: 30px minmax(0, 1fr) auto;
  }
  .pan123-browser-size {
    display: none;
  }
}

.brand-copy .brand-site-url {
  color: var(--text);
  font-size: 11.5px;
  font-weight: 650;
  letter-spacing: .15px;
}

.brand-copy .brand-mobile-nickname {
  display: none !important;
}

.detail-mobile-score {
  display: none;
}

@media (max-width: 620px) {
  body[data-page="detail"] .page-shell {
    width: calc(100% - 24px);
    padding-top: 12px;
  }

  body[data-page="detail"] .detail-hero {
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 14px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  body[data-page="detail"] .detail-poster-wrap {
    align-self: start;
  }

  body[data-page="detail"] .detail-poster {
    width: 112px;
    border: 0;
    border-radius: 3px;
  }

  body[data-page="detail"] .detail-quality,
  body[data-page="detail"] .original-title,
  body[data-page="detail"] .tag-list,
  body[data-page="detail"] .detail-desktop-score,
  body[data-page="detail"] .detail-facts .fact-secondary {
    display: none !important;
  }

  body[data-page="detail"] .detail-main {
    min-height: 168px;
    display: flex;
    flex-direction: column;
    padding-top: 1px;
  }

  body[data-page="detail"] .detail-title-row {
    display: block;
  }

  body[data-page="detail"] .detail-title-row h1 {
    overflow: hidden;
    margin: 0;
    font-size: 18px;
    line-height: 1.3;
    letter-spacing: 0;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body[data-page="detail"] .detail-facts {
    gap: 7px;
    margin: 13px 0 0;
  }

  body[data-page="detail"] .detail-facts div {
    grid-template-columns: 39px minmax(0, 1fr);
    gap: 9px;
  }

  body[data-page="detail"] .detail-facts dt {
    font-size: 10.5px;
  }

  body[data-page="detail"] .detail-facts dd {
    font-size: 11.5px;
    line-height: 1.55;
  }

  body[data-page="detail"] .fact-directors dd {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body[data-page="detail"] .fact-actors dd {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
  }

  body[data-page="detail"] .detail-favorite-corner {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: auto;
    padding-top: 8px;
    position: static;
  }

  body[data-page="detail"] .detail-favorite-corner form {
    margin: 0;
  }

  body[data-page="detail"] .detail-favorite-corner .favorite-button {
    width: auto;
    min-height: 34px;
    padding: 0 12px;
    font-size: 10.5px;
  }

  body[data-page="detail"] .detail-mobile-score {
    display: flex;
    align-items: baseline;
    gap: 4px;
  }

  body[data-page="detail"] .detail-mobile-score strong {
    color: var(--warning);
    font-size: 18px;
    line-height: 1;
  }

  body[data-page="detail"] .detail-mobile-score span {
    color: var(--muted);
    font-size: 9px;
  }

  body[data-page="detail"] .detail-content-grid {
    margin-top: 18px;
  }

  body[data-page="detail"] .synopsis-panel {
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  body[data-page="detail"] .synopsis-panel .section-title-row h2 {
    font-size: 18px;
  }

  body[data-page="detail"] .synopsis-text {
    margin-top: 9px;
    color: var(--text-soft);
    font-size: 12.5px;
    line-height: 1.8;
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 4;
  }

  body[data-page="detail"] .detail-share-bottom {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 14px 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  body[data-page="detail"] .detail-share-bottom .share-icon {
    display: none;
  }

  body[data-page="detail"] .detail-share-bottom .share-copy {
    min-width: 0;
    flex: 1;
    gap: 0;
  }

  body[data-page="detail"] .detail-share-bottom .share-copy strong {
    display: block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body[data-page="detail"] .detail-share-bottom .share-actions {
    width: auto;
    flex: 0 0 auto;
  }

  body[data-page="detail"] .detail-share-bottom .share-actions .button {
    min-height: 34px;
    padding: 0 13px;
  }
}
