/*
 * 心屿 · 视觉样式（静态 H5 版）
 * 移植自 UI 移交包 globals.css，**严格保留原版冷绿基底**（主公 2026-08-10 明确偏好原版淡绿，不要按规范文档擅自调暖）。
 * 命名与 React 移交包保持一致，class 名直接复用，确保视觉 1:1 还原。
 */

:root {
  --warm-cream: #f4f6f5;      /* 原版冷绿白，主公偏好 */
  --paper: #fbfcfb;           /* 原版冷纸白 */
  --wood: #c9b59b;
  --wood-deep: #8d7258;
  --sand: #e8dfd2;
  --fog-blue: #a9c0c9;
  --fog-light: #e3ecee;
  --moss: #9cae8e;
  --dawn-orange: #e0a672;
  --ink: #3a3a38;
  --ink-soft: #6b6760;
  --line: #ddd3c5;
  --danger: #c25b5b;
  --shadow: 0 20px 55px rgba(74, 59, 42, .12);
}

* { box-sizing: border-box; }
html { background: #dce4e5; }
body { margin: 0; color: var(--ink); background: #dce4e5; font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif; }
button, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
button, a { transition: transform 160ms ease, opacity 160ms ease, background-color 240ms ease, border-color 240ms ease; }
button:active, a:active { transform: scale(.975); }
button:focus-visible, a:focus-visible, textarea:focus-visible { outline: 2px solid #6f969a; outline-offset: 2px; }

.app-ambient { min-height: 100dvh; display: grid; place-items: center; background: radial-gradient(circle at 50% 0%, #eef3f3 0, #dce4e5 72%); }
.phone-shell { width: min(100%, 480px); min-height: 100dvh; position: relative; overflow: hidden; background: var(--warm-cream); }
.companion-shell { height: 100dvh; display: flex; flex-direction: column; }

/* Companion */
.presence-stage { height: clamp(258px, 34dvh, 306px); min-height: 258px; position: relative; flex: 0 0 auto; overflow: hidden; color: var(--ink); background: linear-gradient(145deg, #eef4f3 0%, #e5edef 48%, #f5eee5 100%); border-bottom: 1px solid rgba(137,161,165,.2); }
.mist-orb { position: absolute; border-radius: 50%; filter: blur(2px); pointer-events: none; }
.mist-orb-one { width: 220px; height: 220px; right: -70px; top: -84px; background: radial-gradient(circle at 35% 35%, rgba(255,255,255,.9), rgba(169,192,201,.24) 58%, transparent 72%); }
.mist-orb-two { width: 170px; height: 170px; left: -70px; bottom: -90px; background: radial-gradient(circle, rgba(224,166,114,.17), transparent 68%); }
.brand-line { height: 64px; position: relative; z-index: 3; display: flex; align-items: center; gap: 10px; padding: env(safe-area-inset-top, 0) 17px 0; }
.island-mark { width: 34px; height: 34px; flex: 0 0 auto; display: grid; place-items: center; border: 1px solid rgba(104,137,143,.28); border-radius: 12px; color: #58777c; background: rgba(255,255,255,.6); font-family: "Songti SC", "STSong", serif; font-size: 16px; box-shadow: 0 6px 18px rgba(76,104,108,.08); }
.brand-line div { display: flex; flex-direction: column; gap: 2px; }
.brand-line strong { font-family: "Songti SC", "STSong", serif; font-size: 18px; letter-spacing: .08em; }
.brand-line small { color: #7c8988; font-size: 10px; }
.brand-line button { margin-left: auto; padding: 9px; border: 0; color: #80908f; background: transparent; letter-spacing: 0; font-size: 18px; line-height: 1; }
.more-btn { width: 32px; height: 32px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; padding: 0; margin-left: auto; border: 0; background: transparent; }
.more-btn i { width: 4px; height: 4px; border-radius: 50%; background: #7a8c8a; }
.welcome-copy { position: relative; z-index: 2; margin: 16px 16px 0 176px; max-width: 200px; }
.welcome-copy > span { color: #71888a; font-size: 10px; letter-spacing: .12em; }
.welcome-copy h1 { margin: 7px 0 8px; font-family: "Songti SC", "STSong", serif; color: #364b4d; font-size: clamp(23px, 6vw, 29px); font-weight: 500; line-height: 1.28; letter-spacing: .04em; }
.welcome-copy p { max-width: 230px; margin: 0; color: #788381; font-size: 10px; line-height: 1.6; }
.companion-card { position: absolute; z-index: 3; left: 14px; top: 66px; right: auto; bottom: auto; display: flex; flex-direction: column; align-items: center; gap: 9px; }
.companion-avatar { width: 140px; height: 140px; overflow: hidden; border: 4px solid rgba(255,255,255,.88); border-radius: 36px; background: #d9e3e3; box-shadow: 0 16px 38px rgba(61,89,91,.18); }
.companion-avatar img { width: 100%; height: 100%; display: block; object-fit: cover; object-position: 50% 30%; filter: saturate(.82) contrast(.97); transform: scale(1.02); transform-origin: center; }
.companion-meta { display: flex; flex-direction: column; align-items: center; }
.companion-meta strong { margin-top: 6px; color: #4b5f60; font-size: 13px; font-weight: 600; letter-spacing: .02em; }
.companion-meta small { margin-top: 2px; color: #8c9998; font-size: 10px; letter-spacing: .03em; }
.presence-status { display: inline-flex; align-items: center; gap: 6px; padding: 4px 7px; border: 1px solid rgba(127,157,157,.22); border-radius: 999px; color: #698180; background: rgba(255,255,255,.72); font-size: 8px; }
.presence-status i { width: 5px; height: 5px; border-radius: 50%; background: #c9d7bf; box-shadow: 0 0 0 4px rgba(201,215,191,.12); }
.presence-status.on i { background: #7fae6f; box-shadow: 0 0 0 4px rgba(127,174,111,.18); }

.chat-area { flex: 1; min-height: 0; overflow-y: auto; padding: 15px 16px 12px; background: linear-gradient(180deg, #f8faf9, var(--warm-cream)); scrollbar-width: thin; scrollbar-color: var(--line) transparent; overscroll-behavior: contain; }
.today-line { display: flex; align-items: center; gap: 10px; margin: 2px 0 15px; color: #999186; font-size: 10px; }
.today-line::before, .today-line::after { content: ""; flex: 1; height: 1px; background: var(--line); opacity: .8; }
.chat-row { display: flex; align-items: flex-end; gap: 7px; margin-bottom: 13px; animation: riseIn 700ms ease-out; }
.chat-row.me { justify-content: flex-end; }
.chat-row > div { max-width: 79%; }
.chat-row p { margin: 0; padding: 10px 13px; border: 1px solid #dce3e1; border-radius: 16px 16px 16px 4px; color: #494f4e; background: rgba(255,255,255,.92); box-shadow: 0 4px 14px rgba(60,87,88,.04); font-size: 14px; line-height: 1.68; }
.chat-row.me p { border-color: #cbdadd; border-radius: 16px 16px 4px 16px; background: var(--fog-light); }
.chat-row time { display: block; margin-top: 4px; color: #a09a90; font-size: 8px; }
.chat-row.me time { text-align: right; }
.tiny-avatar { width: 27px; height: 27px; flex: 0 0 auto; overflow: hidden; border: 2px solid #fff; border-radius: 50%; background: var(--sand); box-shadow: 0 3px 9px rgba(84,65,45,.12); }
.tiny-avatar img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 32%; transform: scale(1.02); transform-origin: center; }
.listening-state { width: fit-content; margin: 2px 0 12px 34px; display: flex; align-items: center; gap: 8px; color: #888176; font-size: 11px; }
.listening-state span { display: flex; gap: 3px; }
.listening-state i { width: 5px; height: 5px; border-radius: 50%; background: var(--wood); animation: quietDot 1.5s ease-in-out infinite; }
.listening-state i:nth-child(2) { animation-delay: .2s; }
.listening-state i:nth-child(3) { animation-delay: .4s; }
.reflection-chip { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: 10px 0 18px; padding: 13px 14px; border: 1px solid #ceddde; border-radius: 14px; color: #596e70; background: rgba(225,237,238,.62); text-align: left; font-family: "Songti SC", "STSong", serif; font-size: 12px; transition: opacity 380ms ease, transform 380ms ease, margin 380ms ease, padding 380ms ease; }
.reflection-chip.is-hidden { opacity: 0; transform: translateY(-4px); margin: 0; padding: 0; height: 0; border: 0; pointer-events: none; overflow: hidden; }
.reflection-chip span { flex: 0 0 auto; color: #69888c; font-family: inherit; font-size: 10px; }
.curiosity-chip { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 11px 13px; border: 1px solid #e3d7c4; border-radius: 13px; color: #6d5f4d; background: rgba(245,238,227,.78); text-align: left; font-family: "Songti SC", "STSong", serif; font-size: 12px; }
.curiosity-chip span { flex: 0 0 auto; color: #a07a4e; font-family: inherit; font-size: 10px; }

/* Composer：原版冷绿基底，输入胶囊由 composer-wrap 的 rgba 米色底承载，
   mic/send 用真实 inline SVG（不用 CSS 伪元素，避免粗画导致的视觉漂移）。 */
.composer-wrap { position: relative; flex: 0 0 auto; padding: 9px 14px 8px; border-top: 1px solid rgba(221,211,197,.82); background: rgba(251,248,242,.97); }
.composer { display: flex; align-items: center; gap: 8px; min-height: 42px; }
.composer textarea { flex: 1; min-height: 42px; max-height: 92px; resize: none; padding: 11px 12px; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: 13px; line-height: 1.55; }
.composer textarea::placeholder { color: #aaa297; }
.mic, .send { width: 40px; height: 40px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 13px; }
.mic { padding: 9px; border: 1px solid var(--line); background: var(--warm-cream); transition: transform 160ms ease, background 220ms ease, border-color 220ms ease, box-shadow 220ms ease; }
.mic svg { width: 100%; height: 100%; color: #82786d; }
.mic.recording { background: var(--danger); border-color: var(--danger); transform: scale(1.22); animation: recPulse 1.2s ease-out infinite; }
.mic.recording svg { color: #fff; }
@keyframes recPulse {
  0% { box-shadow: 0 0 0 0 rgba(194,91,91,.55), 0 6px 18px rgba(194,91,91,.45); }
  70% { box-shadow: 0 0 0 16px rgba(194,91,91,0), 0 6px 18px rgba(194,91,91,0); }
  100% { box-shadow: 0 0 0 0 rgba(194,91,91,0), 0 6px 18px rgba(194,91,91,0); }
}
.send { padding: 9px; border: 0; background: var(--wood-deep); transition: opacity 600ms, background 600ms; }
.send svg { width: 100%; height: 100%; color: #fff; }
.send:disabled { opacity: .35; cursor: default; }
.voice-subtabs { display: flex; gap: 6px; justify-content: center; margin: 2px 0 6px; }
.voice-subtabs button { border: 1px solid var(--line); background: transparent; color: #9a9186; font-size: 11px; padding: 3px 12px; border-radius: 999px; cursor: pointer; transition: all 220ms; }
.voice-subtabs button.active { background: rgba(61,89,91,.1); border-color: rgba(61,89,91,.4); color: #3d595b; font-weight: 700; }
.mic.listening { background: var(--accent, #6fa8a0); border-color: var(--accent, #6fa8a0); transform: scale(1.14); animation: listenPulse 1.6s ease-out infinite; }
.mic.listening svg { color: #fff; }
@keyframes listenPulse {
  0% { box-shadow: 0 0 0 0 rgba(111,168,160,.5), 0 6px 18px rgba(111,168,160,.4); }
  70% { box-shadow: 0 0 0 14px rgba(111,168,160,0), 0 6px 18px rgba(111,168,160,0); }
  100% { box-shadow: 0 0 0 0 rgba(111,168,160,0), 0 6px 18px rgba(111,168,160,0); }
}
.mic.busy { background: #d8d2c6; border-color: #d8d2c6; transform: scale(1.05); }
.mic.busy svg { color: #fff; }
/* 语音状态条：按住说话/自动对话/等待/出错 的醒目反馈 */
.rec-bar { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 0 0 8px; padding: 8px 14px; border-radius: 999px; background: rgba(194,91,91,.10); border: 1px solid rgba(194,91,91,.32); color: #a84a42; font-size: 12px; letter-spacing: .03em; animation: recBarIn 200ms ease-out; }
.rec-bar .rec-dot { width: 9px; height: 9px; border-radius: 50%; background: #c2544c; box-shadow: 0 0 0 0 rgba(194,84,76,.5); animation: recDotBlink 1s ease-in-out infinite; }
.rec-bar.listening { background: rgba(111,168,160,.10); border-color: rgba(111,168,160,.34); color: #4e8078; }
.rec-bar.listening .rec-dot { background: #6fa8a0; }
.rec-bar.busy { background: rgba(136,129,118,.08); border-color: rgba(136,129,118,.28); color: #6f6a5d; }
.rec-bar.busy .rec-dot { background: #b3aa97; animation: none; }
.rec-bar.error { background: rgba(194,91,91,.14); border-color: rgba(194,91,91,.45); color: #a04038; }
.rec-bar.error .rec-dot { animation: none; opacity: .85; }
@keyframes recBarIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
@keyframes recDotBlink { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: .4; transform: scale(.78); } }
.composer-wrap > p { margin: 4px 0 0; color: #aaa298; font-size: 8px; text-align: center; }
.soft-toast { position: absolute; left: 50%; bottom: calc(100% + 6px); z-index: 6; transform: translateX(-50%); padding: 7px 12px; border: 1px solid var(--line); border-radius: 999px; color: #766d63; background: rgba(251,248,242,.96); box-shadow: 0 8px 24px rgba(65,49,34,.12); font-size: 10px; white-space: nowrap; animation: riseIn 650ms ease-out; }

/* 设置面板（方案A：三点按钮接真实功能） */
.settings-backdrop { position: fixed; inset: 0; z-index: 50; background: rgba(58,58,56,.28); backdrop-filter: blur(2px); animation: fadeIn 300ms ease-out; }
.settings-panel { position: fixed; z-index: 55; top: 0; right: 0; width: min(84vw, 320px); height: 100dvh; padding: 20px 18px calc(20px + env(safe-area-inset-bottom)); background: var(--paper); box-shadow: -18px 0 48px rgba(53,44,35,.14); transform: translateX(100%); transition: transform 280ms cubic-bezier(.22,.61,.36,1); overflow-y: auto; }
.settings-panel.open { transform: translateX(0); }
.settings-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.settings-head small { display: block; color: #8c8378; font-size: 9px; letter-spacing: .12em; margin-bottom: 4px; }
.settings-head h2 { margin: 0; font-family: "Songti SC","STSong",serif; font-size: 22px; font-weight: 500; color: #3d4f51; letter-spacing: .06em; }
.settings-close { width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 50%; color: #82786e; background: var(--warm-cream); font-size: 22px; line-height: 1; }
.settings-section { margin-bottom: 24px; }
.settings-section h3 { margin: 0 0 10px; color: #5d5145; font-family: "Songti SC","STSong",serif; font-size: 12px; font-weight: 600; letter-spacing: .1em; }
.settings-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 13px 0; border-bottom: 1px solid #ede6dc; cursor: pointer; }
.settings-row:last-child { border-bottom: 0; }
.settings-row > span { display: flex; flex-direction: column; gap: 3px; }
.settings-row strong { font-size: 13px; font-weight: 600; color: #4a4a48; }
.settings-row small { color: #9c958c; font-size: 10px; }
.settings-row input[type="checkbox"] { display: none; }
.toggle-ui { width: 44px; height: 24px; border-radius: 999px; background: #d8d2c6; position: relative; transition: background 220ms; flex: 0 0 auto; }
.toggle-ui::after { content: ""; width: 20px; height: 20px; position: absolute; top: 2px; left: 2px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.12); transition: transform 220ms; }
.settings-row input:checked + .toggle-ui { background: #7fae6f; }
.settings-row input:checked + .toggle-ui::after { transform: translateX(20px); }
.settings-row select { padding: 7px 10px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); background: var(--warm-cream); font-size: 12px; outline: 0; }
.settings-action { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 0; border: 0; border-bottom: 1px solid #ede6dc; background: transparent; text-align: left; color: inherit; }
.settings-action > span { display: flex; flex-direction: column; gap: 3px; }
.settings-action strong { font-size: 13px; font-weight: 600; color: #4a4a48; }
.settings-action small { color: #9c958c; font-size: 10px; }
.settings-action b { color: #aa9d90; font-size: 17px; font-weight: 400; }
.settings-about p { margin: 0 0 10px; color: #6d6157; font-size: 11px; line-height: 1.75; }
.hotline-note { color: #a84a42; font-size: 10px; }

/* 开屏层：全屏品牌图，加载后渐隐（主公 2026-08-12 要求） */
.splash-screen { position: fixed; inset: 0; z-index: 999; display: grid; place-items: center; background: #0f1a22; }
.splash-screen img { width: 100%; height: 100%; object-fit: cover; display: block; }
.splash-screen.fade-out { opacity: 0; transition: opacity 540ms ease; }

/* 正念页底部导航：固定常驻（内容长不遮挡，主公 2026-08-12 要求）
   做法：moment-shell 限定 100dvh，仅 .library-section 内部滚动，导航作为 flex 末项常驻底部 */
.moment-tabs { flex: 0 0 auto; }

.bottom-tabs { height: calc(58px + env(safe-area-inset-bottom)); flex: 0 0 auto; display: grid; grid-template-columns: 1fr 1fr 1fr; padding: 5px 8px env(safe-area-inset-bottom); border-top: 1px solid var(--line); background: rgba(247,242,233,.97); backdrop-filter: blur(14px); }
.bottom-tabs a { position: relative; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 3px; color: #9a9186; font-size: 10px; }
.bottom-tabs a.active { color: #71604f; font-weight: 700; }
.bottom-tabs a.active::after { content: ""; width: 4px; height: 4px; position: absolute; bottom: 1px; border-radius: 50%; background: var(--dawn-orange); }
.tab-icon { width: 21px; height: 17px; position: relative; display: block; }
.companion-icon::before { content: ""; width: 17px; height: 13px; position: absolute; left: 2px; top: 0; border: 1.5px solid currentColor; border-radius: 7px; }
.companion-icon::after { content: ""; width: 6px; height: 6px; position: absolute; left: 5px; bottom: 0; border-left: 1.5px solid currentColor; transform: skew(-28deg); }
.review-icon::before { content: ""; width: 18px; height: 13px; position: absolute; left: 1px; bottom: 1px; border-bottom: 1.5px solid currentColor; border-left: 1.5px solid currentColor; border-radius: 0 0 0 4px; transform: skewY(-12deg); }
.review-icon::after { content: ""; width: 5px; height: 5px; position: absolute; right: 1px; top: 1px; border-radius: 50%; background: currentColor; opacity: .65; }
.moment-icon::before { content: ""; width: 12px; height: 12px; position: absolute; left: 50%; top: 0; transform: translateX(-50%); border: 1.5px solid currentColor; border-radius: 50%; }
.moment-icon::after { content: ""; width: 16px; height: 1.5px; position: absolute; left: 50%; top: 14px; transform: translateX(-50%); background: currentColor; opacity: .65; }

/* Review */
.review-shell { overflow: visible; background: var(--warm-cream); box-shadow: var(--shadow); }
.review-hero { height: 292px; position: relative; overflow: hidden; color: #fff; }
.review-hero > img { width: 100%; height: 100%; display: block; object-fit: cover; object-position: center; filter: saturate(.72) contrast(.92); }
.review-hero-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(45,56,55,.12), rgba(42,45,39,.03) 42%, rgba(49,45,38,.72) 100%); }
.review-title { position: absolute; inset: 17px 16px auto; display: flex; align-items: center; gap: 10px; padding-top: env(safe-area-inset-top); }
.island-mark.light { background: rgba(255,255,255,.18); }
.review-title div p { margin: 0 0 2px; color: rgba(255,255,255,.75); font-size: 9px; letter-spacing: .16em; }
.review-title h1 { margin: 0; font-family: "Songti SC", "STSong", serif; font-size: 24px; font-weight: 500; letter-spacing: .13em; }
.review-title button { width: 38px; height: 38px; margin-left: auto; border: 1px solid rgba(255,255,255,.28); border-radius: 50%; color: #fff; background: rgba(255,255,255,.12); backdrop-filter: blur(8px); }
.review-hero blockquote { position: absolute; left: 21px; right: 21px; bottom: 24px; margin: 0; font-family: "Songti SC", "STSong", serif; font-size: 14px; line-height: 1.72; text-shadow: 0 2px 12px rgba(32,30,25,.36); }
.review-content { padding: 14px 14px 88px; }
.period-switch { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: 14px; background: rgba(232,223,210,.42); }
.period-switch button { min-height: 34px; border: 0; border-radius: 10px; color: #8c8378; background: transparent; font-size: 11px; }
.period-switch button.active { color: #5d5145; background: var(--paper); box-shadow: 0 4px 13px rgba(77,61,45,.08); font-weight: 700; }
.review-card { margin-top: 13px; padding: 17px; border: 1px solid var(--line); border-radius: 16px; background: rgba(251,248,242,.92); box-shadow: 0 8px 26px rgba(80,62,44,.045); }
/* 旅程回顾信：开场（信的语言） */
.letter-card { background: linear-gradient(160deg, rgba(255,255,255,.94), rgba(243,238,229,.9)); }
.letter-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.letter-salutation { color: #5d5145; font-family: "Songti SC","STSong",serif; font-size: 15px; font-weight: 600; letter-spacing: .06em; }
.letter-head small { color: #a19a90; font-size: 9px; }
.letter-body { margin: 12px 0 2px; color: #65615b; font-family: "Songti SC","STSong",serif; font-size: 13px; line-height: 1.95; }
.letter-body strong { color: #4a5c5d; font-weight: 600; }
/* 信：收尾 */
.closing-card { text-align: center; background: rgba(244,239,230,.86); }
.closing-body { margin: 0; color: #6d6157; font-family: "Songti SC","STSong",serif; font-size: 13px; line-height: 1.9; }
.closing-note { display: block; margin-top: 9px; color: #a19a90; font-size: 9px; letter-spacing: .06em; }
.tide-note { margin: 10px 0 0; color: #7d8784; font-size: 10px; line-height: 1.7; }
.card-kicker, .card-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.card-kicker span, .card-heading > div > span { color: #8b7660; font-family: "Songti SC", "STSong", serif; font-size: 11px; letter-spacing: .08em; }
.card-kicker small, .card-heading small { color: #a19a90; font-size: 9px; }
.review-card h2 { margin: 6px 0 0; font-family: "Songti SC", "STSong", serif; font-size: 17px; font-weight: 600; letter-spacing: .02em; }
.monthly-card > p { margin: 13px 0; color: #65615b; font-size: 12px; line-height: 1.85; }
.quote-note { padding: 11px 12px; border-left: 2px solid var(--dawn-orange); border-radius: 0 10px 10px 0; color: #8b8175; background: #f2eadf; font-size: 9px; }
.quote-note p { margin: 5px 0 0; color: #554f48; font-family: "Songti SC", "STSong", serif; font-size: 12px; line-height: 1.65; }
.tide-chart { height: 112px; position: relative; display: flex; align-items: flex-end; gap: 3px; margin-top: 14px; padding: 9px 3px 4px; overflow: hidden; border-radius: 12px; background: linear-gradient(180deg, rgba(169,192,201,.08), rgba(169,192,201,.24)); }
.tide-chart i { flex: 1; z-index: 2; min-height: 15%; border-radius: 8px 8px 2px 2px; background: linear-gradient(180deg, rgba(126,159,169,.72), rgba(169,192,201,.26)); }
.tide-glow { position: absolute; width: 130px; height: 70px; right: -20px; bottom: -30px; border-radius: 50%; background: rgba(224,166,114,.22); filter: blur(18px); }
.chart-caption { display: flex; justify-content: space-between; margin-top: 7px; color: #aaa197; font-size: 8px; }
.ring { --value: 50%; width: 51px; height: 51px; display: grid; place-items: center; border-radius: 50%; background: conic-gradient(var(--moss) var(--value), #e8e3d9 0); position: relative; }
.ring::after { content: ""; width: 39px; height: 39px; position: absolute; border-radius: 50%; background: var(--paper); }
.ring span { position: relative; z-index: 2; color: #69705f; font-family: "Songti SC", "STSong", serif; font-size: 11px; }
.concern-cloud { min-height: 110px; display: flex; flex-wrap: wrap; justify-content: center; align-content: center; gap: 7px; margin-top: 10px; padding: 12px; border-radius: 13px; background: radial-gradient(circle at center, #edf0e7, #f5efe7 68%); }
.concern-cloud span { padding: 7px 10px; border: 1px solid #d8cfc2; border-radius: 999px; color: #756b60; background: rgba(251,248,242,.75); font-size: 10px; }
.concern-cloud span.large { padding: 9px 13px; color: #5f5549; font-size: 12px; }
.concern-cloud span.moss { border-color: #cad4c2; color: #64715a; background: #edf2e9; }
.gentle-insight { margin: 11px 0 0; color: #817a72; font-size: 10px; line-height: 1.7; }
.card-heading button { border: 0; color: #887562; background: transparent; font-size: 10px; }
.session-list { margin-top: 10px; }
.session-list > button { width: 100%; display: grid; grid-template-columns: 48px 1fr 15px; align-items: center; gap: 8px; padding: 11px 0; border: 0; border-bottom: 1px solid #e8e0d5; color: inherit; background: transparent; text-align: left; }
.session-list > button:last-child { border-bottom: 0; }
.session-list time { color: #9a8b7b; font-family: "Songti SC", "STSong", serif; font-size: 10px; }
.session-list div { display: flex; flex-direction: column; gap: 3px; }
.session-list strong { font-size: 11px; font-weight: 600; }
.session-list small { color: #a39c93; font-size: 8px; }
.session-list b { color: #aa9d90; font-size: 17px; font-weight: 400; }
.privacy-note { margin: 17px 0 0; color: #a19a90; font-size: 8px; text-align: center; }
.review-tabs { width: min(100%, 480px); position: fixed; z-index: 20; left: 50%; bottom: 0; transform: translateX(-50%); }

/* 回看页轻量登录层 */
.auth-overlay { position: fixed; z-index: 90; inset: 0; display: flex; justify-content: center; align-items: center; padding: 24px; background: rgba(58,58,56,.4); backdrop-filter: blur(3px); animation: fadeIn 500ms ease-out; }
.auth-card { width: min(100%, 320px); display: flex; flex-direction: column; align-items: center; gap: 13px; padding: 30px 26px 26px; border: 1px solid var(--line); border-radius: 20px; background: var(--paper); box-shadow: 0 20px 50px rgba(53,44,35,.22); }
.auth-card h2 { margin: 4px 0 0; font-family: "Songti SC","STSong",serif; font-size: 19px; font-weight: 500; letter-spacing: .1em; color: #3d4f51; }
.auth-card p { margin: 0; color: #8c8378; font-size: 11px; line-height: 1.6; text-align: center; }
.auth-card input { width: 100%; padding: 11px 13px; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); background: var(--warm-cream); font-size: 13px; outline: 0; }
.auth-card input:focus { border-color: #6f969a; }
.auth-card button { width: 100%; padding: 11px 0; border: 0; border-radius: 12px; color: #fff; background: var(--wood-deep); font-size: 13px; letter-spacing: .08em; }
.auth-card small { min-height: 14px; color: var(--danger); font-size: 10px; }
.auth-card button.auth-cancel { margin-top: -4px; color: #8c8378; background: transparent; box-shadow: none; border: 1px solid var(--line); }
.auth-card button.auth-cancel:active { background: rgba(0,0,0,.04); }
.locked-bar { position: fixed; z-index: 85; left: 50%; transform: translateX(-50%); bottom: 84px; display: none; align-items: center; gap: 10px; padding: 10px 16px; border: 1px solid var(--line); border-radius: 999px; background: rgba(251,248,242,.97); box-shadow: 0 8px 24px rgba(65,49,34,.12); font-size: 12px; color: #766d63; white-space: nowrap; }
.locked-bar button { padding: 6px 14px; border: 0; border-radius: 999px; color: #fff; background: var(--wood-deep); font-size: 12px; }

/* 回看 Tab 小红点（未读提示） */
.tab-badge { min-width: 8px; height: 8px; position: absolute; top: 7px; right: calc(50% - 26px); border-radius: 50%; background: var(--danger); box-shadow: 0 0 0 3px rgba(194,91,91,.14); }
.bottom-tabs a { position: relative; }

.sheet-backdrop { position: fixed; z-index: 40; inset: 0; display: flex; justify-content: center; align-items: flex-end; background: rgba(58,58,56,.28); backdrop-filter: blur(2px); animation: fadeIn 600ms ease-out; }
/* max-height + 列 flex：长对话时对话区内部滚动，顶部关闭按钮始终可见可点 */
.session-sheet { width: min(100%, 480px); max-height: 88vh; min-height: 360px; position: relative; display: flex; flex-direction: column; padding: 26px 20px calc(26px + env(safe-area-inset-bottom)); border-radius: 22px 22px 0 0; background: var(--paper); box-shadow: 0 -18px 45px rgba(53,44,35,.16); animation: sheetUp 700ms cubic-bezier(.22,.61,.36,1); overflow: hidden; }
.sheet-handle { width: 38px; height: 4px; position: absolute; left: 50%; top: 9px; transform: translateX(-50%); border-radius: 4px; background: var(--line); }
.sheet-close { width: 34px; height: 34px; position: absolute; top: 20px; right: 16px; border: 1px solid var(--line); border-radius: 50%; color: #82786e; background: var(--warm-cream); font-size: 20px; z-index: 2; }
.session-sheet > time { color: #9b8a78; font-size: 10px; flex: 0 0 auto; }
.session-sheet h2 { margin: 7px 42px 14px 0; font-family: "Songti SC", "STSong", serif; font-size: 19px; flex: 0 0 auto; }
.session-excerpt { padding: 13px; border-radius: 12px; color: #665e55; background: var(--sand); font-family: "Songti SC", "STSong", serif; font-size: 12px; line-height: 1.7; flex: 0 0 auto; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; }
.sheet-dialogue { display: flex; flex-direction: column; gap: 10px; margin: 16px 0; flex: 1 1 auto; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.sheet-dialogue p { max-width: 84%; margin: 0; padding: 10px 12px; border-radius: 14px; font-size: 11px; line-height: 1.65; }
.sheet-dialogue .mine { align-self: flex-end; background: var(--fog-light); border-radius: 14px 14px 4px 14px; }
.sheet-dialogue .his { background: var(--warm-cream); border: 1px solid var(--line); border-radius: 14px 14px 14px 4px; }
.session-sheet > small { color: #9c958c; font-size: 9px; flex: 0 0 auto; }

/* 危机态：整屏配色微沉一档，角色仍稳住、不惊慌（见 UI-REQUIREMENTS §7.8） */
.crisis-mode .presence-stage { filter: saturate(.88) brightness(.95); }
.crisis-mode .chat-area { background: linear-gradient(180deg, #eef0ed, var(--warm-cream)); }
.crisis-mode .app-ambient { background: radial-gradient(circle at 50% 0%, #e5ebec 0, #ced8d9 72%); }

/* 呼吸 / 着陆陪伴态（正念·躯体取向：情绪淹没时陪用户回到此刻身体） */
.composer-foot { display: flex; align-items: center; justify-content: flex-end; gap: 10px; min-height: 16px; margin: 6px 2px 0; color: #9aa6a4; font-size: 9px; line-height: 1; }
.composer-foot > span { display: inline-block; padding-top: 6px; }
.composer-foot-spacer { flex: 1; }
.breath-overlay { position: fixed; inset: 0; z-index: 60; display: none; flex-direction: column; align-items: center; justify-content: center; gap: 30px; padding: 28px; color: #4f5b5a; background: radial-gradient(circle at 50% 42%, #f3f0ea 0, #e7ddd0 70%, #e0d4c4 100%); animation: fadeIn 700ms ease-out; }
.breath-overlay.show { display: flex; }
.breath-avatar { width: 62px; height: 62px; overflow: hidden; border: 4px solid rgba(255,255,255,.9); border-radius: 24px; background: #d9e3e3; box-shadow: 0 14px 34px rgba(61,89,91,.16); opacity: .92; }
.breath-avatar img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 32%; transform: scale(1.02); filter: saturate(.78) contrast(.97); }
.breath-orb { width: 180px; height: 180px; border-radius: 50%; background: radial-gradient(circle at 50% 42%, rgba(255,255,255,.92), rgba(169,192,201,.5) 46%, rgba(224,166,114,.16) 72%, transparent 78%); box-shadow: 0 0 64px rgba(169,192,201,.34); animation: breathPulse 10s ease-in-out infinite; }
.breath-guide { text-align: center; }
.breath-guide strong { display: block; font-family: "Songti SC","STSong",serif; font-size: 19px; font-weight: 500; letter-spacing: .06em; color: #4a5c5d; }
.breath-guide span { display: block; margin-top: 9px; color: #8a8d84; font-size: 11px; letter-spacing: .04em; line-height: 1.6; }
.breath-phrase { min-height: 18px; margin-top: 14px; color: #9aa39c; font-family: "Songti SC","STSong",serif; font-size: 14px; letter-spacing: .18em; transition: opacity 600ms ease; }
.breath-exit { margin-top: 6px; padding: 9px 20px; border: 1px solid rgba(127,157,157,.3); border-radius: 999px; color: #6f8486; background: rgba(255,255,255,.6); font-size: 11px; letter-spacing: .08em; }
.breath-exit:active { transform: scale(.97); }
@keyframes breathPulse { 0% { transform: scale(.66); opacity: .72; } 36% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.02); opacity: 1; } 86% { transform: scale(.66); opacity: .72; } 100% { transform: scale(.66); opacity: .72; } }
@keyframes breathHint { 0%,100% { transform: scale(.8); opacity: .65; } 50% { transform: scale(1.1); opacity: 1; } }

@keyframes poseFade { from { opacity: .82; } to { opacity: 1; } }
@keyframes quietDot { 0%,100% { opacity: .28; transform: translateY(0); } 50% { opacity: 1; transform: translateY(-2px); } }
@keyframes riseIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes sheetUp { from { transform: translateY(28px); opacity: .4; } to { transform: translateY(0); opacity: 1; } }

/* 此刻 · 冥想（MVP：复用呼吸态视觉语言 + 加库 + 单冥想 + 完成态） */
.moment-ambient { background: radial-gradient(circle at 50% 0%, #eaf2f1 0, #d6e4e2 72%); }
.moment-shell { display: flex; flex-direction: column; height: 100dvh; overflow: hidden; }
.moment-stage { position: relative; flex: 0 0 auto; overflow: hidden; padding: 0 17px 18px; color: var(--ink); background: linear-gradient(160deg, #eaf1f0 0%, #dde9e8 46%, #f0e8de 100%); border-bottom: 1px solid rgba(137,161,165,.18); }
.moment-stage .brand-line { height: 76px; padding-top: env(safe-area-inset-top, 0); }
.guide-avatar-mini { position: absolute; left: 14px; top: 88px; right: auto; width: 140px; height: 140px; flex: 0 0 auto; overflow: hidden; border: 4px solid rgba(255,255,255,.88); border-radius: 36px; box-shadow: 0 16px 38px rgba(61,89,91,.18); }
.guide-avatar-mini img { width: 100%; height: 100%; display: block; object-fit: cover; object-position: 50% 20%; }
.moment-greeting { position: relative; z-index: 2; margin: 10px 16px 14px 176px; max-width: 200px; }
.moment-greeting > span { color: #71888a; font-size: 10px; letter-spacing: .12em; }
.moment-greeting strong { font-family: "Songti SC","STSong",serif; color: #4d6163; }
.moment-greeting h1 { margin: 7px 0 6px; font-family: "Songti SC","STSong",serif; color: #364b4d; font-size: clamp(20px, 5.6vw, 25px); font-weight: 500; line-height: 1.3; letter-spacing: .04em; }
.moment-greeting p { max-width: 230px; margin: 0; color: #788381; font-size: 10px; line-height: 1.65; }
.featured-meditation { position: relative; z-index: 2; width: 100%; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 8px; margin-top: 34px; padding: 16px 18px; border: 1px solid rgba(127,157,157,.32); border-radius: 18px; color: inherit; text-align: left; box-shadow: 0 14px 32px rgba(61,89,91,.1); background: rgba(255,255,255,.7); }
.featured-meta { display: flex; flex-direction: column; gap: 4px; }
.kicker { color: #8c7a62; font-family: "Songti SC","STSong",serif; font-size: 10px; letter-spacing: .14em; }
.featured-meditation h2 { margin: 0; font-family: "Songti SC","STSong",serif; color: #3d4f51; font-size: 22px; font-weight: 600; letter-spacing: .04em; }
.featured-meditation small { color: #74838b; font-size: 10px; line-height: 1.6; }
.featured-orb { width: 68px; height: 68px; border-radius: 50%; background: radial-gradient(circle at 50% 42%, rgba(255,255,255,.95), rgba(169,192,201,.55) 46%, rgba(224,166,114,.16) 72%, transparent 78%); box-shadow: 0 0 28px rgba(169,192,201,.34); animation: breathPulse 8s ease-in-out infinite; flex: 0 0 auto; }
.featured-right { display: flex; flex-direction: column; align-items: center; gap: 6px; margin-right: 4px; }
.featured-cta { color: #8c7a62; font-size: 11px; letter-spacing: .06em; line-height: 1; white-space: nowrap; }
.library-section { flex: 1; min-height: 0; overflow-y: auto; padding: 16px 17px 6px; }
.section-title { margin: 0 0 10px; color: #5d5145; font-family: "Songti SC","STSong",serif; font-size: 13px; font-weight: 600; letter-spacing: .14em; }
.course-title { margin-top: 18px; }
.scene-chips { display: flex; gap: 7px; margin-bottom: 4px; }
.scene-chip { padding: 7px 13px; border: 1px solid var(--line); border-radius: 999px; color: #8c8378; background: rgba(255,255,255,.66); font-size: 10px; letter-spacing: .03em; }
.scene-chip.active { color: #5d5145; border-color: rgba(156,174,142,.6); background: rgba(232,238,228,.75); font-weight: 700; }
.scene-chip:active { transform: scale(.97); }
.meditation-grid, .course-grid { display: grid; grid-template-columns: 1fr; gap: 10px; }
.med-card { display: flex; flex-direction: column; gap: 5px; padding: 14px 14px 13px; border: 1px solid var(--line); border-radius: 14px; color: inherit; text-align: left; background: rgba(255,255,255,.78); }
.med-card:active { transform: scale(.985); }
.med-card.tier-日常 { border-color: rgba(186,200,205,.45); }
.med-card.tier-护理 { border-color: rgba(208,178,150,.45); background: rgba(252,247,239,.82); }
.med-card.tier-深度 { border-color: rgba(176,190,160,.45); background: rgba(245,247,239,.82); }
.med-card.scene-晨起 { border-color: rgba(186,200,205,.45); }
.med-card.scene-午间 { border-color: rgba(224,166,114,.35); background: rgba(252,247,239,.8); }
.med-card.scene-晚间 { border-color: rgba(169,192,201,.45); background: rgba(238,244,243,.8); }
.med-card.done { opacity: .72; }
.med-card.done .med-tier { color: #8a9878; }
.med-card.done strong::after { content: ""; display: inline-block; width: 6px; height: 6px; margin-left: 5px; border-radius: 50%; background: var(--moss); vertical-align: 1px; }
.med-tier { color: #8a7c69; font-size: 9px; letter-spacing: .12em; }
.med-card strong { color: #3d4f51; font-family: "Songti SC","STSong",serif; font-size: 15px; font-weight: 600; }
.med-card small { color: #74838b; font-size: 9px; line-height: 1.55; }
.moment-foot { padding: 12px 24px 14px; color: #999186; font-size: 8px; text-align: center; line-height: 1.7; }
.evidence-card { margin-top: 10px; padding: 15px 16px; border: 1px solid rgba(169,192,201,.3); border-radius: 14px; background: rgba(238,244,243,.7); }
.evidence-card p { margin: 0 0 10px; color: #6d7d80; font-size: 10px; line-height: 1.75; }
.evidence-card p:last-child { margin-bottom: 0; }
.evidence-card strong { color: #4a5c5d; font-family: "Songti SC","STSong",serif; font-weight: 600; }
.evidence-card em { font-style: normal; color: #5d7478; }
.moment-tabs { flex: 0 0 auto; }

.meditation-overlay { position: fixed; inset: 0; z-index: 70; display: none; flex-direction: column; align-items: center; justify-content: center; gap: 28px; padding: 28px; color: #4f5b5a; background: radial-gradient(circle at 50% 42%, #f3f0ea 0, #e7ddd0 70%, #ddd2c4 100%); animation: fadeIn 700ms ease-out; }
.meditation-overlay.show { display: flex; }
.med-avatar { width: 120px; height: 120px; overflow: hidden; border: 5px solid rgba(255,255,255,.9); border-radius: 36px; background: #d9e3e3; box-shadow: 0 16px 40px rgba(61,89,91,.18); opacity: 1; }
.med-avatar img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 18%; filter: saturate(.88) contrast(.97); }
.med-orb { width: 200px; height: 200px; border-radius: 50%; background: radial-gradient(circle at 50% 42%, rgba(255,255,255,.92), rgba(169,192,201,.5) 46%, rgba(224,166,114,.16) 72%, transparent 78%); box-shadow: 0 0 72px rgba(169,192,201,.34); animation: breathPulse 12s ease-in-out infinite; }
.med-guide { text-align: center; }
.med-guide .med-guide-name { display: block; margin-top: 0; margin-bottom: 6px; color: #6a8283; font-size: 11px; letter-spacing: .14em; }
.med-guide strong { display: block; font-family: "Songti SC","STSong",serif; font-size: 18px; font-weight: 500; letter-spacing: .06em; color: #4a5c5d; }
.med-guide span { display: block; margin-top: 7px; color: #8a8d84; font-size: 10px; letter-spacing: .04em; line-height: 1.6; max-width: 280px; }
.med-phrase { min-height: 22px; margin-top: 12px; color: #6c8487; font-family: "Songti SC","STSong",serif; font-size: 26px; letter-spacing: .22em; transition: opacity 600ms ease; }
.med-timer { margin-top: 14px; color: #8c9998; font-family: -apple-system, "SF Mono", monospace; font-size: 13px; letter-spacing: .12em; opacity: .85; }
.sound-controls { display: flex; gap: 8px; }
.sound-toggle { display: inline-flex; align-items: center; gap: 5px; padding: 8px 13px; border: 1px solid rgba(127,157,157,.28); border-radius: 999px; color: #8a9693; background: rgba(255,255,255,.5); font-size: 10px; letter-spacing: .05em; transition: color 240ms, border-color 240ms, background 240ms; }
.sound-toggle span { font-size: 12px; }
.sound-toggle.on { color: #4f6a6d; border-color: rgba(127,157,157,.55); background: rgba(255,255,255,.85); }
.sound-toggle:not(.on) { opacity: .62; }
.sound-toggle:active { transform: scale(.97); }
.med-exit { margin-top: 6px; padding: 9px 22px; border: 1px solid rgba(127,157,157,.3); border-radius: 999px; color: #6f8486; background: rgba(255,255,255,.6); font-size: 11px; letter-spacing: .08em; }
.med-exit:active { transform: scale(.97); }

.meditation-complete { position: fixed; inset: 0; z-index: 80; display: none; flex-direction: column; align-items: center; justify-content: center; gap: 16px; padding: 30px; color: #4a5c5d; background: radial-gradient(circle at 50% 42%, #f5f1ea 0, #ece5d9 70%, transparent 100%); animation: fadeIn 800ms ease-out; }
.meditation-complete.show { display: flex; }
.complete-orb { width: 90px; height: 90px; border-radius: 50%; background: radial-gradient(circle, rgba(169,192,201,.5), rgba(224,166,114,.16) 60%, transparent 78%); animation: breathPulse 6s ease-in-out infinite; }
.meditation-complete h2 { margin: 0; font-family: "Songti SC","STSong",serif; font-size: 22px; font-weight: 500; letter-spacing: .14em; color: #4a5c5d; }
.meditation-complete p { max-width: 320px; margin: 0; color: #74838b; font-family: "Songti SC","STSong",serif; font-size: 13px; line-height: 1.7; text-align: center; }
.complete-prompt { max-width: 300px; margin: 0; color: #5d6f70; font-family: "Songti SC","STSong",serif; font-size: 12px; line-height: 1.7; text-align: center; letter-spacing: .04em; }
.complete-actions { display: flex; gap: 8px; margin-top: 4px; flex-wrap: wrap; justify-content: center; }
.mood-btn { padding: 9px 16px; border: 1px solid var(--line); border-radius: 999px; color: #596e70; background: rgba(255,255,255,.7); font-size: 11px; }
.mood-btn:active { transform: scale(.97); }
.complete-foot { color: #a19a90; font-size: 9px; }

/* ADR-015：会话结束反馈轻量卡（越用越好用闭环）。冷绿基底、轻盈不打扰。 */
.feedback-card {
  position: fixed; z-index: 60; left: 50%; bottom: 96px; transform: translate(-50%, 16px);
  width: min(92%, 360px); padding: 16px 18px 12px;
  border: 1px solid rgba(127,157,157,.26); border-radius: 20px;
  background: rgba(251,252,251,.96); box-shadow: 0 18px 48px rgba(61,89,91,.16);
  opacity: 0; transition: opacity .3s ease, transform .3s ease;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.feedback-card.in { opacity: 1; transform: translate(-50%, 0); }
.feedback-card .feedback-q {
  margin: 0 0 12px; text-align: center; color: #4b5f60;
  font-family: "Songti SC", "STSong", serif; font-size: 14px; letter-spacing: .03em;
}
.feedback-card .feedback-opts { display: flex; gap: 8px; }
.feedback-card .feedback-opts button {
  flex: 1; padding: 10px 4px; border: 1px solid rgba(127,157,157,.3); border-radius: 999px;
  background: #f0f5f4; color: #48696c; font-size: 12px;
}
.feedback-card .feedback-opts button:active { background: #dce9e8; border-color: rgba(104,137,143,.5); }
.feedback-card .feedback-skip {
  display: block; margin: 8px auto 0; padding: 4px 10px;
  border: 0; background: transparent; color: #93a2a1; font-size: 11px;
}

@media (min-width: 560px) {
  .app-ambient { padding: 22px; }
  .phone-shell { min-height: calc(100dvh - 44px); border: 1px solid rgba(135,111,87,.18); border-radius: 26px; box-shadow: var(--shadow); }
  .companion-shell { height: calc(100dvh - 44px); }
  .presence-stage { border-radius: 25px 25px 0 0; }
  .review-shell { overflow: hidden; }
  .review-tabs { bottom: 22px; border-radius: 0 0 25px 25px; }
}

@media (max-height: 720px) {
  .presence-stage { height: 220px; min-height: 220px; }
  .brand-line { height: 55px; }
  .moment-stage .brand-line { height: 74px; }
  .welcome-copy { margin-top: 8px; }
  .welcome-copy h1 { margin-block: 5px; font-size: 22px; }
  .welcome-copy p { max-width: 215px; }
  .companion-avatar { width: 66px; height: 66px; border-radius: 22px; }
  .companion-card { bottom: 12px; }
  .chat-row { margin-bottom: 9px; }
  .chat-row p { padding-block: 8px; font-size: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
}

/* ==========================================================================
   Desktop 适配（≥900px）——陪伴页改为「咨询室」双栏：
   左栏 = 品牌 + 欢迎语 + 陪伴者大形象 + 三 Tab 导航
   右栏 = 对话主区 + 输入区
   气质延续冷绿静谧，不引入新色相。
   ========================================================================== */
@media (min-width: 900px) {
  .companion-ambient {
    padding: 0;
    background: radial-gradient(circle at 50% 0%, #e7efef 0, #d2dcdd 78%);
  }
  .companion-shell {
    width: 100%;
    max-width: 1460px;
    height: 100dvh;
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(320px, 400px) minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr) auto;
    grid-template-areas:
      "presence chat"
      "tabs     composer";
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  /* 左栏：咨询室氛围 */
  .companion-shell .presence-stage {
    grid-area: presence;
    height: auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    border-bottom: 0;
    border-right: 1px solid rgba(137,161,165,.22);
    border-radius: 0;
    background: linear-gradient(165deg, #eef4f3 0%, #e2ebed 55%, #f2ece2 100%);
    padding-bottom: 20px;
  }
  .companion-shell .brand-line { padding-top: 0; padding-inline: 24px; height: 72px; }
  .companion-shell .welcome-copy { margin: 26px 34px 0; text-align: center; }
  .companion-shell .welcome-copy h1 { font-size: 27px; }
  .companion-shell .welcome-copy p { max-width: 290px; margin: 0 auto; font-size: 11px; }
  .companion-shell .companion-card {
    position: static;
    margin: 24px auto 30px;
    gap: 13px;
  }
  .companion-shell .companion-avatar {
    width: 176px;
    height: 176px;
    border-width: 4px;
    border-radius: 46px;
    box-shadow: 0 28px 64px rgba(61,89,91,.24);
  }
  .companion-shell .companion-meta strong { margin-top: 8px; font-size: 17px; }
  .companion-shell .companion-meta small { margin-top: 3px; font-size: 12px; }
  .companion-shell .presence-status { padding: 5px 10px; font-size: 10px; }

  /* 右栏：对话主区 */
  .companion-shell .chat-area {
    grid-area: chat;
    padding: 24px clamp(24px, 7vw, 90px) 18px;
  }
  .companion-shell .chat-row p { max-width: 560px; }
  .companion-shell .settings-panel { width: min(46vw, 360px); }
  .companion-shell .composer-wrap {
    grid-area: composer;
    padding: 12px clamp(24px, 7vw, 90px) 16px;
    border-top: 1px solid rgba(221,211,197,.82);
  }
  .companion-shell .voice-subtabs { margin-bottom: 8px; }
  /* 此刻页课程网格：桌面双列（移动端保持单列避免挤压） */
  .course-grid, .meditation-grid { grid-template-columns: 1fr 1fr; }

  /* 左栏底部：三 Tab 横排（红点徽标随行） */
  .companion-shell .bottom-tabs {
    grid-area: tabs;
    height: 66px;
    padding: 8px 20px;
    border-top: 1px solid rgba(137,161,165,.16);
    border-right: 1px solid rgba(137,161,165,.22);
    background: rgba(247,242,233,.88);
  }

  /* 此刻页桌面：限宽单列保持冥想呼吸感 */
  .moment-ambient {
    padding: 0;
    background: radial-gradient(circle at 50% 0%, #e8f0ef 0, #d5dfe0 78%);
  }
  .moment-shell {
    width: min(100%, 780px);
    height: 100dvh;
    overflow: hidden;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }
  .moment-tabs { width: min(100%, 780px); }
  .moment-stage { padding-inline: clamp(24px, 6vw, 64px); }
  .moment-stage .brand-line { height: 78px; }
  .moment-greeting { margin: 14px 0 18px 176px; }
  .moment-greeting p { max-width: 420px; font-size: 11px; }
  .library-section { padding: 20px clamp(24px, 6vw, 64px) 30px; }

  /* 回看页桌面：宽栏数据展示 */
  .review-ambient {
    padding: 0;
    background: radial-gradient(circle at 50% 0%, #eef0ea 0, #dfe2d8 78%);
  }
  .review-shell {
    width: min(100%, 1180px);
    min-height: 100dvh;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    overflow: visible;
  }
  .review-hero { height: 240px; }
  .review-content {
    padding: 26px clamp(28px, 6vw, 84px) 110px;
  }
  .review-card { padding: 28px 34px; }
  .review-tabs {
    width: min(100%, 480px);
    bottom: 22px;
    border-radius: 999px;
  }
}
