/* ============================================================
   华昭府影厅 · base.css
   设计基调：深松墨绿 + 铜金 + 米纸白；宋体标题、系统黑体正文。
   只定义 token、外壳、通用组件；页面专属样式在 pages.css / player.css。
   ============================================================ */

:root {
  /* 色彩 */
  --ink-900: #0c1310;
  --ink-850: #0f1713;
  --ink-800: #121c17;
  --ink-750: #16211b;
  --ink-700: #1a2620;
  --ink-600: #26352c;
  --ink-500: #33453a;

  --brass: #c9a45b;
  --brass-bright: #e0c382;
  --brass-dim: #8a7340;
  --brass-a08: rgba(201, 164, 91, 0.08);
  --brass-a14: rgba(201, 164, 91, 0.14);
  --brass-a24: rgba(201, 164, 91, 0.24);
  --brass-a40: rgba(201, 164, 91, 0.4);

  --paper: #efe7d6;
  --paper-2: #b9b3a4;
  --muted: #7f8a80;
  --muted-2: #5d6a60;
  --crimson: #b5442e;
  --screen: #f4e9c8;

  --panel: var(--ink-800);
  --line: rgba(201, 164, 91, 0.16);
  --line-soft: rgba(239, 231, 214, 0.08);

  /* 字体 */
  --font-display: "Songti SC", "STSong", "Noto Serif SC", "Source Han Serif SC",
    SimSun, "Times New Roman", Georgia, serif;
  --font-ui: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC",
    system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-num: "Georgia", "Times New Roman", var(--font-display);

  /* 尺寸 */
  --gutter: clamp(20px, 3.4vw, 56px);
  --maxw: 1560px;
  --sec-gap: clamp(38px, 4.6vw, 64px);
  --radius: 3px;
  --topbar-h: 76px;

  color-scheme: dark;
}

/* ---------- reset ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; }

body {
  min-height: 100vh;
  background:
    radial-gradient(1100px 520px at 50% -140px, rgba(201, 164, 91, 0.12), transparent 62%),
    radial-gradient(900px 700px at 108% 8%, rgba(46, 74, 58, 0.35), transparent 60%),
    radial-gradient(760px 640px at -8% 96%, rgba(35, 58, 45, 0.4), transparent 58%),
    var(--ink-900);
  color: var(--paper-2);
  font-family: var(--font-ui);
  font-size: 14px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg, video, canvas { display: block; max-width: 100%; }
img { border: 0; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
h1, h2, h3, h4, p, figure { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }

::selection { background: var(--brass); color: #14100a; }

/* 滚动条 */
* { scrollbar-width: thin; scrollbar-color: var(--ink-500) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--ink-500);
  border: 2px solid transparent;
  background-clip: content-box;
  border-radius: 8px;
}
::-webkit-scrollbar-thumb:hover { background: var(--brass-dim); background-clip: content-box; }

/* 焦点可见 */
:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: 2px;
  border-radius: 2px;
}

[hidden] { display: none !important; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- 应用外壳 ---------- */
.app {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* 细微胶片颗粒（只在大屏覆盖，不干扰可读性） */
.app::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.5;
  background-image: radial-gradient(rgba(239, 231, 214, 0.05) 0.5px, transparent 0.5px);
  background-size: 3px 3px;
  mix-blend-mode: soft-light;
}

.topbar,
.notice-bar,
.view,
.footer { position: relative; z-index: 1; }

/* ---------- 顶栏 ---------- */
.topbar {
  display: flex;
  align-items: center;
  gap: clamp(16px, 2.2vw, 34px);
  min-height: var(--topbar-h);
  padding: 0 var(--gutter);
  border-bottom: 1px solid var(--line);
  background: rgba(12, 19, 16, 0.82);
  backdrop-filter: blur(14px) saturate(120%);
  -webkit-backdrop-filter: blur(14px) saturate(120%);
  position: sticky;
  top: 0;
  z-index: 40;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
}
.brand-seal {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-size: 22px;
  line-height: 1;
  color: var(--brass);
  border: 1px solid var(--brass-a40);
  border-radius: 2px;
  background:
    linear-gradient(155deg, rgba(201, 164, 91, 0.16), rgba(201, 164, 91, 0.02)),
    var(--ink-850);
  box-shadow: inset 0 0 0 3px var(--ink-900), inset 0 0 0 4px rgba(201, 164, 91, 0.16);
  transition: border-color 0.25s, color 0.25s;
}
.brand:hover .brand-seal { border-color: var(--brass); color: var(--brass-bright); }
.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.brand-text b {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--paper);
}
.brand-text i {
  font-style: normal;
  font-size: 10px;
  letter-spacing: 0.22em;
  color: var(--muted);
}

.nav {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1 1 auto;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.nav::-webkit-scrollbar { display: none; }
.nav a {
  position: relative;
  flex: 0 0 auto;
  padding: 9px 13px;
  font-size: 14.5px;
  letter-spacing: 0.06em;
  color: var(--paper-2);
  transition: color 0.2s;
}
.nav a::after {
  content: "";
  position: absolute;
  left: 13px;
  right: 13px;
  bottom: 2px;
  height: 2px;
  background: var(--brass);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.22s ease;
}
.nav a:hover { color: var(--paper); }
.nav a:hover::after { transform: scaleX(0.45); }
.nav a.is-active { color: var(--paper); }
.nav a.is-active::after { transform: scaleX(1); }

.topbar-right {
  display: flex;
  align-items: center;
  gap: clamp(12px, 1.6vw, 24px);
  flex: 0 0 auto;
}

.search {
  display: flex;
  align-items: center;
  gap: 8px;
  width: clamp(170px, 15vw, 236px);
  height: 36px;
  padding: 0 10px 0 12px;
  border: 1px solid var(--ink-600);
  border-radius: var(--radius);
  background: rgba(12, 19, 16, 0.6);
  color: var(--muted);
  transition: border-color 0.2s, background 0.2s;
}
.search:focus-within { border-color: var(--brass-dim); background: var(--ink-850); }
.search-ico { flex: 0 0 auto; }
.search input {
  flex: 1 1 auto;
  min-width: 0;
  border: 0;
  background: none;
  font-size: 13px;
  color: var(--paper);
}
.search input::placeholder { color: var(--muted-2); }
.search input::-webkit-search-cancel-button { filter: invert(0.7); }
.search-kbd { flex: 0 0 auto; }

.kbd {
  display: inline-grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  font-family: var(--font-num);
  font-size: 10.5px;
  line-height: 1;
  color: var(--muted);
  border: 1px solid var(--ink-600);
  border-radius: 2px;
  background: var(--ink-800);
}

.clock {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  line-height: 1.2;
  white-space: nowrap;
}
.clock-time {
  font-family: var(--font-num);
  font-size: 21px;
  letter-spacing: 0.04em;
  color: var(--paper);
  font-variant-numeric: tabular-nums;
}
.clock-date { font-size: 10.5px; letter-spacing: 0.08em; color: var(--muted); }

/* ---------- 公告条 ---------- */
.notice-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 14px var(--gutter) 0;
  padding: 7px 0;
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
  font-size: 12.5px;
  color: var(--paper-2);
  overflow: hidden;
}
.notice-label {
  flex: 0 0 auto;
  padding-right: 12px;
  border-right: 1px solid var(--line);
  color: var(--brass);
  letter-spacing: 0.18em;
  font-size: 11.5px;
}
.notice-track { flex: 1 1 auto; overflow: hidden; white-space: nowrap; }
.notice-track > span {
  display: inline-block;
  padding-left: 100%;
  animation: notice-scroll 38s linear infinite;
}
.notice-bar:hover .notice-track > span { animation-play-state: paused; }
@keyframes notice-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-100%); }
}

/* ---------- 主视图 ---------- */
.view {
  flex: 1 1 auto;
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(22px, 3vw, 40px) var(--gutter) 0;
  outline: none;
}

/* ---------- 页尾 ---------- */
.footer {
  margin-top: var(--sec-gap);
  border-top: 1px solid var(--line);
  padding: 26px var(--gutter) 34px;
}
.footer-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px 28px;
  align-items: center;
  font-size: 12px;
  color: var(--muted);
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 0.1em;
  color: var(--paper-2);
}
.footer-seal {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  font-size: 12px;
  color: var(--brass);
  border: 1px solid var(--brass-a24);
  border-radius: 2px;
}
.footer-note { max-width: 720px; line-height: 1.7; }
.footer-meta { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.footer-dot { color: var(--brass-dim); }
#footer-status { color: var(--muted); }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 38px;
  padding: 0 18px;
  font-size: 13.5px;
  letter-spacing: 0.04em;
  color: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--ink-800);
  transition: background 0.18s, border-color 0.18s, color 0.18s, transform 0.18s;
  white-space: nowrap;
}
.btn:hover { border-color: var(--brass-dim); background: var(--ink-700); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: 0.45; pointer-events: none; }

.btn-primary {
  color: #171208;
  background: linear-gradient(180deg, var(--brass-bright), var(--brass));
  border-color: var(--brass-bright);
  font-weight: 600;
}
.btn-primary:hover {
  background: linear-gradient(180deg, #efd79a, var(--brass-bright));
  border-color: #efd79a;
}
.btn-ghost {
  background: transparent;
  border-color: var(--brass-a24);
  color: var(--paper);
}
.btn-ghost:hover { background: var(--brass-a08); border-color: var(--brass-dim); }
.btn-sm { height: 30px; padding: 0 12px; font-size: 12.5px; }
.btn-icon {
  width: 36px;
  height: 36px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  color: var(--paper-2);
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  transition: color 0.18s, background 0.18s, border-color 0.18s;
}
.btn-icon:hover { color: var(--paper); background: var(--ink-700); border-color: var(--line); }
.btn-danger { color: #e2a496; border-color: rgba(181, 68, 46, 0.4); }
.btn-danger:hover { background: rgba(181, 68, 46, 0.14); border-color: rgba(181, 68, 46, 0.6); }

/* ---------- chips / tags / badges ---------- */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 13px;
  font-size: 13px;
  color: var(--paper-2);
  border: 1px solid var(--ink-600);
  border-radius: 2px;
  background: transparent;
  transition: color 0.18s, border-color 0.18s, background 0.18s;
}
.chip:hover { color: var(--paper); border-color: var(--brass-dim); }
.chip.on {
  color: #171208;
  background: var(--brass);
  border-color: var(--brass);
  font-weight: 600;
}
.chip .num { font-family: var(--font-num); font-size: 11.5px; color: inherit; opacity: 0.75; }

.chip-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }

.tag {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 7px;
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 2px;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 21px;
  padding: 0 8px;
  font-size: 11px;
  letter-spacing: 0.06em;
  border-radius: 2px;
  color: var(--brass);
  border: 1px solid var(--brass-a24);
  background: var(--brass-a08);
}
.badge-live { color: #fff; background: var(--crimson); border-color: transparent; }
.badge-live::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #fff;
  animation: live-pulse 1.8s ease-in-out infinite;
}
@keyframes live-pulse { 50% { opacity: 0.25; } }

.score-chip {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 6px;
  font-family: var(--font-num);
  font-size: 11.5px;
  letter-spacing: 0.02em;
  color: var(--brass-bright);
  background: rgba(10, 16, 13, 0.82);
  border: 1px solid var(--brass-a24);
  border-radius: 2px;
  backdrop-filter: blur(4px);
}

/* ---------- 分段控件 ---------- */
.seg {
  display: inline-flex;
  border: 1px solid var(--ink-600);
  border-radius: var(--radius);
  overflow: hidden;
}
.seg button {
  height: 34px;
  padding: 0 16px;
  font-size: 13px;
  color: var(--paper-2);
  transition: background 0.18s, color 0.18s;
}
.seg button + button { border-left: 1px solid var(--ink-600); }
.seg button:hover { color: var(--paper); background: var(--ink-750); }
.seg button.on { color: #171208; background: var(--brass); font-weight: 600; }

/* ---------- 海报卡 ---------- */
.poster-card {
  display: flex;
  flex-direction: column;
  gap: 9px;
  min-width: 0;
  color: inherit;
  border-radius: var(--radius);
  outline-offset: 3px;
}
.poster-card .poster {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border: 1px solid var(--brass-a14);
  border-radius: 2px;
  background: var(--ink-750);
  transition: border-color 0.25s, transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1),
    box-shadow 0.3s;
}
.poster-card .poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.4s ease, transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.poster-card .poster img.is-loaded { opacity: 1; }
.poster-card .poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(6, 10, 8, 0.72) 0%, rgba(6, 10, 8, 0) 42%);
  opacity: 0;
  transition: opacity 0.25s;
}
.poster-card:hover .poster,
.poster-card:focus-visible .poster {
  border-color: var(--brass-a40);
  transform: translateY(-3px);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.4);
}
.poster-card:hover .poster::after,
.poster-card:focus-visible .poster::after { opacity: 1; }
.poster-card:hover .poster img { transform: scale(1.035); }
.poster-card .score-chip { position: absolute; top: 7px; right: 7px; z-index: 2; }
.poster-card .card-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: rgba(10, 16, 13, 0.6);
  z-index: 2;
}
.poster-card .card-progress i {
  display: block;
  height: 100%;
  background: var(--brass);
}
.poster-card .card-flag {
  position: absolute;
  left: 7px;
  top: 7px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 6px;
  font-size: 10.5px;
  letter-spacing: 0.06em;
  color: var(--screen);
  background: rgba(10, 16, 13, 0.78);
  border: 1px solid rgba(244, 233, 200, 0.24);
  border-radius: 2px;
}
.poster-card .poster-hint {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 10px;
  z-index: 2;
  display: flex;
  justify-content: center;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.22s, transform 0.22s;
}
.poster-card:hover .poster-hint,
.poster-card:focus-visible .poster-hint { opacity: 1; transform: none; }
.poster-card .caption { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.poster-card .cap-title {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--paper);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.18s;
}
.poster-card:hover .cap-title { color: var(--brass-bright); }
.poster-card .cap-sub {
  font-style: normal;
  font-size: 11.5px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.poster-card.is-poor .poster { filter: saturate(0.85); }

/* ---------- 海报网格 ---------- */
.poster-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(152px, 1fr));
  gap: 24px 18px;
}

/* ---------- 横排（首页各栏目） ---------- */
.row { margin-bottom: var(--sec-gap); }
.row-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}
.row-title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--paper);
}
.row-title::before {
  content: "";
  width: 18px;
  height: 1px;
  background: var(--brass);
  flex: 0 0 auto;
}
.row-title .row-sub {
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.02em;
  color: var(--muted);
}
.row-more {
  font-size: 12.5px;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: color 0.18s, gap 0.18s;
}
.row-more:hover { color: var(--brass); gap: 8px; }

.row-scroll {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 158px;
  gap: 16px;
  overflow-x: auto;
  padding: 2px 2px 10px;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
}
.row-scroll::-webkit-scrollbar { display: none; }
.row-scroll > * { scroll-snap-align: start; }

/* ---------- 页面头 / 筛选 / 分页 ---------- */
.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}
.page-head h1 {
  font-family: var(--font-display);
  font-size: clamp(26px, 3vw, 34px);
  font-weight: 600;
  letter-spacing: 0.1em;
  line-height: 1.15;
  color: var(--paper);
}
.page-head .page-sub {
  margin-top: 6px;
  font-size: 12.5px;
  color: var(--muted);
  letter-spacing: 0.03em;
}
.page-head .page-actions { display: flex; align-items: center; gap: 10px; }

.filters {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 26px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line-soft);
}
.filter-line { display: flex; align-items: flex-start; gap: 14px; }
.filter-label {
  flex: 0 0 auto;
  width: 44px;
  padding-top: 6px;
  font-size: 11.5px;
  letter-spacing: 0.14em;
  color: var(--muted);
}

.pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 36px;
}
.pager button {
  min-width: 34px;
  height: 34px;
  padding: 0 10px;
  font-family: var(--font-num);
  font-size: 13px;
  color: var(--paper-2);
  border: 1px solid var(--ink-600);
  border-radius: 2px;
  transition: border-color 0.18s, color 0.18s, background 0.18s;
}
.pager button:hover { border-color: var(--brass-dim); color: var(--paper); }
.pager button.on { background: var(--brass); border-color: var(--brass); color: #171208; }
.pager .pager-ellipsis { color: var(--muted); padding: 0 4px; }

/* ---------- 面板 / 元信息 ---------- */
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(16px, 2vw, 26px);
}

.meta-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  font-size: 12.5px;
  color: var(--muted);
}
.meta-line b { color: var(--paper-2); font-weight: 500; }

.progress-bar {
  height: 3px;
  background: var(--ink-600);
  border-radius: 2px;
  overflow: hidden;
}
.progress-bar i { display: block; height: 100%; background: var(--brass); }

/* ---------- 空态 / 错误 / 加载 ---------- */
.empty,
.error-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: clamp(40px, 7vw, 84px) 24px;
  text-align: center;
  border: 1px dashed var(--brass-a24);
  border-radius: var(--radius);
  background: rgba(18, 28, 23, 0.5);
}
.empty h3,
.error-box h3 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--paper);
}
.empty p,
.error-box p { font-size: 13px; color: var(--muted); max-width: 46ch; }
.empty .empty-actions,
.error-box .error-actions { display: flex; gap: 10px; margin-top: 8px; }
.error-box { border-color: rgba(181, 68, 46, 0.34); }
.error-box h3 { color: #e2b3a7; }

.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid var(--ink-500);
  border-top-color: var(--brass);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  flex: 0 0 auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

.loading-block {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 56px 0;
  font-size: 13px;
  color: var(--muted);
}

.skeleton {
  position: relative;
  overflow: hidden;
  background: var(--ink-750);
  border-radius: 2px;
}
.skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(239, 231, 214, 0.06), transparent);
  animation: shimmer 1.4s infinite;
}
@keyframes shimmer { to { transform: translateX(100%); } }
.skeleton-card .sk-poster { aspect-ratio: 2 / 3; width: 100%; }
.skeleton-card .sk-line { height: 12px; margin-top: 10px; width: 76%; }

/* ---------- toast ---------- */
.toast-host {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 320;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}
.toast {
  pointer-events: auto;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  max-width: min(400px, calc(100vw - 44px));
  padding: 11px 16px 11px 14px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--paper);
  background: var(--ink-700);
  border: 1px solid var(--line);
  border-left: 2px solid var(--brass);
  border-radius: 2px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
  animation: toast-in 0.24s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.toast.is-err { border-left-color: var(--crimson); }
.toast.is-info { border-left-color: var(--paper-2); }
.toast.is-out { animation: toast-out 0.2s ease both; }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(6px); } }

/* ---------- modal ---------- */
.modal-host {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(5, 9, 7, 0.74);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: fade-in 0.18s ease both;
}
.modal-panel {
  width: min(560px, 100%);
  max-height: min(86vh, 900px);
  overflow: auto;
  background: var(--ink-800);
  border: 1px solid var(--brass-a24);
  border-radius: var(--radius);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
  animation: modal-in 0.24s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.modal-panel.is-wide { width: min(820px, 100%); }
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
}
.modal-head h3 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--paper);
}
.modal-body { padding: 20px; font-size: 13.5px; }
.modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 20px;
  border-top: 1px solid var(--line);
}
@keyframes modal-in { from { opacity: 0; transform: translateY(12px) scale(0.99); } }
@keyframes fade-in { from { opacity: 0; } }

/* ---------- 入口口令页 ---------- */
.gate {
  position: fixed;
  inset: 0;
  z-index: 400;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(760px 420px at 50% 12%, rgba(201, 164, 91, 0.14), transparent 65%),
    var(--ink-900);
}
.gate-card {
  width: min(404px, 100%);
  padding: 40px clamp(24px, 4vw, 42px) 30px;
  text-align: center;
  background: var(--ink-800);
  border: 1px solid var(--brass-a24);
  border-radius: var(--radius);
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.55);
}
.gate-seal {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  margin: 0 auto 16px;
  font-family: var(--font-display);
  font-size: 28px;
  color: var(--brass);
  border: 1px solid var(--brass-a40);
  border-radius: 2px;
  background: linear-gradient(155deg, rgba(201, 164, 91, 0.14), transparent);
}
.gate-card h1,
.gate-card .gate-title {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 600;
  letter-spacing: 0.16em;
  color: var(--paper);
}
.gate-sub { margin: 12px 0 24px; font-size: 12.5px; color: var(--muted); line-height: 1.75; }
.gate-label {
  display: block;
  margin-bottom: 8px;
  text-align: left;
  font-size: 11.5px;
  letter-spacing: 0.14em;
  color: var(--muted);
}
.gate-card input {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  font-family: var(--font-num);
  font-size: 17px;
  letter-spacing: 0.3em;
  text-align: center;
  color: var(--paper);
  background: var(--ink-900);
  border: 1px solid var(--ink-600);
  border-radius: 2px;
}
.gate-card input:focus { border-color: var(--brass-dim); }
.gate-error { min-height: 18px; margin: 8px 0 12px; font-size: 12px; color: #dd9b8c; }
.gate-btn { width: 100%; height: 42px; }
.gate-foot { margin-top: 18px; font-size: 11.5px; color: var(--muted-2); }

/* ---------- 播放中隐藏外壳 ---------- */
body.is-playing { overflow: hidden; }
body.is-playing .topbar,
body.is-playing .notice-bar,
body.is-playing .footer { display: none; }
body.is-playing .view { padding: 0; max-width: none; }

/* ---------- 通用工具 ---------- */
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.fade-in { animation: page-in 0.34s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
@keyframes page-in { from { opacity: 0; transform: translateY(8px); } }
.is-dragging { user-select: none; }

/* ---------- 响应式 ---------- */
@media (max-width: 1180px) {
  .clock-date { display: none; }
  .nav a { padding: 9px 10px; }
  .nav a::after { left: 10px; right: 10px; }
}

@media (max-width: 960px) {
  .topbar {
    flex-wrap: wrap;
    gap: 8px 18px;
    padding-top: 12px;
    padding-bottom: 8px;
  }
  .nav { order: 3; flex-basis: 100%; gap: 0; }
  .topbar-right { margin-left: auto; }
  .search { width: 168px; }
  .footer-inner { grid-template-columns: 1fr; gap: 8px; }
  .row-scroll { grid-auto-columns: 142px; }
}

@media (max-width: 680px) {
  :root { --topbar-h: auto; }
  .brand-text i { display: none; }
  .brand-seal { width: 36px; height: 36px; font-size: 18px; }
  .brand-text b { font-size: 16.5px; }
  .search { width: 138px; }
  .search-kbd { display: none; }
  .nav { gap: 0; }
  .nav a { padding: 9px 6px; font-size: 13px; letter-spacing: 0.02em; }
  .nav a::after { left: 6px; right: 6px; }
  .clock-time { font-size: 17px; }
  .poster-grid { grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 18px 12px; }
  .row-scroll { grid-auto-columns: 124px; gap: 12px; }
  .row-title { font-size: 19px; }
  .row-title .row-sub { display: none; }
  .page-head { flex-direction: column; align-items: flex-start; }
  .filter-label { width: 34px; }
  .notice-bar { margin-top: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .notice-track > span { padding-left: 0; animation: none; }
}
