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

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

.query-options {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}

.report-ai-panel {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 10px 0 12px;
  flex-wrap: wrap;
}

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

.ai-status {
  color: var(--muted);
  font-size: 13px;
}

.ai-status.unavailable {
  color: #b45309;
}

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

.query-option {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: var(--text);
}

.query-option input {
  width: auto;
  min-height: auto;
}

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