/* ============================================================
   琐事 · 嘻游 — 亲子成长 Demo
   设计方向：绘本手账（纸张底 + 和纸胶带贴纸 + 玩具按压按钮）
   ============================================================ */

:root {
  /* palette */
  --paper: #FAF5EC;
  --card: #FFFDF7;
  --ink: #3A3126;
  --ink-soft: #8A7F6E;
  --line: #EDE3D0;
  --tang: #F2762E;
  --tang-deep: #D95F1B;
  --tang-tint: #FFE9D6;
  --leaf: #7FA653;
  --sky: #5A9BC4;
  --berry: #C96A8E;
  --mustard: #E8B931;
  --teal: #5FA8A0;
  --shadow: 0 2px 0 rgba(58, 49, 38, .06), 0 10px 24px -12px rgba(58, 49, 38, .18);
  --r-lg: 20px;
  --r-md: 14px;
  --r-sm: 10px;
  --font-body: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-display: "ZCOOL KuaiLe", -apple-system, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }

body {
  font-family: var(--font-body);
  background: #241E15;
  color: var(--ink);
  display: flex;
  justify-content: center;
  overflow: hidden;
}

.font-display { font-family: var(--font-display); font-weight: 400; letter-spacing: .01em; }

/* ---------- 手机壳 ---------- */
.phone {
  position: relative;
  width: 100%;
  max-width: 430px;
  height: 100vh;
  height: 100dvh;
  background: var(--paper);
  background-image:
    radial-gradient(rgba(58, 49, 38, .045) 1px, transparent 1px),
    radial-gradient(rgba(58, 49, 38, .03) 1px, transparent 1px);
  background-size: 22px 22px, 22px 22px;
  background-position: 0 0, 11px 11px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
@media (min-width: 520px) {
  body { align-items: center; padding: 28px 0; }
  .phone {
    height: min(880px, calc(100vh - 56px));
    height: min(880px, calc(100dvh - 56px));
    border-radius: 34px;
    border: 1px solid rgba(250, 245, 236, .14);
    box-shadow: 0 40px 90px -30px rgba(0, 0, 0, .75);
  }
}

/* ---------- 屏幕切换 ---------- */
.screens { position: relative; flex: 1; min-height: 0; }
.screen {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  opacity: 0; visibility: hidden;
  transform: translateY(10px);
  transition: opacity .28s ease, transform .28s ease, visibility 0s linear .28s;
}
.screen.is-active {
  opacity: 1; visibility: visible; transform: none;
  transition: opacity .28s ease, transform .28s ease, visibility 0s;
}
.screen-scroll { flex: 1; min-height: 0; overflow-y: auto; padding: 4px 18px 26px; scrollbar-width: none; }
.screen-scroll::-webkit-scrollbar { display: none; }

/* ---------- 顶栏 ---------- */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; padding: 18px 18px 12px;
}
.topbar-brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.topbar h1 { font-size: 27px; line-height: 1.05; }
.topbar-sub { font-size: 11.5px; color: var(--ink-soft); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 210px; }
.topbar-side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex-shrink: 0; }

.mascot { width: 42px; height: 42px; flex-shrink: 0; display: block; }
.mascot svg { display: block; width: 100%; height: 100%; }

.date-chip, .count-chip {
  font-size: 10.5px; color: var(--ink-soft);
  background: var(--card); border: 1px solid var(--line);
  padding: 4px 9px; border-radius: 999px; white-space: nowrap;
}
.count-chip { color: var(--tang-deep); border-color: #F6CFA9; background: var(--tang-tint); font-weight: 600; }

/* ---------- 琐事 · 聊天 ---------- */
.chat-list {
  flex: 1; min-height: 0; overflow-y: auto;
  padding: 6px 18px 10px;
  display: flex; flex-direction: column; gap: 14px;
  scrollbar-width: none;
}
.chat-list::-webkit-scrollbar { display: none; }

.chat-day {
  align-self: center; font-size: 10.5px; color: var(--ink-soft);
  background: rgba(58, 49, 38, .06); padding: 4px 12px; border-radius: 999px;
}

.msg { display: flex; gap: 8px; max-width: 88%; animation: msg-in .32s cubic-bezier(.2, 1.4, .4, 1) both; }
.msg-ai { align-self: flex-start; }
.msg-user { align-self: flex-end; flex-direction: row-reverse; }
.msg-avatar { width: 30px; height: 30px; flex-shrink: 0; margin-top: 2px; }
.msg-avatar svg { width: 100%; height: 100%; }
.msg-body { min-width: 0; }
.msg-bubble {
  padding: 11px 14px; font-size: 14px; line-height: 1.65;
  border-radius: 4px 16px 16px 16px;
  background: var(--card); border: 1px solid var(--line);
  box-shadow: var(--shadow);
  word-break: break-word;
}
.msg-user .msg-bubble {
  background: var(--tang-tint); border-color: #F6CFA9;
  border-radius: 16px 4px 16px 16px;
}
.msg-time { font-size: 10px; color: var(--ink-soft); margin-top: 5px; }
.msg-user .msg-time { text-align: right; }

@keyframes msg-in {
  from { opacity: 0; transform: translateY(12px) scale(.96); }
  to { opacity: 1; transform: none; }
}

/* 打字中 */
.typing { display: inline-flex; gap: 4px; padding: 13px 16px; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--ink-soft); animation: blink 1.1s infinite; }
.typing i:nth-child(2) { animation-delay: .18s; }
.typing i:nth-child(3) { animation-delay: .36s; }
@keyframes blink { 0%, 70%, 100% { opacity: .25; transform: none; } 35% { opacity: 1; transform: translateY(-3px); } }

/* 贴纸（记录卡 / 通用卡片） */
.sticker {
  position: relative;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: var(--shadow);
}
.sticker::before {
  content: "";
  position: absolute; top: -9px; left: 26px;
  width: 58px; height: 17px;
  background: color-mix(in srgb, var(--tape, var(--mustard)) 38%, transparent);
  border-left: 1px dashed rgba(255, 255, 255, .55);
  border-right: 1px dashed rgba(255, 255, 255, .55);
  border-radius: 2px;
  transform: rotate(-3.5deg);
  z-index: 1;
}
.tilt-l { transform: rotate(-.7deg); }
.tilt-r { transform: rotate(.8deg); }

/* 记录贴纸卡 */
.record-card {
  margin-top: 8px; padding: 12px 13px 11px;
  animation: stamp-in .45s cubic-bezier(.2, 1.6, .4, 1) both;
}
@keyframes stamp-in {
  0% { opacity: 0; transform: rotate(-6deg) scale(1.12); }
  60% { opacity: 1; transform: rotate(1.6deg) scale(.99); }
  100% { opacity: 1; transform: rotate(-.8deg) scale(1); }
}
.record-head { display: flex; align-items: center; gap: 7px; margin-bottom: 7px; }
.record-cat {
  font-size: 10.5px; font-weight: 700; color: #fff;
  background: var(--cat, var(--teal));
  padding: 3px 9px; border-radius: 6px;
  transform: rotate(-2deg); display: inline-block;
}
.record-saved { font-size: 10.5px; color: var(--leaf); font-weight: 600; margin-left: auto; }
.record-text { font-size: 13px; line-height: 1.6; color: var(--ink); }
.record-foot { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 8px; }
.record-tag { font-size: 10px; color: var(--ink-soft); background: rgba(58, 49, 38, .06); border-radius: 5px; padding: 2px 7px; }

/* AI 气泡里的操作按钮 */
.bubble-actions { display: flex; gap: 8px; margin-top: 9px; }
.mini-btn {
  font-family: var(--font-body); font-size: 11.5px; font-weight: 600;
  color: var(--tang-deep); background: var(--tang-tint);
  border: 1px solid #F6CFA9; border-radius: 8px; padding: 6px 11px;
  cursor: pointer; transition: transform .12s ease;
}
.mini-btn:active { transform: scale(.94); }
.mini-btn.ghost { color: var(--ink-soft); background: transparent; border-color: var(--line); }

/* 快捷 chips */
.quick-chips {
  display: flex; gap: 8px; padding: 4px 18px 10px;
  overflow-x: auto; scrollbar-width: none; flex-shrink: 0;
}
.quick-chips::-webkit-scrollbar { display: none; }
.chip {
  flex-shrink: 0; font-size: 12px; color: var(--ink);
  background: var(--card); border: 1px solid var(--line);
  border-radius: 999px; padding: 7px 13px; cursor: pointer;
  box-shadow: 0 1px 0 rgba(58, 49, 38, .05);
  transition: transform .12s ease, border-color .12s ease;
}
.chip:active { transform: scale(.94); border-color: var(--tang); }

/* 输入栏 */
.chat-inputbar {
  display: flex; align-items: center; gap: 9px;
  padding: 10px 16px calc(12px + env(safe-area-inset-bottom));
  background: linear-gradient(to top, var(--paper) 78%, transparent);
  flex-shrink: 0;
}
.chat-input {
  flex: 1; min-width: 0; height: 42px;
  font-family: var(--font-body); font-size: 14px; color: var(--ink);
  background: var(--card); border: 1px solid var(--line);
  border-radius: 999px; padding: 0 16px; outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.chat-input:focus { border-color: var(--tang); box-shadow: 0 0 0 3px rgba(242, 118, 46, .14); }
.chat-input::placeholder { color: #B4A98F; }
.icon-btn {
  width: 40px; height: 40px; flex-shrink: 0;
  display: grid; place-items: center;
  color: var(--ink-soft); background: var(--card);
  border: 1px solid var(--line); border-radius: 50%;
  cursor: pointer; transition: transform .12s ease, color .12s ease;
}
.icon-btn svg { width: 19px; height: 19px; }
.icon-btn:active { transform: scale(.9); color: var(--tang); }
.icon-btn.is-live { color: #fff; background: var(--tang); border-color: var(--tang); animation: pulse 1.2s infinite; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(242, 118, 46, .4); } 50% { box-shadow: 0 0 0 7px rgba(242, 118, 46, 0); } }
.send-btn {
  width: 42px; height: 42px; flex-shrink: 0;
  display: grid; place-items: center;
  color: #fff; background: var(--tang);
  border: none; border-radius: 50%;
  border-bottom: 3px solid var(--tang-deep);
  cursor: pointer; transition: transform .1s ease, border-bottom-width .1s ease;
}
.send-btn svg { width: 18px; height: 18px; margin-left: -2px; }
.send-btn:active { transform: translateY(2px); border-bottom-width: 1px; }

/* ---------- 嘻游 ---------- */
.drawer-open-btn {
  display: flex; align-items: center; gap: 6px;
  font-family: var(--font-display); font-size: 14px; color: var(--ink);
  background: var(--card); border: 1px solid var(--line);
  border-radius: 999px; padding: 9px 14px; cursor: pointer;
  box-shadow: var(--shadow); transition: transform .12s ease;
}
.drawer-open-btn svg { width: 16px; height: 16px; }
.drawer-open-btn:active { transform: scale(.93); }

.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin: 20px 2px 12px;
}
.section-head:first-child { margin-top: 6px; }
.section-head h2 { font-size: 19px; }
.section-note { font-size: 11px; color: var(--ink-soft); }

/* 横向大卡 */
.featured-strip {
  display: flex; gap: 14px;
  margin: 0 -18px; padding: 8px 18px 12px;
  overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
}
.featured-strip::-webkit-scrollbar { display: none; }
.f-card {
  scroll-snap-align: start;
  flex: 0 0 238px;
  border-radius: var(--r-lg); overflow: hidden;
  background: var(--card); border: 1px solid var(--line);
  box-shadow: var(--shadow); cursor: pointer;
  transition: transform .18s ease;
}
.f-card:active { transform: scale(.97); }
.f-cover {
  height: 128px; display: grid; place-items: center;
  font-size: 54px; position: relative;
  background: linear-gradient(135deg, var(--g1), var(--g2));
}
.f-cover::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(circle at 82% 18%, rgba(255,255,255,.34), transparent 42%);
}
.f-cat {
  position: absolute; top: 10px; left: 10px; z-index: 1;
  font-size: 10px; font-weight: 700; color: #fff;
  background: rgba(58, 49, 38, .42); backdrop-filter: blur(2px);
  padding: 3px 9px; border-radius: 6px;
}
.f-age {
  position: absolute; bottom: 10px; right: 10px; z-index: 1;
  font-size: 10px; color: #fff; background: rgba(58, 49, 38, .42);
  padding: 3px 8px; border-radius: 999px;
}
.f-info { padding: 12px 14px 13px; }
.f-title { font-size: 14.5px; font-weight: 700; line-height: 1.4; }
.f-meta { display: flex; align-items: center; gap: 8px; margin-top: 6px; font-size: 11px; color: var(--ink-soft); }
.f-rate { color: var(--tang-deep); font-weight: 700; }

/* 本周计划 */
.plan-list { display: flex; flex-direction: column; gap: 10px; }
.plan-row {
  display: flex; align-items: center; gap: 12px;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r-md); padding: 11px 13px;
  box-shadow: 0 1px 0 rgba(58, 49, 38, .04);
}
.plan-check {
  width: 26px; height: 26px; flex-shrink: 0;
  border: 2px solid var(--line); border-radius: 9px;
  background: var(--paper); cursor: pointer;
  display: grid; place-items: center;
  color: transparent; transition: all .16s ease;
}
.plan-check svg { width: 14px; height: 14px; }
.plan-row.is-done .plan-check { background: var(--leaf); border-color: var(--leaf); color: #fff; }
.plan-emoji { font-size: 22px; }
.plan-main { flex: 1; min-width: 0; }
.plan-title { font-size: 13.5px; font-weight: 600; }
.plan-row.is-done .plan-title { color: var(--ink-soft); text-decoration: line-through; }
.plan-sub { font-size: 11px; color: var(--ink-soft); margin-top: 2px; }

/* 打卡足迹 */
.footprint-list { display: flex; flex-direction: column; gap: 10px; }
.fp-row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 13px; border-radius: var(--r-md);
  background: rgba(255, 253, 247, .66); border: 1px dashed var(--line);
}
.fp-emoji { font-size: 20px; }
.fp-main { flex: 1; min-width: 0; font-size: 12.5px; }
.fp-main b { font-weight: 600; }
.fp-date { font-size: 10.5px; color: var(--ink-soft); flex-shrink: 0; }
.list-end { text-align: center; font-size: 11px; color: var(--ink-soft); margin: 22px 0 6px; }

/* ---------- 抽屉 ---------- */
.drawer-mask {
  position: absolute; inset: 0; z-index: 32;
  background: rgba(36, 30, 21, .45);
  opacity: 0; visibility: hidden;
  transition: opacity .28s ease, visibility 0s linear .28s;
}
.drawer-mask.is-open { opacity: 1; visibility: visible; transition: opacity .28s ease; }
.drawer {
  position: absolute; top: 0; bottom: 0; left: 0; z-index: 33;
  width: min(84%, 340px);
  background: var(--paper);
  border-right: 1px solid var(--line);
  box-shadow: 24px 0 48px -24px rgba(36, 30, 21, .45);
  transform: translateX(-104%);
  transition: transform .34s cubic-bezier(.32, .9, .3, 1);
  display: flex; flex-direction: column;
}
.drawer.is-open { transform: none; }
.drawer-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 16px 10px;
}
.drawer-head h2 { font-size: 21px; }
.drawer-cats {
  display: flex; gap: 7px; padding: 2px 16px 12px;
  overflow-x: auto; scrollbar-width: none; flex-shrink: 0;
}
.drawer-cats::-webkit-scrollbar { display: none; }
.cat-pill {
  flex-shrink: 0; font-size: 12px; font-weight: 600;
  padding: 7px 13px; border-radius: 999px; cursor: pointer;
  background: var(--card); border: 1px solid var(--line); color: var(--ink-soft);
  transition: all .14s ease;
}
.cat-pill.is-active { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.drawer-cards { flex: 1; overflow-y: auto; padding: 2px 16px 22px; display: flex; flex-direction: column; gap: 11px; scrollbar-width: none; }
.drawer-cards::-webkit-scrollbar { display: none; }
.d-card {
  display: flex; gap: 11px; align-items: center;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r-md); padding: 10px;
  cursor: pointer; box-shadow: 0 1px 0 rgba(58, 49, 38, .04);
  transition: transform .14s ease;
}
.d-card:active { transform: scale(.97); }
.d-cover {
  width: 52px; height: 52px; flex-shrink: 0;
  display: grid; place-items: center; font-size: 26px;
  border-radius: 11px;
  background: linear-gradient(135deg, var(--g1), var(--g2));
}
.d-info { flex: 1; min-width: 0; }
.d-title { font-size: 13px; font-weight: 700; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.d-meta { display: flex; align-items: center; gap: 7px; margin-top: 4px; font-size: 10.5px; color: var(--ink-soft); }
.d-cat { color: var(--cat); font-weight: 700; }

/* ---------- 资源详情 ---------- */
.detail-sheet {
  position: absolute; inset: 0; z-index: 40;
  background: var(--paper);
  transform: translateY(102%);
  transition: transform .36s cubic-bezier(.32, .9, .3, 1);
  display: flex; flex-direction: column;
}
.detail-sheet.is-open { transform: none; }
.detail-scroll { flex: 1; overflow-y: auto; scrollbar-width: none; padding-bottom: 34px; }
.detail-scroll::-webkit-scrollbar { display: none; }
.detail-hero {
  position: relative; height: 218px;
  display: grid; place-items: center; font-size: 92px;
  background: linear-gradient(140deg, var(--g1), var(--g2));
}
.detail-hero::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(circle at 80% 16%, rgba(255,255,255,.32), transparent 46%);
}
.detail-close {
  position: absolute; top: 14px; left: 14px; z-index: 2;
  width: 38px; height: 38px; display: grid; place-items: center;
  color: #fff; background: rgba(58, 49, 38, .42);
  border: none; border-radius: 50%; cursor: pointer;
  transition: transform .12s ease;
}
.detail-close:active { transform: scale(.88); }
.detail-close svg { width: 18px; height: 18px; }
.detail-cat {
  position: absolute; bottom: -12px; left: 20px; z-index: 2;
  font-size: 11px; font-weight: 700; color: #fff;
  background: var(--cat); padding: 5px 12px; border-radius: 8px;
  transform: rotate(-2deg); box-shadow: var(--shadow);
}
.detail-body { padding: 26px 20px 0; }
.detail-title { font-size: 23px; line-height: 1.35; }
.detail-meta-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 4px; }
.meta-chip {
  font-size: 11px; color: var(--ink-soft);
  background: var(--card); border: 1px solid var(--line);
  padding: 5px 10px; border-radius: 999px;
}
.meta-chip b { color: var(--tang-deep); }
.detail-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 16px; }
.detail-tag { font-size: 11px; color: var(--cat); background: color-mix(in srgb, var(--cat) 12%, transparent); padding: 4px 10px; border-radius: 6px; font-weight: 600; }
.detail-intro { font-size: 13.5px; line-height: 1.85; color: #5B5245; }
.detail-source {
  margin-top: 18px; font-size: 12px; color: var(--ink-soft);
  display: flex; align-items: center; gap: 7px;
  background: rgba(58, 49, 38, .05); border-radius: var(--r-sm); padding: 10px 12px;
}
.detail-actions { display: flex; gap: 11px; margin-top: 22px; }
.btn {
  flex: 1; height: 48px;
  font-family: var(--font-display); font-size: 16px; letter-spacing: .04em;
  border-radius: 15px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  transition: transform .1s ease, border-bottom-width .1s ease, background .15s ease;
}
.btn:active { transform: translateY(3px); border-bottom-width: 1px !important; }
.btn-primary { color: #fff; background: var(--tang); border: none; border-bottom: 4px solid var(--tang-deep); }
.btn-outline { color: var(--tang-deep); background: var(--card); border: 1.5px solid #F0B98A; border-bottom: 4px solid #F0B98A; }
.btn-outline.is-on { background: var(--tang-tint); }
.btn-wide { width: 100%; flex: none; }
.btn[disabled] { opacity: .55; pointer-events: none; }

/* ---------- 我的 ---------- */
.child-card { padding: 18px 16px 15px; margin-top: 6px; }
.child-top { display: flex; align-items: center; gap: 13px; }
.child-avatar {
  width: 58px; height: 58px; flex-shrink: 0;
  display: grid; place-items: center; font-size: 30px;
  background: linear-gradient(135deg, #FFD9A0, #F9B1AB);
  border-radius: 19px; border: 1px solid rgba(58, 49, 38, .08);
}
.child-name { font-size: 21px; }
.child-sub { font-size: 11.5px; color: var(--ink-soft); margin-top: 3px; }
.child-edit {
  margin-left: auto; font-size: 11px; color: var(--ink-soft);
  border: 1px solid var(--line); background: var(--paper);
  border-radius: 999px; padding: 6px 11px; cursor: pointer;
}
.child-stats { display: flex; gap: 8px; margin-top: 15px; }
.stat-box {
  flex: 1; text-align: center;
  background: rgba(58, 49, 38, .045); border-radius: var(--r-sm);
  padding: 9px 4px 8px;
}
.stat-num { font-size: 16px; font-weight: 800; color: var(--tang-deep); font-family: var(--font-display); }
.stat-label { font-size: 10px; color: var(--ink-soft); margin-top: 2px; }
.child-bars { display: flex; align-items: flex-end; gap: 7px; height: 46px; margin-top: 15px; padding: 0 4px; }
.child-bar { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; justify-content: flex-end; }
.child-bar i {
  width: 100%; border-radius: 5px 5px 2px 2px;
  background: linear-gradient(to top, var(--tang), #F9A03F);
  min-height: 4px; opacity: .9;
  animation: bar-grow .7s cubic-bezier(.2, .9, .3, 1) both;
}
.child-bar span { font-size: 9px; color: var(--ink-soft); }
@keyframes bar-grow { from { height: 4px; } }
.child-bars-caption { font-size: 10px; color: var(--ink-soft); text-align: center; margin-top: 7px; }

.menu-list { display: flex; flex-direction: column; gap: 11px; margin-top: 20px; }
.menu-item {
  display: flex; align-items: center; gap: 13px;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r-md); padding: 14px 15px;
  cursor: pointer; box-shadow: 0 1px 0 rgba(58, 49, 38, .04);
  transition: transform .13s ease;
}
.menu-item:active { transform: scale(.98); }
.menu-ico {
  width: 40px; height: 40px; flex-shrink: 0;
  display: grid; place-items: center; font-size: 19px;
  border-radius: 13px;
  background: color-mix(in srgb, var(--mc) 15%, transparent);
}
.menu-main { flex: 1; min-width: 0; }
.menu-title { font-size: 14.5px; font-weight: 700; }
.menu-desc { font-size: 11px; color: var(--ink-soft); margin-top: 2px; }
.menu-arrow { color: #C9BCA2; flex-shrink: 0; }
.menu-arrow svg { width: 17px; height: 17px; display: block; }
.me-footer { text-align: center; font-size: 10.5px; line-height: 1.9; color: var(--ink-soft); margin: 26px 0 8px; }

/* ---------- 子页面通用 ---------- */
.subpage {
  position: absolute; inset: 0; z-index: 30;
  background: var(--paper);
  transform: translateX(104%);
  transition: transform .34s cubic-bezier(.32, .9, .3, 1);
  display: flex; flex-direction: column;
}
.subpage.is-open { transform: none; }
.subpage-bar {
  display: flex; align-items: center; gap: 10px;
  padding: 16px 16px 12px;
  border-bottom: 1px dashed var(--line);
}
.subpage-bar h2 { font-size: 21px; }
.subpage-note { font-size: 11px; color: var(--ink-soft); margin-left: auto; }
.back-btn {
  width: 36px; height: 36px; flex-shrink: 0;
  display: grid; place-items: center;
  background: var(--card); border: 1px solid var(--line);
  border-radius: 12px; color: var(--ink); cursor: pointer;
  transition: transform .12s ease;
}
.back-btn svg { width: 18px; height: 18px; }
.back-btn:active { transform: scale(.9); }

.block { margin-top: 20px; }
.block-title { font-size: 17px; margin: 0 2px 11px; display: flex; align-items: baseline; justify-content: space-between; }
.block-title small { font-size: 11px; color: var(--ink-soft); font-family: var(--font-body); }

/* 报告卡 */
.report-card { padding: 17px 16px 15px; }
.report-head { display: flex; align-items: center; gap: 9px; margin-bottom: 4px; }
.report-month { font-size: 17px; }
.report-badge { font-size: 10px; font-weight: 700; color: #fff; background: var(--leaf); border-radius: 5px; padding: 3px 7px; }
.report-summary { font-size: 12.5px; line-height: 1.8; color: #5B5245; margin-top: 9px; }
.report-dims { display: flex; flex-direction: column; gap: 9px; margin-top: 14px; }
.dim-row { display: flex; align-items: center; gap: 9px; }
.dim-name { width: 34px; font-size: 11px; color: var(--ink-soft); flex-shrink: 0; }
.dim-track { flex: 1; height: 9px; background: rgba(58, 49, 38, .07); border-radius: 999px; overflow: hidden; }
.dim-fill { height: 100%; border-radius: 999px; background: var(--dc); width: 0; transition: width .9s cubic-bezier(.2, .9, .3, 1); }
.dim-val { width: 26px; font-size: 11px; font-weight: 700; color: var(--ink); text-align: right; flex-shrink: 0; }
.report-highlights { margin-top: 14px; display: flex; flex-direction: column; gap: 7px; }
.report-highlight { font-size: 12px; line-height: 1.6; color: #5B5245; padding-left: 16px; position: relative; }
.report-highlight::before { content: "✿"; position: absolute; left: 0; color: var(--tang); font-size: 11px; }
.report-more { margin-top: 13px; }
.report-full {
  display: none; font-size: 12.5px; line-height: 1.9; color: #5B5245;
  background: rgba(58, 49, 38, .045); border-radius: var(--r-sm);
  padding: 13px 14px; margin-top: 10px;
}
.report-full.is-show { display: block; animation: msg-in .3s ease both; }
.past-reports { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }

/* 生成进度 */
.gen-progress { display: none; margin-top: 13px; }
.gen-progress.is-show { display: block; }
.gen-track { height: 8px; background: rgba(58, 49, 38, .08); border-radius: 999px; overflow: hidden; }
.gen-fill { height: 100%; width: 0; border-radius: 999px; background: linear-gradient(to right, var(--mustard), var(--tang)); transition: width .3s ease; }
.gen-text { font-size: 11px; color: var(--ink-soft); margin-top: 7px; }

/* 提醒 */
.remind-row {
  display: flex; align-items: center; gap: 12px;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r-md); padding: 12px 13px; margin-bottom: 9px;
}
.remind-ico { width: 38px; height: 38px; flex-shrink: 0; display: grid; place-items: center; font-size: 18px; border-radius: 12px; background: color-mix(in srgb, var(--rc) 14%, transparent); }
.remind-main { flex: 1; min-width: 0; }
.remind-title { font-size: 13.5px; font-weight: 600; }
.remind-row.is-done .remind-title { color: var(--ink-soft); text-decoration: line-through; }
.remind-sub { font-size: 11px; color: var(--ink-soft); margin-top: 2px; }

/* 开关 */
.switch {
  position: relative; width: 44px; height: 26px; flex-shrink: 0;
  background: #DCD2BE; border: none; border-radius: 999px; cursor: pointer;
  transition: background .2s ease;
}
.switch::after {
  content: ""; position: absolute; top: 3px; left: 3px;
  width: 20px; height: 20px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(58, 49, 38, .25);
  transition: transform .2s cubic-bezier(.2, .9, .3, 1.3);
}
.switch.is-on { background: var(--leaf); }
.switch.is-on::after { transform: translateX(18px); }

/* 队友 */
.member-row {
  display: flex; align-items: center; gap: 12px;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r-md); padding: 12px 13px; margin-bottom: 9px;
}
.member-avatar { width: 44px; height: 44px; flex-shrink: 0; display: grid; place-items: center; font-size: 23px; border-radius: 15px; background: linear-gradient(135deg, var(--m1), var(--m2)); }
.member-main { flex: 1; min-width: 0; }
.member-name { font-size: 14px; font-weight: 700; display: flex; align-items: center; gap: 7px; }
.member-role { font-size: 9.5px; font-weight: 600; color: var(--tang-deep); background: var(--tang-tint); border-radius: 5px; padding: 2px 7px; }
.member-role.pending { color: var(--ink-soft); background: rgba(58, 49, 38, .07); }
.member-perm { font-size: 11px; color: var(--ink-soft); margin-top: 3px; }
.member-status { font-size: 10.5px; color: var(--leaf); flex-shrink: 0; }
.member-status.pending { color: var(--mustard); }
.team-form { padding: 15px 14px; }
.team-form-row { display: flex; gap: 9px; margin-top: 11px; }
.team-input, .team-select {
  font-family: var(--font-body); font-size: 13px; color: var(--ink);
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--r-sm); padding: 10px 12px; outline: none; min-width: 0;
}
.team-input { flex: 1; }
.team-input:focus, .team-select:focus { border-color: var(--tang); }
.team-select { flex-shrink: 0; }
.form-caption { font-size: 11px; color: var(--ink-soft); line-height: 1.7; }

/* 配置 */
.skill-row {
  display: flex; align-items: center; gap: 12px;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r-md); padding: 13px; margin-bottom: 9px;
}
.skill-ico { width: 38px; height: 38px; flex-shrink: 0; display: grid; place-items: center; font-size: 18px; border-radius: 12px; background: color-mix(in srgb, var(--sc) 14%, transparent); }
.skill-main { flex: 1; min-width: 0; }
.skill-name { font-size: 13.5px; font-weight: 700; display: flex; align-items: center; gap: 7px; }
.skill-tag { font-size: 9px; font-weight: 600; color: var(--sky); background: rgba(90, 155, 196, .13); border-radius: 4px; padding: 2px 6px; }
.skill-desc { font-size: 11px; color: var(--ink-soft); margin-top: 3px; line-height: 1.55; }
.config-note { font-size: 11px; line-height: 1.8; color: var(--ink-soft); background: rgba(90, 155, 196, .08); border: 1px dashed rgba(90, 155, 196, .35); border-radius: var(--r-sm); padding: 11px 13px; margin-top: 14px; }

/* 账号 */
.account-card { padding: 18px 16px; text-align: center; }
.account-avatar {
  width: 66px; height: 66px; margin: 0 auto 10px;
  display: grid; place-items: center; font-size: 33px;
  background: linear-gradient(135deg, #B7D8F2, #8FC3E8);
  border-radius: 22px; border: 1px solid rgba(58, 49, 38, .08);
}
.account-name { font-size: 18px; font-weight: 800; }
.account-sub { font-size: 11.5px; color: var(--ink-soft); margin-top: 4px; }
.privacy-row { display: flex; align-items: center; gap: 11px; padding: 12px 4px; border-bottom: 1px dashed var(--line); font-size: 13px; }
.privacy-row:last-child { border-bottom: none; }
.privacy-ico { font-size: 16px; }
.privacy-main { flex: 1; }
.privacy-sub { font-size: 10.5px; color: var(--ink-soft); margin-top: 2px; }
.account-actions { margin-top: 20px; display: flex; flex-direction: column; gap: 11px; }
.btn-danger { color: #C1502E; background: var(--card); border: 1.5px solid #E4A58C; border-bottom: 4px solid #E4A58C; }

/* ---------- Tab bar ---------- */
.tabbar {
  display: flex; flex-shrink: 0;
  background: var(--card);
  border-top: 1px solid var(--line);
  padding: 7px 10px calc(9px + env(safe-area-inset-bottom));
}
.tab {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  background: none; border: none; cursor: pointer;
  color: #B4A98F; font-family: var(--font-body);
  padding: 4px 0 2px; position: relative;
  transition: color .18s ease;
}
.tab svg { width: 23px; height: 23px; transition: transform .22s cubic-bezier(.2, 1.6, .4, 1); }
.tab span { font-size: 10.5px; font-weight: 600; }
.tab.is-active { color: var(--tang-deep); }
.tab.is-active svg { transform: translateY(-2px) scale(1.08); }
.tab.is-active::after {
  content: ""; position: absolute; top: -8px;
  width: 18px; height: 3.5px; border-radius: 0 0 4px 4px;
  background: var(--tang);
}

/* ---------- Toast ---------- */
.toast {
  position: absolute; left: 50%; bottom: 96px; z-index: 60;
  transform: translate(-50%, 16px);
  max-width: 82%;
  background: rgba(43, 36, 26, .93); color: #FBF6EA;
  font-size: 12.5px; line-height: 1.5; text-align: center;
  padding: 10px 18px; border-radius: 999px;
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity .25s ease, transform .25s ease, visibility 0s linear .25s;
}
.toast.is-show { opacity: 1; visibility: visible; transform: translate(-50%, 0); transition: opacity .25s ease, transform .25s ease; }

/* ---------- 动效降级 ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
