/* =========================================================
   我的日记 MyDiary —— 极简白 UI（仿 MyToday Lite）
   ========================================================= */:root {
  --bg: #F6F6F8;
  --card: #FFFFFF;
  --ink: #333333;
  --ink-soft: #999999;
  --line: #EEEEEE;
  --line-soft: #F2F2F2;
  --accent: #FF6B6B;        /* 珊瑚粉 */
  --accent-press: #E85D5D;
  --danger: #E5484D;
  --sel: #FF3B30;           /* 日历选中红 */
  /* 精修：三层柔和环境光阴影（高级质感） */
  --shadow: 0 1px 2px rgba(0,0,0,.05), 0 6px 22px rgba(0,0,0,.08), 0 22px 52px rgba(0,0,0,.06);
  /* 液态玻璃（Liquid Glass）：半透材质 + 多层高光 */
  --glass: rgba(255,255,255,.7);
  --glass-blur: blur(22px) saturate(1.5);
  --glass-border: inset 0 0 0 1px rgba(255,255,255,.55), inset 0 1.5px 0 rgba(255,255,255,.95);
  --glass-shadow: 0 10px 30px rgba(90,80,120,.14), 0 1px 2px rgba(0,0,0,.04);
  /* 弹窗专用液态玻璃：更透 + 更亮的高光内描边（菜单弹窗同款配方） */
  --dlg-bg: rgba(255,255,255,.62);
  --dlg-blur: blur(30px) saturate(1.8);
  --dlg-border: inset 0 0 0 1px rgba(255,255,255,.68), inset 0 2px 0 rgba(255,255,255,.95);
  --dlg-shadow: 0 18px 48px rgba(0,0,0,.22);
  --shadow-float: 0 2px 6px rgba(0,0,0,.06), 0 12px 40px rgba(0,0,0,.12), 0 24px 72px rgba(0,0,0,.08);
  --radius: 10px;
  --ease: cubic-bezier(.22,1,.36,1);     /* 精修：统一弹性曲线 */
  --spring: cubic-bezier(.34,1.4,.44,1);
  --topbar-h: 52px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
}

/* 页面氛围：极淡环境渐变（浅色暖白顶 → 冷白底） */
html { background: #F6F6F8; }
body {
  background: linear-gradient(180deg, #FDFAF4 0%, #F8F8FA 32%, #F1F1F4 100%);
  background-attachment: fixed;
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

/* 隐藏滚动条（日记应用无需常驻滚动条，避免残留竖线突兀） */
html { scrollbar-width: none; }
::-webkit-scrollbar { width: 0; height: 0; display: none; }

html, body {
  min-height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}

button { font-family: inherit; border: 0; background: none; cursor: pointer; color: var(--ink); }
textarea, input { font-family: inherit; font-size: 15px; color: var(--ink); border: 0; outline: none; background: transparent; resize: none; }
.hidden { display: none !important; }
svg { display: block; }

/* ---------- 视图 ---------- */
.view { display: none; min-height: 100%; }
/* 视图切换：轻淡入（纯 opacity，不动布局/固定子元素） */
.view-active { display: block; animation: view-in .18s var(--ease); }
@keyframes view-in { from { opacity: .2; } to { opacity: 1; } }
#view-editor.view-active { display: flex; }

/* ---------- 顶部栏 ---------- */
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; justify-content: space-between;
  height: var(--topbar-h); padding: 0 10px; padding-top: var(--safe-top);
  height: calc(var(--topbar-h) + var(--safe-top));
  background: rgba(255,255,255,.56);
  -webkit-backdrop-filter: blur(24px) saturate(1.7);
  backdrop-filter: blur(24px) saturate(1.7);
  border-bottom: .5px solid rgba(0,0,0,.05);   /* 精修：发丝线 */
}
body.dark .topbar {
  background: rgba(14,14,16,.6);
  -webkit-backdrop-filter: blur(24px) saturate(1.6);
  backdrop-filter: blur(24px) saturate(1.6);
  border-bottom-color: rgba(255,255,255,.06);
}
.topbar-left, .topbar-right { display: flex; align-items: center; gap: 2px; min-width: 84px; }
.topbar-right { justify-content: flex-end; }
/* 搜索页：左右区不占位，搜索框占满可用宽度 */
#view-search .topbar-left, #view-search .topbar-right,
#view-comm-search .topbar-left, #view-comm-search .topbar-right { min-width: 0; }
.topbar-title {
  font-size: 16px; font-weight: 700; letter-spacing: .22em; text-indent: .22em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.icon-btn {
  width: 40px; height: 40px; display: flex; align-items: center; justify-content: center;
  border-radius: 50%; color: var(--ink);
}
.topbar .icon-btn {
  width: 34px; height: 34px;
  background: rgba(0,0,0,.045);         /* 圆形浅底：与胶囊元素统一语言 */
}
body.dark .topbar .icon-btn { background: rgba(255,255,255,.08); }
.topbar .icon-btn:active { opacity: .6; }
.icon-btn:active { background: #F0F0F0; }
.icon-btn svg { width: 21px; height: 21px; }
#btn-calendar svg { color: var(--ink); }

/* ---------- 快速输入区 ---------- */
.composer { background: var(--card); border-bottom: 1px solid var(--line); }
.composer-row { display: flex; align-items: flex-end; padding: 16px 16px 8px; gap: 10px; }
#input-text { font-size: 16px; line-height: 1.65;
  flex: 1; min-height: 66px; max-height: 200px;
  font-size: 15.5px; line-height: 1.6; color: var(--ink);
}
#input-text::placeholder { color: #C3C3C3; }
.save-btn {
  flex: none; width: 38px; height: 38px; border-radius: 12px;
  background: #C7C7C7; display: flex; align-items: center; justify-content: center;
  transition: background .15s ease, transform .1s cubic-bezier(.22,1,.36,1);
}
.save-btn svg { width: 19px; height: 19px; }
.save-btn:not(:disabled) { background: var(--accent); box-shadow: 0 4px 14px rgba(255,107,107,.35); }
.save-btn:not(:disabled):active { background: var(--accent-press); transform: scale(.92); }
.save-btn:disabled { background: #C7C7C7; opacity: 1; }
.save-btn:disabled svg path { stroke: #F4F4F4; }

/* 工具行 */
.toolbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 2px 8px; padding-bottom: calc(8px + var(--safe-bottom));
}
.toolbar-tools { display: flex; align-items: center; gap: 2px; }
.tool-btn {
  width: 38px; height: 38px; display: flex; align-items: center; justify-content: center;
  border-radius: 50%; color: var(--ink);
}
.tool-btn:active { background: #F0F0F0; }
.tool-btn svg { width: 19px; height: 19px; }
.tool-btn.active { color: var(--accent); }
.tool-btn.active svg { stroke: var(--accent); }
.toolbar-clock { font-size: 12px; color: var(--ink-soft); letter-spacing: .02em; padding-right: 6px; }

/* 待上传图片预览条 */
.pending-strip {
  display: flex; gap: 8px; padding: 8px 16px 4px; overflow-x: auto;
  -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.pending-strip::-webkit-scrollbar { display: none; }
.pending-thumb { position: relative; flex: none; width: 64px; height: 64px; border-radius: 4px; overflow: hidden; background: #F0F0F0; }
.pending-thumb img { width: 100%; height: 100%; object-fit: cover; }
.pending-thumb .rm {
  position: absolute; top: 2px; right: 2px; width: 18px; height: 18px; border-radius: 50%;
  background: rgba(0,0,0,.55); display: flex; align-items: center; justify-content: center;
}
.pending-thumb .rm svg { width: 10px; height: 10px; }

/* 位置标签 */
.pending-loc { display: flex; align-items: center; gap: 5px; padding: 4px 16px 10px; color: var(--ink-soft); font-size: 13px; }
.pending-loc svg { width: 14px; height: 14px; }
.pending-loc .rm-loc { margin-left: 4px; color: #BBB; font-size: 15px; line-height: 1; padding: 0 3px; }

/* ---------- 列表 ---------- */
.entry-list { max-width: 680px; margin: 0 auto; padding: 6px 14px calc(128px + var(--safe-bottom)); }
.day-group { margin-top: 18px; }
.day-title {
  font-size: 13px; font-weight: 700; color: var(--ink);
  padding: 2px 4px 10px; letter-spacing: .01em;
}
.card {
  background: var(--glass);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  border-radius: 16px;
  box-shadow: var(--glass-shadow), var(--glass-border);
  padding: 14px 15px; margin-bottom: 10px; position: relative;
}
.card:active { background: #FCFCFC; }
body.dark .card:active { background: #232323; }

.card-text { color: var(--ink); font-size: 15px; line-height: 1.68; word-break: break-word; white-space: pre-wrap; }
.card-text.clamp { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.card-quote { color: var(--ink-soft); font-size: 13.5px; margin-top: 2px; white-space: pre-wrap; word-break: break-word; }

/* 卡片入场动效：轻浮起渐现（stagger delay 由 JS 注入） */
/* 卡片入场：一次性 rise-in（动画完由 JS 摘类——视图重显不再集体重播，切 tab 不卡） */
@keyframes card-rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
.rise-in { animation: card-rise .34s cubic-bezier(.22,1,.36,1) both; }

/* 底栏 tab：选中图标弹跳 */
.nav-tab.active svg { animation: nav-pop .34s var(--spring); }
@keyframes nav-pop { 0% { transform: scale(.78); } 62% { transform: scale(1.14); } 100% { transform: scale(1); } }

/* 微按压反馈 */
.swipe-item:not(.dragging) .swipe-content:active { transform: scale(.985); }

/* 单图：右浮动方形 */
.card-single { display: flex; gap: 12px; align-items: flex-start; }
.card-single .card-text { flex: 1; min-width: 0; }
.card-thumb {
  flex: none; width: 74px; height: 74px; border-radius: 4px; overflow: hidden; background: #F0F0F0;
}
.card-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* 多图网格 */
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; margin-top: 10px; }
.card-grid .g-item { position: relative; aspect-ratio: 1/1; border-radius: 3px; overflow: hidden; background: #F0F0F0; }
.card-grid .g-item img { width: 100%; height: 100%; object-fit: cover; display: block; }

.card-meta { display: flex; align-items: center; gap: 14px; margin-top: 8px; }
.card-time { font-size: 12px; color: var(--ink-soft); }
.card-loc { display: flex; align-items: center; gap: 3px; font-size: 12px; color: var(--ink-soft); }
.card-loc svg { width: 12px; height: 12px; }
.card-more { margin-top: 8px; }
.card-more button {
  font-size: 12px; color: var(--ink-soft); border: 1px solid var(--line);
  border-radius: 3px; padding: 2px 10px; background: var(--card);
}

/* 空状态 */
.empty {
  text-align: center; color: #C3C3C3; padding: 70px 20px 40px;
}
.empty svg { width: 44px; height: 44px; margin: 0 auto 14px; color: #D9D9D9; }
.empty .empty-t { font-size: 14px; color: #AEAEAE; }

/* ---------- 日历 ---------- */
.cal-month-nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 6px 12px 2px; max-width: 680px; margin: 0 auto; width: 100%;
}
.cal-range { font-size: 13px; color: var(--ink-soft); }
.cal-nav-btn { width: 40px; height: 36px; display: flex; align-items: center; justify-content: center; border-radius: 8px; }
.cal-nav-btn:active { background: #F0F0F0; }
.cal-nav-btn svg { width: 18px; height: 18px; }

.cal-week-header, .cal-grid {
  display: grid; grid-template-columns: repeat(7, 1fr);
  max-width: 680px; margin: 0 auto; width: 100%; padding: 0 10px;
}
.cal-week-header { padding: 8px 18px 4px; }
.cal-week-header span { text-align: center; font-size: 11px; color: var(--ink-soft); font-weight: 600; }

.cal-cell {
  position: relative; min-height: 56px; padding: 7px 0 5px;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 3px;
}
.cal-cell.dim { color: #CFCFCF; }
body.dark .cal-cell.dim { color: #4A4A4A; }
.cal-num { font-size: 14px; color: inherit; line-height: 1; }
/* 农历/节日小字（普通日历式） */
.cal-lunar {
  font-size: 9px; line-height: 1; color: var(--ink-soft);
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.cal-lunar.fest { color: var(--sel); font-weight: 700; }
.cal-cell.dim .cal-lunar { color: #CFCFCF; }
body.dark .cal-cell.dim .cal-lunar { color: #4A4A4A; }
/* 今天：实心圆（普通日历惯例） */
.cal-cell.today .cal-num {
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--sel); color: #FFF; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 3px 10px rgba(255,59,48,.28);
}
.cal-cell.today .cal-lunar { color: var(--ink); font-weight: 600; }
/* 选中日：圆环（与今天叠加时圆环外套） */
.cal-cell.selected .cal-num {
  color: var(--sel); border: 1.5px solid var(--sel); border-radius: 50%;
  width: 26px; height: 26px; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 10px rgba(255,59,48,.22);
}
.cal-cell.today.selected .cal-num {
  background: var(--sel); color: #FFF;
  box-shadow: 0 0 0 2.5px rgba(255,59,48,.3), 0 3px 10px rgba(255,59,48,.28);
}
.cal-dots { display: flex; gap: 3px; height: 5px; margin-top: 1px; }
.cal-dot { width: 5px; height: 5px; border-radius: 50%; }

.cal-day-list { max-width: 680px; margin: 0 auto; padding: 4px 14px calc(60px + var(--safe-bottom)); width: 100%; }
.cal-day-head {
  font-size: 14px; font-weight: 800; padding: 10px 6px 12px; color: var(--ink);
  border-bottom: 1px solid var(--line-soft); margin-bottom: 10px;
}

/* ---------- 搜索 ---------- */
.search-box {
  flex: 1; margin: 0 2px 0 0; height: 40px;
  display: flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,.92);
  -webkit-backdrop-filter: blur(18px) saturate(1.5);
  backdrop-filter: blur(18px) saturate(1.5);
  border-radius: 21px; padding: 0 7px 0 13px;
  margin: 0 10px 0 8px;
  box-shadow: 0 1px 2px rgba(0,0,0,.03), 0 4px 14px rgba(0,0,0,.06),
    inset 0 0 0 .5px rgba(0,0,0,.03);
}
.search-ico { width: 17px; height: 17px; color: #9A9A9A; flex: none; }
.search-box input { flex: 1; font-size: 15px; min-width: 0; }
.search-box input::placeholder { color: #BFBFBF; }
body.dark .search-box {
  background: rgba(32,32,36,.9);
  box-shadow: 0 2px 10px rgba(0,0,0,.4), inset 0 0 0 .5px rgba(255,255,255,.08);
}
/* 内嵌"搜索"按钮（微信式胶囊） */
.search-go {
  flex: none; font-size: 13px; font-weight: 700; color: #FFF;
  background: linear-gradient(135deg, #4A8BFF, #2F63E0);
  border-radius: 14px; padding: 6px 13px;
  box-shadow: 0 3px 9px rgba(59,110,240,.32), inset 0 1px 0 rgba(255,255,255,.28);
}
.search-go:active { opacity: .82; }

/* 搜索空态：垂直居中 · 呼吸感 */
#search-result, #comm-search-result { min-height: calc(100vh - 160px); display: flex; flex-direction: column; }
.empty-search {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 0;
  padding: 40px 20px;
}
.empty-search-ico {
  width: 64px; height: 64px; border-radius: 20px;
  background: var(--line-soft); color: var(--ink-soft);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 18px;
}
body.dark .empty-search-ico { background: #222224; }
.empty-search-ico svg { width: 27px; height: 27px; }
.empty-search-t { font-size: 15.5px; font-weight: 700; color: var(--ink); }
.empty-search-sub { font-size: 12.5px; color: var(--ink-soft); margin-top: 9px; }

/* ---------- 设置 ---------- */
.settings-body { max-width: 680px; margin: 0 auto; padding: 18px 16px calc(88px + var(--safe-bottom)); }
.settings-item {
  display: block; width: 100%; text-align: left;
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 14px 16px; margin-bottom: 10px;
}
.settings-item:active { background: #FCFCFC; }
.settings-label { display: block; font-size: 15px; font-weight: 600; color: var(--ink); }
.settings-sub { display: block; font-size: 12.5px; color: var(--ink-soft); margin-top: 3px; }
.settings-danger .settings-label { color: var(--danger); }
.about-box { text-align: center; margin-top: 34px; color: var(--ink-soft); }
.about-name { font-size: 15px; font-weight: 700; color: #777; letter-spacing: .1em; }
.about-ver { font-size: 12px; margin-top: 4px; }
.about-desc { font-size: 12.5px; margin-top: 10px; }

/* ---------- 全屏编辑器 ---------- */
#view-editor { position: fixed; inset: 0; z-index: 60; background: var(--card); display: none; flex-direction: column; }
#view-editor.view-active { display: flex; }
.save-btn-top { width: 34px; height: 34px; border-radius: 6px; margin-right: 6px; }
.editor-body { flex: 1; overflow-y: auto; padding: 18px 18px 10px; }
#editor-text { width: 100%; min-height: 46vh; font-size: 15px; line-height: 1.7; }
.editor-body .pending-strip { padding: 6px 0 4px; }
.editor-body .pending-loc { padding: 6px 0 0; }

/* 拍照 + 时间行（相机/时钟上移至正文区，两端渐隐分割线） */
.edit-media {
  position: relative;
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 18px; padding: 14px 2px 4px;
}
.edit-media::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0,0,0,.16) 18%, rgba(0,0,0,.16) 82%, transparent);
}
/* 中央珊瑚渐亮段：发丝线上的精致点缀 */
.edit-media::after {
  content: ''; position: absolute; top: -1.5px; left: 50%; transform: translateX(-50%);
  width: 36px; height: 4px; border-radius: 2px;
  background: linear-gradient(90deg, transparent, rgba(255,107,107,.5), transparent);
}
body.dark .edit-media::before {
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.22) 18%, rgba(255,255,255,.22) 82%, transparent);
}
.edit-media-btn {
  flex: none; width: 38px; height: 38px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--ink);
  background: var(--glass);
  -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
  box-shadow: var(--glass-shadow), var(--glass-border);
  transition: transform .18s var(--ease);
}
.edit-media-btn svg { width: 19px; height: 19px; }
.edit-media-btn:active { transform: scale(.88); }
.edit-media-clock {
  font-size: 12px; color: var(--ink-soft); letter-spacing: .02em; padding-right: 6px;
}

/* ---------- 详情浮层 ---------- */
.detail-overlay {
  position: fixed; inset: 0; z-index: 70;
  background: var(--card); display: flex; flex-direction: column;
  animation: fadein .18s ease;
}
.detail-media { position: relative; background: #111; min-height: 42vh; display: flex; align-items: center; }
.carousel {
  display: flex; overflow-x: auto; scroll-snap-type: x mandatory; width: 100%;
  -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.carousel::-webkit-scrollbar { display: none; }
.carousel .c-item { flex: none; width: 100%; height: 100%; scroll-snap-align: center; display: flex; align-items: center; justify-content: center; }
.carousel .c-item img { max-width: 88%; max-height: 58vh; object-fit: contain; display: block; margin: 0 auto; border-radius: 6px; }
.detail-close {
  position: absolute; top: calc(12px + var(--safe-top)); right: 12px; z-index: 5;
  width: 32px; height: 32px; border-radius: 50%;
  background: rgba(0,0,0,.45); display: flex; align-items: center; justify-content: center;
}
.detail-close svg { width: 15px; height: 15px; }
.carousel-dots {
  position: absolute; bottom: 10px; left: 0; right: 0;
  display: flex; justify-content: center; gap: 5px;
}
.carousel-dots .dot { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,.4); transition: background .15s; }
.carousel-dots .dot.on { background: #FFF; }
.detail-body {
  flex: 1; overflow-y: auto; padding: 18px 20px calc(30px + var(--safe-bottom));
  max-width: 680px; margin: 0 auto; width: 100%;
}
.detail-head { display: flex; align-items: center; justify-content: space-between; }
.detail-date { font-size: 18px; font-weight: 800; letter-spacing: .02em; }
.detail-text { margin-top: 12px; font-size: 15.5px; line-height: 1.75; color: var(--ink); white-space: pre-wrap; word-break: break-word; }
.detail-meta { display: flex; align-items: center; gap: 14px; margin-top: 16px; font-size: 12.5px; color: var(--ink-soft); }
.detail-loc { display: flex; align-items: center; gap: 3px; }
.detail-loc svg { width: 13px; height: 13px; }

/* ---------- 菜单 / 确认 / 位置浮层 ---------- */
/* 遮罩：加深至 .42，与毛玻璃卡片形成清晰层级 */
.menu-mask, .confirm-mask {
  position: fixed; inset: 0; z-index: 80; background: rgba(0,0,0,.42); animation: fadein .18s ease;
}
/* 居中毛玻璃菜单卡片（与 .bottom-nav 液态玻璃同语言） */
.menu-sheet {
  position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%);
  z-index: 90; width: min(78vw, 320px); overflow: hidden;
  background: var(--dlg-bg);
  -webkit-backdrop-filter: var(--dlg-blur); backdrop-filter: var(--dlg-blur);
  border-radius: 18px;
  box-shadow: var(--dlg-shadow), var(--dlg-border);
  padding: 6px 0 10px;
  animation: menu-pop .26s cubic-bezier(.34,1.4,.44,1);
}
body.dark .menu-sheet { box-shadow: var(--dlg-shadow), var(--dlg-border); }
.menu-item {
  display: flex; align-items: center; gap: 12px;
  width: 100%; padding: 14px 18px; font-size: 15px; text-align: left;
  color: var(--ink); border-bottom: 1px solid rgba(0,0,0,.06);
}
.menu-item:last-child { border-bottom: 0; }
.menu-item svg { width: 20px; height: 20px; flex: none; }
.menu-item:active { background: rgba(0,0,0,.05); }
.menu-check { margin-left: auto; color: var(--accent); display: flex; }
.menu-check svg { width: 18px; height: 18px; }
body.dark .menu-item { border-bottom-color: rgba(255,255,255,.08); }
body.dark .menu-item:active { background: rgba(255,255,255,.08); }
.menu-danger { color: var(--danger); font-weight: 600; }
/* 取消：独立小分块（间隙 + 浅底圆角），与危险操作视觉隔离、防误触 */
/* 修复：width:100% + 左右 margin 会顶穿卡片右缘 12px，改为 calc 减去边距 */
.menu-cancel {
  width: calc(100% - 24px);
  margin: 8px 12px 0; padding: 13px 16px;
  border-bottom: 0; border-radius: 12px;
  background: rgba(0,0,0,.05);
  justify-content: center; text-align: center;
  font-weight: 700; color: var(--ink);
  box-sizing: border-box;
}
body.dark .menu-cancel { background: rgba(255,255,255,.08); }

.confirm-box {
  position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%);
  z-index: 95; width: min(80vw, 320px);
  background: var(--dlg-bg);
  -webkit-backdrop-filter: var(--dlg-blur); backdrop-filter: var(--dlg-blur);
  border-radius: 18px;
  box-shadow: var(--dlg-shadow), var(--dlg-border);
  padding: 22px 20px 14px; animation: pop .26s cubic-bezier(.34,1.4,.44,1);
}
.confirm-title { font-size: 16px; font-weight: 700; text-align: center; }
.confirm-msg { font-size: 13.5px; color: var(--ink-soft); text-align: center; margin-top: 8px; line-height: 1.6; }
.confirm-actions { display: flex; margin-top: 16px; border-top: 1px solid var(--line-soft); }
.confirm-btn {
  flex: 1; padding: 12px 0; font-size: 15.5px; color: #007AFF; text-align: center;
}
.confirm-btn + .confirm-btn { border-left: 1px solid var(--line-soft); }
.confirm-btn-danger { color: var(--danger); font-weight: 600; }
.confirm-btn-primary { color: var(--accent); font-weight: 600; }
.loc-box input {
  width: 100%; margin-top: 12px; border: 1px solid var(--line); border-radius: 8px;
  padding: 10px 12px; font-size: 14.5px;
}
.loc-box input:focus { border-color: var(--accent); }

/* ---------- 位置选择浮层 ---------- */
.view-location {
  position: fixed; inset: 0; z-index: 75;
  background: var(--card); display: flex; flex-direction: column;
  animation: fadein .18s ease;
}
.loc-search-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; background: var(--card);
  border-bottom: 1px solid var(--line);
}
.loc-search-box {
  flex: 1; display: flex; align-items: center; gap: 8px;
  background: #F4F4F4; border-radius: 8px; padding: 0 12px; height: 40px;
}
.loc-search-box svg { width: 17px; height: 17px; color: #9A9A9A; flex: none; }
.loc-search-box input { flex: 1; font-size: 14.5px; }
.loc-search-box input::placeholder { color: #BFBFBF; }
.loc-manual-btn { flex: none; font-size: 13.5px; color: #007AFF; padding: 6px 2px 6px 8px; }

.loc-search-list {
  position: absolute; left: 14px; right: 14px; top: 106px; z-index: 10;
  background: #FFF; border-radius: 10px; box-shadow: var(--shadow-float);
  max-height: 44vh; overflow-y: auto;
}
.loc-item { padding: 12px 14px; border-bottom: 1px solid var(--line-soft); }
.loc-item:last-child { border-bottom: 0; }
.loc-item:active { background: #F7F7F7; }
.loc-item-name { font-size: 14.5px; color: var(--ink); }
.loc-item-detail { font-size: 12px; color: var(--ink-soft); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.loc-item-tip { text-align: center; color: var(--ink-soft); font-size: 13px; }

.loc-map { flex: 1; min-height: 0; background: #EDEDED; }
.loc-map .leaflet-container { width: 100%; height: 100%; background: #EDEDED; }

.map-pin-wrap { position: relative; }
.map-pin {
  position: absolute; left: 50%; top: 50%;
  width: 26px; height: 26px; margin: -26px 0 0 -13px;
  background: var(--accent); border: 2.5px solid #FFF; border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  box-shadow: 0 2px 8px rgba(0,0,0,.3);
}
.map-pin-dot {
  position: absolute; left: 50%; top: 50%;
  width: 8px; height: 8px; margin: -4px 0 0 -4px;
  background: #FFF; border-radius: 50%;
}

.loc-gps-btn {
  position: absolute; right: 16px; bottom: 86px; z-index: 10;
  width: 46px; height: 46px; border-radius: 50%;
  background: #FFF; box-shadow: 0 3px 14px rgba(0,0,0,.18);
  display: flex; align-items: center; justify-content: center; color: #333;
}
.loc-gps-btn:active { transform: scale(.92); background: #F6F6F6; }
.loc-gps-btn svg { width: 22px; height: 22px; }

.loc-info-bar {
  padding: 13px 18px calc(13px + var(--safe-bottom));
  background: var(--card); border-top: 1px solid var(--line);
  min-height: 58px;
}
.loc-place-name { font-size: 14.5px; color: var(--ink); }
.loc-place-sub { font-size: 12px; color: var(--ink-soft); margin-top: 3px; }

/* ---------- 卡片滑动操作（编辑/删除） ---------- */
.swipe-item {
  position: relative; overflow: hidden;
  margin-bottom: 10px; border-radius: 16px;   /* 与 .card 圆角一致：角缝不再露出背后的操作按钮 */
  touch-action: pan-y;
}
.swipe-item .card { margin-bottom: 0; }
.swipe-content {
  position: relative; z-index: 1; background: var(--card);
  transition: transform .22s ease;
  box-shadow: var(--shadow);
}
.swipe-content:active { background: #FCFCFC; }
.swipe-item.swiping .swipe-content, .swipe-item.dragging .swipe-content { transition: none; }

.swipe-actions {
  position: absolute; top: 0; bottom: 0; z-index: 0;
  width: auto; display: flex; align-items: stretch;   /* 自适应按钮数：2按钮152 / 3按钮228，修 68px 黑洞 */
}
.swipe-left { left: 0; justify-content: flex-start; }
.swipe-right { right: 0; justify-content: flex-end; }
.sa-btn {
  width: 76px; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 5px; color: #FFF; font-size: 12.5px;
}
.sa-btn svg { width: 20px; height: 20px; }
.sa-edit { background: #007AFF; }
.sa-delete { background: var(--danger); }
.sa-btn:active { filter: brightness(.88); }

/* ---------- 视图滑动返回 ---------- */
.swiping {
  box-shadow: -4px 0 22px rgba(0,0,0,.16);
  will-change: transform;
  transition: none !important;   /* 跟手阶段禁用过渡 */
}
#view-detail.swiping { box-shadow: none; }

/* ---------- 现代体验增强 ---------- */

/* 日期吸顶 */
.day-title {
  position: sticky; top: calc(var(--topbar-h) + var(--safe-top));
  z-index: 20; background: var(--bg);
  font-size: 12.5px; font-weight: 700; color: var(--ink);
  letter-spacing: .08em;
  padding: 10px 4px 10px 4px; margin-top: 6px;
}

/* 展开全文 */
.card-more button {
  font-size: 12px; color: #9A9A9A; border: 1px solid var(--line);
  border-radius: 3px; padding: 2px 10px; background: var(--card);
}
.card-more button:active { background: #F4F4F4; }

/* 搜索关键词高亮 */
mark { background: #FFE082; color: inherit; border-radius: 2px; padding: 0 1px; }
body.dark mark { background: #7A5C12; color: #F2E4C0; }

/* 图片全屏查看器 */
.viewer-overlay {
  position: fixed; inset: 0; z-index: 88;
  background: #000; display: flex; align-items: center;
  animation: fadein .16s ease;
}
.viewer-overlay .carousel { height: 100%; }

/* 回到顶部 */
.btn-top {
  position: fixed; right: 15px; bottom: calc(112px + var(--safe-bottom));
  z-index: 60; width: 44px; height: 44px; border-radius: 50%;
  background: linear-gradient(135deg, #FF9A8B 0%, #FF6A88 60%, #E85A7E 100%);
  color: #FFF;
  box-shadow: 0 8px 24px rgba(232,90,126,.45), inset 0 1.5px 0 rgba(255,255,255,.35);
  display: flex; align-items: center; justify-content: center;
  transition: transform .25s;
}
.btn-top:active { transform: translateY(-4px) scale(.94); }
.btn-top svg { width: 22px; height: 22px; }
.btn-top.launch svg { animation: rocketFly .5s ease-out; }
@keyframes rocketFly {
  0% { transform: translateY(0); }
  100% { transform: translateY(-26px); }
}
@media (prefers-reduced-motion: reduce) { .btn-top.launch svg { animation: none; } }

/* 空状态引导按钮 */
.empty-btn {
  margin-top: 16px; padding: 10px 26px; border-radius: 20px;
  background: var(--accent); color: #FFF; font-size: 14px; font-weight: 600;
}
.empty-btn:active { background: var(--accent-press); }

/* ---------- 深色主题 ---------- */
/* html 也要同步深色背景：body 高度为视口高（height:100%），
   超出一屏的滚动区域由 html 背景承接——否则深色下长页面底部露浅色断层 */
html.dark { background: #101012; }
body.dark {
  --glass: rgba(26,26,32,.5);
  --glass-border: inset 0 0 0 1px rgba(255,255,255,.18), inset 0 1.5px 0 rgba(255,255,255,.32);
  --glass-shadow: 0 10px 30px rgba(0,0,0,.42), 0 1px 2px rgba(0,0,0,.2);
  /* 弹窗深色玻璃：亮度更高 + 顶部高光，深底上依然通透可辨 */
  --dlg-bg: rgba(30,30,34,.62);
  --dlg-blur: blur(30px) saturate(1.7);
  --dlg-border: inset 0 0 0 1px rgba(255,255,255,.2), inset 0 1.5px 0 rgba(255,255,255,.42);
  --dlg-shadow: 0 18px 48px rgba(0,0,0,.5);
  --bg: #0C0C0E;
  --card: #1E1E22;
  --ink: #E9E9EB;
  --ink-soft: #8E8E93;
  --line: #2A2A2C;
  --line-soft: #232325;
  --shadow: 0 3px 14px rgba(0,0,0,.5), 0 18px 56px rgba(0,0,0,.6);
  --shadow-float: 0 4px 14px rgba(0,0,0,.5), 0 24px 64px rgba(0,0,0,.6);
}
/* 深色氛围：顶部微蓝光 + 深空渐变 */
body.dark {
  background: linear-gradient(180deg, #101014 0%, #0C0C0E 34%, #0A0A0C 100%);
  background-attachment: fixed;
}
body.dark .card, body.dark .swipe-content {
  box-shadow: 0 3px 14px rgba(0,0,0,.5), 0 18px 56px rgba(0,0,0,.6),
    inset 0 0 0 .8px rgba(255,255,255,.1);
}
body.dark .icon-btn:active, body.dark .tool-btn:active { background: #2A2A2A; }
body.dark .tool-btn.active { color: var(--accent); }
body.dark .save-btn:disabled { background: #3A3A3A; }
body.dark .save-btn:disabled svg path { stroke: #6E6E6E; }
body.dark .loc-search-box { background: #2A2A2A; }
body.dark .loc-search-list { background: var(--card); }
body.dark .loc-item:active { background: #2A2A2A; }
body.dark .loc-gps-btn { background: var(--card); color: var(--ink); }
body.dark .loc-item-tip, body.dark .empty-t { color: #7A7A7A; }
body.dark .detail-overlay { background: var(--card); }
body.dark .confirm-btn + .confirm-btn { border-color: rgba(255,255,255,.12); }
body.dark .confirm-actions { border-top-color: rgba(255,255,255,.12); }
body.dark .toast { background: rgba(50,50,50,.92); }
body.dark .rem-form-body input[type="text"],
body.dark .rem-form-body input[type="date"] { background: rgba(255,255,255,.07); color: var(--ink); }
body.dark .rem-form-preview { background: rgba(255,255,255,.06); color: #9A9A9A; }
body.dark .mood-sheet { background: var(--dlg-bg); }
body.dark .lock-screen { background: var(--glass); }
body.dark .mood-btn.on { border-color: var(--accent); background: rgba(255,107,107,.14); }
body.dark .swipe-content { background: var(--card); }
body.dark .swipe-content:active { background: #232323; }
body.dark .trash-item { background: var(--card); }
body.dark .loc-manual-btn { color: #4A9EFF; }
/* 深色模式：按压态 / 占位底色 / 次级文字补丁 */
body.dark .settings-item:active { background: #232323; }
body.dark .mood-btn:active { background: rgba(255,255,255,.08); }
body.dark .card-more button:active { background: #2A2A2A; }
body.dark .cal-nav-btn:active { background: #2A2A2A; }
body.dark .pending-thumb, body.dark .card-thumb,
body.dark .card-grid .g-item { background: #2A2A2A; }
body.dark .about-name { color: #999; }
/* 地图浮层保持浅色（瓦片为浅色） */
#view-location { background: #FFFFFF; color: #333333; }
body.dark #view-location .topbar { background: #FFFFFF; border-bottom-color: #EEE; }
body.dark #view-location .icon-btn, body.dark #view-location .tool-btn { color: #1A1A1A; }
body.dark #view-location .topbar-title { color: #333; }

/* ---------- 心情 ---------- */
.card-mood { font-size: 15px; line-height: 1; }
.detail-mood { font-size: 13px; color: var(--ink); }
.mood-sheet {
  position: fixed; left: 50%; bottom: calc(18px + var(--safe-bottom)); transform: translateX(-50%);
  z-index: 90; width: min(92vw, 380px);
  background: var(--dlg-bg);
  -webkit-backdrop-filter: var(--dlg-blur); backdrop-filter: var(--dlg-blur);
  box-shadow: var(--dlg-shadow), var(--dlg-border);
  border-radius: 18px;
  padding: 16px 14px 12px; animation: sheet-up .3s cubic-bezier(.34,1.4,.44,1);
}
.mood-title { text-align: center; font-size: 14px; font-weight: 700; color: var(--ink); }
.mood-row { display: flex; justify-content: space-between; margin: 14px 0 6px; }
.mood-btn {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 5px;
  padding: 8px 2px; border-radius: 10px; border: 2px solid transparent;
}
.mood-btn:active { background: rgba(0,0,0,.05); }
.mood-btn.on { border-color: var(--accent); background: #FFF5F4; }
.mood-btn-emoji { font-size: 25px; line-height: 1; }
.mood-btn-label { font-size: 11.5px; color: var(--ink-soft); }
.mood-clear-btn {
  display: block; width: 100%; text-align: center; padding: 10px 0;
  font-size: 13.5px; color: var(--ink-soft); border-top: 1px solid var(--line-soft);
}
.tool-btn.on { color: var(--accent); }

/* ---------- 置顶 ---------- */
.pin-title { display: flex; align-items: center; gap: 5px; color: var(--accent); }
.pin-title svg { width: 14px; height: 14px; }
.swipe-item.is-pinned .card { box-shadow: inset 3px 0 0 var(--accent), var(--shadow); }
.sa-pin { background: #5BC8A8; }

/* ---------- 设置扩展 ---------- */
.settings-group-title {
  font-size: 12px; color: var(--ink-soft); margin: 20px 4px 8px; letter-spacing: .04em;
}
.settings-switch-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.settings-item-main { flex: 1; min-width: 0; text-align: left; }
.app-switch { width: 46px; height: 28px; appearance: none; -webkit-appearance: none; position: relative; flex: none; }
.app-switch::before {
  content: ''; position: absolute; inset: 0; border-radius: 14px; background: #D9D9D9; transition: background .18s;
}
.app-switch::after {
  content: ''; position: absolute; top: 2px; left: 2px; width: 24px; height: 24px;
  border-radius: 50%; background: #FFF; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: left .18s;
}
.app-switch:checked::before { background: var(--accent); }
.app-switch:checked::after { left: 20px; }
body.dark .app-switch::before { background: #3A3A3A; }
.theme-cycle-btn {
  flex: none; font-size: 13px; color: #007AFF; background: #F0F0F0;
  border-radius: 14px; padding: 6px 14px;
}
body.dark .theme-cycle-btn { background: #2E2E2E; }

/* ---------- 统计卡 ---------- */
.stats-card {
  background: var(--glass);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  border-radius: 16px;
  box-shadow: var(--glass-shadow), var(--glass-border);
  padding: 18px 14px; margin-bottom: 8px;
}
.stat-num { margin-top: 0; }
.stat-label { margin-top: 4px; }
.stats-row { display: flex; }
.stat-cell { flex: 1; text-align: center; }
.stat-num {
  font-size: 21px; font-weight: 800; line-height: 1.15;
  background: linear-gradient(135deg, #FF8A7A, #F0507A 70%, #D0466A);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: var(--ink);
}
.stat-label { font-size: 11.5px; color: var(--ink-soft); margin-top: 3px; }
.stats-moods { margin-top: 12px; border-top: 1px solid var(--line-soft); padding-top: 10px; }
.mood-bar { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.mood-bar-emoji { font-size: 15px; flex: none; width: 22px; text-align: center; }
.mood-bar-track { flex: 1; height: 6px; border-radius: 3px; background: var(--line-soft); overflow: hidden; }
.mood-bar-fill { height: 100%; border-radius: 3px; background: var(--accent); }
.mood-bar-n { flex: none; font-size: 11.5px; color: var(--ink-soft); min-width: 18px; text-align: right; }

/* ---------- 密码浮层 ---------- */
.pwd-form-body { margin-top: 4px; }
.pwd-form-body input {
  width: 100%; margin-top: 10px; border: 1px solid var(--line); border-radius: 8px;
  padding: 10px 12px; font-size: 15px; letter-spacing: .35em; text-align: center;
  background: rgba(0,0,0,.035); color: var(--ink);
}
body.dark .pwd-form-body input { background: rgba(255,255,255,.07); }
.pwd-form-body input:focus { border-color: var(--accent); outline: none; }

/* ---------- 锁屏 ---------- */
.lock-screen {
  position: fixed; inset: 0; z-index: 200; background: var(--bg);
  display: flex; align-items: center; justify-content: center;
}
.lock-box { text-align: center; padding: 0 40px; width: 100%; max-width: 340px; }
.lock-logo svg { width: 46px; height: 46px; margin: 0 auto 12px; color: var(--ink); }
.lock-name { font-size: 17px; font-weight: 800; letter-spacing: .18em; color: var(--ink); }
.lock-tip { font-size: 13px; color: var(--ink-soft); margin: 10px 0 16px; min-height: 18px; }
.lock-screen input {
  width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 12px;
  font-size: 18px; letter-spacing: .5em; text-align: center; background: var(--card); color: var(--ink);
}
.lock-screen input:focus { outline: none; border-color: var(--accent); }
.lock-btn {
  width: 100%; margin-top: 14px; padding: 13px 0; border-radius: 10px;
  background: var(--accent); color: #FFF; font-size: 15.5px; font-weight: 600;
}
.lock-btn:active { background: var(--accent-press); }
.lock-screen.shake { animation: shake .3s ease; }
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-8px); }
  50% { transform: translateX(8px); }
  75% { transform: translateX(-5px); }
}

/* ---------- 回收站 ---------- */
.trash-tip { text-align: center; font-size: 12px; color: var(--ink-soft); padding: 12px 20px 2px; }
.trash-item {
  display: flex; align-items: center; gap: 10px;
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 13px 14px; margin: 0 0 10px;
}
.trash-info { flex: 1; min-width: 0; text-align: left; }
.trash-title {
  font-size: 14.5px; color: var(--ink);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.trash-meta { font-size: 12px; color: var(--ink-soft); margin-top: 3px; }
.trash-restore, .trash-purge {
  flex: none; font-size: 13px; padding: 7px 12px; border-radius: 6px;
}
.trash-restore { color: #007AFF; background: rgba(0,122,255,.1); }
.trash-purge { color: var(--danger); background: rgba(229,72,77,.1); }
.trash-restore:active, .trash-purge:active { filter: brightness(.9); }

/* ---------- 倒数日 ---------- */
.rem-card { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.rem-left { flex: 1; min-width: 0; }
.rem-title {
  font-size: 15px; color: var(--ink);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.rem-date { font-size: 12.5px; color: var(--ink-soft); margin-top: 3px; }

.rem-badge {
  flex: none; min-width: 86px; padding: 7px 10px; border-radius: 6px;
  display: flex; align-items: baseline; justify-content: center; gap: 4px;
  color: #FFF;
}
.rem-label { font-size: 11.5px; opacity: .92; }
.rem-num { font-size: 22px; font-weight: 800; line-height: 1; }
.rem-num-text { font-size: 14px; font-weight: 700; }
.rem-unit { font-size: 11.5px; opacity: .92; align-self: flex-end; padding-bottom: 2px; }
.rem-next { background: #4A90D9; }
.rem-past { background: #FF9A3C; }
.rem-due { background: var(--danger); }

/* 倒数日表单 */
.rem-form { max-height: 84vh; overflow-y: auto; }
.rem-form-body { margin-top: 4px; text-align: left; }
.rem-form-label { display: block; font-size: 12.5px; color: var(--ink-soft); margin: 12px 0 5px; }
.rem-form-body input[type="text"], .rem-form-body input[type="date"] {
  width: 100%; border: 1px solid var(--line); border-radius: 8px;
  padding: 10px 12px; font-size: 14.5px; background: rgba(0,0,0,.035); color: var(--ink);
}
.rem-form-body input:focus { border-color: var(--accent); outline: none; }
.rem-form-check {
  display: flex; align-items: center; gap: 8px; margin-top: 14px;
  font-size: 13.5px; color: var(--ink); cursor: pointer;
}
.rem-form-check input { width: 17px; height: 17px; accent-color: var(--accent); }
.rem-form-preview {
  margin-top: 12px; background: rgba(0,0,0,.04); border-radius: 8px;
  padding: 9px 12px; font-size: 12.5px; color: #666; text-align: center;
}

/* ---------- 朋友圈发表页（编辑器） ---------- */
.text-btn {
  font-size: 15px; color: var(--ink); padding: 8px 10px; border-radius: 8px;
}
.text-btn:active { background: #F0F0F0; }
body.dark .text-btn:active { background: #2A2A2A; }

.publish-btn {
  flex: none; font-size: 14px; font-weight: 600; color: #FFF;
  background: var(--accent); border-radius: 16px; padding: 7px 18px; margin-right: 6px;
  transition: background .15s ease, transform .1s ease;
}
.publish-btn:not(:disabled):active { background: var(--accent-press); transform: scale(.95); }
.publish-btn:disabled { background: #C7C7C7; }
body.dark .publish-btn:disabled { background: #3A3A3A; color: #6E6E6E; }

.editor-date { font-size: 14px; font-weight: 700; letter-spacing: .02em; }

#editor-text { width: 100%; min-height: 30vh; font-size: 15px; line-height: 1.75; padding-top: 4px; }

/* 九宫格（最多 9 张） */
.edit-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px;
  margin-top: 14px; padding-bottom: 4px;
}
.eg-item {
  position: relative; aspect-ratio: 1/1; border-radius: 6px; overflow: hidden;
  background: #F0F0F0; display: flex; align-items: center; justify-content: center;
}
body.dark .eg-item { background: #2A2A2A; }
.eg-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.eg-del {
  position: absolute; top: 3px; right: 3px; z-index: 2;
  width: 19px; height: 19px; border-radius: 50%;
  background: rgba(0,0,0,.5); display: flex; align-items: center; justify-content: center;
}
.eg-del svg { width: 11px; height: 11px; }
.eg-add {
  aspect-ratio: 1/1; border-radius: 6px; background: #F0F0F0;
  display: flex; align-items: center; justify-content: center;
}
body.dark .eg-add { background: #2A2A2A; }
.eg-add:active { filter: brightness(.92); }
.eg-add svg { width: 30px; height: 30px; color: #C3C3C3; }
body.dark .eg-add svg { color: #5A5A5A; }

/* 附加选项行（微信风格） */
.edit-opts { margin-top: 14px; }
.edit-opt-row {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 15px 4px; border-bottom: 1px solid var(--line);
  text-align: left; color: var(--ink);
}
.edit-opt-row:active { background: #FAFAFA; }
body.dark .edit-opt-row:active { background: #232323; }
.edit-opt-row svg { width: 21px; height: 21px; color: var(--ink-soft); flex: none; }
.edit-opt-label { font-size: 15px; }
.edit-opt-val {
  flex: 1; text-align: right; font-size: 13.5px; color: var(--ink-soft);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.edit-opt-arrow { width: 15px !important; height: 15px !important; color: #C9C9C9; flex: none; }
body.dark .edit-opt-arrow { color: #5A5A5A; }
.editor-body .edit-grid { padding: 0; }
.edit-opt-static { cursor: default; }
.edit-opt-static:active { background: transparent; }
.edit-opt-note { font-size: 11.5px; }

/* 微信式拨杆开关 */
.opt-switch {
  flex: none; width: 46px; height: 27px; border-radius: 15px;
  background: #E4E4E4; position: relative; padding: 0;
  transition: background .18s ease;
}
body.dark .opt-switch { background: #3A3A3C; }
.opt-switch-knob {
  position: absolute; top: 2.5px; left: 2.5px;
  width: 22px; height: 22px; border-radius: 50%;
  background: #FFF; box-shadow: 0 2px 6px rgba(0,0,0,.25);
  transition: transform .18s cubic-bezier(.22,1,.36,1);
}
.opt-switch.on { background: var(--accent); }
.opt-switch.on .opt-switch-knob { transform: translateX(19px); }
@media (prefers-reduced-motion: reduce) {
  .opt-switch, .opt-switch-knob { transition: none; }
  .swipe-content, .card { transition: none; }
}

/* ---------- 详情顶栏 ---------- */
.detail-topbar { position: static; flex: none; }
.detail-topbar-title { font-size: 15px; }
.detail-overlay { flex-direction: column; }
.detail-media { flex: none; }
.detail-media .carousel { max-height: 52vh; }
.detail-body { flex: 1; overflow-y: auto; padding-top: 14px; }

/* Toast（毛玻璃） */
.toast {
  position: fixed; left: 50%; bottom: calc(96px + var(--safe-bottom)); transform: translateX(-50%);
  z-index: 120; background: rgba(24,24,26,.6); color: #FFF; font-size: 12px;
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  backdrop-filter: blur(14px) saturate(1.4);
  box-shadow: inset 0 0 0 .5px rgba(255,255,255,.14), 0 8px 28px rgba(0,0,0,.28);
  padding: 6px 14px; border-radius: 15px; max-width: 74vw; text-align: center;
  animation: toast-in .2s ease;
}

@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }
@keyframes sheet-up { from { transform: translate(-50%, 14px); opacity: 0; } to { transform: translate(-50%, 0); opacity: 1; } }
@keyframes menu-pop { from { transform: translate(-50%, -50%) scale(.96); opacity: 0; } to { transform: translate(-50%, -50%) scale(1); opacity: 1; } }
@keyframes pop { from { transform: translate(-50%, -48%) scale(.94); opacity: 0; } to { transform: translate(-50%, -50%) scale(1); opacity: 1; } }
@keyframes toast-in { from { transform: translate(-50%, 8px); opacity: 0; } to { transform: translate(-50%, 0); opacity: 1; } }

/* ---------- 底部液态玻璃导航栏 ---------- */
.bottom-nav {
  position: fixed; left: 12px; right: 12px;
  bottom: calc(10px + var(--safe-bottom));
  z-index: 50; height: 64px; border-radius: 32px;
  display: flex; align-items: stretch; padding: 6px;
  background: rgba(255,255,255,.5);
  -webkit-backdrop-filter: blur(30px) saturate(1.8);
  backdrop-filter: blur(30px) saturate(1.8);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.65), inset 0 2px 0 rgba(255,255,255,.95),
    0 2px 6px rgba(0,0,0,.05), 0 12px 40px rgba(0,0,0,.14), 0 24px 64px rgba(0,0,0,.06);
  transition: transform .22s cubic-bezier(.22,1,.36,1), opacity .18s ease;
}
body.dark .bottom-nav {
  background: rgba(26,26,30,.78);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.12),
    0 2px 8px rgba(0,0,0,.4), 0 16px 48px rgba(0,0,0,.6);
}

/* 键盘弹出：底栏隐退（不再被顶到键盘上方），输入区自然贴近键盘 */
body.kb-open .bottom-nav {
  transform: translateY(calc(100% + 40px));
  opacity: 0; pointer-events: none;
}
@media (prefers-reduced-motion: reduce) {
  body.kb-open .bottom-nav { transition: none; }
  .bottom-nav { transition: none; }
}
.nav-tab {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; border-radius: 26px; color: var(--ink);
  transition: background .15s ease, color .15s ease;
}
.nav-tab svg { width: 22px; height: 22px; }
.nav-tab .nav-label { font-size: 11px; line-height: 1; letter-spacing: .02em; }
.nav-tab.active {
  color: var(--accent);
  background: rgba(255,255,255,0.95);
  box-shadow: 0 2px 10px rgba(0,0,0,.10);
}
.nav-tab:active { opacity: .82; }
body.dark .nav-tab { color: var(--ink-soft); }
body.dark .nav-tab.active {
  color: var(--accent);
  background: rgba(255,255,255,0.16);
  box-shadow: none;
}

/* ---------- 工具页 ---------- */
.tools-body { max-width: 680px; margin: 0 auto; padding: 18px 16px calc(120px + var(--safe-bottom)); }
.tools-card {
  display: flex; align-items: center; gap: 14px; width: 100%; text-align: left;
  background: var(--card); border-radius: 14px; box-shadow: var(--shadow);
  padding: 16px; margin-bottom: 12px;
  transition: transform .18s var(--ease), box-shadow .18s ease;
}
.tools-card:active { background: #FCFCFC; transform: scale(.98); }
.tools-ico {
  flex: none; width: 44px; height: 44px; border-radius: 13px;
  background: linear-gradient(135deg, #FFF3E4, #FFE2C6);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; line-height: 1;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.6), 0 4px 12px rgba(255,150,60,.16);
}
.tools-main { flex: 1; min-width: 0; }
.tools-name { display: block; font-size: 15.5px; font-weight: 700; color: var(--ink); }
.tools-sub { display: block; font-size: 12.5px; color: var(--ink-soft); margin-top: 2px; }
.tools-arrow { flex: none; display: flex; align-items: center; color: #C8C8C8; }
.tools-arrow svg { width: 18px; height: 18px; }
body.dark .tools-card {
  box-shadow: var(--shadow), inset 0 0 0 .6px rgba(255,255,255,.07);
}
body.dark .tools-card:active { background: #232323; transform: scale(.98); }
body.dark .tools-ico {
  background: linear-gradient(135deg, #3A2E1E, #2E2519);
  box-shadow: inset 0 0 0 .5px rgba(255,200,120,.22), 0 4px 14px rgba(0,0,0,.5);
}
body.dark .tools-arrow { color: #5A5A5A; }

/* ---------- 社区 · 发现 ---------- */
/* ---------- 社区 · 发现/关注（小红书式双列瀑布流，含邻居帖） ---------- */
.comm-body { max-width: 680px; margin: 0 auto; padding: 14px 14px calc(92px + var(--safe-bottom)); }
.comm-tabs { display: flex; align-items: center; justify-content: center; gap: 26px; }
.comm-tab-btn {
  font-size: 16px; font-weight: 700; color: var(--ink-soft); position: relative; padding: 4px 2px;
}
.comm-tab-btn.on { font-size: 17px; font-weight: 800; color: var(--ink); }
.comm-tab-btn.on::after {
  content: ''; position: absolute; left: 50%; transform: translateX(-50%); bottom: -2px;
  width: 18px; height: 3px; border-radius: 2px; background: var(--accent);
}

/* 关注页头像横排 */
.comm-follow-row {
  display: flex; gap: 12px; overflow-x: auto; padding: 2px 2px 12px;
  -webkit-overflow-scrolling: touch;
}
.follow-avatar {
  flex: none; width: 46px; height: 46px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #FFF; font-size: 17px; font-weight: 700;
  box-shadow: inset 0 0 0 2.5px var(--card);
}
.follow-avatar.off { opacity: .32; filter: grayscale(.6); }

/* 邻居头像圆点 */
.avatar-dot {
  flex: none; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  color: #FFF; font-weight: 700; font-size: 12px;
}

/* 用户卡（搜索结果） */
.search-sec-title { font-size: 13px; font-weight: 800; color: var(--ink); margin: 18px 4px 10px; }
.search-result .search-sec-title:first-child, .entry-list .search-sec-title:first-child { margin-top: 4px; }
.user-card {
  display: flex; align-items: center; gap: 12px;
  background: var(--card); border-radius: 12px; box-shadow: var(--shadow);
  padding: 12px 14px; margin-bottom: 8px;
}
body.dark .user-card { box-shadow: inset 0 0 0 .5px rgba(255,255,255,.05); }
.user-info { flex: 1; min-width: 0; }
.user-nickname { font-size: 15px; font-weight: 700; color: var(--ink); }
.user-sub { font-size: 11.5px; color: var(--ink-soft); margin-top: 3px; }
.user-follow-btn {
  flex: none; font-size: 12.5px; font-weight: 700; color: #FFF;
  background: var(--accent); border-radius: 14px; padding: 6px 16px;
}
.user-follow-btn:active { background: var(--accent-press); }
.user-follow-btn.on { background: var(--line-soft); color: var(--ink-soft); }
body.dark .user-follow-btn.on { background: #2A2A2C; }
.user-rename-btn {
  flex: none; width: 30px; height: 30px; border-radius: 9px;
  background: var(--line-soft); color: var(--ink-soft);
  display: flex; align-items: center; justify-content: center;
}
body.dark .user-rename-btn { background: #2A2A2C; }
.user-rename-btn svg { width: 15px; height: 15px; }
.user-rename-btn:active { color: var(--accent); }

/* 搜索 · 邻居帖行 */
.search-post-item {
  display: flex; align-items: center; gap: 9px;
  background: var(--card); border-radius: 10px; box-shadow: var(--shadow);
  padding: 11px 14px; margin-bottom: 7px;
}
body.dark .search-post-item { box-shadow: inset 0 0 0 .5px rgba(255,255,255,.05); }
.search-post-text { flex: 1; min-width: 0; font-size: 14px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- 邻居帖子详情浮层 ---------- */
.post-box {
  position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%);
  z-index: 96; width: min(84vw, 360px); background: var(--card);
  border-radius: 16px; box-shadow: var(--shadow-float);
  padding: 18px; animation: pop .26s cubic-bezier(.34,1.4,.44,1);
}
.post-head { display: flex; align-items: center; gap: 12px; }
.post-avatar {
  flex: none; width: 46px; height: 46px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #FFF; font-size: 18px; font-weight: 800;
}
.post-author { flex: 1; min-width: 0; }
.post-share {
  flex: none; width: 32px; height: 32px; border-radius: 50%;
  background: var(--line-soft); color: var(--ink);
  display: flex; align-items: center; justify-content: center;
}
body.dark .post-share { background: #2A2A2C; color: #D6D6D8; }
.post-share svg { width: 16px; height: 16px; }
.post-share:active { color: var(--accent); }
.post-nickname { font-size: 15.5px; font-weight: 700; color: var(--ink); }
.post-uid { font-size: 11px; color: var(--ink-soft); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-sub { font-size: 11px; color: var(--ink-soft); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.post-follow-btn {
  flex: none; font-size: 12.5px; font-weight: 700; color: #FFF;
  background: var(--accent); border-radius: 14px; padding: 6px 16px;
}
.post-follow-btn:active { background: var(--accent-press); }
.post-follow-btn.on { background: var(--line-soft); color: var(--ink-soft); }
body.dark .post-follow-btn.on { background: #2A2A2C; }
.post-text {
  margin-top: 14px; font-size: 15px; line-height: 1.75; color: var(--ink);
  white-space: pre-wrap; word-break: break-word; max-height: 44vh; overflow-y: auto;
}
/* 长文 3 行收起，点击展开（小红书式） */
.post-text.clampable { cursor: pointer; }
.post-text.clamped {
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3;
  overflow: hidden; max-height: none;
  position: relative;
}
.post-text.clamped::after {
  content: '展开全文 ›'; position: absolute; right: 0; bottom: 0;
  padding-left: 8px; font-size: 13px; color: #3E7DE8; font-weight: 600;
  background: linear-gradient(90deg, transparent, var(--card) 22%);
}
.post-meta {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 14px; padding-top: 12px; border-top: .5px solid var(--line-soft);
}
.post-time { font-size: 11.5px; color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.post-meta .xhs-like { padding: 4px 6px; }
.post-counts { display: flex; align-items: center; gap: 12px; }
.post-cmt-ico { display: flex; align-items: center; gap: 4px; color: var(--ink-soft); font-size: 12.5px; }
.post-cmt-ico svg { width: 17px; height: 17px; }

/* ---------- 帖子评论区（微信朋友圈风） ---------- */
.post-comments-sep {
  margin-top: 12px; padding: 9px 12px;
  background: var(--line-soft); border-radius: 9px 9px 0 0;
  font-size: 12px; font-weight: 700; color: var(--ink-soft);
}
body.dark .post-comments-sep { background: #26262A; }
.post-comments {
  background: transparent; border-radius: 0;
  max-height: 34vh; overflow-y: auto; padding: 0 0 4px;
}
/* 每条评论独立玻璃卡框（图2） */
.cmt-item {
  display: flex; gap: 9px; padding: 10px 12px; margin-bottom: 8px; border-radius: 13px;
  background: var(--glass);
  -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
  box-shadow: var(--glass-shadow), var(--glass-border);
}
body.dark .cmt-item { background: rgba(26,26,32,.52); }
/* 楼中楼回复：缩进小行（嵌在主卡内） */
.cmt-sub {
  display: flex; gap: 7px; margin-top: 8px; padding: 8px 10px;
  border-radius: 10px; background: var(--line-soft);
}
body.dark .cmt-sub { background: rgba(255,255,255,.045); }
.cmt-sub-av {
  flex: none; width: 20px; height: 20px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #FFF; font-size: 10px; font-weight: 700;
}
.cmt-sub-av.me { background: linear-gradient(135deg,#FF9A8B,#FF6A88); }
.cmt-av {
  flex: none; width: 26px; height: 26px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #FFF; font-size: 11px; font-weight: 700;
}
.cmt-av.me { background: linear-gradient(135deg,#FF9A8B,#FF6A88); }
.cmt-main { flex: 1; min-width: 0; }
.cmt-nick { font-size: 12.5px; font-weight: 700; color: var(--accent); }
.cmt-me .cmt-nick { color: #3E7DE8; }         /* 我的评论昵称蓝色（朋友圈风） */
.cmt-text { font-size: 13.5px; color: var(--ink); line-height: 1.5; margin-top: 2px; word-break: break-word; }
.cmt-foot { display: flex; align-items: center; gap: 10px; margin-top: 4px; }
.cmt-time { font-size: 10.5px; color: var(--ink-soft); }
.cmt-del { font-size: 10.5px; color: var(--ink-soft); padding: 2px 4px; }
.cmt-del:active { color: var(--danger); }
.post-empty-cmt { font-size: 12px; color: var(--ink-soft); text-align: center; padding: 10px 0 6px; }

/* 评论输入栏 */
.post-input-bar {
  display: flex; align-items: center; gap: 9px; margin-top: 13px;
}
.post-me-av { width: 30px; height: 30px; font-size: 12px; }
.post-input-bar input {
  flex: 1; min-width: 0; font-size: 13.5px;
  background: var(--line-soft); border: none; border-radius: 17px;
  padding: 9px 14px; color: var(--ink); outline: none;
}
body.dark .post-input-bar input { background: #2A2A2C; }
.post-input-bar input:focus { box-shadow: inset 0 0 0 1.5px var(--accent); }
.post-send {
  flex: none; font-size: 13px; font-weight: 700; color: #FFF;
  background: var(--accent); border-radius: 15px; padding: 8px 14px;
}
.post-send:active { background: var(--accent-press); }
@media (prefers-reduced-motion: reduce) { .post-box { animation: none; } }
.comm-hero-mini {
  display: flex; align-items: center; gap: 8px; width: 100%;
  background: var(--card); border-radius: 12px; box-shadow: var(--shadow);
  padding: 12px 14px; margin-bottom: 12px; text-align: left;
}
.comm-hero-mini:active { background: #FCFCFC; }
body.dark .comm-hero-mini:active { background: #232323; }
.comm-hero-spark { flex: none; font-size: 15px; }
.comm-hero-ellip {
  flex: 1; min-width: 0; font-size: 13.5px; color: var(--ink);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.comm-hero-go { flex: none; font-size: 12.5px; color: var(--accent); font-weight: 700; }

/* 双列瀑布流（CSS columns，卡片高度随内容自然错落） */
.comm-feed { column-count: 2; column-gap: 10px; }
.xhs-card {
  break-inside: avoid; margin-bottom: 12px;
  background: var(--card); border-radius: 14px; overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform .18s var(--ease);
}
.xhs-card:active { transform: scale(.97); }
body.dark .xhs-card {
  box-shadow: var(--shadow), inset 0 0 0 .6px rgba(255,255,255,.06);
}
body.dark .xhs-card { box-shadow: inset 0 0 0 .5px rgba(255,255,255,.05); }
.xhs-card:active { transform: scale(.985); }
.xhs-cover { position: relative; width: 100%; }
.xhs-cover img { display: block; width: 100%; height: auto; }
.xhs-cover-plain { aspect-ratio: 4 / 5; }
.xhs-imgn {
  position: absolute; right: 7px; bottom: 7px;
  display: flex; align-items: center; gap: 3px;
  background: rgba(0,0,0,.5); color: #FFF; border-radius: 9px;
  font-size: 11px; font-weight: 700; padding: 3px 8px 3px 5px;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.xhs-imgn svg { width: 12px; height: 12px; }
.xhs-plain {
  display: flex; flex-direction: column;
  align-items: flex-start; justify-content: flex-end;
  padding: 46px 16px 20px; width: 100%; height: 100%;
}

.xhs-plain-emoji { font-size: 22px; line-height: 1; margin-bottom: 10px; text-shadow: 0 2px 10px rgba(0,0,0,.25); }
.xhs-plain-text {
  font-size: 15px; font-weight: 700; line-height: 1.6; color: #FFF;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  max-height: 48px;   /* 两行硬截兜底：clamp 在新版内核可能失效 */
  text-shadow: 0 1px 6px rgba(0,0,0,.35);
}
.xhs-title {
  padding: 10px 11px 9px; font-size: 13.5px; font-weight: 600; color: var(--ink); line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  max-height: 60px;      /* 两行（40.5 文字高 + 19 上下 padding）硬截兜底 */
}
.xhs-meta { display: flex; align-items: center; justify-content: space-between; padding: 0 11px 11px; }
.xhs-author { display: flex; align-items: center; gap: 5px; min-width: 0; }
.xhs-avatar {
  flex: none; width: 18px; height: 18px; border-radius: 50%;
  background: var(--line-soft); color: var(--ink-soft);
  display: flex; align-items: center; justify-content: center;
}
body.dark .xhs-avatar { background: #2E2E30; }
.xhs-avatar svg { width: 11px; height: 11px; }
.xhs-author { font-size: 11.5px; color: var(--ink-soft); }
.xhs-like {
  flex: none; display: flex; align-items: center; gap: 4px;
  font-size: 11.5px; color: var(--ink-soft); padding: 3px 4px;
}
.xhs-like svg { width: 15px; height: 15px; }
.xhs-like.on { color: var(--accent); }
.xhs-like:active { transform: scale(1.15); }
.xhs-like-n { font-weight: 600; }
/* 发现页底部加载特效（小红书式） */
.comm-loader {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 20px 0 4px; font-size: 12px; color: var(--ink-soft);
}
.comm-spinner {
  width: 17px; height: 17px; border-radius: 50%;
  border: 2px solid var(--line);
  border-top-color: var(--accent);
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .comm-spinner { animation: none; } }

/* ---------- 我的 · 个人卡 ---------- */
.me-card {
  position: relative; overflow: hidden; margin: 14px 16px 6px;
  background: var(--card); border-radius: 18px; box-shadow: var(--shadow);
}
body.dark .me-card { box-shadow: inset 0 0 0 .5px rgba(255,255,255,.05); }
.me-card-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(130% 100% at 88% -14%, rgba(255,107,107,.26), transparent 55%),
    radial-gradient(100% 80% at -10% 112%, rgba(90,168,245,.18), transparent 60%);
  pointer-events: none;
}
.me-head {
  position: relative; display: flex; align-items: center; gap: 14px;
  width: 100%; text-align: left; padding: 22px 16px 18px;
}
.me-avatar-wrap { position: relative; flex: none; }
.me-avatar {
  width: 66px; height: 66px; border-radius: 50%; overflow: hidden;
  background: linear-gradient(135deg, #FF9A8B, #FF6A88);
  display: flex; align-items: center; justify-content: center;
}
.me-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.me-avatar-letter { color: #FFF; font-size: 26px; font-weight: 800; }
.me-avatar-cam {
  position: absolute; right: -2px; bottom: -2px;
  width: 23px; height: 23px; border-radius: 50%;
  background: var(--ink); color: #FFF;
  display: flex; align-items: center; justify-content: center;
  border: 2.5px solid var(--card);
}
.me-avatar-cam svg { width: 12px; height: 12px; }
.me-status-badge {
  position: absolute; left: 50%; transform: translateX(-50%); bottom: -9px;
  white-space: nowrap; max-width: 120px; overflow: hidden; text-overflow: ellipsis;
  background: var(--accent); color: #FFF; font-size: 10.5px; font-weight: 700;
  padding: 2.5px 9px; border-radius: 9px; z-index: 3;
}
.me-info { flex: 1; min-width: 0; }
.me-name-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.me-nickname { font-size: 19px; font-weight: 800; color: var(--ink); }
.me-level {
  flex: none; font-size: 11px; font-weight: 800; color: #B8860B;
  background: linear-gradient(135deg, #FFE9A8, #FFD76E);
  border-radius: 7px; padding: 2px 8px;
}
.me-meta-row { display: flex; align-items: center; gap: 7px; margin-top: 8px; flex-wrap: wrap; }
.me-chip {
  font-size: 11px; color: var(--ink-soft); background: var(--line-soft);
  border-radius: 6px; padding: 2.5px 8px;
}
body.dark .me-chip { background: #2A2A2C; }
.me-uid { letter-spacing: .04em; }
.me-arrow { flex: none; color: #C9C9C9; display: flex; }
.me-arrow svg { width: 18px; height: 18px; }
body.dark .me-arrow { color: #5A5A5A; }

.me-grid {
  position: relative; display: flex;
  border-top: .5px solid var(--line-soft); margin: 0 8px; padding: 4px 0 12px;
}
.me-cell {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 7px;
  padding: 10px 0 4px; position: relative;
}
.me-cell:active { opacity: .6; }
.me-cell-ico {
  width: 44px; height: 44px; border-radius: 15px;
  display: flex; align-items: center; justify-content: center;
  transition: transform .18s var(--ease);
}
.me-cell-ico svg { width: 22px; height: 22px; }
.me-cell:active .me-cell-ico { transform: scale(.9); }
.me-ico-heart { background: linear-gradient(135deg, #FF8FA3, #FF5C7A); box-shadow: 0 8px 24px rgba(255,92,122,.48), inset 0 1px 0 rgba(255,255,255,.3); }
.me-ico-clock { background: linear-gradient(135deg, #5AA8F5, #3E7DE8); box-shadow: 0 8px 24px rgba(62,125,232,.46), inset 0 1px 0 rgba(255,255,255,.3); }
.me-ico-status { background: linear-gradient(135deg, #57D0A8, #23B57F); box-shadow: 0 8px 24px rgba(35,181,127,.46), inset 0 1px 0 rgba(255,255,255,.3); }
.me-ico-bell { background: linear-gradient(135deg, #FFC46B, #FF9F2E); box-shadow: 0 8px 24px rgba(255,159,46,.48), inset 0 1px 0 rgba(255,255,255,.3); }
.me-cell-t { font-size: 11.5px; color: var(--ink-soft); }
.me-msg-dot {
  position: absolute; top: 6px; right: calc(50% - 30px);
  width: 9px; height: 9px; border-radius: 50%; background: var(--danger);
  border: 2px solid var(--card);
}

/* ---------- 编辑资料 ---------- */
.profile-body { max-width: 680px; margin: 0 auto; padding: 22px 16px calc(40px + var(--safe-bottom)); }
.profile-avatar-box {
  display: flex; flex-direction: column; align-items: center; gap: 9px;
  padding: 18px 0 24px;
}
.profile-avatar {
  position: relative; width: 96px; height: 96px; border-radius: 50%; overflow: hidden;
  background: linear-gradient(135deg, #FF9A8B, #FF6A88);
  display: flex; align-items: center; justify-content: center;
}
.profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-avatar-letter { color: #FFF; font-size: 36px; font-weight: 800; }
.profile-avatar-cam {
  position: absolute; right: -3px; bottom: -3px; z-index: 2;
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--ink); color: #FFF;
  display: flex; align-items: center; justify-content: center;
  border: 3px solid var(--bg);
}
.profile-avatar-cam svg { width: 15px; height: 15px; }
.profile-avatar-tip { font-size: 12px; color: var(--ink-soft); }
.profile-rows {
  background: var(--card); border-radius: 14px; box-shadow: var(--shadow); overflow: hidden;
}
body.dark .profile-rows { box-shadow: inset 0 0 0 .5px rgba(255,255,255,.05); }
.profile-row {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 15.5px 16px; border-bottom: .5px solid var(--line-soft); text-align: left;
}
.profile-row:last-child { border-bottom: 0; }
.profile-row:active { background: #FAFAFA; }
body.dark .profile-row:active { background: #232323; }
.profile-row-label { flex: none; font-size: 15px; color: var(--ink); }
.profile-row-val {
  flex: 1; text-align: right; font-size: 14px; color: var(--ink-soft);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.profile-row-arrow { flex: none; color: #C9C9C9; display: flex; }
.profile-row-arrow svg { width: 15px; height: 15px; }
body.dark .profile-row-arrow { color: #5A5A5A; }
.profile-row-input { display: none; }
.profile-copy-btn {
  flex: none; font-size: 12px; color: #007AFF; background: rgba(0,122,255,.1);
  border-radius: 6px; padding: 4px 12px;
}
.profile-level-tip { font-size: 11px; color: var(--ink-soft); margin-left: 8px; }

/* ---------- 今日状态（液态玻璃高级版） ---------- */
.status-body { max-width: 680px; margin: 0 auto; padding: 12px 16px calc(40px + var(--safe-bottom)); }

/* 当前状态卡：玻璃 + 珊瑚柔光 + 呼吸气泡 */
.status-current {
  position: relative; overflow: hidden;
  display: flex; align-items: center; gap: 14px;
  background: var(--glass);
  -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
  border-radius: 20px;
  box-shadow: var(--glass-shadow), var(--glass-border);
  padding: 18px 16px; margin-bottom: 22px;
}
.status-current::before {
  content: ''; position: absolute; top: -80px; right: -60px;
  width: 200px; height: 200px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,107,107,.18), transparent 65%);
  pointer-events: none;
}
.status-cur-bub {
  position: relative; flex: none; width: 54px; height: 54px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 27px; line-height: 1;
  background: linear-gradient(135deg, rgba(255,255,255,.92), rgba(255,255,255,.5));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.75), 0 8px 18px rgba(90,80,120,.16);
  animation: status-breath 3.4s var(--ease) infinite;
}
@keyframes status-breath { 0%,100% { transform: scale(1); } 50% { transform: scale(1.06); } }
.status-cur-info { position: relative; flex: 1; min-width: 0; }
.status-cur-text { font-size: 16.5px; font-weight: 800; color: var(--ink); letter-spacing: .3px; }
.status-cur-live {
  display: flex; align-items: center; gap: 6px; margin-top: 5px;
  font-size: 11.5px; color: var(--ink-soft); white-space: nowrap;
}
.status-cur-live span { overflow: hidden; text-overflow: ellipsis; }
.status-cur-dot {
  flex: none; width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent); animation: status-pulse 2.2s infinite;
}
@keyframes status-pulse {
  0% { box-shadow: 0 0 0 0 rgba(255,107,107,.4); }
  70% { box-shadow: 0 0 0 7px rgba(255,107,107,0); }
  100% { box-shadow: 0 0 0 0 rgba(255,107,107,0); }
}
.status-off-btn {
  position: relative; flex: none; font-size: 13.5px; font-weight: 700; color: #FFF;
  background: linear-gradient(135deg, #F0565B, #D93A40);
  border-radius: 999px; padding: 9px 22px;
  box-shadow: 0 6px 16px rgba(229,72,77,.3), inset 0 1px 0 rgba(255,255,255,.28);
  transition: transform .18s var(--ease), filter .18s var(--ease);
}
.status-off-btn:active { transform: scale(.94); filter: brightness(.92); }

/* 空态引导横幅 */
.status-hero {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; align-items: center; gap: 7px;
  background: var(--glass);
  -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
  border-radius: 20px;
  box-shadow: var(--glass-shadow), var(--glass-border);
  padding: 26px 18px 24px; margin-bottom: 22px; text-align: center;
}
.status-hero::before {
  content: ''; position: absolute; top: -90px; left: 50%; transform: translateX(-50%);
  width: 240px; height: 180px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,107,107,.14), transparent 68%);
  pointer-events: none;
}
.status-hero-bub {
  position: relative; width: 62px; height: 62px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 30px; line-height: 1;
  background: linear-gradient(135deg, rgba(255,255,255,.92), rgba(255,255,255,.5));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.75), 0 10px 22px rgba(90,80,120,.18);
  animation: status-breath 3.4s var(--ease) infinite;
}
.status-hero-t {
  position: relative; font-size: 16px; font-weight: 800; letter-spacing: .3px;
  background: linear-gradient(120deg, #FF6B6B, #FF9A6B 55%, #FF6B6B);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.status-hero-sub { position: relative; font-size: 12px; color: var(--ink-soft); letter-spacing: .5px; }

/* 分组标题：渐变竖条 + 数量徽标 + 发丝线 */
.status-sec { margin-bottom: 22px; }
.status-sec-title {
  display: flex; align-items: center; gap: 8px;
  margin: 0 3px 12px;
}
.status-sec-title::before {
  content: ''; flex: none; width: 4px; height: 15px; border-radius: 2px;
  background: linear-gradient(180deg, #FF8A6B, var(--accent));
}
.status-sec-name { font-size: 13.5px; font-weight: 800; color: var(--ink); letter-spacing: .3px; }
.status-sec-count {
  flex: none; font-size: 10.5px; font-weight: 600; color: var(--ink-soft);
  padding: 2px 8px; border-radius: 999px; background: rgba(153,153,153,.14);
}
.status-sec-title::after {
  content: ''; flex: 1; height: 1px;
  background: linear-gradient(90deg, var(--line), transparent);
}

/* 网格单元：液态玻璃 + 选中光环 + 勾选徽标 */
.status-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.status-cell {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; align-items: center; gap: 9px;
  background: var(--glass);
  -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
  border-radius: 16px;
  box-shadow: var(--glass-shadow), var(--glass-border);
  padding: 15px 4px 12px;
  transition: transform .2s var(--ease);
}
.status-cell:active { transform: scale(.93); }
.status-cell-emoji {
  width: 42px; height: 42px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; line-height: 1;
  background: radial-gradient(circle at 32% 28%, rgba(255,255,255,.92), rgba(255,255,255,.34));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.6), 0 4px 10px rgba(90,80,120,.1);
}
.status-cell-t { font-size: 11.5px; font-weight: 600; color: var(--ink); }
.status-cell.on { box-shadow: 0 0 0 1.5px var(--accent), 0 10px 24px rgba(255,107,107,.22), var(--glass-border); }
.status-cell.on .status-cell-emoji {
  background: radial-gradient(circle at 32% 28%, #FFC3B0, #FF9A82);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.5), 0 6px 14px rgba(255,107,107,.32);
}
.status-cell.on .status-cell-t { color: var(--accent); font-weight: 700; }
.status-check {
  position: absolute; top: 8px; right: 8px;
  width: 18px; height: 18px; border-radius: 50%;
  display: none; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #FF7B7B, var(--accent));
  box-shadow: 0 3px 8px rgba(255,107,107,.4);
  color: #FFF;
}
.status-cell.on .status-check { display: flex; }
.status-check svg { width: 10px; height: 10px; display: block; }

/* 深色主题精修 */
body.dark .status-cur-bub, body.dark .status-hero-bub {
  background: linear-gradient(135deg, rgba(255,255,255,.16), rgba(255,255,255,.05));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.24), 0 8px 20px rgba(0,0,0,.42);
}
body.dark .status-cell-emoji {
  background: radial-gradient(circle at 32% 28%, rgba(255,255,255,.18), rgba(255,255,255,.04));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.18);
}
body.dark .status-cell.on .status-cell-emoji {
  background: radial-gradient(circle at 32% 28%, rgba(255,122,122,.32), rgba(255,107,107,.16));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.26), 0 6px 14px rgba(255,107,107,.24);
}
body.dark .status-sec-count { background: rgba(255,255,255,.1); }
body.dark .status-sec-title::after { background: linear-gradient(90deg, #2E2E32, transparent); }
body.dark .status-hero-t {
  background: linear-gradient(120deg, #FF8A80, #FFB59E 55%, #FF8A80);
  -webkit-background-clip: text; background-clip: text;
}

/* ---------- 我的消息 ---------- */
.msg-list { max-width: 680px; margin: 0 auto; padding: 14px 16px calc(40px + var(--safe-bottom)); }
.msg-item {
  display: flex; gap: 12px; background: var(--card); border-radius: 12px;
  box-shadow: var(--shadow); padding: 15px 16px; margin-bottom: 10px;
}
.msg-ico { flex: none; font-size: 22px; line-height: 1.2; }
.msg-main { flex: 1; min-width: 0; }
.msg-title { font-size: 15px; font-weight: 700; color: var(--ink); position: relative; }
.msg-dot {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  background: var(--danger); margin-left: 6px; vertical-align: middle;
}
.msg-body { font-size: 13.5px; color: var(--ink); line-height: 1.6; margin-top: 5px; word-break: break-word; }
.msg-meta { font-size: 11.5px; color: var(--ink-soft); margin-top: 7px; }

/* ---------- 写日记入口（灵感胶囊 · 高级版） ---------- */
.composer { padding: 9px 16px 14px; }
.compose-capsule {
  position: relative; overflow: hidden;
  display: flex; align-items: center; gap: 13px; width: 100%;
  background: var(--card); border-radius: 18px;
  box-shadow: var(--shadow), inset 0 0 0 .5px rgba(255,255,255,.1);
  padding: 15px 15px 15px 15px; text-align: left;
}
body.dark .compose-capsule {
  box-shadow: 0 16px 44px rgba(0,0,0,.6), 0 2px 10px rgba(0,0,0,.4),
    inset 0 0 0 .6px rgba(255,255,255,.14);
  background: #1E1E22;
}
/* 环境光晕（暖珊瑚 + 冷青蓝 双 radial 渐变） */
.compose-glow {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(130% 120% at 92% -18%, rgba(255,150,84,.20), transparent 55%),
    radial-gradient(120% 100% at -8% 118%, rgba(90,168,245,.14), transparent 58%);
}
body.dark .compose-glow {
  background:
    radial-gradient(150% 140% at 92% -22%, rgba(255,140,70,.34), transparent 58%),
    radial-gradient(130% 110% at -10% 124%, rgba(96,176,255,.24), transparent 60%);
}
.compose-capsule:active { transform: scale(.985); }
/* 发光渐变图标底（每日呼吸微动效） */
.compose-ico {
  position: relative; flex: none;
  width: 42px; height: 42px; border-radius: 14px;
  background: linear-gradient(135deg, #FF9A5A, #FF6A6A 55%, #F0507A);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 5px 16px rgba(240,80,122,.32), inset 0 1px 0 rgba(255,255,255,.35);
  animation: compose-breathe 3.6s ease-in-out infinite;
}
.compose-ico svg { width: 23px; height: 23px; }
@keyframes compose-breathe {
  0%, 100% { box-shadow: 0 5px 16px rgba(240,80,122,.32), inset 0 1px 0 rgba(255,255,255,.35); }
  50% { box-shadow: 0 5px 24px rgba(240,80,122,.5), inset 0 1px 0 rgba(255,255,255,.35); }
}
.compose-main { position: relative; flex: 1; min-width: 0; }
.compose-insp {
  display: block; font-size: 15px; font-weight: 700; color: var(--ink);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.compose-sub { display: block; font-size: 11.5px; color: var(--ink-soft); margin-top: 3.5px; }
body.dark .compose-sub { color: rgba(255,255,255,.56); }
/* 圆形"去写"钮（渐变珊瑚） */
.compose-go {
  position: relative; flex: none;
  width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(135deg, #FF9F6E, #F0607A);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 12px rgba(240,96,122,.24), inset 0 1px 0 rgba(255,255,255,.32);
  margin-right: 2px;
}
.compose-go svg { width: 15px; height: 15px; }
@media (prefers-reduced-motion: reduce) {
  .compose-ico { animation: none; }
  .compose-capsule:active { transform: none; }
}

/* ---------- 输入弹窗（改名等） ---------- */
.prompt-box {
  position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%);
  z-index: 98; width: min(86vw, 330px);
  background: var(--dlg-bg);
  -webkit-backdrop-filter: var(--dlg-blur); backdrop-filter: var(--dlg-blur);
  border-radius: 18px;
  box-shadow: var(--glass-shadow), var(--glass-border);
  padding: 20px 16px 14px;
  animation: pop .24s cubic-bezier(.34,1.4,.44,1);
}
.prompt-title { font-size: 16px; font-weight: 800; color: var(--ink); text-align: center; }
.prompt-input {
  width: 100%; margin-top: 14px; font-size: 15px;
  background: var(--line-soft); border: none; border-radius: 10px;
  padding: 11px 13px; color: var(--ink); outline: none;
}
body.dark .prompt-input { background: #2A2A2C; }
.prompt-input:focus { box-shadow: inset 0 0 0 1.5px var(--accent); }
.prompt-err { min-height: 16px; font-size: 11.5px; color: var(--danger); margin-top: 6px; text-align: center; }
.prompt-btns { display: flex; gap: 10px; margin-top: 6px; }
.prompt-cancel {
  flex: 1; font-size: 14px; font-weight: 600; color: var(--ink-soft);
  background: var(--line-soft); border-radius: 11px; padding: 10px;
}
body.dark .prompt-cancel { background: rgba(255,255,255,.08); }
.prompt-ok {
  flex: 1.4; font-size: 14px; font-weight: 700; color: #FFF;
  background: var(--accent); border-radius: 11px; padding: 10px;
}
.prompt-ok:active { background: var(--accent-press); }
@media (prefers-reduced-motion: reduce) { .prompt-box { animation: none; } }

/* ---------- 用户头像放大浮层 ---------- */
.avatar-box {
  position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%);
  z-index: 99; width: min(76vw, 280px);
  background: var(--dlg-bg);
  -webkit-backdrop-filter: var(--dlg-blur); backdrop-filter: var(--dlg-blur);
  border-radius: 20px;
  box-shadow: var(--dlg-shadow), var(--dlg-border);
  padding: 28px 20px 20px; text-align: center;
  animation: pop .26s cubic-bezier(.34,1.4,.44,1);
}
.avatar-big {
  width: 92px; height: 92px; border-radius: 50%; margin: 0 auto;
  display: flex; align-items: center; justify-content: center;
  color: #FFF; font-size: 34px; font-weight: 800;
  box-shadow: 0 10px 30px rgba(0,0,0,.18), inset 0 2px 0 rgba(255,255,255,.28);
}
.avatar-name { font-size: 17px; font-weight: 800; color: var(--ink); margin-top: 14px; }
.avatar-meta {
  font-size: 11.5px; color: var(--ink-soft); margin-top: 5px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.avatar-box .post-follow-btn { margin-top: 16px; padding: 8px 22px; }
@media (prefers-reduced-motion: reduce) { .avatar-box { animation: none; } }

/* ---------- 头像裁剪编辑器 ---------- */

/* 九宫格长按拖动排序（微信式） */
.eg-item { touch-action: none; }
.eg-item.dragging { opacity: .3; }
.eg-drag-ghost {
  position: fixed; z-index: 200; width: 64px; height: 64px;
  margin: -32px 0 0 -32px; border-radius: 8px; overflow: hidden;
  pointer-events: none;
  box-shadow: 0 10px 30px rgba(0,0,0,.3), 0 0 0 1px rgba(255,255,255,.4);
  transform: scale(1.12);
}
.eg-drag-ghost img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- 外观选择弹窗（高级版 · 液态玻璃） ---------- */
.theme-box {
  position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%);
  z-index: 98; width: min(86vw, 340px);
  background: var(--dlg-bg);
  -webkit-backdrop-filter: var(--dlg-blur); backdrop-filter: var(--dlg-blur);
  border-radius: 18px;
  box-shadow: var(--dlg-shadow), var(--dlg-border);
  padding: 20px 14px 12px;
  animation: pop .26s cubic-bezier(.34,1.4,.44,1);
}
.theme-box-head { text-align: center; padding: 2px 8px 14px; }
.theme-box-title { font-size: 17px; font-weight: 800; color: var(--ink); letter-spacing: .04em; }
.theme-box-sub { font-size: 12px; color: var(--ink-soft); margin-top: 5px; }
.theme-options { display: flex; flex-direction: column; gap: 8px; }
.theme-opt {
  display: flex; align-items: center; gap: 13px; width: 100%; text-align: left;
  border-radius: 13px; padding: 12px 14px;
  border: 1.5px solid transparent;
  transition: background .15s ease, border-color .15s ease;
}
.theme-opt:active { background: rgba(0,0,0,.05); }
body.dark .theme-opt:active { background: rgba(255,255,255,.06); }
.theme-opt.on {
  background: rgba(255,107,107,.07);
  border-color: rgba(255,107,107,.45);
}
body.dark .theme-opt.on { background: rgba(255,107,107,.12); }
.theme-opt-ico {
  flex: none; width: 42px; height: 42px; border-radius: 13px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 3px 10px rgba(0,0,0,.14);
}
.theme-opt-ico svg { width: 22px; height: 22px; }
.theme-opt-main { flex: 1; min-width: 0; }
.theme-opt-label { display: block; font-size: 15.5px; font-weight: 700; color: var(--ink); }
.theme-opt-sub { display: block; font-size: 11.5px; color: var(--ink-soft); margin-top: 3px; }
.theme-opt-check {
  flex: none; color: var(--accent); display: flex;
}
.theme-opt-check svg { width: 19px; height: 19px; }
.theme-cancel {
  width: 100%; margin-top: 10px; padding: 11px;
  font-size: 14px; font-weight: 600; color: var(--ink-soft);
  background: rgba(0,0,0,.05); border-radius: 12px;
}
body.dark .theme-cancel { background: rgba(255,255,255,.08); }
.theme-cancel:active { opacity: .6; }
@media (prefers-reduced-motion: reduce) { .theme-box { animation: none; } }
.avatar-crop {
  position: fixed; inset: 0; z-index: 130; background: #000;
  display: flex; flex-direction: column;
  animation: fadein .18s ease;
}
.crop-stage {
  flex: 1; position: relative; overflow: hidden; touch-action: none;
  display: flex; align-items: center; justify-content: center;
}
#crop-img {
  position: absolute; left: 50%; top: 50%;
  max-width: none; user-select: none; -webkit-user-drag: none;
  will-change: transform;
}
.crop-frame {
  position: absolute; left: 50%; top: 50%;
  width: 82%; aspect-ratio: 1/1; max-height: 60vh;
  transform: translate(-50%, -50%);
  border-radius: 4px;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, .62);
  border: 1.5px solid rgba(255, 255, 255, .85);
  pointer-events: none;
}
.crop-bar {
  flex: none; display: flex; align-items: center; justify-content: space-between;
  padding: 14px 22px calc(14px + var(--safe-bottom));
}
.crop-text-btn { font-size: 15px; color: #FFF; padding: 8px 10px; }
.crop-text-btn:active { opacity: .5; }
.crop-ico-btn {
  width: 42px; height: 42px; border-radius: 50%;
  background: rgba(255,255,255,.14); color: #FFF;
  display: flex; align-items: center; justify-content: center;
}
.crop-ico-btn svg { width: 21px; height: 21px; }
.crop-ico-btn:active { background: rgba(255,255,255,.28); }
.crop-ok-btn {
  font-size: 14px; font-weight: 700; color: #FFF;
  background: var(--accent); border-radius: 15px; padding: 9px 26px;
}
.crop-ok-btn:active { background: var(--accent-press); }
.crop-tip {
  position: absolute; left: 50%; transform: translateX(-50%);
  bottom: calc(76px + var(--safe-bottom));
  font-size: 11.5px; color: rgba(255,255,255,.5); pointer-events: none;
}
@media (prefers-reduced-motion: reduce) { .avatar-crop { animation: none; } }

/* ---------- 响应式 ---------- */
@media (min-width: 480px) {
  .card-thumb { width: 84px; height: 84px; }
}
@media (max-width: 360px) {
  /* 小屏防挤压：隐藏工具行时钟，缩小图标 */
  .edit-media-clock { display: none; }
  .edit-media-btn { width: 36px; height: 36px; }
  .edit-media-btn svg { width: 18px; height: 18px; }
  .cal-cell { min-height: 46px; }
  .cal-cell.selected .cal-num, .cal-cell.today .cal-num { width: 23px; height: 23px; }
  .cal-lunar { font-size: 8.5px; }
}
@media (min-width: 720px) {
  .view-active#view-main, .view-active#view-calendar, .view-active#view-search,
  .view-active#view-settings, .view-active#view-tools, .view-active#view-community,
  .view-active#view-reminders, .view-active#view-trash {
    max-width: 720px; margin: 0 auto; box-shadow: 0 0 0 1px var(--line); min-height: 100vh; background: var(--bg);
  }
  .topbar, .composer { max-width: 720px; }
  /* 平板：底栏居中并限制宽度，与 720px 容器对齐 */
  .bottom-nav { left: 50%; right: auto; width: min(92vw, 640px); transform: translateX(-50%); }
}

/* 瀑布卡互动与标签（补齐） */
.xhs-acts { display: flex; align-items: center; gap: 10px; }
.xhs-cmt { display: flex; align-items: center; gap: 4px; color: var(--ink-soft); }
.xhs-cmt svg { width: 15px; height: 15px; }
.xhs-cmt-n { font-size: 12px; }
.xhs-tag {
  position: absolute; left: 10px; top: 10px; z-index: 2;
  display: inline-flex; align-items: center; gap: 4px;
  background: rgba(0,0,0,.4); color: #FFF;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  border-radius: 8px; padding: 3px 8px; font-size: 11px; font-weight: 600;
  pointer-events: none;
}

/* ---------- 关于我们页（图2 复刻：马卡龙渐变+毛玻璃卡） ---------- */
#view-about {
  background: linear-gradient(168deg,
    #BFD4F2 0%, #C9C6F0 26%, #E4C3E8 52%, #F3D4D8 76%, #C7E8DC 100%);
  min-height: 100vh;
}
body.dark #view-about {
  background: linear-gradient(168deg,
    #232B3E 0%, #2B2840 26%, #382A44 52%, #3A2C38 76%, #22332C 100%);
}
.about-body {
  max-width: 680px; margin: 0 auto;
  padding: 8px 18px calc(34px + var(--safe-bottom));
}
.about-head { text-align: center; padding: 30px 0 22px; }
.about-name { text-shadow: 0 2px 12px rgba(120,100,160,.22); }
.about-logo {
  width: 72px; height: 72px; border-radius: 18px; margin: 0 auto;
  display: flex; align-items: center; justify-content: center;
  font-size: 36px;
  background: linear-gradient(150deg, #FF9A8B 0%, #FF6A88 55%, #C77AD0 100%);
  box-shadow: 0 12px 32px rgba(233,102,120,.35), inset 0 2px 0 rgba(255,255,255,.3);
}
.about-name { font-size: 21px; font-weight: 800; color: var(--ink); margin-top: 14px; }
.about-slogan { font-size: 12.5px; color: var(--ink-soft); margin-top: 5px; }
.about-ver { font-size: 11px; color: var(--ink-soft); margin-top: 3px; }
.about-card {
  background: rgba(255,255,255,.62);
  -webkit-backdrop-filter: blur(24px) saturate(1.6);
  backdrop-filter: blur(24px) saturate(1.6);
  border-radius: 18px;
  box-shadow: 0 10px 30px rgba(90,80,120,.2),
    inset 0 0 0 1px rgba(255,255,255,.55),
    inset 0 1.5px 0 rgba(255,255,255,.95);
  padding: 16px 17px; margin-bottom: 14px;
}
body.dark .about-card {
  background: rgba(30,30,36,.72);
  box-shadow: 0 8px 26px rgba(0,0,0,.4), inset 0 1px 0 rgba(255,255,255,.08);
}
.about-card-title {
  font-size: 11px; font-weight: 800; letter-spacing: 1.5px;
  color: var(--ink-soft); margin-bottom: 10px;
  display: flex; align-items: center; gap: 6px;
}
.about-card-title::before {
  content: ''; width: 4px; height: 4px; border-radius: 50%;
  background: linear-gradient(135deg, #FF6A88, #C77AD0);
}
.about-text { font-size: 13.5px; color: var(--ink); line-height: 1.7; }
.about-row {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 11px 2px; text-align: left;
}
.about-row + .about-row { border-top: .5px solid var(--line-soft); }
.about-row-ico {
  flex: none; width: 30px; height: 30px; border-radius: 9px;
  display: flex; align-items: center; justify-content: center; color: #FFF;
}
.about-row-ico svg { width: 16px; height: 16px; }
.about-row-ico.c-blue { background: linear-gradient(135deg,#5B9BF5,#3E6EE0); }
.about-row-ico.c-green { background: linear-gradient(135deg,#63C2A8,#3E9E7A); }
.about-row-ico.c-purple { background: linear-gradient(135deg,#A78BF0,#7A5CD0); }
.about-row-label { font-size: 14px; font-weight: 600; color: var(--ink); }
.about-row-value { flex: 1; min-width: 0; font-size: 12px; color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.about-row-arrow { color: var(--ink-soft); font-size: 16px; }
.about-row-copy {
  flex: none; font-size: 11.5px; color: #E85A7E; font-weight: 700;
  background: rgba(232,90,126,.12); border-radius: 9px; padding: 5px 9px;
}
body.dark .about-row-copy { background: rgba(232,90,126,.2); }
body.dark .about-row-copy { background: #2A2A2C; }
.about-row:active .about-row-copy { color: var(--accent); }

/* ---------- 帖子详情页（原浮层改全屏） ---------- */
.post-page-body {
  max-width: 680px; margin: 0 auto;
  padding: 14px 18px calc(20px + var(--safe-bottom));
}

/* 帖子详情页大图封面（小红书式主视觉；纯文字帖用放大心情卡） */
.post-cover {
  margin-top: 14px; aspect-ratio: 4 / 3; border-radius: 16px;
  display: flex; flex-direction: column;
  align-items: flex-start; justify-content: flex-end;
  padding: 26px 22px;
  box-shadow: 0 10px 34px rgba(0,0,0,.14);
}
.post-cover-emoji { font-size: 44px; line-height: 1; margin-bottom: 14px; text-shadow: 0 3px 14px rgba(0,0,0,.3); }
.post-cover-text {
  font-size: 19px; font-weight: 800; color: #FFF; line-height: 1.55;
  text-shadow: 0 2px 10px rgba(0,0,0,.4);
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden;
}


/* 评论条互动行：时间·回复 | 删除 ♥赞（小红书式） */
.cmt-foot { gap: 8px; }
.cmt-foot-sp { flex: 1; }
.cmt-reply { font-size: 10.5px; color: var(--ink-soft); padding: 2px 4px; }
.cmt-reply:active { color: var(--accent); }
.cmt-like {
  display: flex; align-items: center; gap: 4px;
  font-size: 10.5px; color: var(--ink-soft); padding: 2px 4px;
}
.cmt-like svg { width: 13px; height: 13px; }
.cmt-like.on { color: #FF5A70; }
.cmt-like:active { transform: scale(1.12); }
.cmt-like-n { font-size: 10.5px; }

/* 默认头像 = App logo */
.me-avatar-logo {
  font-size: 30px; line-height: 1;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,.25));
}
.about-copyright {
  text-align: center; font-size: 10.5px; color: var(--ink-soft);
  padding: 4px 0 6px; letter-spacing: .5px;
}

/* ---------- 日历类小工具（天气/农历/番茄钟） ---------- */
.sub-body { max-width: 680px; margin: 0 auto; padding: 16px 18px calc(30px + var(--safe-bottom)); }
.sub-title { font-size: 13px; font-weight: 700; color: var(--ink); margin-bottom: 10px; }

/* 今日农历 */
.lunar-hero {
  text-align: center; padding: 26px 16px;
  background: var(--glass);
  -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
  box-shadow: var(--glass-shadow), var(--glass-border);
  border-radius: 20px;
}
.lunar-big { font-size: 26px; font-weight: 800; color: var(--ink); }
.lunar-line { font-size: 14px; color: var(--ink-soft); margin-top: 8px; }
.lunar-zodiac { font-size: 13px; color: var(--accent); font-weight: 700; margin-top: 6px; }
.lunar-yi, .lunar-ji { font-size: 14px; line-height: 1.8; color: var(--ink); }


/* 协议/政策页 */
.terms-body { max-width: 680px; margin: 0 auto; padding: 14px 18px calc(30px + var(--safe-bottom)); }
.terms-updated { font-size: 11px; color: var(--ink-soft); margin-bottom: 12px; }
.terms-content h3 { font-size: 15.5px; font-weight: 800; color: var(--ink); margin: 16px 0 8px; }
.terms-content h3:first-child { margin-top: 0; }
.terms-content p { font-size: 13.5px; color: var(--ink); line-height: 1.85; margin-bottom: 8px; opacity: .88; }
.terms-content strong { color: var(--accent); font-weight: 700; }

/* ---------- 随手记 ---------- */
.notes-body { max-width: 680px; margin: 0 auto; padding: 14px 16px calc(40px + var(--safe-bottom)); }
.notes-input-card {
  background: var(--glass);
  -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
  box-shadow: var(--glass-shadow), var(--glass-border);
  border-radius: 18px; padding: 14px 14px 12px;
  display: flex; flex-direction: column; gap: 10px;
}
.notes-input-card textarea {
  width: 100%; min-height: 68px; font-size: 15px; line-height: 1.6; color: var(--ink);
  background: rgba(0,0,0,.035); border-radius: 12px; padding: 10px 12px; resize: none; outline: none;
}
body.dark .notes-input-card textarea { background: rgba(255,255,255,.07); }
.notes-input-card textarea:focus { box-shadow: inset 0 0 0 1.5px var(--accent); }
.notes-input-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.notes-count { font-size: 11.5px; color: var(--ink-soft); }
.notes-add-btn {
  flex: none; font-size: 14px; font-weight: 700; color: #FFF;
  background: linear-gradient(135deg, var(--accent), var(--accent-press));
  border-radius: 999px; padding: 8px 24px;
  box-shadow: 0 6px 16px rgba(255,107,107,.32), inset 0 1px 0 rgba(255,255,255,.25);
  transition: transform .18s var(--ease), filter .18s ease;
}
.notes-add-btn:active { transform: scale(.94); filter: brightness(.94); }
.notes-list { margin-top: 14px; }
.note-card {
  background: var(--glass);
  -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
  box-shadow: var(--glass-shadow), var(--glass-border);
  border-radius: 16px; padding: 13px 15px; margin-bottom: 10px;
}
.note-text {
  font-size: 14.5px; line-height: 1.7; color: var(--ink);
  white-space: pre-wrap; word-break: break-word;
}
.note-meta { display: flex; align-items: center; gap: 10px; margin-top: 9px; }
.note-time { font-size: 11.5px; color: var(--ink-soft); flex: 1; }
.note-acts { display: flex; gap: 4px; }
.note-act {
  width: 30px; height: 30px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-soft);
}
.note-act svg { width: 15px; height: 15px; }
.note-act:active { background: rgba(0,0,0,.06); }
body.dark .note-act:active { background: rgba(255,255,255,.1); }
.note-del:active { color: var(--danger); }
.notes-empty {
  text-align: center; padding: 54px 20px;
  background: var(--glass);
  -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
  box-shadow: var(--glass-shadow), var(--glass-border);
  border-radius: 18px;
}
.notes-empty-ico { font-size: 40px; line-height: 1; }
.notes-empty-t { font-size: 15px; font-weight: 700; color: var(--ink); margin-top: 12px; }
.notes-empty-s { font-size: 12px; color: var(--ink-soft); margin-top: 6px; }

/* 心情统计（补样式缺口） */
.moodstats-hero {
  text-align: center; padding: 24px 16px 20px;
  background: var(--glass);
  -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
  box-shadow: var(--glass-shadow), var(--glass-border);
  border-radius: 20px;
}
.ms-label { font-size: 12px; color: var(--ink-soft); margin-top: 6px; }
.ms-bars { margin-top: 4px; }
.ms-total { font-size: 26px; font-weight: 800; color: var(--ink); line-height: 1.1; }
.ms-best { font-size: 12.5px; color: var(--ink-soft); margin-left: 10px; }
.ms-row { display: flex; align-items: center; gap: 10px; margin-bottom: 9px; }
.ms-emoji { flex: none; font-size: 18px; line-height: 1; }
.ms-track { flex: 1; height: 10px; border-radius: 5px; background: rgba(0,0,0,.06); overflow: hidden; }
body.dark .ms-track { background: rgba(255,255,255,.1); }
.ms-fill { display: block; height: 100%; border-radius: 5px; background: linear-gradient(90deg, var(--accent), #FF9A6B); }
.ms-n { flex: none; font-size: 12px; font-weight: 700; color: var(--ink-soft); min-width: 18px; text-align: right; }

/* 有图日记：文字超长直接省略号截断（无展开按钮，参考图式） */
.card-text.clamp-ellipsis {
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden;
}


/* ---------- 开屏动效（高级版） ---------- */
.splash {
  position: fixed; inset: 0; z-index: 999;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: linear-gradient(180deg, #FDFAF4 0%, #F7F7FA 55%, #F1F1F4 100%);
  cursor: pointer; overflow: hidden;
  transition: opacity .5s var(--ease), transform .5s var(--ease);
}
body.dark .splash { background: linear-gradient(180deg, #14141A 0%, #0E0E12 55%, #0A0A0C 100%); }
.splash.out { opacity: 0; transform: scale(1.06); pointer-events: none; }

/* Logo：玻璃方块 + 弹入 + 呼吸光环 */
.splash-logo {
  position: relative;
  width: 96px; height: 96px; border-radius: 30px;
  display: flex; align-items: center; justify-content: center;
  background: var(--glass);
  -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
  box-shadow: var(--glass-shadow), var(--glass-border), 0 18px 44px rgba(255,107,107,.16);
  animation: splash-logo-in .9s var(--spring) both;
}
.splash-logo-ico {
  font-size: 48px; line-height: 1;
  filter: drop-shadow(0 4px 10px rgba(0,0,0,.18));
}
@keyframes splash-logo-in {
  0% { transform: scale(.45) translateY(18px); opacity: 0; }
  62% { transform: scale(1.07) translateY(0); opacity: 1; }
  100% { transform: scale(1) translateY(0); opacity: 1; }
}
.splash-logo-ring {
  position: absolute; inset: -14px; border-radius: 40px;
  border: 1.5px solid rgba(255,107,107,.35);
  animation: splash-ring 2s 0.3s ease-out infinite;
  pointer-events: none;
}
@keyframes splash-ring {
  0% { transform: scale(.9); opacity: 0; }
  35% { opacity: .8; }
  100% { transform: scale(1.28); opacity: 0; }
}

/* 名称：渐变字 + 浮起 */
.splash-name {
  margin-top: 26px;
  font-size: 25px; font-weight: 800; letter-spacing: 10px; text-indent: 10px;
  background: linear-gradient(120deg, #FF6B6B, #FF9A6B 55%, #FF6B6B);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: splash-up .6s .38s var(--ease) both;
}
.splash-slogan {
  margin-top: 10px;
  font-size: 12.5px; color: var(--ink-soft); letter-spacing: 2.5px;
  animation: splash-up .55s .68s var(--ease) both;
}
@keyframes splash-up {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

/* 微光进度条 */
.splash-bar {
  margin-top: 36px;
  width: 132px; height: 3px; border-radius: 2px; overflow: hidden;
  background: rgba(0,0,0,.07);
  animation: splash-up .5s .95s var(--ease) both;
}
body.dark .splash-bar { background: rgba(255,255,255,.1); }
.splash-bar i {
  display: block; height: 100%; width: 44%; border-radius: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  animation: splash-slide 1.15s 1.05s ease-in-out infinite;
}
@keyframes splash-slide {
  from { transform: translateX(-160%); }
  to { transform: translateX(360%); }
}

/* 底部落款 */
.splash-foot {
  position: absolute; bottom: calc(34px + var(--safe-bottom));
  font-size: 10.5px; color: var(--ink-soft); letter-spacing: 1.5px; opacity: .75;
  animation: fadein .6s 1.2s ease both;
}

/* 减少动效：直接静态呈现 */
@media (prefers-reduced-motion: reduce) {
  .splash { animation: none !important; }
  .splash-logo, .splash-logo-ring { animation: none !important; }
  .splash-name, .splash-slogan, .splash-bar { animation: fadein .4s both !important; }
  .splash-bar i { animation: none !important; }
}

/* ---------- 图片查看器·长按保存胶囊 ---------- */
.viewer-save {
  position: absolute; left: 50%; bottom: calc(34px + var(--safe-bottom));
  transform: translateX(-50%); z-index: 5;
  display: flex; align-items: center; gap: 7px;
  font-size: 13px; font-weight: 700; color: #FFF;
  background: rgba(0,0,0,.42);
  -webkit-backdrop-filter: blur(18px) saturate(1.5); backdrop-filter: blur(18px) saturate(1.5);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.22), 0 10px 30px rgba(0,0,0,.35);
  border-radius: 999px; padding: 10px 20px;
  animation: toast-in .26s var(--ease);
}
.viewer-save svg { width: 16px; height: 16px; }
.viewer-save:active { transform: translateX(-50%) scale(.94); }

/* ---------- 管理后台 ---------- */
.admin-body { max-width: 680px; margin: 0 auto; padding: 14px 16px calc(40px + var(--safe-bottom)); }
.admin-stats { display: flex; gap: 10px; margin-bottom: 14px; }
.admin-stat {
  flex: 1; text-align: center; padding: 14px 6px 12px; border-radius: 16px;
  background: var(--glass);
  -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
  box-shadow: var(--glass-shadow), var(--glass-border);
}
.admin-stat b { display: block; font-size: 22px; font-weight: 800; color: var(--ink); line-height: 1.1; }
.admin-stat span { display: block; font-size: 11px; color: var(--ink-soft); margin-top: 3px; }
.admin-stat.hot b { color: var(--accent); }
.admin-tabs {
  display: flex; gap: 22px; padding: 0 4px; margin-bottom: 4px;
  border-bottom: 1px solid var(--line-soft);
}
.admin-tab {
  padding: 9px 2px 10px; font-size: 14px; font-weight: 700; color: var(--ink-soft);
  position: relative;
}
.admin-tab.on { color: var(--accent); }
.admin-tab.on::after {
  content: ''; position: absolute; left: 50%; transform: translateX(-50%); bottom: -1px;
  width: 22px; height: 3px; border-radius: 2px; background: var(--accent);
}
.admin-panel { display: none; padding-top: 12px; }
.admin-panel.on { display: block; animation: fadein .2s ease; }
.admin-review-card {
  background: var(--glass);
  -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
  box-shadow: var(--glass-shadow), var(--glass-border);
  border-radius: 16px; padding: 13px 15px; margin-bottom: 10px;
}
.admin-review-head { display: flex; align-items: baseline; gap: 10px; }
.admin-review-user { font-size: 13px; font-weight: 700; color: var(--ink); flex: 1; }
.admin-review-time { font-size: 11px; color: var(--ink-soft); }
.admin-review-text {
  font-size: 13.5px; line-height: 1.6; color: var(--ink); margin-top: 7px;
  white-space: pre-wrap; word-break: break-word;
}
.admin-review-meta { font-size: 11px; color: var(--ink-soft); margin-top: 6px; }
.admin-review-acts { display: flex; gap: 8px; margin-top: 10px; justify-content: flex-end; }
.admin-btn {
  font-size: 13px; font-weight: 700; border-radius: 999px; padding: 7px 20px;
}
.admin-pass { color: #FFF; background: linear-gradient(135deg, var(--accent), var(--accent-press)); box-shadow: 0 4px 12px rgba(255,107,107,.3); }
.admin-pass:active { filter: brightness(.94); }
.admin-reject { color: var(--danger); background: rgba(229,72,77,.1); }
.admin-reject:active { filter: brightness(.94); }
.admin-avatar-card { display: flex; gap: 13px; align-items: flex-start; }
.admin-avatar-img { flex: none; width: 74px; height: 74px; border-radius: 14px; object-fit: cover; }
.admin-avatar-info { flex: 1; min-width: 0; }
.admin-empty {
  text-align: center; padding: 40px 20px; font-size: 13.5px; font-weight: 700; color: var(--ink-soft);
  background: var(--glass);
  -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
  box-shadow: var(--glass-shadow), var(--glass-border);
  border-radius: 16px;
}
.admin-empty-s { font-size: 11.5px; font-weight: 400; margin-top: 6px; opacity: .8; }
.admin-word-add { display: flex; gap: 8px; margin-bottom: 10px; }
.admin-word-add input {
  flex: 1; min-width: 0; font-size: 14px; color: var(--ink);
  background: rgba(0,0,0,.035); border: none; border-radius: 12px; padding: 10px 13px; outline: none;
}
body.dark .admin-word-add input { background: rgba(255,255,255,.07); }
.admin-word-add input:focus { box-shadow: inset 0 0 0 1.5px var(--accent); }
.admin-word-btn { flex: none; font-size: 13.5px; font-weight: 700; color: #FFF; background: var(--accent); border-radius: 12px; padding: 0 18px; }
.admin-word-btn:active { background: var(--accent-press); }
.admin-word-note { font-size: 11.5px; color: var(--ink-soft); line-height: 1.7; margin-bottom: 12px; }
.admin-word-list { display: flex; flex-wrap: wrap; gap: 8px; }
.admin-word-tag {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; color: var(--ink);
  background: rgba(229,72,77,.09); border: 1px solid rgba(229,72,77,.35);
  border-radius: 999px; padding: 6px 12px;
}
.admin-word-tag button { color: var(--danger); font-size: 15px; line-height: 1; padding: 0 2px; }

/* 减少动效：切换动效全部关闭 */
@media (prefers-reduced-motion: reduce) {
  .view-active { animation: none; }
  .rise-in { animation: none; opacity: 1; transform: none; }
  .nav-tab.active svg { animation: none; }
}

/* ---------- 日记农历小字（列表组头/详情/编辑器接入） ---------- */
.day-title { display: flex; align-items: baseline; justify-content: space-between; }
.day-lunar {
  font-size: 10.5px; font-weight: 400; color: var(--ink-soft);
  letter-spacing: .5px; white-space: nowrap; padding-right: 2px;
}
.day-lunar.fest, .detail-lunar.fest, .date-lunar-s.fest { color: var(--sel); font-weight: 600; }
.detail-lunar {
  font-size: 11px; font-weight: 400; color: var(--ink-soft);
  margin-left: 10px; letter-spacing: .5px; white-space: nowrap;
}
.date-lunar-s {
  font-size: 11px; font-weight: 400; color: var(--ink-soft); letter-spacing: .3px;
}

/* ---------- 评论折叠 + 全部回复底部面板 ---------- */
.cmt-more-replies {
  display: block; text-align: left;
  margin-top: 8px; padding: 4px 2px;
  font-size: 12px; font-weight: 600; color: var(--accent);
}
.cmt-more-replies:active { opacity: .7; }
.replies-sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 96;
  height: min(66vh, 560px);
  display: flex; flex-direction: column;
  background: var(--dlg-bg);
  -webkit-backdrop-filter: var(--dlg-blur); backdrop-filter: var(--dlg-blur);
  box-shadow: var(--dlg-shadow), var(--dlg-border);
  border-radius: 22px 22px 0 0;
  animation: sheet-up .32s cubic-bezier(.34,1.4,.44,1);
}
.replies-sheet.hidden { display: none; }
.replies-sheet-head {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px 10px; border-bottom: 1px solid var(--line-soft);
}
.replies-sheet-bar { flex: none; width: 4px; height: 17px; background: var(--accent); border-radius: 2px; }
.replies-sheet-title { flex: 1; font-size: 15px; font-weight: 800; color: var(--ink); }
.replies-close {
  flex: none; width: 30px; height: 30px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; color: var(--ink-soft);
}
.replies-close svg { width: 15px; height: 15px; }
.replies-close:active { background: rgba(0,0,0,.06); }
.replies-list { flex: 1; overflow-y: auto; padding: 10px 14px; }
.replies-input-bar {
  display: flex; align-items: center; gap: 9px;
  padding: 10px 14px calc(10px + var(--safe-bottom));
  border-top: 1px solid var(--line-soft);
}
.replies-input-bar input {
  flex: 1; min-width: 0; font-size: 13.5px;
  background: rgba(0,0,0,.035); border: none; border-radius: 17px;
  padding: 9px 14px; color: var(--ink); outline: none;
}
body.dark .replies-input-bar input { background: rgba(255,255,255,.07); }
.replies-input-bar input:focus { box-shadow: inset 0 0 0 1.5px var(--accent); }
