/* ============================================================
   知夏工作台官网 · v5 极简版
   暖白纸感底 / 单列居中 / 大留白 / 零装饰
   ============================================================ */

:root {
  --bg: #faf7f1;
  --bg-alt: #f4efe5;
  --card: #fffdf8;
  --ink: #211b14;
  --ink-2: #7d7263;
  --line: #e6ddcb;
  --amber: #b45f1f;
  --amber-deep: #96490f;
  --serif: "Noto Serif SC", "Songti SC", "STSong", serif;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", sans-serif;
  --wide: 1000px;
  --gutter: 24px;
  --radius: 14px;
}

/* 标题衬线：仅 700 一个字重（290KB），正文走系统无衬线 */
@font-face {
  font-family: 'Noto Serif SC';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../assets/fonts/noto-serif-sc-700.woff2') format('woff2');
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; height: auto; }

a { color: inherit; }

::selection { background: rgba(180, 95, 31, 0.18); }

:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; border-radius: 4px; }

section { scroll-margin-top: 84px; }

/* ---------- 导航 ---------- */

.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  background: rgba(250, 247, 241, 0.85);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease;
}

.nav.scrolled { border-bottom-color: var(--line); }

.nav-inner {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 0 var(--gutter);
  height: 64px;
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-brand {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 21px;
  letter-spacing: 0.02em;
  text-decoration: none;
  white-space: nowrap;
}

.nav-brand em {
  font-style: normal;
  font-family: var(--sans);
  font-weight: 500;
  font-size: 13px;
  color: var(--ink-2);
  margin-left: 6px;
  letter-spacing: 0.14em;
}

.nav-links { display: flex; gap: 28px; margin-left: auto; }

.nav-links a {
  font-size: 15px;
  color: var(--ink-2);
  text-decoration: none;
  transition: color 0.2s ease;
}

.nav-links a:hover { color: var(--ink); }

.nav-cta {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  background: var(--ink);
  text-decoration: none;
  padding: 8px 18px;
  border-radius: 999px;
  transition: background 0.2s ease;
  white-space: nowrap;
}

.nav-cta:hover { background: #3a3128; }

/* 导航栏实时访问数据（纯字，数字略大、打字动画见 js/stats.js；拉取失败整行隐藏）。
   注意：此块必须放在下方「响应式」媒体查询之前，否则同等优先级下会盖掉手机端缩小规则 */
.nav-stats {
  font-size: 12px;
  letter-spacing: 0.02em;
  color: var(--ink-2);
  white-space: nowrap;
}
.nav-stats b {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  padding: 0 1px;
}

/* ---------- 首屏 ---------- */

.hero {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 148px var(--gutter) 96px;
  text-align: center;
}

.hero-pill {
  display: flex;
  flex-wrap: wrap;          /* 手机窄屏按「·」分段换行，避免「完全免费」被拆出孤字 */
  justify-content: center;
  align-items: center;
  column-gap: 8px;
  font-size: 13px;
  letter-spacing: 0.08em;
  color: var(--amber);
  border: 1px solid rgba(180, 95, 31, 0.35);
  border-radius: 999px;
  padding: 5px 16px;
  margin-bottom: 28px;
}
.hero-pill i { font-style: normal; opacity: 0.6; }

.hero-title {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(38px, 6.2vw, 64px);
  line-height: 1.22;
  letter-spacing: 0.01em;
  margin-bottom: 22px;
}

.hero-sub {
  font-size: clamp(16px, 1.9vw, 19px);
  color: var(--ink-2);
  max-width: 620px;
  margin: 0 auto 36px;
}

.hero-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  margin-bottom: 64px;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  background: var(--ink);
  text-decoration: none;
  padding: 15px 38px;
  border-radius: 999px;
  transition: background 0.2s ease, transform 0.2s ease;
}

.btn-primary svg { width: 16px; height: 16px; }

.btn-primary:hover { background: #3a3128; transform: translateY(-1px); }
.btn-primary:disabled { opacity: 0.75; cursor: default; transform: none; }

.btn-ghost {
  font-size: 15px;
  color: var(--amber);
  text-decoration: none;
  border-bottom: 1px solid rgba(180, 95, 31, 0.35);
  padding-bottom: 2px;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.btn-ghost:hover { color: var(--amber-deep); border-color: var(--amber-deep); }

/* ---------- 首屏交互演示：照工作台源码还原（深棕皮革 UI） ---------- */

/* 大屏：演示窗向两侧外扩，比正文宽，像 ZCode 首屏一样当主角 */
@media (min-width: 1100px) {
  .hero-demo { margin-left: -48px; margin-right: -48px; }
}

.demo-window {
  background: #FFFEF9;
  color: #3D3229;
  border: 1px solid #E8E0D5;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 24px 60px -18px rgba(61, 50, 41, 0.16);
  text-align: left;
  font-size: 14px;
}

/* 顶部导航：照 top-navbar */
.demo-navbar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 9px 16px;
  background: #F6F1E7;
  border-bottom: 1px solid #E8E0D5;
}

.demo-navbar-left { display: flex; align-items: center; gap: 12px; }

.demo-logo { font-weight: 700; font-size: 13px; letter-spacing: 0.14em; color: #3D3229; }

.demo-toolmenu { font-size: 12px; color: #6B5E52; border: 1px solid #E8E0D5; border-radius: 6px; padding: 3px 9px; transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease; }

.demo-toolmenu:hover { background: rgba(139, 90, 74, 0.12); color: #8B5A4A; border-color: rgba(139, 90, 74, 0.35); }

.demo-navlist { display: flex; gap: 4px; margin: 0 auto; background: #FFFEF9; border-radius: 9px; padding: 3px; }

.demo-navitem { font-size: 12.5px; color: #6B5E52; padding: 4px 14px; border-radius: 7px; transition: background 0.2s ease, color 0.2s ease; }

.demo-navitem:hover { background: rgba(139, 90, 74, 0.12); color: #8B5A4A; }

.demo-navitem.active { background: #8B5A4A; color: #fff; }

.demo-navitem.active:hover { background: #8B5A4A; color: #fff; }

.demo-navbar-right { display: flex; align-items: center; gap: 12px; color: #6B5E52; }

.demo-mini { font-size: 11.5px; border: 1px solid #E8E0D5; border-radius: 6px; padding: 2px 8px; transition: background 0.2s ease, color 0.2s ease; }

.demo-mini:hover { background: rgba(139, 90, 74, 0.12); color: #8B5A4A; }

.demo-clock { font-size: 12px; font-variant-numeric: tabular-nums; }

.demo-nicon { position: relative; display: flex; }

.demo-nicon svg { width: 15px; height: 15px; transition: transform 0.2s ease; }

.demo-nicon:hover { color: #8B5A4A; }

.demo-nicon:hover svg { transform: scale(1.15); }

.demo-nbell i { position: absolute; top: -2px; right: -3px; width: 6px; height: 6px; border-radius: 50%; background: #A65454; }

.demo-uavatar { width: 26px; height: 26px; border-radius: 50%; background: #E8E0D5; display: flex; align-items: center; justify-content: center; font-size: 14px; transition: background 0.2s ease, transform 0.2s ease; }

.demo-uavatar:hover { background: rgba(139, 90, 74, 0.16); transform: scale(1.08); }

/* Chat 工具栏：照 ai-toolbar */
.demo-aitoolbar { display: flex; align-items: center; justify-content: space-between; padding: 10px 16px; border-bottom: 1px solid #E8E0D5; }

.demo-aitoolbar-left { display: flex; align-items: center; gap: 10px; }

.demo-aiavatar { width: 38px; height: 38px; border-radius: 50%; }

.demo-aiinfo { display: flex; flex-direction: column; line-height: 1.3; }

.demo-aiinfo b { font-size: 14px; }

.demo-aiinfo i { font-style: normal; font-size: 11.5px; color: #5B7A5B; }

.demo-aitoolbar-right { display: flex; gap: 6px; }

.demo-textbtn { font-size: 12px; color: #6B5E52; border: 1px solid #E8E0D5; border-radius: 6px; padding: 4px 10px; transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease; }

.demo-textbtn:hover { background: rgba(139, 90, 74, 0.12); color: #8B5A4A; border-color: rgba(139, 90, 74, 0.35); }

/* 消息区：照 ai-messages */
.demo-chat { height: auto; flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 18px 18px; display: flex; flex-direction: column; gap: 12px; }

.demo-chat::-webkit-scrollbar { width: 6px; }

.demo-chat::-webkit-scrollbar-thumb { background: #E8E0D5; border-radius: 3px; }

.demo-welcome { align-self: center; text-align: center; margin: auto 0; display: flex; flex-direction: column; align-items: center; gap: 8px; max-width: 340px; }

.demo-welcome.gone { display: none; }

.demo-welcome-av { width: 56px; height: 56px; border-radius: 50%; }

.demo-welcome b { font-size: 16px; }

.demo-welcome p { font-size: 13px; color: #6B5E52; line-height: 1.6; }

.demo-msg { max-width: 72%; line-height: 1.6; animation: demo-in 0.4s ease; font-size: 14px; }

.demo-msg-user { align-self: flex-end; background: #8B5A4A; color: #fff; padding: 10px 15px; border-radius: 18px 18px 4px 18px; }

.demo-msg-bot { align-self: flex-start; background: #F6F1E7; padding: 10px 15px; border-radius: 4px 18px 18px 18px; }

@keyframes demo-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

/* 确认卡片：照 ai-confirm-card（✦ 识别到以下内容，确认写入？） */
.demo-confirm { align-self: flex-start; max-width: 72%; border: 1px solid #8B5A4A; border-radius: 12px; background: #FFFFF8; padding: 12px 16px; animation: demo-in 0.4s ease; }

.demo-confirm-title { font-size: 12px; font-weight: 700; color: #8B5A4A; margin-bottom: 8px; }

.demo-confirm-items { display: flex; flex-direction: column; gap: 4px; margin-bottom: 10px; }

.demo-confirm-items p { display: flex; align-items: baseline; gap: 10px; font-size: 13px; }

.demo-confirm-items i { font-style: normal; font-size: 11px; color: #9A8B7A; min-width: 30px; }

.demo-confirm-items b { color: #3D3229; font-weight: 500; }

.demo-confirm-actions { display: flex; gap: 8px; }

.demo-confirm-ok { font-size: 12px; font-weight: 600; background: #8B5A4A; color: #fff; border-radius: 7px; padding: 5px 14px; }

.demo-confirm-ok.hit { animation: demo-hit 0.25s ease; }

@keyframes demo-hit { 50% { transform: scale(0.9); } }

.demo-confirm-cancel { font-size: 12px; color: #9A8B7A; border: 1px solid #E8E0D5; border-radius: 7px; padding: 5px 12px; }

.demo-confirm-done { font-size: 12.5px; color: #5B7A5B; font-weight: 600; padding: 4px 0; }

/* 知夏工作状态 */
.demo-msg-thinking { align-self: flex-start; display: flex; align-items: center; gap: 8px; background: #F6F1E7; padding: 11px 15px; border-radius: 4px 18px 18px 18px; font-size: 13.5px; color: #6B5E52; }

.demo-msg-thinking .demo-dots { display: flex; gap: 4px; }

.demo-msg-thinking .demo-dots i { width: 6px; height: 6px; border-radius: 50%; background: #9A8B7A; animation: demo-dot 1.1s infinite ease-in-out; }

.demo-msg-thinking .demo-dots i:nth-child(2) { animation-delay: 0.15s; }

.demo-msg-thinking .demo-dots i:nth-child(3) { animation-delay: 0.3s; }

@keyframes demo-dot {
  0%, 60%, 100% { transform: none; opacity: 0.5; }
  30% { transform: translateY(-4px); opacity: 1; }
}

/* 提示条：照 ai-tips-bar */
.demo-tips { border-top: 1px solid #E8E0D5; padding: 8px 16px; }

.demo-tips-toggle { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 8px; background: none; border: none; color: #8B5A4A; font-size: 12.5px; font-family: var(--sans); padding: 4px 0; cursor: pointer; }

.demo-tips-toggle i { font-style: normal; transition: transform 0.2s ease; }

.demo-tips-toggle.open i { transform: rotate(180deg); }

.demo-tips-toggle:hover { color: #8B5A4A; }

.demo-tips-body { display: grid; grid-template-columns: repeat(5, 1fr); gap: 7px; padding: 8px 0 4px; }

.demo-tips-cat {
  background: #FFFEF9;
  border: 1px solid #E8E0D5;
  border-radius: 8px;
  padding: 7px 9px;
  min-width: 0;
}

.demo-tips-cat b { display: block; font-size: 11.5px; font-weight: 700; color: #3D3229; margin-bottom: 4px; white-space: nowrap; }

.demo-tips-cat ul { list-style: none; margin: 0; padding: 0; }

.demo-tips-cat li { font-size: 10.5px; color: #9A8B7A; line-height: 1.5; overflow-wrap: anywhere; }

/* 输入区：照 ai-input-row（textarea + 联网 + 发送） */
.demo-inputrow { padding: 12px 16px 14px; border-top: 1px solid #E8E0D5; }

.demo-inputbox { position: relative; background: #F6F1E7; border: 1px solid #E8E0D5; border-radius: 10px; min-height: 44px; padding: 11px 13px; }

.demo-ph { position: absolute; left: 13px; top: 11px; font-size: 13.5px; color: #9A8B7A; pointer-events: none; }

.demo-typing { font-size: 13.5px; line-height: 20px; min-height: 20px; white-space: pre-wrap; word-break: break-all; }

.demo-typing.out { animation: demo-out 0.22s ease forwards; }

@keyframes demo-out { to { opacity: 0; transform: translateY(-6px); } }

.demo-caret { display: inline-block; width: 2px; height: 16px; background: #8B5A4A; vertical-align: -3px; margin-left: 1px; opacity: 0; }

.demo-caret.on { opacity: 1; animation: demo-blink 0.85s steps(1) infinite; }

@keyframes demo-blink { 50% { opacity: 0; } }

.demo-inputbar { display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin-top: 9px; }

.demo-webtoggle { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: #9A8B7A; padding: 3px 8px; border-radius: 6px; transition: background 0.2s ease, color 0.2s ease; }

.demo-webtoggle:hover { background: rgba(139, 90, 74, 0.12); color: #8B5A4A; }

.demo-webtoggle svg { width: 13px; height: 13px; }

.demo-send { font-size: 12.5px; font-weight: 600; font-family: var(--sans); color: #fff; background: #8B5A4A; border: none; border-radius: 7px; padding: 6px 16px; cursor: pointer; transition: background 0.2s ease, transform 0.12s ease; }

.demo-send:hover { background: #9C6B58; }

.demo-send.hit { transform: scale(0.92); }


/* ---------- Agent 模式专属 ---------- */

/* 工作区徽章 */
.demo-ws {
  font-size: 12px;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color: #6B5E52;
  background: #F6F1E7;
  border: 1px solid #E8E0D5;
  border-radius: 6px;
  padding: 4px 10px;
  transition: background 0.2s ease, color 0.2s ease;
}

.demo-ws:hover { background: rgba(139, 90, 74, 0.12); color: #8B5A4A; }

/* 建议卡（照 agent-suggestion-chip） */
.demo-suggest { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 6px; }

.demo-suggest span {
  font-size: 12px;
  color: #6B5E52;
  background: #FFFEF9;
  border: 1px solid #E8E0D5;
  border-radius: 8px;
  padding: 6px 12px;
  cursor: default;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.demo-suggest span:hover { background: rgba(139, 90, 74, 0.12); color: #8B5A4A; border-color: rgba(139, 90, 74, 0.35); }

/* 消息流里的独立卡片（Agent 摘要卡/目录树等） */
.demo-card-outer { align-self: flex-start; animation: demo-in 0.4s ease; }

/* Agent 工具调用行（照 agent-tool-summary：等宽 + ▸ + 呼吸点 → ✓ 完成态） */
.demo-toolrow {
  align-self: flex-start;
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color: #9A8B7A;
  padding: 2px 0;
  animation: demo-in 0.35s ease;
}

.demo-toolrow .demo-toolrow-icon { color: #9A8B7A; flex: none; }

.demo-toolrow .demo-toolrow-dot {
  flex: none;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #8B5A4A;
  animation: demo-dot 1.1s infinite ease-in-out;
}

.demo-toolrow.done { color: #6B5E52; }

.demo-toolrow.done .demo-toolrow-icon { color: #5B7A5B; }

.demo-toolrow.done .demo-toolrow-dot { display: none; }

/* 文件树（等宽块） */
.demo-tree {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 12px;
  line-height: 1.8;
  color: #3D3229;
  white-space: pre;
  overflow-x: auto;
}

/* Agent 输入工具条元素 */
.demo-inputbar-agent { justify-content: space-between; }

.demo-input-tools { display: inline-flex; align-items: center; gap: 8px; }

.demo-minibtn {
  font-size: 12px;
  color: #6B5E52;
  border: 1px solid #E8E0D5;
  border-radius: 6px;
  padding: 3px 9px;
  cursor: default;
  transition: background 0.2s ease, color 0.2s ease;
}

.demo-minibtn:hover { background: rgba(139, 90, 74, 0.12); color: #8B5A4A; }

.demo-ring {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: default;
}

.demo-ring svg { width: 22px; height: 22px; display: block; }

.demo-ring i {
  position: static;
  font-style: normal;
  font-size: 10.5px;
  font-weight: 600;
  color: #8B5A4A;
}

/* 导航可点态 */
.demo-navitem[data-mode] { cursor: pointer; }

/* ---------- 双页结构：Chat 页 / Agent 页 整页切换 ---------- */

.demo-page { display: flex; flex-direction: column; }
/* 四页演示窗等高（用户拍板：大小一致才和谐、纵向别太宽；各页内容超出各自滚动） */
.demo-page:not([hidden]) { height: 660px; }

.demo-page[hidden] { display: none; }

/* Agent 页布局：左会话列表 + 主区（照 agent-module） */
.demo-agent-layout { display: flex; min-height: 0; flex: 1; }

.demo-agent-side {
  flex: none;
  width: 170px;
  border-right: 1px solid #E8E0D5;
  background: #F6F1E7;
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.demo-newsession {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 600;
  color: #8B5A4A;
  background: #FFFEF9;
  border: 1px solid rgba(139, 90, 74, 0.35);
  border-radius: 8px;
  padding: 8px;
  cursor: default;
  transition: background 0.2s ease;
}

.demo-newsession:hover { background: rgba(139, 90, 74, 0.1); }

.demo-newsession svg { width: 11px; height: 11px; }

.demo-side-day { font-size: 11.5px; font-weight: 600; letter-spacing: 0.1em; color: #9A8B7A; padding: 6px 6px 2px; }

.demo-session { display: flex; align-items: center; gap: 9px; padding: 8px; border-radius: 8px; cursor: default; transition: background 0.2s ease; }

.demo-session:hover { background: rgba(139, 90, 74, 0.08); }

.demo-session.cur { background: rgba(139, 90, 74, 0.14); }

.demo-session-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: #8B5A4A; }

.demo-session-dot.d2 { background: #C4B5A4; }

.demo-session-txt { min-width: 0; display: flex; flex-direction: column; line-height: 1.35; }

.demo-session-txt b { font-size: 13px; font-weight: 600; color: #3D3229; }

.demo-session-txt i { font-style: normal; font-size: 11px; color: #9A8B7A; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.demo-agent-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

/* ---------- Home 预览页（照 welcome：概览/五维/最近成长） ---------- */

.demo-plain { padding: 26px 28px; }

.demo-ov-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }

.demo-ov-card {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #FFFEF9;
  border: 1px solid #E8E0D5;
  border-radius: 10px;
  padding: 12px 12px;
}

.demo-ov-card i { font-style: normal; font-size: 17px; }

.demo-ov-card b { display: block; font-size: 13px; color: #3D3229; }

.demo-ov-card span { display: block; font-size: 11px; color: #9A8B7A; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.demo-ov-card em { margin-left: auto; font-style: normal; font-size: 19px; font-weight: 700; color: #8B5A4A; font-variant-numeric: tabular-nums; }

.demo-sec-title { font-size: 13px; font-weight: 700; color: #3D3229; letter-spacing: 0.06em; margin: 20px 0 10px; }

.demo-attr { display: flex; align-items: center; gap: 12px; padding: 5px 0; }

.demo-attr > span { flex: none; width: 34px; font-size: 12.5px; color: #6B5E52; }

.demo-attr-bar { flex: 1; height: 9px; border-radius: 5px; background: #F0E9DC; overflow: hidden; }

.demo-attr-bar i {
  display: block;
  height: 100%;
  border-radius: 5px;
  background: linear-gradient(90deg, #8B5A4A, #C08A6E);
  width: 0;
  transition: width 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

.demo-page:not([hidden]) .demo-attr-bar i, .demo-attr-bar.grow i { width: var(--w); }

.demo-attr em { flex: none; font-style: normal; font-size: 11.5px; color: #9A8B7A; min-width: 34px; text-align: right; }

.demo-recent p {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  font-size: 13px;
  color: #6B5E52;
  padding: 7px 12px;
  background: #FBF7F0;
  border-radius: 8px;
  margin: 6px 0;
}

.demo-recent b { flex: none; color: #8B5A4A; font-weight: 600; }

/* ---------- Pet 预览页（照 pet-section 小剧场） ---------- */

.demo-pet { display: flex; height: 490px; }

.demo-pet-side {
  flex: none;
  width: 190px;
  border-right: 1px dashed #E0D5C2;
  padding: 20px 14px;
  display: flex;
  flex-direction: column;
}

.demo-pet-coins {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: #6B5E52;
  background: #FBF4E4;
  border: 1px solid #EADFC4;
  border-radius: 8px;
  padding: 6px 10px;
}

.demo-pet-coins svg { width: 13px; height: 13px; color: #C9A227; }

.demo-pet-coins b { font-size: 14px; color: #3D3229; font-variant-numeric: tabular-nums; }

.demo-pet-note { font-size: 11.5px; font-weight: 600; letter-spacing: 0.08em; color: #9A8B7A; margin: 14px 0 4px; }

.demo-pet-btns { display: flex; flex-direction: column; gap: 7px; margin-top: 14px; }

.demo-pet-act {
  font-size: 13px;
  font-family: var(--sans);
  color: #6B5E52;
  background: #FFFEF9;
  border: 1px solid #E8E0D5;
  border-radius: 8px;
  padding: 8px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.12s ease;
}

.demo-pet-act:hover { background: rgba(139, 90, 74, 0.12); color: #8B5A4A; border-color: rgba(139, 90, 74, 0.35); }

.demo-pet-act:active { transform: scale(0.95); }

.demo-pet-link { margin-top: auto; font-size: 11px; color: #B3A48F; text-align: center; }

.demo-pet-stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: radial-gradient(ellipse at 50% 62%, rgba(201, 162, 39, 0.1), transparent 62%);
}

.demo-pet-quote { font-size: 13.5px; color: #6B5E52; }

.demo-pet-avatar { position: relative; }

.demo-pet-avatar img {
  width: 118px;
  height: 118px;
  border-radius: 50%;
  border: 3px solid #F0E4CC;
  box-shadow: 0 10px 26px -10px rgba(61, 50, 41, 0.35);
  transition: transform 0.2s ease;
}

.demo-pet-avatar.hop img { animation: demo-hop 0.55s ease; }

@keyframes demo-hop {
  0% { transform: translateY(0); }
  35% { transform: translateY(-14px) scale(1.05); }
  65% { transform: translateY(0) scale(0.97); }
  100% { transform: translateY(0); }
}

.demo-pet-shadow {
  display: block;
  width: 86px;
  height: 12px;
  margin: 6px auto 0;
  border-radius: 50%;
  background: rgba(61, 50, 41, 0.14);
  filter: blur(2px);
}

.demo-pet-name { font-size: 14px; font-weight: 700; color: #3D3229; }

.demo-pet-name i { font-style: normal; font-size: 11.5px; font-weight: 600; color: #C9A227; margin-left: 4px; }

.demo-pet-gacha {
  flex: none;
  width: 150px;
  border-left: 1px dashed #E0D5C2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 10px;
}

.demo-gacha-dome {
  width: 74px;
  height: 58px;
  border-radius: 37px 37px 8px 8px;
  background: rgba(201, 162, 39, 0.16);
  border: 2px solid #E4CE8F;
  position: relative;
}

.demo-gacha-dome::after {
  content: "";
  position: absolute;
  top: 12px; left: 14px;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.75);
}

.demo-gacha-body {
  width: 60px;
  height: 34px;
  border-radius: 6px 6px 12px 12px;
  background: #F0E4CC;
  border: 2px solid #E0D2B4;
  margin-top: -2px;
}

.demo-gacha-btn {
  font-size: 12px;
  line-height: 1.5;
  font-family: var(--sans);
  font-weight: 600;
  color: #fff;
  background: #8B5A4A;
  border: none;
  border-radius: 8px;
  padding: 8px 10px;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.12s ease;
}

.demo-gacha-btn:hover { background: #9C6B58; }

.demo-gacha-btn:active { transform: scale(0.94); }

.demo-gacha-note { font-size: 10.5px; color: #B3A48F; text-align: center; }

.demo-chips {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 24px;
}

.demo-chip {
  font-size: 14.5px;
  font-family: var(--sans);
  color: var(--ink-2);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 9px 22px;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.demo-chip:hover { color: var(--amber-deep); border-color: rgba(180, 95, 31, 0.45); }

.demo-chip.cur {
  color: #fff;
  background: var(--amber);
  border-color: var(--amber);
}

/* ---------- 通用板块 ---------- */

.section {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 104px var(--gutter);
}

.section-alt {
  max-width: none;
  background: var(--bg-alt);
}

.section-alt > * {
  max-width: var(--wide);
  margin-left: auto;
  margin-right: auto;
}

.section-head { margin-bottom: 64px; }

.section-head h2 {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(28px, 3.6vw, 40px);
  line-height: 1.3;
  margin-bottom: 12px;
}

.section-head p { color: var(--ink-2); font-size: 17px; }

/* ---------- 三件事 ---------- */

.feature {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
  padding: 56px 0;
  border-top: 1px solid var(--line);
}

.feature:last-of-type { border-bottom: 1px solid var(--line); }

.feature-flip .feature-text { order: 2; }

.feature-kicker {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--amber);
  margin-bottom: 14px;
}

.feature-text h3 {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(24px, 2.8vw, 32px);
  line-height: 1.35;
  margin-bottom: 16px;
}

.feature-text p:last-child { color: var(--ink-2); }

.feature-shot {
  border-radius: var(--radius);
  border: 1px solid var(--line);
  overflow: hidden;
  box-shadow: 0 16px 40px -16px rgba(33, 27, 20, 0.18);
}

/* ---------- 界面一览 ---------- */

.shot-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.shot {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  padding: 0;
  background: var(--card);
  cursor: zoom-in;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.shot:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 32px -12px rgba(33, 27, 20, 0.22);
}

.shot img { width: 100%; }

/* ---------- 下载 ---------- */

.dl-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.dl-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 28px 26px 24px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-decoration: none;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.dl-card:hover {
  transform: translateY(-4px);
  border-color: #d6c9ae;
  box-shadow: 0 14px 32px -12px rgba(33, 27, 20, 0.18);
}

.dl-card.recommended { border-color: rgba(180, 95, 31, 0.55); }

.dl-rec {
  display: none;
  position: absolute;
  top: -11px;
  right: 16px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: #fff;
  background: var(--amber);
  padding: 3px 12px;
  border-radius: 999px;
}

.dl-card.recommended .dl-rec { display: inline-block; }

.dl-name { font-family: var(--serif); font-weight: 700; font-size: 19px; }

.dl-desc { font-size: 14px; color: var(--ink-2); margin-bottom: 16px; }

.dl-btn {
  margin-top: auto;
  align-self: flex-start;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  background: var(--ink);
  padding: 9px 20px;
  border-radius: 999px;
  transition: background 0.2s ease;
}

.dl-card:hover .dl-btn { background: #3a3128; }

/* 手机版行：两张卡窄于桌面三卡行，居中对齐 */
.dl-grid-mobile {
  grid-template-columns: repeat(2, 1fr);
  max-width: calc(200% / 3);
  margin: 20px auto 0;
}

/* iOS 准备中占位卡：不可点、整体灰化、角标常显 */
.dl-card-soon { cursor: default; }
.dl-card-soon:hover { transform: none; box-shadow: none; border-color: var(--line); }
.dl-rec-soon { display: inline-block; background: #a89d8c; }
.dl-btn-soon { background: #a89d8c; cursor: default; }
.dl-card-soon:hover .dl-btn-soon { background: #a89d8c; }

.dl-tip {
  margin-top: 28px;
  font-size: 14px;
  color: var(--ink-2);
  text-align: center;
}

.dl-tip a { color: var(--amber); }

/* 手机访问：发链接去电脑 */
.dl-send {
  margin-top: 24px;
  padding: 22px 24px;
  text-align: center;
  background: var(--card);
  border: 1px dashed rgba(180, 95, 31, 0.4);
  border-radius: var(--radius);
}

.dl-send p {
  font-size: 14px;
  color: var(--ink-2);
  margin-bottom: 14px;
}

.dl-send .btn-primary { font-size: 14px; padding: 10px 24px; border: none; cursor: pointer; font-family: var(--sans); }

/* ---------- 常见问答 ---------- */

.faq-list { border-top: 1px solid var(--line); }

.faq-item { border-bottom: 1px solid var(--line); }

.faq-item summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 4px;
  font-size: 17px;
  font-weight: 600;
  transition: color 0.2s ease;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
  content: "";
  flex: none;
  width: 11px;
  height: 11px;
  border-right: 2px solid var(--ink-2);
  border-bottom: 2px solid var(--ink-2);
  transform: rotate(45deg);
  transition: transform 0.25s ease;
  margin-right: 3px;
}

.faq-item[open] summary::after { transform: rotate(225deg); }

.faq-item summary:hover { color: var(--amber-deep); }

.faq-body { padding: 0 4px 24px; color: var(--ink-2); max-width: 720px; }

/* ---------- 页脚 ---------- */

.footer { background: var(--ink); color: #efe8db; }

.footer-inner {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 72px var(--gutter) 56px;
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 48px;
}

.footer-slogan {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 22px;
  margin-bottom: 8px;
}

.footer-sub { color: rgba(239, 232, 219, 0.55); font-size: 14px; }

.footer-col h4 {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: rgba(239, 232, 219, 0.45);
  margin-bottom: 16px;
}

.footer-col a {
  display: block;
  font-size: 15px;
  color: rgba(239, 232, 219, 0.85);
  text-decoration: none;
  padding: 4px 0;
  transition: color 0.2s ease;
}

.footer-col a:hover { color: #fff; }

.footer-note { font-size: 13px; color: rgba(239, 232, 219, 0.4); margin-top: 4px; }

.footer-line { border-top: 1px solid rgba(239, 232, 219, 0.14); }

.footer-line p {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 22px var(--gutter);
  font-size: 13px;
  color: rgba(239, 232, 219, 0.45);
}

.footer-line p a { color: rgba(239, 232, 219, 0.7); text-decoration: none; }

.footer-line p a:hover { color: #fff; }

/* ---------- 图片放大 ---------- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(23, 18, 12, 0.88);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  cursor: zoom-out;
  padding: 32px;
}

.lightbox[hidden] { display: none; }

.lightbox-box { max-width: min(1200px, 92vw); text-align: center; }

.lightbox-box img {
  max-width: 100%;
  max-height: 82vh;
  border-radius: 10px;
  margin: 0 auto;
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.6);
}

.lightbox-box figcaption { margin-top: 16px; font-size: 14px; color: rgba(255, 255, 255, 0.6); }

/* ---------- 进场动画（JS 在场才启用，noscript 全可见） ---------- */

.js-io .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.js-io .reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js-io .reveal { opacity: 1; transform: none; transition: none; }
  .shot:hover, .dl-card:hover { transform: none; }
}

/* ---------- 响应式 ---------- */

@media (max-width: 900px) {
  .nav-inner { gap: 16px; }
  .nav-links { display: none; }
  .nav-cta { margin-left: auto; }
  .nav-stats { margin-left: -12px; font-size: 11px; }
  .nav-stats b { font-size: 13px; }
  .feature { grid-template-columns: 1fr; gap: 28px; padding: 44px 0; }
  .feature-flip .feature-text { order: 0; }
  .dl-grid { grid-template-columns: 1fr; max-width: 420px; margin: 0 auto; }
  .dl-grid-mobile { margin: 20px auto 0; }
  .footer-inner { grid-template-columns: 1fr; gap: 36px; padding-top: 56px; }
}

/* 手机/平板：演示窗改为「桌面布局整体缩影」——固定设计宽 1048px（桌面实测渲染宽），
   整窗等比缩放到容器宽。文字全部按桌面布局渲染，杜绝挤压换行。
   scale 精确值与容器占位高度由 site.js 计算，这里只给结构与兜底。 */
@media (max-width: 900px) {
  .hero-demo { position: relative; min-height: 200px; } /* 兜底防 JS 未跑时塌陷；真实高由 JS 设定（手机约 233px+） */
  .hero-demo > .demo-window {
    position: absolute;
    top: 0;
    left: 0;
    width: 1048px;
    max-width: none;
    transform: scale(0.4); /* 兜底，JS 未跑到时也保持缩影观感 */
    transform-origin: top left;
  }
}

/* 手机/平板端演示窗走整窗缩影，不再单独缩字号/藏按钮（旧挤压式适配全数撤销） */
@media (max-width: 640px) {
  body { font-size: 16px; }
  .hero { padding-top: 118px; padding-bottom: 64px; }
  .hero-sub .br-wide { display: none; }
  .hero-actions { margin-bottom: 48px; gap: 16px; }
  .section { padding: 72px var(--gutter); }
  .section-head { margin-bottom: 44px; }
  .shot-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }

  /* 顶部导航防换行：360px 窄屏上「知夏工作台 + 访客/下载数 + 免费下载」整行收紧；
     品牌/按钮本体已 nowrap（见顶部），这里把统计同步变小一档，保证一行放得下 */
  .nav-inner { gap: 8px; }
  .nav-brand { font-size: 19px; }
  .nav-brand em { font-size: 11px; }
  .nav-stats { margin-left: 0; font-size: 9.5px; }
  .nav-stats b { font-size: 11.5px; padding: 0; }
  .nav-cta { font-size: 13px; padding: 7px 13px; }
}

/* ============================================================
   Home / Pet 演示页 · 应用原版还原适配层
   （结构/样式来自 app/css/{lifesim,pet,zhixia-avatar}.css 原样拷贝，
    这里只做三件事：补齐应用全局变量垫片、demo 窗尺寸适配、弹窗外壳）
   ============================================================ */

/* ① 应用变量垫片：照应用 css/style.css :root 原值，限定在演示窗内不外溢 */
.demo-window {
  --color-primary: #8B5A4A;
  --color-primary-dark: #6B4538;
  --color-primary-light: #A67C6B;
  --color-primary-alpha: rgba(139, 90, 74, 0.12);
  --color-success: #5B7A5B;
  --color-success-alpha: rgba(91, 122, 91, 0.12);
  --color-warning: #C4883A;
  --color-warning-alpha: rgba(196, 136, 58, 0.12);
  --color-danger: #A65454;
  --color-danger-alpha: rgba(166, 84, 84, 0.12);
  --color-accent: #C9A227;
  --color-accent-light: #E8D48A;
  --color-accent-alpha: rgba(201, 162, 39, 0.16);
  --color-bg: #FFFEF9;
  --color-surface: #FFFEF9;
  --color-surface-elevated: #FFFFF8;
  --color-border: #E8E0D5;
  --color-border-strong: #D4C4B0;
  --color-text: #3D3229;
  --color-text-secondary: #6B5E52;
  --color-text-muted: #9A8B7A;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;
  --shadow-sm: 0 1px 3px rgba(61, 50, 41, 0.06);
  --shadow-md: 0 4px 12px rgba(61, 50, 41, 0.08);
  --shadow-lg: 0 8px 24px rgba(61, 50, 41, 0.12);
  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px;
  --space-5: 20px; --space-6: 24px; --space-8: 32px; --space-10: 40px; --space-12: 48px;
  --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  --z-modal: 99999;
  --font-serif: "Noto Serif SC", "Songti SC", "STSong", serif;
  color: var(--color-text);
}

/* ② Home 页两栏布局（照应用：窄子侧栏 + 主内容区，主区可滚） */
.demo-home {
  display: flex;
  gap: 14px;
  height: 100%;
  min-height: 0;
  padding: 14px;
  background: var(--gradient-app-bg, linear-gradient(165deg, #FFFEF9 0%, #F0EBE3 50%, #E8E0D5 100%));
}
.demo-home-side > * { flex-shrink: 0; }  /* 内容超高走滚动，不许压扁圆环卡 */
.demo-home-side {
  flex: 0 0 236px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 12px 10px;
  background: var(--color-surface-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow-y: auto;
}
/* 天气卡：demo 窄栏适配（应用子侧栏更宽；这里收字号保证一行横排不截字） */
.demo-home-side #weather-widget { font-size: 12px; padding: 10px 12px; display: block !important; gap: 6px; }
.demo-home-side #weather-widget > div:nth-child(1),
.demo-home-side #weather-widget > div:nth-child(2) { display: flex; justify-content: space-between; align-items: center; }
.demo-home-side #weather-widget #weather-temp { font-size: 24px; }
.demo-home-side #weather-widget #weather-forecast { display: flex; flex-direction: column; gap: 3px; width: auto; font-size: 10.5px; }
/* 实时读数（照应用天气详情弹窗 01 实时读数字段：湿度/风速/风向/云量/气压/能见度/日出/日落） */
.demo-home-side .wx-mini-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px 10px;
  width: 100%;
  font-size: 10.5px;
  color: var(--color-text-secondary);
}
.demo-home-side .wx-mini-grid span {
  display: grid;
  grid-template-columns: auto 1fr;
  justify-content: start;
  gap: 6px;
  white-space: nowrap;
}
.demo-home-side .wx-mini-grid i { font-style: normal; color: var(--color-text-muted); }
.demo-home-side .wx-mini-grid b { font-weight: 600; color: var(--color-text-secondary); text-align: right; }
.demo-home-side #weather-forecast span {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: baseline;
  width: 100%;
  white-space: nowrap;
}
.demo-home-side #weather-forecast i { font-style: normal; }
.demo-home-side #weather-forecast b { font-weight: 600; }
.demo-home-side .sub-panel-title-home {
  font-size: 15px;
  font-weight: 700;
  color: var(--color-text);
  padding: 2px 4px;
}
.demo-home-main {
  flex: 1 1 auto;
  min-width: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
/* 成长力卡/概览卡等应用组件在 demo 窗里的间距收束（等高窗口下把空间让给成长记录） */
.demo-home-main { gap: 10px; }
.demo-home-main .wc-overview { margin: 0; }
.demo-home .wc-section-title { font-size: 14px; }
.demo-home-main .wc-profile-card { padding: 8px 12px; }
.demo-home-main .wc-overview-card { padding: 8px 12px; }
.demo-home-main .wc-ov-comment { font-size: 10.5px; }
.demo-home-main .wc-ov-hint { font-size: 10.5px; }
.demo-home-main .ls-attrs-grid { gap: 8px; }
.demo-home-main .ls-attr-cell { padding: 8px 10px; }
.demo-home-main .ls-attrs-section { margin: 0; }
/* 成长记录区吃满剩余高度：条目紧凑化后 10 条两列全显，整页零滚动 */
.demo-home-main .ls-home-row { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; margin: 0; }
.demo-home-main .ls-logs-section { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; margin-top: 0; }
.demo-home-main .ls-logs-section .ls-log-list { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding-right: 4px; align-content: start; gap: 2px; grid-auto-flow: row; grid-template-rows: auto; }
.demo-home-main .ls-logs-section .ls-log-item { padding: 3px 8px; gap: 8px; line-height: 1.5; font-size: 11.5px; }
.demo-home-main .ls-logs-section .ls-log-time { font-size: 10.5px; }
/* 成长记录标签/徽章永不换行（用户原则：能不换行就不换行；字号微缩单行放完），
   来源标签允许在标签前折行让位（attrs 整体作为一个不可分单元） */
.demo-home-main .ls-log-item { flex-wrap: wrap; row-gap: 2px; }
.demo-home-main .ls-log-attrs { display: inline-flex; flex-wrap: nowrap; white-space: nowrap; }
.demo-home-main .ls-log-attr { white-space: nowrap; font-size: 10.5px; }
.demo-home-main .ls-log-bonus { white-space: nowrap; font-size: 10px; }
.demo-home-main .ls-log-source { white-space: nowrap; }
.demo-home-main .ls-log-time { white-space: nowrap; }
/* 签到按钮（照应用 css/calendar.css .mood-checkin-btn 原值） */
.demo-home-main .mood-checkin-btn {
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text-secondary);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-1) var(--space-3);
  cursor: pointer;
  transition: background var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast);
  line-height: 1.6;
  align-self: center;
}
.demo-home-main .mood-checkin-btn:hover {
  color: var(--color-accent);
  border-color: var(--color-accent);
  background: var(--color-bg);
}

/* ③ Pet 页在 demo 窗的尺寸适配（应用里是全屏 vh 布局，这里收成容器高） */
#demoPagePet { background: #FFF5E9; }
#demoPagePet #pet-section {
  min-height: 0;
  height: 100%;
  padding: 10px;
}
#demoPagePet .pet-page-theater {
  min-height: 0;
  max-width: none;
  border-radius: var(--pet-radius-doodle);
  flex: 1 1 auto;
  min-height: 0;
}
#demoPagePet .pet-page-stage {
  min-height: 0;
  padding: 8px 0 8px;
}
#demoPagePet .pet-page-glow {
  width: 400px;
  height: 280px;
}
#demoPagePet .pet-page-quote { font-size: 16px; }
#demoPagePet .pet-page-quote-sub { font-size: 11px; margin-bottom: 8px; }
#demoPagePet .pet-page-avatar-stage {
  width: 250px;
  height: 250px;
}
#demoPagePet .pet-gacha-slot {
  flex: 0 0 206px;
  padding: 12px 10px;
  gap: 6px;
  margin: 4px 0;
}
#demoPagePet .pet-gacha-machine { height: 200px; }
#demoPagePet .pet-status-slot { flex-basis: 150px; }
#demoPagePet .pet-page-body { gap: 10px; padding: 0 10px; }
#demoPagePet .pet-page-head { padding: 6px 16px 2px; }
/* 扭蛋结果字（掉蛋裂开后浮出的配方名，楷体贴纸感与整机同调） */
.pet-gacha-result {
  font-family: "Kaiti SC", "Kaiti", "楷体", serif;
  font-size: 13px;
  font-weight: 700;
  color: var(--pet-ink, #4B3A2F);
  text-align: center;
  letter-spacing: 1px;
  background: var(--pet-cream, #FFF8EC);
  border: 2px solid var(--pet-ink, #4B3A2F);
  border-radius: var(--pet-radius-doodle2, 12px);
  box-shadow: 2px 2px 0 rgba(75, 58, 47, 0.14);
  padding: 8px 10px;
  transform: rotate(-2deg);
}
/* 工具下拉抽屉（照应用 base.css .nav-drawer 原值：demo navbar 下弹出版） */
.demo-navbar { position: relative; }
.demo-nav-drawer {
  position: absolute;
  top: calc(100% + 6px);
  left: 10px;
  width: 196px;
  background: var(--color-surface, #FFFEF9);
  border: 1px solid var(--color-border-strong, #D4C4B0);
  border-radius: var(--radius-md, 10px);
  box-shadow: 0 12px 32px rgba(61, 50, 41, 0.14), 0 2px 6px rgba(61, 50, 41, 0.06);
  z-index: 60;
  padding: 8px;
  opacity: 0;
  visibility: hidden;
  transform: scale(0.95) translateY(-4px);
  transform-origin: top left;
  transition: opacity 0.18s ease, transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1), visibility 0s linear 0.28s;
  text-align: left;
}
.demo-nav-drawer.show {
  opacity: 1;
  visibility: visible;
  transform: scale(1) translateY(0);
  transition: opacity 0.2s ease, transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), visibility 0s linear 0s;
}
.demo-drawer-title {
  font-size: 11px;
  color: var(--color-text-muted, #9A8B7A);
  letter-spacing: 0.1em;
  padding: 6px 10px 8px;
}
.demo-drawer-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 6px;
  cursor: pointer;
  color: var(--color-text-secondary, #6B5E52);
  font-size: 13px;
  transition: background 0.2s, color 0.2s;
  white-space: nowrap;
}
.demo-drawer-item:hover {
  background: rgba(139, 90, 74, 0.12);
  color: var(--color-primary, #8B5A4A);
}
.demo-drawer-item.active {
  background: rgba(139, 90, 74, 0.12);
  color: var(--color-primary, #8B5A4A);
  font-weight: 600;
}
.demo-drawer-kbd {
  margin-left: auto;
  font-size: 10px;
  color: var(--color-text-muted, #9A8B7A);
}
.demo-drawer-item.active::after { content: '✓'; margin-left: 6px; font-size: 11px; }
.demo-drawer-divider { height: 1px; background: var(--color-border, #E8E0D5); margin: 6px 8px; }
.demo-toolmenu { cursor: pointer; user-select: none; }
.demo-toolmenu:hover { color: var(--color-primary, #8B5A4A); }
.demo-toolmenu.open { color: var(--color-primary, #8B5A4A); }
/* Chat 页两栏（照应用：左侧知夏子面板快捷指令 + 右侧聊天主区） */
.demo-chat-layout { display: flex; height: 100%; min-height: 0; }
.demo-ai-side {
  flex: 0 0 158px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 10px;
  border-right: 1px solid #E8E0D5;
  background: #FFFDF6;
  overflow-y: auto;
}
.demo-ai-side .sub-action-btn {
  display: block;
  width: 100%;
  padding: 8px 10px;
  background: transparent;
  border: 1px solid #E8E0D5;
  border-radius: 6px;
  color: #6B5E52;
  font-size: 12px;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.demo-ai-side .sub-action-btn:hover {
  background: rgba(139, 90, 74, 0.12);
  border-color: #A67C6B;
  color: #8B5A4A;
}
.demo-chat-mainwrap { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; min-height: 0; }
/* 台词打字光标（照应用 ai.css 的 welcome-cursor-blink，pet.css 引用了但官网无 ai.css） */
@keyframes welcome-cursor-blink { 50% { opacity: 0; } }

/* ④ 图鉴弹窗外壳（.modal 基础样式在应用 calendar.css，官网未引入——按原值补齐） */
#pet-dex-modal.modal {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal, 99999);
  background: rgba(61, 50, 41, 0.4);
  backdrop-filter: blur(4px);
  overscroll-behavior: contain;
  border: none;
  padding: 0;
  width: 100%;
  max-width: none;
  max-height: none;
  overflow: visible;
  align-items: center;
  justify-content: center;
}
#pet-dex-modal .modal-content {
  background: var(--color-surface-elevated, #FFFFF8);
  border: 1px solid var(--color-border, #E8E0D5);
  border-radius: var(--radius-lg, 16px);
  box-shadow: var(--shadow-lg);
  position: relative;
}
#pet-dex-modal .sticky-detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 0;
}
#pet-dex-modal .sticky-detail-header h3 { margin: 0; font-size: 18px; color: var(--color-text, #3D3229); }
#pet-dex-modal .sticky-detail-close {
  width: 32px; height: 32px; border-radius: 50%;
  border: 1px solid var(--color-border, #E8E0D5);
  background: var(--color-bg, #FFFEF9);
  cursor: pointer; font-size: 18px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  color: var(--color-text, #3D3229);
}
#pet-dex-modal .sticky-detail-close:hover { background: var(--color-border-strong, #D4C4B0); }

/* 手机端演示窗走「整窗缩影」（见上方 ≤900px 块），窗内一律保持桌面布局，
   旧的 Home 单栏 / Pet 竖排挤压式适配已整体撤销。 */

/* ⑦ 缩影档媒体查询中和层：app/ 目录是应用仓库原样拷贝，自带 @media (max-width:768/1100px)
   手机适配——媒体查询看的是浏览器视口而非演示窗实际宽度，窄屏访问官网时会把窗内本应按
   1048px 桌面布局渲染的内容误改成竖排/隐藏/换行。此层在同样的窄视口下逐条恢复桌面原值
   （值取自各媒体块在 app css 里对应的非媒体规则；同步升级 app/ 后需复核此层）。 */
@media (max-width: 900px) {
  /* welcome.css:801 —— 档案卡统计三格不被隐藏 */
  #heroDemo .wc-profile-stats { display: flex; }

  /* lifesim.css:472/886 —— 五维保持一排五格、成长记录标签徽章不换行 */
  #heroDemo .ls-attrs-grid { grid-template-columns: repeat(5, 1fr); }
  #heroDemo .ls-logs-section .ls-log-item { flex-wrap: nowrap; }
  #heroDemo .ls-logs-section .ls-log-bonus { margin-left: auto; width: auto; margin-top: 0; text-align: left; }

  /* pet.css:1109 —— Pet 页各元素保持桌面尺寸（min-height/gap 为桌面 1440×900 的 clamp 渲染值；
     .pet-page-bars 的 gap/max-width 无需中和：pet.css:1656 后置规则 0-2-0 已压过媒体块） */
  #heroDemo .pet-page-head-brief { font-size: 10.5px; letter-spacing: 2px; }
  #heroDemo .pet-page-main-row { padding: 0 30px; min-height: 378px; gap: 120px; }
  #heroDemo .pet-stage-btn { width: 32px; height: 32px; min-width: 32px; padding: 0; } /* 真值 32px：pet.css:1672 后置规则压过 895 行的 34px */
  #heroDemo .pet-stage-btn-icon { width: 18px; height: 18px; }
  #heroDemo .pet-stage-btn svg { width: 16px; height: 16px; } /* 真值 16px：pet.css:1685「八颗统一」后置规则 */
  #heroDemo .pet-page-zhixia-shadow { width: 198px; height: 21.6px; margin-top: -10px; }
  #heroDemo .pet-snack-item-name { font-size: 10.5px; }
  #heroDemo .pet-snack-item-val { font-size: 9px; }
  #heroDemo .pet-info-icons { gap: 8px; padding-right: 14px; }
  #heroDemo .pet-stage-btns { gap: 10px; }
  #heroDemo .pet-head-icon { width: 32px; height: 32px; } /* 真值 32px：pet.css:1686 */
  #heroDemo .pet-head-icon svg { width: 16px; height: 16px; } /* 真值 16px：pet.css:1687 */
  #heroDemo .pet-head-icon-tip { font-size: 13.3333px; padding: 8px 10px; }

  /* pet.css:1393 —— Pet 三栏保持桌面横排（不竖排、不拉全宽） */
  #heroDemo .pet-page-body { flex-direction: row; flex: 1 1 auto; }
  #heroDemo .pet-page-left { order: 0; }
  #heroDemo .pet-gacha-slot { order: 0; flex-direction: column; transform: none; }
  #heroDemo .pet-status-slot {
    order: 0; width: auto; gap: 14px; padding: 14px 12px; transform: rotate(-0.8deg);
  }
  #heroDemo .pet-status-slot,
  #heroDemo .pet-gacha-slot { align-self: center; }

  /* pet.css:1606/1973/2265 —— 名牌/扭蛋机/蛋/图鉴格/快捷工具组桌面值 */
  #heroDemo .pet-nameplate { font-size: 13px; letter-spacing: 2px; }
  #heroDemo .pet-gacha-machine { width: min(100%, 210px); flex: 1 1 auto; }
  #heroDemo .pet-gacha-egg { width: 54px; height: 62px; }
  #heroDemo .pet-dex-cell { min-width: 74px; min-height: 52px; font-size: 12px; }
  #heroDemo .pet-corner-tools { gap: 8px; }
}

