@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;500;600;700;800;900&family=Noto+Sans+SC:wght@400;500;700&family=Zen+Maru+Gothic:wght@400;500;700&display=swap');

:root {
  --bg-page: #7dc395;
  --bg-main: #f8f8f0;
  --bg-content: rgb(247, 243, 223);
  --bg-soft: #f0e8d8;
  --bg-disabled: #f0ece2;
  --text-primary: #794f27;
  --text-body: #725d42;
  --text-secondary: #9f927d;
  --text-muted: #8a7b66;
  --text-disabled: #c4b89e;
  --primary: #19c8b9;
  --primary-hover: #3dd4c6;
  --primary-active: #11a89b;
  --primary-bg: #e6f9f6;
  --success: #6fba2c;
  --success-active: #5a9e1e;
  --warning: #f5c31c;
  --warning-active: #dba90e;
  --danger: #e05a5a;
  --danger-active: #c94444;
  --focus-yellow: #ffcc00;
  --focus-yellow-dark: #e0b800;
  --sidebar-active: #b7c6e5;
  --sidebar-hover: #d6dff0;
  --border: #9f927d;
  --border-light: #c4b89e;
  --border-hover: #a89878;
  --shadow-btn: #bdaea0;
  --shadow-input: #d4c9b4;
  --shadow-switch: #5a9e1e;
  --card-shadow: 0 4px 10px rgba(107, 92, 67, 0.42);
  --lift-shadow: 0 8px 24px rgba(114, 93, 66, 0.15);
  --radius-card: 20px;
  --radius-blob: 40px 35px 45px 38px / 38px 45px 35px 40px;
  --radius-pill: 50px;
  --radius-sm: 12px;
  --max: 1080px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Nunito, "Noto Sans SC", "Zen Maru Gothic", -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text-body);
  background:
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.16), transparent 0 18%),
    radial-gradient(circle at 75% 8%, rgba(255, 255, 255, 0.14), transparent 0 14%),
    linear-gradient(180deg, #7dc395 0%, #92d1a7 100%);
  cursor: url("/cursor-leaf.svg") 6 4, auto;
}

.shell {
  width: min(calc(100% - 24px), var(--max));
  margin: 0 auto;
  padding: 22px 0 48px;
}

.hero {
  display: grid;
  gap: 18px;
  padding: 34px;
  margin-top: 10px;
  background: linear-gradient(180deg, #ffffff 0%, var(--bg-main) 100%);
  border: 3px solid var(--border-light);
  border-radius: var(--radius-blob);
  box-shadow: var(--card-shadow);
  position: relative;
}

.hero::after {
  content: "";
  position: absolute;
  right: 24px;
  top: 20px;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, rgba(25, 200, 185, 0.2) 0 45%, transparent 46%),
    radial-gradient(circle at center, rgba(255, 255, 255, 0.55) 0 65%, transparent 66%);
  opacity: 0.9;
}

.hero-copy h1,
.panel h2,
.report-title {
  margin: 0;
  font-family: Nunito, "Noto Sans SC", "Zen Maru Gothic", sans-serif;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--text-primary);
}

.panel h2 {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 20px;
  border-radius: var(--radius-pill);
  background: #fff;
  border: 2px solid var(--border-light);
  box-shadow: 0 4px 0 0 var(--shadow-input);
}

.hero-copy h1 {
  font-size: clamp(2rem, 5vw, 3.4rem);
  line-height: 1.08;
}

.eyebrow {
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 700;
}

.subtitle {
  max-width: 720px;
  margin: 14px 0 0;
  color: var(--text-body);
  line-height: 1.7;
  font-weight: 500;
}

.hero-badge,
.metric-strip,
.tag-row,
.choice-list,
.pill-row,
.exam-grid,
.report-grid,
.summary-cards,
.detail-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-badge span,
.pill,
.small-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 16px;
  border-radius: var(--radius-pill);
  border: 2px solid var(--border-light);
  background: var(--bg-content);
  color: var(--text-body);
  font-size: 0.94rem;
  font-weight: 700;
  box-shadow: 0 3px 0 0 var(--shadow-input);
}

#app,
#admin-app {
  margin-top: 20px;
}

.brand-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.brand-strip article {
  padding: 18px 20px;
  border-radius: var(--radius-card);
  background: var(--bg-content);
  border: 2px solid var(--border-light);
  box-shadow: var(--card-shadow);
}

.brand-strip strong,
.brand-strip span {
  display: block;
}

.brand-strip strong {
  margin-bottom: 8px;
  color: var(--text-primary);
  font-weight: 800;
}

.brand-strip span {
  color: var(--text-body);
  line-height: 1.6;
  font-weight: 500;
}

.panel {
  margin-top: 18px;
  padding: 24px;
  background: var(--bg-content);
  border: 2px solid var(--border-light);
  border-radius: var(--radius-card);
  box-shadow: var(--card-shadow);
  position: relative;
}

.intro-panel {
  border-radius: var(--radius-blob);
}

.center-panel {
  text-align: center;
  padding: 40px 24px;
}

.exam-card,
.summary-card,
.metric-card,
.detail-card,
.option-card {
  background: linear-gradient(180deg, #ffffff 0%, var(--bg-main) 100%);
  border: 2px solid var(--border-light);
  border-radius: var(--radius-card);
  box-shadow: var(--card-shadow);
}

.exam-grid {
  margin-top: 20px;
}

.exam-card,
.summary-card,
.metric-card,
.detail-card {
  flex: 1 1 220px;
  padding: 20px;
  transition: all 0.3s ease;
}

.exam-card:hover,
.detail-card:hover,
.summary-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--lift-shadow);
}

.exam-card h3,
.summary-card h3,
.detail-card h3 {
  margin: 0 0 10px;
  color: var(--text-primary);
  font-weight: 800;
  letter-spacing: 0.02em;
}

.muted {
  color: var(--text-muted);
}

.actions,
.inline-form {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.button,
button,
.option-button {
  appearance: none;
  border: 2px solid transparent;
  border-radius: var(--radius-pill);
  padding: 0 20px;
  min-height: 45px;
  background: var(--primary);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 5px 0 0 var(--shadow-btn);
}

.button:hover,
button:hover,
.option-button:hover {
  background: var(--primary-hover);
  box-shadow: 0 6px 0 0 var(--shadow-btn);
  transform: translateY(-1px);
}

.button:active,
button:active,
.option-button:active {
  background: var(--primary-active);
  box-shadow: 0 1px 0 0 var(--shadow-btn);
  transform: translateY(2px);
}

.button.secondary,
button.secondary {
  background: #fff;
  color: var(--text-body);
  border-color: var(--border-light);
  box-shadow: 0 5px 0 0 var(--shadow-btn);
}

button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin-top: 18px;
}

label {
  display: grid;
  gap: 8px;
  font-size: 0.94rem;
  color: var(--text-body);
  font-weight: 700;
}

input,
select {
  width: 100%;
  min-height: 48px;
  padding: 0 22px;
  border-radius: var(--radius-pill);
  border: 3px solid var(--border-light);
  background: var(--bg-content);
  font-size: 16px;
  color: var(--text-body);
  font-family: inherit;
  font-weight: 500;
  letter-spacing: 0.01em;
  box-shadow: 0 4px 0 0 var(--shadow-input);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

input::placeholder {
  color: var(--text-disabled);
  font-weight: 400;
}

input:hover,
select:hover {
  border-color: var(--border-hover);
  transform: translateY(-1px);
}

input:focus,
select:focus {
  outline: none;
  border-color: var(--focus-yellow);
  box-shadow: 0 4px 0 0 var(--focus-yellow-dark), 0 0 0 3px rgba(255, 204, 0, 0.15);
}

.progress-shell {
  display: grid;
  gap: 10px;
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--text-muted);
  font-size: 0.92rem;
  font-weight: 700;
}

.progress-bar {
  height: 14px;
  border-radius: var(--radius-pill);
  background: #dfe6d0;
  border: 2px solid var(--border-light);
  overflow: hidden;
}

.progress-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary) 0%, var(--primary-hover) 100%);
}

.question-head {
  display: grid;
  gap: 12px;
}

.question-prompt {
  font-size: 1.32rem;
  line-height: 1.55;
  margin: 0;
  color: var(--text-primary);
  font-weight: 800;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: var(--radius-pill);
  background: var(--primary-bg);
  color: var(--primary-active);
  font-size: 0.88rem;
  font-weight: 700;
  border: 2px solid rgba(25, 200, 185, 0.16);
}

.choice-list {
  margin-top: 18px;
}

.option-button {
  width: 100%;
  justify-content: flex-start;
  text-align: left;
  min-height: 52px;
  padding: 0 20px;
  background: linear-gradient(180deg, #fff 0%, var(--bg-main) 100%);
  color: var(--text-body);
  border: 2.5px solid var(--border-light);
  box-shadow: 0 3px 0 0 var(--shadow-input);
  font-weight: 700;
}

.option-button.selected {
  background: var(--primary-bg);
  border-color: var(--primary);
  color: var(--primary-active);
}

.feedback {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: 18px;
  line-height: 1.6;
  font-weight: 700;
}

.feedback.success {
  background: rgba(111, 186, 44, 0.14);
  color: var(--success-active);
}

.feedback.error {
  background: rgba(224, 90, 90, 0.14);
  color: var(--danger-active);
}

.summary-cards,
.report-grid,
.detail-grid {
  margin-top: 18px;
}

.spotlight-card {
  background: linear-gradient(180deg, #fff 0%, #f8f8f0 100%);
  border-color: var(--border);
}

.report-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
}

.report-sheet {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(280px, 0.95fr);
  gap: 18px;
  margin-top: 22px;
}

.report-sheet-main,
.report-sheet-side {
  display: grid;
  gap: 18px;
}

.report-side-card {
  min-height: 100%;
}

.report-badge-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 180px;
}

.report-badge {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 40px;
  padding: 0 16px;
  border-radius: var(--radius-pill);
  border: 2px solid var(--border-light);
  background: #fff;
  color: var(--text-body);
  font-weight: 700;
  box-shadow: 0 3px 0 0 var(--shadow-input);
}

.score {
  font-size: clamp(2rem, 8vw, 3.6rem);
  font-family: inherit;
  font-weight: 900;
  margin: 8px 0;
  color: var(--text-primary);
}

.ring-metric {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  align-items: center;
  gap: 18px;
}

.ring {
  --ring-color: #19c8b9;
  --ring-soft: rgba(25, 200, 185, 0.14);
  --ring-value: 0;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background:
    radial-gradient(closest-side, #ffffff 72%, transparent 73% 100%),
    conic-gradient(var(--ring-color) calc(var(--ring-value) * 1%), var(--ring-soft) 0);
  border: 3px solid #d4cfc3;
}

.ring span {
  font-size: 2rem;
  font-weight: 900;
  color: var(--text-primary);
}

.risk-list {
  display: grid;
  gap: 10px;
  padding-left: 0;
  list-style: none;
}

.risk-list li {
  padding: 12px 14px;
  border-radius: 18px;
  background: #fff;
  border: 2px solid var(--border-light);
  color: var(--text-body);
  box-shadow: 0 3px 0 0 var(--shadow-input);
  font-weight: 700;
}

.chart-list {
  display: grid;
  gap: 12px;
}

.chart-row {
  display: grid;
  gap: 8px;
}

.chart-row strong {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.95rem;
  color: var(--text-body);
}

.bar {
  height: 12px;
  border-radius: var(--radius-pill);
  background: #e3dfcf;
  border: 2px solid #d4cfc3;
  overflow: hidden;
}

.bar span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--primary) 0%, var(--primary-hover) 100%);
}

.locked {
  position: relative;
  overflow: hidden;
}

.locked::after {
  content: "填写手机号后解锁完整建议";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(248, 248, 240, 0.95);
  color: var(--text-primary);
  font-weight: 800;
}

.segmented-control {
  display: inline-flex;
  padding: 6px;
  border-radius: 18px;
  background: #ede7d5;
  border: 2px solid #d4cfc3;
  gap: 6px;
}

.segment {
  background: transparent;
  color: var(--text-muted);
  box-shadow: none;
  min-height: 44px;
  padding: 10px 16px;
}

.segment.active {
  background: #fff;
  color: var(--text-primary);
  box-shadow: 0 3px 0 0 var(--shadow-input);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 16px;
  background: #fff;
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: var(--card-shadow);
}

.admin-table th,
.admin-table td {
  padding: 14px;
  text-align: left;
  border-bottom: 1px solid rgba(159, 146, 125, 0.25);
  vertical-align: top;
}

.admin-table th {
  background: var(--primary-bg);
  color: var(--text-primary);
  font-weight: 800;
}

.detail-card ul,
.panel ul {
  margin: 0;
  padding-left: 18px;
  line-height: 1.7;
}

.spinner {
  width: 42px;
  height: 42px;
  margin: 0 auto 12px;
  border-radius: 50%;
  border: 4px solid rgba(25, 200, 185, 0.18);
  border-top-color: var(--primary);
  animation: spin 1s linear infinite;
}

.site-footer {
  margin-top: 18px;
  padding: 56px 4px 18px;
  color: var(--text-body);
  font-size: 0.92rem;
  line-height: 1.6;
  font-weight: 500;
  position: relative;
}

.site-footer::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  width: min(100vw, 1600px);
  height: 56px;
  transform: translateX(-50%);
  background: url("/footer-wave.svg") center top / cover no-repeat;
  pointer-events: none;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 720px) {
  .shell {
    width: min(calc(100% - 16px), var(--max));
    padding-bottom: 24px;
  }

  .hero,
  .panel {
    padding: 18px;
    border-radius: 24px;
  }

  .brand-strip {
    grid-template-columns: 1fr;
  }

  .report-hero {
    flex-direction: column;
  }

  .report-sheet,
  .ring-metric {
    grid-template-columns: 1fr;
  }

  .report-badge-stack {
    width: 100%;
    min-width: 0;
  }

  .ring {
    margin: 0 auto;
  }

  .question-prompt {
    font-size: 1.18rem;
  }

  .progress-meta {
    flex-direction: column;
    align-items: flex-start;
  }

  .admin-table,
  .admin-table tbody,
  .admin-table tr,
  .admin-table td {
    display: block;
    width: 100%;
  }

  .admin-table thead {
    display: none;
  }

  .admin-table tr {
    margin-bottom: 12px;
    border: 2px solid var(--border-light);
    border-radius: 18px;
    overflow: hidden;
    background: #fff;
  }

  .admin-table td {
    border-bottom: 1px solid rgba(159, 146, 125, 0.25);
  }
}
