/* 拾源 SHIYUAN.CLUB — 资源分享社区原型样式
   视觉：经典论坛质感 —— 灰色页面底 + 浅灰卡片 + 深藏青主色，卡片带渐变标题栏与小硬阴影 */

:root {
  --bg: #dee2e6;
  --surface: #ffffff;
  --card: #f8f9fa;
  --ink: #212529;
  --muted: #6c757d;
  --faint: #868e96;
  --line: #dee2e6;
  --brand: #1f4977;
  --brand-deep: #16375a;
  --soft: #e9eff6;
  --soft-line: #c5d3e4;
  --amber: #d57c32;
  --amber-soft: #fbf2e3;
  --ok: #177f2e;
  --radius: 8px;
  --shadow: 2px 2px 3px rgba(173, 181, 189, 0.25);
  --font: "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
img, svg { display: block; }

.wrap { max-width: 1360px; margin: 0 auto; padding: 0 40px; }
.mono { font-family: var(--mono); font-feature-settings: "tnum"; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.hide { display: none !important; }

/* ---------- 顶部导航 ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 30;
  height: 72px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  transition: box-shadow .25s ease;
}
.nav.scrolled { box-shadow: 0 6px 20px rgba(20, 32, 28, .07); }
.nav-inner {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand { display: flex; align-items: center; gap: 9px; flex: 0 0 auto; }
.brand-mark {
  width: 32px; height: 32px; border-radius: 6px;
  background: var(--brand); display: grid; place-items: center;
}
.brand-text { display: flex; align-items: baseline; gap: 6px; }
.brand-name { font-size: 19px; font-weight: 700; letter-spacing: .01em; }
.brand-sub { font-family: var(--mono); font-size: 9px; font-weight: 500; color: var(--faint); letter-spacing: .14em; }
.nav-links { display: flex; align-items: center; gap: 28px; font-size: 14px; color: var(--muted); }
.nav-links a { position: relative; padding: 4px 0; transition: color .15s; }
.nav-links a::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; border-radius: 1px;
  background: var(--brand); transform: scaleX(0); transform-origin: left center;
  transition: transform .22s cubic-bezier(.22, .61, .36, 1);
}
.nav-links a:hover { color: var(--ink); }
.nav-links a:hover::after { transform: scaleX(.55); }
.nav-links a.active { color: var(--brand); font-weight: 500; }
.nav-links a.active::after { transform: scaleX(1); }

.search {
  display: flex; align-items: center; gap: 8px;
  width: 300px; height: 36px; padding: 0 12px;
  background: #f1f3f5; border-radius: 6px; border: 1px solid transparent;
  color: var(--faint); transition: border-color .15s, background .15s;
}
.search:focus-within { border-color: var(--soft-line); background: #fff; }
.search input {
  flex: 1; min-width: 0; border: 0; outline: 0; background: transparent;
  font: inherit; font-size: 13px; color: var(--ink);
}
.search input::placeholder { color: var(--faint); }

.nav-right { display: flex; align-items: center; gap: 14px; flex: 0 0 auto; }
.points-badge {
  display: inline-flex; align-items: center; gap: 6px;
  height: 32px; padding: 0 12px; border-radius: 6px;
  background: var(--amber-soft); color: var(--amber);
  font-size: 13px; font-weight: 500;
}
.points-badge .mono { font-weight: 500; }
.points-badge small { font-size: 12px; font-weight: 400; }

/* ---------- 按钮 / 标签 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 0; cursor: pointer; border-radius: 6px;
  font-size: 13px; font-weight: 500; white-space: nowrap;
  transition: background .15s, border-color .15s, transform .1s, opacity .15s;
}
.btn:active { transform: translateY(0) scale(.97); }
.btn-primary { height: 36px; padding: 0 16px; background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-deep); transform: translateY(-1px); box-shadow: 0 5px 14px rgba(31, 73, 119, .22); }
.btn-primary:disabled { opacity: .45; cursor: not-allowed; }
.btn-ghost { height: 36px; padding: 0 16px; background: #fff; border: 1px solid var(--line); color: var(--muted); }
.btn-ghost:hover { border-color: var(--soft-line); color: var(--brand); }
.btn-lg { height: 46px; padding: 0 22px; font-size: 14px; }
.btn-block { width: 100%; }

.chip {
  display: inline-flex; align-items: center; height: 30px; padding: 0 14px;
  border-radius: 6px; border: 1px solid var(--line); background: #fff;
  color: var(--muted); font-size: 12px; cursor: pointer; white-space: nowrap;
  transition: all .15s;
}
.chip:hover { border-color: var(--soft-line); color: var(--brand); }
.chip.active { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 500; }
.chip.sm { height: 32px; padding: 0 14px; font-size: 12px; }

.badge {
  display: inline-flex; align-items: center; height: 30px; padding: 0 12px;
  border-radius: 6px; background: #f1f3f5; color: var(--muted);
  font-size: 11.5px; font-weight: 500; white-space: nowrap;
}
.badge.ok { background: var(--soft); color: var(--brand); }
.badge.warn { background: #F6ECD9; color: #8A5A16; }
.badge.bad { background: #F3DEDA; color: #9C3B2E; }
.review-banner {
  margin: 0 0 14px; padding: 10px 14px; font-size: 13px;
  background: #F6ECD9; color: #8A5A16; border-radius: 6px;
}
.review-banner.bad { background: #F3DEDA; color: #9C3B2E; }

/* ---------- 卡片 ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.card-pad { padding: 18px; }
.card-title { font-size: 14px; font-weight: 600; margin: 0 0 12px; }

.avatar {
  border-radius: 100%; background: #dce3ec; display: grid; place-items: center;
  flex: 0 0 auto; overflow: hidden;
}
.avatar svg { width: 62%; height: 62%; }
.avatar.sm { width: 30px; height: 30px; }
.avatar.md { width: 34px; height: 34px; }
.avatar.lg { width: 40px; height: 40px; }
.avatar.xl { width: 64px; height: 64px; }
.avatar.warm { background: #ede7d9; }
.avatar.cool { background: #dde7ec; }
.avatar.rose { background: #efe2df; }

/* ---------- 首页三栏 ---------- */
.layout {
  display: grid;
  grid-template-columns: 212px minmax(0, 1fr) 296px;
  gap: 24px;
  align-items: start;
  padding-top: 28px;
  padding-bottom: 40px;
}

.side-nav { padding: 14px 12px; }
.side-nav h3 {
  margin: 0 0 6px; padding: 0 12px;
  font-size: 11px; font-weight: 500; color: var(--faint); letter-spacing: .04em;
}
.side-nav ul { list-style: none; margin: 0; padding: 0; }
.side-nav li a {
  display: flex; align-items: center; justify-content: space-between;
  height: 34px; padding: 0 12px; border-radius: 4px;
  font-size: 13px; color: var(--muted); transition: background .15s, color .15s;
}
.side-nav li a:hover { background: #f1f3f5; color: var(--ink); }
.side-nav li a.active { background: var(--soft); color: var(--brand); font-weight: 500; }
.side-nav li a span { font-family: var(--mono); font-size: 11.5px; color: var(--faint); }
.side-nav li a.active span { color: var(--brand); }

.guild { margin-top: 16px; padding: 14px; }
.guild h4 { margin: 0 0 6px; font-size: 13px; font-weight: 600; }
.guild p { margin: 0; font-size: 11.5px; line-height: 1.7; color: var(--faint); }

.feed-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 16px; margin-bottom: 16px;
}
.feed-head h1 { margin: 0 0 5px; font-size: 24px; font-weight: 600; letter-spacing: -.01em; }
.feed-head p { margin: 0; font-size: 12px; color: var(--faint); }
.feed-tabs { display: flex; gap: 8px; }

.notice {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px; border-radius: 6px;
  background: var(--soft); color: var(--brand); font-size: 12.5px;
  margin-bottom: 16px;
}
.notice svg { flex: 0 0 auto; }

.res-card {
  display: flex; align-items: center; gap: 16px;
  padding: 16px; margin-bottom: 16px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  transition: border-color .18s, box-shadow .18s, transform .18s;
}
.res-card:hover { border-color: #cfd9e4; box-shadow: var(--shadow); transform: translateY(-1px); }
.res-card .thumb svg { transition: transform .22s cubic-bezier(.22, .61, .36, 1); }
.res-card:hover .thumb svg { transform: scale(1.12) rotate(-4deg); }
.res-title { margin: 0; font-size: 15px; font-weight: 600; line-height: 1.5; transition: color .15s; }
.res-card:hover .res-title { color: var(--brand); }
.thumb {
  width: 76px; height: 76px; border-radius: 6px;
  display: grid; place-items: center; flex: 0 0 76px;
}
.thumb svg { width: 32px; height: 32px; }
.res-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 7px; }
.res-desc { margin: 0; font-size: 12.5px; color: var(--muted); line-height: 1.6; }
.res-meta { font-size: 11.5px; color: var(--faint); }
.res-meta b { font-weight: 400; color: var(--muted); }

.load-more {
  width: 100%; height: 44px; border-radius: 6px;
  background: #fff; border: 1px solid var(--line); color: var(--brand);
  font-size: 12.5px; font-weight: 500; cursor: pointer;
  transition: border-color .15s, background .15s, transform .1s, box-shadow .15s;
}
.load-more:hover { border-color: var(--soft-line); background: #fbfcfd; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(20, 32, 28, .05); }

/* 右栏 */
.checkin {
  padding: 20px; border-radius: 8px; background: var(--brand); color: #fff;
  margin-bottom: 16px;
}
.checkin h3 { margin: 0 0 6px; font-size: 15px; font-weight: 600; }
.checkin p { margin: 0 0 12px; font-size: 12px; color: #b8c9dc; }
.checkin button {
  width: 100%; height: 38px; border-radius: 6px; border: 0;
  background: #fff; color: var(--brand); font-size: 13px; font-weight: 500; cursor: pointer;
}
.checkin button:disabled { background: rgba(255, 255, 255, .18); color: #dfe7f2; cursor: default; }

.side-card { padding: 18px; margin-bottom: 16px; }
.side-card h3 { margin: 0 0 10px; font-size: 14px; font-weight: 600; }
.stat-label { font-size: 12px; color: var(--faint); }
.stat-num { font-family: var(--mono); font-size: 30px; font-weight: 500; line-height: 1.2; margin: 2px 0 6px; }
.stat-row { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--muted); }

.task-row {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 12.5px; color: var(--muted); padding: 5px 0;
}
.task-row .state { font-size: 12px; font-weight: 500; color: var(--amber); }
.task-row .state.done { color: var(--ok); }
.task-row .state.link { color: var(--brand); }

.rule-text { margin: 0; font-size: 11.5px; line-height: 1.75; color: var(--faint); }

.rank { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); padding: 5px 0; }
.rank .no { font-family: var(--mono); color: var(--faint); }

/* ---------- 详情页 ---------- */
.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 296px;
  gap: 24px;
  align-items: start;
  padding-top: 24px;
  padding-bottom: 48px;
}
.crumb { font-size: 12px; color: var(--faint); margin-bottom: 12px; }
.crumb a:hover { color: var(--brand); }

.detail-card { padding: 24px; margin-bottom: 16px; }
.detail-card h1 { margin: 0 0 14px; font-size: 24px; font-weight: 600; line-height: 1.45; letter-spacing: -.01em; }
.tagline { font-size: 12px; font-weight: 500; color: var(--brand); margin-bottom: 14px; }
.detail-desc { margin: 0 0 14px; font-size: 14px; line-height: 1.75; color: var(--muted); }
.detail-meta { font-size: 12px; color: var(--faint); }

.lock-box {
  margin-top: 18px; padding: 28px;
  background: #f1f3f5; border: 1px solid #d8dee6; border-radius: 8px;
  display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center;
  transition: background .2s, border-color .2s;
}
.lock-box.unlocked { background: var(--soft); border-color: var(--soft-line); }
.lock-box h3 { margin: 0; font-size: 17px; font-weight: 600; }
.lock-box p { margin: 0; font-size: 12.5px; line-height: 1.7; color: var(--muted); max-width: 520px; }
.lock-box.unlocked h3 { color: var(--brand); }
.lock-box.unlocked p { color: #4d6b8a; }
.mask-text { font-family: var(--mono); font-size: 11.5px; color: var(--faint); }

.link-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  width: 100%; padding: 14px; background: #fff;
  border: 1px solid var(--soft-line); border-radius: 6px; text-align: left;
}
.link-bar code { font-family: var(--mono); font-size: 12px; color: var(--ink); word-break: break-all; }
.link-bar .btn { height: 34px; padding: 0 14px; font-size: 12px; }

.comment-card { padding: 24px; }
.comment-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.comment-head h2 { margin: 0; font-size: 16px; font-weight: 600; }
.comment-head span { font-size: 12px; color: var(--faint); }

.comment-input {
  display: flex; align-items: center; gap: 10px;
  padding: 12px; background: var(--bg); border-radius: 6px;
  border: 1px solid transparent; transition: border-color .15s, background .15s;
}
.comment-input:focus-within { background: #fff; border-color: var(--soft-line); }
.comment-input input {
  flex: 1; min-width: 0; border: 0; outline: 0; background: transparent;
  font: inherit; font-size: 12.5px; color: var(--ink);
}
.comment-input input::placeholder { color: var(--faint); }
.comment-input .btn { height: 34px; padding: 0 16px; font-size: 12.5px; }

.comment {
  display: flex; gap: 12px; padding-top: 16px;
  border-top: 1px solid #f1f3f5; margin-top: 16px;
}
.comment:first-of-type { border-top: 0; }
.comment-body { flex: 1; min-width: 0; }
.comment-name { font-size: 12px; font-weight: 500; margin-bottom: 5px; }
.comment-name time { font-weight: 400; color: var(--faint); }
.comment-name .mine { color: var(--brand); }
.comment-text { margin: 0; font-size: 12.5px; line-height: 1.7; color: var(--muted); }

.empty-comments {
  padding: 32px 20px; text-align: center;
  background: var(--bg); border-radius: 6px;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  margin-bottom: 16px;
}
.empty-comments h4 { margin: 0; font-size: 15px; font-weight: 600; }
.empty-comments p { margin: 0; font-size: 12px; color: var(--muted); line-height: 1.6; }

/* 侧栏 */
.author-row { display: flex; align-items: center; gap: 10px; }
.author-name { font-size: 14px; font-weight: 600; }
.author-sub { font-size: 11px; color: var(--faint); }
.author-stat { margin-top: 12px; font-size: 11.5px; color: var(--muted); }

.explain { background: var(--soft); border: 0; }
.explain h3 { color: var(--brand); }
.explain p { margin: 0 0 8px; font-size: 11.5px; line-height: 1.75; color: #4d6b8a; }
.explain .tip { font-size: 11.5px; font-weight: 500; color: var(--brand); }

.rel-item { display: block; font-size: 12px; color: var(--muted); padding: 5px 0; }
.rel-item:hover { color: var(--brand); }

/* ---------- 登录页 ---------- */
.auth { display: grid; grid-template-columns: 560px minmax(0, 1fr); min-height: calc(100vh - 72px); }
.auth-brand {
  background: var(--brand); color: #fff; padding: 56px;
  display: flex; flex-direction: column; justify-content: center; gap: 24px;
}
.auth-brand .brand-mark { background: #fff; }
.auth-brand h1 { margin: 0; font-size: 38px; line-height: 1.35; font-weight: 700; letter-spacing: -.01em; }
.auth-brand .lead { margin: 0; font-size: 14px; line-height: 1.75; color: #b8c9dc; }
.auth-feats { display: flex; flex-direction: column; gap: 14px; }
.auth-feats div { font-size: 13px; color: #dfe7f2; }
.auth-feats b { font-family: var(--mono); font-weight: 500; color: #90aecb; margin-right: 10px; }
.auth-foot { font-size: 12px; color: #90aecb; }

.auth-panel { display: grid; place-items: center; padding: 60px; background: #fff; }
.auth-form { width: 400px; display: flex; flex-direction: column; gap: 16px; }
.auth-form h2 { margin: 0; font-size: 26px; font-weight: 600; }
.auth-form .sub { margin: -8px 0 0; font-size: 13px; color: var(--muted); }

.segmented { display: flex; gap: 4px; padding: 4px; background: #f1f3f5; border-radius: 6px; }
.segmented button {
  flex: 1; height: 32px; border: 0; border-radius: 4px; background: transparent;
  font-size: 13px; color: var(--faint); cursor: pointer;
}
.segmented button.active { background: #fff; color: var(--brand); font-weight: 500; box-shadow: 0 1px 2px rgba(20, 32, 28, .06); }

.field { display: flex; flex-direction: column; gap: 7px; }
.field label { font-size: 12.5px; font-weight: 500; }
.field .hint { font-size: 11px; color: var(--faint); }
.input {
  height: 44px; padding: 0 14px; border-radius: 6px;
  border: 1px solid var(--line); background: var(--bg);
  font: inherit; font-size: 13px; color: var(--ink); outline: 0;
  transition: border-color .15s, background .15s;
}
.input:focus { border-color: var(--soft-line); background: #fff; }
.input::placeholder { color: var(--faint); }
textarea.input { height: 90px; padding: 14px; resize: vertical; line-height: 1.7; }

.link-forget { text-align: right; font-size: 12px; color: var(--brand); }

/* 邮箱验证码行 */
.code-row { display: flex; gap: 8px; }
.code-row .input { flex: 1 1 auto; letter-spacing: 4px; }
.btn-send {
  flex: 0 0 auto; white-space: nowrap; font-size: 12.5px;
  background: var(--soft); color: var(--brand); border: 1px solid var(--soft-line);
  padding: 0 14px; cursor: pointer; border-radius: 6px; font-family: inherit;
}
.btn-send:hover { background: #e6ecf4; }
.btn-send:disabled { opacity: 0.55; cursor: not-allowed; }
.auth-tip { text-align: center; font-size: 12px; font-weight: 500; color: var(--amber); }
.auth-terms { text-align: center; font-size: 11.5px; color: var(--faint); }

/* ---------- 发布页 ---------- */
.publish-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 296px;
  gap: 24px; align-items: start;
  padding-top: 28px; padding-bottom: 48px;
}
.page-head h1 { margin: 0 0 5px; font-size: 24px; font-weight: 600; }
.page-head p { margin: 0 0 16px; font-size: 12px; color: var(--faint); }

.form-card { padding: 24px; display: flex; flex-direction: column; gap: 16px; }
.link-row { display: flex; gap: 12px; }
.link-row .input:first-child { flex: 1 1 auto; min-width: 0; }
.link-row .code-input { width: 150px; flex: 0 0 150px; }

.radio-row { display: flex; gap: 12px; }
.radio-card {
  flex: 1; padding: 14px; border-radius: 6px; border: 1px solid var(--line);
  background: #fff; cursor: pointer; transition: all .15s;
}
.radio-card h4 { margin: 0 0 5px; font-size: 13px; font-weight: 500; }
.radio-card p { margin: 0; font-size: 11px; line-height: 1.65; color: var(--muted); }
.radio-card.active { background: var(--soft); border-color: var(--brand); }
.radio-card.active h4 { color: var(--brand); font-weight: 600; }
.radio-card.active p { color: #4d6b8a; }

.cover-upload {
  width: 160px; height: 90px; border-radius: 6px;
  background: #f1f3f5; display: grid; place-items: center;
  color: var(--faint); font-size: 11.5px; cursor: pointer;
  border: 1px dashed #d3dae2;
}
.cover-upload:hover { background: #f1f3f5; color: var(--brand); }

.form-actions { display: flex; align-items: center; justify-content: space-between; }
.form-actions .left { font-size: 12.5px; color: var(--muted); cursor: pointer; }
.form-actions .right { display: flex; gap: 10px; }

.reward-card { padding: 20px; border-radius: var(--radius); background: var(--brand); color: #fff; }
.reward-card .label { font-size: 12px; color: #b8c9dc; }
.reward-card .num { font-family: var(--mono); font-size: 30px; font-weight: 500; margin: 4px 0 6px; }
.reward-card .note { font-size: 11.5px; color: #dfe7f2; }
.reward-card .note2 { font-size: 11.5px; font-weight: 500; color: #90aecb; margin-top: 4px; }

.notice-list { margin: 0; padding: 0; list-style: none; }
.notice-list li { font-size: 11.5px; color: var(--muted); line-height: 2; }
.notice-list b { font-family: var(--mono); font-weight: 400; color: var(--faint); margin-right: 8px; }

/* ---------- 积分中心 ---------- */
.points-layout {
  display: grid;
  grid-template-columns: 268px minmax(0, 1fr) 296px;
  gap: 24px; align-items: start;
  padding-top: 28px; padding-bottom: 48px;
}
.profile { padding: 20px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.profile .name { font-size: 17px; font-weight: 600; }
.profile .lv { font-size: 12px; color: var(--faint); }
.profile .days { font-size: 12px; font-weight: 500; color: var(--brand); }
.profile .btn-ghost { width: 100%; height: 34px; font-size: 12px; margin-top: 4px; }

.progress { height: 8px; border-radius: 6px; background: #e9ecef; overflow: hidden; }
.progress i { display: block; height: 100%; border-radius: 6px; background: var(--brand); width: 0; transition: width .9s cubic-bezier(.22, .61, .36, 1); }

.total-card { padding: 24px; border-radius: 8px; background: var(--brand); color: #fff; }
.total-card .label { font-size: 12px; color: #b8c9dc; }
.total-card .num { font-family: var(--mono); font-size: 40px; font-weight: 500; line-height: 1.2; }
.total-card .row { font-size: 12.5px; color: #dfe7f2; margin-top: 4px; }
.total-card .row2 { font-size: 11.5px; color: #90aecb; margin-top: 2px; }

.calendar { display: flex; justify-content: space-between; }
.calendar span { font-size: 11.5px; font-weight: 500; color: var(--ok); }
.calendar span.today { color: var(--amber); }

.log-row {
  display: flex; justify-content: space-between; gap: 12px;
  font-size: 12px; color: var(--muted); padding: 5px 0;
}
.log-row .delta { font-family: var(--mono); color: var(--ok); }
.log-row .delta.plus { color: var(--ok); }

.quick a { display: block; font-size: 12px; color: var(--muted); padding: 5px 0; }
.quick a:hover { color: var(--brand); }
.quick a.accent { color: var(--brand); }

/* ---------- Toast / Modal ---------- */
.toast {
  position: fixed; left: 50%; bottom: 32px; z-index: 120;
  display: flex; align-items: center; gap: 10px;
  padding: 12px 18px; border-radius: 6px;
  background: #14201c; color: #fff; font-size: 13px;
  transform: translate(-50%, 16px); opacity: 0; pointer-events: none;
  transition: opacity .22s, transform .22s;
  box-shadow: 0 12px 32px rgba(20, 32, 28, .28);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast .dot { width: 8px; height: 8px; border-radius: 100%; background: #6fd3ab; }

.modal {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(20, 32, 28, .45);
  display: none; align-items: center; justify-content: center; padding: 24px;
}
.modal.show { display: flex; }
.modal-card {
  width: 420px; max-width: 100%; background: #fff; border-radius: 8px;
  padding: 28px; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  animation: pop .2s ease-out;
}
@keyframes pop { from { transform: translateY(8px) scale(.98); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-card h3 { margin: 0; font-size: 17px; font-weight: 600; }
.modal-card p { margin: 0; font-size: 12.5px; line-height: 1.7; color: var(--muted); }
.modal-perks { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.modal-perks span {
  height: 26px; padding: 0 10px; border-radius: 6px;
  background: var(--soft); color: var(--brand);
  font-size: 11px; font-weight: 500; display: inline-flex; align-items: center;
}
.modal-skip { font-size: 12px; color: var(--faint); cursor: pointer; }
.modal-skip:hover { color: var(--muted); }

/* ---------- 移动端演示 ---------- */
.mobile-shell { max-width: 1480px; margin: 0 auto; padding: 32px 40px 56px; }
.mobile-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.mobile-head h1 { margin: 0 0 6px; font-size: 22px; font-weight: 600; }
.mobile-head p { margin: 0; font-size: 12.5px; color: var(--muted); }
.view-switch { display: flex; gap: 8px; }

.phones { display: grid; grid-template-columns: repeat(2, 390px); gap: 48px 56px; justify-content: center; }
@media (min-width: 1720px) { .phones { grid-template-columns: repeat(4, 390px); gap: 40px; } }
.phone-col { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.phone-label { font-size: 12px; color: var(--faint); }
.phone-label b { display: block; font-size: 13px; font-weight: 500; color: var(--ink); margin-bottom: 2px; }

.phone {
  width: 390px; height: 844px; background: var(--bg);
  border-radius: 36px; position: relative; overflow: hidden;
  display: flex; flex-direction: column;
  box-shadow: 0 0 0 10px #14201c, 0 24px 60px rgba(20, 32, 28, .22);
}
.p-status {
  height: 62px; flex: 0 0 62px; background: #fff;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px; font-size: 14px; font-weight: 600;
}
.p-status .icons { display: flex; align-items: center; gap: 6px; }
.p-body {
  flex: 1; min-height: 0; overflow-y: auto;
  padding: 16px 20px 20px; display: flex; flex-direction: column; gap: 16px;
}
.p-body::-webkit-scrollbar { width: 0; }
.p-body.no-scroll { overflow: hidden; }

.p-head { display: flex; align-items: center; justify-content: space-between; }
.p-head .left { display: flex; align-items: center; gap: 8px; }
.p-head .brand-mark { width: 28px; height: 28px; border-radius: 5px; }
.p-head .name { font-size: 17px; font-weight: 700; }
.p-pts {
  display: inline-flex; align-items: center; gap: 5px; height: 28px; padding: 0 10px;
  border-radius: 6px; background: var(--amber-soft); color: var(--amber);
  font-family: var(--mono); font-size: 11.5px; font-weight: 500;
}

.p-search {
  display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px;
  background: #fff; border: 1px solid var(--line); border-radius: 6px;
  font-size: 12.5px; color: var(--faint);
}
.p-chips { display: flex; gap: 8px; overflow: hidden; }
.p-chips .chip { height: 30px; font-size: 11.5px; padding: 0 14px; flex: 0 0 auto; }

.p-notice {
  display: flex; align-items: center; gap: 8px; padding: 10px 12px;
  border-radius: 6px; background: var(--soft); color: var(--brand); font-size: 11.5px;
}

.p-checkin {
  display: flex; align-items: center; justify-content: space-between;
  height: 48px; padding: 0 14px; border-radius: 6px;
  background: var(--brand); color: #fff; font-size: 12px; font-weight: 500;
}
.p-checkin button {
  height: 30px; padding: 0 12px; border-radius: 4px; border: 0;
  background: #fff; color: var(--brand); font-size: 11.5px; font-weight: 500; cursor: pointer;
}
.p-checkin button:disabled { background: rgba(255,255,255,.2); color: #dfe7f2; }

.p-card {
  display: flex; gap: 12px; padding: 12px; border-radius: 6px;
  background: #fff; border: 1px solid var(--line);
}
.p-card .thumb { width: 56px; height: 56px; flex: 0 0 56px; border-radius: 6px; }
.p-card .thumb svg { width: 26px; height: 26px; }
.p-card .info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.p-card .title { font-size: 13px; font-weight: 600; line-height: 1.45; }
.p-card .meta { font-size: 10.5px; color: var(--faint); }
.p-card .badge { height: 22px; padding: 0 8px; font-size: 10px; align-self: flex-start; }

.p-tabbar { flex: 0 0 auto; padding: 12px 21px 21px; background: var(--bg); }
.p-tabbar-inner {
  height: 62px; background: #fff; border: 1px solid var(--line);
  border-radius: 28px; padding: 4px; display: flex; gap: 4px;
}
.p-tab {
  flex: 1; border-radius: 22px; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 4px;
  font-size: 10px; color: var(--faint); cursor: pointer;
}
.p-tab svg { width: 18px; height: 18px; }
.p-tab.active { background: var(--brand); color: #fff; }

.p-back { display: flex; align-items: center; justify-content: space-between; font-size: 13px; font-weight: 500; }
.p-back .lk { display: flex; align-items: center; gap: 6px; }
.p-title { font-size: 18px; font-weight: 600; line-height: 1.45; margin: 0; }
.p-tags { font-size: 11.5px; font-weight: 500; color: var(--brand); }
.p-desc { font-size: 12.5px; line-height: 1.7; color: var(--muted); margin: 0; }
.p-meta { font-size: 10.5px; color: var(--faint); }
.p-author { display: flex; align-items: center; gap: 10px; padding-top: 4px; }
.p-author .info { flex: 1; min-width: 0; }
.p-author .n { font-size: 11.5px; font-weight: 500; }
.p-author .s { font-size: 10.5px; color: var(--faint); }
.p-follow { height: 28px; padding: 0 12px; border-radius: 6px; border: 0; background: var(--soft); color: var(--brand); font-size: 10.5px; font-weight: 500; }

.p-lock {
  padding: 20px; border-radius: 8px; background: #f1f3f5;
  border: 1px solid #d8dee6; display: flex; flex-direction: column;
  align-items: center; gap: 10px; text-align: center;
}
.p-lock.unlocked { background: var(--soft); border-color: var(--soft-line); }
.p-lock h3 { margin: 0; font-size: 15px; font-weight: 600; }
.p-lock.unlocked h3 { color: var(--brand); }
.p-lock p { margin: 0; font-size: 11.5px; line-height: 1.6; color: var(--muted); }
.p-lock.unlocked p { color: #4d6b8a; }
.p-lock .mask { font-family: var(--mono); font-size: 10.5px; color: var(--faint); }
.p-linkbar {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  width: 100%; padding: 12px; background: #fff; border: 1px solid var(--soft-line); border-radius: 6px;
}
.p-linkbar code { font-family: var(--mono); font-size: 10px; color: var(--ink); }
.p-linkbar button { height: 30px; padding: 0 10px; border: 0; border-radius: 4px; background: var(--brand); color: #fff; font-size: 10.5px; font-weight: 500; }

.p-cmt-head { display: flex; justify-content: space-between; align-items: center; font-size: 14px; font-weight: 600; }
.p-cmt-head span { font-size: 11px; font-weight: 400; color: var(--faint); }
.p-comment { display: flex; gap: 10px; }
.p-comment .info { flex: 1; min-width: 0; }
.p-comment .n { font-size: 11.5px; font-weight: 500; }
.p-comment .n.mine { color: var(--brand); }
.p-comment .t { font-size: 11.5px; line-height: 1.65; color: var(--muted); }
.p-more { font-size: 11.5px; font-weight: 500; color: var(--brand); }

.p-cta {
  flex: 0 0 auto; padding: 12px 20px 20px; background: #fff;
  border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px;
}
.p-cta .btn { height: 46px; width: 100%; font-size: 13.5px; }
.p-cta .tip { text-align: center; font-size: 10.5px; color: var(--faint); }

.p-dim { flex: 1; min-height: 0; background: #e2e7ee; padding: 24px 20px; display: flex; flex-direction: column; gap: 12px; }
.p-dim .bar { border-radius: 4px; background: #d3dae4; height: 12px; }
.p-dim .bar.h22 { height: 22px; }
.p-dim .block { border-radius: 6px; background: #d9dfe8; height: 300px; }

.p-sheet {
  flex: 0 0 auto; background: #fff; border-radius: 14px 14px 0 0;
  padding: 20px 20px 28px; display: flex; flex-direction: column;
  align-items: center; gap: 12px; text-align: center;
}
.p-sheet .handle { width: 36px; height: 4px; border-radius: 6px; background: #dfe3ea; }
.p-sheet h3 { margin: 0; font-size: 17px; font-weight: 600; }
.p-sheet p { margin: 0; font-size: 12px; line-height: 1.65; color: var(--muted); }
.p-perks { display: flex; gap: 6px; }
.p-perks span {
  height: 24px; padding: 0 8px; border-radius: 6px; background: var(--soft);
  color: var(--brand); font-size: 10px; font-weight: 500; display: inline-flex; align-items: center;
}

/* ---------- 响应式 ---------- */
@media (max-width: 1180px) {
  .layout { grid-template-columns: 190px minmax(0, 1fr); }
  .layout > aside:last-child { display: none; }
  .search { width: 220px; }
  .nav-links { gap: 18px; }
}
@media (max-width: 900px) {
  .wrap { padding: 0 20px; }
  .layout, .detail-layout, .publish-layout, .points-layout { grid-template-columns: minmax(0, 1fr); }
  .layout > aside, .detail-layout > aside, .publish-layout > aside, .points-layout > aside,
  .points-layout > aside:first-child { display: none; }
  .nav-links { display: none; }
  .search { display: none; }
  .auth { grid-template-columns: 1fr; }
  .auth-brand { display: none; }
  .auth-panel { padding: 40px 20px; }
  .auth-form { width: 100%; max-width: 400px; }
  .phones { gap: 32px; }
}

/* ---------- 分类浏览视图与导航联动 ---------- */
html { scroll-behavior: smooth; }

.browse-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.browse-card {
  background: #fff;
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  padding: 18px 18px 14px;
  cursor: pointer;
  transition: border-color .15s ease, box-shadow .18s ease, transform .18s ease;
}
.browse-card:hover { border-color: var(--brand); box-shadow: 0 6px 18px rgba(31, 73, 119, .1); transform: translateY(-2px); }
.bc-head { display: flex; align-items: center; gap: 12px; }
.bc-info { flex: 1; min-width: 0; }
.bc-info h3 { margin: 0; font-size: 15px; font-weight: 500; color: var(--ink); transition: color .15s; }
.browse-card:hover .bc-info h3 { color: var(--brand); }
.bc-info p { margin: 2px 0 0; font-size: 12px; color: var(--faint); }
.bc-go { font-size: 12px; color: var(--brand); font-weight: 500; flex: 0 0 auto; display: inline-block; transition: transform .18s ease; }
.browse-card:hover .bc-go { transform: translateX(3px); }
.browse-card ul { list-style: none; margin: 12px 0 0; padding: 10px 0 0; border-top: 1px dashed var(--soft-line); }
.browse-card li {
  font-size: 12.5px; color: var(--muted); line-height: 1.5;
  padding: 4px 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.browse-card li.bc-empty { color: var(--faint); font-style: normal; }

@keyframes flashPulse {
  0% { box-shadow: 0 0 0 0 rgba(31, 73, 119, .35); }
  60% { box-shadow: 0 0 0 10px rgba(31, 73, 119, 0); }
  100% { box-shadow: 0 0 0 0 rgba(31, 73, 119, 0); }
}
.flash { animation: flashPulse .9s ease-out 2; }

@media (max-width: 900px) {
  .browse-grid { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- 动效与微交互 ---------- */
@media (prefers-reduced-motion: no-preference) {
  /* 页面软切换过渡（softNavigate） */
  main.page-leave { opacity: 0; transform: translateY(6px); transition: opacity .18s ease, transform .18s ease; }
  main.page-enter { animation: pageIn .34s cubic-bezier(.22, .61, .36, 1) both; }
  @keyframes pageIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

  /* 列表卡片滚动显现（JS 加 .reveal，进入视口后加 .in） */
  .reveal { opacity: 0; transform: translateY(12px); }
  .reveal.in { opacity: 1; transform: none; transition: opacity .45s ease, transform .45s cubic-bezier(.22, .61, .36, 1); transition-delay: var(--d, 0ms); }

  /* 登录页品牌区与表单入场 */
  @keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
  .auth-brand > * { animation: fadeUp .55s cubic-bezier(.22, .61, .36, 1) both; }
  .auth-brand > *:nth-child(1) { animation-delay: .05s; }
  .auth-brand > *:nth-child(2) { animation-delay: .12s; }
  .auth-brand > *:nth-child(3) { animation-delay: .19s; }
  .auth-brand > *:nth-child(4) { animation-delay: .26s; }
  .auth-form { animation: fadeUp .5s cubic-bezier(.22, .61, .36, 1) .12s both; }

  /* 签到按钮流光 */
  .checkin button:not(:disabled) { position: relative; overflow: hidden; }
  .checkin button:not(:disabled)::after {
    content: ''; position: absolute; top: 0; left: -60%; width: 40%; height: 100%;
    background: linear-gradient(100deg, transparent, rgba(31, 73, 119, .14), transparent);
    animation: sheen 3.2s ease-in-out infinite;
  }
  @keyframes sheen { 0% { left: -60%; } 55%, 100% { left: 130%; } }
}

/* 尊重系统「减少动态效果」偏好 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  html { scroll-behavior: auto; }
}

/* ---------- 分类快捷条 / 站点信息 / 今日标记 / 页脚 ---------- */
.cat-bar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.cat-bar .chip { transition: all .15s; }

.site-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; padding: 16px 12px 13px; }
.site-stats .ss-title { grid-column: 1 / -1; margin: 0 0 6px; font-size: 14px; font-weight: 600; }
.site-stats .ss-item { text-align: center; min-width: 0; }
.site-stats .ss-num {
  font-family: var(--mono); font-size: 15px; font-weight: 500; color: var(--ink);
  line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.site-stats .ss-label { font-size: 11px; color: var(--faint); }
.site-stats .ss-item.online .ss-num { color: var(--ok); }

.new-today {
  display: inline-flex; align-items: center; height: 16px; padding: 0 6px; margin-right: 6px;
  border-radius: 4px; background: #fdeeea; color: #c0492f;
  font-size: 10.5px; font-weight: 600; font-style: normal; vertical-align: 1px;
}
.bc-today { color: #c0492f; font-weight: 600; }

.site-footer { margin-top: 28px; padding: 24px 0 36px; border-top: 1px solid var(--line); }
.site-footer .sf-brand { margin: 0 0 5px; text-align: center; font-size: 12.5px; font-weight: 500; color: var(--muted); }
.site-footer .sf-note { margin: 0; text-align: center; font-size: 11.5px; color: var(--faint); }

/* ---------- 经典论坛质感主题层（kfzy 风格） ---------- */
.card { background: var(--card); box-shadow: var(--shadow); }
.res-card { box-shadow: var(--shadow); }
.res-card:hover { box-shadow: 2px 3px 7px rgba(173, 181, 189, .5); }

/* 渐变标题栏：卡片内首个标题自动成为 BBS 式头栏 */
.card > h3:first-child:not(.ss-title),
.card > .card-title:first-child {
  margin: -18px -18px 12px; padding: 11px 18px;
  background: linear-gradient(0deg, #e9ecef, #f8f9fa);
  border-bottom: 1px solid var(--line);
  color: #454d55; font-size: 14px;
}
.card > h1:first-child {
  margin: -24px -24px 14px; padding: 15px 24px;
  background: linear-gradient(0deg, #e9ecef, #f8f9fa);
  border-bottom: 1px solid var(--line);
  color: #454d55; font-size: 19px;
}
.comment-card > .comment-head {
  margin: -24px -24px 16px; padding: 12px 24px;
  background: linear-gradient(0deg, #e9ecef, #f8f9fa);
  border-bottom: 1px solid var(--line);
}
.comment-card > .comment-head h2 { font-size: 14.5px; color: #454d55; }

/* 灰色底上的输入元素回归白色，保持清晰层级 */
.input, .comment-input { background: #fff; }
.empty-comments { background: #eef0f2; }

/* ---------- 发布页：网盘口令快速导入 ---------- */
.paste-field { background: var(--soft); border-radius: 8px; padding: 14px 16px 13px; margin-bottom: 4px; }
.paste-field > label { color: var(--brand); font-weight: 500; }
.paste-field textarea.input { background: #fff; resize: vertical; min-height: 66px; font-size: 13px; }
.paste-actions { display: flex; align-items: center; gap: 12px; margin-top: 9px; flex-wrap: wrap; }
.paste-actions .hint { flex: 1; min-width: 200px; }
.btn-sm { height: 32px; padding: 0 14px; font-size: 12.5px; }

/* flash 高亮在输入框上的短脉冲 */
.input.flash { animation: flashPulse .9s ease-out 2; border-color: var(--brand); }
