:root {
  --ink: #243044;
  --ink-soft: #5b6778;
  --paper: #f6f8f4;
  --card: #ffffff;
  --seal: #3f8f78;
  --seal-deep: #2d6b5a;
  --line: rgba(36, 48, 68, 0.08);
  --shadow: 0 10px 28px rgba(36, 48, 68, 0.06);
  --radius: 20px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  color: var(--ink);
  background: var(--paper);
  min-height: 100vh;
}

.page {
  max-width: 1080px;
  margin: 0 auto;
  padding: 36px 20px 88px;
}

.hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 24px;
  align-items: stretch;
  margin-bottom: 28px;
}

.hero-copy {
  display: grid;
  gap: 16px;
  align-content: center;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 32px 28px;
  box-shadow: var(--shadow);
}

.seal {
  width: fit-content;
  border: 1px solid var(--seal);
  color: var(--seal);
  font-family: "Songti SC", "STSong", "SimSun", serif;
  font-size: 13px;
  letter-spacing: 0.22em;
  padding: 4px 10px 3px 12px;
  border-radius: 999px;
}

h1 {
  font-family: "Songti SC", "STSong", "SimSun", serif;
  font-size: clamp(32px, 4.6vw, 50px);
  line-height: 1.2;
  font-weight: 700;
}

.lead {
  max-width: 540px;
  color: var(--ink-soft);
  font-size: 16px;
  line-height: 1.85;
}

.search-bar {
  display: flex;
  gap: 12px;
  align-items: center;
  background: #f4f7f2;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 10px 10px 20px;
}

.search-bar input {
  flex: 1;
  border: 0;
  outline: none;
  background: transparent;
  font-size: 16px;
  color: var(--ink);
}

.search-bar button {
  border: 0;
  cursor: pointer;
  font-family: inherit;
  background: var(--seal);
  color: #fff;
  border-radius: 999px;
  padding: 10px 18px;
  font-weight: 600;
}

.hero-photo {
  margin: 0;
  height: 100%;
  min-height: 320px;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: var(--shadow);
  background: #fff;
}

.hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}

.home-extra {
  display: grid;
  gap: 18px;
}

.formula-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.formula-strip article {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 18px 16px;
  box-shadow: var(--shadow);
}

.formula-strip span {
  display: block;
  color: var(--seal);
  font-family: "Songti SC", "STSong", "SimSun", serif;
  font-size: 18px;
  margin-bottom: 8px;
}

.formula-strip h3 {
  font-family: "Songti SC", "STSong", "SimSun", serif;
  font-size: 22px;
  margin-bottom: 8px;
}

.formula-strip p {
  color: var(--ink-soft);
  line-height: 1.7;
  font-size: 14px;
}

.gate-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.gate {
  display: flex;
  align-items: center;
  gap: 16px;
  text-align: left;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 12px 16px 12px 12px;
  cursor: pointer;
  box-shadow: var(--shadow);
  font-family: inherit;
  color: inherit;
  position: relative;
  z-index: 1;
}

.gate-wide {
  grid-column: 1 / -1;
}

.gate-thumb {
  flex: 0 0 112px;
  width: 112px;
  height: 84px;
  border-radius: 14px;
  overflow: hidden;
  background: #eee8dc;
}

.gate-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}

.gate-copy {
  flex: 1 1 auto;
  min-width: 0;
}

.gate-copy strong {
  display: block;
  font-family: "Songti SC", "STSong", "SimSun", serif;
  font-size: 20px;
  font-style: normal;
  margin-bottom: 6px;
}

.gate-copy em {
  display: block;
  font-style: normal;
  color: var(--ink-soft);
  line-height: 1.7;
  font-size: 14px;
}

.results {
  display: grid;
  gap: 12px;
}

.result-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

#backHome {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  border-radius: 999px;
  padding: 8px 14px;
  cursor: pointer;
  font-family: inherit;
  font-size: 14px;
}

.cards {
  display: grid;
  gap: 12px;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  cursor: pointer;
  box-shadow: var(--shadow);
}

.card:hover,
.card.active {
  border-color: rgba(63, 143, 120, 0.4);
}

.card-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  margin-bottom: 8px;
}

.card h2 {
  font-family: "Songti SC", "STSong", "SimSun", serif;
  font-size: 24px;
}

.badge {
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #eef6f1;
  color: var(--seal-deep);
}

.card p {
  color: var(--ink);
  line-height: 1.8;
  font-size: 17px;
}

.tip-label {
  display: inline-block;
  margin-right: 8px;
  color: var(--seal);
  font-size: 17px;
  letter-spacing: 0.08em;
}

.muted {
  color: var(--ink-soft);
  line-height: 1.75;
}

.block {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
}

.block h4 {
  font-size: 18px;
  letter-spacing: 0.12em;
  color: var(--seal);
  margin-bottom: 10px;
}

.steps {
  display: grid;
  gap: 10px;
}

.step {
  background: #f4f7f2;
  border-radius: 12px;
  padding: 14px 16px;
  line-height: 1.85;
  font-size: 18px;
}

.step b {
  color: var(--seal-deep);
  margin-right: 8px;
  font-size: 18px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  background: #f4f7f2;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 16px;
  color: var(--ink);
}

.example {
  font-family: "Songti SC", "STSong", "SimSun", serif;
  font-size: 18px;
  line-height: 1.85;
  color: var(--ink);
}

.hidden {
  display: none;
}

@media (max-width: 860px) {
  .hero,
  .formula-strip,
  .gate-grid {
    grid-template-columns: 1fr;
  }

  .gate,
  .gate-wide {
    grid-column: auto;
    flex-direction: column;
    align-items: stretch;
  }

  .gate-thumb {
    width: 100%;
    flex-basis: 140px;
    height: 140px;
  }
}
