/* css/base.css */
/* =========================================================
   贞白记忆 · 设计系统
   青绿 + 蓝 + 阳光黄 + 纸张米白
   ========================================================= */
:root {
  --ink: #123c3a;
  --ink-soft: #2f5a55;
  --ink-mute: #6d8984;
  --teal-950: #072e2a;
  --teal-900: #0a3f3a;
  --teal-800: #0d544c;
  --teal-700: #0f6b5f;
  --teal-600: #128878;
  --teal-500: #17a08c;
  --teal-300: #7fd8c3;
  --teal-100: #dff6ec;
  --blue-900: #123a5c;
  --blue-700: #1d5f8c;
  --blue-500: #2f8fbe;
  --blue-200: #bfe9f1;
  --blue-100: #e5f7fa;
  --sun: #ffcc4d;
  --sun-deep: #f0a93a;
  --sun-pale: #fff4cc;
  --cream: #fbf7e9;
  --cream-2: #f3ecd8;
  --cream-3: #eae1c8;
  --paper: #fffdf4;
  --brick: #b95646;
  --leaf: #6dbb75;
  --line: #d8d0ba;
  --line-strong: #bfb59b;
  --shadow-sm: 0 4px 14px rgba(18, 60, 58, 0.08);
  --shadow-md: 0 16px 40px rgba(18, 60, 58, 0.12);
  --shadow-lg: 0 30px 80px rgba(18, 60, 58, 0.2);
  --radius-sm: 10px;
  --radius: 18px;
  --radius-lg: 30px;
  --font-sans: "Noto Sans SC", "Source Han Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-hand: "STXingkai", "华文行楷", "STKaiti", "KaiTi", "楷体", cursive;
  --font-chalk: "STKaiti", "KaiTi", "楷体", "Noto Serif SC", serif;
  --font-num: "DINNextLTPro-Bold", "Bahnschrift", "Arial Narrow", "Noto Sans SC", sans-serif;
  --nav-h: 72px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 110px;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--ink);
  background-color: var(--cream);
  background-image:
    radial-gradient(rgba(18, 60, 58, 0.035) 1px, transparent 1px),
    radial-gradient(rgba(47, 143, 190, 0.03) 1px, transparent 1px);
  background-size: 26px 26px, 52px 52px;
  background-position: 0 0, 13px 13px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body.no-scroll { overflow: hidden; }

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
::selection { background: var(--teal-300); color: var(--teal-950); }

:focus-visible {
  outline: 3px solid var(--blue-500);
  outline-offset: 3px;
  border-radius: 4px;
}

h1, h2, h3, h4, h5, p, figure { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }

.wrap {
  width: min(1280px, calc(100% - 48px));
  margin-inline: auto;
}
.wrap-narrow { width: min(980px, calc(100% - 48px)); margin-inline: auto; }

.hand { font-family: var(--font-hand); font-weight: 400; letter-spacing: 0.02em; }
.chalk { font-family: var(--font-chalk); }
.num { font-family: var(--font-num); font-variant-numeric: tabular-nums; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--teal-700);
}
.eyebrow::before {
  content: "";
  width: 26px;
  height: 2px;
  background: var(--teal-500);
  border-radius: 2px;
}
.eyebrow--light { color: var(--teal-100); }
.eyebrow--light::before { background: var(--teal-300); }

.section-kicker {
  font-family: var(--font-num);
  font-size: 13px;
  letter-spacing: 0.28em;
  color: var(--teal-600);
  font-weight: 700;
}

.section-title {
  font-size: clamp(2rem, 4.2vw, 3.7rem);
  line-height: 1.15;
  font-weight: 900;
  letter-spacing: -0.03em;
  color: var(--ink);
}
.section-title .hl {
  position: relative;
  white-space: nowrap;
}
.section-title .hl::after {
  content: "";
  position: absolute;
  left: -0.06em;
  right: -0.06em;
  bottom: 0.02em;
  height: 0.32em;
  background: var(--sun);
  opacity: 0.55;
  z-index: -1;
  border-radius: 4px 10px 6px 12px;
  transform: rotate(-0.6deg);
}
.section-lead {
  max-width: 62ch;
  color: var(--ink-soft);
  font-size: clamp(0.95rem, 1.2vw, 1.08rem);
}

/* ---------- 按钮 ---------- */
.btn {
  --btn-bg: var(--teal-700);
  --btn-fg: #fffdf4;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 50px;
  padding: 0 24px;
  border-radius: 999px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.02em;
  border: 1.5px solid transparent;
  box-shadow: 0 8px 20px rgba(15, 107, 95, 0.22);
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, color 0.25s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(15, 107, 95, 0.28); }
.btn:active { transform: translateY(-1px); }
.btn .i { width: 18px; height: 18px; transition: transform 0.25s ease; }
.btn:hover .i { transform: translateX(3px); }
.btn--sun { --btn-bg: var(--sun); --btn-fg: var(--teal-950); box-shadow: 0 8px 22px rgba(240, 169, 58, 0.35); }
.btn--sun:hover { box-shadow: 0 14px 34px rgba(240, 169, 58, 0.42); }
.btn--ghost {
  --btn-bg: transparent;
  --btn-fg: var(--ink);
  border-color: rgba(18, 60, 58, 0.22);
  box-shadow: none;
}
.btn--ghost:hover { background: rgba(255, 253, 244, 0.7); border-color: var(--teal-600); box-shadow: var(--shadow-sm); }
.btn--light { --btn-bg: #fffdf4; --btn-fg: var(--teal-900); box-shadow: 0 8px 22px rgba(7, 46, 42, 0.25); }
.btn--sm { min-height: 40px; padding: 0 18px; font-size: 13.5px; }
.btn--block { width: 100%; }
.btn[disabled] { opacity: 0.55; pointer-events: none; }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: var(--teal-700);
  border-bottom: 2px solid rgba(15, 107, 95, 0.25);
  padding-bottom: 2px;
  transition: gap 0.25s, border-color 0.25s;
}
.link-arrow:hover { gap: 13px; border-color: var(--teal-600); }

/* ---------- 胶带 / 纸片 ---------- */
.tape {
  position: absolute;
  width: 92px;
  height: 26px;
  background: rgba(127, 216, 195, 0.72);
  box-shadow: 0 2px 6px rgba(18, 60, 58, 0.08);
  clip-path: polygon(2% 8%, 98% 0, 100% 92%, 0 100%);
  z-index: 3;
}
.tape--sun { background: rgba(255, 204, 77, 0.66); }
.tape--blue { background: rgba(191, 233, 241, 0.8); }
.tape--cream { background: rgba(255, 253, 244, 0.85); }

.paper-card {
  position: relative;
  background: var(--paper);
  border: 1px solid rgba(18, 60, 58, 0.1);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
}

/* ---------- 导航 ---------- */
.site-nav {
  position: fixed;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  width: min(1240px, calc(100% - 32px));
  z-index: 120;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 9px 10px 9px 18px;
  border-radius: 999px;
  background: rgba(255, 252, 241, 0.82);
  border: 1px solid rgba(18, 60, 58, 0.12);
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  box-shadow: 0 10px 40px rgba(18, 60, 58, 0.1);
  transition: padding 0.3s, background 0.3s;
}
.brand { display: flex; align-items: center; gap: 10px; margin-right: auto; min-width: 0; }
.brand-mark {
  width: 42px; height: 42px;
  display: grid; place-items: center;
  background: linear-gradient(145deg, var(--teal-600), var(--teal-800));
  border-radius: 14px;
  color: var(--sun);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.22), 0 6px 14px rgba(10, 63, 58, 0.22);
  flex: none;
  transform: rotate(-4deg);
}
.brand-mark svg { width: 24px; height: 24px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text strong { font-size: 16px; font-weight: 900; letter-spacing: 0.04em; }
.brand-text small { font-size: 8.5px; letter-spacing: 0.22em; color: var(--ink-mute); font-weight: 700; }
.nav-links { display: flex; align-items: center; gap: 2px; }
.nav-links a {
  position: relative;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-soft);
  transition: background 0.2s, color 0.2s;
}
.nav-links a:hover { background: rgba(127, 216, 195, 0.22); color: var(--teal-800); }
.nav-links a.is-active { color: var(--teal-900); }
.nav-links a.is-active::after {
  content: "";
  position: absolute;
  left: 50%; bottom: 2px;
  width: 5px; height: 5px;
  margin-left: -2.5px;
  border-radius: 50%;
  background: var(--sun-deep);
}
.nav-actions { display: flex; align-items: center; gap: 8px; }
.nav-toggle {
  display: none;
  width: 42px; height: 42px;
  border-radius: 50%;
  border: 1.5px solid rgba(18, 60, 58, 0.18);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
}
.nav-toggle span { display: block; width: 17px; height: 2px; background: var(--ink); border-radius: 2px; transition: 0.25s; }
.nav-toggle.is-open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 960px) {
  .nav-links {
    position: absolute;
    top: calc(100% + 10px);
    left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    padding: 12px;
    background: rgba(255, 252, 241, 0.98);
    border: 1px solid rgba(18, 60, 58, 0.12);
    border-radius: 24px;
    box-shadow: var(--shadow-md);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: 0.25s;
  }
  .nav-links.is-open { opacity: 1; visibility: visible; transform: none; }
  .nav-links a { padding: 12px 18px; }
  .nav-toggle { display: flex; }
  .nav-actions .btn { display: none; }
}

/* ---------- 页脚 ---------- */
.site-footer {
  position: relative;
  background: var(--teal-950);
  color: var(--teal-100);
  padding: 84px 0 34px;
  overflow: hidden;
}
.site-footer::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 12% 12%, rgba(23, 160, 140, 0.35), transparent 42%),
    radial-gradient(circle at 88% 30%, rgba(47, 143, 190, 0.24), transparent 40%);
  pointer-events: none;
}
.footer-inner { position: relative; z-index: 1; }
.footer-word {
  font-size: clamp(4rem, 15vw, 13rem);
  font-weight: 900;
  line-height: 0.85;
  letter-spacing: -0.06em;
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(223, 246, 236, 0.28);
  user-select: none;
  margin-bottom: 30px;
}
.footer-top {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr 0.7fr;
  gap: 40px;
  padding-bottom: 46px;
  border-bottom: 1px solid rgba(223, 246, 236, 0.16);
}
.footer-brand { display: flex; gap: 16px; align-items: flex-start; }
.footer-brand .brand-mark { width: 50px; height: 50px; border-radius: 16px; }
.footer-brand h3 { font-size: 22px; font-weight: 900; letter-spacing: 0.04em; color: #fffef8; }
.footer-brand p { margin-top: 8px; font-size: 13px; color: rgba(223, 246, 236, 0.7); max-width: 38ch; line-height: 1.9; }
.footer-col h4 { font-size: 12px; letter-spacing: 0.18em; color: var(--teal-300); margin-bottom: 16px; font-weight: 700; }
.footer-col a, .footer-col p { display: block; font-size: 13.5px; color: rgba(223, 246, 236, 0.82); margin-bottom: 10px; transition: color 0.2s; }
.footer-col a:hover { color: var(--sun); }
.footer-bottom {
  padding-top: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  font-size: 12px;
  color: rgba(223, 246, 236, 0.55);
}
.footer-bottom .share-mini {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--teal-300); border: 1px solid rgba(127, 216, 195, 0.35);
  padding: 7px 14px; border-radius: 999px; font-size: 12px;
  transition: 0.2s;
}
.footer-bottom .share-mini:hover { background: rgba(127, 216, 195, 0.12); color: #fff; }

@media (max-width: 860px) {
  .footer-top { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

/* ---------- 通用动画 ---------- */
.reveal { opacity: 0; transform: translateY(34px); transition: opacity 0.8s cubic-bezier(0.2, 0.7, 0.2, 1), transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1); }
.reveal.in { opacity: 1; transform: none; }
.reveal-delay-1 { transition-delay: 0.08s; }
.reveal-delay-2 { transition-delay: 0.16s; }
.reveal-delay-3 { transition-delay: 0.24s; }

@keyframes float-soft {
  0%, 100% { transform: translateY(0) rotate(var(--rot, 0deg)); }
  50% { transform: translateY(-12px) rotate(calc(var(--rot, 0deg) + 1.5deg)); }
}
@keyframes ribbon-slide {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@keyframes pop-in {
  from { opacity: 0; transform: scale(0.96) translateY(10px); }
  to { opacity: 1; transform: none; }
}
@keyframes spin-slow { to { transform: rotate(360deg); } }
@keyframes blink-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.25; }
}

/* ---------- 四季粒子容器 ---------- */
.fx { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 1; }
.fx.is-paused span { animation-play-state: paused; }
.fx span { position: absolute; top: -12%; display: block; background-size: contain; background-repeat: no-repeat; background-position: center; will-change: transform; }
.fx span { animation: fx-fall linear infinite; }
@keyframes fx-fall {
  0% { transform: translate3d(0, -8vh, 0) rotate(0deg); }
  100% { transform: translate3d(var(--drift, 80px), 112vh, 0) rotate(var(--spin, 300deg)); }
}
.fx-petal { background-color: transparent; }
.fx-leaf { filter: drop-shadow(0 4px 4px rgba(90, 45, 30, 0.12)); }
.fx-snow { background-color: transparent; }
.fx-snow span { filter: drop-shadow(0 0 3px rgba(255, 255, 255, 0.7)); }
.fx-snow span:nth-child(3n) { filter: blur(0.5px) drop-shadow(0 0 3px rgba(255, 255, 255, 0.6)); }
.fx-mote {
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 250, 210, 0.95), rgba(255, 236, 160, 0.2) 70%, transparent 72%);
  animation-name: fx-mote;
}
@keyframes fx-mote {
  0% { transform: translate3d(0, 10vh, 0) scale(0.6); opacity: 0; }
  20% { opacity: var(--o, 0.6); }
  80% { opacity: var(--o, 0.6); }
  100% { transform: translate3d(var(--drift, 60px), -30vh, 0) scale(1); opacity: 0; }
}
.sun-rays { animation: spin-slow 90s linear infinite; }

/* ---------- Toast ---------- */
.toast-stack { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 400; display: flex; flex-direction: column; gap: 10px; align-items: center; pointer-events: none; }
.toast {
  background: var(--teal-900);
  color: #fffdf4;
  padding: 12px 22px;
  border-radius: 999px;
  font-size: 13.5px;
  box-shadow: var(--shadow-lg);
  animation: pop-in 0.3s ease both;
  max-width: min(90vw, 520px);
  text-align: center;
}
.toast--sun { background: var(--sun); color: var(--teal-950); font-weight: 700; }
.toast--error { background: #8f3d36; }

/* ---------- 模态 ---------- */
.modal {
  position: fixed; inset: 0; z-index: 300;
  display: none;
  align-items: center; justify-content: center;
  padding: 24px;
  background: rgba(7, 46, 42, 0.55);
  backdrop-filter: blur(6px);
}
.modal.is-open { display: flex; }
.modal-box {
  width: min(680px, 100%);
  max-height: min(86vh, 900px);
  overflow: auto;
  background: var(--paper);
  border-radius: 26px;
  box-shadow: var(--shadow-lg);
  animation: pop-in 0.3s cubic-bezier(0.2, 0.8, 0.2, 1) both;
  position: relative;
}
.modal-close {
  position: absolute; top: 14px; right: 14px;
  width: 38px; height: 38px; border-radius: 50%;
  background: rgba(18, 60, 58, 0.07);
  display: grid; place-items: center;
  z-index: 5;
}
.modal-close:hover { background: rgba(18, 60, 58, 0.14); }
.modal-head { padding: 28px 30px 0; }
.modal-head h3 { font-size: 24px; font-weight: 900; }
.modal-head p { color: var(--ink-mute); font-size: 13.5px; margin-top: 6px; }
.modal-body { padding: 22px 30px 30px; }

/* ---------- 灯箱 ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 350;
  background: rgba(5, 32, 29, 0.92);
  display: none;
  align-items: center; justify-content: center;
  padding: 5vh 5vw;
}
.lightbox.is-open { display: flex; }
.lightbox img { max-width: 100%; max-height: 82vh; border-radius: 8px; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5); }
.lightbox figcaption { color: var(--cream); text-align: center; margin-top: 16px; font-size: 14px; opacity: 0.8; }
.lightbox-close { position: absolute; top: 24px; right: 28px; color: #fff; font-size: 34px; line-height: 1; opacity: 0.7; }
.lightbox-close:hover { opacity: 1; }

/* ---------- 工具 ---------- */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.muted { color: var(--ink-mute); }
.spinner {
  width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  animation: spin-slow 0.7s linear infinite;
}
.spinner--ink { border-color: rgba(18, 60, 58, 0.2); border-top-color: var(--teal-700); }

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

/* css/ui.css */
/* =========================================================
   子页面通用组件：头像、表单、上传、文件、便利贴
   ========================================================= */
.avatar {
  --size: 40px;
  width: var(--size);
  height: var(--size);
  flex: none;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  font-size: calc(var(--size) * 0.48);
  line-height: 1;
  overflow: hidden;
  background: linear-gradient(145deg, #e6f6ee, #c9ebdf);
  color: var(--teal-800);
  border: 2px solid #fffdf4;
  box-shadow: 0 3px 8px rgba(18, 60, 58, 0.12);
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar--anon {
  background: repeating-linear-gradient(135deg, #dfe7e3 0 4px, #d4e0da 4px 8px);
  color: #5a756d;
  font-family: var(--font-chalk);
  font-weight: 700;
}
.avatar--sm { --size: 30px; }
.avatar--lg { --size: 76px; }

/* 表单 */
.field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.field label, .field-label {
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: var(--ink-soft);
}
.field .hint { font-size: 10.5px; color: var(--ink-mute); letter-spacing: 0.02em; }
.input, .textarea, .select {
  width: 100%;
  border: 1.5px solid rgba(18, 60, 58, 0.16);
  border-radius: 12px;
  padding: 11px 14px;
  background: #fffdf4;
  font-size: 14px;
  line-height: 1.7;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.textarea { min-height: 116px; resize: vertical; }
.select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 20 20'%3E%3Cpath d='m5 8 5 5 5-5' fill='none' stroke='%232f5a55' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 38px;
}
.input:focus, .textarea:focus, .select:focus {
  outline: none;
  border-color: var(--teal-500);
  box-shadow: 0 0 0 4px rgba(23, 160, 140, 0.12);
  background: #fffef9;
}
.input::placeholder, .textarea::placeholder { color: #a6b4af; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field-row--3 { grid-template-columns: repeat(3, 1fr); }

.btn--dark { --btn-bg: var(--teal-900); --btn-fg: #fffdf4; }
.btn--sunny { --btn-bg: var(--sun); --btn-fg: var(--teal-950); }
.btn--danger { --btn-bg: #9c4a40; --btn-fg: #fff; }
.btn--outline-ink {
  --btn-bg: transparent;
  --btn-fg: var(--ink);
  border: 1.5px solid rgba(18, 60, 58, 0.2);
  box-shadow: none;
}
.btn--outline-ink:hover { border-color: var(--teal-600); background: rgba(223, 246, 236, 0.4); }

/* 上传 */
.upload-zone {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border: 1.5px dashed rgba(18, 60, 58, 0.28);
  border-radius: 14px;
  background: rgba(255, 253, 244, 0.6);
  cursor: pointer;
  transition: 0.2s;
  text-align: left;
}
.upload-zone:hover { border-color: var(--teal-500); background: rgba(223, 246, 236, 0.4); }
.upload-zone .up-icon {
  width: 42px; height: 42px; flex: none;
  border-radius: 12px;
  display: grid; place-items: center;
  background: var(--teal-100);
  color: var(--teal-800);
  font-size: 20px;
}
.upload-zone b { display: block; font-size: 13px; }
.upload-zone small { display: block; margin-top: 2px; color: var(--ink-mute); font-size: 10.5px; }
.upload-zone input { display: none; }
.upload-previews { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.up-item {
  position: relative;
  width: 74px; height: 74px;
  border-radius: 9px;
  overflow: hidden;
  background: var(--cream-2);
  border: 1px solid rgba(18, 60, 58, 0.12);
}
.up-item img, .up-item video { width: 100%; height: 100%; object-fit: cover; }
.up-item .up-kind {
  position: absolute; left: 4px; bottom: 4px;
  font-size: 8px; padding: 1px 4px; border-radius: 4px;
  background: rgba(7, 46, 42, 0.72); color: #fff; letter-spacing: 0.05em;
}
.up-item .rm {
  position: absolute; top: 3px; right: 3px;
  width: 18px; height: 18px; border-radius: 50%;
  background: rgba(7, 46, 42, 0.72); color: #fff;
  display: grid; place-items: center; font-size: 12px; line-height: 1;
}
.up-progress { margin-top: 10px; display: none; }
.up-progress.is-on { display: block; }
.up-progress .bar { height: 6px; background: rgba(18, 60, 58, 0.1); border-radius: 4px; overflow: hidden; }
.up-progress .bar i { display: block; height: 100%; width: 0; background: var(--teal-500); transition: width 0.2s; }
.up-progress p { font-size: 10.5px; color: var(--ink-mute); margin-top: 5px; }

/* 文件 */
.file-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; margin-top: 14px; }
.file-grid.is-one { grid-template-columns: 1fr; }
.file-img { padding: 0; border: 0; border-radius: 7px; overflow: hidden; aspect-ratio: 4 / 3; background: #e9e3d2; display: block; width: 100%; }
.file-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s; }
.file-img:hover img { transform: scale(1.04); }
.file-video { margin-top: 12px; }
.file-video video { width: 100%; max-height: 380px; border-radius: 8px; background: #071f1c; }
.file-video-name { display: block; font-size: 10px; color: var(--ink-mute); margin-top: 5px; }
.file-list { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; }
.file-chip {
  display: flex; align-items: center; gap: 9px;
  padding: 7px 10px;
  border: 1px solid rgba(18, 60, 58, 0.12);
  background: rgba(255, 253, 244, 0.72);
  border-radius: 8px;
  font-size: 11px;
  transition: 0.2s;
}
.file-chip:hover { border-color: var(--teal-500); background: #fffdf4; }
.file-chip .file-icon { width: 30px; height: 30px; flex: none; display: grid; place-items: center; border-radius: 6px; background: var(--teal-100); color: var(--teal-800); font-size: 9px; font-weight: 800; }
.file-chip .file-meta { min-width: 0; flex: 1; }
.file-chip .file-meta b { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-chip .file-meta small { display: block; color: var(--ink-mute); font-size: 9px; }
.file-chip .file-dl { color: var(--teal-700); font-weight: 700; font-size: 10px; }

/* 便利贴 */
.sticky-note {
  position: relative;
  padding: 24px 22px 22px;
  background-color: #fdf3b6;
  background-image:
    repeating-linear-gradient(to bottom, transparent 0, transparent 27px, rgba(152, 129, 60, 0.18) 27px, rgba(152, 129, 60, 0.18) 28px);
  border-radius: 2px 2px 14px 2px;
  box-shadow: 0 14px 26px rgba(3, 24, 22, 0.28), 0 2px 3px rgba(3, 24, 22, 0.08);
  transform: rotate(var(--rot, -0.8deg));
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.35s;
  break-inside: avoid;
  margin-bottom: 22px;
}
.sticky-note:hover { transform: rotate(0) translateY(-3px); box-shadow: 0 22px 38px rgba(3, 24, 22, 0.36); }
.sticky-note::before {
  content: "";
  position: absolute;
  top: -11px;
  left: 50%;
  width: 66px;
  height: 20px;
  margin-left: -33px;
  background: rgba(127, 216, 195, 0.62);
  transform: rotate(-3deg);
  box-shadow: 0 2px 5px rgba(18, 60, 58, 0.1);
}
.sticky-note:nth-child(3n+1)::before { background: rgba(255, 204, 77, 0.6); transform: rotate(2deg); }
.sticky-note:nth-child(3n+2)::before { background: rgba(191, 233, 241, 0.8); transform: rotate(-4deg); }
.sticky-note::after {
  content: "";
  position: absolute; right: 0; bottom: 0;
  border-width: 0 0 18px 18px;
  border-style: solid;
  border-color: transparent transparent rgba(206, 185, 112, 0.55) transparent;
}
.sticky-head { display: flex; align-items: center; gap: 9px; margin-bottom: 12px; }
.sticky-head .who { min-width: 0; flex: 1; }
.sticky-head .who b { display: block; font-size: 12.5px; font-weight: 800; color: #57491f; letter-spacing: 0.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sticky-head .who small { display: block; font-size: 9px; color: #94824c; letter-spacing: 0.05em; }
.sticky-head .revoke { font-size: 9px; color: #a06a4a; border-bottom: 1px solid rgba(160, 106, 74, 0.35); }
.sticky-body {
  font-size: 13px;
  line-height: 28px;
  color: #4d431f;
  word-break: break-word;
}
.sticky-body + .sticky-foot { margin-top: 12px; }
.sticky-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 9px; color: #94824c; letter-spacing: 0.06em; border-top: 1px dashed rgba(152, 129, 60, 0.28); padding-top: 10px; }
.sticky-note .file-grid { margin-top: 12px; }
.sticky-note .file-grid.is-one .file-img { max-height: 320px; aspect-ratio: auto; }
.sticky-note .file-grid.is-one .file-img img { max-height: 320px; width: 100%; object-fit: cover; }
.sticky-note .file-img { border: 3px solid rgba(255, 253, 244, 0.7); }
.sticky-note .file-chip { background: rgba(255, 253, 244, 0.5); border-color: rgba(152, 129, 60, 0.2); }
.sticky-note .file-chip .file-icon { background: rgba(255, 255, 255, 0.5); color: #6b5b2b; }
.sticky-note .file-video video { border: 3px solid rgba(255, 253, 244, 0.7); }
.sticky-note .file-list { gap: 5px; }
.sticky-note .file-chip .file-meta small, .sticky-note .file-dl { color: #8b7a45; }

/* 空状态 */
.empty {
  padding: 54px 28px;
  border: 1.5px dashed rgba(18, 60, 58, 0.22);
  border-radius: 18px;
  text-align: center;
  color: var(--ink-mute);
}
.empty .empty-ill { font-size: 54px; line-height: 1; margin-bottom: 16px; }
.empty h3 { font-size: 18px; color: var(--ink); font-weight: 800; margin-bottom: 8px; }
.empty p { font-size: 12.5px; line-height: 1.9; margin-bottom: 18px; }
.empty--dark { border-color: rgba(223, 246, 236, 0.25); color: rgba(223, 246, 236, 0.6); }
.empty--dark h3 { color: #fffdf4; }

/* 页面头部 */
.subpage-main { position: relative; padding-top: 104px; }
.page-hero { position: relative; overflow: hidden; }
.page-hero .wrap { position: relative; z-index: 2; }
.page-hero h1 { font-size: clamp(2.6rem, 6vw, 5.4rem); line-height: 1.05; font-weight: 900; letter-spacing: -0.04em; }
.page-hero .lead { max-width: 60ch; font-size: 14px; line-height: 1.95; }

/* 加载 */
.loading { padding: 46px; display: flex; align-items: center; justify-content: center; gap: 12px; color: var(--ink-mute); font-size: 12px; }
.loading .spinner { border-color: rgba(18, 60, 58, 0.15); border-top-color: var(--teal-600); }
.loading--light { color: rgba(223, 246, 236, 0.7); }
.loading--light .spinner { border-color: rgba(255, 255, 255, 0.2); border-top-color: var(--teal-300); }

@media (max-width: 620px) {
  .field-row, .field-row--3 { grid-template-columns: 1fr; }
  .sticky-note { padding: 22px 18px 20px; }
}

/* css/forum.css */
/* =========================================================
   贞白小论坛 · 复古 BBS
   ========================================================= */
.forum-page {
  min-height: 100vh;
  padding-top: 96px;
  background:
    linear-gradient(180deg, #eef3e8 0%, #f6f3e7 100%);
}
.forum-page::before {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(18, 60, 58, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(18, 60, 58, 0.035) 1px, transparent 1px);
  background-size: 18px 18px;
  opacity: 0.5;
}
.forum-hero { position: relative; z-index: 1; padding: 26px 0 0; }
.bbs-banner {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  padding: 38px 40px 30px;
  background:
    radial-gradient(circle at 82% 8%, rgba(255, 204, 77, 0.3), transparent 34%),
    linear-gradient(135deg, #0c4b43 0%, #0f6b5f 52%, #155f6f 100%);
  color: var(--teal-100);
  box-shadow: 0 26px 60px rgba(10, 63, 58, 0.25);
  display: grid;
  grid-template-columns: 1fr 330px;
  gap: 34px;
  align-items: center;
}
.bbs-banner::before {
  content: "";
  position: absolute; inset: 0;
  background-image: repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.04) 0 1px, transparent 1px 4px);
  pointer-events: none;
  opacity: 0.5;
}
.bbs-banner::after {
  content: "BBS";
  position: absolute;
  right: 2%; bottom: -32%;
  font-family: var(--font-num);
  font-size: 18rem;
  line-height: 1;
  font-weight: 900;
  color: transparent;
  -webkit-text-stroke: 1px rgba(223, 246, 236, 0.12);
  letter-spacing: -0.06em;
  pointer-events: none;
}
.bbs-banner-copy { position: relative; z-index: 2; }
.bbs-topline { display: flex; align-items: center; gap: 10px; font-family: var(--font-num); font-size: 9.5px; letter-spacing: 0.24em; color: rgba(223, 246, 236, 0.62); }
.bbs-topline .dot { width: 6px; height: 6px; border-radius: 50%; background: #7bf3a8; box-shadow: 0 0 8px #7bf3a8; animation: blink-dot 1.8s infinite; }
.bbs-banner h1 {
  margin: 14px 0 10px;
  font-size: clamp(2.6rem, 5.2vw, 4.4rem);
  line-height: 1;
  font-weight: 900;
  letter-spacing: -0.05em;
  color: #fffdf4;
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
.bbs-banner h1 .hot {
  font-family: var(--font-num);
  font-size: 10px;
  letter-spacing: 0.12em;
  background: #f05c4b;
  color: #fff;
  padding: 5px 8px;
  border-radius: 5px;
  transform: rotate(-5deg);
  box-shadow: 0 3px 0 #a83a2e;
}
.bbs-banner .tagline { font-size: 12.5px; line-height: 1.95; color: rgba(223, 246, 236, 0.75); max-width: 58ch; }
.bbs-banner .tagline b { color: var(--sun); font-weight: 700; }
.bbs-stats { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.bbs-stat {
  display: inline-flex; align-items: baseline; gap: 5px;
  padding: 8px 13px;
  border: 1px solid rgba(127, 216, 195, 0.26);
  border-radius: 6px;
  background: rgba(4, 30, 27, 0.18);
  font-size: 9.5px;
  letter-spacing: 0.08em;
  color: rgba(223, 246, 236, 0.6);
}
.bbs-stat b { font-family: var(--font-num); font-size: 15px; color: var(--sun); letter-spacing: 0; }
.bbs-terminals {
  position: relative; z-index: 2;
  border: 1px solid rgba(127, 216, 195, 0.3);
  border-radius: 10px;
  background: rgba(3, 24, 22, 0.55);
  box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.4);
  overflow: hidden;
  transform: rotate(1.2deg);
}
.bbs-terminals .term-bar {
  height: 24px;
  display: flex; align-items: center; gap: 5px; padding: 0 10px;
  background: rgba(255, 255, 255, 0.08);
  border-bottom: 1px solid rgba(127, 216, 195, 0.2);
}
.bbs-terminals .term-bar i { width: 6px; height: 6px; border-radius: 50%; background: rgba(223, 246, 236, 0.35); }
.bbs-terminals .term-bar span { margin-left: auto; font-family: var(--font-num); font-size: 7px; letter-spacing: 0.18em; color: rgba(223, 246, 236, 0.5); }
.term-body { padding: 16px 18px; font-family: "Consolas", "Courier New", monospace; font-size: 11px; line-height: 2; color: #8ff0c2; text-shadow: 0 0 8px rgba(143, 240, 194, 0.3); }
.term-body .dim { color: rgba(143, 240, 194, 0.45); }
.term-body .amber { color: var(--sun); }
.term-cursor { display: inline-block; width: 7px; height: 12px; background: #8ff0c2; vertical-align: -1px; animation: blink-dot 1s steps(1) infinite; }
.bbs-badges { display: flex; gap: 6px; margin-top: 10px; }
.bbs-badges span {
  flex: 1;
  text-align: center;
  font-family: var(--font-num);
  font-size: 7px;
  letter-spacing: 0.1em;
  padding: 5px 3px;
  border: 1px solid rgba(255, 204, 77, 0.5);
  color: var(--sun);
  background: rgba(255, 204, 77, 0.06);
}
.bbs-marquee {
  position: relative;
  z-index: 2;
  margin-top: 12px;
  padding: 10px 16px;
  border-radius: 9px;
  background: rgba(7, 46, 42, 0.92);
  border: 1px solid rgba(127, 216, 195, 0.2);
  overflow: hidden;
  font-family: var(--font-chalk);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: rgba(223, 246, 236, 0.66);
  box-shadow: 0 10px 24px rgba(7, 46, 42, 0.18);
}
.bbs-marquee-track { display: flex; width: max-content; animation: ribbon-slide 40s linear infinite; }
.bbs-marquee-track span { padding-right: 44px; white-space: nowrap; }
.bbs-marquee-track em { color: var(--sun); font-style: normal; }

.forum-main { position: relative; z-index: 2; padding: 34px 0 90px; }
.forum-grid { display: grid; grid-template-columns: minmax(0, 1fr) 312px; gap: 22px; align-items: start; }
.forum-primary { min-width: 0; display: flex; flex-direction: column; gap: 20px; }

.board-tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.board-tabs::-webkit-scrollbar { display: none; }
.board-tabs button {
  flex: none;
  padding: 8px 15px;
  border-radius: 7px 7px 0 0;
  background: rgba(255, 253, 245, 0.55);
  border: 1px solid #cdd8cb;
  border-bottom-color: transparent;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-soft);
  transition: 0.2s;
}
.board-tabs button:hover { background: #fffdf5; color: var(--teal-800); }
.board-tabs button.is-on { background: var(--teal-800); border-color: var(--teal-800); color: #fffdf4; }

.bbs-panel {
  background: #fffdf5;
  border: 1px solid #c9d5c8;
  border-radius: 9px;
  overflow: hidden;
  box-shadow: 0 5px 18px rgba(18, 60, 58, 0.06);
}
.panel-head {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 10px 14px;
  background: linear-gradient(180deg, #f4f7ec, #e9f0e4);
  border-bottom: 1px solid #c9d5c8;
}
.panel-head h2 { font-size: 14px; font-weight: 800; letter-spacing: 0.04em; display: flex; align-items: center; gap: 8px; }
.panel-head h2::before { content: ""; width: 4px; height: 14px; background: var(--teal-600); border-radius: 2px; }
.panel-head .ph-note { font-family: var(--font-num); font-size: 8px; letter-spacing: 0.16em; color: var(--ink-mute); }
.panel-head .btn { min-height: 32px; padding: 0 13px; font-size: 11.5px; border-radius: 5px; box-shadow: none; }

.bbs-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.bbs-table th {
  text-align: left;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--ink-mute);
  padding: 8px 12px;
  background: #f7f8ef;
  border-bottom: 1px solid #dbe3d6;
}
.bbs-table td { padding: 11px 12px; border-bottom: 1px dashed #dbe3d6; font-size: 12px; vertical-align: middle; }
.bbs-table tr:last-child td { border-bottom: 0; }
.bbs-table tbody tr:hover { background: #f7faf0; }
.bbs-board-row .b-icon {
  width: 40px; height: 40px;
  border-radius: 8px;
  display: grid; place-items: center;
  font-size: 19px;
  background: var(--teal-100);
  border: 1px solid #cfe3d8;
}
.bbs-board-row .b-main b { font-size: 13.5px; font-weight: 800; color: var(--teal-900); }
.bbs-board-row .b-main b:hover { color: var(--blue-700); text-decoration: underline; }
.bbs-board-row .b-main p { margin-top: 3px; font-size: 10.5px; color: var(--ink-mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bbs-board-row .b-main .b-badge { display: inline-block; margin-left: 6px; font-size: 8px; padding: 2px 5px; border-radius: 3px; background: #ffe6a3; color: #8a5b0e; letter-spacing: 0.05em; vertical-align: 1px; }
.bbs-board-row .b-count { font-family: var(--font-num); font-size: 11px; color: var(--ink-soft); white-space: nowrap; }
.bbs-board-row .b-count span { display: block; line-height: 1.55; }
.bbs-board-row .b-count small { font-family: var(--font-sans); font-size: 8.5px; color: var(--ink-mute); letter-spacing: 0.06em; margin-left: 3px; }
.bbs-board-row .b-last { font-size: 10px; color: var(--ink-mute); line-height: 1.6; }
.bbs-board-row .b-last b { display: block; color: var(--ink-soft); font-weight: 600; font-size: 10.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* 主题列表 */
.thread-table th:nth-child(1) { width: 46px; }
.thread-table th:nth-child(3) { width: 72px; }
.thread-table th:nth-child(4) { width: 64px; }
.thread-table th:nth-child(5) { width: 130px; }
.thread-table td { padding: 12px 12px; }
.thread-table .t-flag { text-align: center; font-size: 15px; }
.thread-table .t-main { min-width: 0; }
.thread-table .t-main a.title {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--blue-700);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.thread-table .t-main a.title:hover { color: #d4583f; text-decoration: underline; }
.thread-table .t-main p { font-size: 10px; color: var(--ink-mute); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.thread-table .t-main .t-meta { display: flex; gap: 10px; font-size: 9px; color: #8b9a92; margin-top: 4px; }
.thread-table .t-main .new { color: #d4583f; font-weight: 700; font-size: 9px; margin-left: 4px; }
.thread-table .t-num { font-family: var(--font-num); font-size: 12px; color: var(--ink-soft); text-align: center; }
.thread-table .t-num small { display: block; font-family: var(--font-sans); font-size: 8px; color: var(--ink-mute); }
.thread-table .t-last { font-size: 9.5px; color: var(--ink-mute); line-height: 1.6; }
.thread-table .t-last b { display: block; font-size: 10px; color: var(--ink-soft); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.thread-table .t-title-wrap { display: flex; align-items: center; gap: 6px; }
.thread-table .t-title-wrap .pin { font-size: 10px; }
.thread-empty { padding: 40px 20px; text-align: center; font-size: 12px; color: var(--ink-mute); }

/* 侧栏 */
.forum-side { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 100px; }
.side-card { background: #fffdf5; border: 1px solid #c9d5c8; border-radius: 9px; overflow: hidden; box-shadow: 0 5px 18px rgba(18, 60, 58, 0.05); }
.side-card .side-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 12px;
  background: linear-gradient(180deg, #e7f0e5, #dbe7d8);
  border-bottom: 1px solid #c9d5c8;
  font-size: 11.5px; font-weight: 800; letter-spacing: 0.06em; color: var(--teal-900);
}
.side-card .side-head span { font-family: var(--font-num); font-size: 7.5px; letter-spacing: 0.14em; color: var(--ink-mute); font-weight: 400; }
.side-body { padding: 12px 14px; }
.side-body p { font-size: 11px; line-height: 1.9; color: var(--ink-soft); }
.side-body p + p { margin-top: 6px; }
.notice-list { display: flex; flex-direction: column; gap: 8px; }
.notice-list a { font-size: 11px; line-height: 1.7; color: var(--ink-soft); display: flex; gap: 7px; }
.notice-list a::before { content: "·"; color: #d4583f; font-weight: 900; }
.notice-list a:hover { color: var(--teal-700); }
.stat-rows { display: flex; flex-direction: column; }
.stat-row { display: flex; justify-content: space-between; padding: 5px 0; border-bottom: 1px dotted #dbe3d6; font-size: 10.5px; color: var(--ink-mute); }
.stat-row:last-child { border-bottom: 0; }
.stat-row b { font-family: var(--font-num); color: var(--teal-800); font-size: 11.5px; }
.online-bar { display: flex; align-items: center; gap: 6px; font-size: 9.5px; color: #5e7a6d; margin-top: 8px; }
.online-bar i { width: 6px; height: 6px; border-radius: 50%; background: #3fbf7f; box-shadow: 0 0 6px #3fbf7f; }
.emoji-wall { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; }
.emoji-wall span { aspect-ratio: 1; display: grid; place-items: center; font-size: 17px; border: 1px solid #e3e9dd; border-radius: 5px; background: #fafcf3; cursor: pointer; transition: 0.15s; }
.emoji-wall span:hover { transform: scale(1.15) rotate(-5deg); background: #fff8d8; border-color: #e8ce85; }
.rules { counter-reset: r; display: flex; flex-direction: column; gap: 8px; }
.rules p { position: relative; padding-left: 20px; font-size: 10.5px; line-height: 1.7; }
.rules p::before { counter-increment: r; content: counter(r); position: absolute; left: 0; top: 0; width: 14px; height: 14px; border-radius: 50%; background: var(--teal-700); color: #fff; font-size: 8px; display: grid; place-items: center; font-family: var(--font-num); }
.bbs-badges-side { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; }
.bbs-badges-side span { display: grid; place-items: center; height: 31px; border: 1px solid #b9c9bb; background: #eef4e8; font-family: var(--font-num); font-size: 6.5px; letter-spacing: 0.08em; color: #5b7166; text-align: center; }
.bbs-badges-side span:nth-child(2) { border-color: #cbb57e; background: #f7f0d8; color: #8b6b26; }

/* 帖子详情 */
.thread-view { position: relative; z-index: 2; width: min(1080px, calc(100% - 40px)); margin: 0 auto; padding: 28px 0 84px; }
.thread-crumb { font-size: 10.5px; color: var(--ink-mute); letter-spacing: 0.06em; margin-bottom: 14px; }
.thread-crumb a:hover { color: var(--teal-700); }
.thread-crumb span { margin: 0 6px; color: #b3c0b4; }
.thread-titlebar {
  position: relative;
  background: #fffdf5;
  border: 1px solid #c9d5c8;
  border-radius: 10px;
  padding: 20px 22px;
  margin-bottom: 14px;
  box-shadow: 0 6px 20px rgba(18, 60, 58, 0.06);
}
.thread-titlebar h1 { font-size: clamp(1.2rem, 2.4vw, 1.7rem); line-height: 1.45; font-weight: 900; color: var(--ink); }
.thread-titlebar .tm { display: flex; flex-wrap: wrap; gap: 10px 16px; margin-top: 10px; font-size: 10px; color: var(--ink-mute); }
.thread-titlebar .tm b { color: var(--teal-700); font-weight: 700; }
.thread-titlebar .actions { position: absolute; right: 18px; top: 18px; display: flex; gap: 7px; }
.thread-titlebar .actions .btn { min-height: 32px; padding: 0 12px; font-size: 11px; border-radius: 6px; box-shadow: none; }

.post-list { background: #fffdf5; border: 1px solid #c9d5c8; border-radius: 10px; overflow: hidden; }
.post { display: grid; grid-template-columns: 152px 1fr; border-bottom: 1px solid #dbe3d6; }
.post:last-child { border-bottom: 0; }
.post-author {
  padding: 16px 14px;
  background: linear-gradient(180deg, #f2f6ea, #eaf1e5);
  border-right: 1px solid #dbe3d6;
  text-align: center;
}
.post-author .avatar { --size: 62px; margin: 0 auto 8px; border-width: 3px; }
.post-author .pname { font-size: 12px; font-weight: 800; color: var(--teal-900); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.post-author .pname:hover { color: var(--blue-700); }
.post-author .plevel { margin-top: 2px; font-size: 8px; letter-spacing: 0.12em; color: var(--ink-mute); }
.post-author .pstars { color: #e0a63a; font-size: 9px; letter-spacing: 2px; margin-top: 3px; }
.post-author .pinfo { margin-top: 10px; padding-top: 8px; border-top: 1px dotted #cfdacb; font-size: 8.5px; line-height: 1.8; color: var(--ink-mute); text-align: left; }
.post-author .pinfo b { color: var(--ink-soft); font-weight: 600; }
.post-main { min-width: 0; padding: 14px 18px 18px; }
.post-meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-bottom: 8px; border-bottom: 1px solid #edf0e6; font-size: 9.5px; color: var(--ink-mute); }
.post-meta .floor { display: inline-flex; align-items: center; gap: 6px; }
.post-meta .floor b { font-family: var(--font-num); color: var(--teal-700); font-size: 10px; }
.post-meta .floor .lz { background: #d4583f; color: #fff; font-size: 8px; padding: 2px 5px; border-radius: 3px; letter-spacing: 0.06em; }
.post-content { padding: 14px 2px 4px; font-size: 13px; line-height: 1.95; color: #354f49; word-break: break-word; }
.post-content p + p { margin-top: 8px; }
.post-signature { margin-top: 18px; padding-top: 10px; border-top: 1px dashed #dbe3d6; font-family: var(--font-chalk); font-size: 10px; color: #94a399; letter-spacing: 0.04em; }
.post-signature::before { content: "—— "; }
.post .file-grid { max-width: 520px; }
.post .file-img { max-height: 260px; }
.post .file-grid.is-one .file-img { max-height: 420px; aspect-ratio: auto; }
.post .file-grid.is-one img { max-height: 420px; object-fit: contain; background: #0d2723; }
.post .file-list { max-width: 440px; }
.post-new { animation: post-flash 1.6s ease; }
@keyframes post-flash { 0% { background: #fff5cd; } 100% { background: transparent; } }

/* 回复框 */
.reply-panel { margin-top: 18px; background: #fffdf5; border: 1px solid #c9d5c8; border-radius: 10px; overflow: visible; }
.reply-panel .panel-head { border-radius: 10px 10px 0 0; }
.reply-panel .panel-head h2 { font-size: 13px; }
.reply-body { padding: 16px; position: relative; }
.reply-user { display: flex; align-items: center; gap: 9px; margin-bottom: 10px; font-size: 11px; color: var(--ink-soft); }
.reply-user b { font-weight: 700; }
.reply-user a { color: var(--teal-700); font-size: 10px; border-bottom: 1px solid rgba(15, 107, 95, 0.3); }
.reply-textarea {
  min-height: 104px;
  border-radius: 6px;
  border: 1px solid #c9d5c8;
  background: #fffef8;
  font-size: 13px;
  line-height: 1.9;
  padding: 10px 12px;
  width: 100%;
  resize: vertical;
}
.reply-toolbar { display: flex; align-items: center; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.tool-btn {
  display: inline-flex; align-items: center; gap: 4px;
  height: 28px; padding: 0 9px;
  border: 1px solid #cdd8cb; border-radius: 4px;
  background: #f8faf0; font-size: 10px; color: var(--ink-soft);
  transition: 0.15s;
}
.tool-btn:hover { background: #fff; border-color: var(--teal-500); color: var(--teal-800); }
.tool-btn.is-on { background: var(--teal-800); color: #fff; border-color: var(--teal-800); }
.reply-submit-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; }
.reply-submit-row .hint { font-size: 9px; color: var(--ink-mute); }
.reply-submit-row .btn { min-height: 36px; font-size: 12px; border-radius: 5px; }
.emoji-pop {
  position: absolute;
  z-index: 30;
  width: 312px;
  padding: 10px;
  background: #fffdf5;
  border: 1px solid #c9d5c8;
  border-radius: 8px;
  box-shadow: 0 18px 40px rgba(18, 60, 58, 0.18);
  display: none;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 2px;
  max-height: 250px;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.emoji-pop.is-open { display: grid; }
.emoji-pop button { min-width: 0; padding: 0; font-size: 18px; line-height: 1; aspect-ratio: 1; display: grid; place-items: center; border-radius: 4px; }
.emoji-pop button:hover { background: var(--sun-pale); transform: scale(1.15); }
.emoji-pop .ep-title { grid-column: 1 / -1; font-size: 8px; letter-spacing: 0.12em; color: var(--ink-mute); padding: 4px 2px 6px; }
.reply-files { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.reply-files .up-item { width: 58px; height: 58px; }
.reply-files .file-chip { min-width: 160px; }

/* 发帖弹窗 */
.thread-form .field { margin-bottom: 14px; }
.thread-form .textarea { min-height: 180px; }

/* 空 / 错误 */
.thread-loading { padding: 80px 20px; text-align: center; color: var(--ink-mute); font-size: 12px; }

/* 响应式 */
@media (max-width: 1100px) {
  .forum-grid { grid-template-columns: 1fr; }
  .forum-side { position: static; display: grid; grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .bbs-banner { grid-template-columns: 1fr; padding: 28px 24px 24px; }
  .bbs-terminals { display: none; }
  .thread-table th:nth-child(3), .thread-table td:nth-child(3),
  .thread-table th:nth-child(4), .thread-table td:nth-child(4) { display: none; }
  .bbs-table th:nth-child(3), .bbs-table td:nth-child(3) { display: none; }
  .post { grid-template-columns: 1fr; }
  .post-author { display: flex; align-items: center; gap: 10px; text-align: left; border-right: 0; border-bottom: 1px solid #dbe3d6; padding: 10px 14px; }
  .post-author .avatar { --size: 40px; margin: 0; }
  .post-author .pinfo { display: none; }
  .post-author .pstars { display: none; }
  .post-author .pname { font-size: 11.5px; }
  .post-author .plevel { margin-top: 0; }
  .post-main { padding: 12px 14px 16px; }
  .forum-side { grid-template-columns: 1fr; }
  .thread-titlebar .actions { position: static; margin-top: 12px; }
  .thread-titlebar { padding: 18px; }
}
@media (max-width: 620px) {
  .forum-page { padding-top: 88px; }
  .forum-hero { padding-top: 14px; }
  .board-tabs { flex-wrap: wrap; overflow: visible; }
  .board-tabs button { padding: 6px 10px; font-size: 11px; }
  .bbs-banner { border-radius: 16px; }
  .bbs-banner h1 { font-size: 2.5rem; }
  .bbs-stats { gap: 5px; }
  .bbs-stat { padding: 6px 9px; font-size: 8.5px; }
  .bbs-stat b { font-size: 13px; }
  .forum-main { padding-top: 22px; }
  .thread-table th:nth-child(5), .thread-table td:nth-child(5) { display: none; }
  .thread-table th:nth-child(1), .thread-table td:nth-child(1) { width: 34px; padding-left: 8px; padding-right: 2px; }
  .bbs-table th:nth-child(4), .bbs-table td:nth-child(4) { display: none; }
  .thread-view { width: calc(100% - 20px); }
  .emoji-pop { width: min(300px, 86vw); }
}
