/* ============================================================
   全局变量
   ============================================================ */
:root {
  --theme-main: #F9F8F6;
  --theme-accent: #A8B5A0;
  --theme-assist: #EFEEEA;
  --theme-card: #FFFFFF;
  --theme-text: #2E2E2E;
  --bg: var(--theme-main);
  --card: var(--theme-card);
  --text-primary: var(--theme-text);
  --text-secondary: #666666;
  --text-light: #999999;
  --brand: var(--theme-accent);
  --brand-dark: #8E9B86;
  --brand-light: rgba(168, 181, 160, 0.18);
  --brand-bg: rgba(168, 181, 160, 0.08);
  --tag-bg: var(--theme-assist);
  --divider: rgba(0, 0, 0, 0.06);
  --shadow-card: 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-polaroid: 0 8px 40px rgba(0, 0, 0, 0.12);
  --shadow-btn: 0 2px 12px rgba(168, 181, 160, 0.28);
  --shadow-fab: 0 4px 16px rgba(168, 181, 160, 0.4);
  --nav-bg: rgba(249, 248, 246, 0.88);
  --radius-card: 16px;
  --radius-btn: 25px;
  --radius-tag: 12px;
  --radius-polaroid: 4px;
  --nav-height: 64px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --app-width: 100%;
  --app-height: 100dvh;
  /* 棕色时间轴 */
  --brown: #8B6F47;
  --brown-light: rgba(139, 111, 71, 0.35);
}

/* ============================================================
   重置
   ============================================================ */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body {
  margin: 0; padding: 0;
  width: 100%;
  height: 100%;
  height: 100svh;
  height: 100dvh;
  height: var(--app-height, 100dvh);
  overflow: hidden;
  background: var(--bg);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: fixed;
  inset: 0;
}
button { border: none; background: none; font: inherit; color: inherit; cursor: pointer; padding: 0; }
input, textarea { border: none; outline: none; background: transparent; font: inherit; color: inherit; }

/* ============================================================
   App 容器
   ============================================================ */
.app-frame {
  width: 100%;
  width: var(--app-width, 100%);
  max-width: none;
  height: 100%;
  height: 100svh;
  height: 100dvh;
  height: var(--app-height, 100dvh);
  margin: 0;
  position: relative;
  overflow: hidden;
  background: var(--bg);
  box-shadow: none;
}
/* 电脑浏览器预览：居中成手机比例，真机/窄屏铺满 */
@media (min-width: 520px) {
  html, body {
    background: #E8E6E1;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .app-frame {
    width: min(100%, 430px);
    max-width: 430px;
    height: min(var(--app-height, 100dvh), 932px);
    max-height: 100%;
    margin: 0 auto;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.06);
  }
}

/* ============================================================
   页面
   ============================================================ */
.page {
  position: absolute;
  inset: 0;
  display: none;
  flex-direction: column;
  background: var(--bg);
  overflow: hidden;
  padding-left: var(--safe-left);
  padding-right: var(--safe-right);
}
.page.active { display: flex; animation: pageFadeIn 0.3s ease-out; }
@keyframes pageFadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ============================================================
   启动页
   ============================================================ */
.page-splash { align-items: center; justify-content: center; }
.page-splash .logo {
  font-size: 38px; font-weight: 200; color: var(--text-primary);
  letter-spacing: 2px; opacity: 0;
  animation: splashFadeUp 0.7s ease-out 0.1s forwards;
}
.page-splash .slogan {
  margin-top: 14px; font-size: 12px; color: var(--text-light);
  letter-spacing: 6px; opacity: 0;
  animation: splashFadeUp 0.7s ease-out 0.4s forwards;
}
.page-splash .dot-row {
  margin-top: 60px; display: flex; gap: 6px; opacity: 0;
  animation: splashFadeUp 0.7s ease-out 0.7s forwards;
}
.page-splash .dot-row span {
  width: 4px; height: 4px; background: var(--brand);
  border-radius: 50%; opacity: 0.4;
  animation: dotPulse 1.4s ease-in-out infinite;
}
.page-splash .dot-row span:nth-child(2) { animation-delay: 0.2s; }
.page-splash .dot-row span:nth-child(3) { animation-delay: 0.4s; }
@keyframes splashFadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes dotPulse { 0%, 100% { opacity: 0.3; transform: scale(0.8); } 50% { opacity: 1; transform: scale(1.2); } }

/* ============================================================
   登录页
   ============================================================ */
.page-login { padding: var(--safe-top) 32px 0; }
.page-login .brand { margin-top: clamp(36px, 14vh, 110px); text-align: center; }
.page-login .brand .logo {
  font-size: 36px; font-weight: 200; color: var(--text-primary);
  letter-spacing: 2px;
}
.page-login .brand .slogan {
  margin-top: 14px; font-size: 12px; color: var(--text-light);
  letter-spacing: 6px;
}
.page-login .actions {
  margin-top: 48px; display: flex; flex-direction: column; gap: 12px;
  flex: 1; overflow-y: auto; padding-bottom: 12px;
}
.login-hint {
  text-align: center; font-size: 13px; color: var(--text-light); line-height: 1.6;
}
.login-phone-display {
  text-align: center;
  font-size: 28px;
  font-weight: 500;
  letter-spacing: 2px;
  font-variant-numeric: tabular-nums;
  color: var(--text-primary);
  padding: 8px 0 12px;
}
.login-field {
  height: 48px; width: 100%; box-sizing: border-box;
  border: 1px solid var(--divider); border-radius: 12px;
  padding: 0 14px; background: #fff;
  font-size: 15px; color: var(--text-primary); outline: none;
}
.login-field:focus { border-color: var(--brand); }
.login-sms-row { display: flex; gap: 8px; align-items: center; }
.login-sms-row .login-field { flex: 1; }
.login-code-btn {
  height: 48px; padding: 0 12px; border: none; border-radius: 12px;
  background: var(--brand-bg); color: var(--brand-dark);
  font-size: 13px; white-space: nowrap; min-width: 108px; cursor: pointer;
}
.login-code-btn:disabled { opacity: 0.45; cursor: default; }
.btn {
  height: 50px; border-radius: var(--radius-btn);
  font-size: 15px; font-weight: 500;
  transition: transform 0.15s ease, opacity 0.2s ease, background 0.2s ease;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.btn:active { transform: scale(0.96); }
.btn-primary { background: var(--brand); color: white; box-shadow: var(--shadow-btn); }
.btn-secondary { background: white; color: var(--text-primary); border: 1px solid var(--divider); }
.btn-text { background: transparent; color: var(--text-light); height: 40px; font-size: 13px; }
/* 登录页：先逛逛 / 注册 并排一行，视觉对齐 */
.login-links {
  display: flex; align-items: center; justify-content: center; gap: 2px;
}
.login-links .btn { padding: 0 16px; flex: 0 0 auto; }
.login-links-sep { width: 1px; height: 12px; background: var(--divider); flex: 0 0 auto; }
.page-login .terms {
  margin-top: auto; margin-bottom: calc(32px + var(--safe-bottom));
  text-align: center; font-size: 11px; color: var(--text-light);
  letter-spacing: 0.5px;
}
.page-login .terms a { color: var(--text-secondary); text-decoration: none; }
.lan-debug {
  display: none;
  margin: 0 0 16px;
  padding: 12px 14px;
  background: var(--card);
  border-radius: 14px;
  box-shadow: var(--shadow-card);
  text-align: center;
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.55;
}
.lan-debug.show { display: block; }
.lan-debug img { width: 132px; height: 132px; margin: 8px auto; display: block; }
.lan-debug a { color: var(--brand-dark); word-break: break-all; }
.lan-debug .warn { color: #C46F54; margin-top: 8px; }

/* ============================================================
   通用顶部导航
   ============================================================ */
.top-nav {
  height: calc(56px + var(--safe-top)); display: flex; align-items: center;
  justify-content: space-between; padding: var(--safe-top) 20px 0;
  background: var(--bg); position: relative; z-index: 2; flex-shrink: 0;
}
.top-nav .tabs { display: flex; gap: 20px; }
.top-nav .tab {
  position: relative; padding: 8px 0; font-size: 15px;
  color: var(--text-light); font-weight: 500;
  transition: color 0.2s; cursor: pointer;
}
.top-nav .tab.active { color: var(--text-primary); }
.top-nav .tab.active::after {
  content: ''; position: absolute; bottom: 0; left: 0; right: 0;
  height: 2px; background: var(--brand); border-radius: 1px;
  animation: underlineIn 0.3s ease-out;
}
@keyframes underlineIn { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.top-nav .icon-btn {
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; transition: background 0.2s; cursor: pointer;
}
.top-nav .icon-btn:active { background: var(--brand-bg); }
.ui-icon {
  display: inline-block;
  width: 1em;
  height: 1em;
  flex-shrink: 0;
  background: center / contain no-repeat;
  background-image: var(--ui-icon);
}
.ui-icon[data-icon="nodes"] { --ui-icon: url("/assets/icons/nodes.png"); }
.ui-icon[data-icon="camera"] { --ui-icon: url("/assets/icons/camera.png"); }
.ui-icon[data-icon="messages"] { --ui-icon: url("/assets/icons/messages.png"); }
.ui-icon[data-icon="profile"] { --ui-icon: url("/assets/icons/profile.png"); }
.ui-icon[data-icon="friends"] { --ui-icon: url("/assets/icons/friends.png"); }
.ui-icon[data-icon="search"] { --ui-icon: url("/assets/icons/search.png"); }
.ui-icon[data-icon="close"] { --ui-icon: url("/assets/icons/close.png"); }
.ui-icon[data-icon="back"] { --ui-icon: url("/assets/icons/back.png"); }
.ui-icon[data-icon="switch"] { --ui-icon: url("/assets/icons/switch.png"); }
.ui-icon[data-icon="add"] { --ui-icon: url("/assets/icons/add.png"); }
.ui-icon[data-icon="qrcode"] { --ui-icon: url("/assets/icons/qrcode.png"); }
.ui-icon[data-icon="theme"] { --ui-icon: url("/assets/icons/theme.png"); }
.ui-icon[data-icon="collab"] { --ui-icon: url("/assets/icons/collab.png"); }
.ui-icon[data-icon="membership"] { --ui-icon: url("/assets/icons/membership.png"); }
.ui-icon[data-icon="settings"] { --ui-icon: url("/assets/icons/settings.png"); }
.ui-icon[data-icon="flash"] { --ui-icon: url("/assets/icons/flash.png"); }
.ui-icon[data-icon="flip"] { --ui-icon: url("/assets/icons/flip.png"); }
.ui-icon[data-icon="scan"] { --ui-icon: url("/assets/icons/scan.png"); }
.ui-icon[data-icon="wechat"] { --ui-icon: url("/assets/icons/wechat.png"); }
.ui-icon[data-icon="clipboard"] { --ui-icon: url("/assets/icons/clipboard.png"); }
.ui-icon[data-icon="share"] { --ui-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238e8e93' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 12v7a1 1 0 0 0 1 1h14a1 1 0 0 0 1-1v-7'/%3E%3Cpolyline points='16 6 12 2 8 6'/%3E%3Cline x1='12' y1='2' x2='12' y2='15'/%3E%3C/svg%3E"); }
.ui-icon[data-icon="privacy"] { --ui-icon: url("/assets/icons/privacy.png"); }
.ui-icon[data-icon="security"] { --ui-icon: url("/assets/icons/security.png"); }
.ui-icon[data-icon="notify"] { --ui-icon: url("/assets/icons/notify.png"); }
.ui-icon[data-icon="general"] { --ui-icon: url("/assets/icons/general.png"); }
.ui-icon[data-icon="storage"] { --ui-icon: url("/assets/icons/storage.png"); }
.ui-icon[data-icon="about"] { --ui-icon: url("/assets/icons/about.png"); }
.ui-icon[data-icon="logout"] { --ui-icon: url("/assets/icons/logout.png"); }
.ui-icon[data-icon="comment"] { --ui-icon: url("/assets/icons/comment.png"); }
.ui-icon[data-icon="like"] { --ui-icon: url("/assets/icons/like.png"); }
.ui-icon[data-icon="download"] { --ui-icon: url("/assets/icons/download.png"); }
.ui-icon[data-icon="calendar"] { --ui-icon: url("/assets/icons/calendar.png"); }
.ui-icon[data-icon="phone"] { --ui-icon: url("/assets/icons/phone.png"); }
.ui-icon[data-icon="password"] { --ui-icon: url("/assets/icons/password.png"); }
.ui-icon[data-icon="warning"] { --ui-icon: url("/assets/icons/warning.png"); }
.ui-icon[data-icon="backup"] { --ui-icon: url("/assets/icons/backup.png"); }
.ui-icon[data-icon="cache"] { --ui-icon: url("/assets/icons/cache.png"); }
.ui-icon[data-icon="trash"] { --ui-icon: url("/assets/icons/trash.png"); }
.ui-icon[data-icon="doc"] { --ui-icon: url("/assets/icons/doc.png"); }
.ui-icon[data-icon="policy"] { --ui-icon: url("/assets/icons/policy.png"); }
.ui-icon[data-icon="mail"] { --ui-icon: url("/assets/icons/mail.png"); }
.ui-icon[data-icon="star"] { --ui-icon: url("/assets/icons/star.png"); }
.nav-item .ico .ui-icon { width: 22px; height: 22px; opacity: 0.45; }
.nav-item.active .ico .ui-icon { opacity: 1; }
.top-nav .icon-btn .ui-icon { width: 20px; height: 20px; }
.cam-icon-btn .ui-icon { width: 16px; height: 16px; }
.menu-item .icon .ui-icon { width: 20px; height: 20px; }
.top-nav .title {
  font-size: 17px; font-weight: 500; color: var(--text-primary);
  flex: 1; text-align: center;
}
.top-nav .spacer { width: 36px; height: 36px; }

/* ============================================================
   底部导航
   ============================================================ */
.bottom-nav {
  height: calc(var(--nav-height) + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  display: flex; align-items: center; justify-content: space-around;
  background: var(--nav-bg, color-mix(in srgb, var(--bg) 86%, transparent));
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-top: 1px solid var(--divider);
  position: relative; z-index: 10; flex-shrink: 0;
}
.nav-item {
  flex: 1; height: 100%; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 3px;
  color: var(--text-light); font-size: 10px; font-weight: 500;
  transition: color 0.2s; cursor: pointer;
  position: relative;
}
.nav-item.active { color: var(--brand); }
.nav-item .ico { font-size: 19px; line-height: 1; display: flex; align-items: center; justify-content: center; }
.nav-item.camera { position: relative; }
.nav-item.camera .cam-btn {
  width: 54px; height: 54px; border-radius: 50%;
  background: var(--brand); display: flex; align-items: center; justify-content: center;
  font-size: 24px; margin-top: -22px;
  box-shadow: var(--shadow-fab); transition: transform 0.15s ease; color: white;
}
.nav-item.camera .cam-btn:active { transform: scale(0.92); }
.nav-item .badge {
  position: absolute; top: 8px; right: 28%;
  min-width: 16px; height: 16px; border-radius: 8px;
  background: #E85D5D; color: white; font-size: 10px; font-weight: 600;
  display: flex; align-items: center; justify-content: center;
  padding: 0 5px; border: 2px solid var(--bg);
}

/* ============================================================
   相机页（iOS 风格）
   ============================================================ */
.page-camera-ios {
  background: var(--bg); color: var(--text-primary);
  flex-direction: column; overflow: hidden;
  /* 注意：不可在此写 display:flex，否则会压过 .page{display:none} 导致相机页永久覆盖其他页面 */
}
.cam-top {
  height: calc(44px + var(--safe-top)); display: flex; align-items: center; justify-content: space-between;
  padding: calc(12px + var(--safe-top)) 20px 0; flex-shrink: 0;
}
.cam-icon-btn {
  position: relative;
  width: 32px; height: 32px; border-radius: 50%;
  background: #FFFFFF; border: 1px solid var(--divider);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; color: var(--text-primary);
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  cursor: pointer; transition: all 0.2s;
}
.cam-tip { display: none; }
.cam-icon-btn:hover .cam-tip, .cam-icon-btn:active .cam-tip { display: inline; font-size: 10px; color: var(--text-light); margin-left: 4px; }
.cam-right-group { display: flex; gap: 6px; }
.cam-arrow { font-size: 22px; line-height: 1; color: var(--text-secondary); }
.cam-icon-btn:active { background: var(--brand-bg); transform: scale(0.92); }
.cam-mode-tabs { display: flex; gap: 20px; font-size: 13px; color: var(--text-light); }
.cam-mode-tabs span { cursor: pointer; transition: color 0.2s; padding: 4px 2px; }
.cam-mode-tabs .active { color: var(--text-primary); font-weight: 600; font-size: 14px; }
#cam-mode-live.active { color: #C9A227; }
#cam-mode-live.active::after { background: #E6C34A; }
.cam-mode-tabs .active::after {
  content: ''; display: block; width: 4px; height: 4px;
  background: var(--brand); border-radius: 50%;
  margin: 4px auto 0;
}

/* 取景器 */
.cam-viewfinder {
  flex: 1; margin: 12px 16px;
  border-radius: 18px; position: relative; overflow: hidden;
  background: #1A1A1A;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04), inset 0 0 0 1px var(--divider);
}
#cam-preview {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  background: #111;
  z-index: 0;
  /* 变焦：与 getCameraCrop 的裁剪倍数保持一致，所见即所得 */
  transform: scale(var(--cam-zoom, 1));
  transform-origin: 50% 50%;
  transition: transform 0.18s ease-out;
  will-change: transform;
}
#cam-preview.mirror { transform: scaleX(-1) scale(var(--cam-zoom, 1)); }
/* 捏合时不加过渡，跟手 */
.cam-viewfinder.pinching #cam-preview { transition: none; }

/* 变焦条：取景器底部居中一条细滑条；1×/2×/3× 提示平时隐藏，
   用户拖动/捏合时才浮出，停手约 1.4s 后自动淡去 */
.cam-zoom {
  position: absolute;
  left: 50%; bottom: 20px;
  transform: translateX(-50%);
  z-index: 6;
  display: flex; flex-direction: column; align-items: center;
  opacity: 1;
  transition: opacity 0.2s ease;
  pointer-events: none;
}
.cam-viewfinder:not(.live) .cam-zoom { opacity: 0; }
/* 刻度提示 */
.cam-zoom-ticks {
  position: relative;
  width: 116px; height: 15px; margin-bottom: 8px;
  opacity: 0; transform: translateY(5px);
  transition: opacity 0.18s ease, transform 0.18s ease;
  pointer-events: none;
}
.cam-zoom.ticks-on .cam-zoom-ticks { opacity: 1; transform: none; pointer-events: auto; }
.cam-zoom-tick {
  position: absolute; top: 0;
  padding: 0 2px; border: 0; background: none;
  font-size: 10px; font-weight: 600; letter-spacing: 0.2px;
  color: rgba(255, 255, 255, 0.6);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.55);
  transform: translateX(-50%) scale(1);
  transition: color 0.16s ease, transform 0.16s ease;
  cursor: pointer;
}
.cam-zoom-tick:nth-child(1) { left: 0; }
.cam-zoom-tick:nth-child(2) { left: 50%; }
.cam-zoom-tick:nth-child(3) { left: 100%; }
.cam-zoom-tick.on { color: #FFFFFF; transform: translateX(-50%) scale(1.14); }
/* 滑条本体：2px 细线 + 小圆点 */
.cam-zoom-slider {
  -webkit-appearance: none; appearance: none;
  width: 116px; height: 16px;
  background: transparent;
  cursor: pointer;
  pointer-events: auto;
  touch-action: pan-y;
}
.cam-zoom-slider::-webkit-slider-runnable-track {
  height: 2px; border-radius: 1px;
  background: rgba(255, 255, 255, 0.42);
  box-shadow: 0 0 3px rgba(0, 0, 0, 0.4);
}
.cam-zoom-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 8px; height: 8px; margin-top: -3px;
  border-radius: 50%; background: #FFFFFF;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
  transition: width 0.16s ease, height 0.16s ease, margin-top 0.16s ease;
}
.cam-zoom.ticks-on .cam-zoom-slider::-webkit-slider-thumb {
  width: 10px; height: 10px; margin-top: -4px;
}
.cam-zoom-slider::-moz-range-track {
  height: 2px; border-radius: 1px;
  background: rgba(255, 255, 255, 0.42);
  box-shadow: 0 0 3px rgba(0, 0, 0, 0.4);
}
.cam-zoom-slider::-moz-range-thumb {
  width: 8px; height: 8px; border: 0; border-radius: 50%;
  background: #FFFFFF;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
}
#cam-capture-canvas,
#cam-live-buf { display: none; }
#cam-live-encode {
  position: fixed;
  left: -9999px;
  top: 0;
  width: 2px;
  height: 2px;
  opacity: 0.01;
  pointer-events: none;
}
.cam-live-badge {
  display: none;
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 7;
  min-width: 42px;
  height: 20px;
  padding: 0 7px;
  border: 1.2px solid #E6C34A;
  border-radius: 4px;
  color: #E6C34A;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.2px;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.28);
  pointer-events: none;
}
.cam-viewfinder.live-mode .cam-live-badge { display: flex; }
.cam-viewfinder.live-capturing .cam-live-badge {
  color: #111;
  background: #E6C34A;
  border-color: #E6C34A;
  animation: liveBadgePulse 0.7s ease-in-out infinite;
}
@keyframes liveBadgePulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; }
}
.cam-shutter-flash {
  position: absolute; inset: 0;
  background: #fff; opacity: 0;
  pointer-events: none; z-index: 6;
}
.cam-shutter-flash.pop { animation: camFlashPop 0.18s ease-out; }
@keyframes camFlashPop {
  0% { opacity: 0.88; }
  100% { opacity: 0; }
}
.cam-viewfinder.live .cam-placeholder { display: none; }
.cam-viewfinder.live .cam-grid .gv,
.cam-viewfinder.live .cam-grid .gh { background: rgba(255, 255, 255, 0.22); }
.focus-ring {
  position: absolute;
  width: 80px; height: 80px;
  border: 1.5px solid #D4A860;
  border-radius: 4px;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.6);
  transition: transform 0.2s ease-out, opacity 0.2s;
  z-index: 5;
}
.focus-ring.show {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
  transition: transform 0.2s ease-out, opacity 0.15s;
}
.focus-ring.locked {
  transform: translate(-50%, -50%) scale(0.9);
  border-color: var(--brand);
  transition: transform 0.4s ease-out, border-color 0.3s;
}

.cam-grid { position: absolute; inset: 0; pointer-events: none; }
.cam-grid .gv {
  position: absolute; top: 0; bottom: 0; width: 1px;
  background: rgba(0, 0, 0, 0.05);
}
.cam-grid .gv:nth-child(1) { left: 33.33%; }
.cam-grid .gv:nth-child(2) { left: 66.66%; }
.cam-grid .gh {
  position: absolute; left: 0; right: 0; height: 1px;
  background: rgba(0, 0, 0, 0.05);
}
.cam-grid .gh:nth-child(3) { top: 33.33%; }
.cam-grid .gh:nth-child(4) { top: 66.66%; }
.cam-focus-ring {
  position: absolute; width: 72px; height: 72px;
  border: 1.5px solid var(--brand); border-radius: 4px;
  animation: focusRingPulse 2.4s ease-in-out infinite;
  opacity: 0.6;
}
@keyframes focusRingPulse {
  0%, 100% { transform: scale(1); opacity: 0.4; }
  50% { transform: scale(1.1); opacity: 0.8; }
}
.cam-placeholder {
  text-align: center; color: rgba(255, 255, 255, 0.78);
  position: relative; z-index: 8;
  pointer-events: none;
  padding: 16px;
}
.cam-placeholder.error { pointer-events: auto; }
.cam-placeholder .big-icon {
  font-size: 60px; margin-bottom: 14px;
  filter: drop-shadow(0 4px 16px rgba(168, 181, 160, 0.4));
  animation: floatEmoji 3s ease-in-out infinite;
}
@keyframes floatEmoji {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
.cam-placeholder .hint {
  font-size: 12px; letter-spacing: 3px;
  font-family: "Kaiti SC", "STKaiti", serif;
}
.cam-placeholder .sub-hint {
  font-size: 10px; color: rgba(255, 255, 255, 0.45);
  margin-top: 8px; letter-spacing: 1px;
}
.cam-retry-btn {
  display: none;
  margin: 16px auto 0;
  padding: 10px 18px;
  border-radius: 20px;
  background: var(--brand);
  color: white;
  font-size: 13px;
  pointer-events: auto;
  z-index: 9;
  position: relative;
}
.cam-placeholder.error .cam-retry-btn { display: inline-flex; }
.polaroid-photo.has-image,
.cam-thumb.has-image,
.tl-entry .tl-polaroid .photo.has-image {
  font-size: 0;
  background: #E8E4DC;
}
.polaroid-photo .node-shot,
.cam-thumb .node-shot,
.tl-entry .tl-polaroid .photo .node-shot,
.polaroid-photo .node-live,
.cam-thumb .node-live,
.tl-entry .tl-polaroid .photo .node-live {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  z-index: 1;
}
.polaroid-photo .node-live,
.cam-thumb .node-live,
.tl-entry .tl-polaroid .photo .node-live {
  z-index: 3;
  opacity: 0;
  pointer-events: none;
}
.polaroid-photo.live-playing .node-live,
.cam-thumb.live-playing .node-live,
.tl-entry .tl-polaroid .photo.live-playing .node-live {
  opacity: 1;
}
.live-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 30;
  padding: 3px 7px;
  border: 1.2px solid #E6C34A;
  border-radius: 4px;
  color: #E6C34A;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.2px;
  background: rgba(0, 0, 0, 0.45);
  pointer-events: none;
}
.polaroid-photo.has-live,
.cam-thumb.has-live,
.tl-entry .tl-polaroid .photo.has-live {
  touch-action: none;
}
.cam-thumb .live-badge { top: 4px; left: 4px; transform: scale(0.82); transform-origin: top left; }
.capture-polaroid #capture-photo .node-live {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.capture-polaroid #capture-photo .live-badge {
  z-index: 30;
}
.polaroid-photo::after,
.tl-entry .tl-polaroid .photo::after {
  z-index: 2;
  pointer-events: none;
}

/* 模式选择条 */
.cam-mode-strip {
  height: 32px; display: flex; justify-content: center; gap: 28px;
  align-items: center; font-size: 12px; color: var(--text-light);
  flex-shrink: 0; padding-bottom: 6px;
}
.cam-mode-strip span { cursor: pointer; transition: color 0.2s; }
.cam-mode-strip .active { color: var(--brand-dark); font-weight: 600; font-size: 13px; }

/* 底部控制区 */
.cam-bottom {
  min-height: 130px; height: auto; display: flex; justify-content: space-between;
  align-items: center; padding: 12px 32px calc(24px + var(--safe-bottom));
  flex-shrink: 0;
}
.cam-thumb {
  width: 50px; height: 50px; border-radius: 10px;
  background: linear-gradient(135deg, #A8B5A0, #8E9B86);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; cursor: pointer; overflow: hidden;
  position: relative; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: transform 0.15s ease;
}
.cam-thumb:active { transform: scale(0.92); }
.cam-thumb.empty {
  background: #FFFFFF;
  border: 1.5px solid var(--divider);
  font-size: 18px;
  color: var(--text-light);
}
.cam-thumb .ui-icon { width: 22px; height: 22px; }
.comment-entry .ui-icon { width: 15px; height: 15px; }
.cam-shutter-wrap { position: relative; }
.cam-shutter {
  width: 76px; height: 76px; border-radius: 50%;
  background: white; cursor: pointer; transition: transform 0.1s;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 0 4px rgba(168, 181, 160, 0.25), 0 4px 14px rgba(168, 181, 160, 0.35);
}
.cam-shutter:active { transform: scale(0.92); }
.cam-shutter .inner {
  width: 64px; height: 64px; border-radius: 50%;
  background: white; border: 2.5px solid var(--brand);
  transition: all 0.1s;
}
.cam-shutter.live-on .inner {
  border-color: #E6C34A;
}
.cam-shutter.recording .inner {
  width: 28px; height: 28px; border-radius: 6px;
  background: var(--brand); border-color: white;
}
.cam-shutter.live-on.recording .inner {
  background: #E6C34A;
}
.cam-mic {
  width: 50px; height: 50px; border-radius: 50%;
  background: #FFFFFF; border: 1px solid var(--divider);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; color: var(--text-primary); cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  transition: all 0.2s, transform 0.15s ease;
}
.cam-mic:active { background: var(--brand-bg); transform: scale(0.92); }

/* 封面拍摄模式横幅 */
.cam-cover-banner {
  margin: 0 20px 6px;
  padding: 9px 14px;
  background: var(--brand-light);
  border: 1px solid var(--brand);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--brand-dark);
  flex-shrink: 0;
  animation: sheetUp 0.25s ease;
}
.cam-cover-banner .cancel {
  color: var(--text-light);
  font-size: 12px;
  cursor: pointer;
  padding: 2px 6px;
}
.cam-cover-banner .cancel:active { color: var(--text-primary); }

/* ============================================================
   拍照后编辑弹窗（照片下边框：语音 + 文本）
   ============================================================ */
.capture-polaroid {
  padding-bottom: 14px;
  overflow-y: auto;
  max-height: 90%;
}
.capture-polaroid #capture-photo {
  aspect-ratio: auto;
  height: auto;
  min-height: 140px;
  background: #1c1c1c;
  overflow: hidden;
}
.capture-polaroid #capture-photo.has-image {
  font-size: 0;
  background: #1c1c1c;
}
.capture-polaroid #capture-photo .node-shot {
  position: relative;
  inset: auto;
  width: 100%;
  height: auto;
  max-height: min(56vh, 460px);
  object-fit: contain;
  object-position: center;
  display: block;
}
.capture-polaroid .polaroid-photo::after { display: none; }
.capture-caption-bar {
  display: flex; align-items: flex-start; gap: 10px;
  margin: 12px 14px 0; padding: 10px 12px;
  background: var(--bg);
  border: 1px solid var(--divider);
  border-radius: 12px;
}
.capture-mic-btn {
  width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0;
  background: #FFFFFF; border: 1px solid var(--divider);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  transition: all 0.2s, transform 0.15s ease;
  position: relative;
}
.capture-mic-btn:active { transform: scale(0.9); background: var(--brand-bg); }
.capture-mic-btn.has-voice {
  background: var(--brand); border-color: var(--brand);
  box-shadow: 0 2px 10px rgba(168, 181, 160, 0.45);
}
.capture-mic-btn.has-voice::after {
  content: '✓'; position: absolute; top: -4px; right: -4px;
  width: 16px; height: 16px; border-radius: 50%;
  background: #D4A860; color: #fff;
  font-size: 10px; line-height: 16px; text-align: center;
}
#capture-text-input {
  flex: 1; border: none; outline: none; resize: none;
  background: transparent; min-height: 40px; max-height: 90px;
  font-size: 14px; line-height: 1.6; color: var(--text-primary);
  font-family: inherit;
}
#capture-text-input::placeholder { color: var(--text-secondary); }
.capture-actions {
  display: flex; gap: 10px; margin: 12px 14px 0;
}
.capture-actions .btn { flex: 1; }
.capture-tags {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 10px 14px 0;
}
.capture-tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.capture-tags .tag,
.capture-tag-row .preset {
  padding: 4px 10px;
  background: var(--tag-bg);
  border-radius: var(--radius-tag);
  font-size: 11px;
  color: var(--text-secondary);
  cursor: pointer;
}
.capture-tag-row .preset:active { opacity: 0.75; }
.capture-tag-row .preset.on {
  background: var(--brand-light);
  color: var(--brand-dark);
  font-weight: 600;
}
.capture-add-btn {
  padding: 4px 12px;
  border: 1.5px dashed var(--brand);
  border-radius: var(--radius-tag);
  color: var(--brand);
  background: transparent;
  font-size: 11px;
  cursor: pointer;
  line-height: 1.4;
}
.capture-add-btn:active { opacity: 0.7; }
.capture-add-btn.open {
  border-style: solid;
  background: var(--brand-bg);
}
.capture-tag-row .tag-input {
  width: 72px;
}

/* ============================================================
   我的节点页 - 棕色时间轴
   ============================================================ */
.brown-timeline {
  position: relative;
  padding: 16px 20px 32px 76px;
}
.brown-timeline::before {
  content: '';
  position: absolute;
  left: 60px;
  top: 24px;
  bottom: 24px;
  width: 2px;
  background: linear-gradient(to bottom,
    transparent 0%,
    var(--brown) 8%,
    var(--brown) 92%,
    transparent 100%);
}
/* 时间轴顶部「+」：相册 / 实时拍摄 快捷新建（圆心与时间轴轨道对齐） */
.tl-add-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px 2px 45px;
}
.tl-add-btn {
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--card);
  border: 1.5px dashed var(--brown);
  color: var(--brown);
  box-shadow: var(--shadow-card);
  transition: transform 0.15s ease, background 0.15s ease;
}
.tl-add-btn svg { width: 16px; height: 16px; display: block; }
.tl-add-btn:active { transform: scale(0.88); background: var(--tag-bg); }
.tl-add-hint {
  font-size: 12px;
  color: var(--text-light);
  letter-spacing: 0.5px;
}
.tl-entry {
  position: relative;
  margin-bottom: 22px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  animation: tlEntryIn 0.4s ease-out backwards;
}
@keyframes tlEntryIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.tl-entry .tl-dot {
  position: absolute;
  left: -22px;
  top: 14px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: white;
  border: 2px solid var(--brown);
  box-shadow: 0 0 0 3px var(--bg);
  z-index: 1;
}
.tl-entry .tl-info {
  flex: 0 0 50px;
  text-align: right;
  padding-top: 10px;
}
.tl-entry .tl-time {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}
.tl-entry .tl-date {
  font-size: 10px;
  color: var(--text-light);
  margin-top: 2px;
}
.tl-entry .tl-tag-row {
  display: flex;
  gap: 3px;
  justify-content: flex-end;
  margin-top: 4px;
  flex-wrap: wrap;
}
.tl-entry .tl-tag {
  font-size: 9px;
  padding: 2px 6px;
  background: var(--tag-bg);
  border-radius: 6px;
  color: var(--text-secondary);
}
.tl-entry .tl-mood {
  background: var(--brand-light);
  color: var(--brand-dark);
}
.tl-entry .tl-polaroid {
  width: 92px;
  background: white;
  padding: 6px 6px 18px;
  border-radius: 2px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: transform 0.15s ease;
  position: relative;
}
.tl-entry .tl-polaroid:active { transform: scale(0.96); }
.tl-swipe .tl-polaroid:active { transform: none; }
.tl-swipe,
.tl-swipe-card,
.tl-polaroid {
  -webkit-tap-highlight-color: transparent;
  outline: none;
}
.tl-entry .tl-polaroid .photo {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 1px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  filter: saturate(0.85);
  position: relative;
  overflow: hidden;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.tl-entry .tl-polaroid .photo.has-image {
  font-size: 0;
  filter: saturate(1);
}
.tl-entry .tl-polaroid .photo::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(0, 0, 0, 0.05));
}
.tl-entry .tl-polaroid .voice-dot {
  position: absolute;
  top: 10px; right: 10px;
  z-index: 3;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 8px;
  color: var(--brown);
}
.tl-entry .tl-polaroid .comment-count {
  position: absolute;
  bottom: 6px; right: 6px;
  z-index: 3;
  font-size: 9px;
  line-height: 1.2;
  color: #fff;
  font-family: inherit;
  background: rgba(40, 32, 20, 0.58);
  padding: 2px 6px;
  border-radius: 8px;
  pointer-events: none;
  white-space: nowrap;
}
.tl-entry .tl-text {
  font-size: 12px;
  color: var(--text-primary);
  line-height: 1.5;
  padding-top: 10px;
  flex: 1;
  font-family: "Kaiti SC", "STKaiti", serif;
  font-style: italic;
  opacity: 0.85;
}

/* 时间轴白框相纸：左滑删除 */
.tl-swipe {
  position: relative;
  flex-shrink: 0;
  width: 92px;
  overflow: hidden;
  border-radius: 2px;
  background: transparent;
}
.tl-swipe .tl-del {
  position: absolute;
  right: 0; top: 0; bottom: 0;
  width: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  z-index: 0;
  background: #E85D5D;
}
.tl-swipe-card {
  position: relative;
  z-index: 1;
  width: 92px;
  transition: transform 0.2s ease;
  touch-action: pan-y;
}
.tl-swipe .tl-polaroid { box-shadow: none; }

/* ============================================================
   日历网格页
   ============================================================ */

.cal-month-switcher {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 20px; gap: 12px;
  background: rgba(168, 181, 160, 0.05); border-radius: 12px; margin: 12px 16px;
}
.cal-month-btn {
  width: 36px; height: 36px; border-radius: 50%;
  background: white; border: 1px solid var(--divider);
  font-size: 14px; color: var(--text-primary); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
}
.cal-month-btn:hover { background: var(--brand-bg); color: var(--brand-dark); }
.cal-month-btn:active { transform: scale(0.92); }
.cal-month-label { text-align: center; flex: 1; }
.cal-month-title { display: block; font-size: 16px; font-weight: 600; color: var(--text-primary); }
.cal-month-sub { display: block; font-size: 11px; color: var(--text-light); margin-top: 2px; letter-spacing: 0.5px; }

.calendar-scroll {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 32px;
}
.calendar-scroll::-webkit-scrollbar { display: none; }

/* 年份横向滑动筛选条 */
.year-strip {
  display: flex;
  gap: 8px;
  padding: 10px 20px 12px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  flex-shrink: 0;
}
.year-strip::-webkit-scrollbar { display: none; }
.year-chip {
  flex-shrink: 0;
  padding: 7px 16px;
  border-radius: 18px;
  background: #FFFFFF;
  border: 1px solid var(--divider);
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}
.year-chip:active { transform: scale(0.94); }
.year-chip.active {
  background: var(--brand);
  border-color: var(--brand);
  color: #FFFFFF;
  font-weight: 600;
  box-shadow: 0 2px 10px rgba(168, 181, 160, 0.4);
}

.cal-section {
  margin-bottom: 24px;
}
.cal-section-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 16px 20px 8px;
}
.cal-section-header .year-month {
  font-size: 18px;
  font-weight: 500;
  color: var(--text-primary);
  font-family: "Kaiti SC", serif;
  letter-spacing: 1px;
}
.cal-section-header .count {
  font-size: 11px;
  color: var(--text-light);
}
.cal-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  padding: 0 14px 6px;
  gap: 4px;
}
.cal-weekday {
  text-align: center;
  font-size: 10px;
  color: var(--text-light);
  padding: 4px 0;
  letter-spacing: 0.5px;
}
.cal-weekday.weekend { color: var(--brand-dark); }

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  padding: 0 14px;
  gap: 4px;
}
.cal-day {
  aspect-ratio: 1;
  border-radius: 8px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  padding: 4px 6px;
  cursor: pointer;
  transition: transform 0.15s ease;
  background: var(--card);
  border: 1px solid transparent;
}
.cal-day:active { transform: scale(0.94); }
.cal-day.no-photo {
  background: transparent;
  border: 1px solid var(--divider);
}
.cal-day.no-photo .day-num {
  font-size: 13px;
  color: var(--text-primary);
  align-self: center;
  justify-self: center;
  margin: auto;
}
.cal-day.has-photo {
  background-size: cover;
  background-position: center;
  align-items: center;
  justify-content: center;
}
.cal-day.has-photo .day-num {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  color: #111;
  text-shadow: 0 0 5px rgba(255, 255, 255, 0.95), 0 1px 2px rgba(255, 255, 255, 0.85);
  font-variant-numeric: tabular-nums;
}
.cal-day.has-photo .photo-count {
  position: absolute;
  top: 4px;
  right: 4px;
  background: rgba(0, 0, 0, 0.55);
  color: white;
  font-size: 9px;
  padding: 1px 5px;
  border-radius: 6px;
  font-weight: 600;
  text-shadow: none;
}
.cal-day.has-photo .overlap-mark {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 16px;
  height: 16px;
  background: var(--brand);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  color: white;
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}
.cal-day.today {
  border: 2px solid var(--brand);
}
.cal-day.selected {
  border: 2px solid var(--text-primary);
}

/* ============================================================
   标签网格 / 心情网格（缩略封面即文字，不可自定义修改）
   ============================================================ */
.lex-legend {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 12px 16px 2px; font-size: 11px; color: var(--text-light);
}
.lex-legend-title { font-size: 13px; font-weight: 600; color: var(--text-primary); }
.lex-legend-desc { font-size: 10.5px; color: var(--text-light); }
.lex-legend-item { display: inline-flex; align-items: center; gap: 4px; }
.lex-legend-item i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }

.lex-day {
  flex-direction: column; align-items: flex-start; justify-content: flex-start;
  padding: 3px 4px; gap: 1px;
}
.lex-day .day-num { font-size: 10px; line-height: 1.2; color: var(--text-secondary); font-weight: 700; }
.lex-tag-day { background: var(--brand-bg); }
.lex-tag-day .day-num { color: var(--brand-dark); }
.lex-tags { display: flex; flex-direction: column; gap: 1px; width: 100%; overflow: hidden; }
.lex-tags i {
  font-style: normal; font-size: 9.5px; line-height: 1.25; color: var(--brand-dark);
  background: rgba(255, 255, 255, 0.72); border-radius: 4px; padding: 1px 4px;
  text-align: center;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.lex-tags em { font-style: normal; font-size: 8px; color: var(--text-light); }

.lex-mood-day .day-num { color: rgba(255, 255, 255, 0.85); }
.lex-mood {
  width: 100%; font-size: 9.5px; font-weight: 700; line-height: 1.25; color: #fff;
  text-align: center; margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.lex-mood-day.pol-pos { background: #F4633A; }
.lex-mood-day.pol-neg { background: #3B6FF5; }
.lex-mood-day.pol-neu { background: #1F1F1F; }
.lex-empty { text-align: center; padding: 60px 20px; color: var(--text-light); font-size: 12px; }
.mood-dot { width: 11px; height: 11px; border-radius: 50%; display: inline-block; vertical-align: middle; }

/* 顶部导航右侧动作区（搜索 / 返回） */
.top-nav .nav-actions { display: flex; align-items: center; gap: 2px; margin-right: -8px; }

/* ---------------- 标签 / 心情搜索筛选 ----------------
   命中格满色高亮、格内只显示被筛选的那个词；
   未命中但当天有记录 → 中性淡底 + 灰字显示当天自己的词（不再是几乎空白的灰块）；
   当天完全没有记录 → 只留日号，最淡一层 */
.lex-day.lex-dim,
.lex-tag-day.lex-dim { background: var(--card); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.05); }
.lex-day.lex-dim .day-num { color: var(--text-light); font-weight: 600; }
.lex-tag-day.lex-dim .lex-tags i { background: transparent; color: var(--text-secondary); padding: 0; opacity: 0.75; }
.lex-mood-day.lex-dim .lex-mood { color: var(--text-secondary); font-weight: 600; opacity: 0.75; }
.lex-day.lex-dim-empty { background: transparent; }
.lex-day.lex-dim-empty .day-num { color: var(--text-light); font-weight: 600; opacity: 0.78; }
.lex-tag-day.lex-dim-empty .lex-tags i { background: transparent; color: var(--text-light); padding: 0; opacity: 0.42; }
.lex-mood-day.lex-dim-empty .lex-mood { color: var(--text-light); font-weight: 600; opacity: 0.42; }
.lex-tag-day.lex-hit { background: var(--brand); }
.lex-tag-day.lex-hit .day-num { color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.24); }
.lex-tag-day.lex-hit .lex-tags i {
  background: rgba(255, 255, 255, 0.94); color: var(--brand-dark);
  font-weight: 700; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
}
.lex-tag-day.lex-hit.today { border-color: rgba(255, 255, 255, 0.9); }
.lex-mood-day.lex-hit { box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.9); }
.lex-mood-day.lex-hit.today { border-color: rgba(255, 255, 255, 0.9); }
.lex-filter-chip {
  display: inline-flex; align-items: center; gap: 4px; flex-shrink: 0;
  padding: 2px 8px; border-radius: 999px; background: var(--brand); color: #fff;
  font-size: 11px; font-weight: 600; cursor: pointer;
}
.lex-filter-chip i { font-style: normal; font-size: 10px; opacity: 0.85; }

/* ---------------- 标签 / 心情搜索弹层 ---------------- */
.lex-search-modal {
  position: fixed; inset: 0; z-index: 2100; display: none;
  background: rgba(0, 0, 0, 0.38); align-items: flex-start; justify-content: center;
}
.lex-search-modal.show { display: flex; }
.lex-search-panel {
  width: 100%; max-width: 460px; margin: calc(62px + var(--safe-top)) 14px 0;
  max-height: 74vh; background: var(--card);
  border-radius: 18px; padding: 14px 14px 6px;
  display: flex; flex-direction: column; box-shadow: var(--shadow-polaroid);
  animation: tlibUp 0.22s ease;
}
.lex-search-head { display: flex; align-items: center; justify-content: space-between; }
.lex-search-title { font-size: 15px; font-weight: 700; color: var(--text-primary); }
.lex-search-close { width: 28px; height: 28px; border-radius: 50%; color: var(--text-light); font-size: 14px; }
.lex-search-input {
  width: 100%; height: 38px; margin-top: 10px; padding: 0 12px;
  border-radius: 12px; background: var(--tag-bg); color: var(--text-primary);
  font-size: 13px; border: 0; outline: none;
}
.lex-search-hint { font-size: 10.5px; color: var(--text-light); margin: 8px 2px 2px; line-height: 1.6; }
.lex-search-scope {
  font-size: 10.5px; color: var(--text-light); padding: 8px 4px 0;
  border-top: 1px solid var(--tag-bg); margin-top: 8px;
}
.lex-search-body { flex: 1; min-height: 0; overflow-y: auto; padding-bottom: 8px; }
.lex-search-group {
  font-size: 10.5px; font-weight: 700; color: var(--text-light);
  padding: 8px 4px 6px; letter-spacing: 0.04em;
}
.lex-search-item {
  display: flex; align-items: center; gap: 8px; padding: 9px 10px;
  border-radius: 10px; background: var(--tag-bg); margin-bottom: 6px; cursor: pointer;
}
.lex-search-item.on { box-shadow: inset 0 0 0 1.5px var(--brand); }
.lex-search-item:active { background: var(--brand-bg); }
.lex-search-hash { font-style: normal; width: 11px; font-size: 12px; font-weight: 700; color: var(--brand); text-align: center; }
.lex-search-word {
  flex: 1; min-width: 0; font-size: 13px; color: var(--text-primary);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.lex-search-days { flex-shrink: 0; font-size: 11px; color: var(--text-light); }
.lex-search-empty { text-align: center; padding: 26px 0; font-size: 12px; color: var(--text-light); }

/* ============================================================
   标签 / 心情管理弹层
   ============================================================ */
.tlib-modal {
  position: fixed; inset: 0; z-index: 2000; display: none;
  background: rgba(0, 0, 0, 0.38); align-items: flex-end; justify-content: center;
}
.tlib-modal.show { display: flex; }
.tlib-panel {
  width: 100%; max-width: 460px; max-height: 78vh; background: var(--card);
  border-radius: 20px 20px 0 0; padding: 16px 16px calc(14px + var(--safe-bottom, 0px));
  display: flex; flex-direction: column; box-shadow: var(--shadow-polaroid);
  animation: tlibUp 0.22s ease;
}
@keyframes tlibUp { from { transform: translateY(24px); opacity: 0.6; } to { transform: none; opacity: 1; } }
.tlib-head { display: flex; align-items: center; justify-content: space-between; }
.tlib-title { font-size: 15px; font-weight: 700; color: var(--text-primary); }
.tlib-close { width: 28px; height: 28px; border-radius: 50%; color: var(--text-light); font-size: 14px; }
.tlib-tabs { display: flex; gap: 6px; margin-top: 12px; }
.tlib-tabs button {
  flex: 1; height: 32px; border-radius: 10px; background: var(--tag-bg);
  color: var(--text-secondary); font-size: 12.5px; font-weight: 600;
}
.tlib-tabs button.on { background: var(--brand); color: #fff; }
.tlib-hint { font-size: 10.5px; color: var(--text-light); line-height: 1.6; margin: 10px 2px 8px; }
.tlib-list { flex: 1; min-height: 0; overflow-y: auto; touch-action: pan-y; }
.tlib-item {
  display: flex; align-items: center; gap: 8px; padding: 9px 10px;
  border-radius: 10px; background: var(--tag-bg); margin-bottom: 6px;
  transition: box-shadow 0.15s ease, transform 0.15s ease, opacity 0.15s ease;
}
.tlib-item.dragging {
  background: var(--card); box-shadow: 0 6px 18px rgba(0, 0, 0, 0.16);
  transform: scale(1.02); opacity: 0.96;
}
.tlib-grip { color: var(--text-light); font-size: 12px; cursor: grab; user-select: none; }
.tlib-name { flex: 1; min-width: 0; font-size: 13px; color: var(--text-primary); }
.tlib-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.tlib-del {
  width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0;
  background: rgba(232, 93, 93, 0.12); color: #E85D5D; font-size: 12px;
}
.tlib-del:active { background: rgba(232, 93, 93, 0.24); }
.tlib-pol { display: flex; gap: 5px; flex-shrink: 0; }
.pol-btn { width: 18px; height: 18px; border-radius: 50%; border: 2px solid transparent; padding: 0; }
.pol-btn.pos { background: #F4633A; }
.pol-btn.neg { background: #3B6FF5; }
.pol-btn.neu { background: #1F1F1F; }
.pol-btn.on { border-color: var(--text-primary); }
.pol-btn:not(.on) { opacity: 0.32; }
.tlib-empty { text-align: center; padding: 26px 0; font-size: 12px; color: var(--text-light); }
.tlib-foot { display: flex; gap: 10px; margin-top: 12px; }
.tlib-restore, .tlib-done {
  flex: 1; height: 40px; border-radius: 20px; font-size: 13px; font-weight: 600;
}
.tlib-restore { background: var(--tag-bg); color: var(--text-secondary); }
.tlib-done { background: var(--brand); color: #fff; }

/* 好友日历与普通日历的区别 */
.cal-day.friend-mode.has-photo {
  /* friend calendar: 保持图片 */
}
.cal-day.friend-mode .overlap-mark {
  background: #FF8C5A;
}
/* 好友切换器 */
.friend-switcher {
  display: flex; align-items: center; justify-content: center;
  padding: 8px 20px 4px; gap: 20px;
}
.friend-arrow {
  width: 32px; height: 32px; border: none; background: transparent;
  font-size: 14px; color: var(--text-secondary); cursor: pointer;
  border-radius: 50%; transition: background 0.2s;
}
.friend-arrow:active { background: var(--brand-bg); transform: scale(0.92); }
.friend-name {
  font-size: 17px; color: var(--text-primary);
  font-family: 'STKaiti', 'KaiTi', '楷体', serif;
  letter-spacing: 1px;
}

/* 重合度统计 */
.overlap-stat {
  margin: 6px 20px 4px; padding: 10px 14px;
  background: linear-gradient(135deg, rgba(212,168,96,0.12), rgba(212,168,96,0.04));
  border: 1px solid rgba(212,168,96,0.25);
  border-radius: 10px;
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; color: var(--text-secondary);
}
.overlap-icon { color: #D4A860; font-size: 14px; }
.overlap-stat b { color: #D4A860; font-weight: 600; }
.overlap-action {
  margin-left: auto; padding: 3px 10px;
  background: rgba(212,168,96,0.15); color: #8B6F47;
  border-radius: 12px; font-size: 11px; cursor: pointer;
  transition: background 0.2s;
}
.overlap-action:active { background: rgba(212,168,96,0.3); }
.overlap-action.active { background: #D4A860; color: white; }

/* 重合节点高亮（✨金色边框） */
.cal-day.friend-overlap .overlap-mark {
  background: linear-gradient(135deg, #D4A860, #B8923C) !important;
  color: white;
}
.cal-day.friend-overlap {
  box-shadow: inset 0 0 0 1.5px #D4A860, 0 2px 6px rgba(212,168,96,0.25);
}
.cal-day.friend-overlap::after {
  content: '✨'; position: absolute; top: 1px; right: 1px;
  font-size: 9px; z-index: 2;
}

/* 筛选模式 */
.cal-day.dimmed { opacity: 0.18; filter: saturate(0.4); }

/* ============================================================
   查找日历页 · 模式切换（节点日历 / 待办总览）
   ============================================================ */
.cal-mode-trigger {
  position: relative;
  display: inline-flex; align-items: center; gap: 5px;
  cursor: pointer; user-select: none;
}
.cal-mode-caret {
  width: 0; height: 0; display: inline-block;
  border-left: 4px solid transparent; border-right: 4px solid transparent;
  border-top: 5px solid currentColor; opacity: 0.6;
  transition: transform 0.18s ease;
}
.cal-mode-trigger.open .cal-mode-caret { transform: rotate(180deg); }
.cal-mode-menu {
  position: absolute; top: calc(100% + 6px); left: 0; z-index: 60;
  min-width: 132px; padding: 6px;
  background: var(--card); border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.16), 0 0 0 1px var(--border-color, rgba(0,0,0,0.06));
  display: none;
}
.cal-mode-menu.show { display: block; animation: calMenuIn 0.16s ease; }
@keyframes calMenuIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.cal-mode-menu button {
  display: block; width: 100%; text-align: left;
  padding: 9px 12px; border: none; border-radius: 8px;
  background: transparent; color: var(--text-primary);
  font-size: 13.5px; font-family: inherit; cursor: pointer;
}
.cal-mode-menu button:active { background: var(--tag-bg); }
.cal-mode-menu button.on { color: var(--brand); font-weight: 600; }
.cal-mode-menu button.on::after { content: "✓"; margin-left: 8px; }

/* ============================================================
   待办总览 · 日格状态（红色打勾 / 灰色未完成数）
   ============================================================ */
.cal-day.todo-day { display: flex; flex-direction: column; align-items: center; justify-content: center; }
.cal-day.todo-day .day-num {
  position: absolute; top: 3px; left: 5px;
  font-size: 10px; opacity: 0.75;
}
.cal-day.todo-done {
  background: linear-gradient(135deg, #FF8B72, #D93B27) !important;
  box-shadow: 0 3px 10px rgba(217, 59, 39, 0.28);
}
.cal-day.todo-done .day-num { color: #FFFFFF; }
.cal-day.todo-done .todo-mark { color: #FFFFFF; opacity: 1; }
.cal-day.todo-pending { background: var(--tag-bg) !important; }
.cal-day.todo-pending .todo-mark { color: var(--text-light); }
.cal-day .todo-mark {
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 700; line-height: 1;
  transform: translateY(2px);
}
.cal-day.todo-done .todo-mark svg { width: 22px; height: 22px; display: block; }
.cal-day.todo-today { box-shadow: 0 0 0 1.5px var(--brand) inset; }

/* 个人贴纸（待办连续达标奖励）：未获得时淡化 + 锁 */
.pe-sticker-cell.reward-locked img { opacity: 0.32; filter: grayscale(0.4); }
.pe-sticker-cell.reward-locked { cursor: default; }
.pe-series .pe-chip.personal-chip { position: relative; }


/* ============================================================
   单日时间轴页面
   ============================================================ */
.day-header {
  text-align: center;
  padding: 8px 20px 20px;
}
.day-header .day-title {
  font-size: 24px;
  font-weight: 400;
  font-family: "Kaiti SC", "STKaiti", serif;
  color: var(--text-primary);
  letter-spacing: 4px;
}
.day-header .day-sub {
  font-size: 12px;
  color: var(--text-light);
  margin-top: 6px;
  letter-spacing: 1px;
}
.day-stats {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 12px;
  font-size: 11px;
  color: var(--text-secondary);
}
.day-stats .stat {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ============================================================
   模态弹窗
   ============================================================ */
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 20, 20, 0.42);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  padding-left: calc(24px + var(--safe-left));
  padding-right: calc(24px + var(--safe-right));
}
.modal-backdrop.active {
  display: flex;
  animation: backdropFadeIn 0.25s ease-out;
}
@keyframes backdropFadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ============================================================
   白框相纸相纸
   ============================================================ */
.polaroid {
  width: 88%;
  max-width: 360px;
  max-height: 86%;
  background: white;
  border-radius: var(--radius-polaroid);
  box-shadow: var(--shadow-polaroid);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: polaroidIn 0.32s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
}
@keyframes polaroidIn {
  from { opacity: 0; transform: scale(0.9) translateY(20px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
.polaroid-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  z-index: 3;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}
.polaroid-photo {
  margin: 14px 14px 0;
  aspect-ratio: 1 / 1;
  border-radius: 2px;
  filter: saturate(0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 72px;
  position: relative;
  overflow: hidden;
}
.polaroid-photo::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(0, 0, 0, 0.06));
}
.polaroid-text {
  padding: 18px 22px 14px;
  font-size: 17px;
  line-height: 1.55;
  font-style: italic;
  color: var(--text-primary);
  font-family: "Kaiti SC", "STKaiti", "Kaiti", "Songti SC", "FangSong", serif;
  letter-spacing: 0.5px;
}
.polaroid-voice {
  margin: 0 18px 12px;
  padding: 10px 12px;
  background: var(--tag-bg);
  border-radius: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: background 0.2s;
}
.polaroid-voice:active { background: #E5E3DC; }
.polaroid-voice .play-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: var(--text-primary);
  flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}
.polaroid-voice .wave-bars {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 2px;
  height: 24px;
  overflow: hidden;
}
.polaroid-voice .bar {
  flex: 1;
  background: #C5C2BB;
  border-radius: 1px;
  transition: background 0.2s, transform 0.2s;
  transform-origin: center;
}
.polaroid-voice.playing .bar {
  background: var(--brand);
  animation: waveAnim 1.2s ease-in-out infinite;
}
.polaroid-voice.playing .bar:nth-child(2n) { animation-delay: 0.15s; }
.polaroid-voice.playing .bar:nth-child(3n) { animation-delay: 0.3s; }
.polaroid-voice.playing .bar:nth-child(5n) { animation-delay: 0.45s; }
@keyframes waveAnim {
  0%, 100% { transform: scaleY(0.4); }
  50% { transform: scaleY(1); }
}
.polaroid-voice .duration {
  font-size: 11px;
  color: var(--text-light);
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}
.polaroid-tags {
  padding: 0 20px 12px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.polaroid-tags .tag {
  padding: 4px 10px;
  background: var(--tag-bg);
  border-radius: var(--radius-tag);
  font-size: 11px;
  color: var(--text-secondary);
}
.polaroid-tags .mood {
  background: var(--brand-light);
  color: var(--brand-dark);
}
.polaroid-footer {
  padding: 12px 20px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--divider);
  margin-top: auto;
}
.polaroid-footer .timestamp {
  font-size: 11px;
  color: var(--text-light);
}
.polaroid-footer .comment-entry {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 12px;
  transition: background 0.2s;
}
.polaroid-footer .comment-entry:active { background: var(--brand-bg); }

/* ============================================================
   语音输入弹窗（微信风格）
   ============================================================ */
.voice-modal {
  position: absolute;
  inset: 0;
  z-index: 300;
  background: rgba(20, 20, 20, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: none;
  flex-direction: column;
  animation: backdropFadeIn 0.25s ease-out;
}
.voice-modal.active { display: flex; }
.voice-close {
  position: absolute;
  top: calc(16px + var(--safe-top));
  right: calc(16px + var(--safe-right));
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: white;
  z-index: 2;
}
.voice-close:active { transform: scale(0.9); }

.voice-stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0 32px;
  color: white;
}
.voice-icon-big {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 44px;
  margin-bottom: 24px;
  border: 2px solid rgba(255, 255, 255, 0.18);
  transition: all 0.3s ease;
}
.voice-modal.recording .voice-icon-big {
  background: rgba(168, 181, 160, 0.25);
  border-color: var(--brand);
  box-shadow: 0 0 40px rgba(168, 181, 160, 0.3);
  animation: voiceIconPulse 1.4s ease-in-out infinite;
}
@keyframes voiceIconPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}
.voice-stage .stage-title {
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 1px;
  margin-bottom: 8px;
}
.voice-stage .stage-sub {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.55);
  letter-spacing: 2px;
}
.voice-timer {
  font-size: 32px;
  font-weight: 200;
  font-variant-numeric: tabular-nums;
  margin-top: 24px;
  letter-spacing: 2px;
  opacity: 0;
  transition: opacity 0.3s;
}
.voice-modal.recording .voice-timer {
  opacity: 1;
}
.voice-wave {
  display: flex;
  align-items: center;
  gap: 3px;
  height: 36px;
  margin-top: 24px;
  opacity: 0;
  transition: opacity 0.3s;
}
.voice-modal.recording .voice-wave {
  opacity: 1;
}
.voice-wave .wb {
  width: 3px;
  background: var(--brand);
  border-radius: 2px;
  animation: voiceWBAnim 0.8s ease-in-out infinite;
}
@keyframes voiceWBAnim {
  0%, 100% { transform: scaleY(0.3); }
  50% { transform: scaleY(1); }
}

.voice-bottom {
  padding: 20px 24px calc(32px + var(--safe-bottom));
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(10px);
}
.voice-text-edit {
  display: none;
  margin-bottom: 16px;
  animation: slideUp 0.3s ease-out;
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
.voice-modal.editing .voice-text-edit { display: block; }
.voice-modal.recording .voice-text-edit { display: block; }
.voice-modal.recording .voice-text-edit .edit-actions { display: none; }
.voice-modal.editing .voice-record-area { display: none; }

.voice-text-edit textarea {
  width: 100%;
  min-height: 80px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  color: white;
  font-size: 14px;
  resize: none;
  line-height: 1.5;
  font-family: inherit;
}
.voice-text-edit textarea::placeholder {
  color: rgba(255, 255, 255, 0.35);
}
.voice-text-edit .edit-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}
.voice-text-edit .edit-actions .btn {
  flex: 1;
  height: 42px;
  font-size: 14px;
}
.voice-text-edit .save-btn {
  background: var(--brand);
  color: white;
}
.voice-text-edit .save-btn:active {
  background: var(--brand-dark);
}
.voice-text-edit .re-record-btn {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.voice-record-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.voice-record-btn {
  width: 100%;
  height: 56px;
  background: rgba(255, 255, 255, 0.1);
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  border-radius: 28px;
  color: white;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 2px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.voice-record-btn:active {
  background: rgba(255, 255, 255, 0.18);
  transform: scale(0.98);
}
.voice-modal.recording .voice-record-btn {
  background: var(--brand);
  border-color: var(--brand);
  animation: recordPulse 1.2s ease-in-out infinite;
}
@keyframes recordPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(168, 181, 160, 0.4); }
  50% { box-shadow: 0 0 0 8px rgba(168, 181, 160, 0); }
}
.voice-hint {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.4);
  letter-spacing: 1px;
}

/* ============================================================
   留言面板
   ============================================================ */
.comments-panel {
  position: absolute;
  left: 6%;
  right: 6%;
  bottom: calc(24px + var(--safe-bottom));
  width: 88%;
  max-height: 56%;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-radius: 16px;
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.1);
  display: none;
  flex-direction: column;
  animation: commentsSlideUp 0.32s cubic-bezier(0.32, 0.72, 0, 1);
  z-index: 200;
  overflow: hidden;
}
.comments-panel.active { display: flex; }
@keyframes commentsSlideUp {
  from { transform: translateY(100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
.comments-handle {
  width: 36px;
  height: 4px;
  background: var(--divider);
  border-radius: 2px;
  margin: 8px auto 0;
}
.comments-header {
  padding: 10px 20px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
}
.comments-header .close {
  color: var(--text-light);
  font-size: 12px;
  padding: 4px 8px;
  cursor: pointer;
  border-radius: 8px;
}
.comments-list {
  flex: 1;
  overflow-y: auto;
  padding: 4px 20px;
}
.comment-item {
  display: flex;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--divider);
  animation: commentFadeIn 0.25s ease-out;
}
@keyframes commentFadeIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}
.comment-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 12px;
  font-weight: 500;
}
.comment-content { flex: 1; min-width: 0; }
.comment-content .name { font-size: 12px; color: var(--text-secondary); font-weight: 500; }
.comment-content .text { font-size: 14px; color: var(--text-primary); margin-top: 3px; line-height: 1.4; }
.comment-content .time { font-size: 11px; color: var(--text-light); margin-top: 4px; }

/* 互动隐私：回复目标条 / 私密标记 / 回复按钮 */
.reply-bar {
  display: flex; align-items: center; justify-content: space-between;
  margin: 0 16px; padding: 8px 12px;
  background: var(--brand-bg);
  border-left: 3px solid var(--brand);
  border-radius: 8px;
  font-size: 12px; color: var(--text-secondary);
}
.reply-bar .reply-cancel { cursor: pointer; padding: 2px 6px; color: var(--text-light); }
.privacy-tag {
  font-size: 10px; color: var(--text-light);
  background: var(--brand-bg);
  padding: 1px 6px; border-radius: 8px;
  margin-left: 6px; font-weight: 400;
}
.reply-btn {
  color: var(--brand); cursor: pointer; margin-left: 8px;
  font-size: 11px; font-weight: 600;
}
.reply-btn.danger { color: #C2554F; }
.reply-btn:active { opacity: 0.6; }
.reply-ref { color: var(--brand); font-size: 13px; }
.comments-input {
  padding: 10px 12px calc(10px + var(--safe-bottom));
  border-top: 1px solid var(--divider);
  display: flex;
  gap: 8px;
  align-items: center;
  background: rgba(255, 255, 255, 0.6);
}
.comments-input .emoji-btn { font-size: 20px; padding: 4px; cursor: pointer; opacity: 0.7; }
.comments-input input {
  flex: 1;
  height: 36px;
  padding: 0 14px;
  background: var(--tag-bg);
  border-radius: 18px;
  font-size: 13px;
}
.comments-input .send-btn {
  padding: 0 14px;
  height: 36px;
  background: var(--brand);
  color: white;
  border-radius: 18px;
  font-size: 12px;
  font-weight: 500;
  opacity: 0.4;
  transition: opacity 0.2s ease, transform 0.15s ease;
}
.comments-input .send-btn.active { opacity: 1; }
.comments-input .send-btn.active:active { transform: scale(0.95); }

/* ============================================================
   消息页
   ============================================================ */
.messages-list {
  flex: 1;
  overflow-y: auto;
  padding: 0 16px;
}
/* 消息列表：分页加载与来源标识 */
.msg-load-more {
  text-align: center; padding: 14px; font-size: 12px;
  color: var(--brand); font-weight: 500; cursor: pointer;
}
.msg-load-more:active { opacity: 0.6; }
.msg-type-tag {
  display: inline-block; font-size: 10px; padding: 1px 6px; border-radius: 999px;
  background: var(--brand-bg); color: var(--brand);
  margin-left: 6px; font-weight: 500; vertical-align: middle;
}
.message-item {
  padding: 14px;
  background: var(--card);
  border-radius: var(--radius-card);
  margin-bottom: 8px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  cursor: pointer;
  transition: transform 0.15s ease;
  box-shadow: var(--shadow-card);
}
.message-item:active { transform: scale(0.99); }
.message-item.official-pin {
  border: 1px solid color-mix(in srgb, var(--brand) 35%, transparent);
  background: var(--brand-bg);
}
.sticker-tools {
  position: absolute;
  inset: 0;
  display: block;
  background: none;
  border-radius: 0;
  padding: 0;
  z-index: 8;
  /* 容器不拦截事件：空白区域穿透到贴纸本体（选中后仍可拖动），
     只有四个角按钮可点 */
  pointer-events: none;
}
.sticker-frame {
  position: absolute;
  inset: 0;
  border: 1.5px dashed #fff;
  pointer-events: none;
  /* 线宽由 JS 按 1.5/scale 反向补偿，贴纸放大后线宽视觉恒定 */
}
.sticker-tools button {
  position: absolute;
  width: 24px; height: 24px;
  border-radius: 50%;
  color: #2E2E2E;
  font-size: 14px;
  line-height: 22px;
  background: transparent;
  border: 1.5px solid #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,0.18);
  pointer-events: auto;
}
/* 四角手柄：左上缩小 −、右上删除 ×、左下旋转 ↻、右下放大 +
   按钮中心钉在贴纸可见边角，尺寸/朝向由 JS 反向补偿 */
.sticker-tools button[data-act="shrink"] { left: 0; top: 0; }
.sticker-tools button[data-act="del"]    { right: 0; top: 0; }
.sticker-tools button[data-act="rot"]    { left: 0; bottom: 0; }
.sticker-tools button[data-act="grow"]   { right: 0; bottom: 0; }
/* ============================================================
   好友私聊（微信式一对一聊天）
   ============================================================ */
.chat-wrap {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
}
.chat-list {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 12px 16px 16px;
}
.chat-bubble {
  max-width: 78%;
  padding: 10px 13px;
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.55;
  margin-bottom: 10px;
  white-space: pre-wrap;
  word-break: break-word;
  width: fit-content;
}
.chat-bubble.them { background: var(--card); color: var(--text-primary); box-shadow: var(--shadow-card); border-top-left-radius: 5px; }
.chat-bubble.me { background: var(--brand); color: #fff; margin-left: auto; border-top-right-radius: 5px; }
/* 对方消息：长按可举报该条内容（苹果 1.2 要求能对具体内容举报） */
.chat-bubble.them[data-msg-id] { cursor: pointer; -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
.chat-bubble.them[data-msg-id]:active { opacity: .82; }
/* 自己的消息：2 分钟内长按可撤回 */
.chat-bubble.me[data-msg-id] { cursor: pointer; -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
.chat-bubble.me[data-msg-id]:active { opacity: .82; }
/* 撤回提示：居中灰色系统行（微信式） */
.chat-revoked {
  text-align: center;
  font-size: 11px;
  color: var(--text-light);
  margin: 2px 0 10px;
  letter-spacing: .3px;
}
/* 自己的消息：左滑露出删除按钮（7 天内可删，无痕） */
.bubble-swipe {
  position: relative;
  display: flex;
  justify-content: flex-end;
  margin-bottom: 10px;
  overflow: hidden;
}
.bubble-swipe .chat-bubble.me {
  margin-bottom: 0;
  position: relative;
  z-index: 1;
  transition: transform .18s ease;
  will-change: transform;
}
.bubble-del {
  position: absolute;
  right: 3px; top: 3px; bottom: 3px;
  width: 62px;
  border: none;
  cursor: pointer;
  background: #E5484D;
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  font-family: inherit;
}
.bubble-swipe.open .chat-bubble.me { transform: translateX(-68px); }
/* 聊天时间分隔线：间隔 ≥10 分钟显示一次（微信式） */
.chat-time {
  text-align: center;
  font-size: 11px;
  color: var(--text-light);
  margin: 14px 0 10px;
  letter-spacing: .3px;
}
.chat-empty { text-align: center; font-size: 12px; color: var(--text-light); padding: 20px 0; }
.chat-input {
  display: flex;
  gap: 8px;
  padding: 10px 16px calc(12px + var(--safe-bottom));
  background: var(--card);
  border-top: 1px solid var(--divider);
}
.chat-input input {
  flex: 1;
  height: 40px;
  border-radius: 20px;
  background: var(--tag-bg);
  padding: 0 14px;
  font-size: 14px;
}
.chat-input button {
  height: 40px;
  padding: 0 16px;
  border-radius: 20px;
  background: var(--brand);
  color: #fff;
  font-size: 14px;
}
.chat-input button:disabled { opacity: 0.45; }

/* 消息页：好友会话条目（预览 / 未读） */
.msg-right { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; flex-shrink: 0; }
.msg-right .time { margin: 0; }
.msg-badge-dot {
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: #E85D5D; color: #fff; font-size: 11px; font-weight: 600;
  display: flex; align-items: center; justify-content: center;
  margin-left: auto; flex-shrink: 0;
}
.msg-section-title {
  font-size: 12px; color: var(--text-light); font-weight: 600;
  padding: 10px 4px 6px; letter-spacing: 0.3px;
}

/* ============================================================
   消息页置顶：TO DO 计划入口
   ============================================================ */
.todo-pin { margin-bottom: 8px; }
.todo-pin-badge {
  position: absolute; top: -3px; right: -3px; width: 9px; height: 9px;
  border-radius: 50%; background: #E85D5D; border: 2px solid var(--card);
  box-shadow: 0 0 0 1px rgba(232,93,93,0.25);
}
.todo-pin .avatar { position: relative; }

/* ============================================================
   计划页面（我的计划）
   ============================================================ */
.todo-head {
  padding: 16px 18px 10px; display: flex; align-items: flex-end; gap: 10px;
}
.todo-head .d { font-size: 22px; font-weight: 700; color: var(--text-primary); letter-spacing: 0.5px; }
.todo-head .w { font-size: 12px; color: var(--text-light); padding-bottom: 3px; }
.todo-progress {
  margin: 0 16px 10px; height: 6px; border-radius: 3px; background: var(--tag-bg); overflow: hidden;
}
.todo-progress i { display: block; height: 100%; background: var(--brand); border-radius: 3px; transition: width 0.25s ease; }
.todo-stat { margin: 0 16px 12px; font-size: 12px; color: var(--text-light); }
.todo-add {
  display: flex; gap: 8px; margin: 0 16px 14px;
  background: var(--card); border-radius: 14px; padding: 6px 6px 6px 14px;
  box-shadow: var(--shadow-card);
}
.todo-add input {
  flex: 1; height: 38px; font-size: 14px; background: transparent;
}
.todo-add button {
  height: 38px; padding: 0 16px; border-radius: 12px;
  background: var(--brand); color: #fff; font-size: 13px; font-weight: 600;
}
.todo-add button:active { opacity: 0.85; }
.todo-list { padding: 0 16px; }
/* 左滑删除：滑块是整行，滑开后露出的是一枚小巧的红色圆形删除键（不是整条红块） */
.todo-swipe {
  position: relative; margin-bottom: 8px; border-radius: 14px; overflow: hidden;
  background: var(--card); box-shadow: var(--shadow-card);
  transition: background 0.22s ease, box-shadow 0.22s ease;
}
.todo-swipe.done { box-shadow: none; }
.todo-swipe .todo-del {
  position: absolute; top: 0; right: 0; bottom: 0; width: 68px; z-index: 0;
  display: flex; align-items: center; justify-content: center;
  background: transparent; border: none; padding: 0; cursor: pointer;
}
.todo-swipe .todo-del span {
  width: 34px; height: 34px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(232, 93, 93, 0.13); color: #E85D5D;
  transition: background 0.15s ease, transform 0.15s ease;
}
.todo-swipe .todo-del:active span { background: rgba(232, 93, 93, 0.26); transform: scale(0.92); }
.todo-swipe .todo-del svg { width: 15px; height: 15px; display: block; }
.todo-row {
  position: relative; z-index: 1;
  display: flex; align-items: center; gap: 10px;
  padding: 13px 14px;
  background: var(--card);
  transition: background 0.22s ease, transform 0.18s ease;
}
.todo-row .todo-text {
  flex: 1; min-width: 0; font-size: 14px; line-height: 1.5;
  color: var(--text-primary); word-break: break-word;
  transition: color 0.2s ease, opacity 0.2s ease;
}
.todo-row .todo-edit {
  flex: 1; min-width: 0; font-size: 14px; background: transparent;
  border-bottom: 1px solid var(--brand); padding: 2px 0; color: var(--text-primary);
}

/* 已完成：整行变灰、文字划线，并沉到列表最底部 */
.todo-row.done { background: var(--tag-bg); }
.todo-row.done .todo-text {
  color: var(--text-light);
  text-decoration: line-through;
  text-decoration-thickness: 1.5px;
}
.todo-row.done .todo-toggle { opacity: 0.75; }
.todo-toggle {
  width: 46px; height: 27px; border-radius: 14px; flex-shrink: 0;
  background: var(--tag-bg); position: relative; cursor: pointer;
  transition: background 0.2s ease; border: none;
}
.todo-toggle i {
  position: absolute; top: 2.5px; left: 3px; width: 22px; height: 22px;
  border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,0.18);
  transition: transform 0.2s ease;
}
.todo-toggle.on { background: var(--brand); }
.todo-toggle.on i { transform: translateX(18px); }
.todo-empty { text-align: center; padding: 40px 20px; }
.todo-empty .e { font-size: 34px; }
.todo-empty .t { font-size: 14px; color: var(--text-light); margin-top: 10px; }
.todo-hint { text-align: center; font-size: 11px; color: var(--text-light); padding: 18px 16px 28px; }

/* ---------------- 计划页：分区标题 ---------------- */
.todo-sec-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 18px; margin: 2px 0 10px;
}
.todo-sec-head .t { font-size: 12px; font-weight: 600; color: var(--text-secondary); letter-spacing: 0.4px; }
.todo-sec-head .sub { font-size: 11px; color: var(--text-light); }
.todo-sec-add {
  height: 26px; padding: 0 12px; border-radius: 13px; border: none;
  background: var(--brand-light); color: var(--brand-dark);
  font-size: 12px; font-weight: 600; cursor: pointer;
}
.todo-sec-add:active { opacity: 0.8; }

/* ============================================================
   长期目标：置顶卡片
   ============================================================ */
.todo-goal-sec { margin-bottom: 16px; }
.todo-goals { padding: 0 16px; }

.goal-card {
  background: var(--card); border-radius: 14px; overflow: hidden;
  box-shadow: var(--shadow-card); margin-bottom: 9px;
  position: relative; transition: box-shadow 0.22s ease;
}
.goal-card::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--brand); opacity: 0.85;
}
.goal-card.done::before { background: var(--brand-dark); opacity: 1; }

/* 截止日期＝当前查看日期的目标：置顶 + 标亮 */
.goal-card.due-today {
  background: linear-gradient(180deg, var(--brand-light), var(--card) 78%);
  box-shadow: 0 0 0 1.5px var(--brand), 0 4px 14px rgba(168, 181, 160, 0.26);
}
.goal-card.due-today::before { width: 4px; opacity: 1; }
.goal-chip.due {
  background: var(--brand); color: #fff; font-weight: 700;
  animation: goalDuePulse 2.2s ease-in-out infinite;
}
@keyframes goalDuePulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.72; }
}

.goal-head {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 12px 12px 15px; cursor: pointer;
}
.goal-state {
  width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0;
  border: 2px solid var(--divider); background: transparent;
  color: #fff; padding: 0; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}
.goal-state svg { width: 15px; height: 15px; display: block; }
.goal-state.on { background: var(--brand); border-color: var(--brand); }
.goal-state.none { border-style: dashed; opacity: 0.75; }
.goal-state:active { transform: scale(0.9); }

.goal-main { flex: 1; min-width: 0; }
.goal-name {
  font-size: 14px; font-weight: 600; color: var(--text-primary);
  line-height: 1.45; word-break: break-word;
}
.goal-card.done .goal-name { color: var(--text-secondary); }
.goal-meta { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.goal-chip {
  font-size: 10.5px; line-height: 1.5; padding: 1px 7px; border-radius: 8px;
  background: var(--tag-bg); color: var(--text-light); white-space: nowrap;
}
.goal-chip.okc { background: var(--brand-light); color: var(--brand-dark); font-weight: 600; }
.goal-chip.muted { background: transparent; border: 1px dashed var(--divider); }

.goal-quick {
  flex-shrink: 0; height: 26px; padding: 0 10px; border-radius: 13px; border: none;
  background: var(--brand); color: #fff; font-size: 11.5px; font-weight: 600; cursor: pointer;
}
.goal-quick:active { opacity: 0.85; }
.goal-more {
  flex-shrink: 0; width: 26px; height: 26px; border: none; background: transparent;
  color: var(--text-light); font-size: 17px; line-height: 1; cursor: pointer;
}
.goal-caret { flex-shrink: 0; color: var(--text-light); font-size: 11px; transition: transform 0.2s ease; }
.goal-card.open .goal-caret { transform: rotate(180deg); }

.goal-body { display: none; padding: 0 12px 12px 15px; }
.goal-card.open .goal-body { display: block; }
.goal-tasks { margin-bottom: 8px; }

.goal-task-swipe {
  position: relative; border-radius: 10px; overflow: hidden; margin-bottom: 6px;
  background: var(--tag-bg);
}
.goal-task-swipe .goal-task-del {
  position: absolute; top: 0; right: 0; bottom: 0; width: 62px; z-index: 0;
  border: none; background: transparent; padding: 0; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.goal-task-swipe .goal-task-del span {
  width: 28px; height: 28px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(232, 93, 93, 0.13); color: #E85D5D;
  transition: background 0.15s ease, transform 0.15s ease;
}
.goal-task-swipe .goal-task-del:active span { background: rgba(232, 93, 93, 0.26); transform: scale(0.92); }
.goal-task-swipe .goal-task-del svg { width: 13px; height: 13px; display: block; }
.goal-task-row {
  position: relative; z-index: 1;
  display: flex; align-items: center; gap: 8px; padding: 8px 10px;
  background: var(--tag-bg); transition: transform 0.18s ease;
}
.goal-task-text {
  flex: 1; min-width: 0; font-size: 13px; line-height: 1.5;
  color: var(--text-primary); word-break: break-word;
  transition: color 0.2s ease;
}
.goal-task-row.done .goal-task-text {
  color: var(--text-light); text-decoration: line-through; text-decoration-thickness: 1.5px;
}
.goal-task-edit {
  flex: 1; min-width: 0; font-size: 13px; background: transparent;
  border-bottom: 1px solid var(--brand); padding: 2px 0; color: var(--text-primary);
}
.goal-task-toggle {
  width: 38px; height: 22px; border-radius: 11px; flex-shrink: 0; border: none;
  background: var(--divider); position: relative; cursor: pointer;
  transition: background 0.2s ease;
}
.goal-task-toggle i {
  position: absolute; top: 2px; left: 2px; width: 18px; height: 18px;
  border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,0.18);
  transition: transform 0.2s ease;
}
.goal-task-toggle.on { background: var(--brand); }
.goal-task-toggle.on i { transform: translateX(16px); }
.goal-task-row.done .goal-task-toggle { opacity: 0.75; }

.goal-add {
  display: flex; align-items: center; gap: 6px; margin-top: 8px;
  background: var(--tag-bg); border-radius: 10px; padding: 4px 4px 4px 10px;
}
.goal-add input {
  flex: 1; min-width: 0; height: 30px; font-size: 13px; background: transparent;
  color: var(--text-primary);
}
.goal-add button {
  flex-shrink: 0; height: 30px; padding: 0 12px; border-radius: 9px; border: none;
  background: var(--brand); color: #fff; font-size: 12px; font-weight: 600; cursor: pointer;
}
.goal-add button:active { opacity: 0.85; }
.goal-foot { font-size: 10.5px; color: var(--text-light); line-height: 1.6; margin-top: 8px; }

.goal-empty {
  background: var(--card); border-radius: 14px; padding: 18px 16px;
  box-shadow: var(--shadow-card); text-align: center;
}
.goal-empty .ge-t { font-size: 13px; font-weight: 600; color: var(--text-secondary); }
.goal-empty .ge-s { font-size: 11.5px; color: var(--text-light); line-height: 1.7; margin-top: 6px; }
.goal-empty-btn {
  margin-top: 12px; height: 32px; padding: 0 16px; border-radius: 16px; border: none;
  background: var(--brand); color: #fff; font-size: 12.5px; font-weight: 600; cursor: pointer;
}
.goal-empty-btn:active { opacity: 0.85; }

/* ---------------- 长期目标：编辑弹窗 ---------------- */
.goal-modal {
  width: 92%; max-width: 380px; background: var(--card);
  border-radius: 18px; padding: 20px; box-shadow: var(--shadow-polaroid);
  animation: polaroidIn 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  max-height: 88%; overflow-y: auto;
}
.goal-modal-title { font-size: 17px; font-weight: 600; color: var(--text-primary); }
.goal-modal-sub { font-size: 11.5px; color: var(--text-light); line-height: 1.7; margin-top: 7px; }
.goal-field { display: block; margin-top: 14px; }
.goal-field > span { display: block; font-size: 11.5px; color: var(--text-light); margin-bottom: 6px; }
.goal-field input {
  width: 100%; height: 42px; border-radius: 12px; border: none;
  background: var(--tag-bg); padding: 0 12px; font-size: 14px;
  color: var(--text-primary); font-family: inherit;
  -webkit-appearance: none; appearance: none;
}
.goal-field input[type="date"] { line-height: 42px; }
.goal-field input[type="date"]::-webkit-calendar-picker-indicator { opacity: 0.5; cursor: pointer; }
.goal-dates { display: flex; gap: 10px; }
.goal-dates .goal-field { flex: 1; min-width: 0; }
.goal-presets { display: flex; gap: 8px; margin-top: 10px; }
.goal-presets button {
  flex: 1; height: 30px; border-radius: 10px; border: none; cursor: pointer;
  background: var(--brand-bg); color: var(--brand-dark); font-size: 12px; font-weight: 600;
}
.goal-presets button:active { opacity: 0.8; }
.goal-modal-hint { min-height: 17px; font-size: 12px; color: #E85D5D; margin-top: 8px; }
.goal-modal-btns { display: flex; gap: 10px; margin-top: 12px; }
.goal-modal-btns button {
  height: 42px; border-radius: 12px; border: none; cursor: pointer;
  font-size: 14.5px; font-weight: 600;
}
.goal-modal-btns .gm-del { flex: 0 0 auto; padding: 0 14px; background: rgba(232, 93, 93, 0.1); color: #E85D5D; }
.goal-modal-btns .gm-cancel { flex: 1; background: var(--tag-bg); color: var(--text-secondary); font-weight: 500; }
.goal-modal-btns .gm-ok { flex: 1; background: var(--brand); color: #fff; }
.goal-modal-btns .gm-ok:disabled { opacity: 0.5; }
.goal-modal-btns button:active { opacity: 0.85; }

.message-item .avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 500;
  font-size: 14px;
  flex-shrink: 0;
  position: relative;
}
.message-item .avatar .unread-dot {
  position: absolute;
  top: 0; right: 0;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #5A8FCE;
  border: 2px solid white;
  z-index: 2;
}
.message-item .content { flex: 1; min-width: 0; }
.message-item .title { font-size: 14px; color: var(--text-primary); margin-bottom: 4px; font-weight: 500; }
.message-item .preview { font-size: 12px; color: var(--text-secondary); line-height: 1.4; }
.message-item .time { font-size: 11px; color: var(--text-light); flex-shrink: 0; }
.message-actions { display: flex; gap: 6px; margin-top: 10px; }
.message-actions button {
  padding: 6px 14px;
  border-radius: 12px;
  font-size: 12px;
  transition: transform 0.15s ease;
}
.message-actions button:active { transform: scale(0.95); }
.message-actions .accept { background: var(--brand); color: white; }
.message-actions .ignore { background: var(--tag-bg); color: var(--text-secondary); }

/* ============================================================
   我的页面
   ============================================================ */
.profile-info {
  margin: 16px 20px 12px;
  padding: 18px 20px;
  background: var(--card);
  border-radius: var(--radius-card);
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  box-shadow: var(--shadow-card);
}
.profile-info:active { transform: scale(0.99); }
.profile-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 22px;
  font-weight: 500;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(168, 181, 160, 0.3);
}
.profile-name { font-size: 17px; font-weight: 500; color: var(--text-primary); }
.profile-bio { font-size: 12px; color: var(--text-light); margin-top: 4px; }
.profile-arrow { margin-left: auto; color: var(--text-light); font-size: 16px; }
.stats-card {
  margin: 0 20px 16px;
  padding: 18px 16px;
  background: var(--card);
  border-radius: var(--radius-card);
  display: flex;
  box-shadow: var(--shadow-card);
}
.stat-item {
  flex: 1;
  text-align: center;
  border-right: 1px solid var(--divider);
  cursor: pointer;
  transition: transform 0.15s ease;
}
.stat-item:last-child { border-right: none; }
.stat-num { font-size: 20px; font-weight: 600; color: var(--text-primary); font-variant-numeric: tabular-nums; }
.stat-label { font-size: 11px; color: var(--text-light); margin-top: 4px; }
.menu-list {
  margin: 0 20px;
  background: var(--card);
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}
#page-sub #sub-content {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding-bottom: calc(48px + var(--safe-bottom, 0px));
}
.privacy-page { padding-bottom: 24px; }
.privacy-friend-pick {
  max-height: min(42vh, 320px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}
.menu-item {
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  border-bottom: 1px solid var(--divider);
  cursor: pointer;
  transition: background 0.2s ease;
}
/* ===== 我的页面 · 账号行 / 迷你头像 ===== */
.profile-account { font-size: 11px; color: var(--text-light); margin-top: 6px; cursor: default; }
.mini-avatar { display:inline-flex; width:26px; height:26px; border-radius:50%; align-items:center; justify-content:center; color:#fff; font-size:12px; }

/* ===== 白框相纸 · 可编辑文本 / 标签 / 保存按钮 ===== */
.polaroid-photo { position: relative; }
.polaroid-text.editable { cursor: pointer; }
.polaroid-text.editable:active { opacity: 0.7; }
.polaroid-edit-input {
  width: 88%; margin: 10px auto 0; display: block; border: none; outline: none;
  border-bottom: 1.5px solid var(--brand); background: transparent;
  font-size: 14px; color: var(--text-primary); text-align: center; padding: 4px 6px;
  font-family: inherit; box-sizing: border-box;
}
.tag { position: relative; }
.tag .tag-x { margin-left: 4px; font-size: 9px; opacity: 0.55; cursor: pointer; }
.tag .tag-x:active { opacity: 1; }
.tag.tag-add { border: 1px dashed var(--brand); color: var(--brand); background: transparent; cursor: pointer; }
.tag-input {
  width: 76px; border: none; outline: none; border-bottom: 1.5px solid var(--brand);
  background: transparent; font-size: 11px; padding: 2px 4px; font-family: inherit;
  color: var(--text-primary); border-radius: 0;
}
.save-photo-btn {
  position: absolute; right: 8px; bottom: 8px; width: 34px; height: 34px;
  border-radius: 50%; background: rgba(255,255,255,0.92);
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,0.12);
  z-index: 4;
}
.save-photo-btn:active { transform: scale(0.9); }
.polaroid-photo.no-save,
.polaroid-photo.no-save img {
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

/* ===== 点赞列表面板 ===== */
.likes-panel { z-index: 350; }

/* ===== 通用底部动作面板 ===== */
.sheet-backdrop {
  position: absolute; inset: 0; background: rgba(0,0,0,0.32);
  z-index: 400; display: none; align-items: flex-end;
}
.sheet-backdrop.active { display: flex; }
.sheet {
  width: 100%; background: var(--bg); border-radius: 20px 20px 0 0;
  padding: 18px 0 calc(24px + var(--safe-bottom)); animation: sheetUp 0.25s ease;
  max-height: 70%; overflow-y: auto;
}
@keyframes sheetUp { from { transform: translateY(40px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.sheet-title { text-align: center; font-size: 13px; color: var(--text-light); padding: 0 20px 12px; }
.sheet-option {
  display: flex; align-items: center; gap: 12px; padding: 14px 20px;
  cursor: pointer; font-size: 14px; color: var(--text-primary);
}
.sheet-option:active { background: var(--tag-bg); }
.sheet-option .so-icon { font-size: 17px; width: 26px; text-align: center; display: flex; align-items: center; justify-content: center; }
.sheet-option .so-label { flex: 1; }
.sheet-option .so-extra { font-size: 11px; color: var(--text-light); }
.sheet-option .so-arrow { color: var(--text-light); }
.sheet-cancel {
  margin: 10px 20px 0; text-align: center; padding: 13px;
  background: var(--tag-bg); border-radius: 12px; font-size: 14px;
  color: var(--text-light); cursor: pointer;
}
.sheet-input {
  width: 100%; box-sizing: border-box; border: 1px solid var(--divider);
  border-radius: 10px; padding: 11px 12px; font-size: 14px; outline: none;
  background: #fff; color: var(--text-primary); font-family: inherit;
}
.sheet-input:focus { border-color: var(--brand); }

/* ===== 日历封面 ===== */
.cal-day { position: relative; }
.cal-day.has-cover .day-num {
  text-shadow: 0 0 5px rgba(255, 255, 255, 0.95), 0 1px 2px rgba(255, 255, 255, 0.85);
}
.cal-day .cover-emoji {
  position: absolute; inset: 0; display: flex; align-items: center;
  justify-content: center; font-size: 20px; opacity: 0.9; pointer-events: none;
}
.cal-day .node-shot {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; z-index: 0;
}
.cal-day .node-live {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: 2;
  opacity: 0;
  pointer-events: none;
}
.cal-day.live-playing .node-live { opacity: 1; }
.cal-day.has-live { touch-action: none; }
.cal-day .live-badge {
  top: 4px;
  left: 4px;
  z-index: 6;
  transform: scale(0.78);
  transform-origin: top left;
}
.cal-day .day-num,
.cal-day .photo-count,
.cal-day .overlap-mark { position: relative; z-index: 1; }
.menu-item:last-child { border-bottom: none; }
.menu-item:active { background: var(--tag-bg); }
.menu-item .icon { font-size: 18px; width: 24px; text-align: center; display: flex; align-items: center; justify-content: center; }
.menu-item .icon:has(.menu-face) {
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
}
.menu-face {
  width: 32px; height: 32px; border-radius: 50%; overflow: hidden;
  position: relative; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 13px;
}
.menu-face.has-img, .friend-avatar.has-img, .comment-avatar.has-img, .message-item .avatar.has-img {
  color: transparent;
}
.menu-face img, .comment-avatar img, .message-item .avatar img, .friend-avatar img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover; border-radius: 50%;
}
.comment-avatar { position: relative; overflow: hidden; }
.menu-item .label { flex: 1; font-size: 14px; color: var(--text-primary); }
.menu-item .extra { font-size: 11px; color: var(--text-light); margin-right: 4px; }
.menu-item .arrow { color: var(--text-light); font-size: 16px; }
.menu-section-title { margin: 16px 20px 8px; font-size: 11px; color: var(--text-light); letter-spacing: 1px; }

/* ============================================================
   通用子页面（好友 / 二维码 / 设置体系）
   ============================================================ */
#sub-back { font-size: 26px; line-height: 1; font-weight: 300; }
.sub-hint-text { margin: 10px 20px 0; font-size: 11px; color: var(--text-light); line-height: 1.6; }

/* 开关 */
.switch {
  width: 44px; height: 26px; border-radius: 13px;
  background: #D8D5CE; position: relative; flex-shrink: 0;
  transition: background 0.2s ease; cursor: pointer;
}
.switch::after {
  content: ''; position: absolute; top: 2px; left: 2px;
  width: 22px; height: 22px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,0.18);
  transition: transform 0.2s ease;
}
.switch.on { background: var(--brand); }
.switch.on::after { transform: translateX(18px); }

/* 单选行 */
.radio-check {
  width: 20px; height: 20px; border-radius: 50%; flex-shrink: 0;
  border: 1.5px solid var(--text-light);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; color: transparent; transition: all 0.15s ease;
}
.radio-check.on { border-color: var(--brand); background: var(--brand); color: #fff; }

/* 菜单行右侧值 */
.menu-item .value { font-size: 13px; color: var(--text-light); margin-right: 4px; }
.menu-item.danger .label { color: #E85D5D; }

/* 头像图片 */
.profile-avatar img, .friend-avatar img {
  width: 100%; height: 100%; object-fit: cover; border-radius: 50%;
}

/* 好友列表：左滑删除 */
.friend-swipe { position: relative; overflow: hidden; background: #E85D5D; }
.friend-swipe .friend-del {
  position: absolute; right: 0; top: 0; bottom: 0; width: 78px;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 14px; cursor: pointer;
}
.friend-row {
  position: relative; z-index: 1; background: var(--card);
  padding: 13px 18px; display: flex; align-items: center; gap: 13px;
  border-bottom: 1px solid var(--divider);
  transition: transform 0.2s ease; cursor: pointer;
  touch-action: pan-y;
}
.friend-swipe:last-child .friend-row { border-bottom: none; }
.friend-avatar {
  width: 44px; height: 44px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 17px; overflow: hidden;
  position: relative;
}
.friend-row .fname { font-size: 15px; color: var(--text-primary); }
.friend-row .fsub { font-size: 11px; color: var(--text-light); margin-top: 3px; }
.friend-chat-btn {
  width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0;
  background: var(--brand-bg); color: var(--brand); font-size: 15px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  margin-left: 4px;
}
.friend-chat-btn:active { opacity: 0.7; }
.msg-swipe { position: relative; overflow: hidden; background: #E85D5D; border-radius: var(--radius-card); margin-bottom: 8px; }
.msg-swipe .msg-del {
  position: absolute; right: 0; top: 0; bottom: 0; width: 78px;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 14px; cursor: pointer;
}
.msg-swipe .message-item { margin-bottom: 0; position: relative; z-index: 1; }

/* 会话行左滑：标未读 / 隐藏（iOS 风格：图标+文字圆角胶囊，随滑动进度渐显） */
.msg-swipe.chat-swipe { background: transparent; }
.msg-swipe.chat-swipe .msg-acts {
  position: absolute; right: 6px; top: 6px; bottom: 6px;
  display: flex; align-items: stretch; gap: 6px;
  opacity: 0; transform: translateX(8px);
  transition: opacity 0.12s ease-out, transform 0.12s ease-out;
  pointer-events: none;
  will-change: opacity, transform;
}
.msg-swipe.chat-swipe.swipe-open .msg-acts { opacity: 1; transform: translateX(0); pointer-events: auto; }
.msg-swipe.chat-swipe .msg-act {
  width: 70px; border: 0; padding: 0; margin: 0;
  border-radius: 14px;
  color: #fff; font-size: 12px; line-height: 1; font-family: inherit;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
}
.msg-swipe.chat-swipe .msg-act svg { width: 19px; height: 19px; display: block; }
.msg-swipe.chat-swipe .msg-act.unread { background: var(--brand); }
.msg-swipe.chat-swipe .msg-act.hide { background: #8A94A0; }
.msg-swipe.chat-swipe .msg-act:disabled { opacity: 0.45; cursor: default; }
.msg-swipe.chat-swipe .msg-act:active:not(:disabled) { filter: brightness(0.9); transform: scale(0.95); }

/* ── 线条图标（替代 emoji 占位）────────────────────── */
.licon {
  width: 1em; height: 1em;
  display: inline-block;
  vertical-align: -0.14em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
.licon[class*="fill"] { fill: currentColor; }
/* 各图标场景尺寸 */
.empty-emoji .licon, .e .licon, .mc-empty-ico .licon { width: 52px; height: 52px; stroke-width: 1.3; opacity: 0.85; }
.voice-icon-big .licon { width: 44px; height: 44px; stroke-width: 1.4; }
.photo .licon, .polaroid-photo .licon { width: 54px; height: 54px; stroke-width: 1.3; opacity: 0.9; }
.friend-chat-btn .licon { width: 17px; height: 17px; }
.s-ico .licon, .so-icon .licon { width: 20px; height: 20px; }
.comment-count .licon { width: 14px; height: 14px; vertical-align: -0.12em; }
.like-icon .licon { width: 22px; height: 22px; vertical-align: -0.2em; }
.cam-mic .licon, .capture-mic-btn .licon { width: 18px; height: 18px; }
.voice-dot .licon { width: 13px; height: 13px; }
.privacy-tag .licon { width: 11px; height: 11px; vertical-align: -0.08em; opacity: 0.85; }
.chip-lock .licon { width: 13px; height: 13px; }
.unread .licon { width: 19px; height: 19px; }
.qs-ico .licon { width: 22px; height: 22px; }
.save-photo-btn { color: #111111; }
.save-photo-btn .licon { width: 18px; height: 18px; stroke-width: 2.2; }
.ck-empty .licon { width: 30px; height: 30px; vertical-align: -0.35em; }
.guest-banner > span:first-child .licon { width: 24px; height: 24px; }
.overlap-icon .licon { width: 15px; height: 15px; }

/* 添加好友页 */
.addfriend-search {
  margin: 14px 20px 4px; padding: 0 14px;
  background: var(--card); border-radius: 12px;
  display: flex; align-items: center; gap: 8px;
  box-shadow: var(--shadow-card);
}
.addfriend-search input { flex: 1; height: 42px; font-size: 14px; }
.addfriend-search .s-ico { color: var(--text-light); font-size: 15px; }
.addfriend-result {
  margin: 10px 20px 0; background: var(--card);
  border-radius: var(--radius-card); overflow: hidden; box-shadow: var(--shadow-card);
}
.af-row { padding: 12px 18px; display: flex; align-items: center; gap: 12px; border-bottom: 1px solid var(--divider); }
.af-row:last-child { border-bottom: none; }
.af-add-btn {
  padding: 6px 14px; border-radius: 14px; font-size: 12px;
  background: var(--brand); color: #fff; cursor: pointer; flex-shrink: 0;
}
.af-add-btn.sent { background: var(--tag-bg); color: var(--text-light); }
.af-empty { padding: 26px 16px; text-align: center; font-size: 12px; color: var(--text-light); }

/* 二维码页 */
.qr-card {
  margin: 26px auto 0; width: 252px; padding: 22px 22px 18px;
  background: var(--card); border-radius: 20px;
  box-shadow: var(--shadow-polaroid); text-align: center;
}
.qr-grid {
  width: 208px; height: 208px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(21, 1fr); grid-template-rows: repeat(21, 1fr);
  background: #fff;
}
.qr-grid .q { background: #2E2E2E; }
.qr-name { margin-top: 14px; font-size: 15px; font-weight: 500; }
.qr-id { margin-top: 4px; font-size: 11px; color: var(--text-light); letter-spacing: 0.5px; }
.qr-actions { margin: 22px 20px 0; display: flex; flex-direction: column; gap: 10px; }
.qr-img {
  width: 208px; height: 208px; margin: 0 auto; display: block;
  background: #fff; border-radius: 8px;
}
.qr-code-box { font-size: 12px; color: var(--text-secondary); margin-top: 10px; word-break: break-all; line-height: 1.5; }

.scan-overlay {
  display: none;
  position: fixed; inset: 0;
  z-index: 2400;
  background: #000;
  flex-direction: column;
}
.scan-overlay.active { display: flex; }
.scan-overlay video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.scan-overlay canvas { display: none; }
.scan-topbar {
  position: relative; z-index: 2;
  display: flex; align-items: center; justify-content: space-between;
  padding: calc(12px + var(--safe-top)) 16px 12px;
  color: #fff;
}
.scan-topbar .scan-title { font-size: 16px; font-weight: 600; }
.scan-topbar button {
  width: 36px; height: 36px; border-radius: 50%;
  border: none; background: rgba(255,255,255,0.16); color: #fff;
  font-size: 18px; cursor: pointer;
}
.scan-view {
  position: relative; z-index: 2;
  flex: 1; display: flex; align-items: center; justify-content: center;
}
.scan-frame {
  width: min(72vw, 280px); height: min(72vw, 280px);
  border: 2px solid rgba(212,168,96,0.95);
  border-radius: 16px;
  box-shadow: 0 0 0 9999px rgba(0,0,0,0.45);
  position: relative;
  overflow: hidden;
}
.scan-laser {
  position: absolute; left: 8%; right: 8%; height: 2px;
  background: linear-gradient(90deg, transparent, #D4A860, transparent);
  animation: scanLaser 2s ease-in-out infinite;
}
@keyframes scanLaser {
  0% { top: 8%; }
  50% { top: 88%; }
  100% { top: 8%; }
}
.scan-hint {
  position: relative; z-index: 2;
  text-align: center; color: rgba(255,255,255,0.82);
  font-size: 13px; padding: 0 24px 12px;
}
/* 从相册选二维码：相机不可用、或只有一台设备时走这条路 */
.scan-actions {
  position: relative; z-index: 2;
  display: flex; justify-content: center;
  padding: 0 24px calc(26px + var(--safe-bottom));
}
.scan-album-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.28);
  background: rgba(255,255,255,0.14);
  color: #fff;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  transition: background .18s ease, transform .12s ease, opacity .18s ease;
}
.scan-album-btn:hover { background: rgba(255,255,255,0.22); }
.scan-album-btn:active { transform: scale(.97); }
.scan-album-btn:disabled { opacity: .55; cursor: default; }
.scan-album-btn svg { width: 17px; height: 17px; flex: none; }

/* 确认弹窗 */
.confirm-backdrop {
  position: absolute; inset: 0; background: rgba(0,0,0,0.36);
  z-index: 520; display: none; align-items: center; justify-content: center;
}
.confirm-backdrop.active { display: flex; }
.confirm-box {
  width: 78%; max-width: 300px; background: var(--card);
  border-radius: 16px; overflow: hidden; text-align: center;
  animation: polaroidIn 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.confirm-title { padding: 22px 20px 6px; font-size: 16px; font-weight: 500; }
.confirm-sub { padding: 0 22px 18px; font-size: 12px; color: var(--text-light); line-height: 1.7; white-space: pre-line; }
.confirm-btns { display: flex; border-top: 1px solid var(--divider); }
.confirm-btns .cb {
  flex: 1; padding: 13px 0; font-size: 15px; cursor: pointer;
}
.confirm-btns .cb.cancel { color: var(--text-light); border-right: 1px solid var(--divider); }
.confirm-btns .cb.ok { color: var(--brand-dark); font-weight: 600; }
.confirm-btns .cb.ok.danger { color: #E85D5D; }
.confirm-btns .cb:active { background: var(--tag-bg); }

/* 系列全款式预览：居中弹窗，一排 3 个，满 9 张（3×3）后上下滑动 */
.sp-backdrop {
  position: absolute; inset: 0; background: rgba(0,0,0,0.42);
  z-index: 470; display: none; align-items: center; justify-content: center;
  padding: 0 24px;
}
.sp-backdrop.active { display: flex; }
.sp-sheet {
  width: 100%; max-width: 320px; max-height: 76%;
  background: var(--card); border-radius: 18px; overflow: hidden;
  display: flex; flex-direction: column;
  box-shadow: 0 18px 48px rgba(0,0,0,0.24);
  animation: spPop 0.22s cubic-bezier(0.34, 1.4, 0.64, 1);
}
@keyframes spPop { from { transform: scale(0.9); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.sp-head { display: flex; align-items: center; gap: 8px; padding: 14px 14px 10px; }
.sp-title { flex: 1; font-size: 15px; font-weight: 600; color: var(--text-primary); }
.sp-title span { font-size: 11px; font-weight: 400; color: var(--text-light); margin-left: 6px; }
.sp-close {
  width: 26px; height: 26px; flex-shrink: 0; border: none; border-radius: 50%;
  background: var(--tag-bg); color: var(--text-light);
  font-size: 13px; line-height: 1; cursor: pointer;
}
.sp-body { flex: 1; min-height: 0; padding: 0 12px 12px; overflow: hidden; }
/* 3 列正方形网格的外接区域恒为正方形 → 正好露 3 行 9 格，第 4 行起上下滑动 */
.sp-viewport {
  aspect-ratio: 1 / 1; max-height: 100%;
  overflow-y: auto; overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  border-radius: 12px;
  scrollbar-width: thin;
}
.sp-viewport::-webkit-scrollbar { width: 4px; }
.sp-viewport::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.18); border-radius: 2px; }
.sp-viewport::-webkit-scrollbar-track { background: transparent; }
.sp-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
/* 字体系列：12 列栅格，汉字与 Nn/Oo/Dd/Ee 同尺寸，每格占 4 列 = 每行最多 3 格 */
.sp-grid.is-font { grid-template-columns: repeat(12, 1fr); }
.sp-grid.is-font .sp-cell { grid-column: span 4; }
.sp-cell {
  position: relative; aspect-ratio: 1 / 1; border-radius: 10px; overflow: hidden;
  background: rgba(0,0,0,0.045);
  display: flex; align-items: center; justify-content: center;
  pointer-events: none;   /* 单格不可点、不可放大 */
}
.sp-cell img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sp-cell .sp-emo { font-size: clamp(18px, 7vw, 30px); line-height: 1; }
.sp-cell .sp-aa { font-size: clamp(18px, 7vw, 30px); color: var(--text-primary); }
.sp-foot { text-align: center; font-size: 11px; color: var(--text-light); padding: 10px 12px 0; }
.market-thumb { position: relative; cursor: pointer; }
.market-thumb-badge {
  position: absolute; right: 4px; bottom: 4px;
  padding: 1px 5px; border-radius: 7px;
  background: rgba(0,0,0,0.42); color: #fff;
  font-size: 9px; font-weight: 400; line-height: 1.5;
  pointer-events: none;
}

.pay-wait-qr { width: 168px; height: 168px; margin: 4px auto 12px; display: none; background: #fff; border-radius: 8px; }

/* 关于 / 文档页 */
.about-logo { text-align: center; margin: 34px 0 6px; font-size: 30px; font-weight: 200; letter-spacing: 2px; }
.about-ver { text-align: center; font-size: 11px; color: var(--text-light); margin-bottom: 8px; }
.doc-body {
  margin: 14px 20px; padding: 18px; background: var(--card);
  border-radius: var(--radius-card); font-size: 13px; line-height: 1.9;
  color: var(--text-secondary); box-shadow: var(--shadow-card);
}
.doc-body h4 { margin: 14px 0 6px; font-size: 14px; color: var(--text-primary); }
.doc-body h4:first-child { margin-top: 0; }

/* ============================================================
   主题中心
   ============================================================ */
.theme-panel {
  background: white;
  border-radius: 18px;
  width: 88%;
  max-width: 360px;
  max-height: 80%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: polaroidIn 0.32s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.theme-header {
  padding: 18px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--divider);
}
.theme-header .title { font-size: 16px; font-weight: 500; }
.theme-header .close {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--tag-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  cursor: pointer;
}
.theme-list { flex: 1; overflow-y: auto; padding: 8px 16px 16px; }
.theme-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 12px;
  border-radius: 14px;
  cursor: pointer;
  transition: background 0.2s ease;
  margin-bottom: 6px;
}
.theme-item:active { background: var(--tag-bg); }
.theme-item.active { background: var(--brand-bg); }
.theme-item .swatch {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  overflow: hidden;
  position: relative;
}
.theme-item .swatch-stack {
  width: 48px; height: 48px;
  border-radius: 12px;
  overflow: hidden;
  flex-shrink: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  box-shadow: inset 0 0 0 1px var(--divider);
}
.theme-item .swatch-stack span:nth-child(1) { grid-column: 1 / 3; }
.theme-item .info { flex: 1; min-width: 0; }
.theme-item .name { font-size: 14px; color: var(--text-primary); }
.theme-item .desc { font-size: 11px; color: var(--text-light); margin-top: 2px; }
.theme-item .meta { font-size: 10px; color: var(--text-light); margin-top: 3px; }
.theme-item .action { font-size: 12px; color: var(--brand); font-weight: 500; text-align: right; }
.theme-item .action.pay { color: #C46F54; }
.theme-item .share-btn {
  margin-top: 4px;
  font-size: 11px;
  color: var(--text-secondary);
  font-weight: 400;
}
.theme-item .actions { flex-shrink: 0; text-align: right; }
.theme-price { font-size: 10px; color: var(--text-light); }

/* —— 素材市集 —— */
.market-tabs {
  display: flex;
  gap: 4px;
  margin: 12px 16px 8px;
  background: var(--tag-bg);
  border-radius: 13px;
  padding: 4px;
}
.market-tabs button {
  flex: 1;
  height: 34px;
  border-radius: 10px;
  font-size: 13px;
  color: var(--text-secondary);
}
.market-tabs button.on {
  background: var(--card);
  color: var(--theme-text);
  font-weight: 600;
  box-shadow: var(--shadow-card);
}
.market-card {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 12px;
  margin: 0 8px 10px;
  background: var(--card);
  border-radius: 14px;
  box-shadow: var(--shadow-card);
  cursor: pointer;
}
.market-thumb {
  width: 54px;
  height: 54px;
  border-radius: 12px;
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--tag-bg);
  box-shadow: inset 0 0 0 1px var(--divider);
}
.market-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.market-thumb .aa { font-size: 22px; font-weight: 600; color: var(--theme-text); }
.market-card .info { flex: 1; min-width: 0; }
.market-card .name { font-size: 14px; color: var(--text-primary); display: flex; align-items: center; gap: 6px; }
.market-card .desc { font-size: 11px; color: var(--text-light); margin-top: 2px; }
.market-card .meta { font-size: 10px; color: var(--text-light); margin-top: 3px; }
.market-card .actions { flex-shrink: 0; text-align: right; }
.market-card .action { font-size: 12px; color: var(--brand); font-weight: 500; }
.market-card .action.pay { color: #C46F54; }
.market-card .action.owned { color: var(--text-light); font-weight: 500; }
.market-owned {
  font-size: 9px; font-weight: 500; line-height: 1.5;
  padding: 1px 5px; border-radius: 6px;
  color: var(--text-light); background: var(--tag-bg);
}
.market-hot {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #fff;
  background: #E0916B;
  border-radius: 6px;
  padding: 1px 5px;
}
.market-hot.paid { background: #7D8FB3; }

/* 主题中心 · 三层分组 */
.theme-group-title {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1px;
  color: var(--text-light);
  padding: 16px 12px 6px;
}
.theme-member-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 8px 4px 4px;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 12px;
  color: var(--text);
  background: var(--tag-bg);
}
.theme-member-bar b { font-weight: 600; color: var(--accent); }
.theme-member-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 18px 4px 4px;
  padding: 14px 16px;
  border-radius: 16px;
  background: var(--card-bg, #fff);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
  cursor: pointer;
}
.theme-member-cta .txt { display: flex; flex-direction: column; gap: 3px; }
.theme-member-cta .txt b { font-size: 13px; font-weight: 600; color: var(--text); }
.theme-member-cta .txt span { font-size: 11px; color: var(--text-light); }
.theme-member-cta .arrow { font-size: 18px; color: var(--text-light); }

/* ============================================================
   素材市集 · 购物车（多选系列一次结算）
   ============================================================ */
#market-list { padding-bottom: 78px; }

/* 卡片左上角选择圈 */
.market-card { position: relative; }
.market-pick {
  position: absolute;
  left: 8px; top: 8px;
  z-index: 2;
  width: 24px; height: 24px;
  padding: 0;
  border: 1.5px solid rgba(60, 60, 67, 0.5);
  border-radius: 50%;
  background: #FFFFFF;
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.22);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background 0.16s ease, border-color 0.16s ease, transform 0.12s ease;
}
.market-pick .mp-plus { position: relative; width: 11px; height: 11px; }
.market-pick .mp-plus::before {
  content: ''; position: absolute; left: 4.5px; top: 0;
  width: 2px; height: 11px;
  background: rgba(60, 60, 67, 0.55); border-radius: 1px;
}
.market-pick .mp-plus::after {
  content: ''; position: absolute; left: 0; top: 4.5px;
  width: 11px; height: 2px;
  background: rgba(60, 60, 67, 0.55); border-radius: 1px;
}
.market-pick .mp-check {
  position: absolute;
  width: 11px; height: 6px;
  border-left: 2px solid #FFFFFF;
  border-bottom: 2px solid #FFFFFF;
  border-radius: 0;
  transform: rotate(-45deg) translate(0.5px, -0.5px);
  opacity: 0;
  transition: opacity 0.16s ease;
}
.market-pick.on {
  background: var(--brand);
  border-color: var(--brand);
}
.market-pick.on .mp-plus { display: none; }
.market-pick.on .mp-check { opacity: 1; }
.market-pick:active { transform: scale(0.9); }
.market-card.picked {
  box-shadow: inset 0 0 0 1.5px var(--brand), var(--shadow-card);
}

/* 悬浮购物车入口 */
.market-cart-fab {
  position: absolute;
  right: 16px; bottom: 22px;
  z-index: 40;
  width: 52px; height: 52px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--card);
  color: var(--text-secondary);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.14), inset 0 0 0 1px var(--divider);
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, transform 0.12s ease, box-shadow 0.18s ease;
}
.market-cart-fab svg { width: 23px; height: 23px; display: block; }
.market-cart-fab:active { transform: scale(0.93); }
.market-cart-fab.has {
  background: var(--brand);
  color: #FFFFFF;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}
.mcf-badge {
  position: absolute;
  top: -2px; right: -2px;
  min-width: 18px; height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: #E5544B;
  color: #FFFFFF;
  font-size: 10px; font-weight: 600;
  line-height: 18px; text-align: center;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.22);
}

/* 购物车底部弹层 */
.mc-backdrop {
  position: absolute; inset: 0;
  z-index: 480;
  display: none;
  align-items: flex-end;
  background: rgba(0, 0, 0, 0.36);
  opacity: 0;
  transition: opacity 0.2s ease;
}
.mc-backdrop.active { display: flex; opacity: 1; }
.mc-backdrop.closing { opacity: 0; }
.mc-sheet {
  width: 100%;
  max-height: 74%;
  background: var(--bg);
  border-radius: 20px 20px 0 0;
  display: flex; flex-direction: column;
  transform: translateY(100%);
  transition: transform 0.26s cubic-bezier(0.32, 0.72, 0, 1);
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.18);
  padding-bottom: env(safe-area-inset-bottom, 0);
}
.mc-backdrop.active .mc-sheet { transform: none; }
.mc-backdrop.closing .mc-sheet { transform: translateY(100%); transition: transform 0.22s ease-in; }
.mc-head {
  display: flex; align-items: center;
  padding: 16px 18px 10px;
}
.mc-title { flex: 1; font-size: 15px; font-weight: 600; color: var(--text-primary); }
.mc-title span { font-size: 11px; font-weight: 400; color: var(--text-light); margin-left: 7px; }
.mc-clear {
  margin-right: 10px; padding: 2px 4px;
  border: 0; background: transparent;
  color: var(--text-light);
  font-size: 12px; cursor: pointer;
}
.mc-clear:active { opacity: 0.55; }
.mc-close {
  width: 26px; height: 26px;
  border: 0; border-radius: 50%;
  background: var(--tag-bg); color: var(--text-light);
  font-size: 13px; line-height: 1; cursor: pointer;
}
.mc-body {
  flex: 1; min-height: 0;
  padding: 2px 14px 8px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.mc-row {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 8px;
  border-bottom: 1px solid var(--divider);
}
.mc-row:last-child { border-bottom: 0; }
.mc-thumb {
  width: 42px; height: 42px;
  flex-shrink: 0;
  border-radius: 10px;
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  background: var(--tag-bg);
  box-shadow: inset 0 0 0 1px var(--divider);
}
.mc-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mc-thumb .aa { font-size: 17px; font-weight: 600; color: var(--theme-text); }
.mc-info { flex: 1; min-width: 0; }
.mc-name { font-size: 13px; color: var(--text-primary); display: flex; align-items: center; gap: 6px; }
.mc-tag {
  font-size: 9px; font-weight: 500; line-height: 1.5;
  padding: 1px 5px; border-radius: 6px;
  color: var(--text-light); background: var(--tag-bg);
}
.mc-desc { font-size: 10px; color: var(--text-light); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mc-price { font-size: 13px; font-weight: 600; color: #C46F54; flex-shrink: 0; }
.mc-price.zero { color: var(--text-light); font-weight: 500; }
.mc-del {
  width: 22px; height: 22px;
  flex-shrink: 0;
  border: 0; border-radius: 50%;
  background: transparent;
  color: var(--text-light);
  font-size: 12px; line-height: 1; cursor: pointer;
}
.mc-del:active { background: var(--tag-bg); }
.mc-empty { padding: 34px 20px 40px; text-align: center; }
.mc-empty-ico { font-size: 30px; opacity: 0.55; }
.mc-empty-t { margin-top: 8px; font-size: 13px; color: var(--text-secondary); }
.mc-empty-s { margin-top: 5px; font-size: 11px; color: var(--text-light); }
.mc-foot {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 18px calc(14px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--divider);
}
.mc-total { flex: 1; display: flex; align-items: baseline; gap: 6px; }
.mc-total span { font-size: 11px; color: var(--text-light); }
.mc-total b { font-size: 19px; font-weight: 600; color: #C46F54; }
.mc-total em { font-size: 10px; font-style: normal; color: var(--text-light); }
.mc-pay {
  min-width: 116px; height: 42px;
  padding: 0 20px;
  border: 0; border-radius: 21px;
  background: var(--brand);
  color: #FFFFFF;
  font-size: 14px; font-weight: 600;
  cursor: pointer;
  transition: opacity 0.16s ease, transform 0.12s ease;
}
.mc-pay:active { transform: scale(0.97); }
.mc-pay[disabled] {
  background: var(--tag-bg);
  color: var(--text-light);
  cursor: default;
}

.pe-chip .chip-lock { font-size: 11px; }
.pe-chip .chip-price { font-size: 10px; opacity: 0.85; }
.pe-chip.locked { background: #E7E1D6; color: #7A7166; }

.share-code-card {
  margin: 16px 20px;
  padding: 16px;
  background: var(--card);
  border-radius: 14px;
  box-shadow: var(--shadow-card);
  text-align: center;
}
.share-code-card .code {
  font-size: 22px;
  letter-spacing: 2px;
  font-weight: 600;
  color: var(--theme-text);
  margin: 8px 0 12px;
}
.share-code-card button {
  background: var(--brand);
  color: #fff;
  padding: 8px 18px;
  border-radius: var(--radius-btn);
  font-size: 13px;
}
.redeem-box {
  display: flex;
  gap: 8px;
  margin: 12px 20px 8px;
}
.redeem-box input {
  flex: 1;
  background: var(--card);
  border: 1px solid var(--divider);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 14px;
  letter-spacing: 1px;
}
.redeem-box button {
  background: var(--brand);
  color: #fff;
  padding: 0 14px;
  border-radius: 12px;
  font-size: 13px;
}

/* 白框相纸编辑保存 */
.edit-overlay {
  display: none;
  position: absolute;
  inset: 0;
  z-index: 120;
  background: #EFECE6;
  flex-direction: column;
}
.edit-overlay.active { display: flex; }
.edit-topbar {
  flex-shrink: 0;
  height: 52px;
  padding: 0 12px;
  padding-top: var(--safe-top);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.edit-topbar .back, .edit-topbar .save {
  min-width: 52px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
}
.edit-topbar .save { color: var(--brand); font-weight: 600; }
.edit-topbar .save:disabled { opacity: 0.4; pointer-events: none; }
.edit-topbar .title { font-size: 15px; font-weight: 500; }
.edit-stage {
  --card-w: min(68vw, 268px);
  --frame-aspect: 0.6394;
  --hole-left-n: 0.11;
  --hole-top-n: 0.095;
  --hole-w-n: 0.78;
  --hole-h-n: 0.61;
  --cap-frac: 0.295;
  --pad: calc(var(--card-w) * var(--hole-left-n));
  --card-h: calc(var(--card-w) / var(--frame-aspect));
  --cap-h: calc(var(--card-h) * var(--cap-frac));
  flex: 1;
  position: relative;
  overflow: hidden;
  min-height: 0;
}
.edit-anchor {
  position: absolute;
  left: 50%;
  top: 50%;
  width: var(--card-w);
  height: var(--card-h);
  transform: translate(-50%, -50%);
  z-index: 3;
  pointer-events: none;
  padding: 0;
  box-sizing: border-box;
}
.edit-photo-fixed {
  position: absolute;
  left: calc(var(--hole-left-n) * 100%);
  top: calc(var(--hole-top-n) * 100%);
  width: calc(var(--hole-w-n) * 100%);
  height: calc(var(--hole-h-n) * 100%);
  pointer-events: auto;
  z-index: 3;
}
.edit-photo {
  width: 100%;
  height: 100%;
  background: #E8E4DC;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 64px;
}
.edit-photo img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transform: none !important;
}
.edit-stickers {
  position: absolute;
  left: 50%;
  top: 50%;
  width: var(--card-w);
  height: var(--card-h);
  transform: translate(-50%, -50%);
  z-index: 7;
  pointer-events: none;
}
.edit-sticker {
  position: absolute;
  /* 基准 = 导出画布 96px/800px，预览与导出同比例（所见即所得） */
  width: 12%;
  height: auto;
  text-align: center;
  touch-action: none;
  user-select: none;
  cursor: grab;
  pointer-events: auto;
}
.edit-sticker img {
  width: 100%;
  height: auto;
  pointer-events: none;
  display: block;
}
/* 选中态：白色虚线框由 .sticker-frame 绘制（四角手柄锚点与框角对齐），不再用 outline */
.edit-sticker .del {
  position: absolute; top: -8px; right: -8px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: #E85D5D; color: #fff;
  font-size: 11px; line-height: 18px;
}
.edit-caption-rail {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: flex;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  pointer-events: none;
}
.edit-caption-rail::-webkit-scrollbar { display: none; }
.edit-caption-slide {
  flex: 0 0 100%;
  height: 100%;
  scroll-snap-align: center;
  scroll-snap-stop: always;
  position: relative;
  pointer-events: none;
}
.edit-caption {
  position: absolute;
  left: 50%;
  top: calc(50% - var(--card-h) / 2 + var(--card-h) * var(--hole-top-n) + var(--card-h) * var(--hole-h-n));
  transform: translateX(-50%);
  width: var(--card-w);
  height: var(--cap-h);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  text-align: center;
  font-size: 13px;
  line-height: 1.35;
  color: #3A3A3A;
  padding: 10px calc(var(--card-w) * var(--hole-left-n)) 18px;
  box-sizing: border-box;
  pointer-events: none;
  z-index: 6;
}
.edit-caption.neon { color: #5C88CD; text-shadow: 0 0 8px rgba(92,136,205,0.6); }
.edit-caption.bold { font-weight: 700; }
.edit-caption-text { max-width: 100%; }
.edit-caption-mark {
  flex-shrink: 0;
  font-size: 10px;
  font-weight: 400;
  font-family: Georgia, "Times New Roman", "Songti SC", serif;
  letter-spacing: 0.04em;
  opacity: 0.55;
  line-height: 1.2;
  text-shadow: none;
  pointer-events: none;
}
.edit-caption.neon .edit-caption-mark { text-shadow: none; opacity: 0.7; }
.edit-caption .caption-tools { pointer-events: auto; top: -28px; bottom: auto; }
.sticker-tools button[data-act="bold"] { font-weight: 700; font-family: Georgia, serif; font-size: 13px; }
.sticker-tools button.on { background: var(--brand); }
.edit-frame-rail {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  pointer-events: none;
}
.edit-frame-rail::-webkit-scrollbar { display: none; }
.edit-frame-slide {
  flex: 0 0 100%;
  height: 100%;
  scroll-snap-align: center;
  scroll-snap-stop: always;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.edit-frame-shell {
  --paper: #FFFEF8;
  width: var(--card-w);
  box-sizing: border-box;
  background: transparent;
  box-shadow: 0 12px 32px rgba(40, 32, 20, 0.16);
  pointer-events: none;
  position: relative;
}
.edit-frame-top,
.edit-frame-side,
.edit-frame-foot {
  background: var(--paper);
}
.edit-frame-top { height: var(--pad); }
.edit-frame-row { display: flex; align-items: stretch; }
.edit-frame-side { width: var(--pad); flex-shrink: 0; }
.edit-frame-window {
  flex: 1;
  min-width: 0;
  aspect-ratio: 3 / 4;
  background: transparent;
}
.edit-frame-foot { height: var(--cap-h); }
.edit-frame-png {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
  pointer-events: none;
  z-index: 2;
}
.edit-frame-shell.has-overlay {
  height: var(--card-h);
  box-shadow: none;
}
.edit-frame-shell.has-overlay .edit-frame-top,
.edit-frame-shell.has-overlay .edit-frame-row,
.edit-frame-shell.has-overlay .edit-frame-foot {
  display: none;
}
.edit-frame-shell.has-overlay .edit-frame-window { outline: none; }
.edit-frame-shell.has-overlay.pf-wood,
.edit-frame-shell.has-overlay.pf-metal,
.edit-frame-shell.has-overlay.pf-ink { box-shadow: none; }
.pf-white { --paper: #FFFEF8; }
.pf-wood { --paper: linear-gradient(180deg, #EED9B6 0%, #D4B896 100%); }
.pf-wood.edit-frame-shell { box-shadow: 0 0 0 3px #8B5A2B, 0 12px 32px rgba(40, 32, 20, 0.16); }
.pf-metal { --paper: linear-gradient(180deg, #F2F3F6 0%, #D5D8DE 100%); }
.pf-metal.edit-frame-shell { box-shadow: 0 0 0 2px #A8ADB6, 0 12px 32px rgba(40, 32, 20, 0.16); }
.pf-sketch { --paper: #FFFEF8; }
.pf-sketch .edit-frame-window { outline: 2px dashed #2E2E2E; outline-offset: -1px; }
.pf-blush { --paper: #FBE8E8; }
.pf-mint { --paper: #E7F2EA; }
.pf-ink { --paper: #2A2A2A; }
.pf-ink.edit-frame-shell { box-shadow: 0 12px 32px rgba(0, 0, 0, 0.28); }
.edit-controls {
  flex-shrink: 0;
  padding-bottom: calc(12px + var(--safe-bottom));
  background: var(--card);
  box-shadow: 0 -4px 20px rgba(0,0,0,0.04);
  z-index: 8;
}
.edit-tabs {
  display: flex;
  padding: 8px 12px 4px;
  gap: 6px;
}
.edit-tabs button {
  flex: 1;
  height: 32px;
  border-radius: 16px;
  font-size: 12px;
  color: var(--text-secondary);
  background: var(--tag-bg);
}
.edit-tabs button.on { background: var(--brand); color: #fff; }
.edit-strip {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding: 10px 16px 8px;
}
.edit-text-extras {
  display: none;
  padding: 0 16px 12px;
  gap: 10px;
  flex-direction: column;
}
.edit-text-extras.show { display: flex; }
.edit-text-label {
  font-size: 11px;
  color: var(--text-light);
  margin-bottom: 6px;
}
.edit-color-row, .edit-size-row {
  display: flex;
  gap: 8px;
  align-items: center;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.edit-color-dot {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  flex-shrink: 0;
  border: 2px solid transparent;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.14);
}
.edit-color-dot.on { border-color: var(--brand); }
.edit-color-dot.auto {
  background: conic-gradient(#2E2E2E, #C0392B, #5C88CD, #F4EFE6, #2E2E2E);
}
.edit-size-chip {
  height: 28px;
  padding: 0 12px;
  border-radius: 14px;
  background: var(--tag-bg);
  font-size: 12px;
  color: var(--text-secondary);
  flex-shrink: 0;
}
.edit-size-chip.on { background: var(--brand); color: #fff; }
.edit-chip {
  flex-shrink: 0;
  width: 72px;
  text-align: center;
  font-size: 11px;
  color: var(--text-secondary);
}
.edit-chip .preview {
  width: 56px; height: 56px;
  margin: 0 auto 6px;
  border-radius: 12px;
  background: var(--tag-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  position: relative;
  border: 2px solid transparent;
}
.edit-chip.on .preview { border-color: var(--brand); }
.edit-chip .lock {
  position: absolute;
  right: -4px; bottom: -4px;
  font-size: 12px;
}
.edit-chip .pf-mini {
  width: 38px;
  height: 50px;
  border-radius: 3px;
  padding: 0;
  background: transparent;
  border: 4px solid var(--paper, #FFFEF8);
  border-bottom-width: 14px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.12);
  box-sizing: border-box;
}
.edit-chip .pf-mini .mini-win { display: none; }
.edit-chip .pf-mini-png {
  width: 38px;
  height: 50px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.12));
}
.edit-chip .font-aa { font-size: 18px; color: var(--text-primary); }

.pe-stage {
  --pe-w: min(68vw, 268px, calc(100cqh * 0.645));
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 8px 16px 12px;
  container-type: size;
  position: relative;
  overflow-x: hidden;
  /* 文本很长时相纸会加长超出可视区，允许垂直滚动查看完整内容 */
  overflow-y: auto;
}
.pe-stage.swiping { touch-action: pan-x; }
.pe-swipe {
  position: absolute;
  inset: 0;
  display: flex;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  z-index: 2;
  pointer-events: none;
}
.pe-swipe.off { display: none; }
.pe-swipe::-webkit-scrollbar { display: none; }
.pe-swipe-slide {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  scroll-snap-align: start;
  position: relative;
  pointer-events: none;
}
.pe-slide-sheet {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.pe-slide-sheet img,
.pe-slide-paper,
.pe-slide-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
  display: block;
}
.pe-slide-frame { z-index: 1; }
.pe-slide-paper { z-index: 2; }
.pe-slide-border {
  position: absolute;
  left: 4.5%;
  top: 2.9%;
  width: 91%;
  height: 78.3%;
  pointer-events: none;
}
/* 滑动预览：每张滑页内嵌按该相纸透明窗口裁切的照片，切换过程中始终框住图片 */
.pe-slide-photo {
  position: absolute;
  z-index: 0;
  overflow: hidden;
  background: #E8E4DC;
}
.pe-slide-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}
.pe-card {
  width: var(--pe-w);
  height: calc(var(--pe-w) / 0.645);
  max-height: 100%;
  position: relative;
  background: transparent;
  border-radius: 0;
  box-shadow: none;
  overflow: hidden;
  flex-shrink: 0;
  /* margin:auto 安全居中：相纸加长超出 stage 时贴顶且可滚动，不会被裁顶 */
  margin-top: auto;
  margin-bottom: auto;
}
/* 换字体：预览区横向滑入（同相纸/边框翻页的方向感），一次性动画，结束即静止 */
@keyframes peSwapNext {
  from { opacity: 0.35; transform: translateX(26%); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes peSwapPrev {
  from { opacity: 0.35; transform: translateX(-26%); }
  to { opacity: 1; transform: translateX(0); }
}
.pe-card.pe-swap-next { animation: peSwapNext 0.26s cubic-bezier(0.22, 0.61, 0.36, 1) both; }
.pe-card.pe-swap-prev { animation: peSwapPrev 0.26s cubic-bezier(0.22, 0.61, 0.36, 1) both; }
@media (prefers-reduced-motion: reduce) {
  .pe-card.pe-swap-next, .pe-card.pe-swap-prev { animation: none; }
}
.pe-window {
  position: absolute;
  left: 4.5%;
  top: 2.9%;
  width: 91%;
  height: 78.3%;
  overflow: hidden;
  background: #E8E4DC;
  z-index: 1;
}
.pe-border {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
  pointer-events: none;
  z-index: 2;
  display: none;
}
.pe-border.show { display: block; }
.pe-paper {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
  pointer-events: none;
  z-index: 3;
  display: none;
}
.pe-paper.show { display: block; }
.pe-caption {
  position: absolute;
  left: 8%;
  right: 8%;
  top: 82%;
  bottom: 3%;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  text-align: center;
  pointer-events: none;
}
.pe-caption-text {
  font-size: 13px;
  line-height: 1.35;
  color: #3A3A3A;
  max-width: 100%;
}
.pe-caption-mark {
  font-size: 10px;
  font-weight: 400;
  font-family: Georgia, "Times New Roman", serif;
  opacity: 0.55;
  letter-spacing: 0.04em;
}
.pe-caption.neon .pe-caption-text {
  color: #5C88CD;
  text-shadow: 0 0 8px rgba(92,136,205,0.55);
}
.pe-stage .edit-stickers {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: none;
  left: 0;
  top: 0;
  z-index: 8;
}
.pe-dock {
  flex-shrink: 0;
  background: #F7F5F1;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.04);
  padding-bottom: var(--safe-bottom);
  z-index: 8;
}
.pe-tabs {
  display: flex;
  gap: 6px;
  padding: 10px 12px 8px;
}
.pe-tabs button {
  flex: 1;
  height: 34px;
  border-radius: 17px;
  font-size: 13px;
  color: #666;
  background: #EFECE6;
}
.pe-tabs button.on {
  background: #A8B5A0;
  color: #fff;
}
.pe-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.28s ease, padding 0.28s ease;
  padding: 0 12px;
}
.pe-panel.open {
  max-height: 300px;
  padding: 0 12px 12px;
}
.pe-series {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding: 4px 2px 8px;
  scrollbar-width: none;
}
.pe-series::-webkit-scrollbar { display: none; }
.pe-chip {
  flex-shrink: 0;
  height: 32px;
  padding: 0 14px;
  border-radius: 16px;
  background: #EFECE6;
  color: #555;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.pe-chip.on { background: #A8B5A0; color: #fff; }
.pe-chip.lock { opacity: 0.7; }
.pe-level2 { animation: peIn 0.22s ease; }
@keyframes peIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.pe-level-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2px 2px 8px;
  font-size: 13px;
  color: #444;
}
.pe-back {
  min-width: 44px;
  height: 28px;
  border-radius: 14px;
  background: #EFECE6;
  color: #555;
  font-size: 12px;
}
.pe-rail {
  display: grid;
  grid-auto-flow: column;
  grid-template-rows: repeat(2, auto);
  gap: 10px 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding: 4px 4px 8px;
  scrollbar-width: none;
}
.pe-rail::-webkit-scrollbar { display: none; }
.pe-item {
  width: 72px;
  scroll-snap-align: start;
  text-align: center;
  font-size: 11px;
  color: #666;
}
.pe-item .dot {
  width: 44px;
  height: 44px;
  margin: 0 auto 6px;
  border-radius: 50%;
  border: 2px solid transparent;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.08);
}
.pe-item.on .dot,
.pe-item.on .thumb { border-color: #A8B5A0; }
.pe-item .thumb {
  width: 48px;
  height: 62px;
  margin: 0 auto 6px;
  border-radius: 4px;
  background: #FFFEF8;
  border: 2px solid transparent;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.pe-item .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.pe-rail-paper,
.pe-rail-border,
.pe-rail-font {
  display: flex;
  grid-template-rows: none;
}
.pe-item .pe-mini {
  width: 42px;
  height: 56px;
  object-fit: contain;
  display: block;
  margin: 0 auto 4px;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.12));
  pointer-events: none;
}
.pe-item.on .pe-mini { outline: 2px solid #A8B5A0; outline-offset: 2px; border-radius: 3px; }
.pe-item-name {
  display: block;
  font-size: 10px;
  line-height: 1.2;
  max-width: 72px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 0 auto;
}
.pe-head-title {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.pe-font-extras {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 6px 2px 2px;
}
.pe-font-tools {
  display: flex;
  align-items: center;
  gap: 8px;
}
.pe-font-tools button {
  min-width: 32px;
  height: 28px;
  padding: 0 10px;
  border-radius: 14px;
  background: #EFECE6;
  color: #444;
  font-size: 14px;
}
.pe-font-tools button.on {
  background: #A8B5A0;
  color: #fff;
}
.pe-font-tools button[data-act="fbold"] {
  font-weight: 700;
  font-family: Georgia, serif;
}
.pe-palette-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.pe-palette-auto {
  height: 28px;
  padding: 0 12px;
  border-radius: 14px;
  background: #EFECE6;
  color: #444;
  font-size: 12px;
  flex-shrink: 0;
}
.pe-palette-auto.on {
  background: #A8B5A0;
  color: #fff;
}
.pe-palette-pick {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
  height: 28px;
  padding: 0 10px 0 6px;
  border-radius: 14px;
  background: #EFECE6;
  color: #444;
  font-size: 12px;
  overflow: hidden;
}
.pe-palette-pick.on {
  background: #E4E9DF;
  box-shadow: inset 0 0 0 1.5px #A8B5A0;
}
.pe-palette-swatch {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.16);
  background: #3A3A3A;
}
.pe-palette-pick input[type="color"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  border: 0;
  padding: 0;
  cursor: pointer;
}
.pe-item .aa { font-size: 20px; color: #2E2E2E; }
.pe-item .lock { font-size: 11px; }
.pe-sticker-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  max-height: 188px;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 4px 6px 4px 2px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: #C5C9BE transparent;
}
.pe-sticker-grid::-webkit-scrollbar {
  width: 4px;
}
.pe-sticker-grid::-webkit-scrollbar-thumb {
  background: #C5C9BE;
  border-radius: 4px;
}
.pe-sticker-cell {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: #EFECE6;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.pe-sticker-cell img {
  width: 34px;
  height: 34px;
  object-fit: contain;
  pointer-events: none;
}
.pe-sticker-cell .lock {
  position: absolute;
  right: 2px;
  bottom: 2px;
  font-size: 11px;
}
.pe-reward-tip {
  margin: 2px 0 8px;
  padding: 7px 10px;
  border-radius: 8px;
  background: rgba(232, 96, 76, 0.08);
  color: var(--brand);
  font-size: 11.5px;
  line-height: 1.5;
}
.pe-print-overlay {
  display: none;
  position: absolute;
  inset: 0;
  z-index: 40;
  background:
    radial-gradient(120% 80% at 50% 18%, #3A342C 0%, #211E1A 58%, #161412 100%);
  overflow: hidden;
}
.pe-print-overlay.on { display: block; }
.pe-print-eject {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  bottom: 42%;
  overflow: hidden;
  z-index: 4;
  pointer-events: none;
}
.pe-print-film {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 64.7%;
  aspect-ratio: 0.6452;
  z-index: 2;
  opacity: 0;
  transform: translateX(-50%) translateY(102%);
  transform-origin: center bottom;
  box-shadow: 0 8px 22px rgba(0,0,0,0.3);
  background: #F3EFE6;
}
.pe-print-overlay.ready .pe-print-film { opacity: 1; }
.pe-print-overlay.play .pe-print-film {
  animation: peFilmPrint 3.15s cubic-bezier(0.16, 0.78, 0.18, 1) 0.28s forwards;
}
.pe-print-film img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
  display: block;
  filter: contrast(0.42) brightness(1.55) saturate(0.12);
}
.pe-print-overlay.develop .pe-print-film img {
  animation: peDevelopImg 2.7s ease-out forwards;
}
.pe-print-veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(255,252,246,0.94), rgba(236,228,210,0.88)),
    repeating-linear-gradient(0deg, rgba(255,255,255,0.05) 0 1px, transparent 1px 3px);
  opacity: 0.96;
  pointer-events: none;
}
.pe-print-overlay.develop .pe-print-veil {
  animation: peDevelopVeil 2.75s ease-out forwards;
}
.pe-print-camwrap {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  aspect-ratio: 1760 / 1104;
  transform: translateY(10%);
  overflow: hidden;
  z-index: 5;
  pointer-events: none;
  background: transparent;
}
.pe-print-overlay.on .pe-print-camwrap {
  animation: peCamIn 0.55s ease-out forwards;
}
.pe-print-overlay.play .pe-print-camwrap {
  animation: peCamIn 0.55s ease-out forwards;
}
.pe-print-camera {
  position: relative;
  width: 100%;
  height: auto;
  background: transparent;
}
.pe-print-camera img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  object-position: top center;
  background: transparent;
  filter: drop-shadow(0 10px 18px rgba(0,0,0,0.28));
}
.pe-print-slot {
  position: absolute;
  left: 18.69%;
  width: 64.66%;
  top: 10.51%;
  height: 0;
  pointer-events: none;
}
@keyframes peCamIn {
  from { transform: translateY(12%); }
  to { transform: translateY(0); }
}
@keyframes peCamOut {
  to { transform: translateY(28%); opacity: 0; }
}
@keyframes peFilmPrint {
  to { transform: translateX(-50%) translateY(1px); }
}
@keyframes peDevelopImg {
  to { filter: contrast(1) brightness(1) saturate(1); }
}
@keyframes peDevelopVeil {
  to { opacity: 0; }
}

/* ============================================================
   Toast
   ============================================================ */
.toast {
  position: absolute;
  bottom: calc(100px + var(--safe-bottom));
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  padding: 11px 22px;
  background: rgba(20, 20, 20, 0.88);
  color: white;
  border-radius: 24px;
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 9999;
  white-space: nowrap;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  max-width: 80%;
  overflow: hidden;
  text-overflow: ellipsis;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ============================================================
   游客提示
   ============================================================ */
.guest-banner {
  margin: 0 20px 12px;
  padding: 10px 14px;
  background: var(--brand-bg);
  border-radius: 12px;
  font-size: 12px;
  color: var(--brand-dark);
  display: flex;
  align-items: center;
  gap: 8px;
}
.guest-banner .close {
  margin-left: auto;
  cursor: pointer;
  opacity: 0.6;
}

/* 空状态 */
.empty-state {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 80px 40px; text-align: center;
}
.empty-emoji { font-size: 56px; margin-bottom: 16px; opacity: 0.85; }
.empty-title {
  font-size: 17px; color: var(--text-primary);
  font-family: 'STKaiti', 'KaiTi', '楷体', serif;
  margin-bottom: 6px; letter-spacing: 1px;
}
.empty-sub { font-size: 13px; color: var(--text-light); margin-bottom: 24px; }
.empty-cta {
  padding: 12px 28px; background: var(--brand); color: white;
  border: none; border-radius: 24px; font-size: 14px;
  font-family: 'STKaiti', 'KaiTi', '楷体', serif; letter-spacing: 1px;
  cursor: pointer; box-shadow: 0 4px 12px rgba(168,181,160,0.3);
  transition: transform 0.2s;
}
.empty-cta:active { transform: scale(0.95); }

/* 下拉刷新提示 */
.ptr-indicator {
  text-align: center; padding: 12px 0;
  color: var(--text-light); font-size: 12px; letter-spacing: 1px;
  opacity: 0; transition: opacity 0.2s;
  pointer-events: none;
}
.ptr-indicator.show { opacity: 1; }
.ptr-indicator.refreshing { color: var(--brand); }
.ptr-indicator .ptr-spinner {
  display: inline-block; width: 12px; height: 12px;
  border: 1.5px solid var(--brand); border-top-color: transparent;
  border-radius: 50%; margin-right: 6px;
  animation: ptr-spin 0.8s linear infinite;
  vertical-align: middle;
}
@keyframes ptr-spin { to { transform: rotate(360deg); } }


/* 好友视角点赞 */
.polaroid-like {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  margin: 14px auto 0; padding: 8px 18px;
  background: rgba(255,255,255,0.6);
  border: 1px solid rgba(168,181,160,0.3);
  border-radius: 20px;
  font-size: 13px; color: var(--text-secondary);
  cursor: pointer; transition: all 0.2s;
  width: fit-content;
}
.polaroid-like:active { transform: scale(0.95); }
.polaroid-like.liked {
  background: linear-gradient(135deg, #FFE4E1, #FFC0CB);
  border-color: rgba(255,99,99,0.4);
  color: #C53030;
}
.like-icon { font-size: 14px; }
.pawbook-cam-illus,
.y2k-cam-illus { display: none; }

/* ============================================================
   绘本足迹主题（PawPaw / 美式儿童绘本手绘）
   ============================================================ */
html[data-theme="pawbook"] {
  --theme-main: #F6EDE0;
  --theme-accent: #D9897A;
  --theme-assist: #C9DCC4;
  --theme-card: #FFF8EE;
  --theme-text: #4A3B32;
  --bg: #F6EDE0;
  --card: #FFF8EE;
  --text-primary: #4A3B32;
  --text-secondary: #6B5348;
  --text-light: #9A8478;
  --brand: #D9897A;
  --brand-dark: #B56B5E;
  --brand-light: rgba(217, 137, 122, 0.2);
  --brand-bg: rgba(217, 137, 122, 0.1);
  --tag-bg: #C9DCC4;
  --divider: rgba(74, 59, 50, 0.1);
  --brown: #C4A484;
  --radius-card: 24px;
  --radius-btn: 28px;
  --radius-tag: 999px;
  --radius-polaroid: 18px;
  --shadow-card: 3px 4px 0 #4A3B32;
  --shadow-polaroid: 4px 6px 0 rgba(74, 59, 50, 0.18);
  --shadow-btn: 2px 3px 0 #4A3B32;
  --ink: #4A3B32;
  --macaron-yellow: #F2D48A;
  --macaron-blue: #A8C4D4;
  --macaron-mint: #C9DCC4;
  --macaron-coral: #E8A598;
  --paper: #FFF8EE;
  font-family: "Nunito", "Quicksand", "Hiragino Maru Gothic ProN", "PingFang SC", "Microsoft YaHei", sans-serif;
}
html[data-theme="pawbook"],
html[data-theme="pawbook"] body,
html[data-theme="pawbook"] .app-frame {
  font-family: "Nunito", "Quicksand", "Hiragino Maru Gothic ProN", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-weight: 700;
}
html[data-theme="pawbook"] .app-frame {
  background-color: var(--bg);
  background-image:
    radial-gradient(circle at 12% 8%, rgba(242, 212, 138, 0.35) 0 18px, transparent 19px),
    radial-gradient(circle at 88% 18%, rgba(168, 196, 212, 0.28) 0 14px, transparent 15px),
    radial-gradient(circle at 80% 92%, rgba(201, 220, 196, 0.4) 0 22px, transparent 23px);
}
html[data-theme="pawbook"] #page-my-nodes::before,
html[data-theme="pawbook"] #page-calendar::before {
  content: '';
  position: absolute;
  right: 18px;
  top: calc(58px + var(--safe-top));
  width: 36px;
  height: 36px;
  background: url("/assets/theme/pawbook/star.svg") center / contain no-repeat;
  pointer-events: none;
  z-index: 3;
  opacity: 0.9;
}
html[data-theme="pawbook"] #page-my-nodes::after {
  content: '';
  position: absolute;
  left: 10px;
  bottom: calc(var(--nav-height) + 18px);
  width: 58px;
  height: 32px;
  background: url("/assets/theme/pawbook/cloud.svg") center / contain no-repeat;
  pointer-events: none;
  z-index: 3;
  opacity: 0.85;
}
html[data-theme="pawbook"] .btn,
html[data-theme="pawbook"] .empty-cta,
html[data-theme="pawbook"] .redeem-box button,
html[data-theme="pawbook"] .af-add-btn,
html[data-theme="pawbook"] .login-code-btn,
html[data-theme="pawbook"] .message-actions .accept {
  border: 2.5px solid var(--ink) !important;
  border-radius: 999px !important;
  background: var(--macaron-yellow) !important;
  color: var(--ink) !important;
  box-shadow: 2px 3px 0 var(--ink);
  font-weight: 800;
}
html[data-theme="pawbook"] .btn-primary,
html[data-theme="pawbook"] .empty-cta {
  background: var(--macaron-coral) !important;
}
html[data-theme="pawbook"] .btn-secondary {
  background: var(--paper) !important;
}
html[data-theme="pawbook"] .tl-tag,
html[data-theme="pawbook"] .tag,
html[data-theme="pawbook"] .polaroid-tags .tag,
html[data-theme="pawbook"] .capture-tags .tag,
html[data-theme="pawbook"] .capture-tag-row .preset,
html[data-theme="pawbook"] .msg-type-tag,
html[data-theme="pawbook"] .year-chip {
  border: 2px solid var(--ink) !important;
  border-radius: 999px !important;
  background: var(--macaron-mint) !important;
  color: var(--ink) !important;
  box-shadow: 1px 1px 0 var(--ink);
  font-weight: 800;
}
html[data-theme="pawbook"] .tl-mood,
html[data-theme="pawbook"] .polaroid-tags .mood,
html[data-theme="pawbook"] .capture-tag-row .preset.on {
  background: var(--macaron-coral) !important;
}
html[data-theme="pawbook"] .confirm-box,
html[data-theme="pawbook"] .theme-panel,
html[data-theme="pawbook"] .polaroid,
html[data-theme="pawbook"] .menu-list,
html[data-theme="pawbook"] .addfriend-search,
html[data-theme="pawbook"] .addfriend-result,
html[data-theme="pawbook"] .share-code-card,
html[data-theme="pawbook"] .capture-polaroid,
html[data-theme="pawbook"] .comments-panel {
  background: var(--paper) !important;
  border: 3px solid var(--ink) !important;
  border-radius: 26px !important;
  box-shadow: 4px 5px 0 var(--ink);
}
html[data-theme="pawbook"] .confirm-box { overflow: hidden; }
html[data-theme="pawbook"] .confirm-btns { border-top: 2.5px solid var(--ink); }
html[data-theme="pawbook"] .confirm-btns .cb { font-weight: 800; }
html[data-theme="pawbook"] .confirm-btns .cb.ok {
  background: var(--macaron-yellow);
  color: var(--ink) !important;
}
html[data-theme="pawbook"] .menu-item .icon {
  background: var(--macaron-blue);
  border: 2px solid var(--ink);
  border-radius: 14px;
  width: 32px;
  height: 32px;
}
html[data-theme="pawbook"] .top-nav .icon-btn,
html[data-theme="pawbook"] .cam-icon-btn,
html[data-theme="pawbook"] .cam-mic,
html[data-theme="pawbook"] .cam-thumb.empty {
  border: 2.5px solid var(--ink) !important;
  background: var(--paper) !important;
  box-shadow: 2px 2px 0 var(--ink);
}
html[data-theme="pawbook"] .bottom-nav {
  background: rgba(246, 237, 224, 0.92);
  border-top: 2.5px solid var(--ink);
}
html[data-theme="pawbook"] .nav-item.camera .cam-btn {
  border: 2.5px solid var(--ink);
  background: var(--macaron-coral) !important;
  box-shadow: 2px 3px 0 var(--ink);
}
html[data-theme="pawbook"] .brown-timeline::before {
  width: 20px;
  left: 50px;
  background: url("/assets/theme/pawbook/trail.svg") center top / 20px 88px repeat-y;
}
html[data-theme="pawbook"] .tl-entry .tl-dot {
  width: 20px;
  height: 20px;
  left: -26px;
  top: 10px;
  border: none;
  box-shadow: none;
  background: url("/assets/theme/pawbook/paw.svg") center / contain no-repeat;
  border-radius: 0;
}
html[data-theme="pawbook"] .tl-entry .tl-polaroid {
  border: 3px solid var(--ink);
  border-radius: 18px;
  background: var(--paper);
  box-shadow: 3px 4px 0 var(--ink);
}
html[data-theme="pawbook"] .tl-entry .tl-polaroid .photo { border-radius: 12px; }
html[data-theme="pawbook"] .page-camera-ios { background: #F6EDE0; }
html[data-theme="pawbook"] .cam-viewfinder {
  border: 3px solid var(--ink);
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 3px 4px 0 var(--ink);
}
html[data-theme="pawbook"] .cam-shutter-wrap {
  width: 132px;
  height: 110px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
html[data-theme="pawbook"] .pawbook-cam-illus {
  display: block;
  position: absolute;
  left: 50%;
  bottom: 18px;
  width: 132px;
  height: 100px;
  transform: translateX(-50%);
  background: url("/assets/theme/pawbook/camera.svg") center / contain no-repeat;
  pointer-events: none;
  z-index: 0;
}
html[data-theme="pawbook"] .cam-shutter {
  width: 54px;
  height: 54px;
  margin-bottom: 22px;
  background: var(--macaron-coral);
  border: 2.8px solid var(--ink);
  box-shadow: 2px 3px 0 var(--ink);
  z-index: 1;
}
html[data-theme="pawbook"] .cam-shutter .inner {
  width: 34px;
  height: 34px;
  background: #FFF8EE;
  border: 2.5px solid var(--ink);
}
html[data-theme="pawbook"] .cam-shutter.recording .inner {
  background: var(--macaron-coral);
  border-color: var(--ink);
}
html[data-theme="pawbook"] .edit-tabs button,
html[data-theme="pawbook"] .edit-size-chip,
html[data-theme="pawbook"] .edit-chip .preview {
  border: 2px solid var(--ink);
  border-radius: 16px;
}
html[data-theme="pawbook"] .edit-tabs button.on,
html[data-theme="pawbook"] .edit-size-chip.on {
  background: var(--macaron-coral) !important;
  color: var(--ink) !important;
}
html[data-theme="pawbook"] .toast {
  border: 2.5px solid var(--ink);
  background: var(--paper);
  color: var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
}
html[data-theme="pawbook"] .profile-avatar,
html[data-theme="pawbook"] .avatar {
  border: 2.5px solid var(--ink);
  box-shadow: 2px 2px 0 var(--ink);
}

/* ============================================================
   Y2K 甜酷主题（CCD / CRT / 千禧少女拼贴）
   ============================================================ */
html[data-theme="y2k"] {
  --theme-main: #FFE4F1;
  --theme-accent: #FF6B9D;
  --theme-assist: #7FDBFF;
  --theme-card: #FFF5FB;
  --theme-text: #3D2A4A;
  --bg: #FFE4F1;
  --card: #FFF5FB;
  --text-primary: #3D2A4A;
  --text-secondary: #6B4B78;
  --text-light: #A07A9A;
  --brand: #FF6B9D;
  --brand-dark: #E24B86;
  --brand-light: rgba(255, 107, 157, 0.22);
  --brand-bg: rgba(255, 107, 157, 0.1);
  --tag-bg: #C9A7FF;
  --divider: rgba(61, 42, 74, 0.12);
  --brown: #FF6B9D;
  --radius-card: 22px;
  --radius-btn: 999px;
  --radius-tag: 999px;
  --radius-polaroid: 16px;
  --shadow-card: 3px 4px 0 #3D2A4A;
  --shadow-polaroid: 4px 6px 0 rgba(61, 42, 74, 0.16);
  --shadow-btn: 2px 3px 0 #3D2A4A;
  --ink: #3D2A4A;
  --y2k-pink: #FF8FB8;
  --y2k-lilac: #C9A7FF;
  --y2k-mint: #7FDBFF;
  --y2k-lemon: #FFE66D;
  --y2k-holo: linear-gradient(120deg, #FF8FB8, #C9A7FF, #7FDBFF, #FFE66D);
  --paper: #FFF5FB;
  font-family: "Comfortaa", "Pacifico", "PingFang SC", "Microsoft YaHei", sans-serif;
}
html[data-theme="y2k"],
html[data-theme="y2k"] body,
html[data-theme="y2k"] .app-frame {
  font-family: "Comfortaa", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-weight: 700;
}
html[data-theme="y2k"] .app-frame {
  background-color: var(--bg);
  background-image:
    radial-gradient(circle at 10% 12%, rgba(255, 230, 109, 0.35) 0 16px, transparent 17px),
    radial-gradient(circle at 88% 16%, rgba(201, 167, 255, 0.32) 0 14px, transparent 15px),
    radial-gradient(circle at 78% 88%, rgba(127, 219, 255, 0.28) 0 20px, transparent 21px);
}
html[data-theme="y2k"] .app-frame::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 40;
  opacity: 0.1;
  background-image: repeating-linear-gradient(
    0deg,
    rgba(61, 42, 74, 0.18) 0 1px,
    transparent 1px 3px
  );
}
html[data-theme="y2k"] .app-frame::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 41;
  opacity: 0.07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='80' height='80' filter='url(%23n)' opacity='0.55'/%3E%3C/svg%3E");
}
html[data-theme="y2k"] .top-nav .tabs .tab,
html[data-theme="y2k"] .logo,
html[data-theme="y2k"] .profile-name {
  text-shadow: 0 0 8px rgba(255, 107, 157, 0.45);
}
html[data-theme="y2k"] .btn,
html[data-theme="y2k"] .empty-cta,
html[data-theme="y2k"] .redeem-box button,
html[data-theme="y2k"] .af-add-btn,
html[data-theme="y2k"] .login-code-btn,
html[data-theme="y2k"] .message-actions .accept {
  border: 2.5px solid var(--ink) !important;
  border-radius: 999px !important;
  background: linear-gradient(120deg, #FF8FB8, #C9A7FF) !important;
  color: var(--ink) !important;
  box-shadow: 2px 3px 0 var(--ink);
  font-weight: 800;
  position: relative;
}
html[data-theme="y2k"] .btn::after,
html[data-theme="y2k"] .empty-cta::after {
  content: '♡';
  position: absolute;
  right: 8px;
  top: -8px;
  font-size: 11px;
  color: #FF6B9D;
  text-shadow: 0 0 6px #FF8FB8;
}
html[data-theme="y2k"] .btn-primary,
html[data-theme="y2k"] .empty-cta {
  background: #FF6B9D !important;
  color: #FFF5FB !important;
}
html[data-theme="y2k"] .btn-secondary {
  background: var(--paper) !important;
}
html[data-theme="y2k"] .tl-tag,
html[data-theme="y2k"] .tag,
html[data-theme="y2k"] .polaroid-tags .tag,
html[data-theme="y2k"] .capture-tags .tag,
html[data-theme="y2k"] .capture-tag-row .preset,
html[data-theme="y2k"] .msg-type-tag,
html[data-theme="y2k"] .year-chip {
  border: 2px solid #111 !important;
  border-radius: 999px !important;
  background: #FFE66D !important;
  color: #111 !important;
  box-shadow: 1px 2px 0 #111;
  font-weight: 800;
}
html[data-theme="y2k"] .tl-mood,
html[data-theme="y2k"] .polaroid-tags .mood,
html[data-theme="y2k"] .capture-tag-row .preset.on,
html[data-theme="y2k"] .year-chip.active {
  background: #FF8FB8 !important;
}
html[data-theme="y2k"] .confirm-box,
html[data-theme="y2k"] .theme-panel,
html[data-theme="y2k"] .menu-list,
html[data-theme="y2k"] .addfriend-search,
html[data-theme="y2k"] .addfriend-result,
html[data-theme="y2k"] .share-code-card,
html[data-theme="y2k"] .capture-polaroid,
html[data-theme="y2k"] .comments-panel {
  background:
    repeating-linear-gradient(180deg, #FFF5FB 0 22px, #FFEAF4 22px 23px) !important;
  border: 3px solid var(--ink) !important;
  border-radius: 8px 22px 22px 8px !important;
  box-shadow: 4px 5px 0 var(--ink), inset 10px 0 0 #C9A7FF;
}
html[data-theme="y2k"] .confirm-box { overflow: hidden; }
html[data-theme="y2k"] .confirm-btns { border-top: 2.5px solid var(--ink); }
html[data-theme="y2k"] .confirm-btns .cb.ok {
  background: linear-gradient(120deg, #FF8FB8, #7FDBFF);
  color: var(--ink) !important;
}
html[data-theme="y2k"] .menu-item .icon {
  background: #7FDBFF;
  border: 2px solid var(--ink);
  border-radius: 12px;
  width: 32px;
  height: 32px;
}
html[data-theme="y2k"] .top-nav .icon-btn,
html[data-theme="y2k"] .cam-icon-btn,
html[data-theme="y2k"] .cam-mic,
html[data-theme="y2k"] .cam-thumb.empty {
  border: 2.5px solid var(--ink) !important;
  background: #FFF5FB !important;
  box-shadow: 2px 2px 0 var(--ink);
}
html[data-theme="y2k"] .bottom-nav {
  background: rgba(255, 228, 241, 0.92);
  border-top: 2.5px solid var(--ink);
}
html[data-theme="y2k"] .nav-item .ico::after {
  content: '✦';
  position: absolute;
  top: -6px;
  right: -8px;
  font-size: 8px;
  color: #FFE66D;
  text-shadow: 0 0 4px #FF8FB8;
}
html[data-theme="y2k"] .nav-item .ico { position: relative; }
html[data-theme="y2k"] .nav-item.camera .cam-btn {
  border: 2.5px solid var(--ink);
  background: linear-gradient(120deg, #FF6B9D, #C9A7FF) !important;
  box-shadow: 2px 3px 0 var(--ink);
}
html[data-theme="y2k"] .toast {
  border: 2.5px solid var(--ink);
  background: #FFF5FB;
  color: var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
}

/* 相机页：CCD 插画快门 */
html[data-theme="y2k"] .page-camera-ios { background: #FFE4F1; }
html[data-theme="y2k"] .cam-viewfinder {
  border: 3px solid var(--ink);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 3px 4px 0 var(--ink);
  filter: contrast(0.92) saturate(1.08) sepia(0.08);
}
html[data-theme="y2k"] .cam-viewfinder::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(180deg, rgba(255,255,255,0.08) 0 1px, transparent 1px 4px);
}
html[data-theme="y2k"] .cam-shutter-wrap {
  width: 132px;
  height: 110px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
html[data-theme="y2k"] .y2k-cam-illus {
  display: block;
  position: absolute;
  left: 50%;
  bottom: 18px;
  width: 132px;
  height: 100px;
  transform: translateX(-50%);
  background: url("/assets/theme/y2k/camera.svg") center / contain no-repeat;
  pointer-events: none;
  z-index: 0;
}
html[data-theme="y2k"] .cam-shutter {
  width: 54px;
  height: 54px;
  margin-bottom: 22px;
  background: #FF6B9D;
  border: 2.8px solid var(--ink);
  box-shadow: 2px 3px 0 var(--ink);
  z-index: 1;
}
html[data-theme="y2k"] .cam-shutter .inner {
  width: 34px;
  height: 34px;
  background: #FFF5FB;
  border: 2.5px solid var(--ink);
}
html[data-theme="y2k"] .cam-shutter.recording .inner {
  background: #FF6B9D;
  border-color: var(--ink);
}

/* 节点列表：条纹壁纸 + 堆叠白框相纸 + 闪光虚线 */
html[data-theme="y2k"] #page-my-nodes,
html[data-theme="y2k"] #page-day {
  background-color: #FFE4F1;
  background-image:
    repeating-linear-gradient(90deg, rgba(201,167,255,0.2) 0 16px, rgba(255,228,241,0.55) 16px 32px),
    url("/assets/theme/y2k/heart.svg"),
    url("/assets/theme/y2k/star.svg"),
    url("/assets/theme/y2k/bow.svg");
  background-repeat: repeat, no-repeat, no-repeat, no-repeat;
  background-size: auto, 28px, 26px, 34px;
  background-position: 0 0, 86% 72px, 10% 78%, 88% 86%;
}
html[data-theme="y2k"] .brown-timeline::before {
  width: 24px;
  left: 48px;
  background: url("/assets/theme/y2k/sparkle-trail.svg") center top / 24px 88px repeat-y;
  filter: drop-shadow(0 0 4px rgba(255, 107, 157, 0.7));
}
html[data-theme="y2k"] .tl-entry .tl-dot {
  width: 18px;
  height: 18px;
  left: -25px;
  top: 10px;
  border: none;
  box-shadow: 0 0 8px #FFE66D;
  background: url("/assets/theme/y2k/star.svg") center / contain no-repeat;
  border-radius: 0;
}
html[data-theme="y2k"] .tl-entry .tl-polaroid {
  width: 118px;
  padding: 8px 8px 22px;
  border: 2.5px solid var(--ink);
  border-radius: 6px;
  background: #FFF5FB;
  box-shadow: 3px 4px 0 rgba(61, 42, 74, 0.22);
  transform: rotate(-2.4deg);
}
html[data-theme="y2k"] .tl-entry:nth-child(2n) .tl-polaroid { transform: rotate(2.6deg); }
html[data-theme="y2k"] .tl-entry:nth-child(3n) .tl-polaroid { transform: rotate(-1.2deg); }
html[data-theme="y2k"] .tl-entry .tl-polaroid:active { transform: scale(0.96) rotate(0deg); }
html[data-theme="y2k"] .tl-entry .tl-polaroid .photo { border-radius: 4px; filter: contrast(0.94) saturate(1.06) sepia(0.06); }

/* 详情卡随机皮肤 */
html[data-theme="y2k"] .polaroid {
  border: 3px solid var(--ink);
  overflow: hidden;
}
html[data-theme="y2k"] .polaroid.y2k-skin-candy {
  background: linear-gradient(180deg, #FFD6E8 0 18%, #FFF5FB 18% 82%, #C9F3FF 82%);
}
html[data-theme="y2k"] .polaroid.y2k-skin-polka {
  background-color: #FFF5FB;
  background-image: radial-gradient(#FF6B9D 1.4px, transparent 1.5px);
  background-size: 12px 12px;
}
html[data-theme="y2k"] .polaroid.y2k-skin-holo {
  background: linear-gradient(125deg, #FFB3D9, #C9A7FF, #7FDBFF, #FFE66D, #FFB3D9);
  background-size: 220% 220%;
}
html[data-theme="y2k"] .polaroid.y2k-skin-glitter {
  background:
    radial-gradient(circle at 18% 22%, #fff 0 1px, transparent 2px),
    radial-gradient(circle at 72% 38%, #FFE66D 0 1.2px, transparent 2px),
    radial-gradient(circle at 40% 78%, #fff 0 1px, transparent 2px),
    linear-gradient(180deg, #EDE7F6, #FFF5FB);
}

/* 查找页：CRT 电视机日历 */
html[data-theme="y2k"] #page-calendar,
html[data-theme="y2k"] #page-friend-calendar {
  background: #2A2433;
}
html[data-theme="y2k"] #page-calendar .top-nav,
html[data-theme="y2k"] #page-friend-calendar .top-nav,
html[data-theme="y2k"] #page-calendar .year-strip,
html[data-theme="y2k"] #page-friend-calendar .year-strip {
  background: #3A3148;
  color: #FFE4F1;
}
html[data-theme="y2k"] #page-calendar .top-nav .tab,
html[data-theme="y2k"] #page-friend-calendar .top-nav .tab {
  color: #FFE4F1;
}
html[data-theme="y2k"] #calendar-scroll,
html[data-theme="y2k"] #friend-calendar-scroll {
  margin: 8px 14px 16px;
  padding: 12px 10px 24px;
  border: 10px solid #1C1724;
  border-radius: 22px;
  background:
    repeating-linear-gradient(180deg, rgba(255,255,255,0.05) 0 1px, transparent 1px 4px),
    radial-gradient(ellipse at center, #3A4A3A 0%, #243028 70%);
  box-shadow: inset 0 0 0 3px #8B7A9E, 0 0 0 3px #C9A7FF, 0 8px 0 #1C1724;
  filter: contrast(0.95) saturate(1.1);
}
html[data-theme="y2k"] #calendar-scroll .cal-section,
html[data-theme="y2k"] #friend-calendar-scroll .cal-section {
  background: transparent;
}
html[data-theme="y2k"] #calendar-scroll .year-month,
html[data-theme="y2k"] #calendar-scroll .count,
html[data-theme="y2k"] #calendar-scroll .cal-weekday,
html[data-theme="y2k"] #friend-calendar-scroll .year-month,
html[data-theme="y2k"] #friend-calendar-scroll .count,
html[data-theme="y2k"] #friend-calendar-scroll .cal-weekday {
  color: #D8F5D0;
  text-shadow: 0 0 6px rgba(127, 219, 255, 0.45);
}
html[data-theme="y2k"] #calendar-scroll .cal-day.has-photo,
html[data-theme="y2k"] #friend-calendar-scroll .cal-day.has-photo {
  outline: 2px solid #FFE66D;
  box-shadow: 0 0 8px rgba(255, 230, 109, 0.7);
}

/* 我的：tin 金属盒拼贴资料 */
html[data-theme="y2k"] .profile-info {
  background:
    linear-gradient(135deg, rgba(255,255,255,0.35), transparent 40%),
    repeating-linear-gradient(135deg, #C5C8CE 0 8px, #A8ADB6 8px 16px);
  border: 3px solid #3D2A4A;
  border-radius: 8px;
  box-shadow: 4px 5px 0 #3D2A4A, inset 0 1px 0 #F4F6F8;
  position: relative;
}
html[data-theme="y2k"] .profile-info::before {
  content: '';
  position: absolute;
  right: 10px;
  top: 8px;
  width: 22px;
  height: 22px;
  background: url("/assets/theme/y2k/bow.svg") center / contain no-repeat;
  pointer-events: none;
}
html[data-theme="y2k"] .profile-info::after {
  content: '';
  position: absolute;
  left: 72px;
  bottom: 8px;
  width: 16px;
  height: 16px;
  background: url("/assets/theme/y2k/star.svg") center / contain no-repeat;
  pointer-events: none;
}
html[data-theme="y2k"] .profile-name,
html[data-theme="y2k"] .profile-bio,
html[data-theme="y2k"] .profile-account {
  color: #2A2433;
  text-shadow: 0 1px 0 rgba(255,255,255,0.45);
}
html[data-theme="y2k"] .stats-card {
  border: 2.5px solid var(--ink);
  background: #FFF5FB;
  box-shadow: 3px 4px 0 var(--ink);
}
html[data-theme="y2k"] .profile-avatar,
html[data-theme="y2k"] .avatar {
  border: 2.5px solid var(--ink);
  box-shadow: 2px 2px 0 var(--ink);
}
html[data-theme="y2k"] .edit-tabs button,
html[data-theme="y2k"] .edit-size-chip,
html[data-theme="y2k"] .edit-chip .preview {
  border: 2px solid var(--ink);
  border-radius: 16px;
}
html[data-theme="y2k"] .edit-tabs button.on,
html[data-theme="y2k"] .edit-size-chip.on {
  background: #FF6B9D !important;
  color: #FFF5FB !important;
}

/* ============================================================
   幼稚手绘主题（喜茶软萌 · 细马克笔线稿）
   ============================================================ */
html[data-theme="naivedraw"] {
  --theme-main: #F6F3EC;
  --theme-accent: #6F6A62;
  --theme-assist: #E8E2D6;
  --theme-card: #FFFEF9;
  --theme-text: #3A3832;
  --bg: #F6F3EC;
  --card: #FFFEF9;
  --text-primary: #3A3832;
  --text-secondary: #6A6560;
  --text-light: #9A948C;
  --brand: #6F6A62;
  --brand-dark: #4E4A45;
  --brand-light: rgba(111, 106, 98, 0.12);
  --brand-bg: rgba(111, 106, 98, 0.06);
  --tag-bg: #EFE9DD;
  --divider: rgba(58, 56, 50, 0.08);
  --brown: #2C2C2C;
  --radius-card: 18px;
  --radius-btn: 999px;
  --radius-tag: 999px;
  --radius-polaroid: 6px;
  --shadow-card: 0 8px 24px rgba(58, 56, 50, 0.04);
  --shadow-polaroid: 0 10px 28px rgba(58, 56, 50, 0.06);
  --shadow-btn: none;
  --ink: #2C2C2C;
  --paper: #FFFEF9;
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}
html[data-theme="naivedraw"],
html[data-theme="naivedraw"] body,
html[data-theme="naivedraw"] .app-frame {
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-weight: 400;
}
html[data-theme="naivedraw"] .app-frame {
  background: #F6F3EC;
}
html[data-theme="naivedraw"] .btn,
html[data-theme="naivedraw"] .empty-cta,
html[data-theme="naivedraw"] .redeem-box button,
html[data-theme="naivedraw"] .af-add-btn,
html[data-theme="naivedraw"] .login-code-btn,
html[data-theme="naivedraw"] .message-actions .accept {
  border: 1px solid #2C2C2C !important;
  border-radius: 999px !important;
  background: #FFFEF9 !important;
  color: #3A3832 !important;
  box-shadow: none;
  font-weight: 500;
}
html[data-theme="naivedraw"] .btn-primary,
html[data-theme="naivedraw"] .empty-cta {
  background: #EFE9DD !important;
}
html[data-theme="naivedraw"] .tl-tag,
html[data-theme="naivedraw"] .tag,
html[data-theme="naivedraw"] .polaroid-tags .tag,
html[data-theme="naivedraw"] .capture-tags .tag,
html[data-theme="naivedraw"] .capture-tag-row .preset,
html[data-theme="naivedraw"] .msg-type-tag,
html[data-theme="naivedraw"] .year-chip {
  border: 1px solid #2C2C2C !important;
  border-radius: 999px !important;
  background: #FFFEF9 !important;
  color: #3A3832 !important;
  box-shadow: none;
  font-weight: 500;
  transform: rotate(-1.5deg);
}
html[data-theme="naivedraw"] .tl-mood,
html[data-theme="naivedraw"] .polaroid-tags .mood,
html[data-theme="naivedraw"] .capture-tag-row .preset.on,
html[data-theme="naivedraw"] .year-chip.active {
  background: #EFE9DD !important;
  transform: rotate(1.2deg);
}
html[data-theme="naivedraw"] .confirm-box,
html[data-theme="naivedraw"] .theme-panel,
html[data-theme="naivedraw"] .menu-list,
html[data-theme="naivedraw"] .addfriend-search,
html[data-theme="naivedraw"] .addfriend-result,
html[data-theme="naivedraw"] .share-code-card,
html[data-theme="naivedraw"] .comments-panel {
  background: #FFFEF9 !important;
  border: 1px solid #D8D2C6 !important;
  border-radius: 18px !important;
  box-shadow: 0 10px 28px rgba(58, 56, 50, 0.05);
}
html[data-theme="naivedraw"] .top-nav .icon-btn,
html[data-theme="naivedraw"] .cam-icon-btn,
html[data-theme="naivedraw"] .cam-mic,
html[data-theme="naivedraw"] .cam-thumb.empty {
  border: 1px solid #2C2C2C !important;
  background: #FFFEF9 !important;
  box-shadow: none;
}
html[data-theme="naivedraw"] .bottom-nav {
  background: rgba(246, 243, 236, 0.72);
  border-top: 1px dashed rgba(44, 44, 44, 0.28);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
html[data-theme="naivedraw"] .toast {
  border: 1px solid #2C2C2C;
  background: #FFFEF9;
  color: #3A3832;
  box-shadow: none;
}
html[data-theme="naivedraw"] .page-camera-ios { background: #F6F3EC; }
html[data-theme="naivedraw"] .cam-viewfinder {
  border: 1px dashed #2C2C2C;
  border-radius: 18px;
  box-shadow: none;
  filter: contrast(0.96) saturate(0.92);
}
html[data-theme="naivedraw"] .cam-shutter {
  background: #FFFEF9;
  border: 1.4px solid #2C2C2C;
  box-shadow: none;
}
html[data-theme="naivedraw"] .cam-shutter .inner {
  background: #F6F3EC;
  border: 1px solid #2C2C2C;
}

html[data-theme="naivedraw"] #page-my-nodes,
html[data-theme="naivedraw"] #page-day {
  background-color: #F6F3EC;
  background-image:
    url("/assets/theme/naivedraw/person-write.svg"),
    url("/assets/theme/naivedraw/person-sticker.svg"),
    url("/assets/theme/naivedraw/person-camera.svg"),
    url("/assets/theme/naivedraw/person-sort.svg"),
    url("/assets/theme/naivedraw/arrow.svg"),
    url("/assets/theme/naivedraw/arrow.svg");
  background-repeat: no-repeat;
  background-size: 52px, 48px, 50px, 56px, 42px, 40px;
  background-position:
    6% calc(70px + var(--safe-top)),
    92% 28%,
    7% 72%,
    90% 78%,
    58% 24%,
    62% 66%;
}
html[data-theme="naivedraw"] .brown-timeline::before {
  width: 12px;
  left: 54px;
  background: url("/assets/theme/naivedraw/trail.svg") center top / 12px 64px repeat-y;
  opacity: 0.7;
}
html[data-theme="naivedraw"] .tl-entry .tl-dot {
  width: 7px;
  height: 7px;
  left: -19px;
  border: 1px solid #2C2C2C;
  background: #FFFEF9;
  box-shadow: none;
}
html[data-theme="naivedraw"] .tl-entry .tl-polaroid,
html[data-theme="naivedraw"] .polaroid,
html[data-theme="naivedraw"] .capture-polaroid {
  background: #FFFEF9;
  border: 1px dashed #2C2C2C;
  outline: 1px dashed #2C2C2C;
  outline-offset: 4px;
  box-shadow: 0 8px 20px rgba(58, 56, 50, 0.04);
  border-radius: 4px;
}
html[data-theme="naivedraw"] .tl-entry .tl-polaroid .photo,
html[data-theme="naivedraw"] .polaroid-photo {
  filter: contrast(0.96) saturate(0.94);
}
html[data-theme="naivedraw"] #page-calendar,
html[data-theme="naivedraw"] #page-friend-calendar,
html[data-theme="naivedraw"] #page-profile {
  background: #F6F3EC;
}
html[data-theme="naivedraw"] .cal-day {
  border-radius: 10px;
}
html[data-theme="naivedraw"] .cal-day.has-photo {
  outline: 1px dashed #2C2C2C;
  outline-offset: 1px;
}
html[data-theme="naivedraw"] .profile-info,
html[data-theme="naivedraw"] .stats-card {
  background: #FFFEF9;
  border: 1px dashed #2C2C2C;
  box-shadow: none;
}
html[data-theme="naivedraw"] .profile-avatar,
html[data-theme="naivedraw"] .avatar {
  border: 1px solid #2C2C2C;
  box-shadow: none;
}
html[data-theme="naivedraw"] .menu-item .icon {
  background: #EFE9DD;
  border: 1px solid #2C2C2C;
  border-radius: 12px;
}

/* ============================================================
   极简毛玻璃主题（iOS frosted glass · 仅色彩/质感/圆角）
   ============================================================ */
html[data-theme="iosglass"] {
  --theme-main: #F5F5F7;
  --theme-accent: #7BA3D4;
  --theme-assist: #E8EEF4;
  --theme-card: #FFFFFF;
  --theme-text: #1C1C1E;
  --bg: #F5F5F7;
  --card: rgba(255, 255, 255, 0.72);
  --text-primary: #1C1C1E;
  --text-secondary: #636366;
  --text-light: #8E8E93;
  --brand: #7BA3D4;
  --brand-dark: #5E87B8;
  --brand-light: rgba(123, 163, 212, 0.18);
  --brand-bg: rgba(123, 163, 212, 0.10);
  --tag-bg: rgba(255, 255, 255, 0.55);
  --divider: rgba(60, 60, 67, 0.10);
  --brown: #C5CDD6;
  --brown-light: rgba(123, 163, 212, 0.28);
  --radius-card: 22px;
  --radius-btn: 999px;
  --radius-tag: 999px;
  --shadow-card: 0 8px 28px rgba(15, 23, 42, 0.05);
  --shadow-btn: none;
  --shadow-fab: 0 8px 20px rgba(123, 163, 212, 0.28);
  --nav-bg: rgba(245, 245, 247, 0.62);
  --glass: rgba(255, 255, 255, 0.62);
  --glass-strong: rgba(255, 255, 255, 0.78);
  --hairline: rgba(60, 60, 67, 0.12);
  font-family: "PingFang SC", -apple-system, BlinkMacSystemFont, "Hiragino Sans GB", "Helvetica Neue", "Microsoft YaHei", sans-serif;
}
html[data-theme="iosglass"],
html[data-theme="iosglass"] body,
html[data-theme="iosglass"] .app-frame {
  font-family: "PingFang SC", -apple-system, BlinkMacSystemFont, "Hiragino Sans GB", "Helvetica Neue", "Microsoft YaHei", sans-serif;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}
html[data-theme="iosglass"] .app-frame,
html[data-theme="iosglass"] .page,
html[data-theme="iosglass"] .edit-overlay {
  background:
    radial-gradient(120% 70% at 50% -8%, rgba(123, 163, 212, 0.10), transparent 58%),
    #F5F5F7;
}
html[data-theme="iosglass"] .top-nav {
  background: rgba(245, 245, 247, 0.62);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-bottom: 1px solid var(--hairline);
}
html[data-theme="iosglass"] .bottom-nav {
  background: rgba(255, 255, 255, 0.58);
  border-top: 1px solid var(--hairline);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  box-shadow: none;
}
html[data-theme="iosglass"] .nav-item.camera .cam-btn {
  box-shadow: var(--shadow-fab);
}
html[data-theme="iosglass"] .btn,
html[data-theme="iosglass"] .empty-cta,
html[data-theme="iosglass"] .redeem-box button,
html[data-theme="iosglass"] .af-add-btn,
html[data-theme="iosglass"] .login-code-btn,
html[data-theme="iosglass"] .message-actions .accept,
html[data-theme="iosglass"] .sheet-cancel {
  border-radius: 999px !important;
  box-shadow: none;
  font-weight: 500;
}
html[data-theme="iosglass"] .btn-primary,
html[data-theme="iosglass"] .empty-cta,
html[data-theme="iosglass"] .message-actions .accept {
  background: #7BA3D4 !important;
  color: #FFFFFF !important;
  border: none !important;
}
html[data-theme="iosglass"] .btn-secondary,
html[data-theme="iosglass"] .login-code-btn,
html[data-theme="iosglass"] .af-add-btn,
html[data-theme="iosglass"] .redeem-box button,
html[data-theme="iosglass"] .message-actions .ignore,
html[data-theme="iosglass"] .sheet-cancel {
  background: rgba(255, 255, 255, 0.62) !important;
  color: #1C1C1E !important;
  border: 1px solid var(--hairline) !important;
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
}
html[data-theme="iosglass"] .login-field,
html[data-theme="iosglass"] .sheet-input {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--hairline);
  border-radius: 16px;
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  box-shadow: none;
}
html[data-theme="iosglass"] .tl-tag,
html[data-theme="iosglass"] .capture-tags .tag,
html[data-theme="iosglass"] .capture-tag-row .preset,
html[data-theme="iosglass"] .msg-type-tag,
html[data-theme="iosglass"] .year-chip {
  border: 1px solid var(--hairline) !important;
  border-radius: 999px !important;
  background: rgba(255, 255, 255, 0.55) !important;
  color: #636366 !important;
  box-shadow: none;
  font-weight: 500;
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
}
html[data-theme="iosglass"] .tl-mood,
html[data-theme="iosglass"] .capture-tag-row .preset.on,
html[data-theme="iosglass"] .year-chip.active {
  background: rgba(123, 163, 212, 0.18) !important;
  color: #5E87B8 !important;
  border-color: rgba(123, 163, 212, 0.28) !important;
}
html[data-theme="iosglass"] .confirm-box,
html[data-theme="iosglass"] .theme-panel,
html[data-theme="iosglass"] .menu-list,
html[data-theme="iosglass"] .addfriend-search,
html[data-theme="iosglass"] .addfriend-result,
html[data-theme="iosglass"] .share-code-card,
html[data-theme="iosglass"] .comments-panel,
html[data-theme="iosglass"] .doc-body,
html[data-theme="iosglass"] .profile-info,
html[data-theme="iosglass"] .stats-card,
html[data-theme="iosglass"] .message-item,
html[data-theme="iosglass"] .lan-debug,
html[data-theme="iosglass"] .sheet {
  background: rgba(255, 255, 255, 0.62) !important;
  border: 1px solid var(--hairline);
  border-radius: 22px !important;
  box-shadow: 0 8px 32px rgba(15, 23, 42, 0.05);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
}
html[data-theme="iosglass"] .sheet {
  border-radius: 22px 22px 0 0 !important;
  border-bottom: none;
}
html[data-theme="iosglass"] .theme-item {
  border-radius: 16px;
}
html[data-theme="iosglass"] .theme-item.active {
  background: rgba(123, 163, 212, 0.10);
}
html[data-theme="iosglass"] .top-nav .icon-btn,
html[data-theme="iosglass"] .cam-icon-btn,
html[data-theme="iosglass"] .cam-mic,
html[data-theme="iosglass"] .cam-thumb.empty,
html[data-theme="iosglass"] .capture-mic-btn {
  background: rgba(255, 255, 255, 0.62) !important;
  border: 1px solid var(--hairline) !important;
  box-shadow: none;
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
}
html[data-theme="iosglass"] .toast {
  background: rgba(255, 255, 255, 0.78);
  color: #1C1C1E;
  border: 1px solid var(--hairline);
  border-radius: 18px;
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.06);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
}
html[data-theme="iosglass"] .cam-viewfinder {
  border-radius: 22px;
  border: 1px solid var(--hairline);
  box-shadow: none;
}
html[data-theme="iosglass"] .cam-shutter {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--hairline);
  box-shadow: none;
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
}
html[data-theme="iosglass"] .cam-shutter .inner {
  background: #7BA3D4;
  border: none;
}
html[data-theme="iosglass"] .cal-day {
  border-radius: 14px;
}
html[data-theme="iosglass"] .profile-avatar,
html[data-theme="iosglass"] .avatar {
  box-shadow: 0 4px 14px rgba(123, 163, 212, 0.22);
}
html[data-theme="iosglass"] .menu-item .icon {
  background: rgba(123, 163, 212, 0.12);
  border: 1px solid var(--hairline);
  border-radius: 12px;
  box-shadow: none;
}
html[data-theme="iosglass"] .pe-dock {
  background: rgba(255, 255, 255, 0.62);
  box-shadow: none;
  border-top: 1px solid var(--hairline);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
}
html[data-theme="iosglass"] .pe-tabs button {
  background: rgba(255, 255, 255, 0.55);
  color: #636366;
  border: 1px solid var(--hairline);
  border-radius: 999px;
}
html[data-theme="iosglass"] .pe-tabs button.on {
  background: rgba(123, 163, 212, 0.92);
  color: #FFFFFF;
  border-color: transparent;
}
html[data-theme="iosglass"] .edit-tabs button,
html[data-theme="iosglass"] .edit-size-chip,
html[data-theme="iosglass"] .edit-chip .preview {
  border: 1px solid var(--hairline);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.55);
  box-shadow: none;
}
html[data-theme="iosglass"] .edit-tabs button.on,
html[data-theme="iosglass"] .edit-size-chip.on {
  background: rgba(123, 163, 212, 0.18) !important;
  color: #5E87B8 !important;
}

/* ============================================================
   地球 Online · 消息页双方形入口（左 To Do / 右 地球 Online）
   ============================================================ */
.quick-entries {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 2px 0 10px;
  width: 100%;
}
.quick-square {
  position: relative;
  aspect-ratio: 1 / 1;
  width: 100%;
  border: none;
  border-radius: 18px;
  background: var(--card);
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 10px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.16s ease, box-shadow 0.16s ease;
  overflow: hidden;
}
.quick-square::after {
  content: '';
  position: absolute; inset: 0;
  border-radius: inherit;
  border: 1px solid var(--divider);
  pointer-events: none;
}
.quick-square:active { transform: scale(0.965); box-shadow: 0 1px 4px rgba(0,0,0,0.06); }
.quick-square .qs-ico {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  width: 46px; height: 46px;
  border-radius: 14px;
  font-size: 25px;
  line-height: 1;
}
.quick-square.qs-todo .qs-ico { background: var(--brand-light); color: var(--brand-dark); font-weight: 700; }
.quick-square.qs-earth .qs-ico {
  background: linear-gradient(140deg, #DCEBFF 0%, #E8F7EA 100%);
  font-size: 26px;
}
.quick-square .qs-ico-text { font-size: 24px; }
.quick-square .qs-title {
  font-size: 15px; font-weight: 700; color: var(--text-primary);
  letter-spacing: 0.2px; text-align: center; line-height: 1.15;
}
.quick-square .qs-sub {
  font-size: 11px; color: var(--text-light); text-align: center; line-height: 1.2;
  padding: 0 2px;
}
.quick-square .qs-badge {
  position: absolute; top: -5px; right: -5px;
  min-width: 17px; height: 17px; padding: 0 5px;
  border-radius: 9px;
  background: #E85D5D; color: #fff;
  font-size: 10px; font-weight: 700; line-height: 17px;
  text-align: center;
  box-shadow: 0 0 0 2px var(--card);
}
.quick-square .qs-badge-ok {
  background: var(--brand); font-size: 11px;
  display: flex; align-items: center; justify-content: center;
}

/* 相机页打卡拍摄横幅 */
.cam-checkin-banner {
  background: linear-gradient(100deg, rgba(120,170,255,0.18), rgba(140,215,160,0.18));
  border-color: rgba(120,170,255,0.5);
  color: var(--text-primary);
}

/* ============================================================
   地球 Online · 打卡页面
   ============================================================ */
.ck-loading, .ck-empty {
  padding: 60px 24px; text-align: center;
  color: var(--text-light); font-size: 13px; line-height: 1.7;
}
.ck-hero {
  margin: 14px 16px 0;
  padding: 20px 18px 18px;
  background: var(--card);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
}
.ck-hero::before {
  content: '';
  position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
  background: linear-gradient(180deg, #7BA3D4, #8CD7A0);
}
.ck-hero.is-done::before { background: linear-gradient(180deg, var(--brand), var(--brand-dark)); }
.ck-hero-kicker { font-size: 11px; letter-spacing: 1px; color: var(--text-light); font-weight: 600; }

/* —— 活力徽章组：稀有度 / 场景 / 活力值 —— */
.ck-hero-badges {
  display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px;
}
.ck-badge-rarity, .ck-badge-where, .ck-badge-energy {
  font-size: 10px; font-weight: 600; line-height: 1;
  padding: 4px 8px; border-radius: 9px; white-space: nowrap;
}
.ck-badge-rarity { color: #B4703A; background: #FDF0E0; }
.ck-badge-where  { color: #4A7BA6; background: #E8F1FA; }
.ck-badge-energy { color: #3F9060; background: #E6F6EC; }

/* —— 发现钩子：把「拍完之后还想什么」写出来 —— */
.ck-hero-spark {
  margin-top: 11px; padding: 9px 11px;
  font-size: 12px; line-height: 1.65; color: #8A6A3E;
  background: linear-gradient(135deg, #FFF8EC, #FDF3E3);
  border-left: 2px solid #E8C88A; border-radius: 0 8px 8px 0;
}

.ck-hero-task {
  margin-top: 10px;
  font-size: 20px; font-weight: 700; line-height: 1.42;
  color: var(--text-primary);
}
.ck-hero-hint { margin-top: 7px; font-size: 12px; color: var(--text-secondary); line-height: 1.6; }
.ck-hero-tag {
  display: inline-block; margin-top: 10px;
  font-size: 11px; color: var(--brand-dark);
  background: var(--brand-light); border-radius: 10px; padding: 3px 9px;
}
.ck-hero-btn {
  margin-top: 16px; width: 100%;
  border: none; border-radius: var(--radius-btn);
  background: var(--brand); color: #fff;
  font-size: 15px; font-weight: 600;
  padding: 12px 0; cursor: pointer;
  box-shadow: var(--shadow-btn);
}
.ck-hero-btn:active { transform: scale(0.985); }
.ck-hero-done { margin-top: 10px; font-size: 12px; color: var(--brand-dark); text-align: center; }

.ck-stat-line {
  margin: 12px 18px 2px; font-size: 11px; color: var(--text-light); line-height: 1.6;
}
.ck-stat-line b { color: var(--text-primary); font-size: 13px; }
.ck-stat-sep { margin: 0 6px; }

.ck-section { margin-top: 18px; }
.ck-section-title {
  font-size: 12px; font-weight: 600; color: var(--text-light);
  padding: 0 18px 8px; letter-spacing: 0.3px;
}
.ck-muted { font-weight: 400; opacity: 0.85; }
.ck-empty-soft {
  margin: 0 16px; padding: 18px;
  background: var(--tag-bg); border-radius: 14px;
  font-size: 12px; color: var(--text-secondary); line-height: 1.7;
}

.ck-today-piece {
  margin: 0 16px; background: var(--card); border-radius: 16px;
  box-shadow: var(--shadow-card); padding: 12px; cursor: pointer;
}
.ck-today-piece img { width: 100%; display: block; border-radius: 10px; }
.ck-today-meta { margin-top: 8px; font-size: 11px; color: var(--text-light); text-align: center; }
.ck-today-del {
  display: block; margin: 12px 16px 0;
  padding: 8px 0; width: calc(100% - 32px);
  border: none; border-radius: var(--radius-btn);
  background: var(--card); color: var(--text-light);
  font-size: 12px; cursor: pointer;
}
.ck-today-del:active { background: rgba(0,0,0,0.04); }

.ck-rows { padding: 0 16px; display: flex; flex-direction: column; gap: 8px; }
.ck-row {
  display: flex; align-items: center; gap: 12px;
  background: var(--card); border-radius: 14px;
  padding: 10px 12px; box-shadow: var(--shadow-card);
}
.ck-row-pic {
  width: 44px; height: 44px; flex-shrink: 0;
  border-radius: 10px;
  background: repeating-conic-gradient(#F2F2F2 0% 25%, #FFFFFF 0% 50%) 50% / 10px 10px;
  display: flex; align-items: center; justify-content: center; padding: 3px;
}
.ck-row-pic img { max-width: 100%; max-height: 100%; }
.ck-row-body { flex: 1; min-width: 0; }
.ck-row-date { font-size: 10px; color: var(--text-light); }
.ck-row-task {
  font-size: 13px; color: var(--text-primary); margin-top: 2px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ck-row-tag {
  font-size: 10px; color: var(--brand-dark); background: var(--brand-light);
  border-radius: 8px; padding: 3px 8px; flex-shrink: 0;
}

/* —— 打卡记录行：右侧风格标签 + 删除按钮 —— */
.ck-row-pic, .ck-row-body { cursor: pointer; }
.ck-row-actions {
  display: flex; flex-direction: column; align-items: flex-end;
  gap: 6px; flex-shrink: 0;
}
.ck-row-del {
  border: none; background: transparent;
  font-size: 11px; color: var(--text-light);
  padding: 3px 8px; border-radius: 7px; cursor: pointer;
  transition: color .15s, background .15s;
}
.ck-row-del:hover { color: #C0392B; background: rgba(192,57,43,0.08); }
.ck-row-del:active { background: rgba(192,57,43,0.16); }

.ck-foot-hint {
  margin: 22px 16px 26px; font-size: 11px; color: var(--text-light);
  text-align: center; line-height: 1.7;
}

/* ============================================================
   地球 Online · 图钉便签纸任务弹窗
   ============================================================ */
.ck-note-backdrop { padding: 26px 22px; }
.ck-note-wrap {
  width: 100%; max-width: 340px;
  display: flex; align-items: center; justify-content: center;
}
.ck-note {
  position: relative;
  width: 100%;
  border-radius: 4px;
  padding: 26px 22px 20px 40px;
  background-color: #FFF9E3;
  background-image:
    repeating-linear-gradient(180deg, transparent 0px, transparent 27px, rgba(120,150,190,0.22) 27px, rgba(120,150,190,0.22) 28px);
  background-position: 0 14px;
  box-shadow:
    0 20px 40px rgba(0,0,0,0.30),
    0 2px 0 rgba(0,0,0,0.06),
    inset 0 0 60px rgba(213, 186, 120, 0.18);
  transform: rotate(-1.1deg);
  animation: ckNoteIn 0.34s cubic-bezier(0.2, 1.1, 0.4, 1);
}
@keyframes ckNoteIn {
  from { opacity: 0; transform: rotate(-4deg) translateY(-14px) scale(0.94); }
  to   { opacity: 1; transform: rotate(-1.1deg) translateY(0) scale(1); }
}
.ck-note::after {
  content: '';
  position: absolute; right: 0; bottom: 0;
  border-width: 0 0 22px 22px;
  border-style: solid;
  border-color: transparent transparent rgba(0,0,0,0.07) transparent;
}
.ck-note-holes {
  position: absolute; left: 24px; top: 22px; bottom: 18px; width: 1px;
  background: rgba(226, 59, 59, 0.30);
}
.ck-note-inner { position: relative; }
.ck-note-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 8px;
}
.ck-note-kicker {
  font-size: 10px; font-weight: 700; letter-spacing: 1.4px;
  color: #B08A3E; text-transform: uppercase;
}
.ck-note-date { font-size: 11px; color: #A79A78; }
.ck-note-tag {
  margin-top: 12px;
  font-size: 11px; color: #8A6D2F; font-weight: 600;
}
/* 便签纸上的活力徽章（复用主页样式，稍小一号） */
.ck-note-meta {
  display: flex; flex-wrap: wrap; gap: 5px; margin-top: 7px;
}
.ck-note-rarity, .ck-note-where, .ck-note-energy {
  font-size: 9.5px; font-weight: 600; line-height: 1;
  padding: 3px 7px; border-radius: 8px; white-space: nowrap;
}
.ck-note-rarity { color: #B4703A; background: rgba(240,180,110,0.22); }
.ck-note-where  { color: #4A7BA6; background: rgba(120,175,220,0.18); }
.ck-note-energy { color: #3F9060; background: rgba(120,205,150,0.20); }
/* 便签纸上的发现钩子 */
.ck-note-spark {
  margin-top: 10px; padding: 8px 10px;
  font-size: 11.5px; line-height: 1.6; color: #8A6A3E;
  background: rgba(255,255,255,0.5);
  border-left: 2px solid rgba(232,200,138,0.9); border-radius: 0 7px 7px 0;
}
.ck-note-text {
  margin-top: 8px;
  font-size: 22px; font-weight: 800; line-height: 1.5;
  color: #33322C;
  letter-spacing: 0.4px;
  text-shadow: 0 1px 0 rgba(255,255,255,0.7);
}
.ck-note-hint { margin-top: 10px; font-size: 12px; color: #8C8674; line-height: 1.6; }
.ck-note-done {
  margin-top: 12px; font-size: 11px; color: #4E8C5A;
  background: rgba(120, 200, 140, 0.18);
  border-radius: 8px; padding: 6px 9px;
}
.ck-note-foot {
  margin-top: 12px; font-size: 10px; color: #A79A78; text-align: center; line-height: 1.6;
}
.ck-note-close {
  position: absolute; right: 8px; top: 8px;
  width: 28px; height: 28px; border: none; background: transparent;
  color: #A79A78; font-size: 15px; cursor: pointer; border-radius: 50%;
}
.ck-note-close:active { background: rgba(0,0,0,0.06); }

/* 图钉 */
.ck-note-pin { position: absolute; top: -13px; left: 50%; width: 0; height: 0; z-index: 3; }
.ck-pin-head {
  position: absolute; left: -11px; top: 0;
  width: 22px; height: 22px; border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, #FF9E9E 0%, #E23B3B 52%, #A81C1C 100%);
  box-shadow:
    0 4px 8px rgba(0,0,0,0.32),
    inset 0 -2px 4px rgba(0,0,0,0.22),
    inset 0 2px 3px rgba(255,255,255,0.55);
}
.ck-pin-needle {
  position: absolute; left: -1.5px; top: 17px;
  width: 3px; height: 13px; border-radius: 2px;
  background: linear-gradient(180deg, #D6D6D6 0%, #8A8A8A 60%, #6E6E6E 100%);
  box-shadow: 0 2px 3px rgba(0,0,0,0.28);
}

/* 快门按钮：圆圈 + 三角 */
.ck-shutter {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  width: 68px; height: 68px;
  margin: 20px auto 4px;
  border: none; border-radius: 50%;
  background: #FFFFFF;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0,0,0,0.24), inset 0 0 0 1px rgba(0,0,0,0.05);
  transition: transform 0.14s ease;
}
.ck-shutter:active { transform: scale(0.93); }
.ck-shutter-ring {
  position: absolute; inset: -7px;
  border-radius: 50%;
  border: 2px solid rgba(180, 150, 80, 0.55);
}
.ck-shutter-tri { width: 30px; height: 30px; color: #E23B3B; margin-left: 3px; }

/* ============================================================
   地球 Online · 涂鸦编辑器
   ============================================================ */
.doodle-backdrop {
  padding: 0;
  background: #121212;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  z-index: 140;
}
.doodle-panel {
  width: 100%; height: 100%;
  display: flex; flex-direction: column;
  background: #121212;
  padding-top: calc(8px + var(--safe-top));
  padding-bottom: calc(8px + var(--safe-bottom));
  padding-left: calc(10px + var(--safe-left));
  padding-right: calc(10px + var(--safe-right));
}
.doodle-step { display: none; flex-direction: column; height: 100%; min-height: 0; }
.doodle-panel[data-step="draw"] .doodle-step-draw { display: flex; }
.doodle-panel[data-step="result"] .doodle-step-result { display: flex; }

.doodle-top {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; padding: 4px 2px 8px;
}
.doodle-title { font-size: 14px; font-weight: 600; color: #EDEDED; letter-spacing: 0.3px; }
.doodle-top-spacer { width: 62px; }
.doodle-btn {
  border: none; border-radius: 18px;
  font-size: 13px; font-weight: 600;
  padding: 8px 14px; cursor: pointer;
  background: rgba(255,255,255,0.12);
  color: #E8E8E8;
  transition: transform 0.14s ease;
}
.doodle-btn:active { transform: scale(0.96); }
.doodle-btn.primary { background: var(--brand); color: #fff; }
.doodle-btn:disabled { opacity: 0.55; cursor: default; }

.doodle-taskbar {
  font-size: 12px; color: #B9B9B9;
  background: rgba(255,255,255,0.07);
  border-radius: 10px; padding: 8px 12px; margin-bottom: 8px;
  line-height: 1.5;
}
.doodle-taskbar b { color: #F4E8C8; font-weight: 600; }

.doodle-stage {
  position: relative;
  flex: 1; min-height: 0;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  border-radius: 10px;
  background: #0A0A0A;
  touch-action: none;
}
.doodle-photo {
  max-width: 100%; max-height: 100%;
  display: block;
  user-select: none; -webkit-user-drag: none;
}
.doodle-canvas {
  position: absolute;
  touch-action: none;
  cursor: crosshair;
  display: block;
}
.doodle-toastline {
  position: absolute; left: 50%; bottom: 14px;
  transform: translateX(-50%) translateY(8px);
  background: rgba(0,0,0,0.78);
  color: #fff; font-size: 12px;
  padding: 7px 14px; border-radius: 16px;
  opacity: 0; pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  max-width: 86%; text-align: center; line-height: 1.4;
  border: 1px solid rgba(255,255,255,0.14);
}
.doodle-toastline.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.doodle-toastline.ok { background: rgba(48, 122, 74, 0.92); border-color: rgba(150,230,175,0.4); }

.doodle-tools { padding: 10px 2px 2px; }
.doodle-tip {
  font-size: 11px; color: #9A9A9A; text-align: center;
  line-height: 1.5; min-height: 17px; margin-bottom: 8px;
}
.doodle-btns { display: flex; gap: 10px; }
.doodle-btns .doodle-btn { flex: 1; padding: 12px 0; border-radius: 14px; font-size: 14px; }

.doodle-result-stage {
  flex: 1; min-height: 0;
  display: flex; align-items: center; justify-content: center;
  padding: 8px 0;
}
.doodle-checker {
  max-width: 100%; max-height: 100%;
  padding: 16px;
  border-radius: 14px;
  background: repeating-conic-gradient(#2A2A2A 0% 25%, #232323 0% 50%) 50% / 18px 18px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.06);
  display: flex; align-items: center; justify-content: center;
}
.doodle-checker img { max-width: 100%; max-height: 58vh; display: block; transition: opacity 0.2s ease; }
/* 风格取消后（2026-10-28）这里只放一行说明文字 */
.doodle-styles { display: flex; gap: 8px; padding: 12px 0 10px; }
.doodle-style-note {
  flex: 1;
  text-align: center;
  font-size: 12.5px;
  color: #CFCFCF;
  opacity: 0.82;
  padding: 9px 12px;
  border-radius: 12px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.10);
}
.doodle-result-hint {
  margin-top: 8px; font-size: 10px; color: #8A8A8A; text-align: center; line-height: 1.5;
}

/* 贴纸放大查看 */
.ck-view-backdrop { padding: 28px; }
.ck-view-box {
  position: relative;
  max-width: 340px; width: 100%;
  background: var(--card);
  border-radius: 18px;
  padding: 18px 18px 14px;
  box-shadow: var(--shadow-polaroid);
  text-align: center;
}
.ck-view-box img { max-width: 100%; max-height: 56vh; display: block; margin: 0 auto; }
.ck-view-cap {
  margin-top: 12px; font-size: 11px; color: var(--text-light); line-height: 1.6;
}
.ck-view-close {
  position: absolute; right: 8px; top: 8px;
  width: 30px; height: 30px; border: none; border-radius: 50%;
  background: var(--tag-bg); color: var(--text-secondary);
  font-size: 14px; cursor: pointer;
}

/* ---------------- 隐私同意门禁（首次启动） ---------------- */
[hidden] { display: none !important; }

.pg-mask {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  background: rgba(24, 23, 21, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  overflow-y: auto;
}
.pg-card {
  width: 100%; max-width: 420px;
  background: var(--card);
  border-radius: 20px;
  padding: 26px 22px 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.22);
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.pg-brand {
  font-size: 13px; letter-spacing: 2px; text-transform: uppercase;
  color: var(--brand-dark); font-weight: 700; margin-bottom: 10px;
}
.pg-title {
  margin: 0 0 10px; font-size: 20px; font-weight: 700;
  color: var(--text-primary); letter-spacing: .2px;
}
.pg-lead {
  margin: 0 0 14px; font-size: 14px; line-height: 1.7;
  color: var(--text-secondary);
}
.pg-list {
  list-style: none; padding: 0; margin: 0 0 14px;
  display: flex; flex-direction: column; gap: 11px;
}
.pg-list li {
  font-size: 13px; line-height: 1.65; color: var(--text-secondary);
  padding-left: 14px; position: relative;
}
.pg-list li::before {
  content: ''; position: absolute; left: 0; top: 8px;
  width: 5px; height: 5px; border-radius: 50%; background: var(--brand);
}
.pg-list b {
  display: block; font-size: 13.5px; font-weight: 600;
  color: var(--text-primary); margin-bottom: 3px;
}
.pg-more {
  font-size: 12.5px; line-height: 1.7; color: var(--text-light);
  margin: 0 0 18px;
}
.pg-more a { color: var(--brand-dark); font-weight: 600; text-decoration: none; }
.pg-btn {
  display: block; width: 100%; border: none; cursor: pointer;
  padding: 13px 16px; border-radius: 25px;
  font-size: 15px; font-weight: 600; font-family: inherit;
  margin-bottom: 9px; transition: opacity .18s;
}
.pg-btn:active { opacity: .78; }
.pg-btn-primary { background: var(--brand); color: #fff; box-shadow: var(--shadow-btn); }
.pg-btn-ghost { background: transparent; color: var(--text-light); font-weight: 500; font-size: 14px; }
.pg-btn-ghost:last-child { margin-bottom: 0; }

/* ---------------- 内置文档查看器（隐私政策 / 用户协议） ---------------- */
.dv-mask {
  position: fixed; inset: 0; z-index: 9998;
  display: flex; flex-direction: column;
  background: var(--bg);
}
.dv-bar {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px;
  padding-top: calc(12px + env(safe-area-inset-top, 0px));
  background: var(--card);
  border-bottom: 1px solid var(--divider);
  flex: 0 0 auto;
}
.dv-close {
  width: 32px; height: 32px; border: none; border-radius: 50%;
  background: var(--tag-bg); color: var(--text-secondary);
  font-size: 15px; cursor: pointer; flex: 0 0 auto;
}
.dv-title {
  flex: 1; text-align: center; font-size: 15px; font-weight: 600;
  color: var(--text-primary);
}
.dv-pad { width: 32px; flex: 0 0 auto; }
.dv-frame {
  flex: 1 1 auto; width: 100%; border: 0; background: var(--bg);
}
.doc-frame {
  width: 100%; height: 100%; border: 0; display: block; background: var(--bg);
}

/* ---------------- 会员订阅页（App Store 3.1.2 合规版式） ---------------- */
.mb-loading {
  padding: 60px 20px; text-align: center;
  color: var(--text-light); font-size: 13px;
}
.mb-card {
  margin: 16px; padding: 26px 20px 22px;
  border-radius: 22px; background: var(--card);
  border: 1px solid var(--tag-bg);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  text-align: center;
}
.mb-badge {
  width: 52px; height: 52px; margin: 0 auto 12px;
  border-radius: 16px; display: flex; align-items: center; justify-content: center;
  font-size: 24px; color: var(--brand);
  background: var(--assist);
}
.mb-name { font-size: 17px; font-weight: 700; color: var(--text-primary); }
.mb-desc {
  margin-top: 6px; font-size: 12.5px; line-height: 1.6;
  color: var(--text-light);
}
.mb-price {
  margin: 18px 0 6px; font-size: 30px; font-weight: 700;
  color: var(--text-primary); letter-spacing: -0.5px;
}
.mb-price span { font-size: 14px; font-weight: 500; color: var(--text-light); }
.mb-plans { display: flex; flex-direction: column; gap: 10px; margin: 18px 0 6px; }
.mb-plan {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 13px 15px; border-radius: 16px; cursor: pointer;
  border: 1.5px solid var(--tag-bg); background: var(--card);
  transition: border-color .15s, background .15s;
}
.mb-plan.active { border-color: var(--brand); background: var(--assist); }
.mb-plan-label {
  font-size: 14px; font-weight: 600; color: var(--text-primary);
  display: flex; align-items: center; gap: 6px;
}
.mb-plan-tag {
  font-size: 10.5px; font-weight: 500; padding: 2px 7px; border-radius: 8px;
  background: var(--brand); color: #fff;
}
.mb-plan-sub { font-size: 11.5px; color: var(--text-light); margin-top: 3px; }
.mb-plan-price {
  font-size: 17px; font-weight: 700; color: var(--text-primary); white-space: nowrap;
}
.mb-plan-price em {
  font-style: normal; font-size: 11.5px; font-weight: 400; color: var(--text-light);
}
.mb-benefits {
  list-style: none; margin: 16px 0 20px; padding: 14px 16px;
  border-radius: 16px; background: var(--tag-bg); text-align: left;
}
.mb-benefits li {
  position: relative; padding-left: 20px; margin: 9px 0;
  font-size: 13.5px; color: var(--text-secondary); line-height: 1.5;
}
.mb-benefits li::before {
  content: '✓'; position: absolute; left: 0; top: 0;
  color: var(--brand); font-weight: 700; font-size: 13px;
}
.mb-btn {
  width: 100%; height: 50px; margin-top: 10px;
  border: none; border-radius: 16px; cursor: pointer;
  font-size: 15px; font-weight: 600; font-family: inherit;
}
.mb-btn.primary { background: var(--brand); color: #fff; }
.mb-btn.primary[disabled] { opacity: 0.5; }
.mb-btn.ghost {
  background: var(--tag-bg); color: var(--text-secondary);
}
.mb-btn.text {
  height: 42px; background: transparent; color: var(--brand); font-size: 13.5px;
}
.mb-tip {
  margin-top: 10px; font-size: 12px; color: var(--text-light); text-align: center;
}
.mb-status {
  margin: 18px 0 4px; padding: 4px 16px;
  border-radius: 16px; background: var(--tag-bg); text-align: left;
}
.mb-status-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 11px 0; font-size: 13px; color: var(--text-light);
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}
.mb-status-row:last-child { border-bottom: none; }
.mb-status-row b { font-weight: 600; color: var(--text-secondary); }
.mb-status-row b.ok { color: var(--brand); }
.mb-legal {
  margin: 4px 22px 30px; font-size: 11.5px;
  line-height: 1.75; color: var(--text-light);
}
.mb-legal p { margin: 8px 0; }
.mb-legal a { color: var(--brand); text-decoration: none; }

/* ---------------- 举报 / 屏蔽入口 ---------------- */
.polaroid-more {
  position: absolute; top: 10px; right: 48px;
  width: 28px; height: 28px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; line-height: 1; color: var(--text-secondary);
  cursor: pointer; letter-spacing: 0; font-weight: 700;
  padding-bottom: 4px; box-sizing: border-box;
  /* 照片层 position:relative 会盖住后面的绝对定位元素，必须抬高层级才点得到 */
  z-index: 6;
}
.polaroid-more:active { opacity: 0.6; }
.reply-btn.report { color: var(--text-light); font-weight: 500; }
.sub-more-btn { font-size: 18px; font-weight: 700; line-height: 1; }

/* ============================================================
   素材热更新 · 三档提示（AssetUpdateUI）
   —— 静默后台下载不打扰；提示条轻量；首次大文件才强提示
   ============================================================ */

/* ② 提示条 */
.asset-update-bar {
  position: absolute;
  left: 12px; right: 12px;
  top: calc(env(safe-area-inset-top, 0px) + 58px);
  z-index: 380;
  display: flex; align-items: center; gap: 8px;
  padding: 9px 10px 9px 12px;
  border-radius: 14px;
  background: var(--card);
  border: 1px solid var(--tag-bg);
  box-shadow: var(--shadow-card);
  font-size: 13px; color: var(--text);
  transform: translateY(-14px);
  opacity: 0;
  pointer-events: none;
  transition: transform .28s ease, opacity .28s ease;
}
.asset-update-bar.show {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}
.asset-update-bar .aub-icon { font-size: 15px; flex: 0 0 auto; }
.asset-update-bar .aub-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.asset-update-bar .aub-btn {
  flex: 0 0 auto;
  padding: 4px 12px;
  border: none; border-radius: 999px;
  background: var(--brand); color: #fff;
  font-size: 12px; font-weight: 600; cursor: pointer;
}
.asset-update-bar .aub-btn:disabled { opacity: .6; }
.asset-update-bar .aub-close {
  flex: 0 0 auto;
  border: none; background: none;
  color: var(--text-light); font-size: 14px; cursor: pointer;
  padding: 2px 4px; line-height: 1;
}

/* 下载相纸时的进度浮层（弱打扰） */
.asset-dl-overlay {
  position: absolute; inset: 0;
  z-index: 390;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,.18);
  opacity: 0; pointer-events: none;
  transition: opacity .25s ease;
}
.asset-dl-overlay.show { opacity: 1; }
.asset-dl-overlay .adl-box {
  min-width: 200px;
  padding: 18px 20px;
  border-radius: 16px;
  background: var(--bg);
  box-shadow: var(--shadow-card);
  text-align: center;
}
.asset-dl-overlay .adl-title { font-size: 14px; font-weight: 600; color: var(--text); margin-bottom: 12px; }
.asset-dl-overlay .adl-bar {
  height: 6px; border-radius: 999px;
  background: var(--tag-bg); overflow: hidden;
}
.asset-dl-overlay .adl-fill {
  height: 100%; border-radius: 999px;
  background: var(--brand);
  transition: width .2s ease;
}
.asset-dl-overlay .adl-sub { margin-top: 8px; font-size: 11px; color: var(--text-light); }

/* ③ 首次大文件强提示 */
.au-desc {
  padding: 0 20px 14px;
  font-size: 13px; line-height: 1.6;
  color: var(--text-light);
  text-align: center;
}
.au-primary { color: var(--brand) !important; font-weight: 600; }

/* ============================================================
   情感化功能组：生日节点 / 今日星象 / 微行动 / 生日仪式
   ------------------------------------------------------------
   约定：只用主题变量（--bg --card --text-primary --brand），
        不写死颜色，任何皮肤下都保持「简约 ins 风、暖白基底」。
   ============================================================ */

/* ---------- ① 时间轴顶部「今日」信息块 ---------- */
/* 位于「今日节点」页 day-header 内：跟随日期标题居中，不再带分隔线 */
.day-header .astro-hero {
  border-bottom: none;
  padding: 12px 0 2px;
  margin-bottom: 0;
}
.day-header .astro-line,
.day-header .micro-line {
  justify-content: center;
}
.astro-hero {
  padding: 2px 4px 14px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--divider);
}
.astro-hero-date {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.2px;
  color: var(--text-primary);
}
.astro-hero-date .astro-week {
  font-weight: 500;
  font-size: 12px;
  color: var(--text-light);
  letter-spacing: 1px;
}
/* 日期标题旁的装饰点：今日专属情绪色 */
.astro-date-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  background: var(--brand);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.55), 0 0 10px 1px currentColor;
  transition: background 0.3s ease;
}
.astro-line {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 9px;
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
}
.astro-swatch {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  display: inline-block;
  border: 1px solid rgba(0, 0, 0, 0.07);
  flex: none;
}
.astro-swatch-name { color: var(--text-primary); font-weight: 600; }

/* 今日微行动：12pt 浅灰 + 极小 ⓘ */
.micro-line {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 7px;
  font-size: 12px;
  line-height: 1.55;
  color: var(--text-light);
}
.micro-line b { font-weight: 600; color: var(--text-secondary); }
.micro-info {
  width: 14px; height: 14px;
  flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--divider);
  font-size: 9px;
  color: var(--text-light);
  cursor: pointer;
  user-select: none;
}
.micro-info:active { background: var(--tag-bg); }

/* ---------- ② 今日 tl-dot 专属色（历史节点保持主题色） ---------- */
.tl-entry .tl-dot.tl-dot--mood {
  background: var(--mood-c) !important;
  border-color: var(--mood-c) !important;
  box-shadow: 0 0 0 3px var(--bg), 0 0 11px 2px var(--mood-soft) !important;
  cursor: pointer;
  animation: moodDotIn 0.5s ease-out;
}
.tl-entry .tl-dot.tl-dot--mood::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1px solid var(--mood-c);
  opacity: 0.45;
}
@keyframes moodDotIn {
  from { transform: scale(0.4); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

/* ---------- ③ 通用居中弹层（生日选择 / 情绪色便利贴） ---------- */
.emo-backdrop {
  position: absolute;
  inset: 0;
  z-index: 260;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(30, 26, 22, 0.28);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.emo-backdrop.active { display: flex; animation: emoFade 0.22s ease-out; }
@keyframes emoFade { from { opacity: 0; } to { opacity: 1; } }

.emo-card {
  width: 100%;
  max-width: 320px;
  background: var(--card);
  color: var(--text-primary);
  border-radius: 22px;
  padding: 26px 22px 20px;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.16);
  text-align: center;
  animation: emoCardIn 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes emoCardIn {
  from { opacity: 0; transform: translateY(14px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.emo-brand {
  font-family: 'Comfortaa', sans-serif;
  font-size: 11px;
  letter-spacing: 3px;
  color: var(--brand);
  text-transform: uppercase;
  margin-bottom: 14px;
}
.emo-title {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.6;
  letter-spacing: 0.3px;
}
.emo-sub {
  margin-top: 8px;
  font-size: 12px;
  line-height: 1.65;
  color: var(--text-light);
}
.emo-cta {
  margin-top: 20px;
  width: 100%;
  height: 46px;
  border: none;
  border-radius: 25px;
  background: var(--brand);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 1px;
  cursor: pointer;
  box-shadow: var(--shadow-btn);
  transition: transform 0.14s ease, opacity 0.14s ease;
}
.emo-cta:active { transform: scale(0.97); }
.emo-cta[disabled] { opacity: 0.45; box-shadow: none; }
.emo-ghost {
  margin-top: 10px;
  width: 100%;
  height: 34px;
  border: none;
  background: none;
  color: var(--text-light);
  font-size: 12px;
  cursor: pointer;
}

/* ---------- ④ 年月日滚轮 ---------- */
.bd-wheel {
  position: relative;
  margin: 20px 0 4px;
  height: 180px;
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 2px;
}
/* 中间选中带 */
.bd-wheel::before {
  content: '';
  position: absolute;
  left: 6px; right: 6px;
  top: 72px;
  height: 36px;
  border-top: 1px solid var(--divider);
  border-bottom: 1px solid var(--divider);
  pointer-events: none;
}
.bd-col {
  height: 180px;
  overflow-y: auto;
  scroll-snap-type: y mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 72px 0;
  flex: 1;
  position: relative;
  z-index: 1;
}
.bd-col::-webkit-scrollbar { display: none; }
.bd-col-year { flex: 1.25; }
.bd-item {
  height: 36px;
  line-height: 36px;
  scroll-snap-align: center;
  font-size: 15px;
  color: var(--text-light);
  font-variant-numeric: tabular-nums;
  transition: color 0.16s ease, font-weight 0.16s ease, transform 0.16s ease;
  cursor: pointer;
}
.bd-item.on {
  color: var(--text-primary);
  font-weight: 700;
  transform: scale(1.06);
}
.bd-unit {
  position: absolute;
  bottom: 6px;
  left: 0; right: 0;
  text-align: center;
  font-size: 10px;
  color: var(--text-light);
  letter-spacing: 2px;
}

/* ---------- ⑤ 情绪色便利贴 ---------- */
.psy-note {
  width: 100%;
  max-width: 300px;
  background: linear-gradient(180deg, #FFFDF6 0%, #FBF6E9 100%);
  border-radius: 3px 3px 14px 3px;
  padding: 22px 20px 18px;
  box-shadow: 0 14px 44px rgba(0, 0, 0, 0.15);
  text-align: left;
  position: relative;
  animation: emoCardIn 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
html[data-theme="y2k"] .psy-note,
html[data-theme="naivedraw"] .psy-note { background: var(--card); }
.psy-note::after {
  content: '';
  position: absolute;
  right: 0; bottom: 0;
  width: 22px; height: 22px;
  background: linear-gradient(135deg, transparent 48%, rgba(0, 0, 0, 0.06) 50%);
  border-radius: 0 0 14px 0;
}
.psy-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #8A7A5C;
  letter-spacing: 0.6px;
}
.psy-dot {
  width: 16px; height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 0 8px 1px currentColor;
  flex: none;
}
.psy-title {
  margin-top: 10px;
  font-size: 16px;
  font-weight: 700;
  color: #3A3327;
  letter-spacing: 0.3px;
}
.psy-body {
  margin-top: 8px;
  font-size: 13px;
  line-height: 1.78;
  color: #5A5245;
}
.psy-foot {
  margin-top: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: #A2937A;
}
.psy-close {
  border: none;
  background: none;
  color: #A2937A;
  font-size: 11px;
  cursor: pointer;
  padding: 4px 0;
}

/* ---------- ⑥ 生日高光贺卡（全屏） ---------- */
.bday-card {
  position: absolute;
  inset: 0;
  z-index: 300;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 34px 26px;
  text-align: center;
  background: var(--bg);
  overflow: hidden;
}
.bday-card.active { display: flex; animation: emoFade 0.4s ease-out; }
/* 极淡的金色微光底 */
.bday-card::before,
.bday-card::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle, rgba(214, 174, 88, 0.20) 0%, rgba(214, 174, 88, 0) 68%);
}
.bday-card::before { width: 420px; height: 420px; top: -140px; right: -150px; animation: bdayGlow 7s ease-in-out infinite alternate; }
.bday-card::after { width: 360px; height: 360px; bottom: -130px; left: -120px; animation: bdayGlow 9s ease-in-out infinite alternate-reverse; }
@keyframes bdayGlow { from { opacity: 0.55; transform: scale(0.94); } to { opacity: 1; transform: scale(1.06); } }
.bday-inner { position: relative; z-index: 1; max-width: 330px; }
.bday-kicker {
  font-family: 'Comfortaa', sans-serif;
  font-size: 10px;
  letter-spacing: 4px;
  color: #B89551;
  text-transform: uppercase;
}
.bday-age {
  margin: 18px 0 4px;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 78px;
  line-height: 1;
  font-weight: 700;
  letter-spacing: -2px;
  background: linear-gradient(150deg, #F3DA96 0%, #C79A38 42%, #A87E28 62%, #F0DCA6 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 1px 10px rgba(199, 154, 56, 0.28));
}
.bday-age-unit { font-size: 13px; letter-spacing: 5px; color: #B89551; margin-bottom: 22px; }
.bday-text {
  font-size: 14px;
  line-height: 2;
  color: var(--text-secondary);
  letter-spacing: 0.4px;
  white-space: pre-line;
}
.bday-accept {
  margin-top: 30px;
  padding: 0 30px;
  height: 46px;
  border: 1px solid rgba(184, 149, 81, 0.45);
  border-radius: 25px;
  background: transparent;
  color: #9A7B36;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 1.5px;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.14s ease;
}
.bday-accept:active { transform: scale(0.97); background: rgba(214, 174, 88, 0.10); }
.bday-sign {
  position: absolute;
  bottom: 26px;
  left: 0; right: 0;
  font-size: 10px;
  letter-spacing: 3px;
  color: var(--text-light);
  text-align: center;
}

/* ---------- ⑦ 生日相纸：金色微光 ---------- */
.pe-card.pe-gold-glow,
.tl-polaroid.pe-gold-glow,
.polaroid.pe-gold-glow {
  box-shadow:
    0 0 0 1px rgba(199, 154, 56, 0.34),
    0 0 18px 3px rgba(214, 174, 88, 0.26),
    0 10px 30px rgba(0, 0, 0, 0.10) !important;
}
.pe-card.pe-gold-glow::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(243, 218, 150, 0.16), rgba(214, 174, 88, 0.02) 42%, rgba(243, 218, 150, 0.12));
}

/* ---------- ⑧ 生日节点设置行 ---------- */
.bday-row-lock {
  font-size: 13px;
  color: var(--text-light);
  margin-right: 4px;
  letter-spacing: 1px;
}
.bday-row-value { font-size: 13px; color: var(--text-secondary); font-variant-numeric: tabular-nums; }
.bday-warn {
  margin-top: 6px;
  font-size: 11px;
  line-height: 1.6;
  color: #C0563F;
}
