/* ========== 基础重置 ========== */
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif; background: #F5F7FA; color: #333; }
#app { height: 100%; display: flex; flex-direction: column; overflow: hidden; }

/* ========== 页面容器 ========== */
#pages { flex: 1; overflow: hidden; position: relative; background: #F5F7FA; }
.page { position: absolute; top: 0; left: 0; right: 0; bottom: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; display: none; background: #F5F7FA; }
.page.active { display: block; }

/* 隐藏滚动条 */
.page::-webkit-scrollbar { display: none; }
.home-scroll, .profile-scroll { padding-bottom: 80px; }

/* ========== 底部导航 ========== */
.bottom-nav { position: fixed; bottom: 0; left: 0; right: 0; height: 60px; background: #fff; border-top: 1px solid #eee; display: flex; z-index: 100; padding-bottom: env(safe-area-inset-bottom); }
.nav-item { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; cursor: pointer; transition: all 0.2s; }
.nav-item .nav-icon { font-size: 22px; margin-bottom: 2px; transition: all 0.2s; }
.nav-item .nav-label { font-size: 11px; color: #999; transition: all 0.2s; }
.nav-item.active .nav-label { color: #3A7BD5; font-weight: 600; }
.nav-item.active .nav-icon { transform: scale(1.1); }

/* ========== 首页Banner ========== */
.top-banner { background: linear-gradient(135deg, #3A7BD5 0%, #00D2FF 100%); padding: 50px 18px 30px; position: relative; overflow: hidden; }
.banner-bg { position: absolute; inset: 0; background: rgba(0,0,0,0.05); }
.banner-content { position: relative; z-index: 10; }
.greeting-row { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 16px; }
.greeting-hi { display: block; font-size: 18px; font-weight: 700; color: #FFFFFF; }
.greeting-date { display: block; font-size: 12px; color: rgba(255,255,255,0.75); margin-top: 3px; }
.avatar-wrap { width: 44px; height: 44px; border-radius: 50%; border: 2px solid rgba(255,255,255,0.6); overflow: hidden; flex-shrink: 0; cursor: pointer; }
.user-avatar { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 24px; background: rgba(255,255,255,0.2); }
/* Font Awesome 图标样式 */
.fas, .far {
  font-size: inherit;
  line-height: inherit;
}
/* 健康评分卡 */
.health-score-card { background: rgba(255,255,255,0.18); border-radius: 10px; padding: 16px; display: flex; justify-content: space-between; align-items: center; backdrop-filter: blur(10px); border: 1px solid rgba(255,255,255,0.3); }
.score-left { flex: 1; }
.score-label { display: block; font-size: 12px; color: rgba(255,255,255,0.8); margin-bottom: 6px; }
.score-row { display: flex; align-items: baseline; }
.score-num { font-size: 36px; font-weight: 800; color: #FFFFFF; line-height: 1; }
.score-unit { font-size: 15px; color: rgba(255,255,255,0.8); margin-left: 4px; }
.score-tip { display: block; font-size: 11px; color: rgba(255,255,255,0.75); margin-top: 6px; }
.score-circle-wrap { position: relative; margin-left: 12px; }
.score-ring { width: 60px; height: 60px; border-radius: 50%; display: flex; align-items: center; justify-content: center; transition: background 0.5s; }
.score-inner { width: 48px; height: 48px; border-radius: 50%; background: rgba(255,255,255,0.2); display: flex; align-items: center; justify-content: center; }
.score-level { font-size: 11px; font-weight: 700; color: #FFFFFF; }

.deco-circle { position: absolute; border-radius: 50%; background: rgba(255,255,255,0.08); }
.deco-1 { width: 150px; height: 150px; top: -60px; right: -40px; }
.deco-2 { width: 80px; height: 80px; bottom: -30px; left: 10px; }

/* ========== 区块通用 ========== */
.section-wrap { padding: 16px 18px 0; }
.section-title { font-size: 16px; font-weight: 700; color: #1A1A2E; margin-bottom: 12px; display: block; }
.section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.section-more { font-size: 13px; color: #3A7BD5; cursor: pointer; }

/* ========== 快捷功能 ========== */
.quick-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.quick-item { display: flex; flex-direction: column; align-items: center; gap: 6px; cursor: pointer; }
.quick-icon { width: 50px; height: 50px; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 22px; box-shadow: 0 3px 10px rgba(0,0,0,0.15); }
.quick-label { font-size: 11px; color: #555; text-align: center; }

/* ========== 提醒列表 ========== */
.remind-list { background: #FFFFFF; border-radius: 8px; overflow: hidden; box-shadow: 0 1px 8px rgba(58,123,213,0.06); }
.remind-item { display: flex; align-items: center; padding: 14px; border-bottom: 1px solid #F5F5F5; transition: background 0.2s; }
.remind-item:last-child { border-bottom: none; }
.remind-item.done { opacity: 0.5; }
.remind-check { margin-right: 10px; width: 22px; text-align: center; font-size: 18px; }
.check-empty { width: 18px; height: 18px; border-radius: 50%; border: 2px solid #CCC; margin: 0 auto; }
.remind-info { flex: 1; }
.remind-text { display: block; font-size: 14px; color: #333; margin-bottom: 2px; }
.remind-time { display: block; font-size: 11px; color: #AAA; }
.remind-tag { font-size: 10px; padding: 3px 8px; border-radius: 8px; flex-shrink: 0; }
.tag-blue { background: #EBF3FF; color: #3A7BD5; }
.tag-green { background: #E8F5E9; color: #4CAF50; }
.tag-orange { background: #FFF3E0; color: #FF9800; }

/* ========== 最近数据 ========== */
.latest-data-card { background: #FFFFFF; border-radius: 8px; padding: 14px; box-shadow: 0 1px 8px rgba(58,123,213,0.06); }
.latest-row { display: flex; justify-content: space-around; margin-bottom: 10px; }
.latest-item { display: flex; flex-direction: column; align-items: center; gap: 4px; flex: 1; }
.latest-icon { font-size: 20px; }
.latest-val { font-size: 17px; font-weight: 700; color: #3A7BD5; }
.latest-key { font-size: 11px; color: #AAA; }
.latest-divider { width: 1px; background: #F0F0F0; }
.latest-time { display: block; font-size: 11px; color: #BBB; text-align: right; }

/* ========== 视频横向滚动（首页） ========== */
.video-scroll { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; padding-bottom: 6px; }
@media (max-width: 600px) { .video-scroll { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 601px) and (max-width: 800px) { .video-scroll { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 801px) and (max-width: 1000px) { .video-scroll { grid-template-columns: repeat(4, 1fr); } }
.video-card { background: #FFFFFF; border-radius: 10px; overflow: hidden; box-shadow: 0 2px 12px rgba(58,123,213,0.08); cursor: pointer; transition: transform 0.2s, box-shadow 0.2s; }
.video-card:active { transform: scale(0.98); box-shadow: 0 1px 6px rgba(58,123,213,0.1); }
.video-card .video-cover { aspect-ratio: 16/9; display: flex; align-items: center; justify-content: center; position: relative; overflow: hidden; background: linear-gradient(135deg, #F0F5FF, #E0EBFF); }
.video-card .video-cover img { width: 100%; height: 100%; object-fit: cover; }
.video-card .video-play-btn { position: absolute; bottom: 8px; right: 8px; width: 30px; height: 30px; background: rgba(0,0,0,0.6); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 13px; color: #fff; backdrop-filter: blur(2px); }
.video-card .video-body { padding: 10px; }
.video-card .video-title { display: block; font-size: 13px; color: #333; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-bottom: 5px; font-weight: 500; }
.video-card .video-desc { display: block; font-size: 11px; color: #999; }
 
/* ========== 文章响应式布局 ========== */
.article-scroll { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; padding-bottom: 6px; }
@media (max-width: 600px) { .article-scroll { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 601px) and (max-width: 800px) { .article-scroll { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 801px) and (max-width: 1000px) { .article-scroll { grid-template-columns: repeat(4, 1fr); } }
.article-card { background: #FFFFFF; border-radius: 10px; overflow: hidden; box-shadow: 0 2px 12px rgba(58,123,213,0.08); cursor: pointer; text-decoration: none; transition: transform 0.2s, box-shadow 0.2s; }
.article-card:active { transform: scale(0.98); box-shadow: 0 1px 6px rgba(58,123,213,0.1); }
.article-cover { aspect-ratio: 4/3; background: linear-gradient(135deg, #EBF3FF, #D0E8FF); display: flex; align-items: center; justify-content: center; font-size: 36px; }
.article-body { padding: 10px; }
.article-title { display: block; font-size: 13px; color: #333; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-bottom: 5px; font-weight: 500; }
.article-tag { display: inline-block; font-size: 11px; padding: 2px 8px; border-radius: 8px; background: #EBF3FF; color: #3A7BD5; font-weight: 500; }
 
/* ========== 数字医生页面 ========== */
#page-doctor { background: #F5F7FA; }
#page-doctor.active { display: flex; flex-direction: column; }
.doctor-header { padding: 12px 16px; background: #fff; border-bottom: 1px solid #eee; font-size: 16px; font-weight: 700; color: #333; display: flex; align-items: center; gap: 6px; }
.doctor-info { padding: 8px 16px; background: #EBF3FF; font-size: 12px; color: #3A7BD5; }
.iframe-wrap { flex: 1; position: relative; min-height: 0; }
.iframe-wrap iframe { width: 100%; height: 100%; border: none; }
.doctor-tip { padding: 8px 16px; background: #FFF3E0; font-size: 11px; color: #E65100; text-align: center; }

/* ========== 语音输入区域 ========== */
.voice-area { padding: 10px 16px; background: #fff; border-top: 1px solid #eee; }
.voice-tip-box { background: #f8f9fa; border-radius: 10px; padding: 14px; display: flex; gap: 12px; align-items: flex-start; border: 1px solid #eee; }
.voice-tip-icon { font-size: 24px; flex-shrink: 0; }
.voice-tip-text { font-size: 13px; color: #555; line-height: 1.7; }
.voice-tip-text strong { color: #333; }
.voice-web-area { margin-top: 4px; }
.voice-btn { width: 100%; padding: 12px; background: linear-gradient(135deg, #3A7BD5, #00D2FF); color: #fff; border: none; border-radius: 24px; font-size: 15px; font-weight: 600; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; transition: all 0.2s; }
.voice-btn.recording { background: linear-gradient(135deg, #F44336, #FF5722); animation: pulse 1s infinite; }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.02); } }
.voice-result { background: #f8f9fa; border-radius: 8px; padding: 12px; margin-bottom: 10px; }
.voice-label { font-size: 12px; color: #999; margin-bottom: 6px; }
.voice-text { font-size: 14px; color: #333; line-height: 1.5; min-height: 20px; padding: 8px; background: #fff; border-radius: 6px; border: 1px solid #eee; }
.voice-text.final { border-color: #3A7BD5; background: #EBF3FF; }
.voice-actions { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.voice-copy-btn { padding: 6px 14px; background: #3A7BD5; color: #fff; border: none; border-radius: 14px; font-size: 12px; cursor: pointer; }
.voice-hint { font-size: 11px; color: #999; }

/* ========== 科普视频页面 ========== */
#page-videos { padding-bottom: 80px; }
.videos-header { padding: 16px 18px; background: #fff; border-bottom: 1px solid #eee; margin-bottom: 8px; }
.videos-header > span:first-child { font-size: 18px; font-weight: 700; color: #333; display: block; }
.videos-sub { font-size: 12px; color: #999; margin-top: 4px; display: block; }
.videos-list { padding: 0 18px; }
.video-list-item { display: flex; gap: 12px; padding: 12px; background: #fff; border-radius: 8px; margin-bottom: 8px; box-shadow: 0 1px 6px rgba(0,0,0,0.04); cursor: pointer; }
.video-list-thumb { width: 120px; height: 68px; border-radius: 6px; display: flex; align-items: center; justify-content: center; position: relative; flex-shrink: 0; overflow: hidden; background: #f0f0f0; }
.video-list-thumb img { width: 100%; height: 100%; object-fit: cover; }
.video-list-thumb .video-play-btn { position: absolute; bottom: 6px; right: 6px; width: 28px; height: 28px; background: rgba(0,0,0,0.6); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; color: #fff; }
.video-list-info { flex: 1; display: flex; flex-direction: column; justify-content: center; }
.video-list-title { font-size: 14px; color: #333; font-weight: 600; margin-bottom: 4px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.video-list-source { font-size: 11px; color: #999; }

/* ========== 视频弹窗 ========== */
.video-modal { position: fixed; inset: 0; background: rgba(0,0,0,0.85); z-index: 200; display: none; align-items: center; justify-content: center; }
.video-modal.active { display: flex; }
.video-modal-content { width: 100%; max-width: 500px; }
.video-modal-header { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; color: #fff; }
.video-modal-header span:first-child { font-size: 14px; font-weight: 600; }
.video-modal-close { font-size: 20px; cursor: pointer; }
#video-player { width: 100%; max-height: 70vh; background: #000; }

/* ========== 我的页面 ========== */
.profile-login { padding: 30px 24px; text-align: center; }
.login-icon { font-size: 48px; margin-bottom: 12px; }
.login-title { font-size: 18px; font-weight: 700; color: #333; margin-bottom: 6px; }
.login-desc { font-size: 13px; color: #999; margin-bottom: 24px; }
.login-tabs { display: flex; justify-content: center; gap: 8px; margin-bottom: 20px; }
.login-tab { padding: 6px 20px; border-radius: 20px; font-size: 14px; color: #666; cursor: pointer; border: 1px solid #ddd; }
.login-tab.active { background: #3A7BD5; color: #fff; border-color: #3A7BD5; }
.login-form { display: flex; flex-direction: column; gap: 12px; }
.login-form input, .login-form select { padding: 12px 14px; border: 1px solid #ddd; border-radius: 8px; font-size: 14px; outline: none; -webkit-appearance: none; }
.login-form input:focus, .login-form select:focus { border-color: #3A7BD5; }
.login-btn { padding: 12px; background: linear-gradient(135deg, #3A7BD5, #00D2FF); color: #fff; border: none; border-radius: 8px; font-size: 15px; font-weight: 600; cursor: pointer; }
.guest-btn { margin-top: 16px; font-size: 13px; color: #999; cursor: pointer; text-decoration: underline; }

.profile-card { background: linear-gradient(135deg, #3A7BD5, #00D2FF); padding: 24px; text-align: center; color: #fff; }
.profile-avatar { width: 64px; height: 64px; border-radius: 50%; background: rgba(255,255,255,0.2); display: flex; align-items: center; justify-content: center; font-size: 32px; margin: 0 auto 10px; border: 2px solid rgba(255,255,255,0.5); }
.profile-name { font-size: 18px; font-weight: 700; margin-bottom: 4px; }
.profile-meta { font-size: 13px; color: rgba(255,255,255,0.85); }

.profile-stats { display: flex; background: #fff; padding: 16px 0; margin-bottom: 8px; }
.stat-item { flex: 1; text-align: center; }
.stat-num { font-size: 20px; font-weight: 700; color: #3A7BD5; }
.stat-label { font-size: 12px; color: #999; margin-top: 2px; }

.data-filter { display: flex; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.filter-btn { padding: 4px 12px; border-radius: 14px; font-size: 12px; color: #666; background: #fff; border: 1px solid #eee; cursor: pointer; }
.filter-btn.active { background: #3A7BD5; color: #fff; border-color: #3A7BD5; }

.data-list { background: #fff; border-radius: 8px; overflow: hidden; }
.data-item { display: flex; align-items: center; padding: 12px 14px; border-bottom: 1px solid #F5F5F5; }
.data-item:last-child { border-bottom: none; }
.data-icon { font-size: 20px; margin-right: 10px; }
.data-info { flex: 1; }
.data-type { font-size: 12px; color: #666; margin-bottom: 2px; }
.data-value { font-size: 15px; font-weight: 700; color: #333; }
.data-status { font-size: 11px; padding: 2px 8px; border-radius: 6px; margin-left: 8px; }
.status-normal { background: #E8F5E9; color: #4CAF50; }
.status-warning { background: #FFF3E0; color: #FF9800; }
.status-danger { background: #FFEBEE; color: #F44336; }
.data-time { font-size: 11px; color: #bbb; margin-left: auto; }
.data-empty { padding: 24px; text-align: center; font-size: 13px; color: #999; }

.assess-intro { padding: 12px; background: #EBF3FF; border-radius: 8px; font-size: 12px; color: #3A7BD5; line-height: 1.6; margin-bottom: 10px; }
.assess-result-card { background: #fff; border-radius: 8px; padding: 16px; margin-bottom: 10px; }
.assess-score-big { font-size: 36px; font-weight: 800; color: #3A7BD5; }
.assess-level { font-size: 14px; font-weight: 600; color: #4CAF50; }
.assess-date { font-size: 11px; color: #aaa; }
.assess-bar-item { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.bar-name { font-size: 12px; color: #666; width: 60px; flex-shrink: 0; }
.bar-track { flex: 1; height: 6px; background: #F0F2F5; border-radius: 3px; overflow: hidden; }
.bar-fill { height: 100%; background: linear-gradient(90deg, #3A7BD5, #00D2FF); border-radius: 3px; transition: width 0.6s; }
.bar-score { font-size: 11px; color: #3A7BD5; width: 40px; text-align: right; flex-shrink: 0; }

.setting-item { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; background: #fff; border-bottom: 1px solid #F5F5F5; font-size: 14px; color: #333; cursor: pointer; }
.setting-item:first-child { border-radius: 8px 8px 0 0; }
.setting-item:last-child { border-radius: 0 0 8px 8px; border-bottom: none; }
.setting-item.logout { color: #F44336; justify-content: center; }
.setting-arrow { color: #ccc; font-size: 16px; }

/* ========== 弹窗通用 ========== */
.modal { position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 200; display: none; align-items: center; justify-content: center; }
.modal.active { display: flex; }
.modal-content { width: 90%; max-width: 480px; background: #fff; border-radius: 16px; max-height: 85vh; overflow-y: auto; animation: fadeIn 0.3s ease; }
.assess-content { max-height: 90vh; }
@keyframes fadeIn { from { opacity: 0; transform: scale(0.95); } to { opacity: 1; transform: scale(1); } }
.modal-header { display: flex; justify-content: space-between; align-items: center; padding: 16px 18px; border-bottom: 1px solid #F5F5F5; font-size: 16px; font-weight: 700; }
.modal-close { font-size: 20px; color: #999; cursor: pointer; }
.modal-body { padding: 16px 18px; }
.modal-body .form-row { margin-bottom: 12px; }
.modal-body .form-row label { display: block; font-size: 12px; color: #666; margin-bottom: 4px; }
.modal-body .form-row input, .modal-body .form-row select { width: 100%; padding: 10px 12px; border: 1px solid #ddd; border-radius: 8px; font-size: 14px; outline: none; -webkit-appearance: none; }
.modal-body .form-row input:focus, .modal-body .form-row select:focus { border-color: #3A7BD5; }
.save-btn { width: 100%; padding: 12px; background: linear-gradient(135deg, #3A7BD5, #00D2FF); color: #fff; border: none; border-radius: 8px; font-size: 15px; font-weight: 600; cursor: pointer; margin-top: 8px; }

.record-type { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.type-btn { padding: 6px 14px; border-radius: 16px; font-size: 13px; color: #666; background: #F5F7FA; border: 1px solid #eee; cursor: pointer; }
.type-btn.active { background: #3A7BD5; color: #fff; border-color: #3A7BD5; }

/* ========== 评测弹窗 ========== */
.assess-progress { height: 4px; background: #F0F2F5; border-radius: 2px; margin-bottom: 16px; overflow: hidden; }
.assess-progress-fill { height: 100%; background: linear-gradient(90deg, #3A7BD5, #00D2FF); border-radius: 2px; transition: width 0.3s; }
.assess-dim-tag { display: inline-block; padding: 2px 10px; border-radius: 10px; font-size: 11px; color: #fff; margin-bottom: 8px; }
.assess-question { font-size: 15px; color: #333; font-weight: 600; line-height: 1.5; margin-bottom: 16px; }
.assess-options { display: flex; flex-direction: column; gap: 8px; }
.assess-option { padding: 12px 14px; border: 1px solid #eee; border-radius: 8px; font-size: 14px; color: #555; cursor: pointer; transition: all 0.2s; }
.assess-option:hover, .assess-option.selected { border-color: #3A7BD5; background: #EBF3FF; color: #3A7BD5; }
.assess-nav { display: flex; justify-content: space-between; margin-top: 16px; }
.assess-nav-btn { padding: 10px 20px; border-radius: 8px; font-size: 14px; cursor: pointer; }
.assess-nav-btn.prev { background: #F5F7FA; color: #666; border: 1px solid #eee; }
.assess-nav-btn.next { background: linear-gradient(135deg, #3A7BD5, #00D2FF); color: #fff; border: none; }
.assess-nav-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.assess-intro-box { text-align: center; padding: 20px 0; }
.assess-intro-box h3 { font-size: 16px; color: #333; margin-bottom: 8px; }
.assess-intro-box p { font-size: 13px; color: #666; line-height: 1.6; margin-bottom: 20px; }
.assess-start-btn { padding: 12px 40px; background: linear-gradient(135deg, #3A7BD5, #00D2FF); color: #fff; border: none; border-radius: 8px; font-size: 15px; font-weight: 600; cursor: pointer; }

/* ========== 关于 ========== */
.about-body { text-align: center; padding: 30px 24px; }
.about-logo { font-size: 48px; margin-bottom: 10px; }
.about-title { font-size: 18px; font-weight: 700; color: #333; margin-bottom: 4px; }
.about-version { font-size: 12px; color: #999; margin-bottom: 16px; }
.about-desc { font-size: 13px; color: #666; line-height: 1.6; margin-bottom: 8px; }

/* ========== Toast ========== */
.toast { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); padding: 12px 24px; background: rgba(0,0,0,0.75); color: #fff; border-radius: 8px; font-size: 14px; z-index: 300; display: none; pointer-events: none; }
.toast.active { display: block; }

/* ========== 健康记录详情页 ========== */
.health-records-header { display: flex; align-items: center; padding: 16px; background: #fff; border-bottom: 1px solid #eee; position: sticky; top: 0; z-index: 10; }
.hr-back { font-size: 15px; color: #3A7BD5; cursor: pointer; padding: 6px 10px; margin-right: 10px; }
.hr-title { flex: 1; font-size: 17px; font-weight: 700; color: #333; text-align: center; }
.hr-count { font-size: 12px; color: #999; white-space: nowrap; }
.health-records-scroll { overflow-y: auto; height: calc(100vh - 120px); padding: 10px 0; }
.health-records-list { padding: 0 14px; }
.hr-item { display: flex; align-items: center; padding: 14px; background: #fff; border-radius: 10px; margin-bottom: 8px; box-shadow: 0 1px 4px rgba(0,0,0,0.04); }
.hr-left { display: flex; align-items: flex-start; flex: 1; min-width: 0; }
.hr-icon { font-size: 24px; margin-right: 10px; flex-shrink: 0; }
.hr-info { min-width: 0; }
.hr-type { font-size: 14px; font-weight: 600; color: #333; }
.hr-time { font-size: 12px; color: #999; margin-top: 2px; }
.hr-note { font-size: 11px; color: #888; margin-top: 4px; padding: 3px 8px; background: #f9f9f9; border-radius: 4px; display: inline-block; }
.hr-value { font-size: 18px; font-weight: 700; color: #333; text-align: right; }
.hr-unit { font-size: 12px; font-weight: 400; color: #999; }
.hr-status { font-size: 11px; padding: 2px 8px; border-radius: 6px; text-align: right; margin-top: 2px; }

/* ========== 健康数据摘要卡片 ========== */
.health-summary { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.summary-card { background: #fff; border-radius: 12px; padding: 14px 10px; text-align: center; box-shadow: 0 1px 6px rgba(0,0,0,0.05); cursor: pointer; transition: transform 0.15s; }
.summary-card:active { transform: scale(0.96); }
.sc-icon { font-size: 28px; margin-bottom: 4px; }
.sc-label { font-size: 12px; color: #999; margin-bottom: 6px; }
.sc-value { font-size: 20px; font-weight: 700; color: #333; }
.sc-status { font-size: 11px; padding: 2px 8px; border-radius: 6px; display: inline-block; margin-top: 4px; }

/* ========== 安全区域适配 ========== */
@supports (padding: max(0px)) {
  .bottom-nav { padding-bottom: max(8px, env(safe-area-inset-bottom)); }
}

/* ========== 健康小贴士卡片 ========== */
.tips-banner {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.tips-card {
  display: flex;
  align-items: flex-start;
  padding: 12px 14px;
  border-radius: 10px;
  background: #FAFBFC;
  border-left: 3px solid #3A7BD5;
}
.tips-card:nth-child(2) { border-left-color: #4CAF50; }
.tips-card:nth-child(3) { border-left-color: #FF9800; }
.tips-card-icon {
  flex-shrink: 0;
  width: 30px; height: 30px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px;
  margin-right: 10px;
}
.tips-card:nth-child(1) .tips-card-icon { background: #EBF3FF; }
.tips-card:nth-child(2) .tips-card-icon { background: #E8F5E9; }
.tips-card:nth-child(3) .tips-card-icon { background: #FFF3E0; }
.tips-card-text { flex: 1; font-size: 13px; color: #555; line-height: 1.6; }
.tips-card-title {
  font-size: 11px; color: #999; margin-bottom: 3px; font-weight: 500;
}
/* ========== TTS 播放按钮 & 方言选择器 ========== */
.tips-card-actions {
  display: flex;
  align-items: center;
  margin-left: 8px;
  flex-shrink: 0;
}

.tts-play-btn {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: #fff;
  border: none;
  padding: 5px 14px;
  border-radius: 16px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.tts-play-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 2px 10px rgba(102, 126, 234, 0.4);
}

.tts-play-btn:active {
  transform: scale(0.95);
}

.tts-play-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* 方言选择器 */
.tts-voice-selector {
  float: right;
}

.tts-voice-selector select {
  padding: 4px 10px;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  background: #fff;
  font-size: 12px;
  cursor: pointer;
  outline: none;
  color: #555;
}

.tts-voice-selector select:focus {
  border-color: #667eea;
}