/* 进宝 H5 — 暖白底 + 深金（45+ 老板：大字、大按钮、高对比） */
:root {
  --bg: #FAF7F1; --card: #fff; --gold: #8A6D1F; --gold-bg: #F6EFE0;
  --text: #3a3325; --muted: #9a8f78; --line: #F0EAD9;
  --in: #B03A2E; --out: #1E6B4F;
}
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body { font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg); color: var(--text); font-size: 16px; }
.hide { display: none !important; }
button { font-family: inherit; cursor: pointer; }
input { font-family: inherit; font-size: 16px; }

.btn { border: none; border-radius: 10px; padding: 11px 16px; font-size: 16px; }
.btn.g { background: var(--gold); color: #fff; }
.btn.gr { background: #fff; color: #6b5518; border: 2px solid var(--gold); }
.btn.big { width: 100%; padding: 14px; font-size: 18px; }

/* 登录/落地页 */
#view-login { min-height: 100vh; padding: 34px 18px 26px; }
.hero { text-align: center; margin-bottom: 20px; }
.hero .logo { margin-bottom: 8px; }
.hero h1 { font-size: 28px; color: var(--gold); }
.slogan { color: var(--text); font-size: 20px; font-weight: 700; margin-top: 6px; }
.hero-sub { color: var(--muted); font-size: 15px; margin-top: 4px; }
.logo { width: 64px; height: 64px; margin: 0 auto 10px; border-radius: 16px;
  background: var(--gold); color: #fff; font-size: 34px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; }
.demo-box { width: 100%; max-width: 360px; margin: 0 auto 16px; background: var(--card);
  border-radius: 14px; padding: 14px 16px; box-shadow: 0 2px 10px rgba(138,109,31,.10); }
.demo-lab { font-size: 15px; color: var(--gold); font-weight: 600; margin-bottom: 8px; }
.demo-row { display: flex; gap: 8px; }
.demo-row input { flex: 1; border: 1.5px solid var(--line); border-radius: 22px;
  padding: 10px 14px; background: #FDFCF9; font-size: 15px; }
.demo-row .btn { border-radius: 22px; padding: 0 18px; flex-shrink: 0; }
#demo-out { margin-top: 10px; }
.card-demo { border: 2px solid var(--gold); border-radius: 12px; padding: 12px 14px;
  text-align: left; }
.card-demo .btn { margin-top: 8px; }
.card-demo .cc-note { margin-top: 8px; }
.points { width: 100%; max-width: 360px; margin: 0 auto 18px; display: flex;
  flex-direction: column; gap: 8px; }
.pt { background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 11px 14px; display: flex; flex-direction: column; gap: 2px; }
.pt b { font-size: 16px; color: var(--text); }
.pt span { font-size: 15px; color: #7d7460; }
.login-box { width: 100%; max-width: 360px; margin: 0 auto; background: var(--card); border-radius: 18px;
  padding: 20px 26px 24px; box-shadow: 0 2px 14px rgba(138,109,31,.13); text-align: center; }
.login-tt { font-size: 16px; font-weight: 600; color: var(--gold); margin-bottom: 14px; }
.login-box input { width: 100%; padding: 13px; border: 1.5px solid var(--line);
  border-radius: 10px; margin-bottom: 12px; background: #FDFCF9; }
#view-login .beian { text-align: center; margin-top: 16px; }
#view-login .beian a { color: var(--muted); font-size: 12px; text-decoration: none; }
.code-row { display: flex; gap: 8px; }
.code-row input { flex: 1; margin-bottom: 0; }
.hint { color: var(--muted); font-size: 13px; margin-top: 12px; }
.consent { color: #a89d86; font-size: 12px; margin-top: 10px; }

/* 主框架 */
#app { display: flex; flex-direction: column; height: 100vh; }
.topbar { height: 52px; background: #fff; display: flex; align-items: center;
  justify-content: space-between; padding: 0 16px;
  border-bottom: 1px solid var(--line); flex-shrink: 0; position: sticky; top: 0; z-index: 5; }
.brand { font-size: 20px; font-weight: 700; color: var(--gold); }
.quota { font-size: 13px; color: #6f6654; background: var(--gold-bg);
  border-radius: 20px; padding: 3px 10px; }
.quota:empty { display: none; }
.page { flex: 1; overflow-y: auto; padding: 14px 14px 90px; }
.tabbar { position: fixed; bottom: 0; left: 0; right: 0; height: 60px; background: #fff;
  display: flex; border-top: 1px solid var(--line); z-index: 10; }
.tab { flex: 1; background: none; border: none; font-size: 16px; color: #8a8071;
  position: relative; }
.tab.on { color: var(--gold); font-weight: 700; }
.tab.on::after { content: ""; position: absolute; bottom: 8px; left: 50%;
  transform: translateX(-50%); width: 18px; height: 3px; border-radius: 2px;
  background: var(--gold); }

/* 说 — 对话 */
.welcome { text-align: center; padding: 44px 16px; }
.w-big { font-size: 26px; font-weight: 700; color: var(--gold); margin-bottom: 20px; }
.w-lab { color: var(--muted); font-size: 14px; margin-bottom: 10px; }
.w-examples { display: flex; flex-direction: column; gap: 10px; }
.w-ex { background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 13px; font-size: 16px; text-align: left; }
.chat { display: flex; flex-direction: column; gap: 10px; }
.bubble { max-width: 86%; padding: 11px 14px; border-radius: 14px; font-size: 17px;
  line-height: 1.6; overflow-wrap: break-word; white-space: pre-wrap; }
.bubble.me { align-self: flex-end; background: var(--gold); color: #fff;
  border-bottom-right-radius: 4px; }
.bubble.bot { align-self: flex-start; background: #fff; border: 1px solid var(--line);
  border-bottom-left-radius: 4px; }

/* 确认卡片 */
.card-confirm { background: #fff; border-radius: 14px; padding: 14px 16px;
  border: 2px solid var(--gold); align-self: stretch;
  box-shadow: 0 3px 14px rgba(138,109,31,.16); }
.cc-title { font-size: 15px; color: var(--gold); font-weight: 600; margin-bottom: 10px; }
.cc-row { display: flex; justify-content: space-between; align-items: center;
  padding: 9px 0; border-bottom: 1px dashed var(--line); font-size: 16px; }
.cc-row:last-of-type { border-bottom: none; }
.cc-lab { color: #6f6654; font-size: 16px; flex-shrink: 0; }
.cc-val { font-weight: 600; text-align: right; font-size: 17px; padding: 2px 0; }
.cc-val.edit { color: var(--gold); border-bottom: 1px dashed var(--gold); }
.cc-val.edit.dir-in { color: var(--in); border-bottom-color: var(--in); }
.cc-val.edit.dir-out { color: var(--out); border-bottom-color: var(--out); }
.cc-val input { width: 130px; text-align: right; border: 1.5px solid var(--gold);
  border-radius: 8px; padding: 5px 8px; font-size: 16px; }
.dir-in { color: var(--in); } .dir-out { color: var(--out); }
.cc-btns { display: flex; gap: 10px; margin-top: 12px; }
.cc-btns .btn { flex: 1; padding: 14px; font-size: 18px; min-height: 48px; }
.cc-note { font-size: 15px; color: #6f6654; margin-top: 10px; }

/* 输入栏 */
#input-bar { position: fixed; bottom: 60px; left: 0; right: 0; background: #fff;
  display: flex; gap: 8px; padding: 9px 12px; border-top: 1px solid var(--line); z-index: 9; }
#btn-mic { width: 44px; height: 44px; border-radius: 50%; border: none;
  background: var(--gold-bg); font-size: 20px; flex-shrink: 0; }
#btn-mic.rec { background: var(--in); color: #fff; font-size: 16px;
  animation: micpulse 1.2s infinite; }
@keyframes micpulse {
  0% { box-shadow: 0 0 0 0 rgba(176,58,46,.45); }
  70% { box-shadow: 0 0 0 12px rgba(176,58,46,0); }
  100% { box-shadow: 0 0 0 0 rgba(176,58,46,0); } }
#say-input { flex: 1; border: 1.5px solid var(--line); border-radius: 22px;
  padding: 10px 14px; background: #FDFCF9; font-size: 16px; }
#say-input::placeholder { color: #a89d86; font-size: 15px; }
#btn-send-say { border-radius: 22px; padding: 0 18px; }

/* 账 — 台账 */
.today-bar { display: flex; background: #fff; border-radius: 14px; padding: 14px; margin-bottom: 12px; }
.t-cell { flex: 1; text-align: center; }
.t-cell:first-child { border-right: 1px solid var(--line); }
.t-lab { display: block; color: var(--muted); font-size: 13px; }
.t-val { font-size: 24px; font-weight: 700; }
.t-val.in { color: var(--in); } .t-val.out { color: var(--out); }
.subtabs { display: flex; gap: 6px; margin-bottom: 12px; overflow-x: auto; }
.sub { border: 1px solid var(--line); background: #fff; color: var(--muted);
  border-radius: 20px; padding: 7px 15px; font-size: 15px; flex-shrink: 0; }
.sub.on { background: var(--gold); border-color: var(--gold); color: #fff; }
.total-line { background: var(--gold-bg); border-radius: 12px; padding: 12px;
  margin-bottom: 10px; font-size: 15px; }
.total-line b { font-size: 20px; }
.in { color: var(--in); } .out { color: var(--out); }
.p-row { background: #fff; border-radius: 12px; padding: 13px 14px; margin-bottom: 8px;
  display: flex; justify-content: space-between; align-items: center; }
.p-name { font-size: 17px; font-weight: 600; }
.p-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.p-amt { font-size: 19px; font-weight: 700; }
.share-btn { border: 1px solid var(--gold); color: var(--gold); background: none;
  border-radius: 8px; padding: 5px 10px; font-size: 13px; }
.badge-low { background: #FDEDEA; color: var(--in); border-radius: 6px;
  padding: 1px 6px; font-size: 12px; }
.f-row { background: #fff; border-radius: 12px; padding: 12px 14px; margin-bottom: 8px;
  display: flex; justify-content: space-between; font-size: 15px; }
.f-note { color: var(--muted); font-size: 13px; }
.empty { text-align: center; color: var(--muted); padding: 30px 0; font-size: 14px; }

/* 我的 */
.me-card { background: #fff; border-radius: 14px; padding: 6px 16px; margin-bottom: 16px; }
.me-row { display: flex; justify-content: space-between; padding: 13px 0;
  border-bottom: 1px solid var(--line); font-size: 16px; }
.me-row:last-child { border-bottom: none; }
.me-row span { color: var(--muted); }
#sub-box { background: #fff; border-radius: 14px; padding: 18px 16px; margin-bottom: 16px; }
.plan-title { text-align: center; font-size: 17px; font-weight: 600; margin-bottom: 14px; }
.plans { display: flex; gap: 12px; }
.plan { flex: 1; border: 2px solid var(--line); border-radius: 14px; text-align: center;
  padding: 18px 6px; position: relative; }
.plan.hot { border-color: var(--gold); background: var(--gold-bg); }
.p-tag { position: absolute; top: -10px; left: 50%; transform: translateX(-50%);
  background: var(--gold); color: #fff; font-size: 12px; border-radius: 10px;
  padding: 2px 10px; }
.p-name { font-size: 16px; }
.p-price { font-size: 28px; font-weight: 700; color: var(--gold); margin: 4px 0; }
.p-sub { font-size: 12px; color: var(--muted); }
#pay-box { background: #fff; border-radius: 14px; padding: 18px; margin-bottom: 16px; text-align: center; }
#pay-qr { width: 200px; height: 200px; margin-bottom: 10px; }
#pay-link { display: inline-block; text-decoration: none; padding: 11px 26px; }
#view-me .btn.gr { width: 100%; }
.beian { text-align: center; margin-top: 18px; }
.beian a { color: var(--muted); font-size: 12px; text-decoration: none; }

/* toast */
#toast { position: fixed; top: 70px; left: 50%; transform: translateX(-50%);
  background: rgba(58,51,37,.92); color: #fff; border-radius: 10px;
  padding: 10px 18px; font-size: 15px; z-index: 99; max-width: 84%; text-align: center; }
