/* ============================================================
   朝花夕拾 · Mobbin 风格设计系统
   白底 · 紫色品牌色 · 超大粗体 · 大圆角 · 柔和阴影 · 多主题
   ============================================================ */

/* ---------- 设计令牌 ---------- */

:root {
  --bg: #ffffff;
  --bg-soft: #fafafa;
  --surface: #ffffff;
  --surface-2: #f5f5f7;
  --line: rgba(10, 10, 12, 0.08);
  --line-strong: rgba(10, 10, 12, 0.14);
  --text: #0a0a0c;
  --text-dim: #6b6b74;
  --text-faint: #a1a1aa;
  --acid: #7c3aed;
  --electric: #6d28d9;
  --ember: #ef4444;
  --glow-acid: rgba(124, 58, 237, 0.22);
  --primary-soft: #ede9fe;
  --success: #10b981;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .04), 0 1px 3px rgba(0, 0, 0, .06);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, .06), 0 2px 4px -2px rgba(0, 0, 0, .05);
  --shadow-lg: 0 24px 48px -16px rgba(0, 0, 0, .14);
  --radius: 16px;
  --radius-lg: 24px;
  --font-display: "Inter", "SF Pro Display", "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei UI", "Microsoft YaHei", sans-serif;
}

[data-theme="dark"] {
  --bg: #15141b;
  --bg-soft: #1a1922;
  --surface: #1e1d27;
  --surface-2: #272634;
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.18);
  --text: #f5f5f7;
  --text-dim: #9a9aa3;
  --text-faint: #5c5c66;
  --acid: #a78bfa;
  --electric: #8b5cf6;
  --ember: #f87171;
  --glow-acid: rgba(167, 139, 250, 0.25);
  --primary-soft: rgba(167, 139, 250, 0.12);
  --success: #34d399;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, .4);
  --shadow-lg: 0 24px 48px -16px rgba(0, 0, 0, .6);
}

[data-theme="violet"] {
  --bg: #faf5ff;
  --bg-soft: #f3e8ff;
  --surface: #ffffff;
  --surface-2: #f5f0ff;
  --line: rgba(124, 58, 237, 0.1);
  --line-strong: rgba(124, 58, 237, 0.2);
  --text: #1e1033;
  --text-dim: #6d5a8a;
  --text-faint: #a08fc0;
  --acid: #7c3aed;
  --electric: #a855f7;
  --ember: #e11d48;
  --glow-acid: rgba(124, 58, 237, 0.2);
  --primary-soft: #f3e8ff;
  --success: #059669;
  --shadow-sm: 0 1px 2px rgba(124, 58, 237, .06), 0 1px 3px rgba(124, 58, 237, .08);
  --shadow-md: 0 4px 6px -1px rgba(124, 58, 237, .08), 0 2px 4px -2px rgba(124, 58, 237, .06);
  --shadow-lg: 0 24px 48px -16px rgba(124, 58, 237, .18);
}

[data-theme="mint"] {
  --bg: #f0fdfa;
  --bg-soft: #ccfbf1;
  --surface: #ffffff;
  --surface-2: #f0fdf9;
  --line: rgba(16, 185, 129, 0.1);
  --line-strong: rgba(16, 185, 129, 0.2);
  --text: #06281e;
  --text-dim: #3d6b5c;
  --text-faint: #7ba396;
  --acid: #0d9488;
  --electric: #14b8a6;
  --ember: #f97316;
  --glow-acid: rgba(13, 148, 136, 0.2);
  --primary-soft: #ccfbf1;
  --success: #059669;
  --shadow-sm: 0 1px 2px rgba(13, 148, 136, .06), 0 1px 3px rgba(13, 148, 136, .08);
  --shadow-md: 0 4px 6px -1px rgba(13, 148, 136, .08), 0 2px 4px -2px rgba(13, 148, 136, .06);
  --shadow-lg: 0 24px 48px -16px rgba(13, 148, 136, .18);
}

[data-theme="sand"] {
  --bg: #fdfaf6;
  --bg-soft: #f7f0e6;
  --surface: #ffffff;
  --surface-2: #faf4ea;
  --line: rgba(120, 90, 50, 0.1);
  --line-strong: rgba(120, 90, 50, 0.18);
  --text: #241a10;
  --text-dim: #7a6a55;
  --text-faint: #a99a85;
  --acid: #b45309;
  --electric: #d97706;
  --ember: #dc2626;
  --glow-acid: rgba(180, 83, 9, 0.2);
  --primary-soft: #fef3c7;
  --success: #059669;
  --shadow-sm: 0 1px 2px rgba(120, 90, 50, .06), 0 1px 3px rgba(120, 90, 50, .08);
  --shadow-md: 0 4px 6px -1px rgba(120, 90, 50, .08), 0 2px 4px -2px rgba(120, 90, 50, .06);
  --shadow-lg: 0 24px 48px -16px rgba(120, 90, 50, .18);
}

[data-theme="mono"] {
  --bg: #ffffff;
  --bg-soft: #f5f5f5;
  --surface: #ffffff;
  --surface-2: #ededed;
  --line: rgba(0, 0, 0, 0.1);
  --line-strong: rgba(0, 0, 0, 0.2);
  --text: #000000;
  --text-dim: #555555;
  --text-faint: #999999;
  --acid: #000000;
  --electric: #666666;
  --ember: #dc2626;
  --glow-acid: rgba(0, 0, 0, 0.15);
  --primary-soft: #f0f0f0;
  --success: #059669;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .05), 0 1px 3px rgba(0, 0, 0, .07);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, .07), 0 2px 4px -2px rgba(0, 0, 0, .06);
  --shadow-lg: 0 24px 48px -16px rgba(0, 0, 0, .15);
}

/* ---------- 基础 ---------- */

/* 有些元素带有 display 规则，会让 hidden 失效，统一兜底 */
[hidden] { display: none !important; }

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

::selection { background: var(--acid); color: #fff; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-display);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  transition: background-color .35s ease, color .35s ease;
  -webkit-font-smoothing: antialiased;
}

/* 极淡品牌氛围 + 噪点 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(42% 36% at 82% 4%, color-mix(in srgb, var(--acid) 7%, transparent), transparent 70%),
    radial-gradient(32% 30% at 6% 92%, color-mix(in srgb, var(--electric) 5%, transparent), transparent 70%);
}

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

a { color: inherit; }

button, input { font-family: inherit; }

button { cursor: pointer; }

a:focus-visible, button:focus-visible {
  outline: 2px solid var(--acid);
  outline-offset: 2px;
}

/* ---------- 顶部导航 ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  border-bottom: 1px solid var(--line);
  transition: background-color .35s ease, border-color .35s ease;
}

.nav-inner {
  height: 66px;
  padding: 0 clamp(20px, 3.2vw, 48px);
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
  flex: none;
}

.brand .logo {
  width: 30px;
  height: 30px;
  display: inline-flex;
  filter: drop-shadow(0 4px 10px var(--glow-acid));
}

.brand .logo svg { width: 100%; height: 100%; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: 4px;
  padding-left: 18px;
  border-left: 1px solid var(--line);
}

.nav-link {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-dim);
  text-decoration: none;
  padding: 8px 15px;
  border-radius: 8px;
  transition: color .2s, background-color .2s;
  white-space: nowrap;
}

.nav-link:hover {
  color: var(--text);
  background: var(--surface-2);
}

.nav-link.active {
  color: var(--text);
  background: var(--surface-2);
  font-weight: 700;
}

.nav-user {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-user .avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  flex: none;
}

.nav-user .nav-name {
  font-size: 13px;
  font-weight: 600;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-profile {
  display: flex;
  align-items: center;
  gap: 8px;
  color: inherit;
  text-decoration: none;
  padding: 4px 8px;
  margin: -4px -2px;
  border-radius: 9px;
  transition: background-color .2s;
}

.nav-profile:hover { background: var(--surface-2); }

/* 主题切换按钮 */
.theme-toggle {
  width: 38px;
  height: 38px;
  flex: none;
  margin-left: auto;
  border-radius: 10px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--text-dim);
  display: grid;
  place-items: center;
  transition: color .25s, border-color .25s, box-shadow .25s, background-color .35s;
}

.theme-toggle:hover {
  color: var(--acid);
  border-color: var(--acid);
  box-shadow: 0 0 16px var(--glow-acid);
}

.theme-toggle.floating {
  position: fixed;
  top: 18px;
  right: 18px;
  margin: 0;
  z-index: 50;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

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

.primary, .ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 12px;
  padding: 12px 22px;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform .2s, box-shadow .25s, background-color .25s, border-color .25s, color .25s;
}

.primary {
  background: var(--acid);
  color: #fff;
  box-shadow: 0 8px 20px -8px var(--glow-acid);
}

.primary:hover {
  background: var(--electric);
  transform: translateY(-1px);
  box-shadow: 0 12px 26px -10px var(--glow-acid);
}

.ghost {
  background: var(--surface);
  color: var(--text);
  border-color: var(--line-strong);
}

.ghost:hover {
  background: var(--surface-2);
}

.primary.small, .ghost.small {
  padding: 7px 14px;
  font-size: 13px;
  border-radius: 10px;
}

.primary.wide { width: 100%; }

/* ---------- 表单控件 ---------- */

input:not([type="checkbox"]) {
  width: 100%;
  padding: 11px 14px;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--text);
  font-size: 15px;
  transition: border-color .2s, box-shadow .2s, background-color .35s;
}

input:not([type="checkbox"])::placeholder { color: var(--text-faint); }

input:not([type="checkbox"]):focus {
  outline: none;
  border-color: var(--acid);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--acid) 16%, transparent);
}

textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--text);
  font-size: 14.5px;
  line-height: 1.7;
  resize: vertical;
  min-height: 96px;
  transition: border-color .2s, box-shadow .2s, background-color .35s;
}

textarea::placeholder { color: var(--text-faint); }

textarea:focus {
  outline: none;
  border-color: var(--acid);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--acid) 16%, transparent);
}

/* ---------- 主页（Land-book 作品风格：编辑式大标题 + 画廊卡片） ---------- */

.home {
  max-width: 1720px;
  margin: 0 auto;
  padding: clamp(44px, 5vw, 84px) clamp(20px, 4vw, 64px) 0;
}

.home-hero {
  display: grid;
  grid-template-columns: 1.06fr 0.94fr;
  align-items: center;
  gap: clamp(36px, 6vw, 110px);
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .1em;
  color: var(--text-faint);
}

.kicker::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--acid);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--acid) 12%, transparent);
}

.hero-greet {
  margin-top: 20px;
  color: var(--acid);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .02em;
}

.home-title {
  margin-top: 6px;
  font-size: clamp(3.4rem, 7vw, 6.6rem);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 0.98;
}

.home-sub {
  margin-top: 22px;
  color: var(--text-dim);
  font-size: clamp(15px, 1.3vw, 17.5px);
  line-height: 1.85;
  max-width: 44ch;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

/* 预览卡片：仿画廊作品截图卡 */

.preview-wrap { position: relative; }

.preview-flower {
  position: absolute;
  top: -42px;
  right: -14px;
  width: clamp(100px, 8vw, 132px);
  z-index: 2;
  pointer-events: none;
  filter: drop-shadow(0 16px 26px var(--glow-acid));
  animation: sway 9s ease-in-out infinite;
  transform-origin: 50% 90%;
}

@keyframes sway {
  0%, 100% { transform: rotate(-2deg); }
  50% { transform: rotate(2.5deg); }
}

.preview-card {
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  transform: rotate(-1.1deg);
  transition: transform .3s ease, background-color .35s ease, border-color .35s ease;
}

.preview-card:hover { transform: rotate(0) translateY(-4px); }

.preview-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 38px;
  padding: 0 14px;
  background: var(--bg-soft);
  border-bottom: 1px solid var(--line);
}

.preview-bar i { width: 6px; height: 6px; border-radius: 2px; background: color-mix(in srgb, var(--acid) 55%, transparent); }
.preview-bar span { margin-left: 8px; font-size: 11.5px; letter-spacing: .04em; color: var(--text-faint); }

.preview-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: clamp(22px, 1.8vw, 28px);
  background: radial-gradient(60% 50% at 88% 0%, color-mix(in srgb, var(--acid) 9%, transparent), transparent 70%);
}

.preview-hello { font-size: 12px; font-weight: 700; color: var(--acid); margin-bottom: 2px; }

.mini-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.mini-empty {
  padding: 10px 12px;
  border: 1px dashed var(--line-strong);
  border-radius: 10px;
  color: var(--text-faint);
  font-size: 11px;
  line-height: 1.6;
}

.mini-empty.is-error { color: var(--ember); border-color: color-mix(in srgb, var(--ember) 45%, transparent); }

/* 迷你待办 / 留言（缩略图通用） */

.mini-todo, .mini-msg {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 12px;
  min-width: 0;
}

.mini-todo span {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mini-todo i {
  width: 15px;
  height: 15px;
  flex: none;
  border-radius: 5px;
  border: 1.5px solid var(--line-strong);
  background: var(--surface);
}

.mini-todo.done i { background: var(--acid); border-color: var(--acid); position: relative; }

.mini-todo.done i::after {
  content: "";
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 9px no-repeat;
}

.mini-todo.done span { color: var(--text-faint); text-decoration: line-through; }

.mini-msg { align-items: flex-start; }

.mini-msg > div { flex: 1; min-width: 0; }

.mini-msg .m-avatar {
  width: 22px;
  height: 22px;
  flex: none;
  border-radius: 50%;
}

.m-avatar.a1 { background: linear-gradient(135deg, hsl(268 72% 68%), hsl(292 72% 55%)); }
.m-avatar.a2 { background: linear-gradient(135deg, hsl(22 88% 64%), hsl(44 88% 55%)); }
.m-avatar.a3 { background: linear-gradient(135deg, hsl(160 62% 48%), hsl(192 66% 44%)); }

.mini-msg strong { display: block; font-size: 10.5px; font-weight: 700; }

.mini-msg p {
  margin-top: 2px;
  font-size: 10.5px;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---------- 站内空间：作品集式卡片网格 ---------- */

.showcase { margin-top: clamp(64px, 9vw, 112px); }

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
  margin-bottom: 24px;
}

.section-head h2 { font-size: clamp(1.3rem, 2.1vw, 1.7rem); font-weight: 800; letter-spacing: -0.02em; }
.section-head p { color: var(--text-faint); font-size: 12.5px; letter-spacing: .04em; }

.showcase-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.shot-card {
  display: block;
  width: 100%;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  overflow: hidden;
  text-align: left;
  text-decoration: none;
  color: inherit;
  font: inherit;
  transition: transform .25s ease, box-shadow .3s ease, border-color .25s ease;
}

.shot-card:hover {
  transform: translateY(-4px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-lg);
}

.shot {
  height: 214px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}

.mini-input {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 8px 7px 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 9px;
}

.mini-input span { flex: 1; height: 8px; border-radius: 99px; background: var(--surface-2); }

.mini-input b {
  font-size: 10.5px;
  font-weight: 700;
  color: #fff;
  background: var(--acid);
  border-radius: 6px;
  padding: 4px 8px;
}

.shot-themes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  align-content: center;
  padding: 20px;
}

.swatch {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  padding: 2px;
  background: none;
  border: none;
  font-size: 10.5px;
  font-family: inherit;
  color: var(--text-dim);
  cursor: pointer;
}

.swatch:hover i { transform: scale(1.1); }

.swatch.active { color: var(--acid); font-weight: 700; }

.swatch i {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow-sm);
  transition: transform .2s ease;
}

.swatch.active i { outline: 2px solid var(--acid); outline-offset: 2px; }

#theme-card { cursor: default; }

#theme-card:hover { transform: none; }

.shot-profile {
  justify-content: center;
  gap: 12px;
}

.mini-profile {
  display: flex;
  align-items: center;
  gap: 11px;
}

.mini-profile-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  flex: none;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  background: linear-gradient(135deg, hsl(268 75% 64%), hsl(314 80% 54%));
  box-shadow: var(--shadow-sm);
}

.mini-profile strong { display: block; font-size: 12.5px; font-weight: 700; }

.mini-profile p { margin-top: 2px; font-size: 10.5px; color: var(--text-dim); }

.mini-stat-row { display: flex; gap: 8px; }

.mini-stat {
  font-size: 10px;
  color: var(--text-faint);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 5px 9px;
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
}

.mini-stat b { font-size: 11.5px; color: var(--text); font-weight: 800; }

.mini-profile-line {
  height: 8px;
  width: 100%;
  border-radius: 99px;
  background: var(--surface);
  border: 1px solid var(--line);
}

.mini-profile-line.short { width: 62%; }

.shot-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 13px 15px;
}

.shot-meta strong { display: block; font-size: 14px; font-weight: 700; letter-spacing: -0.01em; }
.shot-meta div span { font-size: 11px; color: var(--text-faint); letter-spacing: .08em; }

.shot-badge {
  flex: none;
  font-size: 11.5px;
  color: var(--text-dim);
  border: 1px solid var(--line-strong);
  border-radius: 99px;
  padding: 4px 10px;
  white-space: nowrap;
}

.shot-badge.is-error {
  color: var(--ember);
  border-color: color-mix(in srgb, var(--ember) 45%, transparent);
}

/* 页脚 */

.foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: clamp(64px, 9vw, 104px);
  padding: 28px 0 44px;
  border-top: 1px solid var(--line);
  color: var(--text-faint);
  font-size: 12.5px;
  letter-spacing: .04em;
}

/* ---------- 认证页 ---------- */

.auth-page {
  min-height: 100vh;
  max-width: 1280px;
  margin: 0 auto;
  padding: clamp(32px, 6vw, 64px) clamp(20px, 4vw, 48px);
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: clamp(36px, 6vw, 96px);
  align-items: center;
}

.auth-side {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.auth-logo {
  width: 58px;
  height: 58px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 18px;
  background: var(--primary-soft);
  margin-bottom: 24px;
}

.auth-logo svg { width: 40px; height: 40px; }

.auth-title {
  font-size: clamp(2.9rem, 5.8vw, 4.8rem);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.045em;
  margin-top: 14px;
}

.auth-typed {
  margin-top: 18px;
  min-height: 1.75em;
  color: var(--text-dim);
  font-size: 15.5px;
  line-height: 1.75;
}

.caret {
  display: inline-block;
  width: 2px;
  height: 1.05em;
  margin-left: 4px;
  vertical-align: -0.12em;
  background: var(--acid);
  animation: caret-blink 1.05s steps(1) infinite;
}

@keyframes caret-blink {
  50% { opacity: 0; }
}

.auth-points {
  width: 100%;
  margin-top: clamp(28px, 4vw, 42px);
  border-top: 1px solid var(--line);
}

.auth-points li {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 13px 2px;
  border-bottom: 1px solid var(--line);
}

.auth-points .num {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--acid);
}

.auth-points strong {
  display: block;
  font-size: 14px;
  font-weight: 700;
}

.auth-points em {
  font-style: normal;
  font-size: 12.5px;
  color: var(--text-faint);
}

.auth-foot {
  margin-top: clamp(24px, 4vw, 36px);
  color: var(--text-faint);
  font-size: 12.5px;
  letter-spacing: 0.04em;
}

.auth-panel-wrap {
  display: flex;
  justify-content: flex-end;
}

.auth-card {
  width: min(460px, 100%);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  transition: background-color .35s ease, border-color .35s ease;
}

.auth-body {
  position: relative;
  overflow: hidden;
  padding: clamp(24px, 4vw, 34px);
  background: radial-gradient(70% 55% at 92% -6%, color-mix(in srgb, var(--acid) 10%, transparent), transparent 70%);
}

.auth-flower {
  position: absolute;
  top: 14px;
  right: 16px;
  width: 66px;
  height: 66px;
  opacity: 0.85;
  transform: rotate(10deg);
  pointer-events: none;
}

.auth-head {
  margin-bottom: 18px;
}

.auth-head h2 {
  font-size: 23px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.auth-head p {
  margin-top: 5px;
  font-size: 13px;
  color: var(--text-dim);
}

.auth-field {
  display: block;
  margin-bottom: 15px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dim);
}

.input-wrap {
  position: relative;
  display: block;
  margin-top: 6px;
}

.input-icon {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--text-faint);
  pointer-events: none;
  transition: color .2s;
}

.input-wrap:focus-within .input-icon { color: var(--acid); }

.input-wrap input { padding-left: 39px; }

.input-wrap:has(.eye-btn) input { padding-right: 44px; }

.eye-btn {
  position: absolute;
  right: 7px;
  top: 50%;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--text-faint);
  transition: color .2s, background-color .2s;
}

.eye-btn:hover {
  color: var(--text-dim);
  background: var(--surface-2);
}

.eye-btn svg { width: 17px; height: 17px; }

.eye-btn svg[hidden] { display: none; }

.auth-submit {
  justify-content: center;
  gap: 8px;
}

.submit-arrow {
  width: 16px;
  height: 16px;
  transition: transform .2s;
}

.auth-submit:hover .submit-arrow { transform: translateX(3px); }

.auth-note {
  margin-top: 14px;
  color: var(--text-faint);
  font-size: 12px;
  line-height: 1.6;
  text-align: center;
}

.tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  border-radius: 12px;
  background: var(--surface-2);
  margin-bottom: 22px;
}

.tab {
  border: none;
  background: transparent;
  padding: 9px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-dim);
  transition: all .2s;
}

.tab.active {
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}

.error {
  color: var(--ember);
  font-size: 13px;
  min-height: 18px;
  margin: 2px 0 10px;
}

/* ---------- 个人主页 ---------- */

.profile-layout {
  display: grid;
  grid-template-columns: minmax(340px, 470px) minmax(0, 1fr);
  gap: clamp(24px, 3.4vw, 44px);
  align-items: start;
}

.profile-card {
  padding: 0;
  overflow: hidden;
}

.profile-showcase {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 6px 2px 0;
  min-width: 0;
}

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

.show-head .kicker { margin: 0; }

.add-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border: 1.5px solid var(--acid);
  border-radius: 999px;
  background: transparent;
  color: var(--acid);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background-color .25s ease, color .25s ease, transform .25s ease;
}

.add-pill:hover {
  background: var(--acid);
  color: #fff;
  transform: translateY(-1px);
}

.show-title {
  font-size: clamp(1.9rem, 3.2vw, 2.7rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.18;
}

.show-copy {
  color: var(--text-dim);
  font-size: 14.5px;
  line-height: 1.9;
}

.show-quote {
  margin-top: 2px;
  padding: 14px 18px;
  border-left: 3px solid var(--acid);
  background: var(--surface);
  border-radius: 0 14px 14px 0;
  box-shadow: var(--shadow-sm);
  color: var(--text-dim);
  font-size: 14px;
  line-height: 1.8;
}

.moment-feed {
  margin-top: 8px;
  padding-top: 4px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.moment {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
  animation: rise-in .35s cubic-bezier(.22, .68, .32, 1) both;
}

.moment:first-child { padding-top: 4px; }

.moment:last-child {
  padding-bottom: 4px;
  border-bottom: none;
}

.moment-avatar {
  width: 42px;
  height: 42px;
  flex: none;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  box-shadow: var(--shadow-sm);
  background-size: cover;
  background-position: center;
}

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

.moment-head {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 10px;
  padding-top: 2px;
}

.moment-author {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.01em;
}

.moment-author:hover { color: var(--acid); }

.moment-time {
  font-size: 11.5px;
  color: var(--text-faint);
  letter-spacing: .02em;
}

.moment-photos {
  margin-top: 9px;
  display: grid;
  gap: 6px;
  max-width: 560px;
}

.moment-photos[data-count="1"] { grid-template-columns: minmax(0, 1fr); max-width: 520px; }

.moment-photos[data-count="2"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.moment-photos[data-count="3"] { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.moment-photos[data-count="4"] { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 440px; }

.moment-photos[data-count="5"],
.moment-photos[data-count="6"],
.moment-photos[data-count="7"],
.moment-photos[data-count="8"] {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.moment-photo-wrap {
  position: relative;
  min-width: 0;
}

.moment-photos:not([data-count="1"]) .moment-photo-wrap { aspect-ratio: 1; }

.moment-photo {
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: none;
  border-radius: 12px;
  background: var(--surface-2);
  overflow: hidden;
  cursor: zoom-in;
  transition: transform .25s ease, box-shadow .25s ease;
}

.moment-photo:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

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

.moment-photos[data-count="1"] .moment-photo img {
  height: auto;
  max-height: 540px;
  object-fit: contain;
  background: var(--surface-2);
}

.moment-del {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 50%;
  background: rgba(23, 23, 27, .58);
  color: #fff;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  transition: opacity .2s ease, background-color .2s ease;
}

.moment-del:hover { background: rgba(23, 23, 27, .82); }

.moment-photo-wrap:hover .moment-del,
.moment-del:focus-visible { opacity: 1; }

@media (hover: none) {
  .moment-del { opacity: 1; }
}

.wall-empty {
  padding: 38px 16px;
  border: 1.5px dashed var(--line-strong);
  border-radius: 14px;
  text-align: center;
  color: var(--text-dim);
  font-size: 13px;
  line-height: 1.8;
}

/* ---------- 照片灯箱 ---------- */

body.lightbox-open { overflow: hidden; }

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: grid;
  place-items: center;
  padding: clamp(20px, 5vw, 64px);
  background: rgba(12, 12, 16, .82);
  backdrop-filter: blur(8px);
  animation: lightbox-in .2s ease both;
}

.lightbox-figure {
  margin: 0;
  max-width: min(1180px, 100%);
  max-height: calc(100vh - 40px);
  display: flex;
  cursor: default;
}

.lightbox-figure img {
  display: block;
  max-width: 100%;
  max-height: calc(100vh - 40px);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 12px;
  background: #101014;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .55);
}

.lightbox-close {
  position: absolute;
  top: clamp(14px, 2.6vw, 26px);
  right: clamp(14px, 2.6vw, 26px);
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, .28);
  border-radius: 50%;
  background: rgba(23, 23, 27, .55);
  color: #fff;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  transition: background-color .2s ease, transform .2s ease;
}

.lightbox-close:hover {
  background: rgba(23, 23, 27, .85);
  transform: rotate(90deg);
}

@keyframes lightbox-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.profile-stats div[hidden],
.profile-actions[hidden],
.add-pill[hidden] { display: none; }

.add-icon {
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
}

.panel-wrap {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows .4s cubic-bezier(.4, 0, .2, 1);
}

.panel-wrap.open { grid-template-rows: 1fr; }

.panel-inner {
  overflow: hidden;
  min-height: 0;
  visibility: hidden;
  transition: visibility 0s linear .4s;
}

.panel-wrap.open .panel-inner {
  visibility: visible;
  transition-delay: 0s;
}

.profile-view,
.profile-edit {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .3s ease, transform .3s ease;
}

.panel-wrap.open .profile-view,
.panel-wrap.open .profile-edit {
  opacity: 1;
  transform: none;
  transition-delay: .08s;
}

.profile-head {
  padding: clamp(30px, 4vw, 44px) 28px 0;
  display: flex;
  justify-content: center;
}

.profile-avatar {
  width: 112px;
  height: 112px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 40px;
  font-weight: 700;
  flex: none;
  box-shadow: var(--shadow-md);
}

.profile-view {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0 28px;
}

.profile-view h2 {
  margin-top: 18px;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.profile-bio {
  margin-top: 8px;
  color: var(--text-dim);
  font-size: 14px;
  line-height: 1.7;
  max-width: 34ch;
  min-height: 1.7em;
}

.profile-bio.empty-bio { color: var(--text-faint); }

.profile-stats {
  margin-top: 26px;
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  border-top: 1px solid var(--line);
  padding: 20px 0 4px;
}

.profile-stats div {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.profile-stats strong {
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.profile-stats span {
  font-size: 11.5px;
  color: var(--text-faint);
  letter-spacing: .06em;
}

.profile-actions {
  display: flex;
  gap: 10px;
  padding: 22px 0 32px;
}

.profile-edit {
  padding: 18px clamp(24px, 4vw, 40px) 34px;
  text-align: left;
}

.profile-edit-block {
  display: block;
  margin-bottom: 18px;
}

.profile-edit-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dim);
  margin-bottom: 10px;
}

.avatar-edit-row {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

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

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

.counter {
  display: block;
  text-align: right;
  margin-top: 6px;
}

.profile-edit-actions {
  display: flex;
  gap: 10px;
  margin-top: 6px;
}

/* ---------- 模块页（待办 / 留言） ---------- */

.page {
  max-width: 1080px;
  margin: 0 auto;
  padding: clamp(36px, 5vw, 64px) clamp(20px, 4vw, 48px) 88px;
}

.page-head { margin-bottom: 24px; }

.page-head .kicker { margin-bottom: 10px; }

.page-head h1 {
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.03em;
}

.page-head p {
  margin-top: 8px;
  color: var(--text-dim);
  font-size: 15px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: clamp(20px, 3.5vw, 32px);
  transition: background-color .35s ease, border-color .35s ease;
}

.inline-form {
  display: flex;
  gap: 10px;
}

.inline-form input { flex: 1; }

.inline-form button { padding: 11px 20px; flex: none; }

.stats {
  font-size: 13px;
  color: var(--text-faint);
  margin: 12px 2px 2px;
  min-height: 16px;
}

/* 待办列表 */

.todo-list {
  list-style: none;
  margin-top: 6px;
}

.todo-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 10px;
  border-bottom: 1px solid var(--line);
  border-radius: 10px;
  transition: background-color .2s;
}

.todo-item:hover { background: var(--surface-2); }

.todo-item:last-child { border-bottom: none; }

.todo-item label {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}

.todo-item input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  flex: none;
  border-radius: 7px;
  border: 2px solid var(--line-strong);
  background: var(--surface);
  cursor: pointer;
  position: relative;
  transition: background-color .2s, border-color .2s;
}

.todo-item input[type="checkbox"]:hover { border-color: var(--acid); }

.todo-item input[type="checkbox"]:checked {
  background: var(--acid);
  border-color: var(--acid);
}

.todo-item input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 14px no-repeat;
}

.todo-text {
  font-size: 15px;
  line-height: 1.5;
  word-break: break-word;
  transition: color .2s;
}

.todo-item.done .todo-text {
  color: var(--text-faint);
  text-decoration: line-through;
}

.delete {
  border: none;
  background: none;
  color: var(--text-faint);
  font-size: 13px;
  padding: 6px 10px;
  border-radius: 8px;
  opacity: .55;
  flex: none;
  transition: all .2s;
}

.todo-item:hover .delete { opacity: 1; }

.delete:hover {
  color: var(--ember);
  background: color-mix(in srgb, var(--ember) 10%, transparent);
}

/* 留言列表 */

.msg-list { list-style: none; margin-top: 4px; }

.msg-item {
  display: flex;
  gap: 14px;
  padding: 18px 4px;
  border-bottom: 1px solid var(--line);
}

.msg-item:last-child { border-bottom: none; }

.msg-avatar {
  width: 40px;
  height: 40px;
  flex: none;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
}

.msg-body { flex: 1; min-width: 0; }

.msg-meta {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.msg-author { font-size: 14px; font-weight: 700; }

a.msg-avatar {
  text-decoration: none;
  transition: transform .2s ease, box-shadow .2s ease;
}

a.msg-avatar:hover { transform: scale(1.08); }

a.msg-author { color: inherit; text-decoration: none; }

a.msg-author:hover { color: var(--acid); text-decoration: underline; }

.msg-time { font-size: 12px; color: var(--text-faint); }

.msg-content {
  margin-top: 5px;
  font-size: 15px;
  line-height: 1.7;
  word-break: break-word;
  white-space: pre-wrap;
}

/* 空状态 */

.empty {
  margin-top: 18px;
  padding: 40px 16px;
  text-align: center;
  color: var(--text-faint);
  font-size: 14px;
  border: 1.5px dashed var(--line-strong);
  border-radius: var(--radius);
}

/* ---------- 入场动效 ---------- */

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

@keyframes avatar-in {
  from { opacity: 0; transform: scale(.86); }
  to { opacity: 1; transform: scale(1); }
}

.page-head { animation: rise-in .45s cubic-bezier(.22, .68, .32, 1) both; }

.card { animation: rise-in .45s cubic-bezier(.22, .68, .32, 1) .06s both; }

.home-hero { animation: rise-in .55s cubic-bezier(.22, .68, .32, 1) both; }

.showcase { animation: rise-in .55s cubic-bezier(.22, .68, .32, 1) .1s both; }

.auth-side { animation: rise-in .55s cubic-bezier(.22, .68, .32, 1) both; }

.auth-panel-wrap { animation: rise-in .55s cubic-bezier(.22, .68, .32, 1) .08s both; }

.profile-head .profile-avatar { animation: avatar-in .5s cubic-bezier(.34, 1.56, .64, 1) .1s both; }

.todo-item, .msg-item { animation: rise-in .35s cubic-bezier(.22, .68, .32, 1) both; }

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

@media (max-width: 900px) {
  .home-hero { grid-template-columns: 1fr; }

  .home-feature { width: min(100%, 480px); }

  .preview-card { transform: none; }

  .showcase-grid { grid-template-columns: repeat(2, 1fr); }

  .auth-page { grid-template-columns: 1fr; gap: 36px; }

  .auth-panel-wrap { justify-content: center; }

  .auth-card { width: min(480px, 100%); }

  .profile-layout { grid-template-columns: 1fr; }

  .moment-feed { margin-top: 6px; }
}

@media (max-width: 640px) {
  .brand-name, .nav-user .nav-name { display: none; }

  .nav-inner {
    height: 60px;
    gap: 10px;
    padding: 0 14px;
  }

  .nav-links { gap: 0; }

  .nav-link { padding: 7px 10px; font-size: 13.5px; }

  .theme-toggle { width: 34px; height: 34px; }

  .nav-user { gap: 8px; }

  .showcase-grid { grid-template-columns: 1fr; }

  .preview-flower { width: 88px; top: -30px; right: 4px; }

  .profile-head { padding: 28px 20px 0; }

  .profile-view { padding: 0 20px; }

  .profile-stats { padding: 18px 0 4px; }

  .profile-avatar { width: 96px; height: 96px; font-size: 34px; }

  .profile-edit { padding: 16px 20px 28px; }

  .auth-page { gap: 24px; padding-top: 20px; }

  .auth-logo { width: 48px; height: 48px; border-radius: 15px; margin-bottom: 16px; }

  .auth-logo svg { width: 34px; height: 34px; }

  .auth-typed { margin-top: 12px; font-size: 14px; }

  .auth-flower { width: 54px; height: 54px; top: 10px; right: 12px; }

  .auth-points, .auth-foot { display: none; }
}

@media (max-width: 420px) {
  .cta-row .primary, .cta-row .ghost { flex: 1; justify-content: center; }

  .shot { height: 186px; }
}

/* ---------- 动效偏好 ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  .flower { animation: none; }

  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

/* ---------- 管理后台 ---------- */

.admin-page { max-width: 1180px; }

.admin-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.admin-stat {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 20px 20px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: border-color .25s, box-shadow .25s, background-color .35s;
}

.admin-stat:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-md);
}

.admin-stat::before {
  content: "";
  position: absolute;
  top: 0;
  left: 20px;
  width: 34px;
  height: 3px;
  border-radius: 0 0 3px 3px;
  background: var(--acid);
  opacity: .8;
}

.admin-stat-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .1em;
  color: var(--text-faint);
}

.admin-stat strong {
  font-size: clamp(1.7rem, 3vw, 2.2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.admin-stat-today {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--success);
}

.admin-section + .admin-section { margin-top: 20px; }

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

.admin-section-head .kicker { margin-bottom: 6px; }

.admin-section-head h2 {
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.admin-count {
  flex: none;
  font-size: 12px;
  color: var(--text-dim);
  border: 1px solid var(--line-strong);
  border-radius: 99px;
  padding: 4px 11px;
  white-space: nowrap;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.admin-table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
  font-size: 13.5px;
}

.admin-table th {
  padding: 10px 14px;
  text-align: left;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .08em;
  color: var(--text-faint);
  background: var(--bg-soft);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

.admin-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

.admin-table tbody tr:last-child td { border-bottom: none; }

.admin-table tbody tr:hover { background: var(--surface-2); }

.admin-user {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 600;
}

.admin-user .avatar {
  width: 30px;
  height: 30px;
  flex: none;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}

.admin-me {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--acid);
  background: var(--primary-soft);
  border-radius: 99px;
  padding: 2px 8px;
}

.admin-num {
  color: var(--text-dim);
  font-variant-numeric: tabular-nums;
}

.role-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 99px;
  padding: 3px 10px;
  font-size: 11.5px;
  font-weight: 700;
  white-space: nowrap;
}

.role-badge.admin {
  color: var(--acid);
  background: var(--primary-soft);
}

.role-badge.user {
  color: var(--text-dim);
  background: var(--surface-2);
}

.admin-actions {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
}

.admin-hint {
  font-size: 11.5px;
  color: var(--text-faint);
}

.danger-link {
  border: 1px solid color-mix(in srgb, var(--ember) 35%, transparent);
  border-radius: 8px;
  background: transparent;
  color: var(--ember);
  font-size: 12.5px;
  font-weight: 600;
  padding: 6px 11px;
  transition: background-color .2s, border-color .2s, opacity .2s;
}

.danger-link:hover {
  background: color-mix(in srgb, var(--ember) 10%, transparent);
  border-color: var(--ember);
}

.danger-link:disabled { opacity: .45; cursor: default; }

.admin-msg-list { list-style: none; }

.admin-msg-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 13px 2px;
  border-bottom: 1px solid var(--line);
}

.admin-msg-item:last-child { border-bottom: none; }

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

.admin-msg-meta {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 10px;
}

.admin-msg-author { font-size: 13.5px; font-weight: 700; }

.admin-msg-time { font-size: 11.5px; color: var(--text-faint); }

.admin-msg-content {
  margin-top: 4px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-dim);
  word-break: break-word;
  white-space: pre-wrap;
}

.admin-msg-item .danger-link { flex: none; }

.admin-photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
}

.admin-photo {
  position: relative;
  aspect-ratio: 1;
  border-radius: 14px;
  background-size: cover;
  background-position: center;
  background-color: var(--surface-2);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.admin-photo-tag {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 20px 9px 7px;
  font-size: 11px;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  background: linear-gradient(transparent, rgba(15, 15, 18, .7));
}

.admin-photo-del {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 26px;
  height: 26px;
  border: none;
  border-radius: 50%;
  background: rgba(23, 23, 27, .6);
  color: #fff;
  font-size: 15px;
  line-height: 1;
  display: grid;
  place-items: center;
  transition: background-color .2s, opacity .2s;
}

.admin-photo-del:hover { background: rgba(23, 23, 27, .85); }

.admin-photo-del:disabled { opacity: .45; }

.admin-denied {
  padding: clamp(32px, 5vw, 52px);
  text-align: center;
}

.admin-denied[hidden] { display: none; }

.admin-denied h2 {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.admin-denied p {
  margin: 10px 0 20px;
  color: var(--text-dim);
  font-size: 14px;
}

@media (max-width: 900px) {
  .admin-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .admin-stat { padding: 16px 16px 14px; border-radius: 16px; }
  .admin-stat::before { left: 16px; }
  .admin-section-head h2 { font-size: 17px; }
  .admin-photo-grid { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); }
  .admin-msg-item { gap: 8px; }

  .nav-inner { gap: 8px; }
  .nav-links {
    flex: 1 1 auto;
    min-width: 0;
    margin-left: 0;
    padding-left: 10px;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .nav-links::-webkit-scrollbar { display: none; }
  .nav-link { padding: 7px 9px; font-size: 13px; }
  .nav-user { flex: none; gap: 6px; }
  .nav-user .ghost.small { padding: 6px 10px; font-size: 12.5px; }
  .theme-toggle { margin-left: 0; }
}

/* ---------- 站内找人（首页 Module 05） ---------- */
.shot-search { gap: 8px; overflow: hidden; }

.search-form {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 4px 4px 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 9px;
}

.search-form input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 12.5px;
  padding: 6px 0;
  outline: none;
}

.search-form input::placeholder { color: var(--muted); }

.search-go {
  flex: none;
  border: 0;
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  background: var(--acid);
  cursor: pointer;
}

.search-go:hover { filter: brightness(1.08); }

.search-results {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  gap: 6px;
}

.search-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
}

.search-item:hover { border-color: var(--acid); }

.search-avatar {
  width: 24px;
  height: 24px;
  flex: none;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
}

.search-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.search-text strong { font-size: 12px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-text span { font-size: 10.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.search-hint {
  margin: 0;
  padding: 18px 4px;
  text-align: center;
  font-size: 11.5px;
  color: var(--muted);
}

/* ---------- 管理后台：用户搜索 ---------- */
.admin-tools {
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-search {
  width: 180px;
  padding: 7px 10px;
  font-size: 13px;
  color: var(--ink);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 9px;
  outline: none;
}

.admin-search:focus {
  border-color: var(--acid);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--acid) 18%, transparent);
}

@media (max-width: 640px) {
  .admin-tools { width: 100%; justify-content: space-between; }
  .admin-search { flex: 1; width: auto; }
}

/* ---------- 找人页 /search ---------- */
.search-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
}

.search-bar input {
  flex: 1;
  min-width: 0;
  font: inherit;
  font-size: 15px;
  padding: 11px 14px;
  color: var(--ink);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 11px;
  outline: none;
}

.search-bar input:focus {
  border-color: var(--acid);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--acid) 18%, transparent);
}

.user-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.user-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-2);
  text-decoration: none;
  color: inherit;
  transition: border-color .15s ease, transform .15s ease;
}

.user-card:hover {
  border-color: var(--acid);
  transform: translateY(-1px);
}

.user-card-avatar {
  width: 40px;
  height: 40px;
  flex: none;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
}

.user-card-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.user-card-body strong {
  font-size: 15px;
  font-weight: 600;
}

.user-card-body span {
  font-size: 13px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-card-go {
  flex: none;
  font-size: 12.5px;
  color: var(--acid);
  font-weight: 600;
}

/* ---------- 花夕：站内 AI ---------- */
.chat-card { display: flex; flex-direction: column; gap: 12px; }

.chat-log {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 320px;
  max-height: 56vh;
  overflow-y: auto;
  padding: 4px 2px 8px;
}

.chat-hello {
  padding: 18px 20px;
  border-radius: 14px;
  background: var(--surface-2);
  border: 1px dashed var(--line);
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.chat-hello strong { display: block; font-size: 15px; color: var(--ink); margin-bottom: 4px; }
.chat-hello p { margin: 0; }

.bubble { display: flex; flex-direction: column; gap: 4px; max-width: 88%; }
.bubble-user { align-self: flex-end; align-items: flex-end; }
.bubble-assistant { align-self: flex-start; align-items: flex-start; }

.bubble-who {
  font-size: 11.5px;
  color: var(--muted);
  letter-spacing: .04em;
}

.bubble-body {
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 14.5px;
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
}

.bubble-user .bubble-body {
  background: var(--acid);
  color: #fff;
  border-bottom-right-radius: 4px;
}

.bubble-assistant .bubble-body {
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--ink);
  border-bottom-left-radius: 4px;
}

.bubble-typing .bubble-body { display: flex; gap: 4px; align-items: center; }
.bubble-typing i {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--muted);
  animation: chatBlink 1.2s infinite ease-in-out;
}
.bubble-typing i:nth-child(2) { animation-delay: .15s; }
.bubble-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes chatBlink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }

.chat-form { display: flex; gap: 10px; align-items: flex-end; }

.chat-form textarea {
  flex: 1;
  min-width: 0;
  resize: none;
  font: inherit;
  font-size: 14.5px;
  line-height: 1.6;
  padding: 11px 14px;
  color: var(--ink);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  outline: none;
  max-height: 160px;
}

.chat-form textarea:focus {
  border-color: var(--acid);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--acid) 16%, transparent);
}

.chat-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
  color: var(--muted);
}

.chat-status-warn { color: var(--muted); }

/* ============================================================
   花夕 · 单任务对话页
   结构参考极简 AI 落地页：大标题 + 大输入框 + 胶囊提示；
   配色跟随站点主题，只保留一处品牌色（发送键与光标）
   ============================================================ */

.chat-page {
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.chat-page .nav { flex: none; background: transparent; border-bottom-color: transparent; }
.chat-page .foot { display: none; }

.chat-main {
  flex: 1;
  min-height: 0;
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: 0 clamp(18px, 4vw, 24px);
  display: flex;
  flex-direction: column;
}

/* 空状态时整体垂直居中，对话开始后回到常规的上下结构 */
.chat-main.is-empty { justify-content: center; padding-bottom: clamp(24px, 8vh, 72px); }
.chat-main.is-empty .chat-scroll { flex: 0 0 auto; overflow: visible; padding: 0; }
.chat-main:not(.is-empty) .chat-hero { display: none; }
.chat-main:not(.is-empty) .chat-suggest { display: none; }

.chat-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 16px 2px 8px;
  scrollbar-width: thin;
  scrollbar-color: transparent transparent;
  transition: scrollbar-color .2s ease;
}

.chat-scroll:hover { scrollbar-color: var(--line-strong) transparent; }
.chat-scroll::-webkit-scrollbar { width: 8px; }
.chat-scroll::-webkit-scrollbar-track { background: transparent; }
.chat-scroll::-webkit-scrollbar-thumb { background: transparent; border-radius: 99px; }
.chat-scroll:hover::-webkit-scrollbar-thumb { background: var(--line-strong); }

.chat-thread { display: flex; flex-direction: column; gap: 2px; }

/* ---------- 空状态 ---------- */
.chat-hero {
  text-align: center;
  padding: 0 0 26px;
}

.hero-title {
  margin: 0 0 12px;
  font-size: clamp(28px, 4.6vw, 40px);
  line-height: 1.22;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--text);
}

.hero-sub {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.7;
  color: var(--text-dim);
  letter-spacing: .005em;
}

/* ---------- 输入框 ---------- */
.composer-wrap {
  flex: none;
  padding: 4px 0 max(18px, env(safe-area-inset-bottom));
}

.chat-error {
  margin: 0 0 8px;
  font-size: 12.5px;
  color: var(--ember);
  text-align: center;
}

.chat-error:empty { display: none; }

.composer {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 16px 12px 10px 18px;
  border: 1px solid transparent;
  border-radius: 16px;
  background: var(--surface-2);
  transition: border-color .18s ease, background-color .18s ease, box-shadow .18s ease;
}

[data-theme="dark"] .composer { background: var(--surface); }

.composer:hover { background: color-mix(in srgb, var(--surface-2) 78%, var(--line)); }
[data-theme="dark"] .composer:hover { background: var(--surface-2); }

.composer:focus-within {
  border-color: color-mix(in srgb, var(--acid) 34%, transparent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--acid) 9%, transparent);
}

.composer textarea {
  width: 100%;
  min-height: 26px;
  max-height: 200px;
  padding: 2px 0 6px;
  border: 0;
  outline: none;
  resize: none;
  background: transparent;
  font-family: inherit;
  font-size: 15.5px;
  line-height: 1.68;
  color: var(--text);
  scrollbar-width: none;
}

.composer textarea::-webkit-scrollbar { display: none; }
.composer textarea::placeholder { color: var(--text-faint); }

.composer-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 26px;
}

.composer-model {
  font-size: 11.5px;
  color: var(--text-faint);
  letter-spacing: .02em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.composer-tools { display: flex; align-items: center; gap: 6px; flex: none; }

.composer-counter {
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  color: var(--text-faint);
}

.composer-counter:empty { display: none; }

.composer-ghost {
  border: 0;
  background: none;
  padding: 4px 6px;
  border-radius: 8px;
  font-family: inherit;
  font-size: 11.5px;
  color: var(--text-faint);
  cursor: pointer;
  transition: color .16s ease, background-color .16s ease;
}

.composer-ghost:hover { color: var(--text); background: color-mix(in srgb, var(--text) 6%, transparent); }

.composer-send {
  width: 32px;
  height: 32px;
  flex: none;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: var(--acid);
  color: #fff;
  cursor: pointer;
  transition: opacity .16s ease, transform .16s ease, background-color .16s ease;
}

.composer-send:hover:not(:disabled) { transform: translateY(-1px); filter: brightness(1.06); }

.composer-send:disabled {
  background: color-mix(in srgb, var(--text) 8%, transparent);
  color: var(--text-faint);
  cursor: default;
  transform: none;
}

.composer-send.is-stop {
  background: var(--text);
  color: var(--bg);
}

/* 胶囊提示 */
.chat-suggest {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  padding: 16px 0 0;
}

.chat-suggest button {
  padding: 8px 14px;
  border: 0;
  border-radius: 999px;
  background: color-mix(in srgb, var(--text) 5%, transparent);
  color: var(--text-dim);
  font-family: inherit;
  font-size: 12.5px;
  cursor: pointer;
  transition: background-color .16s ease, color .16s ease;
}

.chat-suggest button:hover {
  background: color-mix(in srgb, var(--text) 9%, transparent);
  color: var(--text);
}

/* ---------- 消息 ---------- */
.msg { display: flex; padding: 12px 0; animation: msgIn .22s cubic-bezier(.22,.61,.36,1); }

@keyframes msgIn {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: none; }
}

.msg-user { justify-content: flex-end; padding: 8px 0; }

.msg-bubble {
  max-width: min(78%, 54ch);
  padding: 10px 15px;
  border-radius: 16px 16px 6px 16px;
  background: var(--surface-2);
  color: var(--text);
  font-size: 15px;
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
}

.msg-ai { gap: 12px; align-items: flex-start; }

.msg-avatar {
  width: 26px;
  height: 26px;
  flex: none;
  margin-top: 4px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  background: var(--acid);
}

.msg-content {
  flex: 1;
  min-width: 0;
  max-width: 64ch;
  padding-top: 2px;
  font-size: 15.5px;
  line-height: 1.78;
  letter-spacing: .005em;
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-word;
}

.msg-copy {
  align-self: flex-start;
  margin-top: 6px;
  width: 26px;
  height: 26px;
  flex: none;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text-faint);
  cursor: pointer;
  opacity: 0;
  transition: opacity .16s ease, background-color .16s ease, color .16s ease;
}

.msg-ai:hover .msg-copy,
.msg-copy:focus-visible { opacity: 1; }
.msg-copy:hover { background: var(--surface-2); color: var(--text); }

.caret {
  display: inline-block;
  width: 2px;
  height: 1em;
  margin-left: 3px;
  vertical-align: -0.14em;
  border-radius: 1px;
  background: var(--acid);
  animation: caretBlink 1.05s steps(2, start) infinite;
}

@keyframes caretBlink { 0%, 50% { opacity: 1; } 50.01%, 100% { opacity: 0; } }

.thinking { display: inline-flex; gap: 5px; align-items: center; height: 1.4em; }
.thinking i {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--text-faint);
  animation: thinkingPulse 1.3s infinite ease-in-out;
}
.thinking i:nth-child(2) { animation-delay: .16s; }
.thinking i:nth-child(3) { animation-delay: .32s; }

@keyframes thinkingPulse {
  0%, 70%, 100% { opacity: .28; transform: translateY(0); }
  35% { opacity: 1; transform: translateY(-2px); }
}

@media (max-width: 640px) {
  .chat-main { padding: 0 16px; }
  .chat-main.is-empty { padding-bottom: 32px; }
  .hero-title { font-size: 26px; }
  .msg-bubble { max-width: 86%; }
  .composer { border-radius: 14px; padding: 12px 10px 8px 14px; }
  .composer-ghost { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .msg, .caret, .thinking i { animation: none; }
}

/* 空对话时隐藏「清空」，右侧只留发送键 */
.composer.is-blank .composer-ghost { visibility: hidden; }

/* 模型标签做成带状态点的小标签，平衡右侧按钮的视觉重量 */
.composer-model {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: var(--text-dim);
  letter-spacing: .01em;
}

.model-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-faint);
  flex: none;
}

.model-dot.ok { background: var(--success); box-shadow: 0 0 0 3px color-mix(in srgb, var(--success) 16%, transparent); }

/* 占位符与辅助文字稍微提亮，兼顾可读性 */
.composer textarea::placeholder { color: color-mix(in srgb, var(--text-faint) 88%, var(--text-dim)); }
.composer-ghost, .composer-counter { color: var(--text-faint); }

/* 输入框整体再收一点高度 */
.composer { padding: 14px 12px 9px 18px; gap: 0; }
.composer textarea { min-height: 24px; padding: 2px 0 4px; }
.composer-bar { min-height: 30px; }

/* 模型标签可读性最后收一档 */
.composer-model { font-size: 12px; color: var(--text-dim); }
.composer-model #chat-status { opacity: .92; }

/* ---------- 输入框：彻底消除「框中框」，并收紧整体面积 ---------- */
.composer textarea,
.composer textarea:hover,
.composer textarea:focus,
.composer textarea:focus-visible {
  border: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
  border-radius: 0 !important;
}

/* 聚焦只改边线颜色与底色，不再加光晕（光晕会看起来像第二个框） */
.composer:focus-within {
  border-color: color-mix(in srgb, var(--acid) 40%, transparent);
  background: color-mix(in srgb, var(--surface-2) 92%, var(--bg));
  box-shadow: none;
}

[data-theme="dark"] .composer:focus-within { background: var(--surface-2); }

/* 整体更紧凑：单行时约 72px */
.composer { padding: 11px 10px 7px 14px; gap: 0; border-radius: 14px; }
.composer textarea { min-height: 22px; padding: 1px 0 3px; font-size: 15px; line-height: 1.6; }
.composer-bar { min-height: 28px; }
.composer-send { width: 28px; height: 28px; }
.composer-ghost { font-size: 11px; padding: 3px 5px; }

/* 对话头像：改为品牌花朵标记，浅底 + 品牌色，比实心紫块更轻 */
.msg-avatar {
  width: 26px;
  height: 26px;
  background: color-mix(in srgb, var(--acid) 12%, transparent);
  color: var(--acid);
  border-radius: 50%;
  display: grid;
  place-items: center;
}

[data-theme="dark"] .msg-avatar {
  background: color-mix(in srgb, var(--acid) 26%, transparent);
  color: color-mix(in srgb, var(--acid) 75%, #fff);
}

.msg-avatar svg { display: block; }

/* ---------- 回复排版（轻量 Markdown 渲染后） ---------- */
.msg-content.rich { white-space: normal; }

.msg-content.rich p { margin: 0 0 10px; }
.msg-content.rich p:last-child { margin-bottom: 0; }

.msg-content.rich h3,
.msg-content.rich h4,
.msg-content.rich h5 {
  margin: 16px 0 8px;
  font-size: 15.5px;
  font-weight: 600;
  letter-spacing: -.005em;
}

.msg-content.rich h3:first-child,
.msg-content.rich h4:first-child,
.msg-content.rich h5:first-child { margin-top: 0; }

.msg-content.rich ul,
.msg-content.rich ol {
  margin: 0 0 10px;
  padding-left: 20px;
}

.msg-content.rich li { margin: 4px 0; }
.msg-content.rich li::marker { color: color-mix(in srgb, currentColor 62%, transparent); font-variant-numeric: tabular-nums; }

.msg-content.rich strong { font-weight: 600; }
.msg-content.rich em { font-style: italic; color: var(--text-dim); }

.msg-content.rich blockquote {
  margin: 0 0 10px;
  padding: 2px 0 2px 12px;
  border-left: 2px solid var(--line-strong);
  color: var(--text-dim);
}

.msg-content.rich code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  padding: 1.5px 5px;
  border-radius: 5px;
  background: var(--surface-2);
  color: var(--text);
}

/* 线框头像：线条更清透一点 */
.msg-avatar svg { stroke-linecap: round; }
.msg-avatar { background: color-mix(in srgb, var(--acid) 9%, transparent); }
[data-theme="dark"] .msg-avatar { background: color-mix(in srgb, var(--acid) 20%, transparent); }

/* 中文回退字体下 600 不够明显，加粗调到 700 */
.msg-content.rich strong { font-weight: 700; color: var(--text); }
.msg-content.rich h3, .msg-content.rich h4, .msg-content.rich h5 { font-weight: 700; }
.msg-content.rich { letter-spacing: .012em; }

/* 线框头像再清楚一点 */
.msg-avatar { background: color-mix(in srgb, var(--acid) 13%, transparent); color: var(--acid); }
[data-theme="dark"] .msg-avatar { background: color-mix(in srgb, var(--acid) 24%, transparent); }

/* ---------- 花夕：会话工具条与历史面板 ---------- */
.chat-toolbar {
  flex: none;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  padding: 10px 0 2px;
}

.chat-tool {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--text-dim);
  font-family: inherit;
  font-size: 12px;
  cursor: pointer;
  transition: color .16s ease, border-color .16s ease, background-color .16s ease;
}

.chat-tool:hover { color: var(--text); border-color: var(--line-strong); background: color-mix(in srgb, var(--text) 4%, transparent); }

.chat-tool-accent { color: var(--acid); border-color: color-mix(in srgb, var(--acid) 30%, transparent); }
.chat-tool-accent:hover { color: var(--acid); background: color-mix(in srgb, var(--acid) 8%, transparent); border-color: color-mix(in srgb, var(--acid) 45%, transparent); }

.chat-history-panel {
  position: absolute;
  top: 52px;
  right: clamp(18px, 4vw, 24px);
  z-index: 30;
  width: min(300px, calc(100% - 32px));
  max-height: 320px;
  overflow-y: auto;
  padding: 6px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
}

.chat-main { position: relative; }

.chat-history-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 9px 10px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--text);
  font-family: inherit;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
}

.chat-history-item:hover { background: var(--surface-2); }
.chat-history-item.active { background: color-mix(in srgb, var(--acid) 9%, transparent); }
.chat-history-item .h-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-history-item .h-time { font-size: 11px; color: var(--text-faint); flex: none; }
.chat-history-empty { padding: 14px; text-align: center; font-size: 12.5px; color: var(--text-faint); }

.h-del {
  flex: none;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text-faint);
  font-size: 14px;
  cursor: pointer;
  opacity: 0;
}

.chat-history-item:hover .h-del { opacity: 1; }
.h-del:hover { background: color-mix(in srgb, var(--ember) 12%, transparent); color: var(--ember); }

/* 输入框面积调大 */
.composer { padding: 16px 14px 12px 18px; border-radius: 18px; }
.composer textarea { min-height: 54px; padding: 2px 0 8px; font-size: 15.5px; line-height: 1.7; }
.composer-bar { min-height: 30px; }
.composer-send { width: 32px; height: 32px; }

/* 工具条改成无边框的轻量文字按钮，减少「悬浮药丸」感 */
.chat-tool {
  border-color: transparent;
  background: transparent;
  color: var(--text-faint);
  padding: 5px 9px;
  font-size: 12.5px;
}
.chat-tool:hover { background: color-mix(in srgb, var(--text) 6%, transparent); color: var(--text); }
.chat-tool-accent { color: var(--acid); border-color: transparent; }
.chat-tool-accent:hover { background: color-mix(in srgb, var(--acid) 9%, transparent); }

/* 历史列表分隔线 */
.chat-history-item + .chat-history-item { border-top: 1px solid var(--line); }
.chat-history-item { border-radius: 8px; }

/* 输入框高度微调（比原来大，但不至于占满） */
.composer { padding: 14px 12px 10px 16px; }
.composer textarea { min-height: 46px; }

/* 空状态下「新对话」是多余的，隐藏掉，只留历史入口 */
.chat-main.is-empty .chat-tool-accent { display: none; }
.chat-tool { color: var(--text-dim); }
.chat-tool:hover { color: var(--text); }

/* 深色下次级文字提亮一档 */
[data-theme="dark"] .chat-tool { color: color-mix(in srgb, var(--text) 64%, transparent); }
[data-theme="dark"] .h-time { color: color-mix(in srgb, var(--text) 52%, transparent); }

/* 模型状态切换时的轻微闪动，提示「变了」 */
@keyframes statusFlash {
  from { opacity: .35; }
  to { opacity: 1; }
}
#chat-status.is-flash { animation: statusFlash .5s ease; }

/* 花夕：代码块 */
.msg-content.rich pre.code-block {
  margin: 10px 0;
  padding: 11px 13px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--text) 4%, transparent);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.msg-content.rich pre.code-block code {
  display: block;
  padding: 0;
  border: 0;
  background: none;
  color: var(--text);
  font-size: 12.8px;
  line-height: 1.65;
  white-space: pre;
  font-variant-ligatures: none;
}

[data-theme="dark"] .msg-content.rich pre.code-block {
  background: #101013;
  border-color: #26262b;
}

/* ---------- 输入区升级：分隔线 / 快捷键提示 / 图标按钮 ---------- */
.composer {
  border: 1px solid var(--line);
  padding: 14px 12px 8px 16px;
  gap: 0;
}

.composer:focus-within { box-shadow: 0 0 0 3px color-mix(in srgb, var(--acid) 10%, transparent), 0 6px 20px color-mix(in srgb, var(--text) 5%, transparent); }

.composer-bar {
  margin: 8px -12px 0 -16px;
  padding: 8px 12px 0 16px;
  border-top: 1px solid var(--line);
}

.composer-model {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px 3px 7px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--text) 4.5%, transparent);
  font-size: 11.5px;
}

.composer-kbd {
  font-size: 10.5px;
  letter-spacing: .03em;
  color: color-mix(in srgb, var(--text-faint) 88%, transparent);
  margin-right: 4px;
  white-space: nowrap;
}

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

.composer-icon {
  width: 26px;
  height: 26px;
  flex: none;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--text-faint);
  cursor: pointer;
  transition: color .16s ease, background-color .16s ease;
}

.composer-icon:hover { color: var(--ember); background: color-mix(in srgb, var(--ember) 10%, transparent); }

.composer textarea { min-height: 50px; }

/* 轻提示 */
.chat-toast {
  position: fixed;
  left: 50%;
  bottom: 132px;
  transform: translate(-50%, 8px);
  z-index: 60;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  font-size: 12.5px;
  color: var(--text);
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
}

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

/* 复制对话按钮与清空按钮统一触感 */
#chat-copy:hover { color: var(--text); background: color-mix(in srgb, var(--text) 6%, transparent); }

/* 模型标签弱化：只是状态，不是控件 */
.composer-model {
  background: none;
  padding: 0;
  font-size: 11.5px;
}

/* 图标按钮禁用态 */
.composer-icon:disabled {
  opacity: .32;
  cursor: default;
  background: none;
  color: var(--text-faint);
}

/* 破坏性操作与发送之间留点距离 */
.composer-send { margin-left: 4px; }

/* ---------- 空状态优化：标题收紧 + 建议改为条目卡 ---------- */
.chat-hero { padding: 0 0 18px; }
.hero-title {
  font-size: clamp(24px, 3.4vw, 32px);
  letter-spacing: -0.02em;
  margin: 0 0 10px;
}
.hero-sub { font-size: 13.5px; color: var(--text-faint); }

.chat-suggest {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 18px 0 0;
  justify-content: stretch;
}

.chat-suggest button {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: color-mix(in srgb, var(--surface) 55%, transparent);
  text-align: left;
  transition: border-color .18s ease, background-color .18s ease, transform .18s ease;
}

.chat-suggest button:hover {
  border-color: color-mix(in srgb, var(--acid) 34%, var(--line));
  background: color-mix(in srgb, var(--acid) 5%, transparent);
  transform: translateY(-1px);
}

.s-icon { width: 17px; height: 17px; flex: none; margin-top: 1px; color: var(--text-faint); transition: color .18s ease; }
.chat-suggest button:hover .s-icon { color: var(--acid); }

.s-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.s-title { font-size: 13px; font-weight: 500; color: var(--text); }
.s-desc { font-size: 11.5px; line-height: 1.5; color: var(--text-faint); }

@media (max-width: 640px) {
  .chat-suggest { grid-template-columns: 1fr; }
}

[data-theme="dark"] .chat-suggest button { background: #141417; }
[data-theme="dark"] .chat-suggest button:hover { background: #1a1a21; }

/* 继续上次对话 */
#chat-resume { max-width: 240px; }
#chat-resume-title {
  display: inline-block;
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: bottom;
  color: var(--text-dim);
}

/* ---------- 后台公告 ---------- */
.announce-form {
  display: flex;
  gap: 10px;
  align-items: flex-end;
  margin: 4px 0 14px;
}
.announce-input {
  flex: 1;
  min-height: 44px;
  max-height: 140px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface, transparent);
  color: var(--text);
  font: inherit;
  font-size: 13px;
  line-height: 1.6;
  resize: vertical;
}
.announce-input:focus {
  outline: none;
  border-color: color-mix(in srgb, var(--acid) 45%, var(--line));
}
.announce-form .primary { flex: none; }
.admin-msg-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: none;
}
.ghost-link {
  border: 0;
  background: transparent;
  padding: 0;
  font: inherit;
  font-size: 12.5px;
  color: var(--text-faint);
  cursor: pointer;
  transition: color .15s ease;
}
.ghost-link:hover { color: var(--acid); }
.admin-msg-item.is-off { opacity: .55; }
@media (max-width: 640px) {
  .announce-form { flex-direction: column; align-items: stretch; }
  .announce-form .primary { align-self: flex-end; }
}

/* ---------- 今日推荐 ---------- */
.daily {
  margin: clamp(32px, 4.5vw, 56px) 0 0;
}
.daily[hidden] { display: none; }

.daily-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.daily-hi { font-size: 13px; color: var(--text-dim); letter-spacing: .01em; }
.daily-hi b { color: var(--text); font-weight: 600; }
.daily-date { font-size: 11.5px; color: var(--text-faint); letter-spacing: .04em; }

.daily-card {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  align-items: center;
  gap: clamp(16px, 2vw, 28px);
  padding: 16px clamp(18px, 2vw, 24px);
  border: 1px solid var(--line);
  border-radius: 18px;
  background: color-mix(in srgb, var(--acid) 3%, var(--surface, #fff));
}
[data-theme="dark"] .daily-card {
  background: var(--surface);
  border-color: var(--line-strong);
}

.daily-coverbox {
  grid-column: 1;
  grid-row: 1;
  width: 200px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.daily-cover {
  position: relative;
  width: 200px;
  aspect-ratio: 1;
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--acid) 20%, var(--line));
  background: color-mix(in srgb, var(--acid) 11%, var(--surface-2, #17171b));
  overflow: hidden;
}
.daily-cover.has-img {
  padding: 0;
  border-color: var(--line);
  box-shadow: 0 14px 28px -20px rgba(0, 0, 0, .55);
  background: var(--surface-2, #17171b);
}
.daily-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 50%;
  display: block;
  opacity: 0;
  transition: opacity .32s ease;
}
.daily-cover img.is-loaded { opacity: 1; }
.daily-card {
  transition: opacity .3s ease, transform .3s cubic-bezier(.4, 0, .2, 1);
}
.daily-card.is-leaving {
  opacity: 0;
  transform: translateY(6px);
}
.daily-card.is-entering {
  opacity: 0;
  transform: translateY(-6px);
  transition: none;
}
.daily-cover img.is-portrait { object-position: 50% 26%; }
.daily-cover-art {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 22px;
  color: var(--acid);
  opacity: .3;
  pointer-events: none;
}
.daily-cover-art svg { width: 100%; height: 100%; }
.daily-cover-fallback {
  position: absolute;
  inset: 0;
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.daily-cover-fallback[hidden] { display: none; }
.daily-cover-kind {
  position: relative;
  font-size: 9.5px;
  letter-spacing: .16em;
  color: color-mix(in srgb, var(--text) 55%, transparent);
}
.daily-cover-title {
  position: relative;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.01em;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.daily-swap {
  border: 0;
  background: none;
  padding: 0;
  font: inherit;
  font-size: 12px;
  color: var(--text-faint);
  cursor: pointer;
  transition: color .18s ease;
}
.daily-swap:hover { color: var(--acid); }

.daily-cover-credit {
  font-size: 9.5px;
  line-height: 1.5;
  letter-spacing: .01em;
  color: var(--text-faint);
  text-align: right;
  padding-right: 1px;
  text-wrap: pretty;
}

.daily-cover-credit a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid color-mix(in srgb, currentColor 30%, transparent);
  padding-bottom: 1px;
}

.daily-cover-credit a:hover {
  color: var(--acid);
  border-bottom-color: color-mix(in srgb, var(--acid) 45%, transparent);
}
[data-theme="dark"] .daily-cover {
  background: color-mix(in srgb, var(--acid) 12%, var(--surface-2));
  border-color: color-mix(in srgb, var(--acid) 22%, var(--line));
}
[data-theme="dark"] .daily-cover.has-img { border-color: var(--line); }

.daily-body { grid-column: 2; grid-row: 1; min-width: 0; }

.daily-tags { display: flex; align-items: center; gap: 8px; margin-bottom: 7px; }
.daily-kind {
  font-size: 10.5px;
  letter-spacing: .08em;
  color: var(--acid);
  border: 1px solid color-mix(in srgb, var(--acid) 30%, transparent);
  border-radius: 999px;
  padding: 1px 8px;
}
.daily-meta { font-size: 11px; color: var(--text-faint); letter-spacing: .04em; }

.daily-title {
  font-size: clamp(1.15rem, 1.6vw, 1.35rem);
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.3;
}
.daily-artist { margin-top: 2px; font-size: 12.5px; color: var(--text-dim); }
.daily-hook { margin-top: 7px; font-size: 13.5px; line-height: 1.6; color: var(--text); max-width: 52ch; }
.daily-blurb {
  margin-top: 4px;
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--text-dim);
  max-width: 76ch;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  max-height: calc(1.7em * 3);
}
.daily-actions { display: flex; align-items: center; justify-content: flex-end; gap: 16px; margin-top: 14px; }

.daily-link {
  font-size: 12px;
  color: var(--text-faint);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color .18s ease, border-color .18s ease;
  white-space: nowrap;
}
.daily-link:hover { color: var(--acid); border-bottom-color: color-mix(in srgb, var(--acid) 40%, transparent); }

.daily + .showcase { margin-top: clamp(40px, 5.5vw, 72px); }

@media (max-width: 760px) {
  .daily-card {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 14px;
  }
  .daily-coverbox {
    grid-column: 1;
    grid-row: 1;
    width: 124px;
  }
  .daily-cover {
    width: 124px;
    padding: 12px;
  }
  .daily-cover-title { font-size: 12px; -webkit-line-clamp: 3; }
  .daily-body { grid-column: 1; grid-row: 2; }
  .daily-blurb { -webkit-line-clamp: 3; }
}

/* ---------- 后台：今日推荐 ---------- */
.rec-preview { margin: 4px 0 14px; }
.rec-mini {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: color-mix(in srgb, var(--acid) 3%, transparent);
}
.rec-mini-cover {
  flex: none;
  width: 72px;
  height: 72px;
  border-radius: 10px;
  overflow: hidden;
  background: var(--surface-2, #17171b);
  display: grid;
  place-items: center;
  font-size: 11px;
  color: var(--text-faint);
  letter-spacing: .06em;
}
.rec-mini-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rec-mini-body { min-width: 0; }
.rec-mini-meta { font-size: 11.5px; color: var(--text-faint); letter-spacing: .03em; }
.rec-mini-title { display: block; margin-top: 3px; font-size: 15px; font-weight: 600; }
.rec-mini-hook { margin-top: 4px; font-size: 13px; color: var(--text-dim); line-height: 1.6; }
.admin-tools select.admin-search { min-width: 120px; }

/* ---------- 站点公告卡 ---------- */
.notice-wrap {
  margin: 0 0 24px;
}
.notice-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0 11px;
  border-bottom: 1px solid var(--line);
  animation: notice-in .3s ease both;
}
.notice-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 16px;
  height: 16px;
  color: var(--acid);
}
.notice-icon svg { width: 16px; height: 16px; display: block; }
.notice-text {
  flex: 1;
  min-width: 0;
  max-width: 78ch;
  margin: 0;
  font-size: 13px;
  line-height: 1.65;
  color: var(--text-dim);
  overflow-wrap: anywhere;
}
.notice-close {
  flex: none;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--text-faint);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  transition: background-color .15s ease, color .15s ease;
}
.notice-close:hover {
  background: color-mix(in srgb, var(--acid) 10%, transparent);
  color: var(--text);
}
.notice-wrap.is-out {
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity .2s ease, transform .2s ease;
}
@keyframes notice-in {
  from { opacity: 0; transform: translateY(-5px); }
  to { opacity: 1; transform: none; }
}
[data-theme="dark"] .notice-card { border-bottom-color: var(--line); }
@media (max-width: 640px) {
  .notice-wrap { margin-bottom: 18px; }
  .notice-text { font-size: 12.5px; }
}

/* ---------- 无卡片布局（待办 / 留言 / 找人） ---------- */
.panel { margin-top: clamp(20px, 3vw, 32px); }

.panel .inline-form,
.panel .search-bar {
  display: flex;
  gap: 12px;
  align-items: center;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}
.panel .inline-form button,
.panel .search-bar button {
  flex: none;
  padding: 10px 20px;
  border-radius: 11px;
  font-size: 14.5px;
}

.panel .stats { margin: 16px 2px 6px; }

.panel .todo-item {
  padding: 14px 2px;
  border-radius: 0;
  border-bottom: 1px solid var(--line);
}
.panel .todo-item:hover { background: transparent; }
.panel .todo-item:last-child { border-bottom: 1px solid var(--line); }

.panel .msg-item { padding: 20px 2px; }
.panel .msg-item:last-child { border-bottom: 1px solid var(--line); }

.panel .user-list { margin-top: 18px; }

.panel .empty {
  border: 0;
  margin-top: 10px;
  padding: 30px 0;
  background: none;
}

@media (max-width: 560px) {
  .panel .inline-form,
  .panel .search-bar { gap: 10px; }
  .panel .inline-form button,
  .panel .search-bar button { padding: 8px 14px; }
}

/* ---------- 花夕首次使用引导 ---------- */
.chat-tour-link {
  margin: 18px auto 0;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  font-size: 12.5px;
  color: var(--text-faint);
  cursor: pointer;
  transition: color .18s ease;
}
.chat-tour-link:hover { color: var(--acid); }

.tour { position: fixed; inset: 0; z-index: 300; }
.tour[hidden] { display: none; }
.tour-mask {
  position: absolute;
  inset: 0;
  background: rgba(10, 10, 12, .55);
  animation: tour-fade .2s ease both;
}
@keyframes tour-fade { from { opacity: 0; } to { opacity: 1; } }

.tour-spot {
  position: relative !important;
  z-index: 301 !important;
  border-radius: 14px;
  background: var(--surface, #fff);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--acid) 70%, transparent),
    0 0 0 10px color-mix(in srgb, var(--acid) 14%, transparent);
}

.tour-card {
  position: absolute;
  z-index: 302;
  width: min(304px, calc(100vw - 32px));
  padding: 16px 18px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface, #fff);
  box-shadow: 0 24px 48px -20px rgba(0, 0, 0, .45);
  animation: tour-in .22s ease both;
}
[data-theme="dark"] .tour-card {
  background: var(--surface);
  border-color: var(--line-strong);
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .85);
}
[data-theme="dark"] .tour-mask { background: rgba(0, 0, 0, .74); }
[data-theme="dark"] .tour-skip { color: rgba(245, 245, 247, .5); }
[data-theme="dark"] .tour-skip:hover { color: var(--text); }
[data-theme="dark"] .tour-step { color: rgba(245, 245, 247, .45); }
[data-theme="dark"] .tour-spot { background: var(--surface); }
@keyframes tour-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.tour-step {
  font-size: 11px;
  letter-spacing: .08em;
  color: var(--text-faint);
}
.tour-title {
  margin-top: 6px;
  font-size: 15.5px;
  font-weight: 650;
  letter-spacing: -0.01em;
}
.tour-text {
  margin-top: 6px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-dim);
}
.tour-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
}
.tour-skip {
  border: 0;
  background: none;
  padding: 0;
  font: inherit;
  font-size: 12.5px;
  color: var(--text-faint);
  cursor: pointer;
}
.tour-skip:hover { color: var(--text); }
.tour-next {
  padding: 7px 16px;
  border-radius: 9px;
  font-size: 13px;
}

/* ---------- 生日庆祝 ---------- */
.bday-band {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 22px;
  padding: 14px 16px;
  border-radius: 14px;
  background: color-mix(in srgb, #fbbf24 13%, var(--surface));
  animation: bday-in .5s cubic-bezier(.2, .8, .3, 1) both;
}
.bday-emoji {
  flex: none;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  color: #f0a11a;
  animation: bday-bob 2.4s ease-in-out infinite;
}
.bday-emoji svg { width: 20px; height: 20px; }
.bday-text {
  flex: 1;
  min-width: 0;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--text-dim);
}
.bday-text b { color: var(--text); font-weight: 700; }
.bday-text span {
  display: block;
  margin-top: 1px;
  font-size: 12px;
  color: var(--text-faint);
}
.bday-close {
  flex: none;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--text-faint);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  transition: background-color .15s ease, color .15s ease;
}
.bday-close:hover { background: color-mix(in srgb, #fbbf24 20%, transparent); color: var(--text); }

.bday-confetti {
  position: fixed;
  inset: 0;
  z-index: 965;
  pointer-events: none;
  overflow: hidden;
}
.bday-confetti i {
  position: absolute;
  top: -10vh;
  display: block;
  animation-name: bday-fall;
  animation-timing-function: linear;
  animation-fill-mode: forwards;
  will-change: transform, opacity;
}
@keyframes bday-fall {
  0% { transform: translate3d(0, 0, 0) rotate(0deg); opacity: 1; }
  88% { opacity: 1; }
  100% { transform: translate3d(var(--drift, 20px), 120vh, 0) rotate(var(--spin, 540deg)); opacity: 0; }
}

@keyframes bday-in {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: none; }
}
@keyframes bday-bob {
  0%, 100% { transform: translateY(0) rotate(-4deg); }
  50% { transform: translateY(-3px) rotate(4deg); }
}
[data-theme="dark"] .bday-band { background: color-mix(in srgb, #fbbf24 11%, var(--surface)); }

@media (prefers-reduced-motion: reduce) {
  .bday-band, .bday-emoji { animation: none; }
}

/* ---------- 生日：全站提示 & 祝福弹层 ---------- */
.bday-peers {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 0 12px;
  border-bottom: 1px solid var(--line);
  animation: bday-in .45s ease both;
}
.bday-peers-dot {
  width: 6px;
  height: 6px;
  flex: none;
  border-radius: 50%;
  background: #f0a11a;
  box-shadow: 0 0 0 3px color-mix(in srgb, #f0a11a 18%, transparent);
}
.bday-peers-text {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  color: var(--text);
}
.bday-peers-text b { color: var(--text); font-weight: 650; }
.bday-peers-link {
  flex: none;
  font-size: 12px;
  color: var(--text-dim);
  text-decoration: none;
  transition: color .18s ease;
}
.bday-peers-link:hover { color: var(--acid); }

.bday-celebrate {
  position: fixed;
  inset: 0;
  z-index: 960;
  display: grid;
  place-items: center;
  padding: 24px;
  background: color-mix(in srgb, #0b0a10 62%, transparent);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: bday-fade .3s ease both;
}
.bday-celebrate.is-out { animation: bday-fade .3s ease reverse both; }

.bday-celebrate-card {
  width: min(360px, calc(100vw - 48px));
  padding: 30px 26px 24px;
  border-radius: 22px;
  border: 1px solid color-mix(in srgb, #f0a11a 26%, var(--line));
  background: var(--surface, #fff);
  text-align: center;
  box-shadow: 0 40px 90px -40px rgba(0, 0, 0, .65),
    0 0 0 1px color-mix(in srgb, #fbbf24 12%, transparent);
  animation: bday-pop .5s cubic-bezier(.16, 1, .3, 1) both;
}
[data-theme="dark"] .bday-celebrate-card { background: var(--surface); }

.bday-celebrate-glyph {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  border-radius: 50%;
  color: #e79a12;
  background: color-mix(in srgb, #fbbf24 16%, transparent);
  animation: bday-bob 2.6s ease-in-out infinite;
}
.bday-celebrate-glyph svg { width: 28px; height: 28px; }

.bday-celebrate-kicker {
  font-size: 10px;
  letter-spacing: .2em;
  color: var(--text-faint);
}
.bday-celebrate-title {
  margin-top: 8px;
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}
.bday-celebrate-title b { color: var(--acid); }
.bday-celebrate-text {
  margin-top: 10px;
  font-size: 13px;
  line-height: 1.8;
  color: var(--text-dim);
}
.bday-celebrate-btn {
  margin-top: 22px;
  padding: 9px 22px;
  border: 0;
  border-radius: 10px;
  background: var(--acid);
  color: #fff;
  font: inherit;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: transform .16s ease, background-color .16s ease;
}
.bday-celebrate-btn:hover { background: var(--electric); transform: translateY(-1px); }

@keyframes bday-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes bday-pop {
  from { opacity: 0; transform: scale(.92) translateY(8px); }
  to { opacity: 1; transform: none; }
}

/* ---------- 生日烟花 ---------- */
.bday-fireworks {
  position: fixed;
  inset: 0;
  z-index: 966;
  pointer-events: none;
  overflow: hidden;
}
.bday-firework {
  position: absolute;
  width: 0;
  height: 0;
}
.bday-firework i {
  position: absolute;
  left: 0;
  top: 0;
  width: 5px;
  height: 5px;
  margin: -2.5px 0 0 -2.5px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 10px currentColor;
  animation-name: bday-spark;
  animation-timing-function: cubic-bezier(.15, .7, .3, 1);
  animation-fill-mode: forwards;
}
@keyframes bday-spark {
  0% { transform: translate(0, 0) scale(.35); opacity: 0; }
  12% { opacity: 1; }
  75% { opacity: .9; }
  100% { transform: translate(var(--dx), var(--dy)) scale(.85); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .bday-fireworks { display: none; }
}
