@font-face { font-family: "NotoSansMongolian"; src: url("fonts/NotoSansMongolian-Regular.ttf") format("truetype"); font-display: swap; }
/* 全局样式 & 主题色（对应小程序 app.wxss） */
:root {
  --green: #2f7d4f; --green-d: #1d5634; --green-l: #e5f2e8; --sky: #3d8fd6; --sky-l: #e4f1fb; --earth: #a8743c; --earth-l: #f6ebdc;
  --cream: #f8f5ef; --card: #fff; --ink: #1f2622; --ink-2: #6b746f; --ink-3: #9aa29d; --line: #eee8dd;
  --orange: #f0a531; --orange-d: #c97c12; --orange-l: #fdf0d8;
  --red: #d0524a; --red-l: #fbeae7; --gold: #f6c75a; --blue: #3f6fb5; --blue-l: #e6eefb;
  --purple: #6d5cf6; --purple-l: #f1effe;
  --radius: 20px; --shadow: 0 4px 16px rgba(60, 50, 30, .07);
  --tab-h: 64px;
}
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Noto Sans CJK SC", "Microsoft YaHei", sans-serif;
  color: var(--ink); background: var(--cream); font-size: 16px; line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; color: inherit; }
button { border: 0; background: none; cursor: pointer; }

/* ---------- 手机框：手机上全屏，电脑上居中显示成手机 ---------- */
.device { height: 100%; }
.phone {
  position: relative; height: 100%; height: 100dvh; width: 100%; max-width: 430px; margin: 0 auto;
  background: var(--cream); display: flex; flex-direction: column; overflow: hidden;
}
.statusbar { display: none; }
.device-hint { display: none; }
@media (min-width: 600px) {
  body { background: radial-gradient(circle at 30% 15%, #f3efe6, #dcd8cf 70%); }
  .device { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 20px; min-height: 100%; }
  .phone {
    width: 390px; height: min(844px, calc(100vh - 70px)); border-radius: 46px;
    box-shadow: 0 30px 70px rgba(40, 30, 10, .28), 0 0 0 11px #1b1d1c, 0 0 0 12px #3a3d3b;
  }
  .statusbar { display: flex; justify-content: space-between; padding: 14px 30px 4px; font-size: 15px; font-weight: 600; flex: none; }
  .device-hint { display: block; font-size: 13px; color: #6b675e; background: #ffffffaa; padding: 5px 14px; border-radius: 99px; }
}

.view { flex: 1; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; padding-bottom: calc(var(--tab-h) + 20px + env(safe-area-inset-bottom)); }
.phone.no-tab .view { padding-bottom: 28px; }
.page { display: none; padding: 8px 16px 0; animation: pageIn .22s ease; }
.page.on { display: block; }
@keyframes pageIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.boot-err { padding: 60px 24px; text-align: center; color: var(--ink-2); }

/* ---------- 底部 tabBar ---------- */
.tabbar {
  position: absolute; left: 0; right: 0; bottom: 0; height: calc(var(--tab-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: rgba(255, 255, 255, .96); backdrop-filter: blur(10px);
  border-top: 1px solid var(--line); display: flex; z-index: 20;
}
.phone.no-tab .tabbar { display: none; }
.tab { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: var(--tab-off, #8b938e); }
.tab-ic { font-size: 24px; filter: grayscale(1); opacity: .6; transition: .15s; }
.tab-t { font-size: 13px; }
.tab.on { color: var(--tab-on, var(--green)); font-weight: 700; }
.tab.on .tab-ic { filter: none; opacity: 1; transform: translateY(-1px); }
@media (min-width: 600px) { .tabbar { border-radius: 0 0 46px 46px; height: 76px; padding-bottom: 12px; } .view { padding-bottom: 100px; } }

/* ---------- 通用 ---------- */
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); }
.section-t { display: flex; align-items: center; justify-content: space-between; margin: 22px 4px 10px; font-size: 18px; font-weight: 700; }
.section-t small { font-size: 14px; font-weight: 400; color: var(--green); }
.navbar { display: flex; align-items: center; gap: 8px; height: 52px; margin: 0 -4px 6px; }
.navbar h2 { flex: 1; font-size: 21px; }
.nav-back { width: 40px; height: 40px; border-radius: 14px; background: #fff; box-shadow: var(--shadow); font-size: 24px; line-height: 1; color: var(--ink); }
.nav-act { padding: 9px 14px; border-radius: 14px; background: var(--green); color: #fff; font-size: 15px; font-weight: 600; }
.page-desc { font-size: 15px; color: var(--ink-2); margin: 0 4px 14px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 50px; padding: 0 20px; border-radius: 16px; font-size: 17px; font-weight: 700; }
.btn-primary { background: var(--green); color: #fff; }
.btn-orange { background: linear-gradient(135deg, #f6c35c, #ee9f32); color: #4a2c00; }
.btn-ghost { background: #fff; color: var(--green); border: 1.5px solid #cfe3d8; }
.btn-block { width: 100%; }
.btn-row { display: flex; gap: 10px; margin-top: 14px; }
.btn-row .btn { flex: 1; }
.seg { display: flex; background: #ece7dc; border-radius: 14px; padding: 4px; }
.seg button { flex: 1; height: 40px; border-radius: 11px; font-size: 16px; color: var(--ink-2); }
.seg button.on { background: #fff; color: var(--ink); font-weight: 700; box-shadow: 0 2px 6px rgba(0,0,0,.06); }
.empty { text-align: center; color: var(--ink-3); padding: 26px 0; font-size: 15px; }
.avatar { width: 46px; height: 46px; border-radius: 15px; display: grid; place-items: center; font-size: 19px; font-weight: 700; color: #fff; background: var(--green); flex: none; }
.avatar.c1 { background: #e59a2f; } .avatar.c2 { background: #3f6fb5; } .avatar.c3 { background: #8a62c9; } .avatar.c4 { background: #7b8a83; }
.pill { display: inline-block; font-size: 12px; padding: 2px 8px; border-radius: 99px; background: var(--green-l); color: var(--green); margin-left: 6px; vertical-align: 2px; font-weight: 500; }
.pill.gray { background: #f0ede6; color: var(--ink-2); }
.red { color: var(--red); } .green { color: var(--green); }
.foot-note { text-align: center; font-size: 13px; color: var(--ink-3); margin: 22px 0 6px; }

/* ---------- 蒙古文 ---------- */
.mn { font-family: "NotoSansMongolian", sans-serif; font-weight: 400; }
[data-cur="mn"] { display: inline-flex; flex-direction: column; line-height: 1.2; }
[data-cur="mn"] .mn-zh { font-size: .62em; opacity: .7; font-weight: 400; }
.tab-t[data-cur="mn"] { font-size: 12px; align-items: center; }
.ai-badge { display: inline-block; font-size: 12px; font-weight: 800; letter-spacing: .5px; padding: 2px 7px; border-radius: 7px; color: #fff; background: linear-gradient(135deg, #7b61ff, #43a6f3); vertical-align: 3px; }
.demo-tag { display: inline-block; font-size: 11px; padding: 2px 7px; border-radius: 6px; background: #fff3d6; color: #a46a0a; border: 1px solid #f3dca8; font-weight: 600; }
.soon-card { padding: 22px; text-align: center; margin-bottom: 14px; font-size: 16px; }
.soon-big { font-size: 22px; font-weight: 800; color: var(--orange-d); margin-bottom: 8px; }
.ai-msgs .msg.bot{white-space:pre-wrap}
