/* ============================================================
   大学生吐槽网 · 深夜树洞
   设计语言：深墨夜色 + 月光紫 / 一点暖黄灯光
   ============================================================ */

/* ---------- 设计变量 ---------- */
:root {
  --bg: #080a12;
  --bg-deep: #06080e;
  --surface: #161a2a;
  --surface-2: #1a1f31;
  --surface-3: #1f2438;

  --line: rgba(255, 255, 255, .075);
  --line-2: rgba(255, 255, 255, .12);
  --line-3: rgba(255, 255, 255, .175);

  --text: #eef1fb;
  --text-2: #c8cde0;
  --muted: #9ba2be;
  --faint: #7b83a2;

  --accent: #a8b8ff;
  --accent-2: #cbb0ff;
  --accent-ink: #0a0d1a;
  --warm: #ffd39b;
  --danger: #ff8298;
  --success: #8ee3b0;

  --r-xl: 24px;
  --r-lg: 20px;
  --r-md: 14px;
  --r-sm: 10px;

  --header-h: 70px;
  --ease: cubic-bezier(.22, .9, .28, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --spring: cubic-bezier(.34, 1.35, .64, 1);

  --shadow-card:
    inset 0 1px 0 rgba(255, 255, 255, .045),
    0 1px 2px rgba(0, 0, 0, .4),
    0 24px 50px -32px rgba(0, 0, 0, .9);
  --shadow-lift:
    inset 0 1px 0 rgba(255, 255, 255, .06),
    0 2px 4px rgba(0, 0, 0, .32),
    0 30px 60px -34px rgba(0, 0, 0, .95);

  --font: "PingFang SC", "HarmonyOS Sans SC", "MiSans", "Microsoft YaHei UI",
    "Microsoft YaHei", "Noto Sans SC", "Segoe UI", system-ui, -apple-system, sans-serif;
}

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

html {
  scroll-behavior: smooth;
  scrollbar-gutter: stable;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(1200px 620px at 10% -12%, rgba(120, 142, 255, .16), transparent 62%),
    radial-gradient(900px 520px at 96% -4%, rgba(186, 138, 255, .12), transparent 60%),
    linear-gradient(180deg, #090b14 0%, var(--bg) 42%, var(--bg-deep) 100%);
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

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

::selection { background: rgba(168, 184, 255, .3); color: #fff; }

:focus-visible {
  outline: 2px solid rgba(168, 184, 255, .75);
  outline-offset: 2px;
}

button { font-family: inherit; -webkit-tap-highlight-color: transparent; }
input, textarea { font-family: inherit; }

button:disabled { cursor: not-allowed; }

.svg-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.icon {
  width: 18px;
  height: 18px;
  display: block;
  flex: none;
  fill: none;
}

kbd {
  display: inline-block;
  padding: 0 5px;
  border-radius: 5px;
  border: 1px solid var(--line-2);
  background: rgba(255, 255, 255, .045);
  color: var(--text-2);
  font-family: inherit;
  font-size: 10.5px;
  line-height: 17px;
  letter-spacing: .02em;
}

/* 滚动条 */
* { scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .14) transparent; }
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, .11);
  border-radius: 99px;
  border: 2px solid transparent;
  background-clip: content-box;
}
::-webkit-scrollbar-thumb:hover { background: rgba(168, 184, 255, .38); background-clip: content-box; }

/* ---------- 环境光 ---------- */
.ambient {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  will-change: transform;
}

.orb-a {
  width: 46vw; height: 46vw;
  left: -12vw; top: -18vw;
  background: radial-gradient(circle, rgba(128, 148, 255, .26), transparent 68%);
  animation: drift-a 34s ease-in-out infinite alternate;
}

.orb-b {
  width: 40vw; height: 40vw;
  right: -14vw; top: 18vh;
  background: radial-gradient(circle, rgba(190, 140, 255, .18), transparent 68%);
  animation: drift-b 42s ease-in-out infinite alternate;
}

.orb-c {
  width: 34vw; height: 34vw;
  left: 30vw; bottom: -22vw;
  background: radial-gradient(circle, rgba(255, 196, 128, .08), transparent 68%);
  animation: drift-c 48s ease-in-out infinite alternate;
}

@keyframes drift-a {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(5vw, 6vh, 0) scale(1.08); }
}
@keyframes drift-b {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(-6vw, -5vh, 0) scale(1.1); }
}
@keyframes drift-c {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(4vw, -4vh, 0) scale(1.06); }
}

/* ---------- 布局 ---------- */
.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 3;
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 316px;
  gap: 22px;
  align-items: start;
  padding-top: 26px;
  padding-bottom: 48px;
}

.main-col {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}

.side-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: sticky;
  top: 92px;
}

/* ---------- 通用卡片 ---------- */
.card {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background-color: rgba(22, 26, 42, .92);
  background-image: linear-gradient(180deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, .012) 55%, rgba(255, 255, 255, 0));
  box-shadow: var(--shadow-card);
}

/* ---------- 顶栏 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  padding: 13px 0;
  background: rgba(8, 10, 18, .72);
  border-bottom: 1px solid transparent;
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  transition: padding .35s var(--ease), background .35s var(--ease), border-color .35s var(--ease);
}

.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(168, 184, 255, .06), transparent 70%);
  opacity: 0;
  transition: opacity .35s var(--ease);
}

.site-header.compact {
  padding: 7px 0;
  background: rgba(8, 10, 18, .88);
  border-bottom-color: var(--line);
}

.site-header.compact::before { opacity: 1; }

.header-inner {
  display: flex;
  align-items: center;
  gap: 18px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1;
}

.brand-mark {
  width: 40px;
  height: 40px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 13px;
  color: var(--warm);
  background:
    radial-gradient(120% 120% at 30% 15%, rgba(255, 211, 155, .22), transparent 60%),
    radial-gradient(120% 120% at 70% 100%, rgba(168, 184, 255, .22), transparent 60%),
    rgba(255, 255, 255, .03);
  border: 1px solid rgba(255, 255, 255, .09);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14), 0 8px 20px -12px rgba(168, 184, 255, .8);
  transition: transform .5s var(--spring), box-shadow .5s var(--ease);
}

.brand:hover .brand-mark {
  transform: rotate(-8deg) scale(1.04);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18), 0 10px 26px -12px rgba(255, 211, 155, .55);
}

.brand-mark .icon { width: 21px; height: 21px; }

.brand-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.25;
}

.brand-text strong {
  font-size: 17.5px;
  font-weight: 650;
  letter-spacing: .05em;
  background: linear-gradient(100deg, #f3f5ff 10%, #c9d2ff 55%, #e2cdff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
}

.brand-text small {
  margin-top: 3px;
  font-size: 10.5px;
  color: var(--faint);
  letter-spacing: .16em;
  white-space: nowrap;
  transition: opacity .3s var(--ease), height .3s var(--ease);
}

.header-stats {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 4px;
}

.stat {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.stat b {
  font-size: 17px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.01em;
  color: var(--text);
}

.stat span {
  font-size: 11px;
  color: var(--faint);
  letter-spacing: .04em;
  white-space: nowrap;
}

.stat-rule {
  width: 1px;
  height: 16px;
  background: var(--line-2);
}

.stat.bump b { animation: stat-bump .45s var(--spring); }

@keyframes stat-bump {
  0% { transform: scale(1); color: var(--text); }
  35% { transform: scale(1.16); color: var(--accent); }
  100% { transform: scale(1); color: var(--text); }
}

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

.scroll-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 1.5px;
  overflow: hidden;
  pointer-events: none;
}

.scroll-progress span {
  display: block;
  height: 100%;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: linear-gradient(90deg, rgba(168, 184, 255, .1), var(--accent) 40%, var(--accent-2));
  will-change: transform;
}

/* ---------- 按钮 ---------- */
.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 34px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, .032);
  color: var(--text-2);
  font-size: 12.5px;
  letter-spacing: .02em;
  cursor: pointer;
  transition: transform .18s var(--spring), background .22s var(--ease),
    border-color .22s var(--ease), color .22s var(--ease), box-shadow .22s var(--ease);
}

.btn-ghost .icon { width: 16px; height: 16px; color: var(--muted); transition: color .22s; }

.btn-ghost:hover {
  transform: translateY(-1px);
  color: var(--text);
  border-color: var(--line-3);
  background: rgba(255, 255, 255, .06);
  box-shadow: 0 8px 20px -14px rgba(0, 0, 0, .9);
}

.btn-ghost:hover .icon { color: var(--accent); }
.btn-ghost:active { transform: scale(.97); }

.btn-ghost.active {
  color: var(--accent-ink);
  border-color: transparent;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 10px 24px -12px rgba(168, 184, 255, .9);
}

.btn-ghost.active .icon { color: var(--accent-ink); }

.btn-primary {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 18px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, #c3cdff 0%, #dcc2ff 100%);
  color: var(--accent-ink);
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: .03em;
  cursor: pointer;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .65),
    0 1px 2px rgba(0, 0, 0, .3),
    0 14px 30px -14px rgba(150, 165, 255, .75);
  transition: transform .2s var(--spring), box-shadow .3s var(--ease), filter .25s var(--ease);
}

.btn-primary .icon { width: 16px; height: 16px; transition: transform .35s var(--spring); }

.btn-primary::after {
  content: "";
  position: absolute;
  inset: -40% -10%;
  background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, .55) 48%, transparent 62%);
  transform: translateX(-130%);
  transition: transform .75s var(--ease);
  pointer-events: none;
}

.btn-primary:hover {
  transform: translateY(-1.5px);
  filter: brightness(1.04);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .75),
    0 2px 4px rgba(0, 0, 0, .3),
    0 20px 38px -16px rgba(168, 184, 255, .85);
}

.btn-primary:hover::after { transform: translateX(130%); }
.btn-primary:hover .icon { transform: translateX(2px) translateY(-1px); }
.btn-primary:active { transform: scale(.97); }

.btn-primary.sm {
  height: 34px;
  padding: 0 14px;
  border-radius: 10px;
  font-size: 12.5px;
}

.btn-primary.is-empty {
  filter: saturate(.55) brightness(.82);
  box-shadow: 0 8px 20px -16px rgba(168, 184, 255, .5);
}

.btn-quiet {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 34px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, .028);
  color: var(--text-2);
  font-size: 12.5px;
  cursor: pointer;
  transition: transform .18s var(--spring), background .22s, border-color .22s, color .22s;
}

.btn-quiet:hover { background: rgba(255, 255, 255, .06); border-color: var(--line-3); color: var(--text); }
.btn-quiet:active { transform: scale(.97); }
.btn-quiet.sm { height: 30px; padding: 0 10px; font-size: 11.5px; }
.btn-quiet kbd { margin-left: 2px; }

.btn-danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  padding: 0 16px;
  border: 1px solid rgba(255, 130, 152, .35);
  border-radius: 10px;
  background: rgba(255, 130, 152, .13);
  color: #ffa8b8;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: transform .18s var(--spring), background .22s, border-color .22s;
}

.btn-danger:hover { background: rgba(255, 130, 152, .22); border-color: rgba(255, 130, 152, .55); }
.btn-danger:active { transform: scale(.97); }

.icon-btn {
  width: 30px;
  height: 30px;
  flex: none;
  display: grid;
  place-items: center;
  border: none;
  border-radius: 9px;
  background: transparent;
  color: var(--faint);
  cursor: pointer;
  transition: background .2s, color .2s, transform .2s var(--spring);
}

.icon-btn .icon { width: 16px; height: 16px; }
.icon-btn:hover { background: rgba(255, 255, 255, .06); color: var(--text); }
.icon-btn:active { transform: scale(.92); }

/* ---------- 发帖区 ---------- */
.composer {
  padding: 16px 18px 14px;
  transition: border-color .3s var(--ease), box-shadow .3s var(--ease);
}

.composer:focus-within {
  border-color: rgba(168, 184, 255, .22);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .06),
    0 0 0 1px rgba(168, 184, 255, .08),
    0 30px 60px -36px rgba(0, 0, 0, .95);
}

.composer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.identity {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.identity-avatar {
  width: 38px;
  height: 38px;
  flex: none;
  display: grid;
  place-items: center;
  font-size: 19px;
  line-height: 1;
  border-radius: 12px;
  background: radial-gradient(120% 120% at 25% 15%, rgba(168, 184, 255, .16), rgba(255, 255, 255, .03));
  border: 1px solid var(--line-2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .09);
}

.identity-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  line-height: 1.3;
}

.identity-label {
  font-size: 10px;
  letter-spacing: .16em;
  color: var(--faint);
}

.identity-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  max-width: 210px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.identity-name.flash { animation: name-flash .55s var(--ease); }

@keyframes name-flash {
  0% { opacity: 0; transform: translateY(4px); color: var(--accent); }
  100% { opacity: 1; transform: none; }
}

.char-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: none;
}

.char-ring {
  position: relative;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  flex: none;
}

.char-ring svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.char-ring circle { fill: none; stroke-width: 2.4; }

.ring-bg { stroke: rgba(255, 255, 255, .07); }

.ring-fg {
  stroke: var(--accent);
  stroke-linecap: round;
  stroke-dasharray: 100.53;
  stroke-dashoffset: 100.53;
  transition: stroke-dashoffset .22s linear, stroke .3s var(--ease);
}

.char-ring span {
  position: relative;
  font-size: 10px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}

.char-max { font-size: 10.5px; color: var(--faint); letter-spacing: .02em; }

.char-ring.warn .ring-fg { stroke: var(--warm); }
.char-ring.warn span { color: var(--warm); }
.char-ring.full .ring-fg { stroke: var(--danger); }
.char-ring.full span { color: var(--danger); }

.field { margin-top: 12px; }

.field textarea {
  display: block;
  width: 100%;
  min-height: 96px;
  max-height: 320px;
  padding: 13px 15px;
  resize: none;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: rgba(6, 8, 15, .45);
  color: var(--text);
  font-size: 15px;
  line-height: 1.78;
  letter-spacing: .01em;
  outline: none;
  overflow-y: auto;
  transition: border-color .25s var(--ease), background .25s var(--ease), box-shadow .25s var(--ease);
}

.field textarea::placeholder { color: var(--faint); opacity: .85; }

.field textarea:hover { border-color: var(--line-2); }

.field textarea:focus {
  border-color: rgba(168, 184, 255, .5);
  background: rgba(8, 10, 18, .6);
  box-shadow: 0 0 0 3px rgba(168, 184, 255, .1);
}

.field textarea.shake { animation: shake .4s var(--ease); border-color: rgba(255, 130, 152, .65); }

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  45% { transform: translateX(5px); }
  70% { transform: translateX(-3px); }
  88% { transform: translateX(2px); }
}

.composer-body {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin-top: 13px;
}

.pick-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.pick-label {
  width: 30px;
  flex: none;
  font-size: 10.5px;
  letter-spacing: .12em;
  color: var(--faint);
}

.composer-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 13px;
  padding-top: 13px;
  border-top: 1px solid var(--line);
}

.kbd-hint {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--faint);
  letter-spacing: .02em;
}

.kbd-hint i { font-style: normal; opacity: .5; }

/* ---------- chips ---------- */
.chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  min-width: 0;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 29px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, .022);
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  transition: transform .18s var(--spring), background .2s var(--ease),
    border-color .2s var(--ease), color .2s var(--ease), box-shadow .2s var(--ease);
}

.chip:hover {
  color: var(--text);
  border-color: var(--line-3);
  background: rgba(255, 255, 255, .055);
  transform: translateY(-1px);
}

.chip:active { transform: scale(.96); }

.chip.active {
  color: #f2f4ff;
  border-color: rgba(168, 184, 255, .45);
  background: linear-gradient(135deg, rgba(168, 184, 255, .26), rgba(203, 176, 255, .18));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), 0 6px 16px -10px rgba(168, 184, 255, .9);
  font-weight: 600;
}

.mood-group { gap: 6px; }

.mood-group .chip {
  width: 31px;
  height: 31px;
  padding: 0;
  justify-content: center;
  font-size: 15px;
  border-radius: 9px;
  color: var(--text-2);
}

.mood-group .chip.active {
  font-size: 16px;
  transform: translateY(-1px) scale(1.04);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14), 0 8px 18px -10px rgba(168, 184, 255, .9);
}

/* ---------- 筛选栏 ---------- */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 11px 13px;
}

.chip-scroll {
  flex: 1;
  min-width: 0;
  overflow: visible;
  padding: 2px;
  margin: -2px;
}

.chip-scroll .chip-group { flex-wrap: wrap; }

.seg {
  position: relative;
  display: inline-flex;
  flex: none;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(6, 8, 15, .4);
}

.seg-thumb {
  position: absolute;
  top: 3px;
  bottom: 3px;
  left: 0;
  width: var(--sw, 48px);
  transform: translateX(var(--sx, 0));
  border-radius: 7px;
  background: linear-gradient(135deg, #c3cdff, #dcc2ff);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6), 0 6px 14px -8px rgba(168, 184, 255, .9);
  transition: transform .4s var(--ease-out), width .4s var(--ease-out);
}

.seg-btn {
  position: relative;
  z-index: 1;
  height: 24px;
  padding: 0 12px;
  border: none;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: .04em;
  cursor: pointer;
  transition: color .3s var(--ease);
}

.seg-btn:hover { color: var(--text); }
.seg-btn.active { color: var(--accent-ink); font-weight: 700; }

/* ---------- 信息流 ---------- */
.feed {
  display: flex;
  flex-direction: column;
  gap: 13px;
}

.post-card {
  padding: 17px 19px 14px;
  border-radius: var(--r-lg);
  transition: transform .4s var(--ease), border-color .4s var(--ease),
    box-shadow .4s var(--ease), opacity .3s var(--ease);
}

/* 光标跟随的柔光 */
.post-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(320px circle at var(--mx, 50%) var(--my, 0%), rgba(168, 184, 255, .09), transparent 65%);
  transition: opacity .4s var(--ease);
}

.post-card:hover::before { opacity: 1; }

.post-card > * { position: relative; z-index: 1; }

@media (hover: hover) {
  .post-card:hover {
    transform: translateY(-2px);
    border-color: rgba(168, 184, 255, .2);
    box-shadow: var(--shadow-lift);
  }
}

.post-card.enter {
  animation: card-enter .6s var(--ease-out) both;
  animation-delay: calc(var(--i, 0) * 55ms);
}

@keyframes card-enter {
  from { opacity: 0; transform: translateY(16px) scale(.992); }
  to { opacity: 1; transform: none; }
}

.post-card.is-new {
  border-color: rgba(168, 184, 255, .45);
  box-shadow: 0 0 0 1px rgba(168, 184, 255, .28), 0 26px 60px -30px rgba(168, 184, 255, .5);
}

.post-card.removing {
  opacity: 0;
  transform: translateY(-6px) scale(.98);
  pointer-events: none;
}

/* 帖子头部 */
.post-head {
  display: flex;
  align-items: flex-start;
  gap: 11px;
}

.post-avatar {
  width: 38px;
  height: 38px;
  flex: none;
  display: grid;
  place-items: center;
  font-size: 19px;
  line-height: 1;
  border-radius: 12px;
  background: radial-gradient(120% 120% at 25% 15%, rgba(255, 255, 255, .07), rgba(255, 255, 255, .02));
  border: 1px solid var(--line-2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08);
}

.post-main { flex: 1; min-width: 0; }

.post-name-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 20px;
}

.post-extra {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.post-nick {
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: .01em;
  color: var(--text);
  max-width: 190px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.me-badge {
  display: inline-flex;
  align-items: center;
  height: 17px;
  padding: 0 6px;
  border-radius: 5px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: var(--accent-ink);
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: .06em;
  line-height: 1;
}

.follow-btn {
  display: inline-flex;
  align-items: center;
  height: 19px;
  padding: 0 7px;
  border: 1px solid rgba(168, 184, 255, .3);
  border-radius: 5px;
  background: rgba(168, 184, 255, .07);
  color: var(--accent);
  font-size: 10.5px;
  line-height: 1;
  letter-spacing: .02em;
  cursor: pointer;
  transition: transform .18s var(--spring), background .2s, border-color .2s, color .2s;
}

.follow-btn:hover { background: rgba(168, 184, 255, .16); border-color: rgba(168, 184, 255, .5); }
.follow-btn:active { transform: scale(.94); }

.follow-btn.followed {
  border-color: var(--line);
  background: transparent;
  color: var(--faint);
}

.tag-badge {
  display: inline-flex;
  align-items: center;
  height: 19px;
  padding: 0 7px;
  border-radius: 5px;
  border: 1px solid;
  font-size: 10.5px;
  line-height: 1;
  letter-spacing: .02em;
  white-space: nowrap;
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 3px;
  font-size: 11px;
  color: var(--faint);
  letter-spacing: .02em;
}

.post-mood { font-size: 12px; line-height: 1; }

.post-time { font-variant-numeric: tabular-nums; }

.post-text {
  margin: 11px 0 13px;
  font-size: 15px;
  line-height: 1.82;
  letter-spacing: .012em;
  color: #dde2f4;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  text-wrap: pretty;
}

.post-foot {
  display: flex;
  align-items: center;
  gap: 2px;
  margin: 0 -7px -2px;
}

.act {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 8px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: .01em;
  cursor: pointer;
  transition: background .2s var(--ease), color .2s var(--ease),
    border-color .2s var(--ease), transform .18s var(--spring);
}

.act .icon { width: 15.5px; height: 15.5px; transition: transform .3s var(--spring); }
.act:hover { color: var(--text-2); background: rgba(255, 255, 255, .045); }
.act:hover .icon { transform: translateY(-1px); }
.act:active { transform: scale(.96); }

.act-num {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  font-size: 11.5px;
  min-width: 8px;
  text-align: left;
}

.act-label { color: inherit; opacity: .82; }

.act.liked { color: #ff9bab; background: rgba(255, 130, 152, .08); border-color: rgba(255, 130, 152, .16); }
.act.liked:hover { background: rgba(255, 130, 152, .13); }
.act.liked .icon { animation: heart-pop .42s var(--spring); }

@keyframes heart-pop {
  0% { transform: scale(1); }
  35% { transform: scale(1.35) rotate(-6deg); }
  70% { transform: scale(.94); }
  100% { transform: scale(1); }
}

.del-btn {
  margin-left: auto;
  height: 28px;
  padding: 0 8px;
  border: none;
  border-radius: 7px;
  background: transparent;
  color: var(--faint);
  font-size: 11px;
  cursor: pointer;
  opacity: 0;
  transition: opacity .25s var(--ease), color .2s, background .2s;
}

.post-card:hover .del-btn, .del-btn:focus-visible { opacity: 1; }
.del-btn:hover { color: var(--danger); background: rgba(255, 130, 152, .08); }

/* ---------- 评论区 ---------- */
.comment-box {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  visibility: hidden;
  margin-top: 0;
  transition: grid-template-rows .42s var(--ease), opacity .3s var(--ease),
    visibility .42s var(--ease), margin-top .42s var(--ease);
}

.comment-inner { overflow: hidden; min-height: 0; }

.post-card.open-comments .comment-box {
  grid-template-rows: 1fr;
  opacity: 1;
  visibility: visible;
  margin-top: 12px;
}

.comment-content {
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.comment-item {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 8px;
  font-size: 12.5px;
  line-height: 1.65;
  transition: background .2s;
}

.comment-item:hover { background: rgba(255, 255, 255, .026); }
.comment-item.fresh { animation: comment-in .45s var(--ease-out); }

@keyframes comment-in {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: none; }
}

.comment-nick {
  flex: none;
  max-width: 130px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  opacity: .92;
}

.comment-text { flex: 1; min-width: 0; color: var(--text-2); overflow-wrap: anywhere; }

.comment-time {
  flex: none;
  color: var(--faint);
  font-size: 10.5px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.comment-del {
  flex: none;
  width: 18px;
  height: 18px;
  border: none;
  border-radius: 5px;
  background: transparent;
  color: var(--faint);
  font-size: 10px;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  transition: opacity .2s, color .2s, background .2s;
}

.comment-item:hover .comment-del { opacity: 1; }
.comment-del:hover { color: var(--danger); background: rgba(255, 130, 152, .1); }

.comment-empty {
  padding: 4px 8px 2px;
  color: var(--faint);
  font-size: 11.5px;
}

.comment-form {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.comment-form input {
  flex: 1;
  min-width: 0;
  height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(6, 8, 15, .45);
  color: var(--text);
  font-size: 12.5px;
  outline: none;
  transition: border-color .22s, box-shadow .22s, background .22s;
}

.comment-form input::placeholder { color: var(--faint); }

.comment-form input:focus {
  border-color: rgba(168, 184, 255, .45);
  background: rgba(8, 10, 18, .65);
  box-shadow: 0 0 0 3px rgba(168, 184, 255, .08);
}

.comment-send {
  flex: none;
  height: 34px;
  padding: 0 14px;
  border: 1px solid rgba(168, 184, 255, .28);
  border-radius: 9px;
  background: rgba(168, 184, 255, .12);
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s, border-color .2s, transform .18s var(--spring);
}

.comment-send:hover { background: rgba(168, 184, 255, .22); border-color: rgba(168, 184, 255, .5); }
.comment-send:active { transform: scale(.96); }

/* ---------- 空状态 ---------- */
.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 54px 20px 60px;
  text-align: center;
  border: 1px dashed var(--line-2);
  border-radius: var(--r-lg);
  background: rgba(255, 255, 255, .012);
}

.empty[hidden] { display: none; }

.empty-mark {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  margin-bottom: 6px;
  font-size: 26px;
  border-radius: 18px;
  background: radial-gradient(120% 120% at 30% 20%, rgba(168, 184, 255, .14), rgba(255, 255, 255, .02));
  border: 1px solid var(--line-2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08);
}

.empty p { font-size: 14px; color: var(--text-2); }
.empty small { font-size: 11.5px; color: var(--faint); }

/* ---------- 侧栏 ---------- */
.hot-card { padding: 15px 14px 8px; }
.about-card { padding: 15px 16px 14px; }

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 2px 8px;
}

.card-head h2 {
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .1em;
  color: var(--text-2);
}

.card-kicker {
  padding: 1px 6px;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--faint);
  font-size: 9.5px;
  letter-spacing: .14em;
}

.hot-list { list-style: none; counter-reset: hot; }

.hot-list li {
  counter-increment: hot;
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) auto;
  grid-template-areas:
    "rank text likes"
    ".    bar  bar";
  align-items: center;
  gap: 3px 9px;
  padding: 7px 7px 8px;
  border-radius: 9px;
  cursor: pointer;
  transition: background .2s, transform .25s var(--ease);
}

.hot-list li:hover { background: rgba(255, 255, 255, .04); transform: translateX(2px); }

.hot-list li::before {
  grid-area: rank;
  content: counter(hot);
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: rgba(255, 255, 255, .05);
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.hot-list li:nth-child(1)::before { background: linear-gradient(140deg, #ff9aae, #ffcf8b); color: #25101a; }
.hot-list li:nth-child(2)::before { background: linear-gradient(140deg, #ffcf8b, #ffe7a8); color: #2a1e0b; }
.hot-list li:nth-child(3)::before { background: linear-gradient(140deg, #a8b8ff, #8fe3e3); color: #0a1424; }

.hot-text {
  grid-area: text;
  min-width: 0;
  font-size: 12.5px;
  color: var(--text-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hot-likes {
  grid-area: likes;
  flex: none;
  color: var(--faint);
  font-size: 10.5px;
  font-variant-numeric: tabular-nums;
}

.hot-likes::before { content: "♥"; color: #ff8fa3; opacity: .8; margin-right: 3px; font-size: 9px; }

.hot-bar {
  grid-area: bar;
  height: 2px;
  margin: 2px 0 1px;
  border-radius: 2px;
  background: rgba(255, 255, 255, .055);
  overflow: hidden;
}

.hot-bar span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 2px;
  background: linear-gradient(90deg, rgba(168, 184, 255, .5), rgba(203, 176, 255, .8));
  transition: width .9s var(--ease-out);
}

.hot-empty { padding: 18px 8px; color: var(--faint); font-size: 12px; text-align: center; }

.rules { list-style: none; margin: 2px 0 12px; }

.rules li {
  position: relative;
  padding: 4px 0 4px 14px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}

.rules li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 12px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 6px rgba(168, 184, 255, .7);
}

.about-card .btn-quiet { width: 100%; font-size: 11.5px; }

/* ---------- 页脚 ---------- */
.site-footer {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 26px 20px 38px;
  border-top: 1px solid var(--line);
  color: var(--faint);
  font-size: 11.5px;
  letter-spacing: .06em;
}

.site-footer i { font-style: normal; color: var(--accent); opacity: .7; }

/* ---------- 弹幕 ---------- */
body.danmaku-on { overflow: hidden; }

#danmakuLayer {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  pointer-events: none;
  contain: strict;
}

body.danmaku-on #danmakuLayer { display: block; }

.danmaku-item {
  position: absolute;
  left: 0;
  padding: 3px 10px;
  border-radius: 7px;
  white-space: nowrap;
  font-weight: 600;
  letter-spacing: .02em;
  text-shadow: 0 1px 6px rgba(0, 0, 0, .75);
  pointer-events: auto;
  cursor: pointer;
  will-change: transform;
  animation-name: dm-fly;
  animation-timing-function: linear;
  animation-fill-mode: forwards;
  transition: background .2s;
}

.danmaku-item:hover {
  animation-play-state: paused;
  background: rgba(168, 184, 255, .14);
}

@keyframes dm-fly {
  from { transform: translate3d(105vw, 0, 0); }
  to { transform: translate3d(-110%, 0, 0); }
}

.glass-bar {
  position: fixed;
  left: 50%;
  bottom: 26px;
  z-index: 60;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 8px;
  border: 1px solid var(--line-2);
  border-radius: 14px;
  background: rgba(17, 21, 34, .86);
  box-shadow: 0 24px 50px -22px rgba(0, 0, 0, .95), inset 0 1px 0 rgba(255, 255, 255, .07);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  animation: bar-in .38s var(--ease-out);
}

.glass-bar[hidden] { display: none; }

@keyframes bar-in {
  from { opacity: 0; transform: translate(-50%, 14px) scale(.97); }
  to { opacity: 1; transform: translate(-50%, 0) scale(1); }
}

.glass-bar input {
  width: min(380px, 52vw);
  height: 36px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(5, 7, 13, .55);
  color: var(--text);
  font-size: 13px;
  outline: none;
  transition: border-color .22s, box-shadow .22s;
}

.glass-bar input::placeholder { color: var(--faint); }

.glass-bar input:focus {
  border-color: rgba(168, 184, 255, .45);
  box-shadow: 0 0 0 3px rgba(168, 184, 255, .09);
}

/* ---------- 回到顶部 ---------- */
#btnTop {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 45;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-2);
  border-radius: 13px;
  background: rgba(17, 21, 34, .88);
  color: var(--text-2);
  cursor: pointer;
  opacity: 0;
  transform: translateY(10px) scale(.94);
  pointer-events: none;
  box-shadow: 0 18px 36px -20px rgba(0, 0, 0, .9);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: opacity .28s var(--ease), transform .4s var(--spring), border-color .2s, color .2s;
}

#btnTop.show { opacity: 1; transform: none; pointer-events: auto; }
#btnTop:hover { border-color: rgba(168, 184, 255, .4); color: var(--accent); transform: translateY(-2px); }
#btnTop .icon { width: 17px; height: 17px; }

/* ---------- 点赞粒子 ---------- */
.spark {
  position: fixed;
  z-index: 90;
  pointer-events: none;
  color: #ff9bab;
  font-size: calc(12px * var(--s, 1));
  font-weight: 700;
  text-shadow: 0 1px 5px rgba(0, 0, 0, .6);
  animation: spark-fly .85s var(--ease-out) forwards;
}

@keyframes spark-fly {
  0% { opacity: 0; transform: translate(0, 0) scale(.6); }
  20% { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--dx, 0), var(--dy, -40px)) scale(1.05); }
}

/* ---------- 弹窗 ---------- */
body.modal-open { overflow: hidden; }

.modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(4, 6, 12, .62);
  backdrop-filter: blur(10px) saturate(140%);
  -webkit-backdrop-filter: blur(10px) saturate(140%);
  opacity: 0;
  transition: opacity .24s var(--ease);
}

.modal[hidden] { display: none; }
.modal.in { opacity: 1; }

.modal-card {
  width: min(420px, 100%);
  padding: 24px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-xl);
  background:
    radial-gradient(120% 100% at 50% -20%, rgba(168, 184, 255, .1), transparent 60%),
    linear-gradient(180deg, #161a2b, #0f121d);
  box-shadow: 0 50px 90px -40px rgba(0, 0, 0, 1), inset 0 1px 0 rgba(255, 255, 255, .07);
  opacity: 0;
  transform: translateY(14px) scale(.97);
  transition: opacity .28s var(--ease), transform .38s var(--ease-out);
}

.modal.in .modal-card { opacity: 1; transform: none; }

.modal-card h3 {
  font-size: 16px;
  font-weight: 650;
  letter-spacing: .02em;
  color: var(--text);
}

.modal-sub {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.7;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 22px;
}

.name-field {
  display: flex;
  gap: 8px;
  margin-top: 14px;
}

.name-field input {
  flex: 1;
  min-width: 0;
  height: 42px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(5, 7, 13, .55);
  color: var(--text);
  font-size: 14px;
  letter-spacing: .02em;
  outline: none;
  transition: border-color .22s, box-shadow .22s;
}

.name-field input:focus {
  border-color: rgba(168, 184, 255, .5);
  box-shadow: 0 0 0 3px rgba(168, 184, 255, .1);
}

.name-field .icon-btn {
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, .03);
}

/* ---------- 个人中心 ---------- */
.profile-panel {
  position: relative;
  width: min(560px, 100%);
  max-height: 86vh;
  display: flex;
  flex-direction: column;
  padding: 26px 26px 20px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-xl);
  background:
    radial-gradient(110% 80% at 20% -10%, rgba(168, 184, 255, .12), transparent 55%),
    radial-gradient(90% 60% at 100% 0%, rgba(203, 176, 255, .08), transparent 55%),
    linear-gradient(180deg, #151a2b, #0e111b);
  box-shadow: 0 50px 100px -40px rgba(0, 0, 0, 1), inset 0 1px 0 rgba(255, 255, 255, .08);
  opacity: 0;
  transform: translateY(16px) scale(.97);
  transition: opacity .3s var(--ease), transform .42s var(--ease-out);
}

.modal.in .profile-panel { opacity: 1; transform: none; }

.profile-close { position: absolute; top: 15px; right: 15px; }

.profile-head {
  display: flex;
  align-items: center;
  gap: 15px;
  padding-right: 34px;
}

.profile-avatar {
  width: 62px;
  height: 62px;
  flex: none;
  display: grid;
  place-items: center;
  font-size: 28px;
  line-height: 1;
  border-radius: 50%;
  background:
    radial-gradient(120% 120% at 30% 15%, rgba(168, 184, 255, .26), rgba(255, 255, 255, .03));
  border: 1px solid rgba(168, 184, 255, .26);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18), 0 14px 30px -18px rgba(168, 184, 255, .9);
}

.profile-info { min-width: 0; }

.profile-nick-line {
  display: flex;
  align-items: center;
  gap: 6px;
}

.profile-nick {
  font-size: 19px;
  font-weight: 650;
  letter-spacing: .015em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-meta {
  margin-top: 3px;
  color: var(--faint);
  font-size: 11.5px;
  letter-spacing: .02em;
}

.profile-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 20px 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: rgba(255, 255, 255, .018);
  overflow: hidden;
}

.pstat {
  padding: 11px 0 10px;
  border: none;
  background: transparent;
  color: var(--faint);
  text-align: center;
  cursor: pointer;
  box-shadow: inset 0 -2px 0 transparent;
  transition: background .25s, box-shadow .3s var(--ease), color .2s;
}

.pstat + .pstat { border-left: 1px solid var(--line); }

.pstat b {
  display: block;
  font-size: 19px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  line-height: 1.3;
  color: var(--text);
  transition: color .25s;
}

.pstat span {
  display: block;
  font-size: 10.5px;
  letter-spacing: .08em;
  color: var(--faint);
}

.pstat:hover { background: rgba(255, 255, 255, .03); }
.pstat.active { box-shadow: inset 0 -2px 0 var(--accent); background: rgba(168, 184, 255, .05); }
.pstat.active b { color: var(--accent); }

.profile-body {
  flex: 1;
  min-height: 0;
  max-height: 44vh;
  overflow-y: auto;
  padding: 2px 4px 2px 0;
  overscroll-behavior: contain;
}

.profile-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 10px;
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: background .2s, transform .22s var(--ease);
  animation: row-in .4s var(--ease-out) both;
}

@keyframes row-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

.profile-item:hover { background: rgba(255, 255, 255, .04); transform: translateX(2px); }

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

.profile-item-text {
  font-size: 13px;
  color: var(--text-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.profile-item-meta {
  margin-top: 3px;
  color: var(--faint);
  font-size: 10.5px;
  letter-spacing: .02em;
}

.profile-item-arrow {
  flex: none;
  color: var(--faint);
  font-size: 15px;
  transition: transform .25s var(--ease), color .2s;
}

.profile-item:hover .profile-item-arrow { transform: translateX(2px); color: var(--accent); }

.profile-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: var(--r-sm);
  transition: background .2s;
  animation: row-in .4s var(--ease-out) both;
}

.profile-user:hover { background: rgba(255, 255, 255, .035); }

.profile-user-avatar {
  width: 32px;
  height: 32px;
  flex: none;
  display: grid;
  place-items: center;
  font-size: 16px;
  border-radius: 9px;
  background: rgba(255, 255, 255, .04);
  border: 1px solid var(--line);
}

.profile-user-nick {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12.5px;
  color: var(--text-2);
}

.profile-user-time { flex: none; color: var(--faint); font-size: 10.5px; }

.profile-empty {
  padding: 36px 10px;
  color: var(--faint);
  font-size: 12px;
  text-align: center;
}

/* ---------- Toast ---------- */
.toast-host {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  transform: translateX(-50%);
  pointer-events: none;
}

.toast {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 15px;
  border: 1px solid var(--line-2);
  border-radius: 11px;
  background: rgba(22, 26, 42, .94);
  color: var(--text-2);
  font-size: 12.5px;
  letter-spacing: .01em;
  white-space: nowrap;
  box-shadow: 0 22px 45px -20px rgba(0, 0, 0, .95), inset 0 1px 0 rgba(255, 255, 255, .07);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  opacity: 0;
  transform: translateY(10px) scale(.98);
  transition: opacity .3s var(--ease), transform .4s var(--ease-out);
}

.toast.in { opacity: 1; transform: none; }
.toast.out { opacity: 0; transform: translateY(-6px) scale(.98); }

.toast .icon { width: 14px; height: 14px; color: var(--accent); }

/* ---------- 响应式 ---------- */
@media (max-width: 1000px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .side-col {
    position: static;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    order: 2;
  }
  .side-col .card { height: 100%; }
}

@media (max-width: 860px) {
  .header-stats { display: none; }
}

@media (max-width: 720px) {
  body { font-size: 14.5px; }
  .container { padding: 0 16px; }
  .layout { padding-top: 16px; gap: 14px; padding-bottom: 32px; }
  .site-header { padding: 10px 0; }
  .brand-mark { width: 36px; height: 36px; border-radius: 11px; }
  .brand-text strong { font-size: 16px; }
  .brand-text small { display: none; }
  .header-actions .btn-ghost { height: 32px; padding: 0 10px; }
  .composer { padding: 14px 15px 12px; }
  .field textarea { min-height: 88px; font-size: 14.5px; }
  .pick-label { width: 26px; }
  .chip { height: 28px; padding: 0 9px; font-size: 12px; }
  .filter-bar { padding: 9px 10px; gap: 8px; }
  .seg-btn { padding: 0 10px; }
  .post-card { padding: 14px 15px 12px; border-radius: 16px; }
  .post-avatar { width: 34px; height: 34px; font-size: 17px; border-radius: 10px; }
  .post-text { font-size: 14.5px; margin: 10px 0 11px; }
  .post-nick { max-width: 150px; }
  .chip-scroll {
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    -webkit-mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 18px), transparent);
    mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 18px), transparent);
  }
  .chip-scroll::-webkit-scrollbar { display: none; }
  .chip-scroll .chip-group { flex-wrap: nowrap; }
  .composer-body .chip-group {
    flex: 1;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 2px;
    scrollbar-width: none;
    -webkit-mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 14px), transparent);
    mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 14px), transparent);
  }
  .composer-body .chip-group::-webkit-scrollbar { display: none; }
  .composer-body .chip { flex: none; }
  .side-col { grid-template-columns: minmax(0, 1fr); }
  .kbd-hint { display: none; }
  .site-footer { padding: 22px 16px 30px; font-size: 11px; }
  .modal { padding: 16px; }
  .modal-card { padding: 20px; border-radius: var(--r-lg); }
  .profile-panel { padding: 20px 18px 16px; max-height: 88vh; }
  .profile-avatar { width: 52px; height: 52px; font-size: 24px; }
  .profile-nick { font-size: 17px; }
  .profile-body { max-height: 42vh; }
  .glass-bar { bottom: 16px; left: 16px; right: 16px; transform: none; }
  .glass-bar input { width: auto; flex: 1; min-width: 0; }
  @keyframes bar-in {
    from { opacity: 0; transform: translateY(14px) scale(.97); }
    to { opacity: 1; transform: none; }
  }
  #btnTop { right: 16px; bottom: 16px; }
  .toast-host { bottom: 20px; }
}

@media (max-width: 560px) {
  .act-label { display: none; }
  .act { padding: 0 9px; gap: 5px; }
  .post-meta { font-size: 10.5px; }
  .del-btn { opacity: .7; }
  .char-max { display: none; }
  .identity-name { max-width: 120px; }
  .composer-foot .btn-primary { flex: 1; }
}

@media (max-width: 380px) {
  .header-actions .btn-ghost {
    width: 32px;
    padding: 0;
    justify-content: center;
  }
  .header-actions .btn-ghost span { display: none; }
  .container { padding: 0 13px; }
  .identity-name { max-width: 96px; }
}

@media (hover: none) {
  .del-btn, .comment-del { opacity: .75; }
  .post-card:hover { transform: none; }
}

/* ---------- 动效偏好 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-delay: 0ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}