:root {
  --bg-0: #0a0f12;
  --bg-1: #131c22;
  --bg-2: #1a242a;
  --card: rgba(32, 47, 54, 0.55);
  --card-hi: rgba(48, 66, 75, 0.65);
  --card-lo: rgba(20, 30, 36, 0.65);
  --stroke: rgba(255, 255, 255, 0.08);
  --stroke-hi: rgba(255, 255, 255, 0.16);
  --text: #f1f7fb;
  --muted: #93a7b0;
  --muted-2: #64777f;

  --primary: #ff9600;
  --primary-hi: #ffd744;
  --primary-lo: #ff5e00;
  --yellow: #ffe14d;

  --green: #58cc02;
  --green-hi: #89e219;
  --green-lo: #3a8a00;

  --blue: #1cb0f6;
  --blue-lo: #0e8fc7;
  --purple: #ce82ff;
  --pink: #ff86d1;
  --red: #ff4b4b;

  --r-sm: 14px;
  --r-md: 20px;
  --r-lg: 28px;

  --font: "Nunito", "SF Pro Rounded", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --font-display: "Bricolage Grotesque", "Nunito", system-ui, sans-serif;

  --shadow-card: 0 1px 0 rgba(255,255,255,0.05) inset, 0 24px 48px -24px rgba(0,0,0,0.6), 0 4px 14px rgba(0,0,0,0.35);
  --shadow-glow-orange: 0 0 60px -10px rgba(255,150,0,0.4);
  --shadow-glow-green:  0 0 50px -10px rgba(88,204,2,0.4);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  font-weight: 700;
  color: var(--text);
  background: var(--bg-0);
  min-height: 100dvh;
  padding-top: env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  position: relative;
}

/* ==== AURORA BACKGROUND (3 mix-blend blobs + grain) ==== */
.aurora { position: fixed; inset: 0; z-index: -3; overflow: hidden; pointer-events: none; }
.aurora::before, .aurora::after, .aurora .a3 {
  content: ""; position: absolute; border-radius: 50%;
  filter: blur(70px);
  mix-blend-mode: screen;
  opacity: 0.55;
}
.aurora::before {
  width: 70vw; height: 70vw; top: -25vw; left: -10vw;
  background: radial-gradient(circle, #ff9600 0%, transparent 65%);
  animation: aur1 22s cubic-bezier(.4,.0,.2,1) infinite alternate;
}
.aurora::after {
  width: 60vw; height: 60vw; top: 30vh; right: -20vw;
  background: radial-gradient(circle, #1cb0f6 0%, transparent 65%);
  animation: aur2 26s cubic-bezier(.4,.0,.2,1) infinite alternate;
}
.aurora .a3 {
  width: 70vw; height: 70vw; bottom: -30vw; left: 5vw;
  background: radial-gradient(circle, #ce82ff 0%, transparent 60%);
  animation: aur3 30s cubic-bezier(.4,.0,.2,1) infinite alternate;
  opacity: 0.4;
}
@keyframes aur1 { from { transform: translate(0,0) scale(1); } to { transform: translate(8vw, 6vh) scale(1.18); } }
@keyframes aur2 { from { transform: translate(0,0) scale(1); } to { transform: translate(-10vw, -8vh) scale(1.25); } }
@keyframes aur3 { from { transform: translate(0,0) scale(1); } to { transform: translate(12vw, -10vh) scale(1.15); } }

/* Noise grain via SVG turbulence (tiny, repeated) */
.grain {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.4 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  opacity: 0.06;
  mix-blend-mode: overlay;
}

/* Constellation dots layer */
.stars { position: fixed; inset: 0; z-index: -2; pointer-events: none; opacity: 0.65;
  background:
    radial-gradient(1.2px 1.2px at 12% 18%, #ffe14d 50%, transparent 51%),
    radial-gradient(1px 1px at 76% 28%, #fff 50%, transparent 51%),
    radial-gradient(1.4px 1.4px at 32% 64%, #1cb0f6 50%, transparent 51%),
    radial-gradient(1px 1px at 58% 82%, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 88% 70%, #ce82ff 50%, transparent 51%),
    radial-gradient(1px 1px at 22% 90%, #fff 50%, transparent 51%),
    radial-gradient(1.2px 1.2px at 92% 12%, #ffe14d 50%, transparent 51%),
    radial-gradient(1px 1px at 6% 50%, #fff 50%, transparent 51%);
  animation: starsDrift 12s ease-in-out infinite alternate;
}
@keyframes starsDrift {
  from { opacity: 0.45; transform: translateY(0); }
  to   { opacity: 0.85; transform: translateY(-6px); }
}

/* ==== APP LAYOUT ==== */
#app {
  max-width: 560px; margin: 0 auto;
  padding: 14px 14px 28px;
  display: flex; flex-direction: column; gap: 14px;
  position: relative; z-index: 1;
}

/* ==== HEADER ==== */
.bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 4px 2px; }
.title-wrap { display: flex; align-items: center; gap: 12px; min-width: 0; }
.mascot-wrap { position: relative; width: 50px; height: 50px; flex-shrink: 0; }
.mascot {
  font-size: 40px;
  animation: bob 2.4s cubic-bezier(.4,.0,.2,1) infinite;
  filter: drop-shadow(0 6px 18px rgba(255,150,0,0.65));
  transform-origin: 50% 90%;
  display: block;
  text-shadow: 0 0 14px rgba(255,200,0,0.5);
}
.mascot-wrap::after {
  content: ""; position: absolute; left: 12%; right: 12%; bottom: -2px; height: 6px;
  background: radial-gradient(ellipse, rgba(0,0,0,0.6), transparent 70%);
  animation: shadowPulse 2.4s cubic-bezier(.4,.0,.2,1) infinite;
  border-radius: 50%; z-index: -1;
}
@keyframes bob {
  0%, 100% { transform: translateY(0) rotate(-5deg) scale(1); }
  50%      { transform: translateY(-8px) rotate(6deg) scale(1.04); }
}
@keyframes shadowPulse {
  0%, 100% { transform: scaleX(1); opacity: 0.85; }
  50%      { transform: scaleX(0.65); opacity: 0.45; }
}
.title-wrap h1 {
  font-family: var(--font-display);
  font-size: 22px; margin: 0; font-weight: 800; letter-spacing: -0.03em;
  background: linear-gradient(180deg, #ffffff 0%, #c0d2db 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.small { font-size: 12px; font-weight: 700; }
.muted { color: var(--muted); }
.error { color: var(--red); text-align: center; font-weight: 800; min-height: 16px; }

/* Icon buttons — frosted */
.actions { display: flex; gap: 8px; }
.icon-btn {
  background: var(--card);
  backdrop-filter: blur(12px) saturate(140%);
  -webkit-backdrop-filter: blur(12px) saturate(140%);
  border: 1px solid var(--stroke-hi);
  border-bottom: 3px solid var(--stroke);
  color: var(--muted);
  width: 44px; height: 44px; border-radius: 14px;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: transform .12s, color .25s, border-color .25s;
}
.icon-btn:hover { color: var(--primary); border-color: rgba(255,150,0,0.4); }
.icon-btn:active { transform: translateY(2px) scale(0.96); border-bottom-width: 1px; }
.icon-btn.spin svg { animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ==== STAT CHIPS ==== */
.stat-row { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.stat-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px; border-radius: 999px;
  background: var(--card);
  backdrop-filter: blur(12px) saturate(140%);
  -webkit-backdrop-filter: blur(12px) saturate(140%);
  border: 1px solid var(--stroke-hi);
  font-size: 13px; font-weight: 800;
  animation: chipIn .55s cubic-bezier(.34,1.56,.64,1) backwards;
  position: relative; overflow: hidden;
}
.stat-chip::before {
  content: ""; position: absolute; inset: -50%;
  background: conic-gradient(from 0deg, transparent 0deg, currentColor 30deg, transparent 60deg);
  opacity: 0; animation: chipShine 6s linear infinite;
}
.stat-chip.fire { color: var(--primary); }
.stat-chip.fire::before { animation-delay: 0s; }
.stat-chip.star { color: var(--yellow); }
.stat-chip.star::before { animation-delay: 2s; }
.stat-chip.gem { color: var(--blue); }
.stat-chip.gem::before  { animation-delay: 4s; }
.stat-chip:nth-child(1) { animation-delay: .05s; }
.stat-chip:nth-child(2) { animation-delay: .15s; }
.stat-chip:nth-child(3) { animation-delay: .25s; }
.stat-chip .ico { font-size: 16px; filter: drop-shadow(0 2px 6px rgba(0,0,0,0.4)); position: relative; z-index: 1; }
.stat-chip > span:not(.ico) { position: relative; z-index: 1; }
@keyframes chipIn { from { opacity: 0; transform: translateY(-8px) scale(0.85); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes chipShine {
  0%, 70% { opacity: 0; transform: rotate(0deg); }
  78% { opacity: 0.18; }
  86% { opacity: 0; }
  100% { transform: rotate(360deg); opacity: 0; }
}

/* ==== CARDS — GLASSMORPHISM ==== */
.card {
  background: var(--card);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border: 1px solid var(--stroke-hi);
  border-radius: var(--r-md);
  padding: 18px;
  position: relative;
  box-shadow: var(--shadow-card);
  animation: cardIn .55s cubic-bezier(.34,1.56,.64,1) backwards;
}
.card::after {
  content: ""; position: absolute; inset: 0;
  border-radius: inherit; pointer-events: none;
  background: linear-gradient(180deg, rgba(255,255,255,0.08), transparent 30%);
}
#app > section.card:nth-child(3) { animation-delay: .08s; }
#app > section.card:nth-child(4) { animation-delay: .16s; }
#app > section.card:nth-child(5) { animation-delay: .22s; }
#app > section.card:nth-child(6) { animation-delay: .28s; }
#app > section.card:nth-child(7) { animation-delay: .34s; }
#app > section.card:nth-child(8) { animation-delay: .40s; }
@keyframes cardIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
.card-title {
  margin: 0 0 14px; font-size: 12px; font-weight: 900;
  color: var(--muted); text-transform: uppercase; letter-spacing: 0.18em;
  display: flex; align-items: center; gap: 8px;
  font-family: var(--font);
}
.card-title .emoji { font-size: 18px; }

/* ==== TOTAL CARD WITH RING ==== */
.total-card {
  text-align: center; padding: 22px 18px 22px; overflow: hidden;
  background: linear-gradient(180deg, rgba(50,72,82,0.55), rgba(15,23,28,0.5));
}
.total-card::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(circle at 50% 30%, rgba(255,200,0,0.18), transparent 55%),
    radial-gradient(circle at 80% 90%, rgba(28,176,246,0.12), transparent 55%);
  pointer-events: none; border-radius: inherit;
}

.ring-wrap {
  position: relative;
  width: min(280px, 78vw); aspect-ratio: 1;
  margin: 6px auto 12px;
}
.prog-ring {
  width: 100%; height: 100%;
  filter: drop-shadow(0 0 14px rgba(255,150,0,0.35));
}
.ring-bg { stroke: rgba(255,255,255,0.06); }
.ring-fill {
  transition: stroke-dashoffset 1.2s cubic-bezier(.34,1.56,.64,1);
  stroke-linecap: round;
}
.ring-content {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 4px;
  z-index: 2;
}
.ring-tip {
  transition: transform 1.2s cubic-bezier(.34,1.56,.64,1);
  transform-origin: 110px 110px;
  filter: drop-shadow(0 0 12px rgba(255,220,100,0.95));
}
.ring-tip-bolt { font-size: 18px; font-weight: 900; }

.label-chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 12px; border-radius: 999px;
  background: rgba(255,150,0,0.16);
  color: var(--primary);
  font-size: 10px; font-weight: 900; letter-spacing: 0.22em;
  border: 1px solid rgba(255,150,0,0.32);
}
.big-number {
  font-family: var(--font-display);
  font-size: clamp(28px, 8vw, 38px);
  font-weight: 800; margin: 6px 0 0;
  letter-spacing: -0.04em; line-height: 1;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(180deg, #ffe14d 0%, #ff9600 60%, #ff5e00 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 4px 16px rgba(255,150,0,0.4));
  position: relative;
}
.big-number::before {
  content: attr(data-shadow);
  position: absolute; left: 0; right: 0; top: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.4), transparent 50%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  pointer-events: none;
}
.big-number.pulse { animation: popNum .65s cubic-bezier(.34,1.7,.64,1); }
@keyframes popNum {
  0%   { transform: scale(0.96); }
  40%  { transform: scale(1.06); }
  100% { transform: scale(1); }
}
.btc-tag {
  color: var(--muted); font-weight: 800; font-size: 11px;
  letter-spacing: 0.4em; margin: 2px 0 0;
}
.fiat-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 14px; margin: 8px 0 0;
  background: rgba(28,176,246,0.12);
  border: 1px solid rgba(28,176,246,0.32);
  border-radius: 999px;
  animation: chipIn .55s cubic-bezier(.34,1.56,.64,1) both .35s;
}
.fiat-pill.hidden { display: none; }
.fiat-main { color: var(--blue); font-weight: 900; font-size: 14px; letter-spacing: -0.02em; }
.fiat-sec  { color: var(--muted); font-weight: 800; font-size: 11px; }

/* Hexagonal level gem */
.hex-badge {
  position: absolute; top: 14px; right: 14px;
  width: 56px; height: 64px; z-index: 3;
  display: grid; place-items: center;
  filter: drop-shadow(0 6px 14px rgba(255,150,0,0.45));
  animation: hexFloat 3.5s ease-in-out infinite;
}
@keyframes hexFloat { 0%,100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-3px) rotate(3deg); } }
.hex-badge .hex-num {
  position: absolute; font-family: var(--font-display);
  font-size: 22px; font-weight: 900; color: #3a1700;
  letter-spacing: -0.05em;
  filter: drop-shadow(0 1px 0 rgba(255,255,255,0.4));
}

/* Speech bubble */
.speech {
  display: inline-block; position: relative;
  margin-top: 6px; padding: 7px 16px;
  background: var(--card-hi);
  border: 1px solid var(--stroke-hi);
  border-radius: 14px;
  color: var(--text); font-size: 13px; font-weight: 900;
  animation: speechIn .55s cubic-bezier(.34,1.56,.64,1) both .4s;
}
.speech::after {
  content: ""; position: absolute; top: -6px; left: 50%; transform: translateX(-50%) rotate(45deg);
  width: 10px; height: 10px;
  background: var(--card-hi);
  border-left: 1px solid var(--stroke-hi); border-top: 1px solid var(--stroke-hi);
  border-top-left-radius: 3px;
}
@keyframes speechIn { from { opacity: 0; transform: translateY(8px) scale(0.85); } to { opacity: 1; transform: translateY(0) scale(1); } }

/* ==== PROGRESS CARD ==== */
.progress-card .row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.goal-label { display: flex; align-items: center; gap: 12px; }
.goal-emoji {
  font-size: 30px;
  filter: drop-shadow(0 4px 8px rgba(255,75,75,0.45));
  animation: swing 4s ease-in-out infinite;
}
@keyframes swing { 0%,100% { transform: rotate(-7deg); } 50% { transform: rotate(7deg); } }
.goal-title { color: var(--muted); font-size: 11px; font-weight: 900; letter-spacing: 0.18em; text-transform: uppercase; }
.goal-value { font-size: 18px; font-weight: 900; font-family: var(--font-display); letter-spacing: -0.02em; }
.pct-chip {
  background: linear-gradient(180deg, #89e219, #58cc02);
  color: #0e2900;
  padding: 6px 14px; border-radius: 999px;
  font-weight: 900; font-size: 15px;
  border: 1px solid rgba(255,255,255,0.2);
  min-width: 64px; text-align: center;
  box-shadow: 0 6px 16px rgba(88,204,2,0.35), inset 0 -3px 0 rgba(0,0,0,0.18), inset 0 2px 0 rgba(255,255,255,0.35);
  font-variant-numeric: tabular-nums;
}
.pct-chip.bump { animation: popNum .6s cubic-bezier(.34,1.7,.64,1); }

.progress {
  position: relative; height: 22px; border-radius: 999px;
  background: rgba(0,0,0,0.35);
  border: 1px solid rgba(255,255,255,0.06);
  overflow: visible; margin-bottom: 6px;
  box-shadow: inset 0 4px 0 rgba(0,0,0,0.4);
}
.progress-fill {
  height: 100%; width: 0%;
  border-radius: 999px;
  background: linear-gradient(180deg, #ffe14d 0%, #ff9600 55%, #ff5e00 100%);
  box-shadow:
    inset 0 5px 0 rgba(255,255,255,0.4),
    inset 0 -4px 0 rgba(0,0,0,0.2),
    0 0 24px rgba(255,150,0,0.5);
  transition: width 1.1s cubic-bezier(.34,1.56,.64,1);
  position: relative;
}
.progress-fill::before {
  content: ""; position: absolute; inset: 3px 5px auto; height: 5px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.6), transparent);
  border-radius: 999px;
  animation: shine 3s linear infinite;
}
@keyframes shine {
  0% { transform: translateX(-30%); opacity: 0.4; }
  60% { opacity: 0.95; }
  100% { transform: translateX(30%); opacity: 0.4; }
}
.marker {
  position: absolute; top: 50%; transform: translateY(-50%);
  font-size: 26px;
  transition: left 1.1s cubic-bezier(.34,1.56,.64,1);
  filter: drop-shadow(0 0 12px rgba(255,220,100,0.95));
  animation: bob 1.6s ease-in-out infinite;
  z-index: 2;
}

/* Milestones */
.milestones {
  margin-top: 14px; position: relative;
  display: flex; justify-content: space-between; align-items: flex-start;
  padding: 0 4px;
}
.milestones::before {
  content: ""; position: absolute; left: 18px; right: 18px; top: 16px; height: 3px;
  background: repeating-linear-gradient(90deg, var(--stroke-hi) 0 6px, transparent 6px 12px);
  z-index: 0;
}
.milestone {
  position: relative; z-index: 1;
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  flex: 1;
}
.milestone .dot {
  width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--card-hi);
  border: 1px solid var(--stroke-hi);
  color: var(--muted); font-size: 15px; font-weight: 900;
  transition: transform .35s cubic-bezier(.34,1.56,.64,1), background .4s, color .4s, box-shadow .4s;
}
.milestone.done .dot {
  background: linear-gradient(180deg, #89e219, #58cc02);
  border-color: rgba(0,0,0,0.2);
  color: #0e2900;
  box-shadow: 0 6px 14px rgba(88,204,2,0.4), inset 0 -2px 0 rgba(0,0,0,0.18);
}
.milestone.current .dot {
  background: linear-gradient(180deg, #ffd744, #ff9600);
  border-color: rgba(0,0,0,0.2);
  color: #3a2600;
  box-shadow: 0 0 22px rgba(255,180,0,0.7), 0 4px 10px rgba(0,0,0,0.3), inset 0 -2px 0 rgba(0,0,0,0.18);
  animation: milestoneBeat 1.3s ease-in-out infinite;
}
@keyframes milestoneBeat {
  0%, 100% { transform: scale(1.08); }
  50%      { transform: scale(1.2); }
}
.milestone.goal .dot { font-size: 14px; }
.milestone.goal.done .dot {
  background: linear-gradient(180deg, #ffe14d, #ff5e00);
  color: #3a1400;
  box-shadow: 0 0 30px rgba(255,150,0,0.9), inset 0 -2px 0 rgba(0,0,0,0.2);
}
.milestone .lbl { font-size: 10px; font-weight: 800; color: var(--muted); }
.milestone.done .lbl, .milestone.current .lbl { color: var(--text); }

.remain-line { color: var(--muted); font-size: 13px; font-weight: 800; margin: 14px 0 0; text-align: center; }
.remain-line strong { color: var(--text); font-weight: 900; font-family: var(--font-display); }

/* Next micro-milestone */
.next-milestone { margin-top: 12px; display: flex; justify-content: center; }
.mm-pill {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 8px 14px; border-radius: 999px;
  background: linear-gradient(135deg, rgba(255,150,0,0.18), rgba(255,200,0,0.08));
  border: 1px solid rgba(255,150,0,0.35);
  font-size: 13px; font-weight: 800;
}
.mm-pill.done {
  background: linear-gradient(135deg, rgba(88,204,2,0.22), rgba(137,226,25,0.1));
  border-color: rgba(88,204,2,0.4); color: var(--green);
}
.mm-emoji { font-size: 16px; }
.mm-text { color: var(--muted); }
.mm-val  { color: var(--text); font-weight: 900; font-family: var(--font-display); }
.mm-delta {
  background: linear-gradient(180deg, var(--primary-hi), var(--primary));
  color: #3a1a00;
  padding: 2px 9px; border-radius: 999px; font-weight: 900; font-size: 12px;
  border: 1px solid rgba(0,0,0,0.2);
  font-variant-numeric: tabular-nums;
}

/* ==== HISTORY ==== */
.history-card .card-title { justify-content: flex-start; gap: 8px; }
.spark-stats { display: inline-flex; gap: 6px; margin-left: auto; }
.ss-chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: 999px;
  background: var(--card-hi); border: 1px solid var(--stroke-hi);
  font-size: 11px; font-weight: 900; text-transform: none; letter-spacing: 0;
  font-variant-numeric: tabular-nums;
}
.ss-chip.pos { color: var(--green); border-color: rgba(88,204,2,0.4); background: rgba(88,204,2,0.12); }
.ss-chip.neg { color: var(--red); border-color: rgba(255,75,75,0.4); background: rgba(255,75,75,0.12); }
.spark-container { width: 100%; height: 110px; position: relative; }
.spark { width: 100%; height: 100%; display: block; }
.spark-line { stroke-dasharray: var(--len, 600); stroke-dashoffset: var(--len, 600); animation: drawLine 1.6s cubic-bezier(.4,.0,.2,1) .2s forwards; }
@keyframes drawLine { to { stroke-dashoffset: 0; } }
.empty-spark {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px; height: 100%; text-align: center; color: var(--muted);
}
.empty-spark-emoji { font-size: 32px; animation: bob 3s ease-in-out infinite; }
.empty-spark p { margin: 0; font-size: 12px; font-weight: 800; max-width: 240px; }

/* ==== PROJECTION ==== */
.projection .hero-line {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 16px;
  background: linear-gradient(135deg, rgba(255,150,0,0.18), rgba(255,75,75,0.08));
  border: 1px solid rgba(255,150,0,0.32);
  border-radius: 16px;
  margin-bottom: 12px;
  position: relative; overflow: hidden;
}
.projection .hero-line::before {
  content: ""; position: absolute; inset: -2px; background: conic-gradient(from 0deg, transparent, rgba(255,200,0,0.4), transparent 60deg);
  animation: spin 6s linear infinite; opacity: 0.6; pointer-events: none;
}
.projection .hero-line > * { position: relative; z-index: 1; }
.hero-emoji {
  font-size: 44px; line-height: 1;
  filter: drop-shadow(0 4px 14px rgba(255,150,0,0.6));
  animation: bob 2.4s ease-in-out infinite;
}
.hero-value {
  font-family: var(--font-display);
  font-size: 26px; font-weight: 800; line-height: 1.05;
  background: linear-gradient(180deg, #ffe14d, #ff5e00);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  letter-spacing: -0.03em;
}
.hero-sub { color: var(--muted); font-size: 11px; font-weight: 900; text-transform: uppercase; letter-spacing: 0.18em; margin-top: 2px; }
.projection .rows { display: flex; flex-direction: column; }
.projection .line {
  display: flex; justify-content: space-between; align-items: center;
  padding: 11px 4px;
  border-bottom: 1px solid var(--stroke);
}
.projection .line:last-child { border-bottom: none; }
.projection .line.subtle .k, .projection .line.subtle .v { color: var(--muted); font-size: 12px; }
.projection .line .k { color: var(--muted); font-weight: 800; font-size: 13px; }
.projection .line .v { font-weight: 900; font-size: 15px; font-family: var(--font-display); letter-spacing: -0.02em; }

.empty { text-align: center; padding: 14px 8px; }
.empty-emoji {
  font-size: 56px; display: inline-block; margin-bottom: 8px;
  animation: swing 3.2s ease-in-out infinite;
  filter: drop-shadow(0 4px 14px rgba(88,204,2,0.4));
}
.empty p { color: var(--muted); font-weight: 800; margin: 0; line-height: 1.45; font-size: 14px; }

/* ==== WALLETS ==== */
.wallets { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.wallets li {
  display: flex; align-items: center; gap: 12px;
  padding: 14px;
  background: var(--card-hi);
  border: 1px solid var(--stroke-hi);
  border-radius: 16px;
  position: relative; overflow: hidden;
  transition: transform .12s, border-color .25s;
}
.wallets li::before {
  content: ""; position: absolute; left: 0; top: 12%; bottom: 12%;
  width: 3px; border-radius: 0 3px 3px 0;
  background: linear-gradient(180deg, var(--primary-hi), var(--primary-lo));
  box-shadow: 0 0 10px rgba(255,150,0,0.5);
}
.wallets li.zpub-li::before {
  background: linear-gradient(180deg, var(--blue), var(--purple));
  box-shadow: 0 0 10px rgba(28,176,246,0.5);
}
.wallets li:active { transform: scale(0.98); border-color: var(--primary); }
.w-icon {
  width: 46px; height: 46px; border-radius: 14px;
  display: grid; place-items: center; font-size: 22px;
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--primary-hi), var(--primary));
  border: 1px solid rgba(0,0,0,0.18);
  color: #3a2600;
  box-shadow: 0 6px 14px rgba(255,150,0,0.3), inset 0 -3px 0 rgba(0,0,0,0.15), inset 0 2px 0 rgba(255,255,255,0.3);
}
.w-icon.zpub {
  background: linear-gradient(135deg, var(--blue), var(--purple));
  color: white;
  box-shadow: 0 6px 14px rgba(28,176,246,0.3), inset 0 -3px 0 rgba(0,0,0,0.15), inset 0 2px 0 rgba(255,255,255,0.3);
}
.w-info { flex: 1; min-width: 0; }
.w-label { font-weight: 900; font-size: 15px; margin-bottom: 3px; }
.w-sub {
  color: var(--muted); font-size: 11px; font-weight: 700;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  font-family: ui-monospace, SFMono-Regular, monospace;
}
.w-share {
  height: 4px; border-radius: 999px; background: rgba(0,0,0,0.3);
  margin-top: 7px; overflow: hidden;
}
.w-share-fill {
  height: 100%; width: 0%; border-radius: 999px;
  background: linear-gradient(90deg, var(--primary), var(--yellow));
  transition: width 1.1s cubic-bezier(.34,1.56,.64,1);
  box-shadow: 0 0 10px rgba(255,150,0,0.4);
}
.zpub-li .w-share-fill { background: linear-gradient(90deg, var(--blue), var(--purple)); box-shadow: 0 0 10px rgba(28,176,246,0.4); }
.w-right { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; flex-shrink: 0; }
.w-bal {
  font-weight: 800; font-size: 16px;
  font-family: var(--font-display);
  background: linear-gradient(180deg, var(--primary-hi), var(--primary));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
.zpub-li .w-bal {
  background: linear-gradient(180deg, var(--blue), var(--purple));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.w-fiat {
  font-size: 11px; font-weight: 800; color: var(--blue);
  font-variant-numeric: tabular-nums; opacity: 0.85;
}
.card-title .hint {
  font-size: 10px; font-weight: 700; color: var(--muted);
  text-transform: none; letter-spacing: 0; margin-left: auto;
  opacity: 0.7;
}

/* ==== QUOTE CARD ==== */
.quote-card {
  text-align: center; padding: 24px 22px 20px;
  background: linear-gradient(160deg, rgba(50,72,82,0.5), rgba(15,23,28,0.5));
  position: relative; overflow: hidden;
}
.quote-card::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(ellipse at center, rgba(255,200,0,0.08), transparent 60%);
  pointer-events: none;
}
.quote-mark {
  font-size: 64px; line-height: 0.5;
  background: linear-gradient(180deg, #ffe14d, #ff5e00);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  font-family: Georgia, serif;
  margin-bottom: 6px;
  filter: drop-shadow(0 4px 14px rgba(255,150,0,0.4));
}
.quote {
  font-family: var(--font-display);
  font-size: 18px; font-weight: 600; font-style: italic;
  color: var(--text); margin: 0 0 10px; line-height: 1.35;
  letter-spacing: -0.02em;
  position: relative;
}
.quote-sign {
  font-size: 11px; font-weight: 900; color: var(--muted);
  letter-spacing: 0.2em; text-transform: uppercase;
}

/* ==== MODAL ==== */
.modal {
  position: fixed; inset: 0; background: rgba(0,0,0,0.65);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  display: flex; align-items: flex-end; justify-content: center; z-index: 50;
  animation: modalIn .25s ease;
}
@keyframes modalIn { from { opacity: 0; } to { opacity: 1; } }
.modal.hidden { display: none; }
.sheet {
  background: rgba(32,47,54,0.95);
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  width: 100%; max-width: 560px;
  border-top-left-radius: 28px; border-top-right-radius: 28px;
  padding: 18px 18px calc(28px + env(safe-area-inset-bottom));
  max-height: 92vh; overflow-y: auto;
  border-top: 1px solid var(--stroke-hi);
  animation: slideUp .35s cubic-bezier(.34,1.56,.64,1);
}
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
.sheet .bar h2 { margin: 0; font-size: 22px; font-weight: 900; font-family: var(--font-display); letter-spacing: -0.02em; }
.sheet section { margin-top: 18px; }
.sheet h3 { margin: 0 0 12px; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.18em; font-weight: 900; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.field span { color: var(--muted); font-size: 11px; font-weight: 900; text-transform: uppercase; letter-spacing: 0.14em; }
.field input {
  background: rgba(0,0,0,0.35); border: 1px solid var(--stroke-hi);
  color: var(--text);
  padding: 13px 14px; border-radius: 14px; font-size: 16px; font-weight: 800;
  font-family: inherit;
}
.field input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px rgba(28,176,246,0.15); }
.btn-primary {
  background: linear-gradient(180deg, #89e219, #58cc02);
  color: #0e2900;
  border: 1px solid rgba(0,0,0,0.18);
  padding: 14px 16px; border-radius: 16px;
  font-weight: 900; width: 100%; font-size: 15px;
  text-transform: uppercase; letter-spacing: 0.1em;
  cursor: pointer; font-family: inherit;
  transition: transform .1s, box-shadow .25s;
  box-shadow: 0 8px 22px rgba(88,204,2,0.35), inset 0 -3px 0 rgba(0,0,0,0.18), inset 0 2px 0 rgba(255,255,255,0.3);
}
.btn-primary:active { transform: translateY(2px); box-shadow: 0 4px 10px rgba(88,204,2,0.3), inset 0 -1px 0 rgba(0,0,0,0.18); }
.btn-text {
  background: transparent; color: var(--blue); border: none;
  font-weight: 900; font-size: 15px; padding: 6px 10px; cursor: pointer; font-family: inherit;
  text-transform: uppercase; letter-spacing: 0.1em;
}
.del {
  background: rgba(255,75,75,0.15); color: var(--red);
  border: 1px solid rgba(255,75,75,0.4);
  width: 36px; height: 36px; border-radius: 12px;
  font-size: 16px; font-weight: 900; cursor: pointer;
  display: grid; place-items: center;
}

/* ==== ARRIVAL ==== */
.arrival {
  position: fixed; inset: 0;
  display: flex; align-items: center; justify-content: center;
  flex-direction: column;
  background: radial-gradient(ellipse at center, rgba(255,150,0,0.4), rgba(0,0,0,0.94));
  z-index: 100; pointer-events: none;
  animation: flash .35s;
}
.arrival.hidden { display: none; }
@keyframes flash {
  0% { background: rgba(255,255,255,0.95); }
  30% { background: rgba(255,200,0,0.7); }
  100% { background: radial-gradient(ellipse at center, rgba(255,150,0,0.4), rgba(0,0,0,0.94)); }
}
.arrival .bolt {
  width: 200px; height: 260px;
  filter: drop-shadow(0 0 60px rgba(255,225,77,1)) drop-shadow(0 0 120px rgba(255,150,0,0.8));
  animation: boltIn .65s cubic-bezier(.34,1.7,.64,1), boltPulse .7s ease-in-out .65s 4 alternate;
}
@keyframes boltIn {
  0%  { transform: scale(0.05) rotate(-50deg); opacity: 0; }
  70% { transform: scale(1.3) rotate(18deg); opacity: 1; }
  100%{ transform: scale(1) rotate(0deg); }
}
@keyframes boltPulse {
  from { filter: drop-shadow(0 0 30px rgba(255,225,77,0.65)); transform: scale(1); }
  to   { filter: drop-shadow(0 0 90px rgba(255,225,77,1)); transform: scale(1.1); }
}
.arrival-text {
  margin-top: 32px; font-family: var(--font-display);
  font-size: 46px; font-weight: 800; letter-spacing: -0.04em;
  background: linear-gradient(180deg, #ffe14d, #ff5e00);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  text-shadow: 0 0 40px rgba(255,200,0,0.5);
  animation: textIn .55s cubic-bezier(.34,1.56,.64,1) .35s backwards;
}
@keyframes textIn {
  from { transform: translateY(36px) scale(0.6); opacity: 0; }
  to   { transform: translateY(0) scale(1); opacity: 1; }
}
.particles { position: absolute; inset: 0; pointer-events: none; }
.particle {
  position: absolute; top: 50%; left: 50%;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--yellow);
  animation: particleFly 1.6s cubic-bezier(.2,.7,.4,1) forwards;
}
@keyframes particleFly {
  0%   { transform: translate(-50%,-50%) scale(0.3); opacity: 0; }
  15%  { transform: translate(-50%,-50%) scale(1.6); opacity: 1; }
  100% { transform: translate(var(--dx), var(--dy)) scale(0.2) rotate(220deg); opacity: 0; }
}

/* ==== TOAST ==== */
.toast {
  position: fixed; left: 50%; bottom: calc(32px + env(safe-area-inset-bottom));
  transform: translate(-50%, 24px);
  background: var(--card-hi); color: var(--text);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--stroke-hi);
  padding: 12px 22px; border-radius: 16px;
  font-weight: 900; font-size: 14px;
  opacity: 0; pointer-events: none;
  z-index: 200;
  box-shadow: 0 16px 36px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.08);
  transition: opacity .3s, transform .35s cubic-bezier(.34,1.56,.64,1);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
