/* SLERF — comic / hand-drawn meme style */
:root {
  --orange: #f39200;
  --orange-hot: #ff9f1a;
  --orange-deep: #d56f00;
  --ink: #16120e;
  --ink-soft: #3a332b;
  --cream: #fff4e3;
  --paper: #fffaf2;
  --card: #fffdf8;
  --blue: #b7d6ec;
  --blue-deep: #7eafd0;
  --green: #c6e3bc;
  --green-deep: #86c07c;
  --pink: #f4b6af;
  --pink-deep: #e27b72;
  --gold: #f5c44c;
  --purple: #cbb6f0;
  --red: #e45444;
  --muted: #6b6156;
  --line: 3.5px solid var(--ink);
  --shadow: 6px 6px 0 var(--ink);
  --shadow-sm: 4px 4px 0 var(--ink);
  --radius: 24px;
  --radius-sm: 16px;
  --font-display: "Bowlby One", "ZCOOL KuaiLe", cursive;
  --font-fun: "ZCOOL KuaiLe", "Bowlby One", cursive;
  --font-bubble: "Bangers", "ZCOOL KuaiLe", cursive;
  --font-body: "Nunito", "Noto Sans TC", system-ui, sans-serif;
  --header-h: 78px;
  --max: 1120px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background:
    radial-gradient(circle at 18px 18px, rgba(22,18,14,.08) 1.6px, transparent 1.8px) 0 0 / 28px 28px,
    linear-gradient(180deg, #ffe7c2 0%, var(--cream) 220px, var(--cream) 100%);
  background-attachment: fixed;
  line-height: 1.65;
  min-height: 100%;
}
img { max-width: 100%; height: auto; display: block; }
button, input { font: inherit; color: inherit; }
h1, h2, h3, h4 {
  font-family: var(--font-fun);
  line-height: 1.15;
  margin: 0 0 .4em;
  letter-spacing: .02em;
}
h1 { font-family: var(--font-display); }
p { margin: 0 0 1em; }
a { color: inherit; }
strong { font-weight: 800; }

.skip-link {
  position: absolute; left: 12px; top: -48px;
  background: var(--ink); color: #fff; padding: 8px 14px; z-index: 100;
  border-radius: 8px;
}
.skip-link:focus { top: 12px; }

/* Demo banner */
.demo-banner {
  background: #111;
  color: #ffe9b8;
  text-align: center;
  padding: 8px 16px;
  font-size: 13.5px;
  letter-spacing: .01em;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}
.demo-banner[hidden] { display: none; }
.demo-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #ffb400;
  box-shadow: 0 0 0 0 rgba(255,180,0,.8);
  animation: pulse 1.6s infinite;
}
@keyframes pulse {
  70% { box-shadow: 0 0 0 8px rgba(255,180,0,0); }
  100% { box-shadow: 0 0 0 0 rgba(255,180,0,0); }
}

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,250,242,.9);
  backdrop-filter: blur(10px);
  border-bottom: var(--line);
}
.nav-inner {
  max-width: calc(var(--max) + 48px);
  margin: 0 auto;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; flex-shrink: 0;
}
.brand img {
  width: 44px; height: 44px;
  border: 3px solid var(--ink);
  border-radius: 50%;
  background: #fff;
  box-shadow: 3px 3px 0 var(--ink);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-name { font-family: var(--font-display); font-size: 20px; }
.brand-chain { font-size: 11px; color: var(--muted); font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.nav-links { display: flex; gap: 4px; margin-left: 8px; flex: 1; }
.nav-links a {
  text-decoration: none;
  font-weight: 800;
  padding: 8px 12px;
  border-radius: 999px;
}
.nav-links a:hover { background: #ffe0a8; }
.nav-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.chain-pill {
  border: 2.5px solid var(--ink);
  background: #f3e27a;
  border-radius: 999px;
  padding: 4px 10px;
  font-weight: 800;
  font-size: 12px;
  box-shadow: 2px 2px 0 var(--ink);
}
.chain-pill.is-warn { background: #ffb4a2; }
#disconnectBtn[hidden] { display: none; }
.nav-toggle {
  display: none;
  width: 42px; height: 42px;
  border: var(--line);
  background: var(--paper);
  border-radius: 12px;
  cursor: pointer;
  padding: 0;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  box-shadow: var(--shadow-sm);
}
.nav-toggle span {
  display: block; width: 18px; height: 3px;
  background: var(--ink); border-radius: 2px;
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  border: var(--line);
  border-radius: 999px;
  padding: 10px 18px;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform .12s ease, box-shadow .12s ease;
  background: var(--paper);
  white-space: nowrap;
  line-height: 1.2;
}
.btn:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--ink); }
.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; box-shadow: var(--shadow-sm); }
.btn-orange { background: var(--orange); color: var(--ink); }
.btn-orange:hover { background: var(--orange-hot); }
.btn-ink { background: var(--ink); color: #fff8e8; }
.btn-ghost { background: var(--paper); }
.btn-lg { padding: 14px 26px; font-size: 17px; }
.btn-block { width: 100%; padding: 14px 20px; font-size: 17px; }
.linkish {
  background: none; border: 0; cursor: pointer;
  font-weight: 800; text-decoration: underline; padding: 0 6px;
}

/* Speech bubbles */
.bubble {
  position: relative;
  background: #fff;
  border: var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow-sm);
  padding: 10px 16px;
  display: inline-block;
}
.bubble::after {
  content: "";
  position: absolute;
  left: 22px; bottom: -14px;
  width: 18px; height: 18px;
  background: #fff;
  border-right: var(--line);
  border-bottom: var(--line);
  transform: rotate(45deg);
}
.bubble p, .bubble-hero p {
  font-family: var(--font-bubble);
  font-size: 28px;
  margin: 0;
  letter-spacing: .04em;
  line-height: 1;
}
.bubble-hero span { display: block; font-weight: 800; font-size: 13px; color: var(--muted); margin-top: 4px; }
.bubble-mini {
  position: absolute;
  top: 8%;
  right: -6%;
  font-family: var(--font-bubble);
  font-size: 18px;
  letter-spacing: .03em;
  padding: 8px 12px;
  transform: rotate(8deg);
  z-index: 2;
  white-space: nowrap;
}
.bubble-mini::after { left: auto; right: 24px; }
.bubble-inline { font-family: var(--font-bubble); font-size: 22px; letter-spacing: .03em; margin-bottom: 8px; }
.bubble-result {
  font-family: var(--font-bubble);
  font-size: 32px;
  letter-spacing: .04em;
  margin: 0 auto 8px;
}

/* Hero */
.hero { padding: 36px 20px 64px; }
.hero-grid {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 40px;
  align-items: center;
}
.eyebrow {
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: 12px;
  color: var(--orange-deep);
  margin-bottom: 8px;
}
.hero h1 {
  font-size: clamp(64px, 10vw, 112px);
  letter-spacing: -.02em;
  margin: 0 0 8px;
  line-height: .9;
  text-shadow: 4px 4px 0 #fff, 7px 7px 0 var(--ink);
}
.hero-lead { font-size: 18px; max-width: 38em; }
.hero-stats {
  list-style: none;
  padding: 0;
  margin: 22px 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.hero-stats li {
  background: var(--card);
  border: var(--line);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  padding: 12px 10px;
  text-align: center;
}
.hero-stats strong { display: block; font-size: 15px; }
.hero-stats span { display: block; font-size: 12px; color: var(--muted); font-weight: 700; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 14px; }
.hero-note { font-size: 13.5px; color: var(--muted); margin: 0; }

.hero-art {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-items: end;
}
.mascot-wrap { position: relative; }
.mascot {
  width: 100%;
  border: 4px solid var(--ink);
  border-radius: 50%;
  background: #fff;
  box-shadow: var(--shadow);
  animation: bob 3.6s ease-in-out infinite;
}
@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
.comic-frame {
  margin: 0;
  background: var(--blue);
  border: 4px solid var(--ink);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 8px 8px 0;
  transform: rotate(2.2deg);
}
.comic-frame img {
  width: 100%;
  border: 3px solid var(--ink);
  border-radius: 10px;
  background: #fff;
}
.comic-frame figcaption {
  font-weight: 800;
  font-size: 12px;
  text-align: center;
  padding: 8px 4px 10px;
}

/* Sections */
.section { padding: 72px 20px; }
.section-alt { background: linear-gradient(180deg, rgba(183,214,236,.35), rgba(198,227,188,.28)); }
.section-head { max-width: var(--max); margin: 0 auto 28px; }
.section-head h2 { font-size: clamp(32px, 5vw, 52px); }
.section-head p { max-width: 44em; font-size: 17px; }
.card {
  background: var(--card);
  border: var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px 22px 24px;
}
.muted { color: var(--muted); }
.center { text-align: center; }
.fine-print { font-size: 12.5px; color: var(--muted); margin: 8px 0 0; }

/* Mint */
.mint-layout, .mining-layout {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 22px;
  align-items: start;
}
.phase-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.phase-badge {
  background: var(--green);
  border: 2.5px solid var(--ink);
  border-radius: 999px;
  padding: 4px 12px;
  font-weight: 800;
  font-size: 13px;
  box-shadow: 2px 2px 0 var(--ink);
}
.phase-badge.is-refund { background: var(--pink); }
.phase-badge.is-live { background: var(--gold); }

.countdown {
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 8px;
  margin: 8px 0 6px;
}
.count-block {
  background: var(--ink);
  color: #fff6e0;
  border-radius: 16px;
  min-width: 96px;
  text-align: center;
  padding: 12px 8px;
  box-shadow: 4px 4px 0 var(--orange);
}
.count-block strong {
  display: block;
  font-family: var(--font-display);
  font-size: 42px;
  line-height: 1;
}
.count-block span { font-size: 12px; letter-spacing: .08em; font-weight: 800; }
.count-sep { font-family: var(--font-display); font-size: 36px; padding-top: 8px; }
.countdown-caption { text-align: center; font-weight: 800; margin-bottom: 22px; }

.progress-wrap { margin: 8px 0 22px; }
.progress-meta { display: flex; justify-content: space-between; font-weight: 800; margin-bottom: 8px; }
.progress-track {
  position: relative;
  height: 32px;
  margin-top: 58px;
  background: #efe4d2;
  border: 3px solid var(--ink);
  border-radius: 999px;
  overflow: visible;
}
.progress-clip {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: repeating-linear-gradient(-45deg, var(--orange), var(--orange) 10px, var(--orange-hot) 10px, var(--orange-hot) 20px);
  transition: width .4s ease, background .4s ease;
  box-shadow: inset 0 -4px 0 rgba(0,0,0,.12);
}
.progress-mark {
  position: absolute;
  top: -10px;
  height: 52px;
  width: 0;
  transform: translateX(-50%);
  pointer-events: none;
  z-index: 2;
}
.progress-mark i {
  display: block;
  width: 3px;
  height: 52px;
  background: var(--ink);
  margin: 0 auto;
}
.progress-mark em {
  position: absolute;
  top: -40px;
  left: 50%;
  transform: translateX(-50%);
  font-style: normal;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
  background: var(--paper);
  border: 2.5px solid var(--ink);
  border-radius: 10px;
  padding: 3px 8px 4px;
  line-height: 1.2;
  text-align: center;
  box-shadow: 2px 2px 0 var(--ink);
  display: flex;
  flex-direction: column;
  gap: 0;
}
.progress-mark em strong {
  display: block;
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: .02em;
}
.progress-mark em span { font-size: 10px; }
.progress-mark em::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -7px;
  width: 10px; height: 10px;
  background: inherit;
  border-right: 2.5px solid var(--ink);
  border-bottom: 2.5px solid var(--ink);
  transform: translateX(-50%) rotate(45deg);
}
.mark-soft em { background: var(--blue); }
.mark-hard {
  transform: none;
  left: auto !important;
  right: 0;
}
.mark-hard i { margin-left: auto; margin-right: 0; position: relative; left: -1.5px; }
.mark-hard em {
  left: auto;
  right: -6px;
  transform: none;
}
.mark-hard em::after { left: auto; right: 14px; transform: rotate(45deg); }
.progress-scale {
  display: flex; justify-content: space-between;
  font-size: 12px; font-weight: 700; color: var(--muted); margin-top: 14px;
  gap: 8px;
}
.progress-scale span:nth-child(2) { text-align: center; }
.progress-scale span:last-child { text-align: right; }

.reached-banner {
  display: none;
  align-items: center;
  gap: 8px;
  background: var(--green);
  border: 2.5px solid var(--ink);
  border-radius: 12px;
  padding: 8px 12px;
  margin: 4px 0 0;
  font-weight: 800;
  font-size: 13.5px;
  box-shadow: 2px 2px 0 var(--ink);
  line-height: 1.4;
}
.reached-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--ink);
  color: #c6e3bc;
  flex-shrink: 0;
  font-size: 13px;
}
.progress-wrap.is-soft-reached .reached-banner { display: flex; }
.progress-wrap.is-soft-reached .progress-fill {
  background: repeating-linear-gradient(-45deg, #6fbf5a, #6fbf5a 10px, #8fd47a 10px, #8fd47a 20px);
}
.progress-wrap.is-soft-reached .mark-soft em {
  background: var(--green);
}
.progress-wrap.is-hard-reached .progress-fill {
  background: repeating-linear-gradient(-45deg, var(--gold), var(--gold) 10px, #ffe38a 10px, #ffe38a 20px);
}
.progress-wrap.is-hard-reached .mark-hard em {
  background: #ffe38a;
}

.split-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 16px;
  margin: 0;
}
.split-grid div {
  background: #fff4e0;
  border: 2px solid var(--ink);
  border-radius: 14px;
  padding: 10px 12px;
}
.split-grid dt { font-size: 12px; font-weight: 800; color: var(--muted); }
.split-grid dd { margin: 0; font-weight: 800; line-height: 1.45; }

.mint-panel h3 { font-size: 28px; }
.wallet-status {
  margin: 10px 0 16px;
  padding: 12px 14px;
  border: 2.5px solid var(--ink);
  border-radius: 14px;
  background: #fff8e8;
  box-shadow: 2px 2px 0 var(--ink);
}
.wallet-status[hidden] { display: none; }
.wallet-status-addr {
  margin: 0;
  font-weight: 800;
  font-size: 15px;
}
.wallet-status-meta {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  font-weight: 700;
  font-size: 13.5px;
  line-height: 1.5;
}
.wallet-status-meta li { margin: 0; }
.wallet-chain-warn {
  margin: 8px 0 0;
  font-weight: 800;
  font-size: 13px;
  color: #8a1f00;
}
.wallet-chain-warn[hidden] { display: none; }

.quota-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 12px 0 18px;
}
.quota-grid div {
  border: 2.5px solid var(--ink);
  border-radius: 14px;
  padding: 10px;
  background: var(--green);
}
.quota-grid div:nth-child(2) { background: var(--pink); }
.quota-grid div:nth-child(3) { background: var(--blue); }
.quota-grid div:nth-child(4) { background: var(--gold); }
.quota-grid span { display: block; font-size: 12px; font-weight: 800; }
.quota-grid strong { font-size: 22px; font-family: var(--font-display); }

.qty-label { display: block; font-weight: 800; margin-bottom: 6px; }
.qty-row { display: flex; align-items: center; gap: 8px; }
.qty-btn {
  width: 42px; height: 42px;
  border: 3px solid var(--ink);
  border-radius: 12px;
  background: #fff;
  font-size: 22px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 2px 2px 0 var(--ink);
}
.qty-row input {
  width: 72px;
  height: 42px;
  text-align: center;
  border: 3px solid var(--ink);
  border-radius: 12px;
  font-weight: 800;
  font-size: 18px;
  background: #fff;
}
.cost-line { font-size: 16px; margin: 12px 0; }
.invite-box, .my-miners {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 3px dashed var(--ink);
}
.invite-box h4, .my-miners h4 { margin-bottom: 6px; }
.invite-row { display: flex; gap: 8px; }
.invite-row input {
  flex: 1;
  border: 3px solid var(--ink);
  border-radius: 12px;
  padding: 8px 10px;
  background: #fff;
  min-width: 0;
  font-size: 13px;
}
.ref-note { margin-top: 8px; font-weight: 700; color: var(--orange-deep); }
#minerList { list-style: none; padding: 0; margin: 8px 0; }
#minerList li {
  display: flex; justify-content: space-between; align-items: center;
  border: 2px solid var(--ink);
  border-radius: 12px;
  padding: 8px 12px;
  margin-bottom: 6px;
  font-weight: 800;
  background: #fff;
}
#minerList li.empty { background: #f4efe6; color: var(--muted); font-weight: 700; }
.hash-line { margin: 0; font-weight: 700; }

/* Rarity */
.rarity-grid {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.rarity-card {
  border: var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px 16px 22px;
  text-align: center;
  background: var(--card);
  position: relative;
}
.rarity-card h3 { font-size: 24px; margin-bottom: 0; }
.r-tag {
  position: absolute; top: -12px; right: 14px;
  background: var(--ink); color: #fff6e0;
  border-radius: 999px; padding: 3px 10px;
  font-weight: 800; font-size: 13px;
}
.r-mult {
  font-family: var(--font-display);
  font-size: 42px;
  margin: 4px 0 2px;
  line-height: 1;
}
.r-common { background: #f3efe6; }
.r-uncommon { background: var(--blue); }
.r-rare { background: var(--purple); }
.r-legendary {
  background: linear-gradient(180deg, #ffe38a, #f5b73a);
  transform: rotate(-1deg);
}
.rarity-note { max-width: var(--max); margin: 18px auto 0; }

/* Tokenomics */
.token-grid {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.1fr 1fr .9fr;
  gap: 18px;
}
.pies { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.pie {
  width: 140px; height: 140px;
  border-radius: 50%;
  border: 4px solid var(--ink);
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
}
.pie-token {
  background: conic-gradient(var(--orange) 0 80%, var(--blue-deep) 80% 100%);
}
.pie-bnb {
  background: conic-gradient(var(--green-deep) 0 85%, var(--pink-deep) 85% 100%);
}
.legend { list-style: none; padding: 0; margin: 0; flex: 1; }
.legend li { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; font-weight: 700; }
.legend span { color: var(--muted); font-size: 13px; }
.swatch { width: 14px; height: 14px; border: 2px solid var(--ink); border-radius: 4px; display: inline-block; flex-shrink: 0; }
.sw-orange { background: var(--orange); }
.sw-blue { background: var(--blue-deep); }
.sw-green { background: var(--green-deep); }
.sw-pink { background: var(--pink-deep); }
.sw-none { background: #fff; }
.tax-card .tax-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 12px 0;
}
.tax-card .tax-row div {
  border: 3px solid var(--ink);
  border-radius: 16px;
  padding: 14px 10px;
  text-align: center;
  background: #ffe0d4;
}
.tax-card .tax-row strong { display: block; font-size: 22px; font-family: var(--font-fun); }
.tax-card .tax-row span { font-weight: 800; }

/* Mining */
.chart-wrap {
  background: #fff;
  border: 3px solid var(--ink);
  border-radius: 16px;
  padding: 10px;
  margin: 12px 0;
  overflow: hidden;
}
#poolChart { width: 100%; height: auto; display: block; }
.table-wrap { overflow-x: auto; }
.proj-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.proj-table th, .proj-table td {
  border-bottom: 2px solid #eadcc4;
  text-align: left;
  padding: 8px 6px;
  white-space: nowrap;
}
.proj-table th { font-size: 12px; letter-spacing: .04em; text-transform: uppercase; }
.reward-dl { margin: 0; }
.reward-dl div {
  display: flex; justify-content: space-between; gap: 12px;
  border-bottom: 2px dashed #eadcc4;
  padding: 10px 0;
}
.reward-dl dt { color: var(--muted); font-weight: 700; }
.reward-dl dd { margin: 0; font-weight: 800; text-align: right; }

/* Redeem */
.redeem-card {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: center;
}
.redeem-price { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.redeem-price img {
  width: 64px; height: 64px;
  border: 3px solid var(--ink);
  border-radius: 50%;
  background: #fff;
}
.redeem-price strong, .redeem-price span { display: block; }

/* Roadmap */
.roadmap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  counter-reset: none;
}
.roadmap .rm-num {
  font-family: var(--font-display);
  font-size: 36px;
  color: var(--orange-deep);
  display: block;
}
.roadmap .card { margin: 0; }
.roadmap li[data-phase="mint"] { background: #fff3cf; }
.roadmap li[data-phase="launch"] { background: var(--blue); }
.roadmap li[data-phase="mining"] { background: var(--green); }

/* FAQ */
.faq { max-width: 800px; margin: 0 auto; }
.faq details {
  background: var(--card);
  border: var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow-sm);
  padding: 4px 18px;
  margin-bottom: 12px;
}
.faq summary {
  cursor: pointer;
  font-weight: 800;
  font-size: 17px;
  padding: 12px 0;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  float: right;
  font-family: var(--font-display);
  font-size: 22px;
  line-height: 1;
}
.faq details[open] summary::after { content: "–"; }
.faq details p { margin-top: 0; padding-bottom: 12px; }

/* Footer */
.site-footer {
  background: var(--ink);
  color: #f7e7c8;
  padding: 48px 20px 36px;
}
.footer-inner { max-width: var(--max); margin: 0 auto; }
.footer-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.footer-brand img {
  width: 56px; height: 56px;
  border-radius: 50%;
  border: 3px solid #f7e7c8;
  background: #fff;
}
.footer-brand strong { display: block; font-family: var(--font-display); font-size: 22px; color: #fff; }
.footer-brand span { font-size: 13px; }
.disclaimer { max-width: 62em; font-size: 14.5px; line-height: 1.7; color: #f0d9a6; }
.footer-meta, .copyright { font-size: 13px; color: #cbb892; }
.copyright { margin-bottom: 0; }

/* Toast */
.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  background: var(--ink);
  color: #fff6e0;
  border: 3px solid #fff;
  border-radius: 999px;
  padding: 10px 18px;
  font-weight: 800;
  z-index: 80;
  box-shadow: var(--shadow);
  max-width: calc(100% - 32px);
}
.toast[hidden] { display: none; }

/* Reveal modal */
.modal[hidden] { display: none; }
.modal { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 20px; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(16,12,8,.62); }
.modal-card {
  position: relative;
  width: min(420px, 100%);
  background: var(--cream);
  border: 4px solid var(--ink);
  border-radius: 28px;
  box-shadow: 10px 10px 0 var(--ink);
  padding: 28px 22px 24px;
  text-align: center;
}
.reveal-mascot {
  width: 160px; height: 160px; margin: 0 auto 8px;
  border-radius: 50%;
  border: 4px solid var(--ink);
  background: #fff;
  animation: shake 0.35s linear infinite;
}
@keyframes shake {
  0%, 100% { transform: rotate(-4deg) scale(1); }
  50% { transform: rotate(4deg) scale(1.04); }
}
.reveal-spin { font-family: var(--font-fun); font-size: 24px; }
.reveal-result .reveal-mascot { animation: none; }
.reveal-result h3 { font-size: 32px; margin: 4px 0; }
.modal-card.is-done .reveal-stage { display: none; }
.modal-card.is-done .reveal-result { display: block; }
.reveal-result[hidden] { display: none; }
.r-common-bg { background: #f3efe6; }
.r-uncommon-bg { background: var(--blue); }
.r-rare-bg { background: var(--purple); }
.r-legendary-bg { background: linear-gradient(180deg, #ffe38a, #f5b73a); }

/* Nav open (mobile) */
@media (max-width: 1080px) {
  .nav-toggle { display: flex; }
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: var(--paper);
    border-bottom: var(--line);
    flex-direction: column;
    padding: 10px 16px 16px;
    margin: 0;
  }
  .nav-links.is-open { display: flex; }
  .hero-grid, .mint-layout, .mining-layout, .token-grid, .redeem-card, .roadmap, .rarity-grid, .hero-stats, .hero-art, .rules-grid, .boards-grid {
    grid-template-columns: 1fr;
  }
  .hero-art { max-width: 420px; }
  .comic-frame { transform: none; }
  .hero h1 { font-size: 72px; }
  .count-block { min-width: 78px; }
  .count-block strong { font-size: 32px; }
  .rarity-grid { grid-template-columns: 1fr 1fr; }
  .split-grid { grid-template-columns: 1fr; }
  .bubble-mini { right: 0; font-size: 15px; }
  .mascot-wrap { overflow: visible; }
  .hero-art { max-width: 100%; }
  .proj-table { font-size: 13px; }
}

@media (max-width: 560px) {
  .countdown { gap: 4px; }
  .count-block { min-width: 62px; padding: 10px 4px; }
  .count-block strong { font-size: 28px; }
  .count-sep { font-size: 26px; padding-top: 10px; }
  .hero { padding: 24px 16px 40px; }
  .section { padding: 48px 16px; }
  .hero h1 { font-size: 58px; text-shadow: 3px 3px 0 #fff, 5px 5px 0 var(--ink); }
  .hero-stats { grid-template-columns: 1fr 1fr; }
  .rarity-grid { grid-template-columns: 1fr; }
  .chain-pill { display: none; }
  .brand-chain { display: none; }
  .progress-mark em { font-size: 10px; padding: 0 4px; }
  .invite-row { flex-direction: column; }
  .card { padding: 16px; }
  .demo-banner { font-size: 12px; text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .mascot, .reveal-mascot, .demo-dot { animation: none; }
}

/* Language toggle */
.lang-toggle {
  display: inline-flex;
  border: 2.5px solid var(--ink);
  border-radius: 999px;
  overflow: hidden;
  box-shadow: 2px 2px 0 var(--ink);
  background: #fff;
  flex-shrink: 0;
}
.lang-btn {
  border: 0;
  background: transparent;
  padding: 5px 10px;
  font-weight: 800;
  font-size: 12px;
  cursor: pointer;
  letter-spacing: .04em;
  line-height: 1.2;
}
.lang-btn + .lang-btn { border-left: 2.5px solid var(--ink); }
.lang-btn.is-active {
  background: var(--ink);
  color: #fff8e8;
}
.lang-btn:focus-visible { outline: 2px solid var(--orange); outline-offset: -2px; }

html[lang="en"] h2,
html[lang="en"] h3,
html[lang="en"] h4 {
  font-family: var(--font-display), var(--font-body);
  letter-spacing: 0;
}

/* Launch rules */
.launch-rules {
  max-width: var(--max);
  margin: 0 auto 28px;
}
.rules-intro { margin-bottom: 16px; }
.rules-intro h3 { font-size: clamp(26px, 4vw, 36px); margin-bottom: 6px; }
.rules-intro p { max-width: 44em; margin: 0; font-size: 16.5px; }
.rules-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.rule-card {
  border: var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px 18px 20px;
  position: relative;
  min-height: 100%;
}
.rule-card h4 { font-size: 22px; margin: 4px 0 8px; }
.rule-card p { margin: 0; font-size: 15px; line-height: 1.55; }
.rule-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}
.rule-num {
  font-family: var(--font-display);
  font-size: 28px;
  color: var(--orange-deep);
  line-height: 1;
}
.rule-badge {
  border: 2.5px solid var(--ink);
  border-radius: 999px;
  padding: 3px 10px;
  font-weight: 800;
  font-size: 12px;
  background: #fff;
  box-shadow: 2px 2px 0 var(--ink);
  letter-spacing: .02em;
}
.rule-soft { background: var(--green); }
.rule-hard { background: var(--gold); }
.rule-refund { background: var(--pink); }

/* Leaderboards */
.demo-data-note {
  max-width: var(--max);
  margin: -8px auto 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 14px;
  color: var(--ink-soft);
}
.demo-data-note[hidden] { display: none; }
.demo-pill {
  display: inline-flex;
  align-items: center;
  background: var(--ink);
  color: #ffe9b8;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  flex-shrink: 0;
}
.boards-grid {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  align-items: start;
}
.board-card h3 { font-size: 26px; margin-bottom: 12px; }
.board-table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.board-table th, .board-table td {
  text-align: left;
  padding: 10px 8px;
  border-bottom: 2px solid #eadcc4;
  vertical-align: middle;
}
.board-table th {
  font-size: 12px;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--muted);
}
.board-table th:first-child,
.board-table td:first-child { width: 64px; text-align: center; }
.board-table th:last-child,
.board-table td:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.board-table tbody tr.is-you {
  background: #ffe0a8;
  outline: 3px solid var(--ink);
  outline-offset: -3px;
}
.board-table tbody tr.is-you td:first-child { border-radius: 10px 0 0 10px; }
.board-table tbody tr.is-you td:last-child { border-radius: 0 10px 10px 0; }
.board-addr {
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: .01em;
}
.board-you-tag {
  display: inline-block;
  margin-left: 6px;
  background: var(--ink);
  color: #fff8e8;
  border-radius: 999px;
  padding: 1px 7px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .06em;
  vertical-align: middle;
}
.board-rank {
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
}
.board-medal {
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 2.5px solid var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 13px;
  box-shadow: 2px 2px 0 var(--ink);
}
.board-medal.m1 { background: var(--gold); }
.board-medal.m2 { background: #d8dde4; }
.board-medal.m3 { background: #e0b08a; }
.board-empty { text-align: center; color: var(--muted); font-weight: 700; padding: 16px 8px; }

@media (max-width: 1080px) {
  .nav-actions { gap: 6px; }
  .lang-btn { padding: 5px 8px; }
  .progress-mark em { font-size: 10px; padding: 2px 6px 3px; }
  .progress-mark em strong { font-size: 11px; }
}

@media (max-width: 700px) {
  .progress-track { margin-top: 18px; }
  .progress-mark em { display: none; }
  .progress-mark i { height: 44px; }
  .progress-scale { margin-top: 16px; font-size: 11px; flex-wrap: wrap; }
  .reached-banner { font-size: 12.5px; }
}

@media (max-width: 560px) {
  .lang-toggle { order: -1; }
  .rules-grid, .boards-grid { grid-template-columns: 1fr; }
  .board-table { font-size: 13.5px; }
  .progress-scale span:nth-child(2),
  .progress-scale span:last-child { max-width: 46%; }
}

/* Agent prompts */
.agent-card { max-width: var(--max); margin: 0 auto; }
.agent-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 18px;
}
.agent-meta > div {
  background: #fff4e0;
  border: 2.5px solid var(--ink);
  border-radius: 14px;
  padding: 10px 12px;
  min-width: 0;
}
.agent-k { display: block; font-size: 12px; font-weight: 800; color: var(--muted); margin-bottom: 4px; }
.agent-meta code {
  display: block;
  font-weight: 800;
  font-size: 13px;
  word-break: break-all;
  font-family: ui-monospace, Menlo, monospace;
}
.agent-prompts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.agent-prompt-block {
  border: 2.5px solid var(--ink);
  border-radius: 18px;
  padding: 14px;
  background: #fff;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.agent-prompt-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px 12px;
}
.agent-prompt-head h3 { flex: 1 1 auto; margin: 0; font-size: 22px; }
.agent-prompt-head .btn { margin-left: auto; }
.agent-qty .qty-label { margin-bottom: 4px; }
.agent-prompt-block textarea {
  width: 100%;
  min-height: 168px;
  resize: vertical;
  border: 3px solid var(--ink);
  border-radius: 12px;
  padding: 10px 12px;
  background: #fffaf2;
  font: 14px/1.55 var(--font-body);
  font-weight: 700;
}

/* Connect modal */
.connect-card { width: min(460px, 100%); text-align: left; }
.connect-card h3 { text-align: center; font-size: 28px; }
.connect-lead { text-align: center; }
.connect-close {
  position: absolute;
  top: 10px; right: 12px;
  width: 36px; height: 36px;
  border: 2.5px solid var(--ink);
  border-radius: 10px;
  background: #fff;
  font-size: 22px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 2px 2px 0 var(--ink);
  line-height: 1;
}
.connect-option {
  border: 3px solid var(--ink);
  border-radius: 20px;
  padding: 14px 14px 16px;
  background: #fff3cf;
  margin: 14px 0 16px;
  text-align: center;
}
.connect-option h4 { font-size: 18px; margin-bottom: 6px; }
.qr-frame {
  position: relative;
  width: 240px;
  height: 240px;
  margin: 12px auto;
  background: #fff;
  border: 3.5px solid var(--ink);
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
  display: grid;
  place-items: center;
  overflow: hidden;
}
.qr-frame canvas { width: 220px; height: 220px; }
.qr-demo-stamp {
  position: absolute;
  inset: auto 12px 12px auto;
  background: var(--ink);
  color: #ffe9b8;
  font-weight: 800;
  font-size: 11px;
  letter-spacing: .1em;
  border-radius: 999px;
  padding: 3px 8px;
}
.connect-card .btn-block { margin-top: 8px; }

@media (max-width: 1080px) {
  .agent-prompts, .agent-meta { grid-template-columns: 1fr; }
}
/* Prevent wide tables / grid children from blowing out the mobile page */
.mint-layout, .mining-layout, .token-grid, .boards-grid, .rules-grid, .agent-prompts, .hero-grid {
  min-width: 0;
}
.card, .mint-layout > *, .mining-layout > *, .token-grid > *, .boards-grid > * {
  min-width: 0;
  max-width: 100%;
}
.table-wrap {
  overflow-x: auto;
  max-width: 100%;
  -webkit-overflow-scrolling: touch;
}
@media (max-width: 700px) {
  .proj-table th, .proj-table td { white-space: normal; }
  .progress-scale { overflow-wrap: anywhere; }
}
@media (max-width: 700px) {
  .nav-inner { padding: 8px 10px; gap: 8px; min-width: 0; }
  .nav-actions { gap: 6px; min-width: 0; flex-shrink: 1; }
  .site-header .btn { padding: 8px 10px; font-size: 13px; }
  .nav-toggle { width: 38px; height: 38px; flex-shrink: 0; }
  .lang-btn { padding: 5px 7px; }
}

/* Sloth rarity accessories */
.sloth-art {
  position: relative;
  width: 96px;
  height: 96px;
  margin: 10px auto 12px;
}
.sloth-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  border: 3px solid var(--ink);
  background: #fff;
  display: block;
}
.sloth-art-lg {
  width: 160px;
  height: 160px;
  margin: 4px auto 10px;
}
.sloth-art .acc { display: none; pointer-events: none; }
.sloth-art[data-acc="cap"] .acc-nightcap { display: block; }
.sloth-art[data-acc="chill"] .acc-hammock,
.sloth-art[data-acc="chill"] .acc-beer { display: block; }
.sloth-art[data-acc="crown"] .acc-crown { display: block; }
.acc-nightcap {
  position: absolute;
  top: -12px;
  left: 50%;
  width: 58px;
  height: 34px;
  transform: translateX(-42%) rotate(-20deg);
  background: #3a5aa8;
  border: 3px solid var(--ink);
  border-radius: 44px 44px 8px 8px;
  z-index: 2;
}
.acc-nightcap::after {
  content: "";
  position: absolute;
  top: -9px;
  right: -7px;
  width: 16px;
  height: 16px;
  background: #fff6e0;
  border: 3px solid var(--ink);
  border-radius: 50%;
}
.sloth-art-lg .acc-nightcap {
  width: 88px;
  height: 48px;
  top: -16px;
}
.sloth-art-lg .acc-nightcap::after {
  width: 20px;
  height: 20px;
  top: -10px;
  right: -8px;
}
.acc-hammock {
  position: absolute;
  left: -16px;
  right: -16px;
  bottom: -10px;
  height: 26px;
  border: 3px solid var(--ink);
  border-radius: 50% 50% 50% 50% / 20% 20% 80% 80%;
  background: #f2c14d;
  z-index: 2;
  box-shadow: inset 0 6px 0 #e39b2a;
}
.acc-hammock::before,
.acc-hammock::after {
  content: "";
  position: absolute;
  top: -22px;
  width: 3px;
  height: 28px;
  background: var(--ink);
}
.acc-hammock::before { left: 6px; transform: rotate(-22deg); }
.acc-hammock::after { right: 6px; transform: rotate(22deg); }
.acc-beer {
  position: absolute;
  right: -12px;
  bottom: 14px;
  font-size: 24px;
  line-height: 1;
  z-index: 3;
  filter: drop-shadow(1px 1px 0 #101010);
}
.sloth-art-lg .acc-beer { font-size: 34px; right: -14px; bottom: 20px; }
.acc-crown {
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%) rotate(-8deg);
  font-size: 36px;
  line-height: 1;
  z-index: 2;
  filter: drop-shadow(1px 1px 0 #101010);
}
.sloth-art-lg .acc-crown { font-size: 48px; top: -26px; }
.rarity-card h3 { font-size: 22px; }

/* Rarity drop-rate line + aligned Max button */
.r-rate {
  margin: 6px 0 0;
  font-size: 13px;
  font-weight: 800;
  color: var(--ink-soft);
  line-height: 1.35;
}
.qty-max {
  border: 3px solid var(--ink);
  border-radius: 12px;
  background: #fff;
  font-weight: 800;
  font-size: 13px;
  height: 42px;
  padding: 0 12px;
  cursor: pointer;
  box-shadow: 2px 2px 0 var(--ink);
  flex-shrink: 0;
}

/* ===== Mobile tidy-up (do not affect desktop) ===== */
@media (max-width: 700px) {
  html { overflow-x: hidden; }
  body { overflow-x: hidden; }
  html { scroll-padding-top: 124px; }

  /* Consistent 16px page gutter + vertical rhythm */
  .hero { padding: 28px 16px 36px; }
  .section { padding: 40px 16px; }
  .site-footer { padding: 40px 16px 32px; }
  .demo-banner { padding: 10px 16px; }
  .nav-inner { padding: 8px 16px; gap: 8px; }
  .section-head { margin: 0 auto 20px; }
  .section-head h2 { font-size: clamp(28px, 8vw, 40px); }
  .section-head p { font-size: 15.5px; margin-bottom: 0; }
  .launch-rules { margin: 0 auto 22px; }
  .rules-intro { margin-bottom: 14px; }
  .card, .rule-card, .board-card, .agent-card, .connect-option {
    box-shadow: var(--shadow-sm);
  }
  .card { padding: 16px; }
  .rule-card { padding: 16px; }
  .r-legendary { transform: none; }

  /* Numbers stay intact */
  .hero-stats strong,
  .count-block strong,
  .progress-meta,
  .progress-scale,
  .quota-grid strong,
  .cost-line,
  .board-table td:last-child,
  .reward-dl dd,
  .r-mult {
    font-variant-numeric: tabular-nums;
  }
  .progress-meta span,
  .progress-scale span,
  .cost-line,
  .hero-stats strong {
    white-space: nowrap;
  }

  /* Hero */
  .hero-stats {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin: 18px 0 16px;
  }
  .hero-stats li {
    min-height: 76px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 12px 8px;
  }
  .hero-ctas {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-bottom: 12px;
  }
  .hero-ctas .btn { width: 100%; justify-content: center; }

  /* Countdown: equal flex cells */
  .countdown { gap: 6px; }
  .count-block {
    flex: 1;
    min-width: 0;
    padding: 10px 2px;
  }
  .count-block strong { font-size: 26px; }
  .count-sep { font-size: 22px; padding-top: 8px; }

  /* Progress scale: 3 aligned columns, no wrap */
  .progress-track { margin-top: 16px; }
  .progress-scale {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 6px;
    margin-top: 16px;
    font-size: 11px;
    overflow-wrap: normal;
    flex-wrap: nowrap;
  }
  .progress-scale span:nth-child(2),
  .progress-scale span:last-child { max-width: none; }
  .progress-scale span:first-child { text-align: left; }
  .progress-scale span:nth-child(2) { text-align: center; }
  .progress-scale span:last-child { text-align: right; }

  /* Mint info chips back to 2x2; quota already 2x2 */
  .split-grid {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .split-grid div {
    min-height: 72px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 10px;
  }
  .quota-grid { gap: 8px; }
  .quota-grid div { min-height: 72px; display: flex; flex-direction: column; justify-content: center; }

  /* Qty + invite + mint CTA */
  .qty-row { flex-wrap: wrap; gap: 8px; }
  .qty-btn, .qty-row input, .qty-max { height: 44px; min-height: 44px; }
  .qty-btn { width: 44px; }
  .invite-row { flex-direction: column; align-items: stretch; gap: 8px; }
  .invite-row input, .invite-row .btn { width: 100%; min-height: 44px; }
  .mint-panel .btn-block, .redeem-card .btn-block { min-height: 48px; }

  /* Rules: full-width, even gaps */
  .rules-grid { gap: 12px; }

  /* Rarity 2x2, equal height */
  .rarity-grid {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    align-items: stretch;
  }
  .rarity-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    padding: 20px 8px 14px;
    min-width: 0;
  }
  .rarity-card h3 { font-size: 16px; line-height: 1.25; margin-top: 0; }
  .rarity-card .r-mult { font-size: 28px; margin: 2px 0 4px; }
  .rarity-card p { font-size: 11px; margin: 0; line-height: 1.35; }
  .rarity-card .r-rate { font-size: 11px; margin-top: auto; padding-top: 8px; }
  .sloth-art { width: 72px; height: 72px; margin: 8px auto 8px; }
  .acc-nightcap { width: 44px; height: 26px; top: -10px; }
  .acc-crown { font-size: 28px; top: -16px; }
  .acc-beer { font-size: 18px; right: -8px; }
  .r-tag { font-size: 11px; padding: 2px 8px; right: 8px; }

  /* Tokenomics */
  .pies { flex-direction: column; align-items: center; gap: 12px; }
  .pie { width: 128px; height: 128px; }
  .legend { width: 100%; }
  .tax-card .tax-row { gap: 8px; }

  /* Mining table: keep columns aligned, allow header wrap, numbers nowrap */
  .proj-table { font-size: 12.5px; }
  .proj-table th, .proj-table td { padding: 8px 6px; vertical-align: middle; }
  .proj-table td { white-space: nowrap; font-variant-numeric: tabular-nums; }
  .proj-table th { white-space: normal; }
  .reward-dl div { align-items: baseline; }
  .reward-dl dd { white-space: nowrap; }

  /* Leaderboards */
  .boards-grid { gap: 14px; }
  .board-table { font-size: 13px; }
  .board-table th, .board-table td { padding: 9px 6px; }
  .board-table th:first-child,
  .board-table td:first-child { width: 44px; }
  .board-addr { font-size: 12.5px; }

  /* Agent prompts */
  .agent-meta, .agent-prompts { gap: 12px; }
  .agent-prompt-head {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .agent-prompt-head h3 { font-size: 20px; }
  .agent-prompt-head .btn,
  .agent-prompt-block .btn {
    margin-left: 0;
    width: 100%;
    min-height: 44px;
  }
  .agent-prompt-block textarea { min-height: 150px; }

  /* Redeem */
  .redeem-card { gap: 16px; }
  .redeem-price { flex-wrap: wrap; }

  /* Roadmap + FAQ */
  .roadmap { gap: 12px; }
  .faq summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 44px;
  }
  .faq summary::after { float: none; flex-shrink: 0; }

  /* Footer / headings share the same 16px inset */
  .footer-inner { max-width: none; }

  /* Modals */
  .modal { padding: 16px; }
  .modal-card {
    width: min(420px, 100%);
    padding: 22px 16px 18px;
    box-shadow: var(--shadow-sm);
  }
  .connect-close { width: 44px; height: 44px; top: 8px; right: 8px; }
  .qr-frame { width: min(220px, 70vw); height: min(220px, 70vw); }
  .qr-frame canvas { width: 92%; height: 92%; }
  .connect-card .btn-block { min-height: 48px; }
  .sloth-art-lg { width: 132px; height: 132px; }

  /* Safe tap targets */
  .nav-toggle { width: 44px; height: 44px; }
  .lang-btn { padding: 8px 8px; min-height: 32px; }
}

@media (max-width: 420px) {
  /* Two-row header so the connect / disconnect row does not overflow at 360px */
  .nav-inner {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "brand toggle"
      "actions actions";
    align-items: center;
    padding: 8px 16px 10px;
    gap: 8px 12px;
  }
  .brand { grid-area: brand; min-width: 0; }
  .nav-toggle { grid-area: toggle; }
  .nav-actions {
    grid-area: actions;
    margin-left: 0;
    width: 100%;
    gap: 8px;
  }
  .nav-actions .btn { flex: 1; min-height: 44px; font-size: 14px; padding: 8px 12px; }
  .nav-links {
    padding: 10px 16px 16px;
  }
}

@media (max-width: 360px) {
  .rarity-card h3 { font-size: 15px; }
  .hero-stats strong { font-size: 13.5px; }
  .progress-scale { font-size: 10.5px; }
}
