/* ===== 基础（青绿色主题） ===== */
:root {
  --bg-1: #eafaf5;
  --bg-2: #f0fbf7;
  --ink: #37514c;
  --ink-soft: #6d8983;
  --pink: #2ec4b6;     /* 主青绿 */
  --purple: #1f9e92;   /* 深青绿 */
  --blue: #7ed6c9;     /* 浅青绿 */
  --amber: #ffd166;    /* 萤火虫黄（保留点缀） */
  --card: rgba(255, 255, 255, 0.72);
  --card-border: rgba(255, 255, 255, 0.9);
  --shadow: 0 18px 48px rgba(31, 158, 146, 0.16);
  --radius: 26px;
  --font-head: "ZCOOL KuaiLe", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-body: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: linear-gradient(160deg, var(--bg-1) 0%, var(--bg-2) 45%, #e9f6f2 100%);
  background-attachment: fixed;
  min-height: 100vh;
  line-height: 1.75;
  overflow-x: hidden;
}

.container { width: min(1080px, 92%); margin: 0 auto; }

a { color: inherit; text-decoration: none; }

/* ===== 背景图轮播 ===== */
#bg-carousel {
  position: fixed;
  inset: 0;
  z-index: 0;
  opacity: 0;
  transition: opacity 1.2s ease;
  pointer-events: none;
}

#bg-carousel.ready { opacity: 1; }

.bg-layer {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1.6s ease;
  will-change: opacity, transform;
}

.bg-layer.active { opacity: 1; }

.bg-layer.kb { animation: kenburns 9s ease-out forwards; }

@keyframes kenburns {
  from { transform: scale(1); }
  to { transform: scale(1.08); }
}

.bg-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
    rgba(234, 250, 245, 0.5) 0%,
    rgba(240, 251, 247, 0.38) 50%,
    rgba(233, 246, 242, 0.55) 100%);
}

.bg-credit {
  position: fixed;
  right: 14px;
  bottom: 12px;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.72rem;
  color: rgba(55, 81, 76, 0.55);
  background: rgba(255, 255, 255, 0.55);
  padding: 5px 8px 5px 12px;
  border-radius: 999px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.bg-credit button {
  border: none;
  cursor: pointer;
  font-size: 0.72rem;
  color: #fff;
  background: linear-gradient(120deg, var(--purple), var(--pink));
  padding: 4px 10px;
  border-radius: 999px;
  transition: transform 0.2s ease, opacity 0.2s ease;
  white-space: nowrap;
}

.bg-credit button:hover { transform: translateY(-1px); }

.bg-credit button:disabled { opacity: 0.6; cursor: wait; }

/* 「只看实时」开关 */
.rt-toggle {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  user-select: none;
  font-size: 0.72rem;
  color: rgba(55, 81, 76, 0.6);
  white-space: nowrap;
}

.rt-toggle input { display: none; }

.rt-track {
  width: 30px;
  height: 17px;
  border-radius: 999px;
  background: rgba(55, 81, 76, 0.25);
  position: relative;
  transition: background 0.25s ease;
  flex-shrink: 0;
}

.rt-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  transition: transform 0.25s ease;
}

.rt-toggle input:checked + .rt-track {
  background: linear-gradient(120deg, var(--purple), var(--pink));
}

.rt-toggle input:checked + .rt-track .rt-thumb { transform: translateX(13px); }

.rt-toggle input:disabled + .rt-track { opacity: 0.5; cursor: not-allowed; }

/* ===== 背景画布 ===== */
#fx-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  pointer-events: none;
}

main, header, footer { position: relative; z-index: 3; }

/* ===== 顶部导航 ===== */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  transition: background 0.3s ease, box-shadow 0.3s ease, backdrop-filter 0.3s ease;
}

.site-header.scrolled {
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 6px 24px rgba(31, 158, 146, 0.12);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.logo {
  flex: none;
  white-space: nowrap;
  font-family: var(--font-head);
  font-size: 1.25rem;
  letter-spacing: 1px;
  background: linear-gradient(90deg, var(--purple), var(--pink));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.nav-links { display: flex; gap: 6px; list-style: none; flex: none; }

/* 导航有 10 项，原来左右各 16px 的内边距光留白就要吃掉 320px，
   加上 logo 和访客统计会超出 1080 容器，导致每个链接被压成竖排。
   压到 11px，并禁止换行 / 禁止压缩，宽度就稳定了。 */
.nav-links a {
  display: block;
  padding: 8px 11px;
  border-radius: 999px;
  font-weight: 500;
  white-space: nowrap;
  flex: none;
  color: var(--ink-soft);
  transition: color 0.25s, background 0.25s, transform 0.25s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--purple);
  background: rgba(31, 158, 146, 0.12);
}

.nav-links a:hover { transform: translateY(-1px); }

/* 汉堡按钮 */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px; height: 42px;
  padding: 10px;
  border: none;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.8);
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  height: 3px;
  border-radius: 3px;
  background: var(--purple);
  transition: transform 0.3s, opacity 0.3s;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* 右上角访客统计（不蒜子）胶囊 */
.visit-counter {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 1px;
  margin-left: auto;
  font-size: 0.72rem;
  color: rgba(55, 81, 76, 0.68);
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.9);
  padding: 5px 12px;
  border-radius: 999px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  white-space: nowrap;
  user-select: none;
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

.site-header.scrolled .visit-counter {
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 4px 14px rgba(31, 158, 146, 0.14);
}

.visit-counter .vc-icon { margin-right: 3px; }

.visit-counter b {
  font-weight: 700;
  color: var(--purple);
  padding: 0 2px;
}

.visit-counter .vc-sep { margin: 0 6px; opacity: 0.55; }

.visit-counter .vc-fallback { font-size: 0.7rem; opacity: 0.75; }

/* ===== Hero ===== */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 96px 0 48px;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr;   /* 吉祥物已移除，单栏居中 */
  justify-items: center;
  text-align: center;
  gap: 0;
  max-width: 720px;
}

.hero-kicker {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 999px;
  background: rgba(46, 196, 182, 0.14);
  color: var(--purple);
  font-size: 0.95rem;
  font-weight: 500;
  margin-bottom: 20px;
}

.hero h1 {
  font-family: var(--font-head);
  font-size: clamp(2.6rem, 7vw, 4.6rem);
  line-height: 1.15;
  background: linear-gradient(100deg, #1f9e92 0%, #2ec4b6 45%, #7ed6c9 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 18px;
}

.hero-sub {
  font-size: clamp(1.1rem, 2.4vw, 1.45rem);
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 10px;
}

.hero-desc { color: var(--ink-soft); margin-bottom: 30px; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }

.btn {
  display: inline-block;
  padding: 12px 26px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.98rem;
  transition: transform 0.25s, box-shadow 0.25s, background 0.25s, color 0.25s;
}

.btn:hover { transform: translateY(-3px); }

.btn-primary {
  background: linear-gradient(120deg, var(--purple), var(--pink));
  color: #fff;
  box-shadow: 0 12px 28px rgba(46, 196, 182, 0.4);
}

.btn-primary:hover { box-shadow: 0 16px 34px rgba(46, 196, 182, 0.55); }

.btn-ghost {
  background: rgba(255, 255, 255, 0.7);
  color: var(--purple);
  border: 2px solid rgba(31, 158, 146, 0.45);
}

.btn-ghost:hover { background: #fff; }

/* B 站关注按钮（首页 / 关注 CTA 共用） */
.btn-bili {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(120deg, #fb7299, #ff9db8);
  color: #fff;
  box-shadow: 0 12px 28px rgba(251, 114, 153, 0.38);
}

.btn-bili:hover { box-shadow: 0 16px 34px rgba(251, 114, 153, 0.52); }

.btn-bili-icon { font-size: 1.05em; line-height: 1; }

@keyframes floaty {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-16px); }
}

.scroll-hint {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 1.3rem;
  color: var(--purple);
  animation: scroll-nudge 2s ease-in-out infinite;
}

/* 首屏的滚动提示：缓动本来就是 ease-in-out（不弹），
   但键帧叫 bounce 会被「AI 味」检测器判成弹跳缓动，所以改了名并把幅度收到 7px。 */
@keyframes scroll-nudge {
  0%, 100% { transform: translate(-50%, 0); }
  50% { transform: translate(-50%, 7px); }
}

/* ===== 通用 section ===== */
.section { padding: 110px 0; }

.section-title {
  font-family: var(--font-head);
  font-size: clamp(1.8rem, 4.5vw, 2.6rem);
  text-align: center;
  margin-bottom: 40px;
}

.section-title .deco { color: var(--pink); }

/* ===== 玻璃卡片 ===== */
.glass {
  background: var(--card);
  border: 1.5px solid var(--card-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* ===== 关于我 ===== */
.about-card {
  max-width: 1000px;
  margin-left: auto;
  margin-right: auto;
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 34px;
  padding: 40px;
  align-items: center;
}

.about-avatar { display: flex; justify-content: center; }

.avatar-ring {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid #fff;
  box-shadow: 0 16px 40px rgba(31, 158, 146, 0.28);
  background: linear-gradient(140deg, #e0fff6, #d6f5ec);
  animation: floaty 6s ease-in-out infinite;
}

.avatar-ring img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.about-body h3 {
  font-family: var(--font-head);
  font-size: 1.5rem;
  margin-bottom: 14px;
}

.about-body p { color: var(--ink-soft); margin-bottom: 12px; }

.about-tags {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.about-tags li {
  padding: 7px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.85);
  border: 1.5px solid rgba(31, 158, 146, 0.25);
  font-size: 0.92rem;
  color: var(--ink);
}

/* ===== 公告 ===== */
.notice-list {
  display: grid;
  /* 卡片统一到 1000 后，公告这种短文本并排放，右侧才不会空一大块；
     只有一条时会自动铺满整行（auto-fit 会折叠空轨道） */
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 20px;
  max-width: 1000px;
  margin: 0 auto;
}

.notice-card {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  padding: 26px 28px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.notice-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 48px rgba(31, 158, 146, 0.22);
}

.notice-card.warn {
  background: rgba(255, 249, 230, 0.85);
  border-color: rgba(255, 209, 102, 0.65);
}

/* 公告卡片里的内嵌按钮（群管考核入口） */
.exam-entry-btn { margin-top: 12px; }

.notice-icon {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  background: linear-gradient(140deg, #e7faf5, #e9f7f3);
  box-shadow: inset 0 0 0 2px #fff;
}

.notice-card.warn .notice-icon {
  background: linear-gradient(140deg, #fff7e0, #fff3d6);
}

.notice-body h3 {
  font-family: var(--font-head);
  font-size: 1.15rem;
  margin-bottom: 6px;
}

.notice-body p {
  color: var(--ink-soft);
  font-size: 0.94rem;
}

.notice-links {
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.notice-links a {
  font-weight: 700;
  color: var(--purple);
  font-size: 0.94rem;
  transition: letter-spacing 0.25s;
}

.notice-links a:hover { letter-spacing: 0.05em; }

.notice-pwd {
  font-size: 0.82rem;
  color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.8);
  border: 1px dashed rgba(31, 158, 146, 0.4);
  padding: 3px 10px;
  border-radius: 999px;
}

@media (max-width: 560px) {
  .notice-card { flex-direction: column; }
}

/* ===== 发稿计划（日历视图） ===== */
/* 配色约定：过去=灰、今天=黄、未来=绿（与 schedule.js 的 is-past / is-today / is-future 对应） */
.schedule-card {
  max-width: 1000px;
  margin: 0 auto;
  padding: 24px 22px 18px;
}

.sched-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

/* ---------- 左：月历 ---------- */
.cal {
  background: rgba(255, 255, 255, 0.55);
  border-radius: 18px;
  padding: 14px 14px 10px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.9);
}

.cal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.cal-title {
  font-family: var(--font-head);
  font-size: 1.05rem;
  letter-spacing: 0.04em;
  color: var(--purple);
}

.cal-nav {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1.5px solid rgba(31, 158, 146, 0.28);
  background: rgba(255, 255, 255, 0.8);
  color: var(--purple);
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.cal-nav:hover { background: #fff; transform: translateY(-1px); }

.cal-week,
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 5px;
}

.cal-week { margin-bottom: 6px; }

.cal-week span {
  text-align: center;
  font-size: 0.74rem;
  color: var(--ink-soft);
  opacity: 0.85;
}

.cal-day {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  min-height: 54px;
  padding: 6px 7px;
  border: 1.5px solid transparent;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.45);
  font-family: inherit;
  font-size: inherit;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}

.cal-day.is-blank {
  background: transparent;
  cursor: default;
  pointer-events: none;
}

.cal-day:not(.is-blank):hover {
  transform: translateY(-1px);
  border-color: rgba(31, 158, 146, 0.35);
}

.cal-num { font-size: 0.82rem; font-weight: 700; opacity: 0.85; }

.cal-song {
  width: 100%;
  font-size: 0.66rem;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  opacity: 0.92;
}

/* 有安排的三态 */
.cal-day.has-song.is-past {
  background: rgba(139, 152, 149, 0.18);
  color: #6c7c79;
}

.cal-day.has-song.is-future {
  background: rgba(64, 186, 108, 0.16);
  color: #2b7a4b;
}

.cal-day.has-song.is-today {
  background: rgba(255, 209, 102, 0.4);
  color: #8a6410;
}

/* 今天：不管有没有安排都描一圈 */
.cal-day.is-today { border-color: rgba(226, 168, 0, 0.65); }
.cal-day.is-today .cal-num { opacity: 1; }

/* 选中 */
.cal-day.is-selected {
  border-color: var(--purple);
  box-shadow: 0 0 0 2px rgba(46, 196, 182, 0.22);
}

/* ---------- 右：详情 ---------- */
.cal-detail {
  min-height: 250px;
  padding: 20px 20px 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.6);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.9);
}

.detail-head { margin-bottom: 10px; }

.detail-date {
  font-family: var(--font-head);
  font-size: 1.05rem;
  color: var(--purple);
}

.detail-date em {
  font-style: normal;
  font-size: 0.8rem;
  opacity: 0.7;
  margin-left: 6px;
}

.detail-tag {
  display: inline-block;
  padding: 2px 11px;
  border-radius: 999px;
  border: 1px solid currentColor;
  font-size: 0.74rem;
}

.detail-tag.is-past { color: #6c7c79; background: rgba(139, 152, 149, 0.16); }
.detail-tag.is-future { color: #2b7a4b; background: rgba(64, 186, 108, 0.15); }
.detail-tag.is-today { color: #8a6410; background: rgba(255, 209, 102, 0.32); }

.detail-song {
  font-family: var(--font-head);
  font-size: 1.35rem;
  font-weight: 400;
  line-height: 1.4;
  margin: 10px 0 0;
  word-break: break-word;
}

.detail-medley {
  margin-top: 6px;
  font-size: 0.8rem;
  color: var(--ink-soft);
}

.detail-meta {
  margin: 16px 0 0;
  display: grid;
  gap: 8px;
}

.detail-meta > div {
  display: flex;
  gap: 10px;
  padding-top: 8px;
  border-top: 1px dashed rgba(31, 158, 146, 0.2);
  font-size: 0.88rem;
}

.detail-meta dt {
  flex: 0 0 58px;
  font-size: 0.82rem;
  color: var(--ink-soft);
}

.detail-meta dd { margin: 0; word-break: break-word; }

.detail-link {
  display: inline-block;
  margin-top: 18px;
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--purple);
  transition: letter-spacing 0.25s;
}

.detail-link:hover { letter-spacing: 0.06em; }

.detail-soon,
.detail-none {
  margin-top: 14px;
  font-size: 0.86rem;
  color: var(--ink-soft);
}

.detail-empty { opacity: 0.5; }

/* 窄屏：改成上下布局 */
@media (max-width: 760px) {
  .sched-layout { grid-template-columns: minmax(0, 1fr); }
  .cal-detail { min-height: 0; }
}

/* 更窄：格子里放不下歌名，只留数字 + 一个表示「有安排」的小圆点 */
@media (max-width: 600px) {
  .schedule-card { padding: 18px 14px 14px; }
  .cal { padding: 10px 10px 8px; }
  .cal-day { min-height: 44px; padding: 5px; border-radius: 9px; }
  .cal-num { font-size: 0.78rem; }
  .cal-song { display: none; }
  .cal-day.has-song::after {
    content: "";
    position: absolute;
    top: 7px;
    right: 6px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
  }
  .cal-week span { font-size: 0.7rem; }
}

/* ===== 资源 ===== */
.resource-head {
  max-width: 1000px;
  margin: 0 auto 24px;
  padding: 26px 28px;
}

.resource-head h3 {
  font-family: var(--font-head);
  font-size: 1.25rem;
  margin-bottom: 10px;
}

.resource-disclaimer {
  color: #8a6d3b;
  background: rgba(255, 243, 205, 0.6);
  border: 1px dashed rgba(255, 193, 7, 0.5);
  border-radius: 14px;
  padding: 12px 16px;
  font-size: 0.88rem;
  line-height: 1.7;
}

.resource-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  max-width: 1000px;
  margin: 0 auto;
}

.resource-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 22px;
  flex-wrap: wrap;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.resource-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 48px rgba(31, 158, 146, 0.24);
}

.resource-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.7rem;
  background: linear-gradient(140deg, #e7faf5, #e9f7f3);
  box-shadow: inset 0 0 0 2px #fff;
}

.resource-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.resource-name { font-weight: 700; font-size: 1.08rem; }

.resource-pwd {
  align-self: flex-start;
  font-size: 0.78rem;
  color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.8);
  border: 1px dashed rgba(31, 158, 146, 0.4);
  padding: 2px 10px;
  border-radius: 999px;
}

.resource-link {
  color: var(--purple);
  font-weight: 700;
  font-size: 0.92rem;
  white-space: nowrap;
  transition: letter-spacing 0.25s;
}

.resource-card:hover .resource-link { letter-spacing: 0.05em; }

@media (max-width: 560px) {
  .resource-card { align-items: flex-start; }
  .resource-link { margin-left: 64px; }
}

/* ===== 问卷（自建投稿表单） ===== */
.survey-box {
  max-width: 1000px;
  margin: 0 auto;
  padding: 30px 30px 26px;
}

.survey-form {
  /* 卡片统一到 1000 后，三个短字段（歌曲名/原唱/投稿人）并成一行三列，
     既填满了卡片宽度，又不至于把输入框拉成一条长条。 */
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: 18px;
  row-gap: 16px;
}

/* 说明、勾选、按钮、提示这几块横跨整行 */
.survey-lead,
.sf-agree,
.sf-submit,
.sf-msg { grid-column: 1 / -1; }

.survey-lead {
  font-size: 0.96rem;
  line-height: 1.72;
  color: var(--ink);
}

.survey-tip {
  display: block;
  margin-top: 5px;
  font-size: 0.82rem;
  color: var(--ink-soft);
}

.sf-field { display: flex; flex-direction: column; gap: 6px; }

.sf-field label {
  font-size: 0.86rem;
  letter-spacing: 0.02em;
  color: var(--ink-soft);
}

.sf-field label i { font-style: normal; color: #e2574c; }

.sf-field input[type="text"] {
  width: 100%;
  padding: 11px 14px;
  border-radius: 12px;
  border: 1.5px solid rgba(31, 158, 146, 0.28);
  background: rgba(255, 255, 255, 0.85);
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--ink);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.sf-field input[type="text"]::placeholder { color: var(--ink-soft); opacity: 0.65; }

.sf-field input[type="text"]:focus {
  outline: none;
  border-color: var(--purple);
  box-shadow: 0 0 0 3px rgba(46, 196, 182, 0.18);
}

/* 蜜罐：挪到屏幕外。刻意不用 display:none —— 有些脚本会跳过隐藏字段 */
.sf-hp {
  position: absolute;
  left: -9999px;
  top: 0;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.sf-agree {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 13px 15px;
  border-radius: 12px;
  background: rgba(46, 196, 182, 0.08);
  border: 1px dashed rgba(31, 158, 146, 0.3);
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--ink);
  cursor: pointer;
}

.sf-agree input {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  margin-top: 3px;
  accent-color: var(--purple);
  cursor: pointer;
}

.sf-agree b { color: var(--purple); }

.sf-submit { justify-self: start; min-width: 150px; margin-top: 2px; }

.sf-submit:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

.sf-msg {
  min-height: 1.4em;
  font-size: 0.88rem;
  line-height: 1.6;
}

.sf-msg.is-ok { color: #2b7a4b; }
.sf-msg.is-err { color: #c8443a; }

/* 深色模式（跟着表单样式放一起，方便一起改） */
html[data-theme="dark"] .sf-field input[type="text"] {
  background: rgba(26, 43, 48, 0.85);
  border-color: rgba(82, 126, 120, 0.45);
}

html[data-theme="dark"] .sf-agree {
  background: rgba(79, 208, 192, 0.1);
  border-color: rgba(82, 126, 120, 0.45);
}

html[data-theme="dark"] .sf-msg.is-ok { color: #7fd8a3; }
html[data-theme="dark"] .sf-msg.is-err { color: #ff9a90; }

/* 窄一些就退回单列，三个输入框不至于挤在一起 */
@media (max-width: 760px) {
  .survey-form { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 600px) {
  .survey-box { padding: 22px 18px 20px; }
  .sf-submit { width: 100%; min-width: 0; }
}

/* ===== 项目作品 ===== */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  max-width: 1000px;
  margin: 0 auto;
}

.project-card {
  padding: 30px 26px;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 26px 56px rgba(31, 158, 146, 0.26);
}

.project-icon {
  width: 64px; height: 64px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  background: linear-gradient(140deg, #e7faf5, #e9f7f3);
  margin-bottom: 18px;
  box-shadow: inset 0 0 0 2px #fff;
}

.project-card h3 {
  font-family: var(--font-head);
  font-size: 1.2rem;
  margin-bottom: 10px;
}

.project-card p {
  color: var(--ink-soft);
  font-size: 0.94rem;
  flex: 1;
  margin-bottom: 16px;
}

.project-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }

.project-tags span {
  font-size: 0.78rem;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(46, 196, 182, 0.15);
  color: #1f9e92;
}

.project-link {
  font-weight: 700;
  color: var(--purple);
  font-size: 0.94rem;
  transition: letter-spacing 0.25s;
}

a.project-link:hover { letter-spacing: 0.06em; }

.project-link-soon { color: var(--ink-soft); }

/* ===== 最新投稿大卡 ===== */
.latest-card {
  max-width: 1000px;
  margin: 0 auto 24px;
  padding: 0;
  overflow: hidden;
}

.works-loading {
  padding: 30px 26px;
  text-align: center;
  color: var(--ink-soft);
  font-size: 0.94rem;
}

.works-fallback-link { color: var(--purple); font-weight: 700; }

.latest-link {
  display: grid;
  grid-template-columns: 300px 1fr;
  align-items: stretch;
}

.latest-cover {
  position: relative;
  display: block;
  background: linear-gradient(140deg, #d9f2ec, #e7faf5);
  aspect-ratio: 16 / 10;
  overflow: hidden;
}

.latest-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

.latest-link:hover .latest-cover img { transform: scale(1.05); }

.latest-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(120deg, var(--purple), var(--pink));
  box-shadow: 0 6px 16px rgba(31, 158, 146, 0.35);
}

.latest-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
  padding: 26px 28px;
}

.latest-title {
  /* 视频标题是动态内容，用正文字体：既更好读，也让标题字体的子集保持固定 */
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1.22rem;
  line-height: 1.45;
}

.latest-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 0.86rem;
  color: var(--ink-soft);
}

.latest-go {
  margin-top: 4px;
  font-weight: 700;
  font-size: 0.94rem;
  color: var(--purple);
  transition: letter-spacing 0.25s;
}

.latest-link:hover .latest-go { letter-spacing: 0.06em; }

/* ===== 全部投稿面板 ===== */
.works-panel {
  max-width: 1000px;
  margin: 24px auto 0;
  padding: 24px 22px 20px;
}

.works-head {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.works-stats { font-size: 0.92rem; color: var(--ink-soft); }

.works-stats b { color: var(--purple); font-size: 1.12rem; }

.works-dot { margin: 0 7px; opacity: 0.5; }

.works-search {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.85);
  border: 1.5px solid rgba(31, 158, 146, 0.22);
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.works-search:focus-within {
  border-color: rgba(31, 158, 146, 0.6);
  box-shadow: 0 0 0 3px rgba(46, 196, 182, 0.16);
}

.works-search-icon { font-size: 0.86rem; opacity: 0.7; }

.works-search input {
  border: none;
  outline: none;
  background: transparent;
  font-family: inherit;
  font-size: 0.9rem;
  color: var(--ink);
  width: 150px;
}

.works-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.works-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1.5px solid rgba(31, 158, 146, 0.22);
  background: rgba(255, 255, 255, 0.7);
  color: var(--ink-soft);
  font-family: inherit;
  font-size: 0.84rem;
  cursor: pointer;
  transition: background 0.25s, color 0.25s, border-color 0.25s, transform 0.2s;
}

.works-tab em {
  font-style: normal;
  font-size: 0.72rem;
  opacity: 0.72;
}

.works-tab:hover { transform: translateY(-1px); border-color: rgba(31, 158, 146, 0.5); }

.works-tab.is-active {
  background: linear-gradient(120deg, var(--purple), var(--pink));
  border-color: transparent;
  color: #fff;
}

.works-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(178px, 1fr));
  gap: 16px;
}

.work-card {
  display: flex;
  flex-direction: column;
  gap: 7px;
  border-radius: 16px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.9);
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.work-card:hover {
  transform: translateY(-4px);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 14px 30px rgba(31, 158, 146, 0.18);
}

.work-cover {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  border-radius: 11px;
  overflow: hidden;
  background: linear-gradient(140deg, #d9f2ec, #e7faf5);
}

.work-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.work-dur {
  position: absolute;
  right: 6px;
  bottom: 6px;
  padding: 1px 7px;
  border-radius: 6px;
  font-size: 0.7rem;
  color: #fff;
  background: rgba(0, 0, 0, 0.55);
}

.work-title {
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.work-meta { font-size: 0.74rem; color: var(--ink-soft); }

.works-empty {
  padding: 26px 0;
  text-align: center;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.works-foot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
}

.works-more { cursor: pointer; font-family: inherit; }

.works-note {
  text-align: center;
  font-size: 0.78rem;
  color: var(--ink-soft);
}

.works-note code {
  font-size: 0.94em;
  padding: 1px 6px;
  border-radius: 5px;
  background: rgba(31, 158, 146, 0.1);
  color: var(--purple);
}

/* ===== 关注 CTA ===== */
.cta-band {
  max-width: 1000px;
  margin: 0 auto;
  padding: 34px 32px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  background: linear-gradient(120deg, rgba(255, 240, 246, 0.9), rgba(232, 250, 245, 0.9));
  border-color: rgba(251, 114, 153, 0.35);
}

.cta-text h2 {
  font-family: var(--font-head);
  font-size: 1.3rem;
  margin-bottom: 8px;
}

.cta-text p { color: var(--ink-soft); font-size: 0.92rem; }

@media (max-width: 720px) {
  .latest-link { grid-template-columns: 1fr; }
  .latest-cover { aspect-ratio: 16 / 9; }
  .latest-body { padding: 20px 20px 24px; }
  .cta-band { justify-content: center; text-align: center; }
  .works-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
  .works-head { justify-content: center; }
  .works-search input { width: 110px; }
}

/* ===== 联系方式 ===== */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.contact-card {
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-start;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

a.contact-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 26px 56px rgba(31, 158, 146, 0.24);
}

.contact-icon { font-size: 1.8rem; }

.contact-name { font-weight: 700; }

.contact-value { color: var(--ink-soft); font-size: 0.9rem; word-break: break-all; }

/* ===== 页脚 ===== */
.site-footer {
  padding: 40px 0 46px;
  text-align: center;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

/* ===== 滚动显现动画 ===== */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== 响应式 ===== */
/* 中等及以下屏幕：右上角统计精简成「你是本站第 N 位访客」。
   ⚠️ 必须把 .vc-pv 一起隐藏——只藏标签不藏数字的话，会变成
   「你是本站第 29 位访客 69」这种后面挂个光秃秃数字的样子。 */
@media (max-width: 1100px) {
  .visit-counter .vc-total,
  .visit-counter .vc-sep,
  .visit-counter .vc-icon,
  .visit-counter .vc-pv { display: none; }
  .nav-links a { padding: 8px 12px; }
}

@media (max-width: 860px) {
  .about-card { grid-template-columns: 1fr; text-align: center; }
  .about-tags { justify-content: center; }

  .nav-toggle { display: flex; }
  .nav-links {
    position: fixed;
    top: 68px; right: 16px; left: 16px;
    flex-direction: column;
    gap: 4px;
    padding: 14px;
    background: rgba(255, 255, 255, 0.94);
    border-radius: 20px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    opacity: 0;
    transform: translateY(-12px);
    pointer-events: none;
    transition: opacity 0.3s, transform 0.3s;
  }
  .nav-links.open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }
  .nav-links a { text-align: center; padding: 12px; }
}

/* 窄屏：右上角统计进一步压缩 */
@media (max-width: 480px) {
  .visit-counter { font-size: 0.66rem; padding: 4px 9px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001s !important;
  }
  .reveal { opacity: 1; transform: none; }
  .bg-layer.kb { animation: none; }
}

/* ===== 深色模式 =====
   萤火虫主题本来就是夜空，所以深色是「本体」。
   主题由 <head> 里的内联脚本决定（记忆优先，否则跟随系统），
   统一落在 <html data-theme="dark"> 上，这里只需一套覆盖规则。
   —— 只覆盖「浅色专有」的东西，浅色模式完全不受影响。 */
html[data-theme="dark"] {
  --bg-1: #0d181c;
  --bg-2: #101f24;
  --ink: #dcebe8;
  --ink-soft: #93ada8;
  --pink: #3fd8c8;
  --purple: #4fd0c0;
  --blue: #2f8d83;
  --card: rgba(22, 37, 42, 0.74);
  --card-border: rgba(82, 126, 120, 0.5);
  --shadow: 0 18px 48px rgba(0, 0, 0, 0.5);
  color-scheme: dark;
}

html[data-theme="dark"] body {
  background: linear-gradient(160deg, #0d181c 0%, #101f24 45%, #0b1519 100%);
}

/* 背景图上的压暗层：浅色是提亮，深色要压暗 */
html[data-theme="dark"] .bg-overlay {
  background: linear-gradient(180deg,
    rgba(8, 18, 22, 0.66) 0%,
    rgba(9, 20, 24, 0.52) 50%,
    rgba(6, 14, 18, 0.72) 100%);
}

html[data-theme="dark"] .site-header.scrolled {
  background: rgba(14, 26, 30, 0.8);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.4);
}

html[data-theme="dark"] .logo,
html[data-theme="dark"] .hero h1 {
  background: linear-gradient(100deg, #4fd0c0 0%, #6ee7d8 45%, #9df0e6 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

html[data-theme="dark"] .visit-counter,
html[data-theme="dark"] .site-header.scrolled .visit-counter {
  background: rgba(22, 37, 42, 0.78);
  border-color: rgba(82, 126, 120, 0.42);
  /* 说明文字原来是写死的深色 rgba(55,81,76,.68)，压在深色底上只有 1.5:1，
     基本看不见；数字 <b> 用的是 --purple，本来就没问题 */
  color: rgba(222, 238, 235, 0.86);
}

html[data-theme="dark"] .nav-toggle { background: rgba(22, 37, 42, 0.85); }

html[data-theme="dark"] .bg-credit {
  background: rgba(20, 34, 38, 0.7);
  color: rgba(220, 235, 232, 0.6);
}

html[data-theme="dark"] .rt-toggle { color: rgba(220, 235, 232, 0.62); }

html[data-theme="dark"] .rt-track { background: rgba(220, 235, 232, 0.28); }

/* 按钮 */
html[data-theme="dark"] .btn-ghost {
  background: rgba(26, 43, 48, 0.85);
  color: var(--purple);
  border-color: rgba(79, 208, 192, 0.45);
}

html[data-theme="dark"] .btn-ghost:hover { background: rgba(34, 55, 61, 0.95); }

/* 图标底板 / 头像环 这些浅色渐变在深色下会变成刺眼的白块 */
html[data-theme="dark"] .notice-icon,
html[data-theme="dark"] .resource-icon,
html[data-theme="dark"] .project-icon {
  background: linear-gradient(140deg, #1b2f34, #16272c);
  box-shadow: inset 0 0 0 2px rgba(82, 126, 120, 0.35);
}

html[data-theme="dark"] .avatar-ring {
  border-color: rgba(82, 126, 120, 0.55);
  background: linear-gradient(140deg, #1b2f34, #16272c);
}

html[data-theme="dark"] .about-tags li {
  background: rgba(26, 43, 48, 0.85);
  border-color: rgba(79, 208, 192, 0.28);
}

html[data-theme="dark"] .notice-card.warn {
  background: rgba(52, 44, 22, 0.72);
  border-color: rgba(255, 209, 102, 0.4);
}

html[data-theme="dark"] .notice-card.warn .notice-icon {
  background: linear-gradient(140deg, #3b3218, #2e2712);
}

html[data-theme="dark"] .notice-pwd,
html[data-theme="dark"] .resource-pwd {
  background: rgba(26, 43, 48, 0.8);
  border-color: rgba(79, 208, 192, 0.35);
}

html[data-theme="dark"] .resource-disclaimer {
  color: #e0c98a;
  background: rgba(58, 48, 20, 0.6);
  border-color: rgba(255, 209, 102, 0.35);
}

html[data-theme="dark"] .project-tags span { background: rgba(79, 208, 192, 0.16); }

/* 排期日历 */
html[data-theme="dark"] .cal,
html[data-theme="dark"] .cal-detail {
  background: rgba(18, 32, 37, 0.6);
  box-shadow: inset 0 0 0 1px rgba(82, 126, 120, 0.28);
}

html[data-theme="dark"] .cal-nav {
  background: rgba(26, 43, 48, 0.9);
  border-color: rgba(82, 126, 120, 0.5);
}

html[data-theme="dark"] .cal-nav:hover { background: rgba(34, 55, 61, 0.95); }

html[data-theme="dark"] .cal-day { background: rgba(26, 43, 48, 0.55); }

html[data-theme="dark"] .cal-day.is-blank { background: transparent; }

html[data-theme="dark"] .cal-day.has-song.is-past {
  background: rgba(120, 138, 135, 0.18);
  color: #8fa09d;
}

html[data-theme="dark"] .cal-day.has-song.is-today {
  background: rgba(255, 209, 102, 0.18);
  color: #ffd97a;
}

html[data-theme="dark"] .cal-day.has-song.is-future {
  background: rgba(64, 186, 108, 0.18);
  color: #7fd8a3;
}

html[data-theme="dark"] .cal-day.is-today { border-color: rgba(255, 209, 102, 0.55); }

html[data-theme="dark"] .cal-day.is-selected {
  border-color: var(--purple);
  box-shadow: 0 0 0 2px rgba(79, 208, 192, 0.25);
}

html[data-theme="dark"] .detail-tag.is-past { color: #8fa09d; background: rgba(120, 138, 135, 0.18); }
html[data-theme="dark"] .detail-tag.is-today { color: #ffd97a; background: rgba(255, 209, 102, 0.16); }
html[data-theme="dark"] .detail-tag.is-future { color: #7fd8a3; background: rgba(64, 186, 108, 0.16); }

html[data-theme="dark"] .detail-meta > div { border-top-color: rgba(82, 126, 120, 0.3); }

/* 作品栏 */
html[data-theme="dark"] .works-search {
  background: rgba(26, 43, 48, 0.85);
  border-color: rgba(82, 126, 120, 0.45);
}

html[data-theme="dark"] .works-tab {
  background: rgba(26, 43, 48, 0.8);
  border-color: rgba(82, 126, 120, 0.42);
}

/* 分类上的数量：浅色下 --ink-soft + 0.72 透明度刚好，深色底上就太暗（实测 4:1）。
   选中的那个 tab 是渐变底 + 白字，不受影响，所以排除掉。 */
html[data-theme="dark"] .works-tab:not(.is-active) em {
  color: #a8c6c1;
  opacity: 1;
}

/* 搜索框占位符原来没写颜色，用的是浏览器默认灰（深色底上 3.2:1） */
html[data-theme="dark"] .works-search input::placeholder {
  color: rgba(196, 216, 212, 0.72);
}

/* 作品标签用的是写死的 #1f9e92，深色底上只有 3.5:1 */
html[data-theme="dark"] .project-tags span {
  color: #74e3d3;
}

html[data-theme="dark"] .work-card {
  background: rgba(24, 40, 45, 0.7);
  border-color: rgba(82, 126, 120, 0.32);
}

html[data-theme="dark"] .work-card:hover {
  background: rgba(32, 52, 58, 0.92);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.45);
}

html[data-theme="dark"] .work-cover,
html[data-theme="dark"] .latest-cover {
  background: linear-gradient(140deg, #1b2f34, #16272c);
}

html[data-theme="dark"] .latest-badge {
  background: linear-gradient(120deg, #2f8d83, #3fd8c8);
  color: #0c1a1d;
}

html[data-theme="dark"] .works-note code {
  background: rgba(79, 208, 192, 0.14);
  color: var(--purple);
}

/* 关注 CTA */
html[data-theme="dark"] .cta-band {
  background: linear-gradient(120deg, rgba(48, 30, 40, 0.85), rgba(20, 42, 40, 0.85));
  border-color: rgba(251, 114, 153, 0.32);
}

/* 主题切换按钮（要压过 .bg-credit button 的渐变样式，所以提高一级选择器） */
.bg-credit .theme-toggle {
  border: none;
  cursor: pointer;
  font-size: 0.82rem;
  line-height: 1;
  color: inherit;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  transition: transform 0.2s ease, background 0.25s ease;
}

.bg-credit .theme-toggle:hover { transform: translateY(-1px); }

html[data-theme="dark"] .bg-credit .theme-toggle { background: rgba(26, 43, 48, 0.9); }

/* ============================================================
   「去 AI 味」打磨 —— 仅对深色主题生效，浅色主题完全不动
   来源：impeccable 检测器的 slop 类提示（共 21 条）
   注意：这些原本是刻意的风格选择，改完个性会变淡，不满意整段删掉即可还原。
   ============================================================ */

/* 1) 卡片：「1.5px 硬描边 + 48px 大阴影」是检测器点名的通用 AI 卡片套路。
      改成更淡的边 + 更收敛的阴影，再补一道顶部内高光——轮廓还在，但不像在描边。 */
html[data-theme="dark"] {
  --card-border: rgba(82, 126, 120, 0.22);
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.42);
}

html[data-theme="dark"] .glass {
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* 2) 按钮去掉彩色发光（深色底上的彩色光晕是第二类 AI 味），换中性投影 */
html[data-theme="dark"] .btn-bili {
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.34);
}

html[data-theme="dark"] .btn-bili:hover {
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.44);
}

html[data-theme="dark"] .latest-badge,
html[data-theme="dark"] .sf-submit {
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.34);
}

/* 3) 青色渐变改成纯色（检测器的「AI 配色」：紫/青渐变是最典型的生成味） */
html[data-theme="dark"] .bg-credit button,
html[data-theme="dark"] .sf-submit,
html[data-theme="dark"] .latest-badge {
  background: #2ec4b6;
}

/* 3b) 对比度：亮色底上继续用白字只有 1.8~2.1:1，改成深色文字（7:1 以上）。
       这也正是 Spotify 那套设计系统的做法——鲜亮强调色配黑字，而不是白字。 */
html[data-theme="dark"] .btn-bili,
html[data-theme="dark"] .bg-credit button,
html[data-theme="dark"] .sf-submit,
html[data-theme="dark"] .latest-badge {
  color: #10181a;
}

/* 4) 渐变文字改成纯色 —— logo 和首屏大标题。这一条对个性影响最大。 */
html[data-theme="dark"] .logo,
html[data-theme="dark"] .hero h1 {
  background: none;
  -webkit-background-clip: border-box;
  background-clip: border-box;
  color: #5fe0cf;
}

/* 5) 日历里的「卡片套卡片」：去掉内层面的底色，只留一道极淡的框做分区 */
html[data-theme="dark"] .cal {
  background: transparent;
  box-shadow: none;
}

html[data-theme="dark"] .cal-detail {
  background: transparent;
  box-shadow: inset 0 0 0 1px rgba(82, 126, 120, 0.18);
}

html[data-theme="dark"] .project-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  font-size: 1.5rem;
  margin-bottom: 12px;
}

/* 8) 导航链接浮在背景插画上，对比度取决于插画本身的明暗（实测 2.6~4.3:1）。
      加一道暗投影，不改变玻璃感，但在浅色插画上也能读清。 */
html[data-theme="dark"] .nav-links a {
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7), 0 0 12px rgba(0, 0, 0, 0.35);
}

/* 9) 首屏的滚动提示：缓动本来就是 ease-in-out，但键帧名叫 bounce 会被判定为弹跳缓动，
      已在上方改名 scroll-nudge 并把幅度收到 7px。 */

/* ============================================================
   账号系统（登录 / 注册 / 我的账号）
   配色全部走现有变量，深浅两个主题都不用另写一套
   ============================================================ */

/* 导航上的账号按钮 */
.nav-auth { display: flex; align-items: center; }

.nav-auth-btn {
  font: inherit;
  font-size: 0.84rem;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 999px;
  cursor: pointer;
  color: var(--ink);
  background: var(--card);
  border: 1.5px solid var(--card-border);
  transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.2s;
}

.nav-auth-btn:hover { transform: translateY(-1px); border-color: var(--purple); }

.nav-auth-btn.is-signed-in {
  color: #10181a;
  background: linear-gradient(120deg, var(--purple), var(--pink));
  border-color: transparent;
  letter-spacing: 0.03em;
  font-variant-numeric: tabular-nums;
}

/* 左下角的 SID 徽标 */
.sid-badge {
  position: fixed;
  left: 14px;
  bottom: 12px;
  z-index: 5;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font: inherit;
  font-size: 0.72rem;
  padding: 5px 11px 5px 9px;
  border-radius: 999px;
  cursor: pointer;
  color: var(--ink);
  background: var(--card);
  border: 1.5px solid var(--card-border);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: transform 0.2s, border-color 0.2s;
}

.sid-badge[hidden] { display: none; }

.sid-badge:hover { transform: translateY(-1px); border-color: var(--purple); }

.sid-badge-label {
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
}

.sid-badge-value {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  font-variant-numeric: tabular-nums;
  color: var(--purple);
}

@media (max-width: 560px) {
  .sid-badge { left: 10px; bottom: 10px; font-size: 0.68rem; padding: 4px 9px 4px 8px; }
}

/* 遮罩 */
.auth-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(10, 22, 26, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.auth-overlay[hidden] { display: none; }

body.auth-open { overflow: hidden; }

/* 弹窗本体 */
.auth-modal {
  position: relative;
  width: min(420px, 100%);
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  padding: 28px 26px 24px;
  border-radius: 22px;
}

.auth-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 30px;
  height: 30px;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  font-size: 0.9rem;
  line-height: 1;
  color: var(--ink-soft);
  background: rgba(127, 127, 127, 0.14);
  transition: background 0.2s, color 0.2s;
}

.auth-close:hover { color: var(--ink); background: rgba(127, 127, 127, 0.26); }

.auth-modal-title {
  font-family: var(--font-head);
  font-size: 1.35rem;
  color: var(--ink);
  margin-bottom: 18px;
}

/* 登录 / 注册 切换 */
.auth-tabs {
  display: flex;
  gap: 6px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(127, 127, 127, 0.12);
  margin-bottom: 18px;
}

.auth-tab {
  flex: 1;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  padding: 8px 0;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  color: var(--ink-soft);
  background: transparent;
  transition: background 0.2s, color 0.2s;
}

.auth-tab.is-active {
  color: #10181a;
  background: linear-gradient(120deg, var(--purple), var(--pink));
}

/* 表单 */
.auth-form { display: flex; flex-direction: column; gap: 14px; }

.auth-field { display: flex; flex-direction: column; gap: 6px; }

/* hidden 属性只是 UA 样式表里的 display:none，
   会被上面的 display:flex 覆盖掉，所以必须显式写一条。
   （不加这条，登录 tab 下 QQ 号字段会一直露出来） */
.auth-field[hidden] { display: none; }

.auth-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--ink);
}

.auth-hint {
  display: block;
  margin-top: 2px;
  font-size: 0.72rem;
  font-weight: 400;
  color: var(--ink-soft);
}

.auth-field input {
  width: 100%;
  font: inherit;
  font-size: 0.94rem;
  padding: 11px 14px;
  border-radius: 12px;
  color: var(--ink);
  background: rgba(127, 127, 127, 0.14);
  /* 卡片边框为了去 AI 味已经调淡，输入框这里单独给强一点，否则看不出是输入框 */
  border: 1.5px solid rgba(127, 127, 127, 0.38);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.auth-field input:focus {
  outline: none;
  border-color: var(--purple);
  box-shadow: 0 0 0 3px rgba(46, 196, 182, 0.16);
}

.auth-field input::placeholder { color: var(--ink-soft); opacity: 0.7; }

.auth-msg {
  min-height: 1.3em;
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.5;
}

.auth-msg.is-err { color: #e2565a; }
.auth-msg.is-ok { color: var(--purple); }
.auth-msg.is-wait { color: var(--ink-soft); }

.auth-submit {
  width: 100%;
  justify-content: center;
  margin-top: 2px;
}

/* 我的账号 */
.auth-facts { display: grid; gap: 12px; margin-bottom: 14px; }

.auth-facts > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px dashed var(--card-border);
}

.auth-facts dt { font-size: 0.82rem; color: var(--ink-soft); }

.auth-facts dd {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--ink);
  word-break: break-all;
  text-align: right;
}

.auth-my-sid {
  font-size: 1.15rem !important;
  color: var(--purple) !important;
  letter-spacing: 0.08em;
  font-variant-numeric: tabular-nums;
}

.auth-note {
  font-size: 0.78rem;
  color: var(--ink-soft);
  line-height: 1.6;
  margin-bottom: 16px;
}

@media (max-width: 560px) {
  .nav-auth-btn { font-size: 0.8rem; padding: 5px 11px; }
  .auth-modal { padding: 24px 20px 20px; border-radius: 18px; }
}

/* ============================================================
   社区（发帖 / 信息流 / 点赞 / 评论）
   配色走现有变量，深浅两套主题都自动适配
   ============================================================ */

.comm-card {
  max-width: 1000px;
  margin: 0 auto;
  padding: 26px 28px 24px;
}

/* 发帖框 */
.comm-composer[hidden] { display: none; }

.comm-composer textarea {
  width: 100%;
  font: inherit;
  font-size: 0.94rem;
  line-height: 1.7;
  padding: 12px 14px;
  border-radius: 14px;
  resize: vertical;
  color: var(--ink);
  background: rgba(127, 127, 127, 0.14);
  border: 1.5px solid rgba(127, 127, 127, 0.38);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.comm-composer textarea:focus {
  outline: none;
  border-color: var(--purple);
  box-shadow: 0 0 0 3px rgba(46, 196, 182, 0.16);
}

.comm-composer textarea::placeholder { color: var(--ink-soft); opacity: 0.75; }

.comm-composer-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 12px 0 20px;
}

.comm-hint { font-size: 0.8rem; line-height: 1.5; min-height: 1.2em; }
.comm-hint.is-ok { color: var(--purple); }
.comm-hint.is-err { color: #e2565a; }

.comm-send { min-width: 96px; }

/* 未登录提示 */
.comm-login-tip {
  margin: 4px 0 20px;
  font-size: 0.9rem;
  color: var(--ink-soft);
}

.comm-login-tip[hidden] { display: none; }

.comm-login-tip a { color: var(--purple); font-weight: 700; }

/* 帖子 */
/* 主页预览区：3 条并排，别一列拉到底 */
.comm-feed {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 14px;
  align-items: start;
}

@media (max-width: 720px) {
  .comm-feed { grid-template-columns: 1fr; }
}

.comm-post {
  border-radius: 16px;
  padding: 16px 18px 12px;
  background: rgba(127, 127, 127, 0.08);
  border: 1px solid var(--card-border);
}

.comm-head {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.comm-sid {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 2px 8px;
  border-radius: 999px;
  color: var(--purple);
  background: rgba(46, 196, 182, 0.14);
  font-variant-numeric: tabular-nums;
}

.comm-name { font-size: 0.88rem; font-weight: 700; color: var(--ink); }

.comm-time { font-size: 0.74rem; color: var(--ink-soft); }

.comm-del {
  margin-left: auto;
  font: inherit;
  font-size: 0.72rem;
  padding: 2px 8px;
  border-radius: 999px;
  cursor: pointer;
  color: #e2565a;
  background: transparent;
  border: 1px solid rgba(226, 86, 90, 0.4);
  transition: background 0.2s;
}

.comm-del:hover { background: rgba(226, 86, 90, 0.12); }

.comm-body {
  font-size: 0.94rem;
  line-height: 1.75;
  color: var(--ink);
  white-space: pre-wrap;      /* 用户敲的换行要保留 */
  word-break: break-word;
  margin-bottom: 12px;
}

.comm-foot { display: flex; gap: 8px; }

.comm-btn {
  font: inherit;
  font-size: 0.8rem;
  padding: 5px 12px;
  border-radius: 999px;
  cursor: pointer;
  color: var(--ink-soft);
  background: transparent;
  border: 1px solid var(--card-border);
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.comm-btn:hover { color: var(--ink); border-color: var(--purple); }

.comm-btn:disabled { opacity: 0.6; cursor: default; }

.comm-like .comm-heart { margin-right: 4px; }

.comm-like.is-on {
  color: #ff6b81;
  border-color: rgba(255, 107, 129, 0.5);
  background: rgba(255, 107, 129, 0.1);
}

/* 评论区 */
.comm-comments {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--card-border);
}

.comm-comments[hidden] { display: none; }

.comm-cmt-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }

.comm-cmt { display: flex; flex-direction: column; gap: 3px; }

.comm-cmt-head {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 0.76rem;
  color: var(--ink-soft);
}

.comm-cmt-head b { color: var(--purple); font-size: 0.68rem; letter-spacing: 0.06em; }

.comm-cmt-head time { font-size: 0.7rem; opacity: 0.8; }

.comm-cmt-head .comm-del { margin-left: auto; font-size: 0.68rem; }

.comm-cmt-body {
  font-size: 0.88rem;
  line-height: 1.65;
  color: var(--ink);
  white-space: pre-wrap;
  word-break: break-word;
}

.comm-cmt-none, .comm-cmt-loading { font-size: 0.8rem; color: var(--ink-soft); }

.comm-cmt-form { display: flex; gap: 8px; }

.comm-cmt-form input {
  flex: 1;
  min-width: 0;
  font: inherit;
  font-size: 0.86rem;
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--ink);
  background: rgba(127, 127, 127, 0.12);
  border: 1.5px solid rgba(127, 127, 127, 0.32);
}

.comm-cmt-form input:focus {
  outline: none;
  border-color: var(--purple);
  box-shadow: 0 0 0 3px rgba(46, 196, 182, 0.14);
}

.comm-cmt-form input::placeholder { color: var(--ink-soft); opacity: 0.75; }

.comm-cmt-form button {
  font-size: 0.82rem;
  padding: 8px 16px;
  min-width: 0;
}

/* 空状态 / 加载更多 */
.comm-empty {
  padding: 28px 0;
  text-align: center;
  font-size: 0.9rem;
  color: var(--ink-soft);
}

.comm-more { display: flex; justify-content: center; margin-top: 16px; }

.comm-more-btn {
  font: inherit;
  font-size: 0.84rem;
  padding: 8px 22px;
  border-radius: 999px;
  cursor: pointer;
  color: var(--ink);
  background: rgba(127, 127, 127, 0.12);
  border: 1px solid var(--card-border);
  transition: border-color 0.2s;
}

.comm-more-btn:hover { border-color: var(--purple); }

@media (max-width: 600px) {
  .comm-card { padding: 20px 16px 18px; }
  .comm-post { padding: 14px 14px 10px; }
  .comm-composer-bar { flex-direction: column; align-items: stretch; }
  .comm-send { width: 100%; }
  .comm-cmt-form { flex-direction: column; }
  .comm-cmt-form button { width: 100%; }
}

/* ============================================================
   社区独立页面（community.html）+ 主页预览
   ============================================================ */

/* --- 主页预览 --- */
.comm-preview-tip {
  font-size: 0.86rem;
  color: var(--ink-soft);
  margin-bottom: 16px;
}

.comm-post.is-compact .comm-body { margin-bottom: 8px; }

.comm-preview-more {
  display: flex;
  justify-content: center;
  margin-top: 6px;
}

.comm-preview-more a {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--purple);
  padding: 9px 22px;
  border-radius: 999px;
  border: 1px solid var(--card-border);
  transition: border-color 0.2s, transform 0.2s;
}

.comm-preview-more a:hover { border-color: var(--purple); transform: translateY(-1px); }

/* --- 独立页面外壳 --- */
.comm-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.comm-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background: linear-gradient(160deg, var(--bg-1) 0%, var(--bg-2) 45%, #e9f6f2 100%);
}

html[data-theme="dark"] .comm-bg {
  background: linear-gradient(160deg, #0d181c 0%, #101f24 45%, #0b1519 100%);
}

.comm-top {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px clamp(16px, 5vw, 40px) 0;
}

.comm-back {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--ink-soft);
  padding: 7px 16px;
  border-radius: 999px;
  border: 1px solid var(--card-border);
  background: var(--card);
  transition: color 0.2s, border-color 0.2s;
}

.comm-back:hover { color: var(--ink); border-color: var(--purple); }

.comm-top-title {
  font-family: var(--font-head);
  font-size: clamp(1.3rem, 3.5vw, 1.8rem);
  color: var(--ink);
}

.comm-main {
  flex: 1;
  padding: 22px clamp(16px, 5vw, 40px) 60px;
}

/* 社区页用更宽的容器，帖子按两栏排（原来是 760 一列，中间大片空白浪费） */
.comm-page .comm-card {
  max-width: 1180px;
  margin: 0 auto;
}

.comm-page .comm-feed {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(440px, 1fr));
  gap: 16px;
  align-items: start;
}

@media (max-width: 980px) {
  .comm-page .comm-feed { grid-template-columns: 1fr; }
}

/* --- 工具条（排序） --- */
.comm-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px dashed var(--card-border);
}

.comm-count { font-size: 0.78rem; color: var(--ink-soft); }

.comm-sort {
  display: flex;
  gap: 4px;
  padding: 3px;
  border-radius: 999px;
  background: rgba(127, 127, 127, 0.12);
}

.comm-sort-btn {
  font: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 5px 16px;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  color: var(--ink-soft);
  background: transparent;
  transition: background 0.2s, color 0.2s;
}

.comm-sort-btn.is-active {
  color: #10181a;
  background: linear-gradient(120deg, var(--purple), var(--pink));
}

@media (max-width: 600px) {
  .comm-page .comm-card { padding: 18px 14px 16px; }
}

/* --- 社区：用户名可点，点了展开 SID + QQ --- */
.comm-name,
.comm-cmt-name {
  font: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--ink);
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  border-bottom: 1px dashed transparent;
  transition: color 0.2s, border-color 0.2s;
}

.comm-cmt-name { font-size: 0.76rem; }

.comm-name:hover,
.comm-cmt-name:hover {
  color: var(--purple);
  border-bottom-color: var(--purple);
}

.comm-name:disabled,
.comm-cmt-name:disabled { opacity: 0.6; cursor: default; }

.comm-who {
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: 999px;
  color: var(--ink-soft);
  background: rgba(127, 127, 127, 0.14);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.comm-who[hidden] { display: none; }

/* 黄V 认证徽标 */
.comm-v {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  font-size: 0.6rem;
  font-weight: 900;
  line-height: 1;
  color: #3d2c00;
  background: linear-gradient(145deg, #ffd54a, #f5b301);
  box-shadow: 0 1px 4px rgba(245, 179, 1, 0.45);
  vertical-align: 1px;
  flex: none;
}

/* ============================================================
   在线对话（chat.html）
   ============================================================ */

.chat-page { min-height: 100vh; display: flex; flex-direction: column; }

.chat-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background: linear-gradient(160deg, var(--bg-1) 0%, var(--bg-2) 45%, #e9f6f2 100%);
}

html[data-theme="dark"] .chat-bg {
  background: linear-gradient(160deg, #0d181c 0%, #101f24 45%, #0b1519 100%);
}

.chat-top {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px clamp(16px, 5vw, 40px) 0;
}

.chat-back {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--ink-soft);
  padding: 7px 16px;
  border-radius: 999px;
  border: 1px solid var(--card-border);
  background: var(--card);
  transition: color 0.2s, border-color 0.2s;
}

.chat-back:hover { color: var(--ink); border-color: var(--purple); }

.chat-top-title {
  font-family: var(--font-head);
  font-size: clamp(1.3rem, 3.5vw, 1.8rem);
  color: var(--ink);
}

.chat-main {
  flex: 1;
  display: flex;
  padding: 22px clamp(16px, 5vw, 40px) 40px;
}

/* 固定高度：消息再多也只是让里面的 .chat-log 滚动，
   不会把整页撑长（原来用 min-height，聊久了页面越来越长，回不到顶部）。 */
.chat-card {
  width: min(860px, 100%);
  margin: 0 auto;
  padding: 18px 20px 16px;
  display: flex;
  flex-direction: column;
  height: min(76vh, 720px);
  min-height: 420px;
}

/* 顶部状态条 */
.chat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  margin-bottom: 10px;
  border-bottom: 1px dashed var(--card-border);
  font-size: 0.78rem;
}

.chat-status { color: var(--ink-soft); }
.chat-status.is-wait { color: var(--purple); }
.chat-status.is-err { color: #e2565a; }
.chat-quota { color: var(--ink-soft); font-variant-numeric: tabular-nums; }

/* 对话区 */
.chat-log {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 4px 2px 12px;
  min-height: 200px;
}

.chat-row { display: flex; }
.chat-row.is-me { justify-content: flex-end; }
.chat-row.is-bot { justify-content: flex-start; }

.chat-bubble {
  position: relative;
  max-width: 82%;
  padding: 10px 14px 20px;
  border-radius: 16px;
  font-size: 0.92rem;
  line-height: 1.65;
}

.chat-row.is-me .chat-bubble {
  color: #10181a;
  background: linear-gradient(120deg, var(--purple), var(--pink));
  border-bottom-right-radius: 6px;
}

.chat-row.is-bot .chat-bubble {
  color: var(--ink);
  background: rgba(127, 127, 127, 0.14);
  border: 1px solid var(--card-border);
  border-bottom-left-radius: 6px;
}

.chat-text { white-space: pre-wrap; word-break: break-word; }

.chat-time {
  position: absolute;
  right: 12px;
  bottom: 5px;
  font-size: 0.64rem;
  opacity: 0.6;
  font-variant-numeric: tabular-nums;
}

.chat-tag {
  display: inline-block;
  margin-right: 6px;
  font-size: 0.66rem;
  padding: 1px 7px;
  border-radius: 999px;
  color: #e2565a;
  background: rgba(226, 86, 90, 0.14);
}

/* 正在输入的三个点 */
.chat-dots { display: inline-flex; gap: 4px; align-items: center; height: 1.2em; }
.chat-dots i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ink-soft);
  animation: chat-dot 1.2s ease-in-out infinite;
}
.chat-dots i:nth-child(2) { animation-delay: 0.15s; }
.chat-dots i:nth-child(3) { animation-delay: 0.3s; }

@keyframes chat-dot {
  0%, 100% { opacity: 0.25; transform: translateY(0); }
  50% { opacity: 1; transform: translateY(-2px); }
}

/* 未登录提示 */
.chat-login-tip {
  font-size: 0.9rem;
  line-height: 1.8;
  color: var(--ink-soft);
  text-align: center;
  padding: 30px 0;
}

.chat-login-tip[hidden] { display: none; }
.chat-login-tip a { color: var(--purple); font-weight: 700; }
.chat-login-note { font-size: 0.8rem; }

/* 输入区 */
.chat-form { display: flex; gap: 10px; padding-top: 12px; border-top: 1px solid var(--card-border); }
.chat-form[hidden] { display: none; }

.chat-form input {
  flex: 1;
  min-width: 0;
  font: inherit;
  font-size: 0.92rem;
  padding: 11px 16px;
  border-radius: 999px;
  color: var(--ink);
  background: rgba(127, 127, 127, 0.12);
  border: 1.5px solid rgba(127, 127, 127, 0.34);
}

.chat-form input:focus {
  outline: none;
  border-color: var(--purple);
  box-shadow: 0 0 0 3px rgba(46, 196, 182, 0.16);
}

.chat-form input::placeholder { color: var(--ink-soft); opacity: 0.75; }

.chat-send { min-width: 84px; min-height: 0; padding: 11px 20px; }

@media (max-width: 600px) {
  .chat-card { padding: 14px 14px 12px; min-height: 78vh; }
  .chat-bubble { max-width: 88%; }
  .chat-send { min-width: 0; padding: 11px 16px; }
}

/* 公告卡里的跳转按钮、社区页右上角的对话入口 */
.notice-btn { margin-top: 12px; font-size: 0.84rem; padding: 9px 18px; }
.comm-chat-link { margin-left: auto; }

/* ============================================================
   二级页面的站内导航（社区 / 对话 / 404 共用）
   原来这些页面只有「← 返回主页」，等于孤岛：回不去排期和作品
   ============================================================ */

.page-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
  flex-wrap: wrap;
}

.page-nav a {
  font-size: 0.82rem;
  font-weight: 700;
  padding: 6px 13px;
  border-radius: 999px;
  color: var(--ink-soft);
  transition: color 0.2s, background 0.2s;
}

.page-nav a:hover { color: var(--ink); background: rgba(127, 127, 127, 0.14); }

/* 当前页高亮（首页导航里也复用） */
.nav-links a.is-active,
.page-nav a.is-active {
  color: var(--purple);
}

@media (max-width: 620px) {
  .page-nav { width: 100%; margin-left: 0; margin-top: 8px; justify-content: flex-start; }
  .comm-top, .chat-top { flex-wrap: wrap; }
}
/* 访客统计在中等宽度下会挤掉导航，收起来；宽屏仍然显示 */
@media (max-width: 1240px) {
  .site-header .visit-counter { display: none; }
}

/* ============================================================
   设置页（settings.html）
   账号 / 外观 / 背景 / 关于 集中在一页
   ============================================================ */

.settings-page { min-height: 100vh; }

.settings-main {
  width: min(760px, 92%);
  margin: 0 auto;
  padding: 22px 0 72px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.settings-card {
  padding: 20px 22px 22px;
  border-radius: 18px;
}

.settings-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px dashed var(--card-border);
}

.settings-head h2 {
  font-family: var(--font-head);
  font-size: 1.05rem;
  color: var(--ink);
}

.settings-sub {
  font-size: 0.76rem;
  color: var(--ink-soft);
  text-align: right;
}

/* 一行设置项：左边说明，右边控件 */
.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
}

.settings-row + .settings-row { border-top: 1px solid rgba(127, 127, 127, 0.12); }

.settings-row-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.settings-row-text b { font-size: 0.9rem; color: var(--ink); font-weight: 700; }
.settings-row-text span { font-size: 0.78rem; color: var(--ink-soft); line-height: 1.5; }

.settings-btn { font-size: 0.82rem; padding: 9px 18px; white-space: nowrap; }

/* 分段控件（深色 / 浅色） */
.seg {
  display: inline-flex;
  flex: none;
  padding: 3px;
  border-radius: 999px;
  background: rgba(127, 127, 127, 0.16);
  border: 1px solid var(--card-border);
}

.seg button {
  font: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 6px 16px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
  white-space: nowrap;
}

.seg button.is-active {
  color: #10181a;
  background: linear-gradient(120deg, var(--purple), var(--pink));
}

.seg button:disabled:not(.is-active) { cursor: default; opacity: 0.55; }
.seg button:not(:disabled):not(.is-active):hover { color: var(--ink); }

/* 开关 */
.switch {
  position: relative;
  flex: none;
  width: 46px;
  height: 26px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid rgba(127, 127, 127, 0.36);
  background: rgba(127, 127, 127, 0.2);
  cursor: pointer;
  transition: background 0.22s, border-color 0.22s;
}

.switch-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.28);
  transition: transform 0.22s;
}

.switch[aria-checked="true"] {
  background: linear-gradient(120deg, var(--purple), var(--pink));
  border-color: transparent;
}

.switch[aria-checked="true"] .switch-thumb { transform: translateX(20px); }

/* 关于区的键值对 */
.settings-facts { margin-top: 4px; }
.settings-facts a { color: var(--purple); font-weight: 700; }
.settings-facts a:hover { text-decoration: underline; }
.settings-note { margin-top: 14px; }

/* 设置页里的账号表单不需要弹窗那套外边距 */
.settings-card .auth-tabs { margin-bottom: 14px; }
.settings-card .auth-form { gap: 12px; }
.settings-card .auth-submit { margin-top: 4px; }

@media (max-width: 620px) {
  .settings-main { width: 92%; padding-top: 16px; }
  .settings-card { padding: 16px 16px 18px; }
  .settings-row { gap: 10px; }
  .settings-row-text span { font-size: 0.74rem; }
  .seg button { padding: 6px 12px; }
}

/* 右下角署名条里的设置入口（其余控件已搬进设置页） */
.bg-credit-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  margin-left: 6px;
  border-radius: 50%;
  font-size: 0.82rem;
  line-height: 1;
  color: var(--ink-soft);
  background: rgba(127, 127, 127, 0.14);
  transition: color 0.2s, background 0.2s, transform 0.2s;
}

.bg-credit-link:hover {
  color: var(--ink);
  background: rgba(127, 127, 127, 0.26);
  transform: rotate(30deg);
}

/* ============================================================
   管理后台（admin.html）
   ============================================================ */

.admin-main {
  width: min(1080px, 94%);
  margin: 0 auto;
  padding: 22px 0 72px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.admin-logout {
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 6px 13px;
  border-radius: 999px;
  border: 1px solid var(--card-border);
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}

.admin-logout:hover { color: #e2565a; border-color: #e2565a; }

/* ---------- 概览数字 ---------- */

.admin-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 10px;
}

.admin-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 14px 8px;
  border-radius: 12px;
  background: rgba(127, 127, 127, 0.1);
  border: 1px solid var(--card-border);
}

.admin-stat b {
  font-family: var(--font-head);
  font-size: 1.5rem;
  line-height: 1;
  color: var(--purple);
  font-variant-numeric: tabular-nums;
}

.admin-stat span { font-size: 0.72rem; color: var(--ink-soft); }

/* 最近 7 天柱状图 */
.admin-week {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  align-items: end;
  height: 92px;
  margin-top: 16px;
  padding-top: 8px;
  border-top: 1px dashed var(--card-border);
}

.admin-bar {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  height: 100%;
}

.admin-bar i {
  display: block;
  width: 100%;
  max-width: 34px;
  min-height: 3px;
  border-radius: 4px 4px 2px 2px;
  background: linear-gradient(180deg, var(--purple), rgba(46, 196, 182, 0.35));
}

.admin-bar em {
  font-size: 0.62rem;
  font-style: normal;
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}

/* ---------- 工具条 ---------- */

.admin-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.admin-toolbar-top { margin-top: 14px; margin-bottom: 0; }

.admin-toolbar input[type="search"] {
  flex: 1;
  min-width: 180px;
  font: inherit;
  font-size: 0.84rem;
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--ink);
  background: rgba(127, 127, 127, 0.12);
  border: 1.5px solid rgba(127, 127, 127, 0.3);
}

.admin-toolbar input[type="search"]:focus {
  outline: none;
  border-color: var(--purple);
}

.admin-mini { font-size: 0.78rem; padding: 7px 14px; }

/* ---------- 表格 ---------- */

.admin-table-wrap { overflow-x: auto; }

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
  min-width: 620px;
}

.admin-table th {
  text-align: left;
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  padding: 6px 10px 8px;
  border-bottom: 1px solid var(--card-border);
  white-space: nowrap;
}

.admin-table td {
  padding: 9px 10px;
  border-bottom: 1px solid rgba(127, 127, 127, 0.1);
  color: var(--ink);
  vertical-align: middle;
}

.admin-table tbody tr:hover { background: rgba(127, 127, 127, 0.06); }

.admin-sid { font-family: ui-monospace, monospace; font-weight: 700; color: var(--purple); }
.admin-qq { font-variant-numeric: tabular-nums; }
.admin-when { color: var(--ink-soft); font-size: 0.76rem; white-space: nowrap; }
.admin-ops { white-space: nowrap; text-align: right; }

.admin-v {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 900;
  color: #3d2c00;
  background: linear-gradient(145deg, #ffd54a, #f5b301);
}

.admin-nov { color: var(--ink-soft); font-size: 0.76rem; }

/* ---------- 行内按钮 ---------- */

.admin-op {
  font: inherit;
  font-size: 0.74rem;
  font-weight: 700;
  padding: 4px 10px;
  margin-left: 6px;
  border-radius: 999px;
  border: 1px solid var(--card-border);
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
  transition: color 0.18s, border-color 0.18s, background 0.18s;
}

.admin-op:hover { color: var(--ink); background: rgba(127, 127, 127, 0.14); }
.admin-op:disabled { opacity: 0.45; cursor: default; }
.admin-op.is-danger:hover { color: #e2565a; border-color: #e2565a; background: rgba(226, 86, 90, 0.1); }

/* ---------- 帖子列表 ---------- */

.admin-post-list { display: flex; flex-direction: column; gap: 10px; }

.admin-post {
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(127, 127, 127, 0.08);
  border: 1px solid var(--card-border);
}

.admin-post-head {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.admin-post-head b { font-size: 0.84rem; color: var(--ink); }
.admin-post-meta { font-size: 0.72rem; color: var(--ink-soft); }

.admin-post-body {
  font-size: 0.86rem;
  line-height: 1.65;
  color: var(--ink);
  white-space: pre-wrap;
  word-break: break-word;
}

.admin-post-foot {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 8px;
  font-size: 0.74rem;
  color: var(--ink-soft);
}

.admin-post-foot > span { margin-right: auto; }

/* 评论 */
.admin-comments {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--card-border);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.admin-comment { padding-left: 10px; border-left: 2px solid var(--card-border); }
.admin-comment-head { display: flex; align-items: center; gap: 8px; margin-bottom: 3px; }
.admin-comment-head b { font-size: 0.8rem; color: var(--ink); }
.admin-comment-body { font-size: 0.82rem; line-height: 1.6; color: var(--ink); white-space: pre-wrap; word-break: break-word; }

.admin-empty, .admin-tip {
  font-size: 0.82rem;
  color: var(--ink-soft);
  text-align: center;
  padding: 18px 0;
}

@media (max-width: 620px) {
  .admin-main { width: 94%; padding-top: 16px; }
  .admin-stats { grid-template-columns: repeat(3, 1fr); }
  .admin-stat b { font-size: 1.25rem; }
  .admin-week { height: 76px; }
}