:root {
  --paper: #f8f4ed;
  --paper-2: #fffaf2;
  --surface: #ffffff;
  --surface-soft: #f3eee4;
  --ink: #2c2621;
  --muted: #766b61;
  --line: #e4d9cb;
  --green: #2f6f65;
  --green-dark: #1f524b;
  --sage: #dbe7df;
  --amber: #d99544;
  --coral: #d87955;
  --rose: #b86161;
  --blue: #466b82;
  --shadow: 0 14px 36px rgba(66, 54, 43, 0.1);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* {
  box-sizing: border-box;
}

html {
  width: 100%;
  scroll-behavior: smooth;
  background: var(--paper);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  line-height: 1.55;
}

body {
  width: 100%;
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background:
    linear-gradient(180deg, rgba(248, 244, 237, 0.97), rgba(255, 250, 242, 0.98)),
    repeating-linear-gradient(90deg, rgba(47, 111, 101, 0.035) 0 1px, transparent 1px 36px);
}

button,
input,
select {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
  text-decoration: none;
}

.app-root {
  width: 100%;
  min-height: 100vh;
  overflow-x: hidden;
}

.site-shell {
  width: 100%;
  max-width: 520px;
  min-height: 100vh;
  margin: 0 auto;
  overflow-x: hidden;
  background: var(--paper);
  box-shadow: 0 0 0 1px rgba(47, 111, 101, 0.08);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 60px;
  padding: 10px 16px;
  background: rgba(248, 244, 237, 0.94);
  border-bottom: 1px solid rgba(228, 217, 203, 0.9);
  backdrop-filter: blur(16px);
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.brand-mark {
  display: grid;
  place-items: center;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(47, 111, 101, 0.18);
  border-radius: 8px;
  background: var(--surface);
  color: var(--green);
  font-size: 18px;
  font-weight: 800;
}

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

.brand-text strong,
.brand-text span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-text strong {
  color: var(--ink);
  font-size: 15px;
  line-height: 1.2;
}

.brand-text span {
  color: var(--muted);
  font-size: 11px;
}

.icon-button {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
}

.hamburger {
  position: relative;
}

.hamburger span,
.hamburger::before,
.hamburger::after {
  content: "";
  position: absolute;
  left: 12px;
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transition: transform 0.18s ease, opacity 0.18s ease;
}

.hamburger span {
  top: 20px;
}

.hamburger::before {
  top: 14px;
}

.hamburger::after {
  top: 26px;
}

.hamburger.is-open span {
  opacity: 0;
}

.hamburger.is-open::before {
  transform: translateY(6px) rotate(45deg);
}

.hamburger.is-open::after {
  transform: translateY(-6px) rotate(-45deg);
}

.nav-drawer {
  position: sticky;
  top: 60px;
  z-index: 40;
  display: none;
  padding: 8px 16px 14px;
  background: rgba(248, 244, 237, 0.98);
  border-bottom: 1px solid var(--line);
}

.nav-drawer.is-open {
  display: grid;
  gap: 8px;
}

.nav-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--muted);
}

.nav-link::after {
  content: ">";
  color: var(--green);
  font-size: 18px;
}

.nav-link.is-active {
  border-color: rgba(47, 111, 101, 0.22);
  background: var(--surface);
  color: var(--green-dark);
  font-weight: 700;
}

.page {
  padding: 18px 16px 112px;
}

.page-header {
  padding: 12px 0 18px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 10px;
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
}

.eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--coral);
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 12px;
  color: var(--ink);
  font-size: 34px;
  line-height: 1.13;
}

h2 {
  margin-bottom: 12px;
  font-size: 23px;
  line-height: 1.22;
}

h3 {
  margin-bottom: 8px;
  font-size: 17px;
  line-height: 1.35;
}

p {
  color: var(--muted);
}

.lead {
  color: #51483f;
  font-size: 16px;
}

.section {
  margin-top: 28px;
}

.section-title {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.section-title p {
  margin-bottom: 0;
  font-size: 13px;
}

.hero-panel {
  position: relative;
  overflow: hidden;
  min-height: calc(100vh - 190px);
  padding: 22px 0 18px;
}

.hero-actions,
.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 14px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.button:active {
  transform: translateY(1px);
}

.button.primary {
  background: var(--green);
  color: #fff;
  box-shadow: 0 10px 22px rgba(47, 111, 101, 0.22);
}

.button.secondary {
  border-color: rgba(47, 111, 101, 0.2);
  background: var(--surface);
  color: var(--green-dark);
}

.button.ghost {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.6);
  color: var(--muted);
}

.button.full {
  width: 100%;
}

.button.small {
  min-height: 36px;
  padding: 8px 10px;
  font-size: 13px;
}

.hero-meter {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px;
  gap: 14px;
  align-items: center;
  margin: 24px 0 18px;
  padding: 16px;
  border: 1px solid rgba(47, 111, 101, 0.16);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.hero-meter > div:first-child {
  min-width: 0;
}

.hero-meter p {
  overflow-wrap: anywhere;
}

.today-chip {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--sage);
  color: var(--green-dark);
  font-size: 12px;
  font-weight: 800;
}

.temp-number {
  margin: 6px 0 4px;
  font-size: 42px;
  font-weight: 900;
  line-height: 1;
}

.temp-number small {
  font-size: 18px;
}

.mini-thermometer,
.thermometer {
  position: relative;
  overflow: hidden;
  width: 42px;
  height: 150px;
  border: 1px solid rgba(47, 111, 101, 0.24);
  border-radius: 999px;
  background: #f3eee4;
}

.mini-thermometer::before,
.thermometer::before {
  content: "";
  position: absolute;
  inset: auto 6px 6px;
  height: var(--fill, 34%);
  border-radius: 999px;
  background: var(--meter-color, var(--green));
  transition: height 0.4s ease, background 0.4s ease;
}

.thermometer {
  width: 54px;
  height: 230px;
  flex: 0 0 54px;
}

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

.stat {
  min-width: 0;
  min-height: 78px;
  padding: 12px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.stat strong {
  display: block;
  overflow-wrap: anywhere;
  margin-bottom: 4px;
  font-size: 18px;
}

.stat span {
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}

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

.card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 10px 26px rgba(66, 54, 43, 0.06);
}

.card.padded {
  padding: 16px;
}

.product-card,
.article-card {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 12px;
  min-height: 126px;
  padding: 12px;
}

.cover-block {
  display: grid;
  place-items: center;
  min-height: 102px;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(47, 111, 101, 0.14), rgba(216, 121, 85, 0.14)),
    var(--surface-soft);
  color: var(--green-dark);
  text-align: center;
  font-size: 13px;
  font-weight: 900;
}

.card h3 {
  margin-bottom: 6px;
}

.card p {
  margin-bottom: 10px;
  font-size: 14px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.filter-bar {
  display: flex;
  gap: 8px;
  padding: 4px 0 12px;
  overflow-x: auto;
  scrollbar-width: none;
}

.filter-bar::-webkit-scrollbar {
  display: none;
}

.filter-chip {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.filter-chip.is-active {
  border-color: var(--green);
  background: var(--green);
  color: #fff;
}

.notice {
  padding: 12px;
  border: 1px solid rgba(216, 121, 85, 0.28);
  border-radius: 8px;
  background: #fff5ed;
  color: #6b4a38;
  font-size: 13px;
}

.soft-band {
  padding: 16px;
  border: 1px solid rgba(47, 111, 101, 0.16);
  border-radius: 8px;
  background: #edf4ef;
}

.question-section {
  margin-top: 18px;
}

.question-group-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.question-group-title span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.question-card {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.question-card + .question-card {
  margin-top: 10px;
}

.question-top {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.question-top p {
  margin: 0;
  color: var(--ink);
  font-weight: 700;
}

.score-pill {
  display: inline-grid;
  place-items: center;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--sage);
  color: var(--green-dark);
  font-weight: 900;
}

.range-wrap {
  display: grid;
  gap: 8px;
}

input[type="range"] {
  width: 100%;
  height: 32px;
  margin: 0;
  accent-color: var(--green);
}

.range-labels {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 11px;
}

.sticky-submit {
  position: sticky;
  bottom: calc(74px + var(--safe-bottom));
  z-index: 25;
  margin-top: 18px;
  padding: 10px;
  border: 1px solid rgba(47, 111, 101, 0.16);
  border-radius: 8px;
  background: rgba(248, 244, 237, 0.94);
  backdrop-filter: blur(14px);
}

.result-hero {
  display: flex;
  gap: 18px;
  align-items: center;
  padding: 18px;
  border: 1px solid rgba(47, 111, 101, 0.16);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.result-copy {
  min-width: 0;
}

.result-copy .temp-number {
  font-size: 48px;
}

.band-name {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--green-dark);
  font-weight: 900;
}

.insight-grid {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.insight {
  padding: 14px;
  border-left: 4px solid var(--green);
  border-radius: 8px;
  background: var(--surface);
}

.insight strong {
  display: block;
  margin-bottom: 5px;
}

.history-chart {
  display: flex;
  align-items: end;
  gap: 7px;
  min-height: 128px;
  padding: 14px 8px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.history-bar {
  display: grid;
  align-content: end;
  justify-items: center;
  flex: 1;
  min-width: 0;
  height: 104px;
}

.history-bar span {
  display: block;
  width: 100%;
  max-width: 22px;
  height: var(--h);
  min-height: 6px;
  border-radius: 999px 999px 4px 4px;
  background: var(--meter-color, var(--green));
}

.history-bar small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 10px;
}

.detail-hero {
  padding: 18px;
  border: 1px solid rgba(47, 111, 101, 0.14);
  border-radius: 8px;
  background: var(--surface);
}

.detail-cover {
  display: grid;
  place-items: center;
  min-height: 150px;
  margin-bottom: 16px;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(47, 111, 101, 0.18), rgba(217, 149, 68, 0.18)),
    var(--surface-soft);
  color: var(--green-dark);
  font-size: 24px;
  font-weight: 900;
  text-align: center;
}

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

.content-list li {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.article-body {
  color: #3f372f;
  font-size: 16px;
}

.article-body h2 {
  margin: 28px 0 10px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 21px;
}

.article-body p {
  color: #4f453d;
}

.article-body ul {
  padding-left: 20px;
  color: #4f453d;
}

.contact-card {
  padding: 16px;
  border: 1px solid rgba(47, 111, 101, 0.16);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.wechat-grid {
  display: grid;
  grid-template-columns: 138px 1fr;
  gap: 14px;
  align-items: center;
}

.qr-image {
  width: 138px;
  height: 138px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  object-fit: cover;
}

.wechat-id {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px dashed rgba(47, 111, 101, 0.38);
  border-radius: 8px;
  background: #f7fbf7;
  color: var(--green-dark);
  font-weight: 900;
  word-break: break-all;
}

.steps {
  display: grid;
  gap: 8px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.steps li {
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 10px;
  align-items: center;
  min-height: 42px;
  counter-increment: step;
}

.steps li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: var(--green);
  color: #fff;
  font-size: 13px;
  font-weight: 900;
}

.owner-panel {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.owner-avatar {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin-bottom: 12px;
  border-radius: 8px;
  background: var(--sage);
  color: var(--green-dark);
  font-size: 24px;
  font-weight: 900;
}

.bottom-nav {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 60;
  padding: 8px 10px calc(8px + var(--safe-bottom));
  background: rgba(255, 250, 242, 0.96);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.bottom-nav-inner {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  max-width: 520px;
  margin: 0 auto;
  gap: 4px;
}

.bottom-link {
  display: grid;
  place-items: center;
  min-height: 48px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.bottom-link.is-active {
  background: var(--green);
  color: #fff;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: calc(86px + var(--safe-bottom));
  left: 18px;
  z-index: 80;
  max-width: 480px;
  margin: 0 auto;
  padding: 12px 14px;
  border-radius: 8px;
  background: #273c38;
  color: #fff;
  text-align: center;
  box-shadow: var(--shadow);
  transform: translateY(12px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast.is-visible {
  transform: translateY(0);
  opacity: 1;
}

.empty {
  padding: 22px 16px;
  border: 1px dashed rgba(47, 111, 101, 0.32);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.55);
  color: var(--muted);
  text-align: center;
}

.top-link {
  position: fixed;
  right: calc(50% - 250px);
  bottom: calc(92px + var(--safe-bottom));
  z-index: 45;
}

@media (max-width: 560px) {
  .top-link {
    right: 16px;
  }
}

@media (max-width: 380px) {
  h1 {
    font-size: 30px;
  }

  .product-card,
  .article-card {
    grid-template-columns: 82px 1fr;
  }

  .cover-block {
    min-height: 92px;
    font-size: 12px;
  }

  .wechat-grid {
    grid-template-columns: 112px 1fr;
  }

  .qr-image {
    width: 112px;
    height: 112px;
  }
}

@media (min-width: 720px) {
  body {
    padding: 24px 0;
  }

  .site-shell {
    min-height: calc(100vh - 48px);
    border-radius: 8px;
    overflow: hidden;
  }

  .bottom-nav {
    right: auto;
    left: 50%;
    width: 520px;
    transform: translateX(-50%);
    border-right: 1px solid var(--line);
    border-left: 1px solid var(--line);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
