/* ============================================================
   Daily Meme · 样式
   奶白 · 深棕 · 粉彩（指定色卡）
   ============================================================ */

:root {
  /* 基底与文字 */
  --bg: #FCF4E8;              /* 页面主背景（珍珠白） */
  --bg-soft: #F6EBD8;
  --card: #FFFFFF;            /* 卡片背景 */
  --elevated: #FFFFFF;
  --border: #EAE6DF;          /* 分割线 */
  --border-soft: #EFEBE3;
  --text: #2E3038;            /* 正文 */
  --heading: #21232A;         /* 主标题 */
  --text-dim: #6B7280;        /* 辅助文字 */
  --text-faint: #9AA1AC;

  /* 强调色 */
  --yellow: #F9E39E;          /* 选中分类标签 */
  --yellow-soft: #FBF0D4;
  --blue: #B9D8F2;            /* 辅助标签蓝 */
  --blue-soft: #EAF3FB;
  --green: #CDEFC8;           /* 辅助标签绿 */
  --green-soft: #EEF8EC;
  --purple: #DDD0F2;          /* 辅助标签紫 */
  --purple-soft: #F3EDFA;
  --pink: #F2C4D0;            /* 数据数字 */
  --pink-soft: #FBE9EE;

  /* 强调（按钮 / 链接 / 选中态） */
  --accent: #54302D;
  --accent-hover: #6A3D39;
  --accent-soft: #F6EBD8;
  --accent-border: #E2D3BE;
  --accent-text: #7A463F;

  /* 兼容别名（旧代码仍引用） */
  --lavender: #F9E39E;
  --lavender-deep: #E7C46B;
  --lavender-soft: #FBF0D4;
  --mint: #CDEFC8;
  --mint-soft: #EEF8EC;
  --peach: #F2C4D0;
  --peach-soft: #FBE9EE;
  --orange: #F2C4D0;
  --orange-soft: #FBE9EE;

  --radius-lg: 28px;
  --radius: 22px;
  --radius-sm: 14px;

  --shadow-sm: 0 2px 10px rgba(0, 0, 0, .05);
  --shadow: 0 12px 32px rgba(0, 0, 0, .08), 0 3px 10px rgba(0, 0, 0, .04);
  --shadow-lg: 0 20px 50px rgba(0, 0, 0, .10);

  --font-sans: "Source Han Sans SC", "Source Han Sans CN", "Noto Sans CJK SC",
               "Noto Sans SC", "思源黑体", "PingFang SC", "Hiragino Sans GB",
               "Microsoft YaHei", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--text);
  background: #FFFFFF;
  min-height: 100vh;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  color-scheme: light;
}

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

[hidden] { display: none !important; }

/* ============ 顶部导航栏 ============ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  padding: 14px 24px;
  background: rgba(255, 253, 249, .82);
  backdrop-filter: blur(16px) saturate(1.2);
  border-bottom: 1px solid var(--border-soft);
}

.header-left { justify-self: start; }
.header-right { justify-self: end; }

.header-motto {
  font-size: 13px;
  color: var(--text-faint);
  letter-spacing: 2px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
}

.seal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
  color: #fff;
  font-size: 22px;
  font-weight: 700;
  box-shadow: 0 6px 16px rgba(84, 48, 45, .28);
}

.brand-logo {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 6px 16px rgba(0, 0, 0, .14);
}

.brand-text { display: flex; flex-direction: column; line-height: 1.2; }

.brand-name {
  font-size: 21px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #FDF3E7;
}

.brand-sub {
  font-size: 11px;
  color: rgba(253, 243, 231, .62);
  letter-spacing: 1px;
}

/* 通用按钮 */
.btn {
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  transition: all .18s ease;
  white-space: nowrap;
}

.btn:disabled {
  opacity: .4;
  cursor: not-allowed;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
  color: #fff;
  box-shadow: 0 8px 20px rgba(84, 48, 45, .28);
}
.btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 12px 26px rgba(84, 48, 45, .36);
}

.btn-outline {
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text-dim);
}
.btn-outline:hover { border-color: var(--accent-border); color: var(--accent-text); background: var(--accent-soft); }

.btn-ghost { color: var(--text-dim); }
.btn-ghost:hover { color: var(--text); background: var(--bg-soft); }

.btn-reset {
  color: var(--accent-text);
  font-size: 13px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* 头部用户入口 */
.user-entry {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 5px 14px 5px 6px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--card);
  box-shadow: var(--shadow-sm);
  transition: border-color .18s ease;
}
.user-entry:hover { border-color: var(--accent-border); }

.user-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--peach), var(--orange));
  color: #fff;
  font-weight: 700;
}
.user-name { font-size: 14px; color: var(--text); }

/* ============ 导航区 / 英雄区 ============ */
.nav-area {
  max-width: 1160px;
  margin: 0 auto;
  padding: 48px 24px 8px;
}

.hero { text-align: center; max-width: 720px; margin: 0 auto 12px; }

.hero-title {
  font-family: "Source Han Sans SC", "Noto Sans CJK SC", "Noto Sans SC", "思源黑体", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: clamp(30px, 5vw, 44px);
  font-weight: 800;
  margin: 0 0 12px;
  letter-spacing: 2px;
  color: var(--heading);
}

.hero-desc {
  color: var(--text-dim);
  font-size: 15px;
  margin: 0 auto 30px;
  max-width: 620px;
}

.search-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 620px;
  margin: 0 auto;
  padding: 8px 10px 8px 20px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
  transition: border-color .18s ease, box-shadow .18s ease;
}
.search-bar:focus-within {
  border-color: var(--accent-border);
  box-shadow: 0 0 0 5px var(--accent-soft), var(--shadow-sm);
}

.search-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--yellow);
}
.search-icon svg {
  width: 17px;
  height: 17px;
  stroke: #1A1A1A;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

#search-input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  color: var(--text);
  font-size: 15px;
  min-width: 0;
  font-family: inherit;
}
#search-input::placeholder { color: var(--text-faint); }

.btn-clear {
  color: var(--text-faint);
  font-size: 13px;
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--bg-soft);
}
.btn-clear:hover { color: var(--text); }

.tabs {
  display: inline-flex;
  gap: 6px;
  margin-top: 22px;
  padding: 5px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
}

.tab {
  padding: 10px 22px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-dim);
  transition: all .18s ease;
}
.tab:hover { color: var(--text); }
.tab.active {
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
  color: #fff;
  box-shadow: 0 6px 16px rgba(84, 48, 45, .28);
}

/* ============ 视图容器 ============ */
.view {
  max-width: 1160px;
  margin: 0 auto;
  padding: 30px 24px 90px;
}

/* ============ 区块标题 ============ */
.section-head { margin: 28px 0 16px; }

.section-title {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 20px;
  font-weight: 700;
  margin: 0;
  letter-spacing: 1px;
  color: var(--heading);
}

.seal-mini {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
  color: #fff;
  font-size: 14px;
  font-weight: 700;
}

.section-sub { margin: 4px 0 0; font-size: 13px; color: var(--text-faint); }

/* ============ 置顶精选 ============ */
.featured-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 16px;
}

.featured-card {
  padding: 20px;
  background: linear-gradient(160deg, var(--yellow-soft), transparent 65%), var(--card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform .18s ease, box-shadow .18s ease;
}
.featured-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }

.feat-quote {
  font-size: 15px;
  color: var(--text);
  line-height: 1.75;
}
.feat-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
  font-size: 12px;
  color: var(--text-dim);
}
.feat-user { color: var(--accent-text); font-weight: 600; }
.feat-meme { color: var(--text-faint); }
.feat-likes { margin-left: auto; }

/* ============ 分类列表 ============ */
.cat-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.cat-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text-dim);
  font-size: 14px;
  font-weight: 500;
  box-shadow: var(--shadow-sm);
  transition: all .18s ease;
}
.cat-chip:hover { border-color: var(--accent-border); color: var(--text); transform: translateY(-1px); }
.cat-chip.active {
  background: #ECBBDD;
  border-color: transparent;
  color: var(--accent);
  box-shadow: 0 8px 20px rgba(236, 187, 219, .55);
}
.cat-subhead {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 26px 0 12px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--accent-text);
}
.cat-subhead::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--accent-border), transparent);
}
/* ============ 结果区 ============ */
.results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  margin: 36px 0 16px;
}

.results-title-wrap { display: flex; align-items: baseline; gap: 12px; }

.results-title {
  font-size: 22px;
  font-weight: 800;
  margin: 0;
  letter-spacing: 1px;
  color: var(--heading);
}

.results-count { color: var(--text-faint); font-size: 14px; }

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

.count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  margin-left: 3px;
  border-radius: 999px;
  background: var(--peach);
  color: #A85C50;
  font-size: 12px;
  font-weight: 700;
}

#fav-filter.active {
  border-color: var(--accent-border);
  color: var(--accent-text);
  background: var(--accent-soft);
}

.filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 18px;
  margin-bottom: 18px;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  border: 1px dashed var(--accent-border);
  font-size: 14px;
  color: var(--text-dim);
}

.results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 18px;
}

/* ============ 梗卡片 ============ */
.meme-card {
  display: flex;
  flex-direction: column;
  padding: 22px;
  background: #EEE9DC;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease;
}
.meme-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}
.meme-card.fav { background: #FCF4E8; border-color: #F2D8E2; }

.meme-top {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  flex: 1;
  min-width: 0;
}

.badge {
  font-size: 12px;
  padding: 4px 11px;
  border-radius: 999px;
  white-space: nowrap;
  font-weight: 500;
}
.badge-cat { background: #BBCBE8; color: #35618F; }
.badge-board { background: var(--green-soft); color: #4C8C53; }
.badge-tag { background: #F1D979; color: #7A5C10; }

.meme-phrase {
  font-size: 19px;
  font-weight: 700;
  margin: 0 0 4px;
  letter-spacing: .5px;
  line-height: 1.55;
  color: var(--text);
  overflow-wrap: anywhere;
}

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

.fav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  border-radius: 10px;
  background: #B5B3B4;
  color: #fff;
  font-size: 16px;
  line-height: 1;
  transition: all .16s ease;
}
.fav-btn:hover { background: var(--pink-soft); color: #C05A6E; }
.fav-btn.fav { background: var(--pink); color: #fff; box-shadow: 0 6px 16px rgba(242, 196, 208, .5); }

.expand-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: transparent;
  color: var(--text-dim);
  font-size: 13px;
  font-weight: 500;
  transition: all .16s ease;
}
.expand-btn:hover { background: var(--bg-soft); color: var(--text); }
.expand-btn .chevron {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform .2s ease;
}
.expand-btn.open .chevron { transform: rotate(180deg); }

.detail-panel {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border-soft);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.detail-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
}

.detail-row {
  display: flex;
  gap: 10px;
  font-size: 13px;
  line-height: 1.5;
}

.detail-label {
  flex-shrink: 0;
  width: 40px;
  color: var(--text-faint);
}

.detail-value {
  color: var(--text);
  overflow-wrap: anywhere;
}

.copy-btn {
  align-self: flex-start;
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: transparent;
  color: var(--text-dim);
  font-size: 13px;
  font-weight: 500;
  transition: all .16s ease;
}
.copy-btn:hover { background: var(--accent); color: #fff; border-color: transparent; }

.empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 70px 20px;
  color: var(--text-faint);
  font-size: 16px;
  letter-spacing: 1px;
}
.empty .big { font-size: 42px; display: block; margin-bottom: 14px; }

/* ============ 数据总览 ============ */
.stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 10px 0;
}

.stat {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: #FFFFFF;
  border: 1px solid #D1CDC7;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
}
.stat-num {
  font-size: 15px;
  font-weight: 800;
  color: #1A1A1A;
}
.stat-label { font-size: 12px; color: #1A1A1A; }

/* ============ 个人主页 ============ */
.view-profile { max-width: 900px; }

.profile-card {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  padding: 28px;
  background: linear-gradient(160deg, var(--lavender-soft), var(--peach-soft) 120%), var(--card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  margin-bottom: 22px;
}

.profile-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 76px;
  height: 76px;
  border-radius: 24px;
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
  color: #fff;
  font-size: 34px;
  font-weight: 700;
}

.profile-name { margin: 0; font-size: 26px; font-weight: 800; letter-spacing: 1px; color: var(--heading); }
.profile-title { margin: 2px 0 0; font-size: 13px; color: var(--text-faint); }

.profile-actions { margin-left: auto; display: flex; gap: 10px; }

.profile-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 16px;
  margin-bottom: 8px;
}

.pstat {
  padding: 20px;
  text-align: center;
  background: var(--card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  font-size: 13px;
  color: var(--text-dim);
}
.pstat-num {
  font-size: 30px;
  font-weight: 800;
  color: var(--accent-text);
}

.profile-section { margin-top: 32px; }
.profile-section .results-header { margin-top: 0; }

/* ============ 登录弹窗 ============ */
.modal-mask {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(120, 110, 140, .28);
  backdrop-filter: blur(6px);
}

.modal {
  width: 100%;
  max-width: 400px;
  padding: 28px;
  background: var(--card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  animation: pop .22s ease;
}

@keyframes pop {
  from { transform: translateY(12px) scale(.97); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}

.modal-head { text-align: center; margin-bottom: 22px; }
.modal-title { margin: 0; font-size: 24px; font-weight: 800; letter-spacing: 2px; color: var(--heading); }
.modal-sub { margin: 6px 0 0; font-size: 13px; color: var(--text-faint); }

.modal-label { display: block; font-size: 13px; color: var(--text-dim); margin-bottom: 8px; }
.modal-input {
  width: 100%;
  padding: 13px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-soft);
  color: var(--text);
  font-size: 15px;
  outline: none;
  font-family: inherit;
}
.modal-input:focus { border-color: var(--accent-border); background: #fff; box-shadow: 0 0 0 5px var(--accent-soft); }

.modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 24px;
}
.modal-foot .btn { min-width: 96px; }

/* ============ 轻提示 ============ */
.toast {
  position: fixed;
  left: 50%;
  bottom: 36px;
  transform: translateX(-50%);
  z-index: 200;
  padding: 13px 26px;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--border-soft);
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transition: opacity .2s ease, transform .2s ease;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(-4px); }

/* ============ 响应式 ============ */
@media (max-width: 640px) {
  .site-header { grid-template-columns: 1fr auto; padding: 12px 16px; }
  .header-right { display: none; }
  .brand-sub { display: none; }
  .nav-area { padding: 32px 16px 4px; }
  .view { padding: 22px 16px 70px; }
  .results-grid { grid-template-columns: 1fr; }
  .results-header { align-items: flex-start; flex-direction: column; }
  .profile-actions { margin-left: 0; width: 100%; }
  .profile-actions .btn { flex: 1; }
}

/* ============ 左侧导航栏 ============ */
.app { display: flex; min-height: 100vh; }

.side-nav {
  position: sticky;
  top: 0;
  align-self: flex-start;
  height: 100vh;
  width: 232px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 26px 16px 20px;
  background: #1F1F1F;
  border-right: 1px solid #2B2B2B;
  overflow-y: auto;
  transition: width .2s ease, padding .2s ease;
}

.side-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 8px;
  text-align: left;
}

.side-toggle {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 12px 14px;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 500;
  color: #F6EBD8;
  text-align: left;
  transition: all .16s ease;
}
.side-toggle:hover { background: rgba(255, 255, 255, .08); }
.side-toggle .icon-expand { display: none; }

.side-items { display: flex; flex-direction: column; gap: 8px; }

.side-item {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 12px 14px;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 500;
  color: #F6EBD8;
  text-align: left;
  transition: all .16s ease;
}
.side-item:hover { background: rgba(255, 255, 255, .08); }
.side-item.active {
  background: #ECBBDD;
  color: #54302D;
  box-shadow: 0 8px 18px rgba(0, 0, 0, .22);
}

.side-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  flex-shrink: 0;
  color: #fff;
}
.side-icon svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.side-item.active .side-icon { color: #54302D; }

.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 8px; }

.side-login {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 11px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, .18);
  color: #F6EBD8;
  font-size: 14px;
  font-weight: 500;
  transition: all .16s ease;
}
.side-login:hover { background: rgba(255, 255, 255, .08); }

.side-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, .18);
  font-size: 14px;
  color: #F6EBD8;
}

.side-avatar-sm {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #F9E39E;
  color: #54302D;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}
.side-user-name { color: #F6EBD8; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.side-login-icon { display: none; }

/* ============ 侧边栏收起 ============ */
.side-nav.collapsed { width: 76px; padding: 20px 10px; }
.side-nav.collapsed .side-brand { justify-content: center; padding: 0; }
.side-nav.collapsed .brand-text { display: none; }

.side-nav.collapsed .side-item { justify-content: center; padding: 12px 0; }
.side-nav.collapsed .side-item > span:last-child { display: none; }
.side-nav.collapsed .side-item .side-icon { width: auto; }

.side-nav.collapsed .side-login { justify-content: center; padding: 11px 0; border-color: transparent; }
.side-nav.collapsed .side-login-text { display: none; }
.side-nav.collapsed .side-login-icon { display: inline-flex; }

.side-nav.collapsed .side-user { justify-content: center; border-color: transparent; padding: 9px 0; }
.side-nav.collapsed .side-user-name { display: none; }

.side-nav.collapsed .side-toggle { justify-content: center; padding: 12px 0; }
.side-nav.collapsed .side-toggle-text { display: none; }
.side-nav.collapsed .side-toggle .icon-collapse { display: none; }
.side-nav.collapsed .side-toggle .icon-expand { display: block; }

.content { flex: 1; min-width: 0; }

/* ============ 瀑布流（心流模式） ============ */
#view-waterfall { max-width: none; margin: 0; padding: 0; height: 100vh; }
.flow-stage {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: linear-gradient(180deg, #F6F1E8 0%, #FCFAF5 55%, #FFFFFF 100%);
}

.flow-toolbar {
  position: absolute;
  top: 20px;
  right: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 20;
}
.flow-btn,
.flow-trash {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #FFFFFF;
  border: 1px solid #E5DFD3;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .08);
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease, color .16s ease;
}
.flow-btn { color: #1A1A1A; }
.flow-btn:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(0, 0, 0, .12); }
.flow-btn svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.flow-btn .icon-play { display: none; }
.flow-btn.paused .icon-pause { display: none; }
.flow-btn.paused .icon-play { display: block; }

.flow-trash { color: #7A463F; }
.flow-trash svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.flow-trash.over {
  background: #F2C4D0;
  color: #C05A6E;
  border-color: #E8A8B6;
  transform: scale(1.15);
}

.flow-card {
  position: absolute;
  padding: 16px 18px;
  background: #FFFFFF;
  border: 1px solid #E8E2D6;
  border-radius: 16px;
  box-shadow: 0 10px 26px rgba(84, 48, 45, .10);
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
  will-change: top, left;
}
.flow-card:hover { box-shadow: 0 14px 32px rgba(84, 48, 45, .16); }
.flow-card.dragging {
  cursor: grabbing;
  box-shadow: 0 22px 44px rgba(84, 48, 45, .24);
  z-index: 5;
}
.flow-card-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  color: #35618F;
  background: #EAF3FB;
  padding: 2px 8px;
  border-radius: 999px;
  margin-bottom: 8px;
}
.flow-card-phrase {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.5;
  color: #2E3038;
  word-break: break-word;
}
.flow-card.dissolve {
  animation: flowDissolve .45s ease forwards;
  pointer-events: none;
}
@keyframes flowDissolve {
  to { opacity: 0; transform: scale(1.18); filter: blur(8px); }
}

.flow-hint {
  position: absolute;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 13px;
  color: rgba(84, 48, 45, .55);
  background: rgba(255, 255, 255, .72);
  padding: 6px 16px;
  border-radius: 999px;
  pointer-events: none;
  z-index: 15;
  white-space: nowrap;
}

.flow-empty {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  color: var(--text-dim);
  font-size: 15px;
  line-height: 1.8;
  z-index: 5;
}
.flow-empty .big { font-size: 44px; display: block; margin-bottom: 10px; }

/* ============ 占位页 ============ */
.placeholder {
  text-align: center;
  padding: 120px 24px;
  color: var(--text-dim);
}
.placeholder-icon { font-size: 56px; margin-bottom: 16px; opacity: .55; }
.placeholder-title { font-size: 24px; font-weight: 800; margin: 0 0 8px; letter-spacing: 1px; color: var(--heading); }
.placeholder-desc { font-size: 14px; color: var(--text-faint); }

/* ============ 响应式：左侧导航 ============ */
@media (max-width: 640px) {
  .side-nav {
    width: 64px;
    padding: 14px 8px;
    gap: 12px;
    align-items: center;
  }
  .side-toggle { display: none; }
  .side-brand { justify-content: center; padding: 0; }
  .side-brand .brand-text { display: none; }
  .side-items { width: 100%; }
  .side-item { justify-content: center; padding: 12px 0; }
  .side-item > span:last-child { display: none; }
  .side-item .side-icon { width: auto; }
  .side-foot { width: 100%; }
  .side-login { font-size: 0; }
  .side-login::before { content: '👤'; font-size: 18px; }
  .side-user { justify-content: center; border: none; padding: 8px 0; }
  .side-user-name { display: none; }
}
