:root {
  color-scheme: light;
  --ink: #1d1b18;
  --muted: #77716a;
  --faint: #aaa39a;
  --paper: #f5f1ea;
  --white: #ffffff;
  --warm: #fbf7ef;
  --gold: #b98442;
  --gold-deep: #8d5b24;
  --gold-soft: #efe1ce;
  --line: rgba(38, 32, 25, .08);
  --line-gold: rgba(185, 132, 66, .18);
  --shadow: 0 22px 70px rgba(80, 64, 43, .12);
  --soft-shadow: 0 12px 34px rgba(80, 64, 43, .08);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  overflow: hidden;
  color: var(--ink);
  font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  background:
    radial-gradient(circle at 12% 4%, rgba(204, 164, 103, .18), transparent 28%),
    radial-gradient(circle at 92% 8%, rgba(255, 255, 255, .95), transparent 34%),
    linear-gradient(135deg, #eeeae3 0%, #fbfaf7 45%, #efe8dd 100%);
}

button, textarea { font: inherit; }
button { cursor: pointer; }
h1, h2, p, pre { margin: 0; }
a { color: inherit; text-decoration: none; }

svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.agent-app {
  width: min(1520px, calc(100vw - 28px));
  height: calc(100vh - 28px);
  margin: 14px auto;
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.72);
  border-radius: 18px;
  background: rgba(255,255,255,.68);
  box-shadow: 0 34px 120px rgba(48, 39, 28, .18);
  backdrop-filter: blur(22px);
}

.sidebar {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 24px;
  padding: 28px 18px;
  border-right: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255,255,255,.92), rgba(248,243,235,.76));
}

.brand,
.top-brand {
  display: flex;
  align-items: center;
  gap: 11px;
}

.brand img,
.top-brand img {
  width: 34px;
  height: 34px;
  object-fit: cover;
  border-radius: 50%;
  box-shadow: 0 0 0 3px #fff, 0 8px 18px rgba(111, 76, 36, .14);
}

.brand strong,
.brand span,
.top-brand strong,
.top-brand span {
  display: block;
}

.brand strong {
  font-size: 16px;
  line-height: 1.2;
}

.brand span,
.top-brand span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.nav-list {
  display: grid;
  gap: 8px;
}

.rail-item {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 0 12px;
  border: 0;
  border-radius: 10px;
  color: #5f5a54;
  background: transparent;
  text-align: left;
  font-size: 14px;
}

.rail-item:hover,
.rail-item.active {
  color: #7b4f1d;
  background: linear-gradient(90deg, #f2e5d3, #fbf4e9);
}

.privacy-card {
  align-self: end;
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 18px 12px;
  border: 1px solid rgba(255,255,255,.82);
  border-radius: 14px;
  background: rgba(255,255,255,.74);
  box-shadow: var(--soft-shadow);
  text-align: center;
}

.privacy-card svg { color: var(--gold); }
.privacy-card strong { color: #7b4f1d; font-size: 15px; }
.privacy-card p { color: var(--faint); font-size: 12px; }

.privacy-button,
.login-button,
.wide-button,
.appointment-panel button,
.upload-card button,
.report-card button,
.ai-entry-card button,
.admin-head button {
  min-height: 38px;
  padding: 0 16px;
  border: 0;
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(135deg, #c79555, #a46a2b);
  font-weight: 800;
  box-shadow: 0 12px 26px rgba(155, 98, 37, .20);
}

.workspace {
  min-width: 0;
  min-height: 0;
  overflow-y: auto;
  padding: 0 22px 18px;
  background:
    linear-gradient(135deg, rgba(255,255,255,.88), rgba(248,244,237,.82)),
    repeating-linear-gradient(140deg, rgba(185,132,66,.04) 0 1px, transparent 1px 15px);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px;
  min-height: 66px;
  border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,.78);
  backdrop-filter: blur(18px);
}

.topbar nav {
  display: flex;
  justify-content: flex-end;
  gap: 34px;
  color: #3e3933;
  font-size: 14px;
}

.login-button {
  min-width: 92px;
  border-radius: 7px;
}

.view { display: none; min-height: 0; }
.view.active { display: block; }

.hero-board {
  position: relative;
  min-height: 335px;
  margin-top: 10px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.86);
  border-radius: 14px;
  background:
    radial-gradient(circle at 83% 22%, rgba(223, 202, 169, .38), transparent 28%),
    linear-gradient(100deg, rgba(255,255,255,.94) 0 55%, rgba(239,230,216,.78) 56% 100%);
  box-shadow: var(--shadow);
}

.hero-board::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(145deg, transparent 0 13px, rgba(176,126,65,.045) 13px 14px),
    linear-gradient(180deg, transparent 65%, rgba(255,255,255,.55));
  pointer-events: none;
}

.hero-copy {
  position: relative;
  z-index: 2;
  width: min(55%, 720px);
  padding: 70px 0 96px 46px;
}

.hero-copy > span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 16px;
  border-radius: 999px;
  color: #9a682b;
  background: #f3e6d4;
  font-size: 14px;
  font-weight: 800;
}

.hero-copy h1 {
  margin-top: 18px;
  font-size: clamp(40px, 4.5vw, 58px);
  line-height: 1.14;
  letter-spacing: 0;
}

.hero-copy p {
  margin-top: 18px;
  color: #4d463f;
  font-size: 18px;
}

.hero-photo {
  position: absolute;
  right: 0;
  bottom: 0;
  z-index: 1;
  width: 45%;
  height: 100%;
}

.hero-photo::before {
  content: "";
  position: absolute;
  inset: 34px 28px 34px -70px;
  border-radius: 50%;
  background: rgba(236, 222, 202, .7);
}

.hero-photo img {
  position: absolute;
  right: 16px;
  bottom: 0;
  width: min(500px, 95%);
  height: 96%;
  object-fit: cover;
  object-position: center top;
  border-radius: 0;
  filter: drop-shadow(0 22px 34px rgba(61, 45, 28, .20));
}

.stat-row {
  position: absolute;
  left: 42%;
  right: 28px;
  bottom: 24px;
  z-index: 3;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.7);
  border-radius: 12px;
  background: rgba(255,255,255,.62);
  box-shadow: 0 18px 44px rgba(79, 59, 35, .13);
  backdrop-filter: blur(16px);
}

.metric {
  min-height: 86px;
  padding: 18px 10px;
  border-right: 1px solid rgba(185,132,66,.14);
  text-align: center;
}

.metric:last-child { border-right: 0; }
.metric strong { display: block; color: #a66c2a; font-size: 20px; }
.metric span { display: block; margin-top: 8px; color: #5e5750; font-size: 13px; }

.home-grid,
.chat-panel,
.lead-layout,
.appointment-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 14px;
  margin-top: 14px;
}

.expertise-card,
.ai-entry-card,
.chat-card,
.case-card,
.analysis-card,
.case-showcase,
.knowledge-admin,
.appointment-panel,
.report-card,
.phone-shell {
  border: 1px solid rgba(255,255,255,.86);
  border-radius: 14px;
  background: rgba(255,255,255,.82);
  box-shadow: var(--soft-shadow);
  backdrop-filter: blur(18px);
}

.expertise-card,
.ai-entry-card,
.case-card,
.analysis-card,
.case-showcase {
  padding: 22px;
}

.section-head,
.card-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.section-head h2,
.card-title h2 {
  font-size: 20px;
}

.section-head span {
  color: var(--muted);
  font-size: 13px;
}

.expertise-list {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin-top: 20px;
}

.expertise-list article {
  display: grid;
  justify-items: center;
  gap: 8px;
  min-height: 128px;
  padding: 18px 8px;
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(255,255,255,.92), rgba(250,244,236,.72));
  text-align: center;
}

.expertise-list i {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  color: var(--gold);
  background: #f4e7d4;
  font-style: normal;
}

.expertise-list strong { font-size: 15px; }
.expertise-list span { color: var(--muted); font-size: 12px; line-height: 1.4; }

.ai-entry-card {
  position: relative;
  min-height: 176px;
  overflow: hidden;
}

.ai-entry-card h2 { font-size: 21px; }
.ai-entry-card p { margin-top: 10px; color: var(--muted); font-size: 13px; line-height: 1.6; }
.ai-entry-card button { margin-top: 20px; }

.mini-bot {
  position: absolute;
  right: 18px;
  bottom: 18px;
  display: grid;
  place-items: center;
  width: 74px;
  height: 74px;
  border-radius: 24px;
  color: #8b5b22;
  background:
    radial-gradient(circle at 50% 38%, #fff 0 18px, transparent 19px),
    linear-gradient(135deg, #efe4d3, #fff);
  font-weight: 900;
  box-shadow: inset 0 -12px 24px rgba(185,132,66,.12);
}

.chat-panel {
  align-items: start;
}

.chat-card {
  display: grid;
  grid-template-rows: auto auto minmax(250px, 1fr) auto auto;
  min-height: 570px;
  padding: 24px;
}

.secondary {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #80501c;
  background: #fff;
}

.quick-prompts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.quick-prompts button {
  min-height: 34px;
  padding: 0 13px;
  border: 1px solid rgba(185,132,66,.16);
  border-radius: 999px;
  color: #8a5a22;
  background: #fbf2e7;
  font-size: 13px;
}

.messages {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 0;
  margin-top: 18px;
  padding: 2px 4px 12px;
  overflow-y: auto;
}

.message {
  position: relative;
  max-width: 74%;
  padding: 14px 16px;
  border-radius: 13px;
  white-space: pre-wrap;
  line-height: 1.72;
  font-size: 14px;
}

.message.assistant {
  align-self: flex-start;
  margin-left: 48px;
  background: #f4f3f1;
}

.message.assistant::before {
  content: "";
  position: absolute;
  left: -48px;
  top: 2px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: url("../assets/sun-doctor-avatar.jpg") center/cover;
  box-shadow: 0 0 0 3px #fff;
}

.message.user {
  align-self: flex-end;
  background: linear-gradient(135deg, #f1e3d0, #e9d6bc);
}

.message.system {
  align-self: center;
  max-width: 84%;
  color: #8a6a3c;
  background: #fff8eb;
  font-size: 13px;
}

.composer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px;
  gap: 8px;
  padding: 6px 7px 6px 18px;
  border: 1px solid rgba(185,132,66,.22);
  border-radius: 999px;
  background: #fff;
}

textarea {
  min-height: 38px;
  max-height: 118px;
  resize: none;
  border: 0;
  outline: none;
  padding: 10px 0;
  color: var(--ink);
  background: transparent;
  line-height: 1.45;
}

.send-button {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  align-self: center;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, #c79555, #a46a2b);
}

.ai-note {
  margin-top: 10px;
  color: #aaa39a;
  text-align: center;
  font-size: 12px;
}

.side-stack {
  display: grid;
  gap: 14px;
}

.case-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-top: 16px;
}

.case-grid img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 9px;
}

.case-card p {
  margin-top: 10px;
  color: var(--faint);
  font-size: 12px;
}

.compact-card {
  min-height: 150px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.chip {
  padding: 7px 10px;
  border-radius: 999px;
  color: #7a4b18;
  background: #f3e4cf;
  font-size: 12px;
}

.analysis-phone {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 20px;
  margin-top: 18px;
}

.phone-shell {
  min-height: 660px;
  padding: 18px;
}

.phone-top {
  display: flex;
  justify-content: space-between;
  color: #151515;
  font-weight: 900;
}

.phone-top span {
  margin: auto;
}

.upload-card {
  margin-top: 36px;
  padding: 24px 16px;
  border-radius: 14px;
  background: #fff;
  text-align: center;
}

.upload-card h2 {
  font-size: 22px;
}

.upload-card p {
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.face-preview {
  width: 220px;
  aspect-ratio: 1;
  margin: 24px auto;
  border-radius: 50%;
  background:
    linear-gradient(90deg, transparent 49.5%, rgba(255,255,255,.75) 50%, transparent 50.5%),
    linear-gradient(0deg, transparent 49.5%, rgba(255,255,255,.75) 50%, transparent 50.5%),
    url("../assets/sun-doctor-avatar.jpg") center/cover;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.05);
  filter: saturate(.82);
}

.report-card {
  min-height: 520px;
  padding: 34px;
}

.score-circle {
  display: grid;
  place-items: center;
  width: 112px;
  height: 112px;
  border: 8px solid #d4a169;
  border-radius: 50%;
  color: #a3692a;
}

.score-circle strong {
  font-size: 34px;
}

.score-circle span {
  font-size: 12px;
}

.report-card h2 {
  margin-top: 22px;
  font-size: 28px;
}

.bar-list {
  display: grid;
  gap: 18px;
  margin-top: 28px;
}

.bar-list p {
  display: grid;
  grid-template-columns: 92px 1fr 42px;
  align-items: center;
  gap: 12px;
  color: #4f4942;
  font-size: 14px;
}

.bar-list i {
  height: 5px;
  border-radius: 999px;
  background: linear-gradient(90deg, #b98442 var(--w), #eee9e2 var(--w));
}

.report-card button {
  margin-top: 36px;
  width: 260px;
}

.lead-layout {
  grid-template-columns: minmax(0, 1fr) 360px;
}

.analysis-card.tall {
  min-height: 520px;
}

.summary-box {
  min-height: 430px;
  margin-top: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  white-space: pre-wrap;
  line-height: 1.7;
}

.check-list,
.signals,
.topic-grid,
.knowledge-grid,
.care-grid {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.check-item,
.signal,
.topic,
.knowledge-item,
.care-grid article {
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--muted);
  line-height: 1.58;
}

.signal strong,
.topic strong,
.knowledge-item strong,
.care-grid strong {
  display: block;
  margin-bottom: 6px;
  color: #7a4a14;
}

.remote-knowledge-item span {
  display: block;
  margin: 2px 0 7px;
  color: var(--gold);
  font-size: 11px;
  font-weight: 800;
}

.case-showcase {
  margin-top: 18px;
}

.showcase-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 22px;
}

.showcase-grid article {
  display: grid;
  gap: 10px;
}

.showcase-grid img {
  width: 100%;
  aspect-ratio: 1 / 1.15;
  object-fit: cover;
  border-radius: 10px;
}

.showcase-grid strong {
  font-size: 15px;
}

.showcase-grid span {
  color: var(--muted);
  font-size: 12px;
}

.case-tabs {
  display: flex;
  gap: 8px;
  margin-top: 18px;
  overflow-x: auto;
  scrollbar-width: none;
}

.case-tabs::-webkit-scrollbar {
  display: none;
}

.case-tabs button {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 0 14px;
  border: 1px solid rgba(185,132,66,.16);
  border-radius: 999px;
  color: #6a5d4f;
  background: rgba(255,255,255,.72);
}

.case-tabs button.active {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, #c79555, #a46a2b);
}

.showcase-grid .case-placeholder {
  min-height: 184px;
  place-items: center;
  align-content: center;
  gap: 8px;
  padding: 18px 12px;
  border: 1px dashed rgba(185,132,66,.34);
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(255,255,255,.82), rgba(248,242,232,.68)),
    repeating-linear-gradient(135deg, rgba(185,132,66,.05) 0 1px, transparent 1px 12px);
  text-align: center;
}

.case-placeholder i {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  color: #a46a2b;
  background: rgba(185,132,66,.12);
  font-size: 24px;
  font-style: normal;
}

.case-library-item p,
.case-library-item small {
  color: #5f554a;
  font-size: 11px;
  line-height: 1.55;
}

.case-library-item small {
  color: var(--muted);
}

.case-library-item em {
  display: inline-flex;
  padding: 5px 10px;
  border-radius: 999px;
  color: var(--gold);
  background: rgba(185,132,66,.1);
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.public-case-item {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(185,132,66,.16);
  border-radius: 14px;
  background: rgba(255,255,255,.82);
  box-shadow: 0 14px 34px rgba(68, 51, 31, .08);
}

.public-case-item img,
.case-image-empty {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 10px;
  object-fit: cover;
  background: linear-gradient(135deg, rgba(185,132,66,.12), rgba(255,255,255,.72));
}

.case-image-empty {
  display: grid;
  place-items: center;
  color: var(--gold);
  font-size: 13px;
  font-weight: 900;
}

.public-case-item strong,
.public-case-item span {
  display: block;
}

.public-case-item strong {
  color: #1d1b18;
  font-size: 14px;
}

.public-case-item span,
.public-case-item small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}

.public-case-item p {
  color: #4a433a;
  font-size: 12px;
  line-height: 1.55;
}

.public-case-item em {
  width: max-content;
  padding: 5px 10px;
  border-radius: 999px;
  color: var(--gold);
  background: rgba(185,132,66,.1);
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.case-note {
  margin-top: 14px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.wide-button {
  width: 100%;
  margin-top: 26px;
}

.conversion-nudge {
  display: none;
}

.knowledge-admin {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  min-height: 620px;
  margin-top: 18px;
  overflow: hidden;
  background: #191917;
  color: #f7f2e9;
}

.knowledge-admin aside {
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 26px 18px;
  background: #232320;
}

.knowledge-admin aside strong {
  margin-bottom: 16px;
  font-size: 20px;
}

.knowledge-admin aside button {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  color: #ddd5c8;
  background: transparent;
  text-align: left;
}

.knowledge-admin aside button.active,
.knowledge-admin aside button:hover {
  color: #fff;
  background: rgba(185,132,66,.22);
}

.knowledge-admin main {
  padding: 26px;
}

.admin-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.knowledge-admin .knowledge-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.knowledge-admin .knowledge-item {
  border-color: rgba(255,255,255,.08);
  background: rgba(255,255,255,.06);
  color: #c8c0b4;
}

.care-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.care-grid article {
  min-height: 170px;
}

.care-grid svg {
  width: 30px;
  height: 30px;
  margin-bottom: 16px;
  color: var(--gold);
}

.appointment-panel {
  grid-template-columns: minmax(0, 1fr) 430px;
  min-height: 430px;
  padding: 42px;
}

.appointment-kicker {
  display: block;
  color: var(--gold);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.appointment-panel h2 {
  margin-top: 16px;
  font-size: clamp(34px, 4vw, 54px);
  line-height: 1.12;
}

.appointment-panel p {
  max-width: 650px;
  margin-top: 22px;
  color: #4b4b4b;
  font-size: 17px;
  line-height: 1.8;
}

.appointment-panel button {
  margin-top: 28px;
}

.wechat-card {
  display: none;
  grid-template-columns: 104px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  margin-top: 18px;
  padding: 14px;
  border: 1px solid rgba(185,132,66,.2);
  border-radius: 14px;
  background: rgba(255,255,255,.78);
  box-shadow: var(--soft-shadow);
}

.wechat-card.visible {
  display: grid;
}

.wechat-card strong {
  display: block;
  color: #1d1b18;
  font-size: 16px;
}

.wechat-card p {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.wechat-qr-placeholder {
  display: grid;
  place-items: center;
  width: 104px;
  aspect-ratio: 1;
  border: 1px dashed rgba(185,132,66,.42);
  border-radius: 12px;
  background:
    linear-gradient(135deg, rgba(255,255,255,.86), rgba(248,242,232,.78)),
    repeating-linear-gradient(90deg, rgba(185,132,66,.07) 0 2px, transparent 2px 9px);
  color: #9a6a2e;
  font-size: 12px;
  text-align: center;
}

.appointment-steps {
  display: grid;
  align-content: center;
  gap: 14px;
}

.appointment-steps article {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  min-height: 88px;
  padding: 16px;
  border-radius: 12px;
  background: rgba(255,255,255,.72);
  box-shadow: var(--soft-shadow);
}

.appointment-steps strong {
  color: var(--gold);
  font-size: 22px;
}

.appointment-steps span {
  color: #4b4b4b;
  line-height: 1.55;
}

.bottom-tabs {
  display: none;
}

.is-hidden {
  display: none !important;
}

@media (max-width: 1180px) {
  body { overflow: auto; }
  .agent-app {
    grid-template-columns: 1fr;
    height: auto;
    overflow: visible;
  }
  .sidebar {
    grid-template-rows: auto auto;
  }
  .nav-list {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .privacy-card { display: none; }
  .workspace { overflow: visible; }
  .hero-copy {
    width: 62%;
  }
  .stat-row {
    left: 28px;
  }
  .home-grid,
  .chat-panel,
  .lead-layout,
  .appointment-panel,
  .analysis-phone {
    grid-template-columns: 1fr;
  }
  .expertise-list,
  .showcase-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .agent-app {
    width: calc(100vw - 12px);
    margin: 6px auto;
    border-radius: 14px;
  }
  .sidebar {
    padding: 18px 14px;
  }
  .nav-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .workspace {
    padding: 0 12px 80px;
  }
  .topbar {
    grid-template-columns: 1fr auto;
  }
  .topbar nav {
    display: none;
  }
  .hero-board {
    min-height: 560px;
  }
  .hero-copy {
    width: 100%;
    padding: 36px 22px 0;
  }
  .hero-photo {
    width: 100%;
    height: 260px;
    bottom: 120px;
  }
  .hero-photo img {
    right: 0;
    width: 100%;
  }
  .stat-row {
    left: 14px;
    right: 14px;
    bottom: 14px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .expertise-list,
  .showcase-grid,
  .knowledge-admin,
  .knowledge-admin .knowledge-grid,
  .care-grid {
    grid-template-columns: 1fr;
  }
  .message {
    max-width: 92%;
  }
  .bottom-tabs {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: 5px;
    z-index: 50;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    min-height: 58px;
    align-items: center;
    border: 1px solid rgba(255,255,255,.8);
    border-radius: 16px;
    background: rgba(255,255,255,.9);
    box-shadow: var(--shadow);
    text-align: center;
    backdrop-filter: blur(18px);
  }
  .bottom-tabs a {
    color: #777;
    font-size: 12px;
  }
  .bottom-tabs a.active {
    color: var(--gold);
    font-weight: 900;
  }
}

/* Phone portrait product mode */
body {
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 0%, rgba(206, 167, 104, .18), transparent 28%),
    linear-gradient(180deg, #f2eee8 0%, #fbfaf7 42%, #eee7dc 100%);
}

.agent-app {
  position: relative;
  width: min(430px, 100vw);
  min-height: 100vh;
  height: 100vh;
  height: 100dvh;
  margin: 0 auto;
  display: block;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: #f8f5ef;
  box-shadow: 0 28px 90px rgba(54, 43, 30, .16);
}

.sidebar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: block;
  padding: 12px 12px 8px;
  border-right: 0;
  border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,.9);
  backdrop-filter: blur(18px);
}

.sidebar .brand {
  min-height: 44px;
}

.sidebar .brand img {
  width: 32px;
  height: 32px;
}

.sidebar .brand strong {
  font-size: 15px;
}

.sidebar .brand span {
  font-size: 11px;
}

.nav-list {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  overflow-x: auto;
  scrollbar-width: none;
}

.nav-list::-webkit-scrollbar {
  display: none;
}

.rail-item {
  flex: 0 0 auto;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 12px;
  white-space: nowrap;
}

.rail-item svg {
  width: 15px;
  height: 15px;
}

.privacy-card {
  display: none;
}

.workspace {
  min-height: 100vh;
  padding: 0 10px 82px;
  overflow: visible;
  background:
    radial-gradient(circle at 86% 10%, rgba(210, 178, 128, .18), transparent 34%),
    linear-gradient(180deg, #fbfaf7, #f4eee5);
}

.topbar {
  position: sticky;
  top: 95px;
  z-index: 35;
  grid-template-columns: minmax(0, 1fr) auto;
  min-height: 54px;
  padding: 0 2px;
  border-bottom: 0;
  background: rgba(248,245,239,.86);
}

.topbar nav {
  display: none;
}

.top-brand img {
  width: 30px;
  height: 30px;
}

.top-brand strong {
  font-size: 14px;
}

.login-button {
  min-width: 72px;
  min-height: 32px;
  padding: 0 10px;
  border-radius: 8px;
  font-size: 12px;
}

.hero-board {
  min-height: 520px;
  margin-top: 6px;
  border-radius: 18px;
}

.hero-copy {
  width: 100%;
  padding: 28px 22px 0;
}

.hero-copy > span {
  min-height: 28px;
  padding: 0 12px;
  font-size: 12px;
}

.hero-copy h1 {
  margin-top: 15px;
  font-size: 38px;
  line-height: 1.12;
}

.hero-copy p {
  width: 46%;
  margin-top: 14px;
  font-size: 14px;
  line-height: 1.65;
}

.hero-photo {
  width: 74%;
  height: 210px;
  right: 0;
  bottom: 94px;
}

.hero-photo::before {
  inset: 10px 20px 20px 72px;
  border-radius: 999px 0 0 999px;
}

.hero-photo img {
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  object-position: center top;
  border-radius: 18px 0 0 18px;
}

.stat-row {
  left: 14px;
  right: 14px;
  bottom: 14px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-radius: 14px;
}

.metric {
  min-height: 78px;
  padding: 14px 4px;
}

.metric strong {
  font-size: 15px;
  white-space: nowrap;
}

.metric span {
  margin-top: 7px;
  font-size: 11px;
  line-height: 1.35;
}

.home-grid,
.chat-panel,
.lead-layout,
.appointment-panel,
.analysis-phone {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 12px;
}

.expertise-card,
.ai-entry-card,
.chat-card,
.case-card,
.analysis-card,
.case-showcase,
.appointment-panel,
.report-card,
.phone-shell {
  border-radius: 18px;
}

.expertise-card,
.ai-entry-card,
.case-card,
.analysis-card,
.case-showcase {
  padding: 18px;
}

.section-head h2,
.card-title h2 {
  font-size: 18px;
}

.expertise-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 16px;
}

.expertise-list article {
  min-height: 108px;
  padding: 14px 5px;
}

.expertise-list i {
  width: 36px;
  height: 36px;
}

.expertise-list strong {
  font-size: 13px;
}

.expertise-list span {
  font-size: 11px;
}

.ai-entry-card {
  min-height: 150px;
}

.mini-bot {
  width: 62px;
  height: 62px;
}

.chat-card {
  min-height: 620px;
  padding: 18px;
}

.quick-prompts {
  display: grid;
  grid-template-columns: 1fr;
}

.quick-prompts button {
  justify-content: start;
  min-height: 42px;
  border-radius: 12px;
  text-align: left;
}

.message {
  max-width: 90%;
  font-size: 14px;
}

.message.assistant {
  margin-left: 42px;
}

.message.assistant::before {
  left: -42px;
  width: 30px;
  height: 30px;
}

.composer {
  grid-template-columns: minmax(0, 1fr) 42px;
}

.side-stack {
  grid-template-columns: 1fr;
}

.case-grid,
.showcase-grid,
.care-grid,
.knowledge-admin .knowledge-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.analysis-phone {
  align-items: start;
}

.phone-shell {
  min-height: 620px;
}

.face-preview {
  width: 210px;
}

.report-card {
  min-height: auto;
  padding: 24px;
}

.bar-list p {
  grid-template-columns: 84px 1fr 38px;
  font-size: 12px;
}

.lead-layout {
  grid-template-columns: 1fr;
}

.analysis-card.tall {
  min-height: auto;
}

.summary-box {
  min-height: 280px;
}

.showcase-grid {
  gap: 10px;
}

.topic-grid,
.knowledge-grid {
  grid-template-columns: 1fr;
}

.knowledge-admin {
  grid-template-columns: 1fr;
  min-height: auto;
  border-radius: 18px;
}

.knowledge-admin aside {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 16px;
}

.knowledge-admin aside strong {
  flex: 0 0 100%;
  margin-bottom: 0;
}

.knowledge-admin aside button {
  flex: 0 0 auto;
  padding: 0 12px;
}

.knowledge-admin main {
  padding: 18px;
}

.appointment-panel {
  padding: 24px;
}

.appointment-panel h2 {
  font-size: 34px;
}

.appointment-panel p {
  font-size: 14px;
}

.bottom-tabs {
  position: relative;
  left: auto;
  bottom: auto;
  z-index: 80;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  width: min(406px, calc(100vw - 20px));
  margin: 0 auto;
  min-height: 62px;
  transform: none;
  align-items: center;
  border: 1px solid rgba(255,255,255,.86);
  border-radius: 20px;
  background: rgba(255,255,255,.92);
  box-shadow: 0 16px 46px rgba(57, 42, 24, .18);
  text-align: center;
  backdrop-filter: blur(18px);
}

.bottom-tabs a {
  color: #777;
  font-size: 12px;
}

.bottom-tabs a.active {
  color: var(--gold);
  font-weight: 900;
}

/* Final phone consultation app override */
.consult-upload-card {
  display: none;
}

.use-flow-card {
  display: none;
}

@media (min-width: 0) {
  .sidebar {
    display: none;
  }

  .workspace {
    display: grid;
    grid-template-rows: minmax(0, 1fr);
    height: 100vh;
    height: 100dvh;
    min-height: 0;
    overflow: hidden;
    padding: 0 10px 68px;
  }

  #consultView.view.active {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
    overflow: hidden;
  }

  .topbar {
    display: none;
  }

  .topbar::before {
    content: "‹";
    display: grid;
    place-items: center;
    color: #1d1b18;
    font-size: 27px;
  }

  .topbar::after {
    content: "•••";
    display: grid;
    place-items: center;
    color: #1d1b18;
    font-size: 16px;
    letter-spacing: 1px;
  }

  .topbar nav,
  .topbar .login-button,
  .top-brand img {
    display: none;
  }

  .top-brand {
    justify-content: center;
    min-width: 0;
  }

  .top-brand strong,
  .top-brand span {
    text-align: center;
  }

  .top-brand strong {
    font-size: 14px;
  }

  .top-brand span {
    font-size: 11px;
  }

  .home-grid {
    display: none;
  }

  .hero-board {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    flex: 0 0 auto;
    min-height: 310px;
    margin: 0;
    border: 0;
    border-radius: 0 0 26px 26px;
    overflow: visible;
    background:
      radial-gradient(circle at 82% 26%, rgba(226,217,204,.72), transparent 38%),
      linear-gradient(145deg, #f8f7f5 0%, #eee8de 100%);
    box-shadow: none;
  }

  .hero-board::before {
    z-index: 3;
    pointer-events: none;
    background:
      linear-gradient(90deg, rgba(248,245,239,.98) 0%, rgba(248,245,239,.9) 34%, rgba(248,245,239,.24) 62%, rgba(248,245,239,0) 100%),
      linear-gradient(180deg, transparent 68%, rgba(248,245,239,.74) 86%, rgba(248,245,239,1) 100%);
  }

  .phone-status {
    display: none;
  }

  .phone-status span:last-child {
    font-size: 0;
  }

  .phone-status span:last-child::before {
    content: "||| ))) []";
    font-size: 13px;
    letter-spacing: 1px;
  }

  .hero-copy {
    position: relative;
    z-index: 5;
    width: 58%;
    padding: 46px 0 0 26px;
  }

  .hero-copy h1 {
    margin: 0;
    max-width: 220px;
    font-size: 26px;
    line-height: 1.34;
    letter-spacing: 0;
  }

  .hero-copy h1 em {
    color: var(--gold);
    font-style: normal;
  }

  .hero-copy p {
    width: 100%;
    margin-top: 13px;
    color: #222;
    font-size: 12px;
    line-height: 1.72;
  }

  .hero-photo {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
    width: 58%;
    height: 286px;
    overflow: hidden;
    border-radius: 0 0 24px 0;
  }

  .hero-photo::before {
    display: block;
    inset: 0;
    z-index: 2;
    border-radius: 0;
    background:
      linear-gradient(90deg, rgba(248,245,239,.96) 0%, rgba(248,245,239,.42) 28%, rgba(248,245,239,0) 58%),
      linear-gradient(180deg, rgba(248,245,239,.08) 0%, rgba(248,245,239,0) 48%, rgba(248,245,239,.9) 100%);
  }

  .hero-photo img {
    position: absolute;
    top: 0;
    right: -6px;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 58% top;
    border-radius: 0;
    filter: saturate(.98) contrast(1.02);
  }

  .capability-row {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 190px;
    z-index: 6;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    height: 102px;
    min-height: 102px;
    width: auto;
    margin: 0;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.92);
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(255,255,255,.94), rgba(255,255,255,.78));
    box-shadow: 0 20px 48px rgba(68, 52, 33, .15);
    backdrop-filter: blur(18px);
  }

  .capability-row article {
    display: grid;
    place-items: center;
    align-content: center;
    gap: 6px;
    padding: 14px 4px;
    border-right: 1px solid rgba(185,132,66,.14);
    text-align: center;
  }

  .capability-row article:last-child {
    border-right: 0;
  }

  .capability-row svg {
    width: 23px;
    height: 23px;
    color: var(--gold);
  }

  .capability-row strong {
    font-size: 12px;
  }

  .capability-row span {
    color: var(--muted);
    font-size: 10px;
  }

  .chat-panel {
    display: grid;
    grid-template-columns: 1fr;
    flex: 1 1 auto;
    gap: 0;
    margin-top: 14px;
    min-height: 0;
    overflow: hidden;
  }

  .chat-panel .side-stack,
  .chat-card .card-title,
  .message.system {
    display: none;
  }

  .chat-card {
    display: flex;
    flex-direction: column;
    min-height: 0;
    height: 100%;
    padding: 0 18px 14px;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .messages {
    display: flex;
    order: 2;
    flex: 0 0 auto;
    max-height: 132px;
    margin: 0 0 4px;
    padding: 2px 4px 4px;
    overflow: hidden;
  }

  .message {
    max-width: 88%;
    padding: 13px 15px;
    border-radius: 13px;
    font-size: 13px;
    line-height: 1.72;
  }

  .use-flow-card {
    display: none;
    flex: 0 0 auto;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin: 10px 2px 10px;
  }

  .use-flow-card article {
    display: grid;
    gap: 5px;
    min-height: 70px;
    padding: 10px 8px;
    border: 1px solid rgba(185,132,66,.14);
    border-radius: 14px;
    background: rgba(255,255,255,.58);
    text-align: center;
  }

  .use-flow-card strong {
    display: grid;
    place-items: center;
    width: 22px;
    height: 22px;
    margin: 0 auto;
    border-radius: 50%;
    color: #fff;
    background: #b98442;
    font-size: 12px;
  }

  .use-flow-card span {
    color: #5f574d;
    font-size: 11px;
    line-height: 1.35;
  }

  .message.assistant {
    margin-left: 42px;
    background: #f1f0ee;
  }

  .message.assistant::before {
    left: -42px;
    width: 30px;
    height: 30px;
  }

  .message.user {
    color: #3d3022;
    background: #ead8c1;
  }

  .consult-upload-card {
    display: none;
    flex: 0 0 auto;
    place-items: center;
    gap: 8px;
    min-height: 78px;
    margin: 4px 42px 8px;
    padding: 10px;
    border: 1px solid rgba(185,132,66,.16);
    border-radius: 16px;
    background: rgba(255,255,255,.84);
    color: #8b5b22;
    box-shadow: 0 10px 26px rgba(80,64,43,.08);
    text-align: center;
  }

  .consult-upload-card svg {
    width: 28px;
    height: 28px;
  }

  .consult-upload-card strong {
    color: #1d1b18;
    font-size: 15px;
  }

  .consult-upload-card span {
    color: var(--muted);
    font-size: 11px;
  }

  .quick-prompts {
    display: none;
    order: 1;
    flex: 0 0 auto;
    gap: 8px;
    margin: 0;
    padding: 14px;
    overflow: visible;
    border-radius: 18px;
    background: rgba(255,255,255,.72);
    box-shadow: 0 12px 32px rgba(68, 52, 33, .08);
  }

  .quick-prompts button {
    width: 100%;
    height: 36px;
    max-height: none;
    min-height: 36px;
    padding: 0 14px;
    border: 1px solid rgba(28,28,28,.08);
    border-radius: 12px;
    color: #242424;
    background: linear-gradient(180deg, #fff, #f7f7f6);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.6);
    font-size: 12px;
    text-align: left;
  }

  .prompt-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2px;
  }

  .prompt-head strong {
    font-size: 15px;
  }

  .prompt-head button {
    width: auto;
    height: auto;
    min-height: 0;
    padding: 0;
    border: 0;
    color: var(--muted);
    background: transparent;
    box-shadow: none;
    font-size: 12px;
  }

  .composer {
    position: relative;
    order: 3;
    bottom: auto;
    z-index: 70;
    height: 58px;
    flex: 0 0 auto;
    grid-template-columns: minmax(0, 1fr) 42px;
    margin-top: 4px;
    padding: 5px 7px 5px 18px;
    box-shadow: 0 12px 34px rgba(62,45,25,.13);
  }

  .composer textarea {
    min-height: 30px;
    max-height: 42px;
    padding: 8px 0;
    overflow: hidden;
  }

  .ai-note {
    order: 4;
    display: none;
  }

  .bottom-tabs {
    position: absolute;
    left: 50%;
    right: auto;
    bottom: 10px;
    z-index: 100;
    width: min(386px, calc(100% - 24px));
    min-height: 52px;
    margin: 0;
    transform: translateX(-50%);
    border-radius: 18px;
  }

  body.is-chatting .chat-panel {
    flex: 1 1 auto;
    min-height: 0;
    margin-top: 12px;
    padding-top: 0;
  }

  body.is-chatting .chat-card {
    height: 100%;
    min-height: 0;
    padding-top: 0;
  }

  body.is-chatting .messages {
    display: flex;
    flex: 1 1 auto;
    min-height: 0;
    max-height: none;
    margin-bottom: 4px;
    overflow-y: auto;
  }

  body.is-chatting.has-conversion-nudge .messages {
    max-height: none;
  }

  body.is-chatting .ai-note {
    display: block;
    position: relative;
    bottom: auto;
    z-index: 65;
    flex: 0 0 auto;
    margin-top: 6px;
    padding-bottom: 0;
    background: linear-gradient(180deg, transparent, rgba(248,245,239,.96) 38%);
    font-size: 10px;
  }

  body.is-chatting .quick-prompts {
    display: none;
  }

  body.is-chatting .composer {
    margin-top: 0;
  }

  body.is-chatting .conversion-nudge.visible {
    display: grid;
    order: 5;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
    padding: 12px;
    border: 1px solid rgba(185,132,66,.2);
    border-radius: 16px;
    background: rgba(255,255,255,.84);
    box-shadow: 0 12px 28px rgba(66, 49, 28, .1);
  }

  .conversion-nudge strong,
  .conversion-nudge span {
    display: block;
  }

  .conversion-nudge strong {
    color: #1d1b18;
    font-size: 13px;
  }

  .conversion-nudge span {
    margin-top: 3px;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.5;
  }

  .conversion-nudge button {
    min-height: 34px;
    padding: 0 12px;
    border: 0;
    border-radius: 999px;
    color: #fff;
    background: linear-gradient(135deg, #c79555, #a46a2b);
    font-size: 12px;
    white-space: nowrap;
  }

  .conversion-actions {
    display: flex;
    gap: 6px;
    align-items: center;
  }

  .conversion-nudge button.ghost {
    color: #8a5a22;
    border: 1px solid rgba(185,132,66,.22);
    background: #fff;
  }

  .view.active {
    min-height: 0;
    overflow-y: auto;
  }

  .case-showcase {
    height: 100%;
    margin-top: 0;
    padding: 18px;
    overflow-y: auto;
  }

  .case-tabs {
    margin-top: 14px;
  }

  .showcase-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 14px;
  }

  .showcase-grid .case-placeholder {
    min-height: 150px;
    border-radius: 14px;
  }

  .case-placeholder i {
    width: 34px;
    height: 34px;
    font-size: 22px;
  }

  .case-note {
    margin-top: 12px;
  }

  .appointment-panel,
  .lead-layout {
    height: 100%;
    overflow-y: auto;
  }

  .appointment-form {
    display: grid;
    gap: 10px;
    margin-top: 18px;
  }

  .appointment-form input,
  .appointment-form select,
  .appointment-form textarea {
    width: 100%;
    min-height: 42px;
    padding: 10px 12px;
    border: 1px solid rgba(185,132,66,.18);
    border-radius: 12px;
    outline: none;
    color: #1d1b18;
    background: rgba(255,255,255,.86);
    font: inherit;
  }

  .appointment-form textarea {
    resize: none;
    min-height: 82px;
  }

  .appointment-form button {
    width: 100%;
    margin-top: 2px;
  }

  .form-status {
    min-height: 18px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.5;
  }

  .form-status.error {
    color: #a33a2b;
  }

  .form-status.success {
    color: #2e7d4f;
  }

  .wechat-card.visible {
    grid-template-columns: 82px minmax(0, 1fr);
    gap: 12px;
    margin-top: 12px;
    padding: 12px;
  }

  .wechat-card strong {
    font-size: 14px;
  }

  .wechat-card p {
    margin-top: 4px;
    font-size: 11px;
    line-height: 1.55;
  }

  .wechat-qr-placeholder {
    width: 82px;
    border-radius: 10px;
  }

  .lead-store-card,
  .conversation-store-card {
    grid-column: 1 / -1;
  }

  .lead-list,
  .conversation-list {
    display: grid;
    gap: 10px;
    margin-top: 14px;
  }

  .lead-item,
  .conversation-item {
    display: grid;
    gap: 8px;
    padding: 12px;
    border: 1px solid rgba(185,132,66,.14);
    border-radius: 14px;
    background: rgba(255,255,255,.78);
  }

  .lead-item strong,
  .lead-item span,
  .conversation-item strong,
  .conversation-item span {
    display: block;
  }

  .lead-item strong,
  .conversation-item strong {
    color: #1d1b18;
    font-size: 14px;
  }

  .lead-item span,
  .lead-item small,
  .conversation-item span {
    color: var(--muted);
    font-size: 11px;
  }

  .lead-item p,
  .conversation-item p {
    color: #4a433a;
    font-size: 12px;
    line-height: 1.55;
  }

  .conversation-item b {
    display: inline-grid;
    place-items: center;
    width: 22px;
    height: 22px;
    margin-right: 7px;
    border-radius: 999px;
    color: var(--gold);
    background: rgba(185,132,66,.1);
    font-size: 11px;
  }

  .empty-state {
    padding: 18px;
    border: 1px dashed rgba(185,132,66,.22);
    border-radius: 14px;
    color: var(--muted);
    background: rgba(255,255,255,.54);
    font-size: 12px;
    line-height: 1.6;
  }
}

.handoff-sheet {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: grid;
  place-items: end center;
  visibility: hidden;
  opacity: 0;
  transition: opacity .2s ease, visibility .2s ease;
}

.handoff-sheet.visible {
  visibility: visible;
  opacity: 1;
}

.handoff-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 0;
  background: rgba(28,24,20,.38);
  backdrop-filter: blur(5px);
}

.handoff-dialog {
  position: relative;
  z-index: 1;
  width: min(430px, 100vw);
  padding: 22px 20px calc(22px + env(safe-area-inset-bottom));
  border-radius: 22px 22px 0 0;
  background: #fbfaf7;
  box-shadow: 0 -20px 70px rgba(42,32,22,.22);
  transform: translateY(24px);
  transition: transform .24s ease;
}

.handoff-sheet.visible .handoff-dialog {
  transform: translateY(0);
}

.handoff-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.handoff-head span {
  color: var(--gold);
  font-size: 11px;
  font-weight: 900;
}

.handoff-head h2 {
  margin: 5px 0 0;
  font-size: 20px;
  line-height: 1.4;
}

.handoff-close {
  display: grid;
  place-items: center;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid rgba(28,28,28,.08);
  border-radius: 50%;
  color: #625b53;
  background: #fff;
  font-size: 22px;
  line-height: 1;
}

.handoff-summary {
  margin: 14px 0 0;
  padding: 11px 13px;
  border: 1px solid rgba(185,132,66,.14);
  border-radius: 10px;
  color: #675d52;
  background: #f4eee5;
  font-size: 12px;
  line-height: 1.55;
}

.handoff-form {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.handoff-fields {
  display: grid;
  grid-template-columns: .8fr 1.2fr;
  gap: 8px;
}

.handoff-form > input,
.handoff-fields input {
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid rgba(185,132,66,.18);
  border-radius: 10px;
  outline: 0;
  color: var(--ink);
  background: #fff;
}

.consent-line {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  color: #746b61;
  font-size: 11px;
  line-height: 1.5;
}

.consent-line input {
  width: 16px;
  height: 16px;
  margin: 1px 0 0;
  accent-color: #b88341;
}

.handoff-submit {
  min-height: 46px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, #c79555, #a46a2b);
  font-weight: 900;
}

.handoff-submit:disabled {
  opacity: .68;
}

body.handoff-open {
  overflow: hidden;
}
