:root {
  --tcm-green: #2f5d50;
  --tcm-green-dark: #23473d;
  --tcm-gold: #c8a15a;
  --tcm-bg: #f7f5f0;
  --tcm-red: #9c3d2e;
  --tcm-ink: #333333;
}

body {
  background: var(--tcm-bg);
  color: var(--tcm-ink);
  font-family: "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
}

/* 导航 */
.navbar {
  background: linear-gradient(90deg, var(--tcm-green-dark), var(--tcm-green));
}
.navbar-brand {
  font-weight: 700;
  letter-spacing: 1px;
}
.navbar .nav-link {
  color: rgba(255, 255, 255, 0.92) !important;
}
.navbar .nav-link:hover {
  color: #fff !important;
}

/* 页脚 */
.footer {
  background: var(--tcm-green-dark);
  color: #d8e2dd;
  margin-top: auto;
}
.footer .disclaimer {
  font-size: 0.8rem;
  margin: 0;
  line-height: 1.7;
}

/* 卡片 */
.card {
  border: none;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
  border-radius: 10px;
}
.card-header {
  background: #fff;
  border-bottom: 1px solid #eee;
  font-weight: 600;
}

/* 按钮 */
.btn-primary {
  background: var(--tcm-green);
  border-color: var(--tcm-green);
}
.btn-primary:hover,
.btn-primary:focus {
  background: var(--tcm-green-dark);
  border-color: var(--tcm-green-dark);
}
.btn-outline-primary {
  color: var(--tcm-green);
  border-color: var(--tcm-green);
}
.btn-outline-primary:hover {
  background: var(--tcm-green);
  border-color: var(--tcm-green);
}

/* 版块标题 */
.section-title {
  color: var(--tcm-green);
  border-left: 4px solid var(--tcm-gold);
  padding-left: 0.6rem;
  margin: 1.6rem 0 0.9rem;
  font-weight: 700;
  font-size: 1.05rem;
}

/* 照片预览 */
.photo-preview {
  max-width: 240px;
  border-radius: 8px;
  border: 1px solid #e3ddd0;
  margin-top: 0.6rem;
}

/* 处方表 */
.prescription-table thead th {
  background: var(--tcm-green);
  color: #fff;
  border: none;
}

/* 诊断结果框 */
.diagnosis-box {
  background: #fff;
  border: 1px solid #e5ded2;
  border-radius: 10px;
}
.diagnosis-box .diag-label {
  color: var(--tcm-green);
  font-weight: 600;
}

/* 警示/免责 */
.warning-box {
  border-left: 4px solid var(--tcm-red);
  background: #fdf1ee;
  padding: 0.8rem 1rem;
  border-radius: 6px;
  color: #7a2c1f;
  font-size: 0.9rem;
  line-height: 1.7;
}

.pre-line {
  white-space: pre-line;
}

/* 首页 hero */
.hero {
  background: linear-gradient(135deg, #f4efe4, #e8f0eb);
  border-radius: 14px;
  padding: 3rem 2rem;
}
.hero h1 {
  color: var(--tcm-green-dark);
  font-weight: 800;
}

.feature-icon {
  font-size: 2rem;
}

.badge-tcm {
  background: #e8f0eb;
  color: var(--tcm-green);
}

/* 移动端分步问诊 */
.form-step .section-title {
  margin-top: 0;
}
.step-nav {
  position: sticky;
  bottom: 0;
  z-index: 20;
  background: var(--tcm-bg);
  padding: 0.75rem 0;
  display: flex;
  gap: 0.75rem;
  border-top: 1px solid #e7e2d7;
}
.step-nav .btn {
  flex: 1;
  padding: 0.8rem 0.5rem;
  font-size: 1.05rem;
}
@media (min-width: 768px) {
  .step-nav {
    max-width: 760px;
    margin: 0 auto;
  }
}

/* ===== 手机 App 式整体布局 ===== */
.app-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: linear-gradient(90deg, var(--tcm-green-dark), var(--tcm-green));
  color: #fff;
  padding: 0.7rem 0;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.12);
}
.app-header .brand {
  color: #fff;
  font-weight: 700;
  font-size: 1.15rem;
  text-decoration: none;
  letter-spacing: 1px;
  white-space: nowrap;
}
.desktop-nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}
.desktop-nav a {
  color: rgba(255, 255, 255, 0.92);
  text-decoration: none;
  font-size: 0.95rem;
  white-space: nowrap;
}
.desktop-nav a:hover {
  color: #fff;
}
.mobile-user {
  display: none;
  font-size: 1.4rem;
  text-decoration: none;
  color: #fff;
  line-height: 1;
}

.main-wrap {
  padding: 1rem 0 1.25rem;
  flex: 1 0 auto;
}

.tabbar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  z-index: 31;
  background: #fff;
  border-top: 1px solid #e7e2d7;
  display: flex;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.06);
  padding-bottom: env(safe-area-inset-bottom);
}
.tabbar-item {
  flex: 1;
  text-align: center;
  padding: 0.5rem 0 0.35rem;
  color: #8a8a8a;
  text-decoration: none;
  font-size: 0.72rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.tabbar-item .tab-icon {
  font-size: 1.35rem;
  line-height: 1;
}
.tabbar-item.active {
  color: var(--tcm-green);
  font-weight: 600;
}

@media (max-width: 767.98px) {
  .desktop-nav { display: none !important; }
  .mobile-user { display: inline-block; }
  body { font-size: 15px; }
  .main-wrap { padding-bottom: 4.75rem; }
  .hero { padding: 1.75rem 1.25rem; }
  .btn-lg { padding: 0.7rem 1rem; font-size: 1.05rem; }
}
@media (min-width: 768px) {
  .tabbar { display: none !important; }
  .mobile-user { display: none !important; }
}

/* 列表链接（“我的”页等） */
.list-link {
  text-decoration: none;
  color: var(--tcm-ink);
}
.list-link:hover {
  color: var(--tcm-green);
}

/* 手机屏幕展示形式 */
.app-shell {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--tcm-bg);
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.10);
}
@media (min-width: 768px) {
  body { background: #e4dfd2; }
}
