/* AI 管家 · 界面（DL-008「书房」：暖纸色、墨绿、黄铜细线，衬线标题，克制的渐隐渐显；不用图片，只有 CSS 和描边 SVG）。
   缅甸文排版按 docs/04：自带 Noto Sans Myanmar，正文 17px、行高 1.75（不低于 1.55），字距 0，不两端对齐，浏览器默认断行。
   颜色、字体、间距、动效时长都在 :root 的变量里，改一处全局生效。页面不允许内联样式（CSP），所以样式都在这里。 */

@font-face {
  font-family: "AB Myanmar";
  src: url("/static/fonts/noto-sans-myanmar-400.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: block;
  unicode-range: U+1000-109F, U+200C-200D, U+25CC, U+A92E, U+A9E0-A9FE, U+AA60-AA7F, U+116D0-116E3;
}
@font-face {
  font-family: "AB Myanmar";
  src: url("/static/fonts/noto-sans-myanmar-700.woff2") format("woff2");
  font-weight: 700; font-style: normal; font-display: block;
  unicode-range: U+1000-109F, U+200C-200D, U+25CC, U+A92E, U+A9E0-A9FE, U+AA60-AA7F, U+116D0-116E3;
}

:root {
  color-scheme: light dark;
  --paper: #f6f1e7; --paper-2: #efe8d9; --surface: #fffdf8; --surface-2: #faf5ea;
  --ink: #25211c; --ink-2: #4a443b; --muted: #6f675b;
  --line: #e3d9c6; --line-2: #d2c5a7;
  --green: #1f4f40; --green-2: #2b6a55; --on-green: #f6fbf8; --green-soft: #e3eee7;
  --brass: #94722a; --brass-soft: #f3e8c7;
  --wine: #8a2f3a; --wine-soft: #f6e3e3;
  --ok: #2f6b3a; --ok-soft: #e4f1e3;
  --warn: #85560a; --warn-soft: #fbefd2;
  --glow: rgba(214, 190, 130, .24);
  --shadow: 0 1px 0 rgba(255, 255, 255, .7) inset, 0 1px 2px rgba(60, 45, 20, .07), 0 10px 28px -14px rgba(60, 45, 20, .22);
  --radius: 16px; --radius-l: 24px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --t1: 160ms; --t2: 320ms; --t3: 560ms; --t4: 900ms;
  --font-serif: ui-serif, "Iowan Old Style", "Palatino Linotype", Palatino, "Songti SC", "Noto Serif CJK SC", "Source Han Serif SC", Georgia, serif;
  --font-sans: "AB Myanmar", system-ui, -apple-system, "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  --s-1: clamp(.875rem, .85rem + .12vw, .9375rem);  /* 小字不小于 14px（评测里年长的主家说状态、提问只有 12–13px，要放大） */
  --s0: clamp(1rem, .97rem + .15vw, 1.0625rem);
  --s1: clamp(1.125rem, 1.07rem + .3vw, 1.3rem);
  --s2: clamp(1.4rem, 1.2rem + .9vw, 1.85rem);
  --nav-h: 92px;   /* 手机底栏的实际高度（图标 + 一两行标签）；内容底部留白和提示条的位置都按它算 */
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #15120e; --paper-2: #1b1712; --surface: #1f1b15; --surface-2: #241f18;
    --ink: #efe6d4; --ink-2: #d5c9b3; --muted: #a99d88;
    --line: #342d22; --line-2: #473d2d;
    --green: #79b79d; --green-2: #93c9b1; --on-green: #0f1a15; --green-soft: #1d3329;
    --brass: #d3b25a; --brass-soft: #3a3118;
    --wine: #e59aa2; --wine-soft: #3a2024;
    --ok: #8ccf93; --ok-soft: #1c3320;
    --warn: #f0b457; --warn-soft: #382a10;
    --glow: rgba(90, 140, 115, .13);
    --shadow: 0 1px 0 rgba(255, 255, 255, .04) inset, 0 12px 28px -16px rgba(0, 0, 0, .7);
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; background: var(--paper); }
body {
  margin: 0; min-height: 100dvh; color: var(--ink);
  font: var(--s0) / 1.6 var(--font-sans);
  background: radial-gradient(900px 420px at 12% -8%, var(--glow), transparent 62%), var(--paper);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { margin: 0; font-family: var(--font-serif); font-weight: 600; line-height: 1.25; letter-spacing: .01em; }
h4 { margin: 0; font-size: var(--s-1); font-weight: 600; color: var(--muted); }
p { margin: 0; }
a { color: var(--green); }
ul, ol { margin: 0; padding-left: 1.3em; }
li { margin: 2px 0; }
:focus-visible { outline: 2px solid var(--brass); outline-offset: 2px; border-radius: 6px; }
::selection { background: var(--brass-soft); }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 1.35em; height: 1.35em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

/* ---- 缅甸文 ---- */
:lang(my) { font-family: var(--font-sans); font-size: 1.0625rem; line-height: 1.75; letter-spacing: 0; word-break: normal; overflow-wrap: break-word; text-align: start; }
:lang(my) h1, :lang(my) h2, :lang(my) h3 { font-family: var(--font-sans); font-weight: 700; font-size: 1.25rem; line-height: 1.6; }
:lang(my) h4, :lang(my) .muted, :lang(my) small, :lang(my) .hint, :lang(my) .chip, :lang(my) .tag, :lang(my) .step, :lang(my) .vis, :lang(my) .count { font-size: .9375rem; line-height: 1.7; }
:lang(my) .eyebrow { letter-spacing: 0; text-transform: none; font-size: .875rem; }
:lang(my) button, :lang(my) .btn, :lang(my) .nav-item { line-height: 1.6; }
:lang(my) .btn { min-height: 48px; }
:lang(en) { font-family: system-ui, -apple-system, sans-serif; }
:lang(my) .nav-item { font-size: .875rem; line-height: 1.55; }
.btn-label, .nav-label { font: inherit; }  /* 按钮和导航里的文字跟着按钮自己的字号走，不吃缅甸文的 1.0625rem */
/* 缅甸文的下限（docs/04）：次要文字不小于 14px、行高不低于 1.55——上面那些 var(--s-1) 的小字号和 .eyebrow 的紧行高会把它压下去，所以统一在这里兜底 */
:lang(my) .eyebrow { line-height: 1.7; }
:lang(my) .btn--sm, :lang(my) .banner, :lang(my) .now, :lang(my) summary, :lang(my) .how summary, :lang(my) details.more summary { font-size: .9375rem; line-height: 1.6; }
/* 一行里中文和缅甸文并排时（登录页），缅甸文跟着这一行的字号走 */
.field > span [lang="my"], .login-help [lang="my"], .login-brand p [lang="my"] { font-size: 1.04em; line-height: 1.6; }
.brand > span:last-child { white-space: nowrap; }
@media (max-width: 480px) {
  .appbar .btn-label { display: none; }  /* 窄屏：顶栏的按钮只留图标（有 aria-label 和 title） */
  .appbar [data-action="push"] { width: 44px; padding: 0; }
}

/* ---- 框架：手机竖屏底部导航；平板和桌面左侧导航；手机横屏窄导航 ---- */
.stage { max-width: 760px; margin: 0 auto; padding: 0 clamp(14px, 4vw, 28px) calc(var(--nav-h) + 40px + env(safe-area-inset-bottom)); overflow-x: clip; }
.appbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: calc(12px + env(safe-area-inset-top)) 0 4px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-serif); font-size: var(--s1); font-weight: 600; }
:lang(my) .brand { font-family: var(--font-sans); }
.brand small { display: block; margin-top: 3px; font: 500 .625rem/1 var(--font-sans); letter-spacing: .24em; color: var(--muted); text-transform: uppercase; }
.mono { display: grid; place-items: center; width: 34px; height: 34px; flex: none; border: 1px solid var(--brass); border-radius: 50%; color: var(--brass); font: 600 1.05rem/1 var(--font-serif); }
.appbar-actions { display: flex; align-items: center; gap: 4px; }
.nav {
  position: fixed; inset: auto 0 0 0; z-index: 5; display: flex; justify-content: space-around; gap: 4px;
  padding: 6px 10px calc(6px + env(safe-area-inset-bottom));
  background: color-mix(in srgb, var(--surface) 90%, transparent);
  -webkit-backdrop-filter: saturate(1.2) blur(14px); backdrop-filter: saturate(1.2) blur(14px);
  border-top: 1px solid var(--line);
}
.nav-brand, .nav-foot { display: none; }
.nav-item {
  position: relative; isolation: isolate; flex: 1; max-width: 170px; min-height: 52px; padding: 6px 4px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  border: 0; border-radius: 14px; background: transparent; color: var(--muted);
  font: 600 .875rem / 1.2 var(--font-sans); cursor: pointer; transition: color var(--t1) var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.nav-item::before { content: ""; position: absolute; inset: 3px 12%; z-index: -1; border-radius: 12px; background: var(--green-soft); opacity: 0; transform: scale(.92); transition: opacity var(--t2) var(--ease), transform var(--t2) var(--ease); }
.nav-item[aria-current="page"] { color: var(--green); }
.nav-item[aria-current="page"]::before { opacity: 1; transform: none; }
.nav-badge { position: absolute; top: 4px; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--wine); color: #fff; font: 700 .6875rem / 18px var(--font-sans); text-align: center; }
.nav-badge:empty { display: none; }

@media (min-width: 760px) {
  .shell { display: grid; grid-template-columns: 232px minmax(0, 1fr); max-width: 1120px; margin: 0 auto; }
  .nav { position: sticky; top: 0; inset: auto; height: 100dvh; flex-direction: column; justify-content: flex-start; gap: 6px; padding: 28px 18px; background: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; border-top: 0; border-right: 1px solid var(--line); }
  .nav-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 22px; font-family: var(--font-serif); font-size: var(--s1); font-weight: 600; }
  .nav-item { flex: none; max-width: none; flex-direction: row; justify-content: flex-start; gap: 12px; min-height: 48px; padding: 10px 14px; font-size: .95rem; }
  .nav-item::before { inset: 0; }
  .nav-badge { position: static; margin-left: auto; }
  .nav-foot { display: flex; flex-direction: column; gap: 4px; margin-top: auto; }
  .stage { width: 100%; padding-bottom: 56px; }
  .appbar { display: none; }
}
@media (orientation: landscape) and (max-height: 520px) and (max-width: 1000px) {
  .shell { display: grid; grid-template-columns: 76px minmax(0, 1fr); max-width: none; }
  .nav { position: sticky; top: 0; inset: auto; height: 100dvh; flex-direction: column; justify-content: center; gap: 4px; padding: 8px 6px; background: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; border-top: 0; border-right: 1px solid var(--line); }
  .nav-brand, .nav-foot { display: none; }
  .nav-item { flex: none; max-width: none; flex-direction: column; justify-content: center; gap: 2px; min-height: 52px; padding: 6px 2px; font-size: .6875rem; }
  .nav-item::before { inset: 2px 4px; }
  .nav-badge { position: absolute; margin: 0; }
  .appbar { display: flex; }
  .stage { padding-bottom: 28px; }
}

/* ---- 文字 ---- */
.eyebrow { font: 600 .6875rem / 1.2 var(--font-sans); letter-spacing: .18em; text-transform: uppercase; color: var(--brass); }
.title { font-size: var(--s2); }
.lede { color: var(--ink-2); max-width: 58ch; }
.muted { color: var(--muted); font-size: var(--s-1); }
.hint { margin-top: 6px; color: var(--muted); font-size: var(--s-1); }
.small { font-size: .875rem; }
.pre { margin: 6px 0; white-space: pre-wrap; }
.vis { margin-top: 10px; color: var(--muted); font-size: .875rem; }
.error { color: var(--wine); }
.orn { display: flex; align-items: center; gap: 10px; margin: 14px 0; color: var(--brass); }
.orn::before, .orn::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--line-2), transparent); }
.orn i { width: 6px; height: 6px; transform: rotate(45deg); border: 1px solid currentColor; }

/* ---- 每页的开头：这是什么、现在做什么 ---- */
.intro { padding: 10px 2px 6px; }
.intro .title { margin: 4px 0 6px; }
.greet { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin-bottom: 4px; color: var(--ink-2); }
.now { display: flex; align-items: center; gap: 8px; margin-top: 10px; padding: 8px 12px; border-radius: 12px; background: var(--green-soft); color: var(--green); font-weight: 600; font-size: var(--s-1); }
.now--calm { background: transparent; color: var(--muted); padding-left: 0; font-weight: 500; }
.how { margin-top: 8px; }
.how summary { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; color: var(--green); font-size: var(--s-1); font-weight: 600; cursor: pointer; list-style: none; }
.how summary::-webkit-details-marker { display: none; }
.how[open] summary { margin-bottom: 4px; }
.how-body { padding: 10px 12px; border-radius: 12px; background: var(--brass-soft); color: var(--ink-2); font-size: var(--s-1); }
.how-body li { margin: 4px 0; }

/* ---- 卡片 ---- */
.card { position: relative; margin: 0 0 12px; padding: 16px 16px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card--formal::after { content: ""; position: absolute; inset: 5px; border: 1px solid var(--brass-soft); border-radius: calc(var(--radius) - 5px); pointer-events: none; }
.card--warn { border-color: color-mix(in srgb, var(--warn) 40%, var(--line)); background: linear-gradient(var(--warn-soft), var(--surface) 70%); }
.card--soft { background: var(--surface-2); box-shadow: none; }
.card--done { opacity: .78; }
.section { margin: 22px 0 6px; }
.section-head { display: flex; align-items: baseline; gap: 8px; margin: 0 2px 10px; }
.section-head h2 { font-size: var(--s1); }
.count { padding: 0 8px; border-radius: 999px; background: var(--paper-2); color: var(--muted); font: 700 .75rem / 1.7 var(--font-sans); }
details.fold > summary { display: flex; align-items: baseline; gap: 8px; margin: 0 2px 10px; cursor: pointer; list-style: none; }
details.fold > summary::-webkit-details-marker { display: none; }
details.fold > summary::after { content: "›"; margin-left: auto; color: var(--muted); transition: transform var(--t2) var(--ease); }
details.fold[open] > summary::after { transform: rotate(90deg); }

/* ---- 控件 ---- */
.btn {
  --spin: var(--green);
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 9px 18px;
  border: 1px solid transparent; border-radius: 12px; background: transparent; color: var(--green);
  font: 600 var(--s0) / 1.2 var(--font-sans); cursor: pointer; -webkit-tap-highlight-color: transparent;
  transition: transform var(--t1) var(--ease), background var(--t1), box-shadow var(--t1), opacity var(--t1);
}
.btn:active { transform: scale(.96); }
.btn--primary { --spin: var(--on-green); background: var(--green); color: var(--on-green); box-shadow: 0 1px 0 rgba(255, 255, 255, .16) inset, 0 6px 14px -8px var(--green); }
.btn--primary:hover { background: var(--green-2); }
.btn--ghost { border-color: var(--line-2); }
.btn--ghost:hover { background: var(--green-soft); }
.btn--quiet { --spin: var(--muted); min-height: 38px; padding: 6px 10px; color: var(--muted); font-weight: 500; }
.btn--quiet:hover { color: var(--green); }
.btn--sm { min-height: 38px; padding: 5px 13px; font-size: var(--s-1); }
.btn--block { width: 100%; }
.btn--icon { width: 44px; padding: 0; }
a.btn { text-decoration: none; }
.btn:disabled { opacity: .6; cursor: progress; }
.btn.is-busy { pointer-events: none; }
.btn.is-busy > * { opacity: 0; }
.btn.is-busy::after { content: ""; position: absolute; inset: 0; margin: auto; width: 1.15em; height: 1.15em; border: 2px solid color-mix(in srgb, var(--spin) 28%, transparent); border-top-color: var(--spin); border-radius: 50%; animation: spin .8s linear infinite; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
.row--tight { margin-top: 8px; }
.input, .textarea, .select, input[type="text"], input[type="password"], textarea, select {
  width: 100%; padding: 11px 14px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--surface); color: var(--ink);
  font: inherit; transition: border-color var(--t1), box-shadow var(--t1);
}
textarea { min-height: 5.2em; resize: vertical; }
select { min-height: 46px; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--brass); box-shadow: 0 0 0 3px var(--brass-soft); }
::placeholder { color: color-mix(in srgb, var(--muted) 75%, transparent); }
.field { display: block; margin-bottom: 14px; }
.field > span { display: block; margin-bottom: 5px; font-weight: 600; font-size: var(--s-1); color: var(--ink-2); }
.field .q { font-weight: 400; color: var(--ink); font-size: var(--s0); }
.seg-group { position: relative; isolation: isolate; display: inline-grid; grid-auto-flow: column; grid-auto-columns: 1fr; margin-bottom: 12px; padding: 3px; border-radius: 999px; background: var(--paper-2); }
.seg-group--wide { display: grid; width: 100%; }
.seg { position: relative; z-index: 1; min-height: 38px; padding: 3px 20px; border: 0; border-radius: 999px; background: transparent; color: var(--muted); font: 600 var(--s-1) / 1.25 var(--font-sans); cursor: pointer; transition: color var(--t2) var(--ease); }
.seg[aria-pressed="true"] { color: var(--green); }
.seg-thumb { position: absolute; z-index: 0; top: 3px; bottom: 3px; left: 3px; width: calc((100% - 6px) / var(--n, 2)); border-radius: 999px; background: var(--green-soft); border: 1px solid color-mix(in srgb, var(--green) 42%, transparent);
  box-shadow: 0 1px 3px rgba(60, 45, 20, .18), 0 8px 16px -8px color-mix(in srgb, var(--green) 55%, transparent); transform: translateX(calc(var(--i, 0) * 100%)); transition: transform 520ms cubic-bezier(.2, 1.4, .45, 1); }
.chip { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 0 6px; padding: 1px 10px; border-radius: 999px; background: var(--paper-2); color: var(--ink-2); font: 600 .875rem / 1.7 var(--font-sans); }
.chip--draft, .chip--question { background: var(--warn-soft); color: var(--warn); }
.chip--sent { background: var(--green-soft); color: var(--green); }
.chip--acked { background: var(--ok-soft); color: var(--ok); }
.chip--done { color: var(--muted); }
.tag { display: inline-block; margin-left: 6px; padding: 0 8px; border-radius: 999px; background: var(--brass-soft); color: var(--warn); font-size: .875rem; vertical-align: middle; }
.check { display: flex; align-items: flex-start; gap: 10px; padding: 6px 0; cursor: pointer; }
.check input { flex: none; width: 22px; height: 22px; margin-top: 3px; accent-color: var(--green); }
details.more { margin-top: 8px; }
details.more summary { display: inline-flex; align-items: center; min-height: 32px; color: var(--green); font-size: var(--s-1); font-weight: 600; cursor: pointer; }

/* ---- 步骤条：写 → 核对 → 发出 ---- */
.steps { display: flex; gap: 6px; margin: 0 0 12px; padding: 0; list-style: none; counter-reset: s; }
.step { display: flex; align-items: center; gap: 6px; flex: 1; min-width: 0; margin: 0; color: var(--muted); font-size: .75rem; }
.step::before { counter-increment: s; content: counter(s); display: grid; place-items: center; flex: none; width: 20px; height: 20px; border: 1px solid var(--line-2); border-radius: 50%; font-size: .6875rem; font-weight: 700; }
.step[aria-current="step"] { color: var(--green); font-weight: 700; }
.step[aria-current="step"]::before { background: var(--green); border-color: var(--green); color: var(--on-green); }
.step.is-done::before { content: "✓"; border-color: transparent; background: var(--green-soft); color: var(--green); }

/* ---- 吩咐卡片 ---- */
.relay { padding: 0; }
.relay-head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 12px 16px 0; }
.relay-body { padding: 6px 16px 2px; }
.relay-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 6px 16px 14px; }
.relay-text { margin: 4px 0 6px; font-family: var(--font-serif); font-size: var(--s1); line-height: 1.5; white-space: pre-wrap; }
:lang(my) .relay-text { font-family: var(--font-sans); font-size: 1.125rem; line-height: 1.75; }  /* docs/04：行高不低于 1.55；.relay-text 自己的 1.5 会盖掉 :lang(my) 的 1.75 */
.block { margin: 12px 0; }
.block h4 { margin-bottom: 4px; }
.back { margin: 0; padding: 10px 12px; border-radius: 12px; background: var(--green-soft); }
.asks li { color: var(--warn); }
.note { margin: 12px 16px; padding: 2px 0 2px 12px; border-left: 2px solid var(--line-2); }
.note .meta { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; }
.note--question { border-left-color: var(--warn); }
.note--reply { border-left-color: var(--green); }
.note--draft { padding: 10px 12px; border-radius: 0 12px 12px 0; background: var(--warn-soft); }
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.suggest { margin-top: 10px; padding: 10px 12px; border-radius: 12px; background: var(--brass-soft); }
.suggest .hint { margin-top: 0; }
.ingredients { padding: 0; list-style: none; }
.ingredients small, .item-text small { display: block; }
.preview { display: flex; align-items: flex-end; gap: 8px; margin-top: 10px; }
.preview img { max-width: 120px; max-height: 160px; border: 1px solid var(--line); border-radius: 10px; }

/* ---- 确认卡片：一次一个短问题，带选项，第几题 / 共几题 ---- */
.ask { margin: 4px 0 14px; padding: 14px; border: 1px solid color-mix(in srgb, var(--brass) 45%, var(--line)); border-radius: var(--radius); background: var(--surface); }
.ask-intro { color: var(--ink-2); font-size: var(--s-1); }
.ask-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 10px 0 8px; }
.ask-count { color: var(--brass); font: 700 var(--s-1) / 1.2 var(--font-sans); letter-spacing: .04em; }
.ask-dots { display: flex; gap: 6px; }
.ask-dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--line-2); transition: background var(--t2) var(--ease), transform var(--t2) var(--ease); }
.ask-dots i.is-done { background: var(--green); opacity: .55; }
.ask-dots i.is-now { background: var(--green); transform: scale(1.35); }
.ask-q { margin: 2px 0 12px; font-size: var(--s1); }
.ask-opts { display: grid; gap: 8px; }
.opt { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 52px; padding: 10px 14px; border: 1px solid var(--line-2); border-radius: 14px; background: var(--surface); color: var(--ink); font: 600 var(--s0) / 1.35 var(--font-sans); text-align: start; cursor: pointer; transition: border-color var(--t1), background var(--t1), transform var(--t1) var(--ease); -webkit-tap-highlight-color: transparent; }
.opt:hover { border-color: var(--green); }
.opt:active { transform: scale(.985); }
.opt-mark { flex: none; width: 20px; height: 20px; border: 2px solid var(--line-2); border-radius: 50%; transition: border-color var(--t1), background var(--t1); }
.opt.is-picked { border-color: var(--green); background: var(--green-soft); }
.opt.is-picked .opt-mark { border-color: var(--green); background: radial-gradient(circle, var(--green) 0 45%, transparent 50%); }
.opt-text { flex: 1; min-width: 0; }
.opt .tag { margin: 0; white-space: nowrap; }
.opt--other { color: var(--muted); font-weight: 500; border-style: dashed; }
.opt--multi .opt-mark { border-radius: 6px; }
.opt--multi.is-picked .opt-mark { background: var(--green); }
.ask-other { display: flex; gap: 8px; margin-top: 10px; }
.ask-other input { flex: 1; min-width: 0; }
.ask-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-top: 12px; }
.callout { margin: 10px 0; }
/* ---- 请安折 ---- */
.digest { padding: 18px 18px 14px; }
.digest-title { display: flex; align-items: center; gap: 10px; }
.digest-title h2 { margin: 0; font: 600 var(--s1) / 1.25 var(--font-serif); }
.digest-head { margin: 8px 0 10px; color: var(--ink-2); font-size: var(--s0); }
.digest-sec { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.digest-sec h3 { margin: 0 0 6px; color: var(--muted); font: 600 var(--s-1) / 1.3 var(--font-sans); letter-spacing: .06em; }
.digest-list { margin: 0; padding-inline-start: 1.2em; }
.digest-list li { margin: 3px 0; }
.digest-tips { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.digest-tip { padding: 12px 14px; border-radius: 14px; background: var(--brass-soft); }
.tip-fact { margin: 0; font-weight: 700; }
.tip-advice { margin: 4px 0 0; }
.tip-chose { margin: 8px 0 0; }
.digest-tip .hint { margin: 6px 0 8px; }
.digest--old > summary { display: block; cursor: pointer; list-style: none; }
.digest--old > summary::-webkit-details-marker { display: none; }
.digest-sum { display: block; margin-top: 2px; font-size: var(--s-1); }
.digest--old[open] > summary { margin-bottom: 6px; }

/* ---- 语音输入：录完再转 ---- */
.mic { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin: 8px 0 2px; }
.mic[hidden] { display: none; }
.mic-note { flex: 1 1 14rem; color: var(--muted); font-size: .8125rem; line-height: 1.45; }
.mic-rec { display: inline-flex; align-items: center; gap: 10px; min-height: 38px; padding: 0 14px; border-radius: 999px; background: var(--warn-soft); color: var(--ink); --lv: 0; }
.mic-dot { width: 10px; height: 10px; border-radius: 50%; background: #c2402f; animation: mic-pulse 1.2s ease-in-out infinite; }
.mic-time { min-width: 3.2em; font: 700 var(--s-1) / 1 var(--font-sans); font-variant-numeric: tabular-nums; }
.mic-bars { display: inline-flex; align-items: center; gap: 3px; height: 20px; }
.mic-bars i { width: 3px; height: 100%; border-radius: 2px; background: var(--green); transform-origin: center; transform: scaleY(calc(.18 + var(--lv) * var(--k, 1))); transition: transform 90ms linear; }
.mic-bars i:nth-child(1) { --k: .5; } .mic-bars i:nth-child(2) { --k: .9; } .mic-bars i:nth-child(3) { --k: 1.1; } .mic-bars i:nth-child(4) { --k: .8; } .mic-bars i:nth-child(5) { --k: .45; }
.mic-working { display: inline-flex; align-items: center; gap: 8px; min-height: 38px; color: var(--ink-2); font-size: var(--s-1); }
.mic-working .spin { width: 1.1em; height: 1.1em; border: 2px solid var(--line-2); border-top-color: var(--green); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes mic-pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .45; transform: scale(.8); } }
@media (prefers-reduced-motion: reduce) { .mic-dot, .mic-working .spin { animation: none; } .mic-bars i { transition: none; } }

/* 阿姨核对页：管家会怎么问太太（缅甸文的问题和选项，只读） */
.askprev { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.askprev > li { padding: 10px 12px; border-radius: 12px; background: var(--green-soft); }
.askprev .pre { margin: 0 0 6px; font-weight: 600; }
.askprev-opts { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.askprev-opts li { padding: 2px 10px; border: 1px solid var(--line-2); border-radius: 999px; background: var(--surface); color: var(--ink-2); font-size: var(--s-1); }

/* ---- 采购清单 ---- */
.add-item { display: flex; gap: 8px; align-items: stretch; }
.add-item input { flex: 1; min-width: 0; }
.shopping { padding: 0; list-style: none; }
.item { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; padding: 4px 8px 4px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); }
.item .check { flex: 1; min-width: 0; }
.item-text { display: flex; flex-direction: column; min-width: 0; }
.item.bought .item-text > span { color: var(--muted); text-decoration: line-through; }
.item.new { border-color: color-mix(in srgb, var(--warn) 45%, var(--line)); }
.item-sub { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 6px; }
.item-sub:empty { display: none; }
.item-sub .tag { margin-left: 0; }
.banner { margin: 8px 0; padding: 8px 12px; border-radius: 12px; background: var(--warn-soft); color: var(--warn); font-size: var(--s-1); }

/* ---- 家规 ---- */
.cat { margin-bottom: 14px; }
.cat-title { margin: 16px 2px 6px; font-size: var(--s-1); font-weight: 600; letter-spacing: .06em; color: var(--brass); }
.rules { padding: 0; list-style: none; }
.rule { margin-bottom: 8px; padding: 10px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); }
.rule > .pre { margin: 0; }
.rule-draft { background: var(--warn-soft); border-color: transparent; box-shadow: none; }
.rule-off { opacity: .7; }

/* ---- 空状态、提示、弹窗 ---- */
.empty { display: grid; justify-items: center; gap: 8px; padding: 30px 18px; text-align: center; color: var(--muted); }
.empty .orn { width: 140px; margin: 0 0 4px; }
.empty h3 { color: var(--ink); font-size: var(--s1); }
.empty p { max-width: 36ch; }
.callout { display: flex; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--brass-soft); color: var(--ink-2); font-size: var(--s-1); }
dialog.sheet { width: min(560px, calc(100vw - 24px)); max-height: min(88dvh, 760px); padding: 0; border: 1px solid var(--line); border-radius: var(--radius-l); background: var(--surface); color: var(--ink); box-shadow: 0 30px 80px -20px rgba(30, 20, 5, .5); overflow: auto; }
dialog.sheet::backdrop { background: rgba(20, 15, 8, .5); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); animation: fade var(--t2) var(--ease); }
dialog.sheet[open] { animation: sheetin var(--t3) var(--ease); }
.sheet-body { padding: 22px 22px 8px; }
.sheet-body h2 { margin: 4px 0 4px; font-size: var(--s2); }
.sheet-list { margin: 14px 0 0; padding: 0; list-style: none; display: grid; gap: 12px; }
.sheet-list li { display: grid; grid-template-columns: 34px 1fr; gap: 12px; margin: 0; }
.sheet-list .n { display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid var(--brass); border-radius: 50%; color: var(--brass); font: 600 1rem / 1 var(--font-serif); }
.sheet-list b { display: block; font-family: var(--font-serif); font-size: var(--s0); }
:lang(my) .sheet-list b { font-family: var(--font-sans); }
.sheet-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 22px 20px; }
@media (max-width: 600px) { dialog.sheet { width: 100%; max-width: none; margin: auto 0 0; border-radius: var(--radius-l) var(--radius-l) 0 0; } }
.toast { position: fixed; left: 50%; bottom: calc(var(--nav-h) + 16px + env(safe-area-inset-bottom)); z-index: 20; max-width: min(92vw, 520px); padding: 11px 16px; border-radius: 14px; background: var(--ink); color: var(--paper); box-shadow: var(--shadow); transform: translateX(-50%); animation: toastin var(--t2) var(--ease) both; }
@media (min-width: 760px) { .toast { bottom: 28px; } }

/* ---- 登录页 ---- */
.login { min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; }
.login-card { width: min(430px, 100%); }
.login-brand { display: grid; justify-items: center; gap: 6px; margin-bottom: 18px; text-align: center; }
.login-brand .mono { width: 52px; height: 52px; font-size: 1.5rem; }
.login-brand h1 { font-size: var(--s2); }
.login-brand p { color: var(--ink-2); }
.login-help { margin-top: 14px; color: var(--muted); font-size: var(--s-1); text-align: center; }

/* ---- 上岗手册（能打印的一页） ---- */
.handbook { max-width: 840px; margin: 0 auto; padding: 0 clamp(14px, 4vw, 28px) 48px; }
.hb-head h1 { margin: 22px 0 4px; font-size: var(--s2); }
.hb-group { margin-bottom: 18px; break-inside: avoid; }
.hb-group h2 { margin: 20px 0 6px; font-size: var(--s1); color: var(--green); }
.hb-table { width: 100%; border-collapse: collapse; }
.hb-table td { width: 50%; padding: 8px 10px; border-top: 1px solid var(--line); vertical-align: top; }

/* ---- 阿姨端"今天"：待办清单（DL-033：简洁、没有动效、按钮大而且分得开、位置稳定） ---- */
.task-list { padding: 0; list-style: none; }
.task { margin: 0 0 12px; padding: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.task--done { background: var(--surface-2); box-shadow: none; }
.task-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin-bottom: 6px; color: var(--muted); font-size: var(--s-1); }
/* 英文行高 1.55（原来 1.7：一条 330 字的长待办在 360 宽的手机上占 1200 多像素）；缅甸文行高不动（下限 1.7） */
.task-text { margin: 4px 0 8px; font-size: 1.125rem; line-height: 1.55; white-space: pre-wrap; }
.task-text--long { font-size: 1.0625rem; }
.task-text:lang(my) { font-size: 1.1875rem; line-height: 1.8; }  /* 元素自己是缅甸文才用（原来写成 :lang(my) .task-text：阿姨端整页 lang=my，英文那一段也吃了缅甸文的行高 1.8 和字号） */
.task--done .task-text { color: var(--muted); text-decoration: line-through; }
.task-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin-bottom: 4px; }
.task-tools .hint { margin: 0; }
/* 窄屏：两个小按钮并排（原来一个占一行，每个 64 像素高），"译文还没好"的提示单独占一行 */
@media (max-width: 480px) {
  .task-tools { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 8px; }
  .task-tools .btn { width: 100%; padding-left: 6px; padding-right: 6px; font-size: .9375rem; }
  .task-actions .btn--lg { padding: 10px 8px; font-size: 1rem; }
  .task-tools .hint { grid-column: 1 / -1; }
}
.task-done { display: flex; align-items: center; gap: 8px; margin-top: 6px; color: var(--ok); font-weight: 700; }
.task-thread { margin-top: 10px; }
/* 窄屏：提问的输入框用满卡片的宽度（原来两边各缩进 16px，320 宽的手机上输入框只剩 204px） */
@media (max-width: 480px) { .task > .note { margin-left: 0; margin-right: 0; } }
.task-thread .note { margin: 12px 0; }
.task-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 16px; }
.task-actions .btn { width: 100%; }
.task-actions .btn:only-child { grid-column: 1 / -1; }
.task-actions--done { grid-template-columns: 3fr 2fr; }
.task-actions--done .btn:only-child { grid-column: 1; }  /* 点完"完成"："撤销"在原来"提问"的位置，原来"完成"的位置是空的（再点一下什么也不会发生） */
.task-actions .is-gone { visibility: hidden; }  /* 撤销的时间过了：看不见，位置还在，下面的卡片不动 */
.btn--lg { min-height: 56px; padding: 12px 18px; font-size: 1.0625rem; }
:lang(my) .btn--lg { min-height: 56px; font-size: 1.0625rem; }
.form-actions { display: grid; gap: 12px; margin-top: 12px; }
.ask-form textarea { min-height: 6.5em; }
.message-card { margin-bottom: 12px; padding: 8px 10px; }
.message-card .row { margin-top: 0; }
.message-card .row > .btn { width: 100%; }  /* 一整条按钮，不是卡片里一个靠左的小按钮 */
.row--tight { margin-top: 0; }
.reads { padding: 22px 18px; }
.reads-choices { display: grid; gap: 14px; margin: 18px 0 10px; }
.helper-foot { display: grid; gap: 10px; margin: 28px 2px 8px; }
.helper-foot .vis { margin-top: 0; }
.askprev-opts li { white-space: normal; }

/* ---- 主家"今天"：输入条、阿姨的问题、进度（DL-033） ---- */
.composer { padding-bottom: 12px; }
.composer textarea { min-height: 3.6em; }
.composer-bar { display: flex; align-items: stretch; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.composer-bar .mic { flex: 1 1 8rem; margin: 0; }
.composer-bar .mic-start { width: 100%; min-height: 56px; padding: 0 20px; font-size: var(--s0); }  /* 话筒是最大的按钮 */
.composer-bar .mic-note { display: none; }
.composer-bar > .btn { flex: 1 1 8rem; min-height: 56px; padding: 0 22px; }
.recent { margin: 0 0 12px; }  /* 刚发的：一个头（"刚发的"和"撤回"）+ 每一项分到了哪一类 */
.recent-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0 0 4px; padding: 0 4px; font-size: var(--s-1); }
.recent-head .btn { flex: none; }
.routed-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; margin: 0; padding: 0; list-style: none; }  /* minmax(0,…)：长句子不能把按钮挤出屏幕 */
.routed { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; min-width: 0; margin: 0; padding: 6px 8px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); font-size: var(--s-1); }
.routed-text { flex: 1 1 8rem; min-width: 0; overflow-wrap: anywhere; color: var(--ink-2); }
.routed-pick { display: flex; flex-wrap: wrap; gap: 6px; }
.chip--route { flex: none; }
.chip--route-rule { background: var(--green-soft); color: var(--green); }
.chip--route-shopping { background: var(--brass-soft); color: var(--brass); }
.chip--route-recipe { background: var(--warn-soft); color: var(--warn); }
.composer-extra { margin-top: 8px; display: flex; align-items: center; }
.entry-hint { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; margin: 0 0 12px; }
.entry-hint .hint { flex: 1 1 14rem; margin: 0; }
.q-text { margin: 6px 0 2px; font-weight: 700; font-size: var(--s1); }
.q-ask { margin: 10px 0 6px; font-weight: 600; }
.opts { display: grid; gap: 8px; }
.card .reply { margin-top: 10px; }
.etasks { padding: 0; list-style: none; }
.etask { margin: 0 0 8px; padding: 10px 12px 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); }
.etask.is-done { background: var(--surface-2); box-shadow: none; }
.etask.is-done .etask-text { color: var(--muted); text-decoration: line-through; }
.etask-main { display: flex; align-items: flex-start; gap: 10px; }
.etask-mark { flex: none; display: grid; place-items: center; width: 24px; height: 24px; margin-top: 2px; color: var(--ok); }
.etask-box { width: 18px; height: 18px; border: 2px solid var(--line-2); border-radius: 6px; }
.etask-body { flex: 1; min-width: 0; }
.etask-text { margin: 0; font-size: var(--s0); white-space: pre-wrap; }
.etask-status { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; margin: 2px 0 0; color: var(--muted); font-size: var(--s-1); }
.etask-status .tag { margin-left: 0; }
.etask-thread { margin: 8px 0 2px 34px; padding-left: 10px; border-left: 2px solid var(--line-2); }
.etask-note { margin: 3px 0; font-size: var(--s-1); color: var(--ink-2); }
.etask-note.is-open { color: var(--warn); }
.etask .more { margin: 4px 0 0 34px; }
progress { flex: 1; min-width: 80px; max-width: 220px; height: 8px; accent-color: var(--green); }
.section-head progress { align-self: center; }
.foot-link { margin: 18px 2px 4px; text-align: center; font-size: var(--s-1); }

/* ---- 动效 ----
   负责人 11-17："足够的渐隐渐显动效"；11-24 晚："所有的效果好像没有看到什么效果"（DL-031）。
   只用透明度、位移和很小的缩放，不动布局（只有"收起"一张卡片时动它的高度）。
   入场：载入和切页时，这一页的各块依次淡入上浮；用户自己做的事马上带来的新卡片，再多一圈黄铜色的柔光，让人看见"东西出在这里"。
   离场：发出、取消、停用、删除的时候，卡片先渐隐、再收起，不是一下子消失。
   等待：管家整理的时候，列表上方有一张"整理中"的卡片（呼吸点 + 流光的占位行）。
   系统开了"减少动态效果"：不关掉，只留透明度的淡入淡出，去掉位移、缩放和循环的动画，时间也缩短。 */
@keyframes rise { from { opacity: 0; transform: translateY(30px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes slidein { from { transform: translateX(calc(var(--dir, 0) * 56px)); } to { transform: none; } }
@keyframes swapin { from { opacity: 0; transform: translateX(calc(var(--dir, 1) * 36px)); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes fade-out { to { opacity: 0; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes toastin { from { opacity: 0; transform: translate(-50%, 22px); } to { opacity: 1; transform: translate(-50%, 0); } }
@keyframes toastout { to { opacity: 0; transform: translate(-50%, 8px); } }
@keyframes sheetin { from { opacity: 0; transform: translateY(14px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes glow {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--brass) 0%, transparent), var(--shadow); }
  25% { box-shadow: 0 0 0 7px color-mix(in srgb, var(--brass) 55%, transparent), var(--shadow); }
  100% { box-shadow: 0 0 0 22px color-mix(in srgb, var(--brass) 0%, transparent), var(--shadow); }
}
@keyframes breathe { 0%, 100% { opacity: .3; transform: scale(.75); } 50% { opacity: 1; transform: scale(1); } }
@keyframes shimmer { from { background-position: 130% 0; } to { background-position: -130% 0; } }
@keyframes pop { 0% { transform: scale(1); } 35% { transform: scale(1.4); } 100% { transform: scale(1); } }
@keyframes leave { to { opacity: 0; transform: translateY(-16px) scale(.96); } }

.enter { animation: rise var(--t4) var(--ease) both; animation-delay: calc(var(--i, 0) * 90ms); }
.enter--glow { animation: rise var(--t4) var(--ease) calc(var(--i, 0) * 90ms) both, glow 2.1s ease-out calc(var(--i, 0) * 90ms + 560ms); }
.panel { animation: slidein 560ms var(--ease) both; }  /* 整页从切换的方向滑进来（--dir：往后一页 1，往前一页 -1），里面的各块再依次淡入 */
.leave { pointer-events: none; overflow: hidden; animation: leave 420ms var(--ease) both;
  transition: height 380ms var(--ease) 150ms, margin 380ms var(--ease) 150ms, padding 380ms var(--ease) 150ms, border-width 380ms var(--ease) 150ms; }
.leave--collapse { height: 0 !important; margin-top: 0 !important; margin-bottom: 0 !important; padding-top: 0 !important; padding-bottom: 0 !important; border-width: 0 !important; }
.toast.is-out { animation: toastout var(--t2) var(--ease) both; }
.nav-badge.pop { animation: pop 460ms var(--ease); }

.card--ghost { overflow: hidden; }
.ghost-title { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; color: var(--ink-2); font-weight: 600; }
.ghost-dots { display: inline-flex; gap: 5px; }
.ghost-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); animation: breathe 1.3s ease-in-out infinite; }
.ghost-dots i:nth-child(2) { animation-delay: .2s; }
.ghost-dots i:nth-child(3) { animation-delay: .4s; }
.ghost-lines { display: grid; gap: 10px; }
.ghost-lines i { height: 12px; border-radius: 6px; background: linear-gradient(90deg, var(--paper-2) 30%, color-mix(in srgb, var(--brass) 26%, var(--paper-2)) 50%, var(--paper-2) 70%); background-size: 260% 100%; animation: shimmer 1.7s linear infinite; }
.ghost-lines i:nth-child(1) { width: 92%; }
.ghost-lines i:nth-child(2) { width: 78%; }
.ghost-lines i:nth-child(3) { width: 56%; }

.login-card > * { animation: rise var(--t4) var(--ease) both; }

/* 内容随开关切换：旧的往开关反方向淡出，新的从开关的方向淡入（--dir：往后一项 1，往前一项 -1） */
.swap { transition: opacity 190ms var(--ease), transform 190ms var(--ease); }
.swap.is-out { opacity: 0; transform: translateX(calc(var(--dir, 1) * -36px)); }
.swap.is-in { animation: swapin 480ms var(--ease) both; }

/* 导航的滑块：选中的那项后面有一块底，切页时滑过去。位置由脚本量（手机底栏、桌面侧栏、横屏窄栏三种布局都从选中项原来那块底量）；脚本没跑时还是原来的淡入淡出 */
.nav-thumb { position: absolute; z-index: 0; left: 0; top: 0; width: var(--w, 0); height: var(--h, 0); border-radius: 12px; background: var(--green-soft); opacity: 0; pointer-events: none;
  transform: translate(var(--x, 0), var(--y, 0)); transition: transform 560ms cubic-bezier(.34, 1.45, .64, 1), width 420ms var(--ease), height 420ms var(--ease), opacity 240ms; }
.nav[data-slider] .nav-thumb { opacity: 1; }
.nav[data-slider] .nav-item::before { opacity: 0 !important; }
.nav--jump .nav-thumb { transition: none; }
.login-card > :nth-child(2) { animation-delay: 100ms; }
.login-card > :nth-child(3) { animation-delay: 200ms; }
.login-card > :nth-child(4) { animation-delay: 300ms; }
.login-card > :nth-child(n+5) { animation-delay: 400ms; }

@media (hover: hover) {
  .btn--primary:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 1px 0 rgba(255, 255, 255, .16) inset, 0 14px 26px -10px var(--green); }
  .btn--primary:active:not(:disabled) { transform: scale(.96); }
}

@media (prefers-reduced-motion: reduce) {
  /* 不是全部关掉（负责人要的就是渐隐渐显）：只留透明度的淡入淡出，去掉位移、缩放和循环的动画，时间缩短 */
  html { scroll-behavior: auto; }
  .enter, .enter--glow, .panel, .login-card > * { animation: fade 280ms ease-out both; animation-delay: calc(var(--i, 0) * 40ms); }
  .panel { animation-delay: 0ms; }
  .swap.is-out { transform: none; }
  .swap.is-in { animation: fade 260ms ease-out both; }
  .seg-thumb, .nav-thumb { transition: none; }
  .login-card > :nth-child(n) { animation-delay: 0ms; }
  .leave { animation: fade-out 220ms ease-out both; transition: none; }
  .toast { animation: fade 220ms ease-out both; }
  .toast.is-out { animation: fade-out 220ms ease-out both; }
  .ghost-dots i, .ghost-lines i, .nav-badge.pop { animation: none; }
  .ghost-lines i { background: var(--paper-2); }
  .btn--primary:hover:not(:disabled) { transform: none; }
}

/* ---- 阿姨端：没有动效（负责人 11-25："阿姨端可以不要动效，界面简洁明了，降低误触风险"，DL-034）----
   没有动画、没有过渡、没有滑动；位置不跳。验证里 Ma Su："每次点完、每次切页，都有约 2 秒的暗屏入场动画。"主家端的动效不变。 */
.role-helper *, .role-helper *::before, .role-helper *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
.role-helper .nav-thumb { display: none; }
.role-helper .btn.is-busy { opacity: .6; }

@media print {
  :root { --paper: #fff; --surface: #fff; --ink: #000; --ink-2: #222; --muted: #444; --line: #bbb; --green: #1f4f40; color-scheme: light; }
  body { background: #fff; }
  .no-print { display: none !important; }
  .handbook { max-width: none; padding: 0; }
}

/* ---- 验证重跑后的修复（DL-039） ---- */
.etask-tools { display: flex; flex: none; align-items: center; gap: 2px; }
.etask-confirm { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 8px 0 4px 34px; padding: 8px 10px; border-radius: 12px; background: var(--warn-soft); color: var(--warn); font-weight: 600; }
.etask-edit { margin: 8px 0 4px 34px; }
.etask-edit textarea { width: 100%; }
.etask-calm { margin: 6px 0 0 34px; }
.banner .pre { margin: 4px 0; }
.task-checking { margin: 4px 0 8px; }
.flag-confirm { margin: 8px 0; padding: 12px 14px; border-radius: 14px; background: var(--warn-soft); color: var(--ink); }
.flag-confirm p { margin: 0 0 10px; font-weight: 600; }
.item { flex-wrap: wrap; }
.item .btn--icon { min-width: 44px; min-height: 44px; margin-left: 8px; font-size: 1.25rem; }  /* 手湿的时候点得到，也不会点到旁边的勾选框 */
.item-confirm { display: flex; flex: 1 1 100%; flex-wrap: wrap; align-items: center; gap: 8px; margin: 2px 0 6px; padding: 8px 10px; border-radius: 12px; background: var(--warn-soft); color: var(--warn); font-weight: 600; }

/* ---- 英文为主、缅甸文作参考（DL-041） ---- */
.ref-my { margin: 8px 0 2px; padding: 8px 12px; border-left: 3px solid var(--line-2); border-radius: 8px; background: var(--surface-2); }
.ref-label { margin: 0 0 4px; color: var(--muted); font-size: var(--s-1); }
.ref-label span { display: block; }
.ref-text { margin: 0; color: var(--ink-2); font-size: 1rem; }
:lang(my) .ref-text { font-size: 1.0625rem; }

/* 阿姨端：英文为主、缅甸文辅助（DL-043）。每条文字是"英文 + 小一号的缅甸文"，缅甸文另起一行 */
.my-line { display: block; margin-top: 1px; font-size: .8125em; font-weight: 400; font-style: normal; letter-spacing: 0; line-height: 1.7; color: var(--muted); }
:lang(my) small.my-line { font-size: .875rem; }
.btn .my-line, .nav-item .my-line, .chip .my-line, .tag .my-line { color: inherit; opacity: .85; }
.nav-item { min-width: 0; }
.nav-item .nav-label { display: block; max-width: 100%; text-align: center; }
/* 底栏每个键只有 80 来像素宽，"ဘောက်ချာများ"这样的缅甸文词一行放不下（2026-12-02 在 360 宽的手机上量：4 个标签里 3 个超出格子，第 4 个超出屏幕右边、互相挤在一起）。
   原来写的是"一行放下，放不下就小一号"，但缅甸文下限（14px，docs/04）的规则排在后面把字号顶了回去，nowrap 留了下来。
   现在：字号不动，允许折成两行（浏览器按词断），底栏跟着高一点；英文标签也不小于 14px。 */
.nav-item .my-line { max-width: 100%; line-height: 1.5; white-space: normal; overflow-wrap: anywhere; text-wrap: balance; text-align: center; }
:lang(my) .nav-item { font-size: .78125rem; line-height: 1.55; }
@media (min-width: 760px) { .nav-item .my-line { font-size: .8125rem; white-space: normal; } :lang(my) .nav-item { font-size: .9375rem; } }
/* 阿姨端、窄屏的底栏：图标 + 缅甸文（最多两行），英文标签不显示（页面标题里有英文，读屏软件还读得到）。
   英文 + 缅甸文两层叠起来底栏高到 119px（屏幕高度的六分之一，再加上 iPhone 底部的安全区）；缅甸文是她读得最顺的，所以留缅甸文。 */
@media (max-width: 400px) {   /* 320 宽的手机：每个键再宽几个像素，"ဘောက်ချာ"这样的词才不会被从音节中间折断 */
  .role-helper .nav { gap: 0; padding-left: 4px; padding-right: 4px; }
  .role-helper .nav-item { padding-left: 1px; padding-right: 1px; }
}
@media (max-width: 480px) {
  .role-helper .nav-item .nav-label { font-size: 0; line-height: 0; }
  .role-helper .nav-item .nav-label .my-line { font-size: .875rem; line-height: 1.5; }
}
.btn-label { text-align: center; }
h1 .my-line, h2 .my-line, h3 .my-line { font-weight: 500; font-size: .875rem; }

/* 阿姨：菜谱 → 采购清单的核对表（DL-044） */
.shop-review { margin: 14px 0 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.shop-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 6px 10px; margin: 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--paper); }
.shop-row.is-have { opacity: .6; }
.shop-row.is-have .shop-name b { text-decoration: line-through; }
.shop-name { min-width: 0; overflow-wrap: anywhere; }
.shop-name .tag, .shop-name .muted { display: block; margin-top: 2px; }
.shop-qty { grid-column: 1; display: inline-flex; align-items: center; gap: 8px; }
.shop-qty .btn--icon { min-width: 44px; min-height: 44px; font-size: 1.25rem; }
.shop-amount { min-width: 3.5em; text-align: center; font-weight: 600; }
.shop-row > .btn--sm { grid-column: 2; grid-row: 1; min-height: 44px; }
.ingredients--plain .item-text { display: block; }

/* 小票（DL-045）：阿姨的上传和列表；主家的消费看板（纯 CSS 的条形图，不用图片和外部库） */
.receipt-status { margin-top: 10px; }
.banner--warn { background: var(--warn-soft); color: var(--warn); }
.rc-mine-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.rc-mine { display: flex; justify-content: space-between; gap: 12px; margin: 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--paper); }
.rc-mine-main, .rc-mine-side { display: grid; gap: 2px; min-width: 0; }
.rc-mine-side { justify-items: end; text-align: end; }
.rc-month { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0 0 12px; }
.rc-month .btn--icon { min-width: 44px; min-height: 44px; font-size: 1.4rem; }
.rc-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 0 0 16px; }
.rc-stat { display: grid; gap: 2px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.rc-stat b { font: 600 1.35rem / 1.2 var(--font-serif); }
.rc-stat.is-warn { border-color: color-mix(in srgb, var(--warn) 45%, var(--line)); background: var(--warn-soft); }
.rc-bars { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.rc-bar { display: grid; grid-template-columns: 5.5em minmax(0, 1fr) auto; align-items: center; gap: 10px; width: 100%; min-height: 44px; padding: 4px 8px; border: 1px solid transparent; border-radius: 12px; background: none; color: var(--ink); font: inherit; text-align: start; cursor: pointer; }
.rc-bar.is-on { border-color: var(--green); background: var(--green-soft); }
.rc-bar-track { height: 12px; border-radius: 999px; background: var(--paper-2); overflow: hidden; }
.rc-bar-fill { display: block; height: 100%; border-radius: 999px; background: var(--green-2); }
.rc-bar-val { font-size: var(--s-1); color: var(--ink-2); white-space: nowrap; }
.rc-days { display: flex; align-items: flex-end; gap: 3px; height: 96px; padding: 6px 4px 0; border-bottom: 1px solid var(--line-2); }
.rc-day { flex: 1 1 0; min-width: 3px; max-width: 18px; border-radius: 3px 3px 0 0; background: var(--brass); opacity: .85; }
.rc-list { display: grid; gap: 8px; }
.rc-row { border: 1px solid var(--line); border-radius: 14px; background: var(--surface); overflow: hidden; }
.rc-row.is-review { border-color: color-mix(in srgb, var(--warn) 45%, var(--line)); }
.rc-head { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 56px; padding: 10px 12px; border: 0; background: none; color: var(--ink); font: inherit; text-align: start; cursor: pointer; flex-wrap: wrap; }
.rc-merchant { flex: 1 1 9rem; display: grid; min-width: 0; }
.rc-total { font-weight: 700; }
.rc-body { padding: 0 12px 12px; display: grid; gap: 8px; }
.rc-notes { margin: 0; padding-left: 1.2em; color: var(--warn); font-size: var(--s-1); }
.rc-items { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.rc-item { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 4px 8px; padding: 6px 0; border-bottom: 1px dashed var(--line); font-size: var(--s-1); }
.rc-item-name { display: grid; min-width: 0; overflow-wrap: anywhere; }
.rc-item select { grid-column: 1 / -1; min-height: 40px; }
.rc-item-amount { font-weight: 600; }
.rc-photo { display: block; max-width: 100%; max-height: 70dvh; margin: 0 auto; border-radius: 10px; }
