:root {
  --bg: #f3f0e9;
  --card: #fffdf9;
  --text: #21312c;
  --muted: #6d7772;
  --line: #dcded7;
  --primary: #1f5749;
  --primary-dark: #173f35;
  --primary-soft: #dfece6;
  --accent: #df795e;
  --danger: #b94438;
  --danger-soft: #fbe8e4;
  --warn-soft: #fbf0d8;
  --shadow: 0 18px 50px rgba(32, 57, 49, .09);
  --shadow-sm: 0 8px 24px rgba(32, 57, 49, .07);
  --radius: 20px;
  --hl-bg: #b3261e;    /* 红底黄字：底色（和 #ffe14d 的对比度 5.0:1，达标） */
  --hl-fg: #ffe14d;    /* 红底黄字：字色 */
  --mark-bg: #ffe14d;  /* 荧光笔黄：底色（配深色字，对比度 10.9:1） */
  --mark-fg: #2b2b2b;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body {
  margin: 0; min-height: 100%; color: var(--text);
  background: radial-gradient(circle at 8% -2%, rgba(223,121,94,.13), transparent 27rem),
    radial-gradient(circle at 93% 10%, rgba(31,87,73,.1), transparent 32rem), var(--bg);
  font-family: "Avenir Next", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 16px; line-height: 1.7; -webkit-text-size-adjust: 100%;
}
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .22;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 120 120' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.07'/%3E%3C/svg%3E");
}
a { color: var(--primary); text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

.top { position: sticky; top: 0; z-index: 20; padding: calc(12px + env(safe-area-inset-top)) 22px 12px; background: rgba(243,240,233,.84); border-bottom: 1px solid rgba(31,87,73,.09); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); }
.top-in { max-width: 1040px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--text); }
.brand-mark { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50% 50% 46% 54% / 58% 45% 55% 42%; background: var(--primary); color: #fffaf3; font-family: "STKaiti", "KaiTi", serif; font-size: 19px; transform: rotate(-4deg); box-shadow: 0 6px 16px rgba(31,87,73,.2); }
img.brand-mark { display: block; border-radius: 50%; background: none; transform: none; box-shadow: 0 4px 12px rgba(31,87,73,.16); object-fit: contain; }
.brand-copy { display: flex; flex-direction: column; line-height: 1.15; }
.brand-copy b { font-size: 17px; letter-spacing: .06em; }
.brand-copy small { margin-top: 4px; color: var(--muted); font-size: 10px; letter-spacing: .08em; }
.top nav { display: flex; align-items: center; gap: 7px; }
.top nav a { color: #40504a; padding: 7px 14px; border-radius: 999px; font-size: 14px; transition: .2s ease; }
.top nav a:hover { color: var(--primary); background: rgba(255,255,255,.65); }

.page { width: min(100% - 32px, 860px); margin: 0 auto; padding: 42px 0 100px; }
.page.wide { width: min(100% - 32px, 1180px); padding-bottom: 48px; }
.page.wide th, .page.wide td { white-space: nowrap; }
.page.wide td:last-child { white-space: normal; }
.foot { width: min(100% - 32px, 860px); margin: 0 auto; padding: 0 0 34px; color: var(--muted); font-size: 12px; text-align: center; }
.foot p { margin: 5px 0 0; }
.foot .foot-promise { color: var(--primary-dark); font-weight: 600; font-size: 12.5px; }

/* ===== 文章 ===== */
.article-list { display: grid; gap: 12px; margin-top: 14px; }
.article-card { display: block; color: inherit; }
.article-card b { font-size: 17px; }
.article-card p { margin: 6px 0 0; font-size: 15px; }
.article-meta { margin-top: 10px; font-size: 12.5px; }
.article-page h1 { margin: 10px 0 4px; }
.article-body { margin-top: 14px; font-size: 16px; line-height: 1.9; }
.article-body .md h4 { margin-top: 24px; }
.article-body .md p { margin: 10px 0; }
h1, h2, h3, p { text-wrap: pretty; }
h1 { margin: 5px 0 8px; font-size: clamp(28px, 5vw, 46px); line-height: 1.18; letter-spacing: -.035em; }
h1 em { color: var(--primary); font-family: "STKaiti", "KaiTi", serif; font-style: normal; font-weight: 500; }
h2 { margin: 26px 0 10px; font-size: 21px; line-height: 1.35; }
h3 { margin: 0; font-size: 18px; }
.sub { color: var(--muted); margin: 0 0 18px; font-size: 14.5px; }
.eyebrow { color: var(--accent); font-size: 11px; font-weight: 700; letter-spacing: .15em; text-transform: uppercase; }
.page-lead { margin: 0 0 26px; }

.card { background: rgba(255,253,249,.91); border: 1px solid rgba(31,87,73,.11); border-radius: var(--radius); padding: 20px; margin: 14px 0; box-shadow: var(--shadow-sm); }
.card.soft { background: var(--primary-soft); border-color: #c9ddd4; box-shadow: none; }
.card.warn { background: var(--warn-soft); border-color: #ecd59d; }
.row { display: flex; align-items: center; gap: 12px; }
.row.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.muted { color: var(--muted); font-size: 14px; }
.pill { display: inline-flex; align-items: center; padding: 4px 11px; border-radius: 99px; background: var(--primary-soft); color: var(--primary-dark); font-size: 12px; font-weight: 650; }
.pill.warn { background: var(--warn-soft); color: #8c6419; }
.pill.gray { background: #e8e7e1; color: #5f6864; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 44px; border: 1px solid var(--line); background: rgba(255,255,255,.8); border-radius: 13px; padding: 9px 17px; cursor: pointer; font-size: 14.5px; font-weight: 650; transition: transform .18s ease, box-shadow .18s ease, background .18s ease; }
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.btn.primary { color: #fff; background: var(--primary); border-color: var(--primary); box-shadow: 0 9px 22px rgba(31,87,73,.22); }
.btn.primary:hover { background: var(--primary-dark); }
.btn.danger { border-color: rgba(185,68,56,.45); color: var(--danger); background: transparent; }
.btn.block { display: flex; width: 100%; padding: 12px 18px; }
.btn.small { min-height: 34px; padding: 5px 12px; font-size: 13px; border-radius: 10px; }
.btn[disabled] { opacity: .48; cursor: default; transform: none; box-shadow: none; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }

.field { margin: 16px 0; }
.field > label, .q > .ql { display: block; margin-bottom: 7px; color: #3b4844; font-size: 13.5px; font-weight: 700; }
.req { color: var(--danger); margin-left: 3px; }
.hint { color: var(--muted); font-size: 13px; margin: -2px 0 7px; font-weight: 400; }
input[type=text], input[type=password], input[type=search], textarea, select { width: 100%; padding: 12px 14px; border: 1px solid #d7dbd5; border-radius: 12px; background: rgba(255,255,255,.82); outline: none; transition: border-color .18s ease, box-shadow .18s ease, background .18s ease; }
input:focus, textarea:focus, select:focus { border-color: #74a394; background: #fff; box-shadow: 0 0 0 4px rgba(31,87,73,.08); }
textarea { min-height: 92px; resize: vertical; }
.inline { display: flex; gap: 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 1px solid var(--line); background: rgba(255,255,255,.78); border-radius: 99px; padding: 7px 14px; cursor: pointer; font-size: 14px; transition: .18s ease; }
.chip:hover { border-color: #95b4a9; background: #fff; }
.chip.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.scale { display: grid; grid-template-columns: repeat(5, 1fr); gap: 7px; }
.scale .chip { border-radius: 11px; text-align: center; padding: 8px 0; }
.scale-cap { display: flex; justify-content: space-between; color: var(--muted); font-size: 12px; margin-top: 5px; gap: 10px; }
.q { margin: 20px 0; }
.err { color: var(--danger); margin: 8px 0; min-height: 1.2em; font-size: 14px; }
.steps { display: flex; gap: 7px; margin: 4px 0 20px; }
.steps i { flex: 1; height: 5px; border-radius: 5px; background: #d8d9d3; }
.steps i.on { background: var(--primary); }
.banner { background: var(--warn-soft); border: 1px solid #ecd59d; border-radius: var(--radius); padding: 15px 17px; margin: 14px 0; }
.child-card h3 { margin: 0; }
.sec-block { border-top: 1px solid var(--line); padding: 16px 0; }
.sec-block:first-child { border-top: 0; }
.kv { display: grid; grid-template-columns: 9em 1fr; gap: 4px 12px; margin: 7px 0; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }

/* 登录与注册 */
.auth-page { width: min(100% - 32px, 1040px); padding-top: 64px; }
.auth-shell { display: grid; grid-template-columns: 1.15fr .85fr; gap: 70px; align-items: center; min-height: 560px; }
.auth-intro { padding: 20px 0; }
.auth-photo { margin: 0 0 26px; border-radius: 22px; overflow: hidden; aspect-ratio: 16 / 9; box-shadow: var(--shadow-sm); }
.auth-photo img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center 42%; }
.auth-intro h1 { margin-top: 16px; font-size: clamp(38px, 5.5vw, 62px); }
.auth-intro > p { max-width: 520px; color: var(--muted); font-size: 17px; }
.trust-list { display: grid; gap: 10px; margin-top: 32px; color: #52605b; font-size: 13px; }
.trust-list span { display: flex; align-items: center; gap: 12px; }
.trust-list i { color: var(--accent); font-style: normal; font-size: 10px; letter-spacing: .1em; }
.auth-card { padding: 30px; border: 1px solid rgba(31,87,73,.12); border-radius: 26px; background: rgba(255,253,249,.92); box-shadow: var(--shadow); }
.auth-card h2 { margin: 7px 0 4px; font-size: 28px; }
.auth-switch { margin: 18px 0 0; text-align: center; color: var(--muted); font-size: 13px; }
.auth-switch a { margin-left: 5px; font-weight: 700; }
.register-wrap { width: min(100%, 660px); margin: 0 auto; }
.register-card { padding-top: 22px; }
.consents { margin: 18px 0; padding: 13px 15px; border-radius: 14px; background: #f1f2ed; }
.check-row { display: grid; grid-template-columns: 18px 1fr; align-items: start; gap: 9px; margin: 8px 0; color: #53605b; font-size: 13px; line-height: 1.55; }
.check-row input { width: 16px; height: 16px; margin: 2px 0 0; accent-color: var(--primary); }

/* 首页 */
.home-hero { display: grid; grid-template-columns: 1fr; gap: 40px; align-items: center; min-height: 390px; padding: 48px 54px; overflow: hidden; border-radius: 30px; color: #fdf8ef; box-shadow: var(--shadow); position: relative;
  background: var(--primary-dark) url("/static/img/family-silhouette-beach.jpg") center 44%/cover no-repeat; }
/* 左边压深、右边透出照片，保证文字可读 */
.home-hero::before { content: ""; position: absolute; inset: 0;
  background: linear-gradient(100deg, rgba(16,45,38,.97) 0%, rgba(16,45,38,.93) 34%, rgba(16,45,38,.70) 56%, rgba(16,45,38,.30) 100%); }
.home-hero > * { position: relative; z-index: 1; }
.home-hero .hero-orbit { display: none; }
.home-hero::after { content: ""; position: absolute; width: 260px; height: 260px; right: -80px; top: -90px; border: 1px solid rgba(255,255,255,.12); border-radius: 50%; }
.home-hero .eyebrow { color: #efa68e; }
.home-hero h1 { margin: 15px 0; font-size: clamp(40px, 6vw, 59px); }
.home-hero h1 em { color: #f2b09d; }
.home-hero p { max-width: 510px; color: rgba(255,255,255,.7); }
.hero-cta { margin-top: 13px; color: var(--primary-dark) !important; background: #f7eee4 !important; border-color: #f7eee4 !important; box-shadow: none !important; }
.hero-cta span { font-size: 19px; }
.hero-secondary { margin-top: 13px; color: #f7eee4; border-color: rgba(255,255,255,.25); background: transparent; }
.hero-secondary:hover { background: rgba(255,255,255,.08); box-shadow: none; }
.hero-orbit { position: relative; height: 230px; }
.hero-orbit::before, .hero-orbit::after { content: ""; position: absolute; inset: 7%; border: 1px solid rgba(255,255,255,.16); border-radius: 50%; transform: rotate(-18deg); }
.hero-orbit::after { inset: 22%; transform: rotate(24deg); }
.orbit-card { position: absolute; z-index: 2; top: 50%; left: 50%; width: 138px; height: 138px; transform: translate(-50%,-50%) rotate(3deg); display: flex; flex-direction: column; align-items: center; justify-content: center; border-radius: 44% 56% 52% 48% / 45% 43% 57% 55%; background: #f0a28c; color: var(--primary-dark); box-shadow: 0 18px 40px rgba(0,0,0,.18); }
.orbit-card span { font-size: 13px; }
.orbit-card b { font-family: "STKaiti", "KaiTi", serif; font-size: 27px; font-weight: 500; }
.orbit-dot { position: absolute; width: 13px; height: 13px; background: #eadb91; border-radius: 50%; }
.dot-a { top: 21px; left: 33px; }
.dot-b { right: 13px; bottom: 58px; width: 8px; height: 8px; background: #f8eee5; }
.usage-line { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: 18px 3px 12px; color: var(--muted); font-size: 13px; }
.usage-line a { font-weight: 700; }
.onboarding-card { display: flex; align-items: flex-start; gap: 16px; padding: 24px; }
.onboarding-card p { margin: 5px 0 12px; }
.home-grid { display: grid; grid-template-columns: 1.45fr .55fr; gap: 14px; margin: 14px 0 42px; }
.privacy-panel, .usage-panel { border: 1px solid rgba(31,87,73,.11); border-radius: var(--radius); background: rgba(255,253,249,.88); box-shadow: var(--shadow-sm); }
.privacy-panel { display: flex; align-items: flex-start; gap: 17px; padding: 23px; }
.privacy-panel h2 { margin: 3px 0 5px; font-size: 18px; }
.privacy-panel p { margin: 0; color: var(--muted); font-size: 13px; }
.panel-icon { flex: 0 0 42px; display: grid; place-items: center; width: 42px; height: 47px; color: #fff; background: var(--primary); clip-path: polygon(50% 0, 92% 17%, 86% 72%, 50% 100%, 14% 72%, 8% 17%); }
.usage-panel { padding: 23px; }
.usage-panel .row { font-size: 13px; }
.usage-panel b { color: var(--primary); font-size: 18px; }
.usage-panel small { display: block; color: var(--muted); font-size: 11px; line-height: 1.5; }
.meter { height: 6px; margin: 13px 0; overflow: hidden; border-radius: 10px; background: #e2e5df; }
.meter i { display: block; height: 100%; border-radius: inherit; background: var(--accent); }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 15px; }
.section-head h2 { margin: 4px 0 0; }
.section-head > a { font-size: 13px; font-weight: 700; }
.support-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 13px; }
.support-card { min-height: 190px; padding: 14px 14px 20px; border: 1px solid rgba(31,87,73,.11); border-radius: var(--radius); background: rgba(255,253,249,.78); color: var(--text); transition: .2s ease; overflow: hidden; }
.support-card:hover { transform: translateY(-3px); background: #fff; box-shadow: var(--shadow-sm); }
.support-media { margin: 0 0 14px; border-radius: 10px; overflow: hidden; aspect-ratio: 16 / 10; background: var(--primary-soft); }
.support-media img { display: block; width: 100%; height: 100%; object-fit: cover; }
.support-card > span { color: var(--accent); font-size: 11px; font-weight: 700; letter-spacing: .12em; }
.support-card h3 { margin: 10px 0 8px; }
.support-card p { margin: 0; color: var(--muted); font-size: 13px; }

/* 聊天 */
.chat-page { min-height: 62vh; }
.chat-context { margin-bottom: 18px; }
.msgs { display: flex; flex-direction: column; gap: 15px; }
.bubble { max-width: 88%; padding: 14px 17px; border-radius: 19px; word-break: break-word; box-shadow: var(--shadow-sm); }
.bubble.user { align-self: flex-end; background: var(--primary); color: #fff; border-bottom-right-radius: 5px; white-space: pre-wrap; box-shadow: 0 10px 24px rgba(31,87,73,.16); }
.bubble.assistant { align-self: flex-start; background: rgba(255,253,249,.95); border: 1px solid rgba(31,87,73,.11); border-bottom-left-radius: 5px; }
.bubble .status { color: var(--muted); font-style: italic; }
.ai-note { color: var(--muted); font-size: 11px; margin-top: 10px; padding-top: 8px; border-top: 1px solid #ecece6; }
.md p { margin: 7px 0; }
.md h4.sec { margin: 16px 0 5px; color: var(--primary-dark); font-size: 16px; }
.md h4.sec:first-child { margin-top: 0; }
.md ul, .md ol { margin: 5px 0; padding-left: 1.35em; }
.md li { margin: 4px 0; }
.safety { background: var(--danger-soft); border: 1px solid #edb9b1; border-radius: 13px; padding: 13px 15px; margin-bottom: 11px; color: #7b2821; }
.safety b { display: block; margin-bottom: 4px; }
.safety div { white-space: pre-wrap; font-size: 14px; }
.record-note { align-self: flex-start; max-width: 94%; background: var(--primary-soft); border-radius: 13px; padding: 10px 14px; color: #385a50; font-size: 13px; }
.sugg { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 8px; }
.composer { position: fixed; left: 0; right: 0; bottom: 0; z-index: 18; padding: 11px 14px calc(11px + env(safe-area-inset-bottom)); border-top: 1px solid rgba(31,87,73,.1); background: rgba(250,248,243,.9); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); }
.composer .in { max-width: 860px; margin: 0 auto; display: flex; gap: 9px; align-items: flex-end; padding: 5px; border: 1px solid #d8ddd7; border-radius: 18px; background: #fff; box-shadow: 0 12px 30px rgba(32,57,49,.1); }
.composer textarea { min-height: 45px; max-height: 140px; margin: 0; padding: 10px 11px; border: 0; background: transparent; box-shadow: none; }
.send-btn { flex: 0 0 auto; min-width: 92px; border-radius: 13px; }
.send-btn::after { content: "↑"; display: grid; place-items: center; width: 21px; height: 21px; border-radius: 50%; background: rgba(255,255,255,.14); font-size: 15px; }
.hello { max-width: 720px; margin: 0 auto; text-align: center; padding: 34px 8px 8px; }
.chat-symbol { display: grid; place-items: center; width: 68px; height: 68px; margin: 0 auto 19px; border-radius: 43% 57% 55% 45% / 52% 43% 57% 48%; background: var(--primary); color: #fff; font-family: "STKaiti", "KaiTi", serif; font-size: 27px; box-shadow: 0 12px 26px rgba(31,87,73,.2); transform: rotate(-3deg); }
.hello h1 { margin-top: 8px; font-size: clamp(29px, 5vw, 42px); }
.hello .sub { max-width: 600px; margin-left: auto; margin-right: auto; }
.examples { display: grid; grid-template-columns: repeat(2, 1fr); gap: 9px; margin-top: 23px; counter-reset: example; }
.examples .chip { display: flex; align-items: center; gap: 11px; min-height: 58px; text-align: left; border-radius: 14px; line-height: 1.45; }
.examples .chip::before { counter-increment: example; content: "0" counter(example); color: var(--accent); font-size: 10px; font-weight: 700; letter-spacing: .1em; }

.settings-page { max-width: 720px; margin: 0 auto; }
.settings-page > .card a { font-weight: 700; }
.toast { position: fixed; left: 50%; bottom: 102px; transform: translateX(-50%); z-index: 50; max-width: 90%; padding: 9px 18px; border-radius: 99px; background: rgba(23,43,36,.92); color: #fff; font-size: 14px; box-shadow: var(--shadow); }
table { border-collapse: collapse; width: 100%; font-size: 13.5px; background: rgba(255,253,249,.72); border-radius: 14px; overflow: hidden; }
th, td { border-bottom: 1px solid var(--line); padding: 9px 10px; text-align: left; }
th { color: var(--muted); font-size: 12px; font-weight: 700; }

@media (max-width: 720px) {
  .top { padding-left: 14px; padding-right: 14px; }
  .brand-copy small { display: none; }
  .brand-mark { width: 34px; height: 34px; }
  .top nav { gap: 2px; }
  .top nav a { padding: 6px 9px; font-size: 13px; }
  .page { width: min(100% - 24px, 860px); padding-top: 25px; }
  .auth-page { width: min(100% - 24px, 1040px); padding-top: 28px; }
  .auth-shell { display: block; min-height: auto; }
  .auth-intro { padding: 8px 4px 28px; }
  .auth-intro h1 { font-size: 39px; }
  .auth-intro > p { font-size: 15px; }
  .trust-list { display: flex; flex-wrap: wrap; gap: 7px 16px; margin-top: 22px; }
  .trust-list span { gap: 6px; }
  .auth-card { padding: 23px 19px; border-radius: 22px; }
  .home-hero { display: block; min-height: 0; padding: 36px 25px 32px; border-radius: 24px; }
  /* 手机上文字占满宽度，改成上下方向的遮罩 */
  .home-hero::before { background: linear-gradient(180deg, rgba(16,45,38,.96) 0%, rgba(16,45,38,.88) 55%, rgba(16,45,38,.72) 100%); }
  .home-hero h1 { font-size: 42px; }
  .hero-orbit { display: none; }
  .home-grid { grid-template-columns: 1fr; margin-bottom: 34px; }
  .privacy-panel, .usage-panel { padding: 19px; }
  .support-grid { grid-template-columns: 1fr; }
  .support-card { min-height: 0; }
  .support-card h3 { margin-top: 14px; }
  .section-head { align-items: center; }
  .examples { grid-template-columns: 1fr; }
  .hello { padding-top: 18px; }
  .bubble { max-width: 94%; }
  .send-btn { min-width: 50px; width: 50px; padding: 0; font-size: 0; }
  .send-btn::after { font-size: 16px; }
  .composer { padding-left: 8px; padding-right: 8px; }
  .kv { grid-template-columns: 1fr; }
  .kv dd { margin: 0 0 8px; }
  .onboarding-card { padding: 19px; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }

/* ===== 重点标记：红底黄字 / 荧光笔 / 红叉 ===== */
.md mark.key { background: var(--hl-bg); color: var(--hl-fg); font-weight: 700; padding: .06em .4em; border-radius: 5px;
  -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.md mark.say { background: linear-gradient(transparent 14%, var(--mark-bg) 14%, var(--mark-bg) 90%, transparent 90%);
  color: var(--mark-fg); padding: 0 .12em; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.md p.key-line mark.key { background: transparent; padding: 0; }
.md .copy-say { margin-left: 6px; padding: 0 9px; font-size: 12px; line-height: 22px; color: var(--primary-dark);
  background: #fff; border: 1px solid var(--line); border-radius: 99px; cursor: pointer; vertical-align: 1px; }
.md p.key-line { background: var(--hl-bg); color: var(--hl-fg); font-weight: 700; padding: 11px 15px; border-radius: 13px; margin: 2px 0 12px; }
.md ul.avoid { list-style: none; padding-left: 0; }
.md ul.avoid li { position: relative; padding-left: 1.5em; }
.md ul.avoid li::before { content: "\2715"; position: absolute; left: 0; color: var(--hl-bg); font-weight: 700; }
.msg-actions { margin-top: 10px; display: flex; gap: 8px; flex-wrap: wrap; }
.rate-bar { margin-top: 10px; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; font-size: 13px; }
.rate-bar .rate-q { color: var(--muted); margin-right: 2px; }
.rate-bar .chip { padding: 4px 12px; font-size: 13px; }
.rate-reasons { flex-basis: 100%; display: flex; gap: 6px; flex-wrap: wrap; }
.rate-reasons .chip.small { padding: 3px 10px; font-size: 12px; }

/* ===== 分享下拉菜单、图片预览 ===== */
.share-menu { position: fixed; z-index: 80; min-width: 188px; padding: 6px; background: var(--card);
  border: 1px solid var(--line); border-radius: 15px; box-shadow: 0 16px 40px rgba(32,57,49,.22); }
.share-menu button { display: flex; align-items: center; gap: 11px; width: 100%; padding: 11px 13px; border: 0;
  background: transparent; border-radius: 10px; text-align: left; cursor: pointer; }
.share-menu button:hover, .share-menu button:focus-visible { background: var(--primary-soft); }
.share-menu button + button { margin-top: 2px; }
.share-menu .mi-icon { flex: 0 0 auto; width: 20px; text-align: center; font-size: 16px; }
.share-menu .mi-text { font-size: 15px; font-weight: 600; }
.share-menu .mi-sub { display: block; font-size: 12px; font-weight: 400; color: var(--muted); margin-top: 1px; }
.img-overlay { position: fixed; inset: 0; z-index: 70; background: rgba(10,20,17,.9); overflow: auto; padding: 16px 0 34px; text-align: center; }
.img-overlay img { display: block; width: min(92%, 560px); margin: 0 auto; border-radius: 10px; background: #fff; }
.img-overlay .tip { color: #fff; margin: 4px 16px 12px; font-size: 14px; }
.img-overlay .actions { margin-top: 16px; }

/* ===== 一次性分享页、邀请入口 ===== */
.shared-page { max-width: 640px; margin: 0 auto; }
.shared-card { margin-top: 14px; }
.shared-foot { text-align: center; margin-top: 22px; }
.invite-card .row { gap: 14px; }
.invite-card { margin: 14px 0; }
.invite-card.featured { border: 1px solid rgba(31,87,73,.30); background: linear-gradient(180deg, #ffffff, #f1f7f4); }
.invite-card b { font-size: 16px; }
.invite-card p { margin: 4px 0 0; font-size: 13.5px; line-height: 1.65; }
.invite-card .invite-link { display: flex; gap: 8px; align-items: center; margin: 12px 0 2px; }
.invite-card .invite-link code { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; font-size: 12.5px;
  background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; color: var(--text); }
.invite-card .actions { margin-top: 12px; }
.invite-card .invite-form { margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--line); }
.invite-card .invite-form .chips { margin: 8px 0; }
.invite-card .invite-form input { width: 100%; margin-top: 4px; }

/* ===== 记录页：搜索与筛选 ===== */
.history-tabs { margin: 12px 0 6px; }
.history-tabs .chip { font-size: 15px; padding: 8px 18px; font-weight: 650; }
.history-search { display: flex; gap: 8px; align-items: center; margin: 12px 0 8px; }
.history-search input { flex: 1; min-width: 0; }
.history-filter { display: flex; align-items: center; gap: 10px; margin: 8px 0; flex-wrap: wrap; }
.history-filter > .muted { flex: 0 0 auto; font-size: 13px; }
.history-filter .chips { margin: 0; }
.history-filter .chip { min-height: 34px; padding: 5px 13px; font-size: 13px; }

/* ===== 后台：看板数字卡 ===== */
.kpi-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(148px, 1fr)); gap: 12px; margin: 12px 0 24px; }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 15px 17px; box-shadow: var(--shadow-sm); }
.kpi-label { color: var(--muted); font-size: 13px; }
.kpi-value { font-size: 31px; font-weight: 750; line-height: 1.25; color: var(--primary-dark); margin-top: 2px; }
.kpi-sub { color: var(--muted); font-size: 12.5px; margin-top: 2px; min-height: 1em; }
.kpi.hot .kpi-value { color: var(--accent); }
.kpi.money .kpi-value { color: var(--primary); }

/* ===== 后台：柱状图 ===== */
.bars { display: flex; gap: 3px; align-items: flex-end; overflow-x: auto; padding: 12px 10px 4px;
  background: var(--card); border: 1px solid var(--line); border-radius: 16px; }
.bar-col { flex: 0 0 16px; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.bar-wrap { display: flex; align-items: flex-end; gap: 2px; height: 120px; }
.bar { display: block; width: 7px; min-height: 2px; border-radius: 3px 3px 0 0; }
.bar.b1 { background: var(--primary); }
.bar.b2 { background: #C9A227; }
.bar-day { color: var(--muted); font-size: 10px; }

/* ===== 后台：用户行的二级菜单 ===== */
.user-menu { flex: 1 0 100%; display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; padding-top: 8px;
  border-top: 1px dashed var(--line); }
