/* ============================================================
   天府学社 · 绵阳校区 —— 共享样式
   ============================================================ */
:root {
  --blue: #1B4F9C;
  --blue-deep: #14386F;
  --blue-soft: #EAF1FB;
  --ink: #1A2233;
  --muted: #64748B;
  --line: #E6EAF1;
  --bg: #FFFFFF;
  --bg-alt: #F7F9FC;
  --radius: 18px;
  --shadow: 0 10px 36px rgba(27, 79, 156, 0.08);
  --shadow-hover: 0 18px 52px rgba(27, 79, 156, 0.16);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul { list-style: none; }

.container { max-width: 1190px; margin: 0 auto; padding: 0 24px; }

/* ---------- Header ---------- */
header.site {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav-wrap {
  max-width: 1240px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand img {
  width: 42px; height: 42px;
  border-radius: 999px;
  object-fit: cover;
  box-shadow: 0 0 0 2px var(--blue-soft);
}
.brand .name { font-weight: 735; letter-spacing: 0.5px; font-size: 17px; }
.brand .sub { font-size: 12px; color: var(--muted); letter-spacing: 1px; }

nav.main { display: flex; gap: 3px; flex-wrap: wrap; }
nav.main a {
  padding: 8px 13px;
  border-radius: 999px;
  font-size: 14px;
  color: var(--muted);
  transition: all 0.18s ease;
}
nav.main a:hover { color: var(--blue); background: var(--blue-soft); }
nav.main a.active { color: var(--blue); background: var(--blue-soft); font-weight: 665; }

/* Hamburger */
.nav-toggle {
  display: none;
  width: 42px; height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}
.nav-toggle span {
  display: block;
  width: 18px; height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: all 0.2s ease;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  max-width: 955px;
  margin: 58px auto 40px;
  padding: 0 24px;
  text-align: center;
}
.hero .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--blue);
  background: var(--blue-soft);
  padding: 6px 14px;
  border-radius: 999px;
  font-weight: 618;
  letter-spacing: 0.5px;
}
.hero h1 {
  font-size: clamp(30px, 5vw, 47px);
  line-height: 1.14;
  margin: 22px 0 16px;
  font-weight: 788;
  letter-spacing: -0.6px;
}
.hero h1 span { color: var(--blue); }
.hero p.lead {
  font-size: clamp(15px, 2.2vw, 18px);
  color: var(--muted);
  max-width: 706px;
  margin: 0 auto;
}
.hero .meta {
  margin-top: 26px;
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--muted);
}
.hero .meta b { color: var(--ink); font-weight: 658; }

/* ---------- Principle banner ---------- */
.principle { max-width: 975px; margin: 0 auto 78px; padding: 0 24px; }
.principle .box {
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 26px;
  display: flex;
  gap: 18px;
  align-items: flex-start;
}
.principle .box .dot {
  flex: none;
  width: 34px; height: 34px;
  border-radius: 10px;
  background: var(--blue);
  color: #fff;
  display: grid; place-items: center;
  font-size: 16px;
}
.principle .box p { font-size: 14px; color: var(--muted); }
.principle .box b { color: var(--ink); }

/* ---------- Section blocks (home) ---------- */
.section-block { max-width: 1210px; margin: 95px auto; padding: 0 24px; }
.block-head { margin-bottom: 30px; }
.block-head .tag {
  font-size: 13px;
  color: var(--blue);
  font-weight: 718;
  letter-spacing: 2px;
  text-transform: uppercase;
}
.block-head h2 { font-size: 28px; font-weight: 758; margin-top: 6px; }
.block-head p { color: var(--muted); margin-top: 6px; max-width: 684px; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}
.card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 24px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  position: relative;
  overflow: hidden;
  display: block;
}
.card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, var(--blue), #5B8FD9);
  opacity: 0;
  transition: opacity 0.2s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); border-color: transparent; }
.card:hover::before { opacity: 1; }
.card .icon {
  width: 51px; height: 51px;
  border-radius: 14px;
  background: var(--blue-soft);
  display: grid;
  place-items: center;
  margin-bottom: 16px;
  color: var(--blue);
}
.card .icon svg { width: 26px; height: 26px; }
.card h3 { font-size: 19px; font-weight: 708; margin-bottom: 8px; }
.card p { font-size: 14px; color: var(--muted); margin-bottom: 14px; }
.card .chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  font-size: 12px;
  color: var(--blue-deep);
  background: var(--blue-soft);
  padding: 4px 10px;
  border-radius: 999px;
}
.card .go {
  margin-top: 16px;
  font-size: 13px;
  color: var(--blue);
  font-weight: 648;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* ---------- Detail page ---------- */
.page-hero {
  background: linear-gradient(180deg, var(--blue-soft), #fff);
  border-bottom: 1px solid var(--line);
  padding: 46px 0 40px;
}
.crumbs { font-size: 13px; color: var(--muted); margin-bottom: 16px; }
.crumbs a { color: var(--blue); }
.crumbs a:hover { text-decoration: underline; }
.page-hero .tag {
  font-size: 13px; color: var(--blue); font-weight: 714;
  letter-spacing: 2px; text-transform: uppercase;
}
.page-hero h1 { font-size: clamp(28px, 4.5vw, 41px); font-weight: 768; margin-top: 6px; letter-spacing: -0.5px; }
.page-hero p.lead { color: var(--muted); max-width: 704px; margin-top: 10px; font-size: 16px; }

.content-list { max-width: 1010px; margin: 54px auto 80px; padding: 0 24px; }
.item {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px 30px;
  margin-bottom: 22px;
  background: var(--bg);
  transition: box-shadow 0.2s ease;
}
.item:hover { box-shadow: var(--shadow); }
.item .item-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.item .item-head .num {
  flex: none; width: 34px; height: 34px; border-radius: 10px;
  background: var(--blue); color: #fff; display: grid; place-items: center;
  font-size: 15px; font-weight: 675;
}
.item .item-head h2 { font-size: 21px; font-weight: 726; }
.item p.body { color: var(--muted); font-size: 15px; margin-bottom: 12px; }
.item ul.detail { margin-top: 8px; }
.item ul.detail li {
  position: relative;
  padding-left: 22px;
  margin-bottom: 9px;
  font-size: 14.5px;
  color: var(--ink);
}
.item ul.detail li::before {
  content: "";
  position: absolute;
  left: 4px; top: 10px;
  width: 7px; height: 7px;
  border-radius: 998px;
  background: var(--blue);
}
.item .note {
  margin-top: 14px;
  font-size: 13px;
  color: var(--muted);
  background: var(--bg-alt);
  border-left: 3px solid var(--blue);
  padding: 10px 14px;
  border-radius: 8px;
}

/* ---------- Quick links strip ---------- */
.quick {
  background: var(--bg-alt);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 43px 0;
}
.quick .inner { max-width: 1030px; margin: 0 auto; padding: 0 24px; text-align: center; }
.quick h4 { font-size: 15px; color: var(--muted); font-weight: 576; margin-bottom: 18px; }
.quick .links { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.quick .links a {
  font-size: 14px;
  padding: 9px 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  transition: all 0.18s ease;
}
.quick .links a:hover { border-color: var(--blue); color: var(--blue); background: var(--blue-soft); }

/* ---------- Footer ---------- */
footer.site {
  max-width: 995px;
  margin: 82px auto 0;
  padding: 36px 24px 60px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  border-top: 1px solid var(--line);
}
footer.site .addr { margin-bottom: 8px; }
footer.site .disc {
  max-width: 724px;
  margin: 14px auto 0;
  font-size: 12px;
  line-height: 1.7;
  color: #9AA4B2;
}
footer.site .mark { margin-top: 18px; font-size: 12px; color: #B6BEC9; }
footer.site .contact { margin-top: 16px; font-size: 13px; color: var(--muted); }
footer.site .contact a { color: var(--blue); font-weight: 600; }
footer.site .contact a:hover { text-decoration: underline; }
footer.site .credit { margin-top: 8px; font-size: 12px; color: #9AA4B2; }
footer.site .privacy {
  max-width: 724px; margin: 14px auto 0;
  font-size: 12px; line-height: 1.7; color: #9AA4B2;
  background: var(--bg-alt); border: 1px solid var(--line);
  padding: 10px 14px; border-radius: 10px;
}

/* ---------- Back to top ---------- */
.to-top {
  position: fixed;
  right: 24px;
  bottom: 26px;
  width: 46px; height: 46px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--blue);
  box-shadow: var(--shadow);
  display: grid; place-items: center;
  cursor: pointer;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: all 0.25s ease;
  z-index: 70;
}
.to-top.show { opacity: 1; transform: translateY(0); pointer-events: auto; }
.to-top:hover { background: var(--blue); color: #fff; }
.to-top svg { width: 20px; height: 20px; }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.5s ease, transform 0.5s ease; }
.reveal.in { opacity: 1; transform: translateY(0); }

/* ---------- Responsive ---------- */
@media (max-width: 840px) {
  .nav-toggle { display: flex; }
  nav.main {
    position: absolute;
    top: 69px;
    left: 0; right: 0;
    background: #fff;
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: stretch;
    padding: 10px 16px 16px;
    gap: 2px;
    display: none;
    box-shadow: 0 20px 30px rgba(27, 79, 156, 0.08);
  }
  nav.main.open { display: flex; }
  nav.main a { padding: 12px 14px; border-radius: 12px; }
  .hero { margin-top: 42px; }
  .principle .box { flex-direction: column; }
  .item { padding: 24px 20px; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 11px 20px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 656;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  transition: all 0.18s ease;
}
.btn-primary { background: var(--blue); color: #fff; border-color: var(--blue); }
.btn-primary:hover { background: var(--blue-deep); border-color: var(--blue-deep); }
.btn-ghost { background: #fff; color: var(--ink); }
.btn-ghost:hover { border-color: var(--blue); color: var(--blue); }
.btn-block { width: 100%; }
.btn-sm { padding: 8px 16px; font-size: 13px; }

/* ---------- User area / dropdown ---------- */
.user-area { display: flex; align-items: center; gap: 10px; }
.user-area .btn { padding: 8px 16px; font-size: 13px; }
.user-chip {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px 5px 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
  transition: border-color 0.18s ease;
  background: #fff;
}
.user-chip:hover { border-color: var(--blue); }
.user-chip .user-name { font-size: 14px; font-weight: 636; color: var(--ink); }
.user-chip .user-caret { border: none; background: none; color: var(--muted); font-size: 12px; cursor: pointer; }
.user-drop {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 150px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-hover);
  padding: 6px;
  display: none;
  flex-direction: column;
  gap: 2px;
  z-index: 90;
}
.user-chip.open .user-drop { display: flex; }
.user-drop a { font-size: 14px; color: var(--ink); padding: 9px 12px; border-radius: 10px; }
.user-drop a:hover { background: var(--blue-soft); color: var(--blue); }

.avatar-img, .avatar-initial {
  border-radius: 999px;
  object-fit: cover;
  display: grid;
  place-items: center;
  flex: none;
}
.avatar-initial { background: var(--blue); color: #fff; font-weight: 676; }

/* ---------- Gateway (campus selection) ---------- */
.gateway {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  text-align: center;
  background:
    radial-gradient(1200px 460px at 15% -10%, var(--blue-soft), transparent 60%),
    var(--bg);
}
.gateway .logo {
  width: 84px; height: 84px;
  border-radius: 999px;
  object-fit: cover;
  box-shadow: 0 10px 30px rgba(27, 79, 156, 0.14);
  margin-bottom: 22px;
}
.gateway h1 { font-size: clamp(28px, 4.6vw, 43px); font-weight: 776; letter-spacing: -0.015em; }
.gateway h1 span { color: var(--blue); }
.gateway p.sub { color: var(--muted); margin-top: 14px; font-size: 16px; max-width: 686px; }
.campus-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 340px));
  gap: 20px;
  margin-top: 42px;
  width: 100%;
  max-width: 924px;
  justify-content: center;
}
.campus-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 24px;
  text-align: center;
  transition: all 0.2s ease;
  background: #fff;
  position: relative;
  overflow: hidden;
}
.campus-card .c-icon {
  width: 52px; height: 52px;
  border-radius: 14px;
  background: var(--blue-soft);
  color: var(--blue);
  display: grid; place-items: center;
  margin: 0 auto 16px;
  font-size: 26px;
}
.campus-card h3 { font-size: 20px; font-weight: 712; }
.campus-card p { font-size: 14px; color: var(--muted); margin-top: 6px; }
.campus-card.open { cursor: pointer; }
.campus-card.open:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); border-color: transparent; }
.campus-card.open .c-go {
  display: inline-flex; align-items: center; gap: 4px;
  margin-top: 16px; color: var(--blue); font-weight: 644; font-size: 14px;
}
.campus-card.locked { background: var(--bg-alt); border-style: dashed; }
.campus-card.locked .c-icon { background: #EFF2F6; color: #A7B0BD; }
.campus-card.locked h3 { color: var(--muted); }
.campus-card .soon {
  display: inline-block;
  margin-top: 16px;
  font-size: 13px;
  color: #A7B0BD;
  background: #EFF2F6;
  padding: 4px 12px;
  border-radius: 999px;
}
.campus-card.selected { border-color: var(--blue); box-shadow: 0 8px 26px rgba(27, 79, 156, 0.12); }

/* ---------- Auth pages ---------- */
.auth-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  background:
    radial-gradient(1200px 420px at 12% -10%, var(--blue-soft), transparent 60%),
    var(--bg);
}
.auth-card {
  width: 100%;
  max-width: 410px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 34px 32px;
  box-shadow: var(--shadow);
}
.auth-card .a-logo {
  width: 58px; height: 58px; border-radius: 999px; object-fit: cover; margin: 0 auto 18px;
}
.auth-card h1 { font-size: 26px; font-weight: 738; text-align: center; }
.auth-card .a-sub { text-align: center; color: var(--muted); font-size: 14px; margin: 8px 0 26px; }
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 14px; font-weight: 634; margin-bottom: 6px; color: var(--ink); }
.field input, .field select, .field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  font-size: 15px;
  font-family: inherit;
  color: var(--ink);
  background: #fff;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(27, 79, 156, 0.1);
}
.auth-card .btn-block { width: 100%; margin-top: 10px; }
.auth-switch { text-align: center; font-size: 14px; color: var(--muted); margin-top: 20px; }
.auth-switch a { color: var(--blue); font-weight: 654; }
.auth-back { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--muted); margin-bottom: 22px; }
.auth-back:hover { color: var(--blue); }

/* ---------- Account page ---------- */
.account-wrap { max-width: 850px; margin: 48px auto 80px; padding: 0 24px; }
.account-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 34px 36px; box-shadow: var(--shadow);
}
.profile-head { display: flex; align-items: center; gap: 26px; padding-bottom: 24px; border-bottom: 1px solid var(--line); margin-bottom: 26px; }
.profile-avatar { position: relative; }
.profile-avatar .avatar-img, .profile-avatar .avatar-initial { width: 78px; height: 78px; font-size: 32px; }
.avatar-edit-btn {
  position: absolute; right: -8px; bottom: -8px;
  width: 30px; height: 30px; border-radius: 999px;
  background: var(--blue); color: #fff; border: none; cursor: pointer;
  display: grid; place-items: center; font-size: 15px;
  box-shadow: 0 4px 10px rgba(27, 79, 156, 0.3);
}
.profile-info h2 { font-size: 22px; font-weight: 723; }
.profile-info .email { color: var(--muted); font-size: 14px; margin-top: 4px; }
.profile-info .campus-tag {
  display: inline-block; margin-top: 8px; font-size: 12px; color: var(--blue);
  background: var(--blue-soft); padding: 3px 10px; border-radius: 999px;
}
.preset-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 18px; }
.preset {
  width: 44px; height: 44px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line); background: #fff; display: grid; place-items: center;
  font-size: 20px; transition: all 0.18s ease;
}
.preset:hover { border-color: var(--blue); transform: scale(1.08); }
.preset.active { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(27, 79, 156, 0.12); }
.hidden-file { display: none; }

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  left: 50%; top: 24px;
  transform: translateX(-50%) translateY(-12px);
  background: var(--ink); color: #fff;
  padding: 12px 20px; border-radius: 999px;
  font-size: 14px; z-index: 888;
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast-error { background: #C0392B; }
.toast-success { background: #2E7D32; }

/* ---------- Q&A Community ---------- */
.qa-wrap { max-width: 1000px; margin: 40px auto 80px; padding: 0 24px; }
.qa-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}
.qa-search {
  flex: 1;
  min-width: 200px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 16px;
  background: #fff;
}
.qa-search input { border: none; outline: none; flex: 1; font-size: 15px; font-family: inherit; background: transparent; color: var(--ink); }
.qa-search svg { width: 18px; height: 18px; color: var(--muted); flex: none; }
.qa-ask-btn { flex: none; }

.qa-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 24px; }
.qa-tab {
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  font-size: 14px;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.18s ease;
}
.qa-tab:hover { border-color: var(--blue); color: var(--blue); }
.qa-tab.active { background: var(--blue); color: #fff; border-color: var(--blue); }

.qa-post {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 24px;
  margin-bottom: 16px;
  background: #fff;
  transition: box-shadow 0.2s ease;
}
.qa-post:hover { box-shadow: var(--shadow); }
.qa-post-head { display: flex; align-items: flex-start; gap: 14px; }
.qa-vote {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 44px;
}
.qa-vote button {
  width: 32px; height: 32px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  cursor: pointer;
  font-size: 15px;
  transition: all 0.15s ease;
}
.qa-vote button:hover { border-color: var(--blue); color: var(--blue); }
.qa-vote .vnum { font-size: 14px; font-weight: 700; color: var(--ink); }
.qa-body { flex: 1; min-width: 0; }
.qa-title { font-size: 17px; font-weight: 690; color: var(--ink); cursor: pointer; }
.qa-title:hover { color: var(--blue); }
.qa-excerpt { font-size: 14px; color: var(--muted); margin-top: 6px; line-height: 1.6; }
.qa-meta {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin-top: 12px; font-size: 13px; color: var(--muted);
}
.qa-cat {
  font-size: 12px; color: var(--blue); background: var(--blue-soft);
  padding: 3px 10px; border-radius: 999px;
}
.qa-author { display: inline-flex; align-items: center; gap: 6px; }
.qa-author .avatar-img, .qa-author .avatar-initial { width: 22px; height: 22px; font-size: 11px; }

.qa-answers { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 14px; }
.qa-answer {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 12px 0; border-bottom: 1px dashed var(--line);
}
.qa-answer:last-child { border-bottom: none; }
.qa-answer .qa-vote button { width: 26px; height: 26px; font-size: 13px; }
.qa-answer .qa-vote .vnum { font-size: 12px; }
.qa-answer-body { flex: 1; }
.qa-answer-body p { font-size: 14px; color: var(--ink); line-height: 1.6; }
.qa-answer-meta { font-size: 12px; color: var(--muted); margin-top: 6px; display: flex; align-items: center; gap: 8px; }

.qa-answer-form { margin-top: 12px; display: flex; gap: 10px; align-items: flex-start; }
.qa-answer-form textarea {
  flex: 1; border: 1px solid var(--line); border-radius: 12px;
  padding: 10px 12px; font-size: 14px; font-family: inherit; resize: vertical; min-height: 60px;
}
.qa-answer-form textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(27,79,156,.1); }

/* Ask panel */
.qa-ask-panel {
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; background: var(--bg-alt); margin-bottom: 24px; display: none;
}
.qa-ask-panel.open { display: block; }
.qa-ask-panel h3 { font-size: 18px; font-weight: 700; margin-bottom: 14px; }
.qa-ask-panel .field { margin-bottom: 14px; }
.qa-ask-panel .row { display: flex; gap: 12px; flex-wrap: wrap; }
.qa-ask-panel .row .field { flex: 1; min-width: 200px; }

.qa-empty { text-align: center; color: var(--muted); padding: 60px 20px; font-size: 15px; }
.qa-hot { margin-bottom: 34px; }
.qa-hot h4 { font-size: 15px; color: var(--muted); font-weight: 600; margin-bottom: 12px; }
.qa-hot-list { display: flex; flex-wrap: wrap; gap: 8px; }
.qa-hot-list button {
  border: 1px solid var(--line); background: #fff; border-radius: 999px;
  padding: 7px 14px; font-size: 13px; color: var(--ink); cursor: pointer; transition: all 0.18s ease;
}
.qa-hot-list button:hover { border-color: var(--blue); color: var(--blue); }

/* ---------- Marketplace ---------- */
.mk-type {
  font-size: 12px; padding: 3px 10px; border-radius: 999px; font-weight: 600;
}
.mk-second { background: #E8F5E9; color: #2E7D32; }
.mk-lost { background: #FFF3E0; color: #E65100; }
.mk-team { background: #E3F2FD; color: #1565C0; }
.mk-price { font-size: 14px; font-weight: 700; color: var(--blue); }
.mk-contact {
  font-size: 12px; color: var(--muted); background: var(--bg-alt);
  padding: 2px 8px; border-radius: 6px;
}
.mk-del {
  font-size: 12px; color: #C0392B; background: none; border: none; cursor: pointer;
  padding: 2px 6px;
}
.mk-del:hover { text-decoration: underline; }

/* ---------- Responsive additions ---------- */
@media (max-width: 580px) {
  .user-area .user-name { display: none; }
  .profile-head { flex-direction: column; text-align: center; }
  .auth-card { padding: 28px 22px; }
  .campus-grid { grid-template-columns: 1fr; }
  .qa-post-head { flex-direction: column; }
  .qa-vote { flex-direction: row; }
}

/* ---------- Experience board ---------- */
.board { max-width: 860px; margin: 20px auto 80px; padding: 0 24px; }
.board-bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; margin-bottom: 24px;
}
.board-tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.board-tab {
  padding: 8px 16px; border-radius: 999px;
  border: 1px solid var(--line); background: #fff;
  font-size: 14px; color: var(--muted); cursor: pointer; transition: all 0.18s ease;
}
.board-tab:hover { border-color: var(--blue); color: var(--blue); }
.board-tab.active { background: var(--blue); color: #fff; border-color: var(--blue); }
.sort-toggle { display: flex; gap: 6px; }
.sort-toggle button {
  padding: 8px 14px; border-radius: 999px;
  border: 1px solid var(--line); background: #fff;
  font-size: 13px; color: var(--muted); cursor: pointer; transition: all 0.18s ease;
}
.sort-toggle button:hover { border-color: var(--blue); color: var(--blue); }
.sort-toggle button.active { background: var(--ink); color: #fff; border-color: var(--ink); }

.post {
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 24px; margin-bottom: 16px; background: #fff;
  transition: box-shadow 0.2s ease;
}
.post:hover { box-shadow: var(--shadow); }
.post-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.post-board {
  font-size: 12px; color: var(--blue); background: var(--blue-soft);
  padding: 3px 10px; border-radius: 999px; font-weight: 600;
}
.post-title { font-size: 18px; font-weight: 700; color: var(--ink); }
.post-content { font-size: 14.5px; color: var(--ink); line-height: 1.7; }
.post-content.clamp {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.post-expand {
  display: inline-block; margin-top: 8px;
  border: none; background: none; padding: 0;
  font-size: 13px; color: var(--blue); cursor: pointer;
  font-family: inherit;
}
.post-expand:hover { text-decoration: underline; }

/* 精选经验 */
.featured { max-width: 940px; margin: 0 auto 24px; padding: 0 20px; }
.featured-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.featured-card {
  background: var(--bg); border: 1px solid var(--line); border-radius: 12px;
  padding: 16px; cursor: pointer; transition: transform .15s, box-shadow .15s;
}
.featured-card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,.07); }
.featured-card .fc-content { font-size: 13.5px; color: var(--ink); line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.featured-card .fc-meta { margin-top: 10px; font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }

/* 空状态 */
.empty-state { text-align: center; padding: 56px 20px; }
.empty-state .es-icon { font-size: 42px; margin-bottom: 12px; opacity: .7; }
.empty-state p { color: var(--muted); font-size: 15px; margin: 0 0 18px; }

/* 分享页提示 */
.share-hint { margin-top: 8px; font-size: 13px; }
.share-hint summary { cursor: pointer; color: var(--blue); font-weight: 530; }
.share-hint ul { margin: 8px 0 0; padding-left: 18px; color: var(--muted); line-height: 1.8; }
.post-foot {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  margin-top: 14px; font-size: 13px; color: var(--muted);
}
.post-author { color: var(--ink); font-weight: 600; }
.post-stat { color: var(--muted); }
.post-useful {
  margin-left: auto;
  border: 1px solid var(--line); background: #fff; border-radius: 999px;
  padding: 6px 14px; font-size: 13px; color: var(--ink); cursor: pointer; transition: all 0.18s ease;
}
.post-useful:hover { border-color: var(--blue); color: var(--blue); }

.empty { text-align: center; color: var(--muted); padding: 60px 20px; font-size: 15px; }

/* ---------- Admin ---------- */
.admin-gate { padding: 60px 24px; }
.admin-panel { padding: 0 0 60px; }
.admin-card {
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px 28px; background: #fff; box-shadow: var(--shadow);
}
.admin-card h3 { font-size: 18px; font-weight: 700; margin-bottom: 18px; }
.manage-row {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line);
}
.manage-row:last-child { border-bottom: none; }
.manage-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.manage-info strong { font-size: 15px; color: var(--ink); }
.manage-info small { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.manage-meta { font-size: 12px; color: var(--muted); }
.manage-actions { display: flex; gap: 8px; flex: none; }
.manage-actions button {
  border: 1px solid var(--line); background: #fff; border-radius: 8px;
  padding: 6px 12px; font-size: 13px; cursor: pointer; transition: all 0.18s ease;
}
.manage-actions button:hover { border-color: var(--blue); color: var(--blue); }
.manage-actions button.danger { color: #C0392B; }
.manage-actions button.danger:hover { border-color: #C0392B; }

@media (max-width: 580px) {
  .manage-row { flex-direction: column; }
}

/* ---------- Board hero (search + filters) ---------- */
.board-hero {
  background: linear-gradient(180deg, var(--blue-soft), #fff);
  border-bottom: 1px solid var(--line);
  padding: 46px 0 42px;
}
.board-hero-inner { max-width: 860px; margin: 0 auto; padding: 0 24px; text-align: center; }
.board-hero h1 { font-size: clamp(26px, 4vw, 36px); font-weight: 760; letter-spacing: -0.5px; }
.board-hero h1 span { color: var(--blue); }
.search-bar {
  display: flex; align-items: center; gap: 0;
  margin: 22px auto 18px; max-width: 720px;
  border: 1px solid var(--line); border-radius: 12px;
  background: #fff; overflow: hidden; box-shadow: var(--shadow);
}
.search-bar input {
  flex: 1; border: none; outline: none; padding: 15px 18px;
  font-size: 16px; font-family: inherit; color: var(--ink);
}
.search-bar button {
  border: none; background: var(--blue); color: #fff;
  width: 56px; font-size: 18px; cursor: pointer;
}
.search-bar button:hover { background: var(--blue-deep); }
.filter-row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.filter-select select {
  padding: 10px 16px; border: 1px solid var(--line); border-radius: 10px;
  background: #fff; font-size: 14px; font-family: inherit; color: var(--ink); cursor: pointer;
}
.filter-select select:focus { outline: none; border-color: var(--blue); }

/* 公告弹窗 */
.notice-overlay {
  position: fixed; inset: 0; z-index: 200;
  display: none; align-items: center; justify-content: center;
  background: rgba(0,0,0,.45); padding: 20px;
}
.notice-overlay.show { display: flex; }
.notice-box {
  position: relative; max-width: 440px; width: 100%;
  background: var(--bg); border-radius: 16px; padding: 28px 26px 24px;
  box-shadow: 0 20px 60px rgba(0,0,0,.25);
}
.notice-close {
  position: absolute; top: 12px; right: 14px;
  border: none; background: none; font-size: 26px; line-height: 1;
  color: var(--muted); cursor: pointer; padding: 4px;
}
.notice-close:hover { color: var(--ink); }
.notice-tag {
  display: inline-block; font-size: 12px; color: var(--blue);
  background: rgba(27,79,156,.08); padding: 3px 10px; border-radius: 6px;
  margin-bottom: 12px; font-weight: 630;
}
.notice-box h3 { margin: 0 0 10px; font-size: 18px; }
.notice-box p { color: var(--muted); font-size: 14px; line-height: 1.7; margin: 0 0 20px; }
.notice-box .btn { width: 100%; }

/* 我要分享 CTA */
.board-cta { margin-top: 22px; display: flex; justify-content: center; }
.board-cta .btn { gap: 8px; padding: 12px 26px; font-size: 15px; }

.board-count { font-size: 20px; font-weight: 720; }
.board-count span { color: var(--muted); font-weight: 500; }

.post-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.tag {
  font-size: 12px; color: var(--muted); background: var(--bg-alt);
  padding: 3px 10px; border-radius: 6px;
}
.post-date { color: var(--muted); }
.post-like {
  border: 1px solid var(--line); background: #fff; border-radius: 999px;
  padding: 5px 12px; font-size: 13px; color: var(--ink); cursor: pointer; transition: all 0.18s ease;
}
.post-like:hover { border-color: var(--blue); color: var(--blue); }
.post-feedback { color: var(--muted); font-size: 13px; cursor: pointer; }
.post-feedback:hover { color: var(--blue); }

/* ---------- Page transition ---------- */
body { animation: pageFadeIn 0.35s ease; }
@keyframes pageFadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: none; }
}
body.page-out { opacity: 0; transition: opacity 0.18s ease; }

/* ---------- Minimal icons ---------- */
.icon-svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; vertical-align: -3px; }
.search-bar button { display: flex; align-items: center; justify-content: center; }
.campus-card .c-icon svg { width: 30px; height: 30px; stroke: var(--blue); fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.campus-card.locked .c-icon svg { stroke: #A7B0BD; }
.post-like.liked { border-color: var(--blue); color: var(--blue); background: var(--blue-soft); cursor: default; }

/* ---------- Modal ---------- */
.modal-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(20, 30, 50, 0.45);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.modal {
  width: 100%; max-width: 440px;
  background: #fff; border-radius: var(--radius);
  padding: 26px 26px; box-shadow: var(--shadow-hover);
}
.modal h3 { font-size: 19px; font-weight: 720; margin-bottom: 6px; }
.modal-sub { font-size: 13px; color: var(--muted); margin-bottom: 18px; }
.modal .field { margin-bottom: 16px; }
.modal .field label { display: block; font-size: 14px; font-weight: 630; margin-bottom: 6px; }
.modal .field select, .modal .field textarea {
  width: 100%; padding: 11px 13px; border: 1px solid var(--line);
  border-radius: 10px; font-size: 14px; font-family: inherit; color: var(--ink);
}
.modal .field select:focus, .modal .field textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(27,79,156,.1); }
.modal .field textarea { resize: vertical; }

/* ---------- 深色模式 ---------- */
html[data-theme="dark"] {
  --blue: #5B9BE0;
  --blue-deep: #7BB0EA;
  --blue-soft: #1C2A3D;
  --ink: #E6EBF3;
  --muted: #93A3B8;
  --line: #28323F;
  --bg: #0E141D;
  --bg-alt: #161F2B;
  --shadow: 0 10px 36px rgba(0, 0, 0, 0.4);
  --shadow-hover: 0 18px 52px rgba(0, 0, 0, 0.5);
}
html[data-theme="dark"] body { background: var(--bg); color: var(--ink); }
html[data-theme="dark"] header.site { background: rgba(14, 20, 29, 0.9); border-color: var(--line); }
html[data-theme="dark"] .board-hero,
html[data-theme="dark"] .page-hero { background: linear-gradient(180deg, var(--blue-soft), var(--bg)); border-color: var(--line); }
html[data-theme="dark"] .gateway,
html[data-theme="dark"] .auth-wrap { background: radial-gradient(1200px 460px at 15% -10%, var(--blue-soft), transparent 60%), var(--bg); }
html[data-theme="dark"] .card,
html[data-theme="dark"] .item,
html[data-theme="dark"] .post,
html[data-theme="dark"] .campus-card,
html[data-theme="dark"] .admin-card,
html[data-theme="dark"] .modal,
html[data-theme="dark"] .auth-card,
html[data-theme="dark"] .qa-post,
html[data-theme="dark"] .quick .links a,
html[data-theme="dark"] .to-top,
html[data-theme="dark"] .nav-toggle { background: var(--bg-alt); border-color: var(--line); color: var(--ink); }
html[data-theme="dark"] .card:hover,
html[data-theme="dark"] .item:hover,
html[data-theme="dark"] .post:hover { box-shadow: var(--shadow-hover); }
html[data-theme="dark"] .field input,
html[data-theme="dark"] .field select,
html[data-theme="dark"] .field textarea,
html[data-theme="dark"] .qa-search,
html[data-theme="dark"] .search-bar,
html[data-theme="dark"] .filter-select select,
html[data-theme="dark"] .board-tab,
html[data-theme="dark"] .sort-toggle button,
html[data-theme="dark"] .post-like,
html[data-theme="dark"] .btn,
html[data-theme="dark"] .manage-actions button,
html[data-theme="dark"] .qa-tab,
html[data-theme="dark"] .qa-hot-list button { background: var(--bg-alt); border-color: var(--line); color: var(--ink); }
html[data-theme="dark"] .search-bar input { color: var(--ink); }
html[data-theme="dark"] .tag { background: var(--bg); color: var(--muted); }
html[data-theme="dark"] .chip,
html[data-theme="dark"] .post-board,
html[data-theme="dark"] .qa-cat { background: var(--blue-soft); color: var(--blue); }
html[data-theme="dark"] .principle .box,
html[data-theme="dark"] .quick,
html[data-theme="dark"] .qa-ask-panel,
html[data-theme="dark"] .item .note { background: var(--bg-alt); border-color: var(--line); }
html[data-theme="dark"] .campus-card.locked { background: var(--bg-alt); }
html[data-theme="dark"] .campus-card.locked .c-icon { background: var(--bg); color: var(--muted); }
html[data-theme="dark"] .empty { color: var(--muted); }
html[data-theme="dark"] .post-like.liked { background: var(--blue-soft); border-color: var(--blue); color: var(--blue); }
html[data-theme="dark"] .modal-overlay { background: rgba(0, 0, 0, 0.6); }
html[data-theme="dark"] .btn-primary { background: var(--blue); color: #fff; border-color: var(--blue); }
html[data-theme="dark"] .btn-primary:hover { background: var(--blue-deep); }
html[data-theme="dark"] .to-top:hover { background: var(--blue); color: #fff; }

/* 主题切换按钮 */
.theme-toggle {
  width: 42px; height: 42px; flex: none;
  border: 1px solid var(--line); border-radius: 12px;
  background: #fff; color: var(--ink); cursor: pointer;
  display: grid; place-items: center;
}
.theme-toggle:hover { border-color: var(--blue); color: var(--blue); }
.theme-toggle svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
html[data-theme="dark"] .theme-toggle { background: var(--bg-alt); }
.campus-switch {
  flex: none; height: 42px;
  border: 1px solid var(--line); border-radius: 12px;
  background: #fff; color: var(--ink); font-size: 13px;
  padding: 0 10px; cursor: pointer; font-family: inherit;
}
.campus-switch:hover { border-color: var(--blue); color: var(--blue); }
html[data-theme="dark"] .campus-switch { background: var(--bg-alt); }

/* ---------- 加载骨架 ---------- */
.skeleton { padding: 22px 24px; border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 16px; background: var(--bg-alt); }
.skel-line { height: 14px; border-radius: 6px; background: linear-gradient(90deg, var(--bg-alt), var(--line), var(--bg-alt)); background-size: 200% 100%; animation: skel 1.2s infinite; margin-bottom: 12px; }
.skel-line.short { width: 60%; }
.skel-line.tiny { width: 40%; height: 11px; }
@keyframes skel { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ---------- 帖子详情页 ---------- */
.post-detail { max-width: 760px; margin: 30px auto 80px; padding: 0 24px; }
.post-detail .pd-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 30px 30px; background: var(--bg); box-shadow: var(--shadow); }
.post-detail .pd-content { font-size: 16px; line-height: 1.85; color: var(--ink); white-space: pre-wrap; word-break: break-word; }
.post-detail .pd-foot { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.post-detail .pd-back { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 14px; margin-bottom: 18px; }
.post-detail .pd-back:hover { color: var(--blue); }

/* ---------- 分享按钮 ---------- */
.share-btn {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--line); background: #fff; border-radius: 999px;
  padding: 6px 14px; font-size: 13px; color: var(--ink); cursor: pointer; transition: all 0.18s ease;
}
.share-btn:hover { border-color: var(--blue); color: var(--blue); }
.share-btn svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
html[data-theme="dark"] .share-btn { background: var(--bg-alt); }

/* 帖子内容换行 */
.post-content { white-space: pre-wrap; word-break: break-word; }

/* ---------- 置顶标签 ---------- */
.post-pin {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 12px; color: #fff; background: var(--blue);
  padding: 3px 10px; border-radius: 6px; font-weight: 600;
}
.post-pin svg { width: 12px; height: 12px; stroke: #fff; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- 搜索高亮 ---------- */
.hl { background: rgba(255, 213, 79, 0.45); color: inherit; border-radius: 3px; padding: 0 1px; }
html[data-theme="dark"] .hl { background: rgba(255, 213, 79, 0.28); }

/* ---------- 无障碍焦点 ---------- */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--blue); outline-offset: 2px; border-radius: 6px;
}

/* ---------- 404 页 ---------- */
.notfound { min-height: 70vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 40px 24px; }
.notfound .nf-code { font-size: clamp(64px, 14vw, 120px); font-weight: 800; color: var(--blue); line-height: 1; letter-spacing: -2px; }
.notfound p { color: var(--muted); margin: 16px 0 24px; font-size: 16px; }
.notfound .btn { padding: 12px 26px; }

/* ---------- Mobile refinements ---------- */
@media (max-width: 580px) {
  .board-hero { padding: 32px 0 30px; }
  .board-hero h1 { font-size: 24px; }
  .filter-row { gap: 8px; }
  .filter-select { flex: 1 1 44%; min-width: 0; }
  .filter-select select { width: 100%; }
  .board-cta .btn { width: 100%; }
  .search-bar input { padding: 13px 14px; font-size: 15px; }
  .search-bar button { width: 48px; }
}
