/* ---------- Reset & base ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; border: 0 solid #e5e7eb; }
html { line-height: 1.5; -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
body { font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif; color: #1e293b; }
h1, h2, h3, h4, h5, h6, p, figure, blockquote, dl, dd { margin: 0; }
ul, ol, menu { list-style: none; margin: 0; padding: 0; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; margin: 0; }
button, select { text-transform: none; }
button { -webkit-appearance: button; background-color: transparent; background-image: none; cursor: pointer; }
button:disabled { cursor: default; }
a { color: inherit; text-decoration: inherit; }
img, svg, video, canvas { display: block; vertical-align: middle; }
img, video { max-width: 100%; height: auto; }

/* ---------- 工具类 ---------- */
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* 滚动进入动画 */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1), transform 0.6s cubic-bezier(0.4, 0, 0.2, 1); }
.reveal.active { opacity: 1; transform: translateY(0); }

/* ---------- 内页统一页头（report / health / feedback / exercise） ---------- */
.app-header { position: sticky; top: 0; z-index: 20; background: linear-gradient(90deg, #2563eb 0%, #3b82f6 50%, #0ea5e9 100%); color: #fff; box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1); }
.app-header-inner { max-width: 42rem; margin: 0 auto; padding: 1rem 1.25rem; display: flex; align-items: center; gap: 0.75rem; }
.back-link { color: rgba(255, 255, 255, 0.9); font-size: 2.5rem; line-height: 1; padding-right: 0.25rem; font-weight: 300; transition: color 0.15s ease; }
.back-link:hover { color: #fff; }
.app-header-main { flex: 1; display: flex; align-items: center; gap: 0.75rem; }
.app-header-icon { width: 2.25rem; height: 2.25rem; border-radius: 0.75rem; background: rgba(255, 255, 255, 0.2); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); display: flex; align-items: center; justify-content: center; font-size: 1.125rem; box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, 0.05); }
.app-header-title { font-size: 1.125rem; font-weight: 700; letter-spacing: -0.025em; }
.app-header-sub { font-size: 0.875rem; color: rgba(255, 255, 255, 0.7); }

/* ---------- 页面容器 ---------- */
.page-wrap { max-width: 42rem; margin: 0 auto; padding: 1.5rem 1.25rem 2rem; display: flex; flex-direction: column; gap: 1.25rem; }

/* ---------- 通用卡片 ---------- */
.card { background: #fff; border-radius: 1.5rem; padding: 1.5rem; box-shadow: 0 4px 24px -6px rgba(59, 130, 246, 0.15); border: 1px solid #f8fafc; }
.card-head { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 1rem; }
.card-head--gap-lg { margin-bottom: 1.25rem; }
.card-title { font-size: 1.25rem; font-weight: 700; color: #1e293b; }

/* 卡片左上角圆角图标底 */
.icon-badge { width: 2.5rem; height: 2.5rem; border-radius: 0.75rem; display: flex; align-items: center; justify-content: center; flex: none; }
.icon-badge--gradient-blue-indigo { background: linear-gradient(135deg, #eff6ff 0%, #e0e7ff 100%); font-size: 1.125rem; }
.icon-badge--gradient-blue-teal { background: linear-gradient(135deg, #eff6ff 0%, #f0fdfa 100%); font-size: 1.125rem; }
.icon-badge--gradient-violet-sky { background: linear-gradient(135deg, #f5f3ff 0%, #f0f9ff 100%); font-size: 1.125rem; }
.icon-badge--gradient-indigo-purple { background: linear-gradient(135deg, #eef2ff 0%, #f3e8ff 100%); font-size: 1.125rem; }
.icon-badge--gradient-amber-orange { background: linear-gradient(135deg, #fffbeb 0%, #ffedd5 100%); font-size: 1.125rem; }
.icon-badge--blue { background: #eff6ff; font-size: 1.25rem; }
.icon-badge--teal { background: #f0fdfa; font-size: 1.25rem; }

/* ---------- 空状态 / 占位提示 ---------- */
.empty-hint { text-align: center; color: #94a3b8; padding: 1rem 0; }
.empty-hint--lg { padding: 4rem 0; font-size: 0.875rem; }
.empty-hint--md { padding: 1.5rem 0; font-size: 0.875rem; }

/* ---------- 通用渐变主按钮（蓝→天蓝） ---------- */
.btn-primary { display: block; width: 100%; padding: 0.875rem 0; background: linear-gradient(90deg, #2563eb 0%, #0ea5e9 100%); color: #fff; border: none; border-radius: 0.75rem; font-weight: 700; font-size: 1rem; text-align: center; transition: all 0.15s ease; box-shadow: 0 6px 20px -6px rgba(59, 130, 246, 0.5); }
.btn-primary:hover { background: linear-gradient(90deg, #1d4ed8 0%, #2563eb 100%); box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1); }

/* ---------- 通用弹窗 ---------- */
.modal-overlay { position: fixed; inset: 0; display: none; align-items: center; justify-content: center; padding: 1.25rem; }
.modal-overlay.open { display: flex; }
.modal-card { width: 100%; background: #fff; border-radius: 1.5rem; overflow: hidden; }

/* ---------- 表单公共样式 ---------- */
.field-label { display: block; font-size: 1.125rem; font-weight: 600; color: #334155; }
.field-req { color: #f87171; }
.field-hint { font-size: 0.875rem; color: #94a3b8; font-weight: 400; margin-left: 0.25rem; }
.field-err { color: #ef4444; font-size: 0.875rem; font-weight: 400; margin-left: 0.5rem; }
.field-input { width: 100%; padding: 0.75rem 1rem; border: 1px solid #e2e8f0; border-radius: 0.75rem; font-size: 1rem; background: rgba(248, 250, 252, 0.5); transition: border-color 0.15s ease, box-shadow 0.15s ease; outline: none; }
.field-input:focus { border-color: #60a5fa; box-shadow: 0 0 0 2px rgba(219, 234, 254, 1); }
textarea.field-input { resize: none; }
