@font-face {
  font-family: 'PT Serif';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(assets/fonts/pt-serif-cyrillic-ext.woff2) format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
@font-face {
  font-family: 'PT Serif';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(assets/fonts/pt-serif-cyrillic.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'PT Serif';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(assets/fonts/pt-serif-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'PT Serif';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(assets/fonts/pt-serif-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Source Sans 3';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url(assets/fonts/source-sans-3-cyrillic-ext.woff2) format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
@font-face {
  font-family: 'Source Sans 3';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url(assets/fonts/source-sans-3-cyrillic.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Source Sans 3';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url(assets/fonts/source-sans-3-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Source Sans 3';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url(assets/fonts/source-sans-3-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}


:root {
  color-scheme: light;
  --font-ui: "Source Sans 3", "Segoe UI", "Microsoft YaHei", sans-serif;
  --font-title: "PT Serif", "Songti SC", SimSun, Georgia, serif;
  font-family: var(--font-ui);
  font-synthesis: none;
  --bg: #e9edf4;
  --panel: #f9fbff;
  --raised: #e2e8f2;
  --line: #cbd4e2;
  --text: #222b3d;
  --muted: #4e5a70;
  --accent: #4555b7;
  --accent-hover: #34459f;
  --accent-ink: #fff;
  --gold: #eac77c;
  --gold-ink: #2a2112;
  --danger: #ad364d;
  --hero-surface: #e0e6f6;
  --canvas: #dce3ef;
  --on-image: #fbfcff;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); }
button, input, select { font: inherit; }
button, a, input, select { -webkit-tap-highlight-color: transparent; }
button, select { cursor: pointer; }
button { color: inherit; }
button:disabled { cursor: default; opacity: .53; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
img { display: block; width: 100%; height: 100%; object-fit: cover; }
p, h1, h2, h3 { margin: 0; }
[hidden] { display: none !important; }

.workspace {
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 26px 24px;
  background: radial-gradient(ellipse at 56% 18%, #f7f9fe 0%, transparent 66%), var(--canvas);
}
.brand-mark { width: 32px; height: 32px; flex: none; }

.app-shell {
  position: relative; isolation: isolate; width: min(100%, 456px); height: min(830px, calc(100svh - 52px));
  min-height: 540px; display: flex; flex-direction: column; overflow: hidden;
  border: 1px solid var(--line); border-radius: 26px; background: var(--bg);
  box-shadow: 0 28px 90px #23345024, 0 2px 10px #23345019;
}
.app-header { min-height: 68px; padding: 12px 16px; display: flex; align-items: center; gap: 10px; flex: none; border-bottom: 1px solid var(--line); z-index: 2; }
.brand { display: inline-flex; align-items: center; gap: 9px; font-size: 21px; font-weight: 750; letter-spacing: -.025em; min-height: 44px; }
.startup {
  position: absolute;
  z-index: 10;
  inset: 0;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: clamp(26px, 6.5vh, 58px);
  overflow: hidden;
  background: radial-gradient(ellipse at 50% 33%, var(--hero-surface), var(--bg) 65%);
}
.startup-film {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  width: 113%;
  max-width: 540px;
  padding: 20px 12px;
  border-block: 1px solid #586784;
  background: #263147;
  box-shadow: 0 18px 42px #263a5c45;
  transform: rotate(-9deg);
  animation: startup-film-enter 480ms ease-out both;
}
.startup-film::before,
.startup-film::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  height: 5px;
  background: repeating-linear-gradient(90deg, transparent 0 7px, #a7b5cf99 7px 15px, transparent 15px 21px);
}
.startup-film::before { top: 7px; }
.startup-film::after { bottom: 7px; }
.startup-film img {
  height: auto;
  max-height: clamp(116px, 32vh, 220px);
  aspect-ratio: 3 / 4;
  border: 1px solid #bac8e34d;
  border-radius: 6px;
  background: #36445e;
  filter: saturate(.85) brightness(.78);
}
.startup-film img:nth-child(2) { filter: saturate(.9) brightness(.94); }
.startup-brand {
  display: grid;
  justify-items: center;
  gap: 11px;
  margin-top: 8px;
}
.startup-mark {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  box-shadow: 0 8px 25px #d3a2512e;
}
.startup-name {
  color: var(--text);
  font-family: var(--font-title);
  font-size: clamp(40px, 12vw, 56px);
  font-weight: 700;
  letter-spacing: -.045em;
  line-height: 1.1;
}
.startup ~ .app-header,
.startup ~ .screen,
.startup ~ .tab-bar,
.startup ~ #modalRoot { visibility: hidden; }
.startup-progress {
  width: 96px;
  height: 3px;
  margin-top: 9px;
  overflow: hidden;
  border-radius: 4px;
  background: var(--line);
}
.startup-progress::before {
  content: "";
  display: block;
  width: 40%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #a77336, #f6d794);
  animation: startup-progress 1.15s ease-in-out infinite alternate;
}
@keyframes startup-film-enter {
  from { transform: translateX(-9px) rotate(-11deg); }
  to { transform: translateX(0) rotate(-9deg); }
}
@keyframes startup-progress { from { transform: translateX(0); } to { transform: translateX(150%); } }
@media (prefers-reduced-motion: reduce) {
  .startup-film,
  .startup-progress::before { animation: none; }
}
.header-space { flex: 1; }
.icon-button, .language-button { display: inline-grid; place-items: center; min-width: 44px; min-height: 44px; border-radius: 14px; border: 1px solid var(--line); background: var(--panel); }
.language-button { padding: 0 11px; font-weight: 750; font-size: 12px; letter-spacing: .05em; }
.icon-button:hover, .language-button:hover, .secondary:hover { background: var(--raised); }
.icon { width: 21px; height: 21px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.screen { flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #7d8ca5 transparent; }
.content { padding: 17px 16px 24px; }
.tab-bar { min-height: 66px; padding: 5px 6px max(5px, env(safe-area-inset-bottom)); display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); align-items: center; border-top: 1px solid var(--line); background: var(--panel); flex: none; }
.tab { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-width: 0; min-height: 52px; font-size: 12px; font-weight: 650; color: var(--muted); border-radius: 12px; white-space: nowrap; }
.tab .icon { width: 22px; height: 22px; }
.tab[aria-current="page"] { color: var(--accent); background: #e6eafa; }
.tab:hover { background: var(--raised); }

.hero { position: relative; display: flex; align-items: flex-end; min-height: 421px; overflow: hidden; border-radius: 20px; border: 1px solid var(--line); background: var(--hero-surface); }
.hero-image, .hero::after { position: absolute; inset: 0; }
.hero-image { object-position: center 29%; }
.hero::after { content: ""; background: linear-gradient(180deg, #14151800 29%, #14151849 51%, #141518f7 99%); }
.hero-info { position: relative; z-index: 1; width: 100%; padding: 19px; color: var(--on-image); }
.hero-info h1 { max-width: 310px; font-size: clamp(25px, 7vw, 33px); font-weight: 800; letter-spacing: -.055em; line-height: 1.1; text-wrap: balance; }
.meta { color: var(--muted); font-size: 13px; line-height: 1.5; }
.hero-info .meta { color: var(--on-image); margin: 8px 0 15px; }
.primary, .secondary, .gold-button {
  display: inline-flex; justify-content: center; align-items: center; gap: 8px; padding: 10px 14px;
  min-height: 46px; border: 1px solid transparent; border-radius: 13px; font-weight: 800; font-size: 14px;
}
.primary { background: var(--accent); color: var(--accent-ink); }
.primary:hover { background: var(--accent-hover); }
.secondary { border-color: var(--line); background: var(--panel); color: var(--text); }
.gold-button { color: var(--gold-ink); background: var(--gold); }
.gold-button:hover { background: #f3d79c; }
.hero-info .primary { min-height: 42px; }
.hero-info .primary .icon, .primary .icon { width: 18px; height: 18px; }
.section { margin-top: 23px; }
.section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.section-heading h2 { font-size: 18px; letter-spacing: -.03em; line-height: 1.25; }
.section-heading a { color: var(--accent); font-weight: 700; font-size: 12px; }
.page-title { font-size: 29px; font-weight: 800; letter-spacing: -.045em; margin-bottom: 13px; }
.pill-row { display: flex; flex-wrap: wrap; gap: 7px; }
.pill { display: inline-flex; align-items: center; min-height: 35px; padding: 5px 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--panel); color: var(--text); font-size: 12px; }
.pill:hover { border-color: var(--accent); }
.segmented { display: grid; grid-template-columns: 1fr 1fr; padding: 4px; gap: 4px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; margin-bottom: 12px; }
.segmented button { min-height: 43px; border: 0; border-radius: 10px; background: transparent; font-weight: 750; color: var(--muted); }
.segmented [aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }
.search-field { display: flex; align-items: center; gap: 8px; min-height: 48px; border-radius: 13px; padding: 0 10px 0 13px; background: var(--panel); border: 1px solid var(--line); color: var(--muted); }
.search-field:focus-within { border-color: var(--accent); }
.search-field .icon { width: 19px; height: 19px; }
.search-field input { width: 100%; min-width: 0; padding: 10px 0; border: 0; background: transparent; outline: none; color: var(--text); font-size: 14px; }
.search-field input::placeholder { color: var(--muted); }
.search-field input::-webkit-search-cancel-button { display: none; }
.search-field button { border: 0; background: none; color: var(--muted); padding: 5px; min-width: 34px; }
.results { margin-top: 14px; }
.genre-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 9px; }
.genre-card { display: flex; flex-direction: column; justify-content: flex-end; min-height: 111px; padding: 10px; border: 1px solid var(--line); border-radius: 13px; background: linear-gradient(180deg,#14151838,#141518eb), url("assets/poster.jpg") center 29% / cover; }
.genre-card:nth-child(even) { background-position: center, center 57%; }
.genre-card strong { font-size: 15px; }
.genre-card span { font-size: 12px; color: var(--text); margin-top: 4px; }
.list-panel { background: var(--panel); border: 1px solid var(--line); border-radius: 15px; overflow: hidden; }
.list-row { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 53px; padding: 9px 12px; border: 0; background: transparent; text-align: left; }
.list-row + .list-row { border-top: 1px solid var(--line); }
.list-row .meta { font-size: 12px; }
.list-row strong { font-size: 14px; }
.list-row .row-end { margin-left: auto; color: var(--muted); }
.source-mark { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; background: #e95066; color: #fff; font-weight: 850; flex: none; }
.poster-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 9px; }
.poster-card { position: relative; display: flex; flex-direction: column; justify-content: flex-end; overflow: hidden; min-width: 0; aspect-ratio: 2/3; border-radius: 13px; border: 1px solid var(--line); background: var(--panel); }
.poster-card img { position: absolute; inset: 0; }
.poster-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent 28%, #141518f7 100%); }
.poster-card strong, .poster-card small { position: relative; z-index: 1; margin: 0 7px; }
.poster-card strong { font-size: 12px; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.poster-card small { font-size: 10px; margin-top: 3px; margin-bottom: 7px; color: var(--muted); }
.poster-card .episode-tag { position: absolute; z-index: 1; right: 5px; top: 5px; border-radius: 6px; background: #222b3de8; color: var(--on-image); padding: 3px 5px; font-size: 10px; }
.empty { text-align: center; padding: 35px 15px; border: 1px dashed var(--line); border-radius: 16px; }
.empty > .icon { color: var(--accent); width: 29px; height: 29px; margin-bottom: 11px; }
.empty strong { display: block; margin-bottom: 5px; }
.empty .secondary { margin-top: 13px; }
.history-group { margin-top: 17px; }
.history-group h3 { margin-bottom: 8px; color: var(--muted); font-size: 12px; font-weight: 700; }
.history-list { display: grid; gap: 8px; }
.history-card { display: flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--panel); border-radius: 15px; padding: 8px; }
.history-link { flex: 1; display: flex; align-items: center; gap: 10px; min-width: 0; }
.history-link img { width: 54px; height: 75px; border-radius: 9px; flex: none; }
.history-text { min-width: 0; }
.history-text strong { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; font-size: 15px; line-height: 1.2; font-weight: 650; }
.history-text .meta { margin: 4px 0 7px; font-size: 12px; font-variant-numeric: tabular-nums; }
.progress { height: 4px; width: 100%; border-radius: 99px; background: var(--line); overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--accent); border-radius: inherit; }
.history-card button { flex: none; color: var(--muted); background: transparent; border: 0; }
.history-card button:hover { color: var(--danger); background: var(--raised); }
.history-link:hover strong { color: var(--accent); }
.profile-card { display: flex; align-items: center; gap: 13px; padding: 14px; background: var(--panel); border: 1px solid var(--line); border-radius: 15px; }
.avatar { width: 49px; height: 49px; display: grid; place-items: center; border-radius: 50%; background: #e6eafa; color: var(--accent); font-weight: 800; }
.profile-card strong { display: block; margin-bottom: 3px; }
.text-button { border: 0; padding: 6px; min-height: 44px; background: transparent; color: var(--accent); font-weight: 700; }
.text-button.danger { color: var(--danger); }
.detail-heading { display: grid; grid-template-columns: minmax(84px, 34%) 1fr; gap: 14px; align-items: center; }
.detail-heading img { height: auto; aspect-ratio: 2/3; border-radius: 14px; background: var(--raised); }
.detail-heading h1 { font-size: clamp(20px, 5.4vw, 25px); letter-spacing: -.04em; line-height: 1.15; margin-bottom: 8px; }
.detail-heading .pill-row { margin-top: 9px; }
.detail-actions { display: flex; gap: 8px; margin-top: 15px; }
.detail-actions .primary { flex: 1; }
.synopsis { color: var(--muted); font-size: 14px; line-height: 1.55; }
.synopsis.is-collapsed { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.episode-grid { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 7px; }
.episode { position: relative; display: grid; place-items: center; min-height: 47px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); font-size: 14px; font-weight: 800; }
.episode:hover { border-color: var(--accent); }
.episode.is-locked { border-color: var(--line); background: #edf1f8; color: var(--muted); }
.episode[aria-current="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.episode .icon { position: absolute; top: 3px; right: 4px; color: var(--muted); width: 13px; height: 13px; }
.episode-hint { color: var(--accent); font-size: 11px; text-align: right; }
.player-stage { position: relative; background: #0c0d0f; width: 100%; height: min(51svh, 440px); min-height: 235px; overflow: hidden; }
.player-stage video { display: block; width: 100%; height: 100%; object-fit: contain; }
.player-badge { position: absolute; top: 10px; left: 12px; font-size: 11px; padding: 5px 8px; background: var(--panel); border-radius: 8px; pointer-events: none; }
.player-content h1 { font-size: 20px; line-height: 1.25; letter-spacing: -.03em; }
.player-controls { display: flex; align-items: center; gap: 7px; margin-top: 12px; }
.player-controls .secondary { flex: 1; }
.player-controls select { min-height: 46px; padding: 6px; border-radius: 11px; background: var(--panel); border: 1px solid var(--line); color: var(--text); }
.overlay { position: absolute; z-index: 4; inset: 0; display: flex; align-items: flex-end; background: #19253b72; }
.sheet { width: 100%; max-height: 92%; overflow: auto; padding: 11px 16px max(17px, env(safe-area-inset-bottom)); border: 1px solid var(--line); border-bottom: 0; border-radius: 20px 20px 0 0; background: var(--panel); box-shadow: 0 -12px 48px #18223b29; }
.sheet-handle { width: 36px; height: 4px; border-radius: 99px; background: #92a1ba; margin: 0 auto 10px; }
.sheet-header { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 9px; }
.sheet h2 { font-size: 23px; letter-spacing: -.035em; line-height: 1.18; }
.sheet .sheet-action { display: flex; align-items: center; justify-content: flex-start; width: 100%; margin-top: 9px; }
.sheet .sheet-action .icon { width: 20px; height: 20px; }
.sheet .meta { margin-bottom: 12px; }
.sheet p + p { margin-top: 8px; }
.demo-note { font-size: 11px; color: var(--muted); margin-top: 12px; }
.toast { position: absolute; z-index: 6; bottom: 75px; left: 12px; right: 12px; padding: 10px 13px; border: 1px solid var(--line); border-radius: 12px; background: #eef1ff; color: var(--text); font-size: 13px; text-align: center; box-shadow: 0 7px 26px #23345019; pointer-events: none; }

.skeleton { display: block; position: relative; overflow: hidden; border-radius: 11px; background: #dce3ef; min-height: 14px; }
.skeleton::after { position: absolute; inset: 0; content: ""; background: linear-gradient(105deg,transparent 18%,#ffffff80 50%,transparent 82%); transform: translateX(-100%); animation: shimmer 1.35s ease-in-out infinite; }
@keyframes shimmer { to { transform: translateX(100%); } }
.sk-title { width: 48%; height: 29px; margin-bottom: 14px; }
.sk-line { width: 74%; height: 13px; margin-bottom: 9px; }
.sk-line.short { width: 52%; }
.sk-button { width: 100%; height: 46px; margin-top: 13px; }
.sk-tile { height: 111px; }
.sk-row { height: 60px; margin-bottom: 8px; }
.sk-poster { width: 100%; aspect-ratio: 2/3; }
.sk-detail { margin-bottom: 12px; }
.sk-video { height: min(51svh, 440px); min-height: 235px; border-radius: 0; }
.sk-episode { height: 47px; }

@media (max-width: 760px) {
  body { background: var(--bg); }
  .workspace { display: block; min-height: 100svh; padding: 0; background: var(--bg); }
  .app-shell { width: 100%; max-width: 520px; margin: auto; height: 100vh; height: 100dvh; min-height: 0; border: 0; border-radius: 0; box-shadow: none; }
  .hero { min-height: clamp(340px, 54svh, 450px); }
}
@media (max-width: 360px) {
  .content { padding-left: 12px; padding-right: 12px; }
  .tab { font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) {
  .skeleton::after { animation: none; }
}


.detail-heading .pill-row { margin-top: 8px; }
.detail-heading .pill { min-height: 28px; }
.autoplay { display: flex; gap: 8px; align-items: center; color: var(--muted); font-size: 12px; min-height: 44px; }
.autoplay input { accent-color: var(--accent); width: 17px; height: 17px; }
.share-url { min-height: 44px; border-radius: 10px; border: 1px solid var(--line); padding: 8px; width: 100%; color: var(--text); background: var(--bg); }
.history-card .history-text { width: 100%; }
.preview-controls { display: flex; justify-content: flex-start; }
.player-badge { border: 1px solid var(--line); }
#episodes { margin-top: 17px; }
@media (max-width: 760px) {
}


/* 用浅蓝灰区分页面层次，靛蓝标识主要操作，图片上的文字独立配色。 */
body { background: var(--bg); }
.app-shell { border-color: var(--line); border-radius: 24px; }
.app-header { background: var(--panel); border-color: var(--line); min-height: 63px; }
.brand { letter-spacing: -.05em; }
.language-button, .icon-button { border-radius: 50%; }
.language-button { background: transparent; }
.screen { scrollbar-color: #7d8ca5 transparent; }
.tab-bar { background: var(--panel); gap: 2px; padding: 3px 8px max(4px, env(safe-area-inset-bottom)); min-height: 65px; }
.tab { color: var(--muted); border-radius: 10px; position: relative; }
.tab[aria-current="page"] { background: #e9edfb; }
.tab:hover { background: var(--raised); }
.primary { border-radius: 999px; }
.primary:hover { background: var(--accent-hover); }
.secondary:hover { background: var(--raised); }
.pill { background: var(--panel); color: var(--text); }
.section-heading h2 { font-size: 22px; font-weight: 750; letter-spacing: -.02em; }
.section-heading a:hover { color: var(--accent-hover); }
.section + .section { margin-top: 22px; }
.home-content .poster-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 15px 10px; }
.poster-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px 10px; }
.poster-card { display: block; aspect-ratio: auto; overflow: visible; border: 0; background: transparent; }
.poster-card::after { content: none; }
.tile-image { position: relative; border-radius: 13px; overflow: hidden; aspect-ratio: 3/4; background: var(--panel); }
.tile-image img { object-position: center 28%; }
.poster-card .episode-tag { top: auto; bottom: 6px; left: 6px; right: auto; background: #222b3de8; color: var(--on-image); padding: 4px 7px; }
.tile-copy { padding: 7px 1px 0; }
.tile-copy strong { margin: 0; -webkit-line-clamp: 2; color: var(--text); font-size: 15px; font-weight: 650; }
.poster-card:hover .tile-copy strong { color: var(--accent); }
.genre-card { position: relative; overflow: hidden; background: var(--panel); }
.genre-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg,#14151820,#141518ee 91%); }
.genre-card .genre-art { position: absolute; inset: 0; object-position: center 28%; }
.genre-card strong, .genre-card span { position: relative; z-index: 1; color: var(--on-image); }
.platform-row { text-align: start; }
.platform-row .row-end { margin-left: 0; margin-inline-start: auto; }
.source-mark { width: 42px; height: 42px; position: relative; overflow: hidden; border-radius: 10px; }
.source-icon { position: absolute; inset: 0; }
.source-moboreels { background: #8b4967; }
.source-dramabox { background: #ac4b6a; }
.source-goodshort { background: #6f5743; }
.collection-count { margin: -4px 0 12px; }
.detail-heading { align-items: end; grid-template-columns: minmax(85px, 31%) 1fr; }
.detail-art { border-radius: 12px; overflow: hidden; }
.detail-art img { border-radius: 0; }
.detail-kicker { color: var(--accent); font-size: 11px; font-weight: 800; margin-bottom: 6px; }
.detail-heading h1 { font-family: var(--font-title); font-weight: 700; letter-spacing: -.035em; font-size: clamp(21px, 5.9vw, 27px); }
.detail-heading .pill { min-height: 28px; }
.detail-actions .detail-outbound { flex: 1; }
.episode-grid { grid-template-columns: repeat(6,minmax(0,1fr)); gap: 6px; }
.episode { border-radius: 7px; }
.episode.is-locked { background: #edf1f8; border-color: var(--line); color: var(--muted); }
.episode.is-locked .icon { color: var(--muted); }
.episode-hint { color: var(--accent); }
.player-stage { background: #0c0d0f; }
.player-badge { background: var(--panel); border-color: var(--line); }
.sheet { background: #fff; border-color: var(--line); }
.sheet-handle { background: #92a1ba; }
.toast { background: var(--raised); border-color: var(--line); color: var(--text); }
.avatar { background: #e6eafa; color: var(--accent); }
.skeleton { background: #dce3ef; }
.skeleton::after { background: linear-gradient(105deg,transparent 18%,#ffffff80 50%,transparent 82%); }
.sk-poster { aspect-ratio: 3/4; }
@media (max-width: 760px) {
  .workspace { background: var(--bg); }
  .app-shell { border-radius: 0; }
}
@media (max-width: 365px) {
  .episode-grid { grid-template-columns: repeat(5,minmax(0,1fr)); }
}

.feature-viewport { position: relative; }
.feature-track {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  border-radius: 18px;
}
.feature-track::-webkit-scrollbar { display: none; }
.feature, .sk-feature-card {
  flex: 0 0 min(64%, 300px);
  min-width: 0;
  aspect-ratio: 3 / 4;
  border-radius: 18px;
  overflow: hidden;
}
.feature {
  position: relative;
  display: flex;
  align-items: flex-end;
  scroll-snap-align: start;
  border: 1px solid #101a2b38;
  background: #172334;
  color: #fff;
}
.feature:focus-visible { outline: 3px solid #fff; outline-offset: -5px; }
.feature-art, .feature-art::after { position: absolute; inset: 0; }
.feature-art img { object-position: center 26%; -webkit-user-drag: none; }
.feature-art::after { content: ""; background: linear-gradient(0deg, #050a13f5, #080d1794 29%, transparent 58%); }
.feature-copy { position: relative; display: grid; justify-items: start; gap: 9px; width: 100%; min-width: 0; padding: 14px; }
.feature-title {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  overflow-wrap: anywhere;
  color: #fff;
  font-size: clamp(16px, 4.5vw, 20px);
  line-height: 1.15;
  font-weight: 750;
  text-shadow: 0 1px 7px #050a13d9;
}
.feature-cta {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: 100%;
  min-height: 34px;
  padding: 6px 11px;
  border-radius: 999px;
  background: #fff;
  color: #121b2c;
  font-size: 13px;
  font-weight: 750;
}
.feature-cta .icon { width: 16px; height: 16px; flex: 0 0 auto; }
.feature:hover .feature-cta { background: #e9effc; }
.feature-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: #132333f2;
  border-color: #ffffff4d;
  color: #fff;
}
.feature-arrow:hover { background: #293a50; }
.feature-arrow[data-step="-1"] { inset-inline-start: 6px; }
.feature-arrow[data-step="1"] { inset-inline-end: 6px; }
.feature-dots { display: flex; align-items: center; justify-content: center; }
.feature-dot { display: grid; place-items: center; width: 27px; height: 32px; padding: 0; border: 0; border-radius: 11px; background: transparent; }
.feature-dot::before { content: ""; width: 7px; height: 7px; background: #8190a9; border-radius: 999px; }
.feature-dot[aria-current="true"]::before { width: 20px; background: var(--accent); }
.feature-dot:hover::before { background: var(--text); }
.feature-carousel + .section { margin-top: 12px; }
.sk-feature-track { overflow: hidden; }
.sk-feature-controls { height: 32px; display: grid; place-items: center; }
.sk-feature-controls .skeleton { width: 94px; margin: 0; }
.sk-feature-controls + .section { margin-top: 12px; }
.tile-image, .detail-art {
  background: url("assets/dramafind-logo.svg") center / 38px 38px no-repeat var(--raised);
}
.feature-art { background: url("assets/dramafind-logo.svg") center / 38px 38px no-repeat #172334; }
.detail-art { aspect-ratio: 2 / 3; }
.home-shelf-rail { position: relative; }
.home-shelf-posters {
  display: flex;
  gap: 10px;
  padding: 3px 3px 7px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: 3px;
  scrollbar-width: none;
}
.home-shelf-posters::-webkit-scrollbar { display: none; }
.home-shelf-posters > * {
  flex: 0 0 calc((100% - 10px) / 2);
  min-width: 0;
  scroll-snap-align: start;
}
.home-shelf-arrow {
  position: absolute;
  z-index: 1;
  top: 40%;
  width: 44px;
  height: 44px;
  padding: 0;
  transform: translateY(-50%);
  color: var(--accent);
  box-shadow: 0 2px 10px #19253b33;
}
.home-shelf-arrow[data-shelf-step="-1"] { inset-inline-start: 8px; }
.home-shelf-arrow[data-shelf-step="1"] { inset-inline-end: 8px; }
.home-shelf-arrow[aria-disabled="true"] {
  opacity: .55;
  color: var(--muted);
  background: var(--panel);
  cursor: default;
}
#homeTopicShelves:not(:empty) { margin-top: 22px; }
.topic-page-sentinel { height: 1px; }
.topic-page-loading { margin: 12px 0 0; text-align: center; }
.sheet .language-option { justify-content: space-between; min-width: 0; text-align: start; }
.language-option-label { min-width: 0; overflow-wrap: anywhere; }
.language-option-label bdi { display: block; }
.language-option-description { color: var(--muted); font-size: 12px; font-weight: 600; margin-top: 2px; }
.language-option-marker { display: inline-flex; flex: none; align-items: center; gap: 8px; }
.language-option-marker bdi { color: var(--muted); font-size: 11px; }
.sheet .language-option[aria-pressed="true"] {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--hero-surface);
}
.catalog-language-list {
  max-height: min(62vh, 460px);
  overflow: auto;
  overscroll-behavior: contain;
  padding: 0 4px 5px;
  margin-inline: -4px;
}
.catalog-language-list .meta { margin: 9px 0 0; }
.tab span { max-width: 100%; text-align: center; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
[dir="rtl"] :is(.feature-arrow, .home-shelf-arrow, [data-act="back"], .row-end) > .icon { transform: scaleX(-1); }

/* Telegram 决定窗口尺寸，网页按收到的视口排版。 */
[data-telegram] .workspace {
  display: block;
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  padding: 0;
  background: var(--bg);
}
[data-telegram] .app-shell {
  width: 100%;
  max-width: none;
  height: 100%;
  min-height: 0;
  margin: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
[data-telegram-fullscreen] .workspace {
  padding-top: calc(var(--tg-safe-area-inset-top, 0px) + var(--tg-content-safe-area-inset-top, 0px));
  padding-right: calc(var(--tg-safe-area-inset-right, 0px) + var(--tg-content-safe-area-inset-right, 0px));
  padding-bottom: calc(var(--tg-safe-area-inset-bottom, 0px) + var(--tg-content-safe-area-inset-bottom, 0px));
  padding-left: calc(var(--tg-safe-area-inset-left, 0px) + var(--tg-content-safe-area-inset-left, 0px));
}
[data-telegram-fullscreen] .tab-bar { padding-bottom: 4px; }
[data-telegram-fullscreen] .sheet { padding-bottom: 17px; }
[data-telegram] .app-header:has([data-act="toggleFullscreen"]:not([hidden])) { gap: clamp(4px, 1.6vw, 10px); }
[data-telegram] .app-header:has([data-act="toggleFullscreen"]:not([hidden])) .header-space { min-width: 0; }
@media (max-width: 365px) {
  [data-telegram] .app-header:has([data-act="back"]):has([data-act="toggleFullscreen"]:not([hidden])) .brand-name { display: none; }
}

@media (min-width: 761px) {
  [data-telegram] .app-shell { --poster-columns: 4; --rail-gap: 16px; }
  [data-telegram] .content { padding-inline: clamp(16px, 2.5vw, 40px); }
  [data-telegram] .feature-track { gap: var(--rail-gap); }
  [data-telegram] .home-content .poster-grid {
    grid-template-columns: repeat(var(--poster-columns), minmax(0, 1fr));
    column-gap: var(--rail-gap);
  }
  [data-telegram] .home-shelf-posters { gap: var(--rail-gap); }
  [data-telegram] .home-shelf-posters > * {
    flex-basis: calc((100% - (var(--poster-columns) - 1) * var(--rail-gap)) / var(--poster-columns));
  }
  [data-telegram] .tab-bar { grid-template-columns: repeat(5, minmax(0, 120px)); justify-content: center; }
  [data-telegram] .detail-heading { grid-template-columns: 176px minmax(0, 1fr); }
  [data-telegram] .detail-actions, [data-telegram] .synopsis { max-width: 720px; }
  [data-telegram] .episode-grid { grid-template-columns: repeat(12, minmax(0, 72px)); }
  [data-telegram] .overlay { justify-content: center; }
  [data-telegram] .sheet { max-width: 560px; }
}
@media (min-width: 1120px) {
  [data-telegram] .app-shell { --poster-columns: 5; }
}
@media (min-width: 1440px) {
  [data-telegram] .app-shell { --poster-columns: 6; }
}
