/* ============================================
   锡山高中同学录 · 全局样式
   设计语汇：宣纸底色 / 黛蓝 / 朱砂 / 衬线标题
   ============================================ */

:root {
  --paper: #f7f2e8;
  --paper-deep: #efe7d6;
  --ink: #2b2a24;
  --ink-soft: #6b675c;
  --blue: #1e4668;
  --blue-deep: #15334e;
  --red: #a63d2a;
  --gold: #b98a2f;
  --line: rgba(43, 42, 36, 0.14);
  --card: #fffdf8;
  --shadow: 0 1px 2px rgba(43, 42, 36, 0.05), 0 10px 30px -12px rgba(43, 42, 36, 0.18);
  --radius: 14px;
  --serif: "Noto Serif SC", "Songti SC", "STSong", "SimSun", serif;
  --sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", sans-serif;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--sans);
  background-color: var(--paper);
  background-image:
    radial-gradient(rgba(43, 42, 36, 0.025) 1px, transparent 1px),
    linear-gradient(var(--paper), var(--paper));
  background-size: 22px 22px, 100% 100%;
  color: var(--ink);
  line-height: 1.75;
  min-height: 100vh;
}

::selection { background: rgba(30, 70, 104, 0.18); }

h1, h2, h3, .serif { font-family: var(--serif); font-weight: 600; letter-spacing: 0.04em; }

a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--red); }

img { max-width: 100%; display: block; }

/* ---------- 顶栏 ---------- */

.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 5vw; height: 64px;
  background: rgba(247, 242, 232, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.brand { display: flex; align-items: center; gap: 12px; }

.seal {
  width: 34px; height: 34px; flex: none;
  display: grid; place-items: center;
  background: var(--red); color: #f7efe2;
  font-family: var(--serif); font-size: 15px; font-weight: 700;
  border-radius: 6px;
  box-shadow: inset 0 0 0 2px rgba(247, 239, 226, 0.55);
  transform: rotate(-3deg);
}

.brand-name { font-family: var(--serif); font-size: 17px; letter-spacing: 0.12em; }
.brand-name small { display: block; font-size: 10px; letter-spacing: 0.3em; color: var(--ink-soft); }

.topbar-right { display: flex; align-items: center; gap: 18px; font-size: 14px; }
.topbar-right .who { color: var(--ink-soft); }
.topbar-right .who b { color: var(--ink); font-weight: 600; }

/* ---------- 按钮 ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 22px;
  font-family: var(--sans); font-size: 15px; letter-spacing: 0.08em;
  color: var(--ink); background: transparent;
  border: 1px solid var(--ink); border-radius: 999px;
  cursor: pointer; transition: all 0.22s ease;
}
.btn:hover { background: var(--ink); color: var(--paper); transform: translateY(-1px); }

.btn-primary { background: var(--blue); border-color: var(--blue); color: #f5f1e6; }
.btn-primary:hover { background: var(--blue-deep); border-color: var(--blue-deep); color: #fff; }

.btn-red { background: var(--red); border-color: var(--red); color: #f9f2e7; }
.btn-red:hover { background: #8e3222; border-color: #8e3222; color: #fff; }

.btn-ghost { border-color: var(--line); color: var(--ink-soft); }
.btn-ghost:hover { border-color: var(--ink); background: var(--ink); color: var(--paper); }

.btn-sm { padding: 6px 14px; font-size: 13px; }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; transform: none; }

/* ---------- 布局 ---------- */

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 5vw 80px; }

.section-title {
  display: flex; align-items: baseline; gap: 14px;
  margin: 56px 0 22px;
}
.section-title h2 { font-size: 26px; }
.section-title .en {
  font-size: 11px; letter-spacing: 0.32em; text-transform: uppercase;
  color: var(--ink-soft);
}
.section-title::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* ---------- 卡片 ---------- */

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px 30px;
}

/* ---------- 表单 ---------- */

.field { margin-bottom: 18px; }
.field label {
  display: block; margin-bottom: 6px;
  font-size: 13px; letter-spacing: 0.12em; color: var(--ink-soft);
}
.field input, .field textarea, .field select {
  width: 100%; padding: 11px 14px;
  font-family: var(--sans); font-size: 15px; color: var(--ink);
  background: #fffefa;
  border: 1px solid var(--line); border-radius: 10px;
  outline: none; transition: border-color 0.2s, box-shadow 0.2s;
}
.field input:focus, .field textarea:focus, .field select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(30, 70, 104, 0.12);
}
.field textarea { resize: vertical; min-height: 96px; line-height: 1.7; }
.field .hint { margin-top: 5px; font-size: 12px; color: var(--ink-soft); }

.form-error {
  display: none; margin: 4px 0 14px; padding: 10px 14px;
  font-size: 14px; color: var(--red);
  background: rgba(166, 61, 42, 0.07);
  border: 1px solid rgba(166, 61, 42, 0.25);
  border-radius: 10px;
}
.form-error.show { display: block; }

.form-ok {
  display: none; margin: 4px 0 14px; padding: 10px 14px;
  font-size: 14px; color: #2f6b3a;
  background: rgba(47, 107, 58, 0.07);
  border: 1px solid rgba(47, 107, 58, 0.25);
  border-radius: 10px;
}
.form-ok.show { display: block; }

/* ---------- 主页：照片墙 / 校徽 / 校史 ---------- */

.school-badge {
  position: absolute; top: 64px; right: 2vw;
  width: 118px; height: auto;
  filter: drop-shadow(0 6px 16px rgba(43, 42, 36, 0.18));
  transform: rotate(3deg);
}

.photo-strip {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px;
  margin-top: 26px;
}
.photo-strip .hero-photo { min-height: 200px; }

.timeline { list-style: none; margin-top: 8px; }
.timeline li {
  display: flex; gap: 22px; align-items: baseline;
  padding: 15px 4px;
  border-bottom: 1px dashed var(--line);
}
.timeline li:last-child { border-bottom: none; }
.timeline .yr {
  flex: none; width: 76px;
  font-family: var(--serif); font-size: 20px; color: var(--red);
  letter-spacing: 0.05em;
}
.timeline .ev { font-size: 15px; color: #3d3b33; }
.timeline .ev b { font-weight: 600; }

@media (max-width: 860px) {
  .photo-strip { grid-template-columns: 1fr; }
  .school-badge { display: none; }
}

/* ---------- 登录页 ---------- */

.auth-hero {
  position: relative; overflow: hidden;
  padding: 88px 5vw 64px;
  background: var(--blue-deep); color: #efe8d8;
}
.auth-hero::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 60% 90% at 85% 10%, rgba(185, 138, 47, 0.16), transparent 60%),
    radial-gradient(ellipse 70% 100% at 10% 100%, rgba(166, 61, 42, 0.14), transparent 55%);
  pointer-events: none;
}
.auth-hero-inner {
  position: relative; max-width: 1080px; margin: 0 auto;
  display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 60px; align-items: center;
}
.auth-hero .kicker {
  font-size: 12px; letter-spacing: 0.5em; color: rgba(239, 232, 216, 0.6);
  margin-bottom: 18px;
}
.auth-hero h1 { font-size: clamp(34px, 4.6vw, 52px); line-height: 1.3; color: #f7f2e6; }
.auth-hero h1 em { font-style: normal; color: var(--gold); }
.auth-hero p.sub { margin-top: 18px; max-width: 460px; color: rgba(239, 232, 216, 0.75); font-size: 15px; }

.auth-box {
  background: var(--card); color: var(--ink);
  border-radius: 18px; box-shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.45);
  padding: 34px 32px;
}
.auth-tabs { display: flex; gap: 8px; margin-bottom: 26px; }
.auth-tabs button {
  flex: 1; padding: 10px 0;
  font-family: var(--serif); font-size: 17px; letter-spacing: 0.2em;
  background: none; border: none; cursor: pointer;
  color: var(--ink-soft); border-bottom: 2px solid var(--line);
  transition: all 0.2s;
}
.auth-tabs button.active { color: var(--blue); border-bottom-color: var(--blue); }

/* ---------- 主页横幅 ---------- */

.home-hero { position: relative; padding: 72px 0 8px; }
.home-hero .kicker {
  font-size: 12px; letter-spacing: 0.5em; color: var(--red); margin-bottom: 16px;
}
.home-hero h1 { font-size: clamp(32px, 4.4vw, 50px); line-height: 1.35; }
.home-hero .lead { margin-top: 18px; max-width: 640px; color: var(--ink-soft); font-size: 16px; }

.hero-grid {
  display: grid; grid-template-columns: 1.35fr 1fr; gap: 26px;
  margin-top: 40px; align-items: stretch;
}
.hero-photo {
  position: relative; overflow: hidden;
  border-radius: var(--radius); border: 1px solid var(--line);
  box-shadow: var(--shadow); min-height: 300px;
  background: var(--paper-deep);
}
.hero-photo img, .hero-photo svg { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.hero-photo .caption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 14px 18px; font-size: 13px; letter-spacing: 0.1em;
  color: #f3ecdd; background: linear-gradient(transparent, rgba(21, 51, 78, 0.85));
}
.motto-card {
  display: flex; flex-direction: column; justify-content: center; gap: 22px;
  padding: 36px 34px;
  background: var(--blue); color: #ece5d3;
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.motto-card .motto {
  font-family: var(--serif); font-size: 46px; letter-spacing: 0.35em; color: #f5efdf;
}
.motto-card .motto-sub { font-size: 13px; letter-spacing: 0.15em; color: rgba(236, 229, 211, 0.72); }
.motto-card .fact { display: flex; gap: 12px; font-size: 14px; color: rgba(236, 229, 211, 0.85); }
.motto-card .fact b { font-family: var(--serif); font-size: 20px; color: var(--gold); font-weight: 600; }

/* ---------- 行动卡片（创建/加入/进入班级） ---------- */

.action-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 22px; }
.action-card {
  position: relative; overflow: hidden;
  padding: 30px 28px; cursor: pointer;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.action-card:hover { transform: translateY(-4px); box-shadow: 0 2px 4px rgba(43,42,36,0.05), 0 18px 40px -14px rgba(43,42,36,0.28); }
.action-card .num {
  font-family: var(--serif); font-size: 13px; letter-spacing: 0.3em; color: var(--gold);
}
.action-card h3 { font-size: 22px; margin: 10px 0 8px; }
.action-card p { font-size: 14px; color: var(--ink-soft); }
.action-card .go {
  position: absolute; right: 22px; bottom: 20px;
  font-size: 22px; color: var(--line); transition: all 0.25s;
}
.action-card:hover .go { color: var(--red); transform: translateX(4px); }
.action-card.enter { background: var(--blue); border-color: var(--blue); }
.action-card.enter h3, .action-card.enter .num { color: #f5efdf; }
.action-card.enter p { color: rgba(245, 239, 223, 0.75); }

.notice-pill {
  display: inline-flex; align-items: center; gap: 8px;
  margin-top: 18px; padding: 9px 18px;
  font-size: 13px; letter-spacing: 0.06em; color: var(--ink-soft);
  background: var(--paper-deep); border: 1px dashed var(--line);
  border-radius: 999px;
}

/* ---------- 班级列表（加入班级） ---------- */

.class-list { display: grid; gap: 14px; }
.class-row {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px 22px;
  background: var(--card); border: 1px solid var(--line);
  border-radius: 12px; box-shadow: var(--shadow);
}
.class-row .cname { font-family: var(--serif); font-size: 19px; }
.class-row .cmeta { font-size: 13px; color: var(--ink-soft); margin-top: 2px; }

.empty-hint {
  padding: 48px 20px; text-align: center;
  color: var(--ink-soft); font-size: 14px; letter-spacing: 0.08em;
  border: 1px dashed var(--line); border-radius: var(--radius);
}

/* ---------- 班级群聊（微信样式） ---------- */

.chat-wrap { overflow: hidden; padding: 0; }
.announce-bar {
  padding: 10px 18px; font-size: 13px; line-height: 1.7;
  color: #6b5a2e; background: rgba(185, 138, 47, 0.1);
  border-bottom: 1px solid rgba(185, 138, 47, 0.25);
  cursor: pointer;
}
.chat-log {
  height: 52vh; min-height: 320px; overflow-y: auto;
  padding: 18px 16px 8px;
  background: var(--paper-deep);
}
.chat-msg { display: flex; gap: 10px; margin-bottom: 16px; }
.chat-msg.me { flex-direction: row-reverse; }
.chat-ava {
  width: 38px; height: 38px; flex: none;
  display: grid; place-items: center;
  font-family: var(--serif); font-size: 16px; color: #f5efdf;
  background: var(--blue); border-radius: 9px;
}
.chat-body { max-width: 72%; }
.chat-msg.me .chat-body { text-align: right; }
.chat-name { font-size: 11px; color: var(--ink-soft); margin-bottom: 4px; }
.chat-bubble {
  display: inline-block; text-align: left;
  padding: 9px 13px; font-size: 15px; line-height: 1.65;
  background: #fff; color: var(--ink);
  border-radius: 4px 12px 12px 12px;
  box-shadow: 0 1px 2px rgba(43, 42, 36, 0.08);
  word-break: break-word; white-space: pre-wrap;
}
.chat-msg.me .chat-bubble {
  background: var(--blue); color: #f5efdf;
  border-radius: 12px 4px 12px 12px;
}
.chat-bubble .at { color: var(--red); font-weight: 600; }
.chat-msg.me .chat-bubble .at { color: #f2c94c; }
.chat-time-line { text-align: center; font-size: 11px; color: var(--ink-soft); margin: 10px 0; }
.chat-tools {
  display: flex; gap: 6px; align-items: center;
  padding: 8px 12px; border-top: 1px solid var(--line);
  background: var(--card); font-size: 13px;
}
.chat-tools .tool {
  cursor: pointer; color: var(--ink-soft); padding: 4px 10px; border-radius: 8px;
}
.chat-tools .tool:hover { background: var(--paper-deep); color: var(--blue); }
.chat-tools .spacer { flex: 1; }
.chat-input-bar {
  display: flex; gap: 8px; padding: 10px 12px;
  background: var(--card);
}
.chat-input-bar textarea {
  flex: 1; min-height: 42px; max-height: 120px; padding: 9px 12px;
  font-family: var(--sans); font-size: 15px; resize: none;
  border: 1px solid var(--line); border-radius: 10px; outline: none;
  background: #fffefa;
}
.chat-input-bar textarea:focus { border-color: var(--blue); }

.mention-pop {
  position: absolute; bottom: 100%; left: 0; right: 0; z-index: 20;
  max-height: 220px; overflow-y: auto; margin-bottom: 6px;
  background: var(--card); border: 1px solid var(--line);
  border-radius: 12px; box-shadow: 0 12px 40px -10px rgba(0,0,0,0.25);
  display: none;
}
.mention-pop.show { display: block; }
.mention-pop .m-item { padding: 9px 14px; font-size: 14px; cursor: pointer; }
.mention-pop .m-item:hover { background: var(--paper-deep); }

/* ---------- 顶栏搜索 ---------- */

.top-search { position: relative; }
.top-search input {
  width: 150px; padding: 6px 12px; font-size: 13px;
  border: 1px solid var(--line); border-radius: 999px;
  background: #fffefa; outline: none;
}
.top-search input:focus { border-color: var(--blue); width: 190px; }
.top-search input { transition: width 0.25s ease; }
.search-pop {
  position: absolute; top: 36px; right: 0; z-index: 120;
  width: 260px; background: var(--card);
  border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 16px 44px -12px rgba(0,0,0,0.3);
  display: none; overflow: hidden;
}
.search-pop.show { display: block; }
.search-pop .s-item { padding: 10px 14px; cursor: pointer; font-size: 14px; border-bottom: 1px dashed var(--line); }
.search-pop .s-item:last-child { border-bottom: none; }
.search-pop .s-item:hover { background: var(--paper-deep); }
.search-pop .s-item .s-sub { font-size: 12px; color: var(--ink-soft); }

/* ---------- 可见范围 ---------- */
.vis-row { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--ink-soft); }
.vis-row select {
  padding: 5px 10px; font-size: 13px; border: 1px solid var(--line);
  border-radius: 8px; background: #fffefa; outline: none;
}
.vis-pick { font-size: 13px; color: var(--blue); cursor: pointer; }
.vis-pick:hover { text-decoration: underline; }
.vis-user-list { max-height: 300px; overflow-y: auto; }
.vis-user-list .vu {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px;
  cursor: pointer; border-radius: 8px; font-size: 14px;
}
.vis-user-list .vu:hover { background: var(--paper-deep); }
.vis-user-list .vu input { width: auto; }

/* ---------- 特别关心 ---------- */
.care-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 18px; font-size: 14px; cursor: pointer;
  border: 1px solid rgba(243, 236, 221, 0.5); border-radius: 999px;
  color: rgba(243, 236, 221, 0.9); background: transparent;
  transition: all 0.2s;
}
.care-btn:hover { border-color: #f2c94c; color: #f2c94c; }
.care-btn.on { background: rgba(242, 201, 76, 0.15); border-color: #f2c94c; color: #f2c94c; }

/* ---------- 反馈 ---------- */
.fb-item { padding: 14px 0; border-bottom: 1px dashed var(--line); }
.fb-item:last-child { border-bottom: none; }
.fb-item .fb-text { font-size: 14px; }
.fb-item .fb-reply {
  margin-top: 8px; padding: 10px 12px; font-size: 13px;
  background: rgba(30, 70, 104, 0.06); border-radius: 10px;
}
.fb-item .fb-meta { font-size: 12px; color: var(--ink-soft); margin-top: 6px; }

.notify-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  margin-top: 22px; padding: 13px 20px;
  background: rgba(30, 70, 104, 0.07); border: 1px solid rgba(30, 70, 104, 0.2);
  border-radius: 12px; font-size: 14px;
}

/* ---------- 评论 ---------- */
.c-list {
  margin-top: 10px; padding: 8px 12px;
  background: rgba(43, 42, 36, 0.04); border-radius: 10px;
}
.c-item { font-size: 13px; line-height: 1.9; color: #3d3b33; }
.c-item b { color: var(--blue-deep); }
.c-del { color: var(--ink-soft); cursor: pointer; font-size: 12px; margin-left: 6px; }
.c-del:hover { color: var(--red); }
.c-input { display: flex; gap: 8px; margin-top: 10px; }
.c-input input {
  flex: 1; padding: 8px 12px; font-size: 13px;
  border: 1px solid var(--line); border-radius: 999px;
  background: #fffefa; outline: none;
}
.c-input input:focus { border-color: var(--blue); }

/* ---------- 个人中心 ---------- */
.center-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; align-items: start; }
@media (max-width: 860px) { .center-grid { grid-template-columns: 1fr; } }
.center-card h3 { margin-bottom: 14px; }
.radio-row { display: flex; flex-direction: column; gap: 10px; font-size: 14px; color: var(--ink-soft); }
.radio-row label { display: flex; gap: 8px; align-items: flex-start; cursor: pointer; }
.radio-row input { width: auto; margin-top: 4px; }

/* ---------- 主页照片墙 ---------- */
.photo-wall { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.photo-wall img {
  width: 100%; aspect-ratio: 1; object-fit: cover;
  border-radius: 12px; border: 1px solid var(--line); cursor: pointer;
}
.photo-guide {
  padding: 28px 20px; text-align: center; font-size: 14px; color: var(--ink-soft);
  border: 1px dashed var(--line); border-radius: var(--radius);
}

/* ---------- 论坛 ---------- */
.forum-card {
  display: flex; justify-content: space-between; align-items: center; gap: 14px;
  padding: 18px 22px; margin-bottom: 12px; cursor: pointer;
  background: var(--card); border: 1px solid var(--line);
  border-radius: 12px; box-shadow: var(--shadow);
  transition: transform 0.2s ease;
}
.forum-card:hover { transform: translateY(-2px); }
.forum-card .f-title { font-family: var(--serif); font-size: 18px; }
.forum-card .f-meta { font-size: 12px; color: var(--ink-soft); margin-top: 4px; }

/* ---------- 通知铃铛 ---------- */

.bell {
  position: relative; cursor: pointer; font-size: 18px;
  user-select: none; padding: 2px 4px;
}
.bell .dot {
  position: absolute; top: -4px; right: -8px;
  min-width: 16px; height: 16px; padding: 0 4px;
  font-size: 10px; font-style: normal; line-height: 16px; text-align: center;
  color: #fff; background: var(--red); border-radius: 999px;
}
.notif-panel {
  position: fixed; top: 60px; right: 4vw; z-index: 150;
  width: 360px; max-width: 92vw; max-height: 70vh; overflow-y: auto;
  background: var(--card); border: 1px solid var(--line);
  border-radius: 14px; box-shadow: 0 24px 60px -18px rgba(0, 0, 0, 0.35);
  display: none;
}
.notif-panel.show { display: block; animation: rise 0.2s ease; }
.notif-head {
  padding: 14px 18px; font-family: var(--serif); font-size: 16px;
  border-bottom: 1px solid var(--line);
}
.notif-empty { padding: 34px 18px; text-align: center; color: var(--ink-soft); font-size: 13px; }
.notif-item { padding: 13px 18px; border-bottom: 1px dashed var(--line); }
.notif-item:last-child { border-bottom: none; }
.notif-item.unread { background: rgba(185, 138, 47, 0.06); }
.notif-title { font-size: 14px; font-weight: 600; display: flex; justify-content: space-between; gap: 10px; }
.notif-time { font-weight: 400; font-size: 12px; color: var(--ink-soft); flex: none; }
.notif-content { margin-top: 4px; font-size: 13px; color: var(--ink-soft); line-height: 1.7; white-space: pre-wrap; }

/* ---------- 帖子（朋友圈样式） ---------- */

.composer { margin-bottom: 22px; }
.composer-text {
  width: 100%; min-height: 76px; padding: 14px 16px;
  font-family: var(--sans); font-size: 15px; line-height: 1.7; color: var(--ink);
  background: #fffefa; border: 1px solid var(--line); border-radius: 12px;
  outline: none; resize: vertical;
}
.composer-text:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(30, 70, 104, 0.12); }
.composer-bar { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; }
.composer-pick { font-size: 14px; color: var(--ink-soft); cursor: pointer; }
.composer-pick:hover { color: var(--blue); }
.composer-preview { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.composer-thumb {
  position: relative; width: 84px; height: 84px; overflow: hidden;
  border-radius: 10px; border: 1px solid var(--line); background: var(--paper-deep);
}
.composer-thumb img, .composer-thumb video { width: 100%; height: 100%; object-fit: cover; }
.up-progress {
  width: 100%; height: 100%; display: grid; place-items: center;
  font-size: 13px; color: var(--ink-soft);
}
.thumb-x {
  position: absolute; top: 2px; right: 4px; cursor: pointer;
  color: #fff; text-shadow: 0 0 4px rgba(0,0,0,0.7); font-size: 16px;
}

.post {
  display: flex; gap: 14px; padding: 20px 22px;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
  margin-bottom: 16px;
}
.p-ava {
  width: 44px; height: 44px; flex: none;
  display: grid; place-items: center;
  font-family: var(--serif); font-size: 19px; color: #f5efdf;
  background: var(--blue); border-radius: 12px;
}
.p-main { flex: 1; min-width: 0; }
.p-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.p-head b { font-size: 15px; color: var(--blue-deep); }
.p-scope { font-size: 11px; color: var(--gold); letter-spacing: 0.06em; }
.p-time { margin-left: auto; font-size: 12px; color: var(--ink-soft); }
.p-text { margin-top: 6px; font-size: 15px; line-height: 1.8; white-space: pre-wrap; word-break: break-word; }
.p-media { display: grid; gap: 6px; margin-top: 10px; }
.p-media.n1 { grid-template-columns: minmax(0, 420px); }
.p-media.n2 { grid-template-columns: repeat(2, minmax(0, 220px)); }
.p-media.n3 { grid-template-columns: repeat(3, minmax(0, 160px)); }
.p-media img, .p-media video {
  width: 100%; border-radius: 10px; background: #26251f;
  aspect-ratio: 4/3; object-fit: cover; cursor: pointer;
}
.p-media.n1 video { aspect-ratio: 16/9; cursor: default; }
.p-actions { margin-top: 12px; display: flex; gap: 22px; font-size: 13px; }
.p-act { color: var(--ink-soft); cursor: pointer; user-select: none; }
.p-act:hover { color: var(--red); }
.p-act.on { color: var(--red); }
.p-act.danger:hover { color: var(--red); text-decoration: underline; }
.p-act i { font-style: normal; }

.feed-filter { display: flex; gap: 16px; margin-bottom: 16px; font-size: 14px; }
.feed-filter span { cursor: pointer; color: var(--ink-soft); padding-bottom: 3px; border-bottom: 2px solid transparent; }
.feed-filter span.active { color: var(--blue); border-bottom-color: var(--blue); }

/* ---------- 班级相册 ---------- */

.album-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 18px; }
.album-card {
  cursor: pointer; overflow: hidden;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
  transition: transform 0.22s ease;
}
.album-card:hover { transform: translateY(-3px); }
.album-cover {
  height: 150px; background: var(--paper-deep);
  display: grid; place-items: center; overflow: hidden;
  font-size: 34px;
}
.album-cover img, .album-cover video { width: 100%; height: 100%; object-fit: cover; }
.album-info { padding: 14px 16px; }
.album-info h4 { font-family: var(--serif); font-size: 17px; }
.album-info .a-meta { font-size: 12px; color: var(--ink-soft); margin-top: 3px; }

.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.media-item {
  position: relative; overflow: hidden;
  border-radius: 12px; border: 1px solid var(--line); background: #26251f;
}
.media-item img, .media-item video { width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block; }
.media-item .m-caption {
  padding: 9px 12px; font-size: 13px; color: #3d3b33; background: var(--card);
}
.media-item .m-owner { font-size: 11px; color: var(--ink-soft); padding: 0 12px 9px; background: var(--card); display: block; margin-top: -4px; }
.media-item .m-ops { display: flex; gap: 12px; padding: 0 12px 10px; background: var(--card); font-size: 12px; }
.media-item .m-ops span { color: var(--ink-soft); cursor: pointer; }
.media-item .m-ops span:hover { color: var(--red); }

.album-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.album-head h3 { font-size: 22px; }
.album-head .a-desc { width: 100%; font-size: 14px; color: var(--ink-soft); }

/* ---------- 填空式输入（班级编号 / 搜索） ---------- */

.blank-row {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  font-family: var(--serif); font-size: 19px; letter-spacing: 0.05em;
}
.blank-row input {
  width: 74px; padding: 8px 6px;
  text-align: center; font-family: var(--serif); font-size: 19px; color: var(--ink);
  background: #fffefa; border: 1px solid var(--line); border-radius: 10px;
  outline: none; transition: border-color 0.2s, box-shadow 0.2s;
}
.blank-row input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(30, 70, 104, 0.12);
}
.blank-row.small { font-family: var(--sans); font-size: 14px; color: var(--ink-soft); }
.blank-row.small input { width: 62px; font-family: var(--sans); font-size: 14px; padding: 7px 6px; }

/* ---------- 弹层 ---------- */

.modal-mask {
  position: fixed; inset: 0; z-index: 100;
  display: none; align-items: center; justify-content: center;
  padding: 24px;
  background: rgba(30, 28, 22, 0.5);
  backdrop-filter: blur(3px);
}
.modal-mask.show { display: flex; }
.modal {
  width: 100%; max-width: 520px; max-height: 88vh; overflow-y: auto;
  background: var(--card); border-radius: 18px;
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.4);
  padding: 32px 30px;
  animation: rise 0.25s ease;
}
@keyframes rise { from { transform: translateY(14px); opacity: 0; } to { transform: none; opacity: 1; } }
.modal h3 { font-size: 21px; margin-bottom: 4px; }
.modal .modal-sub { font-size: 13px; color: var(--ink-soft); margin-bottom: 22px; }
.modal-close {
  float: right; border: none; background: none; cursor: pointer;
  font-size: 22px; color: var(--ink-soft); line-height: 1;
}
.modal-close:hover { color: var(--red); }

/* ---------- 班级主页 ---------- */

.class-banner {
  position: relative; overflow: hidden;
  margin-top: 28px; padding: 44px 5vw 38px;
  background: var(--blue-deep); color: #ece5d3;
  border-radius: 0 0 24px 24px;
}
.class-banner::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(ellipse 50% 80% at 90% 0%, rgba(185, 138, 47, 0.2), transparent 60%);
}
.class-banner-inner { position: relative; max-width: 1080px; margin: 0 auto; }
.class-banner .kicker { font-size: 11px; letter-spacing: 0.4em; color: rgba(236,229,211,0.6); }
.class-banner h1 { font-size: clamp(28px, 3.6vw, 42px); color: #f7f2e6; margin-top: 8px; }
.class-banner .meta { margin-top: 12px; font-size: 13px; letter-spacing: 0.1em; color: rgba(236,229,211,0.72); }

.tabs {
  display: flex; gap: 4px; margin: 34px 0 26px;
  border-bottom: 1px solid var(--line);
}
.tabs button {
  padding: 12px 20px;
  font-family: var(--serif); font-size: 16px; letter-spacing: 0.15em;
  background: none; border: none; cursor: pointer; color: var(--ink-soft);
  border-bottom: 2px solid transparent; margin-bottom: -1px;
  transition: all 0.2s;
}
.tabs button:hover { color: var(--ink); }
.tabs button.active { color: var(--blue); border-bottom-color: var(--blue); }
.tabs .badge {
  display: inline-block; min-width: 18px; padding: 0 5px; margin-left: 6px;
  font-family: var(--sans); font-size: 11px; line-height: 18px; text-align: center;
  color: #fff; background: var(--red); border-radius: 999px;
}

.intro-body {
  font-size: 16px; line-height: 2; white-space: pre-wrap; word-break: break-word;
}
.intro-empty { color: var(--ink-soft); font-size: 14px; }

/* ---------- 通讯录 ---------- */

.member-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 18px;
}
.member-card {
  position: relative; padding: 24px 22px; cursor: pointer;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}
.member-card:hover { transform: translateY(-3px); box-shadow: 0 2px 4px rgba(43,42,36,0.05), 0 16px 36px -14px rgba(43,42,36,0.26); }
.member-card .avatar {
  width: 52px; height: 52px; margin-bottom: 14px;
  display: grid; place-items: center;
  font-family: var(--serif); font-size: 22px; color: #f5efdf;
  background: var(--blue); border-radius: 14px;
}
.member-card .mname { font-family: var(--serif); font-size: 19px; }
.member-card .mpos { font-size: 13px; color: var(--gold); letter-spacing: 0.08em; margin-top: 2px; }
.member-card .msig {
  margin-top: 10px; font-size: 13px; color: var(--ink-soft);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.admin-mark {
  position: absolute; top: 16px; right: 16px;
  padding: 2px 10px; font-size: 11px; letter-spacing: 0.1em;
  color: var(--red); border: 1px solid rgba(166, 61, 42, 0.4); border-radius: 999px;
}

/* ---------- 审核卡片 ---------- */

.review-card { padding: 22px 24px; margin-bottom: 16px; }
.review-card .rhead { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.review-card .rname { font-family: var(--serif); font-size: 19px; }
.review-card .rtime { font-size: 12px; color: var(--ink-soft); }
.review-card .rinfo { margin: 12px 0 16px; font-size: 14px; color: var(--ink-soft); }
.review-card .rinfo b { color: var(--ink); font-weight: 600; }
.review-card .ractions { display: flex; gap: 10px; }
.status-tag {
  padding: 2px 12px; font-size: 12px; border-radius: 999px; letter-spacing: 0.08em;
}
.status-pending { color: var(--gold); border: 1px solid rgba(185, 138, 47, 0.45); }
.status-approved { color: #2f6b3a; border: 1px solid rgba(47, 107, 58, 0.4); }
.status-rejected { color: var(--red); border: 1px solid rgba(166, 61, 42, 0.4); }

/* ---------- 个人主页 ---------- */

.profile-hero {
  position: relative; overflow: hidden;
  margin-top: 28px; padding: 60px 5vw 42px;
  border-radius: 0 0 24px 24px;
  color: #f3ecdd; background: var(--blue-deep);
}
.profile-hero-inner { position: relative; max-width: 1080px; margin: 0 auto; display: flex; gap: 30px; align-items: center; flex-wrap: wrap; }
.profile-hero .p-avatar {
  width: 96px; height: 96px; flex: none;
  display: grid; place-items: center;
  font-family: var(--serif); font-size: 42px;
  background: rgba(247, 242, 232, 0.14);
  border: 1px solid rgba(247, 242, 232, 0.35);
  border-radius: 24px;
}
.profile-hero h1 { font-size: clamp(28px, 3.4vw, 40px); color: #faf5e9; }
.profile-hero .p-sig { margin-top: 8px; font-size: 15px; color: rgba(243, 236, 221, 0.8); max-width: 520px; }
.profile-hero .p-tags { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 8px; }
.profile-hero .p-tag {
  padding: 4px 14px; font-size: 12px; letter-spacing: 0.1em;
  border: 1px solid rgba(243, 236, 221, 0.4); border-radius: 999px;
  color: rgba(243, 236, 221, 0.85);
}

.theme-classic { background: var(--blue-deep); }
.theme-vermilion { background: #6e2418; }
.theme-pine { background: #1f4034; }
.theme-ink { background: #26251f; }
.theme-plum { background: #4a2440; }

.section-card { margin-bottom: 22px; }
.section-card h3 {
  font-size: 18px; padding-bottom: 10px; margin-bottom: 14px;
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 10px;
}
.section-card h3::before { content: ""; width: 4px; height: 18px; background: var(--red); border-radius: 2px; }
.section-card .s-content { font-size: 15px; line-height: 1.9; white-space: pre-wrap; word-break: break-word; color: #3d3b33; }

.theme-picker { display: flex; gap: 10px; flex-wrap: wrap; }
.theme-dot {
  width: 38px; height: 38px; border-radius: 50%; cursor: pointer;
  border: 2px solid transparent; transition: all 0.2s;
}
.theme-dot.selected { border-color: var(--ink); transform: scale(1.1); }

.edit-section {
  border: 1px dashed var(--line); border-radius: 12px;
  padding: 16px; margin-bottom: 14px;
}

/* ---------- 页脚 ---------- */

.footer {
  margin-top: 80px; padding: 30px 5vw 40px;
  border-top: 1px solid var(--line);
  text-align: center; font-size: 12px; letter-spacing: 0.2em; color: var(--ink-soft);
}

/* ---------- 热搜占位 ---------- */

.hot-empty {
  padding: 70px 20px; text-align: center;
}
.hot-empty .big { font-family: var(--serif); font-size: 26px; color: var(--ink); margin-bottom: 10px; }
.hot-empty p { color: var(--ink-soft); font-size: 14px; }

/* ---------- 响应式 ---------- */

.mobile-only { display: none !important; }

@media (max-width: 860px) {
  .mobile-only { display: flex !important; }
  .auth-hero-inner { grid-template-columns: 1fr; gap: 40px; }
  .hero-grid { grid-template-columns: 1fr; }
  .section-title h2 { font-size: 22px; }
  .topbar { padding: 0 4vw; height: 56px; }
  .brand-name { font-size: 15px; letter-spacing: 0.08em; }
  .brand-name small { display: none; }
  .seal { width: 30px; height: 30px; font-size: 13px; border-radius: 5px; }
  .topbar-right { gap: 12px; font-size: 13px; }
  .topbar-right .who { display: none; }
  .top-search { display: none; }
  .notif-panel { right: 2vw; }
}

.toast {
  position: fixed; left: 50%; bottom: 40px; z-index: 200;
  transform: translateX(-50%) translateY(20px);
  padding: 12px 26px; font-size: 14px; letter-spacing: 0.06em;
  color: #f7f2e6; background: rgba(38, 37, 31, 0.92);
  border-radius: 999px; opacity: 0; pointer-events: none;
  transition: all 0.3s ease;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---- 滑动人机验证 ---- */
.slider-track {
  position: relative; height: 44px; border-radius: 22px;
  background: var(--paper-deep); border: 1px solid var(--line);
  overflow: hidden; user-select: none; -webkit-user-select: none;
}
.slider-fill {
  position: absolute; left: 0; top: 0; bottom: 0; width: 0;
  background: rgba(93, 143, 93, 0.25); transition: none;
}
.slider-text {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 13px; color: var(--ink-soft); pointer-events: none; letter-spacing: 0.05em;
}
.slider-knob {
  position: absolute; left: 0; top: 0; width: 44px; height: 42px; border-radius: 21px;
  background: #fffefa; border: 1px solid var(--line); box-shadow: 0 1px 4px rgba(43,42,36,0.18);
  display: flex; align-items: center; justify-content: center;
  cursor: grab; font-size: 16px; color: var(--ink-soft); touch-action: none; z-index: 2;
}
.slider-track.done { border-color: #5d8f5d; }
.slider-track.done .slider-fill { background: rgba(93, 143, 93, 0.35); }
.slider-track.done .slider-text { color: #4a7a4a; }
.slider-track.done .slider-knob { background: #5d8f5d; color: #fffefa; cursor: default; }

/* ---- 个人主页自定义背景图 ---- */
.profile-hero.has-banner { background-size: cover; background-position: center; }
.profile-hero.has-banner::after {
  content: ""; position: absolute; inset: 0; z-index: 0;
  background: rgba(28, 26, 22, 0.45);
}
.profile-hero.has-banner .profile-hero-inner { z-index: 1; }

/* ---- 顶栏 logo ---- */
.brand-logo { width: 36px; height: 36px; flex: none; object-fit: contain; }
@media (max-width: 720px) { .brand-logo { width: 32px; height: 32px; } }

/* 图片头像：填满容器并保持裁切形状 */
.p-ava img, .chat-ava img, .member-card .avatar img, .profile-hero .p-avatar img {
  width: 100%; height: 100%; object-fit: cover; border-radius: inherit; display: block;
}
