:root {
  --bg: #110e0c;
  --bg-2: #1b1714;
  --bg-3: #26201b;
  --line: rgba(246, 239, 230, 0.14);
  --text: #f6f1e7;
  --muted: #b7ab9d;
  --faint: #85796c;
  --accent: #e23d2b;
  --accent-2: #e2b15a;
  --ok: #9cbe8b;
  --bar: #110e0c;
  --input: #100e0c;
  --batch: rgba(27, 23, 20, 0.92);
  --chip: rgba(255,255,255,0.06);
  --radius: 16px;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
  --serif: "Iowan Old Style", Palatino, "Palatino Linotype", "Songti SC", "STSong", serif;
  --sans: "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-body: 16px;
  --font-nav: 14px;
  --font-brand: 15px;
  --font-brand-sub: 10px;
  --font-land-title: 48px;
  --font-land-sub: 16px;
  --font-land-intro: 14px;
  --font-land-contact-title: 22px;
  --font-land-contact: 14px;
  --font-card-title: 16px;
  --font-card-meta: 12px;
  --font-detail-title: 28px;
  --font-detail-body: 15px;
  --font-btn: 15px;
  --font-section: 32px;
  --font-footer: 13px;
  --font-facts: 14px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; min-height: 100%; }
body {
  background:
    radial-gradient(900px 420px at 0% -10%, rgba(226, 61, 43, 0.22), transparent 55%),
    radial-gradient(700px 380px at 100% 0%, rgba(226, 177, 90, 0.14), transparent 50%),
    var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: var(--font-body);
  line-height: 1.5;
}
a { color: inherit; touch-action: manipulation; }
button { touch-action: manipulation; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { opacity: 0.6; cursor: wait; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
::selection { background: var(--accent); color: white; }

.wrap { width: min(1180px, calc(100% - 32px)); margin: 0 auto; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--bar);
  border-bottom: 1px solid var(--line);
}
.topbar .wrap, .nav, .lang, .actions, .tabs, .chips, .watch-actions, .batch-bar {
  display: flex;
  align-items: center;
  gap: 10px;
}
.topbar .wrap { min-height: 72px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; min-width: 180px; }
.mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: var(--accent);
  font-family: var(--serif);
  overflow: hidden;
  flex: none;
}
.mark.has-logo {
  background: transparent;
  padding: 0;
}
.mark img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.brand b { display: block; font-size: var(--font-brand); line-height: 1.1; }
.brand small { display: block; margin-top: 2px; color: var(--faint); font-size: var(--font-brand-sub); letter-spacing: 0.14em; }
.nav { margin-left: auto; flex-wrap: wrap; justify-content: flex-end; }
.nav a, .lang button, .tabs a, .chips a {
  text-decoration: none;
  color: var(--muted);
  border-radius: 999px;
  padding: 7px 12px;
  font-size: var(--font-nav);
}
.nav a.on, .lang button.on, .tabs a.on, .chips a.on { color: var(--text); background: var(--chip); }
.nav a:active, .tabs a:active, .chips a:active, .btn:active { background: var(--chip); color: var(--text); }
html.is-busy::after {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent);
  z-index: 40;
  pointer-events: none;
}
.nav em, .dot {
  display: inline-block;
  min-width: 8px;
  margin-left: 4px;
  padding: 0 6px;
  border-radius: 99px;
  background: var(--accent);
  color: white;
  font-style: normal;
  font-size: 12px;
}
.dot { width: 8px; height: 8px; min-width: 8px; padding: 0; vertical-align: middle; }
.lang button { background: transparent; border: 0; }
.lang { display: inline-flex; align-items: center; }
.lang-select {
  appearance: none;
  -webkit-appearance: none;
  background: rgba(255,255,255,0.06);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 30px 7px 12px;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 16px) 52%, calc(100% - 11px) 52%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}
.lang-select:hover { border-color: var(--accent-2); }
.lang-select:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; }
.lang-select option { background: var(--bg-2); color: var(--text); }
.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;
}
main { padding: 28px 0 72px; }
.footer { border-top: 1px solid var(--line); padding: 22px 0 36px; color: var(--faint); font-size: var(--font-footer); }
.footer .wrap { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.footer a { color: var(--muted); }

.hero { padding: 34px 0 10px; }
.kicker { margin: 0 0 12px; color: var(--accent-2); letter-spacing: 0.16em; text-transform: uppercase; font-size: 12px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; letter-spacing: -0.03em; }
.hero h1 { margin: 0; font-size: clamp(42px, 7vw, 84px); line-height: 0.95; max-width: 14ch; }
.lede { max-width: 640px; color: var(--muted); font-size: 18px; }
.actions { margin: 22px 0; flex-wrap: wrap; }
.stats { display: flex; gap: 18px; color: var(--muted); }
.stats strong { display: block; color: var(--text); font-size: 28px; font-family: var(--serif); }
.section-title { display: flex; justify-content: space-between; align-items: end; gap: 12px; margin: 28px 0 14px; }
.section-title h2 { margin: 0; font-size: var(--font-section); }

.btn, button.btn {
  border: 0;
  border-radius: 999px;
  padding: 11px 16px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-3);
  color: var(--text);
  font-size: var(--font-btn);
}
.btn.primary { background: var(--accent); color: white; }
.btn.ghost { background: transparent; border: 1px solid var(--line); }
.btn.small { padding: 7px 12px; font-size: 14px; }
.btn.danger { background: #c9342a; border: 1px solid #e2442f; color: #fff; font-weight: 600; }
.btn.danger:hover { background: #e2442f; color: #fff; }
.row-actions { white-space: nowrap; text-align: right; }
.row-actions .btn + .btn { margin-left: 8px; }
/* 台账右侧的编辑 / 删除：加大对比度，必须一眼看清 */
.row-actions .btn.small { min-width: 68px; font-size: 13px; letter-spacing: 0.02em; }
.row-actions .btn.ghost {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.92);
  color: #17120f;
  font-weight: 600;
}
.row-actions .btn.ghost:hover { background: #fff; color: #000; }

/* 访问看板 */
.traffic { margin-top: 18px; }
.traffic h3 { margin: 0 0 12px; font-size: 22px; }
.traffic h4 { margin: 20px 0 10px; font-size: 15px; color: var(--muted); font-weight: 500; }
.bars { display: grid; grid-template-columns: repeat(14, minmax(0, 1fr)); gap: 8px; align-items: end; height: 150px; }
.bar-col { display: grid; grid-template-rows: 16px 1fr 18px; align-items: end; justify-items: center; height: 100%; min-width: 0; }
.bar-val { font-size: 11px; color: var(--muted); }
.bar-track { position: relative; width: 100%; height: 100%; display: flex; align-items: flex-end; border-radius: 6px; background: rgba(255, 255, 255, 0.04); }
.bar-track i { display: block; width: 100%; border-radius: 6px; background: linear-gradient(180deg, var(--accent-2), var(--accent)); min-height: 0; }
.bar-day { font-size: 11px; color: var(--faint); white-space: nowrap; }
.geo { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.geo li { display: grid; grid-template-columns: minmax(120px, 1.2fr) minmax(0, 2fr) 92px; gap: 10px; align-items: center; font-size: 13px; }
.geo-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.geo-track { height: 8px; border-radius: 999px; background: rgba(255, 255, 255, 0.06); overflow: hidden; }
.geo-track i { display: block; height: 100%; border-radius: 999px; background: var(--accent-2); }
.geo-val { text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; }
.geo-pick { display: grid; grid-template-columns: minmax(120px, 1.2fr) minmax(0, 2fr) 92px; gap: 10px; align-items: center; width: 100%; background: transparent; border: 1px solid transparent; border-radius: 8px; padding: 4px 6px; text-align: left; font-size: 13px; }
.geo-pick:hover { border-color: var(--line); background: rgba(255, 255, 255, 0.03); }
.geo li.is-on .geo-pick { border-color: var(--accent-2); background: rgba(80, 140, 255, 0.12); }
.geo li:has(.geo-pick) { display: block; }

/* 访问看板筛选 */
.traffic-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 4px; }
.traffic-filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; }
.traffic-filters label { display: grid; gap: 6px; font-size: 12px; color: var(--muted); }
.traffic-filters select { min-width: 130px; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.04); }
.bars.dense { grid-template-columns: repeat(30, minmax(0, 1fr)); gap: 3px; }
.bars.dense .bar-day { font-size: 9px; transform: rotate(-60deg); transform-origin: center; }
.bars.dense .bar-val { font-size: 9px; }

/* 退出按钮 */
.nav-logout {
  border: 1px solid var(--line);
  color: var(--text);
  background: var(--bg-2);
  font-weight: 700;
  font-size: 14px;
  padding: 8px 18px;
}
.nav-logout:hover { background: var(--text); border-color: var(--text); color: var(--bg); }

/* 询盘表格 */
.inquiry-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.inquiry-table th { text-align: left; font-weight: 500; font-size: 12px; color: var(--muted); padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.inquiry-table td { padding: 12px; border-bottom: 1px solid rgba(255, 255, 255, 0.07); vertical-align: middle; }
.inquiry-table .col-time { width: 150px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.inquiry-table .col-act { width: 120px; text-align: right; }
.inquiry-table .cell-desc { max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.inquiry-row:hover td { background: rgba(255, 255, 255, 0.03); }
.inquiry-row.is-open td { background: rgba(80, 140, 255, 0.08); }
.inquiry-detail td { padding: 0 12px 16px; border-bottom: 1px solid var(--line); background: rgba(255, 255, 255, 0.02); }
.detail-box { border: 1px solid var(--line); border-radius: 10px; padding: 16px; display: grid; gap: 14px; }
.detail-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.detail-head h4 { margin: 0; font-size: 15px; }
.detail-head time { font-size: 12px; color: var(--muted); }
.inquiry-table .kv-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px 18px; }
.inquiry-table .kv { display: grid; gap: 4px; }
.inquiry-table .kv span { font-size: 12px; color: var(--muted); }
.inquiry-table .kv b { font-weight: 500; word-break: break-all; }

/* 工单字段 */
.record-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.record-head h3 { margin: 0; font-size: 20px; }
.record-head time { color: var(--faint); font-size: 12px; white-space: nowrap; }
.kv-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 18px; margin-top: 12px; }
.kv, .kv-block { border-top: 1px solid var(--line); padding-top: 8px; min-width: 0; }
.kv span, .kv-block span { display: block; font-size: 12px; color: var(--faint); letter-spacing: 0.08em; }
.kv b { display: block; margin-top: 2px; font-weight: 500; word-break: break-word; }
.kv-block { margin-top: 8px; }
.kv-block p { margin: 6px 0 0; }
.kv-list { margin: 6px 0 0; padding-left: 18px; }

.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.card { min-width: 0; }
.poster {
  position: relative;
  display: block;
  aspect-ratio: 9 / 16;
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  box-shadow: var(--shadow);
}
.poster span.poster-title {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 2;
  color: #fff;
  text-shadow: 0 1px 8px rgba(0,0,0,.7);
  font-family: var(--serif);
  font-size: 24px;
  line-height: 1.05;
}
.poster-frame {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  background: #3a2a24;
}
.poster.has-frame::after,
.thumb.has-frame::after,
.detail-cover.has-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(0,0,0,0) 52%, rgba(0,0,0,.5));
  pointer-events: none;
}
.poster .ribbon,
.poster .ep-count,
.poster .status { z-index: 2; }
.ribbon, .status {
  position: absolute;
  top: 10px;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 12px;
  background: rgba(0,0,0,0.55);
}
.ribbon { left: 10px; color: var(--accent-2); }
.ep-count {
  position: absolute;
  top: 10px;
  right: 10px;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 12px;
  background: rgba(0,0,0,0.55);
  color: #f6dfa8;
}
.status { right: 10px; }
.status.viewed { color: #d9d0c4; }
.status.shortlisted { color: #ffd48a; }
.status.inquired { color: #c8e7b8; }
.meta { padding: 10px 2px 0; }
.meta strong, .sheet-row h3, .play-item strong { display: block; }
.meta p, .sub, .muted { color: var(--muted); margin: 4px 0; }
.meta .btn, .sheet-row .btn { margin-top: 8px; margin-right: 6px; }

.toolbar { display: flex; justify-content: space-between; gap: 16px; align-items: end; flex-wrap: wrap; margin-bottom: 16px; }
.tabs { gap: 6px; border-bottom: 1px solid var(--line); }
.tabs a { border-radius: 14px 14px 0 0; font-size: 20px; font-family: var(--serif); }
.chips { flex-wrap: wrap; }
.filters { display: grid; grid-template-columns: 1.4fr 1fr 1fr auto; gap: 10px; margin: 14px 0 18px; }
.filter-bar { display: grid; gap: 12px; margin: 14px 0 18px; }
.filter-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.filter-drop { position: relative; }
.filter-drop > button {
  border: 1px solid var(--line);
  background: var(--input);
  color: var(--text);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 13px;
}
.filter-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 15;
  min-width: 200px;
  max-width: min(92vw, 520px);
  max-height: 360px;
  overflow: auto;
  padding: 8px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--bg-2);
  box-shadow: var(--shadow);
  display: none;
}
.filter-drop.open > .filter-menu { display: grid; gap: 4px; }
.filter-cascade { display: flex; gap: 8px; align-items: stretch; }
.filter-cascade .filter-col {
  min-width: 150px;
  display: grid;
  gap: 4px;
  padding: 6px;
  border-radius: 10px;
  background: var(--chip);
}
.filter-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
}
.filter-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 0;
  background: transparent;
  color: var(--text);
  text-align: left;
  font-size: 13px;
  cursor: pointer;
}
.filter-item:hover, .filter-item.on { background: var(--chip); }
.filter-dates { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 4px; }
.filter-dates input[type="date"] {
  position: relative;
  width: auto;
  min-width: 156px;
  cursor: pointer;
}
/* 点年月日任意位置都触发日历：把原生日历按钮铺满整个输入框 */
.filter-dates input[type="date"]::-webkit-calendar-picker-indicator {
  position: absolute;
  inset: 0;
  width: auto;
  height: auto;
  margin: 0;
  padding: 0;
  cursor: pointer;
  opacity: 0;
}
.filter-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: end; }
.filter-actions label { min-width: 220px; flex: 1; }
.ui-subtabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 8px; }
.ui-pane { display: contents; }
.ui-pane[hidden] { display: none !important; }
label { display: grid; gap: 6px; color: var(--muted); font-size: 13px; }
input, select, textarea {
  width: 100%;
  background: var(--input);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 11px 12px;
}
input::placeholder, textarea::placeholder { color: var(--faint); }
.color-field input[type="color"] { background: var(--input); }
textarea { min-height: 110px; resize: vertical; }
.note { color: var(--faint); font-size: 13px; }

/* 上传剧源 */
.source-panel { margin-bottom: 22px; }
.source-panel h2 { margin: 0 0 6px; font-size: 20px; }
.badge { display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; letter-spacing: 0.02em; }
.badge.local { background: rgba(226, 177, 90, 0.18); color: #e2b15a; }
.badge.link { background: rgba(120, 200, 255, 0.16); color: #8fd0ff; }
.badge.none { background: rgba(255, 120, 100, 0.16); color: #ff9a8a; font-style: normal; }
.upload-bar { display: block; }
.upload-track {
  height: 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  overflow: hidden;
}
.upload-bar i { display: block; height: 10px; width: 0; border-radius: 999px; background: linear-gradient(90deg, var(--accent-2), var(--text)); }
.ui-panel h3 { margin: 10px 0 0; font-size: 16px; }
.ui-presets { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 4px; }
.color-field input[type="color"] {
  width: 100%;
  height: 42px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: transparent;
}
.ui-form input[type="range"] { width: 100%; accent-color: var(--accent); }
.mail-guide h3 { margin: 18px 0 6px; font-size: 16px; }
.mail-guide ol, .mail-guide ul { margin: 6px 0 0; padding-left: 1.3em; color: var(--muted); }
.mail-guide li { margin: 6px 0; line-height: 1.65; }
.mail-guide code { color: var(--text); }
.upload-bar span { display: block; margin-top: 6px; font-size: 13px; color: #f6dfa8; font-variant-numeric: tabular-nums; }

.watch { display: grid; gap: 22px; align-items: start; }
.stage {
  width: min(100%, 380px);
  background: #050505;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: var(--shadow);
}
.stage video { display: block; width: 100%; height: 100%; aspect-ratio: 9 / 16; background: #000; object-fit: cover; }
.player-hint { color: var(--accent-2); }
.playlist { display: grid; gap: 8px; }
.play-item {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 8px;
  padding: 10px;
  border-radius: 12px;
  text-decoration: none;
  background: rgba(255,255,255,0.03);
}
.play-item.on { background: rgba(226, 61, 43, 0.16); }
.idx { color: var(--faint); font-variant-numeric: tabular-nums; }
.watch-actions { flex-wrap: wrap; margin-top: 14px; }

.sheet { display: grid; gap: 12px; }
.sheet-row, .record, .panel {
  position: relative;
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-2);
}
.sheet-row .status { position: static; display: inline-block; margin-bottom: 6px; }
.thumb {
  position: relative;
  display: block;
  aspect-ratio: 9 / 16;
  border-radius: 10px;
  overflow: hidden;
  text-decoration: none;
}
.batch-bar {
  position: sticky;
  bottom: 12px;
  justify-content: space-between;
  margin-top: 16px;
  padding: 12px;
  border-radius: 16px;
  background: var(--batch);
  border: 1px solid var(--line);
  color: var(--text);
}
.batch-bar .btn.ghost { color: var(--text); }
.record, .panel { grid-template-columns: 1fr; }
.record.new { border-color: rgba(226, 61, 43, 0.7); }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 28px; }
.step { padding: 16px; border-radius: 16px; background: rgba(255,255,255,0.03); border: 1px solid var(--line); }
.step b { font-family: var(--serif); font-size: 22px; color: var(--accent-2); }

.metrics { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.metric { padding: 14px; border-radius: var(--radius); background: var(--bg-2); border: 1px solid var(--line); }
.metric b { display: block; font-family: var(--serif); font-size: 32px; }
.admin-tabs { margin: 8px 0 16px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 760px; }
th, td { padding: 10px 8px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; font-size: 14px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-grid .wide { grid-column: 1 / -1; }
.check { display: flex; gap: 8px; align-items: flex-start; color: var(--text); }
.check input { width: auto; margin-top: 4px; }
.linkish { background: none; border: 0; color: var(--accent-2); padding: 0; text-decoration: underline; }
.code-row { display: flex; gap: 8px; align-items: center; }
.code-row input { width: auto; flex: 1; min-width: 0; }
.code-row .btn { width: auto; white-space: nowrap; }
.excel-sample { margin: 14px 0 4px; }
.excel-scroll { overflow-x: auto; border-radius: 12px; background: #fff; }
.excel-scroll img { display: block; width: 100%; min-width: 760px; height: auto; }
.sample-download { margin: 8px 0 0; }
.sample-download a { color: var(--accent-2); }
.pre { white-space: pre-wrap; }
.empty, .loading { padding: 40px 0; color: var(--muted); }
.toast {
  position: fixed;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%);
  z-index: 60;
  max-width: min(520px, calc(100% - 24px));
  padding: 12px 18px;
  border-radius: 999px;
  background: #1a1410;
  color: #fffaf3;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.28);
  font-size: 14px;
  line-height: 1.45;
  text-align: center;
}
html[data-theme="light"] .toast,
html[data-theme="dark"] .toast {
  background: #1a1410;
  color: #fffaf3;
}
.modal-back {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(0,0,0,0.62);
}
.modal {
  width: min(680px, 100%);
  max-height: min(80vh, 760px);
  overflow: auto;
  padding: 22px;
  border-radius: 18px;
  background: var(--bg-2);
  border: 1px solid var(--line);
}
.modal.auth-gate {
  width: min(420px, 100%);
}
.modal.auth-gate .actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}
.nav-user {
  color: var(--muted);
  font-size: 13px;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.nav-desk {
  font-weight: 600;
}
.dot {
  color: var(--accent);
  font-style: normal;
}

@media (max-width: 900px) {
  .filters, .metrics, .steps, .form-grid { grid-template-columns: 1fr; }
  .nav { width: 100%; margin-left: 0; }
  .topbar .wrap { flex-wrap: wrap; padding: 10px 0; }
}
@media (min-width: 800px) {
  .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (min-width: 1100px) {
  .grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
@media (min-width: 960px) {
  .watch { grid-template-columns: 380px 1fr; }
  .playlist { position: sticky; top: 88px; max-height: calc(100vh - 110px); overflow: auto; }
}

/* ---------- 播放页（参考片库卡片视觉） ---------- */
.watch-page { padding: 4px 0 48px; }
.watch-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin: 2px 0 16px;
}
.backlink {
  text-decoration: none;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 13px;
  transition: color .15s ease, border-color .15s ease;
}
.backlink::before { content: "\2190  "; }
.backlink:hover { color: var(--text); border-color: rgba(255,255,255,.3); }
.watch-head .kicker { margin: 0; }

.watch-layout { display: grid; gap: 20px; align-items: start; }
.stage { position: relative; width: 100%; }
.stage-inner {
  position: relative;
  width: min(100%, calc((100vh - 210px) * 0.5625));
  margin: 0 auto;
  aspect-ratio: 9 / 16;
  display: grid;
  place-items: center;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.09);
  background-color: #080706;
  background-size: cover;
  background-position: center;
  box-shadow: var(--shadow);
}
.stage-inner::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(0,0,0,.18), transparent 30%, transparent 58%, rgba(0,0,0,.55));
}
.stage-inner video {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #000;
}
.stage-note {
  position: absolute;
  z-index: 2;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: grid;
  justify-items: center;
  gap: 8px;
  width: min(84%, 260px);
  padding: 16px;
  text-align: center;
  border-radius: 16px;
  background: rgba(12, 10, 9, .92);
  border: 1px solid rgba(255,255,255,.12);
}
.stage-note b { font-size: 14px; font-weight: 600; }
.stage-note span { color: var(--accent-2); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; }
.stage-inner .ribbon { z-index: 3; }
.player-hint { margin: 12px 0 0; font-size: 14px; }
.watch-left .watch-actions { margin-top: 14px; }
.watch-left .watch-actions .btn { flex: 1; text-align: center; }

.watch-info {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-2);
}
.watch-info h1 {
  font-family: var(--serif);
  font-size: clamp(25px, 3vw, 36px);
  line-height: 1.16;
  margin: 0 0 10px;
  letter-spacing: .01em;
}
.info-sub { margin: 0 0 14px; color: var(--muted); font-size: 14px; letter-spacing: .03em; }
.info-synopsis { margin: 0 0 18px; color: var(--text); }
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 0 0 22px; }
.facts > div {
  padding: 10px 12px;
  border-radius: 13px;
  background: rgba(255,255,255,.035);
  border: 1px solid var(--line);
}
.facts dt { color: var(--faint); font-size: calc(var(--font-facts) * 0.8); letter-spacing: .12em; text-transform: uppercase; }
.facts dd { margin: 5px 0 0; font-size: var(--font-facts); }
.ep-heading {
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 500;
  margin: 0 0 10px;
  padding-top: 4px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}
.ep-list { display: grid; gap: 8px; max-height: 340px; overflow: auto; padding-right: 4px; }
.ep {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 8px;
  border-radius: 13px;
  border: 1px solid transparent;
  background: rgba(255,255,255,.025);
  text-decoration: none;
  transition: background .15s ease, border-color .15s ease;
}
.ep:hover { background: rgba(255,255,255,.065); }
.ep.on { border-color: rgba(226,61,43,.6); background: rgba(226,61,43,.14); }
.ep-thumb {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 9 / 16;
  border-radius: 8px;
  overflow: hidden;
  background-size: cover;
  background-position: center;
}
.ep-thumb b { font-family: var(--serif); font-size: 14px; color: #f6f1e7; text-shadow: 0 1px 6px rgba(0,0,0,.85); }
.ep-live {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  font-size: 8px;
  font-style: normal;
  line-height: 1.5;
  text-align: center;
  background: rgba(226,61,43,.92);
  color: #fff;
}
.ep-body { min-width: 0; }
.ep-body strong { display: block; font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ep-body small { color: var(--faint); font-size: 12px; }

/* ---------- 详情卡（参考播放页版式） ---------- */
.info-kicker {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: .22em;
}
.detail-head { display: grid; grid-template-columns: 86px minmax(0, 1fr); gap: 14px; align-items: start; }
.detail-cover {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 9 / 16;
  border-radius: 12px;
  background-size: cover;
  background-position: center;
  border: 1px solid rgba(255,255,255,.1);
  box-shadow: 0 10px 26px rgba(0,0,0,.4);
}
.detail-head h1 {
  font-family: var(--serif);
  font-size: clamp(20px, 2.2vw, 26px);
  line-height: 1.24;
  margin: 0 0 8px;
}
.detail-head .info-sub { margin: 0 0 10px; font-size: 13px; }
.tag-row { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.tag {
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
  letter-spacing: .04em;
}
.tag.on { border-color: rgba(226,61,43,.55); color: #f2c6bf; background: rgba(226,61,43,.12); }

.synopsis-wrap { margin: 16px 0 14px; }
.info-synopsis { margin: 0; color: #ded4c7; line-height: 1.7; font-size: 14px; }
.info-synopsis.clamp {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.more-btn {
  margin-top: 6px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--accent-2);
  font-size: 13px;
  cursor: pointer;
}
.more-btn:hover { text-decoration: underline; }

.detail-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin: 0 0 16px;
}
.detail-bar .pill {
  flex: 1;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,.05);
  border: 1px solid var(--line);
  font-size: 13px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.detail-bar .pill b { color: var(--faint); font-weight: 500; margin-right: 6px; font-size: 11px; letter-spacing: .08em; }
.detail-bar .round {
  flex: none;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.04);
  color: var(--text);
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  text-decoration: none;
}
.detail-bar .round:hover { border-color: rgba(255,255,255,.34); background: rgba(255,255,255,.09); }

.detail-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.detail-title-row > div:first-child { min-width: 0; flex: 1; }
.detail-icons {
  display: flex;
  gap: 8px;
  flex: none;
  padding-top: 2px;
}
.detail-icons .round {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.04);
  color: var(--text);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  text-decoration: none;
}
.detail-icons .round:hover { border-color: rgba(226,61,43,.55); background: rgba(226,61,43,.12); }
.detail-icons .round.heart.on,
.detail-icons .round.heart.on:hover {
  background: #e23d2b;
  border-color: #e23d2b;
  color: #fff;
}
.logo-upload {
  display: grid;
  gap: 10px;
  align-items: start;
}
.logo-upload .logo-preview {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--accent);
  display: grid;
  place-items: center;
}
.logo-upload .logo-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.logo-upload .logo-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.banner-upload .banner-preview {
  width: min(100%, 420px);
  height: auto;
  aspect-ratio: 16 / 9;
  border-radius: 14px;
  background: #111;
}

.card-facts {
  display: grid;
  gap: 4px;
  margin: 8px 0 12px;
  color: var(--text);
  font-size: var(--font-card-meta);
  line-height: 1.55;
}
.card-fact {
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.card-fact-split {
  display: flex;
  gap: 28px;
  align-items: baseline;
  white-space: normal;
}
.card-fact-split span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}
.filter-chips em {
  font-style: normal;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--chip);
  color: var(--text);
}

.facts { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 12px; }
.price-note { margin: 0 0 18px; color: var(--faint); font-size: 11px; letter-spacing: .04em; }
.ep-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}
.ep-heading em { color: var(--faint); font-size: 12px; font-style: normal; letter-spacing: .06em; }
.ep-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(46px, 1fr)); gap: 7px; }
.ep-num {
  position: relative;
  display: grid;
  place-items: center;
  height: 42px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.035);
  color: var(--text);
  font-family: var(--serif);
  font-size: 15px;
  text-decoration: none;
  transition: background .15s ease, border-color .15s ease, transform .15s ease;
}
.ep-num:hover { background: rgba(255,255,255,.09); border-color: rgba(255,255,255,.3); }
.ep-num.on {
  background: var(--accent-2);
  border-color: var(--accent-2);
  color: #1a1408;
  font-weight: 700;
  box-shadow: 0 6px 18px rgba(226,177,90,.28);
}
.ep-dot {
  position: absolute;
  right: 5px;
  bottom: 5px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
}
.ep-dot.inquired { background: var(--ok); }

.stage-close, .stage-nav {
  position: absolute;
  z-index: 4;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(14, 12, 10, .62);
  border: 1px solid rgba(255,255,255,.16);
  color: #f6f1e7;
  font-size: 19px;
  line-height: 1;
  text-decoration: none;
  transition: background .15s ease, border-color .15s ease;
}
.stage-close:hover, .stage-nav:hover { background: rgba(226,61,43,.85); border-color: rgba(226,61,43,.9); }
.stage-close { left: 12px; top: 12px; }
.stage-nav { top: 50%; transform: translateY(-50%); width: 30px; height: 56px; border-radius: 999px; font-size: 22px; }
.stage-nav.prev { left: 8px; }
.stage-nav.next { right: 8px; }

@media (min-width: 960px) {
  .watch-layout { grid-template-columns: minmax(0, 420px) minmax(0, 1fr); gap: 26px; }
  .watch-left { position: sticky; top: 88px; }
  .stage-inner {
    width: min(100%, calc((100vh - 220px) * 9 / 16));
    height: auto;
    max-height: none;
    aspect-ratio: 9 / 16;
  }
}
@media (max-width: 959px) {
  .stage-inner { width: min(100%, 380px); }
  .watch-info { padding: 18px; }
  .ep-grid { grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); }
}
@media (max-width: 760px) {
  .bars { grid-template-columns: repeat(7, minmax(0, 1fr)); height: auto; }
  .bar-col { height: 120px; }
  .kv-grid { grid-template-columns: 1fr; }
  .geo li { grid-template-columns: minmax(0, 1fr) 84px; }
  .geo-track { grid-column: 1 / -1; grid-row: 2; }
}
@media (max-width: 520px) {
  .detail-head { grid-template-columns: 68px minmax(0, 1fr); }
  .facts { grid-template-columns: 1fr 1fr; }
  .watch-info h1 { font-size: var(--font-detail-title); }
}

.landing {
  padding: 18px 0 40px;
}
.land-top {
  display: grid;
  gap: 28px;
  align-items: start;
  padding: 28px 0 18px;
}
.land-top-main { max-width: 640px; }
.land-intro {
  margin: 0;
  padding: 4px 0 0;
  color: var(--muted);
  font-size: var(--font-land-intro);
  line-height: 1.75;
}
.land-intro p { margin: 0; }
.land-intro-en {
  margin-top: 14px !important;
  font-size: 13px;
  line-height: 1.7;
  opacity: 0.92;
}
.land-contact {
  margin: 0;
  padding: 4px 0 0;
  color: var(--text);
}
.land-contact h3 {
  margin: 0 0 12px;
  font-family: var(--serif);
  font-size: var(--font-land-contact-title);
  font-weight: 600;
}
.land-contact p {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: var(--font-land-contact);
  line-height: 1.65;
  display: grid;
  grid-template-columns: 3em 1fr;
  gap: 8px;
}
.land-contact p span { color: var(--faint); }
.land-contact a { color: inherit; text-decoration: none; }
.land-contact a:hover { color: var(--accent); text-decoration: underline; }
@media (min-width: 960px) {
  .land-top {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    gap: 40px;
  }
  .land-intro, .land-contact { padding-top: 8px; }
}
.land-theme {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 18px;
}
.land-top h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(calc(var(--font-land-title) * 0.7), 5vw, var(--font-land-title));
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--text);
}
.land-sub {
  margin: 16px 0 0;
  max-width: 640px;
  color: var(--muted);
  font-size: var(--font-land-sub);
  line-height: 1.7;
}
.land-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}
.land-cta {
  border-radius: 12px;
  padding: 12px 18px;
}
.land-actions .btn.ghost {
  background: var(--bg-2);
  border-color: rgba(23, 20, 17, 0.18);
  color: var(--text);
}
html[data-theme="dark"] .land-actions .btn.ghost {
  background: transparent;
  border-color: rgba(246, 239, 230, 0.22);
}
.home-videos { margin: 28px 0 36px; }
.land-figure {
  position: relative;
  display: block;
  margin: 34px 0 42px;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  text-decoration: none;
  color: #fff;
  box-shadow: var(--shadow);
  background: #111;
}
.land-figure img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}
.land-figure span {
  position: absolute;
  left: 16px;
  bottom: 16px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.55);
  font-size: 13px;
}
.land-figure:hover span { background: rgba(139, 30, 30, 0.9); }
.land-bottom {
  display: grid;
  gap: 28px;
  margin-bottom: 36px;
}
.land-bottom-flow {
  grid-template-columns: 1fr;
}
.land-flow h2 {
  margin: 0 0 14px;
  font-family: var(--serif);
  font-size: clamp(calc(var(--font-section) * 0.75), 3.4vw, var(--font-section));
  line-height: 1.15;
}
.land-steps {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}
.land-step {
  display: grid;
  gap: 6px;
  justify-items: center;
  text-align: center;
  padding: 14px 8px;
  border-radius: 14px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  min-height: 108px;
}
.land-step b {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: #fff;
  font-size: 15px;
}
.land-step strong {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}
.land-step span {
  font-size: 12px;
  color: var(--muted);
}
.land-close {
  display: grid;
  gap: 28px;
  align-items: start;
  padding: 36px 0 40px;
  margin: 12px 0 4px;
}
.land-close-main {
  max-width: 640px;
}
@media (min-width: 960px) {
  .land-close {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    gap: 40px;
  }
  .land-close .land-intro { padding-top: 8px; }
}
.land-close h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(calc(var(--font-land-title) * 0.65), 4.2vw, calc(var(--font-land-title) * 0.95));
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--text);
  font-weight: 600;
}
.land-close .land-sub {
  margin-top: 16px;
  max-width: 560px;
}
.land-close .land-actions {
  margin-top: 26px;
  gap: 14px;
}
.land-close .land-cta {
  min-width: 200px;
  justify-content: center;
  text-align: center;
}
.land-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}
.land-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.land-brand .mark {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: #fff;
  font-family: var(--serif);
  flex: 0 0 auto;
}
.land-brand b {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}
.land-foot small {
  color: var(--muted);
  font-size: 12px;
}
.nav-theme { margin-left: 2px; }
@media (min-width: 960px) {
  .land-bottom:not(.land-bottom-flow) {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: 40px;
    align-items: start;
  }
}
@media (max-width: 760px) {
  .land-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
  .land-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .land-top { padding-top: 12px; }
}


.card .meta strong, .meta strong { font-size: var(--font-card-title); }
.info-synopsis, .watch-info .info-sub { font-size: var(--font-detail-body); }

.font-size-field select,
.ui-form select[name="font_sans"],
.ui-form select[name="font_serif"] {
  width: 100%;
  max-width: 420px;
}
