/* ============================================================
   医院微信预约挂号系统 - 前台样式(移动端优先, 自适应)
   ============================================================ */
:root {
  --primary: #0a9f7b;
  --primary-dark: #067a61;
  --primary-light: #e8f8f3;
  --blue: #2b7de9;
  --blue-light: #eaf2fd;
  --bg: #f4f8f7;
  --card: #ffffff;
  --text: #243431;
  --muted: #6f808c;
  --line: #e8efed;
  --danger: #e5533d;
  --warning: #f5a623;
  --radius: 18px;
  --shadow: 0 6px 24px rgba(20, 48, 41, 0.055);
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html { font-size: 16px; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 15px;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul, ol { list-style: none; }

.app {
  max-width: 750px;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--bg);
  padding-bottom: 72px;
}

.page-home .app {
  background: linear-gradient(180deg, #effaf6 0, #f4f8f7 340px, var(--bg) 100%);
}

/* ---------- 顶部 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background:
    radial-gradient(120% 180% at 100% 0%, rgba(255, 255, 255, .18) 0%, rgba(255, 255, 255, 0) 58%),
    linear-gradient(135deg, #078a6c 0%, #0aa37f 58%, #13b58f 100%);
  color: #fff;
  padding: 11px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 6px 18px rgba(4, 82, 65, .13);
}
.site-header .logo {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: rgba(255,255,255,.18);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.site-header .logo svg { color: #fff; }
.site-header .logo img { width: 100%; height: 100%; object-fit: contain; padding: 3px; }
.site-header .titles { flex: 1; min-width: 0; }
.site-header .titles h1 { font-size: 17px; font-weight: 600; line-height: 1.3; letter-spacing: .2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.site-header .titles p { font-size: 11px; opacity: .82; letter-spacing: .2px; }
.site-header .hbtn {
  width: 36px; height: 36px; border: 0; border-radius: 10px;
  background: rgba(255,255,255,.16); color: #fff;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.top-nav { display: none; }
.top-nav a { font-size: 14px; padding: 6px 4px; opacity: .92; }
.top-nav a.active { font-weight: 600; opacity: 1; border-bottom: 2px solid #fff; }

.hbtn .menu-icon-open,
.hbtn .menu-icon-close { align-items: center; justify-content: center; }
.hbtn .menu-icon-open { display: flex; }
.hbtn .menu-icon-close { display: none; }
body.menu-open .hbtn { background: rgba(255, 255, 255, .26); }
body.menu-open .hbtn .menu-icon-open { display: none; }
body.menu-open .hbtn .menu-icon-close { display: flex; }

@media (max-width: 767px) {
  body.menu-open { overflow: hidden; }
  body.menu-open .tabbar { z-index: 80; }
  body.menu-open::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 90;
    background: rgba(8, 32, 26, .26);
    backdrop-filter: blur(2px);
    animation: menuFade .18s ease-out;
  }
  .top-nav {
    position: absolute;
    top: calc(100% + 8px);
    left: 12px;
    right: 12px;
    z-index: 120;
    display: none;
    flex-direction: column;
    gap: 2px;
    padding: 8px;
    color: var(--text);
    background: #fff;
    border: 1px solid #e8f1ee;
    border-radius: 16px;
    box-shadow: 0 18px 40px rgba(9, 45, 37, .18);
    transform-origin: top center;
  }
  .top-nav.open { display: flex; animation: menuIn .18s ease-out; }
  .top-nav a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    color: #2a3a36;
    font-size: 14.5px;
    opacity: 1;
    border-radius: 10px;
    border-bottom: 0;
  }
  .top-nav a::after {
    content: "";
    width: 7px;
    height: 7px;
    margin-left: auto;
    border-top: 1.5px solid #b6c4c0;
    border-right: 1.5px solid #b6c4c0;
    transform: rotate(45deg);
    flex-shrink: 0;
  }
  .top-nav a.active {
    color: var(--primary-dark);
    background: #eaf8f3;
    font-weight: 600;
    border-bottom: 0;
  }
  .top-nav a.active::after { border-color: var(--primary); }
  .top-nav a:active { background: #f1faf7; }
  @keyframes menuIn {
    from { opacity: 0; transform: translateY(-6px) scale(.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
  }
  @keyframes menuFade {
    from { opacity: 0; }
    to { opacity: 1; }
  }
}

/* ---------- 横幅 ---------- */
.banner {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  gap: 10px;
  padding: 12px 14px 4px;
  scrollbar-width: none;
}
.banner::-webkit-scrollbar { display: none; }
.banner-item {
  flex: 0 0 100%;
  scroll-snap-align: start;
  border-radius: 20px;
  min-height: 138px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 24px 26px;
  color: #fff;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12), 0 10px 26px rgba(8, 95, 76, .12);
}
.banner-item::after {
  content: "";
  position: absolute;
  right: -42px; top: -46px;
  width: 178px; height: 178px;
  border-radius: 50%;
  background: rgba(255,255,255,.12);
  box-shadow: 0 0 0 22px rgba(255, 255, 255, .045);
}
.banner-item:nth-child(odd) { background: linear-gradient(120deg, #0aa37f, #12b891); }
.banner-item:nth-child(even) { background: linear-gradient(120deg, #2b7de9, #4f9bf5); }
.banner-item h3 { font-size: 20px; font-weight: 600; letter-spacing: .3px; margin-bottom: 5px; }
.banner-item p { font-size: 12.5px; opacity: .88; letter-spacing: .2px; }
.banner-item .go {
  margin-top: 13px;
  align-self: flex-start;
  font-size: 12px;
  background: rgba(255,255,255,.2);
  border: 1px solid rgba(255,255,255,.16);
  padding: 4px 14px;
  border-radius: 99px;
  backdrop-filter: blur(4px);
}

/* ---------- 快捷入口 ---------- */
.quick-nav {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px 8px;
  background: var(--card);
  margin: 12px 14px 0;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px 10px 13px;
}
.quick-nav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--text);
  padding: 8px 4px;
  border-radius: 14px;
  font-weight: 500;
  transition: background .18s, transform .15s;
}
.quick-nav .qicon {
  width: 46px; height: 46px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .7);
}
.quick-nav a:nth-child(1) .qicon { background: #e6f7f2; color: #0aa37f; }
.quick-nav a:nth-child(2) .qicon { background: #eaf2fd; color: #2b7de9; }
.quick-nav a:nth-child(3) .qicon { background: #fdf3e3; color: #f5a623; }
.quick-nav a:nth-child(4) .qicon { background: #f3ebfa; color: #8e5cf0; }
.quick-nav a:nth-child(5) .qicon { background: #fdeaea; color: #e5533d; }
.quick-nav a:nth-child(6) .qicon { background: #e8f3ff; color: #1f5fbf; }
.quick-nav a:active { transform: scale(.97); background: #f2f9f7; }

/* ---------- 区块 ---------- */
.section {
  background: var(--card);
  margin: 12px 14px 0;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
}
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.section-head h2 {
  font-size: 17px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: .2px;
}
.section-head h2::before {
  content: "";
  width: 3px; height: 16px;
  border-radius: 99px;
  background: linear-gradient(180deg, #22c8a1, var(--primary));
}
.section-head .more { font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 2px; transition: color .18s; }
.section-head .more:active { color: var(--primary); }

/* ---------- 科室 ---------- */
.dept-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.dept-grid a {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #f7faf9;
  border: 1px solid #edf3f1;
  border-radius: 14px;
  padding: 12px;
  text-align: left;
  font-size: 13.5px;
  transition: background .18s, transform .15s, border-color .18s;
}
.dept-grid a:active { transform: scale(.96); }
.dept-grid .dicon {
  width: 38px; height: 38px;
  margin: 0;
  border-radius: 11px;
  background: #e8f8f2;
  color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.dept-grid .dname { flex: 1; min-width: 0; font-weight: 500; display: flex; flex-direction: column; }
.dept-grid .dname small { font-size: 11px; color: var(--muted); margin-top: 1px; font-weight: 400; line-height: 1.4; }
.dept-grid .darrow { color: #b8c6c3; display: flex; flex-shrink: 0; }

/* ---------- 医生卡片 ---------- */
.doctor-list { display: flex; flex-direction: column; gap: 12px; }
.doctor-card {
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid #edf3f1;
  border-radius: 18px;
  box-shadow: 0 7px 24px rgba(20, 48, 41, .055);
  padding: 15px 15px 12px;
  transition: box-shadow .2s, transform .2s;
}
.doctor-card .doctor-main {
  display: flex;
  gap: 13px;
  min-width: 0;
  align-items: flex-start;
}
.doctor-card .avatar {
  width: 62px; height: 62px;
  border-radius: 50%;
  flex-shrink: 0;
  background: linear-gradient(135deg, #e8f8f3, #d6f1e8);
  color: var(--primary-dark);
  display: flex; align-items: center; justify-content: center;
  font-size: 23px; font-weight: 600;
  overflow: hidden;
  box-shadow: 0 0 0 3px #f2faf7, 0 5px 14px rgba(13, 95, 78, .1);
}
.doctor-card .avatar img { width: 100%; height: 100%; object-fit: cover; }
.doctor-card .info { flex: 1; min-width: 0; display: block; }
.doctor-card .name-line { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; }
.doctor-card .info h3 { font-size: 16.5px; font-weight: 600; color: #1f302c; letter-spacing: .2px; line-height: 1.35; }
.doctor-card .info h3 .title,
.doctor-card .info .title {
  font-size: 11px;
  font-weight: 500;
  color: #087e66;
  background: #ebfaf5;
  border: 1px solid #d8f2e9;
  border-radius: 6px;
  padding: 1px 7px;
  line-height: 1.55;
  vertical-align: 1px;
}
.doctor-card .info .dept {
  font-size: 12px;
  color: #6e7f8b;
  margin: 5px 0 7px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.doctor-card .info .dept::before {
  content: "";
  width: 5px; height: 5px;
  border-radius: 50%;
  background: #16b98f;
  box-shadow: 0 0 0 3px rgba(22, 185, 143, .12);
  flex-shrink: 0;
}
.doctor-card .info .goodat {
  font-size: 12.5px;
  color: #687a86;
  line-height: 1.62;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.doctor-card .info .goodat b {
  font-weight: 500;
  color: #4b615c;
  margin-right: 5px;
}
.doctor-card .doctor-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid #eef4f2;
}
.doctor-card .fee {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  font-size: 11.5px;
  font-weight: 600;
  color: #d9533d;
  background: #fff1ee;
  border-radius: 999px;
  padding: 3px 9px;
  white-space: nowrap;
}
.doctor-card .fee.free { color: #078a6d; background: #ecfaf5; }
.doctor-card .btn-book {
  background: linear-gradient(135deg, #0aa37f, #0b8f75);
  box-shadow: 0 3px 9px rgba(10, 163, 127, .22);
}
.doctor-card .btn-book svg { width: 14px; height: 14px; }
.doctor-card .btn-book:hover { filter: brightness(1.04); }
.doctor-card .btn-book:active { transform: scale(.96); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border: 0;
  border-radius: 99px;
  padding: 8px 18px;
  font-size: 13.5px;
  font-family: inherit;
  cursor: pointer;
  background: var(--primary);
  color: #fff;
  transition: opacity .15s, transform .1s;
  white-space: nowrap;
}
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-block { display: flex; width: 100%; padding: 12px; font-size: 15px; border-radius: 12px; }
.btn-outline { background: #fff; color: var(--primary); border: 1px solid var(--primary); }
.btn-ghost { background: var(--primary-light); color: var(--primary-dark); }
.btn-gray { background: #eef1f5; color: var(--muted); }
.btn-sm { padding: 5px 13px; font-size: 12.5px; }

/* ---------- 医生详情 ---------- */
.doc-hero {
  background: linear-gradient(135deg, var(--primary) 0%, #0bb88d 100%);
  color: #fff;
  padding: 20px 16px 44px;
  display: flex;
  gap: 14px;
}
.doc-hero .avatar {
  width: 76px; height: 76px;
  border-radius: 50%;
  background: rgba(255,255,255,.2);
  display: flex; align-items: center; justify-content: center;
  font-size: 30px; font-weight: 600;
  overflow: hidden; flex-shrink: 0;
  border: 2px solid rgba(255,255,255,.5);
}
.doc-hero .avatar img { width: 100%; height: 100%; object-fit: cover; }
.doc-hero h2 { font-size: 21px; font-weight: 600; }
.doc-hero .meta { font-size: 13px; opacity: .92; margin-top: 4px; }
.doc-hero .tags { margin-top: 9px; display: flex; gap: 6px; flex-wrap: wrap; }
.doc-hero .tags span {
  font-size: 11.5px;
  background: rgba(255,255,255,.2);
  padding: 3px 10px;
  border-radius: 99px;
}
.doc-body { margin-top: -32px; }

/* ---------- 排班 ---------- */
.date-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 6px;
  scrollbar-width: none;
}
.date-strip::-webkit-scrollbar { display: none; }
.date-chip {
  flex-shrink: 0;
  min-width: 62px;
  text-align: center;
  padding: 9px 6px;
  border-radius: 12px;
  background: var(--bg);
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: all .15s;
}
.date-chip .d1 { font-size: 12px; color: var(--muted); }
.date-chip .d2 { font-size: 16px; font-weight: 600; margin-top: 1px; }
.date-chip.active { background: var(--primary-light); border-color: var(--primary); }
.date-chip.active .d1, .date-chip.active .d2 { color: var(--primary-dark); }
.date-chip.disabled { opacity: .45; }

.period-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 14px; }
.period-card {
  flex: 1 1 100%;
  min-width: 0;
  position: relative;
  border: 1px solid #e4ebf5;
  border-radius: 16px;
  padding: 16px;
  text-align: left;
  background: linear-gradient(180deg, #fff 0%, #fbfdff 100%);
  box-shadow: 0 6px 22px rgba(20, 50, 90, .06);
}
.period-card::before {
  content: "";
  position: absolute; left: 0; top: 16px; bottom: 16px; width: 4px;
  border-radius: 0 4px 4px 0;
  background: linear-gradient(180deg, #12b891, #0aa37f);
  opacity: .85;
}
.period-card h4 {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  font-size: 16px; font-weight: 700; color: #173a30;
}
.period-card h4::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%;
  background: #0aa37f; box-shadow: 0 0 0 4px rgba(10, 163, 127, .12);
}
.period-card .left {
  width: max-content; max-width: 100%; margin: 8px auto 12px;
  padding: 4px 10px; border-radius: 999px;
  background: #f2f7fb; color: #6b7b90;
  font-size: 12px; text-align: center;
}
.period-card .left em { font-style: normal; color: #0a8f70; font-weight: 700; }
.period-card .btn { display: block; margin: 0 auto; }
.period-card.closed { background: #f7f9fc; box-shadow: none; }
.slot-note { text-align: center; font-size: 11.5px; color: #96a2b3; margin-top: 8px; }
@media (min-width: 560px) {
  .period-card { flex: 1 1 calc(50% - 6px); }
}

/* ---------- 表单 ---------- */
.form-section { padding: 6px 16px 16px; }
.form-group { margin-bottom: 14px; }
.form-group label {
  display: block;
  font-size: 13.5px;
  font-weight: 500;
  margin-bottom: 6px;
  color: var(--text);
}
.form-group label .req { color: var(--danger); margin-left: 2px; }
.form-group input, .form-group select, .form-group textarea {
  width: 100%;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  padding: 11px 12px;
  font-size: 15px;
  font-family: inherit;
  background: #fff;
  color: var(--text);
  transition: border-color .15s;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
}
.form-group textarea { resize: vertical; min-height: 80px; }
.form-tip { font-size: 12px; color: var(--muted); margin-top: -8px; margin-bottom: 14px; }

.radio-row { display: flex; gap: 10px; }
.radio-row label {
  flex: 1;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  padding: 10px;
  text-align: center;
  font-size: 14px;
  cursor: pointer;
  margin: 0;
}
.radio-row input { display: none; }
.radio-row label.checked { border-color: var(--primary); color: var(--primary-dark); background: var(--primary-light); }

/* ---------- 摘要卡 ---------- */
.summary-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
  margin: 12px 14px 0;
}
.summary-card .row {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  padding: 7px 0;
  border-bottom: 1px dashed var(--line);
}
.summary-card .row:last-child { border-bottom: 0; }
.summary-card .row .k { color: var(--muted); }
.summary-card .row .v { font-weight: 500; text-align: right; }
.summary-card .row .v.fee { color: var(--danger); font-weight: 600; }
.summary-card .row .v.pay-hint-v { color: var(--primary-dark); font-weight: 500; font-size: 13px; }

/* ---------- 预约详情 / 电子凭证 ---------- */
.status-hero { display:flex; align-items:center; gap:14px; margin:12px 14px 0; padding:18px 16px; border-radius:var(--radius);
  background:var(--card); box-shadow:var(--shadow); }
.status-hero .st-icon { width:44px; height:44px; border-radius:50%; display:flex; align-items:center; justify-content:center;
  background:var(--primary-light); color:var(--primary); flex:0 0 44px; }
.status-hero h2 { font-size:17px; font-weight:600; }
.status-hero p { font-size:13px; color:var(--muted); margin-top:3px; }
.status-hero.on .st-icon { background:#e8f4ff; color:var(--blue); }
.voucher-body { display:flex; align-items:center; gap:18px; padding:6px 2px 2px; }
.voucher-body .vq { width:132px; height:132px; border-radius:10px; border:1px solid var(--line); }
.voucher-body .vcode { flex:1; text-align:center; }
.voucher-body .vcode .label { font-size:12px; color:var(--muted); }
.voucher-body .vcode .digits { font-size:30px; font-weight:600; letter-spacing:4px; color:var(--primary-dark); margin:6px 0; }
.voucher-body .vcode .hint { font-size:11.5px; color:var(--muted); line-height:1.5; }
.voucher-foot { margin-top:12px; padding-top:10px; border-top:1px dashed var(--line); font-size:12px; color:var(--muted); }
.voucher-foot span { font-family:Consolas,monospace; color:#4a5a6a; }
.detail-actions { display:flex; gap:10px; padding:16px 14px 30px; }
.detail-actions .btn { flex:1; }
.detail-sub { text-align:center; font-size:12.5px; color:var(--muted); padding:0 14px 30px; margin-top:-14px; }
.detail-sub a { color:var(--muted); text-decoration:underline; }

/* ---------- 改约横幅 ---------- */
.resched-banner { display:flex; flex-wrap:wrap; align-items:center; gap:6px 10px; margin:12px 14px 0;
  padding:10px 14px; border-radius:10px; background:#fff8e6; border:1px solid #ffe0a3; font-size:12.5px; color:#7a5b00; }
.resched-banner strong { font-weight:600; }
.resched-banner span { flex:1; min-width:150px; color:#8a6a10; }
.resched-banner a { color:#8a6a10; text-decoration:underline; }

/* ---------- 就诊须知 / 说明块 ---------- */
.notice-box { padding:4px 2px; }
.nb-item { padding:10px 0; border-bottom:1px dashed var(--line); }
.nb-item:last-child { border-bottom:0; }
.nb-item h3 { font-size:13.5px; font-weight:600; color:var(--text); margin-bottom:4px; }
.nb-item p { font-size:13px; color:#5a6b7b; line-height:1.75; }
.step-list { counter-reset:step; padding:2px 0; }
.step-list li { list-style:none; position:relative; padding:0 0 16px 34px; font-size:13.5px; color:#4a5a6a; line-height:1.7; }
.step-list li:before { counter-increment:step; content:counter(step); position:absolute; left:0; top:1px;
  width:22px; height:22px; border-radius:50%; background:var(--primary-light); color:var(--primary-dark);
  font-size:12px; font-weight:600; display:flex; align-items:center; justify-content:center; }
.step-list li b { display:block; color:var(--text); font-weight:600; margin-bottom:2px; }

/* ---------- 预约单 ---------- */
.appt-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 15px;
  margin-bottom: 12px;
}
.appt-card .top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.appt-card .order { font-size: 12px; color: var(--muted); }
.badge {
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 99px;
  font-weight: 500;
}
.appt-card .main { display: flex; gap: 12px; align-items: center; }
.appt-card .main .avatar {
  width: 52px; height: 52px; border-radius: 50%;
  background: var(--primary-light); color: var(--primary-dark);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; font-weight: 600; flex-shrink: 0;
  overflow: hidden;
}
.appt-card .main .avatar img { width: 100%; height: 100%; object-fit: cover; }
.appt-card .main h4 { font-size: 15.5px; font-weight: 600; }
.appt-card .main .sub { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.appt-card .ops { display: flex; gap: 8px; justify-content: flex-end; margin-top: 11px; }

/* ---------- 选项卡 ---------- */
.tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 12px 14px 0;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tabs button {
  flex-shrink: 0;
  border: 0;
  background: var(--card);
  border-radius: 99px;
  padding: 7px 15px;
  font-size: 13.5px;
  font-family: inherit;
  color: var(--muted);
  cursor: pointer;
}
.tabs button.active { background: var(--primary); color: #fff; font-weight: 500; }

/* ---------- 个人中心 ---------- */
.me-header {
  background: linear-gradient(135deg, var(--primary) 0%, #0bb88d 100%);
  color: #fff;
  padding: 24px 16px 40px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.me-header .avatar {
  width: 66px; height: 66px; border-radius: 50%;
  background: rgba(255,255,255,.2);
  border: 2px solid rgba(255,255,255,.5);
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; font-weight: 600;
  overflow: hidden; flex-shrink: 0;
}
.me-header .avatar img { width: 100%; height: 100%; object-fit: cover; }
.me-header h2 { font-size: 19px; font-weight: 600; }
.me-header p { font-size: 12.5px; opacity: .9; margin-top: 3px; }
.me-body { margin-top: -26px; }
.me-stats {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin: 0 14px;
  display: flex;
  padding: 14px 0;
}
.me-stats a { flex: 1; text-align: center; }
.me-stats .num { font-size: 19px; font-weight: 700; color: var(--primary-dark); }
.me-stats .lab { font-size: 12px; color: var(--muted); margin-top: 1px; }
.me-menu {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin: 12px 14px 0;
  overflow: hidden;
}
.me-menu a {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 14px 16px;
  font-size: 14.5px;
  border-bottom: 1px solid var(--line);
}
.me-menu a:last-child { border-bottom: 0; }
.me-menu a svg { color: var(--primary); flex-shrink: 0; }
.me-menu a .arr { margin-left: auto; color: #c3ccd8; }
.me-badge { display:inline-block; min-width:18px; height:18px; line-height:18px; padding:0 5px;
  margin-left: 8px; border-radius: 9px; background: var(--danger); color:#fff;
  font-size: 11px; font-weight: 600; text-align:center; }

/* ---------- 文章列表 ---------- */
.news-item {
  display: flex;
  gap: 13px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
  align-items: center;
}
.news-item:last-child { border-bottom: 0; }
.news-item .thumb {
  width: 96px; height: 68px;
  border-radius: 12px;
  flex-shrink: 0;
  background: linear-gradient(145deg, #eef9f5, #dcf2ea);
  color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.news-item .thumb svg { width: 26px; height: 26px; opacity: .62; }
.news-item .thumb img { width: 100%; height: 100%; object-fit: cover; }
.news-item .info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.news-item h3 {
  font-size: 14px; font-weight: 500; line-height: 1.5; color: #2b3a36;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.news-item .meta { margin-top: auto; font-size: 11.5px; color: var(--muted); display: flex; gap: 10px; }
.news-item .meta span:first-child { color: #0a8f70; background: #eef9f5; border-radius: 4px; padding: 1px 5px; }

.home-intro { font-size: 14px; color: #647570; line-height: 1.8; }
.home-intro-link {
  display: inline-flex;
  align-items: center;
  gap: 1px;
  margin-left: 3px;
  color: var(--primary-dark);
  font-weight: 500;
  white-space: nowrap;
}

.article-content { font-size: 15px; line-height: 1.85; }
.article-content p { margin-bottom: 12px; }
.article-content h2 { font-size: 19px; line-height: 1.5; font-weight: 600; margin: 20px 0 10px; color: #1f302c; }
.article-content h3 { font-size: 16.5px; line-height: 1.55; font-weight: 600; margin: 16px 0 8px; color: #263a35; }
.article-content ul, .article-content ol { margin: 8px 0 12px; padding-left: 1.5em; }
.article-content ul { list-style: disc; }
.article-content ol { list-style: decimal; }
.article-content li { margin: 4px 0; }
.article-content blockquote {
  margin: 14px 0;
  padding: 10px 14px;
  border-left: 3px solid #bfe3d8;
  border-radius: 0 8px 8px 0;
  background: #f5fbf8;
  color: #526762;
}
.article-content a { color: var(--primary-dark); text-decoration: underline; }
.article-content img { border-radius: 10px; margin: 10px 0; }
.article-content strong { color: var(--primary-dark); }

/* ---------- 底部标签栏(移动端) ---------- */
.tabbar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 100;
  background: #fff;
  border-top: 1px solid var(--line);
  display: flex;
  max-width: 750px;
  margin: 0 auto;
  padding-bottom: env(safe-area-inset-bottom);
}
.tabbar a {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 8px 0 7px;
  font-size: 10.5px;
  color: var(--muted);
}
.tabbar a.active { color: var(--primary); font-weight: 500; }

/* ---------- 页脚 ---------- */
.site-footer {
  text-align: center;
  padding: 22px 16px 26px;
  font-size: 11.5px;
  color: var(--muted);
  line-height: 1.8;
}

/* ---------- 提示/结果页 ---------- */
.result-box { text-align: center; padding: 34px 20px; }
.result-box .ricon {
  width: 74px; height: 74px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 14px;
}
.result-box h2 { font-size: 19px; font-weight: 600; }
.result-box p { font-size: 13.5px; color: var(--muted); margin: 8px 0 20px; }

.empty {
  text-align: center;
  padding: 46px 20px;
  color: var(--muted);
}
.empty svg { opacity: .35; margin-bottom: 10px; }
.empty p { font-size: 13.5px; }

/* ---------- Toast ---------- */
#toast {
  position: fixed;
  left: 50%; bottom: 96px;
  transform: translateX(-50%) translateY(16px);
  background: rgba(20, 28, 38, .88);
  color: #fff;
  font-size: 13.5px;
  padding: 9px 18px;
  border-radius: 99px;
  opacity: 0;
  pointer-events: none;
  transition: all .25s;
  z-index: 999;
  max-width: 82%;
  text-align: center;
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- 面包屑/返回 ---------- */
.page-title-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 13px 14px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 90;
}
.page-title-bar .back {
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 9px;
  color: var(--text);
  flex-shrink: 0;
}
.page-title-bar .back:active { background: var(--bg); }
.page-title-bar h2 { font-size: 16.5px; font-weight: 600; flex: 1; text-align: center; margin-right: 32px; }

/* ---------- 筛选条 ---------- */
.filter-bar {
  display: flex;
  gap: 8px;
  padding: 12px 14px 0;
  overflow-x: auto;
  scrollbar-width: none;
  align-items: center;
}
.filter-bar::-webkit-scrollbar { display: none; }
.filter-bar select, .filter-bar input {
  border: 1.5px solid var(--line);
  background: #fff;
  border-radius: 10px;
  padding: 8px 11px;
  font-size: 13.5px;
  font-family: inherit;
  color: var(--text);
  flex-shrink: 0;
}
.filter-bar .search-wrap { flex: 1; display: flex; min-width: 140px; }
.filter-bar input { width: 100%; }

/* ---------- 悬停细节(桌面端) ---------- */
@media (hover: hover) {
  .doctor-card:hover {
    box-shadow: 0 12px 30px rgba(20, 48, 41, .09);
    transform: translateY(-2px);
  }
  .quick-nav a:hover { background: #f3faf8; }
  .dept-grid a:hover { background: #f1f9f6; border-color: #dff0ea; }
  .section-head .more:hover { color: var(--primary); }
}

@media (max-width: 380px) {
  .quick-nav { padding: 14px 8px 12px; }
  .quick-nav a { gap: 6px; font-size: 12px; }
  .quick-nav .qicon { width: 42px; height: 42px; border-radius: 13px; }
  .section { margin-left: 12px; margin-right: 12px; padding: 15px; }
  .dept-grid { gap: 8px; }
  .dept-grid a { padding: 10px; gap: 8px; }
  .dept-grid .dicon { width: 34px; height: 34px; }
  .doctor-card { padding: 13px 13px 11px; }
  .doctor-card .doctor-main { gap: 11px; }
  .doctor-card .avatar { width: 56px; height: 56px; }
  .doctor-card .info h3 { font-size: 16px; }
  .doctor-card .info .title { font-size: 10.5px; padding: 1px 6px; }
  .doctor-card .doctor-foot { gap: 8px; }
}

/* ---------- 桌面端适配 ---------- */
@media (min-width: 768px) {
  body { background: #eef1f5; }
  .app { max-width: 1024px; padding-bottom: 30px; }
  .tabbar { display: none; }
  .top-nav { display: flex; gap: 20px; margin-left: auto; }
  .site-header .hbtn { display: none; }
  .site-header { padding: 12px 28px; }
  .site-header .titles h1 { font-size: 19px; }
  .banner { padding: 16px 28px 6px; }
  .banner-item { min-height: 170px; border-radius: 16px; }
  .banner-item h3 { font-size: 24px; }
  .quick-nav { margin: 16px 28px 0; grid-template-columns: repeat(6, 1fr); padding: 22px 14px 18px; }
  .quick-nav a { font-size: 13.5px; }
  .quick-nav .qicon { width: 56px; height: 56px; border-radius: 16px; }
  .section { margin: 16px 28px 0; padding: 20px 22px; }
  .dept-grid { grid-template-columns: repeat(4, 1fr); gap: 12px; }
  .doctor-list { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
  .summary-card { margin: 16px 28px 0; }
  .form-section { padding: 8px 28px 24px; max-width: 640px; }
  .tabs { padding: 14px 28px 0; }
  .me-header { padding: 30px 28px 46px; }
  .me-body { margin-top: -30px; }
  .me-stats, .me-menu { margin-left: 28px; margin-right: 28px; }
  .me-stats { max-width: 480px; }
  .me-menu { max-width: 480px; }
  .page-title-bar { padding: 14px 28px; }
  .page-title-bar h2 { text-align: left; margin-right: 0; }
  .filter-bar { padding: 14px 28px 0; }
  .doc-hero { padding: 26px 28px 48px; }
  .doc-body { margin-top: -34px; padding: 0 28px; }
  .doc-body .section { margin-left: 0; margin-right: 0; }
  .appt-list { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; padding: 0 28px; }
  .site-footer { padding: 30px 28px 36px; }
  #toast { bottom: 40px; }
  .result-box { padding: 60px 20px; }
}

@media (prefers-reduced-motion: reduce) {
  .top-nav.open,
  body.menu-open::before { animation: none; }
}

@media (min-width: 1024px) {
  .app { max-width: 1100px; }
  .dept-grid { grid-template-columns: repeat(4, 1fr); }
}

/* 分时段选择 */
.slot-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: 10px;
    max-width: 100%;
}
.slot-chip {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    min-width: 0;
    padding: 11px 12px 10px;
    border: 1px solid #e4efeb;
    border-radius: 14px;
    background: linear-gradient(180deg, #fff, #fbfdfc);
    box-shadow: 0 3px 10px rgba(20, 50, 45, .045);
    white-space: normal;
    color: inherit;
    text-decoration: none;
    transition: border-color .18s, box-shadow .18s, transform .15s;
}
a.slot-chip:hover { border-color: #cfe9e1; box-shadow: 0 6px 16px rgba(20, 50, 45, .08); transform: translateY(-1px); }
a.slot-chip:active { transform: scale(.98); }
.slot-chip .slot-time { font-size: 12.5px; font-weight: 600; color: #20322e; letter-spacing: .1px; }
.slot-chip .slot-meta { font-size: 11px; color: #7d8d97; }
.slot-chip .slot-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    margin-top: 7px;
    min-height: 27px;
    padding: 0 12px;
    border-radius: 999px;
    background: linear-gradient(135deg, #0aa37f, #0b8f75);
    color: #fff;
    font-size: 11.5px;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
    box-shadow: 0 3px 8px rgba(10, 163, 127, .2);
}
.slot-chip .slot-action svg { width: 13px; height: 13px; }
.slot-chip .slot-action.wait {
    color: #a96300;
    background: #fff7e8;
    border: 1px solid #f0d49a;
    box-shadow: none;
}
.slot-chip.is-full { background: #f8faf9; opacity: .9; }
.slot-chip.is-full .slot-time { color: #8b9a9f; }
@media (max-width: 360px) { .slot-row { grid-template-columns: 1fr; } }
.slot-pick {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 10px;
    max-width: 100%;
}
.slot-pick label {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    min-width: 0;
    width: 100%;
    gap: 2px;
    border: 1px solid #e4efeb;
    border-radius: 14px;
    padding: 12px 14px;
    cursor: pointer;
    background: linear-gradient(180deg, #fff, #fbfdfc);
    box-shadow: 0 3px 10px rgba(20, 50, 45, .045);
    transition: border-color .18s, box-shadow .18s, background .18s;
}
.slot-pick label .slot-time { display: block; font-size: 13.5px; font-weight: 700; color: #223f36; }
.slot-pick label .slot-meta { display: block; font-size: 11.5px; color: #8b96a6; }
.slot-pick label .slot-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    margin-top: 7px;
    min-height: 27px;
    padding: 0 12px;
    border-radius: 999px;
    background: linear-gradient(135deg, #0aa37f, #0b8f75);
    color: #fff;
    font-size: 11.5px;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
    box-shadow: 0 3px 8px rgba(10, 163, 127, .2);
}
.slot-pick label .slot-action svg { width: 13px; height: 13px; }
.slot-pick label .slot-action.wait {
    color: #a96300;
    background: #fff7e8;
    border: 1px solid #f0d49a;
    box-shadow: none;
}
.slot-pick label a { display: block; width: 100%; color: inherit; }
.slot-pick label.checked {
    border-color: var(--primary);
    color: var(--primary-dark);
    background: var(--primary-light);
}
.slot-pick label.disabled {
    opacity: .6;
    cursor: not-allowed;
    background: #f8faf9;
    box-shadow: none;
}
.slot-pick label em {
    font-style: normal;
    color: var(--muted);
    font-size: 11.5px;
}
@media (min-width: 560px) {
    .slot-pick { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
