:root {
  /* 暖灰底 + 苔绿主色（京都喫茶店：安静 · 克制 · 私密） */
  --bg: #e9e6df;
  --surface: #f3f1ea;
  --ink: #3b3a35;
  --muted: #8c887e;
  --line: #ddd8cd;
  --accent: #6f7d5a;        /* 苔绿 */
  --accent-deep: #566546;   /* 深苔绿（录音中 / 强调） */
  --accent-soft: #b3bda3;
  --radius: 14px;
  --space: 20px;
  font-family: "Noto Serif SC", "Songti SC", "Yu Mincho", "Hiragino Mincho ProN", "Source Han Serif SC", "SimSun", serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}

#app {
  max-width: 560px;
  margin: 0 auto;
  min-height: 100vh;
  padding: 0 var(--space) calc(var(--space) * 3);
}

/* 系列切换条：回转 Hub + 兄弟站（安静、不抢主视觉） */
.series-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 0 8px;
  border-bottom: 1px solid var(--line);
  font-size: 11px; letter-spacing: .08em;
}
.series-bar a { color: var(--muted); text-decoration: none; transition: color .15s; }
.series-bar a:hover { color: var(--accent); }
.series-bar .series-name { color: #a9a49a; }

/* 顶栏 */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px 0 16px;
  position: sticky; top: 0; background: var(--bg); z-index: 10;
}
.brand { font-size: 18px; font-weight: 600; letter-spacing: .04em; }
.brand-sub { color: var(--accent); font-weight: 400; margin-left: 4px; }
.nav { display: flex; gap: 4px; }
.nav-btn {
  border: none; background: transparent; color: var(--muted);
  font-size: 14px; padding: 6px 10px; border-radius: 999px; cursor: pointer;
  transition: all .2s;
}
.nav-btn.active { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.05); }

.view { padding-top: 8px; }

/* 问候 */
.greeting-jp { font-size: 13px; color: var(--accent); letter-spacing: .08em; }
.greeting-cn { font-size: 22px; font-weight: 500; margin: 4px 0 18px; }
.quote {
  display: flex; align-items: baseline; gap: 6px;
  font-size: 13px; color: var(--muted); border-left: 3px solid var(--accent-soft);
  padding: 8px 0 8px 14px; margin: 0 0 20px;
  transition: opacity .18s ease; position: relative;
}
.quote-tag {
  flex-shrink: 0; align-self: center;
  font-size: 10px; letter-spacing: .04em;
  color: var(--accent); background: var(--accent-soft);
  padding: 2px 7px; border-radius: 999px; font-style: normal;
  white-space: nowrap;
}
.quote-text { font-style: italic; flex: 1; min-width: 0; }
.quote-author { white-space: nowrap; color: var(--muted); opacity: .7; font-size: 12px; }
.quote-next {
  flex-shrink: 0; border: none; background: transparent; cursor: pointer;
  font-size: 15px; color: var(--muted); opacity: .4;
  transition: opacity .2s, transform .25s var(--ease-back);
  padding: 2px 4px; border-radius: 6px; line-height: 1;
}
.quote-next:hover { opacity: .85; transform: rotate(180deg); }

/* 目标 */
.goal {
  background: var(--surface); border-radius: var(--radius);
  padding: 14px 16px; margin-bottom: 18px; border: 1px solid var(--line);
}
.goal-top { display: flex; align-items: center; justify-content: space-between; }
.goal-label { font-size: 14px; }
.goal-bar {
  height: 8px; background: var(--line); border-radius: 999px;
  overflow: hidden; margin: 10px 0 8px;
}
.goal-bar-fill {
  height: 100%; background: var(--accent); border-radius: 999px;
  transition: width .35s ease;
}
.goal-stats { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); }
.goal-stats b { color: var(--accent); }
.goal-makeup { font-size: 12px; color: var(--accent-deep); margin-top: 6px; }

/* 话题难度标签 */
.lv-tag {
  display: inline-block; font-size: 11px; line-height: 1; padding: 3px 7px;
  border-radius: 999px; margin-bottom: 6px; color: #fff;
}
.lv-light { background: #9aa884; }
.lv-medium { background: #7d8c63; }
.lv-heavy { background: #566546; }

/* 话题卡 */
.topic-card {
  background: var(--surface); border-radius: var(--radius);
  padding: 18px 18px 16px; margin-bottom: 18px;
  border: 1px solid var(--line);
}
.topic-label { font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.topic-text { font-size: 17px; line-height: 1.7; margin-bottom: 12px; }
.topic-actions { display: flex; gap: 8px; }
.link-btn {
  border: none; background: transparent; color: var(--accent);
  font-size: 13px; cursor: pointer; padding: 4px 6px;
}
.link-btn:hover { text-decoration: underline; }

/* 录音 */
.record-zone { text-align: center; padding: 10px 0 8px; }
.rec-hint { font-size: 12px; color: var(--muted); margin-top: 10px; }
.rec-timer { font-size: 14px; color: var(--muted); margin: 8px 0; font-variant-numeric: tabular-nums; }

.rec-btn {
  width: 84px; height: 84px; border-radius: 50%;
  border: none; cursor: pointer; margin: 6px auto;
  background: var(--accent); color: #fff; font-size: 30px;
  box-shadow: 0 6px 18px rgba(111,125,90,.32);
  transition: transform .15s, background .2s;
  user-select: none; -webkit-user-select: none; touch-action: none;
}
.rec-btn:active { transform: scale(.95); }
.rec-btn.recording { background: var(--accent-deep); animation: pulse 1.4s infinite; }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(86,101,70,.4); } 50% { box-shadow: 0 0 0 14px rgba(86,101,70,0); } }

/* 日志列表 */
.log-item {
  background: var(--surface); border-radius: var(--radius);
  padding: 14px 16px; margin-bottom: 12px; border: 1px solid var(--line);
}
.log-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; }
.log-date { font-size: 13px; color: var(--muted); }
.log-topic { font-size: 14px; color: var(--ink); margin-bottom: 8px; }
.log-meta { font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.log-controls { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.mini-btn {
  border: 1px solid var(--line); background: var(--bg); color: var(--ink);
  font-size: 12px; padding: 5px 10px; border-radius: 999px; cursor: pointer;
}
.mini-btn:hover { border-color: var(--accent); color: var(--accent); }

.player-bar { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.play-btn {
  width: 34px; height: 34px; border-radius: 50%; border: none;
  background: var(--accent); color: #fff; cursor: pointer; font-size: 14px;
}
.player-time { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.player-note { font-size: 11px; color: var(--muted); padding: 5px 0; }

/* 导出 */
.section-title { font-size: 15px; font-weight: 600; margin: 4px 0 14px; }
.voice-profile {
  background: var(--surface); border: 1px solid var(--line);
  border-left: 3px solid var(--accent); border-radius: 10px;
  padding: 16px 18px; margin-bottom: 22px;
}
.vp-head { font-size: 12px; font-weight: 700; color: var(--accent); letter-spacing: .03em; margin-bottom: 12px; }
.vp-stats { display: flex; gap: 28px; }
.vp-stat { display: flex; flex-direction: column; }
.vp-num { font-size: 24px; font-weight: 800; color: var(--ink); line-height: 1.1; }
.vp-label { font-size: 12px; color: var(--muted); margin-top: 2px; }
.vp-topics { margin-top: 12px; font-size: 13px; color: var(--muted); line-height: 1.8; }
.vp-chip {
  display: inline-block; background: var(--bg); border: 1px solid var(--line);
  border-radius: 999px; padding: 2px 10px; margin: 0 4px 4px 0; color: var(--ink);
}
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
select, .big-btn {
  font-size: 14px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); padding: 10px 12px;
}
select { width: 100%; }
.big-btn {
  width: 100%; background: var(--accent); color: #fff; border: none;
  cursor: pointer; font-weight: 500; margin-top: 8px;
}
.big-btn:active { transform: scale(.99); }
.range-note { font-size: 12px; color: var(--muted); margin-top: 6px; }

/* 关于页 */
.about { padding-top: 8px; }
.about-hero { text-align: center; padding: 18px 0 6px; }
.about-jp { font-size: 13px; color: var(--accent); letter-spacing: .1em; }
.about-title { font-size: 24px; font-weight: 500; margin: 6px 0 4px; letter-spacing: .04em; }
.about-sub { font-size: 12px; color: var(--muted); }

.promise {
  margin: 22px 0; padding: 22px 20px;
  background: var(--surface); border-radius: var(--radius);
  border: 1px solid var(--line); text-align: center;
}
.promise-line {
  font-size: 20px; font-weight: 500; margin: 0 0 10px;
  letter-spacing: .08em; color: var(--ink);
}
.promise-line:last-of-type { margin-bottom: 0; }
.promise-leave {
  font-size: 13px; color: var(--muted); margin: 16px 0 0;
  padding-top: 14px; border-top: 1px dashed var(--line);
}

.story { margin: 0 0 22px; }
.story p {
  font-size: 15px; line-height: 1.8; margin: 0 0 12px; color: var(--ink);
}

.gourmet {
  margin: 0 0 22px; padding: 18px 18px 4px;
  background: var(--surface); border-radius: var(--radius);
  border: 1px solid var(--line); border-left: 3px solid var(--accent-soft);
}
.gourmet-title {
  font-size: 15px; font-weight: 600; margin: 0 0 12px;
  color: var(--accent-deep);
}
.gourmet p {
  font-size: 14px; line-height: 1.8; margin: 0 0 14px; color: var(--ink);
}

.about-foot { text-align: center; margin: 10px 0 6px; }
.about-foot-note { font-size: 12px; color: var(--muted); margin: 0 0 8px; }
.about-quote {
  font-size: 14px; color: var(--ink); letter-spacing: .06em;
  font-weight: 500; margin: 0;
}

/* 常见问题：低调折叠，不抢视觉重心 */
.faq {
  margin: 22px auto 0; max-width: 560px; padding: 0 4px;
  border-top: 1px solid var(--line);
}
.faq summary {
  list-style: none; cursor: pointer; user-select: none;
  font-size: 13px; color: var(--muted); padding: 14px 2px;
  display: flex; align-items: center; gap: 6px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before {
  content: "›"; font-size: 16px; line-height: 1; color: var(--muted);
  transition: transform .15s ease;
}
.faq[open] summary::before { transform: rotate(90deg); }
.faq-a {
  font-size: 13px; color: var(--muted); line-height: 1.7;
  padding: 0 2px 16px;
}
.faq-a p { margin: 0 0 8px; }
.faq-a ul { margin: 0; padding-left: 18px; }
.faq-a li { margin: 4px 0; }
.faq-a b { color: var(--ink); font-weight: 500; }

.empty { text-align: center; color: var(--muted); font-size: 14px; padding: 40px 0; }

/* 母品牌页脚：安静的归属标注，不抢子品牌 slogan 的视觉重心 */
.site-footer {
  margin-top: 44px; padding-top: 22px;
  border-top: 1px solid var(--line);
  text-align: center;
}
.mother-slogan {
  font-size: 14px; color: var(--ink); letter-spacing: .06em;
  font-weight: 500; margin: 0 0 6px;
}
.series-tag {
  font-size: 11px; color: var(--muted); letter-spacing: .04em; margin: 0;
}
.foot-links { margin-top: 10px; }
.foot-links a {
  display: inline-block; font-size: 12px; color: var(--muted); text-decoration: none;
  margin: 0 8px; transition: color .15s;
}
.foot-links a:hover { color: var(--accent); }
.brand-line {
  font-size: 11px; color: var(--muted); letter-spacing: .1em;
  margin: 0 0 12px;
}

/* Toast */
.toast {
  position: fixed; left: 50%; bottom: 32px; transform: translateX(-50%);
  background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 999px;
  font-size: 13px; z-index: 100; opacity: 0; transition: opacity .25s;
}
.toast.show { opacity: 1; }

/* 顶栏齿轮（不突兀的小入口） */
.nav-gear {
  border: none; background: transparent; color: var(--muted);
  font-size: 17px; padding: 6px 8px; margin-left: 2px; cursor: pointer;
  border-radius: 999px; transition: all .2s; line-height: 1;
}
.nav-gear:hover { color: var(--accent); background: var(--surface); }

/* AI 设置弹层 */
.ai-overlay {
  position: fixed; inset: 0; background: rgba(40, 38, 33, .42);
  display: none; align-items: center; justify-content: center; z-index: 200;
  padding: 20px;
}
.ai-overlay.show { display: flex; }
.ai-panel {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  width: 100%; max-width: 420px; padding: 22px; box-shadow: 0 12px 40px rgba(0,0,0,.18);
  max-height: 88vh; overflow-y: auto;
}
.ai-panel-head { font-size: 16px; font-weight: 600; color: var(--ink); margin-bottom: 6px; }
.ai-panel-desc { font-size: 12px; color: var(--muted); line-height: 1.6; margin-bottom: 14px; }
.ai-check { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink); margin-bottom: 12px; cursor: pointer; }
.ai-field { display: block; font-size: 12px; color: var(--muted); margin-bottom: 12px; }
.ai-field input {
  display: block; width: 100%; margin-top: 5px; padding: 9px 11px;
  border: 1px solid var(--line); border-radius: 10px; background: #fff;
  font-size: 13px; color: var(--ink); font-family: inherit;
}
.ai-field input:focus { outline: none; border-color: var(--accent-soft); }
.ai-key-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; margin-top: 5px; margin-left: 4px;
  background: none; border: 1px solid var(--line); border-radius: 6px;
  cursor: pointer; font-size: 12px; color: var(--muted);
  transition: all .15s; vertical-align: top;
}
.ai-key-toggle:hover { border-color: var(--accent-soft); color: var(--ink); }
.ai-tut { font-size: 12px; color: var(--muted); margin: 2px 0 12px; }
.ai-tut a { color: var(--accent); text-decoration: none; }
.ai-tut a:hover { text-decoration: underline; }
.ai-test-row { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.ai-test-res { font-size: 12px; line-height: 1.5; }
.ai-panel-actions { display: flex; gap: 10px; justify-content: flex-end; }
.ai-sep { height: 1px; background: var(--line); margin: 16px 0 12px; }
.ai-nav-btn { display: block; width: 100%; text-align: left; padding: 10px 14px; margin-bottom: 6px; border-radius: var(--radius); font-size: 14px; cursor: pointer; transition: background .15s; }

/* 录音结束反馈卡 */
.recap { padding-top: 14px; }
.recap-head { font-size: 17px; font-weight: 600; color: var(--ink); }
.recap-meta { font-size: 12px; color: var(--muted); margin: 4px 0 16px; }
.vol-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; margin-bottom: 14px;
}
.vol-row { display: flex; justify-content: space-between; align-items: baseline; font-size: 13px; color: var(--muted); }
.vol-row b { font-size: 22px; color: var(--accent-deep); font-weight: 600; }
.vol-meter { height: 8px; border-radius: 999px; background: var(--line); overflow: hidden; margin: 10px 0 8px; }
.vol-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, #9bb39a, #6f9b8a 55%, #e3a857); }
.vol-note { font-size: 12px; color: var(--muted); line-height: 1.6; }
.vol-note a { color: var(--accent); text-decoration: none; }
.vol-note a:hover { text-decoration: underline; }

/* 录音中实时音量条（灰=低 / 绿=中 / 橙=高） */
.vol-meter-live {
  height: 6px; border-radius: 999px; background: var(--line);
  overflow: hidden; margin: 2px 0 0;
}
.vml-fill {
  height: 100%; width: 4%; border-radius: 999px;
  background: #b9b3a8; transition: width .06s linear, background .25s;
}

/* 连续高音量 → FaceTalk 引导横幅 */
.ft-banner {
  background: linear-gradient(180deg, rgba(111,125,90,.16), rgba(111,125,90,.05));
  border: 1px solid var(--accent-soft); border-left: 3px solid var(--accent);
  border-radius: var(--radius); padding: 14px 16px; margin-bottom: 14px;
  font-size: 13.5px; line-height: 1.7; color: var(--ink);
}
.ft-banner a { color: var(--accent-deep); text-decoration: none; font-weight: 600; }
.ft-banner a:hover { text-decoration: underline; }

/* AI 引导（反馈卡内） */
.ai-guide { margin-bottom: 14px; }
.ai-guide-locked {
  background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius);
  padding: 14px; font-size: 13px; color: var(--muted); text-align: center; line-height: 1.7;
}
.ai-guide-locked .link-btn { margin: 0 4px; }
.ai-guide-tip { font-size: 11px; color: #a9a49a; margin-top: 4px; }
.ai-guide-ready {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px;
}
.ai-guide-title { font-size: 13px; color: var(--accent-deep); font-weight: 600; margin-bottom: 8px; }
.ai-note {
  display: block; width: 100%; min-height: 56px; resize: vertical;
  padding: 9px 11px; border: 1px solid var(--line); border-radius: 10px; background: #fff;
  font-size: 13px; color: var(--ink); font-family: inherit; margin-bottom: 10px;
}
.ai-note:focus { outline: none; border-color: var(--accent-soft); }
.ai-go { width: 100%; }
.ai-result { margin-top: 12px; font-size: 13px; line-height: 1.75; }
.ai-loading { color: var(--muted); }
.ai-body { color: var(--ink); white-space: normal; }
.ai-err { color: #b4452f; font-size: 12px; line-height: 1.6; }

.recap-quote {
  font-size: 13px; color: var(--accent-deep); line-height: 1.7;
  border-left: 3px solid var(--accent-soft); padding: 4px 0 4px 12px; margin-bottom: 18px;
}
.recap-actions { display: flex; }
.recap-actions .big-btn { flex: 1; }

/* ── 桌面端响应式（≥768px）：放宽布局 + 两侧留白有设计感 ── */
@media (min-width: 768px) {
  body {
    /* 微妙的暖色渐变背景，让两侧留白看起来是有意"画框"而非空缺 */
    background:
      radial-gradient(ellipse at 20% 0%, rgba(111,125,90,.06) 0%, transparent 55%),
      radial-gradient(ellipse at 80% 100%, rgba(179,189,163,.07) 0%, transparent 50%),
      var(--bg);
  }
  #app {
    max-width: 700px;          /* 从 560 放宽到 700，桌面不再像窄条 */
    padding-bottom: calc(var(--space) * 3);
  }
  .greeting-cn { font-size: 26px; }   /* 标题稍大，桌面可读性更好 */
  .topic-text { font-size: 19px; }     /* 话题文字稍大 */
  .rec-btn {
    width: 96px; height: 96px;         /* 录音按钮稍大，桌面操作更舒适 */
    font-size: 34px;
  }
}


/* ===== 语言切换（2026-09-01） ===== */
.lang-select {
  background: transparent;
  border: 1px solid rgba(111,125,90,0.3);
  border-radius: 6px;
  color: #6f7d5a;
  font-size: 13px;
  padding: 3px 6px;
  cursor: pointer;
  font-family: inherit;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  text-align: center;
  min-width: 42px;
}
.lang-select:hover {
  border-color: #6f7d5a;
  background: rgba(111,125,90,0.06);
}
.lang-select:focus {
  border-color: #6f7d5a;
}
@media (max-width: 480px) {
  .lang-select { font-size: 12px; padding: 2px 4px; min-width: 36px; }
}
