/* ==========================================================
   Snipur — memecoin sniper
   Design tokens
   ========================================================== */
:root {
  --bg: #271d18;
  --bg-deep: #1f1713;
  --panel: #35281f;
  --panel-2: #2d221b;
  --input: #1c1410;

  --line: rgba(255, 236, 214, 0.08);
  --line-2: rgba(255, 236, 214, 0.15);

  --cream: #f7ead9;
  --text: #e9dac6;
  --muted: #b29d88;
  --faint: #826f5f;

  --caramel: #dca46e;
  --caramel-hi: #e9b885;
  --caramel-lo: #9f683a;
  --green: #a3d86d;
  --red: #ef7c63;

  --font-display: "Fredoka One", "Fredoka", ui-rounded, system-ui, sans-serif;
  --font-body: "Nunito", ui-rounded, system-ui, sans-serif;

  --r-sm: 10px;
  --r: 14px;
  --r-lg: 26px;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);

  --container: 1180px;
  --gutter: clamp(20px, 4vw, 40px);
}

/* ==========================================================
   Base
   ========================================================== */
*,
*::before,
*::after { box-sizing: border-box; }

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

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 16px;
  line-height: 1.55;
  color: var(--text);
  background:
    radial-gradient(1200px 700px at 50% 30%, #35281f 0%, transparent 70%),
    var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { display: block; }
button { font: inherit; color: inherit; }
a { color: inherit; }

h1, h2, h3 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  color: var(--cream);
  letter-spacing: 0.005em;
  line-height: 1.15;
}
p { margin: 0; }

::selection { background: var(--caramel); color: var(--bg-deep); }

:focus-visible {
  outline: 3px solid var(--caramel);
  outline-offset: 3px;
  border-radius: 8px;
}

.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Doodle wallpaper, slowly drifting */
.bg-pattern {
  position: fixed;
  inset: -300px 0 0 -300px;
  z-index: -1;
  pointer-events: none;
  background: url("pattern.svg") repeat;
  background-size: 300px 300px;
  animation: drift 90s linear infinite;
}
@keyframes drift {
  to { transform: translate(300px, 300px); }
}

/* ==========================================================
   Brand
   ========================================================== */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  position: relative;
}
.mascot { display: inline-block; flex: none; }
.mascot svg { width: 100%; height: 100%; overflow: visible; }

.wordmark {
  position: relative;
  font-family: var(--font-display);
  color: var(--cream);
  line-height: 1;
  letter-spacing: -0.005em;
}
.wordmark-swoosh {
  position: absolute;
  left: 2%;
  bottom: -0.36em;
  width: 96%;
  height: 0.2em;
  overflow: visible;
}
.wordmark-swoosh path {
  stroke-dasharray: 400;
  stroke-dashoffset: 400;
  animation: draw 1s 0.5s var(--ease-out) forwards;
}
@keyframes draw { to { stroke-dashoffset: 0; } }

.brand--lg .mascot { width: 104px; height: 104px; }
.brand--lg .wordmark { font-size: clamp(64px, 7.4vw, 96px); }

.brand--sm { gap: 10px; }
.brand--sm .mascot { width: 42px; height: 42px; }
.brand--sm .wordmark { font-size: 30px; }

.beta {
  position: absolute;
  top: -8px;
  right: -46px;
  padding: 3px 9px 2px;
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 0.08em;
  color: var(--bg-deep);
  background: var(--caramel);
  border-radius: 999px;
  box-shadow: 0 2px 0 var(--caramel-lo);
  transform: rotate(12deg);
  animation: wobble 4s 1.6s ease-in-out infinite;
}
@keyframes wobble {
  0%, 86%, 100% { transform: rotate(12deg); }
  90% { transform: rotate(4deg) scale(1.06); }
  94% { transform: rotate(18deg) scale(1.06); }
}

/* Mascot micro-animations */
.m-eye {
  transform-box: fill-box;
  transform-origin: center;
  animation: blink 5.5s infinite;
}
.m-eye:nth-of-type(2) { animation-delay: 0.04s; }
@keyframes blink {
  0%, 94%, 100% { transform: scaleY(1); }
  96.5% { transform: scaleY(0.08); }
}
.m-pupil { transition: transform 0.18s var(--ease-out); }
.m-ear-l, .m-ear-r { transform-box: fill-box; }
.m-ear-l { transform-origin: 100% 100%; animation: ear-l 7s 2s infinite; }
.m-ear-r { transform-origin: 0% 100%; animation: ear-r 7s 2.2s infinite; }
@keyframes ear-l { 0%, 90%, 100% { transform: rotate(0); } 93% { transform: rotate(-10deg); } 96% { transform: rotate(4deg); } }
@keyframes ear-r { 0%, 90%, 100% { transform: rotate(0); } 93% { transform: rotate(10deg); } 96% { transform: rotate(-4deg); } }

/* ==========================================================
   Buttons & small controls
   ========================================================== */
.btn {
  --btn-shadow: var(--caramel-lo);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 58px;
  padding: 0 28px;
  border: 0;
  border-radius: var(--r);
  font-family: var(--font-display);
  font-size: 20px;
  letter-spacing: 0.01em;
  text-decoration: none;
  cursor: pointer;
  user-select: none;
  transition: transform 0.15s var(--ease-out), box-shadow 0.15s var(--ease-out), background-color 0.2s;
}
.btn svg { width: 20px; height: 20px; transition: transform 0.25s var(--ease-spring); }

.btn-primary {
  color: var(--bg-deep);
  background: var(--caramel);
  box-shadow: 0 6px 0 var(--btn-shadow), 0 14px 24px rgba(0, 0, 0, 0.28);
}
.btn-primary:hover {
  background: var(--caramel-hi);
  transform: translateY(-2px);
  box-shadow: 0 8px 0 var(--btn-shadow), 0 18px 28px rgba(0, 0, 0, 0.3);
}
.btn-primary:hover svg { transform: translateX(4px); }
.btn-primary:active {
  transform: translateY(5px);
  box-shadow: 0 1px 0 var(--btn-shadow), 0 4px 10px rgba(0, 0, 0, 0.25);
}

.btn-ghost {
  height: 52px;
  font-size: 18px;
  color: var(--text);
  background: transparent;
  box-shadow: inset 0 0 0 2px var(--line-2);
}
.btn-ghost:hover { color: var(--cream); box-shadow: inset 0 0 0 2px var(--caramel); }
.btn-ghost:active { transform: translateY(2px); }

.btn-block { width: 100%; }

.btn[aria-busy="true"] { pointer-events: none; }
.btn[aria-busy="true"] .btn-arrow { display: none; }
.spinner {
  width: 20px; height: 20px;
  border-radius: 50%;
  border: 3px solid rgba(31, 23, 19, 0.25);
  border-top-color: var(--bg-deep);
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 44px; height: 44px;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.2s, background-color 0.2s, transform 0.2s var(--ease-spring);
}
.icon-btn:hover { color: var(--cream); background: rgba(255, 236, 214, 0.06); }
.icon-btn:active { transform: scale(0.9); }
.icon-btn svg { width: 22px; height: 22px; }

.sound-toggle .wave { transition: opacity 0.2s, transform 0.3s var(--ease-spring); transform-origin: left center; transform-box: fill-box; }
.sound-toggle[aria-pressed="false"] .wave { opacity: 0; transform: scale(0.5); }
.sound-toggle .mute { transition: opacity 0.2s; }
.sound-toggle[aria-pressed="true"] .mute { opacity: 0; }

.link-btn {
  padding: 4px 2px;
  border: 0;
  background: none;
  font-family: var(--font-display);
  font-size: 16px;
  color: var(--caramel);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
  cursor: pointer;
  transition: color 0.2s, text-underline-offset 0.2s;
}
.link-btn:hover { color: var(--caramel-hi); text-underline-offset: 6px; }

.chip {
  display: inline-block;
  padding: 2px 8px 1px;
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  background: rgba(255, 236, 214, 0.07);
  border-radius: 999px;
}

/* ==========================================================
   Landing — top bar
   ========================================================== */
.topbar {
  position: fixed;
  top: 18px;
  right: 22px;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 8px;
}
.topbar-dash {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 16px;
  font-family: var(--font-display);
  font-size: 15px;
  color: var(--cream);
  text-decoration: none;
  background: rgba(45, 34, 27, 0.85);
  backdrop-filter: blur(8px);
  border: 1.5px solid var(--line-2);
  border-radius: 999px;
  transition: border-color 0.2s, transform 0.2s var(--ease-spring);
}
.topbar-dash:hover { border-color: var(--caramel); transform: translateY(-1px); }
.topbar-dash[hidden] { display: none; }

/* ==========================================================
   Landing — hero
   ========================================================== */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding-block: 88px 96px;
}
.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 440px;
  gap: clamp(40px, 6vw, 88px);
  align-items: center;
}
.hero-copy { min-width: 0; }

.hero-title {
  margin-top: 40px;
  font-size: clamp(26px, 2.6vw, 34px);
  max-width: 18ch;
}
.hero-sub {
  text-wrap: pretty;
  margin-top: 12px;
  max-width: 44ch;
  font-size: 17px;
  line-height: 1.6;
  color: var(--muted);
}

/* entrance */
.rise { animation: rise 0.8s var(--ease-out) both; }
.rise-1 { animation-delay: 0.05s; }
.rise-2 { animation-delay: 0.15s; }
.rise-3 { animation-delay: 0.25s; }
.rise-4 { animation-delay: 0.35s; }
@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
}

/* Fanned token cards */
.fan-wrap {
  --fan-scale: 1;
  position: relative;
  height: calc(300px * var(--fan-scale));
  margin-top: 40px;
}
.fan {
  position: absolute;
  left: calc(50% + 20px);
  bottom: 0;
  width: 0;
  height: 300px;
  transform: scale(var(--fan-scale));
  transform-origin: 50% 100%;
}

.tcard {
  --cw: 152px;
  --ch: 218px;
  position: absolute;
  left: calc(var(--cw) / -2);
  bottom: 18px;
  width: var(--cw);
  height: var(--ch);
  z-index: var(--z);
  transform: translate(var(--x), var(--y)) rotate(var(--r));
  transform-origin: 50% 110%;
  animation: deal 0.9s var(--ease-spring) backwards;
  animation-delay: var(--d);
  cursor: crosshair;
}
.tcard:hover, .tcard:focus-visible { z-index: 40; }
@keyframes deal {
  from { opacity: 0; transform: translate(0, 90px) rotate(0deg) scale(0.85); }
}

.tcard-body {
  position: relative;
  height: 100%;
  border-radius: 16px;
  overflow: hidden;
  background: #241a15;
  border: 3px solid #1c1410;
  box-shadow: 0 18px 30px rgba(0, 0, 0, 0.38);
  transition: transform 0.35s var(--ease-spring), box-shadow 0.35s var(--ease-out);
}
.tcard:hover .tcard-body,
.tcard:focus-visible .tcard-body {
  transform: translateY(-22px) scale(1.04);
  box-shadow: 0 30px 44px rgba(0, 0, 0, 0.45);
}

.tcard-art { position: relative; height: 158px; overflow: hidden; }
.tcard-art svg { width: 100%; height: 100%; }
.critter {
  transform-box: fill-box;
  transform-origin: 50% 100%;
  animation: bob 2.8s ease-in-out infinite;
  animation-delay: var(--bob, 0s);
}
@keyframes bob {
  0%, 100% { transform: translateY(0) scale(1, 1); }
  50% { transform: translateY(-3px) scale(0.985, 1.015); }
}
.tcard:hover .critter { animation: hop 0.5s var(--ease-out); }
@keyframes hop {
  0% { transform: translateY(0) scale(1.05, 0.92); }
  45% { transform: translateY(-12px) scale(0.96, 1.06); }
  100% { transform: translateY(0) scale(1, 1); }
}

.ribbon {
  position: absolute;
  top: 16px;
  left: -34px;
  width: 128px;
  padding: 3px 0 2px;
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-align: center;
  color: var(--bg-deep);
  transform: rotate(-45deg);
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.18);
}
.ribbon--live { background: var(--green); }
.ribbon--sniped { background: var(--caramel); }
.ribbon--soon { background: var(--cream); opacity: 0.85; }

.tcard-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px 0;
}
.tcard-name {
  font-family: var(--font-display);
  font-size: 21px;
  line-height: 1.1;
  color: var(--tc);
  letter-spacing: 0.01em;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.35);
}
.tcard-meta {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--muted);
}
.tcard-meta svg { width: 13px; height: 13px; }

.reticle {
  position: absolute;
  left: 50%;
  top: 40%;
  width: 96px;
  height: 96px;
  margin: -48px 0 0 -48px;
  pointer-events: none;
  opacity: 0;
  transform: scale(1.7) rotate(60deg);
  transition: opacity 0.2s, transform 0.45s var(--ease-spring);
}
.tcard:hover .reticle,
.tcard:focus-visible .reticle { opacity: 1; transform: translateY(-22px) scale(1) rotate(0); }

.gain {
  position: absolute;
  left: 50%;
  top: -22px;
  padding: 5px 12px 4px;
  font-family: var(--font-display);
  font-size: 15px;
  white-space: nowrap;
  color: var(--bg-deep);
  background: var(--green);
  border-radius: 999px;
  box-shadow: 0 3px 0 #6f9f43;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, 10px) scale(0.6);
  transition: opacity 0.2s, transform 0.4s var(--ease-spring);
}
.gain--soon { background: var(--cream); box-shadow: 0 3px 0 #b8a690; }
.tcard:hover .gain,
.tcard:focus-visible .gain { opacity: 1; transform: translate(-50%, -26px) scale(1); }

/* Scroll hint */
.scroll-hint {
  position: absolute;
  left: 50%;
  bottom: 26px;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  font-family: var(--font-display);
  font-size: 14px;
  color: var(--faint);
  text-decoration: none;
  transform: translateX(-50%);
  transition: color 0.2s;
}
.scroll-hint:hover { color: var(--caramel); }
.scroll-hint svg { width: 20px; height: 20px; animation: nudge 1.8s ease-in-out infinite; }
@keyframes nudge { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(5px); } }

/* ==========================================================
   Auth card
   ========================================================== */
.auth-card {
  position: relative;
  padding: 34px 32px 26px;
  background: var(--panel);
  border: 1.5px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.32), inset 0 1px 0 rgba(255, 236, 214, 0.04);
}
.auth-card.shake,
.panel.shake { animation: shake 0.45s var(--ease-out); }
@keyframes shake {
  20% { transform: translateX(-8px) rotate(-0.6deg); }
  40% { transform: translateX(7px) rotate(0.5deg); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(2px); }
}

.auth-head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 26px;
}
.auth-avatar {
  width: 64px; height: 64px;
  padding: 4px;
  border-radius: 50%;
  background: var(--bg-deep);
  outline: 2px dashed rgba(220, 164, 110, 0.5);
  outline-offset: 2px;
  flex: none;
}
.auth-avatar .mascot,
.auth-avatar svg { width: 100%; height: 100%; }
.auth-title { font-size: 28px; }
.auth-sub { margin-top: 2px; font-size: 15px; color: var(--muted); }

.swap { transition: opacity 0.18s, transform 0.18s var(--ease-out); }
.swap.is-out { opacity: 0; transform: translateY(-4px); }

.field + .field,
.collapse { margin-top: 18px; }

.field label {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text);
}
.field label .opt { color: var(--faint); }

.input-wrap { position: relative; }
.input {
  width: 100%;
  height: 54px;
  padding: 0 18px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 17px;
  color: var(--cream);
  background: var(--input);
  border: 2px solid var(--line);
  border-radius: var(--r);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, background-color 0.2s;
}
.input::placeholder { color: var(--faint); font-weight: 600; }
.input:hover { border-color: var(--line-2); }
.input:focus {
  border-color: var(--caramel);
  box-shadow: 0 0 0 4px rgba(220, 164, 110, 0.16);
}
.input-wrap .input { padding-right: 54px; }
.field.has-error .input { border-color: var(--red); box-shadow: 0 0 0 4px rgba(239, 124, 99, 0.12); }

.peek {
  position: absolute;
  top: 50%;
  right: 6px;
  width: 42px; height: 42px;
  transform: translateY(-50%);
}
.peek:active { transform: translateY(-50%) scale(0.9); }
.peek svg { width: 20px; height: 20px; }
.peek .slash { transition: stroke-dashoffset 0.25s var(--ease-out); stroke-dasharray: 26; stroke-dashoffset: 26; }
.peek[aria-pressed="true"] .slash { stroke-dashoffset: 0; }

.hint {
  margin-top: 7px;
  font-size: 13.5px;
  color: var(--faint);
  transition: color 0.2s;
}
.field.has-error .hint { color: var(--red); }
.field.is-ok .hint { color: var(--green); }

/* referral collapse */
.collapse {
  display: grid;
  grid-template-rows: 1fr;
  transition: grid-template-rows 0.35s var(--ease-out), opacity 0.25s, margin-top 0.35s var(--ease-out);
}
.collapse-inner { min-height: 0; overflow: hidden; }
.auth-card[data-mode="login"] .collapse { grid-template-rows: 0fr; opacity: 0; margin-top: 0; }

.auth-card .btn-primary { margin-top: 26px; }

.auth-note {
  display: flex;
  gap: 9px;
  margin-top: 22px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
}
.auth-note svg { flex: none; width: 17px; height: 17px; margin-top: 2px; color: var(--caramel); }

.auth-foot {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 2px dashed var(--line-2);
  text-align: center;
}

/* ==========================================================
   Ticker
   ========================================================== */
.ticker {
  position: relative;
  overflow: hidden;
  padding-block: 16px;
  background: var(--bg-deep);
  border-block: 1.5px solid var(--line);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.ticker-track {
  display: flex;
  width: max-content;
  animation: marquee 48s linear infinite;
}
.ticker:hover .ticker-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }

.tick {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding-inline: 26px;
  font-size: 15px;
  color: var(--muted);
  white-space: nowrap;
}
.tick b { font-family: var(--font-display); font-weight: 400; font-size: 16px; color: var(--cream); }
.tick i {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--dot, var(--caramel));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--dot, var(--caramel)) 22%, transparent);
}
.tick em { font-style: normal; color: var(--faint); }

/* ==========================================================
   How it works
   ========================================================== */
.section { padding-block: clamp(80px, 11vw, 136px); }

.section-head { max-width: 680px; }
.eyebrow {
  display: block;
  margin-bottom: 12px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--caramel);
}
.section-title { font-size: clamp(30px, 3.4vw, 42px); }
.section-lead { margin-top: 14px; font-size: 17px; color: var(--muted); max-width: 48ch; }

.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(28px, 4vw, 56px);
  margin: 64px 0 0;
  padding: 0;
  list-style: none;
}
.step { position: relative; }
.step-art {
  width: 84px; height: 84px;
  display: grid;
  place-items: center;
  margin-bottom: 26px;
  border-radius: 24px;
  background: var(--panel-2);
  color: var(--caramel);
  transition: transform 0.4s var(--ease-spring), background-color 0.3s;
}
.step:hover .step-art { transform: rotate(-6deg) scale(1.06); background: var(--panel); }
.step-art svg { width: 48px; height: 48px; }
.step-num {
  font-family: var(--font-display);
  font-size: 15px;
  color: var(--faint);
  letter-spacing: 0.06em;
}
.step h3 { margin-top: 4px; font-size: 24px; }
.step p { margin-top: 10px; color: var(--muted); max-width: 34ch; }

/* reveal on scroll */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out); transition-delay: var(--rd, 0s); }
.reveal.is-in { opacity: 1; transform: none; }

/* ==========================================================
   CTA + footer
   ========================================================== */
.cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding-block: 40px clamp(80px, 11vw, 128px);
}
.cta .mascot { width: 116px; height: 116px; animation: bounce 2.4s var(--ease-out) infinite; }
@keyframes bounce {
  0%, 100% { transform: translateY(0) scale(1, 1); }
  10% { transform: translateY(0) scale(1.08, 0.92); }
  35% { transform: translateY(-18px) scale(0.96, 1.05); }
  60% { transform: translateY(0) scale(1.04, 0.96); }
  70% { transform: translateY(0) scale(1, 1); }
}
.cta-shadow {
  width: 70px; height: 10px;
  margin-top: 6px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.3);
  animation: shadow 2.4s var(--ease-out) infinite;
}
@keyframes shadow {
  0%, 100% { transform: scaleX(1); opacity: 1; }
  35% { transform: scaleX(0.6); opacity: 0.5; }
  60% { transform: scaleX(1.05); }
}
.cta h2 { margin-top: 26px; font-size: clamp(30px, 3.4vw, 42px); }
.cta p { margin-top: 12px; max-width: 42ch; color: var(--muted); font-size: 17px; }
.cta .btn { margin-top: 32px; }

.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-block: 28px 36px;
  border-top: 1.5px solid var(--line);
  font-size: 14px;
  color: var(--faint);
}
.footer .brand--sm .mascot { width: 32px; height: 32px; }
.footer .brand--sm .wordmark { font-size: 22px; }

/* ==========================================================
   Toast + particles
   ========================================================== */
.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 100;
  padding: 12px 20px 11px;
  font-family: var(--font-display);
  font-size: 16px;
  color: var(--bg-deep);
  background: var(--cream);
  border-radius: 999px;
  box-shadow: 0 4px 0 #b9a68f, 0 18px 30px rgba(0, 0, 0, 0.35);
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, 20px) scale(0.9);
  transition: opacity 0.2s, transform 0.4s var(--ease-spring);
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0) scale(1); }

.coin-p {
  position: fixed;
  z-index: 200;
  width: 16px; height: 16px;
  margin: -8px 0 0 -8px;
  border-radius: 50%;
  background: var(--caramel-hi);
  box-shadow: inset 0 -3px 0 var(--caramel-lo);
  pointer-events: none;
  animation: burst 0.95s var(--ease-out) forwards;
}
@keyframes burst {
  55% { transform: translate(var(--dx), var(--dy)) rotate(var(--rot)); opacity: 1; }
  100% { transform: translate(calc(var(--dx) * 1.15), calc(var(--dy) + 110px)) rotate(var(--rot)); opacity: 0; }
}

/* ==========================================================
   Dashboard
   ========================================================== */
.dash {
  display: grid;
  grid-template-columns: 252px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 26px 18px 20px;
  background: rgba(31, 23, 19, 0.88);
  backdrop-filter: blur(6px);
  border-right: 1.5px solid var(--line);
}
.sidebar > .brand { padding: 0 8px; }

.side-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 40px;
}
.nav-label {
  padding: 0 12px 8px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faint);
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  height: 46px;
  padding: 0 12px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  font-family: var(--font-display);
  font-size: 16.5px;
  color: var(--muted);
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: color 0.2s, background-color 0.2s;
}
.nav-item svg { width: 21px; height: 21px; flex: none; transition: transform 0.35s var(--ease-spring); }
.nav-item:hover { color: var(--cream); background: rgba(255, 236, 214, 0.05); }
.nav-item:hover svg { transform: rotate(-8deg) scale(1.1); }
.nav-item.is-active { color: var(--caramel); background: rgba(220, 164, 110, 0.12); }
.nav-item .chip { margin-left: auto; }

.side-user {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: auto;
  padding: 14px 8px 0 10px;
  border-top: 2px dashed var(--line-2);
}
.avatar {
  display: grid;
  place-items: center;
  width: 40px; height: 40px;
  flex: none;
  border-radius: 50%;
  font-family: var(--font-display);
  font-size: 18px;
  color: var(--bg-deep);
  background: var(--caramel);
  box-shadow: inset 0 -3px 0 var(--caramel-lo);
  text-transform: uppercase;
}
.side-user-text { min-width: 0; flex: 1; line-height: 1.3; }
.side-user-text strong {
  display: block;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 16px;
  color: var(--cream);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.side-user-text span { font-size: 13px; color: var(--faint); }

.dash-main {
  padding: 38px clamp(22px, 4vw, 52px) 56px;
  min-width: 0;
}
.dash-inner { max-width: 1120px; }

.dash-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}
.dash-head h1 { font-size: clamp(28px, 3vw, 36px); }
.dash-head p { margin-top: 6px; color: var(--muted); }
.dash-head-actions { display: flex; align-items: center; gap: 8px; }

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 14px;
  font-family: var(--font-display);
  font-size: 14.5px;
  color: var(--muted);
  border: 1.5px solid var(--line-2);
  border-radius: 999px;
  white-space: nowrap;
}
.status-pill i {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--caramel);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(220, 164, 110, 0.5); }
  50% { box-shadow: 0 0 0 6px rgba(220, 164, 110, 0); }
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 34px;
  background: var(--panel-2);
  border: 1.5px solid var(--line);
  border-radius: 20px;
}
.stat { padding: 22px 24px 20px; }
.stat + .stat { border-left: 1.5px solid var(--line); }
.stat-label {
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
}
.stat-value {
  margin-top: 6px;
  font-family: var(--font-display);
  font-size: 34px;
  line-height: 1.1;
  color: var(--cream);
}
.stat-sub { margin-top: 2px; font-size: 13.5px; color: var(--faint); }

.dash-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 20px;
  margin-top: 20px;
}
.panel {
  background: var(--panel);
  border: 1.5px solid var(--line);
  border-radius: var(--r-lg);
}

.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 460px;
  padding: 48px 32px;
  text-align: center;
}
.sleepy { position: relative; width: 150px; height: 150px; }
.sleepy .mascot { width: 100%; height: 100%; animation: breathe 3.6s ease-in-out infinite; transform-origin: 50% 90%; }
@keyframes breathe {
  0%, 100% { transform: scale(1, 1); }
  50% { transform: scale(1.03, 0.97); }
}
.zzz {
  position: absolute;
  top: 6px;
  right: -14px;
  font-family: var(--font-display);
  color: var(--caramel);
  pointer-events: none;
}
.zzz span {
  position: absolute;
  opacity: 0;
  animation: zzz 3.6s ease-in infinite;
}
.zzz span:nth-child(1) { font-size: 18px; animation-delay: 0s; }
.zzz span:nth-child(2) { font-size: 24px; animation-delay: 1.2s; }
.zzz span:nth-child(3) { font-size: 30px; animation-delay: 2.4s; }
@keyframes zzz {
  0% { opacity: 0; transform: translate(0, 10px) rotate(-10deg); }
  20% { opacity: 1; }
  100% { opacity: 0; transform: translate(26px, -54px) rotate(12deg); }
}
.empty-shadow {
  width: 96px; height: 12px;
  margin-top: 4px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.28);
}
.empty h2 { margin-top: 26px; font-size: 28px; }
.empty p { margin-top: 8px; max-width: 42ch; color: var(--muted); text-wrap: balance; }
.empty-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin-top: 30px; }
.empty-actions .btn { height: 52px; font-size: 18px; }
.empty-actions .btn .chip { color: var(--bg-deep); background: rgba(31, 23, 19, 0.14); }

.activity { padding: 24px 22px; display: flex; flex-direction: column; }
.panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 20px;
}
.ghost-list { margin: 22px 0 0; padding: 0; list-style: none; display: grid; gap: 18px; }
.ghost-row { display: flex; align-items: center; gap: 12px; opacity: calc(1 - var(--i) * 0.2); }
.ghost-dot {
  width: 36px; height: 36px; flex: none;
  border-radius: 12px;
  border: 2px dashed var(--line-2);
}
.ghost-lines { flex: 1; display: grid; gap: 7px; }
.ghost-lines span {
  height: 9px;
  border-radius: 999px;
  background: rgba(255, 236, 214, 0.06);
  position: relative;
  overflow: hidden;
}
.ghost-lines span:first-child { width: 70%; }
.ghost-lines span:last-child { width: 42%; }
.ghost-lines span::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255, 236, 214, 0.08), transparent);
  animation: shimmer 2.2s ease-in-out infinite;
  animation-delay: calc(var(--i) * 0.15s);
}
@keyframes shimmer { to { transform: translateX(100%); } }
.activity-note {
  margin-top: auto;
  padding-top: 24px;
  font-size: 14px;
  color: var(--faint);
  text-align: center;
}



/* locked nav items */
.nav-item.is-locked { color: var(--faint); }
.nav-item.is-locked svg:first-child { opacity: 0.6; }
.nav-item.is-locked:hover { color: var(--muted); background: rgba(255, 236, 214, 0.03); }
.nav-item.is-locked:hover svg:first-child { transform: none; }
.chip-lock {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px 1px 6px;
}
.chip-lock svg { width: 11px; height: 11px; stroke-width: 2.8; }
.nav-item.nudge { animation: nudge-x 0.4s var(--ease-out); }
@keyframes nudge-x {
  20% { transform: translateX(-5px); }
  45% { transform: translateX(4px); }
  70% { transform: translateX(-2px); }
}
.nav-item.beckon { animation: beckon 1.2s var(--ease-out); }
@keyframes beckon {
  0% { box-shadow: 0 0 0 0 rgba(220, 164, 110, 0.55); color: var(--caramel); }
  60% { box-shadow: 0 0 0 10px rgba(220, 164, 110, 0); color: var(--caramel); }
  100% { box-shadow: 0 0 0 0 rgba(220, 164, 110, 0); }
}
.nav-item.is-unlocking { animation: unlock-flash 1.1s var(--ease-out) backwards; animation-delay: var(--ud, 0s); }
@keyframes unlock-flash {
  0% { background: rgba(163, 216, 109, 0.22); color: var(--green); transform: scale(1.03); }
  100% { background: transparent; transform: none; }
}

.side-callout {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 10px;
  margin-top: 22px;
  padding: 14px 14px 13px;
  border-radius: 14px;
  background: rgba(220, 164, 110, 0.07);
  border: 1.5px dashed rgba(220, 164, 110, 0.35);
  animation: rise 0.6s 0.2s var(--ease-out) both;
}
.side-callout-icon { color: var(--caramel); padding-top: 2px; }
.side-callout-icon svg { width: 17px; height: 17px; }
.side-callout p { font-size: 13.5px; line-height: 1.45; color: var(--muted); }
.side-callout strong {
  display: block;
  margin-bottom: 2px;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 15px;
  color: var(--cream);
}
.side-callout-link {
  grid-column: 2;
  margin-top: 6px;
  font-family: var(--font-display);
  font-size: 14.5px;
  color: var(--caramel);
  text-decoration: none;
  transition: color 0.2s, transform 0.25s var(--ease-spring);
  justify-self: start;
}
.side-callout-link:hover { color: var(--caramel-hi); transform: translateX(3px); }

/* shared page empty state (snipes / watchlist / settings) */
.page-empty { margin-top: 30px; min-height: 420px; }
.page-empty .mascot { width: 120px; height: 120px; }

/* ==========================================================
   Wallets
   ========================================================== */
.wallets-grid { margin-top: 30px; align-items: start; }

.import { padding: 32px 32px 26px; }
.import-head { display: flex; align-items: center; gap: 16px; }
.import-icon {
  display: grid;
  place-items: center;
  width: 56px; height: 56px;
  flex: none;
  border-radius: 18px;
  color: var(--caramel);
  background: var(--bg-deep);
  outline: 2px dashed rgba(220, 164, 110, 0.45);
  outline-offset: 2px;
  animation: jiggle 5s 1s ease-in-out infinite;
}
.import-icon svg { width: 28px; height: 28px; }
@keyframes jiggle {
  0%, 88%, 100% { transform: rotate(0); }
  91% { transform: rotate(-9deg); }
  94% { transform: rotate(7deg); }
  97% { transform: rotate(-3deg); }
}
.import-title { font-size: 26px; }
.import-sub { margin-top: 2px; color: var(--muted); }

/* segmented tabs */
.seg {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-top: 26px;
  padding: 5px;
  background: var(--input);
  border: 2px solid var(--line);
  border-radius: 16px;
}
.seg-thumb {
  position: absolute;
  top: 5px; bottom: 5px; left: 5px;
  width: calc(50% - 5px);
  border-radius: 11px;
  background: var(--panel);
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.25), inset 0 0 0 1.5px var(--line-2);
  transition: transform 0.4s var(--ease-spring);
}
.seg[data-active="key"] .seg-thumb { transform: translateX(100%); }
.seg-btn {
  position: relative;
  height: 44px;
  border: 0;
  background: none;
  font-family: var(--font-display);
  font-size: 16.5px;
  color: var(--faint);
  cursor: pointer;
  border-radius: 11px;
  transition: color 0.2s;
}
.seg-btn:hover { color: var(--text); }
.seg-btn[aria-selected="true"] { color: var(--caramel); }

.tabpanel { margin-top: 22px; animation: rise 0.45s var(--ease-out) both; }
.tabpanel[hidden] { display: none; }

.phrase-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}
.mini-seg {
  display: inline-flex;
  padding: 3px;
  border-radius: 999px;
  background: var(--input);
  border: 1.5px solid var(--line);
}
.mini-seg button {
  height: 32px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: none;
  font-family: var(--font-display);
  font-size: 14px;
  color: var(--faint);
  cursor: pointer;
  transition: color 0.2s, background-color 0.25s;
}
.mini-seg button:hover { color: var(--text); }
.mini-seg button[aria-checked="true"] { color: var(--bg-deep); background: var(--caramel); }

.phrase-tools { display: flex; gap: 2px; }
.text-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 10px;
  border: 0;
  border-radius: 10px;
  background: none;
  font-family: var(--font-display);
  font-size: 14.5px;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.2s, background-color 0.2s;
}
.text-btn svg { width: 16px; height: 16px; }
.text-btn:hover { color: var(--cream); background: rgba(255, 236, 214, 0.06); }

.words {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.word {
  position: relative;
  animation: pop-in 0.4s var(--ease-spring) backwards;
  animation-delay: calc(var(--i) * 18ms);
}
@keyframes pop-in { from { opacity: 0; transform: scale(0.85) translateY(6px); } }
.word span {
  position: absolute;
  top: 50%;
  left: 12px;
  transform: translateY(-50%);
  min-width: 18px;
  font-family: var(--font-display);
  font-size: 12.5px;
  color: var(--faint);
  pointer-events: none;
  transition: color 0.2s;
}
.word input {
  width: 100%;
  height: 46px;
  padding: 0 10px 0 38px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 15.5px;
  color: var(--cream);
  background: var(--input);
  border: 2px solid var(--line);
  border-radius: 12px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.word input:hover { border-color: var(--line-2); }
.word input:focus { border-color: var(--caramel); box-shadow: 0 0 0 4px rgba(220, 164, 110, 0.14); }
.word input:focus + span,
.word.is-filled span { color: var(--caramel); }
.word.is-bad input { border-color: var(--red); }
.word.is-bad span { color: var(--red); }
.words.is-hidden input { -webkit-text-security: disc; text-security: disc; }

#phraseHint.is-error { color: var(--red); }
#phraseHint.is-ok { color: var(--green); }

.input-mono { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-size: 15px; letter-spacing: 0.01em; }

.name-field { margin-top: 22px; }
.import .btn-primary { margin-top: 24px; }

/* safety tips */
.safety { padding: 26px 24px; }
.tips { margin: 20px 0 0; padding: 0; list-style: none; display: grid; gap: 22px; }
.tips li { display: flex; gap: 14px; }
.tip-icon {
  display: grid;
  place-items: center;
  width: 40px; height: 40px;
  flex: none;
  border-radius: 13px;
  color: var(--caramel);
  background: var(--panel-2);
}
.tip-icon svg { width: 21px; height: 21px; }
.tips strong { display: block; font-family: var(--font-display); font-weight: 400; font-size: 16.5px; color: var(--cream); }
.tips p { margin-top: 3px; font-size: 14.5px; color: var(--muted); }

/* wallet list */
.wallet-list { margin-top: 30px; padding: 24px 24px 12px; }
.wallet-list[hidden] { display: none; }
.wallet-rows { margin: 14px 0 0; padding: 0; list-style: none; }
.wallet-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 4px;
  border-top: 1.5px solid var(--line);
}
.wallet-row:first-child { border-top: 0; }
.wallet-row.is-new { animation: drop-in 0.6s var(--ease-spring) both; }
@keyframes drop-in { from { opacity: 0; transform: translateY(-14px) scale(0.97); } }
.wallet-row.is-leaving { animation: leave 0.35s var(--ease-out) forwards; }
@keyframes leave { to { opacity: 0; transform: translateX(24px); } }
.w-avatar {
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  flex: none;
  border-radius: 14px;
  background: var(--wc);
  color: var(--bg-deep);
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.18);
}
.w-avatar svg { width: 22px; height: 22px; }
.w-main { flex: 1; min-width: 0; }
.w-name {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 17px;
  color: var(--cream);
}
.w-name b { font-weight: 400; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.w-meta { font-size: 13.5px; color: var(--faint); }
.w-meta code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12.5px; color: var(--muted); }
.w-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-display);
  font-size: 14px;
  color: var(--green);
  white-space: nowrap;
}
.w-status i { width: 8px; height: 8px; border-radius: 50%; background: var(--green); }
.w-remove {
  height: 36px;
  padding: 0 12px;
  border: 0;
  border-radius: 10px;
  background: none;
  font-family: var(--font-display);
  font-size: 14px;
  color: var(--faint);
  cursor: pointer;
  transition: color 0.2s, background-color 0.2s;
}
.w-remove:hover { color: var(--cream); background: rgba(255, 236, 214, 0.06); }
.w-remove.is-confirm { color: var(--bg-deep); background: var(--red); }

/* ==========================================================
   Responsive
   ========================================================== */
@media (max-width: 1100px) {
  .hero-inner { grid-template-columns: minmax(0, 1fr) 400px; }
  .fan-wrap { --fan-scale: 0.84; }
  .dash-grid { grid-template-columns: 1fr; }
  .activity { min-height: 0; }
}

@media (max-width: 900px) {
  .hero { min-height: 0; padding-block: 84px 72px; }
  .hero-inner { grid-template-columns: 1fr; gap: 56px; }
  .hero-copy { display: flex; flex-direction: column; align-items: center; text-align: center; }
  .hero-title { max-width: 20ch; }
  .fan-wrap { width: 100%; --fan-scale: 0.78; }
  .fan { left: 50%; }
  .auth-card { width: 100%; max-width: 460px; margin-inline: auto; }
  .scroll-hint { display: none; }

  .steps { grid-template-columns: 1fr; gap: 40px; margin-top: 44px; }
  .step { display: grid; grid-template-columns: 84px 1fr; gap: 0 22px; align-items: start; }
  .step-art { grid-row: span 3; margin-bottom: 0; }

  .footer { flex-direction: column; text-align: center; }

  /* dashboard */
  .dash { grid-template-columns: minmax(0, 1fr); }
  .sidebar {
    min-width: 0;
    position: sticky;
    z-index: 20;
    height: auto;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 8px;
    padding: 14px 16px 10px;
    border-right: 0;
    border-bottom: 1.5px solid var(--line);
  }
  .sidebar > .brand { padding: 0; }
  .side-nav {
    order: 3;
    flex-direction: row;
    width: 100%;
    margin: 0 -16px;
    padding: 0 16px 4px;
    width: calc(100% + 32px);
    overflow-x: auto;
    scrollbar-width: none;
  }
  .side-nav::-webkit-scrollbar { display: none; }
  .nav-label { display: none; }
  .nav-item { width: auto; height: 40px; flex: none; font-size: 15px; }
  .side-user { margin: 0 0 0 auto; padding: 0; border: 0; }
  .side-user-text { display: none; }
  .side-callout { display: none; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat:nth-child(3) { border-left: 0; }
  .stat:nth-child(n + 3) { border-top: 1.5px solid var(--line); }
  .wallets-grid { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .brand--lg .mascot { width: 76px; height: 76px; }
  .brand--lg .wordmark { font-size: 62px; }
  .beta { right: -30px; top: -14px; font-size: 11px; }
  .fan-wrap { --fan-scale: 0.56; margin-top: 18px; }
  .auth-card { padding: 28px 22px 22px; }
  .auth-title { font-size: 25px; }
  .dash-head { flex-direction: column; }
  .stat { padding: 18px 18px 16px; }
  .stat-value { font-size: 28px; }
  .empty { min-height: 400px; padding: 40px 22px; }
  .import { padding: 26px 20px 22px; }
  .import-title { font-size: 23px; }
  .words { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .seg-btn { font-size: 15px; }
  .w-status { display: none; }
  .topbar { top: 12px; right: 12px; }
}

@media (max-height: 960px) and (min-width: 901px) {
  .scroll-hint { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .bg-pattern { animation: none; }
  .reveal { opacity: 1; transform: none; }
}
