/* 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/memory.css */
/* =========================================================
   贞白记忆 · 黑板
   ========================================================= */
.memory-page {
  position: relative;
  min-height: 100vh;
  padding-top: 104px;
  background:
    radial-gradient(circle at 12% 8%, rgba(23, 160, 140, 0.25), transparent 34%),
    radial-gradient(circle at 88% 22%, rgba(47, 143, 190, 0.18), transparent 36%),
    var(--teal-950);
  color: var(--teal-100);
  overflow: hidden;
}
.memory-page::before {
  content: "";
  position: absolute; inset: 0;
  background-image: radial-gradient(rgba(223, 246, 236, 0.09) 1px, transparent 1px);
  background-size: 30px 30px;
  opacity: 0.5;
  pointer-events: none;
}
.memory-hero { position: relative; z-index: 2; padding: 38px 0 44px; }
.memory-hero .crumb { font-size: 10.5px; letter-spacing: 0.14em; color: rgba(223, 246, 236, 0.52); margin-bottom: 20px; }
.memory-hero .crumb a:hover { color: var(--sun); }
.memory-hero-grid { display: grid; grid-template-columns: 1.4fr 0.6fr; gap: 44px; align-items: end; }
.memory-hero h1 {
  font-size: clamp(2.8rem, 6.4vw, 5.8rem);
  line-height: 1.02;
  font-weight: 900;
  letter-spacing: -0.05em;
  color: #fffdf4;
  margin: 14px 0 20px;
}
.memory-hero h1 em { font-family: var(--font-hand); font-style: normal; color: var(--sun); font-weight: 400; letter-spacing: 0.02em; }
.memory-hero .lead { max-width: 54ch; font-size: 13.5px; line-height: 2; color: rgba(223, 246, 236, 0.72); }
.memory-hero .lead b { color: var(--teal-300); font-weight: 700; }
.memory-stats {
  display: flex;
  gap: 10px;
  margin-top: 28px;
  flex-wrap: wrap;
}
.memory-stat {
  padding: 10px 16px;
  border: 1px solid rgba(127, 216, 195, 0.24);
  border-radius: 999px;
  background: rgba(255, 253, 244, 0.04);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  color: rgba(223, 246, 236, 0.6);
}
.memory-stat b { font-family: var(--font-num); font-size: 15px; color: var(--sun); margin-right: 4px; letter-spacing: 0; }

.memory-ticket {
  position: relative;
  padding: 22px;
  background: rgba(255, 253, 244, 0.06);
  border: 1px dashed rgba(127, 216, 195, 0.34);
  border-radius: 18px;
  transform: rotate(1.5deg);
}
.memory-ticket::before {
  content: "";
  position: absolute; top: -9px; left: 24px;
  width: 70px; height: 18px;
  background: rgba(255, 204, 77, 0.55);
  transform: rotate(-3deg);
}
.memory-ticket h3 { font-family: var(--font-chalk); font-size: 17px; color: var(--sun); letter-spacing: 0.08em; font-weight: 400; }
.memory-ticket p { font-size: 10.5px; line-height: 1.9; color: rgba(223, 246, 236, 0.58); margin-top: 8px; }
.memory-ticket .ticket-row { display: flex; justify-content: space-between; margin-top: 16px; padding-top: 12px; border-top: 1px dashed rgba(223, 246, 236, 0.16); font-size: 10px; color: rgba(223, 246, 236, 0.55); letter-spacing: 0.06em; }
.memory-ticket .ticket-row b { color: var(--teal-300); font-weight: 700; }

/* 黑板外框 */
.board-shell { position: relative; z-index: 2; width: min(1320px, calc(100% - 40px)); margin: 0 auto; padding-bottom: 80px; }
.chalkboard {
  position: relative;
  padding: 15px;
  background:
    repeating-linear-gradient(93deg, rgba(255, 255, 255, 0.05) 0 2px, transparent 2px 11px),
    linear-gradient(140deg, #b98a55, #8d5f37 55%, #a97a4a);
  border-radius: 20px;
  box-shadow: 0 40px 90px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
.chalkboard::before,
.chalkboard::after {
  content: "";
  position: absolute;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #e2c79d, #8a5b32 70%);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.2);
  z-index: 4;
}
.chalkboard::before { top: 8px; left: 8px; }
.chalkboard::after { top: 8px; right: 8px; }
.board-surface {
  position: relative;
  min-height: 560px;
  padding: 30px 34px 42px;
  border-radius: 10px;
  background:
    radial-gradient(ellipse at 18% 26%, rgba(255, 255, 255, 0.055), transparent 42%),
    radial-gradient(ellipse at 78% 68%, rgba(255, 255, 255, 0.045), transparent 46%),
    radial-gradient(ellipse at 52% 88%, rgba(255, 255, 255, 0.04), transparent 42%),
    linear-gradient(160deg, #17493e 0%, #113e34 55%, #0d352d 100%);
  box-shadow: inset 0 0 0 2px rgba(0, 0, 0, 0.28), inset 0 0 80px rgba(0, 0, 0, 0.35);
  overflow: hidden;
  color: #eef7ee;
}
.board-surface::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='.35'/%3E%3C/svg%3E");
  opacity: 0.12;
  mix-blend-mode: screen;
  pointer-events: none;
}
.board-surface::after {
  content: "";
  position: absolute;
  left: 4%; right: 4%; bottom: -60px;
  height: 100px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.035);
  filter: blur(18px);
  pointer-events: none;
}
.chalk-head {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(238, 247, 238, 0.16);
}
.chalk-title {
  font-family: var(--font-chalk);
  font-size: clamp(1.55rem, 2.5vw, 2.3rem);
  font-weight: 400;
  letter-spacing: 0.08em;
  color: #f3f9ee;
  text-shadow: 0 0 8px rgba(238, 247, 238, 0.24);
  line-height: 1.3;
}
.chalk-title .em { color: var(--sun); }
.chalk-sub {
  font-family: var(--font-chalk);
  margin-top: 6px;
  font-size: 12px;
  letter-spacing: 0.1em;
  color: rgba(238, 247, 238, 0.62);
}
.chalk-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.chalk-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  border: 1px dashed rgba(238, 247, 238, 0.45);
  border-radius: 8px;
  color: #eef7ee;
  font-family: var(--font-chalk);
  font-size: 13px;
  letter-spacing: 0.06em;
  background: rgba(255, 255, 255, 0.03);
  transition: 0.2s;
}
.chalk-btn:hover { background: rgba(255, 255, 255, 0.1); border-style: solid; transform: translateY(-2px); }
.chalk-btn--sun { color: var(--sun); border-color: rgba(255, 204, 77, 0.55); }
.chalk-btn--sun:hover { background: rgba(255, 204, 77, 0.12); }
.chalk-btn--ghost { border-color: transparent; opacity: 0.65; padding-inline: 8px; }
.chalk-btn--ghost:hover { opacity: 1; background: transparent; }

.board-body { position: relative; z-index: 2; padding-top: 24px; min-height: 380px; }

/* 年份 */
.year-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.year-card {
  position: relative;
  display: block;
  padding: 18px 18px 16px;
  border: 1px dashed rgba(238, 247, 238, 0.32);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
  transition: 0.25s;
  overflow: hidden;
}
.year-card::after {
  content: "→";
  position: absolute;
  right: 15px; bottom: 12px;
  font-family: var(--font-chalk);
  color: rgba(238, 247, 238, 0.3);
  font-size: 18px;
  transition: 0.25s;
}
.year-card:hover { border-color: var(--sun); background: rgba(255, 204, 77, 0.06); transform: translateY(-4px); }
.year-card:hover::after { color: var(--sun); transform: translateX(4px); }
.year-card .yr {
  font-family: var(--font-num);
  font-size: clamp(2rem, 3vw, 2.7rem);
  font-weight: 900;
  line-height: 1;
  color: #f2f8ec;
  letter-spacing: -0.03em;
  text-shadow: 0 0 10px rgba(238, 247, 238, 0.18);
}
.year-card .yr small { font-family: var(--font-chalk); font-size: 12px; letter-spacing: 0.1em; margin-left: 4px; color: rgba(238, 247, 238, 0.6); }
.year-card .yt { margin-top: 12px; font-size: 10.5px; letter-spacing: 0.06em; color: rgba(238, 247, 238, 0.6); }
.year-card .yt b { color: var(--sun); font-family: var(--font-num); font-size: 12px; }
.year-card .mark {
  position: absolute; top: 14px; right: 14px;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--sun);
  box-shadow: 0 0 0 4px rgba(255, 204, 77, 0.12);
}
.year-card.is-empty .mark { background: rgba(238, 247, 238, 0.22); box-shadow: none; }
.board-quote {
  position: relative;
  margin-top: 38px;
  padding-top: 24px;
  border-top: 1px dashed rgba(238, 247, 238, 0.16);
}
.board-quote .q {
  display: block;
  font-family: var(--font-chalk);
  font-size: clamp(1.1rem, 2vw, 1.55rem);
  line-height: 1.8;
  color: rgba(238, 247, 238, 0.72);
  letter-spacing: 0.06em;
  text-shadow: 0 0 8px rgba(238, 247, 238, 0.12);
}
.board-quote .s {
  display: block;
  margin-top: 8px;
  text-align: right;
  font-family: var(--font-chalk);
  font-size: 11px;
  color: rgba(238, 247, 238, 0.42);
  letter-spacing: 0.06em;
}
.board-quote .doodle {
  position: absolute;
  right: 8%;
  top: 18px;
  font-size: 34px;
  opacity: 0.24;
  transform: rotate(-9deg);
}
.board-note {
  margin-top: 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  font-family: var(--font-chalk);
  font-size: 11.5px;
  color: rgba(238, 247, 238, 0.42);
  letter-spacing: 0.06em;
}
.board-doodle { position: absolute; pointer-events: none; opacity: 0.32; font-family: var(--font-chalk); }
.board-doodle--plane { right: 3%; top: 12%; font-size: 40px; transform: rotate(-12deg); }
.board-doodle--star { left: 2%; bottom: 8%; font-size: 22px; }

/* 班级 */
.class-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.class-legend { font-family: var(--font-chalk); font-size: 11px; color: rgba(238, 247, 238, 0.45); letter-spacing: 0.06em; }
.class-legend i { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--sun); margin-right: 5px; box-shadow: 0 0 8px rgba(255, 204, 77, 0.5); }
.class-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 9px; }
.class-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 3px;
  aspect-ratio: 1.16;
  border: 1px dashed rgba(238, 247, 238, 0.24);
  border-radius: 8px;
  transition: 0.2s;
  background: rgba(255, 255, 255, 0.015);
}
.class-card .cno { font-family: var(--font-num); font-size: 20px; font-weight: 700; color: #eef7ee; line-height: 1; }
.class-card .cno small { font-family: var(--font-chalk); font-size: 9px; font-weight: 400; opacity: 0.55; margin-left: 2px; }
.class-card .cnum { font-family: var(--font-chalk); font-size: 9px; color: rgba(238, 247, 238, 0.4); letter-spacing: 0.04em; }
.class-card:hover { border-color: rgba(238, 247, 238, 0.7); background: rgba(255, 255, 255, 0.08); transform: translateY(-2px); }
.class-card.has-notes { border-style: solid; border-color: rgba(255, 204, 77, 0.45); background: rgba(255, 204, 77, 0.05); }
.class-card.has-notes .cnum { color: var(--sun); }
.class-card.has-notes::after {
  content: "";
  position: absolute; top: 6px; right: 6px;
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--sun);
  box-shadow: 0 0 6px rgba(255, 204, 77, 0.8);
}

/* 班级留言 */
.class-board-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; flex-wrap: wrap; margin-bottom: 10px; }
.class-board-head .chalk-title { font-size: clamp(1.45rem, 2.2vw, 2rem); }
.class-board-head .chalk-title small { font-size: 0.5em; opacity: 0.6; margin-left: 8px; letter-spacing: 0.08em; }
.class-tools { display: flex; gap: 8px; align-items: center; }
.notes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 22px;
  align-items: start;
  margin-top: 18px;
}
.notes .sticky-note { width: 100%; max-width: 560px; margin-bottom: 0; content-visibility: auto; contain-intrinsic-size: 420px; }
.notes .loading, .notes .empty { grid-column: 1 / -1; }
.class-empty {
  margin-top: 14px;
  padding: 44px 24px;
  border: 1.5px dashed rgba(238, 247, 238, 0.22);
  border-radius: 12px;
  text-align: center;
  color: rgba(238, 247, 238, 0.55);
}
.class-empty .ill { font-size: 52px; margin-bottom: 10px; opacity: 0.85; }
.class-empty h3 { font-family: var(--font-chalk); font-weight: 400; font-size: 22px; color: #f3f9ee; letter-spacing: 0.06em; margin-bottom: 8px; }
.class-empty p { font-size: 12px; line-height: 1.9; margin-bottom: 20px; }
.chalk-spinner { font-family: var(--font-chalk); letter-spacing: 0.1em; }

/* 黑板粉笔槽 */
.chalk-tray {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px 4px;
}
.chalk-tray .stick {
  height: 8px;
  width: 52px;
  border-radius: 3px;
  background: linear-gradient(90deg, #f4f1e2, #d9d4c0);
  box-shadow: 0 2px 2px rgba(0, 0, 0, 0.25);
  transform: rotate(-2deg);
}
.chalk-tray .stick--sun { background: linear-gradient(90deg, #ffe38b, #e8c25f); width: 38px; transform: rotate(2deg); }
.chalk-tray .stick--short { width: 26px; }
.chalk-tray .eraser {
  margin-left: auto;
  width: 74px; height: 16px;
  border-radius: 4px;
  background: linear-gradient(180deg, #374f45, #1d332d);
  box-shadow: inset 0 3px 0 rgba(255, 255, 255, 0.14), 0 2px 4px rgba(0, 0, 0, 0.25);
  transform: rotate(-1deg);
}
.chalk-tray .tray-note { font-family: var(--font-chalk); font-size: 9px; color: rgba(255, 253, 244, 0.55); letter-spacing: 0.08em; }

/* 写作弹窗 */
.composer-box { width: min(680px, 100%); background: #fffdf4; border-radius: 22px; }
.composer-sticky { position: relative; }
.composer-note {
  margin: 0 24px 20px;
  padding: 8px 14px;
  background: #fff8d6;
  border-left: 3px solid var(--sun-deep);
  font-size: 10.5px;
  line-height: 1.8;
  color: #79683a;
  border-radius: 0 6px 6px 0;
}
.mode-switch { display: inline-flex; padding: 4px; background: rgba(18, 60, 58, 0.06); border-radius: 999px; gap: 2px; }
.mode-switch button {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 15px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-mute);
  transition: 0.2s;
}
.mode-switch button.is-on { background: #fffdf4; color: var(--teal-900); box-shadow: 0 2px 8px rgba(18, 60, 58, 0.12); }
.mode-switch button.is-on[data-mode="anon"] { background: var(--teal-900); color: #fffdf4; }
.lined-input {
  background-color: #fffdf1;
  background-image: repeating-linear-gradient(to bottom, transparent 0, transparent 29px, rgba(152, 129, 60, 0.2) 29px, rgba(152, 129, 60, 0.2) 30px);
  line-height: 30px;
  min-height: 150px;
  border-color: rgba(185, 160, 90, 0.4);
}
.mode-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.composer-actions { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 8px; }
.composer-actions .left { font-size: 10px; color: var(--ink-mute); line-height: 1.7; }
.composer-actions .right { display: flex; gap: 8px; }

/* ---------------- 班级记忆 · 照片墙 ---------------- */
.class-memory {
  position: relative;
  margin: 0 0 30px;
  padding: 20px 20px 16px;
  border: 1px solid rgba(232, 218, 177, 0.28);
  border-radius: 6px;
  background:
    linear-gradient(135deg, rgba(8, 35, 31, 0.72), rgba(13, 55, 47, 0.52));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  overflow: hidden;
}
.class-memory::after {
  content: "";
  position: absolute;
  right: -40px;
  top: -50px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(244, 205, 108, 0.15), transparent 65%);
  pointer-events: none;
}
.cm-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  position: relative;
  z-index: 1;
}
.cm-kicker {
  font-family: var(--font-num);
  font-size: 9px;
  letter-spacing: 0.22em;
  color: #d9bd76;
  margin-bottom: 6px;
}
.cm-title {
  font-family: var(--font-chalk);
  font-weight: 400;
  font-size: 26px;
  line-height: 1.2;
  color: #f6f3df;
  letter-spacing: 0.05em;
}
.cm-title span {
  font-family: var(--font-hand);
  font-size: 14px;
  color: #b9d7c8;
  letter-spacing: 0.02em;
  margin-left: 7px;
}
.cm-sub {
  margin-top: 5px;
  font-size: 11px;
  color: #a9c7ba;
  line-height: 1.7;
}
.cm-tools {
  display: flex;
  align-items: center;
  gap: 7px;
  flex: none;
  position: relative;
  z-index: 2;
}
.cm-nav, .cm-expand {
  font-family: var(--font-hand);
  color: #f0e9cf;
  background: rgba(255, 253, 240, 0.08);
  border: 1px solid rgba(240, 233, 207, 0.28);
  border-radius: 999px;
  cursor: pointer;
  transition: 0.2s;
}
.cm-nav {
  width: 33px;
  height: 33px;
  display: grid;
  place-items: center;
  font-family: var(--font-num);
  font-size: 16px;
}
.cm-expand {
  height: 33px;
  padding: 0 14px;
  font-size: 12px;
  letter-spacing: 0.04em;
}
.cm-nav:hover, .cm-expand:hover { background: #e7c66d; border-color: #e7c66d; color: #123c35; }
.cm-nav:disabled { opacity: 0.35; cursor: default; }
.cm-viewport {
  position: relative;
  z-index: 1;
  margin: 16px -4px 0;
  padding: 4px 4px 12px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.cm-viewport::-webkit-scrollbar { display: none; }
.cm-track { display: flex; gap: 14px; }
.cm-card {
  position: relative;
  margin: 0;
  flex: 0 0 246px;
  width: 246px;
  padding: 8px 8px 10px;
  background: #fbf7e8;
  border-radius: 3px;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.22);
  transform: rotate(-0.7deg);
  scroll-snap-align: start;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.cm-card:nth-child(even) { transform: rotate(0.8deg); }
.cm-card:hover { transform: rotate(0) translateY(-4px); box-shadow: 0 16px 30px rgba(0, 0, 0, 0.3); }
.cm-card::before {
  content: "";
  position: absolute;
  top: -6px;
  left: 50%;
  width: 52px;
  height: 12px;
  margin-left: -26px;
  background: rgba(236, 209, 139, 0.72);
  transform: rotate(-2deg);
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.08);
}
.cm-shot {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #dcd4bf;
  border: 0;
  padding: 0;
  cursor: zoom-in;
}
.cm-shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}
.cm-shot:hover img { transform: scale(1.035); }
.cm-meta { padding: 8px 2px 0; }
.cm-name {
  display: block;
  font-family: var(--font-hand);
  font-size: 14px;
  line-height: 1.35;
  color: #21453d;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cm-text {
  margin-top: 3px;
  font-size: 10px;
  line-height: 1.55;
  color: #7a7665;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.cm-grid {
  display: none;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
  position: relative;
  z-index: 1;
}
.cm-grid .cm-card { flex: none; width: auto; transform: none; }
.class-memory.is-expanded .cm-viewport,
.class-memory.is-expanded .cm-hint { display: none; }
.class-memory.is-expanded .cm-grid { display: grid; }
.cm-hint {
  position: relative;
  z-index: 1;
  margin-top: 2px;
  font-size: 10px;
  color: #8fb3a5;
  letter-spacing: 0.03em;
}
.class-memory.is-empty { padding-bottom: 18px; }
.class-memory.is-empty .cm-empty-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 14px;
  padding-top: 13px;
  border-top: 1px dashed rgba(232, 218, 177, 0.2);
}
.class-memory.is-empty .cm-empty-row p { font-size: 11px; color: #a9c7ba; line-height: 1.7; }
.class-memory.is-empty .cm-empty-row .chalk-btn { flex: none; }

/* 响应式 */
@media (max-width: 1080px) {
  .memory-hero-grid { grid-template-columns: 1fr; gap: 30px; }
  .memory-ticket { max-width: 380px; }
  .notes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .year-grid { grid-template-columns: repeat(5, 1fr); }
  .class-grid { grid-template-columns: repeat(8, 1fr); }
}
@media (max-width: 820px) {
  .memory-page { padding-top: 92px; }
  .board-shell { width: calc(100% - 20px); }
  .chalkboard { padding: 9px; border-radius: 14px; }
  .board-surface { padding: 22px 18px 30px; min-height: 480px; }
  .year-grid { grid-template-columns: repeat(2, 1fr); gap: 9px; }
  .year-card { padding: 15px 14px; }
  .year-card .yr { font-size: 1.9rem; }
  .class-grid { grid-template-columns: repeat(5, 1fr); gap: 7px; }
  .notes { grid-template-columns: 1fr; }
  .chalk-head { flex-direction: column; gap: 10px; }
  .chalk-actions { justify-content: flex-start; }
  .board-body { padding-top: 18px; }
  .board-note { flex-direction: column; align-items: flex-start; gap: 6px; }
  .memory-stats { gap: 7px; }
  .memory-stat { padding: 8px 12px; }
  .memory-ticket { transform: none; }
  .chalk-tray .tray-note { display: none; }
}
@media (max-width: 520px) {
  .memory-hero { padding: 24px 0 30px; }
  .memory-hero h1 { font-size: 2.7rem; }
  .class-grid { grid-template-columns: repeat(4, 1fr); }
  .class-card { aspect-ratio: 1.05; }
  .class-card .cno { font-size: 18px; }
  .composer-actions { flex-direction: column; align-items: stretch; }
  .composer-actions .right { justify-content: flex-end; }
  .chalk-tray .eraser { width: 54px; }
  .class-memory { padding: 15px 13px 12px; margin-bottom: 22px; }
  .cm-head { flex-direction: column; gap: 11px; }
  .cm-tools { width: 100%; justify-content: flex-end; }
  .cm-title { font-size: 22px; }
  .cm-card { flex-basis: 214px; width: 214px; }
  .cm-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .cm-grid .cm-text { display: none; }
  .cm-empty-row { flex-direction: column; align-items: flex-start; gap: 8px; }
}
@media (max-width: 820px) {
  .cm-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; }
}
@media (max-width: 520px) {
  .cm-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
