@charset "UTF-8";
/* Shared controls and responsive foundations. See TEMPLATE_SOURCE.md for visual sources. */
:root {
  color-scheme: light;
  --bg: #fff;
  --surface: #f7f8fa;
  --text: #333;
  --muted: #999;
  --line: #eee;
  --accent: #40cc92;
  --accent-soft: #eaf9f2;
  --cover: #f0f2f4;
  --radius: 8px;
  font-family:
    'PingFang SC',
    -apple-system,
    BlinkMacSystemFont,
    'Microsoft YaHei',
    sans-serif;
}
:root[data-theme='dark'] {
  color-scheme: dark;
  --bg: #22232a;
  --surface: #2b2d35;
  --text: #f1f2f5;
  --muted: #a1a3af;
  --line: #383a45;
  --accent-soft: #243f36;
  --cover: #30323d;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
}
a {
  color: inherit;
  text-decoration: none;
}
button,
input,
select {
  font: inherit;
}
button {
  cursor: pointer;
  color: inherit;
}
a,
button,
input,
select {
  -webkit-tap-highlight-color: transparent;
}
button:disabled {
  opacity: 0.45;
  cursor: default;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
img {
  max-width: 100%;
}
.muted {
  color: var(--muted);
}
.skip-link {
  position: fixed;
  top: -60px;
  left: 15px;
  background: var(--bg);
  padding: 10px;
  z-index: 50;
}
.skip-link:focus {
  top: 10px;
}
.site-head-wrap {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  max-width: 1520px;
  margin: auto;
  min-height: 80px;
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 14px 36px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-shrink: 0;
}
.brand-symbol {
  width: 37px;
  height: 37px;
  object-fit: cover;
  border-radius: 10px;
  color: #fff;
  text-align: center;
  line-height: 37px;
  font-weight: 800;
  font-size: 23px;
}
.brand-name {
  font-size: 23px;
  font-weight: 750;
  letter-spacing: 2px;
}
nav {
  display: flex;
  gap: 25px;
  align-items: center;
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: auto;
  scrollbar-width: none;
}
nav::-webkit-scrollbar {
  display: none;
}
nav a {
  font-size: 16px;
  font-weight: 600;
  padding: 12px 0;
  position: relative;
}
nav a.active,
nav a:hover {
  color: var(--accent);
}
nav a.active:after {
  content: '';
  position: absolute;
  bottom: 3px;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 3px;
  border-radius: 4px;
  background: var(--accent);
}
#search {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  width: 270px;
  height: 39px;
  border: 1px solid var(--accent);
  border-radius: 24px;
  padding: 3px 3px 3px 13px;
  gap: 8px;
  background: var(--bg);
}
#keyword {
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  width: 100%;
  min-width: 0;
  font-size: 13px;
}
#keyword::placeholder {
  color: var(--muted);
}
#search button {
  flex-shrink: 0;
  border: 0;
  border-radius: 22px;
  background: var(--accent);
  color: #fff;
  padding: 6px 16px;
}
.search-icon {
  width: 12px;
  height: 12px;
  border: 1.7px solid var(--muted);
  border-radius: 50%;
  flex-shrink: 0;
  position: relative;
}
.search-icon:after {
  content: '';
  position: absolute;
  width: 5px;
  height: 1.7px;
  background: var(--muted);
  transform: rotate(45deg);
  right: -4px;
  bottom: -2px;
}
.head-tools {
  display: flex;
  gap: 16px;
  align-items: center;
}
.tool {
  background: transparent;
  border: 0;
  padding: 0;
  min-width: 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 11px;
  color: var(--muted);
}
.tool img {
  width: 26px;
  height: 26px;
  object-fit: contain;
}
.theme-icon {
  width: 24px;
  height: 24px;
  color: var(--text);
}
.theme-sun { display: none; }
:root[data-theme='dark'] .theme-sun { display: block; }
:root[data-theme='dark'] .theme-moon { display: none; }
#theme { width: 44px; min-height: 44px; justify-content: center; border-radius: 50%; }
#theme:hover { background: var(--line); }
#theme:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (prefers-reduced-motion: no-preference) { #theme { transition: background .18s; } }
main {
  max-width: 1270px;
  margin: auto;
  padding: 28px 28px 60px;
  min-height: 72vh;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  font-size: 26px;
}
h2 {
  font-size: 25px;
  font-weight: 650;
}
.heading {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 30px 0 20px;
  min-width: 0;
}
.heading h1,
.heading h2 {
  margin: 0;
  line-height: 1.4;
}
.heading > img {
  width: 30px;
  height: 30px;
  object-fit: contain;
}
.heading > span {
  color: var(--muted);
  font-size: 12px;
}
.heading .more {
  margin-left: auto;
  font-size: 13px;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 6px 18px;
  color: var(--muted);
  white-space: nowrap;
}
.heading .more:hover {
  background: var(--accent);
  color: #fff;
}
.notice {
  background: var(--accent-soft);
  border-radius: var(--radius);
  padding: 12px 18px;
  color: #369b72;
  margin-bottom: 20px;
  font-size: 13px;
}
.hero {
  position: relative;
  height: 350px;
  border-radius: 14px;
  overflow: hidden;
  background: #273c36;
  margin: 0 0 22px;
}
.hero-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: end;
}
.hero-slide[hidden] {
  display: none;
}
.hero img {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 28%;
}
.hero-slide:after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, #0c1a18e0, #0c1a180f),
    linear-gradient(0deg, #0c1a18a6, transparent 75%);
}
.hero-body {
  position: relative;
  z-index: 1;
  max-width: 680px;
  padding: 36px 42px;
  color: #fff;
}
.eyebrow {
  font-size: 12px;
  color: var(--accent);
  margin-bottom: 10px;
  display: block;
}
.hero h1 {
  font-size: 32px;
  font-weight: 650;
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.hero .meta {
  color: #d3ddd7;
}
.meta {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.8;
}
.hero-summary {
  font-size: 13px;
  opacity: 0.8;
  line-height: 1.8;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 12px 0 0;
}
.primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--accent);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  color: #fff;
  padding: 10px 24px;
  font-size: 14px;
}
.hero .primary {
  margin-top: 20px;
}
.hero-controls {
  position: absolute;
  right: 24px;
  bottom: 22px;
  z-index: 2;
  display: flex;
  gap: 8px;
  align-items: center;
}
.hero-dot {
  border: 0;
  width: 7px;
  height: 7px;
  padding: 0;
  border-radius: 5px;
  background: #ffffff70;
}
.hero-dot.active {
  width: 22px;
  background: var(--accent);
}
.hero-arrow {
  border: 1px solid #ffffff55;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  background: #0003;
  color: #fff;
  font-size: 22px;
  line-height: 1;
}
.channel-strip {
  display: flex;
  padding: 18px 0 20px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 28px;
  overflow: auto;
  scrollbar-width: none;
}
.channel-group {
  display: flex;
  flex-direction: column;
  gap: 9px;
  min-width: 0;
  flex: 1;
  padding: 0 22px;
  border-right: 1px solid var(--line);
}
.channel-group:first-child {
  padding-left: 0;
}
.channel-group:last-child {
  border: 0;
}
.channel-group > a {
  font-size: 16px;
  font-weight: 650;
  white-space: nowrap;
}
.channel-group > div {
  display: flex;
  gap: 14px;
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}
.channel-group a:hover {
  color: var(--accent);
}
.recommend-tabs {
  display: flex;
  gap: 26px;
  overflow: auto;
  align-items: center;
  scrollbar-width: none;
  margin: 25px 0 20px;
  border-bottom: 1px solid var(--line);
}
.recommend-tabs button {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 12px 0;
  border: 0;
  border-bottom: 3px solid transparent;
  background: none;
  white-space: nowrap;
  font-size: 17px;
  color: var(--muted);
}
.recommend-tabs img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}
.recommend-tabs button.active {
  border-color: var(--accent);
  color: var(--accent);
  font-weight: 600;
}
.grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 24px 16px;
}
.film {
  display: block;
  min-width: 0;
}
.poster {
  position: relative;
  aspect-ratio: 20/29;
  border-radius: var(--radius);
  background: var(--cover);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
}
.poster > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.25s;
}
.poster-fallback {
  padding: 16px;
  text-align: center;
  line-height: 1.7;
  font-size: 13px;
  overflow-wrap: anywhere;
}
.film:hover .poster > img {
  transform: scale(1.04);
}
.film:hover h3 {
  color: var(--accent);
}
.badge {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 26px 8px 7px;
  font-size: 11px;
  text-align: right;
  color: #fff;
  background: linear-gradient(transparent, #0009);
  line-height: 1.3;
}
.type-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  background: #40cc92ed;
  color: #fff;
  border-radius: 3px;
  padding: 2px 5px;
  font-size: 10px;
}
.film h3 {
  font-size: 16px;
  font-weight: 500;
  line-height: 22px;
  margin: 9px 0 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.film p {
  font-size: 13px;
  color: var(--muted);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.refresh-wrap {
  display: flex;
  justify-content: center;
  padding: 22px 0 8px;
}
.secondary {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--muted);
  padding: 8px 18px;
  font-size: 13px;
}
.secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.pager {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: center;
  margin: 36px 0 12px;
  flex-wrap: wrap;
  font-size: 13px;
}
.pager .current {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}
.pager > span {
  color: var(--muted);
  padding: 0 5px;
}
.filters {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin: 18px 0 26px;
}
.filter-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin: 9px 0;
  font-size: 13px;
}
.filter-label {
  color: var(--muted);
  flex-shrink: 0;
  line-height: 30px;
}
.filter-options {
  display: flex;
  gap: 5px 9px;
  flex-wrap: wrap;
}
.filter-options a {
  padding: 5px 12px;
  border-radius: 5px;
}
.filter-options a.active {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}
.filter-options a:hover {
  color: var(--accent);
}
.filter-selects {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  border-top: 1px solid var(--line);
  padding-top: 14px;
  margin-top: 15px;
}
.filter-selects label {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
}
.filter-selects select {
  max-width: 150px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--text);
  border-radius: 5px;
  padding: 5px 12px;
}
.empty {
  padding: 65px 16px;
  text-align: center;
  color: var(--muted);
  line-height: 2;
}
.empty h1 {
  font-size: 22px;
  color: var(--text);
}
.empty .secondary {
  display: inline-block;
  margin-top: 12px;
}
.back {
  display: inline-block;
  color: var(--muted);
  font-size: 13px;
  margin: 0 0 22px;
}
.back:hover {
  color: var(--accent);
}
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 20px;
}
.detail {
  display: grid;
  grid-template-columns: 185px minmax(0, 1fr);
  gap: 30px;
  padding: 22px;
  border-radius: 12px;
  background: var(--surface);
  margin-bottom: 26px;
}
.detail h1 {
  font-size: 29px;
  line-height: 1.4;
  margin-bottom: 14px;
  overflow-wrap: anywhere;
}
.detail .eyebrow {
  margin-bottom: 6px;
}
.credits {
  font-size: 13px;
  line-height: 2;
  color: var(--muted);
  margin: 12px 0;
  white-space: pre-line;
  overflow-wrap: anywhere;
}
.detail-blurb {
  font-size: 13px;
  line-height: 1.9;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  max-width: 750px;
}
.detail-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 15px;
}
.score {
  color: var(--accent);
  font-size: 22px;
  font-weight: 650;
  margin-left: 8px;
}
.description {
  font-size: 14px;
  line-height: 2;
  color: var(--muted);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.section-panel {
  margin: 25px 0;
  padding: 0 0 25px;
  border-bottom: 1px solid var(--line);
}
.section-title {
  font-size: 20px;
  margin: 0 0 18px;
  font-weight: 650;
}
.lines {
  display: flex;
  gap: 20px;
  overflow: auto;
  border-bottom: 1px solid var(--line);
  scrollbar-width: thin;
  margin-bottom: 18px;
}
.lines button {
  flex-shrink: 0;
  background: none;
  border: 0;
  border-bottom: 3px solid transparent;
  color: var(--muted);
  padding: 10px 2px 12px;
  font-size: 15px;
}
.lines button.active {
  border-bottom-color: var(--accent);
  color: var(--accent);
  font-weight: 600;
}
.episodes {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 10px;
  max-height: 360px;
  overflow: auto;
  padding: 2px;
}
.episodes a,
.episodes button {
  display: block;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text);
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: var(--surface);
  padding: 11px 9px;
  font-size: 13px;
}
.episodes a:hover,
.episodes button:hover,
.episodes .active {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: var(--accent);
}
.play-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 295px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface);
  margin-bottom: 28px;
}
.watch {
  min-width: 0;
  background: #080808;
  display: flex;
  flex-direction: column;
}
.watch video {
  display: block;
  width: 100%;
  aspect-ratio: 16/9;
  background: #000;
  max-height: 70vh;
}
.player-info {
  display: flex;
  align-items: center;
  gap: 14px;
  justify-content: space-between;
  padding: 12px 16px;
  color: #c4c5c9;
  background: #18191d;
  min-height: 55px;
}
.player-info p {
  font-size: 12px;
  line-height: 1.7;
  margin: 0;
  overflow-wrap: anywhere;
}
.player-info .secondary {
  white-space: nowrap;
  background: #303239;
  border-color: #41434a;
  color: #ddd;
}
.play-sidebar {
  padding: 18px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  max-height: 570px;
}
.play-sidebar h2 {
  font-size: 17px;
  margin-bottom: 4px;
}
.play-sidebar > .muted {
  font-size: 12px;
  margin-bottom: 8px;
}
.play-sidebar .lines {
  flex-shrink: 0;
  gap: 15px;
}
.play-sidebar .lines button {
  font-size: 13px;
  max-width: 170px;
  text-overflow: ellipsis;
  overflow: hidden;
}
.play-sidebar .episodes {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-height: 350px;
}
.play-sidebar .episodes button {
  padding: 9px 5px;
  font-size: 12px;
  background: var(--bg);
}
.play-sidebar .episodes button.active {
  background: var(--accent-soft);
}
.error {
  color: #f37c71;
}
.document-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}
.document-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
}
.document-card img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
}
.document-card h2 {
  font-size: 18px;
  padding: 16px 18px 0;
  margin-bottom: 10px;
}
.document-card p {
  padding: 0 18px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.9;
}
.document-title {
  font-size: 28px;
  overflow-wrap: anywhere;
}
.article-body { font-size: 16px; line-height: 1.9; overflow-wrap: anywhere; }
.article-body p, .article-body ul, .article-body ol, .article-body blockquote { margin: 0 0 16px; }
.article-body ul, .article-body ol { padding-left: 24px; }
.article-body img { max-width: 100%; height: auto; border-radius: 8px; }
.article-body a { color: var(--accent); text-decoration: underline; }
.article-body pre, .article-body table { display: block; max-width: 100%; overflow-x: auto; }
.article-body blockquote { padding: 12px 16px; border-left: 3px solid var(--accent); background: var(--surface); color: var(--muted); }
.article-page-title { margin: 16px 0; }
.article-pagination { flex-wrap: wrap; }
.article-pagination [aria-current="page"] { background: var(--accent); color: white; border-color: var(--accent); }
.document-cover {
  max-width: 420px;
  max-height: 420px;
  object-fit: contain;
  border-radius: var(--radius);
  margin-bottom: 20px;
}
.skeleton {
  background: var(--surface);
  aspect-ratio: 20/29;
  border-radius: var(--radius);
  animation: pulse 1s alternate infinite;
}
@keyframes pulse {
  to {
    opacity: 0.4;
  }
}
footer {
  border-top: 1px solid var(--line);
  background: var(--surface);
  padding: 28px 28px 35px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}
.footer-inner {
  max-width: 1214px;
  margin: auto;
}
.footer-nav {
  display: flex;
  justify-content: center;
  gap: 22px;
  flex-wrap: wrap;
}
.footer-nav a:hover {
  color: var(--accent);
}
.footer-copy {
  margin: 15px 0 0;
  line-height: 1.8;
}
.friend-links {
  display: flex;
  justify-content: center;
  gap: 15px;
  flex-wrap: wrap;
  margin-top: 14px;
}
.friend-links:empty {
  display: none;
}
#to-top {
  position: fixed;
  bottom: 30px;
  right: 24px;
  z-index: 10;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 24px;
  box-shadow: 0 3px 12px #40cc9220;
}
dialog {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 24px;
  background: var(--bg);
  color: var(--text);
  width: min(560px, calc(100% - 32px));
  max-height: 80vh;
}
dialog::backdrop {
  background: #0006;
  backdrop-filter: blur(3px);
}
.dialog-heading {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}
.dialog-heading h2 {
  margin: 0;
  font-size: 20px;
}
dialog > .muted {
  font-size: 12px;
  margin: 12px 0;
}
#history-list {
  max-height: 48vh;
  overflow: auto;
  margin-bottom: 18px;
}
.history-item {
  display: flex;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding: 12px 0;
}
.history-item .poster {
  flex: 0 0 48px;
  height: 66px;
}
.history-item h3 {
  font-size: 14px;
  margin: 3px 0 6px;
}
.history-item p {
  font-size: 12px;
  color: var(--muted);
  margin: 0;
}
#toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 50;
  border-radius: 8px;
  background: #333e;
  color: #fff;
  padding: 10px 18px;
  font-size: 13px;
  display: none;
}
@media (min-width: 1600px) {
  main {
    max-width: 1456px;
  }
  .hero {
    height: 400px;
  }
  .grid {
    gap: 25px 20px;
  }
}
@media (max-width: 1200px) {
  .header-inner {
    gap: 20px;
    padding: 12px 24px;
  }
  nav {
    gap: 20px;
  }
  nav a {
    font-size: 14px;
  }
  #search {
    width: 230px;
  }
  .head-tools {
    gap: 10px;
  }
  .tool span:not(.theme-icon) {
    display: none;
  }
  .brand-name {
    font-size: 21px;
  }
}
@media (max-width: 1000px) and (min-width: 821px) {
  .header-inner {
    flex-wrap: wrap;
    gap: 5px 24px;
  }
  nav {
    order: 3;
    flex-basis: 100%;
    justify-content: center;
  }
  #search {
    margin-left: auto;
    width: 300px;
  }
  .grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .play-layout {
    grid-template-columns: minmax(0, 1fr) 250px;
  }
}
@media (max-width: 820px) {
  .header-inner {
    padding: 12px 15px 0;
    gap: 10px 15px;
    flex-wrap: wrap;
    min-height: 0;
  }
  .brand {
    order: 0;
  }
  .brand-symbol {
    width: 30px;
    height: 30px;
    line-height: 30px;
    border-radius: 8px;
    font-size: 20px;
  }
  .brand-name {
    font-size: 21px;
  }
  .head-tools {
    order: 1;
    margin-left: auto;
    gap: 18px;
  }
  .tool img {
    width: 24px;
    height: 24px;
  }
  .theme-icon {
    width: 22px;
    height: 22px;
  }
  #search {
    order: 2;
    width: 100%;
    height: 38px;
  }
  #keyword {
    font-size: 14px;
  }
  nav {
    order: 3;
    width: 100%;
    flex-basis: 100%;
    gap: 26px;
    margin: 0 -15px;
    padding: 0 15px;
    flex-shrink: 0;
  }
  nav a {
    font-size: 15px;
    padding: 8px 0 11px;
  }
  nav a.active:after {
    bottom: 2px;
  }
  main {
    padding: 16px 15px 40px;
  }
  .hero {
    height: 205px;
    border-radius: 10px;
    margin-bottom: 15px;
  }
  .hero-body {
    padding: 20px 22px;
    max-width: 85%;
  }
  .hero h1 {
    font-size: 23px;
    line-height: 1.35;
    margin-bottom: 7px;
  }
  .hero .eyebrow,
  .hero-summary {
    display: none;
  }
  .hero .meta {
    font-size: 10px;
    gap: 6px;
    max-height: 32px;
    overflow: hidden;
  }
  .hero .primary {
    font-size: 12px;
    padding: 6px 14px;
    margin-top: 12px;
    border-radius: 5px;
  }
  .hero-controls {
    right: 13px;
    bottom: 14px;
    gap: 6px;
  }
  .hero-arrow {
    display: none;
  }
  .hero-dot {
    height: 5px;
    width: 5px;
  }
  .hero-dot.active {
    width: 16px;
  }
  .channel-strip {
    padding: 7px 0 17px;
    margin-bottom: 17px;
  }
  .channel-group {
    padding: 0 14px;
    min-width: 78px;
    gap: 7px;
    flex-shrink: 0;
  }
  .channel-group > a {
    font-size: 14px;
  }
  .channel-group > div {
    font-size: 11px;
    gap: 8px;
  }
  .channel-group > div a:nth-child(n + 2) {
    display: none;
  }
  .recommend-tabs {
    gap: 23px;
    margin: 10px 0 16px;
  }
  .recommend-tabs button {
    font-size: 15px;
    gap: 5px;
    padding: 10px 0;
  }
  .recommend-tabs img {
    width: 23px;
    height: 23px;
  }
  .grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px 10px;
  }
  .poster {
    border-radius: 7px;
  }
  .poster-fallback {
    font-size: 11px;
    padding: 8px;
  }
  .film h3 {
    font-size: 14px;
    line-height: 20px;
    margin: 7px 0 3px;
  }
  .film p {
    font-size: 11px;
    line-height: 16px;
  }
  .badge {
    font-size: 10px;
    padding: 24px 5px 6px;
  }
  .type-badge {
    font-size: 9px;
    padding: 1px 4px;
    top: 5px;
    right: 5px;
  }
  .heading {
    margin: 27px 0 16px;
    gap: 6px;
  }
  .heading h1,
  .heading h2 {
    font-size: 20px;
    min-width: 0;
  }
  .heading > img {
    width: 26px;
    height: 26px;
  }
  .heading > span {
    font-size: 11px;
  }
  .heading .more {
    padding: 5px 12px;
    font-size: 11px;
  }
  .refresh-wrap {
    padding: 18px 0 0;
  }
  .secondary {
    padding: 7px 14px;
    font-size: 12px;
  }
  .filters {
    padding: 10px 12px;
    margin: 15px 0 20px;
  }
  .filter-row {
    gap: 7px;
    font-size: 12px;
  }
  .filter-options {
    gap: 3px;
  }
  .filter-options a {
    padding: 5px 9px;
  }
  .filter-selects {
    gap: 10px;
    margin-top: 10px;
    padding-top: 12px;
  }
  .filter-selects label {
    gap: 5px;
  }
  .filter-selects select {
    padding: 5px;
    max-width: 110px;
  }
  .pager {
    margin-top: 28px;
    gap: 7px;
  }
  .pager a {
    padding: 7px 12px;
  }
  .pager .number {
    display: none;
  }
  .notice {
    font-size: 12px;
    padding: 10px 12px;
  }
  .breadcrumb {
    font-size: 11px;
    margin-bottom: 14px;
  }
  .detail {
    grid-template-columns: 105px minmax(0, 1fr);
    gap: 16px;
    padding: 15px;
    margin-bottom: 20px;
  }
  .detail .poster {
    align-self: start;
  }
  .detail h1 {
    font-size: 20px;
    line-height: 1.5;
    margin-bottom: 8px;
  }
  .detail .eyebrow {
    display: none;
  }
  .detail .meta {
    font-size: 11px;
    gap: 6px;
  }
  .credits {
    font-size: 11px;
    line-height: 1.8;
    margin: 8px 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .detail-blurb {
    display: none;
  }
  .detail-actions {
    gap: 7px;
    flex-wrap: wrap;
    margin-top: 10px;
  }
  .detail-actions .primary {
    font-size: 12px;
    padding: 7px 13px;
  }
  .detail-actions .secondary {
    padding: 7px 11px;
  }
  .score {
    font-size: 17px;
  }
  .section-title {
    font-size: 19px;
    margin-bottom: 13px;
  }
  .section-panel {
    padding-bottom: 20px;
    margin: 22px 0;
  }
  .lines {
    gap: 18px;
    margin-bottom: 14px;
  }
  .lines button {
    font-size: 14px;
    padding: 8px 1px 10px;
  }
  .episodes {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    max-height: 310px;
  }
  .episodes a,
  .episodes button {
    font-size: 12px;
    padding: 10px 4px;
  }
  .play-layout {
    display: block;
    border: 0;
    background: transparent;
    overflow: visible;
    margin-bottom: 22px;
  }
  .watch {
    margin: 0 -15px;
  }
  .watch video {
    max-height: 60vh;
  }
  .player-info {
    padding: 10px 12px;
    gap: 8px;
  }
  .player-info p {
    font-size: 11px;
  }
  .player-info .secondary {
    padding: 7px 10px;
    font-size: 11px;
  }
  .play-sidebar {
    padding: 20px 0 0;
    max-height: none;
  }
  .play-sidebar h2 {
    font-size: 19px;
  }
  .play-sidebar > .muted {
    font-size: 11px;
  }
  .play-sidebar .lines button {
    font-size: 14px;
  }
  .play-sidebar .episodes {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    max-height: 310px;
  }
  .play-sidebar .episodes button {
    background: var(--surface);
    padding: 10px 4px;
  }
  .description {
    font-size: 13px;
    line-height: 1.9;
  }
  .document-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  .document-card h2 {
    font-size: 16px;
    padding: 12px 12px 0;
  }
  .document-card p {
    padding: 0 12px;
    font-size: 12px;
  }
  .document-title {
    font-size: 24px;
  }
  .back {
    margin-bottom: 18px;
    font-size: 12px;
  }
  footer {
    padding: 24px 15px 30px;
    font-size: 11px;
  }
  .footer-nav {
    gap: 16px;
  }
  #to-top {
    right: 14px;
    bottom: 22px;
    width: 34px;
    height: 34px;
    font-size: 21px;
  }
  dialog {
    padding: 18px;
  }
  .history-item h3 {
    font-size: 13px;
  }
}
[hidden] {
  display: none !important;
}
.app-back,
.app-page-title,
.app-tabbar {
  display: none;
}
.site-head-wrap {
  padding-top: env(safe-area-inset-top, 0px);
}
.install-entry {
  border: 0;
  padding: 0;
  color: inherit;
  font: inherit;
  background: none;
  cursor: pointer;
}
.install-entry:hover {
  color: var(--accent);
}
.install-icon {
  display: block;
  width: 76px;
  height: 76px;
  border-radius: 18px;
  margin: 24px auto;
}
#install-instructions {
  font-size: 14px;
  line-height: 2;
}
#install-dialog > .muted {
  line-height: 1.8;
}
.standalone .install-entry {
  display: none;
}
.connection-status {
  text-align: center;
  background: #fff0cd;
  color: #936c25;
  font-size: 12px;
  padding: 8px 15px;
}
.pwa-banner {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--bg);
  box-shadow: 0 4px 30px #0002;
  max-width: calc(100% - 24px);
  width: max-content;
  font-size: 13px;
}
.pwa-banner .primary,
.pwa-banner .secondary {
  font-size: 12px;
  padding: 6px 10px;
  white-space: nowrap;
}
.offline-page {
  min-height: 100svh;
  padding-top: max(80px, env(safe-area-inset-top, 0px));
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}
.offline-page .empty {
  padding-top: 10px;
}
dialog {
  overscroll-behavior: contain;
}
footer {
  padding-bottom: calc(35px + env(safe-area-inset-bottom, 0px));
}
.standalone body {
  overscroll-behavior-y: none;
}
@media (max-width: 820px) {
  .header-inner {
    padding-left: max(15px, env(safe-area-inset-left, 0px));
    padding-right: max(15px, env(safe-area-inset-right, 0px));
  }
  body[data-page='detail'] .header-inner,
  body[data-page='play'] .header-inner {
    padding-top: 10px;
    padding-bottom: 10px;
    flex-wrap: nowrap;
    gap: 12px;
    min-height: 54px;
  }
  body[data-page='detail'] .brand,
  body[data-page='play'] .brand,
  body[data-page='detail'] #search,
  body[data-page='play'] #search,
  body[data-page='detail'] #nav,
  body[data-page='play'] #nav {
    display: none;
  }
  body[data-page='detail'] .app-back,
  body[data-page='play'] .app-back {
    display: block;
    font-size: 34px;
    line-height: 30px;
    flex-shrink: 0;
    width: 28px;
    text-align: center;
  }
  body[data-page='detail'] .app-page-title,
  body[data-page='play'] .app-page-title {
    display: block;
    flex: 1;
    min-width: 0;
    font-size: 16px;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  body[data-page='detail'] .head-tools,
  body[data-page='play'] .head-tools {
    order: 0;
    gap: 18px;
    margin: 0;
  }
  main {
    padding-left: max(15px, env(safe-area-inset-left, 0px));
    padding-right: max(15px, env(safe-area-inset-right, 0px));
  }
  body[data-page='play'] .breadcrumb {
    display: none;
  }
  body[data-page='play'] main {
    padding-top: 0;
  }
  .standalone body:not([data-page='play']) {
    padding-bottom: calc(58px + env(safe-area-inset-bottom, 0px));
  }
  .standalone body:not([data-page='play']) .app-tabbar {
    display: flex;
    position: fixed;
    z-index: 25;
    bottom: 0;
    left: 0;
    right: 0;
    align-items: center;
    justify-content: space-around;
    gap: 0;
    background: var(--bg);
    border-top: 1px solid var(--line);
    padding: 6px max(10px, env(safe-area-inset-right, 0px))
      calc(6px + env(safe-area-inset-bottom, 0px)) max(10px, env(safe-area-inset-left, 0px));
    min-height: 58px;
  }
  .app-tabbar a,
  .app-tabbar button {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 2px;
    padding: 0;
    background: none;
    border: 0;
    border-radius: 7px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 400;
    flex: 1;
    line-height: 16px;
    max-width: 90px;
  }
  .app-tabbar img {
    width: 24px;
    height: 24px;
    object-fit: contain;
  }
  .app-tabbar a.active {
    color: var(--accent);
  }
  .app-tabbar a.active:after {
    display: none;
  }
  .standalone #to-top {
    bottom: calc(78px + env(safe-area-inset-bottom, 0px));
  }
  .standalone body[data-page='play'] #to-top {
    bottom: calc(22px + env(safe-area-inset-bottom, 0px));
  }
  .standalone .pwa-banner {
    bottom: calc(74px + env(safe-area-inset-bottom, 0px));
  }
  #keyword {
    font-size: 16px;
  }
  .pwa-banner {
    gap: 8px;
    padding: 10px 12px;
  }
  .pwa-banner > span {
    font-size: 12px;
  }
  #toast {
    bottom: calc(28px + env(safe-area-inset-bottom, 0px));
  }
  .standalone #toast {
    bottom: calc(80px + env(safe-area-inset-bottom, 0px));
  }
  .standalone footer {
    padding-bottom: 25px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

/* Keep portrait art intact when the CMS has no landscape banner. */
.hero-poster {
  align-items: center;
  background: radial-gradient(ellipse at 85% 35%, #4f6c60, #192d29 80%);
}
.hero-poster:after {
  display: none;
}
.hero-poster > .hero-art {
  position: absolute;
  width: 180px;
  height: 261px;
  right: 8%;
  top: 30px;
  border-radius: 10px;
  box-shadow: 0 12px 30px #0005;
}
.hero-poster .hero-body {
  width: 66%;
}
.recommend-tabs {
  scroll-snap-type: x proximity;
}
.recommend-tabs button {
  flex-shrink: 0;
  scroll-snap-align: start;
  white-space: nowrap;
}
.browse-all {
  display: flex;
  justify-content: center;
  margin: 30px auto 0;
  max-width: 360px;
}
.extra-channels {
  margin: 8px 0 14px;
  font-size: 13px;
}
.extra-channels summary {
  cursor: pointer;
  padding: 8px 0;
  color: var(--muted);
  width: fit-content;
}
.extra-channels .filter-options {
  padding: 8px 0;
}
#search {
  position: relative;
  overflow: visible;
}
.hot-panel {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  right: 0;
  min-width: 260px;
  padding: 16px;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 12px 35px #0002;
  z-index: 50;
  text-align: left;
}
.hot-panel[hidden],
#to-top[hidden],
.poster-fallback[hidden] {
  display: none;
}
.hot-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  font-size: 14px;
}
#search .hot-refresh {
  background: none;
  color: var(--muted);
  border: 0;
  padding: 6px;
  font-size: 12px;
  border-radius: 4px;
}
.hot-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 12px;
  max-height: min(360px, 50svh);
  overflow-y: auto;
  overscroll-behavior: contain;
}
.hot-word {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  font-size: 13px;
  min-width: 0;
}
.hot-word > span:last-child {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hot-word:hover {
  color: var(--accent);
}
.hot-rank {
  color: var(--muted);
  width: 18px;
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}
.hot-word:nth-child(-n + 3) .hot-rank {
  color: #ee8051;
  font-weight: 600;
}
@media (max-width: 820px) {
  .hero-poster > .hero-art {
    width: 104px;
    height: 151px;
    right: 20px;
    top: 22px;
  }
  .hero-poster .hero-body {
    width: calc(100% - 122px);
    padding: 20px;
  }
  .hero-poster h1 {
    font-size: 21px;
  }
  .hero-poster .meta {
    font-size: 11px;
    max-height: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.6;
  }
  .hero-poster .primary {
    padding: 8px 12px;
    font-size: 12px;
  }
  .filter-options {
    gap: 6px 10px;
  }
  .filter-options a {
    min-height: 34px;
    display: inline-flex;
    align-items: center;
  }
  .hot-panel {
    padding: 12px;
  }
}
@media (max-width: 360px) {
  .hero-poster > .hero-art {
    width: 85px;
    height: 124px;
    right: 15px;
    top: 30px;
  }
  .hero-poster .hero-body {
    width: calc(100% - 100px);
    padding: 16px;
  }
  .hero-poster h1 {
    font-size: 19px;
  }
}

/* Member entry matches the APK's blue skin (#2050cc). */
body[data-auth="login"] #search, body[data-auth="login"] #nav,
body[data-auth="login"] #history, body[data-auth="login"] #account,
body[data-auth="login"] #app-tabbar, body[data-auth="login"] footer,
body[data-auth="login"] #app-back, body[data-auth="login"] #app-page-title { display: none; }
.auth-panel { --accent: #2050cc; --accent-soft: #eef2ff; display:grid;grid-template-columns:.85fr 1.15fr;max-width:900px;margin:clamp(20px,5vh,56px) auto;border:1px solid var(--line);border-radius:28px;background:var(--bg);box-shadow:0 18px 64px #15357912;overflow:hidden; }
.auth-body{padding:36px 38px;min-width:0}
.auth-cover{position:relative;isolation:isolate;display:flex;flex-direction:column;justify-content:center;padding:36px 30px;color:#fff;background:linear-gradient(155deg,#102c83,#2050cc 55%,#3978e7);overflow:hidden}
.auth-cover:before,.auth-cover:after{content:'';position:absolute;z-index:-1;width:350px;height:350px;border:1px solid #ffffff1c;border-radius:50%;right:-210px;top:100px;box-shadow:0 0 0 42px #ffffff08,0 0 0 84px #ffffff05}
.auth-cover:after{width:150px;height:150px;right:auto;top:auto;left:-90px;bottom:-80px}
.auth-cover-brand{display:flex;align-items:center;gap:12px;font-size:23px;font-weight:650;margin-bottom:auto;padding-bottom:48px}
.auth-cover h2{font-size:28px;line-height:1.5;letter-spacing:.03em;margin:22px 0 8px;font-weight:650}
.auth-cover p{font-size:14px;line-height:1.9;color:#e1eaff;margin:0 0 28px}
.auth-cover-badge{align-self:flex-start;max-width:100%;padding:8px 12px;border:1px solid #ffffff30;border-radius:10px;font-size:11px;letter-spacing:.04em;background:#ffffff0c;margin-top:auto}
.auth-envelope{position:relative;width:116px;height:76px;margin-top:6px;border:1px solid #ffffffa6;border-radius:12px;background:#fffdf1;box-shadow:0 16px 30px #071e6f3b;transform:rotate(-7deg)}
.auth-envelope:after{content:'';position:absolute;left:0;right:0;bottom:0;height:54px;background:linear-gradient(155deg,#dce8ff,#fff);clip-path:polygon(0 0,50% 65%,100% 0,100% 100%,0 100%);border-radius:0 0 11px 11px}
.auth-envelope-flap{position:absolute;inset:0;clip-path:polygon(0 0,100% 0,50% 70%);background:#b2ceff}
.auth-envelope-letter{position:absolute;width:68px;height:67px;left:23px;bottom:22px;background:#fff;border-radius:6px;box-shadow:0 -8px 24px #12286010;transform:rotate(6deg)}
.auth-envelope-letter:before{content:'✓';display:grid;place-items:center;width:27px;height:27px;margin:13px auto;color:#2050cc;background:#edf3ff;border-radius:50%;font-size:18px;font-weight:700}
.auth-panel[data-mode='register'] .auth-envelope-flap{clip-path:polygon(0 0,100% 0,50% -70%)}
.auth-panel[data-mode='register'] .auth-envelope-letter{bottom:28px}
:root[data-theme='dark'] .auth-panel { --accent: #93b3ff; --accent-soft: #273552; }
.auth-panel .primary { background: #2050cc; color: #fff; }
.auth-panel .primary:hover { background: #1b3db3; }
.auth-panel .primary:focus-visible, .auth-toggle:focus-visible, .auth-send-code:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.auth-panel h1 { margin: 0 0 8px; font-size: 26px; }
.auth-body>.muted{font-size:13px;line-height:1.8;margin:0}
.auth-symbol { width: 48px; height: 48px; font-size: 25px; }
.auth-form { display: grid; gap: 16px; margin-top: 28px; }
.auth-form label { display: grid; gap: 8px; font-weight: 500; }
.auth-form input { width: 100%; min-height: 46px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--text); font-size: 16px; }
.auth-form input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.auth-form [hidden] { display: none; }
.auth-form .primary { min-height: 46px; width: 100%; }
.auth-toggle { border: 0; background: none; color: var(--accent); min-height: 40px; }
.auth-error { color: #d74242; margin: 0; font-size: 13px; }
.auth-error:empty { display: none; }

.auth-code-row{display:flex;gap:10px;align-items:center;min-width:0}.auth-code-row input{flex:1;min-width:0}.auth-send-code{flex:0 0 auto;white-space:nowrap;min-height:44px;padding:0 12px;border:1px solid var(--accent,#18a76d);border-radius:8px;color:var(--accent,#18a76d);background:transparent;font-size:13px}.auth-send-code:disabled{opacity:.55;cursor:default}

.auth-error.is-success{color:var(--accent,#18a76d)}
@media(max-width:680px){
  .auth-panel{grid-template-columns:1fr;max-width:460px;margin:16px auto 28px;border-radius:22px}
  .auth-body{padding:25px 24px 22px}.auth-cover{padding:22px 24px;min-height:176px}
  .auth-cover-brand{font-size:19px;padding:0;margin:0 0 10px;gap:9px}.auth-cover .auth-symbol{width:34px;height:34px}
  .auth-cover h2{font-size:23px;margin:0 90px 4px 0}.auth-cover p{font-size:12px;max-width:75%;margin:0 0 12px;line-height:1.7}
  .auth-cover-badge{font-size:10px;padding:5px 8px;margin:0}.auth-envelope{position:absolute;right:25px;bottom:40px;width:72px;height:48px;margin:0;transform:rotate(-9deg)}
  .auth-envelope-letter{width:44px;height:44px;left:13px;bottom:13px}.auth-envelope-letter:before{width:21px;height:21px;margin:8px auto;font-size:14px}.auth-envelope:after{height:35px}
  .auth-panel[data-mode='register'] .auth-envelope-letter{bottom:19px}.auth-form{gap:14px;margin-top:22px}.auth-body h1{font-size:23px}
}
@media(max-width:360px){.auth-body{padding:22px 18px}.auth-cover{padding:20px 18px}.auth-cover h2{font-size:20px}.auth-send-code{padding:0 8px;font-size:12px}.auth-code-row{gap:8px}}
/* Keep mobile registration focused on the fields, with a short blue heading. */
@media(max-width:680px){
  body[data-auth='login'] .site-head-wrap{position:relative}
  .auth-panel[data-mode='register']{margin:8px auto 20px;border-radius:18px}
  .auth-panel[data-mode='register'] .auth-cover{min-height:76px;padding:24px 18px;justify-content:center}
  .auth-panel[data-mode='register'] .auth-cover-brand,
  .auth-panel[data-mode='register'] .auth-cover p,
  .auth-panel[data-mode='register'] .auth-cover-badge{display:none}
  .auth-panel[data-mode='register'] .auth-cover h2{font-size:18px;line-height:1.5;margin:0 48px 0 0;letter-spacing:0}
  .auth-panel[data-mode='register'] .auth-envelope{width:36px;height:26px;right:20px;bottom:22px;border-radius:5px}
  .auth-panel[data-mode='register'] .auth-envelope:after{height:20px;border-radius:0 0 5px 5px}
  .auth-panel[data-mode='register'] .auth-envelope-letter{width:24px;height:25px;left:5px;bottom:9px;border-radius:3px}
  .auth-panel[data-mode='register'] .auth-envelope-letter:before{width:15px;height:15px;margin:4px auto;font-size:11px}
  .auth-panel[data-mode='register'] .auth-body{padding:18px}
  .auth-panel[data-mode='register'] .auth-body h1{font-size:21px;margin-bottom:5px}
  .auth-panel[data-mode='register'] .auth-body>.muted{font-size:12px}
  .auth-panel[data-mode='register'] .auth-form{gap:10px;margin-top:16px}
  .auth-panel[data-mode='register'] .auth-form label{gap:5px;font-size:12px}
  .auth-panel[data-mode='register'] .auth-form input{min-height:44px;padding:9px 10px}
  .auth-panel[data-mode='register'] .auth-toggle{min-height:44px}
}

/* Yifan layout, with Guangying APK blue. No reference scripts or remote fonts. */
:root {
  color-scheme: light;
  --bg: #f7f8fc;
  --surface: #ffffff;
  --text: #20263a;
  --muted: #71798d;
  --line: #e5e8f0;
  --accent: #2050cc;
  --accent-soft: #e9efff;
  --cover: #e8ebf3;
  --radius: 8px;
  --sidebar: 176px;
  --head-height: 76px;
}
:root[data-theme='dark'] {
  color-scheme: dark;
  --bg: #090b21;
  --surface: #171a30;
  --text: #f0f2fa;
  --muted: #939ab3;
  --line: #24283f;
  --accent: #83aaff;
  --accent-soft: #1e3056;
  --cover: #1c2037;
}
body { min-width: 0; }
.site-head-wrap { background: var(--bg); border: 0; }
.header-inner { max-width: none; height: var(--head-height); min-height: 0; padding: 14px 32px; gap: 30px; flex-wrap: nowrap; }
.brand { width: calc(var(--sidebar) - 30px); gap: 10px; }
.brand-symbol { width: 34px; height: 34px; border-radius: 9px; }
.brand-name { font-size: 23px; letter-spacing: 3px; }
.head-section { display: flex; gap: 28px; white-space: nowrap; color: var(--muted); font-size: 16px; }
.head-section-active { color: var(--text); font-weight: 600; }
.head-section a:hover { color: var(--accent); }
#search { width: clamp(220px, 29vw, 460px); height: 40px; margin: 0 auto; background: var(--surface); border: 1px solid var(--line); padding-left: 18px; }
#search:focus-within { border-color: var(--accent); }
#search button { background: transparent; color: var(--accent); padding: 6px 16px; border-radius: 0; border-left: 1px solid var(--line); }
#keyword { font-size: 14px; }
.head-tools { gap: 22px; flex-shrink: 0; }
.tool { min-height: 40px; justify-content: center; font-size: 12px; color: var(--muted); gap: 2px; }
.tool:hover { color: var(--accent); }
#account { order: 3; min-width: 94px; padding: 0 14px; background: var(--accent-soft); color: var(--accent); border: 1px solid var(--line); border-radius: 22px; font-size: 13px; }
#history { flex-direction: row; gap: 7px; }
#history span { display: inline; }
.line-icon { width: 23px; height: 23px; flex-shrink: 0; }
#theme { width: 38px; min-height: 40px; }
.theme-icon { width: 21px; height: 21px; color: var(--muted); }
.site-sidebar { position: fixed; z-index: 18; left: 0; top: calc(var(--head-height) + env(safe-area-inset-top, 0px)); bottom: 0; width: var(--sidebar); display: flex; flex-direction: column; padding: 20px 18px 24px; background: var(--bg); }
.sidebar-caption { font-size: 11px; color: var(--muted); letter-spacing: .12em; padding: 0 14px 20px; }
#nav { display: flex; flex: 0 1 auto; flex-direction: column; align-items: stretch; width: 100%; gap: 4px; overflow-y: auto; overflow-x: hidden; margin: 0; padding: 0 0 12px; scrollbar-width: none; }
#nav a { display: flex; align-items: center; gap: 14px; padding: 9px 14px; color: var(--muted); font-size: 15px; font-weight: 400; border-radius: 8px; min-height: 42px; }
#nav a:hover { color: var(--text); background: var(--surface); }
#nav a.active { color: var(--accent); background: var(--accent-soft); font-weight: 600; }
#nav a.active:after { left: -3px; top: 14px; bottom: auto; width: 3px; height: 14px; transform: none; box-shadow: 0 0 12px var(--accent); }
#nav a:nth-last-child(3) { margin-top: 18px; }
.sidebar-bottom { margin-top: auto; padding: 22px 12px 0; display: grid; gap: 18px; }
.sidebar-bottom a { display: flex; justify-content: space-between; color: var(--muted); font-size: 13px; }
.sidebar-bottom a:hover { color: var(--accent); }
.sidebar-bottom > span { font-size: 10px; color: var(--muted); opacity: .75; }
main { max-width: 1800px; margin: 0 auto 0 var(--sidebar); padding: 22px 32px 60px 24px; }
footer { margin-left: var(--sidebar); background: var(--bg); border-top: 1px solid var(--line); color: var(--muted); }
.footer-inner { max-width: none; }
body[data-page='home'] main { padding-top: 0; }
.hero { height: clamp(390px, 34vw, 530px); border-radius: 0 0 12px 12px; background: #131a35; margin-bottom: 28px; }
.hero-slide:after { background: linear-gradient(90deg, #090b21dd, #090b2110 85%), linear-gradient(0deg, #090b21, #090b2100 72%); }
.hero-poster { background: linear-gradient(125deg, #111c3b, #223654 70%, #182039); }
.hero-poster:after { display: block; }
.hero img { object-position: center 25%; }
.hero-poster > .hero-backdrop { filter: blur(45px); opacity: .32; transform: scale(1.12); object-fit: cover; }
.hero-poster > .hero-art { top: 26px; right: 11%; height: calc(100% - 64px); width: auto; aspect-ratio: 20 / 29; border-radius: 8px; box-shadow: 0 20px 60px #0005; }
.hero-poster .hero-art img { position: absolute; object-fit: cover; }
.hero-body, .hero-poster .hero-body { width: 65%; max-width: 650px; padding: 38px 36px 116px; align-self: end; }
.hero .eyebrow { display: inline-flex; color: #b5caff; font-size: 12px; letter-spacing: .12em; margin-bottom: 12px; }
.hero h1, .hero-poster h1 { font-size: clamp(26px, 2.6vw, 40px); line-height: 1.3; font-weight: 700; margin-bottom: 14px; }
.hero .meta { font-size: 12px; color: #d3d9e7; }
.hero-summary { font-size: 13px; line-height: 1.9; color: #c4cddd; max-width: 470px; margin-top: 12px; }
.primary { background: #2050cc; border-color: #2050cc; border-radius: 7px; color: #fff; min-height: 42px; }
.primary:hover { background: #2e62e8; border-color: #2e62e8; }
.hero .primary { margin-top: 20px; padding: 10px 24px; border-radius: 24px; background: #ffffff20; border-color: #ffffff30; backdrop-filter: blur(12px); }
.hero .primary:hover { background: #2050cc; border-color: #2050cc; }
.hero-controls { left: 36px; right: 24px; bottom: 20px; gap: 10px; justify-content: flex-end; }
.hero-dot { position: relative; width: 62px; height: 78px; border: 2px solid transparent; border-radius: 5px; background: #131a35; overflow: hidden; opacity: .65; transition: opacity .2s, border-color .2s; flex-shrink: 0; }
.hero-dot .poster { width: 100%; height: 100%; aspect-ratio: auto; border-radius: 2px; }
.hero-dot .poster img { object-fit: cover; }
.hero-dot > span { position: absolute; bottom: 0; left: 0; right: 0; color: #fff; font-size: 10px; padding: 15px 3px 3px; background: linear-gradient(transparent,#000c); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hero-dot.active { width: 62px; background: none; opacity: 1; border-color: #83aaff; }
.hero-dot:hover { opacity: 1; }
.hero-arrow { width: 28px; height: 28px; background: #ffffff0f; border-color: #ffffff20; flex-shrink: 0; }
.recommend-tabs { margin: 4px 0 22px; gap: 26px; border-color: var(--line); }
.recommend-tabs button { color: var(--muted); font-size: 16px; padding: 12px 0; gap: 8px; border-bottom-width: 2px; }
.recommend-tabs button.active { color: var(--text); border-color: var(--accent); }
.recommend-tabs img, .heading > img { display: none; }
.heading { margin: 34px 0 20px; gap: 12px; }
.heading:before { content: ''; display: block; width: 4px; height: 19px; background: var(--accent); border-radius: 3px; }
.heading h1, .heading h2 { font-size: 22px; font-weight: 600; }
.heading .more { background: none; color: var(--muted); padding: 4px 0 4px 16px; font-size: 12px; }
.heading .more:hover { color: var(--accent); background: none; }
.grid { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 28px 18px; }
.poster { aspect-ratio: 3 / 4.2; border-radius: 7px; }
.film { position: relative; }
.film h3 { color: var(--text); font-size: 15px; font-weight: 500; margin: 10px 0 4px; }
.film p { font-size: 12px; color: var(--muted); }
.film:hover .poster { box-shadow: 0 8px 26px #0003; }
.type-badge { top: 7px; right: 7px; background: #182b58dd; border: 1px solid #ffffff25; color: #e0e9ff; padding: 2px 5px; }
.badge { padding: 35px 9px 8px; font-size: 11px; background: linear-gradient(transparent, #000b); }
.notice { color: var(--accent); background: var(--accent-soft); border: 1px solid var(--line); }
.refresh-wrap { justify-content: flex-end; padding-top: 20px; }
.refresh-wrap .secondary { border: 0; background: transparent; padding: 4px 0 4px 16px; }
.secondary { color: var(--muted); background: var(--surface); }
.filters { background: var(--surface); border-color: var(--line); padding: 20px 24px; }
.filter-options a.active { color: var(--accent); }
.detail { background: var(--surface); padding: 28px; grid-template-columns: 190px minmax(0, 1fr); gap: 32px; border: 1px solid var(--line); }
.detail h1 { font-size: 30px; }
.detail .poster { border-radius: 7px; }
.detail .score { color: #f4b754; }
.section-panel { border-color: var(--line); }
.lines button.active { color: var(--accent); }
.episodes a, .episodes button { border-color: var(--line); }
.hot-panel { min-width: 320px; background: var(--surface); box-shadow: 0 16px 48px #0003; }
.auth-panel { background: var(--surface); border-radius: 16px; }
body[data-auth='login'] .site-sidebar, body[data-auth='login'] .head-section { display: none; }
body[data-auth='login'] main { margin-left: auto; margin-right: auto; padding-top: 20px; }
body[data-auth='login'] .header-inner { justify-content: space-between; }
body[data-auth='login'] .brand { width: auto; }
body[data-auth='login'] .head-tools { margin-left: auto; }
body[data-auth='login'] .auth-form input { background: var(--bg); }
@media (min-width: 2100px) { main { margin-right: auto; margin-left: auto; padding-left: 24px; } }
@media (max-width: 1150px) and (min-width: 821px) {
  :root { --sidebar: 150px; }
  .header-inner { gap: 22px; padding-left: 24px; padding-right: 24px; }
  .head-section { gap: 16px; font-size: 14px; }
  .head-tools { gap: 12px; }
  #search { width: clamp(190px, 24vw, 320px); }
  #account { min-width: 84px; padding: 0 10px; }
  main { padding-left: 18px; padding-right: 24px; }
  .site-sidebar { padding-left: 10px; padding-right: 10px; }
  #nav a { font-size: 14px; gap: 10px; }
  .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px 14px; }
  .hero { height: 390px; }
  .hero-poster > .hero-art { right: 5%; height: 270px; }
  .hero-body, .hero-poster .hero-body { padding-left: 26px; width: 68%; }
  .play-layout { grid-template-columns: minmax(0, 1fr) 250px; }
}
@media (max-width: 820px) {
  :root { --head-height: 64px; }
  .header-inner { height: auto; padding: 12px 16px; gap: 12px; display: flex; flex-wrap: wrap; }
  .brand { width: auto; }
  .brand-symbol { width: 29px; height: 29px; border-radius: 8px; }
  .brand-name { font-size: 21px; letter-spacing: 2px; }
  .head-section { display: none; }
  .head-tools { margin-left: auto; gap: 12px; order: 1; }
  #account { min-height: 34px; min-width: 82px; font-size: 12px; padding: 0 10px; }
  #history { min-height: 34px; }
  #history span { display: none; }
  #theme { min-height: 34px; width: 30px; }
  #search { order: 2; width: 100%; margin: 0; height: 40px; padding-left: 15px; }
  #keyword { font-size: 16px; }
  .site-sidebar { position: sticky; top: calc(110px + env(safe-area-inset-top, 0px)); z-index: 17; height: auto; width: auto; padding: 0; background: var(--bg); }
  .sidebar-caption, .sidebar-bottom { display: none; }
  #nav { flex-direction: row; align-items: center; overflow-x: auto; overflow-y: hidden; padding: 0 16px; margin: 0; gap: 24px; scrollbar-width: none; border-bottom: 1px solid var(--line); }
  #nav a { flex-shrink: 0; padding: 10px 0 12px; min-height: 44px; border-radius: 0; font-size: 15px; gap: 0; background: none; }
  #nav a .line-icon { display: none; }
  #nav a.active { background: none; color: var(--accent); }
  #nav a.active:after { top: auto; bottom: 1px; left: 50%; width: 20px; height: 2px; transform: translateX(-50%); box-shadow: none; }
  #nav a:nth-last-child(3) { margin-top: 0; }
  main { margin: 0; padding: 18px 16px 36px; }
  body[data-page='home'] main { padding-top: 12px; }
  footer { margin-left: 0; }
  .hero { height: 260px; border-radius: 8px; margin-bottom: 18px; }
  .hero-body, .hero-poster .hero-body { width: 67%; padding: 24px 20px 40px; }
  .hero h1, .hero-poster h1 { font-size: 25px; margin-bottom: 10px; }
  .hero .eyebrow { display: block; margin-bottom: 10px; font-size: 10px; }
  .hero .meta, .hero-poster .meta { font-size: 11px; line-height: 1.7; max-height: 38px; overflow: hidden; }
  .hero-summary { display: none; }
  .hero .primary { padding: 7px 15px; margin-top: 14px; min-height: 36px; font-size: 12px; }
  .hero-poster > .hero-art { top: 24px; right: 18px; width: 122px; height: auto; aspect-ratio: 20 / 29; }
  .hero-controls { left: auto; right: 18px; bottom: 16px; gap: 6px; }
  .hero-dot, .hero-dot.active { width: 6px; height: 6px; border: 0; border-radius: 8px; background: #ffffff60; opacity: 1; }
  .hero-dot.active { width: 20px; background: #83aaff; }
  .hero-dot .poster, .hero-dot > span, .hero-arrow { display: none; }
  .recommend-tabs { gap: 24px; margin: 0 0 18px; }
  .recommend-tabs button { font-size: 15px; min-height: 44px; padding: 10px 0; }
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px 10px; }
  .film h3 { font-size: 13px; margin: 8px 0 3px; }
  .film p { font-size: 10px; }
  .type-badge { font-size: 9px; padding: 1px 4px; top: 5px; right: 5px; }
  .badge { font-size: 10px; padding: 25px 5px 6px; }
  .heading { margin: 28px 0 16px; gap: 9px; }
  .heading h1, .heading h2 { font-size: 20px; }
  .heading:before { height: 16px; width: 3px; }
  .heading .more { font-size: 12px; }
  .refresh-wrap .secondary { min-height: 34px; }
  .filters { padding: 12px; }
  .detail { padding: 16px; grid-template-columns: 104px minmax(0, 1fr); gap: 16px; }
  .detail h1 { font-size: 21px; }
  .detail-actions .primary, .detail-actions .secondary { min-height: 38px; }
  .play-layout { display: block; }
  .watch { margin-left: -16px; margin-right: -16px; }
  .hot-panel { min-width: 0; width: 100%; padding: 14px; }
  body[data-page='detail'] .site-sidebar, body[data-page='play'] .site-sidebar { display: none; }
  body[data-page='detail'] .header-inner, body[data-page='play'] .header-inner { padding: 10px 16px; }
  body[data-page='detail'] #account, body[data-page='play'] #account { display: none; }
  body[data-page='detail'] .head-tools, body[data-page='play'] .head-tools { gap: 12px; }
  body[data-auth='login'] main { padding: 8px 16px 28px; }
}
@media (max-width: 380px) {
  .head-tools { gap: 8px; }
  .brand-name { font-size: 19px; }
  #account { min-width: 78px; font-size: 11px; padding: 0 8px; }
  .hero { height: 238px; }
  .hero-poster > .hero-art { width: 104px; right: 14px; top: 28px; }
  .hero-body, .hero-poster .hero-body { width: calc(100% - 104px); padding-left: 16px; }
  .hero h1, .hero-poster h1 { font-size: 22px; }
}

#account { display: inline-flex; align-items: center; justify-content: center; gap: 7px; }
.account-avatar { width: 25px; height: 25px; border-radius: 8px; object-fit: cover; }
.profile-dialog { width: min(440px, calc(100vw - 32px)); padding: 24px; border: 1px solid var(--line); border-radius: 20px; color: var(--text); background: var(--bg); max-height: 90dvh; overflow-y: auto; }
.profile-dialog::backdrop { background: #03081bb3; backdrop-filter: blur(5px); }
.profile-dialog .dialog-heading { margin-bottom: 24px; }
.profile-dialog h2 { margin: 0; font-size: 21px; }
.profile-hero { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; }
.profile-avatar { width: 76px; height: 76px; border-radius: 20px; object-fit: cover; background: var(--surface); }
.profile-name { font-size: 20px; overflow-wrap: anywhere; }
.profile-hero .muted { margin: 6px 0 0; font-size: 12px; }
.profile-avatar-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.profile-dialog button { min-height: 40px; }
.profile-dialog .profile-hint { font-size: 12px; line-height: 1.7; margin: 12px 0 24px; }
.profile-form { display: grid; gap: 18px; padding-top: 20px; border-top: 1px solid var(--line); }
.profile-form label { display: grid; gap: 10px; font-size: 14px; }
.profile-form input { min-width: 0; width: 100%; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--text); padding: 12px; font: inherit; box-sizing: border-box; }
.profile-form input:focus { outline: 2px solid var(--accent); outline-offset: 2px; }
.profile-info { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; font-size: 13px; }
.profile-email { overflow-wrap: anywhere; }
.profile-status { font-size: 13px; line-height: 1.6; min-height: 21px; color: var(--muted); }
.profile-logout { width: 100%; }
.avatar-preview { margin: 20px 0; padding: 16px; background: var(--surface); border-radius: 14px; }
.avatar-preview[hidden] { display: none; }
.avatar-preview > img { width: 128px; height: 128px; border-radius: 16px; object-fit: cover; display: block; margin: 0 auto 16px; }
.avatar-preview .profile-avatar-actions { justify-content: center; }

/* The signed-in account is an avatar target, with its name kept for accessibility. */
.head-tools #account.has-avatar { width: 46px; min-width: 46px; height: 46px; min-height: 46px; padding: 2px; border-radius: 50%; background: transparent; border: 0; flex: 0 0 auto; }
.head-tools #account.has-avatar > .account-avatar { display: block; width: 40px; height: 40px; border-radius: 50%; object-fit: cover; border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--line); }
.head-tools #account.has-avatar:hover > .account-avatar { box-shadow: 0 0 0 2px var(--accent); }
.head-tools #account.has-avatar:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.search-history { padding-bottom: 18px; margin-bottom: 16px; border-bottom: 1px solid var(--line); }
.search-history-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
#search .search-history-word { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; border: 0; border-radius: 7px; padding: 8px 12px; background: var(--accent-soft); color: var(--text); font: inherit; font-size: 13px; cursor: pointer; }
#search .search-history-word:hover, #search .search-history-word:focus-visible { color: var(--accent); outline: 1px solid var(--accent); }
.hot-panel { max-height: min(640px, calc(100svh - 140px)); overflow-y: auto; overscroll-behavior: contain; }
.search-history[hidden] { display: none; }
@media (max-width: 600px) {
  .head-tools #account.has-avatar { width: 42px; min-width: 42px; height: 42px; min-height: 42px; }
  .head-tools #account.has-avatar > .account-avatar { width: 36px; height: 36px; }
}

.profile-membership { width:100%; margin-top:18px; }
.member-dialog { width:min(580px,calc(100vw - 24px)); }
.member-hero { padding:24px; margin:20px 0; border-radius:16px; color:#efd4aa; background:linear-gradient(120deg,#393636,#121417); }
.member-hero h3 { font-size:23px; color:inherit; margin:10px 0; }
.member-hero p,.member-eyebrow { font-size:13px; line-height:1.6; }
.member-balance { display:flex; flex-wrap:wrap; align-items:center; gap:12px; margin:20px 0; }
.member-balance strong { font-size:32px; color:var(--accent); }
.member-balance > :last-child { margin-left:auto; font-size:13px; color:var(--muted); }
.member-plans { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; }
.member-plan { display:flex; flex-direction:column; gap:8px; padding:18px 4px; border:1px solid var(--line); border-radius:12px; background:var(--surface); color:var(--text); cursor:pointer; }
.member-plan strong { font-size:22px; }.member-plan span { font-size:12px; }
.member-plan.selected { border-color:var(--accent); background:var(--accent-soft); color:var(--accent); box-shadow:inset 0 0 0 1px var(--accent); }
.member-exchange { width:100%; margin:8px 0 20px; }.member-exchange:disabled { opacity:.45;cursor:default; }
.member-card-form { border-top:1px solid var(--line);padding-top:20px;display:grid;gap:14px; }
.member-card-form label {display:grid;gap:8px;font-size:14px;}
.member-card-form input { width:100%;height:44px;border:1px solid var(--line);border-radius:8px;background:var(--surface);color:var(--text);padding:8px 12px; }
.member-record-actions {display:flex;gap:12px;margin:20px 0 8px;}
.member-record {display:grid;grid-template-columns:1fr auto;gap:8px;padding:16px 0;border-bottom:1px solid var(--line);font-size:13px;}
.member-record span {color:var(--muted);font-size:12px;}.member-record b {color:var(--accent);}.member-record >span:nth-child(2){text-align:right;}
@media(max-width:600px){.member-hero{padding:20px;}.member-plans{gap:8px;}.member-plan{padding:16px 2px;}.member-balance > :last-child{width:100%;margin-left:0;}}

/* October H5 polish: catalog cards, watch controls and account entry. */
.film-preview { position:absolute; inset:0; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:12px; background:#050c2466; color:#fff; opacity:0; transition:opacity .18s; font-size:12px; }
.film-play-symbol { display:grid; place-items:center; width:52px; height:52px; border:1px solid #ffffff90; border-radius:50%; background:#ffffff22; font-size:20px; padding-left:3px; backdrop-filter:blur(8px); }
.film:hover .film-preview, .film:focus-visible .film-preview { opacity:1; }
.film-rating { position:absolute; top:8px; left:8px; padding:3px 7px; border-radius:6px; color:#ffda83; background:#080e27bd; font-weight:650; }
.section-genres { display:flex; gap:18px; align-items:center; flex:1; min-width:0; overflow:hidden; white-space:nowrap; margin-left:16px; font-size:12px; color:var(--muted); }
.section-genres a:hover { color:var(--accent); }
.empty { display:flex; flex-direction:column; align-items:center; justify-content:center; min-height:270px; padding:36px 20px; border:1px dashed var(--line); border-radius:16px; background:var(--surface); text-align:center; margin:24px 0; }
.empty > .line-icon { width:42px; height:42px; color:var(--accent); margin-bottom:18px; opacity:.8; }
.empty h2 { font-size:20px; margin:0 0 10px; font-weight:600; }
.empty p { max-width:480px; margin:0; line-height:1.9; color:var(--muted); }
.empty-actions { display:flex; flex-wrap:wrap; justify-content:center; gap:12px; margin-top:24px; }
.content-tabs { display:flex; align-items:center; gap:12px; border-bottom:1px solid var(--line); margin:0 0 24px; padding-bottom:14px; }
.content-tabs a { display:flex; align-items:center; gap:8px; padding:9px 20px; border-radius:9px; color:var(--muted); }
.content-tabs a.active { background:var(--accent-soft); color:var(--accent); }
.document-card { position:relative; transition:transform .18s,border-color .18s; }
.document-card:hover { transform:translateY(-3px); border-color:var(--accent); }
.document-placeholder { aspect-ratio:16/9; display:grid; place-items:center; background:linear-gradient(120deg,var(--accent-soft),var(--cover)); color:var(--accent); }
.document-placeholder .line-icon { width:48px; height:48px; }
.document-kind { display:inline-block; margin:16px 18px 0; color:var(--accent); background:var(--accent-soft); border-radius:5px; padding:3px 8px; font-size:11px; }
.document-card h2 { padding-top:10px; }.document-card p { min-height:42px; }
.detail { border-radius:16px; gap:28px; }
.detail .poster { box-shadow:0 10px 30px #0002; }
.detail .meta { color:var(--muted); line-height:1.9; margin-bottom:18px; }
.detail-cast { display:flex; flex-wrap:wrap; gap:6px 12px; align-items:baseline; }
.cast-link { color:var(--text); }.cast-link:hover { color:var(--accent); text-decoration:underline; }
.detail-director { color:var(--muted); margin-top:10px; }
.detail .credits { white-space:normal; font-size:13px; line-height:1.9; }
.synopsis { padding:22px 24px; margin:24px 0; border:1px solid var(--line); border-radius:12px; background:var(--surface); }
.synopsis summary { font-size:17px; font-weight:600; cursor:pointer; }.synopsis .description { padding:0; background:none; margin:18px 0 0; font-size:14px; line-height:2; }
.section-panel { border-radius:14px; }
/* Fixed minimum rows prevent a large implicit grid from squeezing hundreds of buttons. */
.episodes { grid-auto-rows:minmax(44px,max-content); align-content:start; min-height:0; }
.episodes button,.episodes a { min-width:0; min-height:44px; line-height:22px; padding:10px 9px; }
.play-layout { grid-template-columns:minmax(0,1fr) 320px; border-radius:14px; align-items:stretch; }
.watch { align-self:stretch; }
.player-stage { position:relative; display:grid; background:#050815; min-width:0; }
.watch video { aspect-ratio:16/9; max-height:70vh; }
.player-overlay { position:absolute; inset:0; z-index:1; display:flex; flex-direction:column; justify-content:center; align-items:center; gap:12px; padding:24px; text-align:center; background:radial-gradient(ellipse at 50% 35%,#182c51,#060a18 80%); color:#f0f4ff; }
.player-overlay[hidden] { display:none; }.player-overlay h3 { margin:0; font-size:19px; font-weight:550; }.player-overlay p { margin:0; color:#a9b7d0; max-width:420px; font-size:13px; line-height:1.8; }
.player-overlay .primary { margin-top:6px; padding:10px 26px; }.player-overlay button[hidden] { display:none; }
.player-state-icon { width:54px; height:54px; display:grid; place-items:center; border:1px solid #ffffff30; border-radius:50%; color:#a6c3ff; padding-left:3px; }
.player-overlay.is-loading .player-state-icon { border-top-color:#8aadff; animation:player-pulse 1.5s ease-in-out infinite; }
@keyframes player-pulse { 50% { box-shadow:0 0 0 8px #7fa7ff0c; opacity:.55; } }
.player-info { margin-top:auto; gap:16px; min-height:62px; }.player-info p { min-width:0; }.player-info .secondary { flex-shrink:0; }
.play-sidebar { max-height:570px; min-height:0; padding:22px 18px; border-left:1px solid var(--line); }
.play-sidebar h2,.play-sidebar > p { flex-shrink:0; }.play-sidebar > .muted { margin-bottom:14px; }
.play-sidebar .lines { overflow-x:auto; flex-shrink:0; min-height:45px; white-space:nowrap; }
.play-sidebar .lines button { flex-shrink:0; }
.episode-browser { display:flex; flex-direction:column; min-height:0; }
.play-sidebar .episode-browser { flex:1 1 auto; min-height:100px; }
.episode-tools { display:flex; flex-wrap:wrap; align-items:center; gap:8px; padding:12px 0 14px; flex-shrink:0; font-size:12px; }
.episode-count { color:var(--muted); margin-right:auto; }
.episode-ranges,.episode-sort { min-width:0; min-height:32px; border:1px solid var(--line); border-radius:6px; padding:5px 8px; background:var(--bg); color:var(--text); font:inherit; cursor:pointer; }
.episode-tools [hidden] { display:none; }.episode-sort:hover { color:var(--accent); border-color:var(--accent); }
.play-sidebar .episodes { position:relative; flex:1 1 auto; min-height:0; max-height:350px; grid-template-columns:repeat(3,minmax(0,1fr)); grid-auto-rows:minmax(44px,max-content); align-content:start; gap:8px; scrollbar-width:thin; scrollbar-color:var(--line) transparent; padding:2px 4px 8px 2px; }
.play-sidebar .episodes.long-titles { grid-template-columns:repeat(2,minmax(0,1fr)); }
.play-sidebar .episodes button { min-height:44px; padding:10px 7px; font-size:12px; line-height:22px; border:1px solid var(--line); border-radius:7px; }
.play-sidebar .episodes button.active { color:var(--accent); border-color:var(--accent); background:var(--accent-soft); font-weight:600; }
.auth-panel { max-width:960px; grid-template-columns:1fr 1fr; background:var(--surface); border-radius:22px; }
.auth-body { padding:36px 40px 28px; }.auth-body h1 { font-size:25px; }
.auth-cover { min-height:520px; justify-content:flex-end; background:#102a72; padding:36px 30px; }
.auth-cover:before { inset:0; width:auto; height:auto; border:0; border-radius:0; background:linear-gradient(180deg,#09235e40,#102d79c9 48%,#102961 100%); box-shadow:none; z-index:-1; }
.auth-cover:after { display:none; }
.auth-cover-brand { padding-bottom:0; margin-bottom:auto; position:relative; }.auth-cover h2 { font-size:30px; max-width:270px; margin-top:210px; }.auth-cover p { max-width:290px; }.auth-cover-badge { margin-top:0; border:0; padding:0; background:none; color:#b4caff; }
.auth-gallery { position:absolute; z-index:-2; top:-30px; right:-80px; width:430px; display:grid; grid-template-columns:repeat(3,1fr); gap:14px; transform:rotate(-13deg); opacity:.85; }
.auth-gallery .poster { border-radius:9px; background:#254986; box-shadow:0 10px 26px #0004; }.auth-gallery .poster:nth-child(3n+2) { transform:translateY(50px); }.auth-gallery .poster-fallback { display:none; }
.auth-modes { display:flex; gap:24px; border-bottom:1px solid var(--line); margin-bottom:26px; }
.auth-modes button { position:relative; padding:0 0 13px; background:none; border:0; color:var(--muted); font-size:16px; cursor:pointer; }.auth-modes button.active { color:var(--accent); font-weight:600; }.auth-modes button.active:after { position:absolute; content:''; height:3px; left:0; right:0; bottom:-1px; border-radius:4px; background:var(--accent); }
.auth-modes [hidden] { display:none; }.auth-form { margin-top:24px; gap:17px; }.auth-form label { font-size:13px; color:var(--muted); }.auth-form input { background:var(--bg); border-radius:9px; min-height:48px; }.auth-form input::placeholder { font-size:13px; color:var(--muted); opacity:.7; }
.auth-password-field { position:relative; }.auth-password-field input { padding-right:66px; }.auth-password-reveal { position:absolute; right:6px; bottom:4px; height:40px; padding:0 10px; border:0; background:transparent; color:var(--muted); font-size:12px; cursor:pointer; }
.auth-panel .primary { border-radius:9px; font-size:15px; }.auth-toggle { font-size:13px; }.auth-toggle:last-child { color:var(--muted); border-top:1px solid var(--line); padding-top:14px; }
@media (min-width:821px) and (max-width:1150px) { .play-layout { grid-template-columns:minmax(0,1fr) 280px; }.play-sidebar { padding:18px 14px; } .section-genres { gap:12px; } }
@media(max-width:1000px) { .section-genres { display:none; } }
@media(max-width:820px) {
  .play-layout { display:block; overflow:hidden; }.watch { margin:0; }.play-sidebar { max-height:none; border-left:0; border-top:1px solid var(--line); padding:18px 16px; }.play-sidebar .episodes { max-height:320px; flex:0 1 auto; }.play-sidebar .episode-browser { min-height:0; }.play-sidebar .episodes.long-titles { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .detail { gap:16px; }.detail .credits { font-size:12px; }.detail-cast { gap:4px 9px; }.detail .meta { margin-bottom:10px; }.detail-blurb { -webkit-line-clamp:2; }.synopsis { padding:18px 16px; }
  .content-tabs { gap:6px; }.content-tabs a { padding:9px 14px; }.content-tabs .line-icon { width:18px; height:18px; }.empty { min-height:245px; }
}
@media(max-width:680px) {
  .auth-panel { max-width:460px; grid-template-columns:1fr; margin:8px auto 24px; border-radius:18px; }.auth-cover { min-height:160px; padding:22px; }.auth-cover-brand { font-size:19px; margin-bottom:12px; }.auth-cover h2 { font-size:23px; margin:0 0 6px; max-width:260px; }.auth-cover p { max-width:250px; margin-bottom:0; }.auth-cover-badge { display:none; }.auth-gallery { width:300px; top:-100px; right:-100px; opacity:.45; }.auth-cover:before { background:linear-gradient(90deg,#102961fa,#102d797a); }.auth-body { padding:22px; }.auth-modes { margin-bottom:20px; gap:26px; }.auth-body h1 { font-size:22px; }.auth-form { margin-top:20px; gap:14px; }
  .auth-panel[data-mode='register'] .auth-cover { min-height:68px; padding:20px 22px; }.auth-panel[data-mode='register'] .auth-cover h2 { margin:0; }.auth-panel[data-mode='register'] .auth-gallery { display:grid; }.auth-panel[data-mode='register'] .auth-modes { margin-bottom:16px; }.auth-panel[data-mode='register'] .auth-form { margin-top:14px; }.auth-panel[data-mode='register'] .auth-password-reveal { height:36px; }
  .play-sidebar .episodes.long-titles { grid-template-columns:repeat(3,minmax(0,1fr)); }.play-sidebar .episodes button { font-size:11px; padding-inline:4px; }.player-overlay { gap:9px; padding:16px; }.player-overlay h3 { font-size:16px; }.player-state-icon { width:38px; height:38px; }.player-overlay p { font-size:12px; }.player-overlay .primary { min-height:36px; padding:7px 20px; }.detail-cast a:nth-of-type(n+6) { display:none; }
}
@media(prefers-reduced-motion:reduce) { .film-preview,.document-card { transition:none; }.player-overlay.is-loading .player-state-icon { animation:none; } }
.record-row { display:flex; align-items:center; gap:12px; }
.record-row .history-item { flex:1; min-width:0; }
.record-row .history-item h3 { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.record-sync-status { padding:0 16px 12px; font-size:12px; }
.player-film-info > summary,.related-fold > summary { display:none; }
@media(max-width:820px) {
  body[data-page='detail'] main,body[data-page='play'] main { padding-top:12px; padding-bottom:18px; }
  .breadcrumb { margin-bottom:10px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  .detail { grid-template-columns:80px minmax(0,1fr); gap:12px; padding:12px; margin-bottom:16px; border-radius:12px; }
  .detail h1 { font-size:18px; line-height:1.4; margin-bottom:6px; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
  .detail .poster { align-self:start; }
  .detail .meta { font-size:11px; line-height:1.5; margin-bottom:6px; }
  .detail .credits { margin:6px 0; -webkit-line-clamp:2; line-height:1.6; }
  .detail-actions { margin-top:8px; gap:6px; }
  .detail-actions .primary,.detail-actions .secondary { font-size:12px; min-height:40px; padding:7px 10px; }
  .section-panel { margin:14px 0; padding-bottom:12px; }
  .section-title,.play-sidebar h2 { font-size:16px; margin-bottom:8px; }
  .play-layout { margin-bottom:12px; border-radius:10px; }
  .watch video { max-height:45dvh; }
  .player-info { min-height:48px; padding:8px 12px; }
  .record-sync-status { margin:0; padding:6px 12px 8px; line-height:1.4; background:var(--surface); color:var(--muted); }
  .play-sidebar { padding:12px; }
  .play-sidebar > .muted { display:none; }
  .play-sidebar .lines { min-height:40px; margin-bottom:0; gap:18px; }
  .episode-tools { padding:8px 0; }
  .play-sidebar .episodes,.section-panel .episodes { max-height:min(220px,27dvh); overscroll-behavior:contain; }
  .play-sidebar .episodes,.play-sidebar .episodes.long-titles { grid-template-columns:repeat(4,minmax(0,1fr)); gap:6px; }
  .play-sidebar .episodes.long-titles { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .play-sidebar .episodes button { min-height:44px; }
  .synopsis,.player-film-info,.related-fold { margin:12px 0; padding:12px; border:1px solid var(--line); border-radius:10px; background:var(--surface); }
  .synopsis summary,.player-film-info > summary,.related-fold > summary { display:list-item; cursor:pointer; font-size:14px; font-weight:600; line-height:1.5; overflow-wrap:anywhere; }
  .player-film-info .detail { border:0; padding:12px 0 0; margin:0; }
  .synopsis .description { font-size:13px; line-height:1.8; margin-top:12px; }
  .related-fold .heading { display:none; }
  .related-fold .grid { margin-top:12px; }
  .home-section > .grid,.home-recommend-results > .grid { grid-template-columns:none; grid-auto-flow:column; grid-auto-columns:calc((100% - 20px)/3); overflow-x:auto; gap:10px; padding-bottom:6px; scroll-snap-type:x proximity; }
  .home-section .film,.home-recommend-results .film { scroll-snap-align:start; }
  .home-section .heading { margin-top:20px; margin-bottom:10px; }
  .home-section .refresh-wrap { margin:8px 0 0; }
  .hero { height:220px; }
  .hero-poster > .hero-art { width:104px; top:20px; }
  .hero-body,.hero-poster .hero-body { padding-top:18px; padding-bottom:28px; }
  .hero h1,.hero-poster h1 { font-size:22px; }
  dialog { width:calc(100% - 24px); max-height:calc(100dvh - 32px - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px)); padding:16px; overflow:auto; overscroll-behavior:contain; }
  #history-list { max-height:55dvh; overscroll-behavior:contain; }
  #history-dialog .dialog-heading h2 { font-size:18px; }
  #history-dialog .lines { margin-bottom:8px; gap:20px; }
  #history-dialog .history-item { padding:10px 0; gap:10px; }
  #history-dialog .history-item > div:last-child { min-width:0; }
  .record-row > button { min-height:44px; flex-shrink:0; }
  .auth-cover { min-height:64px; padding:14px 20px; }
  .auth-cover h2 { font-size:18px; margin:0; }
  .auth-cover p,.auth-cover-badge,.auth-cover-brand { display:none; }
  .auth-body { padding:18px 20px; }
  .auth-body > h1 { display:none; }
  .auth-modes { margin-bottom:14px; }
  .auth-form { gap:10px; margin-top:14px; }
  .auth-form input { min-height:44px; }
  body[data-page='detail'] footer,body[data-page='play'] footer { display:none; }
}
@media(max-width:680px) {
  .auth-panel[data-mode='register'] .auth-body > h1 { display:none; }
  .auth-panel[data-mode='register'] .auth-form > .auth-toggle:not(:last-child) { display:none; }
  .auth-panel[data-mode='register'] .auth-form { gap:9px; }
  .auth-panel[data-mode='register'] .auth-body { padding:18px; }
}
