/* =====================================================================
   Bangumi 简洁前端 — 设计系统
   风格：以文字、图片与留白为主，克制的排版，弱化容器边界。
   ===================================================================== */

:root {
  --paper: #fcfbf9;
  --paper-2: #f4f2ec;
  --ink: #1a1a1a;
  --ink-soft: #444240;
  --muted: #8f8d87;
  --faint: #b7b4ad;
  --line: #e7e4dc;
  --line-strong: #d8d4ca;
  --accent: #c14a68;
  --accent-soft: #f0dbe0;

  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Songti SC",
    "Noto Serif CJK SC", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;

  --w: 1080px;

  /* 页面标题区间距：kicker 与标题贴近，标题与下方内容拉开 */
  --gap-kicker: 6px;
  --gap-title: 20px;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.75;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.15s ease, border-color 0.15s ease;
}

a:hover {
  color: var(--accent);
}

img {
  display: block;
  max-width: 100%;
}

.wrap {
  max-width: var(--w);
  margin: 0 auto;
  padding: 0 32px;
}

/* ---------- 页头 ---------- */
.site-head {
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: rgba(252, 251, 249, 0.92);
  backdrop-filter: saturate(180%) blur(8px);
  z-index: 50;
}

.site-head .wrap {
  display: flex;
  align-items: center;
  gap: 32px;
  height: 62px;
}

.brand {
  position: relative;
  display: block;
  flex-shrink: 0;
  width: 193px;
  height: 60px;
}
.brand .brand-icon {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 58px;
  height: 58px;
  display: block;
}
.brand .brand-word {
  position: absolute;
  top: 8px;
  right: 0;
  width: 126px;
  height: 37px;
  display: block;
}
.brand:hover .brand-icon,
.brand:hover .brand-word { opacity: 0.85; }

.site-nav {
  display: flex;
  gap: 26px;
  font-size: 14.5px;
  color: var(--muted);
  flex: 1;
  flex-wrap: wrap;
}

.site-nav a.active {
  color: var(--ink);
}

/* 移动端导航按钮（默认隐藏） */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 34px;
  height: 34px;
  padding: 6px;
  border: 0;
  background: none;
  cursor: pointer;
  margin-left: auto;
}
.nav-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--ink);
  border-radius: 2px;
  transition: transform .2s, opacity .2s;
}

/* 移动端搜索图标（默认隐藏，桌面用完整搜索框） */
.head-search-icon {
  display: none;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 8px;
}
.head-search-icon img { width: 100%; height: 100%; object-fit: contain; }

.head-search {
  margin-left: auto;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--line-strong);
}

.head-search input {
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 14px;
  padding: 4px 6px;
  width: 150px;
  outline: none;
  color: var(--ink);
}

.head-search button {
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 14px;
  padding: 4px 2px;
}

.head-search button:hover {
  color: var(--accent);
}

/* 页头用户头像 + 悬浮菜单 */
.head-token {
  background: none;
  border: 0;
  font: inherit;
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
  padding: 4px 8px;
  white-space: nowrap;
}
.head-token:hover { color: var(--accent); }
.head-user {
  position: relative;
  display: flex;
  align-items: center;
}
.head-avatar {
  display: block;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--paper-2);
  border: 1px solid var(--line);
}
.head-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.head-menu {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 4px;
  min-width: 132px;
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  padding: 6px;
  display: none;
  flex-direction: column;
  gap: 2px;
  z-index: 60;
}
.head-user:hover .head-menu { display: flex; }
.head-menu::before {
  content: "";
  position: absolute;
  top: -4px;
  right: 0;
  left: 0;
  height: 4px;
}
.head-menu a,
.head-menu button {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: 0;
  font: inherit;
  font-size: 13.5px;
  color: var(--ink-soft);
  padding: 7px 12px;
  border-radius: 5px;
  cursor: pointer;
}
.head-menu a:hover,
.head-menu button:hover {
  background: var(--paper-2);
  color: var(--accent);
}

/* ---------- 通用排版 ---------- */
.page {
  padding: 52px 0 96px;
}

.kicker {
  font-size: 12.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--faint);
  margin: 0 0 var(--gap-kicker);
}

/* 页面标题区：kicker 紧贴标题，标题与下方内容拉开距离（全站复用） */
.kicker + h1.title { margin-bottom: var(--gap-title); }

h1.title {
  font-family: var(--serif);
  font-size: 40px;
  line-height: 1.2;
  font-weight: 600;
  margin: 0 0 6px;
  letter-spacing: 0;
}

.subtitle {
  color: var(--muted);
  font-size: 17px;
  margin: 0 0 4px;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 10px;
  margin: 52px 0 18px;
}

.section-head h2 {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 600;
  margin: 0;
}

.section-head .more {
  font-size: 13.5px;
  color: var(--muted);
}
.section-head .more:hover { color: var(--accent); }

/* 消除 section-head 下边距与首个列表项上内边距叠加的大间隙 */
.section-head + .entry-list > .entry:first-child,
.rule-head + .entry-list > .entry:first-child,
.section-head + .comment,
.rule-head + .comment,
.section-head + .topic,
.rule-head + .topic { padding-top: 2px; }

/* 首页：跨两栏说明块 */
.home-note {
  margin: 0 0 8px;
  padding: 14px 18px;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 13.5px;
  line-height: 1.75;
  color: var(--ink-soft);
}
.home-note p { margin: 0; }
.home-note p + p { margin-top: 4px; }
.home-note a { color: var(--accent); text-decoration: none; }
.home-note a:hover { text-decoration: underline; }

/* 首页：热门分组标题 */
.trend-group { margin-bottom: 22px; }
.trend-group-label {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 16px;
  margin-bottom: 12px;
  color: var(--ink);
}

/* 首页：进度管理块 */
.progress-manage {
  margin-top: 44px;
}
.progress-manage .section-head { margin-top: 0; }
.pm-desc {
  color: var(--muted);
  font-size: 13.5px;
  margin: 0 0 14px;
  line-height: 1.7;
}
.pm-login {
  background: var(--accent);
  color: #fff;
  border: 0;
  border-radius: 4px;
  padding: 7px 18px;
  cursor: pointer;
  font: inherit;
  font-size: 13.5px;
}

/* 日志作者行：头像左、昵称/信息右，标签靠最右 */
.blog-byline {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 12px 0 22px;
}
.bb-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  object-position: top;
  background: var(--paper-2);
}
.bb-name { font-size: 14.5px; font-weight: 600; }
.bb-meta { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.blog-tags { margin-left: auto; margin-top: 0; justify-content: flex-end; }

/* 个人页：各题材收藏头 */
.user-coll-heads {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 24px;
  margin: 24px 0 6px;
}
.uc-slot { display: block; }
.uc-slot.active { color: var(--ink); }
.uc-slot.active .uc-name { border-bottom: 2px solid var(--accent); display: inline-block; padding-bottom: 3px; }
/* 个人页：各题材收藏块 */
.uc-cols { display: grid; grid-template-columns: 2fr 1fr; gap: 20px 48px; }
.uc-col { min-width: 0; }
.uc-block { margin-bottom: 30px; }
.uc-block .section-head { margin-top: 0; margin-bottom: 14px; }
.uc-block .section-head h2 { font-size: 17px; }
.uc-block .uc-stat { font-size: 12.5px; }
.uc-block .uc-stat:hover { color: var(--muted); }
.uc-block .uc-stat a { color: var(--muted); }
.uc-block .uc-stat a:hover { color: var(--accent); }

/* 个人页：在看/看过行 */
.user-row { margin-bottom: 12px; }
.ur-label {
  display: block;
  font-size: 12.5px;
  color: var(--accent);
  margin-bottom: 8px;
}
.user-row .poster-grid {
  grid-template-columns: repeat(4, 1fr);
}

/* bio 外框 + 时间线 */
.bio-box {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 14px;
  margin: 12px 0 4px;
  font-size: 14px;
  line-height: 1.65;
  color: var(--ink-soft);
  max-width: 48em;
  white-space: normal;
  word-break: break-word;
}
.user-timeline { display: flex; flex-direction: column; gap: 4px; }

.about-box {
  max-width: 48em;
  font-size: 15px;
  line-height: 1.9;
  color: var(--ink-soft);
  margin-top: 16px;
}
.about-box p { margin: 0 0 14px; }
.about-box a { color: var(--accent); }
.about-box a:hover { text-decoration: underline; }

/* 个人页：网络服务方块 badge */
.network_service {
  list-style: none;
  margin: 8px 0 24px;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
}
.network_service li { display: inline-flex; align-items: center; gap: 6px; }
.ns-badge {
  font-size: 12px;
  color: #fff;
  padding: 2px 8px;
  border-radius: 3px;
  font-weight: 500;
}
.ns-tip { font-size: 12.5px; color: var(--muted); }
.ns-tip a { color: var(--ink-soft); }
.ns-tip a:hover { color: var(--accent); }
.ut-item {
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--ink-soft);
  padding: 2px 0;
}
.ut-subj { color: var(--accent); font-weight: 600; }
.ut-subj:hover { text-decoration: underline; }
.ut-time { color: var(--muted); }

/* 个人页侧栏：紧凑头像网格 */
.uf-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 9px 10px;
}
.uf-cell {
  display: block;
  aspect-ratio: 1;
  border-radius: 4px;
  overflow: hidden;
}
.uf-cell img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  background: var(--paper-2);
}

/* 分隔线标题（更轻） */
.rule-head {
  font-size: 13px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--faint);
  border-bottom: 1px solid var(--line);
  padding-bottom: 8px;
  margin: 40px 0 20px;
}

/* ---------- 评分数字 ---------- */
.score {
  font-family: var(--serif);
  font-weight: 600;
  color: var(--accent);
  font-variant-numeric: lining-nums;
}

/* ---------- 条目行（文字优先，无卡片） ---------- */
.entry-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.entry {
  display: flex;
  gap: 20px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
  align-items: flex-start;
}

.entry:last-child {
  border-bottom: 0;
}

.entry .thumb {
  width: 64px;
  min-width: 64px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  background: var(--paper-2);
  filter: saturate(0.96);
}

.entry .body {
  flex: 1;
  min-width: 0;
}

.entry .name {
  font-size: 17.5px;
  font-weight: 600;
  line-height: 1.4;
}

.entry .name .cn {
  color: var(--muted);
  font-weight: 400;
  font-size: 14.5px;
  margin-left: 8px;
}

.entry .meta {
  color: var(--muted);
  font-size: 13.5px;
  margin-top: 4px;
}

.entry .desc {
  color: var(--ink-soft);
  font-size: 14px;
  margin-top: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.entry .aside {
  text-align: right;
  min-width: 56px;
  color: var(--muted);
  font-size: 13px;
}

.entry .aside .score {
  font-size: 21px;
  display: block;
}
.entry .aside .rank {
  font-size: 12px;
  color: var(--faint);
  display: block;
  margin-top: 4px;
}

/* ---------- 图文网格（放送/浏览缩略） ---------- */
.poster-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(128px, 1fr));
  gap: 30px 24px;
}

.poster {
  display: block;
}

.poster img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  background: var(--paper-2);
}

.poster .p-name {
  font-size: 14px;
  font-weight: 600;
  margin-top: 9px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.poster .p-meta {
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 2px;
}
.poster .p-rate { color: var(--accent); }

/* 收藏列表页 */
.coll-tabs { margin-top: 18px; }
.coll-grid { margin-top: 20px; }
.coll-list { margin-top: 12px; }
.coll-entry .name a { color: var(--ink); }
.coll-entry .name a:hover { color: var(--accent); }
.my-line {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 6px;
  font-size: 13px;
}
.my-line .my-rate { color: var(--accent); font-weight: 600; }
.my-line .my-date { color: var(--faint); }
.my-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.my-tag {
  font-size: 11.5px;
  color: var(--muted);
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 1px 8px;
}
.my-comment {
  font-size: 13.5px;
  color: var(--ink-soft);
  margin-top: 8px;
  line-height: 1.6;
  white-space: pre-wrap;
}

/* 小组列表卡片（侧栏） */
.grp-list { display: flex; flex-direction: column; }
.grp-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}
.grp-card:last-child { border-bottom: 0; }
.grp-card img {
  width: 40px;
  height: 40px;
  min-width: 40px;
  border-radius: 5px;
  object-fit: cover;
  background: var(--paper-2);
}
.grp-info { min-width: 0; }
.grp-name {
  font-size: 13.5px;
  color: var(--ink);
  font-weight: 600;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.grp-card:hover .grp-name { color: var(--accent); }
.grp-meta {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

/* 人物 / 角色 头像网格：一排四个，左图右文 */
.mono-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 26px 22px;
  text-align: left;
  list-style: none;
  margin: 0;
  padding: 0;
}

.mono {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 10px;
}

.mono .thumbTip {
  flex: 0 0 auto;
  display: block;
}

.mono .avatarNeue {
  display: block;
  width: 56px;
  height: 56px;
  background-size: cover;
  background-position: top center;
  background-repeat: no-repeat;
  border-radius: 3px;
  background-color: var(--paper-2);
}

.mono .inner {
  min-width: 0;
  flex: 1;
}

/* 旧版 .mono 结构（关联角色 / 制作人员列表）：img + m-name + m-sub */
.mono > img {
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  min-width: 48px;
  object-fit: cover;
  object-position: top;
  border-radius: 3px;
  background: var(--paper-2);
}
.mono .m-name {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.35;
}
.mono .m-sub {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
  line-height: 1.4;
}

.mono .title {
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.35;
  margin: 0;
}

.mono .info {
  margin-top: 2px;
}

.mono .info p {
  margin: 0;
}

.mono .badge_job {
  font-size: 12px;
  color: var(--muted);
}

.mono .badge_actor {
  font-size: 12px;
  color: var(--ink-soft);
  margin-top: 1px;
}
.mono .badge_actor a { color: var(--ink-soft); }
.mono .badge_actor a:hover { color: var(--accent); }

/* 收藏管理面板 */
.coll-ctrl { margin: 14px 0 0; font-size: 13px; }
.coll-toggle {
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  padding: 6px 18px;
  border-radius: 5px;
}
.coll-toggle:hover { opacity: .9; }
.coll-form {
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 420px;
  background: var(--paper);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.06);
}
.coll-form-head {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.coll-row { display: flex; align-items: center; gap: 12px; }
.coll-row-full { align-items: flex-start; }
.coll-row-full { margin-top: 10px; }
.coll-row label { font-size: 13px; color: var(--muted); min-width: 42px; }
.coll-row select,
.coll-row input,
.coll-row textarea {
  flex: 1;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  padding: 6px 10px;
  font: inherit;
  font-size: 13px;
  outline: none;
  background: var(--paper);
  color: var(--ink);
}
.coll-row select:focus,
.coll-row input:focus,
.coll-row textarea:focus { border-color: var(--accent); }
.coll-row textarea { resize: vertical; line-height: 1.5; }
.coll-field { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.coll-field input {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  padding: 6px 10px;
  font: inherit;
  font-size: 13px;
  outline: none;
  background: var(--paper);
  color: var(--ink);
}
.coll-field input:focus { border-color: var(--accent); }
.coll-hint { font-size: 11.5px; color: var(--faint); }
.coll-states { display: flex; flex-wrap: wrap; gap: 8px; flex: 1; }
.coll-state {
  border: 1px solid var(--line-strong);
  background: var(--paper);
  color: var(--ink-soft);
  border-radius: 5px;
  padding: 5px 14px;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  transition: all .12s;
}
.coll-state:hover { border-color: var(--accent); color: var(--accent); }
.coll-state.on { border-color: var(--accent); background: var(--accent); color: #fff; }
.coll-stars {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1;
}
.coll-star {
  font-size: 22px;
  line-height: 1;
  color: var(--line-strong);
  cursor: pointer;
  transition: color .1s;
}
.coll-star:hover,
.coll-star.on { color: var(--accent); }
.coll-stars-label {
  margin-left: 10px;
  font-size: 13px;
  color: var(--accent);
  font-weight: 600;
}
.coll-check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--ink-soft);
  cursor: pointer;
}
.coll-check input {
  width: 15px;
  height: 15px;
  margin: 0;
  accent-color: var(--accent);
  cursor: pointer;
}
.coll-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 4px;
}
.coll-cancel {
  background: none;
  color: var(--muted);
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  padding: 6px 16px;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}
.coll-cancel:hover { color: var(--ink); border-color: var(--muted); }
.coll-submit {
  background: var(--accent);
  color: #fff;
  border: 0;
  border-radius: 5px;
  padding: 6px 18px;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}
.coll-submit:hover { opacity: .9; }

/* ---------- 条目概览页（重构） ----------
 * 单列布局：封面右移进入 sg-head，评分与吐槽合并为一块，
 * infobox 核心字段胶囊化。移除独立左栏与 sg-infobox 栅格区。
 */
.subject-grid {
  display: block;
  margin-top: 4px;
}
.sg-head {
  display: flex;
  gap: 40px;
  align-items: flex-start;
  min-width: 0;
}
.sg-head-main {
  flex: 1;
  min-width: 0;
}
.sg-head h1.title { margin-top: 0; }
.sg-head .subtitle { margin-top: 2px; }
.sg-cover {
  flex: 0 0 auto;
  width: 220px;
  order: 1;
}
.sg-head-main { order: 2; }
.sg-cover .cover img {
  width: 100%;
  object-fit: cover;
  background: var(--paper-2);
}

/* 核心字段（infobox pin-key + 链接），胶囊样式，放在评分位置 */
.sg-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 26px;
  margin: 14px 0 0;
  align-items: baseline;
}
.sg-facts .fact {
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
  font-size: 13.5px;
}
.sg-facts .fact .k {
  background: var(--accent-soft);
  color: var(--accent);
  padding: 1px 9px;
  border-radius: 999px;
  font-size: 12px;
  white-space: nowrap;
}
.sg-facts .fact .v {
  color: var(--ink-soft);
  word-break: break-word;
}
.sg-facts .fact.link {
  flex-basis: 100%;
  gap: 0;
}
.sg-facts .fact.link .v a { color: var(--accent); }
.sg-facts .fact.link .v a:hover { text-decoration: underline; }

/* 子页返回链接（条目角色/制作人员全列表等） */
.sub-back {
  margin: -8px 0 22px;
  font-size: 13px;
}
.sub-back a { color: var(--muted); text-decoration: none; }
.sub-back a:hover { color: var(--accent); }

/* 相关链接独立一行（第三行） */
.sg-facts.fact-link-line {
  flex-basis: 100%;
  gap: 1px;
  font-size: 13.5px;
}
.sg-facts.fact-link-line a {
  color: var(--accent);
  text-decoration: none;
}
.sg-facts.fact-link-line a:hover { text-decoration: underline; }

.sg-main { min-width: 0; margin-top: 8px; }
.sg-main .section-head:first-of-type { margin-top: 30px; }

/* 编辑历史行（最近更新于{日期} · 版本历史） */
.edit-history {
  margin-top: 12px;
  font-size: 12.5px;
  color: var(--faint);
  display: flex;
  align-items: baseline;
  gap: 4px;
  flex-wrap: wrap;
}
.edit-history a {
  color: var(--accent);
  text-decoration: none;
}
.edit-history a:hover { text-decoration: underline; }

/* 评分 + 吐槽 合并板块 */
.sg-rate-cmts .section-head h2 { display: inline; }
.sg-rate-cmts .rating-block {
  margin: 4px 0 6px;
}

/* 关联条目：小封面，移动端多栏 */
.poster-grid.rel { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 20px 16px; }
@media (max-width: 640px) {
  .poster-grid.rel { grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 12px 10px; }
  .poster-grid.rel .poster .p-name { font-size: 12.5px; -webkit-line-clamp: 2; }
}

/* 标签：meta_tags 特殊标记 */
.tags a.meta {
  background: var(--accent-soft);
  color: var(--accent);
  padding: 1px 8px;
  border-radius: 3px;
}
.tags a.meta::before { content: ""; margin: 0; }

/* 侧栏：目录列表 */
.rule-more {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.rule-more .more {
  font-family: var(--sans);
  letter-spacing: 0;
  text-transform: none;
  font-size: 12px;
  color: var(--muted);
}
.rule-more .more:hover { color: var(--accent); }
.side-list { display: flex; flex-direction: column; gap: 2px; }
.side-index {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 12.5px;
  padding: 5px 0;
  border-bottom: 1px dotted var(--line);
  color: var(--ink-soft);
}
.side-index .t {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.side-index .c { color: var(--faint); flex-shrink: 0; }

/* 侧栏：谁在看头像 */
.collect-avatars {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.collect-avatars img {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
  object-position: top;
  background: var(--paper-2);
}
@media (max-width: 860px) {
  .sg-head {
    flex-direction: column;
    gap: 20px;
  }
  .sg-head-main { order: 1; }
  .sg-cover {
    order: 2;
    width: 180px;
    margin: 0 auto;
  }
  .sg-head h1.title { text-align: center; }
  .sg-head .subtitle { text-align: center; }
  .sg-head .detail-meta { text-align: center; }
  .sg-head .collection-stats { text-align: center; }
  .sg-facts { justify-content: center; }
  .sg-main { margin-top: 22px; }

  /* 条目概览：评分块居左，评论不溢出 */
  .sg-rate-cmts .rating-block { justify-content: flex-start; }
  .collection-stats { text-align: center; }

  /* 通用图文网格窄屏自适应 */
  .poster-grid:not(.rel):not(.mini):not(.cal-mini) {
    grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
    gap: 18px 12px;
  }
  .ep-list { columns: 1; }
  .comment .c-text { font-size: 14px; }

  /* 浏览页：筛选移到结果上方，年份筛选紧凑 */
  .browse-grid { grid-template-columns: 1fr; grid-template-areas: "head" "filters" "results"; column-gap: 0; }
  .side-filters { margin-top: 0; }
  .browse-results { margin-top: 18px; }
  .side-filters .fg-opts { gap: 6px 10px; }
  .side-filters .fg-opts a { font-size: 12px; }
  .filter-bar { gap: 8px 12px; }
  .pager { gap: 16px; font-size: 13px; flex-wrap: wrap; }
}
.detail-head {
  display: flex;
  gap: 40px;
  align-items: flex-start;
}

.detail-head .cover {
  width: 220px;
  min-width: 220px;
}

.detail-head .cover img {
  width: 100%;
  object-fit: cover;
  object-position: top;
  background: var(--paper-2);
}

.detail-head .info {
  flex: 1;
  min-width: 0;
}

.detail-meta {
  color: var(--muted);
  font-size: 14px;
  margin: 10px 0 0;
}

.collection-stats {
  color: var(--muted);
  font-size: 13px;
  margin: 8px 0 0;
}

.rating-block {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 18px 0 4px;
}

/* 半星评分条 */
.star-bar {
  position: relative;
  display: inline-block;
  font-size: 15px;
  letter-spacing: 2px;
  color: var(--line-strong);
  line-height: 1;
}
.star-bar::before { content: "★★★★★"; }
.star-bar-fill {
  position: absolute;
  left: 0;
  top: 0;
  overflow: hidden;
  white-space: nowrap;
  color: var(--accent);
}
.star-bar-fill::before { content: "★★★★★"; }

.rating-block .big {
  font-family: var(--serif);
  font-size: 46px;
  font-weight: 600;
  color: var(--accent);
  line-height: 1;
}

.rating-block .stars { margin-bottom: 3px; }

.rating-block .detail {
  font-size: 13px;
  color: var(--muted);
}

.stars {
  color: var(--accent);
  letter-spacing: 2px;
  font-size: 15px;
}

/* infobox 定义列表 */
.infobox {
  margin: 26px 0 0;
  columns: 2;
  column-gap: 48px;
  font-size: 14px;
}

.infobox .row {
  break-inside: avoid;
  display: flex;
  gap: 12px;
  padding: 5px 0;
  border-bottom: 1px dotted var(--line);
}

.infobox .k {
  color: var(--muted);
  min-width: 76px;
  flex-shrink: 0;
}

.infobox .v {
  color: var(--ink-soft);
}

/* 正文（简介 / 日志内容） */
.prose {
  font-size: 15.5px;
  line-height: 1.9;
  color: var(--ink-soft);
  max-width: 42em;
}

.prose p {
  margin: 0 0 1em;
}

.summary {
  white-space: pre-wrap;
  font-size: 15px;
  line-height: 1.9;
  color: var(--ink-soft);
  max-width: 44em;
}

.summary.collapsed {
  max-height: 11.4em; /* 约 6 行 */
  overflow: hidden;
  -webkit-mask-image: linear-gradient(180deg, #000 70%, transparent);
  mask-image: linear-gradient(180deg, #000 70%, transparent);
}

.summary-toggle {
  margin-top: 8px;
  border: 0;
  background: none;
  color: var(--accent);
  font: inherit;
  font-size: 13.5px;
  cursor: pointer;
  padding: 2px 0;
}
.summary-toggle:hover { text-decoration: underline; }

/* 关联条目：竖向卡片（meta / 图 / name），横向排列 */
.poster .rel-meta {
  font-size: 12px;
  color: var(--accent);
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rel-card .p-name { margin-top: 8px; }

/* 评论（长评）左侧方形图 */
.review-img {
  width: 60px;
  min-width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 3px;
  background: var(--paper-2);
}

/* 角色详情列表（更多角色页） */
.char-list { display: flex; flex-direction: column; }
.char-row {
  display: flex;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  align-items: flex-start;
}
.char-img {
  width: 60px;
  min-width: 60px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: top;
  background: var(--paper-2);
}
.char-info { min-width: 0; flex: 1; }
.char-names { font-size: 15.5px; font-weight: 600; line-height: 1.4; }
.char-names .cn { color: var(--muted); font-weight: 400; font-size: 13px; margin-left: 8px; }
.char-meta { font-size: 12.5px; color: var(--muted); margin: 5px 0 9px; }
.char-cv {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--ink-soft);
}
.char-cv img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  object-position: top;
  background: var(--paper-2);
}

/* 角色页出演作品：声优在右侧 */
.char-cast-entry { display: flex; align-items: center; gap: 12px; }
.char-cast-entry .body { flex: 1; }
.char-cast-entry > a { display: contents; }
.cv-list {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  justify-content: center;
  min-width: 110px;
}
.cv-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: var(--ink-soft);
}
.cv-chip img {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
  object-position: top;
  background: var(--paper-2);
}
.cv-chip:hover { color: var(--accent); }

/* 人物页出演角色列表：左角色 中角位 右条目 */
.voice-entry {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.ve-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
  min-width: 220px;
}
.ve-left img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  background: var(--paper-2);
}
.ve-jp { font-size: 14px; font-weight: 600; color: var(--ink); }
.ve-right .ve-jp { display: block; }
.ve-cn { font-size: 12px; color: var(--muted); margin-top: 1px; }
.ve-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1 1 auto;
  justify-content: flex-end;
  min-width: 0;
}
.ve-right > div { min-width: 0; text-align: right; }
.ve-right img {
  width: 40px;
  height: 52px;
  object-fit: cover;
  border-radius: 2px;
  background: var(--paper-2);
  flex-shrink: 0;
}
.ve-pos {
  display: inline-block;
  font-size: 12px;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 1px 8px;
  border-radius: 3px;
  vertical-align: middle;
  margin-left: 6px;
}

/* 人物页：相册 / 演出角色 / 参与身份徽章 */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
  gap: 10px;
}
.photo-grid .photo {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  object-position: top;
  border-radius: 3px;
  background: var(--paper-2);
}
.pcast {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.pcast-char {
  width: 48px;
  min-width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  object-position: top;
  background: var(--paper-2);
}
.pcast-info { flex: 1; min-width: 0; }
.pcast-cn { font-size: 14.5px; font-weight: 600; display: block; }
.pcast-anime { font-size: 13px; color: var(--ink-soft); margin-top: 2px; }
.pcast-anime .cn { color: var(--muted); }
.pcast-badges { margin-top: 4px; }
.pcast-cover {
  width: 48px;
  min-width: 48px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  background: var(--paper-2);
}
.job-badges { margin-top: 5px; display: flex; flex-wrap: wrap; gap: 5px; }
.job-badge {
  font-size: 11.5px;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 3px;
  padding: 1px 7px;
}

/* 制作人员按职位分组 + 目录 */
.pos-list { min-width: 0; }
.pos-group { margin-bottom: 26px; scroll-margin-top: 80px; }
.pos-title {
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 12px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line);
}
.pos-toc {
  position: sticky;
  top: 78px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
}
.pos-toc a {
  font-size: 13px;
  color: var(--muted);
  padding: 4px 0;
  display: flex;
  justify-content: space-between;
  gap: 8px;
}
.pos-toc a:hover { color: var(--accent); }
.pos-toc a .c { color: var(--faint); }

/* 标签 */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin: 20px 0 0;
  font-size: 13px;
  color: var(--muted);
}

.tags a::before {
  content: "#";
  color: var(--faint);
  margin-right: 1px;
}

.tags a .c {
  color: var(--faint);
  margin-left: 3px;
  font-size: 11.5px;
}

/* 章节列表 */
.ep-list {
  list-style: none;
  margin: 0;
  padding: 0;
  columns: 2;
  column-gap: 40px;
}

.ep-list li {
  break-inside: avoid;
  display: flex;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}

.ep-list .no {
  font-family: var(--serif);
  color: var(--accent);
  min-width: 30px;
  text-align: right;
}

.ep-list .t {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ep-list .d {
  color: var(--faint);
  font-size: 12px;
}

.ep-list a.no:hover,
.ep-list a.t:hover { color: var(--accent); }

/* 评论 / 吐槽 */
.comment {
  display: flex;
  gap: 14px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}

/* 长评（评论）行：标题 + 换行时间，链接指向源站 */
.review-row {  display: block;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.review-row .rv-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.5;
}
.review-row:hover .rv-title { color: var(--accent); }
.review-row .rv-time {
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 4px;
}

.comment .avatar {
  width: 40px;
  height: 40px;
  min-width: 40px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--paper-2);
}

.comment .c-name {
  font-weight: 600;
  font-size: 14.5px;
}

.comment .c-name .rate {
  color: var(--accent);
  font-size: 12.5px;
  margin-left: 8px;
}

.comment .c-time {
  color: var(--faint);
  font-size: 12px;
  margin-left: 8px;
  font-weight: 400;
}

.comment .c-text {
  font-size: 14.5px;
  color: var(--ink-soft);
  margin-top: 5px;
  white-space: pre-wrap;
}

/* bbcode / 表情渲染 */
.c-text { word-break: break-word; }
img.bb-emoji { height: 20px; width: auto; vertical-align: text-bottom; display: inline-block; margin: 0 1px; }
img.bb-sticker { width: 55px; height: auto; vertical-align: bottom; display: inline-block; margin: 1px 2px; }
.c-text img.bb-img, .prose img.bb-img { max-width: 100%; max-height: 500px; height: auto; width: auto; object-fit: contain; border-radius: 3px; margin: 6px 0; }
.bb-quote {
  margin: 4px 0;
  padding: 5px 12px;
  border-left: 3px solid var(--line-strong);
  color: var(--muted);
  background: var(--paper-2);
}
.bb-code {
  font-family: Consolas, Menlo, monospace;
  background: var(--paper-2);
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 13px;
}
.bb-code-block {
  font-family: Consolas, Menlo, monospace;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 10px 12px;
  margin: 8px 0;
  font-size: 13px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-x: auto;
}
.bb-mask {
  background: var(--line-strong);
  color: transparent;
  border-radius: 2px;
  cursor: pointer;
}
/* 未揭开时：隐藏内部表情/图片，但保留其占位（高度不变） */
.bb-mask img { visibility: hidden; }
.bb-mask:hover,
.bb-mask.revealed { color: var(--ink); background: var(--paper-2); }
.bb-mask:hover img,
.bb-mask.revealed img { visibility: visible; }
.bb-user { color: var(--accent); }
.bb-user:hover { text-decoration: underline; }

/* 评论楼层 + 时间（右上角） */
.c-right {
  float: right;
  font-size: 12px;
  color: var(--faint);
  font-weight: 400;
}
.c-right .floor { color: var(--muted); margin-left: 8px; }
.op-badge {
  font-size: 11px;
  color: var(--accent);
  border: 1px solid var(--accent-soft);
  background: var(--accent-soft);
  border-radius: 3px;
  padding: 0 5px;
  margin-left: 6px;
  font-weight: 400;
}

/* 讨论回复：右上角工具 + 更多菜单 + 回复框 */
.c-tools { float: right; display: flex; align-items: center; gap: 12px; margin-left: 14px; }
.c-tools .c-meta { font-size: 12px; color: var(--faint); font-weight: 400; }
.c-tools .floor { color: var(--muted); }
.c-btn {
  background: none;
  border: 0;
  color: var(--muted);
  font: inherit;
  font-size: 12.5px;
  cursor: pointer;
  padding: 0;
}
.c-btn:hover { color: var(--accent); }
.c-icon {
  width: 15px;
  height: 15px;
  vertical-align: -2px;
  opacity: 0.75;
  display: inline-block;
}
.c-btn:hover .c-icon { opacity: 1; }
.more-wrap { position: relative; }
.more-menu {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  display: none;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
  min-width: 92px;
  z-index: 16;
}
.more-menu.show { display: flex; }
.more-menu a {
  padding: 7px 14px;
  font-size: 13px;
  color: var(--ink-soft);
  cursor: pointer;
  white-space: nowrap;
}
.more-menu a:hover { background: var(--paper-2); color: var(--accent); }
.reply-box { display: flex; gap: 8px; margin-top: 10px; align-items: flex-end; }
.reply-box input,
.reply-box textarea {
  flex: 1;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  padding: 8px 10px;
  font: inherit;
  font-size: 13px;
  line-height: 1.5;
  outline: none;
  resize: vertical;
  background: var(--paper);
  color: var(--ink);
}
.reply-box input:focus,
.reply-box textarea:focus { border-color: var(--accent); }
.reply-box button {
  background: var(--accent);
  color: #fff;
  border: 0;
  border-radius: 6px;
  padding: 8px 16px;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  white-space: nowrap;
}
.reply-box button:hover { opacity: .9; }

.comment .c-reply {
  margin-top: 12px;
  padding-left: 16px;
  border-left: 2px solid var(--line);
}

.comment .c-reply .comment {
  padding: 10px 0;
  border: 0;
}

.comment .c-reply .avatar {
  width: 28px;
  height: 28px;
  min-width: 28px;
}

/* 讨论 / 日志条目行 */
.topic {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
}

.topic .t-title {
  font-size: 15.5px;
  font-weight: 600;
}

.topic .t-meta {
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 3px;
}

.topic .t-count {
  color: var(--faint);
  font-size: 13px;
  white-space: nowrap;
}

/* ---------- 布局：主内容 + 侧栏 ---------- */
.cols {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 64px;
  align-items: start;
}

.side .rule-head:first-child {
  margin-top: 0;
}

/* ---------- 状态 / 工具 ---------- */
.loading,
.empty,
.error {
  color: var(--muted);
  font-size: 14.5px;
  padding: 40px 0;
  text-align: center;
}

.error {
  color: var(--accent);
}

.pill-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  font-size: 14.5px;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  padding-bottom: 14px;
  margin-bottom: 4px;
}

.pill-nav a {
  cursor: pointer;
}

.pill-nav a.active {
  color: var(--ink);
  font-weight: 600;
  border-bottom: 2px solid var(--accent);
  padding-bottom: 12px;margin-bottom: -14px;
}

.search-subtypes {
  font-size: 13.5px;
  gap: 8px 18px;
  padding-bottom: 10px;
  margin-top: 10px;
  border-bottom: 0;
}
.search-subtypes a.active {
  padding-bottom: 8px;
  margin-bottom: 0;
}

.pager {
  display: flex;
  justify-content: center;
  gap: 28px;
  margin-top: 44px;
  font-size: 14px;
  color: var(--muted);
}

.pager a {
  cursor: pointer;
}

.pager a[aria-disabled="true"] {
  color: var(--faint);
  pointer-events: none;
}

.crumbs {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: var(--gap-kicker);
}
.crumbs + h1.title { margin-bottom: var(--gap-title); }

.crumbs a:hover {
  color: var(--accent);
}

/* 小组帖子页：楼层布局 */
.topic-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 14px;
  margin: 8px 0 0;
}
.topic-gicon {
  width: 22px;
  height: 22px;
  border-radius: 3px;
  object-fit: cover;
  background: var(--paper-2);
}
.post {
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}
.post-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.post-user { font-size: 14.5px; font-weight: 600; color: var(--ink); }
.op-badge {
  font-size: 11px;
  color: var(--accent);
  border: 1px solid var(--accent-soft);
  border-radius: 3px;
  padding: 0 5px;
  margin-left: 6px;
  font-weight: 400;
  vertical-align: 1px;
}
.post-info { display: flex; align-items: center; gap: 12px; font-size: 12.5px; color: var(--faint); }
.post-info .floor { color: var(--muted); font-variant-numeric: tabular-nums; }
.post-src { color: var(--muted); }
.post-src:hover { color: var(--accent); }
.post .c-reply {
  margin: 14px 0 0 20px;
  padding-left: 16px;
  border-left: 2px solid var(--line);
}
.post .c-reply .post { padding: 12px 0; }
.post .c-reply .post:last-child { border-bottom: 0; }

/* ---------- 页脚 ---------- */
.site-foot {
  border-top: 1px solid var(--line);
  margin-top: 40px;
  padding: 34px 0;
  color: var(--faint);
  font-size: 13px;
}

.site-foot .wrap {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

/* ---------------- 首页仪表盘 ---------------- */
.dashboard {
  display: grid;
  grid-template-columns: 336px minmax(0, 1fr) 264px;
  gap: 52px;
  align-items: start;
}

.col-head {
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 600;
  margin: 0 0 4px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.col-head .hint {
  font-size: 12px;
  color: var(--faint);
  font-family: var(--sans);
  font-weight: 400;
}

.mini-tabs {
  display: flex;
  gap: 16px;
  font-size: 13px;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  padding: 8px 0 10px;
  margin-bottom: 6px;
}

.mini-tabs a { cursor: pointer; }
.mini-tabs a.active { color: var(--ink); font-weight: 600; }

.watch-item {
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.watch-top {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.watch-top .cover {
  width: 44px;
  min-width: 44px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  background: var(--paper-2);
}

.watch-top .wt-body { flex: 1; min-width: 0; }

.watch-top .wt-name {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.watch-top .wt-meta {
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 3px;
}

.btn-next {
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--ink-soft);
  font: inherit;
  font-size: 11.5px;
  padding: 3px 9px;
  border-radius: 3px;
  cursor: pointer;
  white-space: nowrap;
}

.btn-next:hover { border-color: var(--accent); color: var(--accent); }
.btn-next:disabled { color: var(--faint); cursor: default; border-color: var(--line); }

.progress {
  height: 3px;
  background: var(--line);
  margin: 10px 0 8px;
  position: relative;
  overflow: hidden;
}

.progress > i {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  background: var(--accent);
}

.ep-grid { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }

.ep-sep { color: var(--line-strong); margin: 0 3px; }
.ep-gl {
  font-size: 12px;
  color: var(--muted);
  margin-right: 1px;
  align-self: center;
}

.ep-cell {
  position: relative;
  min-width: 24px;
  height: 22px;
  padding: 0 5px;
  font-size: 11px;
  line-height: 22px;
  text-align: center;  color: var(--muted);
  background: var(--paper-2);
  border: 1px solid var(--line);
  cursor: pointer;
  font-variant-numeric: tabular-nums;
}

.ep-cell:hover { border-color: var(--accent); color: var(--accent); z-index: 3; }
.ep-cell.done { background: var(--accent-soft); color: var(--accent); border-color: var(--accent-soft); }
.ep-cell.current { border-color: var(--accent); color: var(--accent); font-weight: 700; }
.ep-cell.na { color: var(--faint); opacity: 0.55; }
.ep-cell.special { font-style: italic; }

/* 放大的章节格子 */
.ep-grid-lg .ep-cell {
  min-width: 34px;
  height: 30px;
  line-height: 30px;
  font-size: 13px;
  padding: 0 8px;
}
.ep-grid-lg .ep-gl { font-size: 13px; }

/* 章节列表独立页 */
.ep-full-list { list-style: none; margin: 0 0 8px; padding: 0; }
.ep-full { border-bottom: 1px solid var(--line); }
.ep-full:last-child { border-bottom: 0; }
.ep-full > a {
  display: flex;
  gap: 16px;
  align-items: baseline;
  padding: 13px 2px;
}
.ep-full > a:hover .efl-title { color: var(--accent); }
.efl-no {
  min-width: 40px;
  font-family: var(--serif);
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}
.efl-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.efl-title { font-size: 15px; font-weight: 600; color: var(--ink); line-height: 1.4; }
.efl-sub { font-size: 12.5px; color: var(--muted); }
.efl-meta { font-size: 12px; color: var(--faint); }

.ep-pop {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  width: 208px;
  background: #fff;
  border: 1px solid var(--line-strong);
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.08);
  padding: 12px 13px;
  z-index: 20;
  text-align: left;
  cursor: default;
  border-radius: 5px;
}

.ep-pop .pop-no { font-family: var(--serif); color: var(--accent); font-size: 12px; }
.ep-pop .pop-title { font-size: 13px; font-weight: 600; color: var(--ink); margin: 2px 0 6px; line-height: 1.4; }
.ep-pop .pop-meta { font-size: 11.5px; color: var(--muted); margin-bottom: 10px; line-height: 1.6; }
.ep-pop .pop-btns { display: flex; flex-wrap: wrap; gap: 5px; }

.ep-pop .pop-btns button {
  flex: 1;
  min-width: 40px;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--ink-soft);
  font: inherit;
  font-size: 11.5px;
  padding: 4px 0;
  border-radius: 3px;
  cursor: pointer;
}

.ep-pop .pop-btns button:hover { border-color: var(--accent); color: var(--accent); }
.ep-pop .pop-link { display: block; margin-top: 8px; font-size: 11px; color: var(--muted); }

/* 首页在看面板：章节浮窗一律向下展开，并防止左右溢出屏幕 */
.watch-detail .ep-pop {
  bottom: auto;
  top: 100%;
  margin-top: 0;
  max-width: calc(100vw - 24px);
}

.tl-item {
  display: flex;
  gap: 13px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.tl-item .tl-avatar {
  width: 38px;
  height: 38px;
  min-width: 38px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--paper-2);
}

.tl-item .tl-body { flex: 1; min-width: 0; }

.tl-line { font-size: 14px; line-height: 1.6; color: var(--ink-soft); }
.tl-line .u { font-weight: 600; color: var(--ink); }
.tl-line .act { color: var(--muted); }
.tl-say { font-size: 14.5px; color: var(--ink); margin-top: 3px; white-space: pre-wrap; }

.tl-subjects { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 9px; }

.tl-subjects a {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 12.5px;
  color: var(--ink-soft);
  max-width: 100%;
}

.tl-subjects img { width: 32px; height: 44px; object-fit: cover; background: var(--paper-2); }

.tl-foot {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-top: 8px;
  font-size: 12px;
  color: var(--faint);
}

.tl-foot a, .tl-foot button {
  color: var(--faint);
  cursor: pointer;
  background: none;
  border: 0;
  font: inherit;
  font-size: 12px;
  padding: 0;
}

.tl-foot a:hover, .tl-foot button:hover { color: var(--accent); }

.reactions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; align-items: center; }

.reaction-chip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 1px 8px;
  font-size: 12px;
  color: var(--ink-soft);
  cursor: pointer;
  background: var(--paper);
}

.reaction-chip.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.reaction-add { position: relative; }

.reaction-picker {
  position: absolute;
  top: 100%;
  right: 0;
  left: auto;
  bottom: auto;
  display: none;
  width: 140px;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  padding: 8px 9px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
  z-index: 15;
}

.reaction-add:hover .reaction-picker,
.reaction-picker.show { display: grid; }

/* 触屏设备：禁用 hover 打开，仅用点击切换，避免选择器卡住无法收起 */
@media (hover: none) {
  .reaction-add:hover .reaction-picker { display: none; }
  .reaction-picker.show { display: grid; }
}

.reaction-picker span {
  cursor: pointer;
  line-height: 0;
  padding: 2px;
  border-radius: 4px;
}
.reaction-picker span:hover { background: var(--paper-2); }
.reaction-picker img.sticker {
  height: 21px;
  width: 21px;
  object-fit: contain;
  vertical-align: middle;
}

img.sticker {
  height: 18px;
  width: auto;
  vertical-align: -4px;
  display: inline-block;
}
.reaction-picker img.sticker { height: 22px; vertical-align: middle; }
.reaction-chip img.sticker { height: 16px; vertical-align: -3px; }

.tl-replies { margin-top: 12px; padding-left: 14px; border-left: 2px solid var(--line); }
.tl-reply { padding: 8px 0; font-size: 13px; }
.tl-reply .r-name { font-weight: 600; color: var(--ink); }
.tl-reply .r-time { color: var(--faint); font-size: 11px; margin-left: 6px; }
.tl-reply .r-text { color: var(--ink-soft); margin-top: 2px; white-space: pre-wrap; }

.reply-form { display: flex; gap: 10px; margin-top: 10px; align-items: flex-end; }

.reply-form input,
.reply-form textarea {
  flex: 1;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  padding: 9px 12px;
  font: inherit;
  font-size: 13.5px;
  line-height: 1.6;
  outline: none;
  resize: vertical;
  background: var(--paper);
  color: var(--ink);
}
.reply-form input:focus,
.reply-form textarea:focus { border-color: var(--accent); }

.reply-form button {
  background: var(--accent);
  color: #fff;
  border: 0;
  border-radius: 6px;
  padding: 9px 20px;
  cursor: pointer;
  font: inherit;
  font-size: 13.5px;
  white-space: nowrap;
}
.reply-form button:hover { opacity: .9; }

.trend-topic { padding: 12px 0; border-bottom: 1px solid var(--line); }

.trend-topic .tt-title {
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.trend-topic .tt-meta { font-size: 11.5px; color: var(--muted); margin-top: 4px; }

.auth-hint { color: var(--muted); font-size: 13px; padding: 20px 0; line-height: 1.7; }

.auth-hint button {
  background: var(--accent);
  color: #fff;
  border: 0;
  border-radius: 4px;
  padding: 5px 14px;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  margin-top: 8px;
}

/* 首页「使用 Bangumi 账户登录」按钮下弹气泡（本站暂不支持登录） */
.login-btn-wrap { position: relative; display: inline-block; }
.login-bubble {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 60;
  background: var(--paper);
  color: var(--ink-soft);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 12.5px;
  line-height: 1.6;
  max-width: 280px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  white-space: normal;
}
.login-bubble.show { display: block; }
.login-bubble::before {
  content: "";
  position: absolute;
  top: -5px;
  left: 18px;
  width: 8px;
  height: 8px;
  background: var(--paper);
  border-left: 1px solid var(--line);
  border-top: 1px solid var(--line);
  transform: rotate(45deg);
}

@media (max-width: 1080px) {
  .dashboard { grid-template-columns: 1fr; gap: 40px; }
}

/* 在看：左列表 + 右详情 */
.watch-panel {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 30px;
  align-items: start;
  margin-top: 6px;
}
.watch-list {
  max-height: 328px;
  overflow-y: auto;
  border-right: 1px solid var(--line);
  padding-right: 10px;
}
.watch-list::-webkit-scrollbar { width: 6px; }
.watch-list::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 3px; }
.wl-row {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 8px 9px;
  cursor: pointer;
  border-radius: 5px;
}
.wl-row:hover { background: var(--paper-2); }
.wl-row.active { background: var(--accent-soft); }
.wl-cover {
  width: 32px;
  min-width: 32px;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  background: var(--paper-2);
  border-radius: 2px;
}
.wl-body { min-width: 0; flex: 1; }
.wl-name {
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.wl-prog { font-size: 11px; color: var(--muted); margin-top: 2px; }

.watch-detail { min-height: 220px; padding-top: 20px; }
.wd-head { display: flex; gap: 18px; align-items: flex-start; }
.wd-cover {
  width: 100px;
  min-width: 100px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  background: var(--paper-2);
}
.wd-body { min-width: 0; padding-top: 2px; }
.wd-name { font-size: 16.5px; font-weight: 600; line-height: 1.4; }
.wd-meta { font-size: 12.5px; color: var(--muted); margin: 7px 0 14px; }

/* 书籍章节/卷进度 */
.book-prog { margin-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.bp-row { font-size: 14px; color: var(--ink-soft); display: flex; align-items: center; gap: 8px; }
.bp-row b { color: var(--accent); font-weight: 600; }
.bp-plus {
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--ink-soft);
  font: inherit;
  font-size: 13px;
  line-height: 1;
  width: 22px;
  height: 22px;
  border-radius: 4px;
  cursor: pointer;
}
.bp-plus:hover { border-color: var(--accent); color: var(--accent); }

/* 时间线条目封面 */
.tl-covers { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.tl-covers img {
  width: 40px;
  height: 56px;
  object-fit: cover;
  border-radius: 2px;
  background: var(--paper-2);
}
.tl-covers.mono img {
  width: 52px;
  min-width: 52px;
  height: 52px;
  border-radius: 4px;
  object-position: top;
}

@media (max-width: 560px) {
  .watch-panel { grid-template-columns: 1fr; }
  .watch-list {
    max-height: 190px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding-right: 0;
    padding-bottom: 8px;
  }
}

/* 浏览页分组筛选 */
.fgroups {
  margin: 6px 0 10px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}
.fgroup {
  display: flex;
  gap: 16px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  align-items: baseline;
  font-size: 13px;
}
.fg-label {
  min-width: 50px;
  color: var(--ink);
  font-weight: 600;
  padding-top: 2px;
  flex-shrink: 0;
}
.fg-opts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
}
.fg-opts a {
  color: var(--muted);
  cursor: pointer;
  font-size: 13px;
  white-space: nowrap;
}
.fg-opts a.active { color: var(--ink); font-weight: 600; }
.fg-opts a:hover { color: var(--accent); }

/* 条目/角色/人物页屏内筛选按钮 */
.fg-opt {
  font: inherit;
  font-size: 13px;
  color: var(--muted);
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
  white-space: nowrap;
}
.fg-opt.on { color: var(--ink); font-weight: 600; }
.fg-opt:hover { color: var(--accent); }

/* 登场/参与作品类型胶囊 */
.type-pill {
  display: inline-block;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 11.5px;
  padding: 1px 8px;
  border-radius: 999px;
  margin-right: 6px;
  vertical-align: 1px;
}

/* 浏览页：结果 + 右侧筛选（网格分区，便于窄屏重排） */
.browse-grid {
  display: grid;
  grid-template-columns: 1fr 300px;
  column-gap: 64px;
  grid-template-areas: "head filters" "results filters";
  align-items: start;
}
.browse-head { grid-area: head; min-width: 0; }
.browse-results { grid-area: results; min-width: 0; }
.side-filters { grid-area: filters; margin-top: 95px; }
.filter-head {
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 600;
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 12px;
  margin-bottom: 4px;
}
.side-filters .fgroup {
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  padding: 12px 0;
}
.side-filters .fg-label {
  min-width: 0;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--faint);
}
.side-filters .fg-opts { gap: 7px 13px; }
.side-filters .fg-opts a { font-size: 12.5px; }
.side-filters .fgroup:first-child { padding-top: 0; }
.side-filters select {
  font: inherit;
  font-size: 12.5px;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line-strong);
  padding: 3px 4px 3px 2px;
  cursor: pointer;
  outline: none;
}

/* 窄屏：筛选移到排序与列表之间 */
@media (max-width: 860px) {
  .browse-grid {
    grid-template-columns: 1fr;
    grid-template-areas: "head" "filters" "results";
    column-gap: 0;
  }
  .side-filters { margin-top: 0; }
  .browse-results { margin-top: 20px; }
}

/* 年份/月份 */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
  padding: 14px 0 2px;
  font-size: 13px;
  color: var(--muted);
}
.filter-bar select {
  font: inherit;
  font-size: 13px;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line-strong);
  padding: 4px 6px 4px 2px;
  cursor: pointer;
  outline: none;
}

/* 首页两栏（左 2 : 右 1） */
.home2 {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 56px;
  align-items: start;
}
.home-main > section,
.home-main > div { margin-bottom: 8px; }
.home-main > #colWatching { margin-bottom: 56px; }
.home-main > *:first-child .section-head:first-child { margin-top: 0; }
.home-side > *:first-child .section-head:first-child { margin-top: 0; }
.home-side > section,
.home-side > div { margin-bottom: 40px; }
.home-side .col-head { font-size: 17px; }

/* 在看列表：限量 + 展开 */
.watch-more {
  width: 100%;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 12.5px;
  padding: 7px 0;
  margin-top: 12px;
  border-radius: 4px;
  cursor: pointer;
}
.watch-more:hover { border-color: var(--accent); color: var(--accent); }

/* 每日放送小图 */
.poster-grid.mini {
  grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
  gap: 14px 10px;
}
.poster-grid.mini .p-name {
  font-size: 11.5px;
  -webkit-line-clamp: 1;
  margin-top: 5px;
}
.poster-grid.mini .p-meta { font-size: 10.5px; }

/* 每日放送：纯封面、更小更紧凑 */
.poster-grid.cal-mini {
  grid-template-columns: repeat(auto-fill, minmax(52px, 1fr));
  gap: 8px 7px;
}
.cal-poster { position: relative; }
.cal-pop {
  bottom: auto;
  top: 100%;
  margin-top: 6px;
  width: 180px;
}
.poster-grid.cal-mini .poster img {
  aspect-ratio: 3 / 4;
  border-radius: 3px;
}
.poster-grid.cal-mini .poster img:hover {
  outline: 1.5px solid var(--accent);
}
.cal-day {
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--faint);
  border-bottom: 1px solid var(--line);
  padding-bottom: 6px;
  margin: 22px 0 14px;
}
.cal-day b { color: var(--accent); font-weight: 600; letter-spacing: 0; }

@media (max-width: 980px) {
  .home2 { grid-template-columns: 1fr; gap: 40px; }
}

/* ---------- 响应式 ---------- */
@media (max-width: 860px) {
  .wrap { padding: 0 20px; }
  h1.title { font-size: 31px; }
  .cols { grid-template-columns: 1fr; gap: 40px; }
  .detail-head { flex-direction: column; gap: 24px; }
  .detail-head .cover { width: 160px; min-width: 160px; }
  .infobox { columns: 1; }
  .ep-list { columns: 1; }

  /* 页头：品牌 + 汉堡按钮一行，导航/搜索折叠 */
  .site-head .wrap {
    height: auto;
    padding-top: 12px;
    padding-bottom: 12px;
    flex-wrap: wrap;
    gap: 12px 16px;
    row-gap: 0;
  }
  .nav-toggle { display: flex; order: 2; margin-left: auto; }
  .brand { order: 1; width: 143px; height: 50px; }
  .brand .brand-icon { width: 36px; height: 42px; bottom: 0; left: 0; }
  .brand .brand-word { width: 110px; height: 32px; top: 5px; right: 0; }
  .head-search-icon { display: flex; order: 3; margin-left: 4px; }
  .head-user, .head-token { order: 4; margin-left: 10px; }
  .site-nav {
    order: 5;
    flex-basis: 100%;
    flex-direction: column;
    gap: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height .25s ease;
    font-size: 15.5px;
  }
  .site-nav a {
    padding: 11px 2px;
    border-bottom: 1px solid var(--line);
  }
  .head-search { display: none; }
  .site-head.nav-open .site-nav {
    max-height: 520px;
    margin-top: 8px;
  }
  .site-head.nav-open .nav-toggle span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
  .site-head.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
  .site-head.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

  /* 角色 / 制作人员：每排两个 */
  .mono-grid { grid-template-columns: repeat(2, 1fr); gap: 18px 16px; }
}
