:root {
  --primary: #ff8fab;
  --primary-soft: #ffd6e0;
  --primary-deep: #f06b93;
  --bg: #fff7f9;
  --card: #ffffff;
  --text: #4a3b40;
  --text-soft: #9b8a90;
  --border: #ffe3ea;
  --shadow: 0 6px 24px rgba(240, 107, 147, 0.10);
  --radius: 18px;
  --tabbar-h: 62px;
  /* 手写字体（本地内嵌，SIL OFL）：霞鹜文楷，用于「关于我们」「日记正文」「祝福语」。
     回退链保证字体未加载完或缺字时仍有可读字体 */
  --font-hand: "LXGW WenKai", -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}

body { padding: env(safe-area-inset-top) 0 0; }

#app {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ===== 顶部栏 ===== */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 16px;
  background: rgba(255, 247, 249, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.topbar-title {
  margin: 0;
  flex: 1;
  font-size: 17px;
  font-weight: 700;
  text-align: center;
  letter-spacing: 1px;
}
.topbar-actions { display: flex; gap: 8px; }
.iconbtn {
  border: none;
  background: transparent;
  font-size: 26px;
  line-height: 1;
  color: var(--primary-deep);
  cursor: pointer;
  padding: 0 8px;
}
/* 返回键图标：chevron 在 24 视窗内留白较多，按 40px 渲染才有合适视觉尺寸 */
#backBtn .ico { width: 40px; height: 40px; }

/* ===== 内容区 ===== */
/* 全局隐藏滚动条、保留滚动功能（Chrome/Safari/Edge/Firefox/IE 兼容） */
* { -ms-overflow-style: none; scrollbar-width: none; }
*::-webkit-scrollbar { width: 0; height: 0; display: none; }

.content {
  flex: 1;
  padding: 16px 16px calc(var(--tabbar-h) + 24px);
}

.page { animation: fadeIn .25s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px);} to { opacity: 1; transform: none;} }

/* ===== 底部 Tab ===== */
.tabbar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 10; /* 置于顶栏 z-index:20 之下，避免覆盖 header */
  display: flex;
  justify-content: space-around;
  height: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
  box-shadow: 0 -4px 20px rgba(240, 107, 147, 0.06);
  transition: transform .3s ease;
}
/* PC 侧栏品牌区：默认隐藏（仅 PC 大屏显示） */
.sidebar-brand { display: none; }
/* 子页面：底栏从下方滑出隐藏；多移一段，确保凸出的 “+” 圆钮也完全移出视口 */
.tabbar.is-hidden { transform: translateY(calc(100% + 40px)); pointer-events: none; }
.tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  border: none;
  background: transparent;
  color: var(--text-soft);
  font-size: 11px;
  cursor: pointer;
  transition: color .2s;
}
.tab-icon { font-size: 22px; filter: grayscale(0.4); transition: .2s; }
.tab.active { color: var(--primary-deep); font-weight: 600; }
.tab.active .tab-icon { filter: none; transform: translateY(-1px) scale(1.08); }

/* ===== 卡片 ===== */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
  margin-bottom: 14px;
}
.card-title {
  font-size: 15px;
  font-weight: 700;
  margin: 0 0 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* 首页模块卡片网格 */
.module-grid { display: grid; gap: 12px; margin-bottom: 14px; }
.module-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.module-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.module-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px 10px;
  text-align: center;
  cursor: pointer;
  transition: transform .12s, box-shadow .15s;
}
.module-card:active { transform: scale(0.97); box-shadow: 0 3px 12px rgba(240,107,147,.18); }
.module-card .module-icon { font-size: 30px; margin-bottom: 8px; }
.module-card .module-title { font-size: 15px; font-weight: 700; color: var(--text); }
.module-card .module-sub { font-size: 11px; color: var(--text-soft); margin-top: 4px; }

/* 关于我们正文 */
.about-body { font-size: 14px; line-height: 1.8; color: var(--text); white-space: pre-wrap; }
/* 关于我们配图：置于正文末尾，与上方文字留出间距 */
.about-img { width: 100%; border-radius: 12px; margin-top: 12px; display: block; }
/* 关于本站：版本号与更新日志 */
.about-version { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.version-badge {
  font-size: 13px; font-weight: 700; color: #fff; background: var(--primary);
  padding: 3px 10px; border-radius: 999px; letter-spacing: 0.5px;
}
.version-date { font-size: 12px; color: var(--text-soft); }
.changelog-group { margin-bottom: 12px; }
.changelog-group:last-child { margin-bottom: 0; }
.changelog-label { font-size: 13px; font-weight: 700; color: var(--primary-deep); margin-bottom: 6px; }
.changelog-list { margin: 0; padding-left: 18px; font-size: 13px; line-height: 1.8; color: var(--text); }
.changelog-list li { margin-bottom: 4px; }
.changelog-list li:last-child { margin-bottom: 0; }
/* 支持开发者：赞赏码居中展示，点击可放大 */
.reward-qr {
  display: block; width: 100%; max-width: 240px; margin: 12px auto 0;
  border-radius: 12px; border: 1px solid var(--border); cursor: pointer;
}
.reward-qr-full { display: block; width: 100%; max-width: 320px; margin: 0 auto; border-radius: 12px; }
/* 关于我们卡片：内容过长时在卡片内滚动，避免把整页撑长（标题已移至顶栏，卡内不再有标题行）。
   滚动条沿用全站隐藏规则（保留滚动能力、不显示滚动条）。
   底部间距交给外层容器即可（展示页 40px、站内页 86px 含底部导航预留），卡片自身不再叠加 */
.about-card {
  max-height: 60vh;
  overflow-y: auto;
}

/* ===== 情侣聊天内嵌视图 =====
   用绝对定位而不是 height:100% —— .content 的高度由 flex 算出（非显式 height），
   百分比高度在这种链路上不可靠，会塌成很小一块（实测踩过）。 */
.content.chat-mode { padding: 0; overflow: hidden; position: relative; }

/* ===== 就地编辑面板：盖在当前页之上，不跳路由 =====
   层级：tabbar 10 < topbar 20 < 本面板 70 < 二级弹窗 100 < 日期选择器 110/120 < toast 200 */
#sheetRoot {
  position: fixed; inset: 0;
  z-index: 70;
  display: none;
  flex-direction: column;
  background: var(--bg);
}
#sheetRoot.open { display: flex; }
.sheet-head {
  flex: none;
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px;
  background: #fff;
  border-bottom: 1px solid var(--border);
}
.sheet-close {
  order: -1;
  border: none; background: transparent; cursor: pointer;
  font-size: 26px; line-height: 1; color: var(--text-soft);
  padding: 0 4px;
}
.sheet-title { font-size: 16px; font-weight: 600; color: var(--text); }
.sheet-body {
  flex: 1; min-height: 0;
  overflow-y: auto;
  padding: 16px 16px calc(var(--tabbar-h) + 24px);
}
/* 面板里的表单不需要再播一次页面入场动画 */
.sheet-body .page { animation: none; }

/* 列表页顶部的「＋ 新建」条 */
.page-add-bar { display: flex; justify-content: flex-end; margin-bottom: 12px; }

@media (min-width: 1024px) {
  /* PC 端底栏是左侧边栏，面板让开它；底部也不用给 tabbar 留空 */
  #sheetRoot { left: var(--sidebar-w); }
  .sheet-body { padding-bottom: 40px; }
}

/* ⚠️ 内嵌 iframe 必须给底部导航「让位」：
   .tabbar 是 position:fixed 的浮层（不占文档流），普通页面靠 .content 的
   padding-bottom 让位；而 .chat-mode 把 padding 清成了 0，所以这里得自己留。
   漏掉的后果：iframe 铺到屏幕最底，聊天页自己的输入框正好被底栏整个盖住
   —— 表现是「即时聊天找不到输入的地方」，实测踩过。 */
.chat-embed {
  position: absolute; top: 0; left: 0; right: 0;
  bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
}
.chat-frame { display: block; width: 100%; height: 100%; border: 0; background: #fff; }

/* PC 端（≥1024px）底栏重排为左侧固定边栏，底部不再需要让位 */
@media (min-width: 1024px) {
  .chat-embed { bottom: 0; }
}

/* 关于我们站内页：卡片高度撑满内容区可视高度，上下间距由 .content 的内边距提供。
   父级 .content 是 flex item（高度确定），故 height:100% 可用；min-height:0 让卡片能收缩，
   配合 overflow 使长文在卡片内滚动而不是把整页撑长 */
.page-fill { height: 100%; display: flex; flex-direction: column; }
.page-fill .about-card { flex: 1; min-height: 0; max-height: none; }

/* ===== Markdown 富文本排版（关于我们 / 日记正文共用 .md-body） ===== */
/* 必须覆盖 .about-body / .sp-text 的 pre-wrap：marked 输出的 HTML 自带换行缩进，
   若继续 pre-wrap 会把源码空白渲染成额外空行 */
/* 富文本字体：霞鹜文楷（「关于我们」与「日记正文」共用）。
   字体按 unicode-range 分片加载，实际只会请求页面上用到的分片 */
.md-body {
  white-space: normal;
  word-break: break-word;
  font-family: var(--font-hand);
}
.md-body > *:first-child { margin-top: 0; }
.md-body > *:last-child { margin-bottom: 0; }
.md-body p { margin: 0 0 10px; }
.md-body h1, .md-body h2, .md-body h3, .md-body h4, .md-body h5, .md-body h6 {
  margin: 16px 0 8px; line-height: 1.4; font-weight: 700; color: var(--text);
}
.md-body h1 { font-size: 20px; }
.md-body h2 { font-size: 18px; }
.md-body h3 { font-size: 16px; }
.md-body h4, .md-body h5, .md-body h6 { font-size: 15px; }
.md-body ul, .md-body ol { margin: 0 0 10px; padding-left: 22px; }
.md-body li { margin: 4px 0; }
.md-body li > ul, .md-body li > ol { margin: 4px 0 0; }
.md-body blockquote {
  margin: 0 0 10px; padding: 6px 12px; border-left: 3px solid var(--primary);
  background: rgba(255, 143, 171, 0.08); border-radius: 0 8px 8px 0; color: var(--text-soft);
}
.md-body code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.92em;
  background: rgba(0, 0, 0, 0.06); padding: 1px 5px; border-radius: 5px;
}
.md-body pre { margin: 0 0 10px; padding: 10px 12px; overflow-x: auto; background: rgba(0, 0, 0, 0.06); border-radius: 10px; }
.md-body pre code { background: none; padding: 0; }
.md-body a { color: var(--primary-deep); text-decoration: underline; word-break: break-all; }
.md-body img { max-width: 100%; height: auto; border-radius: 10px; display: block; margin: 8px 0; }
.md-body hr { border: none; border-top: 1px solid var(--border); margin: 16px 0; }
.md-body table { display: block; width: 100%; border-collapse: collapse; margin: 0 0 10px; font-size: 13px; overflow-x: auto; }
.md-body th, .md-body td { border: 1px solid var(--border); padding: 6px 10px; text-align: left; }
.md-body th { background: var(--bg); font-weight: 600; }
/* GFM 任务列表：勾选框仅作展示，负边距抵消 ul 的左内边距 */
.md-body li.task-list-item { list-style: none; margin-left: -20px; }
.md-body input[type="checkbox"] { margin-right: 6px; vertical-align: middle; accent-color: var(--primary); }

/* __ABOUT_PATCH__ 关于我们页底部编辑入口（展示页直接进编辑） */
.about-edit-bar { flex: none; padding-top: 12px; display: flex; justify-content: center; }
.about-edit-bar .btn { min-width: 150px; }
/* __ABOUT_PATCH__ 关于我们编辑页：插入结构模板 */
.about-edit-hint { display: flex; align-items: center; gap: 10px; margin-top: 2px; flex-wrap: wrap; }
.about-edit-hint .upload-hint { margin-top: 0; }
/* __ABOUT_PATCH__ 关于我们正文编辑框：够高 + 用霞鹜文楷（与展示页同字体）。
   注意别用 .tip 包长文本 —— .tip 是问号圆圈的样式，长句会被挤成竖排 */
#aboutUs { min-height: 260px; font-family: var(--font-hand); font-size: 14.5px; line-height: 1.8; }

/* 关于我们图片上传 */
.about-img-box { margin-top: 8px; padding: 10px; border: 1px dashed var(--border); border-radius: 12px; background: var(--bg); text-align: center; }
.about-img-box img { max-width: 100%; max-height: 220px; border-radius: 10px; }
.about-img-actions { display: flex; gap: 10px; margin-top: 8px; }

/* ===== 首页 hero ===== */
.hero {
  position: relative;
  border-radius: var(--radius);
  padding: 28px 20px;
  color: #fff;
  background: linear-gradient(135deg, #ff8fab, #ffb3c6 55%, #ffc9d5);
  box-shadow: 0 10px 30px rgba(240, 107, 147, 0.25);
  margin-bottom: 16px;
  text-align: center;
}
.hero .couple { font-size: 18px; font-weight: 700; letter-spacing: 2px; }
.hero .days { margin: 8px 0 2px; }
.hero .days .love-main {
  font-size: 46px;
  font-weight: 800;
  line-height: 1.15;
}
.hero .days .love-sub {
  font-size: 17px;
  font-weight: 600;
  opacity: 0.92;
  margin-top: 4px;
  letter-spacing: 1px;
}
/* 首页未设置「在一起的日子」时的引导态（点击直达设置） */
.hero .days.days-empty { cursor: pointer; }
.hero .days.days-empty .love-main { font-size: 19px; font-weight: 700; line-height: 1.4; }
.hero .days.days-empty .love-sub {
  font-size: 13px; font-weight: 600; opacity: 0.85;
  text-decoration: underline; text-underline-offset: 3px;
}
.hero .days.days-empty:active { opacity: 0.7; }
.hero .quote {
  margin-top: 10px;
  font-size: 14px;
  opacity: 0.95;
  font-style: italic;
}
/* 特殊纪念横幅 */
.hero .love-banner {
  margin-top: 12px;
  padding: 10px 14px;
  border-radius: 14px;
  background: rgba(255,255,255,0.25);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.5px;
  animation: fadeIn .3s ease;
}

/* 情侣头像+爱心组合 */
.couple-avatars {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 46px;
  margin: 4px 0 18px;
}
/* 首页头像区兼作展示页入口，手型提示可点击 */
.couple-avatars[data-showcase] { cursor: pointer; }
.couple-avatars .fl-left, .couple-avatars .fl-right {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.couple-avatars .arco-avatar {
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid #fff;
  box-shadow: var(--shadow);
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
}
/* emoji 头像：三种头像值（照片 / 聊天贴图 / emoji）共用一套容器 */
.arco-avatar-image { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; }
.av-emoji { font-size: 1em; line-height: 1; }
.partner-avatar .av-emoji { font-size: 30px; }
.feed-avatar .av-emoji { font-size: 20px; }
.avatar-preview .av-emoji { font-size: 84px; }
.avatar-emoji-row { display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px; margin-top: 6px; }
.emoji-opt {
  border: 2px solid transparent; background: var(--bg); border-radius: 12px;
  font-size: 22px; line-height: 1; padding: 6px 0; cursor: pointer;
}
.emoji-opt.active { border-color: var(--primary); background: var(--primary-soft); }
.couple-avatars .arco-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.couple-avatars .arco-avatar svg { width: 100%; height: 100%; }
.couple-avatars .avatar-name { font-size: 14px; font-weight: 600; color: var(--text); }
.couple-avatars .heart {
  width: 40px; height: 40px;
  margin-bottom: 34px;
  position: relative;
  background: var(--primary);
  transform: rotate(45deg);
  animation: heartbeat 1.6s ease-in-out infinite;
}
@keyframes heartbeat {
  0%, 100% { transform: rotate(45deg) scale(1); }
  50% { transform: rotate(45deg) scale(1.18); }
}
.couple-avatars .heart::before, .couple-avatars .heart::after {
  content: "";
  position: absolute;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--primary);
}
.couple-avatars .heart::before { top: -20px; left: 0; }
.couple-avatars .heart::after { left: -20px; top: 0; }

/* 倒计时 */
.countdown-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.count-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, #ffffff, var(--primary-soft));
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px;
  text-align: left;
}
.count-item .count-img { width: 48px; height: 48px; border-radius: 10px; object-fit: cover; flex-shrink: 0; border: 2px solid var(--border); }
.count-item.soon .count-img { border-color: rgba(255,255,255,.7); }
.count-item .count-body { flex: 1; min-width: 0; }
/* 倒计时条目：事件名在上（主信息：大字加粗主题色），时间提示在下（次信息：小字灰色） */
.count-item .c { font-size: 13px; font-weight: 700; color: var(--primary-deep); word-break: break-all; }
.count-item .count-line { font-size: 12px; color: var(--text-soft); margin-top: 3px; }
.count-item.soon { background: linear-gradient(135deg, #ff8fab, #f06b93); color: #fff; }
.count-item.soon .count-line, .count-item.soon .c { color: #fff; }
.count-item.soon .count-line.past { color: rgba(255,255,255,.85); }

/* ===== 分段页签（时光相册：照片集 / 动态）===== */
.seg-tabs {
  display: flex; gap: 4px; padding: 4px; margin-bottom: 14px;
  background: #fff; border: 1px solid var(--border); border-radius: 999px;
}
.seg-tab {
  flex: 1; text-align: center; padding: 8px 0; border-radius: 999px;
  font-size: 14px; font-weight: 600; color: var(--text-soft);
  cursor: pointer; user-select: none; transition: background .18s, color .18s;
}
.seg-tab.active { background: var(--primary); color: #fff; }

/* ===== 动态（原「朋友圈」，并入时光相册）===== */
.feed-bar { display: flex; justify-content: flex-end; margin-bottom: 12px; }
.feed-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px; margin-bottom: 12px;
}
.feed-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.feed-avatar {
  width: 38px; height: 38px; border-radius: 50%; overflow: hidden; flex: none;
  background: var(--primary-soft); display: flex; align-items: center; justify-content: center;
}
.feed-avatar img, .feed-avatar svg { width: 100%; height: 100%; object-fit: cover; display: block; }
.feed-meta { flex: 1; min-width: 0; }
.feed-name { font-size: 14px; font-weight: 600; color: var(--text); }
.feed-time { font-size: 11px; color: var(--text-soft); margin-top: 2px; }
/* 相册卡片上的「＋ 加照片」 */
.album-add-btn {
  width: 100%; margin-top: 8px; padding: 9px 0;
  border: 1px dashed var(--primary); border-radius: 10px;
  background: var(--primary-soft); color: var(--primary-deep);
  font-size: 13px; font-weight: 600; cursor: pointer;
}
.album-add-btn:active { opacity: .7; }
/* 看大图时的「＋ 加照片」（左上角，右上角是关闭） */
.viewer-add {
  position: absolute; top: 14px; left: 14px;
  padding: 8px 14px; border-radius: 999px; border: none;
  background: rgba(255,255,255,0.15); color: #fff;
  font-size: 13px; cursor: pointer; z-index: 2;
}
.viewer-add:active { background: rgba(255,255,255,0.28); }
.feed-del, .feed-edit {
  border: none; background: transparent; color: var(--text-soft);
  font-size: 15px; cursor: pointer; padding: 4px 6px; border-radius: 8px; flex: none;
}
.feed-del:active, .feed-edit:active { background: var(--primary-soft); }
.feed-edit svg { width: 16px; height: 16px; display: block; }
.feed-title { font-size: 15px; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.feed-body { font-size: 14px; line-height: 1.75; color: var(--text); white-space: pre-wrap; word-break: break-word; }
/* 图片九宫格：1 张给大图，2~4 张两列，5 张以上三列 */
.feed-media { display: grid; gap: 4px; margin-top: 10px; }
.feed-media.n1 { grid-template-columns: 1fr; }
.feed-media.n2, .feed-media.n3, .feed-media.n4 { grid-template-columns: repeat(2, 1fr); }
.feed-media.n5, .feed-media.n6, .feed-media.n7, .feed-media.n8, .feed-media.n9 { grid-template-columns: repeat(3, 1fr); }
.feed-cell {
  position: relative; overflow: hidden; border-radius: 10px;
  background: var(--primary-soft); cursor: pointer;
  aspect-ratio: 1 / 1;
}
.feed-media.n1 .feed-cell { aspect-ratio: 4 / 3; }
.feed-cell img { width: 100%; height: 100%; object-fit: cover; display: block; }
.feed-acts { display: flex; gap: 6px; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--border); }
.feed-act {
  border: none; background: transparent; font-size: 13px;
  color: var(--text-soft); cursor: pointer; padding: 5px 9px; border-radius: 9px;
}
.feed-act:active { background: var(--primary-soft); }
.feed-act.on { color: var(--primary-deep); font-weight: 600; }
.feed-likes {
  margin-top: 10px; padding: 8px 10px; border-radius: 10px;
  background: var(--primary-soft); color: var(--primary-deep);
  font-size: 12px; line-height: 1.6;
}
.feed-comments { margin-top: 8px; display: flex; flex-direction: column; gap: 6px; }
.feed-cmt { font-size: 13px; line-height: 1.6; color: var(--text); word-break: break-word; }
.feed-cmt b { color: var(--primary-deep); font-weight: 600; }
.feed-cmt-input { display: flex; gap: 8px; margin-top: 10px; }
.feed-cmt-input input {
  flex: 1; min-width: 0; padding: 9px 12px; font-size: 13px; font-family: inherit;
  border: 1px solid var(--border); border-radius: 10px; background: #fff;
  color: var(--text); outline: none;
}
.feed-cmt-input input:focus { border-color: var(--primary); }
.feed-cmt-input button {
  flex: none; border: none; background: var(--primary); color: #fff;
  border-radius: 10px; padding: 0 15px; font-size: 13px; font-weight: 600; cursor: pointer;
}
.feed-cmt-input button:active { opacity: .8; }
/* 发布弹窗里的图片选择 */
.feed-edit-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.feed-edit-cell {
  position: relative; aspect-ratio: 1 / 1; border-radius: 10px;
  overflow: hidden; background: var(--primary-soft);
}
.feed-edit-cell img { width: 100%; height: 100%; object-fit: cover; display: block; }
.feed-edit-del {
  position: absolute; top: 4px; right: 4px; width: 20px; height: 20px;
  border: none; border-radius: 50%; background: rgba(0,0,0,.55); color: #fff;
  font-size: 11px; line-height: 1; cursor: pointer; display: flex;
  align-items: center; justify-content: center;
}
.feed-edit-add {
  aspect-ratio: 1 / 1; border: 1px dashed var(--border); border-radius: 10px;
  background: #fff; color: var(--primary-deep); font-size: 22px; cursor: pointer;
}
.feed-edit-add:active { background: var(--primary-soft); }

/* ===== 首页纪念日专区 ===== */
.cd-home-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; margin-bottom: 10px;
}
.cd-home-title { font-size: 15px; font-weight: 700; color: var(--primary-deep); }
.cd-home-actions { display: flex; align-items: center; gap: 6px; }
.cd-add-btn, .cd-more-btn {
  border: 1px solid var(--border); background: #fff; color: var(--primary-deep);
  font-size: 12px; font-weight: 600; padding: 5px 11px;
  border-radius: 999px; cursor: pointer; white-space: nowrap;
}
.cd-add-btn { background: var(--primary-soft); border-color: transparent; }
.cd-add-btn:active, .cd-more-btn:active { opacity: .65; }
/* 还没添加任何纪念日时的引导（整块可点 → 打开添加弹窗） */
.cd-empty { text-align: center; padding: 18px 10px; cursor: pointer; border-radius: 12px; }
.cd-empty:active { background: var(--primary-soft); }
.cd-empty-title { font-size: 14px; font-weight: 700; color: var(--primary-deep); }
.cd-empty-sub { font-size: 12px; color: var(--text-soft); margin-top: 5px; line-height: 1.6; }
/* 首页条目可点（编辑入口）：光标 + 按压反馈 + 右侧铅笔 */
.cd-home-card .count-item.cd-clickable { cursor: pointer; }
.cd-home-card .count-item.cd-clickable:active { transform: scale(.985); }
.count-edit { flex: none; font-size: 14px; color: var(--text-soft); opacity: .5; margin-left: 4px; }
.count-item.soon .count-edit { color: #fff; opacity: .85; }
.cd-home-hint { margin-top: 10px; text-align: center; font-size: 11px; color: var(--text-soft); opacity: .7; }

/* 「每年」小标记 */
.cd-tag {
  display: inline-block; margin-left: 6px; vertical-align: middle;
  font-size: 10px; font-weight: 600; padding: 1px 6px;
  border-radius: 999px; background: var(--primary-soft); color: var(--primary-deep);
}
/* 弹窗里的「每年重复」开关行 */
.cd-repeat {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-top: 12px; padding: 10px 12px;
  background: var(--primary-soft); border-radius: 12px;
}
.cd-repeat-title { font-size: 13px; font-weight: 600; color: var(--primary-deep); }
.cd-repeat-sub { font-size: 11px; color: var(--text-soft); margin-top: 3px; line-height: 1.5; }
/* 注意：既有的开关样式选择器是 `.field label.hk-switch`（限定在 .field 内），
   这里的开关不在 .field 里，必须补一条，否则 label 退回 inline → 开关错位溢出容器 */
.cd-repeat .hk-switch {
  display: inline-flex; align-items: center; gap: 8px;
  flex: none; cursor: pointer; user-select: none;
}

/* 留言板 */
.msg-list { display: flex; flex-direction: column; gap: 12px; }
.msg {
  padding: 14px 16px;
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  font-size: 14px;
}
.msg-head-row { display: flex; align-items: flex-start; gap: 10px; }
.msg-avatar { flex: none; width: 36px; height: 36px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: #fff; font-size: 16px; font-weight: 700; }
.msg-body-wrap { flex: 1; min-width: 0; }
.msg .msg-meta { font-size: 12px; color: var(--text-soft); margin-top: 6px; display: flex; justify-content: space-between; }

/* 祝福墙（blessing 风） */
.blessing-count { text-align: center; font-size: 13px; color: var(--text-soft); margin-bottom: 14px; }
.blessing-count b { color: var(--primary); font-size: 16px; }
.msg .msg-head { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.msg .msg-author { font-weight: 600; color: var(--text); }
.msg .msg-time { font-size: 12px; color: var(--text-soft); }
/* 祝福语正文：与日记正文同字体（霞鹜文楷） */
.msg .msg-body { line-height: 1.6; font-family: var(--font-hand); }
.blessing-pager { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; margin: 14px 0; }
/* 祝福页底部为小鱼特效预留空间，避免遮挡内容 */
.page-blessing { padding-bottom: calc(var(--tabbar-h) + 24px + 150px); }
/* 祝福页顶部头像区：比展示页更紧凑 */
.page-blessing .showcase-avatars { gap: 60px; margin: 6px 0 18px; }

/* 约定 */
.promise-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  margin-bottom: 10px;
  transition: border-color .15s, box-shadow .15s;
}
.promise-item[data-edit-item] { cursor: pointer; }
.promise-item[data-edit-item]:hover { border-color: var(--primary); box-shadow: 0 4px 14px rgba(240,107,147,.08); }
.promise-item .tick {
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 2px solid var(--primary);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 13px; color: var(--primary); flex: none;
  cursor: pointer;
}
.promise-item.done .tick { background: var(--primary); color: #fff; }
.promise-item.done .promise-text { text-decoration: line-through; color: var(--text-soft); }
.promise-item .promise-text { flex: 1; }
.promise-item .promise-creator { font-size: 12px; color: var(--text-soft); }
.promise-item .promise-done-meta {
  width: 100%;
  margin-top: 4px;
  font-size: 12px;
  color: var(--text-soft);
  text-align: right;
}

/* ===== 按钮 ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: none;
  border-radius: 14px;
  padding: 12px 18px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: transform .12s, opacity .2s;
  font-family: inherit;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: linear-gradient(135deg, #ff8fab, #f06b93); color: #fff; box-shadow: 0 6px 16px rgba(240,107,147,.28); }
.btn-ghost { background: #fff; color: var(--primary-deep); border: 1px solid var(--primary); }
/* 锁定态：不用 disabled 属性（会吞掉 click 导致无法提示），仅降透明度，点击时由 JS 弹出原因 */
.btn.is-locked { opacity: .5; }
.btn-block { width: 100%; }
.btn-sm { padding: 7px 12px; font-size: 13px; border-radius: 10px; }
/* 衣柜三视图处理按钮：三等分窄按钮，忙碌文案（识别中…/出图 95%）禁止换行 */
.wAIExec { white-space: nowrap; }

.fab {
  position: fixed;
  right: 18px;
  bottom: calc(var(--tabbar-h) + 24px);
  z-index: 25;
  width: 54px; height: 54px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, #ff8fab, #f06b93);
  color: #fff;
  font-size: 28px;
  box-shadow: 0 8px 22px rgba(240, 107, 147, 0.36);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
/* 祝福公开页右下角写信按钮 */
.bless-fab {
  position: fixed;
  right: 20px;
  bottom: 160px;
  z-index: 40;
  width: 52px; height: 52px;
  border-radius: 50%;
  border: none;
  background: #fff;
  box-shadow: 0 6px 18px rgba(0,0,0,0.15);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: transform .12s;
}
.bless-fab:hover { transform: scale(1.06); }
.count-hint { font-size: 12px; color: var(--text-soft); text-align: right; margin-top: 4px; }
.bless-textarea { min-height: 96px; }
.bless-tip { font-size: 12px; color: var(--text-soft); text-align: center; margin-top: 10px; line-height: 1.5; }

/* ===== 表单 ===== */
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; color: var(--text-soft); margin-bottom: 6px; }
.field-label-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.field-label-row label { margin-bottom: 0; }
.ai-polish-btn { padding: 0; display: inline-flex; align-items: center; color: var(--primary); }
.ai-polish-btn svg { width: 20px; height: 20px; pointer-events: none; fill: currentColor; }
/* 模型名获取列表按钮与浮层 */
.model-field { position: relative; }
.model-row { display: flex; gap: 8px; align-items: center; }
.model-row input { flex: 1; }
.model-fetch-btn { color: var(--primary); flex: none; }
.model-fetch-btn svg { width: 20px; height: 20px; }
.model-fetch-btn:disabled { opacity: .5; }
.model-dd {
  display: none;
  position: absolute;
  left: 0; right: 0;
  top: calc(100% - 14px);
  z-index: 30;
  background: var(--card, #fff);
  border: 1px solid var(--border, #ffe3ea);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(240, 107, 147, .15);
  max-height: 220px;
  overflow-y: auto;
}
.model-dd.on { display: block; }
.model-dd .dd-opt { padding: 10px 14px; font-size: 13px; color: var(--text, #4a3b40); cursor: pointer; }
.model-dd .dd-opt:hover { background: var(--bg, #fff7f9); color: var(--primary-deep, #f06b93); }
.ai-polish-btn:disabled { opacity: .5; cursor: not-allowed; }
.field-maskable { position: relative; }
.ai-polish-mask {
  position: absolute; inset: 0; z-index: 5; display: none;
  flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  background: rgba(255, 255, 255, .78); border-radius: 12px;
  font-size: 13px; color: #888;
}
.ai-polish-mask.on { display: flex; }
.ai-polish-mask .spinner {
  width: 22px; height: 22px; border-radius: 50%;
  border: 2px solid #e0b3f0; border-top-color: transparent;
  animation: aiSpin .8s linear infinite;
}
@keyframes aiSpin { to { transform: rotate(360deg); } }
.tip {
  position: relative; display: inline-block; margin-left: 5px;
  width: 14px; height: 14px; line-height: 14px; text-align: center;
  font-size: 10px; color: #fff; background: var(--primary); border-radius: 50%;
  cursor: help; vertical-align: 1px;
}
.tip::after {
  content: attr(data-tip); position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%) translateY(4px);
  width: max-content; max-width: 220px; padding: 7px 10px; border-radius: 8px;
  background: rgba(40, 40, 50, .92); color: #fff; font-size: 12px; line-height: 1.5; font-weight: normal;
  white-space: normal; box-shadow: 0 4px 12px rgba(0,0,0,.18); opacity: 0; pointer-events: none; transition: opacity .15s, transform .15s; z-index: 20;
}
.tip:hover::after { opacity: 1; transform: translateX(-50%) translateY(0); }
.tip::before {
  content: ""; position: absolute; bottom: calc(100% + 2px); left: 50%; transform: translateX(-50%);
  border: 5px solid transparent; border-top-color: rgba(40,40,50,.92); opacity: 0; transition: opacity .15s; pointer-events: none; z-index: 20;
}
.tip:hover::before { opacity: 1; }

/* 一言自动获取开关 */
.field label.hk-switch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 13px; color: var(--text); user-select: none; margin-bottom: 8px; }
.hk-switch input { display: none; }
.hk-switch .sw { position: relative; width: 40px; height: 22px; border-radius: 999px; background: #d5d5dc; transition: background .2s; flex: none; }
.hk-switch .sw::after { content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: left .2s; box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.hk-switch input:checked + .sw { background: var(--primary); }
.hk-switch input:checked + .sw::after { left: 20px; }
.hk-switch .hk-switch-label { color: var(--text); }
.hk-switch #hkSwitchText { color: var(--text-soft); font-size: 12px; }
.hk-types { margin-top: 10px; margin-bottom: 6px; }
.hk-types .chip { font-size: 12px; padding: 6px 11px; }
.field input, .field textarea, .field select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  font-size: 15px;
  font-family: inherit;
  color: var(--text);
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.field input:focus, .field textarea:focus, .field select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(255, 143, 171, 0.14);
}
.field textarea { min-height: 100px; resize: vertical; }

/* 多个表单控件同行显示（如衣柜的大类/小类/材质） */
.field-row { display: flex; gap: 10px; }
.field-row .field { flex: 1; min-width: 0; }

/* 自定义下拉组件：按钮 + 浮层选项列表（替代原生 select，风格与应用一致） */
.dd { position: relative; }
.dd-btn {
  width: 100%;
  display: flex; align-items: center; justify-content: space-between; gap: 6px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  font-size: 15px;
  font-family: inherit;
  color: var(--text);
  cursor: pointer;
  text-align: left;
}
.dd-txt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dd-arrow {
  flex: none; width: 8px; height: 8px; margin-right: 4px;
  border-right: 2px solid var(--text-soft); border-bottom: 2px solid var(--text-soft);
  transform: rotate(45deg) translateY(-2px);
  transition: transform .2s;
}
.dd.dd-open .dd-arrow { transform: rotate(225deg) translateY(-1px); }
.dd-list {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 60;
  background: var(--card); border: 1px solid var(--border); border-radius: 12px;
  box-shadow: 0 10px 28px rgba(74, 59, 64, .14);
  padding: 6px; max-height: 242px; overflow-y: auto;
}
.dd-opt { padding: 10px 12px; border-radius: 8px; font-size: 15px; color: var(--text); cursor: pointer; }
.dd-opt:hover { background: var(--bg); }
.dd-opt.active { background: #ffeef4; font-weight: 600; }
.dd-opt.active::after { content: "✓"; float: right; color: var(--primary); }

/* 日期选择器（半 UI 风格） */
.dp { position: relative; }
.dp-input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  font-size: 15px;
  color: var(--text);
  cursor: pointer;
  transition: border-color .2s;
}
.dp-input:active { border-color: var(--primary); }
.dp-panel {
  position: absolute;
  top: calc(100% + 6px);
  left: 0; right: 0;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 12px;
  z-index: 120;
  /* 上下都放不下时（小屏 + 输入框在中部）内部滚动，保证不会被裁得看不全 */
  max-height: 62vh;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.dp-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.dp-title { font-size: 15px; font-weight: 700; }
.dp-nav { font-size: 20px; color: var(--text-soft); cursor: pointer; padding: 0 8px; user-select: none; }
.dp-nav:hover { color: var(--primary-deep); }
.dp-week { display: grid; grid-template-columns: repeat(7, 1fr); text-align: center; font-size: 11px; color: var(--text-soft); margin-bottom: 4px; }
.dp-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.dp-cell {
  height: 36px;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
  border-radius: 50%;
  cursor: pointer;
}
.dp-cell:hover { background: var(--primary-soft); }
.dp-cell.dp-empty { pointer-events: none; }
.dp-cell.dp-sel { background: var(--primary); color: #fff; font-weight: 700; }
.dp-mask { position: fixed; inset: 0; z-index: 110; }

/* 标签行 */
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  padding: 8px 14px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--border);
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
  transition: .15s;
}
.chip.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.chip-add { border-style: dashed; color: var(--text-soft); }

/* ===== 列表搜索框 ===== */
.list-search { position: relative; margin-bottom: 12px; }
.list-search .ls-icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); font-size: 14px; color: var(--text-soft); pointer-events: none; }
.list-search-input { width: 100%; padding: 11px 40px; border: 1px solid var(--border); border-radius: 12px; background: #fff; color: var(--text); font-size: 14px; font-family: inherit; outline: none; transition: border-color .2s, box-shadow .2s; }
.list-search-input::placeholder { color: var(--text-soft); }
.list-search-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(255,143,171,.14); }
.list-search-clear { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); visibility: hidden; width: 22px; height: 22px; border: none; border-radius: 50%; background: var(--bg); color: var(--text-soft); font-size: 14px; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; }

/* ===== 列表 ===== */
.list { display: flex; flex-direction: column; gap: 12px; }
.list-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  box-shadow: var(--shadow);
}
.list-item[data-edit-item] { cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.list-item[data-edit-item]:hover { border-color: var(--primary); box-shadow: 0 4px 14px rgba(240,107,147,.08); }
.list-item .li-title { font-weight: 700; font-size: 15px; margin-bottom: 4px; }
.list-item .li-sub { font-size: 13px; color: var(--text-soft); }
.list-item .li-footer { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; }
.list-item .li-main { display: flex; gap: 12px; align-items: center; }
.list-item .li-thumb { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; flex-shrink: 0; border: 1px solid var(--border); }

/* 倒计时事件弹窗：左侧单张图片上传区 */
.cd-img-row { display: flex; gap: 12px; align-items: flex-start; }
.cd-img-upload { width: 72px; height: 72px; border-radius: 10px; border: 1px dashed var(--border); background: var(--bg); display: flex; align-items: center; justify-content: center; cursor: pointer; overflow: hidden; flex-shrink: 0; }
.cd-img-upload:hover { border-color: var(--primary); }
.cd-img-upload img { width: 100%; height: 100%; object-fit: cover; }
.cd-img-add { font-size: 24px; color: var(--text-soft); line-height: 1; }

/* 心动值 / 委屈值（原「账目」样式，语义已换） */
.bill-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.bill-row:last-child { border-bottom: none; }
/* 条目卡片：更紧凑，条目间留间距 */
.list-item.bill-card { padding: 8px 14px; margin-bottom: 12px; }
.bill-card .bill-row { padding: 6px 0; border-bottom: none; }
.bill-icon {
  width: 42px; height: 42px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  background: var(--primary-soft);
  flex: none;
}
.bill-info { flex: 1; }
.bill-info .b-cat { font-weight: 600; font-size: 14px; }
.bill-info .b-note { font-size: 12px; color: var(--text-soft); margin-top: 2px; }
.bill-amount { font-weight: 700; font-size: 16px; }
/* 心动 = 粉，委屈 = 冷蓝 */
.bill-amount.heart { color: #ff5e78; }
.bill-amount.grievance { color: #8fa3bf; }

/* 统计 */
.wallet-balance {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 14px;
  text-align: center;
}
.wallet-balance .wb-label { font-size: 13px; color: var(--text-soft); }
.wallet-balance .wb-value { font-size: 30px; font-weight: 800; margin-top: 6px; }
.wallet-balance .wb-value.heart { color: #ff5e78; }
.wallet-balance .wb-value.grievance { color: #8fa3bf; }
.stat-row { display: flex; gap: 10px; margin-bottom: 14px; }
.stat-box { flex: 1; background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 14px; text-align: center; box-shadow: var(--shadow); }
.stat-box .s-v { font-size: 22px; font-weight: 800; }
.stat-box .s-v.heart { color: #ff5e78; }
.stat-box .s-v.grievance { color: #8fa3bf; }
.stat-box .s-l { font-size: 12px; color: var(--text-soft); margin-top: 4px; }

/* 心动值走势曲线 */
.bill-chart-card { margin-bottom: 12px; }
.bill-chart-chips { margin: 10px 0 6px; }
.bill-legend { display: flex; gap: 18px; justify-content: center; margin-bottom: 4px; font-size: 12px; color: var(--text-soft); }
.bill-legend .ic-legend { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 4px; vertical-align: 1px; }

/* 衣柜：按大类分组 */
.w-group { margin-bottom: 18px; }
.w-group-title { font-weight: 700; font-size: 15px; margin-bottom: 10px; padding-left: 8px; border-left: 3px solid var(--primary); }
/* 衣柜条目卡片：小屏 3 列，大屏由媒体查询调整列数 */
.w-item { width: calc(33.33% - 6px); cursor: pointer; }

/* ===== 穿搭搭配 ===== */
/* 衣柜页顶部搭配入口 */
.w-outfit-entry {
  display: flex; align-items: center; gap: 12px;
  background: linear-gradient(135deg, #fff0f4, #ffe3ec);
  border: 1px solid rgba(240, 107, 147, 0.3);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 12px;
  cursor: pointer;
  transition: .15s;
}
.w-outfit-entry:hover { border-color: var(--primary); box-shadow: var(--shadow); }
/* 搭配卡片：缩略图横排 */
.outfit-thumbs { display: flex; gap: 6px; margin: 10px 0 8px; flex-wrap: wrap; }
.outfit-thumbs img,
.outfit-thumbs .ot-empty {
  width: 54px; height: 68px; object-fit: cover;
  border-radius: 8px; border: 1px solid var(--border); display: block; background: var(--bg);
}
.outfit-thumbs .ot-empty { display: flex; align-items: center; justify-content: center; font-size: 22px; opacity: .45; }
/* 搭配编辑页：衣物选择格子（复用 w-item 的列宽逻辑） */
.opick { width: calc(33.33% - 6px); position: relative; cursor: pointer; border-radius: 12px; }
.opick img { width: 100%; aspect-ratio: 3/4; object-fit: cover; border-radius: 12px; border: 1.5px solid var(--border); display: block; }
.opick.active img { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(255, 143, 171, 0.35); }
.opick .opick-check {
  position: absolute; top: 6px; right: 6px;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--primary); color: #fff; font-size: 12px;
  display: none; align-items: center; justify-content: center;
}
.opick.active .opick-check { display: flex; }
/* 搭配卡片内操作按钮 */
.outfit-acts { display: flex; gap: 8px; justify-content: flex-end; margin-top: 8px; }

/* 衣柜三视图上传 */
.wphoto-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.wphoto-cell {
  position: relative;
  aspect-ratio: 3/4;
  border-radius: 12px;
  border: 1.5px dashed rgba(240, 107, 147, 0.45);
  background: rgba(255, 214, 224, 0.12);
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.wphoto-cell.active { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(255, 143, 171, 0.2); }
.wphoto-cell img { width: 100%; height: 100%; object-fit: cover; display: block; }
.wphoto-add { font-size: 34px; font-weight: 300; color: var(--primary-deep); }
/* 格子右上角移除图标 */
.wphoto-del {
  position: absolute;
  top: 4px; right: 4px;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 14px;
  line-height: 20px;
  text-align: center;
  z-index: 2;
}
.wphoto-label {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 3px 0;
  font-size: 11px;
  text-align: center;
  background: rgba(255, 255, 255, 0.9);
  color: var(--text-soft);
}

/* 相册封面九宫格 */
/* 列表封面：一本相册只露一张（点击进详情看全部） */
.album-card { cursor: pointer; }
.album-cover {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 10px;
}
.album-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.album-cover-empty { border-style: dashed; }
.album-cover-ph { color: var(--text-soft); font-size: 13px; }
.album-cover-count {
  position: absolute; right: 8px; bottom: 8px;
  background: rgba(0, 0, 0, .55); color: #fff;
  font-size: 12px; padding: 2px 9px; border-radius: 999px;
}
.album-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-bottom: 10px;
}
.album-grid.detail { margin-top: 4px; }
.album-cell {
  position: relative;
  aspect-ratio: 1;
  border-radius: 8px;
  overflow: hidden;
  background: var(--bg);
  border: 1px solid var(--border);
}
.album-cell img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* 照片上的小标题（详情页网格） */
.album-cell .album-cap {
  position: absolute; left: 0; right: 0; bottom: 0;
  background: linear-gradient(transparent, rgba(0, 0, 0, .62));
  color: #fff; font-size: 11px; line-height: 1.35;
  padding: 14px 6px 4px; pointer-events: none;
  overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.album-cap-edit {
  position: absolute; right: 4px; top: 4px;
  border: none; background: rgba(0, 0, 0, .5); color: #fff;
  border-radius: 8px; font-size: 11px; padding: 2px 6px; cursor: pointer; line-height: 1.2;
}
/* 大图里的标题行 + 评论面板 */
.vc-bar {
  position: absolute; left: 0; right: 0; top: 62px;
  display: flex; align-items: center; gap: 10px; padding: 0 16px;
}
.vc-bar { z-index: 6; }   /* 浮在照片上层 */
.vc-title {
  flex: none; max-width: 100%;
  color: #fff; font-size: 13px;
  /* 胶囊底 + 毛玻璃：压在任意照片上都读得清（原来只有浅浅一层阴影，白字压浅色就糊了） */
  background: rgba(0, 0, 0, .45);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  padding: 4px 12px; border-radius: 999px;
  text-shadow: 0 1px 6px rgba(0, 0, 0, .8);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.vc-open {
  border: none; background: rgba(255, 255, 255, .18); color: #fff;
  border-radius: 999px; padding: 6px 14px; font-size: 13px; cursor: pointer; flex: none;
}
/* 评论面板展开时，底部缩略图/计数让位（不然面板会盖住它们） */
.viewer-mask.vc-on .viewer-thumbs,
.viewer-mask.vc-on .viewer-count { display: none; }
/* ⚠️ hidden 属性只靠 UA 的 [hidden]{display:none} 生效，会被下面的 display:flex 盖掉 ——
   面板就"藏不住"，一直挡着下面可以点的东西。必须显式声明。 */
.vc-panel[hidden] { display: none; }
.vc-panel {
  position: absolute; left: 0; right: 0; bottom: 0; max-height: 62%;
  background: var(--card, #fff); border-radius: 16px 16px 0 0;
  display: flex; flex-direction: column; z-index: 5;
  box-shadow: 0 -6px 24px rgba(0, 0, 0, .25);
}
.vc-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; font-weight: 700; border-bottom: 1px solid var(--border);
}
/* 左边图自适应 + 右边评论栏：宽屏并排（评论常驻、多了在栏内滚动），窄屏评论收成底部抽屉 */
.viewer-main { position: relative; flex: 1; min-width: 0; height: 100%; }
/* 宽屏：评论区并到图片旁边。用「深色磨砂玻璃」而不是白卡片 ——
   白底贴在黑底大图边上像两块拼起来的板子，看着割裂。 */
@media (min-width: 480px) {
  .vc-panel {
    position: relative; left: auto; right: auto; bottom: auto;
    /* 图片区 : 评论 = 7 : 3（张老师定的比例） */
    width: 30%; min-width: 168px; flex: none; height: 100%; max-height: none;
    border-radius: 0; box-shadow: none;
    /* 自带深色底 + 毛玻璃：只靠 backdrop-filter 的话会随背后的页面内容变色，不稳 */
    background: rgba(16, 16, 18, .94);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    border-left: 1px solid rgba(255, 255, 255, .10);
    color: rgba(255, 255, 255, .92);
  }
  .vc-head .vc-x { display: none; }            /* 常驻时不需要关闭键 */
  .vc-head {
    padding: 16px 18px 12px; color: #fff; letter-spacing: .5px;
    border-bottom: none; font-size: 14px; opacity: .92;
  }
  /* 小标题挪到图片区左上角：要和「＋ 加照片」错开，别叠在一起（踩过） */
  .vc-bar { top: 64px; padding-right: 72px; }
  /* 图片区留白收窄：图能更大，也更贴近左边 */
  .viewer-stage { padding: 14px 10px 104px 12px; }
  .vc-bar .vc-open { display: none; }          /* 评论已在右边，不用开关 */
  .vc-list { padding: 4px 18px 10px; }
  .vc-item { padding: 12px 0; border-bottom: none; }
  .vc-item + .vc-item { border-top: 1px solid rgba(255, 255, 255, .07); }
  .vc-meta { color: rgba(255, 255, 255, .55); }
  .vc-meta b { color: rgba(255, 255, 255, .95); }
  .vc-del { color: rgba(255, 255, 255, .45); }
  .vc-del:active { color: #fff; }
  .vc-text { color: rgba(255, 255, 255, .88); }
  .vc-empty { color: rgba(255, 255, 255, .45); }
  /* 栏窄（7:3 时只占 30%）时容易挤：昵称/时间/删除各占一行，这里全部收紧 */
  .vc-meta { flex-wrap: nowrap; gap: 6px; }
  .vc-meta b {
    flex: 0 1 auto; min-width: 0;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  }
  .vc-meta > span { flex: none; white-space: nowrap; font-size: 11px; }
  .vc-del { flex: none; white-space: nowrap; }
  /* ⚠️ 这几条基础样式写在媒体查询之后，同优先级会被盖掉 —— 必须带 .vc-panel 提权 */
  .vc-panel .vc-input { border-top: 1px solid rgba(255, 255, 255, .10); padding: 10px 12px; gap: 6px; }
  .vc-panel .vc-input input {
    /* ⚠️ flex 子项默认 min-width:auto，input 有内在最小宽度（约 20 字符），
       不写 min-width:0 会把整行撑出栏外，「发送」就被挤出边界（踩过） */
    min-width: 0; flex: 1;
    background: rgba(255, 255, 255, .10);
    border: 1px solid rgba(255, 255, 255, .14);
    color: #fff;
    padding: 9px 12px; font-size: 13px;
  }
  .vc-panel .vc-input input::placeholder { color: rgba(255, 255, 255, .42); }
  .vc-panel .vc-input button {
    background: var(--primary); color: #fff;
    flex: none; white-space: nowrap;
    padding: 0 12px; font-size: 13px;   /* 窄栏里别把输入框挤没 */
  }
  /* 图与评论之间不再有硬边：小标题也跟着变浅色，和右侧同一平面 */
  .vc-title { color: rgba(255, 255, 255, .9); }
}
.vc-x { border: none; background: transparent; font-size: 22px; line-height: 1; cursor: pointer; color: var(--text-soft); }
.vc-list { flex: 1; overflow-y: auto; padding: 8px 16px; }
.vc-item { padding: 8px 0; border-bottom: 1px dashed var(--border); }
.vc-meta { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-soft); }
.vc-meta b { color: var(--text); font-size: 13px; }
.vc-del { margin-left: auto; border: none; background: transparent; color: var(--text-soft); font-size: 12px; cursor: pointer; }
.vc-text { font-size: 14px; margin-top: 3px; line-height: 1.5; word-break: break-word; }
.vc-empty { text-align: center; color: var(--text-soft); font-size: 13px; padding: 24px 0; }
.vc-input {
  display: flex; gap: 8px; padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--border);
}
.vc-input input {
  flex: 1; border: 1px solid var(--border); border-radius: 999px;
  padding: 9px 14px; font-size: 14px; background: var(--bg); color: var(--text);
}
.vc-input button {
  border: none; background: var(--primary); color: #fff;
  border-radius: 999px; padding: 0 18px; font-size: 14px; cursor: pointer;
}
.album-more {
  position: absolute;
  inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  font-size: 18px;
  font-weight: 700;
}

/* 图片上传预览网格（微信式九宫格） */
.photo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 10px; }
.photo-cell {
  position: relative;
  aspect-ratio: 1;
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg);
  border: 1px solid var(--border);
}
.photo-cell img { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.photo-cell { touch-action: pan-y; }
.photo-cell.draggable-enabled { cursor: grab; }
.photo-cell.dragging { opacity: 0.65; transform: scale(0.92); transition: transform .1s, opacity .1s; z-index: 5; }
.photo-cell.drop-target { outline: 2px solid var(--primary); outline-offset: -2px; }
.photo-del {
  position: absolute;
  top: 2px; right: 2px;
  width: 20px; height: 20px;
  border: none;
  background: transparent;
  color: rgba(255,255,255,0.95);
  font-size: 20px;
  font-weight: 400;
  line-height: 1;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

/* “+”添加格子（微信风格虚线） */
.photo-add {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 12px;
  border: 1.5px dashed rgba(240, 107, 147, 0.5);
  background: rgba(255, 214, 224, 0.15);
  color: var(--primary-deep);
  font-size: 40px;
  font-weight: 300;
  line-height: 1;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s, transform .1s;
}
.photo-add:active { background: rgba(255, 214, 224, 0.4); transform: scale(0.96); }

/* 上传中的格子：置灰 + 转圈 */
.photo-loading { display: flex; align-items: center; justify-content: center; }
.photo-loading::after {
  content: "";
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 2px solid rgba(240, 107, 147, 0.3);
  border-top-color: var(--primary-deep);
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* 上传失败格子：虚线框 + 叹号 + 重试 */
.photo-error {
  position: relative;
  aspect-ratio: 1;
  border-radius: 12px;
  border: 1.5px dashed var(--primary-deep);
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  cursor: pointer;
}
.photo-error .pe-icon { font-size: 20px; line-height: 1; }
.photo-error .pe-text { font-size: 11px; color: var(--primary-deep); }
/* 失败格右上角删除角标 */
.photo-error .pe-del {
  position: absolute;
  top: 2px; right: 2px;
  width: 20px; height: 20px;
  border: none;
  background: transparent;
  color: rgba(255,255,255,0.95);
  font-size: 20px;
  font-weight: 400;
  line-height: 1;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

.upload-hint { font-size: 12px; color: var(--text-soft); margin-top: 8px; line-height: 1.5; }
.photo-count { font-size: 12px; color: var(--text-soft); margin-left: auto; }

/* 快捷添加菜单 */
.quick-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.quick-row { display: flex; gap: 12px; margin-top: 12px; }
.quick-row .quick-item { flex: 1; }
.quick-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 18px 12px;
  border-radius: 16px;
  background: var(--bg);
  border: 1px solid var(--border);
  font-size: 14px;
  cursor: pointer;
  transition: transform .1s, background .15s;
}
.quick-item:active { transform: scale(0.96); background: var(--primary-soft); }
.quick-icon { font-size: 30px; }

/* ===== 弹窗 ===== */
.modal-mask {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 100;
  display: flex; align-items: flex-end; justify-content: center;
  animation: fadeIn .2s ease;
}
/* 内容型弹窗（如图片预览）不受屏幕宽度影响，始终垂直居中 */
.modal-mask.center { align-items: center; }
/* 居中弹窗四角统一圆角：默认底部弹层只圆上方两角，底部为直角 */
.modal-mask.center .modal { border-radius: 22px; }
.modal {
  width: 100%;
  max-width: 520px;
  background: #fff;
  border-radius: 22px 22px 0 0;
  padding: 20px 18px calc(20px + env(safe-area-inset-bottom));
  max-height: 90vh;
  overflow-y: auto;
  animation: slideUp .25s ease;
}
@keyframes slideUp { from { transform: translateY(30%); opacity: .5;} to { transform: none; opacity: 1;} }
.modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.modal-head h3 { margin: 0; font-size: 17px; }
.modal-close { border: none; background: transparent; font-size: 22px; color: var(--text-soft); cursor: pointer; }

/* ===== Toast ===== */
#toastRoot { position: fixed; top: 60px; left: 0; right: 0; z-index: 200; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; }
.toast {
  background: rgba(74, 59, 64, 0.92);
  color: #fff;
  padding: 10px 20px;
  border-radius: 999px;
  font-size: 14px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.2);
  animation: fadeIn .2s ease;
}

/* 空状态 */
.empty {
  text-align: center;
  color: var(--text-soft);
  padding: 40px 20px;
  font-size: 14px;
}
.empty .empty-icon { font-size: 40px; margin-bottom: 8px; }

/* ===== 登录 / 注册：全屏欢迎页 ===== */
.auth-screen {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end; /* 双头像与爱心靠下展示，贴近波浪 */
  padding-bottom: 17vh;      /* 让开底部波浪的高度 */
  overflow: hidden;
  text-align: center;
  background: linear-gradient(180deg, #ff8fab, #ffb3c6 55%, #ffc9d5);
}
/* 展示页顶部横幅：左侧品牌（logo+站名）+ 右侧一言 */
.showcase-topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: calc(env(safe-area-inset-top) + 14px) 20px 14px;
  background: rgba(255, 255, 255, .10);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 2px 10px rgba(0, 0, 0, .06);
}
.st-brand { display: flex; align-items: center; gap: 8px; min-width: 0; }
.st-logo { width: 26px; height: 26px; border-radius: 6px; flex: none; }
.st-name { font-size: 16px; font-weight: 800; letter-spacing: 1px; color: #3d3038; white-space: nowrap; }
.st-quote { font-size: 13px; color: rgba(0,0,0,.62); max-width: 55%; text-align: right; font-style: italic; }
@media (max-width: 639.98px) {
  .showcase-topbar { padding: calc(env(safe-area-inset-top) + 12px) 14px 12px; gap: 10px; }
  .st-name { font-size: 14px; }
  .st-quote { font-size: 12px; max-width: 58%; }
}
/* 模块公开展示页：渐变区标题 + 右上角返回按钮 */
.showcase-module-title { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 2vh; color: #fff; font-size: 26px; font-weight: 800; letter-spacing: 2px; text-shadow: 0 1px 6px rgba(240,107,147,.35); }
.smt-icon { font-size: 30px; }
.sp-back-grad { border: 1px solid rgba(0,0,0,.16); background: rgba(0,0,0,.06); color: #3d3038; font-size: 13px; cursor: pointer; padding: 6px 14px; border-radius: 999px; }
.sp-back-grad:hover { background: rgba(0,0,0,.1); }
/* 展示页头像尺寸由类控制（默认桌面 100px），不再用 inline 写死，便于手机端响应式缩小 */
.showcase-avatars .arco-avatar { width: 100px; height: 100px; font-size: 50px; }
/* 对外展示页（.showcase）：高度收缩到内容为止；底部预留 9vh 给波浪层，避免压住文字 */
.auth-screen.showcase { position: sticky; top: 0; z-index: 5; overflow: visible; justify-content: flex-start; min-height: 0; padding-top: 14vh; padding-bottom: 9vh; }
.showcase .avatar-name { color: #fff; text-shadow: 0 1px 6px rgba(240, 107, 147, 0.35); }
.showcase-avatars { gap: 150px; margin: 6vh 0 40px; cursor: pointer; }
/* 恋爱计时：独立区块（渐变区之外），水平居中，深灰大字 */
.showcase-love {
  max-width: 1080px;
  margin: 0 auto;
  padding: 30px 16px 6px;
  text-align: center;
  color: #212529;
  font-family: Georgia, serif;
}
.showcase-love .couple { font-size: 22px; letter-spacing: 2px; color: #212529; }
.showcase-love .love-main { font-size: 56px; font-weight: 800; line-height: 1.2; color: #212529; }
.showcase-love .love-sub { font-size: 20px; color: #212529; padding-bottom: 8px; }
.showcase-love .quote { font-size: 18px; color: #212529; margin-top: 10px; }
/* 「今天… + 第X天 + 时分秒」整行不换行；水平居中以「第X天」为准——couple 靠左、love-sub 靠右、love-main 严格居中 */
.showcase-love .days {
  display: flex;
  flex-wrap: nowrap;
  align-items: baseline;
  justify-content: center;
  gap: 12px;
}
.showcase-love .days .couple { flex: 1; text-align: right; }
.showcase-love .days .love-main { flex: none; }
.showcase-love .days .love-sub { flex: 1; text-align: left; }
/* 视差波浪下方的公开模块区 */
.showcase-modules { max-width: 1080px; margin: 0 auto; padding: 24px 16px calc(44px + 14vh); }
/* PC 登录页：品牌区 + 居中登录卡片，表单直接可见 */
.auth-screen.login-pc { justify-content: center; padding-bottom: 12vh; }
.auth-form-card { width: min(420px, 92%); text-align: left; margin-bottom: 6vh; }
/* 移动端登录页：同样的渐变背景与波浪，品牌区文字反白，卡片下移让开波浪 */
.auth-screen.login-mobile { justify-content: flex-start; padding: 30px 16px 110px; }
.login-mobile .auth-title { color: #fff; text-shadow: 0 2px 10px rgba(240, 107, 147, 0.3); }
.login-mobile .auth-sub { color: rgba(255, 255, 255, 0.92); }
.login-mobile .auth-form-card { width: 100%; margin-bottom: 0; }
/* 品牌区：新图标 + 站名横向居中 */
.auth-brand { display: flex; align-items: center; justify-content: center; gap: 10px; font-size: 26px; font-weight: 800; color: #fff; letter-spacing: 2px; text-shadow: 0 2px 12px rgba(240, 107, 147, 0.35); }
.auth-brand .ico { width: 34px; height: 34px; flex: none; filter: drop-shadow(0 2px 8px rgba(240, 107, 147, 0.45)); }
.auth-slogan { font-size: 13px; color: rgba(255, 255, 255, 0.92); margin: 8px 0 30px; }
/* 移动端旧版登录页品牌区（PC 欢迎页不用） */
.auth-hero { text-align: center; padding: 42px 0 26px; }
.auth-logo { font-size: 56px; }
.auth-title { font-size: 22px; font-weight: 800; color: var(--primary-deep); margin-top: 10px; letter-spacing: 1px; }
.auth-sub { font-size: 13px; color: var(--text-soft); margin-top: 6px; }
.auth-tip { font-size: 12px; color: var(--text-soft); margin-top: 10px; line-height: 1.6; }

/* 底部波浪动画（视差四层） */
.waves { position: absolute; left: 0; bottom: 0; width: 100%; height: 14vh; min-height: 90px; max-height: 150px; }
.parallax > use { animation: wave-move 25s cubic-bezier(.55, .5, .45, .5) infinite; }
.parallax > use:nth-child(1) { animation-delay: -2s; animation-duration: 7s; }
.parallax > use:nth-child(2) { animation-delay: -3s; animation-duration: 10s; }
.parallax > use:nth-child(3) { animation-delay: -4s; animation-duration: 13s; }
.parallax > use:nth-child(4) { animation-delay: -5s; animation-duration: 20s; }
@keyframes wave-move {
  0% { transform: translate3d(-90px, 0, 0); }
  100% { transform: translate3d(85px, 0, 0); }
}

/* 页面底部动态鱼塘：固定定位在浏览器视口底部，滚动时始终可见；颜色由 canvas 绘制（水面之上白、之下粉），不设容器背景以免露出渐变带 */
.fish-sea { position: fixed; left: 0; bottom: 0; width: 100%; height: 150px; z-index: 5; pointer-events: auto; touch-action: pan-y; }
.fish-sea canvas { display: block; width: 100%; height: 100%; }

/* ===== 设置项 ===== */
.setting-row { display: flex; justify-content: space-between; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--border); }

/* 更多页入口卡片 */
.card-entry { cursor: pointer; transition: transform .12s, box-shadow .15s; }
.card-entry:active { transform: scale(0.98); box-shadow: 0 3px 12px rgba(240,107,147,.18); }
.card-entry .entry-main { display: flex; align-items: center; justify-content: space-between; font-size: 15px; font-weight: 700; }
.card-entry .entry-arrow { font-size: 22px; color: var(--text-soft); }
/* 入口卡片右侧的副标题（状态摘要），比标题弱一档 */
.card-entry .entry-sub {
  margin-left: auto; margin-right: 8px;
  font-size: 12px; font-weight: 400; color: var(--text-soft);
  max-width: 46%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.card-entry .entry-desc { font-size: 13px; color: var(--text-soft); margin-top: 6px; }
.setting-row:last-child { border-bottom: none; }
.setting-row .s-name { font-size: 14px; }

/* 访客记录列表 */
.visit-list { display: flex; flex-direction: column; margin-top: 12px; }
.visit-row { padding: 10px 0; border-bottom: 1px dashed var(--border); }
.visit-row:last-child { border-bottom: none; }
.visit-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.visit-ip { font-size: 14px; font-weight: 700; }
.visit-time { flex: none; font-size: 12px; color: var(--text-soft); }
.visit-sub { display: flex; align-items: center; gap: 6px; margin-top: 4px; font-size: 12px; color: var(--text-soft); }
.visit-dot { opacity: .6; }

/* 修改申请列表 */
.approval-list { display: flex; flex-direction: column; gap: 8px; max-height: 210px; overflow-y: auto; }
.approval-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; background: var(--bg); border: 1px solid var(--border); border-radius: 10px; }
.approval-item .approval-text { flex: 1; min-width: 0; font-size: 13px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.approval-item .approval-status { flex: none; font-size: 12px; padding: 2px 8px; border-radius: 999px; background: #fff; border: 1px solid var(--border); color: var(--text-soft); }
.approval-item .approval-status.approved { color: #3ba55d; border-color: #3ba55d; }
.approval-item .approval-status.denied { color: #e5484d; border-color: #e5484d; }
.approval-item .approval-status.pending { color: #e6a23c; border-color: #e6a23c; }
/* 申请详情弹窗 */
.ap-detail { display: flex; flex-direction: column; gap: 10px; }
.ap-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 13px; }
.ap-row > span:first-child { color: var(--text-soft); flex: none; }
.ap-row b { font-weight: 500; word-break: break-all; text-align: right; }
.ap-sec-title { font-size: 13px; font-weight: 600; color: var(--text); margin-top: 4px; }
.ap-block { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; background: var(--bg); border: 1px solid var(--border); border-radius: 8px; font-size: 13px; line-height: 1.6; word-break: break-all; }
.ap-field, .ap-change .ap-label { color: var(--text-soft); }
.ap-field { display: flex; gap: 8px; }

/* 情侣信息：头像 + 昵称 */
.partner-block {
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: 12px;
}
.partner-pair {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  justify-content: center;
  padding: 6px 0;
}
.partner-avatar {
  width: 64px; height: 64px;
  border-radius: 50%;
  overflow: hidden;
  flex: none;
  background: var(--bg);
  border: 2px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.partner-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.partner-avatar .pa-plus { font-size: 26px; font-weight: 300; color: var(--primary-deep); }
.partner-name { font-size: 15px; font-weight: 600; cursor: pointer; }
.partner-name:active { opacity: 0.7; }
.partner-avatar svg { width: 40px; height: 40px; }
.avatar-preview {
  display: flex;
  justify-content: center;
  margin-bottom: 18px;
}
.avatar-preview img, .avatar-preview svg {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
}
.avatar-actions { display: flex; gap: 10px; }
.avatar-actions .btn { flex: 1; }


.tool-list { display: flex; flex-direction: column; gap: 12px; font-size: 15px; }
.tool-row { display: flex; align-items: center; gap: 14px; padding: 14px 16px; }

/* 工具设置：代码编辑区（html / js） */
.code-area {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Courier New", monospace;
  font-size: 12.5px;
  line-height: 1.6;
  min-height: 130px;
  white-space: pre;
  overflow-x: auto;
}

/* AI 设置：提示词编辑区 */
.prompt-area {
  min-height: 92px;
  font-size: 13px;
  line-height: 1.6;
}

/* 大图预览 */
.viewer-mask {
  position: fixed; inset: 0;
  /* 稍微加厚：原来 0.92 会把背后页面的九宫格透出来，看着"脏" */
  background: rgba(0, 0, 0, .975);
  z-index: 200;
  display: flex; align-items: center; justify-content: center;
  animation: fadeIn .2s ease;
}
.viewer-close {
  position: absolute;
  top: 14px; right: 14px;
  width: 40px; height: 40px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.15);
  color: #fff;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  z-index: 2;
}
.viewer-stage {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  position: relative;
}
.viewer-img {
  /* 用满可用空间：留白交给 .viewer-stage 的 padding（底部那段是给缩略图的） */
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.5);
  user-select: none;
  -webkit-user-drag: none;
  touch-action: none;
}
.viewer-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px; height: 44px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.15);
  color: #fff;
  font-size: 34px;
  line-height: 1;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.viewer-prev { left: 12px; }
.viewer-next { right: 12px; }
/* 大图下方缩略图预览列表 */
.viewer-thumbs {
  position: absolute;
  left: 0; right: 0;
  bottom: 12px;
  display: flex;
  justify-content: center;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 16px;
  z-index: 3;
}
.vt {
  width: 48px; height: 48px;
  flex: none;
  border-radius: 8px;
  overflow: hidden;
  opacity: .6;
  cursor: pointer;
  border: 2px solid transparent;
  transition: opacity .15s, border-color .15s;
}
.vt img { width: 100%; height: 100%; object-fit: cover; display: block; }
.vt:hover { opacity: .9; }
.vt.on { opacity: 1; border-color: #fff; }
.viewer-count {
  position: absolute;
  bottom: 76px;
  left: 0; right: 0;
  text-align: center;
  color: rgba(255,255,255,0.85);
  font-size: 14px;
  letter-spacing: 1px;
}
/* 大图预览底部：相册名 + 简介（超过三行可展开/收起） */
/* 标题/相册名是「浮层」，不占图片位置 —— 所以图片一律撑满（原来 66%/86% 都是给它让位） */
.viewer-stage.with-info .viewer-img { max-height: 100%; }
.viewer-info {
  position: absolute;
  left: 0; right: 0;
  bottom: 112px;
  z-index: 6;              /* 浮在照片上层 */
  color: #fff;
  text-align: left;
  padding: 0 20px 6px;
  pointer-events: none;    /* 只是说明文字，别挡住图片上的手势 */
}
.viewer-title { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.viewer-summary { font-size: 13px; line-height: 1.6; color: rgba(255,255,255,0.92); }
/* 文字压在照片上，必须自带描边阴影，否则浅色照片上完全看不见 */
.viewer-info .viewer-title,
.viewer-info .viewer-summary {
  text-shadow: 0 1px 10px rgba(0, 0, 0, .95), 0 0 2px rgba(0, 0, 0, .85);
}
.viewer-count, .viewer-nav, .viewer-thumbs { z-index: 6; }
.viewer-close, .viewer-add { z-index: 7; }
.viewer-count { text-shadow: 0 1px 8px rgba(0, 0, 0, .9); }
.viewer-more {
  margin-top: 8px;
  border: none;
  background: transparent;
  color: #ff9eb4;
  font-size: 13px;
  cursor: pointer;
}
.clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 中屏（平板/小窗口）：维持手机版居中限宽形态 */
@media (min-width: 640px) and (max-width: 1023.98px) {
  #app { max-width: 640px; margin: 0 auto; }
  .modal-mask { align-items: center; padding: 20px; }
  .modal { border-radius: 22px; }
  .tabbar { left: 50%; transform: translateX(-50%); width: 100%; max-width: 640px; }
  .tabbar.is-hidden { transform: translateX(-50%) translateY(calc(100% + 40px)); }
  .fab { right: calc(50% - 302px); }
}

/* 未登录态（展示页/PC 登录欢迎页）：隐藏应用壳顶栏，内容区取消留白由全屏页铺满（移动端旧版登录卡片不打此标） */
body.is-auth .topbar { display: none; }
body.is-auth .content { padding: 0; }

/* ===== 非 PC（<1024px）：隐藏 PC 专属侧栏入口，移动端保持原 tab 布局 ===== */
@media (max-width: 1023.98px) {
  .tab-pc-only { display: none !important; }
  .home-fish { display: none !important; }
  /* 移动端返回按钮：固定在顶栏（header）左上角 */
  #backBtn {
    position: fixed;
    top: calc(env(safe-area-inset-top) + 8px);
    /* 应用列在 640~1024px 区间是 640px 居中，故左偏移要跟随应用列而非视口，
       否则按钮会脱离顶栏飘到页面背景上 */
    left: max(12px, calc(50% - 308px));
    right: auto;
    z-index: 30;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    font-size: 28px;
    line-height: 1;
    padding: 0;
  }
  #backBtn[hidden] { display: none !important; }
}

/* ===== PC 大屏：左侧边栏 + 宽幅内容区 ===== */
@media (min-width: 1024px) {
  :root { --sidebar-w: 216px; --topbar-h: 52px; }

  /* PC 端已有左侧栏导航（含 is-auth 全屏页也靠品牌区/卡片返回），
     内容区一律不再显示返回键；移动端不受影响，仍在顶栏左上角 */
  #backBtn { display: none !important; }

  /* PC 端隐藏展示页恋爱区的一言（顶部横幅右侧已有一言，避免重复） */
  .showcase-love .quote { display: none; }

  #app { max-width: none; }

  /* 首页倒计时卡片 PC 端两列并排 */
  .countdown-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  /* 首页底部小鱼限定在右侧内容区（避开左侧固定边栏） */
  .home-fish { left: var(--sidebar-w); width: calc(100% - var(--sidebar-w)); }

  /* 底部 tabbar 重排为左侧固定边栏（元素与 JS 高亮逻辑完全复用），并从顶部延伸到底部 */
  .tabbar {
    left: 0; right: auto; top: 0; bottom: 0;
    width: var(--sidebar-w);
    height: auto;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    gap: 4px;
    padding: 20px 12px;
    border-top: none;
    border-right: 1px solid var(--border);
    box-shadow: 4px 0 24px rgba(240, 107, 147, 0.06);
    transition: none;
  }
  /* 侧栏顶部品牌区：网页图标 + 网站标题（仅 PC 显示），点击跳转展示页 */
  .sidebar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 4px 18px;
    color: var(--primary-deep);
    cursor: pointer;
  }
  .sidebar-brand:hover .brand-title { opacity: .85; }
  .sidebar-brand .brand-icon { width: 26px; height: 26px; border-radius: 6px; flex: none; }
  .sidebar-brand .brand-title { font-size: 16px; font-weight: 800; letter-spacing: 1px; }
  /* 子页面不隐藏侧栏；未登录（body.is-auth）例外，仍按默认规则移出屏幕 */
  body:not(.is-auth):not(.is-public) .tabbar.is-hidden { transform: none; pointer-events: auto; }
  .tab {
    flex: none;
    flex-direction: row;
    justify-content: flex-start;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 14px;
  }
  .tab:hover { background: var(--bg); color: var(--primary-deep); }
  .tab.active { background: var(--primary-soft); }
  .tab.active .tab-icon { transform: none; }
  .tab-icon { font-size: 20px; }
  /* 顶栏移到侧栏右侧（减去侧栏宽度），内容区仍让开侧栏宽度，内容限宽居中（未登录页无侧栏，铺满见全局 is-auth） */
  .topbar { margin-left: var(--sidebar-w); height: var(--topbar-h); }
  .content { margin-left: var(--sidebar-w); padding-bottom: 40px; }
  body.is-auth .content { margin-left: 0; }
  .page { max-width: 1080px; margin: 0 auto; }

  /* 关于我们配图：PC 端内容区宽达 1080px，图片按 100% 撑满会过大，限宽并居中 */
  .about-img { max-width: 480px; margin-left: auto; margin-right: auto; }

  /* 弹窗改为屏幕居中的浮动卡片 */
  .modal-mask { align-items: center; padding: 20px; }
  .modal { border-radius: 22px; max-width: 560px; animation: fadeIn .2s ease; }

  /* 悬浮按钮贴右下角 */
  .fab { right: 24px; bottom: 24px; }

  /* 衣柜条目 6 列 */
  .w-item, .opick { width: calc(16.66% - 7px); }

  /* 首页模块卡片hover反馈 */
  .module-card:hover { transform: translateY(-3px); box-shadow: 0 10px 26px rgba(240, 107, 147, 0.16); }
  .card-entry:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(240, 107, 147, 0.14); }
  .btn:hover { filter: brightness(1.04); }
  .btn-ghost:hover { background: var(--bg); }
  .quick-item:hover { background: var(--primary-soft); }
  .chip:hover { border-color: var(--primary); }
}

/* ===== 手机端（<640px）：展示页整体缩小，避免头像/计时行溢出或显示不全 ===== */
@media (max-width: 639.98px) {
  /* 头像区：缩小头像与间距，爱心同步缩小 */
  .showcase-avatars { gap: 20px; margin: 4vh 0 22px; }
  .showcase-avatars .arco-avatar { width: 64px; height: 64px; font-size: 30px; border-width: 2px; }
  .showcase .couple-avatars .heart { width: 22px; height: 22px; margin-bottom: 20px; }
  .showcase .couple-avatars .heart::before, .showcase .couple-avatars .heart::after { width: 22px; height: 22px; }
  .showcase .couple-avatars .heart::before { top: -11px; }
  .showcase .couple-avatars .heart::after { left: -11px; }
  .showcase-avatars .avatar-name { font-size: 12px; }

  /* 恋爱计时：顶栏文案可换行、计时行允许换行、整体字号适度缩小 */
  .auth-screen.showcase { padding-top: 6vh; padding-bottom: 9vh; }
  .showcase-love { padding: 20px 8px 4px; }
  .showcase-love .couple { font-size: 16px; }
  .showcase-love .love-main { font-size: 40px; }
  .showcase-love .love-sub { font-size: 15px; }
  .showcase-love .quote { font-size: 14px; word-break: break-word; white-space: normal; }
  .showcase-love .days { flex-wrap: wrap; gap: 8px; }
  /* 移动端三行：couple 独占一行、第X天与时分秒并排一行、引号一行 */
  .showcase-love .days .couple { flex: 0 0 100%; text-align: center; }
  /* 移动端鱼塘固定高度，避免 14vh 随视口导致高度波动 */
  .fish-sea { height: 110px; }
  .page-blessing { padding-bottom: calc(var(--tabbar-h) + 24px + 110px); }
  .showcase-love .days .love-main { flex: 0 0 100%; }
  .showcase-love .days .love-sub { flex: 0 0 100%; text-align: center; }

  /* 公开模块区：3 列改 2 列，卡内间距缩小 */
  .showcase-modules { padding: 20px 12px 32px; }
  .showcase-modules .module-grid { gap: 10px; }
  .showcase-modules .module-grid.cols-3 { grid-template-columns: repeat(2, 1fr); }
}

/* ===== 公开/私密滑动开关 ===== */
.privacy-field { margin-top: 4px; }
.privacy-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.privacy-head label { margin: 0; }
.privacy-state { font-size: 13px; font-weight: 600; color: var(--primary-deep); }
.privacy-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.privacy-note { flex: 1; font-size: 12px; color: var(--text-soft); }
.switch { position: relative; display: inline-block; width: 46px; height: 26px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .slider { position: absolute; inset: 0; background: #d8d8e0; border-radius: 26px; cursor: pointer; transition: .2s; }
.switch .slider::before { content: ""; position: absolute; height: 20px; width: 20px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .2s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.switch input:checked + .slider { background: linear-gradient(135deg, #ff8fab, #f06b93); }
.switch input:checked + .slider::before { transform: translateX(20px); }

/* 列表项上的公开/私密小标识 */
.privacy-badge { display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 999px; font-size: 11px; font-weight: 500; vertical-align: middle; }
.privacy-badge.public { background: rgba(75, 180, 120, .12); color: #2f9e63; }
.privacy-badge.private { background: rgba(120, 120, 140, .12); color: #77778f; }
.privacy-badge svg, .privacy-state svg { width: 14px; height: 14px; vertical-align: -2px; margin-right: 2px; }

/* 无标题弹窗（如快速添加菜单）：去掉表头底部留白，仅保留右上角关闭按钮 */
.modal-head.no-title { margin-bottom: 0; }

/* ===== 模块独立公开展示页 ===== */
.sp-page { max-width: 720px; margin: 0 auto; padding: 20px 16px 40px; }
.sp-topbar { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.sp-back { border: none; background: transparent; color: var(--primary-deep); font-size: 15px; cursor: pointer; padding: 6px 10px; border-radius: 10px; display: inline-flex; align-items: center; gap: 4px; }
.sp-back:hover { background: var(--primary-soft); }
.sp-top-title { font-size: 17px; font-weight: 800; letter-spacing: .5px; color: var(--text); }

/* ===== 展示页公开内容内联区块 ===== */
.showcase-public { max-width: 720px; margin: 0 auto; padding: 0 16px 40px; }
.showcase-public .sp-block { margin-bottom: 16px; }
.sp-title { font-size: 15px; font-weight: 700; color: var(--text); margin-bottom: 12px; }
.sp-item { padding-bottom: 12px; margin-bottom: 12px; border-bottom: 1px dashed var(--border); }
.sp-item:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.sp-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
.sp-head b { font-size: 14px; }
.sp-meta { font-size: 12px; color: var(--text-soft); flex: none; }
.sp-text { font-size: 13px; color: var(--text-soft); white-space: pre-wrap; word-break: break-word; }
.sp-imgs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 8px; }
.sp-imgs img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; display: block; }
.sp-grid { display: grid; grid-template-columns: 1fr; gap: 10px; }
.sp-album { background: var(--bg); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; cursor: pointer; }
/* 展示页相册：纵向时间线（以相册为节点），节点下九宫格平铺照片 */
.timeline { position: relative; }
.timeline::before { content: ""; position: absolute; left: 28px; top: 6px; bottom: 6px; width: 2px; background: var(--border); }
/* 每本相册一个节点：左侧预留节点栏（圆点+日期），右侧为内容区 */
.tl-item { position: relative; display: flex; align-items: flex-start; margin-bottom: 20px; }
.tl-node { position: relative; flex: 0 0 56px; text-align: center; }
.tl-dot { position: absolute; left: 50%; transform: translateX(-50%); top: 3px; width: 12px; height: 12px; border-radius: 50%; background: var(--primary, #ff6b9d); border: 2px solid var(--bg); box-shadow: 0 0 0 2px var(--border); }
.tl-date { display: block; margin-top: 22px; font-size: 12px; color: var(--text-soft); }
.tl-body { flex: 1; min-width: 0; padding-left: 14px; }
.tl-title { margin: 3px 0 0; font-size: 15px; font-weight: 700; }
.tl-summary { margin: 2px 0 8px; font-size: 12px; color: var(--text-soft); display: -webkit-box; -webkit-line-clamp: 1; line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.tl-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; }
.tl-cell { position: relative; aspect-ratio: 1; overflow: hidden; background: var(--primary-soft); border-radius: 4px; cursor: zoom-in; }
.tl-cell img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tl-cell-empty { display: flex; align-items: center; justify-content: center; font-size: 26px; cursor: default; }
.tl-more { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,.45); color: #fff; font-size: 14px; font-weight: 700; }
.sp-thumbs { display: grid; gap: 2px; }
/* 只有一张(或仅占位)时限制缩略图宽度并居中，避免单张照片撑满整卡显得过大 */
.sp-thumbs:has(:only-child) { max-width: 240px; margin: 0 auto; }
.sp-thumb { position: relative; aspect-ratio: 1; overflow: hidden; background: var(--primary-soft); }
.sp-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sp-thumb-empty { display: flex; align-items: center; justify-content: center; }
.sp-thumb-empty .al-emoji { font-size: 30px; }
.sp-more { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,.45); color: #fff; font-size: 14px; font-weight: 700; }
.sp-cover { aspect-ratio: 1; background: var(--primary-soft); display: flex; align-items: center; justify-content: center; }
.sp-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.al-emoji { font-size: 34px; }
.sp-al-title { padding: 8px 10px 0; font-size: 13px; font-weight: 600; }
.sp-al-sub { padding: 2px 10px 10px; font-size: 12px; color: var(--text-soft); }
.sp-promise { display: flex; align-items: baseline; gap: 8px; padding: 8px 0; border-bottom: 1px dashed var(--border); }
.sp-promise:last-child { border-bottom: none; }
.sp-promise .tick { flex: none; width: 18px; height: 18px; border: 1.5px solid var(--border); border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 11px; transform: translateY(1px); }
.sp-promise.done .tick { background: var(--primary); border-color: var(--primary); color: #fff; }
.sp-promise-text { font-size: 13px; flex: 1; }
.sp-promise.done .sp-promise-text { text-decoration: line-through; color: var(--text-soft); }
.sp-promise-sub { font-size: 12px; color: var(--text-soft); flex: none; }
.sp-promise-date { padding: 2px 12px 8px; font-size: 12px; color: var(--text-soft); text-align: right; }

/* ===== 全站彩色 SVG 图标：.ico 尺寸默认跟随容器 font-size（1em） ===== */
.ico { width: 1em; height: 1em; display: inline-block; vertical-align: -0.14em; flex: none; }

/* 底部/侧栏 tab 图标容器 */
.tab-icon { display: inline-flex; align-items: center; justify-content: center; line-height: 1; }

/* 首页与展示页模块卡片图标（固定 30px，居中） */
.module-card .module-icon { display: flex; align-items: center; justify-content: center; line-height: 1; }
.module-card .module-icon .ico { width: 30px; height: 30px; }

/* 卡片标题内的行内图标 */
.card-title .ico { width: 17px; height: 17px; vertical-align: -3px; margin-right: 2px; }

/* 底栏「+」快捷添加菜单 */
.quick-icon { display: flex; align-items: center; justify-content: center; line-height: 1; }
.quick-icon .ico { width: 30px; height: 30px; }

/* 公开展示页模块大标题图标 */
.smt-icon { display: inline-flex; align-items: center; line-height: 1; }
.smt-icon .ico { width: 30px; height: 30px; }

/* 列表搜索框放大镜 */
.list-search .ls-icon { display: flex; align-items: center; justify-content: center; }
.list-search .ls-icon .ico { width: 15px; height: 15px; }

/* 铅笔编辑 / 垃圾桶删除：行内紧凑方形图标按钮，颜色随 currentColor */
.btn-edit, .btn-del { display: inline-flex; align-items: center; justify-content: center; padding: 6px 8px; gap: 4px; }
.btn-edit .ico, .btn-del .ico { width: 16px; height: 16px; vertical-align: 0; }
.btn-edit { color: var(--primary-deep); }
.btn-del { color: var(--danger, #e5484d); }
.btn-edit:hover, .btn-del:hover { background: var(--bg); }

/* 关于本站：数据备份按钮行（导出 / 恢复并排，各占一半） */
.backup-actions { display: flex; gap: 10px; margin-top: 12px; }
.backup-actions .btn { flex: 1; }

/* 编辑表单底部的危险操作按钮（与保存并排）：图标+文字、红色 */
.btn-danger { color: var(--danger, #e5484d); display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.btn-danger .ico { width: 17px; height: 17px; }
.btn-danger:hover { background: rgba(229, 72, 77, 0.08); }

/* 衣物详情页通栏编辑按钮：图标+文字并排居中 */
#wDetailEdit { display: flex; align-items: center; justify-content: center; gap: 5px; color: var(--primary-deep); }
#wDetailEdit .ico { width: 18px; height: 18px; }

/* ===== 昵称弹窗：输入框右侧的性别选择 ===== */
.nick-row { display: flex; gap: 10px; align-items: stretch; }
.nick-row input { flex: 1; min-width: 0; width: auto; }
.nick-gender { display: flex; gap: 6px; flex: none; }
.nick-gender .chip {
  display: flex; align-items: center; justify-content: center;
  padding: 0 16px; font-family: inherit; line-height: 1; white-space: nowrap;
}

