/* ===========================================================
   Mobirainy — 磨砂悬浮玻璃
   =========================================================== */

:root {
  --ink: #15212b;
  --ink-soft: #4b5c6b;
  --ink-faint: #7c8d9b;
  --rain: #3e6e8c;
  --rain-deep: #26506a;

  --glass: rgba(255, 255, 255, 0.42);
  --glass-strong: rgba(255, 255, 255, 0.64);
  --glass-line: rgba(255, 255, 255, 0.7);
  --blur: 22px;

  --r: 24px;
  --r-sm: 14px;

  --shadow: 0 24px 54px -28px rgba(26, 48, 66, 0.55), 0 3px 12px -6px rgba(26, 48, 66, 0.16);
  --shadow-lift: 0 36px 68px -26px rgba(26, 48, 66, 0.5), 0 8px 20px -10px rgba(26, 48, 66, 0.22);
  --inner-line: inset 0 1px 0 rgba(255, 255, 255, 0.8);

  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono",
    "Courier New", monospace;

  --page: min(1140px, calc(100% - 40px));
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--ink);
  background: #e9eef2;
  background-image:
    radial-gradient(1100px 760px at 8% -12%, #dfeaf1 0%, rgba(223, 234, 241, 0) 62%),
    radial-gradient(900px 680px at 96% -6%, #e8e6f0 0%, rgba(232, 230, 240, 0) 58%),
    radial-gradient(1200px 900px at 50% 108%, #dbe7e3 0%, rgba(219, 231, 227, 0) 64%),
    linear-gradient(178deg, #eef3f7 0%, #dfe7ed 46%, #e7ecef 100%);
  background-attachment: fixed;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ---------- 氛围层：云团 + 雨丝 ---------- */

.atmosphere {
  position: fixed;
  inset: -20%;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  filter: saturate(112%);
}

.atmosphere span {
  position: absolute;
  display: block;
  border-radius: 50%;
  filter: blur(72px);
  opacity: 0.62;
  will-change: transform;
}

.atmosphere .blob-1 {
  width: 46vw;
  height: 46vw;
  left: -6%;
  top: 2%;
  background: #b7cfdd;
  animation: drift-a 30s ease-in-out infinite alternate;
}

.atmosphere .blob-2 {
  width: 40vw;
  height: 40vw;
  right: -8%;
  top: 12%;
  background: #c9c3dd;
  animation: drift-b 36s ease-in-out infinite alternate;
}

.atmosphere .blob-3 {
  width: 52vw;
  height: 52vw;
  left: 22%;
  bottom: -14%;
  background: #b9d2c7;
  animation: drift-c 42s ease-in-out infinite alternate;
}

@keyframes drift-a {
  to {
    transform: translate3d(6vw, 5vh, 0) scale(1.12);
  }
}
@keyframes drift-b {
  to {
    transform: translate3d(-7vw, 8vh, 0) scale(1.08);
  }
}
@keyframes drift-c {
  to {
    transform: translate3d(4vw, -7vh, 0) scale(0.92);
  }
}

#rain {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.7;
}

/* 一层极细的颗粒，让玻璃不那么"数字化" */
.grain {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.25;
  background-image: radial-gradient(rgba(21, 33, 43, 0.09) 1px, transparent 1px);
  background-size: 3px 3px;
  mix-blend-mode: multiply;
}

/* ---------- 玻璃基类 ---------- */

.glass {
  background: var(--glass);
  -webkit-backdrop-filter: blur(var(--blur)) saturate(155%);
  backdrop-filter: blur(var(--blur)) saturate(155%);
  border: 1px solid var(--glass-line);
  border-radius: var(--r);
  box-shadow: var(--shadow), var(--inner-line);
}

/* ---------- 顶栏 ---------- */

.topbar {
  position: sticky;
  top: 18px;
  z-index: 40;
  width: var(--page);
  margin: 18px auto 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 12px 10px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  -webkit-backdrop-filter: blur(26px) saturate(170%);
  backdrop-filter: blur(26px) saturate(170%);
  border: 1px solid rgba(255, 255, 255, 0.85);
  box-shadow: 0 18px 40px -26px rgba(26, 48, 66, 0.55), var(--inner-line);
}

/* 顶栏左侧：换成自己的头像和名字 */
.brand-chip {
  max-width: 240px;
  padding: 3px 12px 3px 3px;
  gap: 10px;
  border-color: transparent;
  background: transparent;
  box-shadow: none;
}

.brand-chip:hover {
  background: rgba(255, 255, 255, 0.52);
  transform: none;
}

.brand-chip .avatar-slot {
  width: 34px;
  height: 34px;
}

.brand-chip .chip-name {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.topbar nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.topbar .nav-link {
  font-size: 13.5px;
  color: var(--ink-soft);
  text-decoration: none;
  padding: 8px 10px;
  border-radius: 999px;
  transition: color 0.25s ease, background 0.25s ease;
}

.topbar .nav-link:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.55);
}

/* ---------- 按钮 ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  padding: 12px 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.28s cubic-bezier(0.2, 0.8, 0.3, 1), box-shadow 0.28s ease,
    background 0.28s ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  color: #f5fafc;
  background: linear-gradient(178deg, #3a6c8a 0%, #27536b 100%);
  border-color: rgba(255, 255, 255, 0.22);
  box-shadow: 0 14px 26px -14px rgba(37, 78, 101, 0.9),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 34px -16px rgba(37, 78, 101, 0.85),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.btn-ghost {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.52);
  border-color: rgba(255, 255, 255, 0.8);
  box-shadow: var(--inner-line);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.78);
  transform: translateY(-2px);
}

:where(a, button, input, textarea, [tabindex]):focus-visible {
  outline: 2px solid var(--rain);
  outline-offset: 3px;
}

/* ---------- 主体 ---------- */

main {
  position: relative;
  z-index: 1;
  width: var(--page);
  margin: 0 auto;
  padding-bottom: 80px;
}

/* ---------- 背景照片 ---------- */

.bg-photo {
  position: fixed;
  inset: 0;
  z-index: 0;
  background: url("/images/bg-memory.jpg") center 38% / cover no-repeat;
  opacity: 0;
  animation: photo-in 1.6s 0.15s ease both;
}

@keyframes photo-in {
  to {
    opacity: 1;
  }
}

.bg-veil {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(120% 78% at 50% -8%, rgba(250, 253, 255, 0.9), rgba(248, 252, 254, 0) 62%),
    linear-gradient(
      180deg,
      rgba(246, 250, 253, 0.66) 0%,
      rgba(241, 247, 251, 0.5) 42%,
      rgba(238, 245, 249, 0.74) 100%
    );
}

/* ---------- 首屏 ---------- */

.hero {
  position: relative;
  z-index: 2;
  padding: clamp(44px, 8vw, 84px) 0 clamp(38px, 5vw, 58px);
  text-align: center;
}

.eyebrow {
  margin: 0 0 clamp(16px, 2.6vw, 26px);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: #5d7383;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);
}

/* 玻璃横幅：大标题浮在一块起雾的玻璃上 */
.hero-banner {
  position: relative;
  display: inline-block;
  max-width: 100%;
  padding: clamp(20px, 3.2vw, 40px) clamp(26px, 5.2vw, 74px) clamp(22px, 3.4vw, 44px);
  border-radius: clamp(20px, 3vw, 36px);
  overflow: hidden;
  isolation: isolate;
  background: linear-gradient(
    158deg,
    rgba(255, 255, 255, 0.66) 0%,
    rgba(255, 255, 255, 0.34) 52%,
    rgba(255, 255, 255, 0.52) 100%
  );
  -webkit-backdrop-filter: blur(18px) saturate(145%);
  backdrop-filter: blur(18px) saturate(145%);
  animation: banner-in 1s cubic-bezier(0.2, 0.8, 0.3, 1) both;
  animation-delay: 0.15s;
}

@keyframes banner-in {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.986);
  }
}

/* 玻璃面上的水汽 */
.banner-sheen {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(46% 62% at 12% 6%, rgba(255, 255, 255, 0.88), rgba(255, 255, 255, 0) 72%),
    radial-gradient(40% 54% at 88% 98%, rgba(205, 228, 240, 0.62), rgba(255, 255, 255, 0) 74%);
}

/* 进场时一道斜光从玻璃上扫过 */
.banner-glare {
  position: absolute;
  inset: -30% -12%;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(
    100deg,
    rgba(255, 255, 255, 0) 38%,
    rgba(255, 255, 255, 0.72) 50%,
    rgba(255, 255, 255, 0) 62%
  );
  transform: translateX(-72%);
  animation: glare-sweep 1.5s 0.8s cubic-bezier(0.3, 0.7, 0.3, 1) both;
}

@keyframes glare-sweep {
  to {
    transform: translateX(72%);
  }
}

.hero-badge {
  position: relative;
  z-index: 2;
  margin: 0 0 0.55em;
  font-family: var(--font-mono);
  font-size: clamp(9px, 0.95vw, 11px);
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: rgba(43, 74, 94, 0.62);
}

.hero-title {
  position: relative;
  z-index: 2;
  display: block;
  margin: 0;
  color: #16222c;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.8), 0 14px 34px rgba(255, 255, 255, 0.4);
}

.hero-name {
  display: block;
  font-size: clamp(40px, 11.4vw, 118px);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 0.9;
  animation: title-in 1.1s 0.35s cubic-bezier(0.2, 0.8, 0.3, 1) both;
}

.hero-tail {
  display: block;
  margin-top: 0.12em;
  font-size: clamp(16px, 2.7vw, 32px);
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #2b4a5e;
  animation: title-in 1.1s 0.5s cubic-bezier(0.2, 0.8, 0.3, 1) both;
}

@keyframes title-in {
  from {
    opacity: 0;
    transform: translateY(14px);
    filter: blur(6px);
  }
}

.hero-note {
  max-width: 34em;
  margin: clamp(26px, 4vw, 40px) auto 0;
  font-size: clamp(14.5px, 1.5vw, 16px);
  line-height: 1.85;
  color: var(--ink-soft);
  position: relative;
  z-index: 3;
}

.hero-meta {
  position: relative;
  z-index: 3;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 22px;
  font-size: 11.5px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.hero-meta b {
  color: var(--rain-deep);
  font-weight: 700;
}

.hero-meta .dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.5;
}

/* ---------- 写作面板 ---------- */

.composer {
  padding: clamp(22px, 3vw, 34px);
  margin-bottom: clamp(34px, 5vw, 56px);
  animation: sheet-in 0.5s cubic-bezier(0.2, 0.8, 0.3, 1) both;
}

.composer[hidden] {
  display: none;
}

@keyframes sheet-in {
  from {
    opacity: 0;
    transform: translateY(-12px) scale(0.99);
  }
}

.composer-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.composer-head h2 {
  margin: 0;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.composer-head span {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.field-row {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 14px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 14px;
}

.field label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.field input,
.field textarea {
  width: 100%;
  font-family: inherit;
  font-size: 15px;
  line-height: 1.7;
  color: var(--ink);
  padding: 12px 15px;
  border-radius: var(--r-sm);
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.85);
  box-shadow: inset 0 1px 3px rgba(26, 48, 66, 0.06);
  transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.field textarea {
  min-height: 190px;
  resize: vertical;
}

.field input::placeholder,
.field textarea::placeholder {
  color: #9aa9b5;
}

.field input:focus,
.field textarea:focus {
  outline: none;
  background: rgba(255, 255, 255, 0.8);
  border-color: rgba(62, 110, 140, 0.55);
  box-shadow: 0 0 0 4px rgba(62, 110, 140, 0.12);
}

.composer-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 6px;
}

.composer-hint {
  font-size: 12.5px;
  color: var(--ink-faint);
  line-height: 1.6;
}

/* ---------- 可见性开关 ---------- */

.visibility-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  margin: 2px 0 16px;
}

.visibility-label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.visibility-switch {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.52);
  border: 1px solid rgba(255, 255, 255, 0.85);
  box-shadow: inset 0 1px 3px rgba(26, 48, 66, 0.07);
}

.visibility-option {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1;
  color: var(--ink-soft);
  background: transparent;
  border: 0;
  border-radius: 999px;
  padding: 9px 16px;
  cursor: pointer;
  transition: color 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}

.visibility-option:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.7);
}

.visibility-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1.5px solid currentColor;
  transition: background 0.25s ease;
}

.visibility-option.is-on {
  color: #fff;
  background: linear-gradient(140deg, #4a7d9b, #26506a);
  box-shadow: 0 10px 20px -12px rgba(38, 80, 106, 0.9);
}

.visibility-option.is-on .visibility-dot {
  background: currentColor;
}

.visibility-option[data-private='1'].is-on {
  background: linear-gradient(140deg, #837196, #4f4263);
  box-shadow: 0 10px 20px -12px rgba(79, 66, 99, 0.9);
}

.visibility-option:focus-visible {
  outline: 2px solid rgba(62, 110, 140, 0.55);
  outline-offset: 2px;
}

.visibility-hint {
  flex-basis: 100%;
  margin: 0;
  font-size: 12.5px;
  color: var(--ink-faint);
  line-height: 1.6;
}

/* ---------- 仅自己可见的徽章 ---------- */

.privacy-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid rgba(125, 107, 147, 0.32);
  background: rgba(125, 107, 147, 0.1);
  color: #5b4d6d;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
}

.privacy-lock {
  position: relative;
  width: 7px;
  height: 6px;
  border-radius: 1.5px;
  background: currentColor;
}

.privacy-lock::before {
  content: '';
  position: absolute;
  left: 50%;
  top: -4px;
  transform: translateX(-50%);
  width: 7px;
  height: 6px;
  box-sizing: border-box;
  border: 1.3px solid currentColor;
  border-bottom: 0;
  border-radius: 4px 4px 0 0;
}

.form-error {
  margin: 0;
  font-size: 12.5px;
  color: #a8434a;
  min-height: 1.2em;
}

/* ---------- 文章流 ---------- */

#feed {
  scroll-margin-top: 96px;
}

.feed-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
  padding: 0 4px;
}

.feed-head h2 {
  margin: 0;
  font-size: clamp(17px, 2vw, 20px);
  font-weight: 700;
  letter-spacing: -0.01em;
}

.feed-head span {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

/* 刷新按钮：放在文章列表标题右侧，点一下重新拉一遍文章 */
.feed-tools {
  display: flex;
  align-items: center;
  gap: 10px;
}

.refresh-btn {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex: none;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  box-shadow: var(--inner-line);
  color: var(--ink-soft);
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.refresh-btn:hover {
  background: rgba(255, 255, 255, 0.82);
  color: var(--ink);
  transform: translateY(-1px);
}

.refresh-btn:active {
  transform: translateY(0);
}

.refresh-btn:disabled {
  cursor: default;
  opacity: 0.65;
  transform: none;
}

.refresh-icon {
  display: block;
  transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.3, 1);
}

.refresh-btn:hover .refresh-icon {
  transform: rotate(40deg);
}

/* 刷新中：图标转起来，按钮不再响应 */
.refresh-btn.is-loading .refresh-icon {
  animation: refresh-spin 0.9s linear infinite;
}

.refresh-btn.is-loading:hover .refresh-icon {
  animation: refresh-spin 0.9s linear infinite;
}

@keyframes refresh-spin {
  to {
    transform: rotate(360deg);
  }
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.post-grid > :nth-child(even) {
  margin-top: 40px;
}

.card {
  --card-pad: 26px;
  display: block;
  position: relative;
  padding: 0;
  border-radius: var(--r);
  text-decoration: none;
  color: inherit;
  background: var(--glass);
  -webkit-backdrop-filter: blur(var(--blur)) saturate(155%);
  backdrop-filter: blur(var(--blur)) saturate(155%);
  border: 1px solid var(--glass-line);
  box-shadow: var(--shadow), var(--inner-line);
  transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.3, 1), box-shadow 0.5s ease,
    background 0.4s ease;
  animation: card-in 0.6s cubic-bezier(0.2, 0.8, 0.3, 1) both;
}

@keyframes card-in {
  from {
    opacity: 0;
  }
}

.card:hover,
.card:focus-visible {
  transform: translateY(-7px);
  background: var(--glass-strong);
  box-shadow: var(--shadow-lift), var(--inner-line);
}

.card-main {
  display: block;
  padding: var(--card-pad) var(--card-pad) calc(var(--card-pad) - 4px);
  text-decoration: none;
  color: inherit;
  border-radius: var(--r);
}

.card-cover {
  display: block;
  width: calc(100% + var(--card-pad) * 2);
  margin: calc(var(--card-pad) * -1) calc(var(--card-pad) * -1) 18px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.35);
  border-radius: calc(var(--r) - 1px) calc(var(--r) - 1px) 0 0;
}

.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 var(--card-pad) calc(var(--card-pad) - 6px);
}

.mini-action {
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 999px;
  padding: 7px 14px;
  cursor: pointer;
  transition: color 0.25s ease, background 0.25s ease, transform 0.25s ease;
}

.mini-action:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.85);
  transform: translateY(-1px);
}

.mini-action.danger {
  color: #9c3f47;
}

.mini-action.danger:hover {
  color: #fff;
  background: #a8434a;
  border-color: #a8434a;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 14px;
}

.card-meta .author {
  color: var(--rain-deep);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: none;
  font-size: 12px;
}

.card-title {
  margin: 0 0 12px;
  font-size: clamp(19px, 2.1vw, 23px);
  font-weight: 700;
  line-height: 1.42;
  letter-spacing: -0.012em;
  color: var(--ink);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-excerpt {
  margin: 0 0 20px;
  font-size: 14px;
  line-height: 1.8;
  color: var(--ink-soft);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 15px;
  border-top: 1px solid rgba(255, 255, 255, 0.62);
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.card-foot .more {
  color: var(--rain-deep);
  font-weight: 700;
  transition: transform 0.35s ease;
}

.card:hover .card-foot .more {
  transform: translateX(4px);
}

/* ---------- 空状态 ---------- */

.empty {
  padding: 52px 32px;
  text-align: center;
}

.empty[hidden] {
  display: none;
}

.empty h3 {
  margin: 0 0 10px;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.empty p {
  margin: 0 auto 24px;
  max-width: 26em;
  font-size: 14px;
  line-height: 1.8;
  color: var(--ink-soft);
}

.skeleton-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.skeleton {
  height: 190px;
  border-radius: var(--r);
  background: rgba(255, 255, 255, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.55);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  animation: pulse 1.6s ease-in-out infinite;
}

.skeleton:nth-child(even) {
  margin-top: 40px;
}

@keyframes pulse {
  50% {
    opacity: 0.5;
  }
}

/* ---------- 页脚 ---------- */

footer {
  position: relative;
  z-index: 1;
  padding: 0 20px 54px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

/* ---------- 提示条 ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: 30px;
  z-index: 90;
  transform: translate(-50%, 20px);
  padding: 13px 24px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.72);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 22px 44px -24px rgba(26, 48, 66, 0.6), var(--inner-line);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease, transform 0.35s cubic-bezier(0.2, 0.8, 0.3, 1);
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ---------- 阅读页 ---------- */

.reader-wrap {
  position: relative;
  z-index: 1;
  width: min(780px, calc(100% - 40px));
  margin: 0 auto;
  padding: clamp(30px, 6vw, 60px) 0 80px;
}

.reader {
  padding: clamp(26px, 4.6vw, 54px);
  animation: sheet-in 0.6s cubic-bezier(0.2, 0.8, 0.3, 1) both;
}

.reader-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 20px;
}

.reader-meta .author {
  font-family: var(--font-body);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
  color: var(--rain-deep);
}

.reader-title {
  margin: 0 0 clamp(20px, 3vw, 30px);
  font-size: clamp(27px, 5vw, 46px);
  font-weight: 800;
  line-height: 1.28;
  letter-spacing: -0.03em;
  color: #16222d;
}

.reader-body {
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.68);
  font-size: clamp(15.5px, 1.6vw, 17px);
  line-height: 1.95;
  color: #26333f;
  overflow-wrap: break-word;
}

.reader-body p {
  margin: 0 0 1.15em;
}

.reader-body p:last-child {
  margin-bottom: 0;
}

.reader-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: clamp(30px, 4vw, 44px);
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.68);
}

.state {
  text-align: center;
  padding: 60px 30px;
}

.state h1 {
  margin: 0 0 12px;
  font-size: clamp(21px, 3vw, 26px);
  font-weight: 700;
  letter-spacing: -0.01em;
}

.state p {
  margin: 0 auto 24px;
  max-width: 24em;
  font-size: 14px;
  line-height: 1.8;
  color: var(--ink-soft);
}

/* ---------- 响应式 ---------- */

@media (max-width: 860px) {
  :root {
    --page: calc(100% - 32px);
    --r: 20px;
  }

  .post-grid,
  .skeleton-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }

  .post-grid > :nth-child(even),
  .skeleton:nth-child(even) {
    margin-top: 0;
  }

  .field-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }

  .topbar {
    top: 12px;
    margin-top: 12px;
    padding: 9px 10px 9px 16px;
  }

  .topbar .nav-link {
    display: none;
  }

  .card {
    padding: 22px 20px 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  #rain {
    display: none;
  }
}

/* ---------- 小按钮与危险操作 ---------- */

.btn-small {
  padding: 9px 16px;
  font-size: 13px;
}

.btn-danger {
  color: #fff;
  background: linear-gradient(178deg, #a8585e 0%, #8d3f46 100%);
  border-color: rgba(255, 255, 255, 0.22);
  box-shadow: 0 14px 26px -14px rgba(141, 63, 70, 0.85),
    inset 0 1px 0 rgba(255, 255, 255, 0.26);
}

.btn-danger:hover {
  transform: translateY(-2px);
}

.btn[disabled] {
  opacity: 0.6;
  cursor: default;
  transform: none;
}

a.btn,
label.btn,
button {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

/* ---------- 配图 ---------- */

.media-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin: 2px 0 14px;
}

.media-row .plus {
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
}

.media-hint {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.media-preview {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.media-preview figure {
  margin: 0;
  aspect-ratio: 1;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.85);
  box-shadow: var(--inner-line);
  background: rgba(255, 255, 255, 0.4);
}

.media-preview img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---------- 阅读浮层 ---------- */

.reader-layer {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 4vh 20px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  animation: layer-in 0.3s ease both;
}

@keyframes layer-in {
  from {
    opacity: 0;
  }
}

.reader-scrim {
  position: fixed;
  inset: 0;
  background: rgba(228, 236, 242, 0.62);
  -webkit-backdrop-filter: blur(14px) saturate(120%);
  backdrop-filter: blur(14px) saturate(120%);
}

/* 浮层本身接收焦点给读屏用，但不要画出焦点环 */
.reader:focus,
.reader:focus-visible {
  outline: none;
}

.reader-layer .reader {
  position: relative;
  z-index: 1;
  width: min(760px, 100%);
  margin: auto 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(249, 252, 254, 0.92));
  -webkit-backdrop-filter: blur(30px) saturate(140%);
  backdrop-filter: blur(30px) saturate(140%);
  box-shadow: 0 40px 80px -40px rgba(26, 48, 66, 0.6), var(--inner-line);
}

.reader-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 22px;
}

.reader-top .reader-meta {
  margin-bottom: 0;
}

.edited-flag {
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid rgba(62, 110, 140, 0.3);
  color: var(--rain-deep);
  font-size: 10px;
  letter-spacing: 0.1em;
}

.reader-body img {
  display: block;
  max-width: 100%;
  width: auto;
  height: auto;
  margin: 0 auto 1.2em;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.35);
  box-shadow: 0 16px 34px -22px rgba(26, 48, 66, 0.55);
}

body.is-reading {
  overflow: hidden;
}

/* ---------- 触屏不要粘住 hover ---------- */

@media (hover: none) {
  .card:hover,
  .card:focus-visible {
    transform: none;
    background: var(--glass);
    box-shadow: var(--shadow), var(--inner-line);
  }

  .card:hover .card-foot .more,
  .mini-action:hover,
  .btn-primary:hover,
  .btn-ghost:hover,
  .btn-danger:hover {
    transform: none;
  }
}

/* ---------- 手机端 ---------- */

@media (max-width: 640px) {
  :root {
    --page: calc(100% - 24px);
    --r: 18px;
    --blur: 16px;
  }

  .topbar {
    top: 10px;
    margin-top: 10px;
    padding: 8px 8px 8px 14px;
    gap: 10px;
  }

  .topbar #openComposer {
    padding: 10px 16px;
    font-size: 13px;
  }

  .hero {
    padding: 44px 0 38px;
  }

  .hero-title {
    font-size: clamp(44px, 15vw, 76px);
  }

  .hero-note {
    font-size: 14px;
    line-height: 1.8;
    padding: 0 6px;
  }

  .hero-meta {
    gap: 10px;
    font-size: 10.5px;
  }

  .composer {
    padding: 18px 16px 20px;
    /* 手机上表单压住背后的照片，保证可读 */
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(249, 252, 254, 0.9));
  }

  .composer-head {
    margin-bottom: 16px;
  }

  .composer-head h2 {
    font-size: 17px;
  }

  .composer-head span {
    display: none;
  }

  .field input,
  .field textarea {
    font-size: 16px; /* 避免 iOS 聚焦时自动放大 */
  }

  .field textarea {
    min-height: 150px;
  }

  .composer-foot {
    gap: 10px;
  }

  .visibility-row {
    gap: 8px;
    margin-bottom: 14px;
  }

  .visibility-switch {
    width: 100%;
  }

  .visibility-option {
    flex: 1 1 auto;
    justify-content: center;
    padding: 10px 8px;
    font-size: 12px;
  }

  .composer-actions {
    display: flex;
    gap: 10px;
    width: 100%;
  }

  .composer-actions .btn {
    flex: 1 1 auto;
    padding: 12px 16px;
  }

  .card {
    --card-pad: 20px;
    animation: none;
    /* 手机上毛玻璃既费电又容易透出底层残影，卡片改成近乎不透明的奶白 */
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(248, 252, 254, 0.92));
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }

  .card-title {
    font-size: 19px;
  }

  .card-excerpt {
    font-size: 13.5px;
    -webkit-line-clamp: 4;
  }

  .card-actions {
    gap: 6px;
  }

  .feed-head {
    margin-bottom: 16px;
  }

  /* 手机上按钮做大一点，方便点 */
  .refresh-btn {
    width: 36px;
    height: 36px;
  }

  /* 阅读浮层在手机上铺满整屏，由面板内部滚动，退出按钮常驻吸顶 */
  .reader-layer {
    padding: 0;
    align-items: stretch;
    overflow: hidden;
  }

  .reader-layer .reader {
    width: 100%;
    max-width: none;
    margin: 0;
    height: 100%;
    min-height: 0;
    max-height: 100%;
    border-radius: 0;
    border-left: none;
    border-right: none;
    padding: 0 18px calc(28px + env(safe-area-inset-bottom));
    display: block;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    /* 手机上整屏阅读，不需要再透出背后的列表 */
    background: #fdfeff;
  }

  .reader-top {
    position: sticky;
    top: 0;
    z-index: 3;
    margin: 0 -18px 18px;
    padding: calc(10px + env(safe-area-inset-top)) 18px 10px;
    gap: 8px;
    background: linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.99) 0%,
      rgba(255, 255, 255, 0.96) 72%,
      rgba(255, 255, 255, 0.88) 100%
    );
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(21, 33, 43, 0.07);
  }

  .reader-top .reader-meta {
    font-size: 10px;
    gap: 8px;
  }

  .reader-scrim {
    border-radius: 0;
  }

  .reader-title {
    font-size: clamp(25px, 8vw, 32px);
  }

  .reader-body {
    font-size: 16px;
    line-height: 1.9;
  }

  .reader-actions {
    margin-top: 26px;
    padding-top: 20px;
    gap: 8px;
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .reader-actions .btn {
    padding: 13px 14px;
    font-size: 13.5px;
  }

  .toast {
    bottom: 20px;
    width: calc(100% - 32px);
    text-align: center;
    justify-content: center;
  }
}

/* ---------- 删除确认条 ---------- */

.confirm-bar {
  position: fixed;
  left: 50%;
  bottom: 26px;
  z-index: 95;
  transform: translateX(-50%);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  max-width: calc(100% - 32px);
  padding: 12px 14px 12px 20px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  -webkit-backdrop-filter: blur(22px) saturate(165%);
  backdrop-filter: blur(22px) saturate(165%);
  border: 1px solid rgba(255, 255, 255, 0.92);
  box-shadow: 0 24px 48px -24px rgba(26, 48, 66, 0.62), var(--inner-line);
  animation: sheet-in 0.32s cubic-bezier(0.2, 0.8, 0.3, 1) both;
}

.confirm-text {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.5;
}

.confirm-actions {
  display: flex;
  gap: 8px;
}

@media (max-width: 640px) {
  .confirm-bar {
    left: 12px;
    right: 12px;
    bottom: calc(14px + env(safe-area-inset-bottom));
    transform: none;
    max-width: none;
    justify-content: space-between;
    border-radius: 20px;
    padding: 12px 14px;
  }

  .confirm-text {
    flex: 1 1 100%;
  }

  .confirm-actions {
    width: 100%;
  }

  .confirm-actions .btn {
    flex: 1 1 auto;
  }
}

/* ---------- 不支持 backdrop-filter 的老浏览器：把玻璃调实一点保证可读 ---------- */

@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .glass,
  .card,
  .topbar,
  .confirm-bar,
  .reader-layer .reader,
  .reader-scrim,
  .field input,
  .field textarea {
    background: rgba(255, 255, 255, 0.88);
  }

  .reader-scrim {
    background: rgba(222, 232, 239, 0.78);
  }
}

/* ---------- 搜索 ---------- */

.search-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  width: min(420px, 100%);
  height: 46px;
  margin: 0 0 20px;
  padding: 0 14px;
  border-radius: 999px;
  color: var(--ink-soft);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.search-bar:focus-within {
  border-color: rgba(62, 110, 140, 0.5);
  box-shadow: 0 0 0 4px rgba(62, 110, 140, 0.12), var(--shadow), var(--inner-line);
}

.search-icon {
  display: flex;
  flex: none;
  color: var(--ink-faint);
}

.search-bar input {
  flex: 1 1 auto;
  min-width: 0;
  height: 100%;
  padding: 0;
  border: none;
  background: none;
  outline: none;
  font: inherit;
  font-size: 14.5px;
  color: var(--ink);
  -webkit-appearance: none;
  appearance: none;
}

.search-bar input::placeholder {
  color: #9aa9b5;
}

.search-bar input::-webkit-search-cancel-button,
.search-bar input::-webkit-search-decoration {
  -webkit-appearance: none;
  appearance: none;
}

.search-clear {
  flex: none;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(21, 33, 43, 0.08);
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  touch-action: manipulation;
  transition: background 0.2s ease, color 0.2s ease;
}

.search-clear:hover {
  background: rgba(21, 33, 43, 0.16);
  color: var(--ink);
}

mark {
  padding: 0 2px;
  border-radius: 3px;
  background: rgba(62, 110, 140, 0.22);
  color: inherit;
}

@media (max-width: 640px) {
  .search-bar {
    width: 100%;
    height: 44px;
    margin-bottom: 16px;
  }

  .search-bar input {
    /* 16px 避免 iOS 聚焦时自动放大 */
    font-size: 16px;
  }
}

/* ---------- 身份：头像与名字 ---------- */

.avatar-slot {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
}

.avatar {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.75);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5), 0 4px 12px -5px rgba(26, 48, 66, 0.5);
  color: rgba(255, 255, 255, 0.96);
}

.avatar svg {
  display: block;
  width: 62%;
  height: 62%;
}

.avatar-slot.is-empty .avatar {
  background: rgba(255, 255, 255, 0.62);
  color: rgba(43, 74, 94, 0.45);
  border-style: dashed;
  border-color: rgba(43, 74, 94, 0.28);
}

.card-avatar {
  width: 24px;
  height: 24px;
}

.profile-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 180px;
  padding: 6px 14px 6px 7px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.82);
  background: rgba(255, 255, 255, 0.52);
  box-shadow: var(--inner-line);
  color: var(--ink);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  touch-action: manipulation;
  transition: background 0.25s ease, transform 0.25s ease;
}

.profile-chip:hover {
  background: rgba(255, 255, 255, 0.82);
  transform: translateY(-1px);
}

undefined
.vip-badge {
  padding: 2px 7px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: #6b4a2a;
  background: linear-gradient(140deg, rgba(240, 209, 160, 0.95), rgba(214, 173, 110, 0.95));
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: 0 6px 14px -10px rgba(120, 84, 34, 0.9);
}

/* ---------- 进站动画 ---------- */

.boot {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(78% 64% at 50% 26%, #f6fafd 0%, #e7f0f6 58%, #dfeaf1 100%);
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

.boot-skip .boot {
  display: none !important;
}

.boot.is-out {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.boot-panel {
  width: min(460px, 100%);
  padding: clamp(26px, 5vw, 44px) clamp(22px, 5vw, 40px);
  border-radius: 28px;
  text-align: center;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.74), rgba(255, 255, 255, 0.46));
}

.boot-kicker {
  margin: 0 0 18px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: rgba(43, 74, 94, 0.6);
}

.boot-title {
  display: flex;
  justify-content: center;
  gap: 0.12em;
  margin: 0 0 18px;
  font-size: clamp(32px, 8vw, 52px);
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #16222c;
}

.boot-title span {
  display: inline-block;
  opacity: 0;
  transform: translateY(16px);
  filter: blur(8px);
  animation: boot-char 0.9s cubic-bezier(0.2, 0.8, 0.3, 1) both;
}

.boot-title span:nth-child(1) {
  animation-delay: 0.12s;
}
.boot-title span:nth-child(2) {
  animation-delay: 0.28s;
}
.boot-title span:nth-child(3) {
  animation-delay: 0.44s;
}
.boot-title span:nth-child(4) {
  animation-delay: 0.6s;
}

@keyframes boot-char {
  to {
    opacity: 1;
    transform: none;
    filter: blur(0);
  }
}

.boot-sub {
  margin: 0 0 22px;
  font-size: 13.5px;
  line-height: 1.8;
  color: var(--ink-soft);
  opacity: 0;
  animation: fade-up 0.8s 0.8s ease both;
}

.boot-bar {
  position: relative;
  height: 3px;
  margin-bottom: 22px;
  border-radius: 999px;
  background: rgba(21, 33, 43, 0.09);
  overflow: hidden;
}

.boot-bar i {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, #7fb0c6, #27536b);
  animation: bar-fill 1.7s 0.25s cubic-bezier(0.4, 0.1, 0.3, 1) both;
}

@keyframes bar-fill {
  to {
    width: 100%;
  }
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

#bootSkip {
  opacity: 0;
  animation: fade-up 0.6s 1.5s ease both;
}

/* ---------- 登录 / 选择身份 ---------- */

.login-layer {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow-y: auto;
  animation: layer-in 0.3s ease both;
}

.login-scrim {
  position: fixed;
  inset: 0;
  background: rgba(226, 236, 242, 0.6);
  -webkit-backdrop-filter: blur(12px) saturate(120%);
  backdrop-filter: blur(12px) saturate(120%);
}

.login {
  position: relative;
  z-index: 1;
  width: min(520px, 100%);
  margin: auto;
  padding: clamp(22px, 4vw, 38px);
  border-radius: 26px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.95), rgba(250, 253, 255, 0.91));
  animation: sheet-in 0.5s cubic-bezier(0.2, 0.8, 0.3, 1) both;
}

.login:focus,
.login:focus-visible {
  outline: none;
}

.login .boot-kicker {
  margin-bottom: 12px;
  text-align: left;
}

.login-title {
  margin: 0 0 8px;
  font-size: clamp(20px, 3vw, 26px);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #16222c;
}

.login-note {
  margin: 0 0 20px;
  font-size: 13px;
  line-height: 1.8;
  color: var(--ink-soft);
}

.avatar-grid {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 20px;
}

.avatar-option {
  width: 100%;
  aspect-ratio: 1;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 50%;
  background: none;
  cursor: pointer;
  touch-action: manipulation;
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.avatar-option:hover {
  transform: translateY(-2px) scale(1.04);
}

.avatar-option[aria-checked="true"] {
  border-color: rgba(39, 83, 107, 0.78);
  box-shadow: 0 0 0 4px rgba(62, 110, 140, 0.14);
}

.avatar-option .avatar {
  width: 100%;
  height: 100%;
}

.avatar-option .avatar svg {
  width: 54%;
  height: 54%;
}

.login-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 6px;
}

.login-actions .btn {
  flex: 1 1 auto;
}

.hero-note {
  color: #2c4354;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.92), 0 0 14px rgba(255, 255, 255, 0.85);
}

undefined
  .boot-panel {
    border-radius: 22px;
  }

  .boot-title {
    font-size: clamp(28px, 9vw, 42px);
  }

  .login-layer {
    align-items: flex-start;
    padding: 14px;
  }

  .login .field input {
    font-size: 16px;
  }

  .avatar-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
  }

  .avatar-option {
    width: 100%;
  }
}

body.is-locked {
  overflow: hidden;
}

/* ---------- 自上传头像 ---------- */

.avatar-img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.avatar-option.avatar-upload {
  display: grid;
  place-items: center;
  border: 2px dashed rgba(43, 74, 94, 0.32);
  background: rgba(255, 255, 255, 0.5);
}

.avatar-option.avatar-upload[aria-checked="true"] {
  border-style: solid;
  border-color: rgba(39, 83, 107, 0.78);
  background: none;
}

.avatar-plus {
  font-size: 20px;
  font-weight: 600;
  line-height: 1;
  color: rgba(43, 74, 94, 0.55);
}

.avatar-option.avatar-upload .avatar {
  width: 100%;
  height: 100%;
}

.avatar-hint {
  margin: -8px 0 18px;
  font-size: 12px;
  line-height: 1.7;
  color: var(--ink-faint);
}

.login .form-error {
  margin-top: -4px;
}

/* ---------- 上传自己的头像：独立按钮 ---------- */

.avatar-upload-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  max-width: 100%;
  padding: 6px 16px 6px 7px;
  margin-bottom: 10px;
  border: 1px dashed rgba(43, 74, 94, 0.35);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  color: var(--ink-soft);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  touch-action: manipulation;
  transition: background 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.avatar-upload-btn:hover {
  background: rgba(255, 255, 255, 0.85);
  border-color: rgba(43, 74, 94, 0.55);
}

.avatar-upload-btn.is-selected {
  border-style: solid;
  border-color: rgba(39, 83, 107, 0.78);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 0 0 4px rgba(62, 110, 140, 0.13);
  color: var(--ink);
}

.avatar-upload-label {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

#avatarUploadPreview {
  width: 30px;
  height: 30px;
}

#avatarUploadPreview .avatar {
  border-style: dashed;
}

.avatar-upload-btn.is-selected #avatarUploadPreview .avatar {
  border-style: solid;
}

/* ---------- 署名锁定 ---------- */

.signature-lock {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 47px;
  padding: 8px 14px 8px 8px;
  border-radius: var(--r-sm);
  background: rgba(255, 255, 255, 0.45);
  border: 1px dashed rgba(43, 74, 94, 0.28);
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ink);
}

.signature-lock .avatar-slot {
  width: 28px;
  height: 28px;
}

.signature-name {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.signature-hint {
  margin: 6px 0 0;
  font-size: 11.5px;
  line-height: 1.6;
  color: var(--ink-faint);
}

/* ---------- 评论区 ---------- */

.comments {
  margin-top: 30px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.72);
}

.comments-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.comments-head h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.comments-count {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.comment-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.comment {
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.85);
  box-shadow: var(--inner-line);
}

.comment-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  margin-bottom: 8px;
}

.comment-top .avatar-slot {
  width: 24px;
  height: 24px;
}

.comment-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--rain-deep);
}

.comment-time {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.comment-body {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.8;
  color: #26333f;
  white-space: pre-wrap;
  overflow-wrap: break-word;
}

.comment-remove {
  margin-left: auto;
  padding: 2px 6px;
  border: none;
  border-radius: 8px;
  background: none;
  font-family: inherit;
  font-size: 11.5px;
  color: #9c3f47;
  cursor: pointer;
  touch-action: manipulation;
}

.comment-remove:hover {
  background: rgba(168, 67, 74, 0.1);
}

.comment-empty {
  margin: 0 0 14px;
  font-size: 13px;
  color: var(--ink-faint);
}

.comment-form {
  margin-top: 16px;
  padding: 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.82);
}

.comment-who {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
}

.comment-who .avatar-slot {
  width: 24px;
  height: 24px;
}

.comment-setup {
  margin-left: auto;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(43, 74, 94, 0.3);
  background: rgba(255, 255, 255, 0.72);
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--rain-deep);
  cursor: pointer;
  touch-action: manipulation;
}

.comment-form textarea {
  width: 100%;
  min-height: 84px;
  resize: vertical;
  padding: 11px 13px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: inset 0 1px 3px rgba(26, 48, 66, 0.06);
  font-family: inherit;
  font-size: 14.5px;
  line-height: 1.7;
  color: var(--ink);
}

.comment-form textarea:focus {
  outline: none;
  background: #fff;
  border-color: rgba(62, 110, 140, 0.55);
  box-shadow: 0 0 0 4px rgba(62, 110, 140, 0.12);
}

.comment-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
}

.comment-hint {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

@media (max-width: 640px) {
  .signature-hint {
    display: none;
  }

  .comment-form textarea {
    min-height: 76px;
    font-size: 16px;
  }

  .comment-actions {
    flex-wrap: wrap;
  }

  .comment-actions .btn {
    flex: 1 1 auto;
  }
}

/* ---------- 进入梦境 ---------- */

.hero-dream {
  position: relative;
  z-index: 3;
  margin-top: clamp(20px, 3vw, 30px);
}

.dream-entry {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 12px 24px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  color: #eaf4fa;
  background: linear-gradient(160deg, rgba(24, 34, 44, 0.92), rgba(9, 15, 20, 0.94));
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 18px 36px -20px rgba(4, 10, 16, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.18);
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.3, 1), box-shadow 0.3s ease,
    background 0.3s ease;
}

.dream-entry:hover {
  transform: translateY(-2px);
  background: linear-gradient(160deg, rgba(34, 48, 60, 0.95), rgba(14, 22, 28, 0.95));
  box-shadow: 0 24px 44px -22px rgba(4, 10, 16, 0.95),
    inset 0 1px 0 rgba(255, 255, 255, 0.26);
}

.dream-icon {
  display: flex;
  color: #cfe6f3;
}

/* ===========================================================
   消息中心 · 好友 · @
   =========================================================== */

undefined
.bell-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.82);
  background: rgba(255, 255, 255, 0.52);
  box-shadow: var(--inner-line);
  color: var(--ink-soft);
  cursor: pointer;
  touch-action: manipulation;
  transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.bell-btn:hover {
  background: rgba(255, 255, 255, 0.82);
  color: var(--ink);
  transform: translateY(-1px);
}

.bell-btn svg {
  display: block;
}

.bell-btn.has-news {
  color: var(--rain-deep);
}

.bell-badge {
  position: absolute;
  top: -3px;
  right: -4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  color: #fff;
  background: linear-gradient(160deg, #e2705f, #b9432f);
  border: 1.5px solid rgba(255, 255, 255, 0.92);
  box-shadow: 0 6px 14px -8px rgba(150, 50, 32, 0.9);
}

.at-mark {
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1;
  color: var(--rain);
}

/* ---------- 阅读页上的加好友 ---------- */

.friend-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 11px;
  border-radius: 999px;
  border: 1px solid rgba(62, 110, 140, 0.34);
  background: rgba(255, 255, 255, 0.66);
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.6;
  color: var(--rain-deep);
  cursor: pointer;
  transition: background 0.24s ease, color 0.24s ease, border-color 0.24s ease;
}

.friend-btn:hover {
  background: #fff;
}

.friend-btn[disabled] {
  cursor: default;
  border-color: rgba(62, 110, 140, 0.16);
  background: rgba(255, 255, 255, 0.44);
  color: var(--ink-faint);
  font-weight: 600;
}

/* ---------- 消息中心面板 ---------- */

.social-layer {
  position: fixed;
  inset: 0;
  z-index: 88;
  display: flex;
  justify-content: flex-end;
  padding: 16px;
  animation: layer-in 0.3s ease both;
}

.social-scrim {
  position: fixed;
  inset: 0;
  background: rgba(226, 236, 242, 0.55);
  -webkit-backdrop-filter: blur(10px) saturate(120%);
  backdrop-filter: blur(10px) saturate(120%);
}

.social {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: min(432px, 100%);
  max-height: 100%;
  padding: 20px 16px 0;
  border-radius: 26px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.96), rgba(248, 252, 255, 0.92));
  animation: social-in 0.42s cubic-bezier(0.2, 0.8, 0.3, 1) both;
}

.social:focus,
.social:focus-visible {
  outline: none;
}

@keyframes social-in {
  from {
    opacity: 0;
    transform: translateX(28px);
  }
}

.social-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.social-head .boot-kicker {
  margin: 0 0 6px;
  text-align: left;
}

.social-title {
  margin: 0;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #16222c;
}

.social-close {
  flex: none;
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.62);
  box-shadow: var(--inner-line);
  font-family: inherit;
  font-size: 17px;
  line-height: 1;
  color: var(--ink-soft);
  cursor: pointer;
}

.social-close:hover {
  background: #fff;
  color: var(--ink);
}

.social-tabs {
  display: flex;
  gap: 5px;
  padding: 5px;
  margin-bottom: 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.84);
  box-shadow: var(--inner-line);
}

.social-tab {
  flex: 1 1 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 9px 4px;
  border: none;
  border-radius: 999px;
  background: none;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  color: var(--ink-soft);
  cursor: pointer;
  transition: background 0.24s ease, color 0.24s ease;
}

.social-tab.is-on {
  background: linear-gradient(178deg, #3a6c8a 0%, #27536b 100%);
  color: #f5fafc;
  box-shadow: 0 10px 20px -14px rgba(37, 78, 101, 0.9),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(160deg, #e2705f, #b9432f);
}

.social-tab.is-on .tab-count {
  background: rgba(255, 255, 255, 0.3);
}

.tab-count-plain {
  font-family: var(--font-mono);
  font-size: 10.5px;
  opacity: 0.7;
}

.social-panels {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 0 2px 20px;
}

.social-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.social-item {
  display: flex;
  gap: 10px;
  padding: 11px 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: var(--inner-line);
  transition: background 0.22s ease, border-color 0.22s ease;
}

.social-item.is-unread {
  background: rgba(240, 247, 252, 0.96);
  border-color: rgba(126, 170, 197, 0.5);
}

.social-item.is-clickable {
  cursor: pointer;
}

.social-item.is-clickable:hover {
  background: #fff;
}

.social-avatar {
  width: 32px;
  height: 32px;
  flex: none;
}

.social-item-main {
  flex: 1 1 auto;
  min-width: 0;
}

.social-item-top {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.social-item-name {
  overflow: hidden;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.social-item-time {
  flex: none;
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--ink-faint);
  white-space: nowrap;
}

.social-item-text {
  margin: 4px 0 0;
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--ink-soft);
  overflow-wrap: anywhere;
}

.social-item-text b {
  font-weight: 600;
  color: var(--ink);
}

.social-item-actions {
  display: flex;
  gap: 6px;
  margin-top: 9px;
}

.social-item-actions .btn {
  padding: 7px 15px;
  font-size: 12px;
}

.social-item-actions .btn-ghost {
  background: rgba(255, 255, 255, 0.7);
}

.social-empty {
  margin: 24px 4px;
  font-size: 12.5px;
  line-height: 1.9;
  text-align: center;
  color: var(--ink-faint);
}

.social-note {
  margin: 12px 4px 0;
  font-size: 11.5px;
  line-height: 1.8;
  color: var(--ink-faint);
}

.social-foot {
  display: flex;
  justify-content: flex-end;
  margin-top: 14px;
}

.friend-search {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.friend-search input {
  flex: 1 1 auto;
  min-width: 0;
  padding: 10px 15px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.86);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: var(--inner-line);
  font-family: inherit;
  font-size: 13px;
  color: var(--ink);
}

.friend-search input::placeholder {
  color: var(--ink-faint);
}

.friend-search input:focus {
  outline: none;
  border-color: rgba(62, 110, 140, 0.48);
  background: #fff;
}

.friend-search .btn {
  flex: none;
}

/* ---------- @ 好友的选择框 ---------- */

.mention-pop {
  position: fixed;
  z-index: 96;
  width: min(268px, calc(100vw - 24px));
  max-height: 232px;
  padding: 6px;
  overflow-y: auto;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.92);
  background: rgba(255, 255, 255, 0.97);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  box-shadow: 0 26px 50px -26px rgba(26, 48, 66, 0.6), 0 3px 12px -7px rgba(26, 48, 66, 0.32);
  animation: mention-in 0.18s ease both;
}

@keyframes mention-in {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
}

.mention-tip {
  margin: 4px 6px 6px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--ink-faint);
}

.mention-option {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 7px 9px;
  border: none;
  border-radius: 11px;
  background: none;
  font-family: inherit;
  font-size: 13px;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.mention-option .avatar-slot {
  width: 22px;
  height: 22px;
}

.mention-option:hover,
.mention-option.is-active {
  background: rgba(62, 110, 140, 0.1);
}

.mention-option-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mention-empty {
  margin: 0;
  padding: 10px 12px;
  font-size: 12px;
  line-height: 1.8;
  color: var(--ink-faint);
}

/* 正文里的 @ 高亮 */
.mention-tag {
  padding: 1px 5px;
  border-radius: 6px;
  background: rgba(62, 110, 140, 0.12);
  font-weight: 600;
  color: var(--rain-deep);
}

@media (max-width: 640px) {
  .social-layer {
    padding: 0;
  }

  .social {
    width: 100%;
    max-height: 100%;
    border-radius: 0;
    border-left: none;
    border-right: none;
    padding: 16px 12px 0;
  }

  .bell-btn {
    width: 34px;
    height: 34px;
  }

  .topbar .nav-link {
    display: none;
  }

  /* 手机上顶栏挤，只留「所有用户」的图标 */
  .people-btn {
    width: 34px;
    height: 34px;
    padding: 0;
    justify-content: center;
  }

  .people-btn-label {
    display: none;
  }
}
