/* ============================================================
   溫心・家 WarmCare — 設計系統
   概念：中藥舖的溫潤 × 清晨廚房的光 × 親情的溫度
   ============================================================ */

:root,
[data-theme='light'] {
  /* Surfaces — 米白、茶湯、陶土 */
  --color-bg: #faf6ee;
  --color-surface: #fffdf8;
  --color-surface-2: #ffffff;
  --color-surface-offset: #f1eadd;
  --color-surface-offset-2: #e8decb;
  --color-divider: #e3d9c4;
  --color-border: #d6c9ae;

  /* Text — 墨、灰褐 */
  --color-text: #2a231a;
  --color-text-muted: #7b6b54;
  --color-text-faint: #b8ab92;
  --color-text-inverse: #fffdf8;

  /* Primary — 中藥舖的深綠（杜仲綠） */
  --color-primary: #3a6b4a;
  --color-primary-hover: #2b5238;
  --color-primary-active: #1f3d29;
  --color-primary-highlight: #d9e5d8;

  /* Accent — 暖陶紅（就像媽媽的圍裙） */
  --color-accent: #c3482d;
  --color-accent-hover: #a83a22;
  --color-accent-highlight: #f2d9ce;

  /* Gold — 茶湯色 */
  --color-warm: #c98a2f;
  --color-warm-highlight: #f1e1c2;

  /* Semantic */
  --color-success: #4a7a2f;
  --color-warning: #c98a2f;
  --color-danger: #b33a2a;

  /* Radius */
  --r-sm: 0.5rem;
  --r-md: 0.875rem;
  --r-lg: 1.25rem;
  --r-xl: 1.75rem;
  --r-full: 9999px;

  /* Shadows — 柔和陽光 */
  --shadow-sm: 0 1px 2px rgba(90, 60, 20, 0.06);
  --shadow-md: 0 6px 20px rgba(90, 60, 20, 0.08);
  --shadow-lg: 0 18px 40px rgba(90, 60, 20, 0.12);

  /* Type */
  --font-display: 'Noto Serif TC', 'Songti TC', serif;
  --font-body: 'Noto Sans TC', 'PingFang TC', system-ui, sans-serif;

  --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --text-sm: clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
  --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --text-lg: clamp(1.125rem, 1rem + 0.75vw, 1.375rem);
  --text-xl: clamp(1.5rem, 1.2rem + 1.25vw, 2rem);
  --text-2xl: clamp(2rem, 1.4rem + 2vw, 2.75rem);

  --transition: 220ms cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme='dark'] {
  --color-bg: #17140f;
  --color-surface: #1e1a13;
  --color-surface-2: #241f16;
  --color-surface-offset: #2a2419;
  --color-surface-offset-2: #332c1f;
  --color-divider: #3a3325;
  --color-border: #4b4230;

  --color-text: #ede5d3;
  --color-text-muted: #a79876;
  --color-text-faint: #6b6044;
  --color-text-inverse: #1e1a13;

  --color-primary: #7dac8a;
  --color-primary-hover: #9ac0a4;
  --color-primary-active: #bad8c2;
  --color-primary-highlight: #2e4434;

  --color-accent: #e07b5b;
  --color-accent-hover: #ea9277;
  --color-accent-highlight: #4a2a20;

  --color-warm: #e0a857;
  --color-warm-highlight: #443620;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 6px 20px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 18px 40px rgba(0, 0, 0, 0.55);
}

/* ============== RESET ============== */
[hidden] { display: none !important; }
*,*::before,*::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; scroll-behavior: smooth; }
body {
  min-height: 100dvh;
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.65;
  color: var(--color-text);
  background: var(--color-bg);
  /* 微妙的米紙紋理 */
  background-image:
    radial-gradient(circle at 15% 20%, rgba(201, 138, 47, 0.05) 0, transparent 40%),
    radial-gradient(circle at 85% 80%, rgba(58, 107, 74, 0.04) 0, transparent 35%);
  overscroll-behavior: none;
}
img,svg { display: block; max-width: 100%; }
button { cursor: pointer; background: none; border: none; font: inherit; color: inherit; }
select, input { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 2px; border-radius: var(--r-sm); }

/* ============== LAYOUT ============== */
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: color-mix(in oklab, var(--color-bg) 85%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-divider);
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--color-primary);
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: 0.04em;
}
.brand-mark { width: 28px; height: 28px; }
.brand-name { line-height: 1; }
/* Top tabs: hidden on mobile, inline on desktop */
.tabs-top { display: none; }

/* Bottom tabs: fixed at bottom on mobile */
.tabs-bottom {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 40;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  padding: 0.5rem 0.5rem calc(0.5rem + env(safe-area-inset-bottom));
  background: var(--color-bg);
  border-top: 1px solid var(--color-divider);
  box-shadow: 0 -6px 20px rgba(0,0,0,.05);
}
.tabs-bottom .tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 0.4rem 0.25rem;
  border-radius: var(--r-md);
  color: var(--color-text-muted);
  font-size: 0.72rem;
  font-weight: 500;
  transition: all var(--transition);
  min-height: 48px;
}
.tabs-bottom .tab-ico {
  font-size: 1.15rem;
  line-height: 1;
  color: var(--color-text-muted);
  transition: all var(--transition);
}
.tabs-bottom .tab.is-active {
  color: var(--color-primary);
}
.tabs-bottom .tab.is-active .tab-ico {
  color: var(--color-primary);
  transform: scale(1.15);
}
.tab {
  padding: 0.4rem 0.5rem;
  border-radius: var(--r-md);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  transition: all var(--transition);
  font-weight: 500;
  text-align: center;
}
.tab.is-active {
  color: var(--color-primary);
}
.tab:hover:not(.is-active) { color: var(--color-text); }
.icon-btn {
  margin-left: auto;
  width: 40px; height: 40px;
  border-radius: var(--r-full);
  color: var(--color-text-muted);
  display: inline-flex; align-items: center; justify-content: center;
  transition: all var(--transition);
}
.icon-btn:hover { background: var(--color-surface-offset); color: var(--color-text); }

@media (min-width: 640px) {
  .tabs-top {
    display: inline-flex;
    gap: 0.25rem;
    margin-left: auto;
    padding: 0.25rem;
    background: var(--color-surface-offset);
    border-radius: var(--r-full);
  }
  .tabs-top .tab { padding: 0.5rem 0.95rem; border-radius: var(--r-full); font-size: var(--text-sm); }
  .tabs-top .tab.is-active { background: var(--color-surface-2); box-shadow: var(--shadow-sm); }
  .tabs-bottom { display: none; }
  .icon-btn { margin-left: 0; }
}

.app {
  max-width: 720px;
  margin: 0 auto;
  padding: 1rem 1rem 6rem;
}
@media (min-width: 640px) {
  .app { padding-bottom: 2rem; }
}

.view { display: none; }
.view.is-active { display: block; animation: fadeUp 400ms var(--transition); }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ============== HERO ============== */
.hero { padding: 1.5rem 0 1rem; }
.hero-sm { padding: 1rem 0 0.5rem; }
.eyebrow {
  display: inline-block;
  font-family: var(--font-display);
  font-size: var(--text-xs);
  letter-spacing: 0.18em;
  color: var(--color-warm);
  text-transform: none;
  margin-bottom: 0.6rem;
  padding: 0.2rem 0.7rem;
  border: 1px solid var(--color-warm-highlight);
  border-radius: var(--r-full);
  background: color-mix(in oklab, var(--color-warm-highlight) 40%, transparent);
}
.greeting {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--text-2xl);
  line-height: 1.3;
  letter-spacing: 0.01em;
  color: var(--color-text);
  margin-bottom: 0.75rem;
}
.greeting em {
  font-style: normal;
  color: var(--color-primary);
  position: relative;
  display: inline-block;
}
.greeting em::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 6px;
  background: var(--color-warm-highlight);
  border-radius: var(--r-full);
  z-index: -1;
  opacity: 0.7;
}
.hero-sub {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  max-width: 40ch;
}

/* ============== 區塊標題 ============== */
.section-title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
  margin: 1.75rem 0 0.35rem;
  color: var(--color-text);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.section-title.small { font-size: var(--text-base); }
.section-title::before {
  content: '';
  width: 4px; height: 1.1rem;
  background: var(--color-primary);
  border-radius: var(--r-full);
}
.section-hint {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  margin-bottom: 0.75rem;
}

/* ============== 症狀網格 ============== */
.symptom-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.625rem;
  margin-bottom: 1rem;
}
@media (min-width: 480px) {
  .symptom-grid { grid-template-columns: repeat(3, 1fr); }
}
.symptom-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  padding: 0.85rem 0.9rem;
  background: var(--color-surface);
  border: 1.5px solid var(--color-border);
  border-radius: var(--r-md);
  text-align: left;
  transition: all var(--transition);
  color: var(--color-text);
  position: relative;
  overflow: hidden;
}
.symptom-btn:hover {
  border-color: var(--color-primary);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}
.symptom-btn.is-active {
  background: var(--color-primary-highlight);
  border-color: var(--color-primary);
  color: var(--color-primary-active);
}
.symptom-btn.is-active::after {
  content: '✓';
  position: absolute;
  top: 0.5rem; right: 0.6rem;
  width: 20px; height: 20px;
  background: var(--color-primary);
  color: #fff;
  border-radius: var(--r-full);
  font-size: 0.75rem;
  display: inline-flex; align-items: center; justify-content: center;
}
.symptom-ico { font-size: 1.4rem; line-height: 1; }
.symptom-label { font-size: var(--text-sm); font-weight: 500; }

/* ============== 下拉行 ============== */
.quick-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.625rem;
  margin: 1rem 0;
}
.quick-card {
  padding: 0.75rem 0.85rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--r-md);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  cursor: pointer;
}
.quick-label {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  font-weight: 500;
}
.quick-card select {
  border: 0;
  background: transparent;
  color: var(--color-text);
  font-size: var(--text-sm);
  font-weight: 500;
  padding: 0;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='12' viewBox='0 0 12 12' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M3 4.5L6 7.5L9 4.5' stroke='%237b6b54' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right center;
  padding-right: 1.25rem;
}

/* ============== 主要按鈕 ============== */
.primary-btn {
  width: 100%;
  padding: 1rem 1.25rem;
  background: var(--color-primary);
  color: var(--color-text-inverse);
  border-radius: var(--r-lg);
  font-weight: 600;
  font-size: var(--text-base);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  box-shadow: var(--shadow-md);
  transition: all var(--transition);
  letter-spacing: 0.05em;
}
.primary-btn:hover {
  background: var(--color-primary-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg);
}
.primary-btn:active { transform: translateY(0); }
.ghost-btn {
  padding: 0.625rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--r-full);
  background: var(--color-surface);
  color: var(--color-text);
  font-weight: 500;
  font-size: var(--text-sm);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: all var(--transition);
}
.ghost-btn:hover { border-color: var(--color-primary); color: var(--color-primary); }
.ghost-btn.small { padding: 0.4rem 0.8rem; font-size: var(--text-xs); }
.dashed-btn {
  padding: 1rem;
  width: 100%;
  border: 1.5px dashed var(--color-border);
  border-radius: var(--r-md);
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  transition: all var(--transition);
}
.dashed-btn:hover { border-color: var(--color-primary); color: var(--color-primary); }

/* ============== 建議結果 ============== */
.recommend {
  margin-top: 1.5rem;
  background: var(--color-surface);
  border: 1px solid var(--color-divider);
  border-radius: var(--r-xl);
  padding: 1.25rem;
  box-shadow: var(--shadow-md);
  position: relative;
}
.recommend::before {
  content: '';
  position: absolute;
  top: -1px; left: 1.25rem; right: 1.25rem; height: 3px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-warm), var(--color-accent));
  border-radius: var(--r-full);
}
.rec-head {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 1rem;
  padding-bottom: 0.875rem;
  border-bottom: 1px dashed var(--color-divider);
}
.rec-emoji {
  width: 48px; height: 48px;
  border-radius: var(--r-full);
  background: var(--color-primary-highlight);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.6rem;
  flex-shrink: 0;
}
.rec-title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--color-primary-active);
  margin-bottom: 0.2rem;
}
.rec-subtitle { font-size: var(--text-sm); color: var(--color-text-muted); }

.rec-block { margin: 0.85rem 0; }
.rec-block h4 {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 0.35rem;
  display: flex; align-items: center; gap: 0.4rem;
}
.rec-block p { font-size: var(--text-sm); color: var(--color-text-muted); line-height: 1.7; }
.rec-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.5rem; }
.rec-tag {
  font-size: var(--text-xs);
  padding: 0.2rem 0.65rem;
  background: var(--color-warm-highlight);
  color: var(--color-warm);
  border-radius: var(--r-full);
  font-weight: 500;
}
.rec-recipe {
  background: var(--color-surface-offset);
  border-left: 3px solid var(--color-warm);
  padding: 0.75rem 0.875rem;
  border-radius: var(--r-sm);
  margin-top: 0.5rem;
  font-size: var(--text-sm);
}
.rec-recipe strong { color: var(--color-text); font-weight: 600; }
.rec-warning {
  margin-top: 0.75rem;
  padding: 0.625rem 0.875rem;
  background: color-mix(in oklab, var(--color-accent-highlight) 60%, transparent);
  border-radius: var(--r-sm);
  font-size: var(--text-xs);
  color: var(--color-accent-hover);
  line-height: 1.5;
}
.rec-warning strong { font-weight: 600; }

/* ============== 家人關心卡片 ============== */
.family-card {
  margin-top: 1.75rem;
  padding: 1.25rem;
  background: linear-gradient(135deg, var(--color-accent-highlight), var(--color-warm-highlight));
  border-radius: var(--r-xl);
  position: relative;
  overflow: hidden;
}
.family-card::before {
  content: '"';
  position: absolute;
  top: -0.5rem; right: 0.75rem;
  font-family: var(--font-display);
  font-size: 6rem;
  color: rgba(195, 72, 45, 0.15);
  line-height: 1;
}
.family-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}
.family-tag {
  font-size: var(--text-xs);
  color: var(--color-accent-hover);
  font-weight: 600;
  padding: 0.2rem 0.65rem;
  background: rgba(255,255,255,0.6);
  border-radius: var(--r-full);
}
.family-time {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}
.family-msg {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  line-height: 1.55;
  color: var(--color-text);
  margin-bottom: 0.875rem;
  position: relative;
  z-index: 1;
}
.family-actions { display: flex; gap: 0.5rem; }

.legal-note {
  margin-top: 2rem;
  padding: 0.75rem;
  background: var(--color-surface-offset);
  border-radius: var(--r-sm);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  text-align: center;
  line-height: 1.5;
}

/* ============== 豆豆食療頁 ============== */
.bean-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0 0.5rem;
}
.bean-chip {
  padding: 0.625rem 0.9rem;
  background: var(--color-surface);
  border: 1.5px solid var(--color-border);
  border-radius: var(--r-full);
  font-size: var(--text-sm);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: all var(--transition);
}
.bean-chip:hover { border-color: var(--color-primary); }
.bean-chip.is-active {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}
.bean-dot {
  width: 10px; height: 10px; border-radius: var(--r-full);
  border: 1px solid rgba(0,0,0,0.1);
}
.bean-pair-hint {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  margin-bottom: 0.75rem;
}
.pair-result {
  background: var(--color-surface);
  border: 1px solid var(--color-divider);
  border-radius: var(--r-xl);
  padding: 1.25rem;
  box-shadow: var(--shadow-md);
  margin-bottom: 1rem;
}
.pair-head {
  display: flex; align-items: center; gap: 0.5rem;
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
  margin-bottom: 0.75rem;
}
.pair-plus { color: var(--color-warm); }
.pair-meta { font-size: var(--text-xs); color: var(--color-text-muted); margin-bottom: 0.75rem; }
.pair-pros, .pair-cons { margin-top: 0.75rem; }
.pair-pros strong { color: var(--color-success); }
.pair-cons strong { color: var(--color-accent); }
.pair-pros p, .pair-cons p { font-size: var(--text-sm); color: var(--color-text-muted); margin-top: 0.2rem; line-height: 1.7; }

.bean-table {
  display: grid;
  gap: 0.5rem;
}
.bean-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.75rem;
  align-items: center;
  padding: 0.75rem 0.875rem;
  background: var(--color-surface);
  border: 1px solid var(--color-divider);
  border-radius: var(--r-md);
}
.bean-row .bean-dot { width: 22px; height: 22px; }
.bean-row-name { font-family: var(--font-display); font-weight: 600; font-size: var(--text-base); }
.bean-row-desc { font-size: var(--text-xs); color: var(--color-text-muted); line-height: 1.5; }
.bean-row-tag {
  font-size: var(--text-xs);
  padding: 0.2rem 0.5rem;
  background: var(--color-surface-offset);
  border-radius: var(--r-full);
  color: var(--color-text-muted);
}

/* ============== 家人頁 ============== */
.family-list {
  display: grid;
  gap: 0.625rem;
  margin: 1rem 0;
}
.member-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.875rem;
  align-items: center;
  padding: 0.875rem;
  background: var(--color-surface);
  border: 1px solid var(--color-divider);
  border-radius: var(--r-md);
  transition: all var(--transition);
}
.member-card:hover { box-shadow: var(--shadow-sm); }
.avatar {
  width: 48px; height: 48px;
  border-radius: var(--r-full);
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  color: #fff;
}
.avatar-mom { background: linear-gradient(135deg, #c3482d, #c98a2f); }
.avatar-dad { background: linear-gradient(135deg, #3a6b4a, #4a7a2f); }
.member-info h3 {
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--color-text);
}
.member-info p {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin: 0.1rem 0;
}
.member-stat {
  display: flex; gap: 0.3rem;
  font-size: var(--text-xs);
  color: var(--color-text-faint);
}
.record-card {
  margin-top: 1.5rem;
  padding: 1.25rem;
  background: var(--color-surface);
  border: 1px dashed var(--color-border);
  border-radius: var(--r-xl);
  text-align: center;
}
.record-hint {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin: 0.5rem 0 1rem;
  max-width: 34ch;
  margin-inline: auto;
}

/* ============== 日誌頁 ============== */
.diary-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin: 1rem 0;
}
.sum-card {
  padding: 0.875rem;
  background: var(--color-surface);
  border: 1px solid var(--color-divider);
  border-radius: var(--r-md);
  text-align: center;
}
.sum-card strong {
  display: block;
  font-family: var(--font-display);
  font-size: var(--text-lg);
  color: var(--color-primary);
}
.sum-card span {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}
.diary-list { list-style: none; display: grid; gap: 0.5rem; }
.diary-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.75rem;
  padding: 0.75rem 0.875rem;
  background: var(--color-surface);
  border: 1px solid var(--color-divider);
  border-radius: var(--r-md);
  font-size: var(--text-sm);
}
.diary-date { font-weight: 600; color: var(--color-primary); font-family: var(--font-display); }
.diary-tags { color: var(--color-text-muted); }
.diary-mood { font-size: 1.2rem; }

/* ============== 聲音狀態條 ============== */
.voice-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  margin: 0.5rem 0 0.875rem;
  border-radius: var(--r-full);
  font-size: var(--text-xs);
  background: rgba(255,255,255,0.5);
  color: var(--color-text-muted);
  position: relative;
  z-index: 1;
}
.voice-status-dot {
  width: 8px; height: 8px; border-radius: var(--r-full);
  background: var(--color-text-faint);
  flex-shrink: 0;
}
.voice-status-missing .voice-status-dot {
  background: var(--color-warm);
  box-shadow: 0 0 0 4px color-mix(in oklab, var(--color-warm) 25%, transparent);
  animation: pulse 2s infinite;
}
.voice-status-ready .voice-status-dot {
  background: var(--color-success);
}
.voice-status-ready {
  color: var(--color-success);
  font-weight: 500;
}
.voice-status-cta {
  margin-left: auto;
  font-size: var(--text-xs);
  color: var(--color-accent);
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  flex-shrink: 0;
}
@keyframes pulse {
  0%,100% { opacity: 1; }
  50% { opacity: 0.55; }
}

/* ============== 錄音室 ============== */
.recorder {
  margin-top: 1.5rem;
  padding: 1.25rem;
  background: var(--color-surface);
  border: 1px solid var(--color-divider);
  border-radius: var(--r-xl);
}
.record-privacy {
  display: inline-block;
  margin-top: 0.3rem;
  font-size: var(--text-xs);
  color: var(--color-success);
  font-weight: 500;
}
.rec-mode-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.25rem;
  padding: 0.25rem;
  background: var(--color-surface-offset);
  border-radius: var(--r-full);
  margin: 1rem 0;
}
.rec-mode-tab {
  padding: 0.5rem 0.5rem;
  border-radius: var(--r-full);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-muted);
  transition: all var(--transition);
}
.rec-mode-tab.is-active {
  background: var(--color-surface-2);
  color: var(--color-primary);
  box-shadow: var(--shadow-sm);
}
.rec-mode { display: none; }
.rec-mode.is-active { display: block; animation: fadeUp 300ms var(--transition); }
.rec-progress-text {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-bottom: 0.75rem;
  text-align: center;
}
.rec-progress-text strong {
  color: var(--color-primary);
  font-size: var(--text-lg);
  font-family: var(--font-display);
}

/* 腳本清單 */
.script-list {
  display: grid;
  gap: 0.5rem;
}
.script-item {
  padding: 0.875rem;
  background: var(--color-surface-2);
  border: 1.5px solid var(--color-border);
  border-radius: var(--r-md);
  transition: all var(--transition);
}
.script-item.is-done {
  background: var(--color-primary-highlight);
  border-color: var(--color-primary);
}
.script-item.is-recording {
  background: color-mix(in oklab, var(--color-accent-highlight) 60%, transparent);
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--color-accent) 15%, transparent);
}
.script-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}
.script-tag {
  font-size: var(--text-xs);
  padding: 0.15rem 0.5rem;
  background: var(--color-warm-highlight);
  color: var(--color-warm);
  border-radius: var(--r-full);
  font-weight: 600;
}
.script-check {
  margin-left: auto;
  width: 22px; height: 22px;
  border-radius: var(--r-full);
  background: var(--color-primary);
  color: #fff;
  font-size: 0.8rem;
  display: none;
  align-items: center;
  justify-content: center;
}
.script-item.is-done .script-check { display: inline-flex; }
.script-text {
  font-family: var(--font-display);
  font-size: var(--text-base);
  color: var(--color-text);
  line-height: 1.6;
  margin-bottom: 0.625rem;
}
.script-actions {
  display: flex;
  gap: 0.4rem;
  align-items: center;
}
.script-rec-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.875rem;
  background: var(--color-accent);
  color: #fff;
  border-radius: var(--r-full);
  font-size: var(--text-xs);
  font-weight: 600;
  transition: all var(--transition);
}
.script-rec-btn:hover { background: var(--color-accent-hover); }
.script-rec-btn.is-recording {
  background: var(--color-danger);
  animation: pulse 1.2s infinite;
}
.script-rec-dot {
  width: 8px; height: 8px;
  border-radius: var(--r-full);
  background: #fff;
}
.script-rec-btn.is-recording .script-rec-dot {
  background: #fff;
  animation: pulse 0.8s infinite;
}
.script-duration {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-left: auto;
  font-variant-numeric: tabular-nums;
}

/* 自由模式錄音卡 */
.free-card {
  padding: 1rem;
  text-align: center;
}
.free-hint {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-bottom: 1rem;
  line-height: 1.6;
}
.free-hint em { font-style: normal; color: var(--color-accent); font-family: var(--font-display); }
.rec-wave {
  height: 80px;
  background: var(--color-surface-offset);
  border-radius: var(--r-md);
  margin-bottom: 0.75rem;
  overflow: hidden;
  position: relative;
}
.rec-wave canvas {
  width: 100%;
  height: 100%;
  display: block;
}
.rec-timer {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-variant-numeric: tabular-nums;
  color: var(--color-text);
  margin-bottom: 1rem;
  letter-spacing: 0.05em;
}
.rec-controls {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
}
.rec-main {
  width: 72px; height: 72px;
  border-radius: var(--r-full);
  background: var(--color-accent);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  transition: all var(--transition);
}
.rec-main:hover { transform: scale(1.05); background: var(--color-accent-hover); }
.rec-main.is-recording {
  background: var(--color-danger);
  animation: pulseRing 1.4s infinite;
}
.rec-main.is-recording svg { animation: squareMorph 0.3s forwards; }
@keyframes pulseRing {
  0% { box-shadow: 0 0 0 0 color-mix(in oklab, var(--color-danger) 50%, transparent); }
  100% { box-shadow: 0 0 0 20px color-mix(in oklab, var(--color-danger) 0%, transparent); }
}
.free-saved {
  margin-top: 0.75rem;
  font-size: var(--text-sm);
  color: var(--color-success);
  font-weight: 500;
}

/* ============== 匯出區塊 ============== */
.export-row {
  margin-top: 1.5rem;
  text-align: center;
}
.export-hint {
  margin-top: 0.625rem;
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

/* ============== 養生紀錄報告（隱藏專用區域） ============== */
.report-stage {
  position: fixed;
  top: -10000px;
  left: 0;
  width: 794px;  /* A4 寬度約 96 DPI */
  background: #ffffff;
  color: #1c1812;
  padding: 48px 56px;
  font-family: 'Noto Serif TC', 'Songti TC', serif;
  pointer-events: none;
  z-index: -1;
}
.report-stage * { color: #1c1812; }
.report-stage .r-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  border-bottom: 2px solid #3a6b4a;
  padding-bottom: 16px;
  margin-bottom: 20px;
}
.report-stage .r-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  color: #3a6b4a;
  font-size: 22px;
  letter-spacing: 0.04em;
}
.report-stage .r-brand svg { width: 32px; height: 32px; color: #3a6b4a; }
.report-stage .r-title-main {
  font-size: 28px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: #1c1812;
  line-height: 1.2;
}
.report-stage .r-title-sub {
  font-size: 12px;
  color: #7b6b54;
  letter-spacing: 0.22em;
  margin-top: 4px;
}
.report-stage .r-date {
  font-size: 12px;
  color: #7b6b54;
  text-align: right;
  font-family: 'Noto Sans TC', sans-serif;
}
.report-stage .r-date strong { color: #1c1812; font-size: 13px; }

.report-stage .r-user-row {
  display: flex;
  flex-wrap: wrap;
  gap: 18px 40px;
  padding: 12px 16px;
  background: #faf6ee;
  border-radius: 8px;
  margin-bottom: 24px;
  font-family: 'Noto Sans TC', sans-serif;
  font-size: 13px;
}
.report-stage .r-user-row span strong { color: #1c1812; font-size: 14px; margin-left: 6px; }
.report-stage .r-user-row span { color: #7b6b54; }

.report-stage .r-section {
  margin-bottom: 22px;
}
.report-stage .r-section-title {
  font-size: 15px;
  font-weight: 600;
  color: #3a6b4a;
  margin-bottom: 10px;
  padding-left: 10px;
  border-left: 3px solid #3a6b4a;
  line-height: 1.2;
}
.report-stage .r-grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}

/* 條狀圖 */
.report-stage .r-bars { font-family: 'Noto Sans TC', sans-serif; }
.report-stage .r-bar-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  font-size: 12.5px;
}
.report-stage .r-bar-label {
  width: 72px;
  color: #1c1812;
  flex-shrink: 0;
}
.report-stage .r-bar-track {
  flex: 1;
  height: 14px;
  background: #f1eadd;
  border-radius: 4px;
  overflow: hidden;
}
.report-stage .r-bar-fill {
  height: 100%;
  background: #c98a2f;
  border-radius: 4px;
}
.report-stage .r-bar-value {
  width: 42px;
  text-align: right;
  color: #7b6b54;
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}

/* 數字卡 */
.report-stage .r-kpis {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  font-family: 'Noto Sans TC', sans-serif;
}
.report-stage .r-kpi {
  background: #faf6ee;
  border: 1px solid #e3d9c4;
  border-radius: 8px;
  padding: 10px 12px;
  text-align: center;
}
.report-stage .r-kpi strong {
  display: block;
  font-size: 22px;
  font-family: 'Noto Serif TC', serif;
  color: #3a6b4a;
  line-height: 1.1;
  margin-bottom: 3px;
}
.report-stage .r-kpi span {
  font-size: 11px;
  color: #7b6b54;
  letter-spacing: 0.04em;
}

/* 日志網格（為期日數格子） */
.report-stage .r-heatmap {
  display: grid;
  grid-template-columns: repeat(30, 1fr);
  gap: 3px;
  font-family: 'Noto Sans TC', sans-serif;
}
.report-stage .r-heatcell {
  aspect-ratio: 1;
  border-radius: 2px;
  background: #f1eadd;
}
.report-stage .r-heatcell.lv1 { background: #e8decb; }
.report-stage .r-heatcell.lv2 { background: #d9be8c; }
.report-stage .r-heatcell.lv3 { background: #c98a2f; }
.report-stage .r-heatcell.lv4 { background: #c3482d; }
.report-stage .r-heatlegend {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10.5px;
  color: #7b6b54;
  margin-top: 6px;
  font-family: 'Noto Sans TC', sans-serif;
}
.report-stage .r-heatlegend span {
  display: inline-block;
  width: 12px; height: 12px;
  border-radius: 2px;
}

/* 食療與聲音清單 */
.report-stage .r-list {
  font-family: 'Noto Sans TC', sans-serif;
  font-size: 12.5px;
  line-height: 1.7;
}
.report-stage .r-list li {
  list-style: none;
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
  border-bottom: 1px dashed #e3d9c4;
}
.report-stage .r-list li:last-child { border: 0; }
.report-stage .r-list .label { color: #1c1812; }
.report-stage .r-list .count { color: #7b6b54; font-variant-numeric: tabular-nums; }

/* 自述框 */
.report-stage .r-note {
  padding: 12px 14px;
  background: #faf6ee;
  border-left: 3px solid #c98a2f;
  border-radius: 4px;
  font-size: 12.5px;
  line-height: 1.75;
  color: #1c1812;
  font-family: 'Noto Sans TC', sans-serif;
}
.report-stage .r-note em { font-style: normal; color: #7b6b54; font-size: 11px; display: block; margin-bottom: 4px; letter-spacing: 0.1em; }

/* 底部免責條 */
.report-stage .r-foot {
  margin-top: 22px;
  padding-top: 12px;
  border-top: 1px solid #e3d9c4;
  font-size: 10.5px;
  color: #7b6b54;
  line-height: 1.6;
  font-family: 'Noto Sans TC', sans-serif;
  display: flex;
  justify-content: space-between;
  gap: 16px;
}
.report-stage .r-foot .disclaimer { flex: 1; }
.report-stage .r-foot .brand-mini {
  font-family: 'Noto Serif TC', serif;
  color: #3a6b4a;
  font-weight: 600;
  text-align: right;
  flex-shrink: 0;
}

/* 每日餐飲記錄 */
.report-stage .r-food-log {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
}
.report-stage .r-food-day {
  background: #f7f3ec;
  border-radius: 8px;
  padding: 8px 11px;
  border-left: 3px solid #c98a2f;
}
.report-stage .r-food-day-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 5px;
}
.report-stage .r-food-date {
  font-size: 12px;
  font-weight: 700;
  color: #3a6b4a;
}
.report-stage .r-food-total {
  font-size: 12px;
  font-weight: 600;
  color: #c98a2f;
}
.report-stage .r-food-items {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.report-stage .r-food-chip {
  font-size: 10.5px;
  background: #fff;
  border: 1px solid #e3d5bc;
  border-radius: 20px;
  padding: 2px 8px;
  color: #3a3026;
}
.report-stage .r-food-chip em {
  font-style: normal;
  color: #c98a2f;
  margin-left: 4px;
}
.report-stage .r-food-photos {
  display: flex;
  gap: 6px;
  margin-top: 7px;
  flex-wrap: wrap;
}
.report-stage .r-food-photo {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid #d6c9ae;
}

/* 匯出中 loading */
.export-loading {
  position: fixed;
  inset: 0;
  background: rgba(20,16,10,0.55);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}
.export-loading-card {
  background: var(--color-surface);
  padding: 1.5rem 2rem;
  border-radius: var(--r-lg);
  text-align: center;
  box-shadow: var(--shadow-lg);
}
.export-loading-card .spinner {
  width: 36px; height: 36px;
  border: 3px solid var(--color-surface-offset);
  border-top-color: var(--color-primary);
  border-radius: var(--r-full);
  margin: 0 auto 0.875rem;
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============== FOOTER ============== */
.footer {
  padding: 1.25rem 0.5rem 2rem;
  text-align: center;
  font-size: 11px;
  color: var(--color-text-faint);
  border-top: 1px solid var(--color-divider);
  margin-top: 2rem;
}

/* ==========================================================================
   Sheet / Modal (reusable)
   ========================================================================== */
.wc-sheet-backdrop {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(28, 24, 18, 0);
  display: flex; align-items: flex-end; justify-content: center;
  transition: background 0.26s ease;
  pointer-events: none;
}
.wc-sheet-backdrop.is-open {
  background: rgba(28, 24, 18, 0.45);
  pointer-events: auto;
}
.wc-sheet {
  width: 100%;
  max-width: 640px;
  max-height: 92vh;
  background: var(--color-bg);
  border-top-left-radius: 28px;
  border-top-right-radius: 28px;
  box-shadow: 0 -12px 40px rgba(0,0,0,.15);
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(.16,1,.3,1);
  display: flex; flex-direction: column;
  overflow: hidden;
}
.wc-sheet-backdrop.is-open .wc-sheet { transform: translateY(0); }
@media (min-width: 640px) {
  .wc-sheet-backdrop { align-items: center; padding: 2rem; }
  .wc-sheet { border-radius: 24px; max-height: 88vh; }
}
.wc-sheet-handle {
  width: 36px; height: 4px;
  border-radius: 2px;
  background: var(--color-border);
  margin: 8px auto 4px;
}
@media (min-width: 640px) { .wc-sheet-handle { display: none; } }
.wc-sheet-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 1rem;
  padding: 0.5rem 1.25rem 1rem;
  border-bottom: 1px solid var(--color-divider);
}
.wc-sheet-header h2 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--color-text);
  line-height: 1.3;
}
.wc-sheet-sub {
  font-size: 0.82rem;
  color: var(--color-text-muted);
  margin-top: 3px;
}
.wc-sheet-close {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--color-surface-offset);
  color: var(--color-text-muted);
  font-size: 1rem;
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: all var(--transition);
}
.wc-sheet-close:hover { background: var(--color-surface-2); color: var(--color-text); }
.wc-sheet-body {
  flex: 1; overflow-y: auto;
  padding: 1.25rem;
  -webkit-overflow-scrolling: touch;
}
.wc-sheet-footer {
  display: flex; gap: 0.75rem;
  padding: 1rem 1.25rem calc(1rem + env(safe-area-inset-bottom));
  border-top: 1px solid var(--color-divider);
  background: var(--color-surface);
}
.wc-sheet-footer .ghost-btn,
.wc-sheet-footer .primary-btn { flex: 1; }

/* ==========================================================================
   Form fields (shared)
   ========================================================================== */
.wc-form { display: flex; flex-direction: column; gap: 1rem; }
.wc-field { display: flex; flex-direction: column; gap: 6px; }
.wc-field > span {
  font-size: 0.85rem;
  color: var(--color-text);
  font-weight: 500;
}
.wc-field > span em {
  color: var(--color-accent);
  font-style: normal;
  margin-left: 2px;
}
.wc-field input,
.wc-field select,
.wc-field textarea {
  width: 100%;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  background: var(--color-surface);
  color: var(--color-text);
  font: inherit;
  font-size: 0.95rem;
  transition: border-color var(--transition);
}
.wc-field input:focus,
.wc-field select:focus,
.wc-field textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--color-primary) 18%, transparent);
}
.wc-field textarea { resize: vertical; min-height: 72px; font-family: inherit; }
.wc-form-notice {
  margin-top: 0.5rem;
  padding: 0.65rem 0.85rem;
  background: var(--color-surface-offset);
  border-left: 3px solid var(--color-warm);
  border-radius: 8px;
  font-size: 0.78rem;
  color: var(--color-text-muted);
  line-height: 1.55;
}

/* ==========================================================================
   Member detail
   ========================================================================== */
.member-detail { display: flex; flex-direction: column; gap: 1.25rem; }
.member-detail-hero {
  display: flex; align-items: center; gap: 1rem;
  padding: 1rem;
  background: var(--color-surface);
  border: 1px solid var(--color-divider);
  border-radius: 16px;
}
.avatar-lg { width: 64px; height: 64px; font-size: 1.5rem; }
.md-meta { font-size: 0.78rem; color: var(--color-text-muted); margin-bottom: 4px; }
.md-notes { font-size: 0.85rem; color: var(--color-text); line-height: 1.5; }
.md-kpis {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 0.65rem;
}
.md-kpi {
  background: var(--color-surface);
  border: 1px solid var(--color-divider);
  border-radius: 14px;
  padding: 0.85rem 0.5rem;
  text-align: center;
}
.md-kpi strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--color-primary);
  line-height: 1;
  margin-bottom: 4px;
}
.md-kpi span {
  font-size: 0.72rem;
  color: var(--color-text-muted);
}
.md-section h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--color-text);
  margin-bottom: 0.5rem;
}
.md-section-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}
.md-section-head h3 { margin: 0; }
.md-times { display: flex; flex-wrap: wrap; gap: 6px; }
.md-time-chip {
  background: var(--color-surface-offset);
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: 0.85rem;
  color: var(--color-primary);
}
.md-album {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.md-album-item {
  position: relative;
  aspect-ratio: 1;
  background: var(--color-surface-offset);
  border-radius: 10px;
  overflow: hidden;
  margin: 0;
}
.md-album-media {
  width: 100%; height: 100%; object-fit: cover;
  display: block;
}
.md-album-badge {
  position: absolute; right: 4px; top: 4px;
  background: rgba(28,24,18,.7);
  color: #fff;
  font-size: 0.65rem;
  padding: 2px 6px; border-radius: 6px;
}
.md-empty {
  font-size: 0.88rem;
  color: var(--color-text-muted);
  line-height: 1.5;
  padding: 1rem;
  background: var(--color-surface-offset);
  border-radius: 12px;
}
.md-actions {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px;
}
.md-action-btn {
  display: flex; flex-direction: column; align-items: flex-start;
  padding: 1rem;
  background: var(--color-surface);
  border: 1px solid var(--color-divider);
  border-radius: 14px;
  color: var(--color-text);
  text-align: left;
  transition: all var(--transition);
}
.md-action-btn:hover {
  border-color: var(--color-primary);
  background: color-mix(in oklab, var(--color-primary) 5%, var(--color-surface));
}
.md-action-ico { font-size: 1.4rem; margin-bottom: 4px; }
.md-action-btn span:nth-of-type(2) {
  font-size: 0.92rem; font-weight: 500;
}
.md-action-btn small {
  font-size: 0.72rem;
  color: var(--color-text-muted);
  margin-top: 2px;
  line-height: 1.4;
}
.md-section-danger { margin-top: 0.5rem; border-top: 1px solid var(--color-divider); padding-top: 1rem; }
.text-btn-danger {
  background: transparent;
  color: var(--color-accent);
  font-size: 0.85rem;
  padding: 0.5rem;
}
.text-btn-danger:hover { text-decoration: underline; }

/* ==========================================================================
   Reply composer
   ========================================================================== */
.reply-composer { display: flex; flex-direction: column; gap: 1rem; }
.reply-target {
  display: flex; align-items: center; gap: 0.65rem;
  padding: 0.75rem; background: var(--color-surface-offset);
  border-radius: 12px;
}
.reply-target label { font-size: 0.85rem; color: var(--color-text-muted); }
.reply-target select {
  flex: 1;
  padding: 0.45rem 0.7rem;
  border: 1px solid var(--color-border);
  background: var(--color-bg);
  border-radius: 8px;
  color: var(--color-text);
  font: inherit; font-size: 0.9rem;
}
.reply-quick-label, .reply-voice-label {
  font-size: 0.78rem; color: var(--color-text-muted);
  margin-bottom: 6px;
}
.reply-quick-row {
  display: flex; flex-wrap: wrap; gap: 6px;
}
.reply-chip {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  color: var(--color-text);
  font-size: 0.82rem;
  transition: all var(--transition);
}
.reply-chip:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
  background: color-mix(in oklab, var(--color-primary) 6%, var(--color-surface));
}
.reply-voice {
  padding: 0.85rem;
  background: var(--color-surface-offset);
  border-radius: 12px;
}
.reply-voice-controls {
  display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap;
}
.reply-rec-timer {
  font-family: var(--font-display);
  font-size: 0.95rem;
  color: var(--color-primary);
  min-width: 48px;
}
.is-recording { background: var(--color-accent) !important; color: #fff !important; border-color: var(--color-accent) !important; }
.reply-voice audio { width: 100%; margin-top: 0.5rem; }

/* ==========================================================================
   Share CTA (home quick entry)
   ========================================================================== */
.share-cta {
  display: flex; align-items: center; gap: 0.85rem;
  width: 100%;
  padding: 0.95rem 1rem;
  margin: 1.25rem 0 0.75rem;
  background: linear-gradient(135deg,
    color-mix(in oklab, var(--color-warm) 14%, var(--color-surface)),
    var(--color-surface));
  border: 1px solid color-mix(in oklab, var(--color-warm) 30%, var(--color-divider));
  border-radius: 16px;
  color: var(--color-text);
  text-align: left;
  transition: all var(--transition);
}
.share-cta:hover {
  border-color: var(--color-primary);
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(58,107,74,.1);
}
.share-cta-ico {
  font-size: 1.5rem;
  flex-shrink: 0;
}
.share-cta-text { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.share-cta-text strong {
  font-family: var(--font-display);
  font-size: 0.98rem;
  color: var(--color-primary);
}
.share-cta-text small {
  font-size: 0.76rem;
  color: var(--color-text-muted);
  line-height: 1.5;
}
.share-cta-arrow {
  font-size: 1.3rem;
  color: var(--color-text-muted);
  flex-shrink: 0;
}

/* ==========================================================================
   Album composer
   ========================================================================== */
.album-composer { display: flex; flex-direction: column; gap: 1rem; }
.composer-picker {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.composer-btn {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center;
  padding: 1rem 0.5rem;
  background: var(--color-surface);
  border: 1px solid var(--color-divider);
  border-radius: 14px;
  color: var(--color-text);
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
  gap: 2px;
}
.composer-btn:hover {
  border-color: var(--color-primary);
  background: color-mix(in oklab, var(--color-primary) 6%, var(--color-surface));
}
.pk-ico { font-size: 1.6rem; }
.composer-btn span:nth-of-type(2) { font-size: 0.85rem; font-weight: 500; }
.composer-btn small { font-size: 0.7rem; color: var(--color-text-muted); }

.composer-preview {
  position: relative;
  background: var(--color-surface-offset);
  border-radius: 14px;
  overflow: hidden;
  max-height: 320px;
  display: flex; align-items: center; justify-content: center;
}
.preview-media {
  max-width: 100%;
  max-height: 320px;
  object-fit: contain;
}
.preview-remove {
  position: absolute; right: 8px; top: 8px;
  width: 30px; height: 30px; border-radius: 50%;
  background: rgba(28,24,18,.7);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.85rem;
}

.composer-share-label {
  font-size: 0.82rem;
  color: var(--color-text-muted);
  margin-bottom: 6px;
}
.composer-share-list {
  display: flex; flex-wrap: wrap; gap: 6px;
}
.composer-share-chip {
  display: inline-flex; align-items: center;
  padding: 0.45rem 0.9rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  font-size: 0.85rem;
  color: var(--color-text);
  cursor: pointer;
  transition: all var(--transition);
}
.composer-share-chip input { display: none; }
.composer-share-chip:has(input:checked) {
  background: color-mix(in oklab, var(--color-primary) 12%, var(--color-surface));
  border-color: var(--color-primary);
  color: var(--color-primary);
  font-weight: 500;
}

/* Video recorder */
.video-recorder {
  display: flex; flex-direction: column; align-items: center;
  gap: 1rem;
}
.vr-preview {
  width: 100%;
  max-height: 380px;
  aspect-ratio: 3/4;
  object-fit: cover;
  background: #000;
  border-radius: 16px;
}
.vr-timer {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--color-accent);
}
.vr-controls {
  display: flex; align-items: center; gap: 1rem;
}
.vr-rec-btn {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: #fff;
  border: 4px solid var(--color-accent);
  position: relative;
  transition: all 0.2s;
}
.vr-rec-btn::before {
  content: '';
  position: absolute; inset: 6px;
  background: var(--color-accent);
  border-radius: 50%;
  transition: all 0.2s;
}
.vr-rec-btn.is-recording::before {
  inset: 18px;
  border-radius: 4px;
}
.vr-hint { font-size: 0.78rem; color: var(--color-text-muted); text-align: center; }

/* ==========================================================================
   Album timeline
   ========================================================================== */
.album {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--color-divider);
}
.section-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; margin-bottom: 0.75rem;
}
.album-timeline {
  display: flex; flex-direction: column; gap: 0.85rem;
  margin-top: 1rem;
}
.album-empty {
  text-align: center;
  padding: 2rem 1rem;
  background: var(--color-surface);
  border: 1px dashed var(--color-border);
  border-radius: 16px;
}
.album-empty-ico { font-size: 2.5rem; margin-bottom: 0.5rem; }
.album-empty h3 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  margin-bottom: 0.5rem;
}
.album-empty p {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  line-height: 1.6;
  margin-bottom: 1rem;
}

.album-post {
  position: relative;
  background: var(--color-surface);
  border: 1px solid var(--color-divider);
  border-radius: 16px;
  overflow: hidden;
}
.album-media-wrap {
  position: relative;
  background: var(--color-surface-offset);
}
.album-media {
  width: 100%;
  max-height: 400px;
  object-fit: cover;
  display: block;
}
.album-badge {
  position: absolute; left: 10px; top: 10px;
  background: rgba(28,24,18,.7);
  color: #fff;
  font-size: 0.75rem;
  padding: 3px 8px;
  border-radius: 8px;
}
.album-body {
  padding: 0.85rem 1rem 1rem;
}
.album-caption {
  font-size: 0.95rem;
  color: var(--color-text);
  line-height: 1.5;
  margin-bottom: 6px;
}
.album-meta {
  display: flex; gap: 6px;
  font-size: 0.75rem;
  color: var(--color-text-muted);
  flex-wrap: wrap;
}
.album-del {
  position: absolute; right: 8px; top: 8px;
  width: 30px; height: 30px; border-radius: 50%;
  background: rgba(28,24,18,.55);
  color: #fff;
  font-size: 0.8rem;
  backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity var(--transition);
}
.album-post:hover .album-del,
.album-post:focus-within .album-del { opacity: 1; }
@media (hover: none) { .album-del { opacity: 0.8; } }

/* ==========================================================================
   Toast
   ========================================================================== */
.wc-toast {
  position: fixed;
  left: 50%;
  bottom: calc(90px + env(safe-area-inset-bottom));
  transform: translate(-50%, 16px);
  background: var(--color-text);
  color: var(--color-bg);
  padding: 0.7rem 1.1rem;
  border-radius: 999px;
  font-size: 0.88rem;
  z-index: 200;
  opacity: 0;
  box-shadow: 0 8px 24px rgba(0,0,0,.2);
  transition: all 0.26s cubic-bezier(.16,1,.3,1);
  pointer-events: none;
}
.wc-toast.is-in {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* avatar color variants for new members */
.avatar-sun {
  background: linear-gradient(135deg, #e9b85a, #c98a2f);
  color: #fff;
}
.avatar-sea {
  background: linear-gradient(135deg, #6b9aa6, #4a7682);
  color: #fff;
}

/* ========= 試用期軌跡小卡 ========= */
.trial-insight { margin: 20px 0 28px; }
.insight-card {
  background: linear-gradient(135deg, #f4f7e9 0%, #e8f0d9 100%);
  border: 1px solid #c9d9a8;
  border-radius: 18px;
  padding: 20px 22px;
  box-shadow: 0 4px 14px rgba(58,107,74,0.08);
  position: relative;
  overflow: hidden;
}
.insight-card::before {
  content: '';
  position: absolute;
  top: -20px; right: -20px;
  width: 90px; height: 90px;
  background: radial-gradient(circle, rgba(106,148,84,0.18) 0%, transparent 70%);
  border-radius: 50%;
}
.insight-head {
  font-size: 16px;
  font-weight: 700;
  color: #3a6b4a;
  margin-bottom: 10px;
  position: relative;
}
.insight-sub {
  font-size: 13.5px;
  color: #6b7a64;
  margin: 0 0 10px;
}
.insight-list {
  list-style: none;
  padding: 0;
  margin: 0 0 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.insight-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 14px;
  background: rgba(255,255,255,0.7);
  border-radius: 10px;
  font-size: 14.5px;
}
.insight-sym { color: #2a4a34; font-weight: 500; }
.insight-ct { color: #6a9454; font-weight: 600; font-size: 13px; }
.insight-next {
  font-size: 12.5px;
  color: #6a9454;
  margin: 8px 0 0;
  padding-top: 10px;
  border-top: 1px dashed #c9d9a8;
  line-height: 1.6;
}
.insight-empty-msg {
  font-size: 14px;
  color: #6b7a64;
  margin: 0;
  line-height: 1.7;
}

/* ========== 養生水 chips ========== */
.water-chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 8px 0 4px; }
.water-chip { display: inline-flex; align-items: center; gap: 6px; }
.water-detail { margin-top: 12px; background: #fff; border: 1px solid #e4e8df; border-radius: 14px; padding: 14px 16px; }

/* ========== 起頭句編輯列 ========== */
.reply-quick-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.reply-quick-edit { display: flex; gap: 6px; }
.reply-quick-edit .ghost-btn.small { padding: 4px 10px; font-size: 12px; }

/* ========== v0.4.2：家人原聲卡重排 ========== */
.family-card {
  padding: 16px 18px 14px;
}
.family-msg {
  font-size: 16.5px;
  line-height: 1.75;
  color: #2c3a2a;
  margin: 8px 0 12px;
}
.family-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: stretch;
  margin-top: 10px;
}
.family-actions .family-primary {
  flex: 1 1 160px;
  min-height: 44px;
  font-size: 14.5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.family-actions .family-secondary {
  flex: 1 1 130px;
  min-height: 40px;
  font-size: 13.5px;
  padding: 8px 10px;
  white-space: nowrap;
}
.voice-status {
  margin: 10px 0 4px;
  padding: 8px 12px;
  background: #fff8ea;
  border: 1px solid #e9d9a5;
  border-radius: 10px;
  font-size: 12.5px;
  color: #7a5f1a;
  display: flex;
  align-items: center;
  gap: 8px;
}
.voice-status[hidden] { display: none; }

/* ========== 自由錄音：儲存按鈕列 ========== */
.free-save-row {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.free-save-row .primary-btn {
  width: 100%;
  max-width: 280px;
  font-size: 14.5px;
  padding: 12px 16px;
}
.free-saved {
  margin: 0;
  font-size: 12.5px;
  color: #3a6b4a;
  background: #eaf4e4;
  padding: 6px 14px;
  border-radius: 999px;
}

/* ========== 體質 radio 卡片 ========== */
.wc-const { border: none; padding: 0; margin: 14px 0; }
.wc-const legend { font-size: 13.5px; font-weight: 600; color: #2c3a2a; margin-bottom: 4px; padding: 0; }
.wc-const-help { font-size: 12.5px; color: #7a8578; margin: 0 0 10px; line-height: 1.6; }
.wc-const-grid { display: grid; gap: 8px; }
.wc-const-item {
  display: flex;
  gap: 10px;
  padding: 12px 14px;
  border: 1.5px solid #e4e8df;
  border-radius: 12px;
  cursor: pointer;
  background: #fff;
  transition: border-color .15s, background .15s;
  align-items: flex-start;
}
.wc-const-item:hover { border-color: #b9ccac; background: #f8fbf3; }
.wc-const-item input[type="radio"] { margin-top: 3px; accent-color: #3a6b4a; }
.wc-const-item:has(input:checked) { border-color: #3a6b4a; background: #eff5e9; box-shadow: inset 0 0 0 1px #3a6b4a; }
.wc-const-body { flex: 1; display: flex; flex-direction: column; gap: 3px; }
.wc-const-body strong { font-size: 14px; color: #2c3a2a; }
.wc-const-body small { font-size: 12.5px; color: #667566; line-height: 1.65; }

/* ========== Composer：拍照/短片合併 ========== */
.composer-picker-compact {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.composer-btn-main {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 20px 16px 14px;
  border: 2px dashed #c7d4bc;
  border-radius: 14px 14px 0 0;
  background: #fbfdf8;
  cursor: pointer;
  text-align: center;
}
.composer-btn-main .pk-ico { font-size: 28px; line-height: 1; }
.composer-btn-main .pk-title { font-size: 15px; font-weight: 600; color: #2c3a2a; }
.composer-btn-main small { font-size: 12px; color: #7a8578; }
.composer-sub {
  display: flex;
  border: 2px dashed #c7d4bc;
  border-top: none;
  border-radius: 0 0 14px 14px;
  overflow: hidden;
}
.composer-sub-btn {
  flex: 1;
  padding: 10px 12px;
  font-size: 13px;
  background: #fff;
  border: none;
  border-right: 1px solid #e4e8df;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: #3a6b4a;
}
.composer-sub-btn:last-child { border-right: none; }
.composer-sub-btn:hover { background: #f3f7ed; }
.pk-ico-sm { font-size: 16px; }

/* ========== 聯絡方式切換（Email / 手機） ========== */
.contact-mode-row {
  display: flex;
  gap: 0;
  border: 1.5px solid #e4e8df;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 8px;
}
.contact-mode {
  flex: 1;
  padding: 10px 12px;
  background: #fff;
  border: none;
  cursor: pointer;
  font-size: 13.5px;
  color: #7a8578;
  transition: background .15s, color .15s;
}
.contact-mode:not(:last-child) { border-right: 1px solid #e4e8df; }
.contact-mode.is-active {
  background: #3a6b4a;
  color: #fff;
  font-weight: 600;
}
.reply-contact input[type="email"],
.reply-contact input[type="tel"] {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid #e4e8df;
  border-radius: 10px;
  font-size: 14.5px;
  background: #fff;
}
.reply-contact input:focus {
  outline: none;
  border-color: #3a6b4a;
}

/* QR 邀請 - 雙按鈕並排 */
.add-member-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}
.add-member-row .dashed-btn {
  width: 100%;
  font-size: 14px;
  padding: 14px 10px;
}
@media (max-width: 420px) {
  .add-member-row { grid-template-columns: 1fr; }
}

/* ============ #1 想問豆豆 自然語問答框 ============ */
.wc-ask {
  background: linear-gradient(135deg, #fff9f0 0%, #f5f0e4 100%);
  border: 1px solid #e8dcc4;
  border-radius: 16px;
  padding: 16px;
  margin: 16px 0 20px;
  box-shadow: 0 2px 8px rgba(120, 90, 40, 0.06);
}
.wc-ask-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  color: #6b4e1f;
}
.wc-ask-head strong { font-size: 15px; font-weight: 600; }
.wc-ask-head small { color: #9a7a4a; font-size: 12px; }
.wc-ask-icon { font-size: 18px; }
#wc-ask-input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d6cfb8;
  border-radius: 10px;
  font-size: 14px;
  font-family: inherit;
  resize: none;
  background: #fff;
  color: #3a2f1e;
}
#wc-ask-input:focus { outline: 2px solid #c9a86a; border-color: transparent; }
.wc-ask-row {
  display: flex;
  gap: 10px;
  align-items: flex-end;
  margin-top: 10px;
  flex-wrap: wrap;
}
.wc-ask-examples {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  flex: 1;
}
.ask-chip {
  border: 1px solid #c9a86a;
  background: #fff;
  color: #6b4e1f;
  border-radius: 20px;
  padding: 5px 12px;
  font-size: 12px;
  cursor: pointer;
  font-family: inherit;
}
.ask-chip:hover { background: #f5e8cc; }
.primary-btn.sm { padding: 8px 16px; font-size: 13px; }
.wc-ask-answer {
  margin-top: 14px;
  padding: 14px;
  background: #fff;
  border-radius: 12px;
  border: 1px solid #e8dcc4;
}
.ans-friendly {
  font-size: 15px;
  color: #3a6b4a;
  font-weight: 500;
  margin-bottom: 10px;
  line-height: 1.7;
}
.ans-verdict { margin: 8px 0 12px; }
.ans-verdict p {
  margin: 4px 0;
  padding: 8px 10px;
  background: #f8f9f4;
  border-radius: 8px;
  font-size: 13px;
  color: #2d3b2f;
}
.ans-block {
  margin: 10px 0;
  padding: 10px 12px;
  background: #f0f7ea;
  border-left: 3px solid #5a8a5f;
  border-radius: 6px;
}
.ans-block.ans-avoid {
  background: #fdf0eb;
  border-left-color: #c88163;
}
.ans-block strong { display: block; margin-bottom: 6px; font-size: 13px; color: #3a6b4a; }
.ans-block.ans-avoid strong { color: #8b4a2e; }
.ans-block ul { margin: 0; padding-left: 20px; }
.ans-block li { font-size: 13px; color: #3a3a3a; margin: 2px 0; }
.ans-note p {
  margin: 6px 0;
  padding: 8px 10px;
  background: #fff9f0;
  border-radius: 6px;
  font-size: 12px;
  color: #6b4e1f;
  line-height: 1.6;
}
.ans-footer {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed #e0d6bf;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.ans-footer small { color: #7a8578; font-size: 11px; flex: 1; }

/* ============ #2 每日叮嚀卡 ============ */
.daily-ping {
  margin: 14px 0 20px;
}
.daily-ping-inner {
  background: linear-gradient(135deg, #eaf5ea 0%, #f5ede0 100%);
  border: 1px solid #c8d9c2;
  border-radius: 18px;
  padding: 18px;
  box-shadow: 0 2px 10px rgba(60, 110, 70, 0.08);
  position: relative;
  overflow: hidden;
}
.daily-ping-inner::before {
  content: '';
  position: absolute;
  top: -30px;
  right: -30px;
  width: 120px;
  height: 120px;
  background: radial-gradient(circle, rgba(200, 180, 120, 0.2) 0%, transparent 70%);
  border-radius: 50%;
}
.dp-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.dp-badge {
  background: #3a6b4a;
  color: #fff;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 500;
}
.dp-greeting {
  color: #6b4e1f;
  font-weight: 600;
  font-size: 14px;
}
.dp-text {
  font-size: 16px;
  line-height: 1.8;
  color: #2d3b2f;
  margin: 10px 0 14px;
  font-family: 'Noto Serif TC', serif;
  position: relative;
  z-index: 1;
}
.dp-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.dp-hint {
  display: block;
  color: #7a8578;
  font-size: 11px;
  line-height: 1.5;
}

/* #3 分享給家人 - 自行選取 chip */
.composer-share-chip--custom {
  border-style: dashed !important;
  color: #6b4e1f;
}
.composer-share-chip--custom span { font-weight: 500; }

/* ============================================================
   溫心・家 v0.5 — 金流 & 精修補丁
   ============================================================ */

/* 頂部 topbar 加入訂閱標示 */
.topbar { gap: 0.5rem; }

/* 家人卡片精修：更溫潤圓角、呼吸感 */
.family-card {
  margin-top: 1.5rem;
  padding: 1.375rem 1.375rem 1.25rem;
  border-radius: 1.5rem;
  border: 1px solid rgba(201,138,47,.18);
}
.family-card-head {
  margin-bottom: 0.5rem;
}
.family-tag {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-text-muted);
  letter-spacing: .04em;
}
.family-time {
  font-size: 0.75rem;
  color: var(--color-text-faint);
}
.family-msg {
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--color-text);
  line-height: 1.75;
  margin-bottom: 0.875rem;
}

/* 語音狀態條精修 */
.voice-status {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.72rem;
  color: var(--color-text-muted);
  padding: 6px 10px;
  border-radius: var(--r-md);
  margin-bottom: 10px;
  line-height: 1.4;
}
.voice-status-missing {
  background: var(--color-warm-highlight);
  color: var(--color-warm);
}
.voice-status-missing .voice-status-dot {
  background: var(--color-warm);
  flex-shrink: 0;
}
.voice-status-ready {
  background: var(--color-primary-highlight);
  color: var(--color-primary);
}
.voice-status-ready .voice-status-dot {
  background: var(--color-primary);
  flex-shrink: 0;
}

/* 行動按鈕行精修 */
.family-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.family-primary {
  flex: 1;
  min-width: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.family-secondary {
  font-size: 0.8rem;
  padding: 0.5rem 0.875rem;
}

/* 分享 CTA 精修 */
.share-cta {
  border-radius: var(--r-xl);
  border: 1px solid var(--color-divider);
  padding: 14px 16px;
  background: var(--color-surface);
  gap: 12px;
  transition: box-shadow var(--transition), transform var(--transition);
}
.share-cta:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}
.share-cta-ico { font-size: 1.5rem; }
.share-cta-text strong { font-size: 0.9rem; }
.share-cta-text small { font-size: 0.78rem; }

/* 法律聲明精修 */
.legal-note {
  font-size: 0.75rem;
  color: var(--color-text-faint);
  line-height: 1.7;
  padding: 14px 16px;
  background: var(--color-surface-offset);
  border-radius: var(--r-lg);
  border-left: 3px solid var(--color-divider);
  margin-top: 1.5rem;
}
.legal-note strong {
  color: var(--color-accent);
}

/* 底部 Footer 精修 */
footer.footer {
  padding: 20px 20px 96px !important;
  background: var(--color-surface);
  border-top: 1px solid var(--color-divider);
}

/* 首頁英雄區精修 */
.hero { padding: 1.5rem 1rem 0.5rem; }
.eyebrow {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: .1em;
  color: var(--color-text-faint);
  text-transform: uppercase;
  margin-bottom: 6px;
}
.greeting {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 4vw, 1.8rem);
  font-weight: 700;
  line-height: 1.35;
  color: var(--color-text);
  margin-bottom: 8px;
}
.greeting em {
  font-style: normal;
  color: var(--color-primary);
}
.hero-sub {
  font-size: 0.88rem;
  color: var(--color-text-muted);
  line-height: 1.65;
}

/* 症狀按鈕精修 */
.symptom-btn {
  border: 1px solid var(--color-border);
  border-radius: var(--r-lg);
  padding: 12px 10px;
  background: var(--color-surface);
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.symptom-btn:hover {
  border-color: var(--color-primary);
  background: var(--color-primary-highlight);
}
.symptom-btn.is-active {
  border: 2px solid var(--color-primary);
  background: var(--color-primary-highlight);
  color: var(--color-primary);
}
.symptom-ico { font-size: 1.3rem; }
.symptom-label { font-size: 0.78rem; font-weight: 500; line-height: 1.2; }

/* 主要按鈕精修 */
.primary-btn {
  border-radius: var(--r-full);
  font-weight: 600;
  letter-spacing: .03em;
  transition: all var(--transition);
}
.primary-btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }
.primary-btn:active { transform: translateY(0); box-shadow: none; }

/* 深色模式金流補丁 */
[data-theme='dark'] .wc-pay-box { background: var(--color-surface) !important; }
[data-theme='dark'] .wc-plan-card,
[data-theme='dark'] .wc-method-btn { background: var(--color-surface-2) !important; color: var(--color-text) !important; }
[data-theme='dark'] .wc-sub-banner { background: linear-gradient(135deg,#2e4434,#3a3225) !important; border-color:#4b4230 !important; }
[data-theme='dark'] .wc-sub-banner-text strong { color: #b0d4b8 !important; }
[data-theme='dark'] .wc-sub-banner-text small { color: #7a9e82 !important; }

/* ans-legal 免責聲明（每次建議下方常駐）*/
.ans-legal {
  margin-top: 10px;
  padding: 10px 13px;
  background: #fdf6e3;
  border-left: 3px solid #c98a2f;
  border-radius: 0 var(--r-md) var(--r-md) 0;
  font-size: 0.72rem;
  color: #6b5a2e;
  line-height: 1.65;
}
.ans-legal strong { color: #a83a22; }

[data-theme='dark'] .ans-legal {
  background: #2a2210;
  border-left-color: #e0a857;
  color: #c4a85a;
}

/* 聲音同意書 modal */
.wc-consent-overlay {
  position: fixed; inset: 0; z-index: 1100;
  background: rgba(20,14,6,.62);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
.wc-consent-box {
  background: var(--color-surface);
  border-radius: var(--r-xl);
  padding: 28px 24px 24px;
  max-width: 400px; width: 100%;
  box-shadow: 0 24px 60px rgba(0,0,0,.25);
}
.wc-consent-box h3 {
  font-family: var(--font-display);
  font-size: 1.05rem; font-weight: 700;
  color: var(--color-primary); margin-bottom: 10px;
}
.wc-consent-box p {
  font-size: 0.82rem; color: var(--color-text-muted);
  line-height: 1.7; margin-bottom: 16px;
}
.wc-consent-box .consent-agree {
  width: 100%; padding: 12px;
  background: var(--color-primary); color: #fff;
  border: none; border-radius: var(--r-full);
  font-size: 14px; font-weight: 600; cursor: pointer;
  margin-bottom: 8px;
}
.wc-consent-box .consent-decline {
  width: 100%; padding: 10px;
  background: transparent; color: var(--color-text-muted);
  border: 1px solid var(--color-border); border-radius: var(--r-full);
  font-size: 13px; cursor: pointer;
}

/* ============================================================
   v0.5.3 — 體質選擇卡片 + 日誌精修 + 傳送設計
   ============================================================ */

/* 體質 Chip 卡片（取代舊 radio 列） */
.wc-const-chips {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.wc-cchip { cursor: pointer; }
.wc-cchip-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 10px 6px;
  border: 1.5px solid var(--color-border);
  border-radius: var(--r-lg);
  background: var(--color-surface);
  text-align: center;
  transition: all var(--transition);
}
.wc-cchip-ico { font-size: 20px; line-height: 1; }
.wc-cchip-inner strong { font-size: 12px; font-weight: 600; color: var(--color-text); display: block; }
.wc-cchip-inner small  { font-size: 10px; color: var(--color-text-faint); line-height: 1.3; display: block; }
.wc-cchip.is-active .wc-cchip-inner {
  border-color: var(--color-primary);
  background: var(--color-primary-highlight);
}
.wc-cchip.is-active .wc-cchip-inner strong { color: var(--color-primary); }

/* 日誌行精修 */
.diary-list { list-style: none; padding: 0; margin: 0;
  border: 0.5px solid var(--color-divider); border-radius: var(--r-lg); overflow: hidden; }
.diary-row:last-child { border-bottom: none !important; }

/* 家人頁：Send flow 說明 */
.wc-send-guide {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--r-lg);
  padding: 14px 16px;
  margin-top: 16px;
}
.wc-send-guide h3 {
  font-size: 14px; font-weight: 600; color: var(--color-primary);
  margin-bottom: 10px;
}
.wc-send-step {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 8px 0; border-top: 1px solid var(--color-divider);
  font-size: 13px; color: var(--color-text); line-height: 1.55;
}
.wc-send-step:first-of-type { border-top: none; padding-top: 0; }
.wc-send-step-num {
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--color-primary); color: #fff;
  font-size: 11px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; margin-top: 1px;
}
