:root {
  color-scheme: light;
  font-family: "PingFang SC", "Noto Sans SC", "Microsoft YaHei", system-ui, sans-serif;
  --bg: #f5f7f9;
  --panel: #ffffff;
  --surface-2: #f0f3f5;
  /* ink 阶梯（别名对齐参考项目） */
  --text: #1a1a1a;
  --ink: #1a1a1a;
  --muted: #5a6470;
  --ink-2: #5a6470;
  --subtle: #9aa3ad;
  --ink-3: #9aa3ad;
  --line: #e3e8ec;
  --border: #e3e8ec;
  /* 主色 */
  --primary: #0d9668;
  --primary-dark: #0a7d56;
  --primary-light: #e6f5ee;
  --blue: #0284c7;
  --warning: #d97706;
  /* 语义状态色（§2 新增，供胶囊/角标/校验） */
  --state-success: #16a34a;
  --state-warning: #d97706;
  --state-error: #dc2626;
  --state-info: #0284c7;
  /* 圆角刻度（§2 新增，替换散落值） */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-full: 9999px;
  /* 阴影：--shadow 用于卡片（既有不变）；--shadow-float 仅用于浮层 */
  --shadow: 0 8px 24px -14px rgba(13, 150, 104, 0.28);
  --shadow-float: 0 8px 24px -8px rgba(13, 150, 104, 0.18);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
}

body.mvp-mode {
  background: #f6f8fb;
}

body.mvp-mode .topbar {
  position: sticky;
  top: 0;
  z-index: 10;
}

body.mvp-mode main {
  max-width: 760px;
}

body.mvp-mode .org-home {
  gap: 10px;
}

body.mvp-mode .two-column {
  grid-template-columns: 1fr;
}

body.mvp-mode #appointmentForm,
body.mvp-mode #reportPanel {
  scroll-margin-top: 86px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 14px clamp(12px, 4vw, 28px);
  color: #ffffff;
  background: var(--primary);
  border-bottom: 0;
}

.eyebrow {
  margin: 0 0 4px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.72);
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: 20px;
}

h2 {
  font-size: 16px;
}

main {
  width: min(760px, calc(100% - 24px));
  margin: 12px auto 48px;
}

.portal {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

/* 2026-10-11 机构页"返回服务广场"入口（仅从广场进入/公共入口显示）。 */
.plaza-back {
  display: inline-block;
  width: auto;
  margin: 10px auto 0;
  padding: 5px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: var(--ink-2);
  font-size: 12px;
  text-decoration: none;
}

.plaza-back[hidden] { display: none; }

/* 084/D3 服务广场首页：无 orgId 时只显示广场区块，单机构内容块整组隐藏。 */
body.plaza-mode .tab-pane {
  display: none !important;
}

.trial-apply-strip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid #b9dfcf;
  border-radius: 8px;
  background: var(--primary-light);
}

.trial-apply-strip strong,
.trial-apply-strip span {
  display: block;
}

.trial-apply-strip span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.strip-action,
.poster-cta,
.mobile-appbar a {
  color: #ffffff;
  text-decoration: none;
}

.strip-action {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 8px;
  background: var(--primary);
  font-weight: 700;
}

.searchbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 76px;
  gap: 8px;
  margin-bottom: 10px;
}

.location-btn {
  width: 100%;
  margin-bottom: 10px;
  color: var(--primary);
  background: var(--primary-light);
}

.location-btn:hover {
  color: #ffffff;
  background: var(--primary-dark);
}

.service-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  margin-bottom: 12px;
}

.service-tabs button {
  flex: 0 0 auto;
  min-height: 34px;
  color: var(--primary);
  background: var(--primary-light);
}

.service-tabs button.active {
  color: #ffffff;
  background: var(--primary);
}

.portal .section-title {
  color: var(--text);
}

.org-list {
  display: grid;
  gap: 10px;
  overflow: visible;
  border-radius: 0;
  background: transparent;
}

.org-card {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 74px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  text-align: left;
  background: #ffffff;
}

.org-card:hover {
  background: #f8fafc;
}

.org-card img {
  width: 58px;
  max-height: 44px;
  object-fit: contain;
}

.org-card strong,
.org-card small {
  display: block;
}

.org-card small {
  margin-top: 4px;
  color: var(--muted);
  line-height: 1.35;
}

.org-home {
  display: grid;
  gap: 12px;
}

.banner-carousel {
  position: relative;
}

.banner-carousel[hidden] {
  display: none;
}

.banner-list {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 100%;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  overscroll-behavior-inline: contain;
}

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

.banner-list img {
  width: 100%;
  aspect-ratio: 5 / 2;
  border-radius: 8px;
  object-fit: cover;
  background: #e5e7eb;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.banner-dots {
  position: absolute;
  left: 50%;
  bottom: 8px;
  display: flex;
  gap: 6px;
  transform: translateX(-50%);
}

.banner-dot {
  width: 7px;
  height: 7px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08);
}

.banner-dot.active {
  width: 18px;
  border-radius: var(--radius-full);
  background: #fff;
}

.org-info {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 14px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.org-info img {
  width: 88px;
  max-height: 58px;
  object-fit: contain;
}

.org-info p {
  margin-bottom: 5px;
  color: var(--muted);
}

.preline {
  white-space: pre-line;
  color: var(--muted);
  line-height: 1.7;
}

.section {
  margin-bottom: 18px;
}

.section-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

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

.entry-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}

.entry {
  min-height: 92px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.entry-button {
  display: block;
  width: 100%;
  height: auto;
  color: var(--text);
  text-align: left;
  background: var(--panel);
}

.entry-button:hover {
  color: var(--text);
  background: #f8fafc;
}

.entry strong {
  display: block;
  margin-bottom: 8px;
}

.entry span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.two-column {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
}

.panel {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

#groupBuySection {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.shared-group-panel {
  grid-column: 1 / -1;
  border-color: #b7d8ca;
  background: #f2fbf6;
}

.group-detail-card {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}

.group-detail-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.share-url {
  overflow-wrap: anywhere;
  padding: 8px;
  border-radius: 8px;
  background: #ffffff;
  color: var(--primary);
  font-size: 12px;
}

label {
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
  font-size: 14px;
}

/* 表单标签的 display: grid 不得覆盖 hidden 属性。 */
label[hidden] {
  display: none !important;
}

/* 报告查询方式：下划线页签（用户 2026-09-13 口径，对齐 we-chat 设计稿）——机构配几种显示几个 */
.query-options {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.query-tab {
  min-height: 34px;
  padding: 0 2px;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
}

.query-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  font-weight: 600;
}

.segmented {
  display: inline-grid;
  grid-template-columns: repeat(3, minmax(52px, 1fr));
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.segmented button {
  min-height: 34px;
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 0;
  color: var(--text);
  background: #ffffff;
}

.segmented button:last-child {
  border-right: 0;
}

.segmented button.active {
  color: #ffffff;
  background: var(--primary);
}

.segmented button:disabled {
  color: var(--muted);
  background: #f1f5f9;
}

.package-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.package-card {
  display: grid;
  gap: 5px;
  min-height: 94px;
  padding: 11px;
  border: 1px solid var(--line);
  color: var(--text);
  text-align: left;
  background: #ffffff;
}

.package-card:hover,
.package-card.active {
  border-color: var(--primary);
  color: var(--text);
  background: #eefaf6;
}

.package-card strong,
.package-card span,
.package-card small {
  display: block;
}

.package-card span {
  color: var(--primary-dark);
  font-weight: 700;
}

.package-card small {
  color: var(--muted);
  line-height: 1.35;
}

.notice-line {
  padding: 9px 10px;
  border: 1px solid #b7d7ff;
  border-radius: 6px;
  color: #175c9e;
  background: #edf6ff;
  font-size: 13px;
}

.digital-doctor-card {
  margin-bottom: 14px;
}

.digital-doctor-profile {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid #b7d7ff;
  border-radius: 8px;
  background: #f5fbff;
}

.digital-doctor-profile.disabled {
  border-color: var(--line);
  background: #f8fafc;
}

.digital-doctor-profile img,
.doctor-avatar-placeholder {
  width: 58px;
  height: 58px;
  border-radius: 8px;
  object-fit: cover;
}

.doctor-avatar-placeholder {
  display: grid;
  place-items: center;
  color: #ffffff;
  font-weight: 700;
  background: var(--blue);
}

.digital-doctor-profile strong,
.digital-doctor-profile span,
.digital-doctor-profile small {
  display: block;
}

.digital-doctor-profile span {
  margin-top: 2px;
  color: var(--blue);
  font-size: 13px;
}

.digital-doctor-profile p {
  margin: 7px 0;
  color: var(--text);
  line-height: 1.5;
}

.digital-doctor-profile small {
  color: var(--muted);
  line-height: 1.45;
}

input,
select,
button {
  min-height: 40px;
  border-radius: 8px;
  font: inherit;
}

input,
select {
  width: 100%;
  border: 1px solid #cbd5e1;
  padding: 7px 10px;
  background: #ffffff;
}

button {
  border: 0;
  padding: 0 16px;
  background: var(--primary);
  color: #ffffff;
  font-weight: 700;
  cursor: pointer;
}

button:hover {
  background: var(--primary-dark);
}

button.secondary {
  color: var(--primary);
  background: var(--primary-light);
}

.result {
  margin: 10px 0 0;
  color: var(--muted);
}

.list {
  display: grid;
  gap: 10px;
}

.item {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.item strong {
  display: block;
  margin-bottom: 6px;
}

.item p {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 13px;
}

.item-actions {
  display: flex;
  gap: 8px;
}

.payment-box {
  margin: 12px 0;
}

.payment-required {
  border-color: #f6d7a3;
  background: #fff8ec;
}

.pay-notice {
  padding: 8px 10px;
  border-radius: 6px;
  color: #8a4b0a;
  background: #fff3d8;
  font-size: 13px;
  line-height: 1.5;
}

.mobile-appbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) 56px;
  align-items: center;
  min-height: 48px;
  padding: 0 12px;
  color: #ffffff;
  background: var(--primary);
}

.mobile-appbar strong {
  text-align: center;
}

.mobile-appbar a:last-child {
  text-align: right;
}

.mobile-shell {
  width: min(480px, calc(100% - 24px));
}

.apply-hero,
.poster-card {
  padding: 22px 18px;
  border-radius: 8px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  box-shadow: var(--shadow);
}

.apply-hero p,
.apply-hero h1,
.apply-hero span {
  margin: 0;
}

.apply-hero p {
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
}

.apply-hero h1 {
  margin: 6px 0 10px;
  font-size: 24px;
}

.apply-hero span {
  display: block;
  color: rgba(255, 255, 255, 0.84);
  line-height: 1.6;
}

.apply-form h2 {
  margin-bottom: 14px;
}

.trial-scope {
  margin-top: 12px;
  color: var(--text);
}

.trial-scope strong {
  display: block;
  margin-bottom: 6px;
  color: var(--primary-dark);
}

.trial-scope p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.apply-help {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.apply-help h2 {
  margin: 0;
  color: var(--primary-dark);
  font-size: 16px;
}

.apply-help ol {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 20px;
  color: var(--text);
  font-size: 13px;
  line-height: 1.6;
}

.apply-help a {
  color: var(--primary-dark);
  font-weight: 700;
}

.apply-links {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.apply-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: var(--surface-2);
  font-size: 12px;
  text-align: center;
  text-decoration: none;
}

.poster-page {
  background: #dcebe4;
}

.poster-shell {
  display: grid;
  min-height: 100vh;
  place-items: center;
  width: min(430px, calc(100% - 18px));
  margin: 0 auto;
}

.poster-card {
  width: 100%;
  min-height: 760px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
}

.poster-card .eyebrow {
  color: rgba(255, 255, 255, 0.72);
}

.poster-brand {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
}

.poster-brand strong {
  display: block;
  margin-top: 4px;
  font-size: 13px;
}

.poster-logo {
  display: grid;
  justify-items: center;
  gap: 6px;
}

.poster-logo span {
  color: #f5fff9;
  font-size: 18px;
  font-weight: 800;
}

.poster-logo img {
  width: 70px;
  height: 70px;
  border: 3px solid rgba(255, 255, 255, 0.9);
  border-radius: 8px;
  object-fit: cover;
  background: #ffffff;
}

.poster-heading h1 {
  margin: 0;
  font-size: 34px;
  line-height: 1.18;
}

.poster-heading .poster-lead {
  margin-top: 12px;
  color: #ffffff;
  font-size: 17px;
  font-weight: 800;
}

.poster-heading p {
  margin: 14px 0 0;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.7;
  font-size: 16px;
}

.poster-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.poster-grid span {
  padding: 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.14);
  text-align: center;
  font-weight: 700;
}

.poster-cta {
  display: grid;
  min-height: 46px;
  place-items: center;
  border-radius: 8px;
  color: var(--primary);
  background: #ffffff;
  font-weight: 800;
}

.poster-qr-panel {
  display: grid;
  gap: 10px;
  padding: 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.14);
}

.poster-qr-panel h2 {
  margin: 0;
  color: #ffffff;
  font-size: 15px;
}

.poster-qr-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.poster-qr-grid article {
  display: grid;
  gap: 5px;
  justify-items: center;
  min-width: 0;
  padding: 8px 6px;
  border-radius: 8px;
  background: #ffffff;
}

.poster-qr-grid img {
  width: 86px;
  max-width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
}

.poster-qr-grid strong {
  color: var(--primary-dark);
  font-size: 12px;
  line-height: 1.2;
  text-align: center;
}

.poster-qr-grid small {
  color: #4f6f65;
  font-size: 10px;
  line-height: 1.35;
  text-align: center;
}

.poster-note {
  margin: 0;
  color: rgba(255, 255, 255, 0.74);
  font-size: 11px;
  line-height: 1.4;
}

.pay-success {
  padding: 10px;
  border-radius: 6px;
  color: #0f8f72;
  background: #eefaf6;
  font-weight: 600;
  text-align: center;
}

.coupon-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
  margin: 10px 0;
}

.coupon-row label {
  margin-bottom: 0;
}

.validation-hints {
  margin-bottom: 10px;
}

.validation-error {
  margin: 4px 0;
  padding: 6px 10px;
  border-radius: 4px;
  color: #c2410c;
  background: #fef2f2;
  font-size: 13px;
}

.group-buy-card {
  border-color: #f5b85b;
}

.group-buy-card.active {
  border-color: #d97706;
  background: #fffbeb;
}

.premium-card {
  border-color: #a78bfa;
}

.premium-card.active {
  border-color: #7c3aed;
  background: #f5f3ff;
}

.tag-group {
  color: #d97706;
  font-weight: 600;
}

.tag-premium {
  color: #7c3aed;
  font-weight: 600;
}

.tag-desc {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.digital-reply {
  border-color: #b7d7ff;
  background: #f5fbff;
}

.digital-reply.transfer {
  border-color: #f5b85b;
  background: #fff8ec;
}

.chat-thread {
  display: grid;
  gap: 10px;
  max-height: 360px;
  overflow-y: auto;
  margin: 12px 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.chat-bubble {
  width: min(86%, 720px);
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.chat-bubble.user {
  justify-self: end;
  color: #ffffff;
  border-color: var(--primary);
  background: var(--primary);
}

.chat-bubble.expert {
  justify-self: start;
  border-color: #b7d7ff;
  background: #f5fbff;
}

.chat-bubble.transfer {
  justify-self: start;
  border-color: #f5b85b;
  background: #fff8ec;
}

.chat-bubble strong {
  display: block;
  margin-bottom: 5px;
  font-size: 13px;
}

.chat-bubble p {
  margin: 0;
  line-height: 1.55;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.org-switch {
  width: min(220px, 42vw);
  margin: 0;
}

@media (max-width: 760px) {
  .topbar {
    align-items: center;
    flex-direction: row;
    padding: 12px;
  }

  .two-column {
    grid-template-columns: 1fr;
  }

  #groupBuySection {
    grid-template-columns: 1fr;
  }

  .org-info {
    grid-template-columns: 1fr;
  }

  main {
    width: calc(100% - 24px);
    margin: 12px auto 32px;
  }

  .section {
    margin-bottom: 12px;
  }

  .entry-grid,
  .package-cards {
    grid-template-columns: repeat(2, 1fr);
  }

  .panel {
    padding: 12px;
  }

  .notice-line,
  .pay-notice {
    font-size: 12px;
    padding: 7px 8px;
  }

  .coupon-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .item-actions {
    flex-wrap: wrap;
  }

  .item-actions button {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 13px;
    padding: 0 10px;
  }

  .org-info img {
    width: 64px;
  }

  .price-summary {
    font-size: 13px;
  }

  .pay-success {
    font-size: 14px;
    padding: 8px;
  }
}

@media (max-width: 400px) {
  .trial-apply-strip {
    grid-template-columns: 1fr;
  }

  .entry-grid,
  .package-cards {
    grid-template-columns: 1fr;
  }
}

/* 卡券入口 */
.coupon-entry {
  margin-top: 12px;
}

.coupon-entry-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 12px 16px;
  background: linear-gradient(135deg, #0d9668, #0a7d56);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

.coupon-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: rgba(255,255,255,0.2);
  border-radius: 6px;
  font-size: 14px;
}

.coupon-badge {
  margin-left: auto;
  background: rgba(255,255,255,0.3);
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 12px;
}

/* 领券中心 & 我的券 */
.coupon-center,
.my-coupons {
  background: var(--panel);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
}

.coupon-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 8px;
}

.coupon-tab {
  padding: 8px 16px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface-2);
  color: var(--text);
  font-size: 13px;
  cursor: pointer;
}

.coupon-tab.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

/* 券卡片 */
.coupon-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.coupon-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px;
  background: var(--surface-2);
  border-radius: 10px;
  border-left: 4px solid var(--primary);
}

.coupon-card.claimed {
  border-left-color: var(--subtle);
  opacity: 0.7;
}

.coupon-card.reserved {
  border-left-color: var(--warning);
}

.coupon-card.used {
  border-left-color: var(--muted);
  opacity: 0.5;
}

.coupon-card.expired,
.coupon-card.voided {
  border-left-color: var(--line);
  opacity: 0.5;
}

.coupon-main {
  display: flex;
  gap: 12px;
  flex: 1;
}

.coupon-amount {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 72px;
  padding: 8px;
  background: var(--primary-light);
  border-radius: 8px;
}

.discount-value {
  font-size: 20px;
  font-weight: 700;
  color: var(--primary);
}

.discount-label {
  font-size: 11px;
  color: var(--primary);
}

.coupon-info {
  flex: 1;
  min-width: 0;
}

.coupon-info strong {
  display: block;
  margin-bottom: 4px;
  font-size: 14px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.coupon-info p {
  margin: 2px 0;
  font-size: 12px;
  color: var(--muted);
}

.coupon-status {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 11px;
}

.coupon-status.claimed { background: #dbeafe; color: #1d4ed8; }
.coupon-status.reserved { background: #fef3c7; color: #92400e; }
.coupon-status.used { background: #ebebeb; color: #595959; }
.coupon-status.expired { background: #e5e7eb; color: #6b7280; }
.coupon-status.voided { background: #fee2e2; color: #991b1b; }

.verify-code {
  font-family: monospace;
  font-weight: 600;
  color: var(--primary);
}

.coupon-card button {
  flex-shrink: 0;
  padding: 8px 16px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
}

.coupon-card button:disabled {
  background: var(--line);
  color: var(--muted);
  cursor: not-allowed;
}

/* 选券面板 */
.coupon-select-panel {
  margin: 12px 0;
  padding: 12px;
  background: var(--surface-2);
  border-radius: 8px;
  border: 1px solid var(--line);
}

.coupon-select-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}

.coupon-select-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--panel);
  border: 2px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 0.2s;
}

.coupon-select-item.selected {
  border-color: var(--primary);
  background: var(--primary-light);
}

.coupon-select-item input[type="radio"] {
  margin: 0;
  accent-color: var(--primary);
}

.coupon-select-info {
  flex: 1;
}

.coupon-select-info strong {
  display: block;
  font-size: 13px;
  color: var(--text);
}

.coupon-select-info span {
  font-size: 12px;
  color: var(--muted);
}

/* 价格预览 */
.price-preview {
  margin-top: 12px;
  padding: 12px;
  background: var(--panel);
  border-radius: 8px;
  border: 1px solid var(--line);
}

.price-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 14px;
}

.price-row.discount {
  color: #dc2626;
}

.price-row.final {
  font-weight: 600;
  font-size: 16px;
  border-top: 1px solid var(--line);
  margin-top: 4px;
  padding-top: 8px;
}

/* 预约成功核销码 */
.appointment-success {
  background: var(--panel);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
}

.success-card {
  text-align: center;
}

.success-card h2 {
  color: var(--primary);
  margin-bottom: 8px;
}

.verify-code {
  margin: 16px 0;
  padding: 16px;
  background: var(--primary-light);
  border-radius: 8px;
}

.verify-label {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 4px;
}

.verify-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--primary);
  font-family: monospace;
  letter-spacing: 4px;
  margin: 8px 0;
}

.verify-hint {
  font-size: 12px;
  color: var(--muted);
}

.success-card button {
  margin-top: 12px;
  padding: 10px 24px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
}

/* ====================================================================
   设计卡 v1.4 实施样式：顶栏 / Hero / 宫格锁态 / Tab 栏 / 胶囊 / 空态 / 通告栏 / 规范
   ==================================================================== */

/* ---- 顶栏改造（§3.1） ---- */
.topbar {
  gap: 8px;
  padding: 10px clamp(12px, 4vw, 20px);
}
.topbar .topbar-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
}
.topbar .org-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  cursor: default;
}
.topbar .org-chip .org-chip-logo {
  width: 24px;
  height: 24px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
  overflow: hidden;
}
.topbar .org-chip .org-chip-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.topbar .org-chip .org-chip-name {
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 9em;
}
.topbar .org-chip .chevron {
  font-size: 10px;
  opacity: 0.7;
  flex-shrink: 0;
}
.topbar .topbar-title {
  font-size: 15px;
  font-weight: 600;
  text-align: center;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.topbar .topbar-right {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}
.topbar .icon-btn {
  position: relative;
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
}
.topbar .icon-btn:active { opacity: 0.8; }
.topbar .icon-btn .badge {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 14px;
  height: 14px;
  padding: 0 3px;
  border-radius: var(--radius-full);
  background: var(--state-error);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  line-height: 14px;
  text-align: center;
}
.topbar .icon-btn .badge.dot {
  width: 8px;
  height: 8px;
  min-width: 8px;
  padding: 0;
}
.topbar .eyebrow,
.topbar .org-switch { display: none; }
.topbar .secondary { display: none; }

/* ---- Hero 主行动卡（§3.2） ---- */
.hero-card {
  margin: 12px 0;
  padding: 20px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  box-shadow: var(--shadow);
}
.hero-card .hero-title {
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 4px;
}
.hero-card .hero-sub {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.8);
  margin: 0 0 12px;
}
.hero-card .hero-capsule {
  display: inline-block;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.15);
  font-size: 11px;
  margin-bottom: 12px;
}
.hero-card .hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 16px;
}
.hero-card .hero-meta span { display: inline-flex; align-items: center; gap: 4px; }
.hero-card .hero-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 12px 24px;
  border: none;
  border-radius: var(--radius-md);
  background: #fff;
  color: var(--primary);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}
.hero-card .hero-btn:active { transform: scale(0.97); }
.hero-card .hero-btn svg { width: 16px; height: 16px; }
.trial-apply-strip-min {
  margin: 0 0 12px;
  font-size: 12px;
  color: var(--muted);
  text-align: center;
}
.trial-apply-strip-min a { color: var(--primary); font-weight: 600; }
.org-home { margin-bottom: 12px; }

/* ---- 服务宫格锁态（§3.3 四态） ---- */
.entry-grid.service-grid {
  grid-template-columns: repeat(3, 1fr);
  gap: 14px 8px;
}
.entry.service-entry {
  min-height: auto;
  padding: 10px 4px;
  border: none;
  border-radius: var(--radius-md);
  background: transparent;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  position: relative;
}
.entry.service-entry:active { transform: scale(0.95); }
.entry.service-entry .icon-block {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: var(--primary-light);
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.entry.service-entry .icon-block svg { width: 22px; height: 22px; }
.entry.service-entry .icon-block .fallback-char {
  font-size: 16px;
  font-weight: 700;
}
.entry.service-entry .entry-title {
  font-size: 11px;
  color: var(--ink);
  text-align: center;
  line-height: 1.3;
}
/* 锁态：未开通 */
.entry.service-entry.locked {
  cursor: not-allowed;
}
.entry.service-entry.locked .icon-block {
  background: var(--surface-2);
  color: var(--ink-3);
  opacity: 0.5;
}
.entry.service-entry.locked .icon-block .lock-icon {
  position: absolute;
  right: calc(50% - 24px);
  bottom: 28px;
  width: 14px;
  height: 14px;
}
.entry.service-entry.locked .entry-title { color: var(--ink-3); opacity: 0.6; }
/* 暂不可用：同锁态样式 + 文案区分 */
.entry.service-entry.unavailable .icon-block .lock-icon { color: var(--state-warning); }
.entry.service-entry.unavailable .entry-title { color: var(--state-warning); opacity: 0.8; }

/* ---- 底部 Tab 导航（§3.4） ---- */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 30;
  display: flex;
  height: 50px;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: var(--panel);
  border-top: 1px solid var(--border);
}
.bottom-nav .nav-item {
  flex: 1;
  border: none;
  background: transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: var(--ink-3);
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
  position: relative;
  padding: 0;
}
.bottom-nav .nav-item svg { width: 22px; height: 22px; }
.bottom-nav .nav-item.active { color: var(--primary); }
.bottom-nav .nav-item:active { opacity: 0.7; }
.bottom-nav .nav-item .nav-badge {
  position: absolute;
  top: 4px;
  right: 50%;
  margin-right: -22px;
  min-width: 14px;
  height: 14px;
  padding: 0 3px;
  border-radius: var(--radius-full);
  background: var(--state-error);
  color: #fff;
  font-size: 9px;
  line-height: 14px;
  text-align: center;
}
/* Tab 容器显隐 */
.tab-pane { display: none; }
.tab-pane.active { display: block; }
main.has-bottom-nav { margin-bottom: calc(50px + env(safe-area-inset-bottom, 0px)); }

/* ---- 状态胶囊（§3.5） ---- */
.pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: 12px;
  line-height: 1.4;
}
.pill-primary { background: var(--primary-light); color: var(--primary); }
.pill-success { background: rgba(22,163,74,0.12); color: var(--state-success); }
.pill-muted { background: var(--surface-2); color: var(--ink-3); }
.pill-warning { background: rgba(217,119,6,0.12); color: var(--state-warning); }
.pill-info { background: rgba(2,132,199,0.12); color: var(--state-info); }

/* ---- 空态矩阵（§3.6） ---- */
.empty-state {
  padding: 32px 16px;
  text-align: center;
}
.empty-state .empty-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 12px;
  color: var(--ink-3);
}
.empty-state .empty-icon svg { width: 48px; height: 48px; }
.empty-state .empty-title { font-size: 15px; font-weight: 600; margin: 0 0 6px; }
.empty-state .empty-desc { font-size: 13px; color: var(--ink-2); margin: 0 0 16px; }
.empty-state .empty-action {
  padding: 8px 24px;
  border: none;
  border-radius: var(--radius-md);
  background: var(--primary);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.empty-state .empty-action:active { opacity: 0.85; }

/* ---- 通告栏（§3.8） ---- */
.notice-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  background: rgba(217,119,6,0.08);
  font-size: 12px;
}
.notice-bar .notice-icon {
  width: 20px;
  height: 20px;
  border-radius: var(--radius-full);
  background: rgba(217,119,6,0.15);
  color: var(--state-warning);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.notice-bar .notice-icon svg { width: 12px; height: 12px; }
.notice-bar .notice-text { flex: 1; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.notice-bar .notice-more { color: var(--ink-3); font-size: 14px; flex-shrink: 0; }
.notice-bar:empty, .notice-bar[data-empty="true"] { display: none; }

/* ---- 交互与动效（§4.2） ---- */
button,
a,
.entry,
.entry-button,
.nav-item,
.icon-btn,
.hero-btn,
.empty-action,
.coupon-entry-btn {
  transition: transform 150ms ease, opacity 150ms ease, background 150ms ease;
}
button:active,
a:active,
.entry-button:active {
  opacity: 0.85;
}
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* ---- 字号阶梯补齐（§4.1，调整散落值） ---- */
h2 { font-size: 15px; }
.section-title h2 { font-size: 14px; font-weight: 600; }

/* 机构切换折叠列表（§3.1 实现注意） */
.org-switch-list {
  display: none;
}
.org-switch-list.open { display: block; }
/* ── 060 项目自选：可选加项面板（对齐 we-chat addon-item 选中态） ── */
.addon-panel {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px;
  margin: 8px 0;
  background: #fbfdff;
}

.addon-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.addon-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #ffffff;
}

.addon-item.is-selected {
  border-color: #0d9668;
  background: #f0fbf5;
}

.addon-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.addon-main strong {
  font-size: 14px;
}

.addon-main small,
.addon-price {
  color: #5a6470;
  font-size: 12px;
}

.addon-toggle {
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #0d9668;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}

.addon-item.is-selected .addon-toggle {
  border-color: #0d9668;
  background: #0d9668;
  color: #ffffff;
}

.addon-empty {
  color: #5a6470;
  font-size: 13px;
}

/* ── 062 个人预约差量：性别/婚否选择、拍照预览、体检码（二维码 + 条码） ── */
.choice-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 6px 0;
}

.choice-label {
  flex: none;
  width: 3.5em;
  color: #5a6470;
  font-size: 14px;
}

.choice {
  padding: 8px 14px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #ffffff;
  color: #1f2933;
  font-size: 14px;
}

.choice.is-active {
  border-color: #0d9668;
  background: #f0fbf5;
  color: #0d6b47;
  font-weight: 600;
}

.photo-preview {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border: 1px solid #d6dee4;
  border-radius: 8px;
  margin: 6px 0;
}

.appointment-code {
  margin-top: 12px;
}

.code-image {
  width: 180px;
  max-width: 100%;
  display: block;
  margin: 8px 0;
  border: 1px solid #d6dee4;
  border-radius: 6px;
  background: #ffffff;
}

.code-image[hidden] {
  display: none;
}

.code-barcode {
  width: 260px;
}

.appointment-code-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 8px;
}

/* 迁移 065（未购模块展示控制）：锁态入口——机构开启展示但该服务未开通，点击只提示 */
.entry-locked { position: relative; opacity: .72; }
.entry-locked .icon-block { filter: grayscale(1); }
.entry-locked .entry-lock-badge {
  display: inline-block; margin-left: 6px; padding: 1px 6px; border-radius: 8px;
  background: rgba(0, 0, 0, .08); color: #666; font-size: 11px; font-weight: 500; vertical-align: middle;
}

/* ── 057 内容管理：滚动公告条 / 健康宣教区块 / 详情页 ───────────────────── */
/* 公告多条拼接滚动（对齐 we-chat：固定 12s 线性无限）；单条或回退须知时不滚动（data-rolling=false）。 */
.notice-bar[data-rolling="true"] .notice-track { display: inline-block; white-space: nowrap; padding-left: 100%; animation: notice-scroll 12s linear infinite; }
@keyframes notice-scroll { 0% { transform: translateX(0); } 100% { transform: translateX(-100%); } }
.notice-bar[data-rolling="false"] .notice-track { display: inline; }
.notice-bar[data-empty="true"] { display: none; }

.health-education-card { display: flex; gap: 10px; align-items: center; width: 100%; padding: 10px 12px; margin-bottom: 8px; border: 1px solid rgba(0,0,0,.06); border-radius: 12px; background: #fff; text-align: left; }
.health-education-card img { width: 56px; height: 56px; object-fit: cover; border-radius: 8px; }
.health-education-card strong { display: block; font-size: 15px; margin-bottom: 4px; }
.health-education-card span { color: #666; font-size: 13px; }

.health-education-detail { padding: 16px; }
.health-education-detail h1 { font-size: 20px; line-height: 1.4; margin: 8px 0; }
.health-education-detail img { width: 100%; border-radius: 12px; margin: 8px 0; }

/* ── 报告详情页（§11.3：报告详情 / 总检结论 / 异常对比）── */
.report-detail { padding: 12px 16px 32px; }
.report-tabs { margin: 4px 0 12px; }
.report-tab-pane h3 { font-size: 15px; margin: 16px 0 8px; }
.report-detail .kv { display: flex; justify-content: space-between; gap: 12px; margin: 0 0 6px; font-size: 14px; }
.report-detail .kv span { color: #666; }
.report-detail .kv strong { font-weight: 600; text-align: right; }
.comparison-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.comparison-table { border-collapse: collapse; min-width: 100%; font-size: 13px; background: #fff; }
.comparison-table th, .comparison-table td { padding: 8px 10px; border: 1px solid rgba(0,0,0,.08); white-space: nowrap; text-align: left; }
.comparison-table thead th { background: #f5f7f6; font-weight: 600; }
.comparison-table td.abnormal { color: #c0392b; font-weight: 700; }
.comparison-table td.muted { color: #9aa0a6; }

/* ── 宣教正文富文本（迁移 068，服务端白名单 HTML：h2/h3/p/ul/ol/blockquote/img/a）── */
.health-education-body { font-size: 15px; line-height: 1.75; color: #333; word-break: break-word; }
.health-education-body h2 { font-size: 18px; margin: 18px 0 8px; }
.health-education-body h3 { font-size: 16px; margin: 16px 0 6px; }
.health-education-body p { margin: 0 0 12px; }
.health-education-body ul, .health-education-body ol { margin: 0 0 12px; padding-left: 22px; }
.health-education-body li { margin-bottom: 4px; }
.health-education-body blockquote { margin: 0 0 12px; padding: 8px 12px; border-left: 3px solid #cfe3db; background: #f7faf9; color: #556; }
.health-education-body blockquote p { margin: 0; }
.health-education-body img { max-width: 100%; height: auto; border-radius: 10px; margin: 6px 0; }
.health-education-body a { color: #0b7a5b; }

/* 机构端正文排版工具条与预览 */
.markup-toolbar { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
.markup-toolbar button { padding: 6px 10px; font-size: 13px; }
.markup-preview { margin: 8px 0; padding: 10px 12px; border: 1px dashed #cfe3db; border-radius: 10px; background: #fbfdfc; }
.markup-preview img { max-width: 100%; height: auto; border-radius: 8px; }

/* ── 071 健康日记 / 档案 ── */
.health-hero {
  position: relative;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  overflow: hidden;
  margin-bottom: 14px;
  padding: 20px;
  color: #fff;
  background: linear-gradient(135deg, #087a54 0%, #0d9668 58%, #38ad7e 100%);
  border-radius: 18px;
  box-shadow: 0 14px 30px -22px rgba(8, 98, 68, .85);
}
.health-hero::after {
  position: absolute;
  right: -34px;
  bottom: -52px;
  width: 142px;
  height: 142px;
  background: rgba(255, 255, 255, .08);
  border-radius: 50%;
  content: '';
}
.health-hero-icon {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  color: #087a54;
  background: rgba(255, 255, 255, .94);
  border-radius: 16px;
}
.health-hero-icon svg { width: 30px; height: 30px; }
.health-hero span { color: rgba(255,255,255,.72); font-size: 12px; }
.health-hero h1 { margin: 3px 0 6px; font-size: 19px; line-height: 1.35; }
.health-hero p { margin: 0; color: rgba(255,255,255,.8); font-size: 12px; line-height: 1.55; }

.health-quick-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.health-tool-card {
  position: relative;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 92px;
  padding: 14px;
  color: var(--text);
  text-align: left;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 8px 24px -22px rgba(23, 63, 49, .7);
}
.health-tool-card:hover { color: var(--text); background: #fbfdfc; }
.health-tool-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: #9a5b08;
  background: #fff4d9;
  border-radius: 13px;
  font-size: 14px;
  font-weight: 800;
}
.health-tool-diary .health-tool-icon { color: #087a54; background: var(--primary-light); }
.health-tool-copy { min-width: 0; padding-right: 8px; }
.health-tool-copy strong,
.health-tool-copy small { display: block; }
.health-tool-copy strong { margin-bottom: 4px; font-size: 14px; }
.health-tool-copy small { color: var(--muted); font-size: 11px; font-weight: 400; line-height: 1.45; }
.health-tool-arrow { position: absolute; top: 10px; right: 11px; color: var(--subtle); font-size: 21px; font-weight: 400; }

#healthServiceList .entry-button {
  min-height: 84px;
  padding: 15px;
  border-radius: 14px;
  box-shadow: none;
}
#healthServiceList .entry-button strong { margin-bottom: 7px; font-size: 14px; }

.health-overview-card {
  padding: 18px;
  background: linear-gradient(180deg, #fff, #fbfdfc);
  border: 1px solid #dbeae4;
  border-radius: 16px;
  box-shadow: 0 10px 28px -24px rgba(8, 98, 68, .75);
}
.health-section-kicker { display: block; margin-bottom: 3px; color: var(--primary) !important; font-size: 11px !important; font-weight: 700; letter-spacing: .08em; }
.health-overview-card .section-title h2,
.diary-record-card .section-title h2,
.diary-trend-card .section-title h2 { margin: 0; font-size: 17px; }
.health-overview-card .text-button { flex: 0 0 auto; font-size: 12px; }
.diary-toolbar { display: flex; gap: 8px; align-items: end; margin-bottom: 10px; }
.diary-toolbar label { flex: 1; margin: 0; }
.diary-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.diary-form label { display: grid; gap: 6px; margin-bottom: 8px; }
.diary-form label small { color: var(--subtle); font-size: 10px; font-weight: 400; }
.diary-form textarea {
  display: block;
  width: 100%;
  min-height: 92px;
  padding: 10px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  font: inherit;
  resize: vertical;
}
.diary-actions { display: flex; gap: 8px; margin-top: 8px; }
.diary-calendar { margin: 10px 0 14px; }
.cal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-dow { text-align: center; font-size: 12px; color: var(--muted); }
.cal-cell {
  width: 100%;
  min-height: 32px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel);
  font-size: 13px;
  color: var(--ink);
  cursor: pointer;
}
.cal-cell.empty { border: none; background: transparent; cursor: default; }
.cal-cell.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  font-weight: 600;
}
.diary-averages .avg-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.diary-averages .avg-grid > span {
  min-width: 0;
  padding: 11px 9px;
  background: var(--surface-2);
  border-radius: 10px;
}
.diary-averages .avg-grid small,
.diary-averages .avg-grid strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.diary-averages .avg-grid small { margin-bottom: 5px; color: var(--muted); font-size: 10px; }
.diary-averages .avg-grid strong { color: var(--text); font-size: 13px; }
.health-overview-note { margin: 12px 0 0; color: var(--muted); font-size: 11px; line-height: 1.55; }

.diary-page-intro {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 13px;
  align-items: center;
  padding: 18px;
  color: #fff;
  background: linear-gradient(135deg, #0d9668, #087a54);
  border-radius: 16px;
}
.diary-page-icon { display: grid; width: 48px; height: 48px; place-items: center; color: var(--primary); background: #fff; border-radius: 14px; font-weight: 800; }
.diary-page-intro h1 { margin: 0 0 5px; font-size: 19px; }
.diary-page-intro p { margin: 0; color: rgba(255,255,255,.76); font-size: 12px; line-height: 1.5; }
.diary-record-card { margin-top: 12px; }
.diary-record-card .diary-toolbar { width: min(230px, 100%); }
.diary-notes { margin-top: 14px; padding-top: 14px; border-top: 1px solid #edf0f2; }
.diary-actions button:first-child { flex: 1; }
.diary-trend-card { margin-top: 12px; }
.diary-trend-card .segmented { grid-template-columns: repeat(2, minmax(64px, 1fr)); }
.diary-trend-card .segmented button { padding: 0 10px; font-size: 12px; }
.diary-trend > .hint { padding: 12px; background: var(--surface-2); border-radius: 10px; line-height: 1.55; }
.diary-trend > .hint:only-child { margin: 0; text-align: center; }
.trend-list { display: grid; gap: 8px; }
.trend-item { padding: 12px; border: 1px solid var(--line); border-radius: 11px; background: #fff; }
.trend-item time { display: block; margin-bottom: 9px; color: var(--primary-dark); font-size: 12px; font-weight: 700; }
.trend-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.trend-metrics span { min-width: 0; }
.trend-metrics small,
.trend-metrics strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trend-metrics small { margin-bottom: 3px; color: var(--muted); font-size: 10px; }
.trend-metrics strong { color: var(--text); font-size: 12px; }
.questionnaire-card #myQuestionnaire { padding: 12px; color: var(--muted); background: var(--surface-2); border-radius: 10px; }
.questionnaire-card #myQuestionnaire p { margin: 0; line-height: 1.6; }
.questionnaire-card #openQuestionnaire { width: 100%; margin-top: 14px; }
.questionnaire-list-row { display:grid; gap:8px; padding:14px 0; border-bottom:1px solid var(--line); }
.questionnaire-list-row:last-child { border-bottom:0; }
.questionnaire-list-row small { color:var(--muted); }
.questionnaire-list-row button { justify-self:start; width:auto; min-width:112px; }
}
.trend-row {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr 1fr 0.8fr;
  gap: 4px;
  padding: 6px 0;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}
.trend-date { color: var(--muted); }
.questionnaire-answers {
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 12px;
  color: var(--ink-2);
  margin: 6px 0 0;
  max-height: 160px;
  overflow: auto;
}

@media (max-width: 420px) {
  .health-hero { grid-template-columns: 46px minmax(0, 1fr); padding: 17px 15px; }
  .health-hero-icon { width: 46px; height: 46px; border-radius: 14px; }
  .health-hero h1 { font-size: 17px; }
  .health-tool-card { grid-template-columns: 36px minmax(0, 1fr); gap: 8px; min-height: 96px; padding: 12px 10px; }
  .health-tool-icon { width: 36px; height: 36px; border-radius: 11px; }
  .health-tool-copy { padding-right: 0; }
  .health-tool-copy strong { font-size: 13px; }
  .health-tool-copy small { font-size: 10px; }
  .diary-averages .avg-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .trend-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .diary-actions { flex-direction: column; }
  .diary-actions button { width: 100%; }
}

/* ── 2026-09-20 用户端预约与个人中心重构 ─────────────────────────────── */
.subpage[hidden],
.order-list-panel[hidden],
.group-action-card[hidden] {
  display: none !important;
}

.subpage-back {
  display: grid;
  position: absolute;
  left: 10px;
  width: 38px;
  height: 38px;
  padding: 9px;
  place-items: center;
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  border: 0;
  border-radius: 50%;
}

.subpage-back svg { width: 20px; height: 20px; }
.subpage-back[hidden] { display: none; }
body:not(.subpage-active) .topbar { display: none; }
body.subpage-active .topbar { display: flex; }
/* 独立详情页（健康宣教/报告详情）：顶栏含返回按钮，任何状态都显示。
   这两个页面是无 subpage-active 的独立 HTML，此前返回按钮一直被上面的规则隐藏
   （2026-10-11 用户实测"点进科普文章回不去"）。 */
body.health-education-page .topbar,
body.report-detail-page .topbar { display: flex; }
.subpage-active .topbar-left,
.subpage-active .topbar-right { display: none; }
.subpage-active .topbar { justify-content: center; }
.subpage-active .topbar .topbar-title { flex: 0 1 auto; max-width: calc(100% - 96px); }
.subpage-active main { margin-bottom: calc(90px + env(safe-area-inset-bottom, 0px)); }

.package-catalog-head {
  padding: 18px 4px 14px;
}

.package-catalog-head .eyebrow {
  color: var(--primary);
  font-weight: 700;
  letter-spacing: .08em;
}

.package-catalog-head h1 {
  margin: 2px 0 8px;
  font-size: 24px;
  line-height: 1.3;
}

.package-catalog-head > p {
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 14px;
}

.package-filters,
.order-category-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.package-filters button {
  flex: 0 0 auto;
  min-height: 38px;
  padding: 0 16px;
  color: var(--muted);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-full);
}

.package-filters button.active {
  color: #fff;
  background: var(--primary);
  border-color: var(--primary);
}

.package-cards.package-catalog {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.package-catalog .package-card {
  display: block;
  width: 100%;
  padding: 18px;
  color: var(--text);
  text-align: left;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 8px 24px -20px rgba(23, 63, 49, .45);
}

.package-card-top,
.package-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.package-type,
.package-addon-mark {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  color: var(--primary-dark) !important;
  background: var(--primary-light);
  border-radius: var(--radius-full);
  font-size: 11px !important;
  font-weight: 700;
}

.group-buy-card .package-type {
  color: #9a5b08 !important;
  background: #fff5db;
}

.package-addon-mark {
  color: var(--state-info) !important;
  background: #eaf6fd;
}

.package-catalog .package-card h2 {
  margin: 14px 0 8px;
  font-size: 18px;
}

.package-catalog .package-card > p {
  display: -webkit-box;
  overflow: hidden;
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.package-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 25px;
  margin-bottom: 16px;
}

.package-card-tags span {
  padding: 4px 8px;
  color: var(--muted) !important;
  background: var(--surface-2);
  border-radius: 6px;
  font-size: 11px !important;
}

.package-card-footer {
  padding-top: 14px;
  border-top: 1px solid #edf0f2;
}

.package-price small { display: block; color: var(--muted); font-size: 11px; }
.package-price strong { color: #e04f3d; font-size: 24px; line-height: 1.2; }
.package-price del { margin-left: 6px; color: var(--subtle); font-size: 12px; }
.package-card-footer > button { min-height: 40px; padding: 0 18px; }

.subpage {
  min-height: calc(100vh - 96px);
  animation: page-in .18s ease-out;
}

@keyframes page-in {
  from { opacity: 0; transform: translateX(8px); }
  to { opacity: 1; transform: translateX(0); }
}

.package-detail-hero {
  display: grid;
  gap: 20px;
  padding: 22px 20px;
  color: #fff;
  background: linear-gradient(135deg, #0d9668, #08734f);
  border-radius: 18px;
}

.package-detail-badge {
  display: inline-flex;
  margin-bottom: 10px;
  padding: 4px 9px;
  color: #fff;
  background: rgba(255,255,255,.17);
  border-radius: var(--radius-full);
  font-size: 11px;
}

.package-detail-hero h1 { margin-bottom: 8px; font-size: 23px; }
.package-detail-hero p { margin: 0; color: rgba(255,255,255,.78); line-height: 1.6; }
.package-detail-price { display: flex; align-items: baseline; gap: 8px; }
.package-detail-price small { color: rgba(255,255,255,.72); }
.package-detail-price strong { font-size: 30px; }
.package-detail-price del { color: rgba(255,255,255,.55); }

.detail-section,
.form-card,
.order-list-panel,
.mine-menu-section,
.mine-profile-card,
.selected-package-strip {
  margin-top: 12px;
  padding: 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.detail-section h2,
.mine-menu-section h2 { margin: 0 0 14px; font-size: 16px; }
.detail-section > p { margin: 0; color: var(--muted); line-height: 1.65; }
.feature-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.feature-tags span { padding: 7px 10px; color: var(--primary-dark); background: var(--primary-light); border-radius: 8px; font-size: 12px; }
.package-content-list { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.package-content-list li { display: flex; gap: 10px; padding: 12px 0; border-bottom: 1px solid #edf0f2; }
.package-content-list li:last-child { border-bottom: 0; }
.package-content-list li > span { display: grid; flex: 0 0 22px; height: 22px; place-items: center; color: var(--primary); background: var(--primary-light); border-radius: 50%; font-size: 12px; }
.package-content-list p { margin: 0; line-height: 1.55; }
.detail-notice { background: #fbfcfc; }

.sticky-actions {
  position: sticky;
  z-index: 12;
  bottom: 0;
  display: flex;
  gap: 10px;
  margin: 18px -12px -48px;
  padding: 12px max(12px, env(safe-area-inset-left)) calc(12px + env(safe-area-inset-bottom, 0px)) max(12px, env(safe-area-inset-right));
  background: rgba(255,255,255,.96);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(10px);
}

.sticky-actions button { flex: 1; min-height: 48px; }
.appointment-form-page { padding-bottom: 34px; }
.selected-package-strip { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 0; }
.selected-package-strip small,
.selected-package-strip strong,
.selected-package-strip span { display: block; }
.selected-package-strip small { margin-bottom: 3px; color: var(--muted); }
.selected-package-strip strong { font-size: 16px; }
.selected-package-strip span { margin-top: 4px; color: #e04f3d; font-weight: 700; }
.text-button { min-height: 36px; padding: 0; color: var(--primary); background: transparent; }
.text-button:hover { color: var(--primary-dark); background: transparent; }

.form-section-title { display: flex; align-items: center; gap: 11px; margin-bottom: 18px; }
.form-section-title > span { display: grid; flex: 0 0 34px; height: 34px; place-items: center; color: var(--primary); background: var(--primary-light); border-radius: 10px; font-weight: 800; }
.form-section-title h2 { margin: 0 0 3px; font-size: 16px; }
.form-section-title p { margin: 0; color: var(--muted); font-size: 12px; }
.form-card { box-shadow: none; }
.form-card input,
.form-card select,
.form-card textarea { min-height: 46px; border-radius: 10px; }
.form-card textarea { min-height: 112px; }
.choice-row { padding: 10px 0; border-bottom: 0; }
.choice { min-height: 42px; color: var(--muted); background: var(--surface-2); border: 1px solid transparent; }
.choice.active { color: var(--primary-dark); background: var(--primary-light); border-color: #9ed7c1; }

.group-action-card { margin-top: 12px; }
#groupBuySection.subpage { display: block; }
.group-action-card .eyebrow { color: var(--primary); font-weight: 700; }
.group-action-card h2 { margin-bottom: 8px; font-size: 20px; }

.mine-profile-card { display: flex; align-items: center; gap: 14px; margin-top: 0; color: #fff; background: linear-gradient(135deg, #0d9668, #0a7d56); border: 0; }
.mine-avatar { display: grid; flex: 0 0 52px; height: 52px; place-items: center; color: var(--primary); background: #fff; border-radius: 16px; font-size: 20px; font-weight: 800; }
.mine-profile-card span { color: rgba(255,255,255,.7); font-size: 12px; }
.mine-profile-card h1 { margin: 2px 0 4px; font-size: 20px; }
.mine-profile-card p { margin: 0; color: rgba(255,255,255,.75); font-size: 12px; }
.mine-menu-section { padding: 8px 16px; }
.mine-menu-section h2 { padding: 9px 0 2px; color: var(--muted); font-size: 12px; font-weight: 600; }
.mine-menu-row { display: grid; grid-template-columns: 40px minmax(0,1fr) auto; gap: 12px; align-items: center; width: 100%; min-height: 66px; padding: 10px 0; color: var(--text); text-align: left; background: transparent; border: 0; border-bottom: 1px solid #edf0f2; border-radius: 0; }
.mine-menu-row:last-child { border-bottom: 0; }
.mine-menu-row:hover { color: var(--text); background: transparent; }
.mine-menu-row > span:nth-child(2) { display: block; }
.mine-menu-row strong,
.mine-menu-row small { display: block; }
.mine-menu-row strong { margin-bottom: 4px; font-size: 14px; }
.mine-menu-row small { color: var(--muted); font-size: 12px; font-weight: 400; }
.mine-menu-row i { color: var(--subtle); font-size: 24px; font-style: normal; }
.mine-menu-icon { position: relative; display: grid !important; width: 38px; height: 38px; place-items: center; border-radius: 11px; font-size: 13px; font-weight: 800; }
.mine-menu-badge {
  position: absolute;
  top: -5px;
  right: -7px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  color: #fff;
  background: var(--state-error);
  border: 2px solid #fff;
  border-radius: var(--radius-full);
  font-size: 9px;
  line-height: 13px;
  text-align: center;
}
.mine-menu-badge[hidden] { display: none !important; }
.bottom-nav .nav-item #mineNavBadge {
  width: 8px;
  height: 8px;
  min-width: 8px;
  padding: 0;
  margin-right: -17px;
  border: 1px solid #fff;
}

/* 2026-09-21：五个一级页统一为内容型信息头。去掉单页独有的绿色渐变大卡，
   保留机构品牌色用于按钮、状态与小面积强调，减少模板化“AI UI”观感。 */
.page-intro,
.package-catalog-head,
.health-hero,
.mine-profile-card {
  margin: 0 0 12px;
  padding: 18px 4px 14px;
  color: var(--text);
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.page-intro .eyebrow,
.package-catalog-head .eyebrow,
.health-hero > div:last-child > span,
.mine-profile-card > div:last-child > span {
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
}

.page-intro h1,
.package-catalog-head h1,
.health-hero h1,
.mine-profile-card h1 {
  margin: 2px 0 8px;
  color: var(--text);
  font-size: 24px;
  line-height: 1.3;
}

.page-intro p,
.health-hero p,
.mine-profile-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.health-hero { display: block; }
.health-hero::after,
.health-hero-icon { display: none; }
.mine-avatar { display: none; }

.hero-card {
  color: var(--text);
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 8px 24px -20px rgba(23, 63, 49, .45);
}
.hero-card .hero-title { color: var(--text); }
.hero-card .hero-sub,
.hero-card .hero-meta { color: var(--muted); }
.hero-card .hero-capsule { color: var(--primary-dark); background: var(--primary-light); }
.hero-card .hero-btn { color: #fff; background: var(--primary); }

.profile-derived {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 4px 0 14px;
}
.profile-derived span {
  padding: 12px;
  color: var(--muted);
  background: var(--surface-2);
  border-radius: 10px;
}
.profile-derived strong { float: right; color: var(--text); }
.inline-field { display: flex; gap: 8px; }
.inline-field input { flex: 1; min-width: 0; }
.inline-field button { flex: 0 0 auto; white-space: nowrap; }
.bottom-nav .nav-item #mineNavBadge[hidden] { display: none; }
.icon-green { color: #087a54; background: #e6f5ee; }
.icon-blue { color: #1675a9; background: #e7f4fb; }
.icon-amber { color: #a6650a; background: #fff4d9; }
.icon-purple { color: #7552a2; background: #f0eafb; }
.icon-red { color: #c64a3b; background: #fdecea; }

.order-category-tabs { position: sticky; top: 65px; z-index: 8; padding: 6px; background: #e9eeec; border-radius: 12px; }
.order-category-tabs button { flex: 1; min-height: 40px; color: var(--muted); background: transparent; }
.order-category-tabs button.active { color: var(--primary-dark); background: #fff; box-shadow: 0 3px 10px rgba(20,63,49,.08); }
.order-list-panel { margin-top: 12px; }
.success-check { display: grid; width: 58px; height: 58px; margin: 0 auto 14px; place-items: center; color: #fff; background: var(--state-success); border-radius: 50%; font-size: 30px; }
.questionnaire-card { margin-top: 0; }

@media (max-width: 520px) {
  main { width: calc(100% - 24px); margin-top: 10px; }
  .topbar { min-height: 58px; padding-top: calc(10px + env(safe-area-inset-top, 0px)); padding-bottom: 10px; }
  .package-detail-hero { padding: 20px 17px; }
  .detail-section,
  .form-card,
  .order-list-panel,
  .mine-menu-section,
  .mine-profile-card,
  .selected-package-strip { padding: 16px; }
  .sticky-actions { margin-bottom: -48px; }
}

@media (prefers-reduced-motion: reduce) {
  .subpage { animation: none; }
  * { scroll-behavior: auto !important; }
}

/* 2026-10-11 在线咨询：浮动按钮 + 弹窗（不占首页版面；仅开通在线沟通的机构显示按钮） */
.chat-fab {
  position: fixed;
  right: 14px;
  bottom: 84px;
  z-index: 80;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  border: none;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-size: 14px;
  box-shadow: 0 6px 16px rgba(13, 118, 110, 0.35);
}
.chat-fab[hidden] { display: none; }

.chat-popup {
  position: fixed;
  inset: 0;
  z-index: 96;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(15, 23, 42, 0.5);
}
.chat-popup[hidden] { display: none; }
.chat-popup-card {
  width: min(480px, 100%);
  max-height: 84vh;
  overflow: auto;
  background: var(--panel);
  border-radius: 14px 14px 0 0;
  padding: 12px 12px 16px;
}
.chat-popup-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.chat-popup-head strong { font-size: 16px; }
.chat-popup-close {
  border: none;
  background: none;
  font-size: 22px;
  line-height: 1;
  color: var(--ink-3);
  padding: 2px 6px;
}
.chat-popup .section { margin: 0; border: none; padding: 0; box-shadow: none; }
