*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; font: 16px/1.55 system-ui, "PingFang SC", "Microsoft YaHei", sans-serif; }
button, input, select { font: inherit; color: inherit; }
button, select, summary { cursor: pointer; }
img, video { max-width: 100%; }
a { color: inherit; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
.catalog-shell { width: min(1200px, 94%); margin: 32px auto 64px; }
.catalog-crumb, .catalog-meta { opacity: .76; }
.catalog-title { display: block; font-weight: 650; text-decoration: none; overflow-wrap: anywhere; }
.catalog-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(min(150px,100%),1fr)); gap: 20px 16px; }
.catalog-card { min-width: 0; }
.catalog-cover { display: block; overflow: hidden; border-radius: 8px; margin-bottom: 7px; }
.catalog-cover img { display: block; width: 100%; height: auto; aspect-ratio: 3/4; object-fit: cover; }
.catalog-search { display: inline-flex; align-items: center; max-width: 100%; gap: 4px; }
.catalog-search input, .catalog-language select { color: inherit; background: transparent; border: 1px solid currentColor; border-radius: 6px; padding: 5px 9px; min-width: 0; }
.catalog-language select { max-width: 100%; }
.catalog-language option { color: #171717; background: white; }
.catalog-search input { width: 100%; }
.catalog-search button { background: transparent; border: 0; padding: 5px; }
.catalog-filters,.pagination,.episode-grid,.engagement,.engagement > span { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.catalog-filters,.pagination { margin: 18px 0; }
.catalog-filters a,.pagination a,.pagination [aria-current] { padding: 6px 12px; border: 1px solid currentColor; border-radius: 5px; text-decoration: none; }
.pagination [aria-current] { font-weight: 750; border-width: 2px; }
.series-gallery > div { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(160px,100%),1fr)); gap: 10px; }
.series-gallery img { width: 100%; height: auto; aspect-ratio: 16/9; object-fit: cover; display: block; border-radius: 5px; }
.engagement { justify-content: space-between; margin-block: 13px; }
.episode { padding: 6px 12px; border: 1px solid currentColor; border-radius: 6px; background: transparent; display: inline-flex; align-items: center; gap: 5px; text-decoration: none; }
.episode .lock { opacity: .7; }
.player-wrap { position: relative; isolation: isolate; overflow: hidden; border-radius: 6px; background: #080808; }
.player-wrap video { display: block; width: 100%; height: clamp(340px,62vh,760px); object-fit: contain; background: #080808; color-scheme: dark; }
.player-overlay { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 1; }
.player-overlay .channel-mark { position: absolute; left: 8px; top: 8px; height: var(--mark-height,20px); width: auto; opacity: 0; transform: translateY(-5px); }
.player-overlay .play-intro { position: absolute; left: 50%; top: 50%; width: min(72%,360px); transform: translate(-50%,-50%); }
.player-overlay .play-intro[hidden] { display: none; }
.play-intro img { display: block; width: 100%; height: auto; }
.player-overlay.is-docking .channel-mark { opacity: 1; transform: none; }
.player-overlay.is-docking .play-intro { top: calc(100% - var(--bottom-mark-height,40px) - 8px); left: calc(100% - var(--bottom-brand-width,118px) - 8px); width: var(--bottom-brand-width,118px); transform: none; }
.player-overlay.is-docking .play-intro img { opacity: .5; }
.playing-indicator { display: none; gap: 2px; height: 12px; align-items: end; }
.episode.is-playing .playing-indicator { display: inline-flex; }
.playing-indicator i { width: 2px; height: 10px; background: currentColor; transform-origin: bottom; }
.domain-qr { display: inline-grid; width: min(202px,100%); padding: 11px; background: white; }
.domain-qr img,.domain-qr canvas { max-width: 100%; height: auto; }
#download-dialog { position: fixed; max-width: min(92vw,360px); border: 0; border-radius: 14px; padding: 24px; color: #222; background: white; text-align: center; box-shadow: 0 10px 56px #0007; }
#download-dialog::backdrop { background: #080812a8; }
#download-dialog .close-dialog { position: absolute; top: 6px; right: 9px; font-size: 24px; background: none; border: none; }
@media (max-width:550px) {
  .catalog-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px 8px; }
  .catalog-shell { margin-top: 20px; }
}
@media(prefers-reduced-motion:no-preference) {
  .catalog-cover img { transition: transform .25s; }
  .catalog-cover:hover img { transform: scale(1.035); }
  .player-overlay .play-intro { transition: top .85s ease,left .85s ease,width .85s ease,transform .85s ease; }
  .play-intro img { transition: opacity .85s ease; }
  .player-overlay .channel-mark { transition: opacity .45s ease .7s,transform .45s ease .7s; }
  .episode.is-playing .playing-indicator i { animation: hg-level .8s ease-in-out infinite alternate; }
  .episode.is-playing .playing-indicator i:nth-child(2) { animation-delay: -.4s; }
  .episode.is-playing .playing-indicator i:nth-child(3) { animation-delay: -.6s; }
  @keyframes hg-level { from { transform: scaleY(.3); } to { transform: scaleY(1); } }
}
