:root {
  --ink: #1b140f;
  --wall: #c49a72;
  --wall-deep: #8b6244;
  --shadow: #3a281c;
  --lamp: #ffe7ad;
  --lamp-hot: #fff4d2;
  --shirt: #6ea34f;
  --shirt-dark: #4d7c36;
  --sold: #e10600;
  --up: #1f9d55;
  --down: #d7263d;
  --paper: #f6f1e6;
  --desk: #b98356;
  --line: #1b140f;
  --muted: #6d5644;
  --card: #fffaf1;
  --ok: #1f7a45;
  --bad: #b42318;
  --radius: 18px;
  --font: "Outfit", system-ui, sans-serif;
  --display: "Lilita One", "Arial Black", sans-serif;
  --marker: "Permanent Marker", cursive;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  font-family: var(--font);
  background:
    radial-gradient(900px 520px at 12% 0%, rgba(255, 231, 173, 0.55), transparent 60%),
    radial-gradient(700px 480px at 100% 10%, rgba(110, 163, 79, 0.16), transparent 55%),
    linear-gradient(180deg, #d7b08a 0%, #b88862 38%, #8d6546 100%);
  min-height: 100vh;
  overflow-x: hidden;
}
body::before {
  content: "";
  pointer-events: none;
  position: fixed;
  inset: 0;
  background-image: radial-gradient(rgba(27, 20, 15, 0.08) 0.6px, transparent 0.6px);
  background-size: 3px 3px;
  mix-blend-mode: multiply;
  opacity: 0.45;
  z-index: 0;
}
a { color: inherit; }
img { max-width: 100%; display: block; }
button, input { font-family: inherit; }

.wrap {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 0;
  background: rgba(196, 154, 114, 0.86);
  backdrop-filter: blur(10px);
  border-bottom: 3px solid var(--ink);
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: var(--display);
  letter-spacing: 0.3px;
  font-size: 22px;
}
.brand img {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  border: 2px solid var(--ink);
  object-fit: cover;
  object-position: 70% 40%;
}
.nav {
  display: flex;
  gap: 6px;
  margin-left: auto;
}
.nav a, .drawer a {
  text-decoration: none;
  font-weight: 700;
  padding: 8px 12px;
  border-radius: 999px;
}
.nav a:hover, .drawer a:hover { background: rgba(255, 250, 241, 0.55); }
.connect, .burger {
  border: 3px solid var(--ink);
  background: var(--shirt);
  color: #f7fff1;
  font-weight: 750;
  border-radius: 999px;
  padding: 10px 16px;
  box-shadow: 3px 3px 0 var(--ink);
  cursor: pointer;
}
.connect.is-on { background: var(--ink); color: var(--lamp); }
.connect:hover, .burger:hover { transform: translate(-1px, -1px); }
.burger {
  display: none;
  background: var(--paper);
  color: var(--ink);
  width: 46px;
  height: 42px;
  padding: 0;
  font-size: 20px;
}
.drawer {
  display: none;
  position: absolute;
  top: 70px;
  right: 16px;
  left: 16px;
  background: var(--paper);
  border: 3px solid var(--ink);
  border-radius: 16px;
  box-shadow: 6px 6px 0 var(--ink);
  padding: 10px;
  z-index: 30;
}
.drawer.is-open { display: grid; }
.drawer a { display: block; padding: 12px; }

.ticker {
  overflow: hidden;
  border-bottom: 3px solid var(--ink);
  background: var(--ink);
  color: var(--lamp);
  position: relative;
  z-index: 1;
}
.ticker-track {
  display: flex;
  gap: 28px;
  width: max-content;
  padding: 8px 0;
  font-family: var(--marker);
  letter-spacing: 0.4px;
  animation: march 22s linear infinite;
}
.ticker b { color: #ff5a4e; }

.hero {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 28px;
  align-items: center;
  padding: 34px 0 18px;
}
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--sold);
  color: white;
  font-weight: 800;
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: 4px 10px;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  font-size: 12px;
  box-shadow: 3px 3px 0 var(--ink);
  animation: stamp 2.6s ease-in-out infinite;
}
h1 {
  font-family: var(--display);
  font-size: clamp(46px, 7vw, 84px);
  line-height: 0.88;
  margin: 12px 0 8px;
  letter-spacing: 0.4px;
  text-shadow: 4px 4px 0 rgba(255, 231, 173, 0.7);
}
.sub {
  font-family: var(--marker);
  font-size: clamp(18px, 2.4vw, 26px);
  color: #4a2e1e;
  margin: 0 0 14px;
}
.lede {
  font-size: 17px;
  line-height: 1.5;
  max-width: 52ch;
  margin: 0 0 16px;
}
.pills { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.pill {
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: 6px 10px;
  font-weight: 700;
  font-size: 13px;
  box-shadow: 2px 2px 0 var(--ink);
}
.ca {
  display: flex;
  gap: 8px;
  align-items: center;
  background: rgba(255, 250, 241, 0.7);
  border: 2px dashed var(--ink);
  border-radius: 12px;
  padding: 8px 10px;
  max-width: 520px;
}
.ca span {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
}
.ca { cursor: pointer; }
.ca button {
  margin-left: auto;
  border: 2px solid var(--ink);
  background: var(--lamp);
  border-radius: 8px;
  font-weight: 800;
  cursor: pointer;
  padding: 6px 10px;
  flex: 0 0 auto;
}
.ca button.is-copied { background: var(--shirt); color: white; }

.hero-art {
  position: relative;
  transition: transform 0.2s linear;
}
.hero-art img {
  width: 100%;
  border: 4px solid var(--ink);
  border-radius: 22px;
  box-shadow: 10px 10px 0 var(--ink);
  animation: floaty 4.5s ease-in-out infinite;
  background: #d7b08a;
}
.sold-tag, .float-note, .pizza, .can {
  position: absolute;
  border: 3px solid var(--ink);
  box-shadow: 4px 4px 0 var(--ink);
  pointer-events: none;
}
.sold-tag {
  top: 12%;
  left: -8px;
  background: var(--sold);
  color: white;
  font-family: var(--marker);
  padding: 6px 10px;
  transform: rotate(-8deg);
  animation: bob 2.2s ease-in-out infinite;
}
.float-note {
  right: -6px;
  bottom: 18%;
  background: var(--lamp);
  font-weight: 800;
  padding: 8px 10px;
  border-radius: 12px;
  transform: rotate(4deg);
  animation: bob 3s ease-in-out infinite reverse;
}
.pizza {
  width: 54px;
  height: 54px;
  border-radius: 50% 50% 12px 50%;
  background: radial-gradient(circle at 40% 40%, #f0c14d, #e09a2b 60%, #c4742a);
  bottom: -12px;
  left: 8%;
  animation: drift 7s ease-in-out infinite;
}
.pizza::after {
  content: "";
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #c0392b;
  top: 16px;
  left: 18px;
  box-shadow: 12px 8px 0 #c0392b, 6px 16px 0 #c0392b;
}
.can {
  width: 28px;
  height: 48px;
  border-radius: 6px;
  background: linear-gradient(#5b4fcf, #c0392b 55%, #5b4fcf);
  right: 10%;
  top: -10px;
  animation: bob 2.8s ease-in-out infinite;
}

.swap {
  margin-top: -8px;
  background: var(--card);
  border: 3px solid var(--ink);
  border-radius: 22px;
  box-shadow: 8px 8px 0 var(--ink);
  padding: 16px;
  position: relative;
  z-index: 2;
}
.swap-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.swap-head strong { font-family: var(--display); font-size: 22px; letter-spacing: 0.3px; }
.swap-head span { font-size: 12px; font-weight: 700; color: var(--muted); }
.pay-switch { display: flex; gap: 6px; }
.pay-switch button, .slip button {
  border: 2px solid var(--ink);
  background: #efe6d6;
  border-radius: 999px;
  font-weight: 800;
  padding: 6px 10px;
  cursor: pointer;
}
.pay-switch button.is-on, .slip button.is-on {
  background: var(--ink);
  color: var(--lamp);
}
.field {
  background: #f3ecdf;
  border: 2px solid var(--ink);
  border-radius: 16px;
  padding: 12px;
  margin-bottom: 8px;
}
.field label {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--muted);
}
.field-row { display: flex; align-items: center; gap: 8px; }
.field input {
  width: 100%;
  border: 0;
  background: transparent;
  font-size: 28px;
  font-weight: 750;
  outline: none;
  color: var(--ink);
}
.token-chip {
  border: 2px solid var(--ink);
  background: white;
  border-radius: 999px;
  padding: 6px 10px;
  font-weight: 800;
  white-space: nowrap;
}
.recv {
  font-size: 28px;
  font-weight: 750;
  min-height: 36px;
}
.slip { display: flex; gap: 6px; align-items: center; margin: 8px 0 12px; flex-wrap: wrap; }
.slip span { font-size: 12px; font-weight: 800; color: var(--muted); }
.swap-go {
  width: 100%;
  border: 3px solid var(--ink);
  background: var(--sold);
  color: white;
  font-family: var(--display);
  font-size: 26px;
  letter-spacing: 0.4px;
  border-radius: 14px;
  padding: 12px;
  cursor: pointer;
  box-shadow: 4px 4px 0 var(--ink);
}
.swap-go:hover { transform: translate(-1px, -1px); }
.swap-go:disabled { opacity: 0.7; cursor: progress; }
.swap-status {
  min-height: 20px;
  margin: 8px 0 0;
  font-size: 13px;
  font-weight: 700;
  word-break: break-word;
}
.swap-status[data-kind="ok"] { color: var(--ok); }
.swap-status[data-kind="bad"] { color: var(--bad); }

.section { padding: 28px 0; position: relative; z-index: 1; }
.section h2 {
  font-family: var(--display);
  font-size: clamp(32px, 5vw, 48px);
  margin: 0 0 8px;
  letter-spacing: 0.4px;
}
.section .deck { margin: 0 0 16px; max-width: 62ch; font-size: 17px; }

.panel {
  background: var(--paper);
  border: 3px solid var(--ink);
  border-radius: 22px;
  box-shadow: 8px 8px 0 var(--ink);
  overflow: hidden;
}
.chart-frame {
  width: 100%;
  height: 560px;
  border: 0;
  background: #12140f;
  display: block;
}
.chart-hold {
  height: 420px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.2), transparent 30%),
    repeating-linear-gradient(90deg, transparent, transparent 39px, rgba(27,20,15,0.08) 40px),
    repeating-linear-gradient(0deg, transparent, transparent 39px, rgba(27,20,15,0.08) 40px),
    #f7f3ea;
  position: relative;
  overflow: hidden;
}
.candle {
  position: absolute;
  bottom: 70px;
  width: 14px;
  border-radius: 3px;
  background: var(--up);
  animation: rise 3.4s ease-in-out infinite;
}
.candle::before {
  content: "";
  position: absolute;
  left: 6px;
  width: 2px;
  background: inherit;
  top: -18px;
  bottom: -18px;
}
.candle.down { background: var(--down); }
.chart-hold .sold-float {
  position: absolute;
  left: 18%;
  top: 42%;
  color: var(--sold);
  font-family: var(--marker);
  font-size: 42px;
  animation: bob 1.8s ease-in-out infinite;
}
.chart-hold p {
  position: absolute;
  left: 20px;
  bottom: 16px;
  margin: 0;
  font-weight: 750;
}

.grid-3, .grid-2 { display: grid; gap: 14px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: 1.2fr 0.8fr; }
.card {
  background: var(--paper);
  border: 3px solid var(--ink);
  border-radius: 18px;
  box-shadow: 6px 6px 0 var(--ink);
  padding: 16px;
}
.card h3 { margin: 0 0 6px; font-size: 20px; }
.card p { margin: 0; color: #3d2b22; line-height: 1.45; }
.stat b {
  display: block;
  font-family: var(--display);
  font-size: 28px;
  letter-spacing: 0.3px;
}
.phase {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.num {
  flex: 0 0 42px;
  height: 42px;
  border-radius: 12px;
  border: 3px solid var(--ink);
  background: var(--lamp);
  display: grid;
  place-items: center;
  font-family: var(--display);
  font-size: 20px;
}
.lore-panel { padding: 18px; }
.monitor {
  background: #172016;
  color: #d7f5cf;
  border-radius: 12px;
  padding: 14px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  min-height: 180px;
  position: relative;
  overflow: hidden;
}
.monitor .up { color: #3ddc78; }
.monitor .down { color: #ff5d6c; }
.blink { animation: blink 1.1s steps(1) infinite; }

.site-footer {
  border-top: 3px solid var(--ink);
  padding: 22px 0 32px;
  position: relative;
  z-index: 1;
}
.foot-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}
.foot-links { display: flex; gap: 12px; flex-wrap: wrap; }
.foot-links a { font-weight: 750; }
.fine { color: #4d382b; font-size: 13px; max-width: 70ch; }

@keyframes march { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes floaty { 50% { transform: translateY(-8px); } }
@keyframes bob { 50% { transform: translateY(-6px) rotate(-6deg); } }
@keyframes drift { 50% { transform: translate(10px, -12px) rotate(8deg); } }
@keyframes stamp { 50% { transform: rotate(-2deg) scale(1.04); } }
@keyframes rise {
  0% { height: 30px; }
  50% { height: 92px; }
  100% { height: 48px; }
}
@keyframes blink { 50% { opacity: 0; } }

@media (max-width: 860px) {
  .nav { display: none; }
  .burger { display: inline-grid; place-items: center; }
  .hero, .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .hero { padding-top: 22px; }
  .chart-frame { height: 460px; }
  .chart-hold { height: 320px; }
  .sold-tag { left: 8px; }
  h1 { font-size: 52px; }
  .field input, .recv { font-size: 24px; }
  .swap-go { font-size: 22px; }
}
@media (max-width: 520px) {
  .wrap { width: min(1120px, calc(100% - 20px)); }
  .brand { font-size: 18px; }
  .connect { padding: 9px 12px; }
  .chart-frame { height: 380px; }
  .hero-art img { border-radius: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}
