/* =========================================================
   公主连结招募板
   配色与圆角集中在 :root，改风格从这里开始。
   ========================================================= */

:root {
  --ink: #1e2a45;
  --ink-2: #4b5875;
  --ink-3: #7d89a3;
  --navy: #22305a;
  --navy-deep: #16203a;
  --pink: #f4709a;
  --pink-deep: #d94f7c;
  --gold: #e5b45f;
  --gold-deep: #a97a27;
  --gold-soft: #f7dda6;
  --mint: #238d78;
  --mint-soft: #eafaf5;
  --blue-soft: #eef6ff;
  --paper: #f8fbff;
  --card: #ffffff;
  --line: #e3ecf7;
  --shadow-sm: 0 4px 14px rgba(31, 54, 98, .05);
  --shadow-md: 0 14px 40px rgba(31, 54, 98, .09);
  --shadow-lg: 0 28px 70px rgba(31, 54, 98, .15);
  --wrap: 1160px;
  --serif: "Source Han Serif SC", "Noto Serif SC", "Songti SC", "STZhongsong", "SimSun", serif;
  --sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
}

*,
*::before,
*::after { box-sizing: border-box; }

[hidden] { display: none !important; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink-2);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, p, ul, ol, dl, dd, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
::selection { background: rgba(244, 112, 154, .24); color: var(--ink); }

:focus-visible {
  outline: 2px solid var(--pink);
  outline-offset: 3px;
  border-radius: 5px;
}

.skip-link {
  position: absolute;
  top: -60px;
  left: 16px;
  z-index: 200;
  padding: 10px 18px;
  border-radius: 0 0 12px 12px;
  background: var(--navy);
  color: #fff;
  font-size: .85rem;
  transition: top .2s;
}
.skip-link:focus { top: 0; }

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

/* ================= 顶栏 ================= */

.topbar {
  position: sticky;
  top: 0;
  z-index: 80;
  background: rgba(248, 251, 255, .84);
  border-bottom: 1px solid rgba(227, 236, 247, .75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.topbar-inner {
  display: flex;
  align-items: center;
  gap: 30px;
  height: 72px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  flex: none;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 13px;
  background: linear-gradient(145deg, #2c3d6b, #1a2545);
  color: var(--gold-soft);
  box-shadow: 0 6px 16px rgba(34, 48, 90, .22), inset 0 0 0 1px rgba(247, 221, 166, .28);
}
.brand-mark svg { width: 21px; height: 21px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.brand-text strong {
  color: var(--ink);
  font-size: .95rem;
  font-weight: 700;
  letter-spacing: .08em;
}
.brand-text small {
  color: var(--gold-deep);
  font-family: Georgia, "Times New Roman", serif;
  font-size: .52rem;
  letter-spacing: .16em;
}

.topnav {
  display: flex;
  align-items: center;
  gap: 26px;
  margin-left: auto;
  font-size: .86rem;
}
.topnav a {
  position: relative;
  padding: 5px 0;
  color: var(--ink-2);
  transition: color .2s;
}
.topnav a::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 16px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--pink), var(--gold));
  transform: translateX(-50%) scaleX(0);
  transition: transform .25s;
}
.topnav a:hover,
.topnav a.is-active { color: var(--pink-deep); }
.topnav a:hover::after,
.topnav a.is-active::after { transform: translateX(-50%) scaleX(1); }

/* ================= 按钮 ================= */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: .82rem 1.5rem;
  border: 0;
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-size: .9rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: .02em;
  cursor: pointer;
  transition: transform .22s, box-shadow .22s, background .22s, border-color .22s;
}
.btn svg { width: 17px; height: 17px; }
.btn-primary {
  background: linear-gradient(135deg, #ff8fb0, #f26a94);
  color: #fff;
  box-shadow: 0 10px 24px rgba(242, 106, 148, .28);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(242, 106, 148, .36);
}
.btn-ghost {
  border: 1px solid rgba(229, 180, 95, .45);
  background: rgba(255, 255, 255, .7);
  box-shadow: var(--shadow-sm);
}
.btn-ghost:hover {
  transform: translateY(-2px);
  border-color: rgba(229, 180, 95, .8);
  box-shadow: 0 10px 24px rgba(31, 54, 98, .09);
}
.btn-sm { padding: .68rem 1.15rem; font-size: .82rem; }
.btn[disabled] { opacity: .6; cursor: not-allowed; transform: none; }
.btn-block { width: 100%; }

/* ================= Hero ================= */

.hero {
  position: relative;
  overflow: hidden;
  padding: 44px 0 92px;
  background:
    radial-gradient(820px 440px at 84% 8%, rgba(255, 212, 230, .8), transparent 62%),
    radial-gradient(720px 480px at 6% 0%, rgba(188, 231, 255, .92), transparent 64%),
    linear-gradient(180deg, #eaf7ff 0%, #f4fbff 58%, var(--paper) 100%);
}
.hero-decor { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.hero-glow {
  position: absolute;
  top: -160px;
  right: 4%;
  width: 540px;
  height: 540px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 244, 211, .9), rgba(255, 231, 186, 0) 66%);
  filter: blur(2px);
}
.hero-star {
  position: absolute;
  color: var(--gold);
  opacity: .65;
  animation: twinkle 5s ease-in-out infinite;
}
.hero-star.s1 { top: 22%; left: 47%; font-size: 13px; animation-delay: -1s; }
.hero-star.s2 { top: 15%; right: 8%; font-size: 17px; color: var(--pink); animation-delay: -2.5s; }
.hero-star.s3 { bottom: 22%; left: 4%; font-size: 11px; animation-delay: -4s; }
.hero-star.s4 { bottom: 30%; right: 35%; font-size: 22px; opacity: .35; animation-delay: -3s; }

.hero-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(330px, .88fr);
  align-items: center;
  gap: 60px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 13px;
  border: 1px solid rgba(229, 180, 95, .38);
  border-radius: 999px;
  background: rgba(255, 255, 255, .68);
  color: var(--gold-deep);
  font-size: .71rem;
  font-weight: 600;
  letter-spacing: .13em;
  line-height: 1.4;
  backdrop-filter: blur(6px);
}
.eyebrow-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--pink);
  animation: ping 2.4s ease-out infinite;
}

.hero h1 {
  margin: 16px 0 14px;
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(2.45rem, 4.1vw, 3.55rem);
  font-weight: 700;
  line-height: 1.28;
  letter-spacing: .015em;
}
.hl {
  color: var(--pink-deep);
  background: linear-gradient(transparent 68%, rgba(255, 183, 205, .55) 68%, rgba(255, 183, 205, .55) 92%, transparent 92%);
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  white-space: nowrap;
}
.lede {
  max-width: 34em;
  font-size: .98rem;
  line-height: 1.9;
  color: var(--ink-2);
  text-wrap: pretty;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 11px;
  margin-top: 22px;
}
.hero-note {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  color: var(--ink-3);
  font-size: .75rem;
}
.hero-note strong { color: var(--ink); }
.live-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #2fbf95;
  box-shadow: 0 0 0 0 rgba(47, 191, 149, .45);
  animation: ping-green 2.2s ease-out infinite;
  flex: none;
}

.stats-card {
  position: relative;
  padding: 20px 22px 17px;
  border: 1px solid rgba(229, 180, 95, .45);
  border-radius: 26px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .95), rgba(255, 251, 244, .9));
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(12px);
}
.stats-card::before,
.stats-card::after {
  content: "";
  position: absolute;
  width: 22px;
  height: 22px;
  border: 2px solid rgba(229, 180, 95, .55);
  pointer-events: none;
}
.stats-card::before { top: 12px; left: 12px; border-right: 0; border-bottom: 0; border-radius: 9px 0 0 0; }
.stats-card::after { right: 12px; bottom: 12px; border-top: 0; border-left: 0; border-radius: 0 0 9px 0; }

.stats-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--gold-deep);
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .16em;
}
.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--mint-soft);
  color: var(--mint);
  font-family: Georgia, "Times New Roman", serif;
  font-size: .58rem;
  letter-spacing: .12em;
}
.live-badge i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  animation: blink 1.8s ease-in-out infinite;
}
.stats-main {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 7px 0 1px;
}
.stats-main strong {
  color: var(--gold-deep);
  font-family: var(--serif);
  font-size: 3.5rem;
  font-weight: 700;
  line-height: 1;
}
.stats-main span { color: var(--ink-3); font-size: .76rem; }
.stats-mini {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 11px;
  padding: 11px 0;
  border-top: 1px dashed #e9dcc4;
  border-bottom: 1px dashed #e9dcc4;
}
.stats-mini > div + div { border-left: 1px dashed #e9dcc4; text-align: center; }
.stats-mini dt { color: var(--ink-3); font-size: .65rem; letter-spacing: .04em; }
.stats-mini dd {
  margin-top: 2px;
  color: var(--navy);
  font-family: var(--serif);
  font-size: 1.18rem;
  font-weight: 700;
}
.stats-note {
  margin-top: 9px;
  color: var(--ink-3);
  font-size: .66rem;
  text-align: center;
}

/* ================= 筛选区 ================= */

.board-section {
  position: relative;
  padding: 0 0 80px;
  background: var(--paper);
}
.filter-card {
  position: relative;
  z-index: 5;
  margin-top: -58px;
  padding: 18px 22px 12px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #fff;
  box-shadow: var(--shadow-lg);
}
.filter-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 178px 158px;
  align-items: end;
  gap: 12px;
}
.search-field {
  display: flex;
  align-items: center;
  gap: 9px;
  height: 46px;
  padding: 0 13px;
  border: 1px solid #dbe7f6;
  border-radius: 12px;
  background: #f8fbff;
  transition: border-color .2s, box-shadow .2s;
}
.search-field:focus-within {
  border-color: var(--pink);
  box-shadow: 0 0 0 3px rgba(244, 112, 154, .13);
}
.search-field svg { width: 18px; height: 18px; color: var(--ink-3); flex: none; }
.search-field input {
  width: 100%;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: .85rem;
}
.search-field input::placeholder { color: #a5b2c7; }

.select-field { display: flex; flex-direction: column; gap: 4px; }
.select-field > span {
  color: var(--ink-3);
  font-size: .65rem;
  letter-spacing: .08em;
}
.select-field select {
  width: 100%;
  height: 46px;
  padding: 0 34px 0 12px;
  border: 1px solid #dbe7f6;
  border-radius: 12px;
  background-color: #f8fbff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 20 20' fill='none'%3E%3Cpath d='m5 8 5 5 5-5' stroke='%237d89a3' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  color: var(--ink);
  font: inherit;
  font-size: .82rem;
  appearance: none;
  cursor: pointer;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.select-field select:focus {
  border-color: var(--pink);
  box-shadow: 0 0 0 3px rgba(244, 112, 154, .13);
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  flex-wrap: wrap;
}
.filter-group-last { margin-top: 9px; }
.filter-label {
  width: 62px;
  flex: none;
  color: var(--ink-3);
  font-size: .72rem;
  letter-spacing: .04em;
}
.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chip {
  padding: 5px 12px;
  border: 1px solid #e0e9f5;
  border-radius: 999px;
  background: #fff;
  color: var(--ink-2);
  font-size: .76rem;
  line-height: 1.5;
  cursor: pointer;
  transition: border-color .2s, background .2s, color .2s, transform .2s;
}
.chip:hover { border-color: rgba(244, 112, 154, .55); color: var(--pink-deep); }
.chip.is-active {
  border-color: var(--navy);
  background: var(--navy);
  color: #fff;
  box-shadow: 0 4px 12px rgba(34, 48, 90, .18);
}

.filter-tail {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-left: auto;
  flex-wrap: wrap;
}
.match-field {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border: 1px solid #e0e9f5;
  border-radius: 999px;
  background: #f8fbff;
  color: var(--ink-3);
  font-size: .72rem;
  white-space: nowrap;
}
.match-field input {
  width: 48px;
  padding: 0;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: .74rem;
  text-align: center;
}
.match-field input::placeholder { color: #b4c0d2; }
.check-field {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--ink-3);
  font-size: .73rem;
  white-space: nowrap;
  cursor: pointer;
}
.check-field input { width: 14px; height: 14px; accent-color: var(--pink); cursor: pointer; }
.reset-btn {
  padding: 4px 2px;
  border: 0;
  background: none;
  color: var(--ink-3);
  font-size: .72rem;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.reset-btn:hover { color: var(--pink-deep); }
.filter-hint {
  margin-top: 9px;
  padding-top: 8px;
  border-top: 1px dashed #e7eef8;
  color: #93a0b6;
  font-size: .68rem;
}

.results-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 26px 2px 18px;
}
.results-bar p {
  color: var(--ink);
  font-size: .88rem;
  font-weight: 600;
  letter-spacing: .02em;
}
.results-side {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--ink-3);
  font-size: .7rem;
  letter-spacing: .06em;
}

/* ================= 帖子卡片 ================= */

.posts-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.post-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
  box-shadow: var(--shadow-sm);
  transition: transform .26s, box-shadow .26s, border-color .26s;
  animation: card-in .4s ease both;
}
.post-card:hover {
  transform: translateY(-4px);
  border-color: rgba(229, 180, 95, .5);
  box-shadow: var(--shadow-md);
}
.post-head {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 11px;
  align-items: start;
}
.guild-avatar {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: linear-gradient(145deg, var(--av-a, #9fc9f0), var(--av-b, #5b93cf));
  color: #fff;
  font-family: var(--serif);
  font-size: 1.12rem;
  font-weight: 700;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .35), 0 5px 12px rgba(31, 54, 98, .12);
}
.post-head-text { min-width: 0; padding-top: 1px; }
.post-title {
  overflow: hidden;
  color: var(--ink);
  font-size: .98rem;
  font-weight: 700;
  line-height: 1.45;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.post-title a { transition: color .2s; }
.post-title a:hover { color: var(--pink-deep); }
.post-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
  overflow: hidden;
  color: var(--ink-3);
  font-size: .67rem;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.seed-badge {
  padding: 1px 5px;
  border: 1px solid #e6dfd2;
  border-radius: 4px;
  color: #a18b62;
  font-size: .58rem;
  line-height: 1.5;
  flex: none;
}
.status-badge {
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--mint-soft);
  color: #1f8a72;
  font-size: .65rem;
  font-weight: 700;
  white-space: nowrap;
}
.status-badge.is-full { background: #f0f3f8; color: #8b96aa; }

.post-rank-row {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 13px 0 9px;
  flex-wrap: wrap;
}
.rank-badge {
  padding: 3px 8px;
  border-radius: 5px;
  background: #fff6e5;
  color: #946617;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .02em;
}
.rank-badge.rank-10 { background: #fff3d6; color: #8a5a00; box-shadow: inset 0 0 0 1px rgba(229, 180, 95, .45); }
.rank-badge.rank-50 { background: #fff1d8; color: #9a6410; }
.rank-badge.rank-200 { background: #fff0f5; color: #c2486f; }
.rank-badge.rank-600 { background: #eef6ff; color: #3f78b8; }
.rank-badge.rank-1200 { background: #ecfaf5; color: #238d78; }
.rank-badge.rank-0 { background: #f2f4f8; color: #77839a; }
.current-rank { color: var(--ink-3); font-size: .67rem; }
.style-tag {
  padding: 3px 7px;
  border: 1px solid #e3ecf7;
  border-radius: 5px;
  color: var(--ink-3);
  font-size: .66rem;
}
.post-intro {
  display: -webkit-box;
  overflow: hidden;
  margin-bottom: 13px;
  color: var(--ink-2);
  font-size: .82rem;
  line-height: 1.8;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  min-height: 4.4em;
  word-break: break-word;
}
.req-list { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 11px; }
.req-chip {
  padding: 2px 7px;
  border: 1px solid #e8f0fa;
  border-radius: 5px;
  background: #f7fbff;
  color: #63718b;
  font-size: .65rem;
  line-height: 1.6;
}
.tag-list { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 14px; }
.tag { color: var(--gold-deep); font-size: .66rem; }
.tag::before { content: "#"; opacity: .65; }

.post-foot {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: auto;
  padding-top: 13px;
  border-top: 1px dashed #e7eef8;
  flex-wrap: wrap;
}
.post-contact { display: flex; flex-direction: column; line-height: 1.3; }
.post-contact .contact-label { color: var(--ink-3); font-size: .6rem; letter-spacing: .06em; }
.post-contact strong { color: var(--navy); font-size: .77rem; letter-spacing: .03em; }
.copy-mini {
  padding: 3px 7px;
  border: 1px solid #e0e9f5;
  border-radius: 5px;
  background: #fff;
  color: var(--ink-3);
  font-size: .62rem;
  line-height: 1.5;
  cursor: pointer;
  transition: color .2s, border-color .2s;
}
.copy-mini:hover { border-color: var(--pink); color: var(--pink-deep); }
.detail-link {
  margin-left: auto;
  color: var(--pink-deep);
  font-size: .72rem;
  font-weight: 600;
  white-space: nowrap;
}
.detail-link:hover { text-decoration: underline; text-underline-offset: 3px; }

/* 加载 / 空状态 */

.skeleton-card {
  min-height: 286px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
}
.sk-line {
  height: 10px;
  margin-bottom: 10px;
  border-radius: 99px;
  background: linear-gradient(90deg, #eef4fb 20%, #f7faff 40%, #eef4fb 60%);
  background-size: 200% 100%;
  animation: shimmer 1.4s linear infinite;
}
.sk-head { display: flex; gap: 12px; margin-bottom: 22px; }
.sk-avatar { width: 44px; height: 44px; border-radius: 14px; background: #eef4fb; flex: none; }
.sk-lines { flex: 1; padding-top: 4px; }
.sk-line.w40 { width: 40%; }
.sk-line.w70 { width: 70%; }
.sk-line.w90 { width: 90%; }
.sk-line.w100 { width: 100%; }
.sk-line.w60 { width: 60%; }
.sk-gap { height: 22px; }

.empty-state {
  padding: 54px 20px 58px;
  border: 1px dashed #d8e5f4;
  border-radius: 22px;
  background: rgba(255, 255, 255, .7);
  text-align: center;
}
.empty-star {
  display: block;
  color: var(--gold);
  font-size: 2rem;
  line-height: 1;
  margin-bottom: 12px;
}
.empty-state h3 { color: var(--ink); font-size: 1.05rem; }
.empty-state p { margin: 7px 0 18px; color: var(--ink-3); font-size: .83rem; }
.load-more-wrap { display: flex; justify-content: center; margin-top: 28px; }

.error-state {
  grid-column: 1 / -1;
  padding: 36px 24px;
  border: 1px solid #f1d7df;
  border-radius: 20px;
  background: #fff8fa;
  text-align: center;
}
.error-state h3 { color: var(--ink); font-size: 1rem; margin-bottom: 6px; }
.error-state p { color: var(--ink-2); font-size: .84rem; line-height: 1.9; }
.error-state code {
  padding: 2px 6px;
  border-radius: 4px;
  background: #f1e6eb;
  color: #a63d5f;
  font-family: ui-monospace, Consolas, monospace;
  font-size: .78rem;
}
.error-state .btn { margin-top: 16px; }

/* ================= 怎么用 ================= */

.how-section {
  padding: 74px 0 82px;
  border-top: 1px solid #e8f1fb;
  background:
    radial-gradient(700px 320px at 92% 0%, rgba(255, 225, 236, .5), transparent 60%),
    #f3f9ff;
}
.how-head { max-width: 640px; margin-bottom: 34px; }
.how-head h2 {
  margin: 13px 0 8px;
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(1.7rem, 2.6vw, 2.2rem);
  line-height: 1.45;
}
.how-head > p:last-child { color: var(--ink-2); font-size: .9rem; }
.how-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.how-grid li {
  padding: 22px 22px 24px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, .82);
}
.how-num {
  color: var(--gold);
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 700;
}
.how-grid h3 { margin: 8px 0 6px; color: var(--ink); font-size: .98rem; }
.how-grid p { color: var(--ink-2); font-size: .82rem; line-height: 1.85; }
.how-note { margin-top: 18px; color: var(--ink-3); font-size: .7rem; }

/* ================= 详情 ================= */

#detail-view { min-height: 70vh; }
.detail-wrap { padding: 34px 0 86px; }
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 18px;
  color: var(--ink-3);
  font-size: .78rem;
  transition: color .2s;
}
.back-link svg { width: 16px; height: 16px; }
.back-link:hover { color: var(--pink-deep); }

.detail-card {
  padding: 34px 38px 30px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: #fff;
  box-shadow: var(--shadow-md);
}
.detail-hero {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: start;
}
.detail-avatar {
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  border-radius: 22px;
  background: linear-gradient(145deg, var(--av-a, #9fc9f0), var(--av-b, #5b93cf));
  color: #fff;
  font-family: var(--serif);
  font-size: 1.8rem;
  font-weight: 700;
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, .35), 0 8px 20px rgba(31, 54, 98, .14);
}
.detail-title-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.detail-title {
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(1.55rem, 2.6vw, 2rem);
  line-height: 1.35;
  letter-spacing: .04em;
}
.detail-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  color: var(--ink-3);
  font-size: .75rem;
  flex-wrap: wrap;
}
.detail-badges { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.detail-badges .rank-badge { font-size: .7rem; }
.detail-badges .style-tag { font-size: .68rem; }

.detail-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin: 24px 0;
  padding: 16px 0;
  border-top: 1px solid #edf3fb;
  border-bottom: 1px solid #edf3fb;
}
.detail-stat { padding: 0 18px; }
.detail-stat:first-child { padding-left: 0; }
.detail-stat + .detail-stat { border-left: 1px solid #edf3fb; }
.detail-stat span { display: block; color: var(--ink-3); font-size: .68rem; letter-spacing: .04em; }
.detail-stat strong { display: block; margin-top: 3px; color: var(--navy); font-size: .96rem; }

.detail-body {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(250px, .8fr);
  gap: 34px;
  align-items: start;
}
.detail-intro h2,
.detail-req h2 {
  margin-bottom: 10px;
  color: var(--ink);
  font-size: .92rem;
  font-weight: 700;
  letter-spacing: .04em;
}
.detail-intro p {
  color: var(--ink-2);
  font-size: .9rem;
  line-height: 2.05;
  white-space: pre-wrap;
  word-break: break-word;
}
.detail-req { margin-top: 26px; }
.detail-req .req-list { gap: 7px; margin: 0; }
.detail-req .req-chip { padding: 5px 10px; font-size: .72rem; }
.detail-tags { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 20px; }
.detail-tags .tag { font-size: .74rem; }

.contact-panel {
  position: relative;
  overflow: hidden;
  padding: 22px 22px 18px;
  border-radius: 18px;
  background: linear-gradient(155deg, #2a3c6a, #1a2545);
  box-shadow: 0 16px 34px rgba(22, 32, 58, .22);
  color: #fff;
}
.contact-panel::before {
  content: "";
  position: absolute;
  top: -80px;
  right: -60px;
  width: 190px;
  height: 190px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(232, 190, 114, .25), transparent 68%);
}
.contact-panel > * { position: relative; z-index: 1; }
.contact-panel .contact-label {
  color: var(--gold-soft);
  font-size: .62rem;
  letter-spacing: .18em;
}
.contact-qq {
  margin: 5px 0 3px;
  color: #fff;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.55rem;
  letter-spacing: .05em;
}
.contact-hint { color: #9fb0d4; font-size: .68rem; line-height: 1.7; }
.contact-panel .btn { width: 100%; margin-top: 14px; }
.contact-warning { margin-top: 11px; color: #7f90b4; font-size: .62rem; line-height: 1.6; }

.detail-footer {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 28px;
  padding-top: 15px;
  border-top: 1px dashed #e7eef8;
  color: var(--ink-3);
  font-size: .68rem;
  flex-wrap: wrap;
}
.detail-footer .dot { opacity: .5; }

.manage-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 18px;
  padding: 16px 18px;
  border: 1px solid #f0e2c4;
  border-radius: 14px;
  background: #fffbf2;
  flex-wrap: wrap;
}
.manage-panel strong { display: block; color: var(--ink); font-size: .8rem; }
.manage-panel p { margin-top: 2px; color: var(--ink-3); font-size: .68rem; }
.manage-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.btn-small { padding: .55rem .9rem; font-size: .72rem; }
.btn-danger {
  border: 1px solid #f0c8d4;
  background: #fff;
  color: #c2486f;
}
.btn-danger:hover { background: #fff5f8; border-color: #e7a5b9; }
.btn-muted {
  border: 1px solid #e0e9f5;
  background: #fff;
  color: var(--ink-2);
}
.btn-muted:hover { border-color: #c8d8eb; }

.detail-loading {
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: #fff;
}
.detail-error {
  padding: 60px 24px;
  border: 1px dashed #d8e5f4;
  border-radius: 24px;
  background: rgba(255, 255, 255, .75);
  text-align: center;
}
.detail-error h2 { color: var(--ink); font-size: 1.15rem; margin-bottom: 6px; }
.detail-error p { color: var(--ink-3); font-size: .85rem; margin-bottom: 18px; }

/* ================= 页脚 ================= */

.site-footer {
  position: relative;
  overflow: hidden;
  padding: 44px 0 22px;
  background:
    radial-gradient(600px 300px at 88% 0%, rgba(232, 190, 114, .1), transparent 60%),
    var(--navy-deep);
  color: #c3cee6;
}
.site-footer::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(1.5px 1.5px at 12% 22%, rgba(255, 255, 255, .5), transparent),
    radial-gradient(1.5px 1.5px at 34% 70%, rgba(255, 255, 255, .35), transparent),
    radial-gradient(2px 2px at 68% 28%, rgba(232, 190, 114, .5), transparent),
    radial-gradient(1.5px 1.5px at 88% 60%, rgba(255, 255, 255, .4), transparent);
  background-size: 420px 260px;
  opacity: .6;
  pointer-events: none;
}
.footer-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.2fr .8fr 1fr;
  gap: 36px;
  align-items: start;
}
.footer-brand { display: flex; align-items: center; gap: 12px; }
.brand-mark-footer {
  background: rgba(232, 190, 114, .1);
  border: 1px solid rgba(232, 190, 114, .28);
  box-shadow: none;
}
.footer-brand strong { color: #fff; font-size: .94rem; letter-spacing: .1em; }
.footer-brand p { margin-top: 3px; color: #8d9cc0; font-size: .74rem; }
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  padding-top: 8px;
  font-size: .82rem;
}
.footer-nav a,
.footer-link-btn { transition: color .2s; }
.footer-link-btn {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
}
.footer-nav a:hover,
.footer-link-btn:hover { color: var(--gold-soft); }
.footer-meta {
  padding-top: 8px;
  color: #8493b6;
  font-size: .72rem;
  line-height: 1.95;
}
.footer-bottom {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 30px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, .08);
  color: #7e8cae;
  font-size: .7rem;
}

/* ================= 发帖弹窗 ================= */

.post-dialog {
  width: min(760px, calc(100vw - 28px));
  max-height: calc(100vh - 36px);
  margin: auto;
  padding: 0;
  border: 0;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 40px 100px rgba(15, 25, 50, .4);
  overflow: auto;
}
.post-dialog::backdrop {
  background: rgba(18, 28, 52, .52);
  backdrop-filter: blur(4px);
}
.dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 25px 28px 18px;
  border-bottom: 1px solid #edf3fb;
}
.dialog-kicker {
  color: var(--gold-deep);
  font-family: Georgia, "Times New Roman", serif;
  font-size: .58rem;
  font-weight: 700;
  letter-spacing: .26em;
}
.dialog-head h2 {
  margin: 4px 0 3px;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.45rem;
  letter-spacing: .06em;
}
.dialog-sub { color: var(--ink-3); font-size: .74rem; }
.dialog-close {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: none;
  border: 1px solid #e4edf8;
  border-radius: 50%;
  background: #f8fbff;
  color: var(--ink-3);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  transition: color .2s, border-color .2s;
}
.dialog-close:hover { color: var(--pink-deep); border-color: var(--pink); }

#post-form { padding: 20px 28px 22px; }
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 13px 14px;
}
.field { display: block; min-width: 0; }
.field > span {
  position: relative;
  display: block;
  margin-bottom: 5px;
  padding-right: 120px;
  color: var(--ink-2);
  font-size: .75rem;
  font-weight: 600;
}
.field em { color: var(--pink-deep); font-style: normal; }
.field small {
  position: absolute;
  right: 0;
  bottom: 0;
  color: var(--ink-3);
  font-size: .64rem;
  font-weight: 400;
  text-align: right;
}
.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #dce8f7;
  border-radius: 10px;
  background: #f8fbff;
  color: var(--ink);
  font: inherit;
  font-size: .84rem;
  line-height: 1.5;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.field select {
  height: 41px;
  padding-right: 30px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 20 20' fill='none'%3E%3Cpath d='m5 8 5 5 5-5' stroke='%237d89a3' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 11px center;
  appearance: none;
  cursor: pointer;
}
.field textarea { resize: vertical; min-height: 104px; }
.field input::placeholder,
.field textarea::placeholder { color: #a9b5cb; }
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--pink);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(244, 112, 154, .13);
}
.field input[aria-invalid="true"],
.field textarea[aria-invalid="true"],
.field select[aria-invalid="true"] { border-color: var(--pink-deep); }
.span-2 { grid-column: span 2; }
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.form-error {
  margin-bottom: 14px;
  padding: 10px 13px;
  border: 1px solid #f1c9d5;
  border-radius: 9px;
  background: #fff6f8;
  color: #b84064;
  font-size: .76rem;
  line-height: 1.6;
}
.dialog-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 19px;
  padding-top: 15px;
  border-top: 1px dashed #e6eef9;
  flex-wrap: wrap;
}
.form-note { color: var(--ink-3); font-size: .64rem; line-height: 1.6; }
.dialog-actions { display: flex; gap: 8px; margin-left: auto; }

/* ================= Toast ================= */

.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  z-index: 150;
  max-width: calc(100vw - 32px);
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(22, 32, 58, .94);
  color: #fff;
  font-size: .8rem;
  box-shadow: 0 12px 30px rgba(15, 25, 50, .28);
  opacity: 0;
  transform: translate(-50%, 12px);
  pointer-events: none;
  transition: opacity .22s, transform .22s;
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
.toast.is-error { background: rgba(164, 45, 76, .96); }

/* ================= 动画 ================= */

@keyframes twinkle {
  0%, 100% { opacity: .25; transform: scale(.7) rotate(0deg); }
  50% { opacity: .9; transform: scale(1) rotate(90deg); }
}
@keyframes ping {
  0% { box-shadow: 0 0 0 0 rgba(244, 112, 154, .5); }
  70%, 100% { box-shadow: 0 0 0 7px rgba(244, 112, 154, 0); }
}
@keyframes ping-green {
  0% { box-shadow: 0 0 0 0 rgba(47, 191, 149, .45); }
  70%, 100% { box-shadow: 0 0 0 6px rgba(47, 191, 149, 0); }
}
@keyframes blink { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }
@keyframes card-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}
@keyframes shimmer {
  from { background-position: 200% 0; }
  to { background-position: -200% 0; }
}

/* ================= 响应式 ================= */

@media (max-width: 1024px) {
  .hero-grid { gap: 36px; }
  .filter-row { grid-template-columns: minmax(0, 1fr) 160px 145px; }
  .filter-tail { width: 100%; margin-left: 74px; }
  .posts-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 820px) {
  .topnav { display: none; }
  .topbar-inner { height: 66px; gap: 14px; }
  .topbar-inner > .btn { margin-left: auto; }
  .hero { padding: 46px 0 108px; }
  .hero-grid { grid-template-columns: 1fr; gap: 34px; }
  .hero-copy { max-width: 640px; }
  .stats-card { max-width: 460px; }
  .filter-card { margin-top: -52px; padding: 18px; }
  .filter-row { grid-template-columns: 1fr 1fr; }
  .search-field { grid-column: 1 / -1; }
  .filter-label { width: auto; }
  .filter-group { align-items: flex-start; gap: 8px; }
  .filter-tail { margin-left: 0; width: 100%; }
  .how-grid { grid-template-columns: 1fr; }
  .detail-card { padding: 24px; }
  .detail-body { grid-template-columns: 1fr; gap: 24px; }
  .contact-panel { max-width: 420px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-meta { grid-column: 1 / -1; margin-top: -8px; }
}

@media (max-width: 640px) {
  .wrap { width: calc(100% - 32px); }
  .brand-text strong { font-size: .84rem; letter-spacing: .04em; }
  .brand-text small { font-size: .46rem; letter-spacing: .1em; }
  .brand-mark { width: 36px; height: 36px; border-radius: 11px; }
  .brand-mark svg { width: 18px; height: 18px; }
  .topbar .btn-sm { padding: .62rem .9rem; font-size: .74rem; }
  .topbar .btn-sm svg { display: none; }

  .hero { padding: 32px 0 88px; }
  .hero-grid { gap: 26px; }
  .hero h1 { font-size: clamp(2.1rem, 9.2vw, 2.55rem); line-height: 1.34; margin: 15px 0; }
  .lede { font-size: .91rem; line-height: 1.85; }
  .hero-actions { margin-top: 20px; }
  .hero-actions .btn { flex: 1 1 auto; }
  .hero-note { font-size: .7rem; }
  .stats-card { padding: 11px 16px; border-radius: 18px; }
  .stats-head,
  .stats-main,
  .stats-note { display: none; }
  .stats-mini { margin: 0; padding: 0; border: 0; }
  .stats-mini dt { font-size: .6rem; }
  .stats-mini dd { font-size: 1rem; }

  .board-section { padding-bottom: 60px; }
  .filter-card { margin-top: -42px; padding: 15px; border-radius: 20px; }
  .filter-row { grid-template-columns: 1fr 1fr; gap: 8px; }
  .filter-row .search-field { grid-column: 1 / -1; }
  .filter-group { gap: 7px; margin-top: 12px; }
  .chips { gap: 6px; }
  .chip { padding: 4px 10px; font-size: .72rem; }
  .filter-tail { gap: 7px; margin-top: 2px; }
  .match-field { font-size: .68rem; padding: 4px 8px; }
  .match-field input { width: 40px; }
  .check-field { font-size: .68rem; }
  .reset-btn { margin-left: auto; font-size: .68rem; }
  .filter-hint { font-size: .64rem; line-height: 1.6; }

  .results-bar { margin-top: 22px; }
  .results-bar p { font-size: .82rem; }
  .results-side { display: none; }
  .posts-grid { grid-template-columns: 1fr; gap: 13px; }
  .post-card { padding: 17px; }
  .post-intro { min-height: 0; -webkit-line-clamp: 2; }
  .post-foot { gap: 8px; }

  .how-section { padding: 56px 0 64px; }
  .how-head { margin-bottom: 24px; }
  .how-grid { gap: 12px; }
  .how-grid li { padding: 18px; }

  .detail-wrap { padding: 22px 0 64px; }
  .detail-card { padding: 20px 17px; border-radius: 22px; }
  .detail-hero { grid-template-columns: 56px minmax(0, 1fr); gap: 13px; }
  .detail-avatar { width: 56px; height: 56px; border-radius: 16px; font-size: 1.35rem; }
  .detail-badges { grid-column: 1 / -1; justify-content: flex-start; }
  .detail-stats { grid-template-columns: 1fr 1fr; gap: 0; padding: 6px 0; }
  .detail-stat { padding: 10px 12px; }
  .detail-stat:nth-child(odd) { padding-left: 0; border-left: 0; }
  .detail-stat:nth-child(even) { border-left: 1px solid #edf3fb; }
  .detail-stat:nth-child(n+3) { border-top: 1px solid #edf3fb; }
  .detail-body { gap: 20px; }
  .detail-intro p { font-size: .86rem; }
  .contact-panel { max-width: none; }

  .footer-grid { grid-template-columns: 1fr; gap: 22px; }
  .footer-nav { padding-top: 0; gap: 10px 20px; }
  .footer-meta { margin-top: 0; }
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: 5px; }

  .post-dialog { width: calc(100vw - 20px); max-height: calc(100vh - 20px); border-radius: 20px; }
  .dialog-head { padding: 19px 18px 14px; }
  .dialog-head h2 { font-size: 1.3rem; }
  .dialog-sub { font-size: .7rem; }
  #post-form { padding: 15px 18px 18px; }
  .form-grid { grid-template-columns: 1fr; gap: 11px; }
  .span-2 { grid-column: span 1; }
  .dialog-foot { gap: 12px; }
  .dialog-actions { width: 100%; }
  .dialog-actions .btn { flex: 1; }
  .form-note { font-size: .62rem; }
}

@media (max-width: 380px) {
  .brand-text small { display: none; }
  .hero h1 { font-size: 2rem; }
  .match-field { flex: 1 1 auto; }
}

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