/* ============================================================
   江苏高考志愿填报分析系统 — 样式表
   配色：橘黄 #F47920 / 米黄 #FFF8F0 / 白色 #FFFFFF
   设计：手机端优先、卡片式布局、清晰简洁
   ============================================================ */

:root {
  --primary-color: #ff7a1a;
  --light-color: #fff3e8;
}

/* --- Reset & Base --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  background-color: #f7f2eb;
  color: #333;
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* --- Container --- */
.container {
  max-width: 480px;
  margin: 0 auto;
  padding: 16px;
  min-height: 100vh;
}

/* --- Page Visibility --- */
.page {
  display: none;
}

.page.active {
  display: block;
}

/* --- Typography --- */
h1, h2, h3, h4 {
  color: #333;
  font-weight: 600;
  line-height: 1.4;
}

h1 { font-size: 1.5rem; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.1rem; }

p { margin-bottom: 8px; }

/* --- Buttons --- */
.btn {
  display: inline-block;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  transition: background-color 0.15s, transform 0.1s;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  min-height: 48px;
  padding: 12px 24px;
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background-color: #F47920;
  color: #fff;
}

.btn-primary:hover,
.btn-primary:active {
  background-color: #E06810;
}

.btn-outline {
  background-color: #fff;
  color: #F47920;
  border: 1.5px solid #F47920;
}

.btn-outline:hover,
.btn-outline:active {
  background-color: #FFF0E6;
}

.btn-lg {
  padding: 14px 32px;
  font-size: 1.1rem;
}

.btn-full {
  width: 100%;
  display: block;
}

.btn-back {
  background: none;
  border: none;
  font-size: 0.95rem;
  color: #F47920;
  cursor: pointer;
  padding: 8px 0;
  -webkit-tap-highlight-color: transparent;
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.85rem;
  min-height: 36px;
}

/* --- Cards --- */
.card {
  background: #fff;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 14px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
  border: 1px solid #F0E0D0;
}

.card-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: #333;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #F0E0D0;
}

/* ============================================================
   首页
   ============================================================ */

.home-hero {
  text-align: center;
  padding: 34px 18px 24px;
  background:
    radial-gradient(circle at top center, rgba(255, 122, 26, 0.12), transparent 45%),
    linear-gradient(180deg, #fff7ed 0%, #f8f1e8 100%);
}

.brand-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 13px;
  margin-bottom: 14px;
  border-radius: 999px;
  background: #fff3e8;
  border: 1px solid rgba(255, 122, 26, 0.18);
  color: #f97316;
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 6px 16px rgba(255, 122, 26, 0.08);
}

.brand-icon {
  font-size: 15px;
  line-height: 1;
}

.home-title {
  margin: 0;
  font-size: 25px;
  line-height: 1.28;
  font-weight: 900;
  color: #ff6a00;
  letter-spacing: -0.5px;
}

.home-subtitle {
  margin: 12px auto 0;
  font-size: 14px;
  line-height: 1.65;
  color: #6f675f;
  white-space: nowrap;
}

.home-features {
  background: #fff;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 24px;
  border: 1px solid #F0E0D0;
}

.feature-item {
  display: flex;
  align-items: flex-start;
  padding: 8px 0;
  border-bottom: 1px solid #FFF8F0;
}

.feature-item:last-child {
  border-bottom: none;
}

.feature-icon {
  font-size: 1.1rem;
  margin-right: 10px;
  flex-shrink: 0;
  width: 28px;
  text-align: center;
}

.feature-text {
  font-size: 0.92rem;
  color: #444;
  line-height: 1.5;
}

.home-footer {
  text-align: center;
  color: #aaa;
  font-size: 0.8rem;
  padding: 24px 0 16px;
}

/* ============================================================
   信息填写页
   ============================================================ */

.page-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0 4px;
  margin-bottom: 12px;
}

.page-title {
  color: #F47920;
  flex: 1;
}

.page-desc {
  font-size: 0.9rem;
  color: #888;
  margin-bottom: 16px;
  line-height: 1.5;
}

.form-section {
  background: #fff;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 14px;
  border: 1px solid #F0E0D0;
}

.section-title {
  font-size: 1rem;
  font-weight: 600;
  color: #333;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.required {
  color: #F47920;
  font-weight: 700;
}

.optional-tag {
  font-size: 0.75rem;
  font-weight: 400;
  color: #999;
  background: #F5F5F5;
  padding: 2px 8px;
  border-radius: 4px;
}

/* --- Form Elements --- */
.form-group {
  margin-bottom: 16px;
}

.form-group:last-child {
  margin-bottom: 0;
}

.form-label {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  color: #444;
  margin-bottom: 6px;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid #E0D5C8;
  border-radius: 8px;
  font-size: 0.95rem;
  color: #333;
  background: #FFFAF5;
  transition: border-color 0.15s;
  -webkit-appearance: none;
  font-family: inherit;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: #F47920;
  background: #fff;
}

.form-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23999' d='M1.41 0L6 4.58 10.59 0 12 1.41l-6 6-6-6z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

.form-textarea {
  resize: vertical;
  min-height: 80px;
}

.form-hint {
  display: block;
  font-size: 0.8rem;
  color: #999;
  margin-top: 4px;
}

.form-error {
  display: none;
  font-size: 0.82rem;
  color: #E53935;
  margin-top: 4px;
}

.form-error.show {
  display: block;
}

.form-input.error,
.form-select.error {
  border-color: #E53935;
}

/* --- Radio Group --- */
.radio-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.radio-item {
  display: flex;
  align-items: center;
  padding: 10px 16px;
  border: 1.5px solid #E0D5C8;
  border-radius: 8px;
  cursor: pointer;
  background: #FFFAF5;
  transition: all 0.15s;
  -webkit-tap-highlight-color: transparent;
}

.radio-item:has(input:checked) {
  border-color: #F47920;
  background: #FFF0E6;
  color: #F47920;
}

.radio-item input[type="radio"] {
  display: none;
}

.radio-label {
  font-size: 0.9rem;
  font-weight: 500;
}

/* --- Chip Group (Multi-select) --- */
.chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip-item {
  display: flex;
  align-items: center;
  padding: 8px 14px;
  border: 1.5px solid #E0D5C8;
  border-radius: 20px;
  cursor: pointer;
  background: #FFFAF5;
  font-size: 0.85rem;
  color: #555;
  transition: all 0.15s;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

.chip-item:has(input:checked) {
  border-color: #F47920;
  background: #FFF0E6;
  color: #F47920;
}

.chip-item input[type="checkbox"] {
  display: none;
}

/* ============================================================
   分析结果页
   ============================================================ */

.result-header {
  text-align: center;
  padding: 12px 0 8px;
  margin-bottom: 14px;
}

.result-header .page-title {
  margin-bottom: 6px;
}

.result-desc {
  font-size: 0.85rem;
  color: #999;
  line-height: 1.5;
}

/* --- 学生基本信息卡片 --- */
.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.info-item {
  padding: 6px 0;
}

.info-item.full-width {
  grid-column: 1 / -1;
}

.info-label {
  font-size: 0.78rem;
  color: #999;
  margin-bottom: 2px;
}

.info-value {
  font-size: 0.92rem;
  color: #333;
  font-weight: 500;
}

.info-value.muted {
  color: #bbb;
  font-weight: 400;
}

/* --- 位次定位卡片 --- */
.card-position {
  border-left: 4px solid #F47920;
}

.position-text {
  font-size: 0.9rem;
  color: #555;
  line-height: 1.7;
}

/* --- 推荐分类标题 --- */
.section-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  padding: 8px 0 0;
}

.section-header .section-icon {
  font-size: 1.3rem;
}

.section-header h3 {
  color: #333;
  font-size: 1.1rem;
}

.section-header .section-count {
  font-size: 0.85rem;
  color: #999;
  font-weight: 400;
}

.section-subtitle {
  font-size: 0.85rem;
  color: #888;
  margin-bottom: 12px;
  line-height: 1.5;
}

/* --- 推荐卡片 --- */
.recommend-card {
  background: #fff;
  border-radius: 16px;
  padding: 16px 14px;
  margin-bottom: 12px;
  border: 1px solid #eee1d5;
  box-shadow: 0 2px 8px rgba(89, 56, 28, 0.06);
  position: relative;
  overflow: hidden;
}

.recommend-card.chong {
  border-left: 4px solid #ef4444;
}

.recommend-card.wen {
  border-left: 4px solid #f59e0b;
}

.recommend-card.bao {
  border-left: 4px solid #22c55e;
}

.rc-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 8px;
}

.rc-seq {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  font-weight: 800;
  line-height: 1;
}

.index-rush { background: #fff1f0; color: #ef4444; }
.index-stable { background: #fff7df; color: #f59e0b; }
.index-safe { background: #ecfdf3; color: #22c55e; }

.rc-school-name {
  font-size: 1rem;
  font-weight: 600;
  color: #333;
  flex: 1;
}

.rc-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #fff;
  flex-shrink: 0;
  margin-left: 8px;
}

.badge-chong { background: #FF9800; }
.badge-wen { background: #4CAF50; }
.badge-bao { background: #2196F3; }

.rc-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

.rc-tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  background: #F5F0EB;
  color: #777;
}

.rc-info-row {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
  font-size: 0.85rem;
  color: #555;
}

.rc-info-row .label {
  color: #999;
  flex-shrink: 0;
}

.rc-info-row .value {
  text-align: right;
  font-weight: 500;
  color: #333;
}

.rc-divider {
  border: none;
  border-top: 1px dashed #F0E0D0;
  margin: 8px 0;
}

.rc-reason {
  font-size: 0.82rem;
  color: #777;
  line-height: 1.5;
  margin-bottom: 10px;
  padding: 8px;
  background: #FFFAF5;
  border-radius: 6px;
}

.rc-risk {
  font-size: 0.82rem;
  margin-bottom: 10px;
}

.risk-high { color: #E53935; }
.risk-medium { color: #FF9800; }
.risk-low { color: #4CAF50; }

.rc-btn-detail {
  width: 100%;
  padding: 10px;
  border: 1.5px solid #F47920;
  border-radius: 8px;
  background: #fff;
  color: #F47920;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  -webkit-tap-highlight-color: transparent;
}

.rc-btn-detail:hover,
.rc-btn-detail:active {
  background: #FFF0E6;
}

/* ===== v0.3 优化卡片新增样式 ===== */

/* 标签容器 */
.rc-tags-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

/* 通用 badge */
.badge-tag {
  display: inline-block;
  border-radius: 999px;
  padding: 3px 9px;
  font-size: 0.7rem;
  line-height: 1.4;
  font-weight: 500;
  white-space: nowrap;
}

/* 城市 */
.badge-city { background: #eef2ff; color: #4338ca; }
/* 校区 */
.badge-campus { background: #fef3c7; color: #92400e; }
/* 公办 */
.badge-public { background: #dcfce7; color: #15803d; }
/* 民办 */
.badge-private { background: #ffedd5; color: #c2410c; }
/* 985 */
.badge-985 { background: #fff3c4; color: #9a6700; }
/* 211 */
.badge-211 { background: #dbeafe; color: #1d4ed8; }
/* 双一流 */
.badge-dbl { background: #ede9fe; color: #6d28d9; }
/* 普通本科 */
.badge-normal { background: #f3f4f6; color: #4b5563; }
/* 职业本科/专科 */
.badge-vocational { background: #e0f2fe; color: #0369a1; }
/* 中外合作 */
.badge-sino { background: #fee2e2; color: #b91c1c; }
/* 选科 */
.badge-subject { background: #ccfbf1; color: #0f766e; }

/* 旧标签保留兼容 */
.rc-tag-subj {
  background: #E8F0FE;
  color: #2B6CB0;
}

/* 2×2 数据网格 */
.rc-data-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin: 10px 0;
}
.rc-data-item {
  background: #FAFAFA;
  border-radius: 6px;
  padding: 8px 10px;
}
.rc-data-label {
  display: block;
  font-size: 0.7rem;
  color: #999;
  margin-bottom: 2px;
}
.rc-data-value {
  display: block;
  font-size: 0.92rem;
  font-weight: 700;
  color: #333;
}

/* 专业预览区 */
.rc-major-preview {
  margin: 10px 0;
  padding: 10px 12px;
  background: #F8F8F8;
  border-radius: 8px;
  font-size: 0.82rem;
  line-height: 1.5;
  max-height: 3.2em;
  overflow: hidden;
  position: relative;
}
.rc-major-label {
  color: #999;
}
.rc-major-text {
  color: #555;
}
.rc-major-more {
  display: block;
  margin-top: 4px;
  font-size: 0.75rem;
  color: #F47920;
  font-weight: 500;
}

/* 风险提示区 */
.rc-risk-note {
  margin: 10px 0;
  padding: 8px 10px;
  background: #FFFAF3;
  border-radius: 6px;
  font-size: 0.78rem;
  color: #8B6914;
  line-height: 1.5;
}

/* ===== 详情弹窗优化 ===== */
.modal-hero {
  text-align: center;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #F0E0D0;
}
.modal-hero-name {
  font-size: 1.2rem;
  font-weight: 700;
  color: #333;
}
.modal-hero-group {
  font-size: 0.9rem;
  color: #777;
  margin: 4px 0 8px;
}

/* 基础信息网格 */
.detail-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 12px;
}
.detail-info-item {
  display: flex;
  justify-content: space-between;
  padding: 5px 0;
  font-size: 0.84rem;
  border-bottom: 1px dotted #F0E0D0;
}
.dil {
  color: #999;
  flex-shrink: 0;
}
.div {
  font-weight: 500;
  color: #333;
  text-align: right;
}

/* 专业明细列表 */
.detail-major-list {
  max-height: none;
  overflow-y: visible;
}
.detail-major-item {
  padding: 10px 0;
  border-bottom: 1px solid #F5F0EB;
}
.detail-major-item:last-child {
  border-bottom: none;
}
.major-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: #333;
}
.major-meta {
  font-size: 0.76rem;
  color: #888;
  margin-top: 3px;
}
.major-adm {
  color: #F47920;
  font-weight: 500;
}

/* ===== 分页控制 ===== */
.pagination-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin: 14px 0 22px;
}
.pager-btn {
  min-width: 80px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid #F59E0B;
  background: #FFF7ED;
  color: #C2410C;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  text-align: center;
  -webkit-tap-highlight-color: transparent;
  transition: all 0.15s;
}
.pager-btn:active:not(:disabled) {
  background: #FED7AA;
}
.pager-btn:disabled {
  border-color: #E5E7EB;
  background: #F9FAFB;
  color: #9CA3AF;
  cursor: default;
}
.pager-info {
  font-size: 0.82rem;
  color: #6B7280;
  white-space: nowrap;
}
.pager-loading {
  text-align: center;
  padding: 10px;
  font-size: 0.82rem;
  color: #999;
}
.no-category-result {
  text-align: center;
  padding: 16px;
  font-size: 0.85rem;
  color: #9CA3AF;
  background: #FAFAFA;
  border-radius: 8px;
}

/* ================================
   结果页头部 v0.3
================================ */
.report-header {
  padding: 22px 16px 18px;
  background:
    radial-gradient(circle at 20% 0%, rgba(255, 153, 68, 0.18), transparent 32%),
    linear-gradient(180deg, #fff8ef 0%, #f8f1e8 100%);
  border-radius: 0 0 22px 22px;
}

.report-hero {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}

.hero-icon {
  width: 58px; height: 58px; flex: 0 0 58px;
  border-radius: 20px;
  background: linear-gradient(135deg, #fff 0%, #fff3e6 100%);
  border: 1px solid rgba(255, 122, 26, 0.18);
  box-shadow: 0 10px 24px rgba(255, 122, 26, 0.14);
  display: flex; align-items: center; justify-content: center;
}

.hero-icon-paper {
  width: 28px; height: 34px;
  border: 3px solid #ff7a1a; border-radius: 7px;
  position: relative; background: #fffaf5;
}

.hero-icon-paper::before {
  content: "";
  position: absolute; top: -8px; left: 6px;
  width: 14px; height: 8px;
  border: 3px solid #ff7a1a; border-bottom: 0;
  border-radius: 6px 6px 0 0; background: #fffaf5;
}

.hero-icon-paper span {
  display: block; height: 3px; margin: 6px 5px 0;
  border-radius: 999px; background: rgba(255, 122, 26, 0.55);
}

.hero-text { min-width: 0; }

.hero-brand {
  display: inline-block;
  font-size: 14px;
  font-weight: 800;
  color: #fff;
  background: #ff7a1a;
  padding: 4px 12px;
  border-radius: 8px;
  margin-bottom: 8px;
  letter-spacing: 1px;
}

.hero-text h1 {
  margin: 0; font-size: 23px; line-height: 1.18;
  font-weight: 800; color: #2b2b2b; letter-spacing: -0.5px;
}

.hero-text p {
  margin: 8px 0 0; font-size: 13px; line-height: 1.55; color: #8a8177;
}

.data-source-card {
  background: rgba(255,255,255,0.72);
  border: 1px solid rgba(255,122,26,0.12);
  border-radius: 14px; padding: 10px 12px;
  margin-bottom: 12px; backdrop-filter: blur(8px);
}

.source-row {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 10px; padding: 4px 0; font-size: 12px; line-height: 1.45;
}

.source-label { flex: 0 0 auto; color: #a06a38; font-weight: 600; }

.source-value { color: #6b625a; text-align: right; }

.match-summary-card {
  background: #ffffff; border-radius: 20px; padding: 18px 14px 16px;
  border: 1px solid #f0e5d8;
  box-shadow: 0 12px 30px rgba(89,56,28,0.08); margin-bottom: 14px;
}

.match-total {
  display: flex; align-items: baseline; justify-content: center;
  flex-wrap: wrap; gap: 6px; text-align: center; color: #2f2f2f;
}

.match-prefix, .match-suffix { font-size: 15px; font-weight: 600; }

.match-total strong {
  font-size: 38px; line-height: 1; font-weight: 900;
  color: #ff6a00; letter-spacing: -1px;
}

.match-subtitle {
  margin-top: 8px; font-size: 12px; line-height: 1.45;
  color: #9a8f84; text-align: center;
}

.match-stats { display: grid; grid-template-columns: repeat(3,1fr); gap: 9px; margin-top: 16px; }

.match-stat {
  min-width: 0; border-radius: 15px; padding: 11px 8px;
  display: flex; align-items: center; gap: 8px; border: 1px solid transparent;
}

.match-stat .stat-icon {
  width: 30px; height: 30px; flex: 0 0 30px; border-radius: 999px;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 13px; font-weight: 800;
}

.stat-info { min-width: 0; }

.stat-info span { display: block; font-size: 11px; color: #6f665e; white-space: nowrap; }

.stat-info strong {
  display: block; margin-top: 2px; font-size: 20px;
  line-height: 1; font-weight: 800;
}

.stat-rush { background: #fff1f0; border-color: #ffd6d0; }
.stat-rush .stat-icon { background: #ef4444; }
.stat-rush strong { color: #ef4444; }

.stat-stable { background: #fff7df; border-color: #ffe8a8; }
.stat-stable .stat-icon { background: #f59e0b; }
.stat-stable strong { color: #d97706; }

.stat-safe { background: #ecfdf3; border-color: #c8f1d7; }
.stat-safe .stat-icon { background: #22c55e; }
.stat-safe strong { color: #16a34a; }

.category-tabs {
  display: grid; grid-template-columns: repeat(3,1fr); gap: 8px;
  background: rgba(255,255,255,0.72); border: 1px solid #eee3d8;
  border-radius: 18px; padding: 6px;
  box-shadow: 0 8px 18px rgba(89,56,28,0.05); margin-bottom: 12px;
}

.category-tab {
  appearance: none; border: 0; background: transparent;
  border-radius: 14px; padding: 10px 6px; min-height: 48px;
  display: flex; align-items: center; justify-content: center;
  gap: 5px; color: #746a60; font-size: 14px;
  font-weight: 700; cursor: pointer; transition: all 0.18s ease;
}

.category-tab .tab-dot { width: 8px; height: 8px; border-radius: 999px; flex: 0 0 8px; }

.category-tab .tab-count { font-size: 12px; font-weight: 700; opacity: 0.78; }

.tab-rush .tab-dot { background: #ef4444; }
.tab-stable .tab-dot { background: #f59e0b; }
.tab-safe .tab-dot { background: #22c55e; }

.category-tab.active { background: #ffffff; color: #2f2f2f; box-shadow: 0 8px 20px rgba(89,56,28,0.1); }
.category-tab.tab-rush.active { color: #dc2626; background: #fff1f0; }
.category-tab.tab-stable.active { color: #d97706; background: #fff7df; }
.category-tab.tab-safe.active { color: #16a34a; background: #ecfdf3; }

.current-category-bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; background: #fffaf5; border: 1px solid #f4dfc7;
  border-radius: 14px; padding: 10px 12px; color: #7c6f65;
}

.current-label { font-size: 12px; color: #9a8f84; margin-right: 4px; }

.current-category-bar strong { font-size: 14px; color: #ff6a00; }

.current-page-info { flex: 0 0 auto; font-size: 12px; color: #8a8177; white-space: nowrap; }

@media (max-width: 390px) {
  .report-header { padding: 20px 12px 16px; }
  .hero-icon { width: 52px; height: 52px; flex-basis: 52px; border-radius: 17px; }
  .hero-text h1 { font-size: 21px; }
  .hero-text p { font-size: 12px; }
  .match-total strong { font-size: 34px; }
  .match-prefix, .match-suffix { font-size: 14px; }
  .match-stats { gap: 7px; }
  .match-stat { flex-direction: column; text-align: center; gap: 6px; padding: 10px 5px; }
  .stat-info span { font-size: 10.5px; }
  .stat-info strong { font-size: 19px; }
  .category-tab { font-size: 13px; padding: 9px 4px; }
  .current-category-bar { flex-direction: column; align-items: flex-start; }
  .current-page-info { white-space: normal; }
}

/* ===== Tab 旧样式保留 ===== */
.tab-content { min-height: 60px; }

/* --- 专业方向建议 --- */
.major-advice-text {
  font-size: 0.9rem;
  color: #555;
  line-height: 1.7;
}

/* --- 测试数据提示 --- */
.test-notice {
  text-align: center;
  padding: 12px;
  margin: 12px 0;
  background: #FFF3E0;
  border: 1px dashed #FF9800;
  border-radius: 8px;
  font-size: 0.82rem;
  color: #E65100;
  line-height: 1.5;
}

/* --- 风险提醒 --- */
.risk-warning {
  background: #FFF8F0;
  border: 1.5px solid #F0E0D0;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 14px;
}

.risk-warning h3 {
  color: #E65100;
  font-size: 1rem;
  margin-bottom: 10px;
}

.risk-warning ul {
  list-style: none;
  padding: 0;
}

.risk-warning li {
  font-size: 0.85rem;
  color: #777;
  padding: 4px 0;
  padding-left: 16px;
  position: relative;
  line-height: 1.6;
}

.risk-warning li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: #F47920;
  font-weight: bold;
}

.risk-test-notice {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #F0E0D0;
  font-size: 0.82rem;
  color: #999;
  line-height: 1.5;
}

/* --- 底部操作 --- */
.result-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 24px;
}

/* ============================================================
   详情弹窗 Modal
   ============================================================ */

.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay.active {
  display: flex;
}

.modal-content {
  background: #fff;
  border-radius: 16px;
  width: 100%;
  max-width: 440px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid #F0E0D0;
  flex-shrink: 0;
}

.modal-title {
  font-size: 1.05rem;
  color: #F47920;
  font-weight: 600;
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: #999;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
  -webkit-tap-highlight-color: transparent;
}

.modal-body {
  padding: 16px 20px;
  overflow-y: auto;
  flex: 1;
}

.modal-footer {
  padding: 14px 20px;
  border-top: 1px solid #F0E0D0;
  flex-shrink: 0;
}

/* --- Modal 内详情 --- */
.detail-section {
  margin-bottom: 14px;
}

.detail-section:last-child {
  margin-bottom: 0;
}

.detail-section h4 {
  font-size: 0.9rem;
  color: #F47920;
  margin-bottom: 6px;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  padding: 5px 0;
  font-size: 0.88rem;
  border-bottom: 1px dotted #F5F0EB;
}

.detail-row:last-child {
  border-bottom: none;
}

.detail-row .dl {
  color: #999;
  flex-shrink: 0;
}

.detail-row .dv {
  text-align: right;
  color: #333;
  font-weight: 500;
}

.detail-reason {
  font-size: 0.85rem;
  color: #777;
  line-height: 1.6;
  padding: 10px;
  background: #FFFAF5;
  border-radius: 8px;
}

.detail-risk {
  font-size: 0.85rem;
  line-height: 1.6;
  padding: 10px;
  background: #FFF3E0;
  border-radius: 8px;
  color: #E65100;
}

/* ============================================================
   Toast
   ============================================================ */

.toast {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.78);
  color: #fff;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 0.9rem;
  z-index: 2000;
  text-align: center;
  max-width: 280px;
  line-height: 1.5;
}

.toast.show {
  display: block;
  animation: toastIn 0.25s ease;
}

@keyframes toastIn {
  from { opacity: 0; transform: translate(-50%, -50%) scale(0.9); }
  to   { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

/* ============================================================
   Responsive: larger screens center everything nicely
   ============================================================ */

@media (min-width: 481px) {
  .container {
    padding: 20px 24px;
  }

  .home-hero {
    padding: 30px 16px 22px;
  }

  .brand-pill {
    font-size: 13px;
    padding: 6px 12px;
    margin-bottom: 12px;
  }

  .home-title {
    font-size: 23px;
  }

  .home-subtitle {
    font-size: 12px;
  }
}
