/* =========================================================
   部活の記憶 · member.css
   个人中心 / 讨论版 / 在线统计 —— 补充样式
   只用到 styles.css 里已有的变量，不覆盖任何原样式
   ========================================================= */

/* ---------- 首屏实时统计 ---------- */
/* 原来的 480px 装不下五项，放宽并允许换行，标题不折字 */
.hero-stats {
  max-width: 660px;
  flex-wrap: wrap;
  row-gap: 12px;
}

.hero-stats .stat { flex: 0 0 auto; }

.hero-stats .stat span { white-space: nowrap; }

.stat-live { position: relative; }

.stat-live .live-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 5px;
  border-radius: 50%;
  background: #2f7d4f;
  vertical-align: 2px;
}

.stat-live.is-on .live-dot { animation: livePulse 2.4s var(--ease) infinite; }

@keyframes livePulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(0.82); }
}

.stat-live.is-off .live-dot { background: var(--muted); animation: none; }

/* ---------- 讨论版 ---------- */
.discuss { background: var(--paper-2); }

.discuss-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.discuss-count {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--muted);
  text-transform: uppercase;
}

.post-list { margin-top: 4px; }

.post-item {
  border-bottom: 1px solid var(--line-soft);
}

.post-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px 20px;
  align-items: baseline;
  width: 100%;
  padding: 22px 4px;
  background: none;
  border: 0;
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: pointer;
  transition: background 0.2s ease;
}

.post-row:hover { background: rgba(0, 0, 0, 0.018); }

.post-title {
  font-size: 17px;
  font-weight: 500;
  letter-spacing: -0.005em;
  margin: 0 0 6px;
}

.post-meta {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.05em;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.post-excerpt {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--ink-2);
  font-size: 14px;
  line-height: 1.7;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-replies {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
}

.post-thread {
  padding: 4px 4px 26px;
}

.reply-list {
  list-style: none;
  margin: 0 0 16px;
  padding: 0 0 0 16px;
  border-left: 1px solid var(--line);
}

.reply-item { padding: 10px 0; }
.reply-item + .reply-item { border-top: 1px solid var(--line-soft); }

.reply-body {
  margin: 0;
  font-size: 14px;
  line-height: 1.7;
  color: var(--ink-2);
  white-space: pre-wrap;
  word-break: break-word;
}

.reply-form { display: flex; gap: 10px; align-items: flex-start; }

.reply-form textarea {
  flex: 1;
  min-height: 44px;
  padding: 11px 12px;
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 2px;
  resize: vertical;
}

.reply-form textarea:focus {
  outline: none;
  border-color: var(--ink);
}

.post-note {
  margin: 0;
  padding: 26px 0;
  font-size: 14px;
  color: var(--muted);
}

.post-note.is-err { color: #b4462f; }

/* ---------- 个人中心 ---------- */
.modal-card--member { max-width: 720px; }

.member-tabs {
  display: flex;
  gap: 26px;
  margin: 4px 0 22px;
  border-bottom: 1px solid var(--line);
}

.member-tab {
  position: relative;
  padding: 10px 0 12px;
  background: none;
  border: 0;
  font: inherit;
  font-size: 13px;
  letter-spacing: 0.02em;
  color: var(--muted);
  cursor: pointer;
}

.member-tab.is-on { color: var(--ink); }

.member-tab.is-on::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 1px;
  background: var(--ink);
}

.member-panel { min-height: 180px; }

.feed-item {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line-soft);
}

.feed-item:last-child { border-bottom: 0; }

.feed-kind {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  color: var(--muted);
  padding-top: 3px;
  white-space: nowrap;
}

.feed-text {
  margin: 0;
  font-size: 14px;
  line-height: 1.7;
  color: var(--ink-2);
  white-space: pre-wrap;
  word-break: break-word;
}

.feed-meta {
  margin-top: 6px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.04em;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

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

.resume-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 20px;
}

.resume-grid .field--wide { grid-column: 1 / -1; }

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

@media (max-width: 640px) {
  .resume-grid { grid-template-columns: 1fr; }
  .post-row { gap: 6px 12px; }
  .post-excerpt { -webkit-line-clamp: 3; }
  .member-tabs { gap: 18px; }
  .feed-item { grid-template-columns: 1fr; gap: 4px; }
  .reply-form { flex-direction: column; }
  .reply-form .btn { align-self: flex-end; }
}

/* ---------- 背景音乐 ---------- */
.bgm-btn {
  position: fixed;
  left: clamp(16px, 3vw, 30px);
  bottom: clamp(16px, 3vw, 30px);
  z-index: 45;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px 9px 12px;
  font-family: inherit;
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--ink-2);
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
  backdrop-filter: blur(6px);
  transition: border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.bgm-btn:hover { color: var(--ink); border-color: var(--ink); transform: translateY(-1px); }

.bgm-bars {
  display: inline-flex;
  align-items: flex-end;
  gap: 2px;
  height: 10px;
}

.bgm-bars i {
  display: block;
  width: 2px;
  height: 3px;
  background: currentColor;
  border-radius: 1px;
  transition: height 0.2s ease;
}

.bgm-btn.is-playing .bgm-bars i:nth-child(1) { animation: bgmBar 1.05s ease-in-out infinite; }
.bgm-btn.is-playing .bgm-bars i:nth-child(2) { animation: bgmBar 0.85s ease-in-out infinite 0.15s; }
.bgm-btn.is-playing .bgm-bars i:nth-child(3) { animation: bgmBar 1.25s ease-in-out infinite 0.3s; }

@keyframes bgmBar {
  0%, 100% { height: 3px; }
  50% { height: 10px; }
}

.bgm-btn.is-playing { color: var(--ink); border-color: var(--ink); }

.bgm-btn.is-hinting { animation: bgmHint 2.6s ease-in-out 3; }

@keyframes bgmHint {
  0%, 100% { transform: none; }
  50% { transform: translateY(-3px); }
}

@media (max-width: 640px) {
  .bgm-btn { padding: 8px 12px; font-size: 11px; }
  .bgm-btn .bgm-text { display: none; }
}

/* ---------- 届别分组 ---------- */
.era-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin: clamp(30px, 5vw, 58px) auto 10px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.era-head:first-of-type {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.era-name {
  margin: 0;
  font-size: clamp(20px, 2.6vw, 27px);
  font-weight: 500;
  letter-spacing: -0.015em;
}

.era-meta {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--muted);
  white-space: nowrap;
}

.era-head--inline {
  border-top: 0;
  padding-top: 0;
  margin: 26px auto 6px;
}

.doc-era + .doc-era { margin-top: 4px; }

.album-tag {
  margin: -4px 0 16px;
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.doc-note {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.8;
}

@media (max-width: 640px) {
  .era-head { flex-wrap: wrap; gap: 4px; }
}

/* ---------- 我的信息：头像与昵称 ---------- */
.info-top {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  margin: 4px 0 22px;
}

.info-avatar {
  flex: 0 0 auto;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--paper-2);
  border: 1px solid var(--line);
}

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

.info-avatar-fallback { font-size: 26px; color: var(--muted); }

.info-top-side { flex: 1; min-width: 0; }

.info-nick { margin-bottom: 10px; }

.info-avatar-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

.btn-line {
  font: inherit;
  font-size: 12px;
  letter-spacing: 0.04em;
  padding: 6px 13px;
  background: none;
  border: 1px solid var(--line);
  border-radius: 2px;
  color: var(--ink-2);
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.btn-line:hover { border-color: var(--ink); color: var(--ink); }
.btn-line:disabled { opacity: 0.5; cursor: default; }

.info-avatar-hint { font-size: 12px; color: var(--muted); }

@media (max-width: 520px) {
  .info-top { gap: 14px; }
  .info-avatar { width: 64px; height: 64px; }
}

/* ---------- 届别折叠 ---------- */
.era-block { border-top: 1px solid var(--line); }
.era-block:first-child { border-top: 0; }

.era-toggle {
  display: flex;
  align-items: baseline;
  gap: 14px;
  width: 100%;
  padding: clamp(22px, 3.2vw, 32px) 0 clamp(16px, 2.2vw, 22px);
  background: none;
  border: 0;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.era-toggle .era-name {
  font-size: clamp(22px, 2.8vw, 30px);
  font-weight: 500;
  letter-spacing: -0.015em;
  transition: opacity 0.2s ease;
}

.era-toggle:hover .era-name { opacity: 0.62; }

.era-sub {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--muted);
  white-space: nowrap;
}

.era-chev {
  position: relative;
  flex: 0 0 auto;
  margin-left: auto;
  width: 20px;
  height: 20px;
  align-self: center;
}

.era-chev::before,
.era-chev::after {
  content: "";
  position: absolute;
  background: var(--ink);
}

.era-chev::before {
  left: 0;
  top: 50%;
  width: 20px;
  height: 1px;
  transform: translateY(-50%);
}

.era-chev::after {
  top: 0;
  left: 50%;
  width: 1px;
  height: 20px;
  transform: translateX(-50%);
  transition: transform 0.24s var(--ease), opacity 0.24s var(--ease);
}

.era-block.is-open .era-chev::after { transform: translateX(-50%) rotate(90deg); opacity: 0; }

.era-body { display: none; }

.era-block.is-open .era-body {
  display: block;
  animation: eraIn 0.3s var(--ease);
  padding-bottom: clamp(18px, 3vw, 34px);
}

@keyframes eraIn {
  from { opacity: 0; transform: translateY(7px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .era-block.is-open .era-body { animation: none; }
}

/* ---------- 05 形象：四代并列 ---------- */
.id-grid--four { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 900px) {
  .id-grid--four { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- 登录弹窗：双模式 ---------- */
.auth-tabs {
  display: flex;
  gap: 22px;
  margin: 2px 0 18px;
  border-bottom: 1px solid var(--line);
}

.auth-tab {
  position: relative;
  padding: 8px 0 11px;
  background: none;
  border: 0;
  font: inherit;
  font-size: 13px;
  letter-spacing: 0.02em;
  color: var(--muted);
  cursor: pointer;
}

.auth-tab.is-on { color: var(--ink); }

.auth-tab.is-on::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 1px;
  background: var(--ink);
}

.auth-switch {
  margin: 14px 0 0;
  text-align: center;
}

.link-btn {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  font-size: 13px;
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.link-btn:hover { color: var(--ink); }

/* ---------- 回忆录入口 ---------- */
.memo-entry { margin: 16px 0 0; }

.memo-entry a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border: 1px solid var(--ink);
  border-radius: 2px;
  font-size: 13px;
  letter-spacing: 0.02em;
  transition: background 0.2s ease, color 0.2s ease;
}

.memo-entry a:hover { background: var(--ink); color: var(--paper); }

/* ---------- 06 文档标题更醒目 ---------- */
.doc-card .doc-title {
  font-size: clamp(17px, 1.35vw, 19px);
  font-weight: 600;
  letter-spacing: -0.012em;
  line-height: 1.35;
  margin-bottom: 3px;
}

.doc-sub {
  display: block;
  margin: 0 0 6px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--muted);
}

/* ---------- 01 里的回忆录卡片 ---------- */
.memo-album { margin-top: 8px; }

.memo-card {
  display: grid;
  gap: 4px;
  padding: clamp(20px, 3vw, 28px);
  border: 1px solid var(--line);
  border-radius: 2px;
  background: var(--paper-2);
  transition: border-color 0.2s ease, background 0.2s ease;
}

.memo-card:hover { border-color: var(--ink); background: #fff; }

.memo-card-kicker {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--muted);
  text-transform: uppercase;
}

.memo-card-title {
  font-size: clamp(19px, 2vw, 23px);
  font-weight: 500;
  letter-spacing: -0.015em;
}

.memo-card-desc {
  font-size: 13px;
  line-height: 1.7;
  color: var(--muted);
}

.memo-card-cta {
  margin-top: 8px;
  font-size: 13px;
  letter-spacing: 0.02em;
  border-bottom: 1px solid var(--ink);
  justify-self: start;
  padding-bottom: 2px;
}

/* ---------- 03 官方账号（B站） ---------- */
.years-grid--bili { grid-template-columns: 0.8fr 1.2fr; }
.bili-profile { display: flex; flex-direction: column; gap: 18px; }
.bili-card-id {
  display: flex; gap: 18px; align-items: center;
  padding: 22px; border: 1px solid var(--line);
  border-radius: 12px; background: var(--paper-2);
}
.bili-avatar { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; flex: 0 0 auto; }
.bili-id-copy { min-width: 0; }
.bili-name { display: flex; align-items: center; gap: 8px; font-size: 18px; font-weight: 600; }
.bili-level { font-size: 10px; font-weight: 600; color: #fff; background: #fb7299; border-radius: 4px; padding: 2px 6px; line-height: 1.4; }
.bili-sign { margin: 6px 0 0; font-size: 13.5px; color: var(--muted); }
.bili-stats { display: flex; gap: 18px; margin-top: 10px; font-size: 13px; color: var(--ink-2); }
.bili-stats b { color: var(--ink); font-family: var(--mono); font-weight: 600; }
.bili-go { align-self: flex-start; }
.bili-head { display: flex; align-items: baseline; justify-content: space-between; margin: 44px 0 18px; }
.bili-head-t { font-size: 17px; font-weight: 600; letter-spacing: 0.02em; margin: 0; }
.bili-more { font-size: 13px; color: var(--accent); text-decoration: none; }
.bili-more:hover { text-decoration: underline; }
.bili-carousel {
  display: flex; gap: 16px; overflow-x: auto; padding-bottom: 16px;
  scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
}
.bili-carousel::-webkit-scrollbar { height: 8px; }
.bili-carousel::-webkit-scrollbar-thumb { background: var(--line); border-radius: 4px; }
.bili-card { flex: 0 0 220px; scroll-snap-align: start; display: flex; flex-direction: column; text-decoration: none; color: inherit; }
.bili-thumb {
  position: relative; display: block; border-radius: 8px; overflow: hidden;
  aspect-ratio: 16 / 9; background: var(--paper-2);
}
.bili-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.35s ease; }
.bili-card:hover .bili-thumb img { transform: scale(1.05); }
.bili-len { position: absolute; right: 6px; bottom: 6px; font-size: 11px; font-family: var(--mono); color: #fff; background: rgba(0,0,0,0.65); padding: 1px 6px; border-radius: 4px; }
.bili-play { position: absolute; inset: 0; margin: auto; width: 44px; height: 44px; border-radius: 50%; background: rgba(0,0,0,0.5); border: 2px solid rgba(255,255,255,0.85); }
.bili-play::after { content: ""; position: absolute; left: 50%; top: 50%; transform: translate(-42%, -50%); border-style: solid; border-width: 7px 0 7px 11px; border-color: transparent transparent transparent #fff; }
.bili-cap { display: block; padding: 10px 2px 0; }
.bili-t { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 14px; font-weight: 600; line-height: 1.45; min-height: 2.9em; }
.bili-meta { display: block; margin-top: 6px; font-size: 11.5px; color: var(--muted); font-family: var(--mono); letter-spacing: 0.02em; }
@media (max-width: 720px) {
  .years-grid--bili { grid-template-columns: 1fr; }
  .bili-card { flex: 0 0 70vw; }
}

/* ---------- 讨论区头像与身份 ---------- */
.post-row { align-items: center; }
.post-author { display: flex; align-items: center; gap: 12px; min-width: 0; }
.post-avatar {
  width: 36px; height: 36px; border-radius: 50%; object-fit: cover;
  flex: 0 0 auto; background: var(--paper-2); border: 1px solid var(--line-soft);
}
.post-avatar--text {
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 600; color: var(--paper); background: var(--ink);
  border: 0;
}
.post-author-id { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.post-author-name { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 14px; font-weight: 600; }
.post-role {
  font-size: 10px; font-weight: 600; color: var(--accent);
  border: 1px solid var(--line); border-radius: 4px; padding: 1px 6px; line-height: 1.5;
}
.post-author-time { font-size: 11px; color: var(--muted); font-family: var(--mono); letter-spacing: 0.03em; }
.post-title { grid-column: 1 / -1; margin-top: 8px; }

.reply-author { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.reply-author .post-avatar { width: 28px; height: 28px; font-size: 12px; }
.reply-author-meta { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.reply-author-name { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 13px; font-weight: 600; }
.reply-author-time { font-size: 10.5px; color: var(--muted); font-family: var(--mono); letter-spacing: 0.03em; }

/* ---------- 01 届别索引（竖排按钮） ---------- */
.era-index {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: clamp(10px, 2vw, 18px);
}
.era-btn {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 18px 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper-2);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}
.era-btn:hover { border-color: var(--accent); transform: translateX(4px); }
.era-btn-name { flex: 0 0 auto; font-size: 17px; font-weight: 600; letter-spacing: 0.01em; }
.era-btn-meta { flex: 1 1 auto; font-family: var(--mono); font-size: 12px; color: var(--muted); letter-spacing: 0.04em; }
.era-btn.is-empty .era-btn-meta { color: var(--muted); }
.era-btn-arrow { font-size: 18px; color: var(--muted); }

/* ---------- 单独届页面 ---------- */
.era-nav {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px clamp(20px, 5vw, 64px);
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(8px);
}
.era-nav a { font-size: 13px; color: var(--muted); text-decoration: none; }
.era-nav a:hover { color: var(--ink); }
.era-nav-brand { font-size: 13px; letter-spacing: 0.04em; color: var(--ink); }

.era-wrap { max-width: 1180px; margin: 0 auto; padding: clamp(28px, 5vw, 60px) clamp(20px, 4vw, 40px) 96px; }
.era-head { margin-bottom: clamp(8px, 2vw, 20px); }
.era-kicker {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--muted);
  text-transform: uppercase;
  margin: 0 0 10px;
}
.era-title { margin: 0 0 6px; font-size: clamp(28px, 4.5vw, 40px); font-weight: 500; letter-spacing: -0.03em; line-height: 1.15; }
.era-meta { margin: 0; font-family: var(--mono); font-size: 12px; color: var(--muted); letter-spacing: 0.04em; }
.era-wrap .album { max-width: none; }
.era-wrap .container.album { padding-left: 0; padding-right: 0; }
.era-wrap .memo-album { padding-left: 0; padding-right: 0; }
