:root {
  --bar: #3f3c3a;
  --sub: #6b6562;
  --ink: #333;
  --muted: #8a847c;
  --line: #ece7e2;
  --bg: #f4f4f4;
  --card: #fff;
  --pink: #fff7f5;
  --pink-line: #f3ddd4;
  --orange: #f08a2a;
  --green: #21a35a;
  --green-bg: #e9f8ee;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font: 14px/1.5 "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
.wrap { width: min(1180px, calc(100% - 24px)); margin: 0 auto; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.bar { background: var(--bar); color: #fff; }
.bar-inner { display: flex; align-items: center; gap: 16px; min-height: 58px; }
.logo {
  flex: none; color: #fff; font-size: 22px; font-weight: 700; letter-spacing: .02em;
}
.logo::before {
  content: "";
  display: inline-block; width: 22px; height: 22px; margin-right: 8px; vertical-align: -4px;
  background: var(--orange); border-radius: 5px;
  clip-path: polygon(28% 18%, 28% 82%, 80% 50%);
}
.nav { display: flex; align-items: center; gap: 2px; min-width: 0; }
.nav > a, .nav-item > a { color: #f3f0ec; padding: 8px 10px; border-radius: 4px; white-space: nowrap; }
.nav > a.on, .nav-item > a.on, .nav > a:hover, .nav-item > a:hover { background: rgba(255,255,255,.12); }
.nav-item { position: relative; }
.sub {
  display: none; position: absolute; top: 100%; left: 0; z-index: 5; min-width: 128px;
  background: #fff; color: var(--ink); border: 1px solid var(--line); padding: 6px; box-shadow: 0 8px 24px rgba(0,0,0,.12);
}
.sub a { display: block; padding: 6px 8px; }
.sub a:hover { color: var(--orange); }
.nav-item:hover .sub, .nav-item:focus-within .sub { display: block; }
.search { margin-left: auto; display: flex; background: #fff; border-radius: 18px; overflow: hidden; flex: none; }
.search input { width: 230px; border: 0; padding: 7px 12px; outline: none; color: var(--ink); }
.search button { border: 0; background: transparent; color: #888; padding: 0 12px; cursor: pointer; }
.head-btn { flex: none; border-radius: 16px; padding: 6px 12px; }
.head-btn.ghost { color: #fff; border: 1px solid rgba(255,255,255,.45); }
.head-btn.solid { background: #221f1d; color: #fff; }
.subbar { background: var(--sub); color: #fff; }
.subbar-inner { display: flex; justify-content: space-between; align-items: center; min-height: 36px; }
.horn::before { content: "📢 "; }
.counts b { font-weight: 700; margin-right: 4px; }
.dot { margin: 0 10px; opacity: .6; }
main { flex: 1; padding: 16px 0 40px; }
.info-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 14px; margin-bottom: 16px; }
.panel { background: var(--pink); border: 1px solid var(--pink-line); border-radius: 6px; padding: 14px 16px; }
.panel h2, .sec-title { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font-size: 16px; font-weight: 700; }
.panel h2::before, .sec-title span::before {
  content: ""; width: 8px; height: 8px; background: var(--orange); display: inline-block;
}
.panel p { margin: 0; color: #666; }
.api-row { display: grid; grid-template-columns: 148px 1fr auto; gap: 8px; align-items: center; margin-top: 8px; }
.api-row span { color: #888; }
.api-row code {
  display: block; background: #fff; border: 1px solid #f0e0d8; border-radius: 4px; padding: 6px 8px;
  color: #555; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.api-row button, .chips a, .eps a, .pager a, .pager .on {
  border: 1px solid #e4ddd6; background: #fff; color: #666; border-radius: 4px; padding: 4px 8px; cursor: pointer;
}
.sec-title { margin: 14px 0 8px; }
.sec-title em {
  font-style: normal; color: #fff; background: #ff5a6a; border-radius: 8px; font-size: 11px; padding: 1px 6px;
}
.sec-title small { color: var(--muted); font-weight: 400; }
.sheet { background: var(--card); border: 1px solid var(--line); border-radius: 4px; overflow: auto; }
.slist { width: 100%; border-collapse: collapse; }
.slist th { background: #5c5754; color: #fff; font-weight: 600; text-align: left; padding: 10px 12px; }
.slist td { padding: 10px 12px; border-bottom: 1px solid #f2eeea; vertical-align: middle; }
.slist tr:hover td { background: #fffaf7; }
.vname { display: flex; align-items: center; gap: 10px; color: #3a342e; font-weight: 600; }
.vname:hover { color: var(--orange); }
.thumb {
  width: 36px; height: 48px; flex: none; border-radius: 3px; overflow: hidden;
  display: grid; place-items: center; color: #fff; font-weight: 700;
  background: linear-gradient(160deg, hsl(var(--hue) 42% 48%), hsl(calc(var(--hue) + 24) 36% 32%));
}
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb.lg { width: 92px; height: 124px; font-size: 32px; }
.state { display: inline-block; background: var(--green-bg); color: var(--green); border-radius: 3px; padding: 2px 8px; font-size: 12px; }
.muted, .time, .tagline, .cast { color: var(--muted); }
.time::before { content: "◷ "; }
.chips, .eps { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 12px; }
.chips a.on, .eps a.on, .pager .on { background: var(--orange); border-color: var(--orange); color: #fff; }
.pager { display: flex; gap: 6px; margin-top: 12px; }
.detail { background: #fff; border: 1px solid var(--line); border-radius: 4px; padding: 16px; }
.detail-head { display: flex; gap: 16px; }
.detail h1 { margin: 0 0 8px; font-size: 26px; }
.detail-meta, .cast, .tagline { display: flex; flex-wrap: wrap; gap: 10px; margin: 6px 0; }
.block { margin-top: 16px; }
.prose { background: #fff; border: 1px solid var(--line); border-radius: 4px; padding: 12px 16px; }
.prose p { margin: 0; }
.stage { background: #111; min-height: 240px; display: grid; place-items: center; }
.stage video, .stage iframe { width: 100%; height: min(72vh, 640px); max-height: 640px; border: 0; background: #000; }
.flash { background: var(--green-bg); color: var(--green); padding: 8px 12px; margin: 0 0 12px; }
.err { background: #fff1f0; color: #a33; padding: 8px 12px; border-radius: 6px; }
.err p { margin: 0; }
.err p + p { margin-top: 4px; }
.auth-wrap { display: flex; justify-content: center; padding: 36px 0 12px; }
.auth {
  width: min(420px, 100%);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 28px 28px 22px;
  display: grid;
  gap: 14px;
  box-shadow: 0 10px 28px rgba(63, 60, 58, .06);
}
.auth h1, .plan h2 { margin: 0; }
.auth h1 { font-size: 24px; }
.auth-note { margin: -6px 0 0; color: var(--muted); }
.auth label { display: grid; gap: 6px; color: #666; font-size: 13px; }
.auth input {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  border: 1px solid #e6dfd8;
  border-radius: 8px;
  background: #faf8f6;
}
.auth input:focus { outline: none; border-color: var(--orange); background: #fff; }
.auth button, .pay-row button {
  height: 42px;
  background: var(--orange);
  color: #fff;
  border: 0;
  border-radius: 8px;
  padding: 0 14px;
  cursor: pointer;
  font-weight: 600;
}
.auth .switch { margin: 0; text-align: center; color: var(--muted); }
.auth .switch a { color: var(--orange); }
.plan-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 320px)); gap: 16px; margin-top: 16px; }
.plan {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 22px 20px 18px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 8px 24px rgba(63, 60, 58, .05);
}
.plan h2 { font-size: 18px; }
.plan .price { font-size: 34px; line-height: 1.1; color: var(--orange); font-weight: 700; margin: 10px 0 4px; }
.plan .price small { font-size: 16px; margin-right: 2px; }
.plan .meta { margin: 0 0 16px; color: var(--muted); }
.pay-note { margin: auto 0 8px; color: var(--muted); font-size: 12px; }
.pay-row { display: grid; gap: 8px; }
.pay-row form { margin: 0; }
.pay-row button { width: 100%; }
.pay-row button.alipay { background: #1677ff; }
.pay-row button.wxpay { background: #21a35a; }
.pay-row button.usdt { background: #3f3c3a; }
.account { display: grid; gap: 12px; }
.account .panel p { margin: 0 0 8px; }
.keyline {
  background: #fff;
  border: 1px solid #f0e0d8;
  border-radius: 8px;
  padding: 10px 12px;
  margin: 0 0 12px;
}
.keyline code { color: #555; overflow-wrap: anywhere; }
.account-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.account-actions form { margin: 0; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 36px; background: var(--orange); color: #fff; border: 0; border-radius: 8px; padding: 0 14px; cursor: pointer; font: inherit; text-decoration: none; }
.btn.ghost { background: #fff; color: #5c5754; border: 1px solid #e4ddd6; }
.btn.quiet { background: transparent; color: #8a847c; border: 1px solid #e4ddd6; }
.btn.ghost:hover, .btn.quiet:hover { border-color: var(--orange); color: var(--orange); }
.stage-note, .empty { color: var(--muted); padding: 16px; }
.back { margin: 0 0 8px; }
.back a { color: var(--orange); }
.specs { display: grid; gap: 12px; }
.specs article, .table-wrap { background: #fff; border: 1px solid var(--line); border-radius: 4px; padding: 14px; }
.specs h2 { margin: 0 0 6px; }
.specs code, .table-wrap code { color: #a15a22; overflow-wrap: anywhere; }
.table-wrap table { width: 100%; border-collapse: collapse; }
.table-wrap th, .table-wrap td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); }
.foot { color: var(--muted); padding: 16px 0 20px; font-size: 12px; text-align: center; }
:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }
@media (max-width: 900px) {
  .bar-inner { flex-wrap: wrap; padding: 8px 0; }
  .search, .search input { width: 100%; }
  .search { order: 5; margin-left: 0; }
  .info-grid, .api-row, .detail-head { grid-template-columns: 1fr; display: grid; }
  .nav { order: 4; width: 100%; overflow-x: auto; }
  .sub { display: none !important; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto; } }
