:root {
  --bg: #ffe8e4;
  --bg-deep: #ffd9d2;
  --primary: #e53935;
  --primary-dark: #c62828;
  --primary-soft: #ff6b66;
  --raise: #ffd5d0;
  --ink: #17140a;
  --ink-soft: #3a3228;
  --surface: #fffaf9;
  --surface-2: #fff3f1;
  --muted: #8a7568;
  --muted-2: #b39a8c;
  --border: rgba(23, 20, 10, 0.08);
  --border-strong: rgba(23, 20, 10, 0.14);
  --ok: #1f9d55;
  --ok-bg: rgba(31, 157, 85, 0.12);
  --shadow: 0 10px 30px rgba(180, 40, 30, 0.08), 0 2px 8px rgba(23, 20, 10, 0.04);
  --shadow-sm: 0 4px 14px rgba(180, 40, 30, 0.07);
  --radius: 24px;
  --radius-sm: 14px;
  --radius-xs: 10px;
  --font: "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --mono: "SF Mono", ui-monospace, Menlo, Consolas, monospace;
  --footer: #0e0d0a;
  --max: 1120px;
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--bg); color: var(--ink); scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  background:
    radial-gradient(1100px 520px at 8% -8%, #ffcfc8 0%, transparent 55%),
    radial-gradient(900px 480px at 100% 0%, #ffd8a8 0%, transparent 50%),
    var(--bg);
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
img { display: block; max-width: 100%; }
.hidden { display: none !important; }

/* ===== Header ===== */
.site-header {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(255, 232, 228, 0.9);
  border-bottom: 1px solid var(--border);
}
.site-header-inner {
  max-width: var(--max); margin: 0 auto;
  padding: 12px 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  font-weight: 800; letter-spacing: 0.02em; flex-shrink: 0;
}
.brand img {
  width: 40px; height: 40px; border-radius: 50%;
  object-fit: cover; background: #e53935; box-shadow: var(--shadow-sm);
}
.brand-name { font-size: 16px; }
.brand-name em { font-style: normal; color: var(--primary); }

.site-nav {
  display: flex; align-items: center; gap: 4px; flex-wrap: wrap;
}
.site-nav a {
  padding: 8px 12px; border-radius: 999px;
  font-size: 13px; font-weight: 700; color: var(--ink-soft);
}
.site-nav a:hover { background: rgba(255,255,255,0.65); color: var(--ink); }
.site-nav a.active {
  background: var(--ink); color: #fff;
  box-shadow: 0 4px 12px rgba(23,20,10,0.16);
}

.header-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.lang-btn {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--surface); border: 1px solid var(--border-strong);
  font-size: 11px; font-weight: 800; color: var(--ink-soft);
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 18px; border-radius: 999px;
  font-weight: 750; font-size: 14px;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}
.btn:active { transform: scale(0.97); }
.btn-primary {
  background: linear-gradient(180deg, var(--primary-soft), var(--primary));
  color: #fff; box-shadow: 0 8px 20px rgba(229, 57, 53, 0.28);
}
.btn-primary:hover { background: linear-gradient(180deg, #ff7a75, var(--primary-dark)); }
.btn-ink {
  background: var(--ink); color: #fff;
  box-shadow: 0 8px 18px rgba(23,20,10,0.2);
}
.btn-ink:hover { background: #2a2418; }
.btn-ghost {
  background: rgba(255,255,255,0.55); color: var(--ink);
  border: 1px solid var(--border-strong);
}
.btn-ghost:hover { background: #fff; }
.btn-block { width: 100%; padding: 14px 18px; font-size: 15px; }
.btn-lg { padding: 14px 22px; font-size: 15px; }

.demo-banner {
  max-width: var(--max); margin: 14px auto 0; padding: 0 20px;
}
.demo-banner-inner {
  background: linear-gradient(90deg, #ffe0db, #fff0e8);
  border: 1px dashed rgba(229,57,53,.35);
  color: var(--ink-soft);
  border-radius: var(--radius-sm);
  padding: 9px 14px;
  font-size: 12.5px; font-weight: 600;
}

/* ===== Hero ===== */
.hero {
  max-width: var(--max); margin: 0 auto;
  padding: 48px 20px 28px;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(240px, 0.85fr);
  gap: 28px; align-items: center;
}
.hero-kicker {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 750; color: var(--primary);
  letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 14px;
}
.hero-kicker::before {
  content: ""; width: 28px; height: 3px; border-radius: 999px;
  background: var(--primary);
}
.hero h1 {
  margin: 0 0 14px; font-size: clamp(34px, 5vw, 52px);
  line-height: 1.12; letter-spacing: -0.02em; font-weight: 900;
}
.hero h1 .accent { color: var(--primary); }
.hero-sub {
  margin: 0 0 22px; max-width: 520px;
  font-size: 15.5px; color: var(--ink-soft); font-weight: 500;
}
.hero-ctas { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; }
.hero-socials { display: flex; gap: 8px; }
.social {
  width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--surface); border: 1px solid var(--border-strong);
  font-size: 13px; font-weight: 800; color: var(--ink-soft);
}
.social:hover { background: #fff; color: var(--ink); }

.hero-visual {
  position: relative; display: grid; place-items: center; min-height: 280px;
}
.hero-ring {
  position: absolute; inset: 10% 12%;
  border-radius: 50%;
  border: 1px solid rgba(229,57,53,0.18);
  box-shadow: inset 0 0 60px rgba(229,57,53,0.08);
}
.hero-visual img {
  width: min(280px, 70%); aspect-ratio: 1;
  border-radius: 50%; object-fit: cover;
  box-shadow: 0 24px 60px rgba(229,57,53,0.28), 0 2px 0 rgba(255,255,255,0.5) inset;
  background: #e53935; position: relative; z-index: 1;
}

/* ===== Section chrome ===== */
.section {
  max-width: var(--max); margin: 0 auto;
  padding: 36px 20px;
}
.section-label {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 750; color: var(--primary);
  letter-spacing: 0.06em; margin-bottom: 10px;
}
.section-label::before {
  content: ""; width: 22px; height: 3px; border-radius: 999px; background: var(--primary);
}
.section-title {
  margin: 0 0 22px; font-size: clamp(26px, 3.6vw, 38px);
  line-height: 1.15; font-weight: 900; letter-spacing: -0.02em;
}
.section-title .muted { color: var(--muted); font-weight: 800; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* ===== Mint ===== */
.mint-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.95fr);
  gap: 16px;
}
.mint-card { padding: 22px; }
.mint-card-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; margin-bottom: 14px; flex-wrap: wrap;
}
.mint-card-head h3 {
  margin: 0; font-size: 20px; font-weight: 850;
}
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 750;
}
.chip-ok { background: var(--ok-bg); color: var(--ok); }
.chip-ok::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--ok);
}
.chip-ink { background: var(--ink); color: #fff; }
.chip-soft { background: var(--raise); color: var(--primary-dark); }

.mint-price {
  font-size: 34px; font-weight: 900; letter-spacing: -0.03em;
  margin: 4px 0 12px; font-variant-numeric: tabular-nums;
}
.mint-price small { font-size: 15px; font-weight: 700; color: var(--muted); margin-left: 4px; }

.progress-block { margin-bottom: 14px; }
.progress-meta {
  display: flex; justify-content: space-between; gap: 10px;
  font-size: 13px; font-weight: 700; color: var(--ink-soft); margin-bottom: 8px;
}
.progress-meta .pct { color: var(--primary); }
.progress-bar {
  height: 8px; border-radius: 999px; background: var(--raise); overflow: hidden;
}
.progress-bar > span {
  display: block; height: 100%; width: 0;
  background: linear-gradient(90deg, var(--primary-soft), var(--primary));
  border-radius: inherit;
}
.mint-status {
  margin-top: 8px; font-size: 12.5px; font-weight: 650; color: var(--muted);
}

.mint-notes {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
  margin-top: 16px;
}
.note {
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius-xs); padding: 10px 12px;
}
.note strong {
  display: block; font-size: 13.5px; font-weight: 850; margin-bottom: 2px;
}
.note span { font-size: 11.5px; color: var(--muted); font-weight: 650; }

.mint-panel { padding: 22px; display: flex; flex-direction: column; gap: 14px; }
.field-label {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: 13px; font-weight: 750; color: var(--ink-soft); margin-bottom: 8px;
}
.field-label span { font-size: 12px; color: var(--muted); font-weight: 650; }

.qty-row {
  display: flex; align-items: center; gap: 10px;
}
.qty-stepper {
  display: flex; align-items: center; gap: 0;
  background: var(--surface-2); border: 1px solid var(--border-strong);
  border-radius: 999px; overflow: hidden;
}
.qty-stepper button {
  width: 40px; height: 40px; font-size: 18px; font-weight: 700; color: var(--ink);
}
.qty-stepper button:hover { background: rgba(229,57,53,0.08); }
.qty-stepper .val {
  min-width: 42px; text-align: center; font-weight: 850; font-size: 16px;
  font-variant-numeric: tabular-nums;
}
.qty-presets { display: flex; gap: 6px; flex-wrap: wrap; }
.qty-presets button {
  min-width: 42px; height: 36px; padding: 0 12px;
  border-radius: 999px; font-weight: 750; font-size: 13px;
  background: var(--surface-2); border: 1px solid var(--border);
  color: var(--ink-soft);
}
.qty-presets button:hover { border-color: var(--primary-soft); color: var(--ink); }
.qty-presets button.active {
  background: var(--ink); color: #fff; border-color: var(--ink);
}

.stat-rows { display: grid; gap: 8px; }
.stat-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 14px; border-radius: var(--radius-xs);
  background: var(--surface-2); border: 1px solid var(--border);
  font-size: 13.5px; font-weight: 700;
}
.stat-row .label { color: var(--muted); font-weight: 650; }
.stat-row .value { font-variant-numeric: tabular-nums; font-weight: 850; }
.stat-row .value.accent { color: var(--primary); }

.invite-note {
  font-size: 12.5px; color: var(--muted); font-weight: 600;
  padding: 10px 12px; border-radius: var(--radius-xs);
  background: rgba(229,57,53,0.06); border: 1px solid rgba(229,57,53,0.12);
}

/* ===== Tiers + Rank ===== */
.tiers-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(260px, 0.8fr);
  gap: 16px;
}
.tier-card, .rank-card { padding: 18px; }
.tier-card-head, .rank-card-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; margin-bottom: 12px; flex-wrap: wrap;
}
.tier-card-head h3, .rank-card-head h3 {
  margin: 0; font-size: 16px; font-weight: 850;
}
.tier-meta { font-size: 12.5px; font-weight: 700; color: var(--muted); }

.tier-list {
  max-height: 420px; overflow: auto;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: #fff;
}
.tier-row {
  display: grid;
  grid-template-columns: 48px 1fr 110px 64px;
  gap: 8px; align-items: center;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  font-size: 13px; font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.tier-row:last-child { border-bottom: none; }
.tier-row.current {
  background: linear-gradient(90deg, #ffe0db, #fff3f0);
}
.tier-idx { color: var(--muted); font-weight: 800; }
.tier-range { color: var(--ink-soft); }
.tier-price { font-weight: 850; text-align: right; }
.tier-tag {
  text-align: center; font-size: 11px; font-weight: 800;
  padding: 3px 0; border-radius: 999px; background: var(--surface-2); color: var(--muted);
}
.tier-row.current .tier-tag {
  background: var(--primary); color: #fff;
}
.tier-footnote {
  margin: 10px 0 0; font-size: 12px; color: var(--muted); font-weight: 600; line-height: 1.55;
}

.rank-tabs {
  display: flex; gap: 4px; background: var(--surface-2);
  padding: 3px; border-radius: 999px; border: 1px solid var(--border);
}
.rank-tabs button {
  padding: 6px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 750; color: var(--muted);
}
.rank-tabs button.active { background: var(--ink); color: #fff; }

.rank-list { display: grid; gap: 8px; }
.rank-item {
  display: grid; grid-template-columns: 28px 1fr auto; gap: 10px; align-items: center;
  padding: 10px 12px; border-radius: var(--radius-xs);
  background: var(--surface-2); border: 1px solid var(--border);
}
.rank-item.top {
  background: linear-gradient(90deg, #ffe0db, #fff6f3);
  border-color: rgba(229,57,53,0.18);
}
.rank-pos {
  width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--ink); color: #fff; font-size: 12px; font-weight: 850;
}
.rank-item:nth-child(n+4) .rank-pos { background: var(--muted-2); }
.rank-name { font-size: 13px; font-weight: 800; }
.rank-name small { display: block; font-size: 11px; color: var(--muted); font-weight: 650; margin-top: 1px; }
.rank-score { font-size: 14px; font-weight: 900; font-variant-numeric: tabular-nums; }

/* ===== Vision ===== */
.vision {
  margin: 8px auto 0; max-width: var(--max); padding: 0 20px;
}
.vision-inner {
  background: linear-gradient(135deg, #e53935 0%, #c62828 55%, #9b1c1c 100%);
  color: #fff; border-radius: 28px; padding: 36px 32px;
  display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 20px; align-items: center;
  box-shadow: 0 20px 50px rgba(198,40,40,0.28);
}
.vision-inner h2 {
  margin: 0 0 10px; font-size: clamp(26px, 3.4vw, 36px);
  line-height: 1.2; font-weight: 900;
}
.vision-inner p { margin: 0; opacity: 0.92; font-weight: 550; max-width: 460px; }
.vision-stat {
  text-align: right;
}
.vision-stat .big {
  font-size: clamp(48px, 7vw, 72px); font-weight: 950;
  letter-spacing: -0.04em; line-height: 1;
}
.vision-stat .cap {
  margin-top: 6px; font-size: 12.5px; font-weight: 700; opacity: 0.85;
  letter-spacing: 0.04em;
}

/* ===== Rules ===== */
.rules-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px;
}
.rule-card {
  padding: 22px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.rule-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 12px;
  background: var(--raise); color: var(--primary); font-weight: 900;
  font-size: 14px; margin-bottom: 12px;
}
.rule-card h3 { margin: 0 0 8px; font-size: 16px; font-weight: 850; }
.rule-card p { margin: 0; font-size: 13.5px; color: var(--ink-soft); font-weight: 550; }

/* ===== FAQ ===== */
.faq-layout {
  display: grid; grid-template-columns: 180px 1fr; gap: 24px; align-items: start;
}
.faq-layout > h2 { margin: 0; font-size: 42px; font-weight: 950; letter-spacing: -0.03em; }
.faq-list { display: grid; gap: 8px; }
.faq-item {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); overflow: hidden;
}
.faq-q {
  width: 100%; text-align: left;
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 16px 18px; font-size: 15px; font-weight: 800;
}
.faq-q .plus {
  width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--surface-2); color: var(--muted); font-size: 18px; font-weight: 700;
  transition: transform .15s ease, background .15s ease;
}
.faq-item.open .faq-q .plus {
  transform: rotate(45deg); background: var(--primary); color: #fff;
}
.faq-a {
  display: none; padding: 0 18px 16px;
  font-size: 14px; color: var(--ink-soft); font-weight: 550; line-height: 1.6;
}
.faq-item.open .faq-a { display: block; }
.faq-a a { color: var(--primary); font-weight: 750; text-decoration: underline; }

/* ===== Join strip ===== */
.join {
  max-width: var(--max); margin: 8px auto 0; padding: 0 20px 40px;
}
.join-inner {
  display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 18px; align-items: center;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 28px; padding: 28px; box-shadow: var(--shadow);
}
.join-kicker {
  font-size: 12px; font-weight: 800; color: var(--primary);
  letter-spacing: 0.08em; margin-bottom: 8px;
}
.join-inner h2 {
  margin: 0 0 8px; font-size: clamp(24px, 3vw, 32px); font-weight: 900; line-height: 1.2;
}
.join-inner p { margin: 0 0 16px; color: var(--ink-soft); font-weight: 550; max-width: 460px; }
.join-ctas { display: flex; flex-wrap: wrap; gap: 10px; }
.join-visual {
  display: grid; place-items: center;
}
.join-visual img {
  width: 160px; height: 160px; border-radius: 50%; object-fit: cover;
  box-shadow: var(--shadow); background: #e53935;
}

/* ===== Footer ===== */
.site-footer {
  background: var(--footer); color: #f6efd9;
  padding: 28px 20px 36px; margin-top: 12px;
}
.site-footer-inner {
  max-width: var(--max); margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}
.footer-brand {
  display: flex; align-items: center; gap: 10px; font-weight: 800;
}
.footer-brand img {
  width: 32px; height: 32px; border-radius: 50%; object-fit: cover; background: #e53935;
}
.footer-meta {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  font-size: 13px; font-weight: 650; color: #cbc2a6;
}
.footer-meta code {
  font-family: var(--mono); font-size: 12px;
  background: rgba(255,255,255,0.06); padding: 4px 8px; border-radius: 8px;
}
.footer-links { display: flex; gap: 14px; font-size: 13px; font-weight: 700; }
.footer-links a:hover { color: #fff; }
.footer-note {
  max-width: var(--max); margin: 16px auto 0;
  font-size: 11.5px; color: #8b8368; font-weight: 550; line-height: 1.55;
}

/* ===== Modal ===== */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(14,13,10,0.55);
  display: none; align-items: center; justify-content: center; padding: 20px;
}
.modal-backdrop.show { display: flex; }
.modal {
  width: min(420px, 100%);
  background: var(--surface); border-radius: 22px;
  padding: 24px; box-shadow: 0 24px 60px rgba(0,0,0,0.28);
  border: 1px solid var(--border);
}
.modal h3 { margin: 0 0 8px; font-size: 18px; font-weight: 900; }
.modal p { margin: 0 0 18px; color: var(--ink-soft); font-size: 14px; font-weight: 550; }
.modal-actions { display: flex; gap: 8px; justify-content: flex-end; }

/* ===== Responsive ===== */
@media (max-width: 920px) {
  .hero, .mint-grid, .tiers-grid, .vision-inner, .join-inner, .faq-layout, .rules-grid {
    grid-template-columns: 1fr;
  }
  .vision-stat { text-align: left; }
  .faq-layout > h2 { font-size: 32px; }
  .site-nav { display: none; }
  .mint-notes { grid-template-columns: 1fr; }
  .hero { padding-top: 28px; }
  .hero-visual { order: -1; min-height: 200px; }
  .hero-visual img { width: 160px; }
}
@media (max-width: 560px) {
  .tier-row { grid-template-columns: 36px 1fr 88px 52px; font-size: 12px; padding: 9px 10px; }
  .qty-row { flex-direction: column; align-items: stretch; }
}


/* Live mint / wallet */
.inviter-input {
  width: 100%;
  box-sizing: border-box;
  margin: 6px 0 12px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1.5px solid rgba(180, 40, 40, 0.18);
  background: #fff8f6;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  outline: none;
}
.inviter-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(220, 50, 50, 0.12);
}
.wallet-quota {
  margin-top: 10px;
  font-size: 12px;
  font-weight: 650;
  color: var(--muted);
  line-height: 1.45;
}
.mint-toast {
  display: none;
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #fff1ee;
  border: 1px solid rgba(200, 60, 60, 0.2);
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.4;
}
.mint-toast.show { display: block; }
.mint-toast.ok {
  background: #eefaf1;
  border-color: rgba(40, 140, 70, 0.25);
  color: #1f6b3a;
}
.mint-toast.err {
  background: #ffe9e6;
  border-color: rgba(200, 40, 40, 0.28);
  color: #9b1c1c;
}
#btn-mint:disabled {
  opacity: 0.65;
  cursor: wait;
}
