/* ============================================================
   TCS-TEAM — 简洁黑白风格（黑色主题）
   ============================================================ */

:root {
  --bg: #0a0a0a;
  --panel: #111111;
  --panel-hover: #161616;
  --border: #1f1f1f;
  --border-strong: #2e2e2e;
  --text: #f5f5f5;
  --text-dim: #a0a0a0;
  --text-mute: #6b6b6b;
  --white: #f5f5f5;
  --black: #0a0a0a;
  --sidebar-w: 240px;
  --sidebar-w-collapsed: 68px;
  --radius: 12px;
  --font: "Inter", "SF Pro Display", "HarmonyOS Sans SC", "PingFang SC", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", "Cascadia Code", "Fira Code", Consolas, "Courier New", monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

::selection { background: #f5f5f5; color: #0a0a0a; }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: #0a0a0a; }
::-webkit-scrollbar-thumb { background: #2a2a2a; border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: #3a3a3a; }

/* ============================================================
   侧边栏
   ============================================================ */
.sidebar {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: var(--sidebar-w);
  background: #0d0d0d;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: 100;
  transition: width 0.28s cubic-bezier(0.4, 0, 0.2, 1), transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-head {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  padding: 0 16px;
  border-bottom: 1px solid var(--border);
  gap: 8px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  font-weight: 700;
  letter-spacing: 0.08em;
  font-size: 15px;
  white-space: nowrap;
  overflow: hidden;
}
.brand svg { flex: none; }
.brand-logo-img {
  flex: none;
  object-fit: contain;
  border-radius: 8px;
}

.sidebar-toggle {
  display: grid;
  place-items: center;
  width: 34px; height: 34px;
  flex: none;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-dim);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.sidebar-toggle svg { width: 16px; height: 16px; transition: transform 0.28s; }
.sidebar-toggle:hover { background: #181818; color: var(--text); }

.sidebar-nav {
  flex: 1;
  padding: 18px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow-y: auto;
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 11px 13px;
  border-radius: 9px;
  color: var(--text-dim);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  transition: background 0.18s, color 0.18s;
}
.sidebar-item:hover { background: #151515; color: var(--text); }
.sidebar-item.active { background: #1a1a1a; color: var(--text); }

.sidebar-icon { display: grid; place-items: center; width: 22px; height: 22px; flex: none; }
.sidebar-icon svg { width: 19px; height: 19px; }
.sidebar-label { opacity: 1; transition: opacity 0.2s; }

.sidebar-foot {
  padding: 16px 20px;
  border-top: 1px solid var(--border);
  font-size: 11px;
  color: var(--text-mute);
  white-space: nowrap;
  overflow: hidden;
  letter-spacing: 0.06em;
}

/* 收起状态 */
body.sidebar-collapsed .sidebar { width: var(--sidebar-w-collapsed); }
body.sidebar-collapsed .sidebar-label,
body.sidebar-collapsed .brand-text,
body.sidebar-collapsed .sidebar-foot { opacity: 0; visibility: hidden; }
body.sidebar-collapsed .sidebar-head { justify-content: center; padding: 0 8px; }
body.sidebar-collapsed .sidebar-toggle { position: absolute; top: 20px; right: -12px; background: #111; }
body.sidebar-collapsed .sidebar-toggle svg { transform: rotate(180deg); }
body.sidebar-collapsed .sidebar-nav { padding: 18px 10px; }
body.sidebar-collapsed .sidebar-item { justify-content: center; padding: 11px 0; gap: 0; }

/* 主区域 */
.main {
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  padding: 64px clamp(28px, 5vw, 72px);
  transition: margin-left 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}
body.sidebar-collapsed .main { margin-left: var(--sidebar-w-collapsed); }

.backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 90;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}

.mobile-menu-btn {
  display: none;
  position: fixed;
  top: 14px;
  left: 14px;
  z-index: 80;
  width: 44px;
  height: 44px;
  place-items: center;
  background: #111;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  color: var(--text);
  cursor: pointer;
}
.mobile-menu-btn svg { width: 20px; height: 20px; }

/* ============================================================
   通用组件
   ============================================================ */
.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.2s, background 0.2s, transform 0.2s;
}
.panel:hover { border-color: var(--border-strong); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 9px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.2s;
  white-space: nowrap;
}
.btn:active { transform: scale(0.98); }

.btn-light { background: var(--white); color: var(--black); }
.btn-light:hover { background: #ffffff; }

.btn-ghost { background: transparent; color: var(--text); border-color: var(--border-strong); }
.btn-ghost:hover { border-color: #4a4a4a; background: #131313; }

.btn-sm { padding: 8px 16px; font-size: 13px; }
.btn-danger { background: transparent; color: #ff6b6b; border-color: rgba(255, 107, 107, 0.3); }
.btn-danger:hover { background: rgba(255, 107, 107, 0.08); border-color: rgba(255, 107, 107, 0.6); }

.text-link { color: var(--text-dim); font-size: 13.5px; transition: color 0.2s; }
.text-link:hover { color: var(--text); }

.link-arrow { color: var(--text-mute); font-size: 13px; transition: color 0.2s; }
.panel:hover .link-arrow { color: var(--text); }

.muted { color: var(--text-mute); font-size: 14px; }
.empty { padding: 28px; color: var(--text-mute); text-align: center; }

/* 滚动进入动画 */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1), transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
  transition-delay: calc(var(--rd, 0) * 90ms);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* 首页标题扫光 */
.hero-home h1 em {
  font-style: normal;
  background: linear-gradient(100deg, #4a4a4a 0%, #f5f5f5 45%, #8a8a8a 70%, #4a4a4a 100%);
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  animation: sheen 5s linear infinite;
}
@keyframes sheen {
  0% { background-position: 120% 0; }
  100% { background-position: -120% 0; }
}

.section { margin-top: 80px; }
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}
.section-head h2 { font-size: 22px; font-weight: 700; letter-spacing: -0.01em; }

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }

.page-head { margin-bottom: 48px; }
.page-head h1 {
  font-size: clamp(32px, 4vw, 46px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
}
.page-head.compact { margin-bottom: 22px; }
.page-sub { color: var(--text-dim); margin-top: 12px; font-size: 15px; max-width: 620px; }
.back-link { color: var(--text-dim); font-size: 14px; transition: color 0.2s; }
.back-link:hover { color: var(--text); }

/* ============================================================
   首页
   ============================================================ */
.hero-home {
  padding: 32px 0 20px;
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 48px;
  align-items: center;
}
.hero-text { min-width: 0; }
.hero-banner {
  position: relative;
}
.hero-banner img {
  width: 100%;
  height: auto;
  object-fit: contain;
  display: block;
}
.kicker {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--text-mute);
  margin-bottom: 18px;
}
.hero-home h1 {
  font-size: clamp(42px, 7vw, 82px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
}
.hero-home h1 em { font-style: normal; }
.hero-sub { margin-top: 24px; max-width: 620px; color: var(--text-dim); font-size: 16px; }
.hero-actions { margin-top: 36px; display: flex; gap: 12px; flex-wrap: wrap; }

.stats-row {
  margin-top: 72px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.stat { padding: 32px 28px; }
.stat b {
  display: block;
  font-family: var(--mono);
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.stat span { color: var(--text-mute); font-size: 13px; letter-spacing: 0.08em; }

.biz-card { display: block; padding: 30px; }
.biz-card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.biz-icon {
  display: grid; place-items: center;
  width: 42px; height: 42px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  font-size: 18px; font-weight: 700;
  color: var(--text);
}
.biz-tag { font-family: var(--mono); font-size: 11px; color: var(--text-mute); letter-spacing: 0.16em; }
.biz-card h3 { font-size: 18px; margin-bottom: 8px; }
.biz-card p { color: var(--text-dim); font-size: 14px; }
.biz-card .link-arrow { display: inline-block; margin-top: 16px; }

.news-list { display: flex; flex-direction: column; gap: 18px; }
.news-item {
  display: flex;
  flex-direction: column;
  padding: 24px 28px;
  cursor: pointer;
  transition: border-color 0.25s, background 0.25s, transform 0.25s;
}
.news-item:hover { border-color: var(--border-strong); background: var(--panel-hover); }
.news-item-head {
  display: flex;
  align-items: baseline;
  gap: 16px;
  flex-wrap: wrap;
}
.news-date {
  flex: none;
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--text);
  background: #1c1c1c;
  border: 1px solid var(--border-strong);
  padding: 4px 12px;
  border-radius: 99px;
}
.news-item h3 { font-size: 18px; margin-bottom: 0; }
.news-summary { color: var(--text-dim); font-size: 14px; margin-top: 12px; }
.news-toggle { color: var(--text-mute); font-size: 13px; margin-top: 14px; transition: color 0.2s; }
.news-item:hover .news-toggle { color: var(--text); }
.news-item.is-open .news-toggle { color: var(--text); }

.news-detail {
  margin-top: 18px;
  border-top: 1px solid var(--border);
  padding-top: 18px;
  cursor: default;
}
.news-detail-inner {
  color: var(--text-dim);
  font-size: 14.5px;
  line-height: 1.9;
}
.news-detail-inner h2,
.news-detail-inner h3,
.news-detail-inner h4 {
  color: var(--text);
  margin: 18px 0 8px;
  line-height: 1.4;
}
.news-detail-inner h2 { font-size: 20px; }
.news-detail-inner h3 { font-size: 17px; }
.news-detail-inner h4 { font-size: 15px; }
.news-detail-inner p { margin: 10px 0; }
.news-detail-inner ul,
.news-detail-inner ol { margin: 10px 0 10px 22px; display: flex; flex-direction: column; gap: 4px; }
.news-detail-inner ul { list-style: disc; }
.news-detail-inner ol { list-style: decimal; }
.news-detail-inner blockquote {
  margin: 12px 0;
  padding: 4px 0 4px 14px;
  border-left: 2px solid #3a3a3a;
  color: var(--text);
  font-style: italic;
}
.news-detail-inner code {
  background: #1c1c1c;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 2px 7px;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--text);
}
.news-detail-inner pre {
  background: #0d0d0d;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  overflow-x: auto;
  margin: 12px 0;
}
.news-detail-inner pre code { background: transparent; border: none; padding: 0; }
.news-detail-inner a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }

/* ============================================================
   成员
   ============================================================ */
.member-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 32px;
}
.member-filter-btn {
  padding: 9px 20px;
  font-size: 13.5px;
  color: var(--text-dim);
  background: transparent;
  border: 1px solid var(--border-strong);
  border-radius: 99px;
  cursor: pointer;
  transition: color 0.2s, background 0.2s, border-color 0.2s, transform 0.2s;
}
.member-filter-btn:hover {
  color: var(--text);
  border-color: #4a4a4a;
  transform: translateY(-2px);
}
.member-filter-btn.active {
  color: #0a0a0a;
  background: var(--white);
  border-color: var(--white);
  font-weight: 600;
}

.member-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 24px;
}
.member-group-title {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 14px;
  margin-bottom: 4px;
}
.member-group-title:first-child { margin-top: 0; }
.member-group-title span {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--text-dim);
  text-transform: uppercase;
  flex: none;
}
.member-group-title i {
  flex: 1;
  height: 1px;
  background: var(--border);
}
.member-card { position: relative; }
.member-group-tag {
  display: inline-block;
  margin-top: 10px;
  padding: 3px 11px;
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--text-mute);
  border: 1px solid var(--border);
  border-radius: 99px;
}
.member-card {
  display: block;
  padding: 28px;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), background 0.25s, border-color 0.25s;
}
.member-card:hover { transform: translateY(-4px); background: var(--panel-hover); }
.avatar {
  width: 64px; height: 64px;
  border-radius: 14px;
  overflow: hidden;
  display: grid;
  place-items: center;
  font-size: 24px;
  font-weight: 700;
  color: #0a0a0a;
  background: #e5e5e5;
  margin-bottom: 16px;
  border: 1px solid var(--border-strong);
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.fallback { font-family: var(--mono); }
.avatar-xl { width: 120px; height: 120px; font-size: 44px; border-radius: 22px; margin-bottom: 0; }

.member-card-body h3 { font-size: 17px; font-weight: 700; }
.codename { font-family: var(--mono); font-size: 12px; color: var(--text-mute); font-weight: 500; letter-spacing: 0.08em; }
.role { color: var(--text-dim); font-size: 13px; margin-top: 6px; }
.motto { color: var(--text-mute); font-size: 12.5px; margin-top: 10px; font-style: italic; }

/* 成员主页（无卡片，融入背景） */
.profile {
  padding: 0;
  margin-top: 12px;
  background: transparent;
  border: none;
}
.profile-top { display: flex; gap: 32px; align-items: flex-end; flex-wrap: wrap; }
.profile-id { flex: 1; min-width: 260px; }
.profile-id h1 { font-size: clamp(30px, 4vw, 44px); font-weight: 800; letter-spacing: -0.02em; }
.profile-id .role { font-size: 15px; margin-top: 8px; }
.profile-id .motto { margin-top: 12px; font-size: 15px; }
.chips { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-block;
  font-size: 12px;
  color: var(--text-dim);
  border: 1px solid var(--border-strong);
  border-radius: 99px;
  padding: 4px 13px;
  transition: color 0.2s, border-color 0.2s;
}
.chip:hover { color: var(--text); border-color: #4a4a4a; }

.profile-meta {
  margin-top: 44px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.profile-meta span { display: block; font-size: 11px; letter-spacing: 0.14em; color: var(--text-mute); text-transform: uppercase; }
.profile-meta b { font-size: 15px; font-weight: 600; }

.profile-grid {
  margin-top: 56px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 56px;
}
.profile-grid .panel {
  background: transparent;
  border: none;
  padding: 0;
}
.profile-grid .panel-title {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-mute);
  margin-bottom: 20px;
}
.bio { color: var(--text-dim); font-size: 15px; }

.skill-row { margin-bottom: 16px; }
.skill-row:last-child { margin-bottom: 0; }
.skill-head { display: flex; justify-content: space-between; font-size: 13.5px; color: var(--text-dim); margin-bottom: 7px; }
.skill-head b { font-family: var(--mono); color: var(--text); }
.skill-bar { height: 6px; background: #1c1c1c; border-radius: 99px; overflow: hidden; }
.skill-bar span { display: block; height: 100%; background: #e5e5e5; border-radius: 99px; }

.tl-row { display: flex; gap: 20px; padding: 14px 0; }
.tl-row + .tl-row { border-top: 1px solid var(--border); }
.tl-year {
  flex: none;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
  background: #1c1c1c;
  border: 1px solid var(--border-strong);
  padding: 4px 13px;
  border-radius: 99px;
  align-self: flex-start;
}
.tl-row h3 { font-size: 15px; margin-bottom: 3px; }
.tl-row p { color: var(--text-dim); font-size: 13.5px; }

/* ============================================================
   分部
   ============================================================ */
.division-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.division-card {
  display: flex;
  flex-direction: column;
  aspect-ratio: 1 / 1;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.25s, background 0.25s;
}
.division-card:hover { transform: translateY(-4px); border-color: var(--border-strong); background: var(--panel-hover); }
.division-card-img {
  flex: 1;
  min-height: 0;
  background: #0d0d0d;
  border-bottom: 1px solid var(--border);
  display: grid;
  place-items: center;
  overflow: hidden;
}
.division-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.division-card-img.fallback span {
  font-size: 64px;
  font-weight: 700;
  color: var(--text);
}
.division-card-body { padding: 22px 24px 24px; }
.division-card-body h2 { font-size: 20px; margin-bottom: 4px; }
.division-card-body .tagline { font-family: var(--mono); font-size: 11.5px; color: var(--text-mute); letter-spacing: 0.14em; margin-top: 3px; }
.division-card-desc {
  color: var(--text-dim);
  font-size: 13.5px;
  margin-top: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.division-card .link-arrow { display: inline-block; margin-top: 14px; }

.division-detail { margin-top: 8px; }
.division-detail-head {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}
.division-detail-head .codename { letter-spacing: 0.2em; }
.division-detail-head h1 { font-size: clamp(30px, 4vw, 46px); font-weight: 800; letter-spacing: -0.02em; }
.division-detail-meta {
  display: flex;
  gap: 32px;
  flex-wrap: wrap;
  padding: 20px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-mute);
  margin-bottom: 32px;
}
.division-detail-meta b { color: var(--text); font-weight: 600; }
.division-detail-img {
  width: 100%;
  max-height: 420px;
  object-fit: contain;
  display: block;
  margin: 0 0 28px;
  background: #0d0d0d;
  border-radius: 12px;
}
.division-detail-content { color: var(--text-dim); font-size: 15px; line-height: 1.9; }
.division-detail-content h2,
.division-detail-content h3,
.division-detail-content h4 { color: var(--text); margin: 20px 0 8px; }
.division-detail-content p { margin: 10px 0; }
.division-detail-content ul,
.division-detail-content ol { margin: 10px 0 10px 22px; display: flex; flex-direction: column; gap: 4px; }
.division-detail-content ul { list-style: disc; }
.division-detail-content ol { list-style: decimal; }
.division-detail-content blockquote {
  margin: 12px 0;
  padding: 4px 0 4px 14px;
  border-left: 2px solid #3a3a3a;
  color: var(--text);
  font-style: italic;
}

.division-icon {
  display: grid; place-items: center;
  width: 52px; height: 52px;
  flex: none;
  border: 1px solid var(--border-strong);
  border-radius: 13px;
  font-size: 22px; font-weight: 700;
  color: var(--text);
}
.tagline { font-family: var(--mono); font-size: 11.5px; color: var(--text-mute); letter-spacing: 0.14em; margin-top: 3px; }
.division-desc { color: var(--text-dim); font-size: 14.5px; max-width: 800px; }
.feature-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 4px; }
.feature-list li {
  font-size: 12.5px;
  color: var(--text-dim);
  border: 1px solid var(--border);
  border-radius: 99px;
  padding: 4px 13px;
}

/* 编年史 — 时间递进时间线 */
.timeline-summary {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 28px;
  flex-wrap: wrap;
}
.ts-year {
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.04em;
}
.ts-line {
  position: relative;
  width: min(220px, 26vw);
  height: 2px;
  background: #1f1f1f;
  border-radius: 2px;
  overflow: visible;
  display: inline-flex;
  align-items: center;
}
.ts-line-fill {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 100%;
  background: linear-gradient(90deg, #3a3a3a, #f5f5f5);
  border-radius: 2px;
  transform-origin: left;
  animation: tsFill 1.4s cubic-bezier(0.4, 0, 0.2, 1) both;
}
.ts-arrow {
  position: absolute;
  right: -18px;
  top: 50%;
  transform: translateY(-50%);
  color: #f5f5f5;
  font-size: 16px;
}
.ts-count {
  margin-left: 14px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--text-mute);
  text-transform: uppercase;
}

@keyframes tsFill {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

.chronicle-wrap { margin-top: 28px; }

.chronicle-stage {
  position: relative;
  height: clamp(460px, 72vh, 760px);
  min-height: 460px;
  overflow: hidden;
}

.cc-card {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 56%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  background: #111;
  border: 1px solid rgba(245, 245, 245, calc(0.08 + 0.22 * var(--p, 0)));
  border-radius: 16px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  filter: blur(4px) brightness(0.45);
  transition: opacity 0.55s cubic-bezier(0.4, 0, 0.2, 1), transform 0.55s cubic-bezier(0.4, 0, 0.2, 1), filter 0.55s cubic-bezier(0.4, 0, 0.2, 1), left 0.55s cubic-bezier(0.4, 0, 0.2, 1), width 0.55s cubic-bezier(0.4, 0, 0.2, 1);
}
.cc-card.is-left,
.cc-card.is-right {
  opacity: 0.4;
  pointer-events: auto;
  cursor: pointer;
  z-index: 3;
}
.cc-card.is-left {
  left: 3%;
  width: 42%;
  transform: none;
  filter: blur(1.5px) brightness(0.68);
}
.cc-card.is-right {
  left: 55%;
  width: 42%;
  transform: none;
  filter: blur(1.5px) brightness(0.68);
}
.cc-card.is-far-left,
.cc-card.is-far-right {
  opacity: 0.16;
  pointer-events: auto;
  cursor: pointer;
  z-index: 2;
}
.cc-card.is-far-left {
  left: -9%;
  width: 34%;
  transform: none;
  filter: blur(4px) brightness(0.45);
}
.cc-card.is-far-right {
  left: 75%;
  width: 34%;
  transform: none;
  filter: blur(4px) brightness(0.45);
}
.cc-card.is-center {
  opacity: 1;
  pointer-events: auto;
  cursor: default;
  z-index: 4;
  left: 50%;
  width: 56%;
  transform: translateX(-50%);
  filter: none;
}

.cc-card-top {
  flex: none;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 22px 28px 0;
}
.ct-node {
  flex: none;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: rgba(245, 245, 245, calc(0.3 + 0.7 * var(--p, 0)));
  box-shadow: 0 0 0 3px rgba(245, 245, 245, calc(0.08 + 0.18 * var(--p, 0)));
}
.ct-year {
  font-family: var(--mono);
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
  color: rgba(245, 245, 245, calc(0.35 + 0.65 * var(--p, 0)));
}
.ct-line {
  flex: 1;
  height: 1px;
  background: rgba(245, 245, 245, calc(0.08 + 0.3 * var(--p, 0)));
}
.cc-count {
  flex: none;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--text-mute);
}

.ct-media {
  flex: none;
  margin: 18px 28px 0;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #0d0d0d;
}
.ct-media img {
  width: 100%;
  max-height: 34vh;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
}
.ct-media figcaption {
  padding: 8px 12px;
  font-size: 12px;
  color: var(--text-mute);
  border-top: 1px solid var(--border);
}

.cc-card-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  padding: 18px 28px 28px;
}
.cc-card-body h3 { font-size: 22px; font-weight: 700; margin-bottom: 10px; }
.ct-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
  color: var(--text-dim);
  font-size: 15px;
  line-height: 1.8;
}
.ct-content p { margin: 0; }
.ct-quote {
  border-left: 2px solid #3a3a3a;
  padding: 2px 0 2px 14px;
  color: var(--text);
  font-style: italic;
}

.chronicle-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 28px;
}
.scroll-btn {
  width: 44px;
  height: 44px;
  flex: none;
  display: grid;
  place-items: center;
  background: #111;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  color: var(--text);
  font-size: 18px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}
.scroll-btn:hover { background: #181818; border-color: #4a4a4a; }
.scroll-btn:disabled { opacity: 0.35; cursor: default; }
.cc-indicator {
  display: flex;
  align-items: center;
  gap: 14px;
}
.cc-current-year {
  font-family: var(--mono);
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.02em;
}
.cc-sep {
  width: 28px;
  height: 1px;
  background: #2e2e2e;
}
.cc-count {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  color: var(--text-mute);
}

/* ============================================================
   页脚
   ============================================================ */
.footer { margin-top: 88px; padding-top: 32px; border-top: 1px solid var(--border); }
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--text-mute);
}
.footer-brand { display: flex; align-items: center; gap: 10px; }
.footer-links { display: flex; gap: 18px; }
.footer-links a { color: var(--text-dim); transition: color 0.2s; }
.footer-links a:hover { color: var(--text); }
.footer-beian { display: flex; gap: 10px; align-items: center; }
.footer-beian a { color: var(--text-mute); transition: color 0.2s; }
.footer-beian a:hover { color: var(--text-dim); }
.footer-beian .dot { color: #3a3a3a; }

/* ============================================================
   管理页
   ============================================================ */
.admin-login-wrap { display: flex; justify-content: center; padding: 8vh 0; }
.admin-login {
  width: min(420px, 100%);
  padding: 36px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.admin-login h1 { font-size: 24px; }

.field { display: flex; flex-direction: column; gap: 8px; font-size: 13px; color: var(--text-dim); }
.field input, .field textarea, .field select {
  background: #0d0d0d;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  color: var(--text);
  padding: 11px 13px;
  font-size: 14px;
  font-family: var(--font);
  transition: border-color 0.2s;
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none;
  border-color: #4a4a4a;
}
.field textarea { resize: vertical; min-height: 90px; font-family: var(--mono); font-size: 12.5px; }

.form-msg { min-height: 20px; font-size: 13px; color: #ff6b6b; }
.form-msg.ok { color: #6bd490; }

.admin-actions { margin-top: 14px; display: flex; gap: 10px; }

.admin-tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--border); margin-bottom: 22px; overflow-x: auto; }
.tab {
  padding: 11px 18px;
  font-size: 14px;
  color: var(--text-dim);
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.2s, border-color 0.2s;
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--text); border-bottom-color: var(--text); }

.admin-panel { display: flex; flex-direction: column; gap: 18px; }

.admin-section { padding: 26px; }
.admin-section h2 { font-size: 17px; margin-bottom: 18px; }

.admin-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.admin-grid .field.full { grid-column: 1 / -1; }

.admin-list { display: flex; flex-direction: column; gap: 10px; }
.admin-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 16px;
  background: #0d0d0d;
  border: 1px solid var(--border);
  border-radius: 10px;
}
.admin-item .info { flex: 1; min-width: 0; }
.admin-item .info b { display: block; font-size: 14px; }
.admin-item .info span { font-size: 12px; color: var(--text-mute); }
.admin-item .actions { display: flex; gap: 8px; }

.admin-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.admin-toolbar h3 { font-size: 15px; }

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 200;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 16px;
  overflow-y: auto;
}
.modal {
  width: min(680px, 100%);
  background: #111;
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  padding: 28px;
}
.modal h2 { font-size: 18px; margin-bottom: 18px; }
.modal .field { margin-bottom: 14px; }
.modal-actions { display: flex; gap: 10px; margin-top: 20px; }

.hidden { display: none !important; }

.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  background: #f5f5f5;
  color: #0a0a0a;
  padding: 12px 22px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  z-index: 300;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
  animation: toastIn 0.25s ease;
}
.toast.error { background: #2a1212; color: #ff8f8f; border: 1px solid rgba(255, 107, 107, 0.4); }

@keyframes toastIn {
  from { opacity: 0; transform: translate(-50%, 12px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

.save-bar {
  position: sticky;
  bottom: 18px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 16px;
  background: #111;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  margin-top: 10px;
}

/* ============================================================
   响应式
   ============================================================ */
@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); width: var(--sidebar-w); }
  body.sidebar-collapsed .sidebar { width: var(--sidebar-w); }
  body.sidebar-collapsed .sidebar-label,
  body.sidebar-collapsed .brand-text,
  body.sidebar-collapsed .sidebar-foot { opacity: 1; visibility: visible; }
  body.sidebar-collapsed .sidebar-head { justify-content: space-between; padding: 0 16px; }
  body.sidebar-collapsed .sidebar-toggle { position: static; }
  body.sidebar-collapsed .sidebar-toggle svg { transform: none; }
  body.sidebar-collapsed .sidebar-nav { padding: 18px 12px; }
  body.sidebar-collapsed .sidebar-item { justify-content: flex-start; padding: 11px 13px; gap: 13px; }

  .sidebar.open { transform: translateX(0); }
  .main { margin-left: 0; }
  body.sidebar-collapsed .main { margin-left: 0; }
  .backdrop.show { opacity: 1; pointer-events: auto; }
  .mobile-menu-btn { display: grid; }

  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .grid-2 { grid-template-columns: 1fr; }
    .hero-home { grid-template-columns: 1fr; gap: 28px; }
    .hero-banner { max-width: 520px; }
    .division-grid { grid-template-columns: repeat(2, 1fr); }
  .profile-meta { grid-template-columns: repeat(2, 1fr); }
  .admin-grid { grid-template-columns: 1fr; }
  .admin-grid .field.full { grid-column: auto; }

    .ct-item { grid-template-columns: 72px 36px 1fr; gap: 12px; }
    .ct-year { font-size: 24px; }
    .ct-end { margin-left: 120px; }

    .ct-card { flex-basis: min(340px, 80vw); }

    .cc-card.is-center { width: 64%; }
    .cc-card.is-left { left: 2%; width: 44%; }
    .cc-card.is-right { left: 54%; width: 44%; }
    .cc-card.is-far-left { left: -6%; width: 32%; }
    .cc-card.is-far-right { left: 74%; width: 32%; }
}

@media (max-width: 520px) {
  .main { padding: 36px 20px; }
  .member-grid { grid-template-columns: repeat(2, 1fr); }
  .member-card { padding: 18px; }
  .avatar { width: 52px; height: 52px; font-size: 20px; border-radius: 12px; }
  .profile { padding: 22px; }
  .profile-top { flex-direction: column; align-items: flex-start; }
  .avatar-xl { width: 88px; height: 88px; font-size: 32px; border-radius: 18px; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
  .stats-row { grid-template-columns: 1fr 1fr; gap: 10px; }

    .ct-item { grid-template-columns: 28px 1fr; gap: 10px; min-height: 0; }
    .ct-year { display: none; }
    .ct-rail::before { bottom: -10px; }
    .ct-dot { margin-top: 20px; width: 11px; height: 11px; }
    .ct-item.is-last .ct-dot { width: 14px; height: 14px; margin-top: 18px; }
    .ct-card { padding: 16px 16px 18px; margin-bottom: 10px; }
    .ct-card-year { display: inline-block; margin-bottom: 6px; }
    .ct-end { margin-left: 38px; }

    .ct-card { flex-basis: 82vw; padding: 0; margin-bottom: 0; }
    .division-grid { grid-template-columns: 1fr; }
    .chronicle-scroll { gap: 12px; padding-bottom: 18px; }
    .ct-card-top { padding: 14px 16px 0; }
    .ct-year { display: block; font-size: 22px; }
    .ct-media { margin: 12px 16px 0; }
    .ct-card-body { padding: 12px 16px 16px; }
    .ts-line { width: 90px; }
    .ts-count { margin-left: 0; width: 100%; }

      .chronicle-stage { height: 62vh; min-height: 420px; }
      .cc-card.is-left { transform: translateX(-9%) scale(0.95); opacity: 0.2; }
      .cc-card.is-right { transform: translateX(9%) scale(0.95); opacity: 0.2; }
      .cc-card-top { padding: 16px 18px 0; }
      .cc-card-top .cc-count { display: none; }
      .ct-media { margin: 12px 18px 0; }
      .ct-media img { max-height: 28vh; }
      .cc-card-body { padding: 14px 18px 22px; }
      .cc-card-body h3 { font-size: 18px; }

        .cc-card.is-center { width: 74%; }
        .cc-card.is-left { left: 0; width: 48%; opacity: 0.3; filter: blur(1px) brightness(0.65); transform: none; }
        .cc-card.is-right { left: 52%; width: 48%; opacity: 0.3; filter: blur(1px) brightness(0.65); transform: none; }
        .cc-card.is-far-left,
        .cc-card.is-far-right { opacity: 0; pointer-events: none; transform: none; }
}
