:root {
  --orange: #ff6a2d;
  --orange-light: #ff9a32;
  --blue: #1760e8;
  --green: #16b51c;
  --text: #242424;
  --muted: #8b8b8b;
  --page: #ededed;
}

* { box-sizing: border-box; }
html { background: #dcdcdc; scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  color: var(--text);
  font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  background: var(--page);
}
button, input { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }

.brand-header {
  position: relative;
  width: min(100%, 650px);
  min-height: 230px;
  margin: 0 auto;
  padding: 46px 28px 14px;
  background: var(--page);
}
.brand-mark, .avatar {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  font-family: STKaiti, KaiTi, serif;
  font-weight: 900;
  background: linear-gradient(145deg, #123a6b, #0b274a);
  box-shadow: inset 0 0 0 3px #d9bd72, 0 5px 15px rgba(0, 0, 0, .12);
}
.brand-card {
  position: relative;
  padding: 49px 18px 20px;
  border-radius: 15px;
  text-align: center;
  background: linear-gradient(120deg, #fffdf8, #fff8e7);
  box-shadow: 0 10px 28px rgba(157, 115, 34, .06);
}
.brand-card::after {
  position: absolute;
  right: 9px;
  top: 5px;
  color: rgba(209, 165, 72, .1);
  font-size: 70px;
  content: "✦";
}
.brand-mark {
  position: absolute;
  z-index: 2;
  top: -36px;
  left: 50%;
  width: 72px;
  height: 72px;
  overflow: hidden;
  border: 3px solid #fff;
  background: #fff;
  box-shadow: 0 5px 15px rgba(0, 0, 0, .12);
  transform: translateX(-50%);
}
.brand-mark img { display: block; width: 100%; height: 100%; object-fit: contain; }
.avatar {
  overflow: hidden;
  color: transparent;
  background: #fff url("./assets/huatai-logo.png") center / contain no-repeat;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .12);
}
.brand-title { position: relative; z-index: 1; margin: 0; font-size: clamp(20px, 5vw, 27px); font-weight: 800; }
.brand-tags { position: relative; z-index: 1; display: flex; justify-content: center; gap: 8px; margin-top: 12px; }
.brand-tags b { padding: 4px 9px; border-radius: 3px; color: #a36c18; font-size: 13px; font-weight: 600; background: #fff0cf; }
.brand-stats { position: relative; z-index: 1; display: flex; justify-content: center; gap: 18px; margin-top: 17px; color: #aaa; font-size: 13px; }
.brand-stats strong { margin-left: 4px; color: #292929; font-size: 15px; }
.trust-note { margin: 16px 14px 0; color: #929292; font-size: 12px; line-height: 1.65; text-align: center; }
.trust-note strong { color: #5c8ebc; font-weight: 600; }

.chat {
  width: min(100%, 650px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 26px 28px 122px;
  background: var(--page);
}
.expert-card {
  display: flex;
  gap: 18px;
  align-items: center;
  padding: 22px;
  margin-bottom: 34px;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .05);
}
.avatar-large { width: 104px !important; height: 104px !important; font-size: 46px !important; border-radius: 14px !important; }
.expert-card h1 { margin: 0 0 12px; font-size: 27px; }
.expert-card p { margin: 10px 0 0; color: #777; font-size: 15px; }
.expert-card strong { color: #ed1d24; font-size: 20px; }
.expert-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.expert-badges span { padding: 4px 8px; border: 1px solid #ff6334; border-radius: 5px; color: #ed5127; font-size: 13px; }

.message-row { display: flex; gap: 14px; align-items: flex-start; margin: 0 0 28px; }
.avatar { width: 56px; height: 56px; font-size: 25px; }
.message-wrap { flex: 1; min-width: 0; }
.sender { display: none; }
.sender span { margin-left: 16px; color: #aaa; font-size: 13px; }
.bubble {
  padding: 18px 20px;
  border-radius: 4px 14px 14px;
  font-size: 20px;
  line-height: 1.55;
  background: #fff;
  box-shadow: 0 10px 24px rgba(0, 0, 0, .045);
}
.intro-bubble strong, .intro-bubble em { color: #ef171e; font-weight: 800; font-style: normal; }
.intro-bubble em { display: inline; }
.intro-bubble > p { margin: 0 0 20px; }
.question-card h2 { margin: 0 0 15px; font-size: 20px; font-weight: 500; }
.options { display: grid; gap: 12px; }
.options button, .submit-button {
  width: 100%;
  min-height: 58px;
  border: 0;
  border-radius: 30px;
  color: #fff;
  font-size: 21px;
  background: linear-gradient(110deg, var(--orange-light), var(--orange));
  box-shadow: 0 10px 18px rgba(255, 105, 45, .22);
  cursor: pointer;
}
.options button:active, .submit-button:active { transform: scale(.99); }
.options button:disabled { opacity: .48; cursor: default; }
.stage-links { gap: 0; }
.stage-links button {
  min-height: 42px;
  padding: 5px 0;
  border-radius: 0;
  color: #149fe0;
  font-size: 18px;
  text-align: left;
  background: transparent;
  box-shadow: none;
}
.stage-links button:active { color: #0d6faf; transform: none; }
.user-row { display: flex; justify-content: flex-end; gap: 10px; align-items: flex-end; margin: -5px 0 28px; }
.user-bubble { max-width: 72%; padding: 18px 22px; border-radius: 14px 4px 14px 14px; color: #fff; font-size: 20px; background: var(--blue); }
.user-avatar {
  display: grid;
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  place-items: center;
  border: 2px solid #fff;
  border-radius: 50%;
  font-size: 25px;
  background: #f2e7d7;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .12);
}
.stage-options { margin-top: 2px; }
.result-copy { margin: 0; }
.result-copy strong { color: #ef171e; }

.phone-form label { display: block; margin-bottom: 10px; font-size: 16px; font-weight: 700; }
.phone-input { width: 100%; height: 58px; padding: 0 16px; border: 1px solid #d2d2d2; border-radius: 12px; outline: none; font-size: 18px; }
.phone-input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(23, 96, 232, .12); }
.phone-input[aria-invalid="true"] { border-color: #e1262e; }
.form-error { min-height: 22px; margin: 6px 2px 8px; color: #d61f27; font-size: 14px; }
.submit-button { min-height: 56px; font-size: 19px; }
.submit-button:disabled { opacity: .6; }
.wx-button {
  width: 100%;
  min-height: 55px;
  margin-top: 18px;
  border: 0;
  border-radius: 28px;
  color: #fff;
  font-size: 19px;
  background: linear-gradient(110deg, var(--orange-light), var(--orange));
  box-shadow: 0 10px 18px rgba(255, 105, 45, .22);
  cursor: pointer;
}
.privacy-note { margin: 9px 0 0; color: #999; font-size: 12px; text-align: center; }
.success { color: #15934e; font-weight: 700; }

.sticky-consult {
  position: fixed;
  z-index: 30;
  right: 0;
  bottom: 0;
  left: 0;
  padding: 13px max(20px, env(safe-area-inset-right)) calc(13px + env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
  background: rgba(255, 255, 255, .97);
  box-shadow: 0 -5px 18px rgba(0, 0, 0, .06);
}
#consultButton { display: block; width: min(100%, 590px); min-height: 62px; margin: 0 auto; border: 0; border-radius: 32px; color: #fff; font-size: 23px; font-weight: 800; background: var(--green); cursor: pointer; }

@media (max-width: 480px) {
  .brand-header { min-height: 214px; padding: 40px 16px 10px; }
  .brand-card { padding: 45px 10px 18px; }
  .brand-mark { width: 66px; height: 66px; font-size: 28px; top: -33px; }
  .brand-title { font-size: 19px; }
  .brand-tags { margin-top: 10px; gap: 5px; }
  .brand-tags b { padding: 3px 6px; font-size: 11px; }
  .brand-stats { gap: 10px; margin-top: 14px; font-size: 11px; }
  .brand-stats strong { margin-left: 2px; font-size: 13px; }
  .trust-note { margin: 13px 5px 0; font-size: 11px; }
  .chat { padding: 20px 16px 112px; }
  .expert-card { padding: 16px; gap: 13px; margin-bottom: 26px; }
  .avatar-large { width: 82px !important; height: 82px !important; font-size: 38px !important; }
  .expert-card h1 { font-size: 22px; }
  .expert-card p { font-size: 12px; }
  .avatar { width: 46px; height: 46px; font-size: 21px; }
  .message-row { gap: 10px; margin-bottom: 23px; }
  .bubble { padding: 15px 16px; font-size: 17px; }
  .question-card h2 { font-size: 17px; }
  .options button { min-height: 52px; font-size: 18px; }
  .user-bubble { padding: 15px 18px; font-size: 18px; }
  .user-avatar { width: 42px; height: 42px; font-size: 22px; }
  #consultButton { min-height: 58px; font-size: 20px; }
}

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
