/* =========================================================
   心语邮局 · 校园表白墙 — 原型样式
   风格：手作拼贴 / 校园布告栏。方格作业纸底 · 蓝黑墨水 +
   红笔批注 · 胶带贴纸 · 硬投影。拒绝渐变、发光、果冻圆角。
   依据 ui-ux-pro-max：16px 正文 / 对比度≥4.5:1 / SVG 图标 /
   44px 触控目标 / 150-300ms 过渡 / reduced-motion。
   ========================================================= */

:root {
  --paper: #f6f1e5;           /* 作业纸 */
  --paper-deep: #ede6d3;
  --card: #fffdf6;            /* 贴纸白 */
  --ink: #26324a;             /* 蓝黑墨水 */
  --ink-soft: #7d7668;        /* 铅笔灰 */
  --line: #ddd3bc;
  --red: #c7392b;             /* 红笔 */
  --red-soft: #f6ded7;
  --kraft: #e5c28e;           /* 牛皮纸 */
  --note: #ffe9a0;            /* 便签黄 */
  --grid: rgba(38, 50, 74, .05);
  /* 板块胶带色（低饱和） */
  --c-love: #c75b62;
  --c-hole: #6d84b8;
  --c-vent: #679a7a;
  --c-help: #c98d3f;
  --c-lost: #9a7cba;
  --shadow-hard: 3px 3px 0 rgba(38, 50, 74, .16);
  --shadow-hard-lg: 5px 6px 0 rgba(38, 50, 74, .18);
  --radius: 6px;
  --font-hand: "ZCOOL KuaiLe", "KaiTi", "STKaiti", cursive;
  --font-body: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
}

[data-theme="night"] {
  --paper: #232028;
  --paper-deep: #2c2833;
  --card: #2c2831;
  --ink: #ece4d2;
  --ink-soft: #a59d8d;
  --line: #413c48;
  --red: #e05a4b;
  --red-soft: #4a2e2a;
  --kraft: #b3905f;
  --note: #5b5238;
  --grid: rgba(236, 228, 210, .05);
  --c-love: #d97c83;
  --c-hole: #8ba0cd;
  --c-vent: #84b598;
  --c-help: #d8a765;
  --c-lost: #b39ed6;
  --shadow-hard: 3px 3px 0 rgba(0, 0, 0, .4);
  --shadow-hard-lg: 5px 6px 0 rgba(0, 0, 0, .45);
}

/* ---------- 基础 ---------- */
* { box-sizing: border-box; margin: 0; padding: 0; }

/* hidden 属性必须赢过任何 display 覆盖（flex/inline-flex 等），否则表单隔离失效 */
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.75;
  color: var(--ink);
  background-color: var(--paper);
  /* 方格作业纸 */
  background-image:
    linear-gradient(var(--grid) 1.5px, transparent 1.5px),
    linear-gradient(90deg, var(--grid) 1.5px, transparent 1.5px);
  background-size: 34px 34px;
  transition: background-color .4s, color .4s;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* 纸张噪点 */
body::before {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: .5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='0.05'/%3E%3C/svg%3E");
}

main, .site-header, .site-footer, .bottom-nav, .modal, .toast-dock { position: relative; z-index: 1; }

::selection { background: var(--red); color: #fff8ec; }

button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
input, textarea { font: inherit; color: inherit; }

:focus-visible { outline: 2.5px dashed var(--red); outline-offset: 3px; border-radius: 4px; }

/* 滚动进度 · 红笔线 */
.tape-progress {
  position: fixed; top: 0; left: 0;
  height: 4px; width: 0%;
  z-index: 200;
  background: var(--red);
  transition: width .15s linear;
}

/* ---------- 顶栏 ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--paper) 90%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 2px solid var(--ink);
  transition: box-shadow .3s;
}
.site-header.scrolled { box-shadow: 0 3px 0 rgba(38, 50, 74, .12); }

.header-inner {
  max-width: 1180px; margin: 0 auto;
  padding: 12px 24px;
  display: flex; align-items: center; gap: 28px;
}

.logo { display: flex; align-items: center; gap: 11px; text-decoration: none; color: var(--ink); }

.logo-mark {
  width: 42px; height: 42px; flex: none;
  display: grid; place-items: center;
  border-radius: 50%;
  color: var(--red);
  background: var(--card);
  border: 2.5px solid var(--red);
  transform: rotate(-7deg);
  transition: transform .3s;
}
.logo:hover .logo-mark { transform: rotate(7deg) scale(1.05); }
.logo-mark.big { width: 52px; height: 52px; }

.logo-text { font-family: var(--font-hand); font-size: 23px; line-height: 1.1; letter-spacing: .04em; }
.logo-text small { display: block; font-family: var(--font-body); font-size: 10px; font-weight: 700; letter-spacing: .34em; color: var(--ink-soft); }

.main-nav { display: flex; gap: 4px; margin-left: auto; }
.main-nav a {
  text-decoration: none; color: var(--ink);
  font-weight: 700;
  padding: 8px 15px; border-radius: var(--radius);
  border: 2px solid transparent;
  font-size: 15px;
  transition: border-color .2s, color .2s, transform .2s;
}
.main-nav a:hover { border-color: var(--ink); transform: rotate(-1.5deg); }

.header-actions { display: flex; align-items: center; gap: 10px; }

.search-box {
  display: flex; align-items: center; gap: 8px;
  background: var(--card);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  padding: 7px 14px;
  color: var(--ink-soft);
  box-shadow: 2px 2px 0 rgba(38, 50, 74, .18);
  transition: transform .2s, box-shadow .2s;
}
.search-box:focus-within { transform: translate(-1px, -1px); box-shadow: 3px 3px 0 rgba(38, 50, 74, .2); }
.search-box input { border: none; background: none; outline: none; width: 126px; font-size: 14px; color: var(--ink); }
.search-box input::placeholder { color: var(--ink-soft); }

.icon-btn {
  width: 42px; height: 42px; border-radius: 50%;
  border: 2px solid var(--ink);
  display: grid; place-items: center;
  color: var(--ink);
  background: var(--card);
  box-shadow: 2px 2px 0 rgba(38, 50, 74, .18);
  transition: transform .2s, box-shadow .2s;
}
.icon-btn:hover { transform: translate(-1px, -1px) rotate(-10deg); box-shadow: 3px 3px 0 rgba(38, 50, 74, .2); }
.ic-sun { display: none; }
[data-theme="night"] .ic-moon { display: none; }
[data-theme="night"] .ic-sun { display: block; }

.btn-primary {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--ink); color: var(--paper);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  padding: 10px 22px;
  font-size: 15px; font-weight: 900;
  box-shadow: var(--shadow-hard);
  transition: transform .18s, box-shadow .18s;
}
.btn-primary:hover { transform: translate(-2px, -2px) rotate(-.6deg); box-shadow: var(--shadow-hard-lg); }
.btn-primary:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 rgba(38, 50, 74, .2); }
.btn-primary.big { padding: 13px 28px; font-size: 17px; }
.btn-primary:disabled { opacity: .6; transform: none; cursor: wait; }

/* ---------- Hero ---------- */
.hero {
  max-width: 1180px; margin: 0 auto;
  padding: clamp(44px, 7vw, 96px) 24px 30px;
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: clamp(30px, 5vw, 60px);
  align-items: center;
}

.hero-eyebrow {
  display: inline-block;
  font-family: var(--font-hand);
  font-size: 15px; letter-spacing: .1em;
  color: var(--red);
  background: var(--card);
  border: 2px dashed var(--red);
  border-radius: 4px;
  padding: 5px 16px;
  transform: rotate(-1.5deg);
}
.hero-eyebrow b { font-size: 18px; }

.hero h1 {
  font-family: var(--font-hand);
  font-weight: 400;
  font-size: clamp(34px, 5vw, 60px);
  line-height: 1.28;
  margin: 18px 0;
  letter-spacing: .03em;
}
.hero h1 em {
  font-style: normal;
  color: var(--red);
  text-decoration: underline wavy var(--red) 3px;
  text-underline-offset: 10px;
  padding: 0 .05em;
}

.hero-sub { color: var(--ink-soft); font-size: clamp(15px, 1.3vw, 16.5px); max-width: 32em; }

.hero-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-top: 30px; }

.btn-ghost {
  display: inline-flex; align-items: center;
  text-decoration: none; color: var(--ink);
  border: 2px solid var(--ink);
  background: var(--card);
  border-radius: var(--radius);
  padding: 11px 24px; font-size: 15px; font-weight: 900;
  box-shadow: 2px 2px 0 rgba(38, 50, 74, .18);
  transition: transform .18s, box-shadow .18s;
}
.btn-ghost:hover { transform: translate(-2px, -2px); box-shadow: 4px 4px 0 rgba(38, 50, 74, .22); }
.btn-ghost:active { transform: translate(1px, 1px); box-shadow: 1px 1px 0 rgba(38, 50, 74, .2); }

.hero-stats {
  display: flex; gap: clamp(24px, 4vw, 56px);
  list-style: none;
  margin-top: 36px;
}
.hero-stats li { display: flex; flex-direction: column; }
.hero-stats b {
  font-family: var(--font-hand);
  font-size: clamp(26px, 2.6vw, 36px);
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.hero-stats li:last-child b { color: var(--red); }
.hero-stats span { font-size: 12px; font-weight: 700; color: var(--ink-soft); letter-spacing: .12em; }

/* --- 信封舞台 --- */
.hero-stage { display: grid; place-items: center; }

.hero-envelope { position: relative; width: min(520px, 100%); cursor: pointer; }
.hero-envelope:focus-visible { outline-offset: 8px; }

.env-svg { width: 100%; height: auto; overflow: visible; animation: env-float 5s ease-in-out infinite; }
@keyframes env-float {
  0%, 100% { transform: translateY(0) rotate(-1.2deg); }
  50% { transform: translateY(-10px) rotate(.6deg); }
}

.deco { animation: deco-bob 4s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.deco-plane { animation-delay: -1s; }
.deco-star { animation-delay: -2s; }
.deco-star2 { animation-delay: -3s; }
.deco-dot { animation-delay: -.5s; }
.deco-dot2 { animation-delay: -2.5s; }
@keyframes deco-bob {
  0%, 100% { transform: translateY(0) rotate(0); }
  50% { transform: translateY(-7px) rotate(3deg); }
}

.lt { font-family: var(--font-hand); fill: var(--ink); }
.lt-head { font-size: 21px; }
.lt-sign { font-size: 17px; fill: var(--ink-soft); }
.lt-stamp { font-size: 13px; fill: var(--red); }
.lt-pm { font-size: 15px; fill: var(--red); }
.lt-pm2 { font-size: 12px; letter-spacing: .3em; }

.env-letter { transition: transform .9s cubic-bezier(.3, 1.2, .4, 1); }
.hero-envelope.open .env-letter { transform: translateY(-104px); }

.env-flap {
  transform-box: fill-box;
  transform-origin: top center;
  backface-visibility: hidden;
  transition: transform .8s cubic-bezier(.55, .06, .25, 1), opacity .22s ease .42s;
}
.hero-envelope.open .env-flap {
  /* 封口盖翻起后退到信纸后方，避免遮住已拆开的内容。 */
  transform: translateY(-156px) rotateX(180deg);
  opacity: 0;
  pointer-events: none;
}

.env-postmark {
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
}
.hero-envelope.open .env-postmark { animation: pm-stamp .5s .55s ease forwards; }
@keyframes pm-stamp {
  0% { opacity: 0; transform: scale(2.4) rotate(-20deg); }
  65% { opacity: 1; transform: scale(.9) rotate(-8deg); }
  100% { opacity: 1; transform: scale(1) rotate(-8deg); }
}

.env-hint {
  text-align: center;
  font-family: var(--font-hand);
  font-size: 15px;
  color: var(--ink-soft);
  margin-top: 2px;
  animation: hint-bounce 2s ease-in-out infinite;
}
.hero-envelope.open .env-hint { visibility: hidden; }
@keyframes hint-bounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(4px); } }

/* 拆信飘心（inset 0：动画位移不撑破页面宽度） */
.hearts { position: absolute; inset: 0; pointer-events: none; }
.heart {
  position: absolute;
  animation: heart-rise 2.2s ease-out forwards;
  will-change: transform, opacity;
}
@keyframes heart-rise {
  0% { transform: translate(0, 0) scale(.3); opacity: 0; }
  12% { opacity: 1; }
  100% { transform: translate(var(--dx), -230px) scale(1.15); opacity: 0; }
}

/* ---------- 通用区块 ---------- */
.feed-section {
  max-width: 1180px; margin: 0 auto;
  padding: clamp(48px, 7vw, 92px) 24px 40px;
}

.section-head h2 {
  font-family: var(--font-hand);
  font-weight: 400;
  font-size: clamp(28px, 3.4vw, 40px);
  display: inline-block;
}
.section-head h2::after {
  content: "";
  display: block;
  width: 96px; height: 10px;
  margin-top: 2px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='96' height='10'%3E%3Cpath d='M2 6 Q 13 1 24 6 T 46 6 T 68 6 T 94 6' fill='none' stroke='%23c7392b' stroke-width='3' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat left center / 96px 10px;
}
.section-head p { color: var(--ink-soft); margin-top: 8px; }

/* ---------- 筛选栏 ---------- */
.filter-bar {
  position: sticky; top: 70px; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap;
  margin: 26px 0 16px;
  padding: 10px 12px;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: blur(8px);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow-hard);
}

.chips { display: flex; gap: 7px; overflow-x: auto; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }

.chip {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 14px; font-weight: 900;
  color: var(--ink);
  padding: 7px 15px;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: var(--card);
  white-space: nowrap;
  transition: transform .2s, background .2s, color .2s;
}
.chip::before {
  content: "";
  width: 9px; height: 9px;
  border-radius: 2px;
  background: var(--ink);
  transform: rotate(-8deg);
}
.chip.t-love::before { background: var(--c-love); }
.chip.t-hole::before { background: var(--c-hole); }
.chip.t-vent::before { background: var(--c-vent); }
.chip.t-help::before { background: var(--c-help); }
.chip.t-lost::before { background: var(--c-lost); }
.chip[data-filter="all"]::before { background: var(--red); }
.chip:hover { transform: rotate(-2deg) translateY(-1px); }
.chip.active { background: var(--ink); color: var(--paper); }

.sort { display: flex; gap: 3px; border: 2px solid var(--ink); border-radius: var(--radius); padding: 3px; flex: none; background: var(--card); }
.sort-btn {
  font-size: 13px; font-weight: 900;
  color: var(--ink-soft);
  padding: 7px 15px; border-radius: 4px;
  transition: color .2s, background .2s;
}
.sort-btn.active { background: var(--red); color: #fff8ec; }

/* ---------- 信卡片网格（贴在板上的纸） ---------- */
.feed-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px 20px;
  margin-top: 18px;
}

.post-card {
  position: relative;
  min-width: 0;               /* 允许窄于标题文字宽度，让省略号生效 */
  background: var(--card);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  padding: 26px 20px 16px;
  cursor: pointer;
  text-align: left;
  display: flex; flex-direction: column; gap: 10px;
  box-shadow: var(--shadow-hard);
  transform: rotate(var(--rot, 0deg));
  transition: transform .25s, box-shadow .25s;
  overflow: visible;
}
/* 板块胶带（贴卡片用） */
.post-card::before {
  content: "";
  position: absolute; top: -13px; left: 50%;
  width: 96px; height: 26px;
  transform: translateX(-50%) rotate(-3deg);
  background: color-mix(in srgb, #ffffff 42%, var(--tag-color, var(--red)));
  border-left: 2px dashed rgba(38, 50, 74, .18);
  border-right: 2px dashed rgba(38, 50, 74, .18);
  z-index: 2;
}
.post-card:hover, .post-card:focus-visible {
  box-shadow: var(--shadow-hard-lg);
  z-index: 5;
}
.post-card.new-card { animation: card-arrive .6s cubic-bezier(.3, 1.3, .4, 1); }
@keyframes card-arrive {
  0% { opacity: 0; transform: translateY(-24px) scale(.94) rotate(-3deg); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

/* 今日最佳：横贯整行的大纸 */
.post-card.featured {
  grid-column: 1 / -1;
  padding: 30px 28px 18px;
}
.post-card.featured::after {
  content: "今日最佳";
  position: absolute; top: 12px; right: 16px;
  font-family: var(--font-hand);
  font-size: 15px;
  color: var(--red);
  border: 2px solid var(--red);
  border-radius: 50%;
  padding: 2px 10px;
  transform: rotate(8deg);
}
.post-card.featured .post-title { font-size: 21px; font-family: var(--font-hand); font-weight: 400; }
.post-card.featured .post-content { -webkit-line-clamp: 2; }

.card-top { display: flex; align-items: center; gap: 8px; margin-top: 2px; }
.card-tag {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12px; font-weight: 900;
  color: var(--tag-color, var(--red));
  border: 1.5px solid color-mix(in srgb, var(--tag-color, var(--red)) 65%, transparent);
  padding: 2px 10px;
  border-radius: 4px;
  transform: rotate(-1.5deg);
  background: color-mix(in srgb, var(--tag-color, var(--red)) 8%, transparent);
}
.card-status {
  font-size: 11px; font-weight: 700; color: var(--ink-soft);
  margin-left: auto;
  display: inline-flex; align-items: center; gap: 4px;
}
.card-status .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--c-vent); }

.post-title {
  font-size: 17.5px; font-weight: 900;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.post-content {
  color: var(--ink-soft);
  font-size: 14.5px; line-height: 1.85;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 78px;
}

.post-foot {
  margin-top: auto;
  display: flex; align-items: center; gap: 10px;
  padding-top: 12px;
  border-top: 2px dashed var(--line);
}

.post-nick { font-family: var(--font-hand); font-size: 16px; color: var(--ink); }
.post-time { font-size: 12px; font-weight: 500; color: var(--ink-soft); margin-right: auto; }

/* 盖邮戳点赞（红圆章） */
.postmark-like {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 40px;
  color: var(--ink-soft);
  padding: 0 13px;
  border: 2px solid color-mix(in srgb, var(--ink-soft) 55%, transparent);
  border-radius: 999px;
  font-size: 13.5px; font-weight: 900;
  background: var(--card);
  transition: all .2s;
}
.postmark-like:hover { border-color: var(--red); color: var(--red); transform: rotate(-3deg); }
.postmark-like.liked {
  color: #fff8ec;
  border-color: var(--red);
  background: var(--red);
}
.postmark-like.liked .pm-ic { animation: stamp-hit .45s cubic-bezier(.3, 1.6, .4, 1); }
@keyframes stamp-hit {
  0% { transform: scale(2) rotate(-20deg); }
  100% { transform: scale(1) rotate(0); }
}

.post-cmt {
  display: inline-flex; align-items: center; gap: 5px;
  min-height: 40px;
  font-size: 13px; font-weight: 700; color: var(--ink-soft);
  padding: 0 4px;
}

/* 滚动入场 */
.reveal { opacity: 0; transform: translateY(18px) rotate(var(--rot, 0deg)); transition: opacity .55s ease, transform .55s cubic-bezier(.25, .8, .35, 1); }
.reveal.in { opacity: 1; transform: translateY(0) rotate(var(--rot, 0deg)); }
/* hover 提升需覆盖入场后的 transform（优先级高于 .reveal.in） */
.post-card.reveal.in:hover,
.post-card.reveal.in:focus-visible {
  transform: rotate(0deg) translateY(-5px);
}

/* 空状态 / 加载 */
.feed-empty { text-align: center; padding: 70px 0; color: var(--ink-soft); font-size: 15px; }
.feed-empty .btn-ghost { margin-top: 16px; }

.feed-more { text-align: center; margin-top: 34px; }
.btn-loadmore {
  font-size: 15px; font-weight: 900;
  color: var(--ink);
  border: 2px dashed var(--ink);
  border-radius: var(--radius);
  padding: 12px 36px;
  min-height: 48px;
  background: var(--card);
  transition: transform .2s, background .2s;
}
.btn-loadmore:hover { transform: rotate(-1deg); background: var(--paper-deep); }
.btn-loadmore:disabled { opacity: .55; cursor: default; transform: none; }

/* ---------- 页脚 ---------- */
.site-footer {
  margin-top: 40px;
  background: var(--ink);
  color: #f3eee1;
}
[data-theme="night"] .site-footer { background: #17151c; }

.footer-inner {
  max-width: 1180px; margin: 0 auto;
  padding: 44px 24px 18px;
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 34px;
}
.footer-brand { display: flex; gap: 16px; align-items: flex-start; }
.footer-brand .logo-mark { background: transparent; color: #f3eee1; border-color: var(--red); flex: none; }
.footer-brand b { font-family: var(--font-hand); font-size: 21px; font-weight: 400; }
.footer-brand p { font-size: 13.5px; color: rgba(243, 238, 225, .72); margin-top: 6px; }
.footer-col h4 { font-family: var(--font-hand); font-size: 16px; font-weight: 400; letter-spacing: .12em; margin-bottom: 10px; color: var(--red); }
[data-theme="night"] .footer-col h4 { color: var(--red); }
.footer-col li { list-style: none; font-size: 13.5px; color: rgba(243, 238, 225, .72); padding: 3px 0; }
.footer-col li::before { content: "· "; }
.footer-copy { text-align: center; font-size: 12.5px; color: rgba(243, 238, 225, .55); padding: 16px 24px 24px; }

/* ---------- 移动端底部导航 ---------- */
.bottom-nav {
  display: none;
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
  background: color-mix(in srgb, var(--paper) 95%, transparent);
  backdrop-filter: blur(12px);
  border-top: 2px solid var(--ink);
  padding: 6px 12px calc(10px + env(safe-area-inset-bottom));
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
}
.bn-item {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  min-height: 48px; justify-content: center;
  color: var(--ink-soft);
  font-size: 10.5px; font-weight: 700;
  text-decoration: none;
  border-radius: var(--radius);
  transition: color .2s, transform .15s;
}
.bn-item span { letter-spacing: .05em; position: relative; }
.bn-item:active { transform: scale(.88); }
.bn-item.active { color: var(--red); }
.bn-item.active span::after {
  content: "";
  position: absolute; left: 50%; bottom: -4px;
  transform: translateX(-50%);
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--red);
}
.bn-write {
  width: 58px; height: 58px;
  margin-top: -28px;
  display: grid; place-items: center;
  background: var(--red);
  color: #fff8ec;
  border-radius: 50%;
  border: 2.5px solid var(--ink);
  box-shadow: var(--shadow-hard);
  transition: transform .2s;
}
.bn-write:active { transform: scale(.9); }

/* ---------- 弹窗 ---------- */
.modal { position: fixed; inset: 0; z-index: 300; display: grid; place-items: center; padding: 20px; }
.modal[hidden] { display: none; }
.modal-mask {
  position: absolute; inset: 0;
  background: rgba(38, 50, 74, .55);
  backdrop-filter: blur(3px);
  animation: fade-in .3s ease;
}
@keyframes fade-in { from { opacity: 0; } }

.modal-close {
  position: absolute; top: 14px; right: 14px; z-index: 5;
  width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center;
  color: var(--ink);
  background: var(--card);
  border: 2px solid var(--ink);
  box-shadow: 2px 2px 0 rgba(38, 50, 74, .2);
  transition: transform .25s, background .2s, color .2s;
}
.modal-close:hover { transform: rotate(90deg); background: var(--red); color: #fff8ec; }

/* 信纸详情（横线作业纸） */
.letter-sheet {
  position: relative;
  width: min(680px, 100%);
  max-height: min(86vh, 900px);
  overflow-y: auto;
  background: var(--card);
  border: 2.5px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow-hard-lg);
  padding: clamp(22px, 4vw, 40px);
  animation: sheet-pop .45s cubic-bezier(.3, 1.3, .4, 1);
}
@keyframes sheet-pop {
  0% { opacity: 0; transform: translateY(34px) rotate(1deg) scale(.96); }
  100% { opacity: 1; transform: none; }
}

.letter-head { display: flex; gap: 16px; align-items: flex-start; padding-bottom: 16px; border-bottom: 2px dashed var(--line); }

.letter-stamp {
  flex: none;
  width: 54px; height: 64px;
  display: grid; place-items: center;
  color: var(--tag-color, var(--red));
  background: color-mix(in srgb, var(--tag-color, var(--red)) 8%, var(--card));
  border: 2px dashed var(--tag-color, var(--red));
  border-radius: 4px;
  transform: rotate(4deg);
}
.letter-meta { flex: 1; min-width: 0; }
.letter-eyebrow { font-size: 12.5px; font-weight: 900; letter-spacing: .2em; color: var(--tag-color, var(--red)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.letter-meta h3 { font-family: var(--font-hand); font-weight: 400; font-size: clamp(20px, 3vw, 25px); margin-top: 2px; }
.letter-sub { font-size: 12.5px; font-weight: 500; color: var(--ink-soft); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.letter-sub span { color: var(--red); font-weight: 700; }

.letter-pm {
  flex: none;
  width: 56px; height: 56px;
  border: 2.5px dashed color-mix(in srgb, var(--red) 70%, transparent);
  border-radius: 50%;
  color: color-mix(in srgb, var(--red) 85%, transparent);
  display: grid; place-items: center;
  font-family: var(--font-hand);
  font-size: 14px;
  transform: rotate(-12deg);
}

/* 正文：横线纸 + 红色装订线 */
.letter-body {
  margin: 6px 0;
  padding: 1em 1em 1em 3em;
  font-size: 15.5px;
  line-height: 2em;
  white-space: pre-wrap;
  background:
    linear-gradient(90deg, transparent 0 2.2em, color-mix(in srgb, var(--red) 30%, transparent) 2.2em calc(2.2em + 2px), transparent calc(2.2em + 2px)),
    repeating-linear-gradient(transparent 0 calc(2em - 1.5px), var(--line) calc(2em - 1.5px) 2em);
}

.letter-actions {
  display: flex; align-items: center; gap: 14px;
  padding: 13px 0;
  border-top: 2px dashed var(--line);
}
.postmark-btn {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 46px;
  font-size: 14px; font-weight: 900;
  color: var(--ink-soft);
  padding: 0 18px;
  border: 2px solid color-mix(in srgb, var(--ink-soft) 55%, transparent);
  border-radius: 999px;
  background: var(--card);
  transition: all .2s;
}
.postmark-btn:hover { border-color: var(--red); color: var(--red); transform: rotate(-2deg); }
.postmark-btn.liked { color: #fff8ec; border-color: var(--red); background: var(--red); }
.postmark-btn.liked .pm-ic { animation: stamp-hit .45s cubic-bezier(.3, 1.6, .4, 1); }
.pm-ic { display: inline-flex; }
.postmark-btn i { font-style: normal; font-size: 12px; font-weight: 500; }
.letter-count { font-size: 13px; font-weight: 500; color: var(--ink-soft); margin-left: auto; }

/* 回信箱 */
.comments { border-top: 2px dashed var(--line); padding-top: 14px; }
.comments h4 { font-family: var(--font-hand); font-weight: 400; font-size: 17px; letter-spacing: .1em; color: var(--ink); margin-bottom: 12px; }

.comment-list { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.comment-item {
  background: var(--paper-deep);
  border: 1.5px solid var(--line);
  border-radius: 4px;
  padding: 10px 14px;
  animation: card-arrive .4s cubic-bezier(.3, 1.3, .4, 1);
}
.comment-item.reply { margin-left: 32px; border-left: 4px solid var(--red); background: var(--red-soft); border-radius: 4px; }
.comment-top { display: flex; align-items: center; gap: 8px; }
.comment-nick { font-family: var(--font-hand); font-size: 15.5px; color: var(--ink); }
.comment-item.reply .comment-nick { color: var(--red); }
.comment-time { font-size: 11px; font-weight: 500; color: var(--ink-soft); }
.comment-item p { font-size: 14px; margin-top: 2px; }

.comment-form { display: flex; gap: 10px; margin-top: 14px; }
.comment-form input {
  flex: 1; min-width: 0;
  background: var(--card);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  padding: 12px 16px;
  outline: none; font-size: 14px;
  transition: box-shadow .2s, transform .2s;
}
.comment-form input:focus { transform: translate(-1px, -1px); box-shadow: 3px 3px 0 rgba(38, 50, 74, .18); }
.comment-form button {
  background: var(--ink); color: var(--paper);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  padding: 12px 24px;
  font-size: 14px; font-weight: 900;
  min-height: 46px;
  box-shadow: var(--shadow-hard);
  transition: transform .18s, box-shadow .18s;
}
.comment-form button:hover { transform: translate(-2px, -2px); box-shadow: var(--shadow-hard-lg); }

/* ---------- 写信弹窗 ---------- */
.publish-sheet {
  position: relative;
  width: min(600px, 100%);
  max-height: min(88vh, 920px);
  overflow-y: auto;
  background: var(--card);
  border: 2.5px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow-hard-lg);
  padding: clamp(22px, 4vw, 38px);
  animation: sheet-pop .45s cubic-bezier(.3, 1.3, .4, 1);
}
.publish-head h3 { font-family: var(--font-hand); font-weight: 400; font-size: 25px; }
.publish-head p { font-size: 13px; font-weight: 500; color: var(--ink-soft); margin-top: 4px; }

.publish-form { margin-top: 20px; display: flex; flex-direction: column; gap: 20px; }

.field { border: none; }
.field-name {
  display: block;
  font-family: var(--font-hand);
  font-size: 16px; letter-spacing: .12em;
  color: var(--red);
  margin-bottom: 8px;
}
.field input[type="text"],
.field input[type="email"] {
  width: 100%;
  background: var(--card);
  border: none; border-bottom: 2px dashed var(--ink-soft);
  padding: 8px 2px;
  font-size: 15px; outline: none;
  transition: border-color .2s, border-style .2s;
}
.field input[type="text"]:focus,
.field input[type="email"]:focus { border-bottom-color: var(--red); border-bottom-style: solid; }

/* 验证码行 */
.code-row { display: flex; gap: 10px; align-items: flex-end; }
.code-row input { flex: 1; min-width: 0; }
.send-code {
  flex: none;
  min-height: 44px;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: var(--card);
  padding: 8px 14px;
  font-size: 13px; font-weight: 900;
  box-shadow: 2px 2px 0 rgba(38, 50, 74, .15);
  transition: transform .18s, box-shadow .18s, opacity .2s;
}
.send-code:hover:not(:disabled) { transform: translate(-1px, -1px); box-shadow: 3px 3px 0 rgba(38, 50, 74, .2); }
.send-code:disabled { opacity: .55; cursor: default; box-shadow: none; }

.stamp-picker { display: flex; flex-wrap: wrap; gap: 9px; }
.stamp-opt input { position: absolute; opacity: 0; }
.stamp-opt span {
  display: inline-block;
  font-size: 14px; font-weight: 900;
  padding: 8px 18px;
  border: 2px solid var(--ink);
  border-radius: 4px;
  background: var(--card);
  cursor: pointer;
  transition: all .18s;
}
.stamp-opt:hover span { transform: rotate(-2deg); }
.stamp-opt input:checked + span {
  border-color: var(--red);
  color: var(--red);
  background: var(--red-soft);
  transform: rotate(-2deg);
}
.stamp-opt input:focus-visible + span { outline: 2.5px dashed var(--red); outline-offset: 2px; }

.field textarea {
  width: 100%;
  resize: vertical;
  min-height: 130px;
  background:
    repeating-linear-gradient(transparent 0 calc(1.9em - 1.5px), var(--line) calc(1.9em - 1.5px) 1.9em);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  padding: 12px 15px;
  font-size: 15px; line-height: 1.9em;
  outline: none;
  transition: box-shadow .2s, transform .2s;
}
.field textarea:focus { transform: translate(-1px, -1px); box-shadow: 3px 3px 0 rgba(38, 50, 74, .18); }
.char-count { display: block; text-align: right; font-size: 12px; font-weight: 500; color: var(--ink-soft); margin-top: 5px; }
.char-count.warn b { color: var(--red); }

.publish-foot {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; flex-wrap: wrap;
}
.anon-note { font-size: 12.5px; font-weight: 500; color: var(--ink-soft); }

/* 封蜡动画（手作印章） */
.wax-seal { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; opacity: 0; z-index: 10; }
.wax-seal::before { content: ""; position: absolute; inset: 0; background: rgba(38, 50, 74, .42); border-radius: var(--radius); }
.wax-core {
  width: 112px; height: 112px;
  background: var(--red);
  border: 3px solid var(--ink);
  border-radius: 50% 46% 52% 48% / 48% 52% 46% 54%;
  display: grid; place-items: center;
  color: #fff8ec;
  font-family: var(--font-hand); font-size: 46px;
  box-shadow: var(--shadow-hard-lg);
}
.wax-seal.play { animation: wax-show 1.4s ease forwards; }
.wax-seal.play .wax-core { animation: wax-stamp .55s cubic-bezier(.3, 1.6, .4, 1) forwards; }
@keyframes wax-show { 0% { opacity: 0; } 18% { opacity: 1; } 80% { opacity: 1; } 100% { opacity: 0; } }
@keyframes wax-stamp { 0% { transform: scale(2.4) rotate(-18deg); } 100% { transform: scale(1) rotate(0); } }

/* ---------- Toast ---------- */
.toast-dock {
  position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%);
  z-index: 400;
  display: flex; flex-direction: column; gap: 10px; align-items: center;
  pointer-events: none;
}
.toast {
  font-size: 14px; font-weight: 700;
  background: var(--ink); color: var(--paper);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  padding: 12px 26px;
  box-shadow: var(--shadow-hard);
  animation: toast-in .35s cubic-bezier(.3, 1.3, .4, 1), toast-out .3s ease 2.4s forwards;
  max-width: min(86vw, 480px);
  text-align: center;
  transform: rotate(-1deg);
}
@keyframes toast-in { from { opacity: 0; transform: translateY(18px) rotate(-1deg) scale(.9); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(12px) rotate(-1deg); } }

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

@media (max-width: 1024px) {
  .hero { grid-template-columns: 1fr; gap: 36px; }
  .hero-stage { order: -1; }
  .hero-envelope { width: min(430px, 88vw); }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 760px) {
  body { padding-bottom: 82px; }
  .header-inner { width: 100%; min-width: 0; padding: 10px 16px; gap: 12px; }
  .main-nav, .search-box { display: none; }
  .logo { min-width: 0; flex: 1 1 auto; }
  .logo-text { white-space: nowrap; }
  .header-actions { flex: 0 0 auto; margin-left: auto; gap: 6px; }
  .header-actions .icon-btn,
  .header-actions .user-chip {
    width: 42px; height: 42px; flex: 0 0 42px;
    justify-content: center;
  }
  .header-actions .btn-primary[data-open-bottle] {
    min-width: 84px; min-height: 42px;
    justify-content: center; padding: 8px 10px;
    white-space: nowrap; flex: 0 0 auto;
  }

  .hero { padding-top: 30px; }
  .filter-bar { top: 62px; }
  /* 手机端：标签改为 3 列网格铺开，替代横向滚动截断 */
  .chips { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; overflow: visible; }
  .chip { justify-content: center; }
  .sort { margin-left: auto; }
  .feed-grid { grid-template-columns: 1fr; gap: 26px 16px; }
  .bottom-nav { display: grid; }

  .comment-form { flex-direction: column; }
  .comment-form button { width: 100%; }
  .letter-actions { flex-wrap: wrap; }
  /* 手机端详情头部：隐藏装饰邮戳、缩小邮票，把整行宽度留给文字 */
  .letter-pm { display: none; }
  .letter-stamp { width: 46px; height: 56px; }
  .letter-head { gap: 12px; }
  .toast-dock { bottom: 100px; }
  .footer-inner { grid-template-columns: 1fr; gap: 22px; padding: 32px 20px 12px; }
}

@media (max-width: 420px) {
  .header-inner { padding-left: 12px; padding-right: 12px; gap: 8px; }
  .logo { gap: 8px; }
  .logo-text { font-size: 19px; letter-spacing: .02em; }
  .header-actions { gap: 5px; }
  .header-actions .btn-primary[data-open-bottle] { min-width: 78px; padding-left: 8px; padding-right: 8px; }
  .hero-cta { flex-direction: column; align-items: stretch; text-align: center; }
  .btn-primary.big { width: 100%; justify-content: center; }
  .post-card { padding: 24px 16px 14px; }
  .post-content { min-height: 0; }
}

@media (max-width: 360px) {
  .header-inner { padding-left: 10px; padding-right: 10px; gap: 6px; }
  .logo { gap: 6px; }
  .logo-mark { width: 36px; height: 36px; }
  .logo-mark svg { width: 19px; height: 19px; }
  .logo-text { font-size: 18px; }
  .logo-text small { font-size: 9px; letter-spacing: .22em; }
  .header-actions { gap: 4px; }
  .header-actions .icon-btn,
  .header-actions .user-chip { width: 38px; height: 38px; flex-basis: 38px; }
  .header-actions .btn-primary[data-open-bottle] {
    min-width: 72px; min-height: 38px; padding: 6px 7px; font-size: 13px;
  }
}

@media (min-width: 1440px) {
  .header-inner, .hero, .feed-section, .footer-inner { max-width: 1280px; }
}

/* 动效减弱（无障碍） */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  html { scroll-behavior: auto; }
}

/* =========================================================
   漂流瓶 · 登录注册（手作拼贴风格延续）
   ========================================================= */

/* 顶栏用户胶囊 */
.user-chip {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--card);
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: 5px 14px 5px 6px;
  font-size: 13px; font-weight: 900;
  color: var(--ink);
  box-shadow: 2px 2px 0 rgba(38, 50, 74, .18);
  transition: transform .18s, box-shadow .18s;
}
.user-chip:hover { transform: translate(-1px, -1px) rotate(-1deg); box-shadow: 3px 3px 0 rgba(38, 50, 74, .22); }
.uc-avatar {
  width: 28px; height: 28px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--ink); color: var(--paper);
  font-family: var(--font-hand); font-size: 15px;
}
.user-chip.logged .uc-avatar { background: var(--red); color: #fff8ec; }
.uc-text { max-width: 9em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 用户菜单 */
.user-menu {
  position: absolute; top: calc(100% + 10px); right: 0;
  min-width: 180px;
  background: var(--card);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow-hard);
  padding: 12px 14px;
  z-index: 150;
  animation: sheet-pop .3s cubic-bezier(.3, 1.3, .4, 1);
}
.user-menu b { font-family: var(--font-hand); font-size: 17px; font-weight: 400; display: block; }
.user-menu .um-school { font-size: 12px; color: var(--ink-soft); margin: 2px 0 10px; display: block; }
.user-menu button {
  width: 100%;
  border: 2px solid var(--red);
  color: var(--red);
  border-radius: var(--radius);
  padding: 7px 0;
  font-size: 13px; font-weight: 900;
  transition: background .2s, color .2s;
}
.user-menu button:hover { background: var(--red); color: #fff8ec; }

/* 漂流瓶选择弹窗 */
.bottle-options {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 22px;
}
.bottle-opt {
  display: flex; flex-direction: column; align-items: flex-start; gap: 6px;
  background: var(--card);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow-hard);
  padding: 20px 18px 16px;
  text-align: left;
  transition: transform .2s, box-shadow .2s;
}
.bottle-opt:hover { transform: translate(-2px, -3px) rotate(-1deg); box-shadow: var(--shadow-hard-lg); }
.bottle-opt:active { transform: translate(1px, 1px); box-shadow: 1px 1px 0 rgba(38,50,74,.2); }
.bottle-opt b { font-family: var(--font-hand); font-weight: 400; font-size: 20px; }
.bottle-opt > span:last-child { font-size: 12.5px; line-height: 1.6; color: var(--ink-soft); }
.bo-icon {
  width: 46px; height: 46px;
  display: grid; place-items: center;
  border-radius: 50%;
  border: 2px solid var(--ink);
  margin-bottom: 4px;
}
.bo-throw { background: var(--red-soft); color: var(--red); transform: rotate(-6deg); }
.bo-draw { background: color-mix(in srgb, var(--c-hole) 14%, transparent); color: var(--c-hole); transform: rotate(5deg); }

/* 学校来源行 */
.school-line {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 6px;
  font-family: var(--font-hand);
  font-size: 14.5px;
  color: var(--c-hole);
  background: color-mix(in srgb, var(--c-hole) 10%, transparent);
  border: 1.5px dashed color-mix(in srgb, var(--c-hole) 55%, transparent);
  border-radius: 4px;
  padding: 1px 10px;
  transform: rotate(-1deg);
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
}
.school-line b { font-weight: 400; }
.school-line svg { flex: none; }

/* 再捞一个按钮 */
.redraw-btn { color: var(--c-hole); }
.redraw-btn:hover { border-color: var(--c-hole); color: var(--c-hole); background: color-mix(in srgb, var(--c-hole) 8%, transparent); }

/* 打捞动画：海面 */
.sea-sheet {
  position: relative;
  width: min(380px, 90vw);
  background: var(--card);
  border: 2.5px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow-hard-lg);
  padding: 40px 30px 34px;
  text-align: center;
  overflow: hidden;
  animation: sheet-pop .4s cubic-bezier(.3, 1.3, .4, 1);
}
.sea-waves { position: relative; height: 56px; margin-bottom: 6px; }
.wave {
  position: absolute; left: -20px; right: -20px; width: calc(100% + 40px); height: 30px;
  color: var(--c-hole);
  opacity: .5;
  animation: wave-slide 3.2s linear infinite;
}
.wave-b { color: var(--c-vent); animation-duration: 2.4s; opacity: .4; animation-direction: reverse; }
.wave-c { color: var(--red); animation-duration: 4s; opacity: .3; }
@keyframes wave-slide {
  from { transform: translateX(-30px); }
  to { transform: translateX(30px); }
}
.bob-bottle {
  display: inline-grid; place-items: center;
  color: var(--ink);
  animation: bottle-bob 1.6s ease-in-out infinite;
}
@keyframes bottle-bob {
  0%, 100% { transform: translateY(0) rotate(-6deg); }
  50% { transform: translateY(-10px) rotate(7deg); }
}
.sea-text { font-family: var(--font-hand); font-size: 19px; margin-top: 10px; }
.sea-sub { font-size: 12.5px; color: var(--ink-soft); }

/* 登录注册 */
.auth-tabs {
  display: flex; gap: 6px;
  margin: 18px 0 20px;
}
.auth-tab {
  flex: 1;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  padding: 9px 0;
  font-size: 14px; font-weight: 900;
  color: var(--ink-soft);
  background: var(--card);
  transition: background .2s, color .2s;
}
.auth-tab.active { background: var(--ink); color: var(--paper); }
.auth-form { gap: 16px; }
.auth-submit { justify-content: center; width: 100%; }
.auth-switch {
  font-size: 13px; color: var(--ink-soft); text-align: center;
}
.auth-switch button {
  color: var(--red); font-weight: 900;
  text-decoration: underline wavy var(--red) 1.5px;
  text-underline-offset: 3px;
}
.field select {
  width: 100%;
  background: var(--card);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  padding: 11px 14px;
  font-size: 15px;
  outline: none;
  transition: box-shadow .2s, transform .2s;
  cursor: pointer;
}
.field select:focus { transform: translate(-1px, -1px); box-shadow: 3px 3px 0 rgba(38, 50, 74, .18); }

/* 扔瓶封蜡变体：瓶子飞走 */
.wax-core.bottle-core { background: var(--c-hole); border-color: var(--ink); color: #fff8ec; }

/* 响应式补充 */
@media (max-width: 760px) {
  .bottle-options { grid-template-columns: 1fr; }
  /* 手机端：长学校名会挤爆顶栏，胶囊只保留头像圆点，完整信息点头像菜单里看 */
  .uc-text { display: none; }
  .user-chip { padding: 4px; }
}
@media (prefers-reduced-motion: reduce) {
  .wave, .bob-bottle { animation: none !important; }
}
\n
/* 个人中心 */
.profile-sheet { position:relative; width:min(700px,100%); max-height:min(88vh,900px); overflow-y:auto; background:var(--card); border:2.5px solid var(--ink); border-radius:var(--radius); box-shadow:var(--shadow-hard-lg); padding:26px; }
.profile-head { display:flex; align-items:center; gap:16px; padding:4px 28px 20px 4px; border-bottom:2px dashed var(--line); }
.profile-head h3 { margin:2px 0 4px; font-size:28px; }
.profile-head p { margin:0; }
.profile-meta { color:var(--ink-soft); font-size:13px; }
.profile-avatar { width:58px; height:58px; display:grid; place-items:center; flex:0 0 58px; background:var(--yellow); color:var(--ink); border:2px solid var(--ink); border-radius:50%; box-shadow:3px 3px 0 rgba(38,50,74,.16); font-family:var(--font-hand); font-size:28px; }
.profile-stats { display:grid; grid-template-columns:repeat(3,1fr); gap:10px; padding:18px 0 6px; }
.profile-stat { border:1.5px solid var(--line); background:rgba(255,255,255,.35); padding:12px 10px; text-align:center; border-radius:4px; }
.profile-stat b { display:block; font-family:var(--font-hand); font-size:25px; font-weight:400; }
.profile-stat span { font-size:12px; color:var(--ink-soft); }
.profile-section { padding-top:20px; }
.profile-section-head { display:flex; justify-content:space-between; align-items:center; gap:12px; margin-bottom:10px; }
.profile-section-head h4 { margin:0; font-size:17px; }
.profile-hint { color:var(--ink-soft); font-size:11px; }
.profile-unread { color:var(--red); font-size:12px; font-weight:800; }
.profile-notices, .profile-posts { margin:0; padding:0; list-style:none; display:grid; gap:9px; }
.profile-notice, .profile-post { border:1.5px solid var(--line); border-radius:4px; padding:12px 14px; background:rgba(255,255,255,.3); }
.profile-notice.unread { border-color:var(--red); box-shadow:2px 2px 0 rgba(199,91,98,.12); }
.profile-notice strong, .profile-post strong { display:block; font-size:14px; }
.profile-notice p { margin:5px 0 0; color:var(--ink-soft); font-size:13px; line-height:1.6; }
.profile-notice small, .profile-post small { display:block; color:var(--ink-soft); font-size:11px; margin-top:7px; }
.profile-post-top { display:flex; justify-content:space-between; gap:10px; align-items:start; }
.profile-post-metrics { color:var(--ink-soft); font-size:12px; white-space:nowrap; }
.profile-empty { padding:20px 10px; text-align:center; color:var(--ink-soft); border:1.5px dashed var(--line); border-radius:4px; font-size:13px; }
@media (max-width:560px) {
  .profile-sheet { padding:20px 16px; max-height:92vh; }
  .profile-head h3 { font-size:24px; }
  .profile-stats { gap:6px; }
  .profile-stat { padding:10px 5px; }
  .profile-stat b { font-size:22px; }
  .profile-section-head { align-items:flex-start; flex-direction:column; gap:4px; }
  .profile-post-top { flex-direction:column; gap:5px; }
}

.post-location, .comment-location { display: inline-flex; flex: 0 0 auto; align-items: center; min-width: max-content; color: var(--ink-soft); font-size: 11px; white-space: nowrap !important; }

/* Keep compact post metadata readable on narrow screens. */
@media (max-width: 760px) {
  .post-foot {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    grid-template-areas:
      "nick like cmt"
      "time location location";
    align-items: center;
    column-gap: 9px;
    row-gap: 7px;
  }

  .post-nick {
    grid-area: nick;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .post-time {
    grid-area: time;
    margin-right: 0;
    min-width: max-content;
    white-space: nowrap;
  }

  .post-location {
    grid-area: location;
    justify-self: start;
  }

  .postmark-like { grid-area: like; }
  .post-cmt { grid-area: cmt; }
}