/* ============================================================
   999999andyou — neon arcade design system
   ============================================================ */
/* crawlable + screen-reader content for the canvas app (SEO/a11y) */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

:root {
  /* base */
  --bg:        #04060a;
  --bg-2:      #070c12;
  --bg-3:      #0b1118;
  --panel:     rgba(9, 15, 21, 0.74);
  --panel-2:   rgba(13, 20, 28, 0.92);
  --hair:      rgba(120, 255, 210, 0.10);
  --hair-2:    rgba(120, 255, 210, 0.18);

  /* neon palette */
  --green:   #2dffb0;
  --green-d: #14b07a;
  --cyan:    #52e6ff;
  --pink:    #ff5fb0;
  --violet:  #a98bff;
  --amber:   #ffce5a;
  --red:     #ff6a55;
  --blue:    #5aa6ff;
  --orange:  #ff9a4d;

  /* text */
  --text:       #d6efe5;
  --text-dim:   #7f9990;
  --text-faint: #4c5f59;

  /* type */
  --f-display: 'Chakra Petch', sans-serif;
  --f-mono:    'JetBrains Mono', monospace;
  --f-body:    'Space Grotesk', sans-serif;

  --r:   10px;
  --r-s: 7px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--f-body);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

#app { height: 100%; }
[hidden] { display: none !important; }

::selection { background: rgba(45, 255, 176, 0.28); color: #fff; }

button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input  { font-family: inherit; }

/* ---------- CRT / scanline overlays ---------- */
.crt-overlay {
  position: fixed; inset: 0; z-index: 9000; pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    rgba(0,0,0,0) 0px,
    rgba(0,0,0,0) 2px,
    rgba(0,0,0,0.16) 3px,
    rgba(0,0,0,0.16) 4px
  );
  mix-blend-mode: multiply;
  opacity: 0.55;
  animation: crt-flicker 5.5s infinite steps(60);
}
.crt-vignette {
  position: fixed; inset: 0; z-index: 9001; pointer-events: none;
  background:
    radial-gradient(130% 100% at 50% 50%, rgba(0,0,0,0) 55%, rgba(0,0,0,0.55) 100%);
}
@keyframes crt-flicker {
  0%, 96%, 100% { opacity: 0.55; }
  97% { opacity: 0.42; }
  98% { opacity: 0.6; }
  99% { opacity: 0.48; }
}
body.focus-mode .crt-overlay { opacity: 0.32; }

/* CRT power-on sweep (plays once when diving into the grid) */
.crt-boot {
  position: fixed; inset: 0; z-index: 600; pointer-events: none;
  background: linear-gradient(180deg, rgba(180,255,225,0.9), rgba(120,255,210,0.85));
  transform-origin: center center;
  animation: crtboot 0.62s ease-out forwards;
  will-change: transform, opacity;
}
@keyframes crtboot {
  0%   { opacity: 0;    transform: scaleY(0.003); }
  7%   { opacity: 1;    transform: scaleY(0.006); }
  26%  { opacity: 0.95; transform: scaleY(1); }
  42%  { opacity: 0.32; transform: scaleY(1); }
  72%  { opacity: 0.1;  transform: scaleY(1); }
  100% { opacity: 0;    transform: scaleY(1); }
}

/* ---------- generic neon helpers ---------- */
.glow      { text-shadow: 0 0 10px currentColor; }
.app-stage { position: fixed; left: 0; right: 0; top: 0; bottom: 0; width: 100%; height: 100%; }

/* canvas fills everything; UI floats above */
.grid-canvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  display: block;
  cursor: grab;
  touch-action: none;           /* we own pan + pinch; stop browser scroll/zoom */
  background:
    radial-gradient(120% 90% at 50% 35%, #06121b 0%, #050a10 55%, #04070b 100%);
}
html, body { overscroll-behavior: none; }   /* no pull-to-refresh / bounce */

/* Pinch-zoom is owned by the canvas only. UI surfaces disable browser pinch:
   panels/header swallow gestures (taps still work); popup cards allow vertical
   scroll (pan-y) but never pinch. */
.hdr, .statusbar, .feed, .minimap, .controls, .modal-scrim, .mobctl, .peek { touch-action: none; }
.claim, .share-card { touch-action: pan-y; }
.grid-canvas.dragging { cursor: grabbing; }

/* image avatars rendered into chips/cards (overlay the fallback letter) */
.av img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.sc-av img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 14px; }

/* ============================================================
   HEADER  (top HUD bar)
   ============================================================ */
.hdr {
  position: absolute; top: 0; left: 0; right: 0; z-index: 50;
  height: 64px;
  display: flex; align-items: center; gap: 22px;
  padding: 0 22px;
  background: linear-gradient(to bottom, rgba(4,7,11,0.96), rgba(4,7,11,0.62) 70%, rgba(4,7,11,0));
  backdrop-filter: blur(2px);
}
.brand {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 21px;
  letter-spacing: -0.5px;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  display: flex; align-items: baseline;
}
.brand .b-num { color: var(--text); }
.brand .b-and { color: var(--green); text-shadow: 0 0 14px rgba(45,255,176,0.55); }
.brand .b-you {
  color: #fff;
  background: linear-gradient(90deg, var(--green), var(--cyan));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.brand:hover .b-and { animation: glitch 0.4s steps(2) 2; }
@keyframes glitch {
  0%,100% { transform: translate(0,0); }
  50% { transform: translate(-1px, 1px); }
}

/* search */
.search {
  position: relative; flex: 0 1 420px; min-width: 200px;
}
.search input {
  width: 100%; height: 38px;
  background: rgba(7,13,19,0.85);
  border: 1px solid var(--hair);
  border-radius: 999px;
  color: var(--text);
  font-size: 13px; font-family: var(--f-mono);
  padding: 0 16px 0 38px;
  transition: border-color .18s, box-shadow .18s;
}
.search input::placeholder { color: var(--text-faint); }
.search input:focus {
  outline: none;
  border-color: rgba(45,255,176,0.5);
  box-shadow: 0 0 0 3px rgba(45,255,176,0.10), 0 0 18px rgba(45,255,176,0.18) inset;
}
.search .s-ico {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  color: var(--text-dim); font-size: 13px; pointer-events: none;
}
.search-results {
  position: absolute; top: 46px; left: 0; right: 0;
  background: var(--panel-2);
  border: 1px solid var(--hair-2);
  border-radius: var(--r);
  overflow: hidden;
  box-shadow: 0 18px 50px rgba(0,0,0,0.6);
  z-index: 60;
}
.sr-row {
  display: flex; align-items: center; gap: 11px;
  padding: 9px 13px; cursor: pointer;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.sr-row:last-child { border-bottom: none; }
.sr-row:hover { background: rgba(45,255,176,0.07); }
.sr-meta { display: flex; flex-direction: column; min-width: 0; }
.sr-handle { font-family: var(--f-mono); font-size: 13px; color: var(--text); }
.sr-sub { font-size: 11px; color: var(--text-dim); }
.sr-coord { margin-left: auto; font-family: var(--f-mono); font-size: 11px; color: var(--text-faint); }

/* occupied stat */
.stat-occ { display: flex; flex-direction: column; line-height: 1; gap: 5px; }
.stat-occ .lbl {
  font-family: var(--f-mono); font-size: 9.5px; letter-spacing: 2.5px;
  color: var(--text-dim); text-transform: uppercase;
}
.stat-occ .row { display: flex; align-items: baseline; gap: 9px; }
.stat-occ .num {
  font-family: var(--f-display); font-weight: 700; font-size: 22px;
  color: var(--green); text-shadow: 0 0 16px rgba(45,255,176,0.45);
  font-variant-numeric: tabular-nums;
}
.stat-occ .pct { font-family: var(--f-mono); font-size: 11px; color: var(--text-dim); }
/* desktop: center the OCCUPIED readout in the header (out of the flex flow) */
@media (min-width: 1000px) {
  .stat-occ { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); align-items: center; }
  .stat-occ .row { justify-content: center; }
}
.occ-track { width: 132px; height: 4px; border-radius: 3px; background: rgba(255,255,255,0.07); overflow: hidden; margin-top: 1px; }
.occ-fill  { height: 100%; background: linear-gradient(90deg, var(--green), var(--cyan)); box-shadow: 0 0 10px rgba(45,255,176,0.6); transition: width .3s ease; }

/* zoom control */
.zoom {
  margin-left: auto;
  display: flex; align-items: center; gap: 2px;
  background: rgba(7,13,19,0.85);
  border: 1px solid var(--hair);
  border-radius: 999px; padding: 4px;
}
.zoom button {
  width: 30px; height: 30px; border-radius: 999px;
  display: grid; place-items: center;
  color: var(--text-dim); font-size: 18px; line-height: 1;
  transition: background .15s, color .15s;
}
.zoom button:hover { background: rgba(45,255,176,0.12); color: var(--green); }
.zoom .z-val {
  font-family: var(--f-mono); font-size: 13px; font-weight: 500;
  color: var(--text); min-width: 56px; text-align: center;
  font-variant-numeric: tabular-nums;
}

/* focus toggle + help */
.focus-tog { display: flex; align-items: center; gap: 9px; }
.focus-tog .fl { font-family: var(--f-mono); font-size: 11px; letter-spacing: 1px; color: var(--text-dim); text-transform: lowercase; }
.toggle {
  width: 52px; height: 26px; border-radius: 999px; position: relative;
  background: rgba(255,255,255,0.08); border: 1px solid var(--hair);
  transition: background .2s, box-shadow .2s;
}
.toggle .knob {
  position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--text-dim); transition: transform .2s, background .2s;
}
.toggle .tl {
  position: absolute; top: 50%; transform: translateY(-50%);
  font-family: var(--f-mono); font-size: 8.5px; font-weight: 700; letter-spacing: 1px;
}
.toggle .tl.on  { left: 8px;  color: #042; opacity: 0; }
.toggle .tl.off { right: 7px; color: var(--text-faint); }
.toggle.on { background: var(--green); box-shadow: 0 0 16px rgba(45,255,176,0.5); }
.toggle.on .knob { transform: translateX(26px); background: #042b1f; }
.toggle.on .tl.on  { opacity: 1; }
.toggle.on .tl.off { opacity: 0; }

.help-btn {
  width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid var(--hair); color: var(--text-dim);
  display: grid; place-items: center; font-size: 15px;
  transition: border-color .15s, color .15s, box-shadow .15s;
}
.help-btn:hover { color: var(--green); border-color: rgba(45,255,176,0.5); box-shadow: 0 0 14px rgba(45,255,176,0.2); }

.snd-btn {
  width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid var(--hair); color: var(--text-dim);
  display: grid; place-items: center; font-size: 16px; position: relative;
  transition: border-color .15s, color .15s, box-shadow .15s;
}
.snd-btn:hover { color: var(--green); border-color: rgba(45,255,176,0.5); box-shadow: 0 0 14px rgba(45,255,176,0.2); }
.snd-btn.muted { color: var(--text-faint); }
.snd-btn.muted::after {
  content: ''; position: absolute; width: 24px; height: 2px; background: var(--red);
  transform: rotate(-45deg); box-shadow: 0 0 6px var(--red); border-radius: 2px;
}

/* ============================================================
   FLOATING PANELS (focus mode hides these)
   ============================================================ */
.floaters { transition: opacity .35s, transform .35s; }
body.focus-mode .floaters { opacity: 0; transform: translateY(6px); pointer-events: none; }

/* ---- live activity feed ---- */
.feed {
  position: absolute; top: 80px; left: 18px; z-index: 40;
  width: 246px;
  background: var(--panel); border: 1px solid var(--hair);
  border-radius: var(--r); backdrop-filter: blur(7px);
  /* cap to the viewport and scroll the whole panel when it overflows */
  max-height: calc(100vh - 80px - 18px); overflow: hidden auto;
  box-shadow: 0 14px 40px rgba(0,0,0,0.45);
  scrollbar-width: thin; scrollbar-color: var(--hair-2) transparent;
}
.feed::-webkit-scrollbar { width: 7px; }
.feed::-webkit-scrollbar-thumb { background: var(--hair-2); border-radius: 4px; }
.feed-hd {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 13px; border-bottom: 1px solid var(--hair);
  font-family: var(--f-mono); font-size: 10px; letter-spacing: 2px;
  color: var(--text-dim); text-transform: uppercase;
}
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--red); box-shadow: 0 0 8px var(--red); animation: pulse 1.3s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.3; } }
.feed-hd .count { margin-left: auto; color: var(--green); font-variant-numeric: tabular-nums; }
.feed-list { /* no inner cap — the whole .feed panel scrolls */ }
.feed-empty { padding: 16px 13px; font-family: var(--f-mono); font-size: 11px; color: var(--text-faint); line-height: 1.5; }
.feed-row {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 13px; border-bottom: 1px solid rgba(255,255,255,0.035);
  animation: feed-in .45s cubic-bezier(.2,.8,.2,1);
}
@keyframes feed-in {
  from { opacity: 0; transform: translateX(-12px); background: rgba(45,255,176,0.12); }
  to   { opacity: 1; transform: translateX(0); }
}
.feed-row:last-child { border-bottom: none; }
.fr-meta { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.fr-handle { font-family: var(--f-mono); font-size: 12px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fr-sub { font-size: 10px; color: var(--text-dim); }
.fr-coord { font-family: var(--f-mono); font-size: 10px; color: var(--text-faint); }

/* referral leaderboard (top recruiters) — lives under the recent-claims feed */
.lb-hd {
  display: flex; align-items: center; gap: 7px;
  padding: 11px 13px 8px; border-top: 1px solid var(--hair);
  font-family: var(--f-mono); font-size: 10px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--text-dim);
}
.lb-list { max-height: 200px; overflow: hidden; }
.lb-empty { padding: 4px 13px 12px; font-family: var(--f-mono); font-size: 10.5px; color: var(--text-faint); }
.lb-row {
  display: flex; align-items: center; gap: 10px; cursor: pointer;
  padding: 7px 13px; border-bottom: 1px solid rgba(255,255,255,0.035);
}
.lb-row:last-child { border-bottom: none; }
.lb-row:hover { background: rgba(45,255,176,0.06); }
.lb-rank { font-family: var(--f-display); font-weight: 700; font-size: 12px; color: var(--text-dim); width: 18px; text-align: center; flex: none; }
.lb-handle { font-family: var(--f-mono); font-size: 12px; color: var(--text); flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-count { font-family: var(--f-mono); font-size: 11px; color: var(--green); flex: none; }

/* "brought N neighbors" badge on the profile card */
.sc-referrals {
  display: inline-flex; align-items: center; gap: 5px; margin-top: 7px;
  padding: 3px 10px; border-radius: 999px;
  background: rgba(45,255,176,0.12); border: 1px solid rgba(45,255,176,0.4);
  font-family: var(--f-mono); font-size: 11px; color: var(--green);
}

/* ---- hidden-gift showcase (under the feed) ---- */
.gifts-hd {
  display: flex; align-items: center; gap: 7px;
  padding: 11px 13px 8px; border-top: 1px solid var(--hair);
  font-family: var(--f-mono); font-size: 10px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--text-dim);
}
.gifts-list { max-height: 240px; overflow: hidden; }
.gifts-empty { padding: 4px 13px 10px; font-family: var(--f-mono); font-size: 10.5px; color: var(--text-faint); }
.gift-row {
  display: flex; align-items: center; gap: 10px; padding: 7px 13px;
  border-bottom: 1px solid rgba(255,255,255,0.035);
}
.gift-row:last-child { border-bottom: none; }
.gift-row.found { cursor: pointer; }
.gift-row.found:hover { background: rgba(45,255,176,0.06); }
.gift-thumb {
  flex: none; width: 30px; height: 30px; border-radius: 7px; background-size: cover; background-position: center;
  background-color: rgba(255,255,255,0.05); display: grid; place-items: center; font-size: 15px;
}
.gift-thumb-ph { background: rgba(255,206,90,0.12); }
.gift-meta { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.gift-title { font-family: var(--f-mono); font-size: 12px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gift-sub { font-size: 10px; color: var(--text-dim); }
.gift-sponsor-link { color: var(--green); text-decoration: none; }
.gift-sponsor-link:hover { text-decoration: underline; }
.gift-sub.gift-found { color: var(--green); }
.gift-val { flex: none; font-family: var(--f-mono); font-size: 11px; color: #ffce5a; }
.gifts-sponsor {
  display: block; padding: 9px 13px 11px; font-family: var(--f-mono); font-size: 11px;
  color: var(--cyan); text-decoration: none; border-bottom: 1px solid var(--hair);
}
.gifts-sponsor:hover { color: var(--green); }

/* ---- proceeds breakdown panel ---- */
.proceeds-hd {
  display: flex; align-items: center; gap: 7px;
  padding: 11px 13px 8px; border-top: 1px solid var(--hair);
  font-family: var(--f-mono); font-size: 10px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--text-dim);
}
.proceeds { padding: 2px 0 4px; }
.proceeds-empty { padding: 4px 13px 10px; font-family: var(--f-mono); font-size: 10.5px; color: var(--text-faint); }
.pr-row { display: flex; justify-content: space-between; gap: 10px; padding: 4px 13px; }
.pr-lbl { font-family: var(--f-mono); font-size: 11px; color: var(--text-dim); }
.pr-val { font-family: var(--f-mono); font-size: 11px; color: var(--text); font-variant-numeric: tabular-nums; }
.pr-net { margin-top: 2px; padding-top: 7px; border-top: 1px solid rgba(255,255,255,0.06); }
.pr-net .pr-lbl, .pr-net .pr-val { color: var(--text); font-weight: 600; }
.pr-split { margin-top: 4px; padding-top: 5px; border-top: 1px dashed rgba(255,255,255,0.08); }
.pr-charity .pr-lbl, .pr-charity .pr-val { color: var(--green); }
.pr-note { padding: 7px 13px 4px; font-family: var(--f-mono); font-size: 9px; line-height: 1.4; color: var(--text-faint); }

/* ---- "you found a gift" block on the profile card ---- */
.sc-gift {
  margin: 0 0 14px; padding: 14px 16px; border-radius: 12px;
  background: rgba(45,255,176,0.10); border: 1px solid rgba(45,255,176,0.4);
}
.sc-gift-hd { font-family: var(--f-mono); font-size: 11px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--green); margin-bottom: 8px; }
.sc-gift-img { max-width: 150px; max-height: 120px; border-radius: 8px; display: block; margin: 0 0 8px; }
.sc-gift-title { font-size: 15px; color: #fff; font-weight: 600; }
.sc-gift-title span { color: var(--green); font-weight: 400; }
.sc-gift-sponsor { font-size: 12px; color: var(--text-dim); margin-top: 2px; }
.sc-gift-how { margin-top: 10px; font-family: var(--f-mono); font-size: 10px; letter-spacing: 1px; text-transform: uppercase; color: var(--green); }
.sc-gift-instr { font-size: 13px; color: var(--text); white-space: pre-wrap; margin-top: 3px; }
.sc-gift-safe { margin-top: 10px; font-size: 11.5px; line-height: 1.45; color: #f0a99c; }
.sc-gift-safe a { color: var(--cyan); }

/* avatar chip (procedural / image) */
.av {
  flex: none; border-radius: 6px; display: grid; place-items: center;
  font-family: var(--f-display); font-weight: 700; color: #02110c;
  position: relative; overflow: hidden;
}
.av.sq { border-radius: 5px; }
.av-badge {
  position: absolute; top: -5px; right: -5px; color: #ffce5a; line-height: 1;
  font-family: var(--f-display); text-shadow: 0 0 7px #ffce5a; pointer-events: none;
}
.plat-chip {
  flex: none; display: inline-grid; place-items: center;
  font-family: var(--f-mono); font-weight: 700; font-size: 9px;
  border-radius: 4px; color: #04070b;
  width: 18px; height: 18px;
}
/* monochrome brand glyph (dark) on the platform's neon chip.
   No padding — percentage padding resolves against the parent width and, with
   border-box, would inflate the chip and collapse the glyph. Size the glyph
   itself instead (centered by the chip's place-items). */
.plat-chip.plat-logo { padding: 0; }
.plat-chip.plat-logo img {
  width: 68%; height: 68%; object-fit: contain; display: block;
}
/* full-color logos (e.g. Instagram) fill the white tile */
.plat-chip.plat-logo-fc img { width: 86%; height: 86%; }

/* ---- minimap ---- */
.minimap {
  position: absolute; top: 80px; right: 18px; z-index: 40;
  width: 182px;
  background: var(--panel); border: 1px solid var(--hair);
  border-radius: var(--r); backdrop-filter: blur(7px); overflow: hidden;
  box-shadow: 0 14px 40px rgba(0,0,0,0.45);
}
.minimap-hd {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 11px;
  font-family: var(--f-mono); font-size: 9.5px; letter-spacing: 1.5px;
  color: var(--text-dim); text-transform: uppercase;
}
.minimap-hd .mm-coord { color: var(--green); }
.minimap canvas { display: block; width: 182px; height: 182px; cursor: crosshair; image-rendering: pixelated; }

/* tier legend */
.tier-legend { display: flex; flex-direction: column; padding: 9px 12px 11px; gap: 7px; border-top: 1px solid var(--hair); }
.tl-item { display: flex; align-items: center; gap: 8px; font-family: var(--f-mono); font-size: 10px; color: var(--text-dim); }
.tl-swatch { width: 9px; height: 9px; border-radius: 2px; }

/* ============================================================
   BOTTOM STATUS BAR + CONTROLS
   ============================================================ */
.statusbar {
  position: absolute; bottom: 0; left: 0; z-index: 40;
  display: flex; align-items: center; gap: 22px;
  padding: 14px 22px;
  font-family: var(--f-mono); font-size: 11.5px;
}
.sb-item { color: var(--text-dim); white-space: nowrap; }
.sb-item b { color: var(--text-dim); font-weight: 700; letter-spacing: 0.5px; }
.sb-item .v { color: var(--green); }

.controls {
  position: absolute; bottom: 14px; right: 22px; z-index: 40;
  display: flex; gap: 8px;
}
.ctrl {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 13px;
  background: var(--panel); border: 1px solid var(--hair);
  border-radius: 999px; backdrop-filter: blur(6px);
  font-family: var(--f-mono); font-size: 11px; color: var(--text-dim);
  white-space: nowrap;
}
.ctrl .key {
  display: grid; place-items: center; min-width: 18px; height: 18px; padding: 0 4px;
  border-radius: 4px; background: rgba(255,255,255,0.07);
  border: 1px solid var(--hair); color: var(--text); font-size: 9.5px;
}
.ctrl.muted { opacity: 0.5; }

/* ============================================================
   CLAIM PANEL
   ============================================================ */
.claim {
  position: absolute; bottom: 86px; right: 22px; z-index: 70;
  width: 348px;
  background: var(--panel-2); border: 1px solid var(--hair-2);
  border-radius: 14px; backdrop-filter: blur(10px);
  box-shadow: 0 24px 70px rgba(0,0,0,0.6), 0 0 0 1px rgba(45,255,176,0.05);
  overflow: hidden;
  animation: claim-in .3s cubic-bezier(.2,.9,.25,1);
}
@keyframes claim-in {
  from { opacity: 0; transform: translateY(16px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
/* nudge: when the grid is tapped while the claim panel is open, a light sweeps
   the border to point back to the open popup (paired with a haptic tick in JS) */
@property --claim-a { syntax: "<angle>"; initial-value: 0deg; inherits: false; }
.claim.nudge::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: 5;
  padding: 2px;
  background: conic-gradient(from var(--claim-a),
    transparent 0deg 230deg, rgba(45,255,176,0.95) 300deg, var(--cyan) 335deg, transparent 360deg);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
          mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  animation: claim-sweep 0.6s ease-out;
}
@keyframes claim-sweep { from { --claim-a: 0deg; } to { --claim-a: 360deg; } }
.claim-glow { height: 3px; background: linear-gradient(90deg, var(--green), var(--cyan), var(--violet)); box-shadow: 0 0 14px rgba(45,255,176,0.5); }
.claim-hd {
  display: flex; align-items: flex-start; justify-content: space-between;
  padding: 16px 16px 0;
}
.claim-hd h3 {
  font-family: var(--f-display); font-weight: 700; font-size: 18px; color: var(--text);
  letter-spacing: -0.2px;
}
.claim-hd .coord-tag {
  font-family: var(--f-mono); font-size: 11px; color: var(--text-dim); margin-top: 3px;
}
.claim-hd .coord-tag .tier { font-weight: 700; }
.claim-x { color: var(--text-dim); font-size: 16px; width: 26px; height: 26px; border-radius: 6px; display: grid; place-items: center; transition: background .15s, color .15s; }
.claim-x:hover { background: rgba(255,255,255,0.08); color: var(--text); }

.claim-body { padding: 14px 16px 16px; }
.field-lbl { font-size: 12px; font-weight: 600; color: var(--text); margin-bottom: 8px; display: block; }
.url-field { position: relative; display: flex; align-items: center; }
.url-field input {
  width: 100%; height: 44px;
  background: rgba(7,13,19,0.9); border: 1px solid var(--hair);
  border-radius: 9px; color: var(--text);
  font-family: var(--f-mono); font-size: 13px; padding: 0 40px 0 13px;
  transition: border-color .18s, box-shadow .18s;
}
.url-field input::placeholder { color: var(--text-faint); }
.url-field input:focus { outline: none; border-color: rgba(45,255,176,0.55); box-shadow: 0 0 0 3px rgba(45,255,176,0.1); }
.url-field .spin {
  position: absolute; right: 13px; width: 16px; height: 16px;
  border: 2px solid rgba(45,255,176,0.25); border-top-color: var(--green);
  border-radius: 50%; animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.tip { font-size: 11px; color: var(--text-dim); margin-top: 8px; display: flex; align-items: center; gap: 6px; }
.tip.err { color: var(--red); }

/* fetched profile preview */
.preview {
  margin-top: 14px; padding: 13px; border-radius: 10px;
  background: rgba(45,255,176,0.04); border: 1px solid var(--hair);
  display: flex; align-items: center; gap: 13px;
  animation: feed-in .35s ease;
}
.preview .pv-meta { flex: 1; min-width: 0; }
.preview .pv-name { font-family: var(--f-display); font-weight: 600; font-size: 15px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.preview .pv-handle { font-family: var(--f-mono); font-size: 12px; color: var(--text-dim); display: flex; align-items: center; gap: 7px; margin-top: 3px; }
.preview .pv-followers { font-size: 11px; color: var(--text-faint); margin-top: 4px; }

.claim-btn {
  width: 100%; height: 48px; margin-top: 15px; border-radius: 10px; padding: 0 22px;
  font-family: var(--f-display); font-weight: 700; font-size: 15px; letter-spacing: 0.3px;
  background: linear-gradient(90deg, var(--green), #2ee0c0); color: #03130d;
  box-shadow: 0 0 22px rgba(45,255,176,0.4); transition: transform .12s, box-shadow .2s, filter .2s;
  display: flex; align-items: center; justify-content: center; gap: 12px;
}
.claim-btn:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 0 32px rgba(45,255,176,0.6); filter: brightness(1.05); }
.claim-btn:active:not(:disabled) { transform: translateY(0); }
.claim-btn:disabled { opacity: 0.4; cursor: not-allowed; box-shadow: none; }
.price-tag { font-family: var(--f-mono); font-weight: 700; opacity: 0.85; }
.claim-oneoff { margin-top: 10px; font-size: 11.5px; line-height: 1.45; color: var(--green); text-align: center; font-weight: 500; }
.claim-consent { margin-top: 8px; font-size: 11px; line-height: 1.45; color: var(--text-faint); text-align: center; }
.claim-consent a { color: var(--text-dim); text-decoration: underline; }
.claim-consent a:hover { color: var(--green); }

/* ============================================================
   TOOLTIP (hover preview card)
   ============================================================ */
.tooltip {
  position: fixed; z-index: 80; pointer-events: none;
  width: 220px;
  background: var(--panel-2); border: 1px solid var(--hair-2);
  border-radius: 11px; overflow: hidden; backdrop-filter: blur(8px);
  box-shadow: 0 18px 48px rgba(0,0,0,0.6);
  transition: opacity .12s;
}
.tt-top { height: 4px; }
.tt-body { padding: 12px; display: flex; gap: 11px; align-items: center; }
.tt-meta { flex: 1; min-width: 0; }
.tt-name { font-family: var(--f-display); font-weight: 600; font-size: 14px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tt-handle { font-family: var(--f-mono); font-size: 11px; color: var(--text-dim); display: flex; align-items: center; gap: 6px; margin-top: 2px; }
.tt-foot { display: flex; align-items: center; justify-content: space-between; padding: 8px 12px; border-top: 1px solid var(--hair); font-family: var(--f-mono); font-size: 10px; }
.tt-foot .tt-coord { color: var(--text-faint); }
.tt-foot .tt-tier { font-weight: 700; }
.tt-empty { padding: 12px; }
.tt-empty .tte-tier { font-family: var(--f-display); font-weight: 700; font-size: 15px; }
.tt-empty .tte-sub { font-family: var(--f-mono); font-size: 11px; color: var(--text-dim); margin-top: 3px; }
.tt-empty .tte-cta { font-family: var(--f-mono); font-size: 11px; color: var(--green); margin-top: 8px; display: flex; align-items: center; gap: 6px; }

/* ============================================================
   SHARE CARD MODAL
   ============================================================ */
.modal-scrim {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(2,4,7,0.78); backdrop-filter: blur(6px);
  display: grid; place-items: center;
  animation: fade .25s ease;
}
/* gift-win fireworks — fills the scrim, behind the card (under the card) */
.fireworks { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.modal-scrim > .share-card { position: relative; z-index: 1; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.share-card {
  width: 440px; border-radius: 18px; overflow: hidden;
  background: linear-gradient(170deg, #0a131b, #06090e);
  border: 1px solid var(--hair-2);
  box-shadow: 0 40px 120px rgba(0,0,0,0.7), 0 0 60px rgba(45,255,176,0.1);
  animation: claim-in .4s cubic-bezier(.2,.9,.25,1);
}
.sc-hero {
  position: relative; padding: 30px 28px 24px;
  background:
    radial-gradient(120% 120% at 80% 0%, rgba(45,255,176,0.18), transparent 60%),
    radial-gradient(120% 120% at 0% 100%, rgba(82,230,255,0.14), transparent 55%);
  overflow: hidden;
}
.sc-grid-bg { position: absolute; inset: 0; opacity: 0.5; background-size: 22px 22px;
  background-image: linear-gradient(var(--hair) 1px, transparent 1px), linear-gradient(90deg, var(--hair) 1px, transparent 1px); }
.sc-eyebrow { position: relative; font-family: var(--f-mono); font-size: 10px; letter-spacing: 3px; color: var(--green); text-transform: uppercase; }
.sc-big { position: relative; display: flex; align-items: center; gap: 16px; margin-top: 18px; }
.sc-av { flex: none; width: 84px; height: 84px; border-radius: 14px; display: grid; place-items: center;
  font-family: var(--f-display); font-weight: 700; font-size: 38px; color: #02110c; position: relative; overflow: hidden; }
.sc-av-badge { position: absolute; top: -9px; right: -9px; font-size: 26px; color: #ffce5a;
  text-shadow: 0 0 12px #ffce5a; font-family: var(--f-display); line-height: 1; z-index: 2; }
.sc-id { min-width: 0; }
.sc-name { font-family: var(--f-display); font-weight: 700; font-size: 24px; color: #fff; letter-spacing: -0.4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sc-handle { font-family: var(--f-mono); font-size: 13px; color: var(--text-dim); margin-top: 2px; display: flex; align-items: center; gap: 8px; }
.sc-unverified { display: inline-block; margin-top: 8px; font-family: var(--f-mono); font-size: 10px; letter-spacing: 1px; text-transform: uppercase;
  color: #f4b15a; background: rgba(244,177,90,0.12); border: 1px solid rgba(244,177,90,0.35); border-radius: 999px; padding: 3px 9px; }
.sc-verified { display: inline-block; margin-top: 8px; font-family: var(--f-mono); font-size: 10px; letter-spacing: 1px; text-transform: uppercase;
  color: var(--green); background: rgba(45,255,176,0.12); border: 1px solid rgba(45,255,176,0.4); border-radius: 999px; padding: 3px 9px; box-shadow: 0 0 12px rgba(45,255,176,0.15); }
.sc-stats { position: relative; display: flex; gap: 26px; margin-top: 22px; }
.sc-stat .sv { font-family: var(--f-display); font-weight: 700; font-size: 19px; color: var(--green); font-variant-numeric: tabular-nums; }
.sc-stat .sl { font-family: var(--f-mono); font-size: 9.5px; letter-spacing: 1.5px; color: var(--text-dim); text-transform: uppercase; margin-top: 3px; }
.sc-foot { padding: 16px 28px 22px; }
.sc-msg { font-size: 13px; color: var(--text-dim); margin-bottom: 14px; }
.sc-disclaim { font-size: 11.5px; line-height: 1.5; color: #c9a36a; background: rgba(244,177,90,0.07);
  border: 1px solid rgba(244,177,90,0.22); border-radius: 9px; padding: 9px 12px; margin-bottom: 14px; }
.sc-report { width: 100%; margin-top: 10px; height: 36px; border-radius: 9px; background: transparent; border: 1px solid var(--hair);
  color: var(--text-dim); font-family: var(--f-mono); font-size: 11px; letter-spacing: 1px; transition: color .15s, border-color .15s, background .15s; }
.sc-report:hover:not(:disabled) { color: #ff7a7a; border-color: rgba(255,122,122,0.5); background: rgba(255,122,122,0.06); }
.sc-report:disabled { opacity: 0.7; }
.sc-report-form { margin-top: 10px; padding: 12px; border: 1px solid rgba(255,122,122,0.35); border-radius: 11px; background: rgba(255,122,122,0.05); }
.srf-lbl { font-family: var(--f-mono); font-size: 10px; letter-spacing: 1px; text-transform: uppercase; color: #ff9a8c; margin-bottom: 8px; }
.srf-input { width: 100%; min-height: 64px; resize: vertical; background: #0c1620; border: 1px solid var(--hair-2); border-radius: 9px;
  color: var(--text); font-family: var(--f-body); font-size: 13px; padding: 10px 12px; outline: none; }
.srf-input:focus { border-color: #ff7a7a; box-shadow: 0 0 0 3px rgba(255,122,122,0.12); }
.srf-actions { display: flex; gap: 8px; margin-top: 10px; }
.srf-cancel, .srf-send { flex: 1; height: 38px; border-radius: 9px; font-family: var(--f-display); font-weight: 600; font-size: 13px; cursor: pointer; transition: filter .15s, opacity .2s; }
.srf-cancel { background: rgba(255,255,255,0.05); border: 1px solid var(--hair); color: var(--text-dim); }
.srf-cancel:hover { background: rgba(255,255,255,0.1); color: var(--text); }
.srf-send { border: none; background: #ff6a55; color: #1a0500; }
.srf-send:hover:not(:disabled) { filter: brightness(1.08); }
.srf-send:disabled { opacity: 0.6; cursor: default; }
.srf-msg { color: #ff7a7a; font-size: 12px; margin-top: 8px; min-height: 14px; }
.srf-done { color: var(--green); font-size: 13px; text-align: center; padding: 6px 0; }
.sc-actions { display: flex; gap: 10px; }
.sc-btn { flex: 1; height: 44px; border-radius: 10px; display: flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--f-display); font-weight: 600; font-size: 13px; transition: transform .12s, box-shadow .2s, background .2s; }
.sc-btn.primary { background: linear-gradient(90deg, var(--green), #2ee0c0); color: #03130d; box-shadow: 0 0 20px rgba(45,255,176,0.4); }
.sc-btn.primary:hover { transform: translateY(-1px); box-shadow: 0 0 30px rgba(45,255,176,0.6); }
.sc-btn.ghost { background: rgba(255,255,255,0.05); border: 1px solid var(--hair); color: var(--text); }
.sc-btn.ghost:hover { background: rgba(255,255,255,0.1); }
.sc-close { position: absolute; top: 14px; right: 14px; z-index: 5; width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; color: var(--text-dim); background: rgba(0,0,0,0.3); transition: background .15s, color .15s; }
.sc-close:hover { background: rgba(0,0,0,0.6); color: #fff; }

/* toast */
.toast {
  position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%); z-index: 300;
  background: var(--panel-2); border: 1px solid var(--hair-2); border-radius: 10px;
  padding: 12px 20px; font-family: var(--f-mono); font-size: 12px; color: var(--text);
  box-shadow: 0 16px 44px rgba(0,0,0,0.5); animation: toast-in .3s ease;
  display: flex; align-items: center; gap: 9px;
}
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 14px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: absolute; left: 0; right: 0; top: 0; bottom: 0; z-index: 500;
  display: grid; justify-items: center; /* center horizontally via self-alignment, not margin:auto
     — horizontal auto-margins on a grid item inside overflow-y:auto mis-center on iOS Safari */
  overflow-x: hidden; overflow-y: auto; -webkit-overflow-scrolling: touch;
  background:
    radial-gradient(110% 90% at 50% 18%, rgba(45,255,176,0.10), transparent 55%),
    linear-gradient(to bottom, rgba(4,6,10,0.62), rgba(4,6,10,0.86));
  backdrop-filter: blur(1.5px);
  transition: opacity .7s ease, transform .7s cubic-bezier(.7,0,.3,1);
}
.hero.exiting { opacity: 0; transform: scale(1.12); pointer-events: none; }
/* margin:auto centers when it fits, but stays fully scrollable (incl. the top)
   when the content is taller than the viewport — unlike place-items:center. */
.hero-inner { text-align: center; width: 100%; max-width: 760px; min-width: 0; box-sizing: border-box;
  padding: 28px 24px; position: relative; margin: auto; }
.hero-eyebrow {
  font-family: var(--f-mono); font-size: 12px; letter-spacing: 5px; text-transform: uppercase;
  color: var(--green); margin-bottom: 22px; opacity: 1; animation: riseT .6s ease .1s both;
}
.hero-wordmark {
  font-family: var(--f-display); font-weight: 700;
  font-size: clamp(46px, 8vw, 104px); line-height: 0.94; letter-spacing: -2px;
  display: inline-block;
  position: relative; opacity: 1; animation: riseT .7s ease .2s both;
  text-shadow: 0 0 40px rgba(45,255,176,0.25);
}
/* click-anywhere: the logo vibrates subtly */
.hero-wordmark.vibrate { animation: logoVibrate .34s ease-in-out; }
@keyframes logoVibrate {
  0%, 100% { transform: translate(0, 0) rotate(0); }
  15% { transform: translate(-1px, 1px) rotate(-0.4deg); }
  30% { transform: translate(1px, -1px) rotate(0.4deg); }
  45% { transform: translate(-1px, 1px) rotate(-0.3deg); }
  60% { transform: translate(1px, -1px) rotate(0.3deg); }
  75% { transform: translate(-1px, 0) rotate(-0.2deg); }
}
.hero-wordmark .w-num { color: #fff; }
.hero-wordmark .w-and { color: var(--green); }
.hero-wordmark .w-you {
  background: linear-gradient(95deg, var(--green) 10%, var(--cyan) 60%, var(--violet));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}

.hero-sub {
  font-size: clamp(15px, 1.7vw, 19px); color: var(--text-dim); margin-top: 22px; line-height: 1.5;
  opacity: 1; animation: riseT .7s ease .35s both;
}
.hero-sub b { color: var(--text); font-weight: 600; }

/* ---------- hero flow: animated claim → gift → plant → connect (info boxes) ---------- */
.hero-flow {
  display: flex; align-items: center; justify-content: center;
  gap: 11px; flex-wrap: nowrap;
  width: 100vw; margin-left: calc(-50vw + 50%);
  padding: 0 18px; margin-top: 30px; margin-bottom: 4px;
  opacity: 1; animation: riseT .7s ease .35s both;
}
.flow-step {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 15px 10px 11px; border-radius: 13px;
  background: rgba(13, 20, 28, 0.55);
  border: 1px solid var(--hair);
  animation: stepIn .55s cubic-bezier(.2,.9,.25,1) both;
  animation-delay: calc(.45s + var(--i) * .14s);
  position: relative;
}
@keyframes stepIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.flow-step::after {
  content: ''; position: absolute; inset: -1px; border-radius: 13px; pointer-events: none;
  border: 1px solid transparent;
  animation: nodeGlow 4.2s ease-in-out infinite;
  animation-delay: calc(var(--i) * .9s);
}
@keyframes nodeGlow {
  0%, 100% { border-color: transparent; box-shadow: none; }
  10% { border-color: var(--hair-2); box-shadow: 0 0 22px rgba(45,255,176,0.18); }
  22% { border-color: transparent; box-shadow: none; }
}
.fs-text { display: flex; flex-direction: column; gap: 2px; text-align: left; line-height: 1.15; }
.fs-title { font-family: var(--f-display); font-weight: 600; font-size: 16px; color: var(--text); letter-spacing: -0.2px; white-space: nowrap; }
.fs-sub { font-family: var(--f-mono); font-size: 9.5px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--text-dim); white-space: nowrap; }

.fs-glyph { width: 30px; height: 30px; flex: none; display: grid; gap: 3px; }
.fs-glyph.fs-pick, .fs-glyph.fs-near, .fs-glyph.fs-gift { grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(3, 1fr); }
.fs-glyph i { border-radius: 2px; background: rgba(120, 255, 210, 0.10); border: 1px solid var(--hair); transition: none; }
.fs-pick i.on {
  background: var(--green); border-color: var(--green);
  box-shadow: 0 0 8px rgba(45,255,176,0.85);
  animation: pipPulse 4.2s ease-in-out infinite;
}
@keyframes pipPulse {
  0%, 12% { transform: scale(1); box-shadow: 0 0 8px rgba(45,255,176,0.85); }
  6% { transform: scale(1.18); box-shadow: 0 0 16px rgba(45,255,176,1); }
}
.fs-gift i { background: rgba(255, 206, 90, 0.06); }
.fs-gift i.gift {
  background: var(--amber); border-color: var(--amber);
  box-shadow: 0 0 9px rgba(255,206,90,0.95); position: relative;
  animation: giftTwinkle 4.2s ease-in-out infinite; animation-delay: .9s;
}
.fs-gift i.gift::after {
  content: ''; position: absolute; inset: -3px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,206,90,0.5), transparent 70%);
  animation: giftHalo 4.2s ease-in-out infinite; animation-delay: .9s;
}
@keyframes giftTwinkle { 0%, 18%, 100% { transform: scale(1); filter: brightness(1); } 7% { transform: scale(1.28); filter: brightness(1.6); } 12% { transform: scale(1); } }
@keyframes giftHalo { 0%, 18%, 100% { opacity: 0; transform: scale(.6); } 7% { opacity: 1; transform: scale(1.1); } }
.fs-glyph.fs-plant { place-items: center; }
.fs-plant i {
  width: 30px; height: 30px; border-radius: 6px; border: none;
  background: linear-gradient(135deg, var(--green), var(--cyan) 60%, var(--violet));
  box-shadow: 0 0 14px rgba(82,230,255,0.45); position: relative;
  animation: plantPop 4.2s ease-in-out infinite; animation-delay: 1.8s;
}
.fs-plant i::after { content: ''; position: absolute; inset: 0; margin: auto; width: 9px; height: 9px; border-radius: 2px; background: #04060a; }
@keyframes plantPop { 0%, 12% { transform: translateY(0) scale(1); } 6% { transform: translateY(-2px) scale(1.07); } }
.fs-near i { background: rgba(120, 255, 210, 0.06); }
.fs-near i.on {
  background: rgba(82, 230, 255, 0.32); border-color: rgba(82,230,255,0.5);
  animation: nearBlink 4.2s ease-in-out infinite; animation-delay: 2.7s;
}
.fs-near i.hub { background: var(--cyan); border-color: var(--cyan); box-shadow: 0 0 10px rgba(82,230,255,0.8); }
.fs-near i.on:nth-of-type(2) { animation-delay: 2.7s; }
.fs-near i.on:nth-of-type(4) { animation-delay: 2.82s; }
.fs-near i.on:nth-of-type(6) { animation-delay: 2.94s; }
.fs-near i.on:nth-of-type(8) { animation-delay: 3.06s; }
@keyframes nearBlink {
  0%, 30%, 100% { background: rgba(82, 230, 255, 0.12); border-color: var(--hair); }
  10% { background: rgba(82, 230, 255, 0.45); border-color: rgba(82,230,255,0.7); box-shadow: 0 0 8px rgba(82,230,255,0.6); }
}
.flow-link {
  position: relative; width: 38px; height: 2px; flex: none; align-self: center;
  background: repeating-linear-gradient(90deg, var(--hair-2) 0 4px, transparent 4px 9px);
}
.flow-pulse {
  position: absolute; top: 50%; left: 0; width: 7px; height: 7px; margin-top: -3.5px;
  border-radius: 50%; background: var(--green);
  box-shadow: 0 0 10px var(--green), 0 0 4px #fff;
  animation: flowPulse 4.2s linear infinite;
}
.flow-link:nth-of-type(2) .flow-pulse { animation-delay: 0s; }
.flow-link:nth-of-type(4) .flow-pulse { animation-delay: .9s; }
.flow-link:nth-of-type(6) .flow-pulse { animation-delay: 1.8s; }
@keyframes flowPulse {
  0% { left: -4px; opacity: 0; } 8% { opacity: 1; }
  30% { left: calc(100% - 3px); opacity: 1; } 38%, 100% { left: calc(100% - 3px); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .flow-pulse, .fs-pick i.on, .fs-gift i.gift, .fs-gift i.gift::after, .fs-plant i, .fs-near i.on, .flow-step::after { animation: none; }
}
/* mid-width: fold the row into a centered 2×2 */
@media (min-width: 761px) and (max-width: 1120px) {
  .hero-flow { flex-wrap: wrap; width: auto; margin-left: auto; max-width: 540px; row-gap: 10px; column-gap: 10px; }
  .hero-flow .flow-link { display: none; }
  .flow-step { flex: 0 1 calc(50% - 6px); }
}
/* mobile: stack vertically with vertical connectors */
@media (max-width: 760px) {
  .hero-flow { flex-direction: column; align-items: center; gap: 0; margin-top: 22px; }
  .flow-step { width: min(280px, 82vw); }
  .flow-link { width: 2px; height: 22px; background: repeating-linear-gradient(180deg, var(--hair-2) 0 4px, transparent 4px 9px); }
  .flow-pulse { left: 50%; top: 0; margin: 0 0 0 -3.5px; animation: flowPulseV 4.2s linear infinite; }
  @keyframes flowPulseV {
    0% { top: -4px; opacity: 0; } 8% { opacity: 1; }
    60% { top: calc(100% - 3px); opacity: 1; } 70%, 100% { top: calc(100% - 3px); opacity: 0; }
  }
}

.hero-counter { margin: 34px auto 6px; opacity: 1; animation: riseT .7s ease .45s both; }
.hc-num {
  font-family: var(--f-display); font-weight: 700; font-size: clamp(40px, 6vw, 72px); line-height: 1;
  color: var(--green); text-shadow: 0 0 30px rgba(45,255,176,0.5); font-variant-numeric: tabular-nums;
  letter-spacing: 1px;
}
.hc-num .slash { color: var(--text-faint); font-weight: 400; }
.hc-num .total { color: var(--text-dim); font-size: 0.5em; }
.hc-label { font-family: var(--f-mono); font-size: 11px; letter-spacing: 3px; color: var(--text-dim); text-transform: uppercase; margin-top: 10px; }
.hc-track { width: min(440px, 80vw); height: 6px; border-radius: 4px; background: rgba(255,255,255,0.08); margin: 18px auto 0; overflow: hidden; }
.hc-fill { height: 100%; background: linear-gradient(90deg, var(--green), var(--cyan)); box-shadow: 0 0 16px rgba(45,255,176,0.6); transition: width .1s linear; }

.hero-cta { display: flex; gap: 14px; justify-content: center; margin-top: 36px; opacity: 1; animation: riseT .7s ease .6s both; flex-wrap: wrap; }
.btn-primary {
  height: 54px; padding: 0 30px; border-radius: 12px;
  font-family: var(--f-display); font-weight: 700; font-size: 16px; letter-spacing: 0.3px;
  background: linear-gradient(90deg, var(--green), #2ee0c0); color: #03130d;
  box-shadow: 0 0 28px rgba(45,255,176,0.45); transition: transform .12s, box-shadow .2s;
  display: flex; align-items: center; gap: 10px;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 0 42px rgba(45,255,176,0.7); }
.btn-ghost {
  height: 54px; padding: 0 28px; border-radius: 12px;
  font-family: var(--f-display); font-weight: 600; font-size: 16px;
  background: rgba(255,255,255,0.04); border: 1px solid var(--hair-2); color: var(--text);
  transition: background .18s, border-color .18s; display: flex; align-items: center; gap: 9px;
}
.btn-ghost:hover { background: rgba(255,255,255,0.09); border-color: rgba(45,255,176,0.4); }

.hero-ticker {
  margin-top: 38px; font-family: var(--f-mono); font-size: 12px; color: var(--text-faint);
  opacity: 1; animation: riseT .7s ease .75s both; display: flex; align-items: center; gap: 10px; justify-content: center;
}
.hero-ticker .live-dot { width: 6px; height: 6px; }
.hero-ticker b { color: var(--text-dim); font-weight: 400; }

.hero-charity {
  margin-top: 10px; font-family: var(--f-mono); font-size: 12px; color: var(--text-faint);
  display: flex; align-items: center; gap: 7px; justify-content: center;
  opacity: 1; animation: riseT .7s ease .85s both;
}
.hero-charity b { color: var(--green); font-weight: 600; }
.hc-heart { display: inline-block; font-size: 13px; animation: heartbeat 1.3s ease-in-out infinite; }
@keyframes heartbeat {
  0%, 100% { transform: scale(1); }
  14% { transform: scale(1.28); }
  28% { transform: scale(1); }
  42% { transform: scale(1.28); }
  70% { transform: scale(1); }
}

.hero-skip {
  position: absolute; bottom: 26px; right: 30px; z-index: 510;
  font-family: var(--f-mono); font-size: 12px; color: var(--text-faint);
  display: flex; align-items: center; gap: 7px; opacity: 1; animation: riseT .6s ease 1s both;
  transition: color .15s;
}
.hero-skip:hover { color: var(--green); }

@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
@keyframes riseT { from { transform: translateY(18px); } to { transform: translateY(0); } }

/* ============================================================
   MOBILE  (phones / small tablets, touch-first)
   ============================================================ */
@keyframes sheet-in { from { opacity: 0; transform: translateY(100%); } to { opacity: 1; transform: translateY(0); } }

/* legacy drawer + hamburger — replaced by the new mobile shell, never shown */
.hmb, .drawer, .drawer-scrim { display: none !important; }

/* ---- mobile shell components (appearance here; surfaced in the 760px block) ---- */
/* search toggle button in the compact bar */
.search-btn { display: none; width: 34px; height: 34px; flex: none;
  align-items: center; justify-content: center;
  border: 1px solid var(--hair); border-radius: 9px; background: var(--panel);
  color: var(--text-dim); font-size: 18px; }
.search-btn:active { color: var(--green); }

/* floating recenter + zoom cluster (bottom-right, thumb-reachable) */
.mobctl { display: none; position: fixed; right: 14px; z-index: 60;
  bottom: calc(env(safe-area-inset-bottom) + 112px);
  flex-direction: column; gap: 10px; }
.mc-btn { width: 48px; height: 48px; border-radius: 15px;
  background: rgba(9,16,21,0.82); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--hair-2); color: var(--text);
  font-size: 22px; line-height: 1; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5); transition: transform .1s, background .15s; }
.mc-btn:active { transform: scale(0.93); background: rgba(45,255,176,0.14); }
.mc-recenter { color: var(--green); font-size: 24px; }

/* peek bar (latest claim) above the footer — taps to expand the activity sheet */
.peek { display: none; position: fixed; left: 10px; right: 10px; z-index: 55;
  bottom: calc(env(safe-area-inset-bottom) + 50px);
  align-items: center; gap: 9px; text-align: left; height: 48px; padding: 8px 14px 0;
  background: rgba(9,16,21,0.9); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--hair-2); border-radius: 13px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  font-family: var(--f-mono); font-size: 12.5px; color: var(--text-dim); }
/* grab handle (mirrors the expanded sheet's) — signals the bar is expandable */
.peek .peek-grab { position: absolute; top: 5px; left: 50%; transform: translateX(-50%);
  width: 34px; height: 4px; border-radius: 3px; background: var(--hair-2); transition: background .15s; }
.peek .peek-body { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.peek .peek-body b { color: var(--text); font-weight: 600; }
.peek:active { background: rgba(12,22,28,0.95); }
.peek:active .peek-grab { background: var(--green); }

/* activity sheet (expanded peek) — minimap + tier legend + feed + focus */
.asheet { position: fixed; inset: 0; z-index: 160; visibility: hidden; pointer-events: none; }
.asheet.open { visibility: visible; pointer-events: auto; }
.asheet-scrim { position: absolute; inset: 0; background: rgba(2,4,7,0.55);
  opacity: 0; transition: opacity .3s; }
.asheet.open .asheet-scrim { opacity: 1; }
.asheet-panel { position: absolute; left: 0; right: 0; bottom: 0; max-height: 80vh; overflow-y: auto;
  background: var(--panel-2); border-top: 1px solid var(--hair-2); border-radius: 18px 18px 0 0;
  box-shadow: 0 -12px 40px rgba(0,0,0,0.6);
  padding: 8px 14px calc(18px + env(safe-area-inset-bottom));
  transform: translateY(100%); transition: transform .32s cubic-bezier(.2,.9,.25,1); touch-action: pan-y; }
.asheet.open .asheet-panel { transform: translateY(0); }
/* tappable handle (enlarged hit area) — tap to close */
.asheet-grab { height: 22px; margin: 0 0 2px; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.asheet-grab::before { content: ''; width: 38px; height: 4px; border-radius: 3px; background: var(--hair-2); transition: background .15s, width .15s; }
.asheet-grab:active::before { background: var(--green); width: 46px; }
.asheet-hd { display: flex; align-items: center; justify-content: space-between; padding: 4px 2px 10px; }
.asheet-ttl { font-family: var(--f-mono); font-size: 11px; letter-spacing: 2px; text-transform: uppercase; color: var(--text-dim); }
.asheet-x { font-size: 15px; color: var(--text-dim); width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; }
.asheet-x:active { background: rgba(255,255,255,0.08); color: var(--text); }
.asheet-body { display: flex; flex-direction: column; gap: 14px; }
/* relocated feed laid out static + full-width; its own header is redundant with the sheet title */
.asheet-body .feed { position: static; inset: auto; width: 100%; margin: 0; max-height: none; overflow: visible; touch-action: pan-y; }
.asheet-body .feed-hd { display: none; }
/* inside the sheet the panel itself scrolls — let every section expand fully */
.asheet-body .feed-list, .asheet-body .gifts-list { max-height: none; overflow: visible; }
.asheet-body .focus-tog { display: flex; justify-content: space-between; width: 100%; padding: 4px 2px; border-top: 1px solid var(--hair); padding-top: 14px; }

/* Touch / no-hover devices: the hover tooltip never applies. */
@media (hover: none) {
  .tooltip { display: none !important; }
}

@media (max-width: 760px) {
  /* keyboard hints never apply on touch; zoom -> floating cluster, focus -> sheet.
     minimap is dropped on mobile — the activity sheet is all recent claims. */
  .controls, .zoom, .focus-tog, .minimap { display: none; }

  /* compact glass top bar */
  .hdr { height: 54px; gap: 10px; padding: 0 12px;
         padding-top: env(safe-area-inset-top);
         background: rgba(6,10,14,0.72);
         backdrop-filter: blur(16px) saturate(1.3); -webkit-backdrop-filter: blur(16px) saturate(1.3);
         border-bottom: 1px solid rgba(255,255,255,0.06); }
  .brand { font-size: 20px; }

  /* occupied: number + thin progress, centered between brand and the icon cluster */
  .stat-occ { position: static; transform: none; flex-direction: row; align-items: center;
              gap: 8px; margin: 0 auto; }
  .stat-occ .lbl, .stat-occ .pct { display: none; }
  .stat-occ .num { font-size: 15px; }
  .occ-track { width: 46px; margin-top: 0; }

  /* right-side icon cluster — 20% larger taps; search button is right-most and above the overlay */
  .search-btn { display: flex; order: 3; position: relative; z-index: 6;
                width: 41px; height: 41px; font-size: 22px; }
  .snd-btn, .help-btn { width: 41px; height: 41px; font-size: 20px; }

  /* expandable search: an overlay over the bar, revealed by the search button */
  .search { position: absolute; left: 12px; right: 52px; top: 50%; transform: translateY(-50%);
            flex: none; min-width: 0; opacity: 0; pointer-events: none; z-index: 5;
            transition: opacity .16s ease; }
  .hdr.search-open .search { opacity: 1; pointer-events: auto; }
  .hdr.search-open .brand, .hdr.search-open .stat-occ,
  .hdr.search-open .snd-btn, .hdr.search-open .help-btn { opacity: 0; pointer-events: none; }
  .search input { height: 38px; font-size: 16px; }

  /* surface the floating controls + peek bar */
  .mobctl, .peek { display: flex; }
  /* hide bottom chrome while a full-screen sheet / hero is up */
  body:has(.hero:not(.exiting)) .mobctl, body:has(.hero:not(.exiting)) .peek,
  body:has(.claim) .mobctl, body:has(.claim) .peek,
  body:has(.modal-scrim) .mobctl, body:has(.modal-scrim) .peek { display: none; }

  /* status readout: full width, larger, clear of the home indicator */
  .statusbar { left: 0; right: 0; width: 100%; box-sizing: border-box;
               justify-content: space-between; gap: 4px;
               padding: 10px 14px;
               padding-bottom: calc(10px + env(safe-area-inset-bottom));
               font-size: 12px; }
  .statusbar .sb-item { white-space: nowrap; }

  /* claim panel -> bottom sheet */
  .claim { left: 0; right: 0; bottom: 0; width: auto;
           border-radius: 16px 16px 0 0;
           padding-bottom: env(safe-area-inset-bottom);
           animation: sheet-in .3s cubic-bezier(.2,.9,.25,1); }

  /* profile / share card -> bottom sheet */
  .modal-scrim { place-items: end center; }
  .share-card { width: 100%; max-width: 560px;
                border-radius: 18px 18px 0 0;
                animation: sheet-in .35s cubic-bezier(.2,.9,.25,1); }
  .sc-hero { padding: 24px 20px 20px; }
  .sc-name { font-size: 20px; }
  .sc-av { width: 68px; height: 68px; font-size: 30px; }
  .sc-stats { gap: 16px; flex-wrap: wrap; }
  .sc-foot { padding: 14px 20px calc(18px + env(safe-area-inset-bottom)); }
  .sc-btn { height: 48px; }                            /* >=44px tap target */

  /* hero scene: breathing room + smaller eyebrow (one line) + smaller logo */
  .hero-inner { padding: 24px 20px; }
  .hero-eyebrow { font-size: 8.5px; letter-spacing: 2px; white-space: nowrap;
                  margin-top: 18px; margin-bottom: 26px; }
  .hero-wordmark { font-size: clamp(37px, 9vw, 56px); }
  /* claimed/remaining readout: one line on narrow screens */
  .hc-label { font-size: 8.5px; letter-spacing: 1.5px; white-space: nowrap; }

  /* hero CTAs: stacked, equal, full content width */
  .hero-cta { flex-direction: column; align-items: stretch; gap: 12px;
              width: 100%; max-width: 340px; margin: 36px auto 0; }
  .hero-cta .btn-primary, .hero-cta .btn-ghost { width: 100%; }
}

/* very small phones */
@media (max-width: 380px) {
  .brand { font-size: 22px; }
  .statusbar { font-size: 10.5px; padding-left: 10px; padding-right: 10px; }
  .sc-stats { gap: 12px; }
}
