/* R252 style.css · senior-hub-dashboard · v1.1 重做 */
:root {
  --primary: #7C3AED; --secondary: #A78BFA; --success: #10B981; --warning: #F59E0B; --danger: #EF4444;
  --bg: #F5F3FF; --card: #FFF; --text: #4C1D95; --text-secondary: #6D28D9; --border: #DDD6FE;
  --accent: #5B21B6; --tile-bg: #EDE9FE;
  --contact-footer-h: 92px; --safe-area-bottom: env(safe-area-inset-bottom, 0px);
  --font-scale: 1.15;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  background: var(--bg); color: var(--text); line-height: 1.55;
  max-width: 480px; margin: 0 auto;
  font-size: calc(14px * var(--font-scale));
}
body.has-contact-footer { padding-bottom: calc(var(--contact-footer-h) + 12px + var(--safe-area-bottom)); }
body.share-page { padding-bottom: calc(var(--contact-footer-h) + 16px + var(--safe-area-bottom)); }
button, input, select { font: inherit; }
a { color: inherit; text-decoration: none; }

.top-nav { display: flex; align-items: center; justify-content: space-between; padding: 10px 16px; background: var(--card); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 70; }
.nav-brand { font-weight: 800; font-size: calc(16px * var(--font-scale)); }
.nav-share { font-size: calc(14px * var(--font-scale)); color: var(--primary); min-width: 44px; min-height: 44px; display: flex; align-items: center; justify-content: center; }

.profile-card { background: linear-gradient(135deg, var(--primary), var(--accent)); color: #fff; padding: 14px 16px; }
.profile-inner { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-start; }
.profile-avatar { width: 56px; height: 56px; border-radius: 50%; background: rgba(255,255,255,.2); display: flex; align-items: center; justify-content: center; font-size: 30px; flex-shrink: 0; }
.profile-meta { flex: 1; min-width: 140px; }
.profile-name { display: block; font-size: calc(18px * var(--font-scale)); font-weight: 800; }
.profile-meta span { display: block; font-size: calc(11px * var(--font-scale)); opacity: .92; margin-top: 2px; }
.profile-actions { width: 100%; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; margin-top: 4px; }
.child-help { background: rgba(255,255,255,.2); padding: 8px 14px; border-radius: 20px; font-weight: 700; font-size: calc(13px * var(--font-scale)); min-height: 44px; display: inline-flex; align-items: center; }
.font-toggle { display: flex; gap: 4px; }
.font-btn { border: 1px solid rgba(255,255,255,.4); background: transparent; color: #fff; border-radius: 8px; padding: 6px 10px; font-size: calc(11px * var(--font-scale)); cursor: pointer; min-height: 36px; }
.font-btn.active { background: #fff; color: var(--accent); font-weight: 700; }

.segment-bar { display: flex; gap: 8px; padding: 10px 16px; background: var(--card); border-bottom: 1px solid var(--border); position: sticky; top: 44px; z-index: 65; }
.seg-pill { flex: 1; border: none; background: var(--bg); color: var(--text-secondary); border-radius: 20px; padding: 10px 6px; font-size: calc(12px * var(--font-scale)); font-weight: 700; cursor: pointer; min-height: 44px; }
.seg-pill.active { background: var(--primary); color: #fff; }

.category-bar { display: flex; gap: 8px; padding: 10px 16px; overflow-x: auto; background: var(--bg); position: sticky; top: 98px; z-index: 60; }
.cat-chip { flex: 0 0 auto; border: 1px solid var(--border); background: var(--card); border-radius: 20px; padding: 8px 14px; font-size: calc(12px * var(--font-scale)); font-weight: 600; cursor: pointer; min-height: 40px; white-space: nowrap; }
.cat-chip.active { background: var(--chip-color, var(--primary)); color: #fff; border-color: transparent; }

.main-scroll { padding: 12px 16px 24px; }
.section-title { font-size: calc(16px * var(--font-scale)); font-weight: 800; margin-bottom: 10px; }
.section-title small { font-weight: 600; color: var(--text-secondary); font-size: calc(12px * var(--font-scale)); }

.trust-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.trust-item { text-align: center; background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 10px 4px; }
.trust-val { display: block; font-size: calc(17px * var(--font-scale)); font-weight: 800; color: var(--primary); }
.trust-label { font-size: calc(10px * var(--font-scale)); color: var(--text-secondary); }

.recent-strip { margin-bottom: 14px; }
.strip-label { font-size: calc(12px * var(--font-scale)); font-weight: 700; color: var(--text-secondary); margin-bottom: 6px; }
.strip-scroll { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.strip-card { flex: 0 0 auto; background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 10px 14px; cursor: pointer; text-align: left; min-height: 44px; }
.strip-card span { display: block; font-weight: 700; font-size: calc(13px * var(--font-scale)); }
.strip-card small { color: var(--text-secondary); font-size: calc(10px * var(--font-scale)); }

.tile-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.service-tile {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: calc(110px * var(--font-scale)); background: var(--tile-bg); border: 2px solid var(--border);
  border-radius: 16px; padding: 14px 10px; cursor: pointer; text-align: center; transition: transform .12s;
}
.service-tile:active { transform: scale(.97); border-color: var(--primary); }
.hot-badge { position: absolute; top: 8px; right: 8px; background: var(--danger); color: #fff; font-size: calc(9px * var(--font-scale)); padding: 2px 6px; border-radius: 6px; font-weight: 700; }
.tile-icon { font-size: calc(32px * var(--font-scale)); margin-bottom: 6px; }
.tile-label { font-size: calc(15px * var(--font-scale)); font-weight: 800; line-height: 1.3; }
.tile-cat { font-size: calc(10px * var(--font-scale)); margin-top: 4px; font-weight: 600; }

.ledger-card { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 14px; margin-bottom: 10px; }
.ledger-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.ledger-meta { font-size: calc(12px * var(--font-scale)); color: var(--text-secondary); margin-bottom: 8px; }
.btn-icon { border: none; background: var(--bg); width: 36px; height: 36px; border-radius: 8px; cursor: pointer; font-size: 16px; }

.service-drawer { position: fixed; inset: 0; z-index: 900; pointer-events: none; visibility: hidden; }
.service-drawer.open { pointer-events: auto; visibility: visible; }
.drawer-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.5); }
.drawer-panel {
  position: absolute; left: 0; right: 0; bottom: 0; background: var(--card);
  border-radius: 20px 20px 0 0; padding: 20px 16px calc(20px + var(--safe-area-bottom));
  max-height: 88vh; overflow-y: auto; transform: translateY(100%); transition: transform .28s ease;
}
.service-drawer.open .drawer-panel { transform: translateY(0); }
.drawer-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 10px; }
.drawer-head h2 { font-size: calc(18px * var(--font-scale)); margin-top: 6px; }
.drawer-cat { display: inline-block; padding: 4px 10px; border-radius: 10px; font-size: calc(11px * var(--font-scale)); font-weight: 700; }
.drawer-close { border: none; background: var(--bg); width: 40px; height: 40px; border-radius: 50%; font-size: 22px; cursor: pointer; flex-shrink: 0; }
.drawer-summary { font-size: calc(14px * var(--font-scale)); color: var(--text-secondary); margin-bottom: 14px; line-height: 1.6; }
.guide-steps { list-style: none; margin-bottom: 16px; }
.guide-steps li { display: flex; gap: 10px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: calc(14px * var(--font-scale)); line-height: 1.5; }
.step-num { flex-shrink: 0; width: 28px; height: 28px; border-radius: 50%; background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: calc(13px * var(--font-scale)); }
.drawer-actions { display: flex; flex-direction: column; gap: 8px; }

.btn { border: none; border-radius: 12px; padding: 14px; font-size: calc(14px * var(--font-scale)); font-weight: 700; min-height: 48px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; text-align: center; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-outline { background: var(--card); border: 2px solid var(--border); color: var(--text); }
.btn-block { width: 100%; }
.empty-hint { text-align: center; padding: 36px 16px; color: var(--text-secondary); font-size: calc(13px * var(--font-scale)); }

.share-main { padding: 24px 16px; }
.share-card { background: var(--card); border-radius: 20px; padding: 28px 20px; text-align: center; box-shadow: 0 4px 16px rgba(0,0,0,.08); }
.share-icon { font-size: 56px; margin-bottom: 8px; }
.share-slogan { color: var(--primary); font-weight: 700; margin: 8px 0; }
.share-list { text-align: left; padding-left: 20px; margin: 12px 0 16px; font-size: calc(13px * var(--font-scale)); line-height: 1.8; }

.toast-container { position: fixed; left: 50%; transform: translateX(-50%); top: 60px; z-index: 99999; pointer-events: none; }
.toast-item { background: rgba(76,29,149,.92); color: #fff; padding: 12px 20px; border-radius: 20px; margin-top: 6px; opacity: 0; transition: opacity .3s; font-size: calc(13px * var(--font-scale)); max-width: 90vw; text-align: center; }
.toast-item.show { opacity: 1; }

.contact-footer { position: fixed; left: 0; right: 0; bottom: 0; background: #1a1a1a; z-index: 850; padding: .55rem .75rem calc(.55rem + var(--safe-area-bottom)); min-height: var(--contact-footer-h); }
.contact-footer__btns { display: grid; grid-template-columns: repeat(3, minmax(0, 88px)); justify-content: center; gap: .4rem; max-width: 320px; margin: 0 auto; }
.contact-footer__cta, .contact-footer__btn { display: flex; align-items: center; justify-content: center; min-height: 36px; border-radius: 8px; font-size: 12px; font-weight: 600; }
.contact-footer__cta { background: #E87722; color: #fff; }
.contact-footer__btn { background: #333; color: #fff; border: none; cursor: pointer; }
.contact-footer__brand { text-align: center; color: #888; font-size: 10px; margin-top: 6px; }
