/* ============================================================
   留叙拾忆 · 微信小程序交互原型
   全局设计变量 / 设备外壳 / 通用小程序组件
   ------------------------------------------------------------
   说明：1rpx = 0.5px（以 375px 宽屏幕换算）
   设计基调（v2）：新中式科技感 —— 保留宣纸/墨色文化内核，
   叠加玻璃拟态、柔光渐变、微光描边、流畅动效与高级排版。
   ⚠️ 视觉升级仅改样式值/新增动效，不改动任何 JS 依赖的
      类名、id 与 DOM 结构（含末尾 STYLE EDITOR OVERRIDES 块）。
   ============================================================ */

:root {
  /* —— 色彩：宣纸 / 墨色 内核，升级对比与层次 —— */
  --paper: #F7F3EC;          /* 宣纸米白 · 页面底色（更通透） */
  --paper-deep: #F0E9DD;
  --paper-card: #FCFAF5;     /* 卡片底色 */
  --ink: #7A6A58;            /* 茶褐 · 主色（更深更聚焦） */
  --ink-deep: #685947;
  --ink-soft: #A2957F;
  --text: #333333;           /* 正文（更深，提升可读性） */
  --muted: #666666;          /* 次要文字 */
  --muted-2: #8C8375;
  --line: #E5DCCD;
  --line-soft: #EFE7DA;

  /* —— 科技感强调色 —— */
  --accent: #B5462E;         /* 朱砂红 · 强调 / 高光 / 激活态 */
  --accent-2: #2F7E7E;       /* 青碧 · 辅助科技色（数据/状态） */
  --accent-soft: rgba(181, 70, 46, 0.12);
  --jade-soft: rgba(47, 126, 126, 0.12);

  /* —— 玻璃 / 光影令牌 —— */
  --glass: rgba(252, 250, 244, 0.62);
  --glass-strong: rgba(252, 250, 244, 0.82);
  --shadow-soft: 0 8px 30px -12px rgba(74, 60, 40, 0.22);
  --shadow-card: 0 1px 2px rgba(95, 78, 54, 0.05), 0 6px 18px rgba(95, 78, 54, 0.045);
  --shadow-glow: 0 12px 34px -10px rgba(181, 70, 46, 0.32);
  --ring-glow: 0 0 0 3px var(--accent-soft);

  /* —— 尺寸（更大圆角 = 现代柔和） —— */
  --radius: 5px;            /* 24rpx */
  --radius-lg: 9px;         /* 40rpx */
  --radius-pill: 999px;

  /* —— 字体 —— */
  --font-serif: "Songti SC", "STSong", "Noto Serif SC", "Source Han Serif SC", "SimSun", serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
               "Microsoft YaHei", "Helvetica Neue", sans-serif;

  /* —— 动效节奏 —— */
  --ease-out: cubic-bezier(0.2, 0.7, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  color: var(--text);
  background:
    radial-gradient(1200px 780px at 12% -10%, #FCF8F0 0%, rgba(252, 248, 240, 0) 60%),
    radial-gradient(920px 700px at 96% 6%, #F3EBDD 0%, rgba(243, 235, 221, 0) 55%),
    radial-gradient(760px 520px at 50% 122%, rgba(181, 70, 46, 0.06) 0%, rgba(181, 70, 46, 0) 60%),
    #ECE5D8;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* 极淡科技极光（仅作页面外环境氛围，不影响设备内内容） */
body::before {
  content: "";
  position: fixed;
  inset: -20%;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(40% 40% at 20% 30%, rgba(181, 70, 46, 0.05), transparent 70%),
    radial-gradient(36% 36% at 82% 70%, rgba(47, 126, 126, 0.05), transparent 70%);
  animation: aurora 18s ease-in-out infinite alternate;
}

@keyframes aurora {
  from { transform: translate3d(-2%, -1%, 0) scale(1); opacity: 0.8; }
  to   { transform: translate3d(2%, 2%, 0) scale(1.06); opacity: 1; }
}

button {
  font-family: inherit;
  cursor: pointer;
}

/* ---------- 评审台（保留定义，供演示页使用，不影响逻辑） ---------- */

.review-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 34px;
  border-bottom: 1px solid rgba(122, 106, 88, 0.14);
  background: rgba(250, 246, 238, 0.55);
  backdrop-filter: blur(6px);
  position: relative;
  z-index: 5;
}

.review-brand {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-family: var(--font-serif);
  font-size: 14px;
  letter-spacing: 0.16em;
  color: var(--ink);
}

.review-brand .dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--ink);
  transform: translateY(-2px);
}

.review-brand small {
  font-family: var(--font-sans);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  color: var(--muted-2);
}

.review-pager {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--muted-2);
}

.review-pager b {
  font-weight: 500;
  color: var(--ink);
}

.review-stage {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 64px;
  padding: 44px 32px 64px;
  min-height: calc(100vh - 61px);
}

.review-notes {
  width: 252px;
  padding-top: 26px;
  color: var(--muted);
}

.review-notes .eyebrow {
  font-size: 10px;
  letter-spacing: 0.26em;
  color: var(--ink-soft);
  margin-bottom: 10px;
}

.review-notes h2 {
  margin: 0 0 6px;
  font-family: var(--font-serif);
  font-size: 23px;
  font-weight: 400;
  letter-spacing: 0.06em;
  color: var(--text);
}

.review-notes .lede {
  margin: 0 0 22px;
  font-size: 11.5px;
  line-height: 1.8;
  color: var(--muted-2);
}

.review-notes h3 {
  margin: 22px 0 6px;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.2em;
  color: var(--ink-soft);
}

.spec-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.spec-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  font-size: 11.5px;
  border-bottom: 1px dashed rgba(122, 106, 88, 0.18);
  color: var(--muted);
}

.spec-list li span:last-child {
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.swatches {
  display: flex;
  gap: 14px;
  margin-top: 12px;
}

.swatch {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 9.5px;
  letter-spacing: 0.04em;
  color: var(--muted-2);
}

.swatch i {
  display: block;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid rgba(122, 106, 88, 0.22);
}

.note-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 24px;
  padding: 5px 10px;
  border: 1px solid rgba(122, 106, 88, 0.3);
  border-radius: 999px;
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--ink);
}

.note-tag::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #C0A97F;
}

.stage-caption {
  margin-top: 20px;
  font-size: 10.5px;
  line-height: 1.7;
  color: var(--muted-2);
  text-align: center;
}

/* ---------- 手机设备（保留） ---------- */

.device {
  position: relative;
  flex: 0 0 auto;
}

.device-frame {
  position: relative;
  width: 375px;
  height: 812px;
  border-radius: 42px;
  background: var(--paper);
  overflow: hidden;
  border: 1px solid rgba(122, 106, 88, 0.16);
  box-shadow:
    0 2px 4px rgba(74, 60, 40, 0.06),
    0 26px 60px -18px rgba(74, 60, 40, 0.3);
  isolation: isolate;
}

/* 宣纸底纹：极淡晕染 + 细颗粒 */
.paper-wash {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(120% 70% at 50% 0%, rgba(255, 253, 247, 0.9) 0%, rgba(255, 253, 247, 0) 60%),
    radial-gradient(90% 60% at 100% 100%, rgba(228, 217, 199, 0.35) 0%, rgba(228, 217, 199, 0) 62%),
    radial-gradient(80% 50% at 0% 88%, rgba(233, 223, 207, 0.3) 0%, rgba(233, 223, 207, 0) 60%);
  z-index: 0;
}

.paper-grain {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.55;
  background-image: radial-gradient(rgba(122, 106, 88, 0.11) 0.45px, transparent 0.55px);
  background-size: 3px 3px;
  z-index: 0;
}

/* ---------- 微信状态栏 / 胶囊（保留） ---------- */

.statusbar {
  position: relative;
  z-index: 3;
  height: 44px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #2C2A26;
}

.statusbar .status-icons {
  display: flex;
  align-items: center;
  gap: 5px;
}

.capsule {
  position: absolute;
  top: 48px;
  right: 12px;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-around;
  width: 87px;
  height: 32px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(92, 78, 58, 0.08);
  backdrop-filter: blur(8px);
}

.capsule .dots {
  font-size: 13px;
  letter-spacing: 1px;
  color: #2C2A26;
  transform: translateY(-3px);
}

.capsule .sep {
  width: 1px;
  height: 16px;
  background: rgba(92, 78, 58, 0.14);
}

.capsule .ring {
  position: relative;
  width: 14px;
  height: 14px;
  border: 1.4px solid #2C2A26;
  border-radius: 50%;
}

.capsule .ring::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: #2C2A26;
}

.home-indicator {
  position: absolute;
  left: 50%;
  bottom: 7px;
  transform: translateX(-50%);
  width: 134px;
  height: 5px;
  border-radius: 3px;
  background: rgba(44, 42, 38, 0.22);
  z-index: 6;
}

/* ---------- 通用小程序组件（v2 视觉升级） ---------- */

.screen {
  position: relative;
  z-index: 2;
  /* 独立层叠上下文：使宣纸纹理伪元素可安全置于 z-index:-1，
     而不必再用 `.screen > *{position:relative}` 覆盖子元素（会破坏 .capsule 等绝对定位浮层） */
  isolation: isolate;
  width: 100%;
  max-width: 430px;
  margin: 0 auto;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  animation: screenIn 0.5s var(--ease-out) both;
}

/* 宣纸底纹：替代已删除的 paper-wash / paper-grain DOM，全屏移动页统一纸面 */
.screen::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(120% 70% at 50% 0%, rgba(255, 253, 247, 0.9) 0%, rgba(255, 253, 247, 0) 60%),
    radial-gradient(90% 60% at 100% 100%, rgba(228, 217, 199, 0.35) 0%, rgba(228, 217, 199, 0) 62%),
    radial-gradient(80% 50% at 0% 88%, rgba(233, 223, 207, 0.3) 0%, rgba(233, 223, 207, 0) 60%);
}
.screen::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.55;
  background-image: radial-gradient(rgba(122, 106, 88, 0.11) 0.45px, transparent 0.55px);
  background-size: 3px 3px;
}

@keyframes screenIn {
  from { opacity: 0; transform: translateY(10px) scale(0.992); }
  to   { opacity: 1; transform: none; }
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 48px;
  padding: 0 16px;
  border: 0;
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--ink) 0%, var(--ink-deep) 100%);
  color: #FFFFFF;
  font-size: 15px;
  letter-spacing: 0.08em;
  box-shadow: 0 6px 18px -6px rgba(110, 91, 67, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.18);
  transition: background 0.22s ease, transform 0.14s var(--ease-spring), box-shadow 0.22s ease;
}

/* 高光扫过（科技感） */
.btn-primary::after {
  content: "";
  position: absolute;
  top: 0;
  left: -120%;
  width: 60%;
  height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  transform: skewX(-18deg);
  transition: left 0.6s ease;
}

.btn-primary:hover {
  transform: translateY(-1px);
  background: linear-gradient(135deg, #84735F 0%, #6E5B43 100%);
  box-shadow: 0 12px 26px -8px rgba(110, 91, 67, 0.55), 0 0 18px rgba(181, 70, 46, 0.22);
}

.btn-primary:hover::after { left: 140%; }

.btn-primary:active {
  transform: translateY(1px) scale(0.99);
  box-shadow: 0 4px 12px -6px rgba(110, 91, 67, 0.5);
}

.btn-primary:disabled { opacity: 0.72; cursor: default; }
.btn-primary:focus-visible { outline: 2px solid rgba(181, 70, 46, 0.5); outline-offset: 2px; }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  padding: 0 14px;
  border: 1px solid rgba(122, 106, 88, 0.32);
  border-radius: var(--radius);
  background: rgba(252, 250, 244, 0.5);
  backdrop-filter: blur(6px);
  color: var(--ink);
  font-size: 12px;
  letter-spacing: 0.04em;
  transition: border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(252, 250, 244, 0.8);
  box-shadow: var(--ring-glow);
}

.btn-ghost:active { transform: scale(0.98); background: rgba(122, 106, 88, 0.08); }

.spinner {
  width: 14px;
  height: 14px;
  border: 1.5px solid rgba(255, 255, 255, 0.4);
  border-top-color: #FFFFFF;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.toast {
  position: absolute;
  left: 50%;
  bottom: 132px;
  z-index: 30;
  transform: translate(-50%, 8px);
  max-width: 280px;
  padding: 9px 16px;
  border-radius: var(--radius);
  background: rgba(46, 42, 36, 0.9);
  backdrop-filter: blur(8px);
  color: #FFFFFF;
  font-size: 12px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.24s ease, transform 0.24s ease;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ---------- 底部 Tab 栏（v2：玻璃 + 激活微光） ---------- */

.tabbar {
  position: relative;
  z-index: 5;
  flex: 0 0 auto;
  display: flex;
  align-items: flex-start;
  height: 56px;
  padding: 8px 4px 0;
  background: rgba(248, 244, 236, 0.72);
  border-top: 1px solid rgba(122, 106, 88, 0.14);
  backdrop-filter: blur(16px) saturate(1.4);
  box-shadow: 0 -6px 24px -14px rgba(74, 60, 40, 0.3);
}

.tab {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 0;
  border: 0;
  background: none;
  color: #9A9184;
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.04em;
  transition: color 0.18s ease, transform 0.18s var(--ease-spring);
}

.tab svg { width: 21px; height: 21px; display: block; transition: transform 0.2s var(--ease-spring); }
.tab:hover { color: var(--ink); }
.tab:hover svg { transform: translateY(-1px); }
.tab:active { opacity: 0.68; transform: scale(0.96); }
.tab.is-active { color: var(--accent); font-weight: 600; }
.tab.is-active svg { transform: translateY(-1px) scale(1.05); }

.tab.is-active::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -7px;
  transform: translateX(-50%);
  width: 18px;
  height: 3px;
  border-radius: 2px;
  background: var(--accent);
  box-shadow: 0 0 8px rgba(181, 70, 46, 0.55);
}

/* 底栏子标签：族内 / 族外（P0 统一导航 + P3 对象范围标注） */
.tab-sub {
  display: block;
  font-style: normal;
  font-size: 8px;
  line-height: 1;
  margin-top: 1px;
  letter-spacing: 0.02em;
  opacity: 0.5;
}
.tab.is-active .tab-sub { opacity: 0.72; }

/* P0 全局导航：内容偏短时把底栏钉在底部（.screen 为 flex 列，margin-top:auto 兜底） */
.global-tabbar { margin-top: auto; }

/* ---------- 通用卡片 / 容器（新增：玻璃拟态 + 悬浮微光） ---------- */

.card {
  background: var(--glass);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(122, 106, 88, 0.14);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  transition: transform 0.25s var(--ease-out), box-shadow 0.25s ease, border-color 0.25s ease;
}

.card:hover {
  transform: translateY(-3px);
  border-color: rgba(181, 70, 46, 0.18);
  box-shadow: var(--shadow-card), 0 0 0 1px rgba(181, 70, 46, 0.08);
}

/* 标题：衬线 + 字距，强化新中式气质 */
.serif, h1, h2, h3 {
  font-family: var(--font-serif);
  letter-spacing: 0.04em;
}

/* 入场动画工具类（用于页面区块，CSS 可控，不依赖 JS） */
.fade-up { animation: fadeUp 0.55s var(--ease-out) both; }
.fade-up.d1 { animation-delay: 0.06s; }
.fade-up.d2 { animation-delay: 0.12s; }
.fade-up.d3 { animation-delay: 0.18s; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

/* 按钮点击涟漪（与既有 :active 并存，纯装饰） */
.btn-primary.is-pressed { animation: pulse 0.4s var(--ease-out); }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(181, 70, 46, 0.4); }
  100% { box-shadow: 0 0 0 14px rgba(181, 70, 46, 0); }
}

/* ---------- 响应式 ---------- */

@media (max-width: 980px) {
  .review-notes { display: none; }
  .review-stage { padding: 28px 16px 48px; }
}

@media (max-width: 560px) {
  .device-frame {
    width: 100%;
    height: 100vh;
    height: 100dvh;
    min-height: 100vh;
    min-height: 100dvh;
  }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
  body::before { animation: none; }
}

/* ============================================================
   V2 增强层 · 朱砂红显性化 + 动效增强
   目标：让"朱砂红"在首页/导航一眼可见，并补充微交互动效。
   说明：页面内联 <style> 优先级较高，关键颜色用 .screen 前缀
        （更高特异性）或 !important 覆盖；本块位于 STYLE EDITOR
        OVERRIDES 之前，用户面板保存的覆盖仍可继续覆盖本层。
   ============================================================ */

/* —— 朱砂红显性化 —— */

/* 宗族印章：传统印章即朱砂红，做成实体红印 */
.screen .clan-seal {
  background: var(--accent) !important;
  color: #FFF7F2 !important;
  border-color: var(--accent) !important;
  box-shadow: 0 2px 10px rgba(181, 70, 46, 0.38) !important;
}

/* 首页功能按钮图标：朱砂红描金底 */
.screen .feature-icon {
  background: var(--accent-soft) !important;
  color: var(--accent) !important;
  transition: background 0.25s ease, color 0.25s ease, transform 0.25s var(--ease-out) !important;
}
.screen .feature-card:hover .feature-icon {
  transform: scale(1.08) rotate(-3deg);
  background: var(--accent) !important;
  color: #FFF7F2 !important;
}

/* 首页功能卡片：悬停浮起 + 朱砂红描边光晕 + 按压回弹 */
.screen .feature-card {
  transition: transform 0.22s var(--ease-out), border-color 0.22s ease,
    box-shadow 0.3s ease, background 0.22s ease !important;
}
.screen .feature-card:hover {
  border-color: var(--accent) !important;
  box-shadow: 0 12px 28px rgba(181, 70, 46, 0.2) !important;
  transform: translateY(-4px) !important;
}
.screen .feature-card:active {
  transform: scale(0.965) translateY(-2px) !important;
}

/* 今日黄历卡：左侧朱砂红引首 */
.screen .day-card {
  border-left: 3px solid var(--accent) !important;
}

/* 宗族切换条：悬停透出朱砂红 */
.screen .clan-selector:hover {
  border-color: var(--accent) !important;
}
.screen .day-link:hover {
  color: var(--accent) !important;
}

/* —— 动效增强 —— */

/* 功能卡片错落入场（backwards：结束即释放，不抢占 hover 变换） */
.screen .feature-card { animation: fadeUp 0.62s var(--ease-out) backwards; }
.screen .feature-card:nth-child(1) { animation-delay: 0.04s; }
.screen .feature-card:nth-child(2) { animation-delay: 0.10s; }
.screen .feature-card:nth-child(3) { animation-delay: 0.16s; }
.screen .feature-card:nth-child(4) { animation-delay: 0.22s; }
.screen .feature-card:nth-child(5) { animation-delay: 0.28s; }
.screen .feature-card:nth-child(6) { animation-delay: 0.34s; }

/* 今日卡轻微浮入 */
.screen .day-card { animation: fadeUp 0.6s var(--ease-out) 0.02s backwards; }

/* 印章：缓慢呼吸光，强调"宗族印记"（infinite，柔和） */
.screen .clan-seal { animation: sealBreath 3.6s ease-in-out infinite; }
@keyframes sealBreath {
  0%, 100% { box-shadow: 0 2px 10px rgba(181, 70, 46, 0.32); }
  50%      { box-shadow: 0 2px 16px rgba(181, 70, 46, 0.55); }
}

/* 底部 tab 激活态：朱砂红辉光脉动（叠加在既有指示条上） */
.tab.is-active::after { animation: tabGlow 2.4s ease-in-out infinite; }
@keyframes tabGlow {
  0%, 100% { opacity: 0.72; }
  50%      { opacity: 1; }
}

/* 演示外壳（review-stage / device / device-frame / review-topbar / review-notes /
   stage-caption / paper-wash / paper-grain / home-indicator）的 DOM 已物理删除，
   仅保留 index.html 的 review-topbar 作为入口页自己的头部。.screen 现无条件全屏，
   见上方 .screen 基础定义；宣纸纹理改由 .screen::before / ::after 提供。 */

/* === P1/P2 收敛辅助样式 === */
.home-quick-head { margin: 6px 2px 12px; }
.clan-browse-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 0 0 14px;
  padding: 11px 14px;
  border: 1px solid rgba(181, 70, 46, 0.35);
  border-radius: 11px;
  background: rgba(181, 70, 46, 0.06);
  color: var(--accent);
  font-size: 12.5px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s ease, transform 0.12s ease, box-shadow 0.2s ease;
}
.clan-browse-link:hover {
  background: rgba(181, 70, 46, 0.12);
  box-shadow: 0 4px 14px rgba(181, 70, 46, 0.14);
}
.clan-browse-link:active { transform: scale(0.99); }
.clan-browse-link svg { flex: 0 0 auto; }

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin: 0 0 12px;
}
.section-head h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: 0.01em;
}
.section-head .section-count {
  font-size: 11px;
  color: rgba(122, 106, 88, 0.7);
  font-weight: 500;
}

/* === P5 弹窗组件统一样式（profile 各 sheet-layer 共用，含新增编辑资料弹窗） === */
.sheet-layer {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  visibility: hidden;
  opacity: 0;
  transition: opacity .28s var(--ease-out, ease), visibility .28s var(--ease-out, ease);
}
.sheet-layer.is-open { visibility: visible; opacity: 1; }

.sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(48, 36, 24, .42);
}
.sheet-layer.is-open .sheet-backdrop { animation: sheetFade .28s var(--ease-out, ease); }

.sheet {
  position: relative;
  width: 100%;
  max-width: 460px;
  max-height: 84vh;
  display: flex;
  flex-direction: column;
  background: var(--paper-card, #FCFAF5);
  border-radius: 18px 18px 0 0;
  box-shadow: 0 -10px 40px rgba(60, 44, 28, .22);
  transform: translateY(100%);
  transition: transform .32s var(--ease-out, ease);
  overflow: hidden;
}
.sheet-layer.is-open .sheet { transform: translateY(0); }

.sheet-handle {
  width: 38px;
  height: 4px;
  border-radius: 2px;
  background: rgba(122, 106, 88, .25);
  margin: 10px auto 2px;
}

.sheet .sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px 10px;
  border-bottom: 1px solid rgba(122, 106, 88, .1);
}
.sheet .sheet-head h3 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 15px;
  font-weight: 400;
  letter-spacing: .08em;
  color: var(--text);
}
.sheet-close {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 50%;
  background: rgba(122, 106, 88, .08);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
}
.sheet-close:active { background: rgba(122, 106, 88, .16); }

.sheet-body {
  padding: 14px 16px 6px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.sheet-foot {
  display: flex;
  gap: 10px;
  padding: 12px 16px calc(14px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid rgba(122, 106, 88, .1);
  background: var(--paper-card, #FCFAF5);
}
.sheet-foot .btn-primary,
.sheet-foot .btn-cancel { flex: 1; height: 42px; }

.field-block {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 12px;
}
.field-label {
  font-family: var(--font-sans);
  font-size: 10.5px;
  color: #8C8375;
  letter-spacing: .02em;
}
.field-input {
  width: 100%;
  border: 1px solid rgba(122, 106, 88, .22);
  border-radius: 7px;
  background: #FFFFFF;
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 13px;
  padding: 10px 11px;
  outline: none;
  box-sizing: border-box;
}
.field-input:focus {
  border-color: var(--accent, #B5462E);
  box-shadow: 0 0 0 3px rgba(181, 70, 46, .12);
}
.field-input[readonly] { background: #F6F1E8; color: #8C8375; }

.btn-cancel {
  border: 1px solid rgba(122, 106, 88, .26);
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 13px;
  letter-spacing: .04em;
}
.btn-cancel:active { background: rgba(122, 106, 88, .06); }

.hint {
  font-family: var(--font-sans);
  font-size: 9px;
  line-height: 1.7;
  color: #A9A091;
}

@keyframes sheetFade { from { opacity: 0; } to { opacity: 1; } }

/* === STYLE EDITOR OVERRIDES START === */
p.day-note {
  transform: none;
  font-size: 10px;
}

label.day-death-toggle {
  transform: none;
}

#navUser {
  transform: none;
  font-size: 14px;
  font-weight: bold;
  text-align: right;
}

#navAvatar {
  transform: none;
}

#clanBtn {
  width: 170px;
  gap: 6px;
  font-weight: 400;
  display: flex;
  padding: 0px 6px;
  border: 1px solid rgba(122, 106, 88, 0.16);
  border-radius: 4px;
  overflow: visible;
}

#clanSeal {
  font-size: 13px;
  font-weight: bold;
}

span.clan-label {
  font-size: 7px;
  color: #b5462e;
  height: 9px;
  line-height: 6px;
  font-weight: 400;
}

#clanName {
  font-size: 12px;
  font-weight: normal;
  opacity: 1;
}

#dayZodiac {
  font-size: 28px;
  color: #b5462e;
  font-weight: bold;
  transform: translate(3px, -4px);
}

#dayDate {
  transform: translate(-28px, 4px);
  font-size: 18px;
}

#dayLunar {
  transform: none;
  font-size: 9px;
}

div.day-divider {
  transform: none;
}

div.hl {
  transform: none;
}

#dayCard {
  transform: none;
  height: auto;
}

#dayRemind {
  transform: translate(0, 0);
  height: auto;
}

#dayJieqi {
  font-size: 20px;
}

#dayJieqiDays {
  font-size: 10px;
  transform: translate(1px, -2px);
  font-weight: bold;
}

.screen {
  height: 100dvh !important;
  overflow: hidden !important;
}

html, body {
  height: 100% !important;
  overflow: hidden !important;
}

div.day-main {
  transform: translate(-10px, 0px);
}

#dayAlmanacLink {
  transform: translate(-2px, 0px);
}

div.day-lunar-row {
  transform: translate(2px, -4px);
}
/* === STYLE EDITOR OVERRIDES END === */

/* 全局底栏页面高度约束：确保有 tabbar 的页面固定为视口高度，
   压过面板可能残留注入的 .screen:has(> .global-tabbar){min-height:0} */
.screen:has(> .global-tabbar) {
  height: 100vh !important;
  height: 100dvh !important;
  overflow: hidden !important;
}

/* 隐藏模拟状态栏和假胶囊 */
.statusbar { display: none !important; }
.capsule { display: none !important; }


/* 隐藏模拟状态栏和假胶囊 */
.statusbar { display: none !important; }
.capsule { display: none !important; }

