:root {
  --ink: #1d211c;
  --muted: #667066;
  --paper: #f3eee4;
  --card: #fffcf6;
  --line: #e0d6c4;
  --tea: #2b4634;
  --tea-deep: #173024;
  --clay: #b24a2e;
  --gold: #c49a4a;
  --shadow: 0 16px 40px rgba(23, 48, 36, 0.08);
  --gutter: 18px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

html, body { overflow-x: clip; }

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(900px 420px at 88% -8%, #fff6df 0%, transparent 50%),
    radial-gradient(800px 380px at 0% 12%, #e8efe6 0%, transparent 46%),
    var(--paper);
  font-family: "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
  padding-left: var(--safe-left);
  padding-right: var(--safe-right);
}

a { color: var(--clay); }
img { max-width: 100%; display: block; }
button { font: inherit; touch-action: manipulation; }

.wrap {
  width: min(1120px, calc(100% - (var(--gutter) * 2)));
  margin: 0 auto;
}

.masthead {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(243, 238, 228, 0.9);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.masthead-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 56px;
  padding-top: var(--safe-top);
}

.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  margin: 0;
  color: var(--tea-deep);
  text-decoration: none;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.brand small {
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.18em;
  color: var(--gold);
}

.mast-nav {
  display: flex;
  gap: 4px;
}

.mast-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 10px;
  color: var(--tea);
  text-decoration: none;
  border-radius: 8px;
}

.mast-nav a:hover { background: #efe6d4; color: var(--clay); }

.hero {
  padding: 56px 0 28px;
}

.hero-kicker {
  margin: 0 0 12px;
  letter-spacing: 0.18em;
  font-size: 12px;
  color: var(--gold);
}

.hero h1 {
  margin: 0 0 14px;
  font-size: clamp(36px, 7vw, 68px);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1.05;
  color: var(--tea-deep);
}

.hero-lede {
  margin: 0;
  max-width: 34em;
  color: var(--muted);
  font-size: clamp(16px, 2vw, 18px);
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 28px;
  max-width: 520px;
}

.stat {
  padding: 14px 16px;
  border: 1px solid var(--line);
  background: rgba(255, 252, 246, 0.7);
  border-radius: 14px;
}

.stat b {
  display: block;
  font-size: 22px;
  color: var(--tea-deep);
}

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

.section {
  padding: 18px 0 48px;
}

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

.section h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 600;
  color: var(--tea-deep);
}

.section .lead {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14px;
}

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

.chip {
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--tea);
  border-radius: 999px;
  cursor: pointer;
}

.chip:hover { border-color: #c9b896; }
.chip.is-on {
  background: var(--tea);
  border-color: var(--tea);
  color: #f6f1e7;
}

.featured {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  min-height: 420px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: var(--shadow);
  text-decoration: none;
  color: inherit;
}

.featured:hover .featured-cover img { transform: scale(1.03); }

.featured-cover {
  position: relative;
  min-height: 280px;
  overflow: hidden;
  background: #1b2c22;
}

.featured-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 70%;
  transition: transform 0.5s ease;
}

.featured-cover figcaption {
  position: absolute;
  left: 14px;
  bottom: 14px;
  margin: 0;
  padding: 6px 10px;
  border-radius: 8px;
  background: rgba(15, 29, 22, 0.62);
  color: #f6f1e7;
  font-size: 12px;
}

.featured-body {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 28px 28px 24px;
}

.eyebrow {
  margin: 0 0 10px;
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--gold);
}

.featured h3 {
  margin: 0 0 8px;
  font-size: clamp(26px, 3vw, 34px);
  line-height: 1.2;
  letter-spacing: -0.03em;
  color: var(--tea-deep);
}

.featured p {
  margin: 0;
  color: var(--muted);
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0 0;
}

.tag {
  padding: 4px 8px;
  border-radius: 6px;
  background: #f3eee4;
  color: var(--tea);
  font-size: 12px;
}

.featured-foot {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-top: 28px;
}

.mini-stats {
  display: flex;
  gap: 18px;
}

.mini-stats b {
  display: block;
  font-size: 20px;
  color: var(--tea-deep);
}

.mini-stats span {
  font-size: 12px;
  color: var(--muted);
}

.enter {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  color: var(--clay);
  font-weight: 600;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.card {
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 8px 22px rgba(23, 48, 36, 0.04);
}

.card:hover { border-color: #cfc2a8; }
.card:hover img { transform: scale(1.04); }

.card-cover {
  height: 168px;
  overflow: hidden;
  background: #20362a;
}

.card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.card-body { padding: 16px 16px 18px; }

.card h3 {
  margin: 0 0 6px;
  font-size: 18px;
  color: var(--tea-deep);
}

.card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.empty {
  padding: 36px 20px;
  border: 1px dashed var(--line);
  border-radius: 16px;
  text-align: center;
  color: var(--muted);
  background: rgba(255, 252, 246, 0.55);
}

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

.step {
  padding: 18px 18px 20px;
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 16px;
}

.step b {
  display: block;
  margin-bottom: 8px;
  color: var(--gold);
  font-size: 12px;
  letter-spacing: 0.12em;
}

.step h3 {
  margin: 0 0 8px;
  font-size: 16px;
  color: var(--tea-deep);
}

.step p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.step code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  color: var(--tea);
}

footer {
  padding: 28px 0 calc(32px + var(--safe-bottom));
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

.hidden { display: none !important; }

@media (max-width: 820px) {
  .featured { grid-template-columns: 1fr; }
  .featured-cover { min-height: 220px; height: 240px; }
  .featured-body { padding: 22px 20px 20px; }
  .how { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .hero { padding-top: 36px; }
  .stats { grid-template-columns: 1fr; }
  .featured-foot { flex-direction: column; align-items: start; }
  .brand small { display: none; }
}
