/* ============================================================
   焠知 · 网页端样式 v2
   设计方向：E-Ink Paper × Swiss Modernism × 东方藏书票
   - 暖纸底 + 深墨 + 黄铜金（铜绿收益 / 赭红花费）
   - 杂志级排版（Libre Bodoni 标题 + Public Sans 正文）
   - 瑞士网格布局 + 不对称留白
   - 藏书票封面系统（每篇图文有独特封面卡片）
   - 克制动画（仅微交互 + 滚动揭示）
   ============================================================ */

/* ---- 字体引入 ---- */
@import url('https://fonts.googleapis.com/css2?family=Libre+Bodoni:wght@400;500;600;700&family=Public+Sans:wght@300;400;500;600;700&display=swap');

/* ---- 工具类 ---- */
.hidden { display: none !important; }

:root {
  /* 暖纸底色体系 */
  --paper:      #F9F6F0;
  --paper-2:    #F0EADB;
  --paper-3:    #E6DDC8;
  --ink:        #1C1A16;
  --ink-2:      #5C5546;
  --ink-3:      #9B907A;

  /* 黄铜金（主强调色） */
  --brass:      #B98A34;
  --brass-2:    #8F6721;
  --brass-soft: #F0E3C0;

  /* 铜绿（收益/增长） */
  --verdigris:      #3E7A5F;
  --verdigris-soft: #DDE8E0;

  /* 赭红（花费/警告） */
  --ember:      #B84A3A;
  --ember-soft: #F3DED8;

  /* 形状 */
  --radius: 16px;
  --radius-sm: 10px;
  --radius-xs: 6px;

  /* 边框 */
  --hair: rgba(28, 26, 22, .10);
  --hair-strong: rgba(28, 26, 22, .18);

  /* 阴影 */
  --shadow-sm: 0 1px 3px rgba(28, 26, 22, .06);
  --shadow:    0 2px 12px rgba(28, 26, 22, .07), 0 8px 24px rgba(28, 26, 22, .08);
  --shadow-lg: 0 4px 20px rgba(28, 26, 22, .10), 0 16px 48px rgba(28, 26, 22, .12);

  /* 字体 */
  --font-sans:  "Public Sans", -apple-system, "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif;
  --font-serif: "Libre Bodoni", "Songti SC", "STSong", "SimSun", serif;
  --font-song:  "Songti SC", "STSong", "SimSun", serif;
}

/* ---------- 基础 ---------- */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }

body {
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--brass-soft); color: var(--ink); }

:focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: 2px;
  border-radius: var(--radius-xs);
}

button {
  font-family: inherit;
  cursor: pointer;
  border: 0;
  background: none;
}

input, textarea, select {
  font-family: inherit;
  font-size: inherit;
}

a { color: inherit; text-decoration: none; }

/* ---- 图标 ---- */
.ico {
  width: 1em; height: 1em;
  display: inline-block;
  vertical-align: -0.14em;
  flex: none;
}

.coin-ico {
  width: 1em; height: 1em;
  display: inline-block;
  vertical-align: -0.14em;
}

/* ---- 成色徽章 ---- */
.grade {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 10px; font-weight: 600; padding: 3px 10px;
  border-radius: 999px; letter-spacing: .04em; margin-left: 8px;
  text-transform: uppercase;
}
.grade .coin-ico { width: 10px; height: 10px; }
.grade-gold   { background: var(--brass-soft); color: var(--brass-2); }
.grade-silver { background: #E7E8E4; color: #6A6F63; }
.grade-bronze { background: #EFE0CE; color: #A9763C; }

/* ---------- 通用按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 10px 20px;
  font-size: 14px; font-weight: 600;
  border: 0; border-radius: 999px;
  cursor: pointer;
  transition:
    transform .18s cubic-bezier(.22,.68,.4,1),
    box-shadow .18s ease,
    background .18s ease,
    color .18s ease,
    border-color .18s ease;
  letter-spacing: .01em;
}
.btn:active { transform: scale(.96); }
.btn:disabled { opacity: .45; cursor: not-allowed; pointer-events: none; }

.btn-primary {
  background: var(--brass);
  color: #FFFCF4;
  box-shadow: 0 2px 8px rgba(143, 103, 33, .28);
}
.btn-primary:hover {
  background: var(--brass-2);
  box-shadow: 0 4px 14px rgba(143, 103, 33, .36);
}

.btn-ghost {
  background: transparent;
  color: var(--ink-2);
  border: 1.5px solid var(--hair-strong);
}
.btn-ghost:hover {
  border-color: var(--brass);
  color: var(--brass-2);
  background: var(--brass-soft);
}

.btn-ink {
  background: var(--ink);
  color: var(--paper);
}
.btn-ink:hover { opacity: .88; }

.btn-block { display: flex; width: 100%; }
.btn-sm { padding: 6px 14px; font-size: 12px; }

/* ============================================================
   登录页
   ============================================================ */
.login-view {
  min-height: 100vh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, var(--brass-soft) 0%, transparent 55%),
    radial-gradient(ellipse 60% 40% at 50% 100%, rgba(62, 122, 95, .06) 0%, transparent 50%),
    var(--paper);
  padding: 24px;
}

.login-stage {
  width: 100%; max-width: 380px;
  display: flex; flex-direction: column; align-items: center;
}

/* 铜币动画 */
.login-coin {
  width: 88px; height: 88px;
  color: var(--brass);
  filter: drop-shadow(0 8px 20px rgba(143, 103, 33, .24));
  animation: coinIn 1.0s cubic-bezier(.2,.7,.2,1) both;
}
.login-coin .ico-coin { width: 100%; height: 100%; }

@keyframes coinIn {
  from { transform: translateY(28px) scale(.78); opacity: 0; }
  to   { transform: translateY(0) scale(1); opacity: 1; }
}

.login-brand {
  margin-top: 28px;
  font-family: var(--font-song);
  font-size: 48px; font-weight: 600;
  letter-spacing: .2em; color: var(--ink);
  animation: rise .8s .1s cubic-bezier(.2,.7,.2,1) both;
}

.login-tagline {
  margin-top: 10px;
  font-size: 13px; font-weight: 500;
  letter-spacing: .3em; color: var(--ink-2);
  animation: rise .8s .18s cubic-bezier(.2,.7,.2,1) both;
}

@keyframes rise {
  from { transform: translateY(16px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}

.login-card {
  margin-top: 36px;
  width: 100%; text-align: center;
}

/* 登录表单 */
#sms-form {
  display: flex; flex-direction: column; gap: 14px;
  text-align: left;
}

.field {
  display: flex; flex-direction: column; gap: 6px;
}
.field > span {
  font-size: 12px; font-weight: 700;
  color: var(--ink-2); letter-spacing: .05em;
  text-transform: uppercase;
}

.field input {
  height: 48px; border-radius: var(--radius-sm);
  border: 1.5px solid var(--hair);
  background: #FFFCF4;
  padding: 0 16px; font-size: 15px; outline: none;
  color: var(--ink);
  transition: border-color .18s ease, box-shadow .18s ease;
}
.field input:focus {
  border-color: var(--brass);
  box-shadow: 0 0 0 3px rgba(185, 138, 52, .12);
}

.code-row {
  display: flex; gap: 10px;
}
.code-row input { flex: 1; }
.code-row .code-btn {
  padding: 0 18px; font-size: 12px; white-space: nowrap; flex: none;
  font-weight: 600;
}

.login-error {
  min-height: 20px; font-size: 12px; font-weight: 500;
  color: var(--ember); text-align: center;
}

.login-hint {
  margin-top: 24px;
  font-size: 11px; color: var(--ink-3);
  letter-spacing: .04em; line-height: 1.7;
}

/* ============================================================
   主应用布局
   ============================================================ */
.app {
  min-height: 100vh;
  background: var(--paper);
  display: flex; flex-direction: column;
}

#page {
  flex: 1;
  width: 100%;
}

/* 顶栏 —— 三栏栅格，与内容同中心线（1440） */
.topnav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(249, 246, 240, .88);
  backdrop-filter: blur(12px) saturate(.8);
  -webkit-backdrop-filter: blur(12px) saturate(.8);
  border-bottom: 1px solid var(--hair);
}
.topnav-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 480px) minmax(0, 1fr);
  align-items: center;
  column-gap: 20px;
  padding: 12px 24px;
  max-width: 1440px; margin: 0 auto;
}

.topnav-inner .brand {
  display: inline-flex; align-items: center; gap: 9px;
  cursor: pointer;
  justify-self: start;
  min-width: 0;
}
/* 顶栏 logo —— 线稿铜钱，直接呼应登录页大钱 */
.topnav-inner .brand-mark {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center;
  flex: none;
  width: 34px; height: 34px;
  color: var(--brass);
  transition: transform .28s cubic-bezier(.22,.68,.4,1), color .18s ease;
}
.topnav-inner .brand-mark .brand-coin {
  width: 100%; height: 100%;
}
/* 铜钱 hover 时变深金 + 微旋转 */
.topnav-inner .brand:hover .brand-mark {
  transform: rotate(-10deg) scale(1.06);
  color: var(--brass-2);
}
.topnav-inner .brand-name {
  font-family: var(--font-song);
  font-size: 20px; font-weight: 600;
  letter-spacing: .1em; color: var(--ink);
  white-space: nowrap;
}

.topnav-inner .search {
  justify-self: center;
  width: 100%;
  display: flex; align-items: center; gap: 9px;
  background: var(--paper-2);
  border: 1px solid var(--hair);
  border-radius: 999px;
  padding: 0 15px;
  height: 38px;
  color: var(--ink-3); font-size: 13px;
  transition: border-color .18s, box-shadow .18s, background .18s;
}
.topnav-inner .search:hover { border-color: var(--hair-strong); }
.topnav-inner .search:focus-within {
  border-color: var(--brass);
  background: #FFFCF4;
  box-shadow: 0 0 0 3px rgba(185, 138, 52, .10);
}
.topnav-inner .search .ico { width: 15px; height: 15px; flex: none; }
.topnav-inner .search-icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  border: 0; background: transparent; padding: 0; margin: 0;
  color: inherit; cursor: pointer;
}
.topnav-inner .search input {
  flex: 1; min-width: 0;
  border: 0; background: transparent; outline: none;
  font-size: 13px; color: var(--ink);
  height: 100%;
}
.topnav-inner .search input::placeholder { color: var(--ink-3); }
.topnav-inner .search-soon {
  font-size: 10px; font-weight: 600;
  color: var(--brass-2);
  background: var(--brass-soft);
  padding: 3px 9px;
  border-radius: 999px;
  flex: none;
  letter-spacing: .04em;
}

.topnav-user { display: flex; align-items: center; justify-content: flex-end; min-width: 0; }
.topnav-user .user-chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 4px 13px 4px 4px;
  border-radius: 999px;
  font-size: 13px; font-weight: 500;
  color: var(--ink-2); cursor: pointer;
  border: 1px solid transparent;
  transition: background .18s, border-color .18s, box-shadow .18s;
  max-width: 100%;
  min-width: 0;
}
.topnav-user .user-chip:hover {
  background: #FFFCF4;
  border-color: var(--hair);
  box-shadow: var(--shadow-sm);
}
.topnav-user .user-chip .avatar {
  flex: none;
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--brass-soft); color: var(--brass-2);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-song); font-weight: 600; font-size: 14px;
  border: 2px solid #FFFCF4;
  box-shadow: 0 1px 4px rgba(28, 26, 22, .10);
}
.topnav-user .user-name {
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

/* ============================================================
   推荐流（feed）—— 藏书票卡片网格
   ============================================================ */
.feed-head {
  display: flex; align-items: center; gap: 16px;
  padding: 22px 24px 10px;
  max-width: 1440px; margin: 0 auto;
}
.search-head {
  font-size: 16px; font-weight: 600;
  color: var(--ink);
}

/* 分类 chips */
.chips {
  display: flex; gap: 8px;
  overflow-x: auto;
  flex: 1;
  scrollbar-width: none;
  padding-bottom: 4px;
}
.chips::-webkit-scrollbar { display: none; }

.chips .chip {
  flex: none;
  font-size: 13px; font-weight: 600;
  color: var(--ink-2);
  background: var(--paper-2);
  border: 1.5px solid transparent;
  border-radius: 999px;
  padding: 7px 16px;
  white-space: nowrap;
  cursor: pointer;
  font-family: inherit;
  transition: all .2s ease;
}
.chips .chip.active {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}
.chips .chip:hover:not(.active) {
  border-color: var(--brass);
  color: var(--brass-2);
  background: var(--brass-soft);
}

/* ============================================================
   标签体系（一期新增）
   —— 全部复用既有 token 与 .chips .chip 视觉，不引入新的设计语言
   ============================================================ */

/* feed 顶部标题：分类 chips 下线后，feed-head 只留一个标题位 */
.feed-label {
  flex: none;
  white-space: nowrap;
  font-size: 16px; font-weight: 600;
  color: var(--ink);
}
/* 标题与排序同行时，标题不被压缩 */
.feed-head .search-head { flex: none; white-space: nowrap; }
/* 次级行（如搜索页的标签筛选条）收紧上边距，避免两行 feed-head 之间空太大 */
.feed-head.is-sub { padding-top: 2px; }

/* 排序 / 筛选 chip 里的移除符号 */
.chips .chip .chip-x {
  margin-left: 6px;
  font-size: 14px; line-height: 1;
  opacity: .65;
}
.chips .chip.active .chip-x:hover { opacity: 1; }

/* 卡片封面上的标签排 —— 沿用 .cat-tag 的形制，改为横向排列 */
.pin-cover .tag-row {
  position: absolute; left: 10px; right: 10px; bottom: 10px;
  display: flex; gap: 6px;
  overflow: hidden;
}
.pin-cover .tag-row .cat-tag {
  position: static;
  flex: none;
  cursor: pointer;
  transition: background .18s ease, color .18s ease;
}
.pin-cover .tag-row .cat-tag:hover {
  background: var(--brass-soft);
  color: var(--brass-2);
}

/* 详情页标签区 */
.post-tags {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin: 14px 0 2px;
}
.post-tags .tag-chip {
  font-size: 12px; font-weight: 600;
  color: var(--brass-2);
  background: var(--brass-soft);
  border: 1.5px solid transparent;
  border-radius: 999px;
  padding: 5px 14px;
  cursor: pointer;
  font-family: inherit;
  transition: all .2s ease;
}
.post-tags .tag-chip:hover {
  border-color: var(--brass);
  color: var(--paper);
  background: var(--brass);
}

/* 写文页标签输入 */
.tag-input-row {
  display: flex; gap: 8px; align-items: center;
}
.tag-input-row .input { flex: 1; }
.tag-editor {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-top: 10px;
}
.tag-editor:empty { margin-top: 0; }
.tag-editor .tag-pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 600;
  color: var(--ink-2);
  background: var(--paper-2);
  border: 1.5px solid transparent;
  border-radius: 999px;
  padding: 5px 8px 5px 12px;
}
.tag-editor .tag-pill button {
  border: 0; background: none; cursor: pointer;
  color: inherit; opacity: .6;
  font-size: 14px; line-height: 1;
  padding: 0 2px;
}
.tag-editor .tag-pill button:hover { opacity: 1; color: var(--ember); }
.tag-hint {
  margin-top: 8px;
  font-size: 12px; color: var(--ink-3);
}
.tag-hint.is-bad { color: var(--ember); }

/* 标签聚合页标题 */
.tag-hero {
  display: flex; align-items: baseline; gap: 10px;
  padding: 22px 24px 6px;
  max-width: 1440px; margin: 0 auto;
}
.tag-hero .back-link { margin-right: 6px; }
.tag-hero .tag-hero-name {
  font-family: var(--font-song);
  font-size: 22px; font-weight: 600;
  color: var(--ink);
}
.tag-hero .tag-hero-name::before {
  content: "#";
  margin-right: 2px;
  font-family: var(--font-sans);
  font-weight: 700;
  color: var(--brass);
}
.tag-hero .tag-hero-count {
  font-size: 12px; color: var(--ink-3);
}

/* ============================================================
   关注 / 去重式内容流 / 作者主页（二期新增）
   —— 同样只复用既有 token 与 .chip / .feed-grid 形制
   ============================================================ */

/* feed 三主入口 + 刷新按钮 */
.feed-tabs { flex: 1; }
#feed-refresh { flex: none; }

/* 下拉刷新提示（仅在 armed 时浮现，桌面端不显示） */
.feed-pull {
  position: fixed; top: 70px; left: 50%;
  transform: translate(-50%, -12px);
  opacity: 0; pointer-events: none;
  font-size: 12px; font-weight: 600;
  color: var(--paper);
  background: var(--ink);
  border-radius: 999px;
  padding: 6px 16px;
  transition: opacity .2s ease, transform .2s ease;
  z-index: 40;
}
.feed-pull.on { opacity: .92; transform: translate(-50%, 0); }

/* 触底加载哨兵 / 到底提示 */
.feed-more {
  min-height: 28px;
  padding: 4px 0 60px;
  text-align: center;
  font-size: 12px;
  color: var(--ink-3);
}

/* 作者主页 */
.author-view {
  max-width: 1440px; margin: 0 auto;
  padding: 24px 24px 0;
}
.author-view .feed-grid { padding-left: 0; padding-right: 0; }
.author-head {
  display: flex; align-items: flex-start; gap: 14px;
  margin: 14px 0 10px;
}
.author-head .author-avatar {
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--paper-2); color: var(--ink-2);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-song); font-size: 22px; flex: none;
  overflow: hidden;
}
.author-head .author-avatar img { width: 100%; height: 100%; object-fit: cover; }
.author-main { flex: 1; min-width: 0; }
.author-name {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--font-song);
  font-size: 18px; font-weight: 600;
  color: var(--ink);
}
.author-tag {
  font-family: var(--font-sans);
  font-size: 10px; font-weight: 700;
  color: var(--brass-2);
  background: var(--brass-soft);
  border-radius: 999px; padding: 2px 8px;
}
.author-bio { margin-top: 4px; font-size: 13px; color: var(--ink-2); }
.author-stats { margin-top: 6px; font-size: 12px; color: var(--ink-3); }
.author-stats b { color: var(--ink-2); }

/* 我的主页：关注 / 粉丝 */
.pfollow { margin-top: 6px; font-size: 12px; color: var(--ink-3); }
.pfollow b { color: var(--ink-2); }

/* 图文详情页作者行里的关注按钮 */
.post-author .post-follow { margin-left: auto; flex: none; }

/* 瀑布流 */
.feed-grid {
  columns: 5; column-gap: 16px;
  padding: 14px 24px 80px;
  max-width: 1440px; margin: 0 auto;
}
@media (max-width: 1280px) { .feed-grid { columns: 4; column-gap: 14px; } }
@media (max-width: 1000px) { .feed-grid { columns: 3; column-gap: 12px; } }
@media (max-width: 640px)  { .feed-grid { columns: 2; column-gap: 10px; padding: 10px 14px 80px; } }

/* 藏书票卡片 */
.pin {
  break-inside: avoid; margin-bottom: 18px;
  border: 1px solid var(--hair);
  border-radius: var(--radius);
  background: #FFFCF4;
  overflow: hidden;
  cursor: pointer;
  transition:
    transform .28s cubic-bezier(.22,.68,.4,1),
    box-shadow .28s ease,
    border-color .28s ease;
  position: relative;
  will-change: transform;
}
.pin:hover {
  transform: translateY(-4px);
  border-color: var(--hair-strong);
  box-shadow:
    0 2px 6px rgba(28, 26, 22, .05),
    0 12px 28px rgba(28, 26, 22, .10),
    0 24px 48px rgba(143, 103, 33, .06);
}
.pin:active { transform: translateY(-2px) scale(.99); transition-duration: .1s; }
/* 悬浮时大字水印轻微放大 —— 翻页感 */
.pin:hover .bigchar { transform: scale(1.04); }
.pin .bigchar { transition: transform .32s cubic-bezier(.22,.68,.4,1); }

/* 封面区域 —— 高度由 JS inline 决定（瀑布流错落），宽高比不再由 CSS 控制 */
.pin-cover {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  background: var(--paper-2);
  width: 100%;
  min-height: 120px;
}
.pin-cover::after {
  /* 顶光 —— 让纯色的封面像一张有厚度的纸 */
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(255, 252, 244, .5), rgba(255, 252, 244, 0) 40%);
  pointer-events: none;
}
.pin-cover img {
  width: 100%; height: 100%; object-fit: cover;
}

/* 装饰铜币水印 */
.pin-cover .pin-coin-bg {
  position: absolute;
  top: -14px; right: -12px;
  width: 64px; height: 64px;
  color: var(--brass);
  opacity: .12;
  transform: rotate(-6deg);
}

/* 大字水印 —— 占据封面视觉中心 */
.pin-cover .bigchar {
  position: relative;
  z-index: 1;
  font-family: var(--font-song);
  font-size: clamp(44px, 4.5vw, 72px);
  font-weight: 600;
  color: rgba(28, 26, 22, .14);
  line-height: 1;
  user-select: none;
  pointer-events: none;
  text-shadow: 0 1px 0 rgba(255, 252, 244, .5);
  letter-spacing: .02em;
}

/* 分类标签 */
.pin-cover .cat-tag {
  position: absolute; left: 10px; bottom: 10px;
  font-size: 10px; font-weight: 600;
  color: var(--ink-2);
  background: rgba(255, 252, 244, .88);
  backdrop-filter: blur(4px);
  border-radius: 999px; padding: 3px 10px;
  letter-spacing: .02em;
}

/* 付费标签 */
.pin-cover .lock-tag {
  position: absolute; right: 10px; bottom: 10px;
  display: flex; align-items: center; gap: 4px;
  font-size: 10px; font-weight: 700;
  color: var(--brass-2);
  background: rgba(240, 227, 192, .92);
  backdrop-filter: blur(4px);
  border-radius: 999px; padding: 3px 10px;
}

/* 卡片内容 */
.pin-body { padding: 12px 14px 14px; }

.pin-title {
  font-size: 13px; font-weight: 600;
  line-height: 1.5; color: var(--ink);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.pin-meta {
  margin-top: 10px;
  display: flex; align-items: center; gap: 7px;
  font-size: 11px; color: var(--ink-3);
}

.pin-meta .avatar {
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--paper-2); color: var(--ink-2);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-song); font-size: 10px; flex: none;
  border: 1.5px solid #FFFCF4;
}

.pin-meta .name {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-weight: 500;
}

.pin-meta .paid {
  font-size: 10px; font-weight: 700;
  color: var(--brass-2);
  background: var(--brass-soft);
  border-radius: 999px; padding: 2px 7px;
  letter-spacing: .02em;
}

.pin-meta .like {
  margin-left: auto;
  display: flex; align-items: center; gap: 3px;
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
  flex: none;
  font-weight: 500;
}
.pin-meta .like svg { width: 13px; height: 13px; }
.pin-meta .like.on { color: var(--ember); }
.pin-meta .like.on svg { color: var(--ember); fill: var(--ember); }

/* 封面配色（藏书票占位） */
.cover-paper     { background: linear-gradient(135deg, #F0EADB 0%, #E6DDC8 100%); }
.cover-brass     { background: linear-gradient(135deg, #F0E3C0 0%, #E4D09C 100%); }
.cover-verdigris { background: linear-gradient(135deg, #DDE8E0 0%, #C8D8CC 100%); }
.cover-ember     { background: linear-gradient(135deg, #F3DED8 0%, #EAC8BE 100%); }

/* ============================================================
   文章详情页
   ============================================================ */
.post-view {
  max-width: 700px; margin: 0 auto;
  padding: 28px 24px 100px;
}

.back-link {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 500;
  color: var(--ink-2); cursor: pointer;
  margin-bottom: 20px;
  padding: 6px 12px;
  border-radius: 999px;
  transition: background .18s, color .18s;
}
.back-link:hover {
  background: var(--paper-2);
  color: var(--brass-2);
}
.back-link .ico { width: 16px; height: 16px; }

.post-head {
  padding: 24px 0 20px;
}
.post-head .post-title {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 28px; font-weight: 600;
  line-height: 1.3; color: var(--ink);
  letter-spacing: -.01em;
}
.post-head .post-author {
  display: flex; align-items: center; gap: 12px;
  margin-top: 20px;
  font-size: 14px; color: var(--ink-2);
}
.post-head .post-author .avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--brass-soft); color: var(--brass-2);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-song); font-weight: 600; font-size: 17px;
  border: 2px solid #FFFCF4;
  box-shadow: 0 2px 6px rgba(28, 26, 22, .12);
  flex: none;
}
.post-head .post-author .pname {
  font-weight: 700; color: var(--ink);
}

/* 文章封面 */
.post-cover {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  margin-bottom: 24px;
  border: 1px solid var(--hair);
}
.post-cover .bigchar {
  font-family: var(--font-song);
  font-size: clamp(64px, 9vw, 96px);
  font-weight: 600;
  color: rgba(28, 26, 22, .14);
  line-height: 1;
  user-select: none;
  text-shadow: 0 1px 0 rgba(255, 252, 244, .5);
}
.post-cover .post-cover-img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.post-cover .cover-tag {
  position: absolute;
  bottom: 14px; right: 14px;
  font-size: 12px; font-weight: 700;
  color: var(--brass-2);
  background: rgba(240, 227, 192, .92);
  backdrop-filter: blur(4px);
  border-radius: 999px; padding: 5px 14px;
  letter-spacing: .02em;
}

/* 统计条 */
.pstats {
  display: flex; gap: 24px;
  padding: 14px 0;
  font-size: 13px; color: var(--ink-2);
  border-bottom: 1px solid var(--hair);
  margin-bottom: 24px;
}
.pstats span b {
  font-weight: 700; color: var(--ink);
  margin-left: 5px;
  font-variant-numeric: tabular-nums;
}

/* 付费锁 */
.lockcard {
  text-align: center;
  padding: 48px 24px;
  background: linear-gradient(180deg, rgba(255, 252, 244, .2) 0%, rgba(255, 252, 244, .96) 45%);
  border: 1px solid var(--hair);
  border-radius: var(--radius);
}
.lockcard .lock-pill {
  display: inline-block;
  font-size: 11px; font-weight: 700;
  color: var(--brass-2);
  background: var(--brass-soft);
  border-radius: 999px; padding: 5px 14px;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.lockcard .lock-title {
  margin-top: 14px;
  font-size: 16px; font-weight: 600;
  color: var(--ink);
}
.lockcard .lock-price {
  margin-top: 16px;
  display: flex; align-items: baseline;
  justify-content: center; gap: 6px;
}
.lockcard .lock-price .num {
  font-family: var(--font-serif);
  font-size: 40px; font-weight: 700;
  color: var(--brass);
  line-height: 1;
}
.lockcard .lock-price .unit {
  font-size: 14px; font-weight: 500;
  color: var(--ink-2);
}
.lockcard .lock-bal {
  margin-top: 10px;
  font-size: 12px; color: var(--ink-3);
}
.lockcard .unlock-btn {
  margin-top: 24px;
  padding: 13px 44px;
  font-size: 15px; letter-spacing: .08em;
}

/* 正文内容 */
.content {
  padding: 8px 0 32px;
}
.content .cpara {
  margin: 20px 0;
  font-size: 16px;
  line-height: 1.85;
  color: var(--ink);
  white-space: pre-wrap;
  font-family: var(--font-sans);
}
.content .cimg {
  width: 100%;
  border-radius: var(--radius-sm);
  display: block;
  margin: 20px 0;
}

/* 底部操作栏 */
.actionbar {
  display: flex; align-items: center; gap: 10px;
  padding: 18px 0 0;
  border-top: 1px solid var(--hair);
}
.actionbar .act {
  display: flex; align-items: center; gap: 6px;
  background: var(--paper-2);
  border: 1.5px solid transparent;
  border-radius: 999px;
  padding: 9px 18px;
  font-size: 13px; font-weight: 600;
  color: var(--ink-2);
  cursor: pointer;
  font-family: inherit;
  transition: all .18s ease;
}
.actionbar .act:hover {
  border-color: var(--brass);
  background: var(--brass-soft);
  color: var(--brass-2);
}
.actionbar .act .ico { width: 16px; height: 16px; }
.actionbar .act.on {
  color: var(--ember);
  background: var(--ember-soft);
  border-color: transparent;
}
.actionbar .act.on svg { fill: var(--ember); }

/* ============================================================
   个人页
   ============================================================ */
.profile-view {
  max-width: 700px; margin: 0 auto;
  padding: 0 24px 100px;
}

/* 头部 */
.phead {
  padding: 32px 0 24px;
  background:
    radial-gradient(ellipse 100% 80% at 50% 0%, var(--brass-soft) 0%, transparent 55%);
}
.phead .prow {
  display: flex; align-items: center; gap: 18px;
}
.phead .prow .avatar {
  width: 72px; height: 72px; border-radius: 50%;
  background: var(--brass-soft); color: var(--brass-2);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-song); font-size: 30px; font-weight: 600;
  border: 3px solid #FFFCF4;
  box-shadow: var(--shadow);
  flex: none;
}
.phead .pname {
  font-size: 22px; font-weight: 700;
  color: var(--ink);
  display: flex; align-items: center;
}
.phead .pdomain {
  margin-top: 6px;
  font-size: 13px; font-weight: 500;
  color: var(--ink-2);
  letter-spacing: .02em;
}
.phead .pbio {
  margin-top: 16px;
  font-size: 14px; line-height: 1.65;
  color: var(--ink-2);
  max-width: 480px;
}
.phead .edit-profile-btn {
  margin-top: 14px;
  padding: 6px 16px; font-size: 12px;
}

/* 钱包卡片 */
.wallet {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--ink);
  color: var(--paper);
  border-radius: var(--radius);
  padding: 18px 22px;
  box-shadow: var(--shadow);
  margin-top: 20px;
}
.wallet .bal {
  display: flex; align-items: baseline; gap: 8px;
}
.wallet .bal .num {
  font-family: var(--font-serif);
  font-size: 30px; font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: #FFFCF4;
  line-height: 1;
}
.wallet .bal .unit {
  font-size: 12px; font-weight: 500;
  color: rgba(255, 252, 244, .55);
}
.wallet .actions { display: flex; gap: 10px; }
.wallet .btn-recharge {
  background: var(--brass);
  color: #FFFCF4;
  padding: 9px 18px; font-size: 13px;
  box-shadow: 0 2px 6px rgba(0,0,0,.2);
}
.wallet .btn-recharge:hover { background: var(--brass-2); }
.wallet .btn-cashout {
  background: transparent;
  color: var(--paper);
  border: 1.5px solid rgba(249, 246, 240, .35);
  padding: 9px 18px; font-size: 13px;
}
.wallet .btn-cashout:hover {
  border-color: rgba(249, 246, 240, .6);
  background: rgba(255,255,255,.06);
}

/* 统计行 */
.statrow {
  display: flex;
  margin-top: 20px;
  padding: 16px 0;
  border-top: 1px solid var(--hair);
  border-bottom: 1px solid var(--hair);
}
.statrow .stat {
  flex: 1; text-align: center;
}
.statrow .stat .num {
  font-family: var(--font-serif);
  font-size: 20px; font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  line-height: 1;
}
.statrow .stat .lbl {
  margin-top: 5px;
  font-size: 11px; font-weight: 500;
  color: var(--ink-3);
  letter-spacing: .04em;
}

/* 区块 */
.section {
  padding: 26px 0 0;
}
.section .section-head {
  display: flex; align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.section .section-title {
  font-size: 17px; font-weight: 700;
  color: var(--ink);
}
.section .section-more {
  font-size: 12px; font-weight: 500;
  color: var(--ink-3);
  cursor: pointer;
  transition: color .15s;
}
.section .section-more:hover { color: var(--brass-2); }

/* 账本 */
.ledger {
  border: 1px solid var(--hair);
  border-radius: var(--radius);
  background: #FFFCF4;
  overflow: hidden;
}
.ledger .lrow {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 16px;
  border-top: 1px solid var(--hair);
  transition: background .15s;
}
.ledger .lrow:first-child { border-top: 0; }
.ledger .lrow:hover { background: rgba(240, 227, 192, .15); }
.ledger .lrow .lico {
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex: none;
}
.ledger .lrow .lico svg { width: 15px; height: 15px; }
.ledger .lrow .lico.in  { background: var(--verdigris-soft); color: var(--verdigris); }
.ledger .lrow .lico.out { background: var(--ember-soft); color: var(--ember); }
.ledger .lrow .lmain { flex: 1; min-width: 0; }
.ledger .lrow .ltitle {
  font-size: 13px; font-weight: 600;
  color: var(--ink);
}
.ledger .lrow .lmeta {
  font-size: 11px; color: var(--ink-3);
  margin-top: 3px;
}
.ledger .lrow .lamt {
  font-variant-numeric: tabular-nums;
  font-weight: 700; font-size: 14px;
  flex: none;
}
.ledger .lrow .lamt.in  { color: var(--verdigris); }
.ledger .lrow .lamt.out { color: var(--ember); }

/* 写作入口 */
.write-cta {
  display: flex; align-items: center; gap: 14px;
  border: 1.5px dashed var(--hair-strong);
  border-radius: var(--radius);
  padding: 16px 18px;
  background: linear-gradient(135deg, var(--brass-soft) 0%, rgba(240, 227, 192, .3) 100%);
  cursor: pointer;
  margin-top: 24px;
  transition: border-color .18s, box-shadow .18s;
}
.write-cta:hover {
  border-color: var(--brass);
  box-shadow: var(--shadow-sm);
}
.write-cta .plus {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--brass);
  color: #FFFCF4;
  display: flex; align-items: center; justify-content: center;
  flex: none;
  box-shadow: 0 2px 8px rgba(143, 103, 33, .28);
}
.write-cta .plus svg { width: 18px; height: 18px; }
.write-cta .wt { flex: 1; }
.write-cta .wt .a {
  font-size: 14px; font-weight: 700;
  color: var(--brass-2);
}
.write-cta .wt .b {
  font-size: 11px; color: var(--ink-2);
  margin-top: 3px;
}

/* 作品列表 */
.works { margin-top: 0; }
.work {
  position: relative;
  display: flex; gap: 14px;
  padding: 14px;
  border: 1px solid var(--hair);
  border-radius: var(--radius);
  background: #FFFCF4;
  margin-bottom: 12px;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease;
}
.work:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}
.work .cover {
  flex: none;
  width: 72px; height: 72px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  background: var(--paper-2);
}
.work .cover img {
  width: 100%; height: 100%; object-fit: cover;
}
.work .cover .bigchar {
  font-family: var(--font-song);
  font-size: 30px;
  font-weight: 600;
  color: rgba(28, 26, 22, .16);
  text-shadow: 0 1px 0 rgba(255, 252, 244, .5);
}
.work .main { flex: 1; min-width: 0; }
.work .main .title {
  font-size: 14px; font-weight: 700;
  line-height: 1.4; color: var(--ink);
}
.work .earn {
  margin-top: 8px;
  display: flex; align-items: center; gap: 5px;
  font-size: 12px; color: var(--verdigris);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.work .status-tag {
  display: inline-block; margin-top: 5px;
  font-size: 10px; font-weight: 600;
  color: var(--ink-3);
  border: 1px solid var(--hair);
  border-radius: 999px; padding: 2px 8px;
  letter-spacing: .02em;
}
.work .status-tag.revision { color: var(--ember); border-color: rgba(184, 74, 58, .35); background: rgba(184, 74, 58, .06); }
.work-note { margin-top: 6px; font-size: 11px; line-height: 1.45; color: var(--ember); }
.work .work-del {
  position: absolute; top: 8px; right: 10px;
  width: 26px; height: 26px; border-radius: 50%;
  background: transparent;
  color: var(--ink-3);
  border: 0; font-size: 16px; line-height: 1;
  cursor: pointer;
  transition: all .15s ease;
  display: flex; align-items: center; justify-content: center;
}
.work .work-del:hover {
  background: var(--ember);
  color: #fff;
}
/* 已发布作品的「修改」按钮：放在作品信息底部，金色描边胶囊，与右上角删除×不重叠 */
.work .work-edit {
  margin-top: 9px;
  padding: 4px 16px;
  border-radius: 999px;
  border: 1px solid var(--brass);
  background: transparent;
  color: var(--brass-2);
  font-size: 12px; font-weight: 600;
  cursor: pointer;
  transition: all .15s ease;
}
.work .work-edit:hover { background: var(--brass); color: #fff; }

/* 退出按钮 */
.logout-row { padding: 32px 0 48px; text-align: center; }
.logout-btn {
  font-size: 13px; font-weight: 500;
  color: var(--ember);
  background: none; border: 0;
  cursor: pointer;
  padding: 8px 24px;
  letter-spacing: .06em;
  transition: opacity .15s;
}
.logout-btn:hover { opacity: .7; }

/* ============================================================
   写作页
   ============================================================ */
.write-view {
  max-width: 700px; margin: 0 auto;
  padding: 28px 24px 120px;
}

.drafts-intro { margin: -14px 0 22px; color: var(--ink-2); font-size: 13px; }
.draft-list { display: flex; flex-direction: column; gap: 12px; margin-bottom: 20px; }
.draft-card { width: 100%; display: flex; gap: 14px; padding: 12px; text-align: left; border: 1px solid var(--hair); border-radius: var(--radius); background: #FFFCF4; color: var(--ink); cursor: pointer; transition: transform .18s, box-shadow .18s; font: inherit; }
.draft-card:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.draft-cover { width: 76px; height: 76px; flex: none; border-radius: var(--radius-sm); background: var(--paper-2); display: flex; align-items: center; justify-content: center; overflow: hidden; color: var(--ink-3); font-size: 11px; }
.draft-cover img { width: 100%; height: 100%; object-fit: cover; }
.draft-main { min-width: 0; display: flex; flex-direction: column; gap: 5px; padding-top: 2px; }
.draft-main strong { font-size: 14px; line-height: 1.4; }
.draft-main span { color: var(--ink-2); font-size: 11px; }
.draft-main em { color: var(--ember); font-size: 12px; line-height: 1.45; font-style: normal; overflow-wrap: anywhere; }
.revision-note { margin: -10px 0 20px; padding: 12px 14px; border-left: 3px solid var(--ember); background: rgba(184, 74, 58, .07); color: var(--ink-2); font-size: 12px; line-height: 1.55; }
.revision-note strong { display: block; color: var(--ember); margin-bottom: 3px; }
.draft-choice-copy, .leave-copy { margin: -8px 0 20px; color: var(--ink-2); font-size: 13px; line-height: 1.6; }
.draft-choice-actions, .leave-actions { display: flex; flex-direction: column; gap: 9px; }
.leave-card, .draft-choice-card { max-width: 390px; }

.write-view .field {
  margin-top: 18px;
}

.write-view .input,
.write-view .select {
  width: 100%; height: 46px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--hair);
  background: #FFFCF4;
  padding: 0 16px;
  font-size: 14px;
  outline: none;
  color: var(--ink);
  transition: border-color .18s, box-shadow .18s;
}
.write-view .input:focus,
.write-view .select:focus {
  border-color: var(--brass);
  box-shadow: 0 0 0 3px rgba(185, 138, 52, .10);
}

.w-blocks {
  display: flex; flex-direction: column; gap: 12px;
  margin-top: 10px;
}
.w-block {
  position: relative;
  border: 1.5px solid var(--hair);
  border-radius: var(--radius-sm);
  background: #FFFCF4;
  padding: 12px;
  transition: border-color .18s;
}
.w-block:focus-within {
  border-color: var(--brass);
}
.w-block .w-text {
  width: 100%; border: 0; background: transparent; outline: none;
  font-size: 15px; line-height: 1.75;
  resize: vertical; min-height: 140px; height: 140px;
  font-family: inherit; color: var(--ink);
}
.w-block .w-resize {
  height: 16px;
  margin: 2px -4px -4px;
  cursor: ns-resize;
  display: flex; align-items: center; justify-content: center;
  border-radius: 4px;
  transition: background .18s ease;
}
.w-block .w-resize:hover { background: var(--brass-soft); }
.w-block .w-resize::after {
  content: ''; width: 44px; height: 3px; border-radius: 2px;
  background: var(--hair);
  transition: background .18s ease;
}
.w-block .w-resize:hover::after { background: var(--brass); }
.w-block .w-block-del {
  position: absolute; top: 8px; right: 10px;
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--paper-3); color: var(--ink-2);
  border: 0; font-size: 14px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: all .15s ease;
}
.w-block .w-block-del:hover {
  background: var(--ember);
  color: #fff;
}
.w-block img {
  max-width: 100%;
  border-radius: var(--radius-xs);
  display: block;
}

.w-toolbar {
  display: flex; gap: 10px; margin-top: 12px;
}

.w-cover-upload {
  display: flex; align-items: center; gap: 14px;
}
.w-cover-preview {
  width: 180px; height: 120px;
  border-radius: var(--radius-sm);
  border: 2px dashed var(--hair-strong);
  background: #FFFCF4;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; cursor: pointer;
  transition: border-color .18s, background .18s;
}
.w-cover-preview:hover {
  border-color: var(--brass);
  background: var(--brass-soft);
}
.w-cover-preview .cover-placeholder {
  font-size: 12px; color: var(--ink-3);
  text-align: center; line-height: 1.4;
}
.w-cover-preview img {
  width: 100%; height: 100%; object-fit: cover;
}

.write-actions {
  display: flex; gap: 12px; margin-top: 28px;
}
.write-actions .btn { flex: 1; padding: 12px 0; }

/* ============================================================
   投币弹窗 / 编辑资料弹窗
   ============================================================ */
.tip-modal {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(28, 26, 22, .5);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  animation: fadeIn .2s ease;
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.tip-card {
  width: 100%; max-width: 360px;
  background: #FFFCF4;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 28px 24px;
  text-align: center;
  animation: slideUp .25s cubic-bezier(.22,.68,.4,1);
}
@keyframes slideUp {
  from { transform: translateY(12px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}

.tip-card .tip-title {
  font-family: var(--font-serif);
  font-size: 18px; font-weight: 600;
  color: var(--ink);
  margin-bottom: 20px;
}
.tip-card .tip-opts {
  display: flex; gap: 10px;
  justify-content: center;
  margin-bottom: 20px;
}
.tip-card .tip-opt {
  width: 64px; height: 48px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--hair);
  background: var(--paper);
  font-size: 16px; font-weight: 700;
  color: var(--ink);
  display: flex; align-items: center; justify-content: center;
  gap: 4px;
  cursor: pointer;
  font-family: inherit;
  transition: all .18s ease;
}
.tip-card .tip-opt:hover {
  border-color: var(--brass);
  background: var(--brass-soft);
  color: var(--brass-2);
  transform: translateY(-1px);
}
.tip-card .tip-cancel { margin-top: 6px; }

/* 充值弹窗 */
.recharge-card { text-align: center; }
.recharge-card .recharge-rate {
  font-size: 13px; color: var(--ink-3);
  margin-bottom: 16px;
}
.recharge-card .recharge-tiers {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
  margin-bottom: 20px;
}
.recharge-card .tier {
  border: 1.5px solid var(--hair);
  border-radius: var(--radius-sm);
  background: var(--paper-2);
  padding: 14px 8px;
  cursor: pointer;
  display: flex; flex-direction: column; gap: 4px;
  align-items: center;
  color: var(--ink);
  transition: all .18s ease;
}
.recharge-card .tier b {
  font-size: 18px; font-weight: 600; color: var(--ink);
}
.recharge-card .tier span {
  font-size: 12px; color: var(--ink-3);
}
.recharge-card .tier:hover { border-color: var(--brass); }
.recharge-card .tier.active {
  border-color: var(--brass);
  background: var(--brass-soft);
  box-shadow: 0 0 0 2px rgba(185, 138, 52, .12);
}
.recharge-card .recharge-qr {
  display: flex; justify-content: center;
  margin-bottom: 16px;
}
.recharge-card .recharge-qr img {
  width: 220px; height: 220px; border-radius: 10px;
  border: 1px solid var(--hair);
  background: #fff;
}
.recharge-card .recharge-cancel { margin-top: 8px; }

/* ============================================================
   Toast
   ============================================================ */
.toast {
  position: fixed; left: 50%; bottom: 80px;
  transform: translateX(-50%);
  background: var(--ink);
  color: var(--paper);
  font-size: 13px; font-weight: 500;
  padding: 11px 22px;
  border-radius: 999px;
  box-shadow: var(--shadow-lg);
  z-index: 200;
  animation: toastIn .25s ease;
  max-width: 80vw;
  white-space: nowrap;
  letter-spacing: .02em;
}
.toast.success { background: var(--verdigris); }
.toast.error   { background: var(--ember); }

@keyframes toastIn {
  from { opacity: 0; transform: translate(-50%, 10px); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}

/* ============================================================
   空态 / 加载
   ============================================================ */
.empty {
  padding: 80px 0;
  text-align: center;
  color: var(--ink-3);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: .04em;
}

/* ============================================================
   移动端适配
   ============================================================ */
@media (max-width: 640px) {
  .topnav-inner {
    /* 移动端：logo 收缩、搜索居中、用户头像收尾 */
    grid-template-columns: auto minmax(0, 1fr) auto;
    column-gap: 10px;
    padding: 10px 14px;
  }
  .topnav-inner .brand { gap: 0; }
  .topnav-inner .brand-name { display: none; }
  .topnav-inner .search { height: 34px; }
  .topnav-inner .search-soon { display: none; }
  .topnav-user .user-chip { padding: 4px; }
  .topnav-user .user-name { display: none; }

  .feed-grid {
    columns: 2; column-gap: 10px;
    padding: 10px 14px 80px;
  }
  .feed-head {
    padding: 16px 14px 8px;
  }

  .post-view, .profile-view, .write-view {
    padding-left: 18px; padding-right: 18px;
  }
  .post-head .post-title { font-size: 22px; }

  .login-brand { font-size: 38px; }
  .login-coin { width: 72px; height: 72px; }

  .phead .prow .avatar { width: 56px; height: 56px; font-size: 24px; }
  .phead .pname { font-size: 18px; }

  .wallet { flex-direction: column; gap: 14px; text-align: center; }
  .wallet .actions { width: 100%; justify-content: center; }

  .pin-cover .bigchar { font-size: clamp(36px, 12vw, 52px); }
}

/* 平板适配 */
@media (min-width: 641px) and (max-width: 1000px) {
  .topnav-inner {
    grid-template-columns: auto minmax(0, 1fr) auto;
    column-gap: 14px;
  }
  .feed-grid { columns: 3; column-gap: 12px; }
}

/* 大屏优化 */
@media (min-width: 1441px) {
  .feed-grid { columns: 6; }
}

/* ---------- 头像 ---------- */
.avatar img {
  width: 100%; height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}
.avatar-upload {
  display: flex; align-items: center; gap: 14px;
}
.avatar-preview {
  width: 64px; height: 64px; border-radius: 50%;
  background: var(--brass-soft); color: var(--brass-2);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; flex: none;
  border: 1.5px solid var(--hair);
}
.avatar-preview img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.avatar-preview .avatar-ph {
  font-family: var(--font-song); font-size: 24px; font-weight: 600;
}