/* ===== 安心陪诊 - 样式 ===== */
:root {
  --primary: #0F766E;
  --primary-dark: #115E59;
  --bg: #F4F6F5;
  --card: #FFFFFF;
  --text: #1F2937;
  --text-soft: #6B7280;
  --accent: #F59E0B;
  --danger: #DC2626;
  --success: #059669;
  --radius: 16px;
  --shadow: 0 2px 12px rgba(0,0,0,0.06);
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif;
  background: var(--bg); color: var(--text); min-height: 100vh;
}
#app { max-width: 480px; margin: 0 auto; min-height: 100vh; display: flex; flex-direction: column; }
.view { display: none; flex: 1; flex-direction: column; }
.view.active { display: flex; animation: fadeIn .25s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.hidden { display: none !important; }

/* ===== 顶栏 ===== */
.topbar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 16px; padding-top: calc(14px + env(safe-area-inset-top));
  background: var(--card); box-shadow: var(--shadow);
}
.topbar.parent { background: var(--primary); color: #fff; }
.topbar.parent .brand { color: #fff; }
.brand { font-size: 18px; font-weight: 700; }
.text-btn { border: none; background: none; color: var(--primary); font-size: 13px; cursor: pointer; padding: 4px 8px; }
.topbar.parent .text-btn { color: #CCFBF1; }

/* ===== 主区域 ===== */
.main { flex: 1; padding: 20px 16px; padding-bottom: calc(20px + env(safe-area-inset-bottom)); }

/* ===== Hero ===== */
.hero { text-align: center; padding: 40px 8px 24px; }
.hero-icon { font-size: 56px; margin-bottom: 14px; }
.hero h1 { font-size: 26px; line-height: 1.4; font-weight: 800; }
.sub { color: var(--text-soft); font-size: 15px; line-height: 1.7; margin-top: 10px; }

/* ===== 角色选择 ===== */
.role-cards { padding: 8px 0; }
.role-card {
  background: var(--card); border-radius: var(--radius); padding: 24px 20px;
  box-shadow: var(--shadow); margin-bottom: 14px; text-align: center; cursor: pointer;
  transition: transform .15s, box-shadow .15s;
}
.role-card:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(0,0,0,0.1); }
.role-emoji { font-size: 46px; margin-bottom: 12px; }
.role-card b { font-size: 18px; display: block; margin-bottom: 6px; }
.role-card p { font-size: 14px; color: var(--text-soft); line-height: 1.6; }

/* ===== 子女端 ===== */
.child-hero { padding: 12px 4px 20px; }
.child-hero h2 { font-size: 22px; line-height: 1.5; }
.family-card {
  background: var(--card); border-radius: var(--radius); padding: 20px;
  box-shadow: var(--shadow); margin-bottom: 18px;
}
.family-empty { text-align: center; padding: 16px 0; }
.family-empty p { color: var(--text-soft); font-size: 15px; margin-bottom: 14px; }

.quick-actions { display: flex; gap: 10px; }
.qa-card {
  flex: 1; background: var(--card); border-radius: var(--radius); padding: 18px 10px;
  box-shadow: var(--shadow); text-align: center; cursor: pointer; transition: transform .15s, box-shadow .15s;
}
.qa-card:hover { transform: translateY(-2px); box-shadow: 0 5px 14px rgba(0,0,0,0.1); }
.qa-emoji { font-size: 28px; display: block; margin-bottom: 8px; }
.qa-card b { font-size: 14px; display: block; margin-bottom: 4px; }
.qa-card p { font-size: 11px; color: var(--text-soft); line-height: 1.5; }

/* ===== 父母端大字模式 ===== */
.parent-mode { padding-top: 24px; }
.parent-welcome { text-align: center; margin-bottom: 28px; }
.big-icon { font-size: 64px; margin-bottom: 12px; }
.big-text { font-size: 26px; font-weight: 800; line-height: 1.5; }
.parent-buttons { display: flex; flex-direction: column; gap: 14px; }
.pbtn {
  border: none; border-radius: 20px; padding: 24px 20px;
  font-size: 22px; font-weight: 700; cursor: pointer; text-align: center;
  line-height: 1.6; transition: transform .1s, box-shadow .15s;
}
.pbtn:hover { box-shadow: 0 6px 18px rgba(0,0,0,0.12); }
.pbtn:active { transform: scale(0.98); }
.pbtn small { font-size: 15px; font-weight: 400; opacity: .85; }
.pbtn-primary { background: var(--primary); color: #fff; box-shadow: 0 4px 14px rgba(15,118,110,0.3); }
.pbtn-soft { background: var(--card); color: var(--text); box-shadow: var(--shadow); }
.pbtn-ghost { background: none; color: var(--text-soft); box-shadow: none; font-size: 16px; }
.parent-tip { margin-top: 28px; text-align: center; font-size: 14px; color: var(--text-soft); line-height: 1.7; }

/* ===== 就医导航 ===== */
.step-progress { height: 8px; background: #E5E7EB; border-radius: 999px; overflow: hidden; margin-bottom: 20px; }
.step-fill { height: 100%; background: var(--primary); border-radius: 999px; transition: width .3s; }
.step-card {
  background: var(--card); border-radius: 20px; padding: 28px 20px; text-align: center;
  box-shadow: var(--shadow); margin-bottom: 20px; min-height: 260px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.step-num { font-size: 16px; color: var(--text-soft); margin-bottom: 10px; }
.step-title { font-size: 30px; font-weight: 800; margin-bottom: 16px; }
.step-desc { font-size: 20px; line-height: 1.7; color: var(--text); margin-bottom: 16px; }
.step-icon { font-size: 56px; }
.nav-controls { display: flex; flex-direction: column; gap: 12px; }

/* ===== 医嘱转写 ===== */
.scan-upload {
  background: var(--card); border: 2px dashed #D1D5DB; border-radius: var(--radius);
  padding: 44px 20px; text-align: center; margin-bottom: 16px;
}
.upload-icon { font-size: 56px; margin-bottom: 16px; }
.scan-upload p { font-size: 16px; margin-bottom: 8px; }
.med-card {
  background: var(--card); border-radius: var(--radius); padding: 20px;
  box-shadow: var(--shadow); margin-bottom: 16px; border-left: 4px solid var(--success);
}
.med-card h3 { font-size: 18px; margin-bottom: 12px; }
.med-item { padding: 8px 0; border-bottom: 1px dashed #F0F0F5; }
.med-item:last-child { border-bottom: none; }
.med-name { font-size: 16px; font-weight: 700; }
.med-dose { font-size: 14px; color: var(--text); margin-top: 4px; }
.med-note { font-size: 13px; color: var(--text-soft); margin-top: 4px; }

/* ===== 按钮 ===== */
.btn-primary {
  width: 100%; border: none; border-radius: 14px; background: var(--primary); color: #fff;
  padding: 16px; font-size: 17px; font-weight: 700; cursor: pointer;
  transition: background .15s, transform .1s, box-shadow .15s; box-shadow: 0 4px 14px rgba(15,118,110,0.25);
}
.btn-primary:hover { background: var(--primary-dark); }
.btn-primary:active { transform: scale(0.98); }
.btn-ghost {
  width: 100%; border: 1.5px solid #E5E7EB; background: var(--card); color: var(--text);
  padding: 14px; border-radius: 14px; font-size: 15px; cursor: pointer; margin-top: 8px;
}
.hint { font-size: 12px; color: var(--text-soft); text-align: center; margin-top: 8px; line-height: 1.6; }

/* ===== 页脚 ===== */
.footer { padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); text-align: center; }
.footer-text { font-size: 11px; color: #9CA3AF; }
