/* ============================================================
   页面层
   ============================================================ */

/* ---------- 首页 ---------- */
.home-greeting {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin: 6px 0 16px;
}
.home-greeting .hg-kicker {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 0.08em;
}
.home-greeting .hg-kicker .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--peach); }
.home-greeting h1 {
  margin-top: 4px;
  font-family: var(--serif);
  font-size: clamp(24px, 2.2vw, 30px);
  font-weight: 600;
  letter-spacing: -0.01em;
}
.home-greeting h1 em { font-style: normal; color: var(--green); }
.home-greeting .hg-side { display: flex; align-items: center; gap: 8px; }
.home-greeting .hg-weather {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 11px;
  border-radius: 11px;
  border: 1px solid var(--line);
  background: rgba(255, 252, 246, 0.6);
  font-size: 9.5px;
  color: var(--muted);
}
.home-greeting .hg-weather .ic { width: 14px; height: 14px; color: var(--honey); }

.home-feed .section-head { margin-top: 28px; }
.home-feed .feed-grid { margin-top: 2px; }

.mobile-rail { display: none; }

/* ---------- 问答 ---------- */
.qa-stats {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  padding: 11px 16px;
  border-radius: 14px;
  background: rgba(255, 252, 246, 0.55);
  border: 1px solid var(--line);
  margin-bottom: 14px;
}
.qa-stats .qs-item { display: flex; align-items: baseline; gap: 5px; }
.qa-stats .qs-item b { font-family: var(--serif); font-size: 17px; font-weight: 600; color: var(--green); }
.qa-stats .qs-item span { font-size: 9.5px; color: var(--muted); }
.qa-stats .qs-avatars { margin-left: auto; }

.qa-topic-row { display: flex; align-items: center; gap: 8px; margin: 4px 0 13px; }
.qa-topic-row .label { font-size: 9.5px; color: var(--muted); flex: none; }

.qa-sidebar-card {
  padding: 15px 17px;
  border-radius: 17px;
  border: 1px dashed var(--line-strong);
  background: rgba(255, 252, 246, 0.42);
}
.qa-sidebar-card h4 { font-size: 11.5px; display: flex; align-items: center; gap: 6px; }
.qa-sidebar-card h4 .ic { width: 14px; height: 14px; color: var(--peach-deep); }
.qa-sidebar-card p { font-size: 10px; color: var(--muted); line-height: 1.75; margin-top: 4px; }
.qa-sidebar-card .btn { margin-top: 10px; }

/* ---------- 社区 ---------- */
.community-top {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 13px;
}
.community-top .topic-scroll { flex: 1 1 100%; min-width: 0; flex-wrap: wrap; overflow: visible; }

.community-tip {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 18px;
  padding: 10px 13px;
  border-radius: 12px;
  background: rgba(47, 99, 83, 0.045);
  font-size: 10px;
  color: var(--muted);
}
.community-tip .ic { width: 13px; height: 13px; color: var(--green); flex: none; }

/* ---------- 医生栏 ---------- */
.doctor-banner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px;
  padding: 20px 22px;
  border-radius: 22px;
  border: 1px solid var(--line);
  background:
    radial-gradient(360px 200px at 92% 20%, rgba(232, 131, 78, 0.16), transparent 65%),
    linear-gradient(120deg, #f8f3e8, #ece4d3);
  margin-bottom: 15px;
  position: relative;
  overflow: hidden;
}
.doctor-banner .db-char {
  position: absolute;
  right: 120px;
  bottom: -40px;
  font-family: var(--serif);
  font-size: 160px;
  line-height: 1;
  color: rgba(31, 48, 42, 0.055);
  pointer-events: none;
}
.doctor-banner h2 { font-family: var(--serif); font-size: 21px; line-height: 1.45; position: relative; z-index: 1; }
.doctor-banner p { margin-top: 5px; font-size: 10.5px; color: var(--muted); line-height: 1.7; max-width: 34em; position: relative; z-index: 1; }
.doctor-banner .db-actions { display: flex; gap: 8px; position: relative; z-index: 1; flex: none; }

.doc-filter-row { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; margin: 14px 0; }
.doc-filter-row .filter-search { max-width: 230px; }

.doc-section-label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 4px 0 11px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--muted);
  text-transform: uppercase;
}
.doc-section-label::after { content: ""; height: 1px; flex: 1; background: var(--line); }

/* ---------- 福利中心 ---------- */
.rewards-head { margin-bottom: 16px; }
.reward-tabs-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 20px 0 14px;
  flex-wrap: wrap;
}
.reward-tabs-row .tabs { background: rgba(31, 48, 42, 0.06); }
.reward-tabs-row .tabs button { padding: 8px 15px; font-size: 12px; }

.earn-block { margin-bottom: 20px; }
.earn-block .section-head { margin-top: 0; }
.earn-block .section-head h2 { font-size: 20px; }

.rewards-tip {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 11px 13px;
  border-radius: 12px;
  background: var(--honey-soft);
  color: #7a5b22;
  font-size: 10px;
  line-height: 1.7;
  margin-top: 12px;
}
.rewards-tip .ic { width: 14px; height: 14px; margin-top: 2px; flex: none; }

.mall-filter { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin-bottom: 13px; }
.mall-filter .grow-line { flex: 1; }

.redemption-row {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px 0;
  border-bottom: 1px dashed var(--line);
}
.redemption-row:last-child { border-bottom: 0; }
.redemption-row .rd-art { width: 42px; height: 42px; border-radius: 12px; overflow: hidden; flex: none; }
.redemption-row h4 { font-size: 11.5px; font-weight: 600; }
.redemption-row .rd-meta { font-size: 9.5px; color: var(--muted); margin-top: 2px; }
.redemption-row .rd-status { margin-left: auto; flex: none; }

/* ---------- 我的 ---------- */
.profile-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 15px;
  margin-top: 15px;
  align-items: start;
}
.profile-layout .span-2 { grid-column: 1 / -1; }
.profile-layout .menu-grid { grid-column: 1 / -1; }
.profile-block { border-radius: 20px; border: 1px solid var(--line); background: var(--card); padding: 17px 18px; }
.profile-block h3 { font-size: 12.5px; font-weight: 600; display: flex; align-items: center; gap: 7px; margin-bottom: 11px; }
.profile-block h3 .ic { width: 15px; height: 15px; color: var(--green); }
.profile-block h3 .block-action { margin-left: auto; font-size: 9.5px; color: var(--muted); font-weight: 400; }

.profile-bottom-note {
  margin-top: 18px;
  text-align: center;
  font-size: 9.5px;
  color: var(--muted-2);
  line-height: 1.8;
}

/* ---------- 医生工作台 ---------- */
.dash-hero {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background:
    radial-gradient(360px 180px at 100% 0%, rgba(232, 131, 78, 0.12), transparent 60%),
    linear-gradient(120deg, #fffdf8, #f3ecdf);
  margin-bottom: 14px;
}
.dash-hero .dh-name { font-family: var(--serif); font-size: 20px; }
.dash-hero .dh-sub { font-size: 10.5px; color: var(--muted); margin-top: 2px; }
.dash-hero .dh-side { margin-left: auto; display: flex; align-items: center; gap: 9px; flex-wrap: wrap; justify-content: flex-end; }
.online-toggle { display: flex; align-items: center; gap: 7px; font-size: 10.5px; color: var(--ink-2); }
.online-toggle .switch { width: 34px; height: 20px; }
.online-toggle .switch::after { width: 14px; height: 14px; }
.online-toggle .switch.is-on::after { transform: translateX(14px); }

.dash-grid { display: grid; grid-template-columns: minmax(0, 1.18fr) minmax(0, 0.82fr); gap: 14px; }
.dash-grid + .dash-grid { margin-top: 14px; }
.dash-col { display: flex; flex-direction: column; gap: 14px; min-width: 0; }

.fan-row { display: flex; align-items: center; gap: 9px; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.fan-row:last-child { border-bottom: 0; }
.fan-row .fan-name { font-size: 11px; font-weight: 500; }
.fan-row .fan-note { font-size: 9px; color: var(--muted); }
.fan-row .btn { margin-left: auto; padding: 5px 10px; font-size: 9.5px; }

.content-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.content-row:last-child { border-bottom: 0; }
.content-row .ct-ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--green-mist); color: var(--green); flex: none; }
.content-row .ct-ico .ic { width: 15px; height: 15px; }
.content-row h4 { font-size: 11px; font-weight: 600; line-height: 1.45; }
.content-row .ct-meta { font-size: 9px; color: var(--muted); margin-top: 1px; }
.content-row .ct-side { margin-left: auto; font-size: 9px; color: var(--muted); flex: none; }

/* ---------- 官方后台 ---------- */
.official-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; }
.official-grid + .official-grid { margin-top: 14px; }
.official-grid .span-2 { grid-column: 1 / -1; }

.app-card { padding: 12px 0; border-bottom: 1px dashed var(--line); }
.app-card:last-child { border-bottom: 0; }
.app-card .app-top { display: flex; align-items: center; gap: 9px; }
.app-card .app-name { font-size: 11.5px; font-weight: 600; }
.app-card .app-sub { font-size: 9.5px; color: var(--muted); }
.app-card .app-meta { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 5px; font-size: 9px; color: var(--muted); }
.app-card .app-intro { margin-top: 5px; font-size: 10px; color: var(--ink-2); line-height: 1.65; }
.app-card .app-actions { display: flex; align-items: center; gap: 6px; margin-top: 8px; }
.app-card .app-actions .status { margin-left: auto; }

.config-panel .panel-body { padding-top: 2px; }
.config-save { display: flex; align-items: center; gap: 8px; margin-top: 13px; }

.ticket-list { display: flex; flex-direction: column; }

.data-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.data-strip div { padding: 9px 11px; border-radius: 10px; background: rgba(31, 48, 42, 0.035); }
.data-strip b { display: block; font-family: var(--serif); font-size: 18px; font-weight: 600; }
.data-strip span { font-size: 9px; color: var(--muted); }

/* ---------- 详情浮层内的布局 ---------- */
.sheet-cover { margin: -20px -24px 0; }
.sheet-cover .cover-art { aspect-ratio: 16 / 7; }
.sheet-cover .cover-art .ca-char { font-size: 170px; bottom: -30%; }

.profile-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: 4px 0 6px; }
.profile-tabs button {
  position: relative;
  padding: 10px 12px;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--muted);
}
.profile-tabs button.is-on { color: var(--ink); font-weight: 600; }
.profile-tabs button.is-on::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: -1px;
  height: 2px;
  border-radius: 2px;
  background: var(--green);
}

.notif-row { display: flex; gap: 10px; padding: 13px 0; border-bottom: 1px dashed var(--line); position: relative; }
.notif-row:last-child { border-bottom: 0; }
.notif-row .nf-ico { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; background: var(--green-mist); color: var(--green); flex: none; }
.notif-row .nf-ico .ic { width: 17px; height: 17px; }
.notif-row h4 { font-size: 11.5px; font-weight: 600; line-height: 1.5; }
.notif-row p { font-size: 10.5px; color: var(--muted); margin-top: 2px; line-height: 1.65; }
.notif-row .nf-time { font-size: 9px; color: var(--muted-2); margin-top: 3px; }
.notif-row.is-unread::after { content: ""; position: absolute; right: 0; top: 18px; width: 6px; height: 6px; border-radius: 50%; background: var(--peach); }

.ledger-row { display: flex; align-items: center; gap: 10px; padding: 11px 0; border-bottom: 1px dashed var(--line); }
.ledger-row:last-child { border-bottom: 0; }
.ledger-row .lg-title { font-size: 11.5px; font-weight: 500; }
.ledger-row .lg-time { font-size: 9px; color: var(--muted); margin-top: 2px; }
.ledger-row .lg-points { margin-left: auto; font-family: var(--serif); font-size: 16px; font-weight: 600; color: var(--green); }
.ledger-row .lg-points.neg { color: var(--peach-deep); }

.my-item { display: flex; align-items: center; gap: 10px; padding: 11px 0; border-bottom: 1px dashed var(--line); }
.my-item:last-child { border-bottom: 0; }
.my-item h4 { font-size: 11.5px; font-weight: 500; line-height: 1.5; }
.my-item .mi-meta { font-size: 9px; color: var(--muted); margin-top: 2px; }
.my-item .mi-side { margin-left: auto; flex: none; }

.invite-card {
  text-align: center;
  padding: 18px 10px 6px;
  border-radius: 18px;
  background:
    radial-gradient(300px 180px at 50% 0%, rgba(232, 131, 78, 0.14), transparent 65%),
    linear-gradient(135deg, #f7f1e5, #efe7d8);
  border: 1px solid var(--line);
}
.invite-card .inv-char { font-family: var(--serif); font-size: 48px; color: var(--green); line-height: 1; }
.invite-card h3 { margin-top: 8px; font-family: var(--serif); font-size: 19px; }
.invite-card p { margin-top: 4px; font-size: 10.5px; color: var(--muted); }
.invite-code {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 14px 0 12px;
  padding: 10px 13px;
  border-radius: 12px;
  background: rgba(255, 252, 246, 0.8);
  border: 1px dashed var(--line-strong);
}
.invite-code b { flex: 1; font-family: var(--serif); font-size: 19px; letter-spacing: 0.16em; color: var(--ink); }
.invite-code button { flex: none; }

.onboard-success { padding: 10px 0 4px; }
.onboard-success .os-lines { margin-top: 14px; display: flex; flex-direction: column; gap: 8px; }
.onboard-success .os-line { display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-radius: 10px; background: rgba(31, 48, 42, 0.035); font-size: 10.5px; color: var(--ink-2); }
.onboard-success .os-line .ic { width: 14px; height: 14px; color: var(--green); flex: none; }

/* ---------- 空状态 / 占位 ---------- */
.placeholder-card {
  padding: 40px 20px;
  text-align: center;
  border: 1px dashed var(--line-strong);
  border-radius: 18px;
  background: rgba(255, 252, 246, 0.35);
}
.placeholder-card .ic { width: 28px; height: 28px; color: var(--muted-2); margin-bottom: 8px; }
.placeholder-card p { font-size: 10.5px; color: var(--muted); }

/* ---------- 响应式 ---------- */
@media (max-width: 1100px) {
  .activity-grid { grid-template-columns: repeat(3, 1fr); }
  .mall-grid { grid-template-columns: repeat(3, 1fr); }
  .profile-layout { grid-template-columns: 1fr; }
  .profile-layout .span-2 { grid-column: auto; }
  .profile-layout .menu-grid { grid-column: auto; }
  .dash-grid { grid-template-columns: 1fr; }
  .official-grid { grid-template-columns: 1fr; }
  .official-grid .span-2 { grid-column: auto; }
}

@media (max-width: 860px) {
  .menu-grid { grid-template-columns: 1fr; }
  .hero-slide { grid-template-columns: 1fr; min-height: 0; }
  .hero-copy { padding: 28px 24px 34px; }
  .hero-art {
    position: absolute;
    inset: 0;
    min-height: 0;
    opacity: 0.6;
    pointer-events: none;
  }
  .hero-orbit { opacity: 0.5; }
  .hero-char { right: -8px; top: 30%; font-size: 190px; opacity: 0.32; }
  .hero-float { display: none; }
  .hero h1 { font-size: 29px; max-width: 92%; }
  .hero-desc { max-width: 88%; }
  .hero-dots { left: 24px; bottom: 14px; }
  .hero-copy { padding-bottom: 40px; }

  .quick-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .quick { padding: 11px; }
  .quick-sub { white-space: normal; }

  .care { grid-template-columns: 1fr; gap: 12px; padding: 18px; }
  .care-list { grid-template-columns: 1fr; }
  .care-ring { position: absolute; right: 16px; top: 16px; width: 64px; height: 64px; }
  .care-ring .ring-label b { font-size: 17px; }
  .care-ring .ring-label span { font-size: 8px; }
  .care-copy h2 { padding-right: 66px; font-size: 19px; }

  .feed-grid, .post-grid, .doc-grid { grid-template-columns: 1fr; }
  .feed-card.feature { display: flex; min-height: 0; }
  .feed-card.feature .cover-art { aspect-ratio: 16 / 9; min-height: 0; }
  .feed-card.feature .cover-art .ca-char { font-size: 130px; }
  .feature .fc-body { padding: 15px 17px 14px; }
  .feature .fc-title { font-size: 19px; }
  .feature .fc-excerpt { font-size: 11.5px; -webkit-line-clamp: 2; }

  .feed-q { grid-template-columns: 34px minmax(0, 1fr); }
  .feed-q .fq-side { display: none; }

  .qa-card { grid-template-columns: 1fr; gap: 12px; padding: 16px; }
  .qa-side { border-left: 0; border-top: 1px dashed var(--line); padding-top: 10px; flex-direction: row; justify-content: flex-start; gap: 8px; }
  .qa-count { font-size: 20px; }
  .qa-bounty { margin-top: 0; margin-left: auto; }
  .qa-topic-row { align-items: flex-start; }
  .qa-topic-row .label { margin-top: 7px; }
  .qa-topic-row .chip-scroll { flex-wrap: wrap; overflow: visible; }

  .activity-grid { grid-template-columns: 1fr; }
  .activity-card { min-height: 140px; }
  .mechanism { grid-template-columns: 1fr auto 1fr auto 1fr; padding: 14px 12px; gap: 4px; }
  .mech-node .mn-ico { width: 32px; height: 32px; }
  .mech-node b { font-size: 9.5px; }
  .mech-node span { font-size: 8px; }

  .mall-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .reward-card h4 { font-size: 11.5px; }

  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .doctor-banner { grid-template-columns: 1fr; gap: 12px; }
  .doctor-banner .db-actions { justify-content: flex-start; }
  .dash-hero { flex-wrap: wrap; }
  .dash-hero .dh-side { width: 100%; margin-left: 0; justify-content: space-between; }
  .doctor-banner .db-char { font-size: 110px; right: 10px; }

  .profile-layout { gap: 12px; }
  .ad-file { grid-template-columns: 1fr 1fr; }
  .home-greeting { align-items: flex-start; }
  .home-greeting .hg-weather { display: none; }

  .sheet-cover { margin: -16px -18px 0; }
  .article-hero { margin: -16px -18px 0; }
  .article-head h1 { font-size: 22px; }
  .article-body p { font-size: 13px; }
  .article-body li { font-size: 12px; }

  .doc-profile-hero { padding: 18px 16px 14px; }
  .dph-name h2 { font-size: 21px; }
  .profile-stats b { font-size: 18px; }

  .mobile-rail { display: block; margin-top: 26px; }
  .mobile-rail .rail-card { margin-bottom: 12px; box-shadow: none; }

  .points-hero { padding: 22px; border-radius: 22px; }
  .points-hero .ph-balance b { font-size: 44px; }
  .ph-stamp { display: none; }
  .points-hero .ph-actions .btn { flex: 1; }

  .reward-tabs-row { align-items: flex-start; flex-direction: column; }
  .reward-tabs-row .tabs { width: 100%; }
  .reward-tabs-row .tabs button { flex: 1; }

  .home-feed .section-head { flex-wrap: wrap; }
  .home-feed .tabs { width: 100%; overflow-x: auto; }
  .home-feed .tabs button { flex: 1; }

  .filter-bar { align-items: flex-start; }
  .filter-search { max-width: none; flex-basis: 100%; }
  .doc-filter-row .chip-scroll { order: 1; width: 100%; }
  .doc-filter-row .filter-search { order: 2; flex: 1 1 100%; max-width: none; margin-left: 0 !important; }

  .stat-card .sc-value { font-size: 24px; }
  .official-grid { gap: 12px; }
}

@media (max-width: 420px) {
  .hero-copy { padding: 24px 18px 34px; }
  .hero h1 { font-size: 26px; }
  .hero-actions .btn { padding: 11px 15px; font-size: 12.5px; }
  .hero-meta { gap: 10px; font-size: 9.5px; }
  .quick-title { font-size: 11px; }
  .quick-ico { width: 34px; height: 34px; }
  .qa-stats { gap: 12px; }
  .mall-grid { grid-template-columns: 1fr 1fr; }
  .reward-card .rw-foot { flex-wrap: wrap; }
  .profile-stats-lg b { font-size: 19px; }
  .doc-profile-hero .dph-actions { flex-wrap: wrap; }
  .doc-profile-hero .dph-actions .btn { flex: 1 1 100%; }
}
