: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);
  --home-page-background:
    radial-gradient(circle at 86% 10%, rgba(210, 178, 128, .18), transparent 34%),
    linear-gradient(180deg, #fbfaf7, #f4eee5);
}

* { 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;
}

.topbar nav button {
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
  cursor: pointer;
}

.topbar nav button:hover { color: #b47a31; }

.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,
.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;
  overscroll-behavior: contain;
  touch-action: pan-y;
  -webkit-overflow-scrolling: touch;
}

.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;
}

.chat-media-card {
  flex: 0 0 auto;
  width: min(360px, calc(100% - 48px));
  align-self: flex-start;
  margin: -4px 0 2px 48px;
  overflow: hidden;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(54, 43, 31, .10);
}

.chat-media-preview {
  position: relative;
  width: 100%;
  height: 188px;
  display: grid;
  place-items: center;
  padding: 0;
  overflow: hidden;
  border: 0;
  background: #171614;
  cursor: pointer;
  touch-action: pan-y;
}

.chat-media-preview img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.chat-media-play {
  position: absolute;
  inset: 50% auto auto 50%;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: rgba(24, 22, 19, .78);
  box-shadow: 0 8px 24px rgba(0,0,0,.24);
  transform: translate(-50%, -50%);
}

.chat-media-play svg { width: 19px; height: 19px; fill: currentColor; stroke: currentColor; }

.chat-media-copy { padding: 13px 15px 15px; }
.chat-media-copy span { display: block; color: #a36a2a; font-size: 11px; font-weight: 700; }
.chat-media-copy strong { display: block; margin-top: 4px; color: #24211d; font-size: 14px; line-height: 1.45; }
.chat-media-copy p { margin: 6px 0 0; color: #7d756d; font-size: 12px; line-height: 1.6; }

.chat-video-sheet {
  position: fixed;
  inset: 0;
  z-index: 340;
  visibility: hidden;
  pointer-events: none;
}

.chat-video-sheet.open {
  visibility: visible;
  pointer-events: auto;
}

.chat-video-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  opacity: 0;
  background: rgba(16, 15, 14, .66);
  transition: opacity .2s ease;
}

.chat-video-sheet.open .chat-video-backdrop { opacity: 1; }

.chat-video-dialog {
  position: absolute;
  inset: 0;
  width: min(560px, 100vw);
  height: 100vh;
  height: 100dvh;
  display: grid;
  grid-template-rows: 62px minmax(0, 1fr);
  margin: 0 auto;
  overflow: hidden;
  background: #131210;
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .18s ease, transform .22s ease;
}

.chat-video-sheet.open .chat-video-dialog { opacity: 1; transform: translateY(0); }

.chat-video-dialog > header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 48px;
  align-items: center;
  padding: 0 8px 0 18px;
  color: #fff;
  background: #1b1917;
}

.chat-video-dialog > header div { min-width: 0; }
.chat-video-dialog > header span { display: block; color: #c89b62; font-size: 9px; font-weight: 800; }
.chat-video-dialog > header h2 { margin-top: 3px; overflow: hidden; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.chat-video-dialog > header button { width: 44px; height: 44px; display: grid; place-items: center; border: 0; color: #fff; background: transparent; }
.chat-video-dialog > header svg { width: 22px; height: 22px; }
.chat-video-stage { min-height: 0; display: grid; place-items: center; overflow: hidden; background: #0d0c0b; }
.chat-video-stage video { width: 100%; height: 100%; display: block; background: #0d0c0b; object-fit: contain; }
body.chat-video-open { overflow: hidden; }

.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,
.case-grid video {
  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,
.care-grid {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

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

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

.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: 9px;
  min-width: 0;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(38,32,25,.1);
  transition: transform .2s ease;
}

.public-case-item:hover {
  transform: translateY(-3px);
}

.public-case-cover {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  background: #ece9e4;
}

.public-case-cover img,
.public-case-cover video,
.case-image-empty {
  width: 100%;
  aspect-ratio: 4 / 3.15;
  display: block;
  object-fit: cover;
  background: #ece9e4;
  transition: transform .35s ease;
}

.public-case-item:hover .public-case-cover img,
.public-case-item:hover .public-case-cover video {
  transform: scale(1.025);
}

.public-case-cover > span {
  position: absolute;
  right: 9px;
  bottom: 9px;
  padding: 5px 8px;
  border-radius: 5px;
  color: #fff;
  background: rgba(23,21,18,.68);
  backdrop-filter: blur(8px);
  font-size: 10px;
}

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

.public-case-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

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

.public-case-item strong {
  color: #1d1b18;
  font-size: 15px;
  line-height: 1.45;
}

.public-case-heading i {
  flex: 0 0 auto;
  color: var(--gold);
  font-size: 18px;
  font-style: normal;
}

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

.case-section-kicker {
  display: block;
  margin-bottom: 4px;
  color: var(--gold);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0;
}

.case-list-empty {
  grid-column: 1 / -1;
  min-height: 220px;
  display: grid;
  place-items: center;
  color: var(--muted);
  border: 1px solid var(--line);
  font-size: 13px;
}

.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;
}

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

.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,
  .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: var(--home-page-background);
}

.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 {
  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;
}

.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;
  }

  .chat-media-card {
    width: calc(100% - 46px);
    margin-left: 46px;
  }

  .chat-media-preview { height: 176px; }

  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;
  }

  .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;
  }

}

.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;
}

.consent-line a,
.appointment-consent a,
.appointment-trust-links a {
  color: #8e5a20;
  text-decoration: none;
}

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

.appointment-consent input {
  width: 16px;
  height: 16px;
  margin: 1px 0 0;
  padding: 0;
  border: 0;
  box-shadow: none;
  accent-color: #b88341;
}

.appointment-trust-links {
  display: flex;
  justify-content: center;
  gap: 18px;
  margin-top: 12px;
  font-size: 11px;
}

.appointment-trust-links a + a {
  position: relative;
}

.appointment-trust-links a + a::before {
  content: "";
  position: absolute;
  left: -10px;
  top: 50%;
  width: 1px;
  height: 10px;
  background: rgba(73, 61, 47, .18);
  transform: translateY(-50%);
}

.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;
}

/* Mobile case catalog */
#contentView.view.active {
  height: 100%;
  overflow: hidden;
}

.case-catalog {
  height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 0 0 82px;
  color: #17191d;
  background: var(--home-page-background);
  scrollbar-width: none;
}

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

.case-page-head {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 48px;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  align-items: center;
  padding: 0 4px;
  border-bottom: 0;
  background: var(--home-page-background);
  backdrop-filter: none;
}

.case-page-head h1 {
  font-size: 21px;
  font-weight: 800;
  text-align: center;
}

.case-page-head button {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  justify-self: center;
  padding: 0;
  border: 0;
  color: #20242a;
  background: transparent;
}

.case-page-head button svg { width: 22px; height: 22px; }

.case-doctor-intro {
  position: relative;
  height: 178px;
  min-height: 178px;
  display: block;
  overflow: hidden;
  isolation: isolate;
  background: linear-gradient(105deg, #faf9f7 0%, #f7f5f1 57%, #fff 100%);
}

.case-doctor-portrait {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  width: 52%;
  overflow: hidden;
}

.case-doctor-portrait img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  filter: none;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, rgba(0,0,0,.9) 25%, #000 42%);
  mask-image: linear-gradient(90deg, transparent 0%, rgba(0,0,0,.9) 25%, #000 42%);
}

.case-doctor-copy {
  position: absolute;
  top: 50px;
  left: 24px;
  z-index: 3;
  width: 60%;
}

.case-doctor-copy h2 {
  margin: 0;
  font-size: 23px;
  line-height: 1.32;
  letter-spacing: 0;
}

.case-doctor-copy p {
  margin-top: 10px;
  color: #74787e;
  font-size: 11px;
  line-height: 1.55;
}

.case-search {
  height: 50px;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) 52px;
  align-items: center;
  gap: 8px;
  margin: 10px 10px 0;
  padding: 0 10px 0 14px;
  border: 1px solid #dfe3e8;
  border-radius: 8px;
  background: #fff;
}

.case-search svg { width: 20px; height: 20px; color: #8a929d; }

.case-search input {
  min-width: 0;
  height: 44px;
  border: 0;
  outline: 0;
  color: #22262c;
  background: transparent;
  font-size: 12px;
}

.case-search input::placeholder { color: #9aa1aa; }

.case-search button {
  height: 32px;
  border: 0;
  border-left: 1px solid #e3e6ea;
  color: #9a682c;
  background: transparent;
  font-size: 12px;
  font-weight: 900;
}

.case-search[hidden] { display: none; }

.case-filter-panel {
  position: relative;
  z-index: 4;
  margin-top: -12px;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 22px 22px 0 0;
  background: #fff;
  box-shadow: 0 -10px 30px rgba(34,38,43,.045);
}

.case-category-tabs {
  height: 64px;
  display: flex;
  align-items: stretch;
  gap: 22px;
  padding: 0 22px;
  overflow-x: auto;
  border-bottom: 1px solid #eceef0;
  scrollbar-width: none;
}

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

.case-category-tabs button {
  position: relative;
  flex: 0 0 auto;
  min-width: 42px;
  padding: 0;
  border: 0;
  color: #24272c;
  background: transparent;
  font-size: 14px;
  white-space: nowrap;
}

.case-category-tabs button::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 0;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: #b8742a;
  transform: translateX(-50%);
  transition: width .18s ease;
}

.case-category-tabs button.active {
  color: #ad6419;
  font-weight: 800;
}

.case-category-tabs button.active::after { width: 100%; }

.case-filter-toolbar {
  height: 52px;
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  align-items: center;
  gap: 4px;
  padding: 0 16px;
  border-bottom: 1px solid #e8eaed;
  background: #fff;
}

.case-filter-panel.is-compact .case-filter-toolbar {
  display: none;
}

.case-filter-panel.is-compact .case-category-tabs {
  height: 72px;
  justify-content: center;
  padding: 16px 14px 0;
}

.case-filter-select {
  position: relative;
  min-width: 0;
}

.case-filter-select::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 13px;
  width: 6px;
  height: 6px;
  border-right: 1.5px solid #30343a;
  border-bottom: 1.5px solid #30343a;
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}

.case-filter-select select {
  width: 100%;
  height: 42px;
  padding: 0 28px 0 0;
  overflow: hidden;
  border: 0;
  outline: 0;
  color: #202329;
  background: transparent;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
  appearance: none;
}

.case-sort-select { justify-self: end; min-width: 82px; }
.case-sort-select::after { right: 2px; }
.case-sort-select select { padding-right: 17px; text-align: right; }

.case-all-section {
  margin: 0;
  padding: 0 10px 12px;
}

.case-filter-panel.is-compact + .case-all-section { padding-top: 12px; }

.case-result-list { display: grid; gap: 10px; }

.case-result-item {
  min-height: 156px;
  display: grid;
  grid-template-columns: 48% minmax(0, 1fr);
  align-items: stretch;
  gap: 0;
  overflow: hidden;
  border: 1px solid #e4e6e9;
  border-radius: 8px;
  color: #181b20;
  background: #fff;
  box-shadow: 0 6px 20px rgba(31,36,42,.055);
}

.case-result-media {
  position: relative;
  min-width: 0;
  min-height: 156px;
  overflow: hidden;
  background: #eceff2;
}

.case-result-media img,
.case-result-media video,
.case-result-media .case-image-empty {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.case-result-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 13px 12px 11px;
}

.case-result-copy h3 {
  width: 100%;
  margin: 0;
  overflow: hidden;
  font-size: 16px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.case-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  width: 100%;
  margin-top: 8px;
  overflow: hidden;
}

.case-tags i {
  max-width: calc(50% - 3px);
  padding: 3px 6px;
  overflow: hidden;
  border-radius: 4px;
  color: #a96119;
  background: #f8ecdf;
  font-size: 9px;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.case-result-copy small {
  width: 100%;
  margin-top: 7px;
  overflow: hidden;
  color: #666c74;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.case-result-copy p {
  display: -webkit-box;
  width: 100%;
  margin-top: 7px;
  overflow: hidden;
  color: #666c74;
  font-size: 10px;
  line-height: 1.5;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.case-result-copy > strong {
  align-items: center;
  display: inline-flex;
  gap: 8px;
  margin-top: auto;
  padding-top: 6px;
  color: #9b5c1b;
  font-size: 11px;
  font-weight: 800;
}

.case-detail-icon {
  width: 21px;
  height: 21px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(155, 92, 27, .26);
  border-radius: 50%;
  background: rgba(185, 132, 66, .055);
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}

.case-detail-icon svg {
  width: 12px;
  height: 12px;
  stroke-width: 1.7;
}

.case-result-item:hover .case-detail-icon {
  transform: translateX(2px);
  border-color: rgba(155, 92, 27, .45);
  background: rgba(185, 132, 66, .1);
}

.case-catalog .case-list-empty {
  min-height: 144px;
  padding: 24px;
  border: 1px solid #e1e4e8;
  border-radius: 8px;
  background: #fff;
  text-align: center;
}

body[data-active-view="content"] .bottom-tabs { display: grid; }

#appointmentView.view.active,
#leadView.view.active,
#appointmentView .appointment-panel,
#leadView .lead-layout {
  background: var(--home-page-background);
}

#appointmentView .appointment-panel,
#leadView .lead-layout > .analysis-card {
  border-color: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

#leadView .lead-layout > .analysis-card {
  background: transparent;
}

@media (max-width: 360px) {
  .case-doctor-portrait { width: 52%; }
  .case-doctor-copy { top: 48px; left: 18px; width: 59%; }
  .case-doctor-copy h2 { font-size: 21px; }
  .case-category-tabs { gap: 18px; padding-inline: 18px; }
  .case-filter-toolbar { padding-inline: 12px; }
  .case-result-item { grid-template-columns: 46% minmax(0, 1fr); }
  .case-result-copy { padding-inline: 10px; }
}

/* Public education center */
#knowledgeView.view.active {
  height: 100%;
  overflow: hidden;
  background: var(--home-page-background);
}

.education-hub {
  width: 100%;
  height: 100%;
  padding-bottom: 82px;
  overflow-y: auto;
  color: #1d1b18;
  background: var(--home-page-background);
  scrollbar-width: none;
}

.education-hub::-webkit-scrollbar { display: none; }

.education-page-head {
  position: sticky;
  top: 0;
  z-index: 12;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  align-items: center;
  min-height: 48px;
  border-bottom: 1px solid rgba(44, 38, 31, .07);
  background: rgba(251, 249, 245, .94);
  backdrop-filter: blur(18px);
}

.education-page-head > button:last-child { grid-column: 3; }

.education-page-head > button,
.education-detail-dialog > header > button {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: #25211d;
  background: transparent;
}

.education-page-head > button:hover,
.education-detail-dialog > header > button:hover { background: rgba(37, 33, 29, .055); }
.education-page-head svg,
.education-detail-dialog > header svg { width: 21px; height: 21px; }

.education-page-head > div {
  min-width: 0;
  text-align: center;
}

.education-page-head h1 {
  font-size: 17px;
  line-height: 1.2;
  letter-spacing: 0;
}

.education-page-head span {
  display: block;
  margin-top: 3px;
  color: #89827a;
  font-size: 10px;
}

.education-hero {
  position: relative;
  min-height: 270px;
  overflow: hidden;
  border-bottom: 1px solid rgba(54, 44, 31, .08);
  background: #e9e3da;
}

.education-hero > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 43% center;
}

.education-hero.education-poster {
  min-height: 0;
  aspect-ratio: 16 / 9;
  background: #f2ede6;
}

.education-hero.education-poster::after { display: none; }

.education-hero.education-poster > img {
  position: static;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.education-hero::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 66%;
  background: rgba(247, 244, 238, .91);
  box-shadow: 32px 0 52px rgba(247, 244, 238, .78);
}

.education-hero-copy {
  position: relative;
  z-index: 1;
  width: 65%;
  padding: 30px 10px 26px 24px;
}

.education-hero-copy > span {
  color: #9a6226;
  font-size: 11px;
  font-weight: 800;
}

.education-hero-copy h2 {
  margin-top: 11px;
  font-size: 26px;
  line-height: 1.3;
  letter-spacing: 0;
}

.education-hero-copy p {
  margin-top: 10px;
  color: #6f6860;
  font-size: 12px;
  line-height: 1.7;
}

.education-hero-copy button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  margin-top: 18px;
  padding: 0 13px;
  border: 1px solid rgba(154, 98, 38, .22);
  border-radius: 6px;
  color: #8f581f;
  background: rgba(255, 255, 255, .7);
  font-size: 11px;
  font-weight: 800;
}

.education-hero-copy button svg,
.education-card-copy em svg { width: 14px; height: 14px; }

.education-search {
  position: sticky;
  top: 48px;
  z-index: 11;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 52px;
  margin: 10px 12px 0;
  padding: 0 12px;
  border: 1px solid rgba(61, 50, 37, .1);
  border-radius: 8px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 10px 26px rgba(72, 57, 39, .08);
}

.education-search[hidden] { display: none; }
.education-search svg { color: #8d857c; }

.education-search input {
  min-width: 0;
  border: 0;
  outline: 0;
  color: #25211d;
  background: transparent;
  font: inherit;
  font-size: 12px;
}

.education-search button {
  min-height: 30px;
  padding: 0 4px;
  border: 0;
  color: #9a6226;
  background: transparent;
  font-size: 11px;
  font-weight: 800;
}

.education-filters {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  min-height: 62px;
  padding: 8px 12px 0;
  border-bottom: 1px solid rgba(45, 39, 31, .08);
  background: rgba(249, 247, 242, .96);
  backdrop-filter: blur(18px);
}

.education-search:not([hidden]) + .education-filters { top: 100px; }

.education-filters button {
  position: relative;
  border: 0;
  color: #777069;
  background: transparent;
  font-size: 13px;
}

.education-filters button::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 7px;
  width: 0;
  height: 2px;
  background: #a66b29;
  transform: translateX(-50%);
  transition: width .2s ease;
}

.education-filters button.active {
  color: #8c571e;
  font-weight: 900;
}

.education-filters button.active::after { width: 28px; }

.education-latest { padding: 22px 12px 8px; }

.education-section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 15px;
}

.education-section-head > div { min-width: 0; }
.education-section-head span {
  color: #a06a2d;
  font-size: 10px;
  font-weight: 800;
}

.education-section-head h2 {
  margin-top: 5px;
  font-size: 17px;
  line-height: 1.45;
  letter-spacing: 0;
}

.education-section-head > strong {
  flex: 0 0 auto;
  padding-bottom: 2px;
  color: #8e867e;
  font-size: 10px;
  font-weight: 500;
}

.education-feed { display: grid; gap: 10px; }
.education-card[hidden],
.education-empty[hidden] { display: none; }

.education-card {
  display: grid;
  grid-template-columns: 42% minmax(0, 1fr);
  min-height: 142px;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(58, 47, 34, .08);
  border-radius: 8px;
  color: #231f1b;
  background: rgba(255, 255, 255, .88);
  box-shadow: 0 10px 28px rgba(71, 55, 37, .055);
  text-align: left;
  transition: transform .18s ease, box-shadow .18s ease;
}

.education-card:active { transform: scale(.99); }

.education-media {
  position: relative;
  min-width: 0;
  overflow: hidden;
  background-color: #e7e0d6;
}

.education-panel-left,
.education-panel-center,
.education-panel-right {
  background-image: url("../assets/neck-education-triptych.jpg");
  background-repeat: no-repeat;
  background-size: 300% 100%;
}

.education-panel-left { background-position: left center; }
.education-panel-center { background-position: center center; }
.education-panel-right { background-position: right center; }

.education-media > i {
  position: absolute;
  left: 9px;
  top: 9px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 22px;
  padding: 0 7px;
  border-radius: 4px;
  color: #fff;
  background: rgba(29, 27, 24, .72);
  font-size: 9px;
  font-style: normal;
  font-weight: 800;
  backdrop-filter: blur(8px);
}

.education-media > i svg { width: 12px; height: 12px; }

.education-media > i.education-play {
  left: 50%;
  top: 50%;
  width: 42px;
  height: 42px;
  justify-content: center;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, .65);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.education-media > i.education-play svg {
  width: 18px;
  height: 18px;
  fill: #fff;
  stroke: #fff;
}

.education-media > b {
  position: absolute;
  right: 8px;
  bottom: 8px;
  padding: 3px 6px;
  border-radius: 3px;
  color: #fff;
  background: rgba(29, 27, 24, .7);
  font-size: 9px;
}

.education-card-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: flex-start;
  padding: 15px 14px 13px;
}

.education-card-copy small {
  color: #9a6226;
  font-size: 9px;
  font-weight: 700;
}

.education-card-copy > strong {
  display: -webkit-box;
  margin-top: 7px;
  overflow: hidden;
  font-size: 14px;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.education-card-copy p {
  display: -webkit-box;
  margin-top: 6px;
  overflow: hidden;
  color: #777069;
  font-size: 10px;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.education-card-copy em {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: auto;
  padding-top: 7px;
  color: #90591f;
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
}

.education-empty {
  min-height: 160px;
  display: grid;
  place-items: center;
  color: #817a72;
  font-size: 12px;
  text-align: center;
}

.education-empty strong,
.education-empty span {
  display: block;
}

.education-empty strong {
  color: #332d27;
  font-size: 15px;
}

.education-empty span {
  max-width: 270px;
  margin-top: 8px;
  color: #817a72;
  font-size: 11px;
  line-height: 1.7;
}

body[data-active-view="knowledge"] .bottom-tabs { display: grid; }

.bottom-tabs a {
  display: grid;
  grid-template-rows: 20px auto;
  justify-items: center;
  align-items: center;
  gap: 2px;
}

.bottom-tabs a svg { width: 17px; height: 17px; }

/* Education detail */
.education-detail-sheet {
  position: fixed;
  inset: 0;
  z-index: 260;
  visibility: hidden;
  pointer-events: none;
}

.education-detail-sheet.open {
  visibility: visible;
  pointer-events: auto;
}

.education-detail-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  opacity: 0;
  background: rgba(25, 22, 18, .34);
  transition: opacity .22s ease;
}

.education-detail-sheet.open .education-detail-backdrop { opacity: 1; }

.education-detail-dialog {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: min(430px, 100vw);
  height: 100vh;
  height: 100dvh;
  margin: 0 auto;
  overflow: hidden;
  color: #211e1a;
  background: #f8f5ef;
  transform: translateY(24px);
  opacity: 0;
  transition: transform .24s ease, opacity .2s ease;
}

.education-detail-sheet.open .education-detail-dialog {
  transform: translateY(0);
  opacity: 1;
}

.education-detail-dialog > header {
  z-index: 5;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  align-items: center;
  min-height: 62px;
  padding: 4px 6px;
  border-bottom: 1px solid rgba(48, 41, 33, .08);
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(18px);
}

.education-detail-dialog > header > div {
  min-width: 0;
  text-align: center;
}

.education-detail-dialog > header span {
  display: block;
  color: #9a6226;
  font-size: 9px;
  font-weight: 800;
}

.education-detail-dialog > header h2 {
  margin-top: 3px;
  overflow: hidden;
  font-size: 13px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.education-detail-body {
  min-height: 0;
  overflow-y: auto;
  scrollbar-width: none;
}

.education-detail-body::-webkit-scrollbar { display: none; }
.education-detail-cover {
  width: 100%;
  aspect-ratio: 16 / 10;
  background-color: #e7e0d6;
}

.education-article header { padding: 24px 22px 18px; }
.education-article header small,
.education-gallery-copy small {
  color: #9a6226;
  font-size: 10px;
  font-weight: 800;
}

.education-article header h1,
.education-gallery-copy h1,
.education-video-lesson article h1 {
  margin-top: 8px;
  font-size: 25px;
  line-height: 1.38;
  letter-spacing: 0;
}

.education-article header p,
.education-gallery-copy > p,
.education-video-lesson article > p {
  margin-top: 12px;
  color: #6e675f;
  font-size: 13px;
  line-height: 1.8;
}

.education-article > section {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 12px;
  margin: 0 22px;
  padding: 21px 0;
  border-top: 1px solid rgba(43, 37, 30, .09);
}

.education-article > section > span {
  color: #b37a39;
  font-size: 11px;
  font-weight: 900;
}

.education-article > section h2 {
  font-size: 16px;
  line-height: 1.5;
}

.education-article > section p {
  margin-top: 8px;
  color: #68615a;
  font-size: 13px;
  line-height: 1.85;
}

.education-article aside {
  margin: 2px 22px 32px;
  padding: 17px;
  border: 1px solid rgba(154, 98, 38, .15);
  border-radius: 8px;
  background: #f3ece2;
}

.education-article aside strong { color: #88531b; font-size: 12px; }
.education-article aside p {
  margin-top: 7px;
  color: #746b62;
  font-size: 11px;
  line-height: 1.75;
}

.education-video-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background-color: #ded7ce;
  transition: background-position .38s ease;
}

.education-video-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(22, 20, 18, .22);
}

.education-video-caption {
  position: absolute;
  z-index: 2;
  left: 20px;
  right: 20px;
  bottom: 70px;
  color: #fff;
  text-shadow: 0 2px 14px rgba(0, 0, 0, .34);
}

.education-video-caption span { font-size: 10px; font-weight: 800; }
.education-video-caption h3 { margin: 7px 0 0; font-size: 24px; line-height: 1.35; }
.education-video-caption p { margin-top: 8px; font-size: 12px; line-height: 1.65; }

#educationVideoToggle {
  position: absolute;
  z-index: 3;
  left: 20px;
  bottom: 20px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 0 13px;
  border: 1px solid rgba(255, 255, 255, .55);
  border-radius: 6px;
  color: #fff;
  background: rgba(20, 18, 16, .6);
  font-size: 11px;
  font-weight: 800;
  backdrop-filter: blur(10px);
}

#educationVideoToggle svg { width: 14px; height: 14px; fill: #fff; stroke: #fff; }
.education-pause-icon { width: 11px; height: 13px; border-left: 3px solid #fff; border-right: 3px solid #fff; }
.education-video-progress { height: 3px; background: #ddd5ca; }
.education-video-progress i { display: block; width: 0; height: 100%; background: #a66b29; transition: width .08s linear; }
.education-video-meta { display: flex; justify-content: space-between; padding: 12px 20px 0; color: #837a71; font-size: 10px; }
.education-video-meta strong { color: #5e5750; }
.education-video-lesson article { padding: 16px 20px 30px; }
.education-video-lesson article small { display: block; margin-top: 14px; color: #8b837a; font-size: 10px; line-height: 1.65; }

.education-gallery-main {
  width: 100%;
  aspect-ratio: 4 / 3;
  background-color: #e5ded4;
  transition: background-position .25s ease;
}

.education-gallery-copy { padding: 22px 20px 16px; }
.education-gallery-copy h2 { margin-top: 20px; font-size: 16px; }
.education-gallery-copy #educationGalleryText { margin-top: 7px; color: #6e675f; font-size: 12px; line-height: 1.75; }

.education-gallery-thumbs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 0 20px 30px;
}

.education-gallery-thumbs button {
  min-width: 0;
  padding: 0 0 9px;
  overflow: hidden;
  border: 1px solid rgba(56, 47, 36, .1);
  border-radius: 6px;
  color: #5f5851;
  background: #fff;
  text-align: left;
}

.education-gallery-thumbs button.active { border-color: rgba(154, 98, 38, .52); box-shadow: 0 8px 20px rgba(91, 61, 27, .09); }
.education-gallery-thumbs button > span { display: block; width: 100%; aspect-ratio: 4 / 3; }
.education-gallery-thumbs button strong { display: block; padding: 8px 7px 0; overflow: hidden; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }

.education-uploaded-media { position: relative; background: #ece9e4; }
.education-uploaded-media > img,
.education-uploaded-media > video { width: 100%; height: 100%; display: block; object-fit: cover; }
.education-uploaded-media > i:not(.education-play) { max-width: calc(100% - 16px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.education-published-cover { width: 100%; max-height: 300px; display: block; object-fit: cover; }
.education-published-copy { padding: 2px 22px 20px; }
.education-published-copy p { margin: 0 0 15px; color: #5f5952; font-size: 13px; line-height: 1.9; }
.education-published-video > video { width: 100%; max-height: 68vh; display: block; background: #111; object-fit: contain; }
.education-published-video article small { display: block; margin-bottom: 8px; color: #a26828; font-size: 10px; font-weight: 700; }

body.education-detail-open { overflow: hidden; }

@media (max-width: 360px) {
  .education-hero { min-height: 252px; }
  .education-hero-copy { padding-left: 19px; }
  .education-hero-copy h2 { font-size: 23px; }
  .education-card { grid-template-columns: 40% minmax(0, 1fr); min-height: 136px; }
  .education-card-copy { padding-inline: 11px; }
  .education-card-copy > strong { font-size: 13px; }
  .education-article header h1,
  .education-gallery-copy h1,
  .education-video-lesson article h1 { font-size: 22px; }
}

/* Borderless public experience */
.capability-row,
.composer,
.bottom-tabs,
.case-page-head,
.case-search,
.case-category-tabs,
.case-filter-toolbar,
.case-result-item,
.case-detail-icon,
.case-catalog .case-list-empty,
.education-page-head,
.education-hero,
.education-search,
.education-filters,
.education-card,
.education-detail-dialog > header,
.education-article > section,
.education-article aside,
#educationVideoToggle,
.education-gallery-thumbs button,
.appointment-panel,
.appointment-form input,
.appointment-form select,
.appointment-form textarea,
.handoff-close,
.handoff-summary,
.handoff-form > input,
.handoff-fields input {
  border: 0;
}

.capability-row article,
.case-search button { border: 0; }

.case-category-tabs button::after,
.education-filters button::after { display: none; }

.case-category-tabs button,
.education-filters button {
  align-self: center;
  height: 36px;
  padding: 0 12px;
  border-radius: 7px;
  transition: color .18s ease, background .18s ease;
}

.case-category-tabs button.active,
.education-filters button.active {
  color: #9a5e20;
  background: rgba(185, 132, 66, .10);
}

.case-filter-toolbar {
  background: transparent;
}

.case-filter-panel,
.case-category-tabs {
  background: transparent;
  box-shadow: none;
}

.case-result-item,
.education-card {
  box-shadow: 0 10px 26px rgba(58, 45, 31, .07);
}

.case-detail-icon {
  background: rgba(185, 132, 66, .10);
}

.education-media > i.education-play {
  border: 0;
  background: rgba(29, 27, 24, .76);
}

.case-search,
.education-search {
  box-shadow: 0 10px 24px rgba(58, 45, 31, .08);
}

.appointment-form input,
.appointment-form select,
.appointment-form textarea,
.handoff-form > input,
.handoff-fields input {
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 8px 22px rgba(68, 51, 31, .065);
}

.education-gallery-thumbs button.active {
  border: 0;
  background: #f5eee4;
  box-shadow: 0 9px 24px rgba(91, 61, 27, .10);
}

.education-card:focus-visible,
.case-result-item:focus-visible,
.case-category-tabs button:focus-visible,
.education-filters button:focus-visible {
  outline: 0;
  box-shadow: 0 14px 34px rgba(103, 70, 33, .14);
}

.ai-note,
body.is-chatting .ai-note {
  background: transparent;
}

.education-hub,
.education-filters,
.education-latest {
  background: #f8f5ef;
}

.education-filters {
  backdrop-filter: none;
}

.education-filters button,
.education-filters button.active {
  background: transparent;
}
