:root {
  color-scheme: light;
  --ink: #23342b;
  --muted: #66766d;
  --line: #d8e8dd;
  --paper: #f7fbf5;
  --surface: #ffffff;
  --mint: #d7f2df;
  --leaf: #6fbf8f;
  --sun: #ffd166;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(255, 209, 102, 0.2), transparent 28rem),
    linear-gradient(180deg, #f7fbf5 0%, #eef8f0 100%);
  color: var(--ink);
}

button {
  font: inherit;
}

.shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 40px;
}

.hero {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 24px;
  min-height: 220px;
  padding: 24px 0 18px;
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  margin: 0 0 8px;
  color: #4f8b68;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(38px, 8vw, 76px);
  line-height: 0.98;
  letter-spacing: 0;
}

.lede {
  max-width: 520px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.7;
}

.hero-plant {
  position: relative;
  width: clamp(132px, 22vw, 220px);
  aspect-ratio: 1;
}

.leaf,
.stem {
  position: absolute;
  display: block;
}

.leaf {
  border-radius: 999px;
  box-shadow: inset 0 -12px 24px rgba(35, 52, 43, 0.08);
}

.leaf-a {
  width: 74%;
  height: 68%;
  left: 13%;
  top: 4%;
  background: #7acb7a;
}

.leaf-b {
  width: 47%;
  height: 45%;
  left: 6%;
  top: 34%;
  background: #ffd166;
}

.leaf-c {
  width: 48%;
  height: 46%;
  right: 4%;
  top: 36%;
  background: #74d3ae;
}

.stem {
  width: 17%;
  height: 38%;
  left: 42%;
  bottom: 1%;
  border-radius: 999px;
  background: #9a6a43;
}

.toolbar {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 18px 0 12px;
}

.filter {
  flex: 0 0 auto;
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.74);
  color: var(--ink);
  cursor: pointer;
}

.filter.is-active {
  border-color: #7abf91;
  background: #23342b;
  color: #ffffff;
}

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

.summary div {
  min-height: 74px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.8);
}

.summary strong,
.summary span {
  display: block;
}

.summary strong {
  margin-bottom: 4px;
  font-size: 20px;
}

.summary span {
  color: var(--muted);
  font-size: 13px;
}

.catalog {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}

.tree-card {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 14px;
  min-height: 190px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 16px 40px rgba(35, 52, 43, 0.08);
}

.tree-mark {
  position: relative;
  width: 76px;
  height: 100px;
}

.tree-crown {
  position: absolute;
  left: 8px;
  top: 4px;
  width: 60px;
  height: 58px;
  border-radius: 52% 48% 54% 46%;
  background: var(--tree-primary);
  box-shadow:
    14px 18px 0 -4px var(--tree-secondary),
    -10px 22px 0 -8px var(--tree-accent),
    inset 0 -10px 18px rgba(35, 52, 43, 0.1);
}

.tree-trunk {
  position: absolute;
  left: 32px;
  top: 58px;
  width: 14px;
  height: 38px;
  border-radius: 999px;
  background: var(--tree-trunk);
}

.tree-base {
  position: absolute;
  left: 15px;
  top: 88px;
  width: 48px;
  height: 12px;
  border-radius: 999px;
  background: rgba(111, 191, 143, 0.22);
}

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

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

.tree-title h2 {
  margin: 0;
  font-size: 19px;
  line-height: 1.25;
  letter-spacing: 0;
}

.badge {
  flex: 0 0 auto;
  padding: 4px 8px;
  border-radius: 999px;
  background: #eef8f0;
  color: #3b7e58;
  font-size: 12px;
  font-weight: 700;
}

.tree-copy,
.unlock {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.unlock {
  margin-top: 8px;
}

.swatches {
  display: flex;
  gap: 6px;
  margin-top: 12px;
}

.swatch {
  width: 18px;
  height: 18px;
  border: 1px solid rgba(35, 52, 43, 0.12);
  border-radius: 999px;
  background: var(--swatch);
}

.error {
  grid-column: 1 / -1;
  padding: 20px;
  border: 1px solid #f2c0b8;
  border-radius: 8px;
  background: #fff4f2;
  color: #8a382c;
}

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

  .hero {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .hero-plant {
    width: 148px;
  }

  .summary {
    grid-template-columns: 1fr;
  }

  .tree-card {
    grid-template-columns: 68px 1fr;
  }

  .tree-mark {
    width: 68px;
  }
}
