/* 墨界 InkVerse · 官网
   方向：纸白与墨字。暖白页面、白卡片、深青单一强调色；
   丰富的部分只留给封面与二维码，chrome 保持安静。 */
:root {
  --paper: #f7f4ee;
  --surface: #ffffff;
  --surface-2: #fbf8f2;
  --raised: #efe9df;
  --ink: #1f1b16;
  --ink-2: #5e554a;
  --ink-3: #8a8073;
  --line: rgba(31, 27, 22, .10);
  --line-strong: rgba(31, 27, 22, .18);
  --accent: #24565b;
  --accent-hover: #1c4448;
  --accent-soft: #e9f0ef;
  --seal: #a8452f;
  --danger: #b42318;
  --success: #16794c;
  --sans: "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", system-ui, -apple-system, sans-serif;
  --serif: "Songti SC", "Noto Serif SC", "Source Han Serif SC", "STSong", serif;
  --mono: "SFMono-Regular", "JetBrains Mono", "Roboto Mono", ui-monospace, monospace;
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 16px;
  --shadow-sm: 0 1px 2px rgba(31, 27, 22, .05);
  --shadow-md: 0 10px 30px rgba(31, 27, 22, .08);
  --shadow-lg: 0 24px 70px rgba(31, 27, 22, .18);
  --ease: cubic-bezier(.22, 1, .36, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
body.auth-open { overflow: hidden; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; }
h1, h2, h3, p, dl, dd, figure { margin: 0; }
ul { margin: 0; padding: 0; }
.hidden { display: none !important; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
::selection { background: var(--accent-soft); color: var(--ink); }

/* ---------- 通用按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 38px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: 14px;
  line-height: 1;
  white-space: nowrap;
  transition: background-color .15s var(--ease), border-color .15s var(--ease), color .15s var(--ease), transform .1s var(--ease);
}
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-ghost { background: var(--surface); border-color: var(--line-strong); color: var(--ink); }
.btn-ghost:hover { border-color: var(--ink-3); }
.btn-lg { height: 46px; padding: 0 22px; font-size: 15px; }
.btn.block { width: 100%; }
.link {
  border: 0; padding: 0; background: none;
  color: var(--accent); font-size: inherit;
}
.link:hover { text-decoration: underline; }
.text-link {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--ink-2); font-size: 13px;
}
.text-link svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.text-link:hover { color: var(--accent); }

/* ---------- 顶部 ---------- */
.site-header {
  position: sticky; top: 0; z-index: 30;
  background: rgba(247, 244, 238, .92);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  max-width: 1200px;
  height: 64px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 40px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.brand-mark {
  width: 32px; height: 32px;
  display: grid; place-items: center;
  background: var(--ink);
  color: var(--paper);
  border-radius: 7px;
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1;
}
.brand-word {
  display: flex; flex-direction: column;
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: .04em;
}
.brand-word span {
  margin-top: 3px;
  font-family: var(--sans);
  font-size: 8px;
  font-weight: 400;
  letter-spacing: .18em;
  color: var(--ink-3);
}
.nav-links { display: flex; align-items: center; gap: 28px; font-size: 13.5px; color: var(--ink-2); }
.nav-links a { position: relative; }
.nav-links a:hover { color: var(--ink); }
.nav-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.account-chip {
  display: inline-flex; align-items: center; gap: 8px;
  height: 38px; padding: 0 14px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  font-size: 13px;
  color: var(--ink);
}
.account-chip:hover { border-color: var(--ink-3); }
.account-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--success); }

/* ---------- 首屏 ---------- */
.hero {
  max-width: 1200px;
  margin: 0 auto;
  padding: 72px 24px 64px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 440px;
  gap: 64px;
  align-items: center;
}
@media (min-width: 900px) { .hero { min-height: calc(100svh - 64px); } }
.eyebrow { font-size: 12px; color: var(--seal); letter-spacing: .02em; }
.hero h1 {
  margin: 14px 0 22px;
  font-family: var(--serif);
  font-size: clamp(42px, 5vw, 62px);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: .01em;
}
.hero-lead { max-width: 34rem; color: var(--ink-2); font-size: 16px; line-height: 1.85; }
.hero-actions { display: flex; align-items: center; gap: 12px; margin-top: 30px; }
.hero-note { margin-top: 14px; font-size: 12px; color: var(--ink-3); }
.hero-stats {
  display: flex;
  max-width: 480px;
  margin-top: 36px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.hero-stats div { flex: 1; padding-left: 20px; border-left: 1px solid var(--line); }
.hero-stats div:first-child { padding-left: 0; border-left: 0; }
.hero-stats dt { font-size: 12px; color: var(--ink-3); }
.hero-stats dd {
  margin-top: 4px;
  font-family: var(--serif);
  font-size: 20px;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}
.hero-art {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 18px 50px rgba(31, 27, 22, .14);
  background: var(--surface-2);
}
.hero-art img { width: 100%; height: auto; aspect-ratio: 2 / 3; object-fit: cover; }
.hero-art figcaption {
  position: absolute; left: 16px; bottom: 16px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, .94);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 13px;
  box-shadow: var(--shadow-sm);
}
.hero-art figcaption span { display: block; font-size: 10px; color: var(--seal); margin-bottom: 2px; }

/* ---------- 区块 ---------- */
.section { max-width: 1200px; margin: 0 auto; padding: 80px 24px; border-top: 1px solid var(--line); }
.section-head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 24px;
  margin-bottom: 36px;
}
.section-index { font-family: var(--mono); font-size: 12px; color: var(--ink-3); letter-spacing: .02em; }
.section-head h2 {
  margin-top: 8px;
  font-family: var(--serif);
  font-size: clamp(26px, 3vw, 34px);
  font-weight: 500;
  line-height: 1.25;
}
.section-note { font-size: 12px; color: var(--ink-3); text-align: right; }

/* ---------- 作品 ---------- */
.works { display: grid; grid-template-columns: 1.15fr .85fr; grid-template-rows: repeat(2, minmax(0, 1fr)); gap: 20px; }
.work {
  display: grid;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}
.work:hover { border-color: var(--line-strong); box-shadow: var(--shadow-sm); }
.work-feature { grid-row: span 2; grid-template-columns: 46% 1fr; }
.work:not(.work-feature) { grid-template-columns: 132px 1fr; }
.work-cover { min-height: 100%; background: var(--raised); }
.work-cover img { width: 100%; height: 100%; object-fit: cover; }
.work-feature .work-cover { min-height: 420px; }
.work-body { padding: 24px; display: flex; flex-direction: column; align-items: flex-start; }
.work-feature .work-body { padding: 32px; justify-content: center; }
.work-meta { font-size: 11.5px; color: var(--ink-3); }
.work-author { margin-top: 4px; font-size: 11.5px; letter-spacing: .08em; color: var(--ink-3); }
.work h3 { margin: 8px 0 8px; font-family: var(--serif); font-size: 19px; font-weight: 500; line-height: 1.35; }
.work-feature h3 { font-size: 27px; margin: 10px 0 12px; }
.work-desc { font-size: 14px; color: var(--ink-2); line-height: 1.7; }
.work-feature .work-desc { font-size: 15px; }
.work-detail { margin: 10px 0 18px; font-size: 12px; color: var(--ink-3); }
.work .btn { margin-top: auto; }
.work-feature .btn { margin-top: 10px; }

/* ---------- 玩法 ---------- */
.feature-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.feature { padding: 24px 24px 0 0; border-right: 1px solid var(--line); }
.feature + .feature { padding-left: 24px; }
.feature:last-child { border-right: 0; }
.feature-num { font-family: var(--mono); font-size: 12px; color: var(--accent); }
.feature h3 { margin: 12px 0 8px; font-size: 17px; font-weight: 500; }
.feature p { color: var(--ink-2); font-size: 13.5px; line-height: 1.75; }

/* ---------- 会员 ---------- */
.price-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; align-items: stretch; }
.price-card {
  display: flex; flex-direction: column;
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
}
.price-card.featured { border-color: var(--accent); background: #fbfdfc; }
.price-name { font-size: 14px; color: var(--ink-2); }
.price-amount { display: flex; align-items: baseline; gap: 6px; margin: 8px 0 10px; }
.price-amount b { font-family: var(--serif); font-size: 40px; font-weight: 500; line-height: 1; font-variant-numeric: tabular-nums; }
.price-amount span { font-size: 12px; color: var(--ink-3); }
.price-desc { font-size: 13.5px; color: var(--ink-2); min-height: 24px; }
.price-list { list-style: none; margin: 20px 0 24px; padding: 18px 0 0; border-top: 1px solid var(--line); }
.price-list li { position: relative; padding-left: 18px; margin: 8px 0; font-size: 13px; color: var(--ink-2); }
.price-list li::before {
  content: ""; position: absolute; left: 0; top: .62em;
  width: 6px; height: 6px; border-radius: 50%; background: var(--accent);
}
.price-card .btn { margin-top: auto; }
.price-note { margin-top: 18px; font-size: 12px; color: var(--ink-3); }

/* ---------- FAQ ---------- */
.faq .section-head { margin-bottom: 20px; }
.faq-list { max-width: 820px; border-top: 1px solid var(--line); }
.faq-list details { border-bottom: 1px solid var(--line); }
.faq-list summary {
  position: relative;
  padding: 18px 32px 18px 0;
  font-size: 15px;
  cursor: pointer;
  list-style: none;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: "+"; position: absolute; right: 2px; top: 15px;
  font-size: 20px; line-height: 1; color: var(--ink-3); font-weight: 300;
}
.faq-list details[open] summary::after { content: "−"; }
.faq-list details p { padding: 0 32px 20px 0; font-size: 13.5px; color: var(--ink-2); line-height: 1.8; }

/* ---------- 页脚 ---------- */
.site-footer { margin-top: 24px; background: var(--surface-2); border-top: 1px solid var(--line); }
.footer-inner {
  max-width: 1200px; margin: 0 auto;
  padding: 48px 24px 32px;
  display: grid;
  grid-template-columns: 1.7fr 1fr 1fr;
  gap: 40px;
}
.footer-brand p { max-width: 32rem; margin-top: 14px; font-size: 13px; color: var(--ink-2); }
.footer-col h2 { margin-bottom: 10px; font-size: 12px; font-weight: 500; color: var(--ink-3); }
.footer-col a { display: block; margin: 7px 0; font-size: 13px; color: var(--ink-2); }
.footer-col a:hover { color: var(--ink); }
.footer-bottom {
  max-width: 1200px; margin: 0 auto;
  padding: 18px 24px 32px;
  border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; gap: 16px;
  font-size: 12px; color: var(--ink-3);
}
.footer-bottom a { color: var(--ink-3); }
.footer-bottom a:hover { color: var(--ink); text-decoration: underline; }

/* ---------- 登录 / 注册 ---------- */
.auth-layer {
  position: fixed; inset: 0; z-index: 100;
  display: none; align-items: center; justify-content: center;
  padding: 20px;
}
.auth-layer.on { display: flex; }
.auth-mask {
  position: absolute; inset: 0;
  background: rgba(31, 27, 22, .42);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  animation: fade-in .2s var(--ease);
}
.auth-card {
  position: relative;
  width: 100%; max-width: 430px;
  max-height: calc(100svh - 40px);
  overflow-y: auto;
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  animation: card-in .24s var(--ease);
}
.auth-close {
  position: absolute; right: 14px; top: 14px;
  width: 30px; height: 30px;
  display: grid; place-items: center;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--ink-2);
  font-size: 20px; line-height: 1;
}
.auth-close:hover { color: var(--ink); border-color: var(--line-strong); }
.auth-head .eyebrow { color: var(--seal); }
.auth-head h2 { margin: 6px 0 4px; font-family: var(--serif); font-size: 26px; font-weight: 500; line-height: 1.2; }
.auth-sub { font-size: 12px; color: var(--ink-3); line-height: 1.6; }
.auth-tabs {
  display: grid; grid-template-columns: 1fr 1fr; gap: 3px;
  padding: 3px;
  margin: 20px 0 18px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.auth-tabs button {
  height: 34px;
  border-radius: 6px;
  font-size: 13px;
  color: var(--ink-2);
}
.auth-tabs button.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }
.field { display: block; margin-bottom: 14px; }
.field > span { display: block; margin-bottom: 6px; font-size: 12px; color: var(--ink-2); }
.field > input, .field > .code-row > input {
  width: 100%; height: 44px;
  padding: 0 12px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: var(--ink);
  font-size: 14px;
  outline: none;
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}
.field > input::placeholder, .field > .code-row > input::placeholder { color: var(--ink-3); }
.field > input:focus, .field > .code-row > input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.field-help { display: block; margin-top: 5px; font-size: 11.5px; color: var(--ink-3); line-height: 1.5; }
.code-row { display: flex; gap: 8px; flex-wrap: nowrap; }
.field > .code-row > input { width: auto; flex: 1 1 0; min-width: 0; }
.code-row input { flex: 1 1 0; width: auto; min-width: 0; }
.code-btn { flex: 0 0 auto; height: 44px; padding: 0 12px; font-size: 12.5px; }
.agree { display: flex; align-items: flex-start; gap: 8px; margin: 4px 0 16px; font-size: 12px; color: var(--ink-2); line-height: 1.7; }
.agree input { margin: 3px 0 0; flex: 0 0 auto; }
.agree a { color: var(--accent); }
.auth-pane .btn.block { height: 44px; margin-top: 4px; }
.hint { min-height: 18px; margin: 10px 0 0; font-size: 12px; color: var(--danger); line-height: 1.5; }
.code-hint { margin: 6px 0 2px; min-height: 16px; }
.hint.ok { color: var(--success); }
.hint.error { color: var(--danger); }
.auth-switch { margin: 14px 0 0; font-size: 12px; color: var(--ink-3); text-align: center; }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes card-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* ---------- 资料页 ---------- */
.page-main { max-width: 1080px; margin: 0 auto; padding: 40px 24px 64px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.page-head h1 { font-family: var(--serif); font-size: 34px; font-weight: 500; line-height: 1.2; }
.page-head p { margin-top: 6px; font-size: 13px; color: var(--ink-3); }
.profile-grid { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 24px; align-items: start; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; }
.card-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
  padding: 20px 24px;
  border-bottom: 1px solid var(--line);
}
.card-head h2 { font-size: 16px; font-weight: 500; line-height: 1.4; }
.card-head p { margin-top: 3px; font-size: 12px; color: var(--ink-3); }
.card-body { padding: 24px; }
.account-card { position: sticky; top: 88px; padding: 24px; }
.account-top { display: flex; align-items: center; gap: 14px; }
.avatar {
  width: 60px; height: 60px; flex: 0 0 auto;
  display: grid; place-items: center;
  background: var(--accent); color: #fff;
  border-radius: 50%;
  font-family: var(--serif); font-size: 24px; line-height: 1;
  background-size: cover; background-position: center;
}
.account-name { font-family: var(--serif); font-size: 19px; font-weight: 500; line-height: 1.3; }
.account-phone { margin-top: 3px; font-size: 12px; color: var(--ink-3); font-family: var(--mono); }
.account-meta { margin-top: 20px; border-top: 1px solid var(--line); }
.account-meta div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.account-meta dt { color: var(--ink-3); }
.account-meta dd { color: var(--ink); text-align: right; }
.account-actions { margin-top: 20px; display: flex; flex-direction: column; gap: 8px; }
.profile-cards { display: flex; flex-direction: column; gap: 24px; }
.invite-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 20px; }
.invite-stat { padding: 14px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; }
.invite-stat span { display: block; font-size: 11.5px; color: var(--ink-3); }
.invite-stat b { display: block; margin-top: 4px; font-family: var(--serif); font-size: 24px; font-weight: 500; line-height: 1.1; font-variant-numeric: tabular-nums; }
.invite-form { display: flex; align-items: flex-end; gap: 8px; flex-wrap: wrap; }
.invite-form .field { margin: 0; min-width: 130px; }
.invite-form select {
  height: 40px; padding: 0 10px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  font-size: 13px;
  outline: none;
}
.invite-form .btn { height: 40px; }
.invite-help { margin-top: 10px; font-size: 12px; color: var(--ink-3); }
.invite-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 8px; margin-top: 16px; }
.invite-item {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 8px 10px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: .04em;
}
.invite-item.used { background: var(--surface-2); color: var(--ink-3); }
.invite-item button { border: 0; background: none; padding: 0; color: var(--accent); font-family: var(--sans); font-size: 11px; }
.invite-item button:hover { text-decoration: underline; }
.invite-item em { font-family: var(--sans); font-style: normal; font-size: 11px; color: var(--ink-3); }
.qq-card { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 24px; align-items: center; }
.qq-card figure { margin: 0; background: #fff; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.qq-card img { width: 100%; height: auto; }
.qq-label { font-size: 12px; color: var(--ink-3); }
.qq-number { margin: 6px 0 10px; font-family: var(--mono); font-size: 22px; font-weight: 500; letter-spacing: .02em; }
.qq-text { font-size: 13px; color: var(--ink-2); line-height: 1.8; }
.qq-actions { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.order-list { display: flex; flex-direction: column; }
.order-row { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.order-row:last-child { border-bottom: 0; }
.order-row .order-name { color: var(--ink); }
.order-row .order-time { font-size: 11px; color: var(--ink-3); }
.order-row b { margin-left: auto; font-weight: 500; font-variant-numeric: tabular-nums; }
.order-row i { font-style: normal; font-size: 11px; color: var(--ink-3); }
.empty { padding: 8px 0; font-size: 13px; color: var(--ink-3); }
.loading { padding: 24px 0; font-size: 13px; color: var(--ink-3); }

/* ---------- 作品库 ---------- */
.library-main { max-width: 1200px; margin: 0 auto; padding: 40px 24px 64px; }
.library-head h1 { font-family: var(--serif); font-size: 34px; font-weight: 500; line-height: 1.2; }
.library-sub { margin-top: 6px; font-size: 13px; color: var(--ink-3); }
.library-tools { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 24px 0 20px; flex-wrap: wrap; }
.search {
  display: flex; align-items: center; gap: 10px;
  height: 42px; padding: 0 12px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
}
.search span { font-size: 12px; color: var(--ink-3); }
.search input { width: 260px; border: 0; outline: none; background: transparent; font-size: 13px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  height: 34px; padding: 0 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 12px;
  color: var(--ink-2);
}
.chip.on { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.lib-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.lib-card {
  display: flex; flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}
.lib-card:hover { border-color: var(--line-strong); box-shadow: var(--shadow-sm); }
.lib-cover { position: relative; background: var(--raised); }
.lib-cover img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; }
.lib-rating {
  position: absolute; left: 10px; top: 10px;
  padding: 3px 7px;
  background: rgba(255, 255, 255, .94);
  border: 1px solid var(--line);
  border-radius: 4px;
  font-size: 10px;
  color: var(--ink-2);
}
.lib-body { padding: 14px 16px 16px; display: flex; flex-direction: column; flex: 1; }
.lib-meta { font-size: 11px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lib-body h2 { margin: 5px 0 6px; font-family: var(--serif); font-size: 18px; font-weight: 500; line-height: 1.35; }
.lib-sub { font-size: 12.5px; color: var(--ink-2); line-height: 1.6; min-height: 40px; }
.lib-foot { display: flex; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 10px; border-top: 1px solid var(--line); font-size: 11px; color: var(--ink-3); }
.lib-empty { padding: 32px 0; font-size: 13px; color: var(--ink-3); }
.lib-pager { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 28px; font-size: 12px; color: var(--ink-3); }
.pager { height: 34px; padding: 0 12px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 8px; font-size: 12px; }
.pager:disabled { opacity: .45; cursor: default; }

/* ---------- toast ---------- */
.site-toast {
  position: fixed; left: 50%; bottom: 28px; z-index: 120;
  transform: translate(-50%, 10px);
  padding: 10px 16px;
  background: var(--ink); color: var(--paper);
  border-radius: 8px;
  font-size: 13px;
  opacity: 0; pointer-events: none;
  transition: opacity .2s var(--ease), transform .2s var(--ease);
}
.site-toast.on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- 响应式 ---------- */
@media (max-width: 1040px) {
  .hero { grid-template-columns: minmax(0, 1fr) 380px; gap: 44px; }
  .works { grid-template-columns: 1fr; grid-template-rows: none; }
  .work-feature { grid-row: auto; grid-template-columns: 40% 1fr; }
  .work:not(.work-feature) { grid-template-columns: 132px 1fr; }
  .lib-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .header-inner { gap: 20px; }
  .nav-links { display: none; }
  .hero { grid-template-columns: 1fr; padding-top: 48px; gap: 36px; }
  .hero-copy { order: 1; }
  .hero-art { order: 2; max-width: 460px; }
  .hero h1 { font-size: clamp(38px, 9vw, 52px); }
  .feature-grid { grid-template-columns: 1fr 1fr; }
  .feature { padding: 20px 20px 0 0; }
  .feature:nth-child(2n) { border-right: 0; padding-left: 20px; }
  .feature:nth-child(n+3) { margin-top: 24px; }
  .price-grid { grid-template-columns: 1fr; }
  .price-card { padding: 24px; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .profile-grid { grid-template-columns: 1fr; }
  .account-card { position: static; }
  .lib-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  .header-inner { padding: 0 16px; height: 58px; }
  .brand-word { font-size: 16px; }
  .nav-actions { gap: 6px; }
  .nav-actions .btn { padding: 0 12px; height: 34px; font-size: 12.5px; }
  .hero { padding: 40px 16px 44px; }
  .hero-actions { align-items: stretch; }
  .hero-actions .btn { flex: 1; padding: 0 12px; }
  .hero-stats { margin-top: 28px; }
  .section { padding: 56px 16px; }
  .section-head { flex-direction: column; align-items: flex-start; gap: 8px; margin-bottom: 24px; }
  .section-note { text-align: left; }
  .work-feature { grid-template-columns: 1fr; }
  .work-feature .work-cover { min-height: 0; aspect-ratio: 16 / 10; }
  .work-feature .work-body { padding: 22px; }
  .work:not(.work-feature) { grid-template-columns: 104px 1fr; }
  .work-body { padding: 16px; }
  .work h3 { font-size: 17px; }
  .feature-grid { grid-template-columns: 1fr; }
  .feature { padding: 18px 0 0; border-right: 0; border-top: 1px solid var(--line); }
  .feature + .feature { padding-left: 0; }
  .feature:first-child { border-top: 0; padding-top: 0; }
  .feature:nth-child(n+3) { margin-top: 0; }
  .faq-list summary { padding-right: 28px; }
  .footer-inner { grid-template-columns: 1fr; gap: 28px; padding: 36px 16px 24px; }
  .footer-bottom { flex-direction: column; padding: 16px 16px 28px; }
  .page-main { padding: 28px 16px 48px; }
  .page-head { flex-direction: column; align-items: flex-start; gap: 10px; }
  .page-head h1 { font-size: 28px; }
  .card-head, .card-body { padding: 18px; }
  .invite-summary { gap: 8px; }
  .invite-stat { padding: 10px; }
  .invite-stat b { font-size: 20px; }
  .qq-card { grid-template-columns: 1fr; gap: 16px; }
  .qq-card figure { max-width: 220px; }
  .auth-card { padding: 22px; max-height: calc(100svh - 24px); }
  .auth-layer { padding: 12px; }
  .library-main { padding: 28px 16px 48px; }
  .library-tools { align-items: stretch; }
  .search { width: 100%; }
  .search span { flex: 0 0 auto; white-space: nowrap; }
  .search input { width: auto; flex: 1; min-width: 0; }
  .library-head h1 { font-size: 30px; text-wrap: balance; }
  .lib-grid { gap: 12px; }
  .lib-body { padding: 12px; }
  .lib-body h2 { font-size: 16px; }
  .lib-sub { font-size: 12px; min-height: 38px; }
}
@media (max-width: 400px) {
  .hero-actions { flex-direction: column; }
  /* 列方向时 flex:1 会把 flex-basis 当成高度，导致按钮只剩文字高度 */
  .hero-actions .btn { flex: 0 0 auto; height: 48px; min-height: 48px; }
}
@media (max-width: 360px) {
  .lib-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* 会员价格登录后可见 */
.pricing-lock {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  padding: 32px;
  background: var(--surface);
  border: 1px dashed var(--line-strong);
  border-radius: 16px;
}
.pricing-lock-copy h3 {
  margin: 6px 0 8px;
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 500;
  line-height: 1.3;
}
.pricing-lock-copy p {
  max-width: 36rem;
  color: var(--ink-2);
  font-size: 13.5px;
  line-height: 1.8;
}
.pricing-lock .price-name { color: var(--seal); }
.pricing-lock-actions { display: flex; gap: 8px; flex: 0 0 auto; }
@media (max-width: 760px) {
  .pricing-lock { flex-direction: column; align-items: flex-start; gap: 20px; padding: 24px; }
  .pricing-lock-actions { width: 100%; }
  .pricing-lock-actions .btn { flex: 1; }
}
